triangle-types 1.0.148 → 1.0.150

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.
@@ -2,7 +2,9 @@ export declare class UserComment {
2
2
  readonly user_id: string;
3
3
  readonly comment_id: string;
4
4
  readonly tenant_id: string;
5
- readonly voter_id?: string;
5
+ readonly resource_type_id: string;
6
+ readonly resource_id: string;
7
+ readonly text: string;
6
8
  constructor(user_comment: UserComment);
7
9
  static is(user_comment: any): user_comment is UserComment;
8
10
  }
@@ -2,7 +2,9 @@ export class UserComment {
2
2
  user_id;
3
3
  comment_id;
4
4
  tenant_id;
5
- voter_id;
5
+ resource_type_id;
6
+ resource_id;
7
+ text;
6
8
  // readonly [x : string] : any
7
9
  constructor(user_comment) {
8
10
  if (!UserComment.is(user_comment)) {
@@ -11,13 +13,17 @@ export class UserComment {
11
13
  this.user_id = user_comment.user_id;
12
14
  this.comment_id = user_comment.comment_id;
13
15
  this.tenant_id = user_comment.tenant_id;
14
- this.voter_id = user_comment.voter_id;
16
+ this.resource_type_id = user_comment.resource_type_id;
17
+ this.resource_id = user_comment.resource_id;
18
+ this.text = user_comment.text;
15
19
  }
16
20
  static is(user_comment) {
17
21
  return (user_comment !== undefined &&
18
22
  typeof user_comment.user_id === "string" &&
19
23
  typeof user_comment.comment_id === "string" &&
20
24
  typeof user_comment.tenant_id === "string" &&
21
- (user_comment.voter_id === undefined || typeof user_comment.resource_type_id === "string"));
25
+ typeof user_comment.resource_type_id === "string" &&
26
+ typeof user_comment.resource_id === "string" &&
27
+ typeof user_comment.text === "string");
22
28
  }
23
29
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "triangle-types",
3
- "version": "1.0.148",
3
+ "version": "1.0.150",
4
4
  "main": "dist/src/index.js",
5
5
  "types": "dist/src/index.d.ts",
6
6
  "scripts": {
@@ -2,7 +2,9 @@ export class UserComment {
2
2
  readonly user_id : string
3
3
  readonly comment_id : string
4
4
  readonly tenant_id : string
5
- readonly voter_id? : string
5
+ readonly resource_type_id : string
6
+ readonly resource_id : string
7
+ readonly text : string
6
8
  // readonly [x : string] : any
7
9
 
8
10
  constructor(user_comment : UserComment) {
@@ -12,7 +14,9 @@ export class UserComment {
12
14
  this.user_id = user_comment.user_id
13
15
  this.comment_id = user_comment.comment_id
14
16
  this.tenant_id = user_comment.tenant_id
15
- this.voter_id = user_comment.voter_id
17
+ this.resource_type_id = user_comment.resource_type_id
18
+ this.resource_id = user_comment.resource_id
19
+ this.text = user_comment.text
16
20
  }
17
21
 
18
22
  static is(user_comment : any) : user_comment is UserComment {
@@ -21,7 +25,9 @@ export class UserComment {
21
25
  typeof user_comment.user_id === "string" &&
22
26
  typeof user_comment.comment_id === "string" &&
23
27
  typeof user_comment.tenant_id === "string" &&
24
- (user_comment.voter_id === undefined || typeof user_comment.resource_type_id === "string")
28
+ typeof user_comment.resource_type_id === "string" &&
29
+ typeof user_comment.resource_id === "string" &&
30
+ typeof user_comment.text === "string"
25
31
  )
26
32
  }
27
33
  }