doers-comms-types 1.0.11 → 1.0.12

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.
@@ -11,6 +11,7 @@ export declare class Conversation {
11
11
  }
12
12
  export declare class ConversationAux extends Conversation {
13
13
  readonly messages: Message[];
14
+ readonly max_action_time: string;
14
15
  constructor(conversation: any);
15
16
  static is(conversation: any): conversation is ConversationAux;
16
17
  }
@@ -27,16 +27,19 @@ export class Conversation {
27
27
  }
28
28
  export class ConversationAux extends Conversation {
29
29
  messages;
30
+ max_action_time;
30
31
  constructor(conversation) {
31
32
  if (!ConversationAux.is(conversation)) {
32
33
  throw Error("Invalid input.");
33
34
  }
34
35
  super(conversation);
35
36
  this.messages = conversation.messages;
37
+ this.max_action_time = conversation.max_action_time;
36
38
  }
37
39
  static is(conversation) {
38
40
  return (Conversation.is(conversation) &&
39
41
  Array.isArray(conversation.messages) &&
40
- conversation.messages.every(Message.is));
42
+ conversation.messages.every(Message.is) &&
43
+ typeof conversation.max_action_time === "string");
41
44
  }
42
45
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "doers-comms-types",
3
- "version": "1.0.11",
3
+ "version": "1.0.12",
4
4
  "main": "dist/src/index.js",
5
5
  "types": "dist/src/index.d.ts",
6
6
  "directories": {
@@ -34,6 +34,7 @@ export class Conversation {
34
34
 
35
35
  export class ConversationAux extends Conversation {
36
36
  readonly messages : Message[]
37
+ readonly max_action_time : string
37
38
 
38
39
  constructor(conversation : any) {
39
40
  if (!ConversationAux.is(conversation)) {
@@ -41,13 +42,15 @@ export class ConversationAux extends Conversation {
41
42
  }
42
43
  super(conversation)
43
44
  this.messages = conversation.messages
45
+ this.max_action_time = conversation.max_action_time
44
46
  }
45
47
 
46
48
  static is(conversation : any) : conversation is ConversationAux {
47
49
  return (
48
50
  Conversation.is(conversation) &&
49
51
  Array.isArray(conversation.messages) &&
50
- conversation.messages.every(Message.is)
52
+ conversation.messages.every(Message.is) &&
53
+ typeof conversation.max_action_time === "string"
51
54
  )
52
55
  }
53
56
  }