@zohoim/client-sdk 1.1.0-calls → 1.1.0-calls1
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/application/services/channels/ChannelService.js +6 -1
- package/es/application/services/index.js +2 -0
- package/es/application/services/integrationServices/IntegrationService.js +21 -0
- package/es/application/services/integrationServices/index.js +2 -0
- package/es/application/services/sessions/SessionService.js +6 -1
- package/es/application/services/userPreferences/UserPreferenceService.js +26 -0
- package/es/application/services/userPreferences/index.js +2 -0
- package/es/core/constants/ModuleNames.js +2 -0
- package/es/core/utils/validateSchema.js +22 -9
- package/es/domain/dto/channels/getChannelRequest.js +13 -0
- package/es/domain/dto/channels/getChannelsRequest.js +3 -1
- package/es/domain/dto/channels/index.js +2 -1
- package/es/domain/dto/index.js +2 -0
- package/es/domain/dto/integrationServices/getIntegrationsRequest.js +7 -0
- package/es/domain/dto/integrationServices/index.js +1 -0
- package/es/domain/dto/sessions/getSessionMetricsRequest.js +16 -0
- package/es/domain/dto/sessions/index.js +2 -1
- package/es/domain/dto/userPreferences/getPreferencesRequest.js +7 -0
- package/es/domain/dto/userPreferences/index.js +2 -0
- package/es/domain/dto/userPreferences/updatePreferencesRequest.js +9 -0
- package/es/domain/entities/Channel/Channel.js +22 -4
- package/es/domain/entities/IntegrationService/IntegrationService.js +8 -1
- package/es/domain/entities/Session/SessionMetrics.js +21 -0
- package/es/domain/entities/Session/index.js +2 -1
- package/es/domain/entities/UserPreference/UserPreference.js +26 -0
- package/es/domain/entities/UserPreference/index.js +2 -0
- package/es/domain/entities/index.js +1 -0
- package/es/domain/enum/index.js +1 -0
- package/es/domain/enum/session/AssigneeFilter.js +6 -0
- package/es/domain/enum/session/SessionStatus.js +2 -1
- package/es/domain/enum/session/index.js +2 -1
- package/es/domain/enum/userPreference/CollapseSidePanel.js +5 -0
- package/es/domain/enum/userPreference/index.js +2 -0
- package/es/domain/interfaces/repositories/channels/IChannelRepository.js +7 -1
- package/es/domain/interfaces/repositories/index.js +2 -0
- package/es/domain/interfaces/repositories/integrationServices/IIntegrationServiceRepository.js +17 -0
- package/es/domain/interfaces/repositories/integrationServices/index.js +2 -0
- package/es/domain/interfaces/repositories/sessions/ISessionRepository.js +6 -1
- package/es/domain/interfaces/repositories/userPreferences/IUserPreferenceRepository.js +23 -0
- package/es/domain/interfaces/repositories/userPreferences/index.js +2 -0
- package/es/domain/schema/channel/ChannelSchema.js +39 -5
- package/es/domain/schema/index.js +1 -0
- package/es/domain/schema/integrationService/IntegrationServiceSchema.js +12 -0
- package/es/domain/schema/session/SessionMetrics/AssigneeSchema.js +20 -0
- package/es/domain/schema/session/SessionMetrics/SessionMetricsForAssigneeSchema.js +32 -0
- package/es/domain/schema/session/SessionMetrics/index.js +2 -0
- package/es/domain/schema/session/SessionMetricsSchema.js +9 -0
- package/es/domain/schema/session/index.js +2 -1
- package/es/domain/schema/userPreference/UserPreferenceSchema.js +9 -0
- package/es/domain/schema/userPreference/index.js +2 -0
- package/es/frameworks/managers/ModuleFactory.js +25 -3
- package/es/frameworks/managers/ModuleManager.js +1 -1
- package/es/frameworks/sdk/IMSDK.js +10 -0
- package/es/frameworks/sdk/integrationServices/IntegrationServiceSDK.js +30 -0
- package/es/frameworks/sdk/integrationServices/index.js +2 -0
- package/es/frameworks/sdk/userPreferences/UserPreferencesSDK.js +30 -0
- package/es/frameworks/sdk/userPreferences/index.js +2 -0
- package/es/infrastructure/adapters/channels/ChannelAdapter.js +16 -2
- package/es/infrastructure/adapters/index.js +2 -0
- package/es/infrastructure/adapters/integrationServices/IntegrationServiceAdapter.js +25 -0
- package/es/infrastructure/adapters/integrationServices/index.js +2 -0
- package/es/infrastructure/adapters/sessions/SessionMetricsAdapter.js +19 -0
- package/es/infrastructure/adapters/sessions/index.js +2 -1
- package/es/infrastructure/adapters/userPreferences/UserPreferenceAdapter.js +19 -0
- package/es/infrastructure/adapters/userPreferences/index.js +2 -0
- package/es/infrastructure/api/index.js +2 -0
- package/es/infrastructure/api/integrationServices/IntegrationServiceAPI.js +14 -0
- package/es/infrastructure/api/integrationServices/index.js +2 -0
- package/es/infrastructure/api/registry/getRegistryConfig.js +4 -0
- package/es/infrastructure/api/registry/integrationServices/constructIntegrationServiceEndPoint.js +10 -0
- package/es/infrastructure/api/registry/integrationServices/index.js +2 -0
- package/es/infrastructure/api/registry/integrationServices/integrationServiceAPIRegistry.js +12 -0
- package/es/infrastructure/api/registry/sessions/sessionAPIRegistry.js +8 -2
- package/es/infrastructure/api/registry/userPreferences/constructUserPreferencesEndPoint.js +10 -0
- package/es/infrastructure/api/registry/userPreferences/index.js +2 -0
- package/es/infrastructure/api/registry/userPreferences/userPreferenceAPIRegistry.js +17 -0
- package/es/infrastructure/api/sessions/SessionAPI.js +11 -1
- package/es/infrastructure/api/userPreferences/UserPreferenceAPI.js +24 -0
- package/es/infrastructure/api/userPreferences/index.js +2 -0
- package/es/infrastructure/repositories/channels/ChannelRepository.js +10 -1
- package/es/infrastructure/repositories/index.js +2 -0
- package/es/infrastructure/repositories/integrationServices/IntegrationServiceRepository.js +49 -0
- package/es/infrastructure/repositories/integrationServices/index.js +2 -0
- package/es/infrastructure/repositories/sessions/SessionRepository.js +14 -3
- package/es/infrastructure/repositories/userPreferences/UserPreferenceRepository.js +58 -0
- package/es/infrastructure/repositories/userPreferences/index.js +2 -0
- package/package.json +1 -1
|
@@ -12,9 +12,14 @@ export default class ChannelService extends IChannelRepository {
|
|
|
12
12
|
return this.channelRepository.getChannels(request);
|
|
13
13
|
}
|
|
14
14
|
|
|
15
|
+
async getChannel(request) {
|
|
16
|
+
return this.channelRepository.getChannel(request);
|
|
17
|
+
}
|
|
18
|
+
|
|
15
19
|
toJSON() {
|
|
16
20
|
return {
|
|
17
|
-
getChannels: this.getChannels.bind(this)
|
|
21
|
+
getChannels: this.getChannels.bind(this),
|
|
22
|
+
getChannel: this.getChannel.bind(this)
|
|
18
23
|
};
|
|
19
24
|
}
|
|
20
25
|
|
|
@@ -6,5 +6,7 @@ export * from './agents';
|
|
|
6
6
|
export * from './contacts';
|
|
7
7
|
export * from './cannedMessages';
|
|
8
8
|
export * from './templateMessages';
|
|
9
|
+
export * from './integrationServices';
|
|
10
|
+
export * from './userPreferences';
|
|
9
11
|
export * from './whatsAppPricing';
|
|
10
12
|
export * from './calls';
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import { IIntegrationServiceRepository } from '../../../domain/interfaces/repositories';
|
|
2
|
+
export default class IntegrationService extends IIntegrationServiceRepository {
|
|
3
|
+
constructor(_ref) {
|
|
4
|
+
let {
|
|
5
|
+
integrationServiceRepository
|
|
6
|
+
} = _ref;
|
|
7
|
+
super();
|
|
8
|
+
this.integrationServiceRepository = integrationServiceRepository;
|
|
9
|
+
}
|
|
10
|
+
|
|
11
|
+
async getIntegrations(request) {
|
|
12
|
+
return this.integrationServiceRepository.getIntegrations(request);
|
|
13
|
+
}
|
|
14
|
+
|
|
15
|
+
toJSON() {
|
|
16
|
+
return {
|
|
17
|
+
getIntegrations: this.getIntegrations.bind(this)
|
|
18
|
+
};
|
|
19
|
+
}
|
|
20
|
+
|
|
21
|
+
}
|
|
@@ -40,6 +40,10 @@ export default class SessionService extends ISessionRepository {
|
|
|
40
40
|
return this.sessionRepository.updateSessionStatus(request);
|
|
41
41
|
}
|
|
42
42
|
|
|
43
|
+
async getSessionMetrics(request) {
|
|
44
|
+
return this.sessionRepository.getSessionMetrics(request);
|
|
45
|
+
}
|
|
46
|
+
|
|
43
47
|
toJSON() {
|
|
44
48
|
return {
|
|
45
49
|
pickupSession: this.pickupSession.bind(this),
|
|
@@ -49,7 +53,8 @@ export default class SessionService extends ISessionRepository {
|
|
|
49
53
|
getSessionAttachments: this.getSessionAttachments.bind(this),
|
|
50
54
|
getSessionLastMessages: this.getSessionLastMessages.bind(this),
|
|
51
55
|
markSessionAsRead: this.markSessionAsRead.bind(this),
|
|
52
|
-
updateSessionStatus: this.updateSessionStatus.bind(this)
|
|
56
|
+
updateSessionStatus: this.updateSessionStatus.bind(this),
|
|
57
|
+
getSessionMetrics: this.getSessionMetrics.bind(this)
|
|
53
58
|
};
|
|
54
59
|
}
|
|
55
60
|
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
import { IUserPreferenceRepository } from '../../../domain/interfaces/repositories';
|
|
2
|
+
export default class UserPreferenceService extends IUserPreferenceRepository {
|
|
3
|
+
constructor(_ref) {
|
|
4
|
+
let {
|
|
5
|
+
userPreferenceRepository
|
|
6
|
+
} = _ref;
|
|
7
|
+
super();
|
|
8
|
+
this.userPreferenceRepository = userPreferenceRepository;
|
|
9
|
+
}
|
|
10
|
+
|
|
11
|
+
async getPreferences(request) {
|
|
12
|
+
return this.userPreferenceRepository.getPreferences(request);
|
|
13
|
+
}
|
|
14
|
+
|
|
15
|
+
async updatePreferences(request) {
|
|
16
|
+
return this.userPreferenceRepository.updatePreferences(request);
|
|
17
|
+
}
|
|
18
|
+
|
|
19
|
+
toJSON() {
|
|
20
|
+
return {
|
|
21
|
+
getPreferences: this.getPreferences.bind(this),
|
|
22
|
+
updatePreferences: this.updatePreferences.bind(this)
|
|
23
|
+
};
|
|
24
|
+
}
|
|
25
|
+
|
|
26
|
+
}
|
|
@@ -8,6 +8,8 @@ const ModuleNames = {
|
|
|
8
8
|
CANNED_MESSAGES: 'cannedMessages',
|
|
9
9
|
TEMPLATE_MESSAGES: 'templateMessages',
|
|
10
10
|
CUSTOM_REPLY_EXTENSIONS: 'articles',
|
|
11
|
+
INTEGRATION_SERVICES: 'integrationServices',
|
|
12
|
+
USER_PREFERENCES: 'userPreferences',
|
|
11
13
|
WHATSAPP_PRICING: 'whatsAppPricing',
|
|
12
14
|
CALLS: 'calls'
|
|
13
15
|
};
|
|
@@ -94,18 +94,31 @@ export const validateSchema = _ref4 => {
|
|
|
94
94
|
path: fieldPath,
|
|
95
95
|
entityName
|
|
96
96
|
});
|
|
97
|
-
} // Array
|
|
97
|
+
} // Array validation — schema (objects) or enum (primitives), not both
|
|
98
98
|
|
|
99
99
|
|
|
100
|
-
if (rules.type === 'array' &&
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
100
|
+
if (rules.type === 'array' && Array.isArray(value)) {
|
|
101
|
+
if (rules.schema && rules.enum) {
|
|
102
|
+
console.warn(`${entityName} - ${fieldPath} must define either schema or enum for array, not both`);
|
|
103
|
+
} else if (rules.schema) {
|
|
104
|
+
value.forEach((item, index) => {
|
|
105
|
+
validate({
|
|
106
|
+
schema: rules.schema,
|
|
107
|
+
data: item,
|
|
108
|
+
path: `${fieldPath}[${index}]`,
|
|
109
|
+
entityName
|
|
110
|
+
});
|
|
107
111
|
});
|
|
108
|
-
})
|
|
112
|
+
} else if (rules.enum) {
|
|
113
|
+
value.forEach((item, index) => {
|
|
114
|
+
validateEnumCheck({
|
|
115
|
+
value: item,
|
|
116
|
+
rules,
|
|
117
|
+
path: `${fieldPath}[${index}]`,
|
|
118
|
+
entityName
|
|
119
|
+
});
|
|
120
|
+
});
|
|
121
|
+
}
|
|
109
122
|
}
|
|
110
123
|
}
|
|
111
124
|
});
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import RequestBuilder from '../RequestBuilder';
|
|
2
|
+
|
|
3
|
+
function getChannelRequest() {
|
|
4
|
+
let {
|
|
5
|
+
params = {}
|
|
6
|
+
} = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
|
|
7
|
+
return new RequestBuilder().withParams({
|
|
8
|
+
channelId: null,
|
|
9
|
+
...params
|
|
10
|
+
}).build();
|
|
11
|
+
}
|
|
12
|
+
|
|
13
|
+
export default getChannelRequest;
|
package/es/domain/dto/index.js
CHANGED
|
@@ -6,5 +6,7 @@ export * from './agents';
|
|
|
6
6
|
export * from './contacts';
|
|
7
7
|
export * from './cannedMessages';
|
|
8
8
|
export * from './templateMessages';
|
|
9
|
+
export * from './integrationServices';
|
|
10
|
+
export * from './userPreferences';
|
|
9
11
|
export * from './whatsAppPricing';
|
|
10
12
|
export * from './calls';
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { default as getIntegrationsRequest } from './getIntegrationsRequest';
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import RequestBuilder from '../RequestBuilder';
|
|
2
|
+
|
|
3
|
+
function getSessionMetricsRequest() {
|
|
4
|
+
let {
|
|
5
|
+
query = {}
|
|
6
|
+
} = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
|
|
7
|
+
return new RequestBuilder().withQuery({
|
|
8
|
+
channelIds: null,
|
|
9
|
+
integrationServiceId: null,
|
|
10
|
+
excludeSyncingChannels: false,
|
|
11
|
+
assignmentType: null,
|
|
12
|
+
...query
|
|
13
|
+
}).build();
|
|
14
|
+
}
|
|
15
|
+
|
|
16
|
+
export default getSessionMetricsRequest;
|
|
@@ -5,4 +5,5 @@ export { default as getSessionAttachmentsRequest } from './getSessionAttachments
|
|
|
5
5
|
export { default as getSessionLastMessagesRequest } from './getSessionLastMessagesRequest';
|
|
6
6
|
export { default as markSessionAsReadRequest } from './markSessionAsReadRequest';
|
|
7
7
|
export { default as updateSessionStatusRequest } from './updateSessionStatusRequest';
|
|
8
|
-
export { default as pickupSessionRequest } from './pickupSessionRequest';
|
|
8
|
+
export { default as pickupSessionRequest } from './pickupSessionRequest';
|
|
9
|
+
export { default as getSessionMetricsRequest } from './getSessionMetricsRequest';
|
|
@@ -10,32 +10,50 @@ export default class Channel {
|
|
|
10
10
|
}); // Set required properties from schema
|
|
11
11
|
|
|
12
12
|
this.id = validatedData.id;
|
|
13
|
-
this.integrationService = validatedData.integrationService;
|
|
14
13
|
this.name = validatedData.name;
|
|
15
14
|
this.isActive = validatedData.isActive;
|
|
16
|
-
this.
|
|
15
|
+
this.isDeleted = validatedData.isDeleted;
|
|
16
|
+
this.isSandBox = validatedData.isSandBox;
|
|
17
|
+
this.createdTime = validatedData.createdTime;
|
|
18
|
+
this.universalLink = validatedData.universalLink; // Set optional properties from schema
|
|
17
19
|
|
|
20
|
+
this.integrationServiceType = validatedData.integrationServiceType || '';
|
|
21
|
+
this.integrationServiceId = validatedData.integrationServiceId || '';
|
|
18
22
|
this.defaultBotId = validatedData.defaultBotId || null;
|
|
19
23
|
this.accountName = validatedData.accountName || null;
|
|
20
24
|
this.isSubscribed = validatedData.isSubscribed || false;
|
|
21
25
|
this.createdBy = validatedData.createdBy || null;
|
|
22
26
|
this.isOwner = validatedData.isOwner || false;
|
|
23
27
|
this.photoURL = validatedData.photoURL || null;
|
|
28
|
+
this.configParams = validatedData.configParams || null;
|
|
29
|
+
this.authorizationPending = validatedData.authorizationPending || false;
|
|
30
|
+
this.meta = validatedData.meta || [];
|
|
31
|
+
this.logoURL = validatedData.logoURL || null;
|
|
32
|
+
this.workspaceId = validatedData.workspaceId || '';
|
|
24
33
|
}
|
|
25
34
|
|
|
26
35
|
toJSON() {
|
|
27
36
|
return {
|
|
28
37
|
id: this.id,
|
|
29
|
-
|
|
38
|
+
integrationServiceType: this.integrationServiceType,
|
|
39
|
+
integrationServiceId: this.integrationServiceId,
|
|
30
40
|
name: this.name,
|
|
31
41
|
defaultBotId: this.defaultBotId,
|
|
32
42
|
isActive: this.isActive,
|
|
43
|
+
isDeleted: this.isDeleted,
|
|
44
|
+
isSandBox: this.isSandBox,
|
|
33
45
|
createdTime: this.createdTime,
|
|
34
46
|
accountName: this.accountName,
|
|
47
|
+
universalLink: this.universalLink,
|
|
35
48
|
isSubscribed: this.isSubscribed,
|
|
36
49
|
createdBy: this.createdBy,
|
|
37
50
|
isOwner: this.isOwner,
|
|
38
|
-
photoURL: this.photoURL
|
|
51
|
+
photoURL: this.photoURL,
|
|
52
|
+
configParams: this.configParams,
|
|
53
|
+
authorizationPending: this.authorizationPending,
|
|
54
|
+
meta: this.meta,
|
|
55
|
+
logoURL: this.logoURL,
|
|
56
|
+
workspaceId: this.workspaceId
|
|
39
57
|
};
|
|
40
58
|
}
|
|
41
59
|
|
|
@@ -13,7 +13,10 @@ export default class IntegrationService {
|
|
|
13
13
|
label: validatedData.label || '',
|
|
14
14
|
id: validatedData.id || '',
|
|
15
15
|
provider: validatedData.provider || {},
|
|
16
|
-
logoURL: validatedData.logoURL || null
|
|
16
|
+
logoURL: validatedData.logoURL || null,
|
|
17
|
+
domain: validatedData.domain || '',
|
|
18
|
+
channelAlias: validatedData.channelAlias,
|
|
19
|
+
isParentAccountNeeded: validatedData.isParentAccountNeeded
|
|
17
20
|
};
|
|
18
21
|
}
|
|
19
22
|
|
|
@@ -29,6 +32,10 @@ export default class IntegrationService {
|
|
|
29
32
|
return integrationServiceId === IntegrationServices.IM_TALK;
|
|
30
33
|
}
|
|
31
34
|
|
|
35
|
+
static isWecom(integrationServiceId) {
|
|
36
|
+
return integrationServiceId === IntegrationServices.WECOM;
|
|
37
|
+
}
|
|
38
|
+
|
|
32
39
|
toJSON() {
|
|
33
40
|
return { ...this.data
|
|
34
41
|
};
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import { validateSchema } from '../../../core/utils';
|
|
2
|
+
import { SessionMetricsSchema } from '../../schema';
|
|
3
|
+
export default class SessionMetrics {
|
|
4
|
+
constructor() {
|
|
5
|
+
let data = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
|
|
6
|
+
const validatedData = validateSchema({
|
|
7
|
+
schema: SessionMetricsSchema,
|
|
8
|
+
data,
|
|
9
|
+
entityName: 'SessionMetrics'
|
|
10
|
+
});
|
|
11
|
+
this.data = {
|
|
12
|
+
assignee: validatedData.assignee
|
|
13
|
+
};
|
|
14
|
+
}
|
|
15
|
+
|
|
16
|
+
toJSON() {
|
|
17
|
+
return { ...this.data
|
|
18
|
+
};
|
|
19
|
+
}
|
|
20
|
+
|
|
21
|
+
}
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
import { validateSchema } from '../../../core/utils';
|
|
2
|
+
import { UserPreferenceSchema } from '../../schema';
|
|
3
|
+
import { CollapseSidePanel } from '../../enum';
|
|
4
|
+
export default class UserPreference {
|
|
5
|
+
constructor() {
|
|
6
|
+
let data = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
|
|
7
|
+
const validatedData = validateSchema({
|
|
8
|
+
schema: UserPreferenceSchema,
|
|
9
|
+
data,
|
|
10
|
+
entityName: 'UserPreference'
|
|
11
|
+
});
|
|
12
|
+
this.data = {
|
|
13
|
+
collapseSidePanel: validatedData.collapseSidePanel
|
|
14
|
+
};
|
|
15
|
+
}
|
|
16
|
+
|
|
17
|
+
static isCollpseView(view) {
|
|
18
|
+
return view === CollapseSidePanel.ENABLED;
|
|
19
|
+
}
|
|
20
|
+
|
|
21
|
+
toJSON() {
|
|
22
|
+
return { ...this.data
|
|
23
|
+
};
|
|
24
|
+
}
|
|
25
|
+
|
|
26
|
+
}
|
package/es/domain/enum/index.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { ModuleNames } from '../../../../core/constants';
|
|
2
2
|
import BaseAPI from '../../../../infrastructure/api/BaseAPI';
|
|
3
|
-
import { getChannelsRequest } from '../../../dto';
|
|
3
|
+
import { getChannelRequest, getChannelsRequest } from '../../../dto';
|
|
4
4
|
export default class IChannelRepository extends BaseAPI {
|
|
5
5
|
constructor() {
|
|
6
6
|
super({
|
|
@@ -12,6 +12,12 @@ export default class IChannelRepository extends BaseAPI {
|
|
|
12
12
|
getChannels() {
|
|
13
13
|
let request = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : getChannelsRequest();
|
|
14
14
|
throw new Error('Method not implemented.');
|
|
15
|
+
} // eslint-disable-next-line no-unused-vars
|
|
16
|
+
|
|
17
|
+
|
|
18
|
+
getChannel() {
|
|
19
|
+
let request = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : getChannelRequest();
|
|
20
|
+
throw new Error('Method not implemented.');
|
|
15
21
|
}
|
|
16
22
|
|
|
17
23
|
}
|
|
@@ -6,5 +6,7 @@ export * from './agents';
|
|
|
6
6
|
export * from './contacts';
|
|
7
7
|
export * from './cannedMessages';
|
|
8
8
|
export * from './templateMessages';
|
|
9
|
+
export * from './integrationServices';
|
|
10
|
+
export * from './userPreferences';
|
|
9
11
|
export * from './whatsAppPricing';
|
|
10
12
|
export * from './calls';
|
package/es/domain/interfaces/repositories/integrationServices/IIntegrationServiceRepository.js
ADDED
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import { ModuleNames } from '../../../../core/constants';
|
|
2
|
+
import BaseAPI from '../../../../infrastructure/api/BaseAPI';
|
|
3
|
+
import { getIntegrationsRequest } from '../../../dto';
|
|
4
|
+
export default class IIntegrationServiceRepository extends BaseAPI {
|
|
5
|
+
constructor() {
|
|
6
|
+
super({
|
|
7
|
+
module: ModuleNames.INTEGRATION_SERVICES
|
|
8
|
+
});
|
|
9
|
+
} // eslint-disable-next-line no-unused-vars
|
|
10
|
+
|
|
11
|
+
|
|
12
|
+
async getIntegrations() {
|
|
13
|
+
let request = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : getIntegrationsRequest();
|
|
14
|
+
throw new Error('Method not implemented');
|
|
15
|
+
}
|
|
16
|
+
|
|
17
|
+
}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
/* eslint-disable no-unused-vars */
|
|
2
2
|
import { ModuleNames } from '../../../../core/constants';
|
|
3
3
|
import BaseAPI from '../../../../infrastructure/api/BaseAPI';
|
|
4
|
-
import { updateSessionAssigneeRequest, getSessionsRequest, getSessionRequest, getSessionAttachmentsRequest, getSessionLastMessagesRequest, markSessionAsReadRequest, updateSessionStatusRequest, pickupSessionRequest } from '../../../dto';
|
|
4
|
+
import { updateSessionAssigneeRequest, getSessionsRequest, getSessionRequest, getSessionAttachmentsRequest, getSessionLastMessagesRequest, markSessionAsReadRequest, updateSessionStatusRequest, pickupSessionRequest, getSessionMetricsRequest } from '../../../dto';
|
|
5
5
|
export default class ISessionRepository extends BaseAPI {
|
|
6
6
|
constructor() {
|
|
7
7
|
super({
|
|
@@ -49,4 +49,9 @@ export default class ISessionRepository extends BaseAPI {
|
|
|
49
49
|
throw new Error('Method not implemented.');
|
|
50
50
|
}
|
|
51
51
|
|
|
52
|
+
getSessionMetrics() {
|
|
53
|
+
let request = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : getSessionMetricsRequest();
|
|
54
|
+
throw new Error('Method not implemented.');
|
|
55
|
+
}
|
|
56
|
+
|
|
52
57
|
}
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
import { ModuleNames } from '../../../../core/constants';
|
|
2
|
+
import BaseAPI from '../../../../infrastructure/api/BaseAPI';
|
|
3
|
+
import { getPreferencesRequest, updatePreferencesRequest } from '../../../dto';
|
|
4
|
+
export default class IUserPreferenceRepository extends BaseAPI {
|
|
5
|
+
constructor() {
|
|
6
|
+
super({
|
|
7
|
+
module: ModuleNames.USER_PREFERENCES
|
|
8
|
+
});
|
|
9
|
+
} // eslint-disable-next-line no-unused-vars
|
|
10
|
+
|
|
11
|
+
|
|
12
|
+
async getPreferences() {
|
|
13
|
+
let request = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : getPreferencesRequest();
|
|
14
|
+
throw new Error('Method not implemented');
|
|
15
|
+
} // eslint-disable-next-line no-unused-vars
|
|
16
|
+
|
|
17
|
+
|
|
18
|
+
async updatePreferences() {
|
|
19
|
+
let request = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : updatePreferencesRequest();
|
|
20
|
+
throw new Error('Method not implemented');
|
|
21
|
+
}
|
|
22
|
+
|
|
23
|
+
}
|
|
@@ -1,13 +1,15 @@
|
|
|
1
|
-
import { IntegrationServiceSchema } from '../integrationService';
|
|
2
1
|
const ChannelSchema = {
|
|
3
2
|
id: {
|
|
4
3
|
type: 'string',
|
|
5
4
|
required: true
|
|
6
5
|
},
|
|
7
|
-
|
|
8
|
-
type: '
|
|
9
|
-
required:
|
|
10
|
-
|
|
6
|
+
integrationServiceType: {
|
|
7
|
+
type: 'string',
|
|
8
|
+
required: false
|
|
9
|
+
},
|
|
10
|
+
integrationServiceId: {
|
|
11
|
+
type: 'string',
|
|
12
|
+
required: false
|
|
11
13
|
},
|
|
12
14
|
name: {
|
|
13
15
|
type: 'string',
|
|
@@ -21,6 +23,14 @@ const ChannelSchema = {
|
|
|
21
23
|
type: 'boolean',
|
|
22
24
|
required: true
|
|
23
25
|
},
|
|
26
|
+
isDeleted: {
|
|
27
|
+
type: 'boolean',
|
|
28
|
+
required: true
|
|
29
|
+
},
|
|
30
|
+
isSandBox: {
|
|
31
|
+
type: 'boolean',
|
|
32
|
+
required: true
|
|
33
|
+
},
|
|
24
34
|
createdTime: {
|
|
25
35
|
type: 'string',
|
|
26
36
|
required: true
|
|
@@ -29,6 +39,10 @@ const ChannelSchema = {
|
|
|
29
39
|
type: 'string',
|
|
30
40
|
required: false
|
|
31
41
|
},
|
|
42
|
+
universalLink: {
|
|
43
|
+
type: 'string',
|
|
44
|
+
required: true
|
|
45
|
+
},
|
|
32
46
|
isSubscribed: {
|
|
33
47
|
type: 'boolean',
|
|
34
48
|
required: false
|
|
@@ -44,6 +58,26 @@ const ChannelSchema = {
|
|
|
44
58
|
photoURL: {
|
|
45
59
|
type: 'string',
|
|
46
60
|
required: false
|
|
61
|
+
},
|
|
62
|
+
configParams: {
|
|
63
|
+
type: 'object',
|
|
64
|
+
required: false
|
|
65
|
+
},
|
|
66
|
+
authorizationPending: {
|
|
67
|
+
type: 'boolean',
|
|
68
|
+
required: false
|
|
69
|
+
},
|
|
70
|
+
meta: {
|
|
71
|
+
type: 'array',
|
|
72
|
+
required: false
|
|
73
|
+
},
|
|
74
|
+
logoURL: {
|
|
75
|
+
type: 'string',
|
|
76
|
+
required: false
|
|
77
|
+
},
|
|
78
|
+
workspaceId: {
|
|
79
|
+
type: 'string',
|
|
80
|
+
required: false
|
|
47
81
|
}
|
|
48
82
|
};
|
|
49
83
|
export default ChannelSchema;
|
|
@@ -26,6 +26,18 @@ const IntegrationServiceSchema = {
|
|
|
26
26
|
logoURL: {
|
|
27
27
|
type: 'string',
|
|
28
28
|
required: false
|
|
29
|
+
},
|
|
30
|
+
domain: {
|
|
31
|
+
type: 'string',
|
|
32
|
+
required: false
|
|
33
|
+
},
|
|
34
|
+
channelAlias: {
|
|
35
|
+
type: 'string',
|
|
36
|
+
required: false
|
|
37
|
+
},
|
|
38
|
+
isParentAccountNeeded: {
|
|
39
|
+
type: 'boolean',
|
|
40
|
+
required: false
|
|
29
41
|
}
|
|
30
42
|
};
|
|
31
43
|
export default IntegrationServiceSchema;
|