triangle-types 1.0.268 → 1.0.270
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/types/regions/SchoolDistrict.d.ts +1 -2
- package/dist/src/types/regions/SchoolDistrict.js +4 -7
- package/dist/src/types/user/TenantProvision.d.ts +1 -1
- package/dist/src/types/user/TenantProvision.js +1 -1
- package/dist/src/types/user/UserComment.d.ts +2 -1
- package/package.json +1 -1
- package/src/types/regions/SchoolDistrict.ts +4 -7
- package/src/types/user/TenantProvision.ts +1 -1
- package/src/types/user/UserComment.ts +3 -1
|
@@ -2,9 +2,8 @@ import { StateID } from "./State.js";
|
|
|
2
2
|
export declare class SchoolDistrict {
|
|
3
3
|
readonly school_district_id: string;
|
|
4
4
|
readonly state_id: StateID;
|
|
5
|
-
readonly county_id: string;
|
|
6
|
-
readonly state_school_district_id: string;
|
|
7
5
|
readonly name: string;
|
|
6
|
+
readonly federal_census_school_district_id: string;
|
|
8
7
|
constructor(school_district: any);
|
|
9
8
|
static is(school_district: any): school_district is SchoolDistrict;
|
|
10
9
|
}
|
|
@@ -2,25 +2,22 @@ import { is_state_id } from "./State.js";
|
|
|
2
2
|
export class SchoolDistrict {
|
|
3
3
|
school_district_id;
|
|
4
4
|
state_id;
|
|
5
|
-
county_id;
|
|
6
|
-
state_school_district_id;
|
|
7
5
|
name;
|
|
6
|
+
federal_census_school_district_id;
|
|
8
7
|
constructor(school_district) {
|
|
9
8
|
if (!SchoolDistrict.is(school_district)) {
|
|
10
9
|
throw Error("Invalid input.");
|
|
11
10
|
}
|
|
12
11
|
this.school_district_id = school_district.school_district_id;
|
|
13
12
|
this.state_id = school_district.state_id;
|
|
14
|
-
this.county_id = school_district.county_id;
|
|
15
|
-
this.state_school_district_id = school_district.state_school_district_id;
|
|
16
13
|
this.name = school_district.name;
|
|
14
|
+
this.federal_census_school_district_id = school_district.federal_census_school_district_id;
|
|
17
15
|
}
|
|
18
16
|
static is(school_district) {
|
|
19
17
|
return (school_district !== undefined &&
|
|
20
18
|
typeof school_district.school_district_id === "string" &&
|
|
21
19
|
is_state_id(school_district.state_id) &&
|
|
22
|
-
typeof school_district.
|
|
23
|
-
typeof school_district.
|
|
24
|
-
typeof school_district.name === "string");
|
|
20
|
+
typeof school_district.name === "string" &&
|
|
21
|
+
typeof school_district.federal_census_school_district_id === "string");
|
|
25
22
|
}
|
|
26
23
|
}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
declare const resource_type_ids: readonly ["web_document", "twitter_tweet", "youtube_video", "document", "scout", "prism", "label", "target", "role", "user", "fragment_type", "palette"];
|
|
1
|
+
declare const resource_type_ids: readonly ["web_document", "twitter_tweet", "youtube_video", "document", "scout", "prism", "state-voter", "label", "target", "role", "user", "fragment_type", "palette"];
|
|
2
2
|
export type ResourceTypeID = typeof resource_type_ids[number];
|
|
3
3
|
export declare function is_resource_type_id(resource_type_id: any): resource_type_id is ResourceTypeID;
|
|
4
4
|
export declare class TenantProvision {
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
const resource_type_ids = ["web_document", "twitter_tweet", "youtube_video", "document", "scout", "prism", "label", "target", "role", "user", "fragment_type", "palette"];
|
|
1
|
+
const resource_type_ids = ["web_document", "twitter_tweet", "youtube_video", "document", "scout", "prism", "state-voter", "label", "target", "role", "user", "fragment_type", "palette"];
|
|
2
2
|
export function is_resource_type_id(resource_type_id) {
|
|
3
3
|
return resource_type_ids.includes(resource_type_id);
|
|
4
4
|
}
|
|
@@ -1,8 +1,9 @@
|
|
|
1
|
+
import { ResourceTypeID } from "./TenantProvision.js";
|
|
1
2
|
export declare class UserComment {
|
|
2
3
|
readonly user_id: string;
|
|
3
4
|
readonly comment_id: string;
|
|
4
5
|
readonly tenant_id: string;
|
|
5
|
-
readonly resource_type_id:
|
|
6
|
+
readonly resource_type_id: ResourceTypeID;
|
|
6
7
|
readonly resource_id: string;
|
|
7
8
|
readonly text: string;
|
|
8
9
|
readonly is_active: boolean;
|
package/package.json
CHANGED
|
@@ -3,9 +3,8 @@ import { is_state_id, StateID } from "./State"
|
|
|
3
3
|
export class SchoolDistrict {
|
|
4
4
|
readonly school_district_id : string
|
|
5
5
|
readonly state_id : StateID
|
|
6
|
-
readonly county_id : string
|
|
7
|
-
readonly state_school_district_id : string
|
|
8
6
|
readonly name : string
|
|
7
|
+
readonly federal_census_school_district_id : string
|
|
9
8
|
|
|
10
9
|
constructor(school_district : any) {
|
|
11
10
|
if (!SchoolDistrict.is(school_district)) {
|
|
@@ -13,9 +12,8 @@ export class SchoolDistrict {
|
|
|
13
12
|
}
|
|
14
13
|
this.school_district_id = school_district.school_district_id
|
|
15
14
|
this.state_id = school_district.state_id
|
|
16
|
-
this.county_id = school_district.county_id
|
|
17
|
-
this.state_school_district_id = school_district.state_school_district_id
|
|
18
15
|
this.name = school_district.name
|
|
16
|
+
this.federal_census_school_district_id = school_district.federal_census_school_district_id
|
|
19
17
|
}
|
|
20
18
|
|
|
21
19
|
static is(school_district : any) : school_district is SchoolDistrict {
|
|
@@ -23,9 +21,8 @@ export class SchoolDistrict {
|
|
|
23
21
|
school_district !== undefined &&
|
|
24
22
|
typeof school_district.school_district_id === "string" &&
|
|
25
23
|
is_state_id(school_district.state_id) &&
|
|
26
|
-
typeof school_district.
|
|
27
|
-
typeof school_district.
|
|
28
|
-
typeof school_district.name === "string"
|
|
24
|
+
typeof school_district.name === "string" &&
|
|
25
|
+
typeof school_district.federal_census_school_district_id === "string"
|
|
29
26
|
)
|
|
30
27
|
}
|
|
31
28
|
}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
const resource_type_ids = ["web_document", "twitter_tweet", "youtube_video", "document", "scout", "prism", "label", "target", "role", "user", "fragment_type", "palette"] as const
|
|
1
|
+
const resource_type_ids = ["web_document", "twitter_tweet", "youtube_video", "document", "scout", "prism", "state-voter", "label", "target", "role", "user", "fragment_type", "palette"] as const
|
|
2
2
|
|
|
3
3
|
export type ResourceTypeID = typeof resource_type_ids[number]
|
|
4
4
|
|
|
@@ -1,8 +1,10 @@
|
|
|
1
|
+
import { ResourceTypeID } from "./TenantProvision"
|
|
2
|
+
|
|
1
3
|
export class UserComment {
|
|
2
4
|
readonly user_id : string
|
|
3
5
|
readonly comment_id : string
|
|
4
6
|
readonly tenant_id : string
|
|
5
|
-
readonly resource_type_id :
|
|
7
|
+
readonly resource_type_id : ResourceTypeID
|
|
6
8
|
readonly resource_id : string
|
|
7
9
|
readonly text : string
|
|
8
10
|
readonly is_active : boolean
|