triangle-types 1.0.336 → 1.0.338

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.
@@ -71,7 +71,7 @@ export * from "./types/label/Label.js";
71
71
  export * from "./types/lal/LALFile.js";
72
72
  export * from "./types/lal/LALFileVoter.js";
73
73
  export * from "./types/legistar/LegistarAgency.js";
74
- export * from "./types/legistar/LegistarDocument.js";
74
+ export * from "./types/legistar/LegistarAgencyDocument.js";
75
75
  export * from "./types/prism/Prism.js";
76
76
  export * from "./types/prism/PrismFeature.js";
77
77
  export * from "./types/prism/PrismSegment.js";
package/dist/src/index.js CHANGED
@@ -71,7 +71,7 @@ export * from "./types/label/Label.js";
71
71
  export * from "./types/lal/LALFile.js";
72
72
  export * from "./types/lal/LALFileVoter.js";
73
73
  export * from "./types/legistar/LegistarAgency.js";
74
- export * from "./types/legistar/LegistarDocument.js";
74
+ export * from "./types/legistar/LegistarAgencyDocument.js";
75
75
  export * from "./types/prism/Prism.js";
76
76
  export * from "./types/prism/PrismFeature.js";
77
77
  export * from "./types/prism/PrismSegment.js";
@@ -0,0 +1,14 @@
1
+ export declare class LegistarAgencyDocument {
2
+ readonly legistar_id: string;
3
+ readonly agency_id: number;
4
+ readonly document_id: number;
5
+ readonly location?: string;
6
+ readonly date: string;
7
+ readonly url?: string;
8
+ readonly url_video?: string;
9
+ readonly url_agenda?: string;
10
+ readonly url_minutes?: String;
11
+ readonly s3_id_txt?: string;
12
+ constructor(legistar_agency_document: any);
13
+ static is(legistar_agency_document: any): legistar_agency_document is LegistarAgencyDocument;
14
+ }
@@ -0,0 +1,40 @@
1
+ export class LegistarAgencyDocument {
2
+ legistar_id;
3
+ agency_id;
4
+ document_id;
5
+ location;
6
+ date;
7
+ url;
8
+ url_video;
9
+ url_agenda;
10
+ url_minutes;
11
+ s3_id_txt;
12
+ constructor(legistar_agency_document) {
13
+ if (!LegistarAgencyDocument.is(legistar_agency_document)) {
14
+ throw Error("Invalid input.");
15
+ }
16
+ this.legistar_id = legistar_agency_document.legistar_id;
17
+ this.agency_id = legistar_agency_document.agency_id;
18
+ this.document_id = legistar_agency_document.document_id;
19
+ this.location = legistar_agency_document.location;
20
+ this.date = legistar_agency_document.date;
21
+ this.url = legistar_agency_document.url;
22
+ this.url_video = legistar_agency_document.url_video;
23
+ this.url_agenda = legistar_agency_document.url_agenda;
24
+ this.url_minutes = legistar_agency_document.url_minutes;
25
+ this.s3_id_txt = legistar_agency_document.s3_id_txt;
26
+ }
27
+ static is(legistar_agency_document) {
28
+ return (legistar_agency_document !== undefined &&
29
+ typeof legistar_agency_document.legistar_id === "string" &&
30
+ typeof legistar_agency_document.agency_id === "number" &&
31
+ typeof legistar_agency_document.document_id === "number" &&
32
+ (legistar_agency_document.location === undefined || typeof legistar_agency_document.location === "string") &&
33
+ typeof legistar_agency_document.date === "string" &&
34
+ (legistar_agency_document.url === undefined || typeof legistar_agency_document.url === "string") &&
35
+ (legistar_agency_document.url_video === undefined || typeof legistar_agency_document.url_video === "string") &&
36
+ (legistar_agency_document.url_agenda === undefined || typeof legistar_agency_document.url_agenda === "string") &&
37
+ (legistar_agency_document.url_minutes === undefined || typeof legistar_agency_document.url_minutes === "string") &&
38
+ (legistar_agency_document.s3_id_txt === undefined || typeof legistar_agency_document.s3_id_txt === "string"));
39
+ }
40
+ }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "triangle-types",
3
- "version": "1.0.336",
3
+ "version": "1.0.338",
4
4
  "main": "dist/src/index.js",
5
5
  "types": "dist/src/index.d.ts",
