triangle-types 1.0.306 → 1.0.308

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.
@@ -41,7 +41,7 @@ export * from "./types/federal_congress/FederalCongress.js";
41
41
  export * from "./types/federal_congress/FederalCongressBill.js";
42
42
  export * from "./types/federal_congress/FederalCongressBillAction.js";
43
43
  export * from "./types/federal_congress/FederalCongressBillDocument.js";
44
- export * from "./types/federal_congress/FederalCongressBillTag.js";
44
+ export * from "./types/federal_congress/FederalCongressBillMember.js";
45
45
  export * from "./types/federal_congress/FederalCongressCommittee.js";
46
46
  export * from "./types/federal_congress/FederalCongressDistrict.js";
47
47
  export * from "./types/federal_congress/FederalCongressMember.js";
package/dist/src/index.js CHANGED
@@ -41,7 +41,7 @@ export * from "./types/federal_congress/FederalCongress.js";
41
41
  export * from "./types/federal_congress/FederalCongressBill.js";
42
42
  export * from "./types/federal_congress/FederalCongressBillAction.js";
43
43
  export * from "./types/federal_congress/FederalCongressBillDocument.js";
44
- export * from "./types/federal_congress/FederalCongressBillTag.js";
44
+ export * from "./types/federal_congress/FederalCongressBillMember.js";
45
45
  export * from "./types/federal_congress/FederalCongressCommittee.js";
46
46
  export * from "./types/federal_congress/FederalCongressDistrict.js";
47
47
  export * from "./types/federal_congress/FederalCongressMember.js";
