@zohoim/client-sdk 1.0.0-poc93 → 1.0.0-poc95

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.
@@ -21,7 +21,7 @@ export default class Actor {
21
21
  return type === ActorType.BOT;
22
22
  }
23
23
 
24
- static isSystemMessage(type) {
24
+ static isSystem(type) {
25
25
  return type === ActorType.SYSTEM;
26
26
  }
27
27
 
@@ -1,5 +1,5 @@
1
1
  import { validateSchema } from '../../../core/utils';
2
- import { MessageDirection, MessageStatus, MessageTypes } from '../../enum';
2
+ import { MessageDirection, MessageStatus, MessageTypes, MessageMeta } from '../../enum';
3
3
  import { MessageSchema } from '../../schema';
4
4
  import { Actor } from '../Actor';
5
5
  import { Attachment } from '../Attachment';
@@ -75,8 +75,9 @@ export default class Message {
75
75
  return type === MessageTypes.ACTION;
76
76
  }
77
77
 
78
- static isSystemMessage(message) {
79
- return !!message;
78
+ static isSystemMessage(meta) {
79
+ const systemMessageType = Message.getMetaValue(meta, MessageMeta.SYSTEM_MESSAGE_TYPE);
80
+ return !!systemMessageType;
80
81
  }
81
82
 
82
83
  static isHapinessRating(systemMessageType) {
@@ -40,7 +40,7 @@ export default class Session {
40
40
  return sessionStatus === SessionStatus.ON_PROGRESS;
41
41
  }
42
42
 
43
- static isHold(sessionStatus) {
43
+ static isOnHold(sessionStatus) {
44
44
  return sessionStatus === SessionStatus.ON_HOLD;
45
45
  }
46
46
 
@@ -0,0 +1,4 @@
1
+ const MessageMeta = {
2
+ SYSTEM_MESSAGE_TYPE: 'SYSTEM_MESSAGE_TYPE'
3
+ };
4
+ export default MessageMeta;
@@ -2,10 +2,11 @@ import MessageTypes from './MessageType';
2
2
  import MessageStatus from './MessageStatus';
3
3
  import MessageDirection from './MessageDirection';
4
4
  import MessageContentType from './MessageContentType';
5
+ import MessageMeta from './MessageMeta';
5
6
  import ActionType from './ActionType';
6
7
  import ExternalInfoAction from './ExternalInfoAction';
7
8
  import InfoSessionStatus from './InfoSessionStatus';
8
9
  import InfoAction from './InfoAction';
9
10
  import ActionSubType from './ActionSubType';
10
11
  import InfoTargetType from './InfoTargetType';
11
- export { MessageTypes, MessageStatus, MessageDirection, MessageContentType, ActionType, ActionSubType, ExternalInfoAction, InfoSessionStatus, InfoAction, InfoTargetType };
12
+ export { MessageTypes, MessageStatus, MessageDirection, MessageContentType, MessageMeta, ActionType, ActionSubType, ExternalInfoAction, InfoSessionStatus, InfoAction, InfoTargetType };
@@ -4,7 +4,7 @@ import createAPIRegistry from '../createAPIRegistry';
4
4
  import constructChannelEndPoint from './constructChannelEndPoint';
5
5
 
6
6
  function getAgents() {
7
- return createAPIRegistry(constructChannelEndPoint('/:channelId/subscribers'), HTTP_METHODS.GET, getChannelAgentsRequest());
7
+ return createAPIRegistry(constructChannelEndPoint('/:channelId/agents'), HTTP_METHODS.GET, getChannelAgentsRequest());
8
8
  }
9
9
 
10
10
  export default {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@zohoim/client-sdk",
3
- "version": "1.0.0-poc93",
3
+ "version": "1.0.0-poc95",
4
4
  "description": "To have the client sdk for the IM",
5
5
  "main": "es/index.js",
6
6
  "module": "es/index.js",