6
6
  "scripts": {
package/src/index.ts CHANGED
@@ -86,7 +86,7 @@ export * from "./types/lal/LALFile"
86
86
  export * from "./types/lal/LALFileVoter"
87
87
 
88
88
  export * from "./types/legistar/LegistarAgency"
89
- export * from "./types/legistar/LegistarDocument"
89
+ export * from "./types/legistar/LegistarAgencyDocument"
90
90
 
91
91
  export * from "./types/prism/Prism"
92
92
  export * from "./types/prism/PrismFeature"
@@ -0,0 +1,44 @@
1
+ export class LegistarAgencyDocument {
2
+ readonly legistar_id : string
3
+ readonly agency_id : number
4
+ readonly document_id : number
5
+ readonly location? : string
6
+ readonly date : string
7
+ readonly url? : string
8
+ readonly url_video? : string
9
+ readonly url_agenda? : string
10
+ readonly url_minutes? : String
11
+ readonly s3_id_txt? : string
12
+
13
+ constructor(legistar_agency_document : any) {
14
+ if (!LegistarAgencyDocument.is(legistar_agency_document)) {
15
+ throw Error("Invalid input.")
16
+ }
17
+ this.legistar_id = legistar_agency_document.legistar_id
18
+ this.agency_id = legistar_agency_document.agency_id
19
+ this.document_id = legistar_agency_document.document_id
20
+ this.location = legistar_agency_document.location
21
+ this.date = legistar_agency_document.date
22
+ this.url = legistar_agency_document.url
23
+ this.url_video = legistar_agency_document.url_video
24
+ this.url_agenda = legistar_agency_document.url_agenda
25
+ this.url_minutes = legistar_agency_document.url_minutes
26
+ this.s3_id_txt = legistar_agency_document.s3_id_txt
27
+ }
28
+
29
+ static is(legistar_agency_document : any) : legistar_agency_document is LegistarAgencyDocument {
30
+ return (
31
+ legistar_agency_document !== undefined &&
32
+ typeof legistar_agency_document.legistar_id === "string" &&
33
+ typeof legistar_agency_document.agency_id === "number" &&
34
+ typeof legistar_agency_document.document_id === "number" &&
35
+ (legistar_agency_document.location === undefined || typeof legistar_agency_document.location === "string") &&
36
+ typeof legistar_agency_document.date === "string" &&
37
+ (legistar_agency_document.url === undefined || typeof legistar_agency_document.url === "string") &&
38
+ (legistar_agency_document.url_video === undefined || typeof legistar_agency_document.url_video === "string") &&
39
+ (legistar_agency_document.url_agenda === undefined || typeof legistar_agency_document.url_agenda === "string") &&
40
+ (legistar_agency_document.url_minutes === undefined || typeof legistar_agency_document.url_minutes === "string") &&
41
+ (legistar_agency_document.s3_id_txt === undefined || typeof legistar_agency_document.s3_id_txt === "string")
42
+ )
43
+ }
44
+ }
@@ -1,44 +0,0 @@
1
- export class LegistarDocument {
2
- readonly legistar_id : string
3
- readonly agency_id : number
4
- readonly document_id : number
5
- readonly location? : string
6
- readonly date : string
7
- readonly url? : string
8
- readonly url_video? : string
9
- readonly url_agenda? : string
10
- readonly url_minutes? : String
11
- readonly s3_id_txt? : string
12
-
13
- constructor(legistar_document : any) {
14
- if (!LegistarDocument.is(legistar_document)) {
15
- throw Error("Invalid input.")
16
- }
17
- this.legistar_id = legistar_document.legistar_id
18
- this.agency_id = legistar_document.agency_id
19
- this.document_id = legistar_document.document_id
20
- this.location = legistar_document.location
21
- this.date = legistar_document.date
22
- this.url = legistar_document.url
23
- this.url_video = legistar_document.url_video
24
- this.url_agenda = legistar_document.url_agenda
25
- this.url_minutes = legistar_document.url_minutes
26
- this.s3_id_txt = legistar_document.s3_id_txt
27
- }
28
-
29
- static is(legistar_document : any) : legistar_document is LegistarDocument {
30
- return (
31
- legistar_document !== undefined &&
32
- typeof legistar_document.legistar_id === "string" &&
33
- typeof legistar_document.agency_id === "number" &&
34
- typeof legistar_document.document_id === "number" &&
35
- (legistar_document.location === undefined || typeof legistar_document.location === "string") &&
36
- typeof legistar_document.date === "string" &&
37
- (legistar_document.url === undefined || typeof legistar_document.url === "string") &&
38
- (legistar_document.url_video === undefined || typeof legistar_document.url_video === "string") &&
39
- (legistar_document.url_agenda === undefined || typeof legistar_document.url_agenda === "string") &&
40
- (legistar_document.url_minutes === undefined || typeof legistar_document.url_minutes === "string") &&
41
- (legistar_document.s3_id_txt === undefined || typeof legistar_document.s3_id_txt === "string")
42
- )
43
- }
44
- }