@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}.
|
|
7
|
+
module: `${ModuleNames.CHANNELS}.${ModuleNames.AGENTS}`
|
|
8
8
|
});
|
|
9
9
|
} // eslint-disable-next-line no-unused-vars
|
|
10
10
|
|
|
@@ -14,14 +14,29 @@ export default class ChannelAgentAdapter extends IAdapter {
|
|
|
14
14
|
}
|
|
15
15
|
|
|
16
16
|
try {
|
|
17
|
-
|
|
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
|
}
|