@zohoim/client-sdk 1.0.0-poc54 → 1.0.0-poc56

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,7 @@ import { getChannelAgentsRequest } from "../../../dto";
4
4
  export default class IChannelAgentRepository extends BaseAPI {
5
5
  constructor() {
6
6
  super({
7
- module: `${ModuleNames.CHANNELS}.agents`
7
+ module: `${ModuleNames.CHANNELS}.${ModuleNames.AGENTS}`
8
8
  });
9
9
  } // eslint-disable-next-line no-unused-vars
10
10
 
@@ -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,29 @@ 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
30
  type: channelAgent.type
24
31
  }).toJSON();
32
+ return {
33
+ id,
34
+ name,
35
+ email,
36
+ photoURL,
37
+ zuid,
38
+ type
39
+ };
25
40
  } catch (error) {
26
41
  throw new AdapterError(`Failed to adapt channel agent: ${error.message}`);
27
42
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@zohoim/client-sdk",
3
- "version": "1.0.0-poc54",
3
+ "version": "1.0.0-poc56",
4
4
  "description": "To have the client sdk for the IM",
5
5
  "main": "es/index.js",
6
6
  "module": "es/index.js",