doersiq-types 2.0.1 → 2.0.2

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.
@@ -4,7 +4,6 @@ export declare class Conversation {
4
4
  readonly conversation_id: string;
5
5
  readonly bot_id: string;
6
6
  readonly time: string;
7
- readonly mode: "chat" | "write";
8
7
  readonly [x: string]: any;
9
8
  constructor(conversation: any);
10
9
  static is(conversation: any): conversation is Conversation;
@@ -4,7 +4,6 @@ export class Conversation {
4
4
  conversation_id;
5
5
  bot_id;
6
6
  time;
7
- mode;
8
7
  constructor(conversation) {
9
8
  if (!Conversation.is(conversation)) {
10
9
  throw Error("Invalid input.");
@@ -13,15 +12,13 @@ export class Conversation {
13
12
  this.conversation_id = conversation.conversation_id;
14
13
  this.bot_id = conversation.bot_id;
15
14
  this.time = conversation.time;
16
- this.mode = conversation.mode;
17
15
  }
18
16
  static is(conversation) {
19
17
  return (conversation !== undefined &&
20
18
  typeof conversation.user_id === "string" &&
21
19
  typeof conversation.conversation_id === "string" &&
22
20
  typeof conversation.bot_id === "string" &&
23
- typeof conversation.time === "string" &&
24
- ["chat", "write"].includes(conversation.mode));
21
+ typeof conversation.time === "string");
25
22
  }
26
23
  }
27
24
  export class ConversationAux extends Conversation {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "doersiq-types",
3
- "version": "2.0.1",
3
+ "version": "2.0.2",
4
4
  "main": "dist/src/index.js",
5
5
  "types": "dist/src/index.d.ts",
6
6
  "directories": {
@@ -5,7 +5,6 @@ export class Conversation {
5
5
  readonly conversation_id : string
6
6
  readonly bot_id : string
7
7
  readonly time : string
8
- readonly mode : "chat" | "write"
9
8
  readonly [x : string] : any
10
9
 
11
10
  constructor(conversation : any) {
@@ -16,7 +15,6 @@ export class Conversation {
16
15
  this.conversation_id = conversation.conversation_id
17
16
  this.bot_id = conversation.bot_id
18
17
  this.time = conversation.time
19
- this.mode = conversation.mode
20
18
  }
21
19
 
22
20
  static is(conversation : any) : conversation is Conversation {
@@ -25,8 +23,7 @@ export class Conversation {
25
23
  typeof conversation.user_id === "string" &&
26
24
  typeof conversation.conversation_id === "string" &&
27
25
  typeof conversation.bot_id === "string" &&
28
- typeof conversation.time === "string" &&
29
- ["chat", "write"].includes(conversation.mode)
26
+ typeof conversation.time === "string"
30
27
  )
31
28
  }
32
29
  }