triangle-types 1.0.335 → 1.0.336

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.
@@ -1,6 +1,5 @@
1
1
  export declare class LegistarAgency {
2
- readonly legistar_agency_id: string;
3
- readonly legistar_client_id: string;
2
+ readonly legistar_id: string;
4
3
  readonly agency_id: number;
5
4
  readonly name: string;
6
5
  constructor(legistar_agency: any);
@@ -1,21 +1,18 @@
1
1
  export class LegistarAgency {
2
- legistar_agency_id;
3
- legistar_client_id;
2
+ legistar_id;
4
3
  agency_id;
5
4
  name;
6
5
  constructor(legistar_agency) {
7
6
  if (!LegistarAgency.is(legistar_agency)) {
8
7
  throw Error("Invalid input.");
9
8
  }
10
- this.legistar_agency_id = legistar_agency.legistar_agency_id;
11
- this.legistar_client_id = legistar_agency.legistar_client_id;
9
+ this.legistar_id = legistar_agency.legistar_id;
12
10
  this.agency_id = legistar_agency.agency_id;
13
11
  this.name = legistar_agency.name;
14
12
  }
15
13
  static is(legistar_agency) {
16
14
  return (legistar_agency !== undefined &&
17
- typeof legistar_agency.legistar_agency_id === "string" &&
18
- typeof legistar_agency.legistar_client_id === "string" &&
15
+ typeof legistar_agency.legistar_id === "string" &&
19
16
  typeof legistar_agency.agency_id === "number" &&
20
17
  typeof legistar_agency.name === "string");
21
18
  }
@@ -1,9 +1,7 @@
1
1
  export declare class LegistarDocument {
2
- readonly legistar_document_id: string;
3
- readonly legistar_client_id: string;
2
+ readonly legistar_id: string;
4
3
  readonly agency_id: number;
5
4
  readonly document_id: number;
6
- readonly legistar_agency_id: string;
7
5
  readonly location?: string;
8
6
  readonly date: string;
9
7
  readonly url?: string;
@@ -1,9 +1,7 @@
1
1
  export class LegistarDocument {
2
- legistar_document_id;
3
- legistar_client_id;
2
+ legistar_id;
4
3
  agency_id;
5
4
  document_id;
6
- legistar_agency_id;
7
5
  location;
8
6
  date;
9
7
  url;
@@ -15,11 +13,9 @@ export class LegistarDocument {
15
13
  if (!LegistarDocument.is(legistar_document)) {
16
14
  throw Error("Invalid input.");
17
15
  }
18
- this.legistar_document_id = legistar_document.legistar_document_id;
19
- this.legistar_client_id = legistar_document.legistar_client_id;
16
+ this.legistar_id = legistar_document.legistar_id;
20
17
  this.agency_id = legistar_document.agency_id;
21
18
  this.document_id = legistar_document.document_id;
22
- this.legistar_agency_id = legistar_document.legistar_agency_id;
23
19
  this.location = legistar_document.location;
24
20
  this.date = legistar_document.date;
25
21
  this.url = legistar_document.url;
@@ -30,11 +26,9 @@ export class LegistarDocument {
30
26
  }
31
27
  static is(legistar_document) {
32
28
  return (legistar_document !== undefined &&
33
- typeof legistar_document.legistar_document_id === "string" &&
34
- typeof legistar_document.legistar_client_id === "string" &&
29
+ typeof legistar_document.legistar_id === "string" &&
35
30
  typeof legistar_document.agency_id === "number" &&
36
31
  typeof legistar_document.document_id === "number" &&
37
- typeof legistar_document.legistar_agency_id === "string" &&
38
32
  (legistar_document.location === undefined || typeof legistar_document.location === "string") &&
39
33
  typeof legistar_document.date === "string" &&
40
34
  (legistar_document.url === undefined || typeof legistar_document.url === "string") &&
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "triangle-types",
3
- "version": "1.0.335",
3
+ "version": "1.0.336",
4
4
  "main": "dist/src/index.js",
5
5
  "types": "dist/src/index.d.ts",
6
6
  "scripts": {
@@ -1,6 +1,5 @@
1
1
  export class LegistarAgency {
2
- readonly legistar_agency_id : string
3
- readonly legistar_client_id : string
2
+ readonly legistar_id : string
4
3
  readonly agency_id : number
5
4
  readonly name : string
6
5
 
@@ -8,8 +7,7 @@ export class LegistarAgency {
8
7
  if (!LegistarAgency.is(legistar_agency)) {
9
8
  throw Error("Invalid input.")
10
9
  }
11
- this.legistar_agency_id = legistar_agency.legistar_agency_id
12
- this.legistar_client_id = legistar_agency.legistar_client_id
10
+ this.legistar_id = legistar_agency.legistar_id
13
11
  this.agency_id = legistar_agency.agency_id
14
12
  this.name = legistar_agency.name
15
13
  }
@@ -17,8 +15,7 @@ export class LegistarAgency {
17
15
  static is(legistar_agency : any) : legistar_agency is LegistarAgency {
18
16
  return (
19
17
  legistar_agency !== undefined &&
20
- typeof legistar_agency.legistar_agency_id === "string" &&
21
- typeof legistar_agency.legistar_client_id === "string" &&
18
+ typeof legistar_agency.legistar_id === "string" &&
22
19
  typeof legistar_agency.agency_id === "number" &&
23
20
  typeof legistar_agency.name === "string"
24
21
  )
@@ -1,9 +1,7 @@
1
1
  export class LegistarDocument {
2
- readonly legistar_document_id : string
3
- readonly legistar_client_id : string
2
+ readonly legistar_id : string
4
3
  readonly agency_id : number
5
4
  readonly document_id : number
6
- readonly legistar_agency_id : string
7
5
  readonly location? : string
8
6
  readonly date : string
9
7
  readonly url? : string
@@ -16,11 +14,9 @@ export class LegistarDocument {
16
14
  if (!LegistarDocument.is(legistar_document)) {
17
15
  throw Error("Invalid input.")
18
16
  }
19
- this.legistar_document_id = legistar_document.legistar_document_id
20
- this.legistar_client_id = legistar_document.legistar_client_id
17
+ this.legistar_id = legistar_document.legistar_id
21
18
  this.agency_id = legistar_document.agency_id
22
19
  this.document_id = legistar_document.document_id
23
- this.legistar_agency_id = legistar_document.legistar_agency_id
24
20
  this.location = legistar_document.location
25
21
  this.date = legistar_document.date
26
22
  this.url = legistar_document.url
@@ -33,11 +29,9 @@ export class LegistarDocument {
33
29
  static is(legistar_document : any) : legistar_document is LegistarDocument {
34
30
  return (
35
31
  legistar_document !== undefined &&
36
- typeof legistar_document.legistar_document_id === "string" &&
37
- typeof legistar_document.legistar_client_id === "string" &&
32
+ typeof legistar_document.legistar_id === "string" &&
38
33
  typeof legistar_document.agency_id === "number" &&
39
34
  typeof legistar_document.document_id === "number" &&
40
- typeof legistar_document.legistar_agency_id === "string" &&
41
35
  (legistar_document.location === undefined || typeof legistar_document.location === "string") &&
42
36
  typeof legistar_document.date === "string" &&
43
37
  (legistar_document.url === undefined || typeof legistar_document.url === "string") &&