triangle-types 1.0.13 → 1.0.15
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/index.d.ts +6 -0
- package/dist/src/index.js +6 -0
- package/dist/src/types/scout/Scout.d.ts +2 -16
- package/dist/src/types/scout/Scout.js +7 -41
- package/dist/src/types/scout/ScoutTag.d.ts +7 -0
- package/dist/src/types/scout/ScoutTag.js +16 -0
- package/package.json +1 -1
- package/src/index.ts +7 -0
- package/src/types/scout/Scout.ts +7 -53
- package/src/types/scout/ScoutTag.ts +21 -0
package/dist/src/index.d.ts
CHANGED
|
@@ -39,6 +39,12 @@ export * from "./types/federal_dockets/FederalDocketComment.js";
|
|
|
39
39
|
export * from "./types/federal_dockets/FederalDocketCommentAttachment.js";
|
|
40
40
|
export * from "./types/federal_rules/FederalRuleTitle.js";
|
|
41
41
|
export * from "./types/federal_rules/FederalRuleSection.js";
|
|
42
|
+
export * from "./types/scout/Scout.js";
|
|
43
|
+
export * from "./types/scout/ScoutDocument.js";
|
|
44
|
+
export * from "./types/scout/ScoutTag.js";
|
|
45
|
+
export * from "./types/scout/UserScout.js";
|
|
46
|
+
export * from "./types/scout/UserScoutConversation.js";
|
|
47
|
+
export * from "./types/scout/UserScoutConversationMessage.js";
|
|
42
48
|
export * from "./types/state_permits/StateFacility.js";
|
|
43
49
|
export * from "./types/state_permits/StatePermit.js";
|
|
44
50
|
export * from "./types/state_permits/StatePermitDocument.js";
|
package/dist/src/index.js
CHANGED
|
@@ -39,6 +39,12 @@ export * from "./types/federal_dockets/FederalDocketComment.js";
|
|
|
39
39
|
export * from "./types/federal_dockets/FederalDocketCommentAttachment.js";
|
|
40
40
|
export * from "./types/federal_rules/FederalRuleTitle.js";
|
|
41
41
|
export * from "./types/federal_rules/FederalRuleSection.js";
|
|
42
|
+
export * from "./types/scout/Scout.js";
|
|
43
|
+
export * from "./types/scout/ScoutDocument.js";
|
|
44
|
+
export * from "./types/scout/ScoutTag.js";
|
|
45
|
+
export * from "./types/scout/UserScout.js";
|
|
46
|
+
export * from "./types/scout/UserScoutConversation.js";
|
|
47
|
+
export * from "./types/scout/UserScoutConversationMessage.js";
|
|
42
48
|
export * from "./types/state_permits/StateFacility.js";
|
|
43
49
|
export * from "./types/state_permits/StatePermit.js";
|
|
44
50
|
export * from "./types/state_permits/StatePermitDocument.js";
|
|
@@ -3,25 +3,11 @@ export type ScoutTypeID = typeof scout_type_ids[number];
|
|
|
3
3
|
export declare function is_scout_type_id(scout_type_id: any): scout_type_id is ScoutTypeID;
|
|
4
4
|
export declare class Scout {
|
|
5
5
|
readonly scout_id: string;
|
|
6
|
-
readonly office_id: string;
|
|
7
|
-
readonly number: string;
|
|
8
|
-
readonly name: string;
|
|
9
6
|
readonly scout_type_id: ScoutTypeID;
|
|
7
|
+
readonly scout_num: number;
|
|
8
|
+
readonly name: string;
|
|
10
9
|
readonly [x: string]: any;
|
|
11
10
|
constructor(scout: any);
|
|
12
11
|
static is(scout: any): scout is Scout;
|
|
13
12
|
}
|
|
14
|
-
export declare class IndividualScout extends Scout {
|
|
15
|
-
readonly scout_type_id: "I";
|
|
16
|
-
readonly federal_congress_member_id?: string;
|
|
17
|
-
readonly [x: string]: any;
|
|
18
|
-
constructor(scout: any);
|
|
19
|
-
static is(scout: any): scout is IndividualScout;
|
|
20
|
-
}
|
|
21
|
-
export declare class OrganizationScout extends Scout {
|
|
22
|
-
readonly scout_type_id: "O";
|
|
23
|
-
readonly [x: string]: any;
|
|
24
|
-
constructor(scout: any);
|
|
25
|
-
static is(scout: any): scout is OrganizationScout;
|
|
26
|
-
}
|
|
27
13
|
export {};
|
|
@@ -4,57 +4,23 @@ export function is_scout_type_id(scout_type_id) {
|
|
|
4
4
|
}
|
|
5
5
|
export class Scout {
|
|
6
6
|
scout_id;
|
|
7
|
-
office_id;
|
|
8
|
-
number;
|
|
9
|
-
name;
|
|
10
7
|
scout_type_id;
|
|
8
|
+
scout_num;
|
|
9
|
+
name;
|
|
11
10
|
constructor(scout) {
|
|
12
11
|
if (!Scout.is(scout)) {
|
|
13
12
|
throw Error("Invalid input.");
|
|
14
13
|
}
|
|
15
|
-
this.office_id = scout.office_id;
|
|
16
|
-
this.number = scout.number;
|
|
17
14
|
this.scout_id = scout.scout_id;
|
|
18
|
-
this.name = scout.name;
|
|
19
15
|
this.scout_type_id = scout.scout_type_id;
|
|
16
|
+
this.scout_num = scout.scout_num;
|
|
17
|
+
this.name = scout.name;
|
|
20
18
|
}
|
|
21
19
|
static is(scout) {
|
|
22
20
|
return (scout !== undefined &&
|
|
23
|
-
typeof scout.office_id === "string" &&
|
|
24
|
-
typeof scout.number === "string" &&
|
|
25
21
|
typeof scout.scout_id === "string" &&
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
}
|
|
30
|
-
export class IndividualScout extends Scout {
|
|
31
|
-
scout_type_id;
|
|
32
|
-
federal_congress_member_id;
|
|
33
|
-
constructor(scout) {
|
|
34
|
-
if (!IndividualScout.is(scout)) {
|
|
35
|
-
throw Error("Invalid input.");
|
|
36
|
-
}
|
|
37
|
-
super(scout);
|
|
38
|
-
this.scout_type_id = scout.scout_type_id;
|
|
39
|
-
this.federal_congress_member_id = scout.federal_congress_member_id;
|
|
40
|
-
}
|
|
41
|
-
static is(scout) {
|
|
42
|
-
return (Scout.is(scout) &&
|
|
43
|
-
scout.scout_type_id === "I" &&
|
|
44
|
-
(scout.federal_congress_member_id === undefined || typeof scout.federal_congress_member_id === "string"));
|
|
45
|
-
}
|
|
46
|
-
}
|
|
47
|
-
export class OrganizationScout extends Scout {
|
|
48
|
-
scout_type_id;
|
|
49
|
-
constructor(scout) {
|
|
50
|
-
if (!OrganizationScout.is(scout)) {
|
|
51
|
-
throw Error("Invalid input.");
|
|
52
|
-
}
|
|
53
|
-
super(scout);
|
|
54
|
-
this.scout_type_id = scout.scout_type_id;
|
|
55
|
-
}
|
|
56
|
-
static is(scout) {
|
|
57
|
-
return (Scout.is(scout) &&
|
|
58
|
-
scout.scout_type_id === "O");
|
|
22
|
+
is_scout_type_id(scout.scout_type_id) &&
|
|
23
|
+
typeof scout.scout_num === "number" &&
|
|
24
|
+
typeof scout.name === "string");
|
|
59
25
|
}
|
|
60
26
|
}
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
export class ScoutTag {
|
|
2
|
+
scout_id;
|
|
3
|
+
tag_id;
|
|
4
|
+
constructor(scout_tag) {
|
|
5
|
+
if (!ScoutTag.is(scout_tag)) {
|
|
6
|
+
throw Error("Invalid input.");
|
|
7
|
+
}
|
|
8
|
+
this.scout_id = scout_tag.scout_id;
|
|
9
|
+
this.tag_id = scout_tag.tag_id;
|
|
10
|
+
}
|
|
11
|
+
static is(scout_tag) {
|
|
12
|
+
return (scout_tag !== undefined &&
|
|
13
|
+
typeof scout_tag.scout_id === "string" &&
|
|
14
|
+
typeof scout_tag.tag_id === "string");
|
|
15
|
+
}
|
|
16
|
+
}
|
package/package.json
CHANGED
package/src/index.ts
CHANGED
|
@@ -47,6 +47,13 @@ export * from "./types/federal_dockets/FederalDocketCommentAttachment"
|
|
|
47
47
|
export * from "./types/federal_rules/FederalRuleTitle"
|
|
48
48
|
export * from "./types/federal_rules/FederalRuleSection"
|
|
49
49
|
|
|
50
|
+
export * from "./types/scout/Scout"
|
|
51
|
+
export * from "./types/scout/ScoutDocument"
|
|
52
|
+
export * from "./types/scout/ScoutTag"
|
|
53
|
+
export * from "./types/scout/UserScout"
|
|
54
|
+
export * from "./types/scout/UserScoutConversation"
|
|
55
|
+
export * from "./types/scout/UserScoutConversationMessage"
|
|
56
|
+
|
|
50
57
|
export * from "./types/state_permits/StateFacility"
|
|
51
58
|
export * from "./types/state_permits/StatePermit"
|
|
52
59
|
export * from "./types/state_permits/StatePermitDocument"
|
package/src/types/scout/Scout.ts
CHANGED
|
@@ -8,74 +8,28 @@ export function is_scout_type_id(scout_type_id : any) : scout_type_id is ScoutTy
|
|
|
8
8
|
|
|
9
9
|
export class Scout {
|
|
10
10
|
readonly scout_id : string
|
|
11
|
-
readonly office_id : string
|
|
12
|
-
readonly number : string
|
|
13
|
-
readonly name : string
|
|
14
11
|
readonly scout_type_id : ScoutTypeID
|
|
12
|
+
readonly scout_num : number
|
|
13
|
+
readonly name : string
|
|
15
14
|
readonly [x : string] : any
|
|
16
15
|
|
|
17
16
|
constructor(scout : any) {
|
|
18
17
|
if (!Scout.is(scout)) {
|
|
19
18
|
throw Error("Invalid input.")
|
|
20
19
|
}
|
|
21
|
-
this.office_id = scout.office_id
|
|
22
|
-
this.number = scout.number
|
|
23
20
|
this.scout_id = scout.scout_id
|
|
24
|
-
this.name = scout.name
|
|
25
21
|
this.scout_type_id = scout.scout_type_id
|
|
22
|
+
this.scout_num = scout.scout_num
|
|
23
|
+
this.name = scout.name
|
|
26
24
|
}
|
|
27
25
|
|
|
28
26
|
static is(scout : any) : scout is Scout {
|
|
29
27
|
return (
|
|
30
28
|
scout !== undefined &&
|
|
31
|
-
typeof scout.office_id === "string" &&
|
|
32
|
-
typeof scout.number === "string" &&
|
|
33
29
|
typeof scout.scout_id === "string" &&
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
}
|
|
38
|
-
}
|
|
39
|
-
|
|
40
|
-
export class IndividualScout extends Scout {
|
|
41
|
-
readonly scout_type_id : "I"
|
|
42
|
-
readonly federal_congress_member_id? : string
|
|
43
|
-
readonly [x : string] : any
|
|
44
|
-
|
|
45
|
-
constructor(scout : any) {
|
|
46
|
-
if (!IndividualScout.is(scout)) {
|
|
47
|
-
throw Error("Invalid input.")
|
|
48
|
-
}
|
|
49
|
-
super(scout)
|
|
50
|
-
this.scout_type_id = scout.scout_type_id
|
|
51
|
-
this.federal_congress_member_id = scout.federal_congress_member_id
|
|
52
|
-
}
|
|
53
|
-
|
|
54
|
-
static is(scout : any) : scout is IndividualScout {
|
|
55
|
-
return (
|
|
56
|
-
Scout.is(scout) &&
|
|
57
|
-
scout.scout_type_id === "I" &&
|
|
58
|
-
(scout.federal_congress_member_id === undefined || typeof scout.federal_congress_member_id === "string")
|
|
59
|
-
)
|
|
60
|
-
}
|
|
61
|
-
}
|
|
62
|
-
|
|
63
|
-
export class OrganizationScout extends Scout {
|
|
64
|
-
readonly scout_type_id : "O"
|
|
65
|
-
readonly [x : string] : any
|
|
66
|
-
|
|
67
|
-
constructor(scout : any) {
|
|
68
|
-
if (!OrganizationScout.is(scout)) {
|
|
69
|
-
throw Error("Invalid input.")
|
|
70
|
-
}
|
|
71
|
-
super(scout)
|
|
72
|
-
this.scout_type_id = scout.scout_type_id
|
|
73
|
-
}
|
|
74
|
-
|
|
75
|
-
static is(scout : any) : scout is OrganizationScout {
|
|
76
|
-
return (
|
|
77
|
-
Scout.is(scout) &&
|
|
78
|
-
scout.scout_type_id === "O"
|
|
30
|
+
is_scout_type_id(scout.scout_type_id) &&
|
|
31
|
+
typeof scout.scout_num === "number" &&
|
|
32
|
+
typeof scout.name === "string"
|
|
79
33
|
)
|
|
80
34
|
}
|
|
81
35
|
}
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
export class ScoutTag {
|
|
2
|
+
readonly scout_id : string
|
|
3
|
+
readonly tag_id : string
|
|
4
|
+
readonly [x : string] : any
|
|
5
|
+
|
|
6
|
+
constructor(scout_tag : ScoutTag) {
|
|
7
|
+
if (!ScoutTag.is(scout_tag)) {
|
|
8
|
+
throw Error("Invalid input.")
|
|
9
|
+
}
|
|
10
|
+
this.scout_id = scout_tag.scout_id
|
|
11
|
+
this.tag_id = scout_tag.tag_id
|
|
12
|
+
}
|
|
13
|
+
|
|
14
|
+
static is(scout_tag : any) : scout_tag is ScoutTag {
|
|
15
|
+
return (
|
|
16
|
+
scout_tag !== undefined &&
|
|
17
|
+
typeof scout_tag.scout_id === "string" &&
|
|
18
|
+
typeof scout_tag.tag_id === "string"
|
|
19
|
+
)
|
|
20
|
+
}
|
|
21
|
+
}
|