@@ -3,9 +3,8 @@ export type FederalCongressBillTypeID = typeof federal_congress_bill_type_ids[nu
3
3
  export declare function is_federal_congress_bill_type_id(federal_congress_bill_type_id: any): federal_congress_bill_type_id is FederalCongressBillTypeID;
4
4
  export declare class FederalCongressBill {
5
5
  readonly federal_congress_id: number;
6
- readonly bill_id: string;
7
6
  readonly bill_type_id: FederalCongressBillTypeID;
8
- readonly number: number;
7
+ readonly bill_id: number;
9
8
  readonly title: string;
10
9
  readonly modify_time: string;
11
10
  readonly intro_date: string;
@@ -4,9 +4,8 @@ export function is_federal_congress_bill_type_id(federal_congress_bill_type_id)
4
4
  }
5
5
  export class FederalCongressBill {
6
6
  federal_congress_id;
7
- bill_id;
8
7
  bill_type_id;
9
- number;
8
+ bill_id;
10
9
  title;
11
10
  modify_time;
12
11
  intro_date;
@@ -17,9 +16,8 @@ export class FederalCongressBill {
17
16
  throw Error("Invalid input.");
18
17
  }
19
18
  this.federal_congress_id = federal_congress_bill.federal_congress_id;
20
- this.bill_id = federal_congress_bill.bill_id;
21
19
  this.bill_type_id = federal_congress_bill.bill_type_id;
22
- this.number = federal_congress_bill.number;
20
+ this.bill_id = federal_congress_bill.bill_id;
23
21
  this.title = federal_congress_bill.title;
24
22
  this.modify_time = federal_congress_bill.modify_time;
25
23
  this.intro_date = federal_congress_bill.intro_date;
@@ -29,9 +27,8 @@ export class FederalCongressBill {
29
27
  static is(federal_congress_bill) {
30
28
  return (federal_congress_bill !== undefined &&
31
29
  typeof federal_congress_bill.federal_congress_id === "number" &&
32
- typeof federal_congress_bill.bill_id === "string" &&
33
30
  is_federal_congress_bill_type_id(federal_congress_bill.bill_type_id) &&
34
- typeof federal_congress_bill.number === "number" &&
31
+ typeof federal_congress_bill.bill_id === "number" &&
35
32
  typeof federal_congress_bill.title === "string" &&
36
33
  typeof federal_congress_bill.modify_time === "string" &&
37
34
  typeof federal_congress_bill.intro_date === "string" &&
@@ -1,9 +1,11 @@
1
+ import { FederalCongressBillTypeID } from "./FederalCongressBill.js";
1
2
  declare const federal_congress_bill_action_type_ids: readonly ["COMMITTEE", "CALENDARS", "FLOOR", "BECAMELAW", "INTROREFERRAL", "PRESIDENT", "RESOLVINGDIFFERENCES", "DISCHARGE", "NOTUSED", "VETO"];
2
3
  export type FederalCongressBillActionTypeID = typeof federal_congress_bill_action_type_ids[number];
3
4
  export declare function is_federal_congress_bill_action_type_id(federal_congress_bill_action_type_id: any): federal_congress_bill_action_type_id is FederalCongressBillActionTypeID;
4
5
  export declare class FederalCongressBillAction {
5
6
  readonly federal_congress_id: number;
6
- readonly bill_id: string;
7
+ readonly bill_type_id: FederalCongressBillTypeID;
8
+ readonly bill_id: number;
7
9
  readonly action_id: number;
8
10
  readonly bill_action_type_id?: FederalCongressBillActionTypeID;
9
11
  readonly date: string;
@@ -1,3 +1,4 @@
1
+ import { is_federal_congress_bill_type_id } from "./FederalCongressBill.js";
1
2
  const federal_congress_bill_action_type_ids = [
2
3
  "COMMITTEE",
3
4
  "CALENDARS",
@@ -15,6 +16,7 @@ export function is_federal_congress_bill_action_type_id(federal_congress_bill_ac
15
16
  }
16
17
  export class FederalCongressBillAction {
17
18
  federal_congress_id;
19
+ bill_type_id;
18
20
  bill_id;
19
21
  action_id;
20
22
  bill_action_type_id;
@@ -27,6 +29,7 @@ export class FederalCongressBillAction {
27
29
  throw Error("Invalid input.");
28
30
  }
29
31
  this.federal_congress_id = federal_congress_bill_action.federal_congress_id;
32
+ this.bill_type_id = federal_congress_bill_action.bill_type_id;
30
33
  this.bill_id = federal_congress_bill_action.bill_id;
31
34
  this.action_id = federal_congress_bill_action.action_id;
32
35
  this.bill_action_type_id = federal_congress_bill_action.bill_action_type_id;
@@ -38,6 +41,7 @@ export class FederalCongressBillAction {
38
41
  static is(federal_congress_bill_action) {
39
42
  return (federal_congress_bill_action !== undefined &&
40
43
  typeof federal_congress_bill_action.federal_congress_id === "number" &&
44
+ is_federal_congress_bill_type_id(federal_congress_bill_action.federal_congress_bill_type_id) &&
41
45
  typeof federal_congress_bill_action.bill_id === "string" &&
42
46
  typeof federal_congress_bill_action.action_id === "number" &&
43
47
  (federal_congress_bill_action.bill_action_type_id === undefined || is_federal_congress_bill_action_type_id(federal_congress_bill_action.bill_action_type_id)) &&
@@ -4,10 +4,9 @@ export type FederalCongressBillDocumentTypeID = typeof federal_congress_bill_doc
4
4
  export declare function is_federal_congress_bill_document_type_id(federal_congress_bill_document_type_id: any): federal_congress_bill_document_type_id is FederalCongressBillDocumentTypeID;
5
5
  export declare class FederalCongressBillDocument {
6
6
  readonly federal_congress_id: number;
7
- readonly bill_id: string;
8
- readonly document_id: string;
9
7
  readonly bill_type_id: FederalCongressBillTypeID;
10
- readonly number: number;
8
+ readonly bill_id: number;
9
+ readonly document_id: string;
11
10
  readonly bill_document_type_id: FederalCongressBillDocumentTypeID;
12
11
  readonly format_id: string;
13
12
  readonly publish_time?: string;
@@ -1,3 +1,4 @@
1
+ import { is_federal_congress_bill_type_id } from "./FederalCongressBill.js";
1
2
  const federal_congress_bill_document_type_ids = [
2
3
  "AS", "ASH", "ATH", "ATS", "CDH", "CDS", "CPH", "CPS", "EAH", "EAS", "EH", "ENR", "ES", "FPH", "FPS", "HDS", "IH", "IPH", "IPS", "IS", "LTH", "LTS", "PAP", "PCS", "PP", "PVTL", "PL", "RCH", "RCS", "RDS", "RFH", "RFS", "RH", "RHUC", "RIH", "RS", "RTH", "RTS", "SC", "STATPVT", "STAT", "STATCONRES"
3
4
  ];
@@ -6,10 +7,9 @@ export function is_federal_congress_bill_document_type_id(federal_congress_bill_
6
7
  }
7
8
  export class FederalCongressBillDocument {
8
9
  federal_congress_id;
10
+ bill_type_id;
9
11
  bill_id;
10
12
  document_id;
11
- bill_type_id;
12
- number;
13
13
  bill_document_type_id;
14
14
  format_id;
15
15
  publish_time;
@@ -20,10 +20,9 @@ export class FederalCongressBillDocument {
20
20
  throw Error("Invalid input.");
21
21
  }
22
22
  this.federal_congress_id = federal_congress_bill_document.federal_congress_id;
23
+ this.bill_type_id = federal_congress_bill_document.bill_type_id;
23
24
  this.bill_id = federal_congress_bill_document.bill_id;
24
25
  this.document_id = federal_congress_bill_document.document_id;
25
- this.bill_type_id = federal_congress_bill_document.bill_type_id;
26
- this.number = federal_congress_bill_document.number;
27
26
  this.bill_document_type_id = federal_congress_bill_document.bill_document_type_id;
28
27
  this.format_id = federal_congress_bill_document.format_id;
29
28
  this.publish_time = federal_congress_bill_document.publish_time;
@@ -33,10 +32,9 @@ export class FederalCongressBillDocument {
33
32
  static is(federal_congress_bill_document) {
34
33
  return (federal_congress_bill_document !== undefined &&
35
34
  typeof federal_congress_bill_document.federal_congress_id === "number" &&
35
+ is_federal_congress_bill_type_id(federal_congress_bill_document.bill_type_id) &&
36
36
  typeof federal_congress_bill_document.bill_id === "string" &&
37
37
  typeof federal_congress_bill_document.document_id === "string" &&
38
- typeof federal_congress_bill_document.bill_type_id === "string" &&
39
- typeof federal_congress_bill_document.number === "number" &&
40
38
  is_federal_congress_bill_document_type_id(federal_congress_bill_document.bill_document_type_id) &&
41
39
  typeof federal_congress_bill_document.format_id === "string" &&
42
40
  (federal_congress_bill_document.publish_time === undefined || typeof federal_congress_bill_document.publish_time === "string") &&
@@ -0,0 +1,10 @@
1
+ import { FederalCongressBillTypeID } from "./FederalCongressBill.js";
2
+ export declare class FederalCongressBillMember {
3
+ readonly federal_congress_id: number;
4
+ readonly bill_type_id: FederalCongressBillTypeID;
5
+ readonly bill_id: number;
6
+ readonly federal_congress_member_id: string;
7
+ readonly [x: string]: any;
8
+ constructor(federal_congress_bill: FederalCongressBillMember);
9
+ static is(federal_congress_bill: any): federal_congress_bill is FederalCongressBillMember;
10
+ }
@@ -0,0 +1,23 @@
1
+ import { is_federal_congress_bill_type_id } from "./FederalCongressBill.js";
2
+ export class FederalCongressBillMember {
3
+ federal_congress_id;
4
+ bill_type_id;
5
+ bill_id;
6
+ federal_congress_member_id;
7
+ constructor(federal_congress_bill) {
8
+ if (!FederalCongressBillMember.is(federal_congress_bill)) {
9
+ throw Error("Invalid input.");
10
+ }
11
+ this.federal_congress_id = federal_congress_bill.federal_congress_id;
12
+ this.bill_type_id = federal_congress_bill.bill_type_id;
13
+ this.bill_id = federal_congress_bill.bill_id;
14
+ this.federal_congress_member_id = federal_congress_bill.federal_congress_member_id;
15
+ }
16
+ static is(federal_congress_bill) {
17
+ return (federal_congress_bill !== undefined &&
18
+ typeof federal_congress_bill.federal_congress_id === "number" &&
19
+ is_federal_congress_bill_type_id(federal_congress_bill.bill_type_id) &&
20
+ typeof federal_congress_bill.bill_id === "string" &&
21
+ typeof federal_congress_bill.federal_congress_member_id === "string");
22
+ }
23
+ }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "triangle-types",
3
- "version": "1.0.306",
3
+ "version": "1.0.308",
4
4
  "main": "dist/src/index.js",
5
5
  "types": "dist/src/index.d.ts",
6
6
  "scripts": {
package/src/index.ts CHANGED
@@ -48,7 +48,7 @@ export * from "./types/federal_congress/FederalCongress"
48
48
  export * from "./types/federal_congress/FederalCongressBill"
49
49
  export * from "./types/federal_congress/FederalCongressBillAction"
50
50
  export * from "./types/federal_congress/FederalCongressBillDocument"
51
- export * from "./types/federal_congress/FederalCongressBillTag"
51
+ export * from "./types/federal_congress/FederalCongressBillMember"
52
52
  export * from "./types/federal_congress/FederalCongressCommittee"
53
53
  export * from "./types/federal_congress/FederalCongressDistrict"
54
54
  export * from "./types/federal_congress/FederalCongressMember"
@@ -8,9 +8,8 @@ export function is_federal_congress_bill_type_id(federal_congress_bill_type_id :
8
8
 
9
9
  export class FederalCongressBill {
10
10
  readonly federal_congress_id : number
11
- readonly bill_id : string
12
11
  readonly bill_type_id : FederalCongressBillTypeID
13
- readonly number : number
12
+ readonly bill_id : number
14
13
  readonly title : string
15
14
  readonly modify_time : string
16
15
  readonly intro_date : string
@@ -22,9 +21,8 @@ export class FederalCongressBill {
22
21
  throw Error("Invalid input.")
23
22
  }
24
23
  this.federal_congress_id = federal_congress_bill.federal_congress_id
25
- this.bill_id = federal_congress_bill.bill_id
26
24
  this.bill_type_id = federal_congress_bill.bill_type_id
27
- this.number = federal_congress_bill.number
25
+ this.bill_id = federal_congress_bill.bill_id
28
26
  this.title = federal_congress_bill.title
29
27
  this.modify_time = federal_congress_bill.modify_time
30
28
  this.intro_date = federal_congress_bill.intro_date
@@ -36,9 +34,8 @@ export class FederalCongressBill {
36
34
  return (
37
35
  federal_congress_bill !== undefined &&
38
36
  typeof federal_congress_bill.federal_congress_id === "number" &&
39
- typeof federal_congress_bill.bill_id === "string" &&
40
37
  is_federal_congress_bill_type_id(federal_congress_bill.bill_type_id) &&
41
- typeof federal_congress_bill.number === "number" &&
38
+ typeof federal_congress_bill.bill_id === "number" &&
42
39
  typeof federal_congress_bill.title === "string" &&
43
40
  typeof federal_congress_bill.modify_time === "string" &&
44
41
  typeof federal_congress_bill.intro_date === "string" &&
@@ -1,4 +1,4 @@
1
- import { FederalCongressBillTypeID } from "./FederalCongressBill"
1
+ import { FederalCongressBillTypeID, is_federal_congress_bill_type_id } from "./FederalCongressBill"
2
2
 
3
3
  const federal_congress_bill_action_type_ids = [
4
4
  "COMMITTEE",
@@ -21,7 +21,8 @@ export function is_federal_congress_bill_action_type_id(federal_congress_bill_ac
21
21
 
22
22
  export class FederalCongressBillAction {
23
23
  readonly federal_congress_id : number
24
- readonly bill_id : string
24
+ readonly bill_type_id : FederalCongressBillTypeID
25
+ readonly bill_id : number
25
26
  readonly action_id : number
26
27
  readonly bill_action_type_id? : FederalCongressBillActionTypeID
27
28
  readonly date : string
@@ -34,6 +35,7 @@ export class FederalCongressBillAction {
34
35
  throw Error("Invalid input.")
35
36
  }
36
37
  this.federal_congress_id = federal_congress_bill_action.federal_congress_id
38
+ this.bill_type_id = federal_congress_bill_action.bill_type_id
37
39
  this.bill_id = federal_congress_bill_action.bill_id
38
40
  this.action_id = federal_congress_bill_action.action_id
39
41
  this.bill_action_type_id = federal_congress_bill_action.bill_action_type_id
@@ -47,6 +49,7 @@ export class FederalCongressBillAction {
47
49
  return (
48
50
  federal_congress_bill_action !== undefined &&
49
51
  typeof federal_congress_bill_action.federal_congress_id === "number" &&
52
+ is_federal_congress_bill_type_id(federal_congress_bill_action.federal_congress_bill_type_id) &&
50
53
  typeof federal_congress_bill_action.bill_id === "string" &&
51
54
  typeof federal_congress_bill_action.action_id === "number" &&
52
55
  (federal_congress_bill_action.bill_action_type_id === undefined || is_federal_congress_bill_action_type_id(federal_congress_bill_action.bill_action_type_id)) &&
@@ -1,4 +1,4 @@
1
- import { FederalCongressBillTypeID } from "./FederalCongressBill"
1
+ import { FederalCongressBillTypeID, is_federal_congress_bill_type_id } from "./FederalCongressBill"
2
2
 
3
3
  const federal_congress_bill_document_type_ids = [
4
4
  "AS", "ASH", "ATH", "ATS", "CDH", "CDS", "CPH", "CPS", "EAH", "EAS", "EH", "ENR", "ES", "FPH", "FPS", "HDS", "IH", "IPH", "IPS", "IS", "LTH", "LTS", "PAP", "PCS", "PP", "PVTL", "PL", "RCH", "RCS", "RDS", "RFH", "RFS", "RH", "RHUC", "RIH", "RS", "RTH", "RTS", "SC", "STATPVT", "STAT", "STATCONRES"
@@ -12,10 +12,9 @@ export function is_federal_congress_bill_document_type_id(federal_congress_bill_
12
12
 
13
13
  export class FederalCongressBillDocument {
14
14
  readonly federal_congress_id : number
15
- readonly bill_id : string
16
- readonly document_id : string
17
15
  readonly bill_type_id : FederalCongressBillTypeID
18
- readonly number : number
16
+ readonly bill_id : number
17
+ readonly document_id : string
19
18
  readonly bill_document_type_id : FederalCongressBillDocumentTypeID
20
19
  readonly format_id : string
21
20
  readonly publish_time? : string
@@ -27,10 +26,9 @@ export class FederalCongressBillDocument {
27
26
  throw Error("Invalid input.")
28
27
  }
29
28
  this.federal_congress_id = federal_congress_bill_document.federal_congress_id
29
+ this.bill_type_id = federal_congress_bill_document.bill_type_id
30
30
  this.bill_id = federal_congress_bill_document.bill_id
31
31
  this.document_id = federal_congress_bill_document.document_id
32
- this.bill_type_id = federal_congress_bill_document.bill_type_id
33
- this.number = federal_congress_bill_document.number
34
32
  this.bill_document_type_id = federal_congress_bill_document.bill_document_type_id
35
33
  this.format_id = federal_congress_bill_document.format_id
36
34
  this.publish_time = federal_congress_bill_document.publish_time
@@ -42,10 +40,9 @@ export class FederalCongressBillDocument {
42
40
  return (
43
41
  federal_congress_bill_document !== undefined &&
44
42
  typeof federal_congress_bill_document.federal_congress_id === "number" &&
43
+ is_federal_congress_bill_type_id(federal_congress_bill_document.bill_type_id) &&
45
44
  typeof federal_congress_bill_document.bill_id === "string" &&
46
45
  typeof federal_congress_bill_document.document_id === "string" &&
47
- typeof federal_congress_bill_document.bill_type_id === "string" &&
48
- typeof federal_congress_bill_document.number === "number" &&
49
46
  is_federal_congress_bill_document_type_id(federal_congress_bill_document.bill_document_type_id) &&
50
47
  typeof federal_congress_bill_document.format_id === "string" &&
51
48
  (federal_congress_bill_document.publish_time === undefined || typeof federal_congress_bill_document.publish_time === "string") &&
@@ -0,0 +1,29 @@
1
+ import { FederalCongressBillTypeID, is_federal_congress_bill_type_id } from "./FederalCongressBill"
2
+
3
+ export class FederalCongressBillMember {
4
+ readonly federal_congress_id : number
5
+ readonly bill_type_id : FederalCongressBillTypeID
6
+ readonly bill_id : number
7
+ readonly federal_congress_member_id : string
8
+ readonly [x : string] : any
9
+
10
+ constructor(federal_congress_bill : FederalCongressBillMember) {
11
+ if (!FederalCongressBillMember.is(federal_congress_bill)) {
12
+ throw Error("Invalid input.")
13
+ }
14
+ this.federal_congress_id = federal_congress_bill.federal_congress_id
15
+ this.bill_type_id = federal_congress_bill.bill_type_id
16
+ this.bill_id = federal_congress_bill.bill_id
17
+ this.federal_congress_member_id = federal_congress_bill.federal_congress_member_id
18
+ }
19
+
20
+ static is(federal_congress_bill : any) : federal_congress_bill is FederalCongressBillMember {
21
+ return (
22
+ federal_congress_bill !== undefined &&
23
+ typeof federal_congress_bill.federal_congress_id === "number" &&
24
+ is_federal_congress_bill_type_id(federal_congress_bill.bill_type_id) &&
25
+ typeof federal_congress_bill.bill_id === "string" &&
26
+ typeof federal_congress_bill.federal_congress_member_id === "string"
27
+ )
28
+ }
29
+ }
@@ -1,27 +0,0 @@
1
- export class FederalCongressBillTag {
2
- readonly federal_congress_id : number
3
- readonly bill_id : string
4
- readonly tag_type_id : string
5
- readonly tag_id : string
6
- readonly [x : string] : any
7
-
8
- constructor(federal_congress_bill : FederalCongressBillTag) {
9
- if (!FederalCongressBillTag.is(federal_congress_bill)) {
10
- throw Error("Invalid input.")
11
- }
12
- this.federal_congress_id = federal_congress_bill.federal_congress_id
13
- this.bill_id = federal_congress_bill.bill_id
14
- this.tag_type_id = federal_congress_bill.tag_type_id
15
- this.tag_id = federal_congress_bill.tag_id
16
- }
17
-
18
- static is(federal_congress_bill : any) : federal_congress_bill is FederalCongressBillTag {
19
- return (
20
- federal_congress_bill !== undefined &&
21
- typeof federal_congress_bill.federal_congress_id === "number" &&
22
- typeof federal_congress_bill.bill_id === "string" &&
23
- typeof federal_congress_bill.tag_type_id === "string" &&
24
- typeof federal_congress_bill.tag_id === "string"
25
- )
26
- }
27
- }