@zohoim/client-sdk 1.0.0-poc55 → 1.0.0-poc57

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.
@@ -10,7 +10,7 @@ const AgentSchema = {
10
10
  },
11
11
  lastName: {
12
12
  type: 'string',
13
- required: true
13
+ required: false
14
14
  },
15
15
  name: {
16
16
  type: 'string',
@@ -14,14 +14,33 @@ export default class ChannelAgentAdapter extends IAdapter {
14
14
  }
15
15
 
16
16
  try {
17
- return new Agent({
17
+ const {
18
+ id,
19
+ name,
20
+ email,
21
+ photoURL,
22
+ zuid,
23
+ type
24
+ } = new Agent({
18
25
  id: channelAgent.id,
19
26
  name: channelAgent.name,
20
27
  email: channelAgent.email,
21
- photoURL: channelAgent.photoURL || '',
28
+ photoURL: channelAgent.photoURL,
22
29
  zuid: channelAgent.zuid,
23
- type: channelAgent.type
30
+ type: channelAgent.type,
31
+ firstName: null,
32
+ lastName: null,
33
+ status: null,
34
+ role: null
24
35
  }).toJSON();
36
+ return {
37
+ id,
38
+ name,
39
+ email,
40
+ photoURL,
41
+ zuid,
42
+ type
43
+ };
25
44
  } catch (error) {
26
45
  throw new AdapterError(`Failed to adapt channel agent: ${error.message}`);
27
46
  }
@@ -1,10 +1,6 @@
1
1
  import { getAgentsRequest } from "../../../domain/dto";
2
2
  import { IAgentRepository } from "../../../domain/interfaces/repositories";
3
3
  export default class AgentAPI extends IAgentRepository {
4
- constructor() {
5
- super();
6
- }
7
-
8
4
  async getAgents() {
9
5
  let request = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : getAgentsRequest();
10
6
  const operation = 'getAgents';
@@ -1,10 +1,6 @@
1
1
  import { getBotsRequest } from "../../../domain/dto";
2
2
  import { IBotRepository } from "../../../domain/interfaces/repositories";
3
3
  export default class BotAPI extends IBotRepository {
4
- constructor() {
5
- super();
6
- }
7
-
8
4
  async getBots() {
9
5
  let request = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : getBotsRequest();
10
6
  const operation = 'getBots';
@@ -1,10 +1,6 @@
1
1
  import { getChannelsRequest } from "../../../domain/dto";
2
2
  import { IChannelRepository } from "../../../domain/interfaces/repositories";
3
3
  export default class ChannelAPI extends IChannelRepository {
4
- constructor() {
5
- super();
6
- }
7
-
8
4
  async getChannels() {
9
5
  let request = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : getChannelsRequest();
10
6
  const operation = 'getChannels';
@@ -1,10 +1,6 @@
1
1
  import { getChannelAgentsRequest } from "../../../domain/dto";
2
2
  import { IChannelAgentRepository } from "../../../domain/interfaces/repositories";
3
3
  export default class ChannelAgentAPI extends IChannelAgentRepository {
4
- constructor() {
5
- super();
6
- }
7
-
8
4
  async getAgents() {
9
5
  let request = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : getChannelAgentsRequest();
10
6
  const {
@@ -1,10 +1,6 @@
1
1
  import { getContactsRequest } from "../../../domain/dto";
2
2
  import { IContactRepository } from "../../../domain/interfaces/repositories";
3
3
  export default class ContactAPI extends IContactRepository {
4
- constructor() {
5
- super();
6
- }
7
-
8
4
  async getContacts() {
9
5
  let request = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : getContactsRequest();
10
6
  const operation = 'getContacts';
@@ -1,10 +1,6 @@
1
1
  import { getMessagesRequest, deleteMessageRequest, getFullContentRequest, resendMessageRequest, sendAttachmentRequest, sendMessageRequest, initiateSessionRequest, searchMessagesRequest } from "../../../domain/dto";
2
2
  import { IMessageRepository } from "../../../domain/interfaces/repositories";
3
3
  export default class MessageAPI extends IMessageRepository {
4
- constructor() {
5
- super();
6
- }
7
-
8
4
  async getMessages() {
9
5
  let request = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : getMessagesRequest();
10
6
  const operation = 'getMessages';
@@ -1,10 +1,6 @@
1
1
  import { updateSessionAssigneeRequest, getSessionsRequest, getSessionRequest, getSessionAttachmentsRequest, getSessionLastMessagesRequest, markSessionAsReadRequest, updateSessionStatusRequest } from "../../../domain/dto";
2
2
  import { ISessionRepository } from "../../../domain/interfaces/repositories";
3
3
  export default class SessionAPI extends ISessionRepository {
4
- constructor() {
5
- super();
6
- }
7
-
8
4
  async updateAssignee() {
9
5
  let request = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : updateSessionAssigneeRequest();
10
6
  const operation = 'updateAssignee';
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@zohoim/client-sdk",
3
- "version": "1.0.0-poc55",
3
+ "version": "1.0.0-poc57",
4
4
  "description": "To have the client sdk for the IM",
5
5
  "main": "es/index.js",
6
6
  "module": "es/index.js",