triangle-types 1.0.371 → 1.0.373

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.
@@ -0,0 +1,53 @@
1
+ // import { FederalCongressBillTypeID, is_federal_congress_bill_type_id } from "./FederalCongressBill.js"
2
+ // import { FederalCongressChamberID, is_federal_congress_chamber_id } from "./FederalCongressVote.js"
3
+ export {};
4
+ // export const federal_congress_amendment_type_ids = ["HAMDT", "SAMDT", "SUAMDT"] as const
5
+ // export type FederalCongressAmendmentTypeID = typeof federal_congress_amendment_type_ids[number]
6
+ // export function is_federal_congress_amendment_type_id(federal_congress_amendment_type_id : any) : federal_congress_amendment_type_id is FederalCongressAmendmentTypeID {
7
+ // return federal_congress_amendment_type_ids.includes(federal_congress_amendment_type_id)
8
+ // }
9
+ // export class FederalCongressAmendment {
10
+ // readonly federal_congress_id : number
11
+ // readonly amendment_type_id : FederalCongressAmendmentTypeID
12
+ // readonly amendment_id : number
13
+ // readonly federal_congress_chamber_id : FederalCongressChamberID
14
+ // readonly bill_type_id : FederalCongressBillTypeID
15
+ // readonly bill_id : number
16
+ // readonly purpose? : string
17
+ // readonly description? : string
18
+ // readonly modify_time : string
19
+ // readonly intro_date : string
20
+ // readonly federal_congress_member_id? : string
21
+ // constructor(federal_congress_amendment : any) {
22
+ // if (!FederalCongressAmendment.is(federal_congress_amendment)) {
23
+ // throw Error("Invalid input.")
24
+ // }
25
+ // this.federal_congress_id = federal_congress_amendment.federal_congress_id
26
+ // this.amendment_type_id = federal_congress_amendment.amendment_type_id
27
+ // this.amendment_id = federal_congress_amendment.amendment_id
28
+ // this.federal_congress_chamber_id = federal_congress_amendment.federal_congress_chamber_id
29
+ // this.bill_type_id = federal_congress_amendment.bill_type_id
30
+ // this.bill_id = federal_congress_amendment.bill_id
31
+ // this.purpose = federal_congress_amendment.purpose
32
+ // this.description = federal_congress_amendment.description
33
+ // this.modify_time = federal_congress_amendment.modify_time
34
+ // this.intro_date = federal_congress_amendment.intro_date
35
+ // this.federal_congress_member_id = federal_congress_amendment.federal_congress_member_id
36
+ // }
37
+ // static is(federal_congress_amendment : any) : federal_congress_amendment is FederalCongressAmendment {
38
+ // return (
39
+ // federal_congress_amendment !== undefined &&
40
+ // typeof federal_congress_amendment.federal_congress_id === "number" &&
41
+ // is_federal_congress_amendment_type_id(federal_congress_amendment.amendment_type_id) &&
42
+ // typeof federal_congress_amendment.amendment_id === "number" &&
43
+ // is_federal_congress_chamber_id(federal_congress_amendment.federal_congress_chamber_id) &&
44
+ // is_federal_congress_bill_type_id(federal_congress_amendment.bill_type_id) &&
45
+ // typeof federal_congress_amendment.bill_id === "number" &&
46
+ // (federal_congress_amendment.purpose === undefined || typeof federal_congress_amendment.purpose === "string") &&
47
+ // (federal_congress_amendment.description === undefined || typeof federal_congress_amendment.description === "string") &&
48
+ // typeof federal_congress_amendment.modify_time === "string" &&
49
+ // typeof federal_congress_amendment.intro_date === "string" &&
50
+ // (federal_congress_amendment.federal_congress_member_id === undefined || typeof federal_congress_amendment.federal_congress_member_id === "string")
51
+ // )
52
+ // }
53
+ // }
@@ -1,5 +1,3 @@
1
- import { FederalCongressMember } from "../federal_congress/FederalCongressMember.js";
2
- import { FederalElectionCandidate } from "../federal_elections/FederalElectionCandidate.js";
3
1
  export declare class Scout {
4
2
  readonly scout_id: string;
5
3
  readonly name: string;
@@ -9,9 +7,3 @@ export declare class Scout {
9
7
  constructor(scout: any);
10
8
  static is(scout: any): scout is Scout;
11
9
  }
12
- export declare class ScoutAux extends Scout {
13
- readonly federal_election_candidates: FederalElectionCandidate[];
14
- readonly federal_congress_member?: FederalCongressMember;
15
- constructor(scout: any);
16
- static is(scout: any): scout is ScoutAux;
17
- }
@@ -1,10 +1,7 @@
1
- import { FederalCongressMember } from "../federal_congress/FederalCongressMember.js";
2
- import { FederalElectionCandidate } from "../federal_elections/FederalElectionCandidate.js";
3
1
  export class Scout {
4
2
  scout_id;
5
3
  name;
6
4
  ballotpedia_person_id;
7
- // readonly wikipedia_document_id? : string
8
5
  s3_id_img;
9
6
  constructor(scout) {
10
7
  if (!Scout.is(scout)) {
@@ -13,7 +10,6 @@ export class Scout {
13
10
  this.scout_id = scout.scout_id;
14
11
  this.name = scout.name;
15
12
  this.ballotpedia_person_id = scout.ballotpedia_person_id;
16
- // this.wikipedia_document_id = scout.wikipedia_document_id
17
13
  this.s3_id_img = scout.s3_id_img;
18
14
  }
19
15
  static is(scout) {
@@ -21,24 +17,6 @@ export class Scout {
21
17
  typeof scout.scout_id === "string" &&
22
18
  typeof scout.name === "string" &&
23
19
  typeof scout.ballotpedia_person_id === "number" &&
24
- // (scout.wikipedia_document_id === undefined || typeof scout.wikipedia_document_id === "string") &&
25
20
  (scout.s3_id_img === undefined || typeof scout.s3_id_img === "string"));
26
21
  }
27
22
  }
28
- export class ScoutAux extends Scout {
29
- federal_election_candidates;
30
- federal_congress_member;
31
- constructor(scout) {
32
- if (!ScoutAux.is(scout)) {
33
- throw Error("Invalid input.");
34
- }
35
- super(scout);
36
- this.federal_election_candidates = scout.federal_election_candidates;
37
- this.federal_congress_member = scout.federal_congress_member;
38
- }
39
- static is(scout) {
40
- return (Scout.is(scout) &&
41
- Array.isArray(scout.federal_election_candidates) && scout.federal_election_candidates.every(FederalElectionCandidate.is) &&
42
- (scout.federal_congress_member === undefined || FederalCongressMember.is(scout.federal_congress_member)));
43
- }
44
- }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "triangle-types",
3
- "version": "1.0.371",
3
+ "version": "1.0.373",
4
4
  "main": "dist/src/index.js",
5
5
  "types": "dist/src/index.d.ts",
6
6
  "scripts": {
@@ -0,0 +1,59 @@
1
+ // import { FederalCongressBillTypeID, is_federal_congress_bill_type_id } from "./FederalCongressBill"
2
+ // import { FederalCongressChamberID, is_federal_congress_chamber_id } from "./FederalCongressVote"
3
+
4
+ // export const federal_congress_amendment_type_ids = ["HAMDT", "SAMDT", "SUAMDT"] as const
5
+
6
+ // export type FederalCongressAmendmentTypeID = typeof federal_congress_amendment_type_ids[number]
7
+
8
+ // export function is_federal_congress_amendment_type_id(federal_congress_amendment_type_id : any) : federal_congress_amendment_type_id is FederalCongressAmendmentTypeID {
9
+ // return federal_congress_amendment_type_ids.includes(federal_congress_amendment_type_id)
10
+ // }
11
+
12
+ // export class FederalCongressAmendment {
13
+ // readonly federal_congress_id : number
14
+ // readonly amendment_type_id : FederalCongressAmendmentTypeID
15
+ // readonly amendment_id : number
16
+ // readonly federal_congress_chamber_id : FederalCongressChamberID
17
+ // readonly bill_type_id : FederalCongressBillTypeID
18
+ // readonly bill_id : number
19
+ // readonly purpose? : string
20
+ // readonly description? : string
21
+ // readonly modify_time : string
22
+ // readonly intro_date : string
23
+ // readonly federal_congress_member_id? : string
24
+
25
+ // constructor(federal_congress_amendment : any) {
26
+ // if (!FederalCongressAmendment.is(federal_congress_amendment)) {
27
+ // throw Error("Invalid input.")
28
+ // }
29
+ // this.federal_congress_id = federal_congress_amendment.federal_congress_id
30
+ // this.amendment_type_id = federal_congress_amendment.amendment_type_id
31
+ // this.amendment_id = federal_congress_amendment.amendment_id
32
+ // this.federal_congress_chamber_id = federal_congress_amendment.federal_congress_chamber_id
33
+ // this.bill_type_id = federal_congress_amendment.bill_type_id
34
+ // this.bill_id = federal_congress_amendment.bill_id
35
+ // this.purpose = federal_congress_amendment.purpose
36
+ // this.description = federal_congress_amendment.description
37
+ // this.modify_time = federal_congress_amendment.modify_time
38
+ // this.intro_date = federal_congress_amendment.intro_date
39
+ // this.federal_congress_member_id = federal_congress_amendment.federal_congress_member_id
40
+ // }
41
+
42
+ // static is(federal_congress_amendment : any) : federal_congress_amendment is FederalCongressAmendment {
43
+ // return (
44
+ // federal_congress_amendment !== undefined &&
45
+ // typeof federal_congress_amendment.federal_congress_id === "number" &&
46
+ // is_federal_congress_amendment_type_id(federal_congress_amendment.amendment_type_id) &&
47
+ // typeof federal_congress_amendment.amendment_id === "number" &&
48
+ // is_federal_congress_chamber_id(federal_congress_amendment.federal_congress_chamber_id) &&
49
+ // is_federal_congress_bill_type_id(federal_congress_amendment.bill_type_id) &&
50
+ // typeof federal_congress_amendment.bill_id === "number" &&
51
+ // (federal_congress_amendment.purpose === undefined || typeof federal_congress_amendment.purpose === "string") &&
52
+ // (federal_congress_amendment.description === undefined || typeof federal_congress_amendment.description === "string") &&
53
+ // typeof federal_congress_amendment.modify_time === "string" &&
54
+ // typeof federal_congress_amendment.intro_date === "string" &&
55
+ // (federal_congress_amendment.federal_congress_member_id === undefined || typeof federal_congress_amendment.federal_congress_member_id === "string")
56
+ // )
57
+ // }
58
+
59
+ // }
@@ -1,11 +1,7 @@
1
- import { FederalCongressMember } from "../federal_congress/FederalCongressMember"
2
- import { FederalElectionCandidate } from "../federal_elections/FederalElectionCandidate"
3
-
4
1
  export class Scout {
5
2
  readonly scout_id : string
6
3
  readonly name : string
7
4
  readonly ballotpedia_person_id : number
8
- // readonly wikipedia_document_id? : string
9
5
  readonly s3_id_img? : string
10
6
  readonly [x : string] : any
11
7
 
@@ -16,7 +12,6 @@ export class Scout {
16
12
  this.scout_id = scout.scout_id
17
13
  this.name = scout.name
18
14
  this.ballotpedia_person_id = scout.ballotpedia_person_id
19
- // this.wikipedia_document_id = scout.wikipedia_document_id
20
15
  this.s3_id_img = scout.s3_id_img
21
16
  }
22
17
 
@@ -26,30 +21,7 @@ export class Scout {
26
21
  typeof scout.scout_id === "string" &&
27
22
  typeof scout.name === "string" &&
28
23
  typeof scout.ballotpedia_person_id === "number" &&
29
- // (scout.wikipedia_document_id === undefined || typeof scout.wikipedia_document_id === "string") &&
30
24
  (scout.s3_id_img === undefined || typeof scout.s3_id_img === "string")
31
25
  )
32
26
  }
33
- }
34
-
35
- export class ScoutAux extends Scout {
36
- readonly federal_election_candidates : FederalElectionCandidate[]
37
- readonly federal_congress_member? : FederalCongressMember
38
-
39
- constructor(scout : any) {
40
- if (!ScoutAux.is(scout)) {
41
- throw Error("Invalid input.")
42
- }
43
- super(scout)
44
- this.federal_election_candidates = scout.federal_election_candidates
45
- this.federal_congress_member = scout.federal_congress_member
46
- }
47
-
48
- static is(scout : any) : scout is ScoutAux {
49
- return (
50
- Scout.is(scout) &&
51
- Array.isArray(scout.federal_election_candidates) && scout.federal_election_candidates.every(FederalElectionCandidate.is) &&
52
- (scout.federal_congress_member === undefined || FederalCongressMember.is(scout.federal_congress_member))
53
- )
54
- }
55
27
  }