triangle-types 1.0.147 → 1.0.148
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 +2 -2
- package/dist/src/index.js +2 -2
- package/dist/src/types/user/UserComment.d.ts +8 -0
- package/dist/src/types/user/UserComment.js +23 -0
- package/package.json +1 -1
- package/src/index.ts +3 -3
- package/src/types/user/UserComment.ts +27 -0
- package/src/types/prism/PrismSubPrism.ts +0 -21
package/dist/src/index.d.ts
CHANGED
|
@@ -50,7 +50,6 @@ export * from "./types/legistar/LegistarAgency.js";
|
|
|
50
50
|
export * from "./types/legistar/LegistarDocument.js";
|
|
51
51
|
export * from "./types/prism/Prism.js";
|
|
52
52
|
export * from "./types/prism/PrismFeature.js";
|
|
53
|
-
export * from "./types/prism/PrismSubPrism.js";
|
|
54
53
|
export * from "./types/prism/PrismSegment.js";
|
|
55
54
|
export * from "./types/prism/PrismTarget.js";
|
|
56
55
|
export * from "./types/prism/Target.js";
|
|
@@ -89,6 +88,7 @@ export * from "./types/state_permits/TN/TNStatePermit.js";
|
|
|
89
88
|
export * from "./types/state_permits/TN/TNStatePermitDocument.js";
|
|
90
89
|
export * from "./types/state_permits/WI/WIStatePermit.js";
|
|
91
90
|
export * from "./types/state_permits/WI/WIStatePermitDocument.js";
|
|
92
|
-
export * from "./types/user/User.js";
|
|
93
91
|
export * from "./types/user/Tenant.js";
|
|
94
92
|
export * from "./types/user/TenantProvision.js";
|
|
93
|
+
export * from "./types/user/User.js";
|
|
94
|
+
export * from "./types/user/UserComment.js";
|
package/dist/src/index.js
CHANGED
|
@@ -50,7 +50,6 @@ export * from "./types/legistar/LegistarAgency.js";
|
|
|
50
50
|
export * from "./types/legistar/LegistarDocument.js";
|
|
51
51
|
export * from "./types/prism/Prism.js";
|
|
52
52
|
export * from "./types/prism/PrismFeature.js";
|
|
53
|
-
export * from "./types/prism/PrismSubPrism.js";
|
|
54
53
|
export * from "./types/prism/PrismSegment.js";
|
|
55
54
|
export * from "./types/prism/PrismTarget.js";
|
|
56
55
|
export * from "./types/prism/Target.js";
|
|
@@ -89,6 +88,7 @@ export * from "./types/state_permits/TN/TNStatePermit.js";
|
|
|
89
88
|
export * from "./types/state_permits/TN/TNStatePermitDocument.js";
|
|
90
89
|
export * from "./types/state_permits/WI/WIStatePermit.js";
|
|
91
90
|
export * from "./types/state_permits/WI/WIStatePermitDocument.js";
|
|
92
|
-
export * from "./types/user/User.js";
|
|
93
91
|
export * from "./types/user/Tenant.js";
|
|
94
92
|
export * from "./types/user/TenantProvision.js";
|
|
93
|
+
export * from "./types/user/User.js";
|
|
94
|
+
export * from "./types/user/UserComment.js";
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
export class UserComment {
|
|
2
|
+
user_id;
|
|
3
|
+
comment_id;
|
|
4
|
+
tenant_id;
|
|
5
|
+
voter_id;
|
|
6
|
+
// readonly [x : string] : any
|
|
7
|
+
constructor(user_comment) {
|
|
8
|
+
if (!UserComment.is(user_comment)) {
|
|
9
|
+
throw Error("Invalid Input.");
|
|
10
|
+
}
|
|
11
|
+
this.user_id = user_comment.user_id;
|
|
12
|
+
this.comment_id = user_comment.comment_id;
|
|
13
|
+
this.tenant_id = user_comment.tenant_id;
|
|
14
|
+
this.voter_id = user_comment.voter_id;
|
|
15
|
+
}
|
|
16
|
+
static is(user_comment) {
|
|
17
|
+
return (user_comment !== undefined &&
|
|
18
|
+
typeof user_comment.user_id === "string" &&
|
|
19
|
+
typeof user_comment.comment_id === "string" &&
|
|
20
|
+
typeof user_comment.tenant_id === "string" &&
|
|
21
|
+
(user_comment.voter_id === undefined || typeof user_comment.resource_type_id === "string"));
|
|
22
|
+
}
|
|
23
|
+
}
|
package/package.json
CHANGED
package/src/index.ts
CHANGED
|
@@ -61,7 +61,6 @@ export * from "./types/legistar/LegistarDocument"
|
|
|
61
61
|
|
|
62
62
|
export * from "./types/prism/Prism"
|
|
63
63
|
export * from "./types/prism/PrismFeature"
|
|
64
|
-
export * from "./types/prism/PrismSubPrism"
|
|
65
64
|
export * from "./types/prism/PrismSegment"
|
|
66
65
|
export * from "./types/prism/PrismTarget"
|
|
67
66
|
export * from "./types/prism/Target"
|
|
@@ -110,6 +109,7 @@ export * from "./types/state_permits/TN/TNStatePermitDocument"
|
|
|
110
109
|
export * from "./types/state_permits/WI/WIStatePermit"
|
|
111
110
|
export * from "./types/state_permits/WI/WIStatePermitDocument"
|
|
112
111
|
|
|
113
|
-
export * from "./types/user/User"
|
|
114
112
|
export * from "./types/user/Tenant"
|
|
115
|
-
export * from "./types/user/TenantProvision"
|
|
113
|
+
export * from "./types/user/TenantProvision"
|
|
114
|
+
export * from "./types/user/User"
|
|
115
|
+
export * from "./types/user/UserComment"
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
export class UserComment {
|
|
2
|
+
readonly user_id : string
|
|
3
|
+
readonly comment_id : string
|
|
4
|
+
readonly tenant_id : string
|
|
5
|
+
readonly voter_id? : string
|
|
6
|
+
// readonly [x : string] : any
|
|
7
|
+
|
|
8
|
+
constructor(user_comment : UserComment) {
|
|
9
|
+
if (!UserComment.is(user_comment)) {
|
|
10
|
+
throw Error("Invalid Input.")
|
|
11
|
+
}
|
|
12
|
+
this.user_id = user_comment.user_id
|
|
13
|
+
this.comment_id = user_comment.comment_id
|
|
14
|
+
this.tenant_id = user_comment.tenant_id
|
|
15
|
+
this.voter_id = user_comment.voter_id
|
|
16
|
+
}
|
|
17
|
+
|
|
18
|
+
static is(user_comment : any) : user_comment is UserComment {
|
|
19
|
+
return (
|
|
20
|
+
user_comment !== undefined &&
|
|
21
|
+
typeof user_comment.user_id === "string" &&
|
|
22
|
+
typeof user_comment.comment_id === "string" &&
|
|
23
|
+
typeof user_comment.tenant_id === "string" &&
|
|
24
|
+
(user_comment.voter_id === undefined || typeof user_comment.resource_type_id === "string")
|
|
25
|
+
)
|
|
26
|
+
}
|
|
27
|
+
}
|
|
@@ -1,21 +0,0 @@
|
|
|
1
|
-
export class PrismSubPrism {
|
|
2
|
-
readonly prism_id : string
|
|
3
|
-
readonly sub_prism_id : string
|
|
4
|
-
readonly [x : string] : any
|
|
5
|
-
|
|
6
|
-
constructor(prism_sub_prism : PrismSubPrism) {
|
|
7
|
-
if (!PrismSubPrism.is(prism_sub_prism)) {
|
|
8
|
-
throw Error("Invalid input.")
|
|
9
|
-
}
|
|
10
|
-
this.prism_id = prism_sub_prism.prism_id
|
|
11
|
-
this.sub_prism_id = prism_sub_prism.sub_prism_id
|
|
12
|
-
}
|
|
13
|
-
|
|
14
|
-
static is(prism_sub_prism : any) : prism_sub_prism is PrismSubPrism {
|
|
15
|
-
return (
|
|
16
|
-
prism_sub_prism !== undefined &&
|
|
17
|
-
typeof prism_sub_prism.prism_id === "string" &&
|
|
18
|
-
typeof prism_sub_prism.sub_prism_id === "string"
|
|
19
|
-
)
|
|
20
|
-
}
|
|
21
|
-
}
|