triangle-types 1.0.13 → 1.0.14
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 +0 -13
- package/dist/src/types/scout/Scout.js +0 -31
- 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 +0 -43
- 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";
|
|
@@ -11,17 +11,4 @@ export declare class Scout {
|
|
|
11
11
|
constructor(scout: any);
|
|
12
12
|
static is(scout: any): scout is Scout;
|
|
13
13
|
}
|
|
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
14
|
export {};
|
|
@@ -27,34 +27,3 @@ export class Scout {
|
|
|
27
27
|
is_scout_type_id(scout.scout_type_id));
|
|
28
28
|
}
|
|
29
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");
|
|
59
|
-
}
|
|
60
|
-
}
|
|
@@ -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
|
@@ -35,47 +35,4 @@ export class Scout {
|
|
|
35
35
|
is_scout_type_id(scout.scout_type_id)
|
|
36
36
|
)
|
|
37
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"
|
|
79
|
-
)
|
|
80
|
-
}
|
|
81
38
|
}
|
|
@@ -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
|
+
}
|