triangle-types 1.0.149 → 1.0.151

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