@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.
- package/es/domain/schema/actor/AgentSchema.js +1 -1
- package/es/infrastructure/adapters/channels/ChannelAgentAdapter.js +22 -3
- package/es/infrastructure/api/agents/AgentAPI.js +0 -4
- package/es/infrastructure/api/bots/BotAPI.js +0 -4
- package/es/infrastructure/api/channels/ChannelAPI.js +0 -4
- package/es/infrastructure/api/channels/ChannelAgentAPI.js +0 -4
- package/es/infrastructure/api/contacts/ContactAPI.js +0 -4
- package/es/infrastructure/api/messages/MessageAPI.js +0 -4
- package/es/infrastructure/api/sessions/SessionAPI.js +0 -4
- package/package.json +1 -1
|
@@ -14,14 +14,33 @@ 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
|
-
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';
|