@zohoim/client-sdk 1.0.0-poc5 → 1.0.0-poc7
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/entities/Agent/Agent.js +1 -1
- package/es/domain/errors/index.js +2 -0
- package/es/domain/interfaces/channels/IChannelAgent.js +4 -1
- package/es/domain/services/channels/ChannelAgentService.js +3 -1
- package/es/domain/types/channels/GetChannelAgentsRequest.js +7 -0
- package/es/domain/types/channels/index.js +2 -0
- package/es/domain/types/index.js +1 -0
- package/es/index.js +4 -6
- package/es/modules/channels/index.js +1 -0
- package/es/modules/channels/sdk/ChannelAgentsSDK.js +13 -0
- package/es/modules/channels/sdk/ChannelSDK.js +7 -0
- package/es/modules/channels/sdk/index.js +2 -0
- package/es/modules/index.js +1 -0
- package/es/sdk/IMSDK.js +7 -0
- package/es/sdk/index.js +2 -0
- package/package.json +1 -1
|
@@ -1,5 +1,8 @@
|
|
|
1
|
+
import GetChannelAgentsRequest from '../../types/channels/GetChannelAgentsRequest';
|
|
1
2
|
export default class IChannelAgent {
|
|
2
|
-
|
|
3
|
+
// eslint-disable-next-line no-unused-vars
|
|
4
|
+
getChannelAgents() {
|
|
5
|
+
let request = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : GetChannelAgentsRequest;
|
|
3
6
|
throw new Error('Method not implemented.');
|
|
4
7
|
}
|
|
5
8
|
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import IChannelAgent from '../../interfaces/channels/IChannelAgent';
|
|
2
|
+
import GetChannelAgentsRequest from '../../types/channels/GetChannelAgentsRequest';
|
|
2
3
|
export default class ChannelAgentService extends IChannelAgent {
|
|
3
4
|
constructor(channelAPI, channelAgentAdapter) {
|
|
4
5
|
super();
|
|
@@ -7,7 +8,8 @@ export default class ChannelAgentService extends IChannelAgent {
|
|
|
7
8
|
}
|
|
8
9
|
|
|
9
10
|
async getChannelAgents() {
|
|
10
|
-
|
|
11
|
+
let request = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : GetChannelAgentsRequest;
|
|
12
|
+
const channelAgents = await this.channelAPI.getChannelAgents(request);
|
|
11
13
|
return channelAgents.map(this.channelAgentAdapter.adapt);
|
|
12
14
|
}
|
|
13
15
|
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from './channels';
|
package/es/index.js
CHANGED
|
@@ -1,6 +1,4 @@
|
|
|
1
|
-
|
|
2
|
-
export
|
|
3
|
-
|
|
4
|
-
export
|
|
5
|
-
import * as _services from './domain/services';
|
|
6
|
-
export { _services as services };
|
|
1
|
+
export * from './domain/entities';
|
|
2
|
+
export * from './domain/interfaces';
|
|
3
|
+
export * from './domain/services';
|
|
4
|
+
export * from './sdk';
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from './sdk';
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { ChannelAgentService } from '../../../domain/services';
|
|
2
|
+
import { GetChannelAgentsRequest } from '../../../domain/types';
|
|
3
|
+
export default class ChannelAgentsSDK {
|
|
4
|
+
constructor(agentAPI, agentAdapter) {
|
|
5
|
+
this.channelAgentService = new ChannelAgentService(agentAPI, agentAdapter);
|
|
6
|
+
}
|
|
7
|
+
|
|
8
|
+
async getAgents() {
|
|
9
|
+
let request = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : GetChannelAgentsRequest;
|
|
10
|
+
return this.channelAgentService.getChannelAgents(request);
|
|
11
|
+
}
|
|
12
|
+
|
|
13
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from './channels';
|
package/es/sdk/IMSDK.js
ADDED
package/es/sdk/index.js
ADDED