@zohoim/client-sdk 1.0.0-poc87 → 1.0.0-poc88
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/agents/AgentService.js +1 -1
- package/es/application/services/agents/index.js +1 -1
- package/es/application/services/bots/BotService.js +1 -1
- package/es/application/services/bots/index.js +1 -1
- package/es/application/services/channels/ChannelAgentService.js +1 -1
- package/es/application/services/channels/ChannelService.js +1 -1
- package/es/application/services/channels/index.js +2 -2
- package/es/application/services/contacts/ContactService.js +1 -1
- package/es/application/services/contacts/index.js +1 -1
- package/es/application/services/index.js +6 -6
- package/es/application/services/messages/MessageService.js +1 -1
- package/es/application/services/messages/index.js +1 -1
- package/es/application/services/sessions/SessionService.js +1 -1
- package/es/application/services/sessions/index.js +1 -1
- package/es/core/constants/index.js +2 -2
- package/es/core/errors/index.js +2 -2
- package/es/core/utils/index.js +2 -2
- package/es/core/utils/validateSchema.js +1 -1
- package/es/domain/dto/agents/getAgentsRequest.js +1 -1
- package/es/domain/dto/agents/index.js +1 -1
- package/es/domain/dto/bots/getBotRequest.js +1 -1
- package/es/domain/dto/bots/getBotsRequest.js +1 -1
- package/es/domain/dto/bots/index.js +2 -2
- package/es/domain/dto/channels/agents/getChannelAgentsRequest.js +1 -1
- package/es/domain/dto/channels/agents/index.js +1 -1
- package/es/domain/dto/channels/getChannelsRequest.js +1 -1
- package/es/domain/dto/channels/index.js +2 -2
- package/es/domain/dto/contacts/getContactsRequest.js +1 -1
- package/es/domain/dto/contacts/index.js +1 -1
- package/es/domain/dto/index.js +6 -6
- package/es/domain/dto/messages/deleteMessageRequest.js +1 -1
- package/es/domain/dto/messages/getFullContentRequest.js +1 -1
- package/es/domain/dto/messages/getMessagesRequest.js +1 -1
- package/es/domain/dto/messages/index.js +8 -8
- package/es/domain/dto/messages/initiateSessionRequest.js +1 -1
- package/es/domain/dto/messages/resendMessageRequest.js +1 -1
- package/es/domain/dto/messages/searchMessagesRequest.js +1 -1
- package/es/domain/dto/messages/sendAttachmentRequest.js +1 -1
- package/es/domain/dto/messages/sendMessageRequest.js +1 -1
- package/es/domain/dto/sessions/getSessionAttachmentsRequest.js +1 -1
- package/es/domain/dto/sessions/getSessionLastMessagesRequest.js +1 -1
- package/es/domain/dto/sessions/getSessionRequest.js +1 -1
- package/es/domain/dto/sessions/getSessionsRequest.js +1 -1
- package/es/domain/dto/sessions/index.js +8 -8
- package/es/domain/dto/sessions/markSessionAsReadRequest.js +1 -1
- package/es/domain/dto/sessions/pickupSessionRequest.js +1 -1
- package/es/domain/dto/sessions/updateSessionAssigneeRequest.js +1 -1
- package/es/domain/dto/sessions/updateSessionStatusRequest.js +1 -1
- package/es/domain/entities/Actor/Actor.js +3 -3
- package/es/domain/entities/Actor/index.js +1 -1
- package/es/domain/entities/Agent/Agent.js +2 -2
- package/es/domain/entities/Agent/index.js +1 -1
- package/es/domain/entities/Attachment/Attachment.js +2 -2
- package/es/domain/entities/Attachment/index.js +1 -1
- package/es/domain/entities/Bot/Bot.js +2 -2
- package/es/domain/entities/Bot/index.js +1 -1
- package/es/domain/entities/Channel/Channel.js +2 -2
- package/es/domain/entities/Channel/index.js +1 -1
- package/es/domain/entities/Contact/Contact.js +2 -2
- package/es/domain/entities/Contact/index.js +1 -1
- package/es/domain/entities/IntegrationService/IntegrationService.js +3 -3
- package/es/domain/entities/IntegrationService/index.js +1 -1
- package/es/domain/entities/Message/Action.js +3 -3
- package/es/domain/entities/Message/ExternalInfo.js +2 -2
- package/es/domain/entities/Message/Info.js +4 -4
- package/es/domain/entities/Message/Location.js +2 -2
- package/es/domain/entities/Message/Message.js +16 -9
- package/es/domain/entities/Message/MessageWithSession.js +4 -4
- package/es/domain/entities/Message/index.js +6 -6
- package/es/domain/entities/Session/Session.js +4 -4
- package/es/domain/entities/Session/index.js +1 -1
- package/es/domain/entities/index.js +9 -9
- package/es/domain/enum/actor/index.js +1 -1
- package/es/domain/enum/attachment/index.js +1 -1
- package/es/domain/enum/bot/index.js +1 -1
- package/es/domain/enum/index.js +6 -6
- package/es/domain/enum/integrationServices/index.js +1 -1
- package/es/domain/enum/message/index.js +9 -9
- package/es/domain/enum/session/index.js +2 -2
- package/es/domain/interfaces/index.js +2 -2
- package/es/domain/interfaces/repositories/agents/IAgentRepository.js +3 -3
- package/es/domain/interfaces/repositories/agents/index.js +1 -1
- package/es/domain/interfaces/repositories/bots/IBotRepository.js +3 -3
- package/es/domain/interfaces/repositories/bots/index.js +1 -1
- package/es/domain/interfaces/repositories/channels/IChannelAgentRepository.js +3 -3
- package/es/domain/interfaces/repositories/channels/IChannelRepository.js +3 -3
- package/es/domain/interfaces/repositories/channels/index.js +2 -2
- package/es/domain/interfaces/repositories/contacts/IContactRepository.js +3 -3
- package/es/domain/interfaces/repositories/contacts/index.js +1 -1
- package/es/domain/interfaces/repositories/index.js +6 -6
- package/es/domain/interfaces/repositories/messages/IMessageRepository.js +3 -3
- package/es/domain/interfaces/repositories/messages/index.js +1 -1
- package/es/domain/interfaces/repositories/sessions/ISessionRepository.js +3 -3
- package/es/domain/interfaces/repositories/sessions/index.js +1 -1
- package/es/domain/schema/actor/ActorSchema.js +1 -1
- package/es/domain/schema/actor/AgentSchema.js +1 -1
- package/es/domain/schema/actor/index.js +2 -2
- package/es/domain/schema/attachment/AttachmentSchema.js +1 -1
- package/es/domain/schema/attachment/index.js +1 -1
- package/es/domain/schema/bot/BotSchema.js +1 -1
- package/es/domain/schema/bot/index.js +1 -1
- package/es/domain/schema/channel/ChannelSchema.js +1 -1
- package/es/domain/schema/channel/index.js +1 -1
- package/es/domain/schema/contact/index.js +1 -1
- package/es/domain/schema/index.js +8 -8
- package/es/domain/schema/integrationService/IntegrationServiceSchema.js +1 -1
- package/es/domain/schema/integrationService/index.js +1 -1
- package/es/domain/schema/message/ActionSchema.js +1 -1
- package/es/domain/schema/message/ExternalInfoSchema.js +1 -1
- package/es/domain/schema/message/InfoSchema.js +2 -2
- package/es/domain/schema/message/MessageSchema.js +7 -7
- package/es/domain/schema/message/MessageWithSessionSchema.js +2 -2
- package/es/domain/schema/message/index.js +6 -6
- package/es/domain/schema/session/SessionSchema.js +2 -2
- package/es/domain/schema/session/index.js +1 -1
- package/es/frameworks/managers/ModuleFactory.js +7 -7
- package/es/frameworks/managers/ModuleManager.js +2 -2
- package/es/frameworks/managers/index.js +1 -1
- package/es/frameworks/sdk/IMSDK.js +3 -3
- package/es/frameworks/sdk/agents/AgentSDK.js +2 -2
- package/es/frameworks/sdk/agents/index.js +1 -1
- package/es/frameworks/sdk/bots/BotSDK.js +2 -2
- package/es/frameworks/sdk/bots/index.js +1 -1
- package/es/frameworks/sdk/channels/ChannelSDK.js +2 -2
- package/es/frameworks/sdk/channels/index.js +1 -1
- package/es/frameworks/sdk/contacts/ContactSDK.js +2 -2
- package/es/frameworks/sdk/contacts/index.js +1 -1
- package/es/frameworks/sdk/index.js +1 -1
- package/es/frameworks/sdk/messages/MessageSDK.js +2 -2
- package/es/frameworks/sdk/messages/index.js +1 -1
- package/es/frameworks/sdk/sessions/SessionSDK.js +2 -2
- package/es/frameworks/sdk/sessions/index.js +1 -1
- package/es/index.js +8 -8
- package/es/infrastructure/adapters/agents/AgentAdapter.js +4 -4
- package/es/infrastructure/adapters/agents/index.js +1 -1
- package/es/infrastructure/adapters/attachments/AttachmentAdapter.js +3 -3
- package/es/infrastructure/adapters/attachments/index.js +1 -1
- package/es/infrastructure/adapters/bots/BotAdapter.js +3 -3
- package/es/infrastructure/adapters/bots/index.js +1 -1
- package/es/infrastructure/adapters/channels/ChannelAdapter.js +3 -3
- package/es/infrastructure/adapters/channels/ChannelAgentAdapter.js +3 -3
- package/es/infrastructure/adapters/channels/index.js +2 -2
- package/es/infrastructure/adapters/contacts/ContactAdapter.js +3 -3
- package/es/infrastructure/adapters/contacts/index.js +1 -1
- package/es/infrastructure/adapters/index.js +7 -7
- package/es/infrastructure/adapters/messages/MessageAdapter.js +3 -3
- package/es/infrastructure/adapters/messages/MessageWithSessionAdapter.js +4 -4
- package/es/infrastructure/adapters/messages/index.js +1 -1
- package/es/infrastructure/adapters/sessions/SessionAdapter.js +3 -3
- package/es/infrastructure/adapters/sessions/index.js +1 -1
- package/es/infrastructure/api/BaseAPI.js +4 -4
- package/es/infrastructure/api/agents/AgentAPI.js +2 -2
- package/es/infrastructure/api/agents/index.js +1 -1
- package/es/infrastructure/api/bots/BotAPI.js +2 -2
- package/es/infrastructure/api/bots/index.js +1 -1
- package/es/infrastructure/api/channels/ChannelAPI.js +2 -2
- package/es/infrastructure/api/channels/ChannelAgentAPI.js +2 -2
- package/es/infrastructure/api/channels/index.js +2 -2
- package/es/infrastructure/api/contacts/ContactAPI.js +2 -2
- package/es/infrastructure/api/contacts/index.js +1 -1
- package/es/infrastructure/api/index.js +6 -6
- package/es/infrastructure/api/messages/MessageAPI.js +2 -2
- package/es/infrastructure/api/messages/index.js +1 -1
- package/es/infrastructure/api/registry/agents/agentAPIRegistry.js +4 -4
- package/es/infrastructure/api/registry/agents/constructAgentEndPoint.js +1 -1
- package/es/infrastructure/api/registry/agents/index.js +1 -1
- package/es/infrastructure/api/registry/bots/botAPIRegistry.js +4 -4
- package/es/infrastructure/api/registry/bots/constructBotEndPoint.js +1 -1
- package/es/infrastructure/api/registry/bots/index.js +1 -1
- package/es/infrastructure/api/registry/channels/channelAPIRegistry.js +5 -5
- package/es/infrastructure/api/registry/channels/channelAgentAPIRegistry.js +4 -4
- package/es/infrastructure/api/registry/channels/constructChannelEndPoint.js +1 -1
- package/es/infrastructure/api/registry/channels/index.js +1 -1
- package/es/infrastructure/api/registry/contacts/constructContactEndPoint.js +1 -1
- package/es/infrastructure/api/registry/contacts/contactAPIRegistry.js +4 -4
- package/es/infrastructure/api/registry/contacts/index.js +1 -1
- package/es/infrastructure/api/registry/getRegistryConfig.js +7 -7
- package/es/infrastructure/api/registry/index.js +1 -1
- package/es/infrastructure/api/registry/messages/constructMessageEndPoint.js +1 -1
- package/es/infrastructure/api/registry/messages/index.js +1 -1
- package/es/infrastructure/api/registry/messages/messageAPIRegistry.js +6 -6
- package/es/infrastructure/api/registry/sessions/constructSessionEndPoint.js +1 -1
- package/es/infrastructure/api/registry/sessions/index.js +1 -1
- package/es/infrastructure/api/registry/sessions/sessionAPIRegistry.js +5 -5
- package/es/infrastructure/api/sessions/SessionAPI.js +2 -2
- package/es/infrastructure/api/sessions/index.js +1 -1
- package/es/infrastructure/config/index.js +1 -1
- package/es/infrastructure/repositories/agents/AgentRepository.js +4 -4
- package/es/infrastructure/repositories/agents/index.js +1 -1
- package/es/infrastructure/repositories/bots/BotRepository.js +4 -4
- package/es/infrastructure/repositories/bots/index.js +1 -1
- package/es/infrastructure/repositories/channels/ChannelAgentRepository.js +4 -4
- package/es/infrastructure/repositories/channels/ChannelRepository.js +4 -4
- package/es/infrastructure/repositories/channels/index.js +2 -2
- package/es/infrastructure/repositories/contacts/ContactRepository.js +4 -4
- package/es/infrastructure/repositories/contacts/index.js +1 -1
- package/es/infrastructure/repositories/index.js +6 -6
- package/es/infrastructure/repositories/messages/MessageRepository.js +5 -5
- package/es/infrastructure/repositories/messages/index.js +1 -1
- package/es/infrastructure/repositories/sessions/SessionRepository.js +4 -4
- package/es/infrastructure/repositories/sessions/index.js +1 -1
- package/package.json +5 -4
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import AgentService from
|
|
1
|
+
import AgentService from './AgentService';
|
|
2
2
|
export { AgentService };
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import BotService from
|
|
1
|
+
import BotService from './BotService';
|
|
2
2
|
export { BotService };
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { IChannelAgentRepository } from
|
|
1
|
+
import { IChannelAgentRepository } from '../../../domain/interfaces/repositories';
|
|
2
2
|
export default class ChannelAgentService extends IChannelAgentRepository {
|
|
3
3
|
constructor(_ref) {
|
|
4
4
|
let {
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
import ChannelAgentService from
|
|
2
|
-
import ChannelService from
|
|
1
|
+
import ChannelAgentService from './ChannelAgentService';
|
|
2
|
+
import ChannelService from './ChannelService';
|
|
3
3
|
export { ChannelService, ChannelAgentService };
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import ContactService from
|
|
1
|
+
import ContactService from './ContactService';
|
|
2
2
|
export { ContactService };
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
export * from
|
|
2
|
-
export * from
|
|
3
|
-
export * from
|
|
4
|
-
export * from
|
|
5
|
-
export * from
|
|
6
|
-
export * from
|
|
1
|
+
export * from './channels';
|
|
2
|
+
export * from './sessions';
|
|
3
|
+
export * from './bots';
|
|
4
|
+
export * from './messages';
|
|
5
|
+
export * from './agents';
|
|
6
|
+
export * from './contacts';
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import MessageService from
|
|
1
|
+
import MessageService from './MessageService';
|
|
2
2
|
export { MessageService };
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import SessionService from
|
|
1
|
+
import SessionService from './SessionService';
|
|
2
2
|
export { SessionService };
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { HttpMethods } from '@zohoim/http-client';
|
|
2
|
-
import ModuleNames from
|
|
3
|
-
import ResponseTypes from
|
|
2
|
+
import ModuleNames from './ModuleNames';
|
|
3
|
+
import ResponseTypes from './ResponseTypes';
|
|
4
4
|
const IM_API_PREFIX = '/api/v1';
|
|
5
5
|
const HTTP_METHODS = HttpMethods;
|
|
6
6
|
export { ModuleNames, IM_API_PREFIX, HTTP_METHODS, ResponseTypes };
|
package/es/core/errors/index.js
CHANGED
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
import AdapterError from
|
|
2
|
-
import ValidationError from
|
|
1
|
+
import AdapterError from './AdapterError';
|
|
2
|
+
import ValidationError from './ValidationError';
|
|
3
3
|
export { ValidationError, AdapterError };
|
package/es/core/utils/index.js
CHANGED
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
import ResponseUtils from
|
|
2
|
-
import { validateSchema } from
|
|
1
|
+
import ResponseUtils from './ResponseUtils';
|
|
2
|
+
import { validateSchema } from './validateSchema';
|
|
3
3
|
export { validateSchema, ResponseUtils };
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { ValidationError } from
|
|
1
|
+
import { ValidationError } from '../errors'; // function validateSchemaKeys(schema, data) {
|
|
2
2
|
// Object.keys(schema).forEach((key) => {
|
|
3
3
|
// if (!(key in data)) {
|
|
4
4
|
// throw new ValidationError(`Key '${key}' is missing in the data`);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export { default as getAgentsRequest } from
|
|
1
|
+
export { default as getAgentsRequest } from './getAgentsRequest';
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export { default as getBotsRequest } from
|
|
2
|
-
export { default as getBotRequest } from
|
|
1
|
+
export { default as getBotsRequest } from './getBotsRequest';
|
|
2
|
+
export { default as getBotRequest } from './getBotRequest';
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export { default as getChannelAgentsRequest } from
|
|
1
|
+
export { default as getChannelAgentsRequest } from './getChannelAgentsRequest';
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
import getChannelsRequest from
|
|
2
|
-
export * from
|
|
1
|
+
import getChannelsRequest from './getChannelsRequest';
|
|
2
|
+
export * from './agents';
|
|
3
3
|
export { getChannelsRequest };
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export { default as getContactsRequest } from
|
|
1
|
+
export { default as getContactsRequest } from './getContactsRequest';
|
package/es/domain/dto/index.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
export * from
|
|
2
|
-
export * from
|
|
3
|
-
export * from
|
|
4
|
-
export * from
|
|
5
|
-
export * from
|
|
6
|
-
export * from
|
|
1
|
+
export * from './channels';
|
|
2
|
+
export * from './sessions';
|
|
3
|
+
export * from './bots';
|
|
4
|
+
export * from './messages';
|
|
5
|
+
export * from './agents';
|
|
6
|
+
export * from './contacts';
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
export { default as getMessagesRequest } from
|
|
2
|
-
export { default as deleteMessageRequest } from
|
|
3
|
-
export { default as getFullContentRequest } from
|
|
4
|
-
export { default as resendMessageRequest } from
|
|
5
|
-
export { default as sendAttachmentRequest } from
|
|
6
|
-
export { default as sendMessageRequest } from
|
|
7
|
-
export { default as initiateSessionRequest } from
|
|
8
|
-
export { default as searchMessagesRequest } from
|
|
1
|
+
export { default as getMessagesRequest } from './getMessagesRequest';
|
|
2
|
+
export { default as deleteMessageRequest } from './deleteMessageRequest';
|
|
3
|
+
export { default as getFullContentRequest } from './getFullContentRequest';
|
|
4
|
+
export { default as resendMessageRequest } from './resendMessageRequest';
|
|
5
|
+
export { default as sendAttachmentRequest } from './sendAttachmentRequest';
|
|
6
|
+
export { default as sendMessageRequest } from './sendMessageRequest';
|
|
7
|
+
export { default as initiateSessionRequest } from './initiateSessionRequest';
|
|
8
|
+
export { default as searchMessagesRequest } from './searchMessagesRequest';
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
export { default as updateSessionAssigneeRequest } from
|
|
2
|
-
export { default as getSessionsRequest } from
|
|
3
|
-
export { default as getSessionRequest } from
|
|
4
|
-
export { default as getSessionAttachmentsRequest } from
|
|
5
|
-
export { default as getSessionLastMessagesRequest } from
|
|
6
|
-
export { default as markSessionAsReadRequest } from
|
|
7
|
-
export { default as updateSessionStatusRequest } from
|
|
8
|
-
export { default as pickupSessionRequest } from
|
|
1
|
+
export { default as updateSessionAssigneeRequest } from './updateSessionAssigneeRequest';
|
|
2
|
+
export { default as getSessionsRequest } from './getSessionsRequest';
|
|
3
|
+
export { default as getSessionRequest } from './getSessionRequest';
|
|
4
|
+
export { default as getSessionAttachmentsRequest } from './getSessionAttachmentsRequest';
|
|
5
|
+
export { default as getSessionLastMessagesRequest } from './getSessionLastMessagesRequest';
|
|
6
|
+
export { default as markSessionAsReadRequest } from './markSessionAsReadRequest';
|
|
7
|
+
export { default as updateSessionStatusRequest } from './updateSessionStatusRequest';
|
|
8
|
+
export { default as pickupSessionRequest } from './pickupSessionRequest';
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { validateSchema } from
|
|
2
|
-
import { ActorType } from
|
|
3
|
-
import { ActorSchema } from
|
|
1
|
+
import { validateSchema } from '../../../core/utils';
|
|
2
|
+
import { ActorType } from '../../enum';
|
|
3
|
+
import { ActorSchema } from '../../schema';
|
|
4
4
|
export default class Actor {
|
|
5
5
|
constructor() {
|
|
6
6
|
let data = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import Actor from
|
|
1
|
+
import Actor from './Actor';
|
|
2
2
|
export { Actor };
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { validateSchema } from
|
|
2
|
-
import { AgentSchema } from
|
|
1
|
+
import { validateSchema } from '../../../core/utils';
|
|
2
|
+
import { AgentSchema } from '../../schema';
|
|
3
3
|
export default class Agent {
|
|
4
4
|
constructor() {
|
|
5
5
|
let data = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import Agent from
|
|
1
|
+
import Agent from './Agent';
|
|
2
2
|
export { Agent };
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { validateSchema } from
|
|
2
|
-
import { AttachmentSchema } from
|
|
1
|
+
import { validateSchema } from '../../../core/utils';
|
|
2
|
+
import { AttachmentSchema } from '../../schema';
|
|
3
3
|
export default class Attachment {
|
|
4
4
|
constructor() {
|
|
5
5
|
let data = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import Attachment from
|
|
1
|
+
import Attachment from './Attachment';
|
|
2
2
|
export { Attachment };
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { validateSchema } from
|
|
2
|
-
import { BotSchema } from
|
|
1
|
+
import { validateSchema } from '../../../core/utils';
|
|
2
|
+
import { BotSchema } from '../../schema';
|
|
3
3
|
export default class Bot {
|
|
4
4
|
constructor() {
|
|
5
5
|
let data = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import Bot from
|
|
1
|
+
import Bot from './Bot';
|
|
2
2
|
export { Bot };
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { validateSchema } from
|
|
2
|
-
import { ChannelSchema } from
|
|
1
|
+
import { validateSchema } from '../../../core/utils';
|
|
2
|
+
import { ChannelSchema } from '../../schema';
|
|
3
3
|
export default class Channel {
|
|
4
4
|
constructor() {
|
|
5
5
|
let data = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import Channel from
|
|
1
|
+
import Channel from './Channel';
|
|
2
2
|
export { Channel };
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { validateSchema } from
|
|
2
|
-
import { ContactSchema } from
|
|
1
|
+
import { validateSchema } from '../../../core/utils';
|
|
2
|
+
import { ContactSchema } from '../../schema';
|
|
3
3
|
export default class Contact {
|
|
4
4
|
constructor() {
|
|
5
5
|
let data = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import Contact from
|
|
1
|
+
import Contact from './Contact';
|
|
2
2
|
export { Contact };
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { validateSchema } from
|
|
2
|
-
import { IntegrationServices } from
|
|
3
|
-
import { IntegrationServiceSchema } from
|
|
1
|
+
import { validateSchema } from '../../../core/utils';
|
|
2
|
+
import { IntegrationServices } from '../../enum';
|
|
3
|
+
import { IntegrationServiceSchema } from '../../schema';
|
|
4
4
|
export default class IntegrationService {
|
|
5
5
|
constructor() {
|
|
6
6
|
let data = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import IntegrationService from
|
|
1
|
+
import IntegrationService from './IntegrationService';
|
|
2
2
|
export { IntegrationService };
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { validateSchema } from
|
|
2
|
-
import { ActionType } from
|
|
3
|
-
import { ActionSchema } from
|
|
1
|
+
import { validateSchema } from '../../../core/utils';
|
|
2
|
+
import { ActionType } from '../../enum';
|
|
3
|
+
import { ActionSchema } from '../../schema';
|
|
4
4
|
export default class Action {
|
|
5
5
|
constructor() {
|
|
6
6
|
let data = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { validateSchema } from
|
|
2
|
-
import { ExternalInfoSchema } from
|
|
1
|
+
import { validateSchema } from '../../../core/utils';
|
|
2
|
+
import { ExternalInfoSchema } from '../../schema';
|
|
3
3
|
export default class ExternalInfo {
|
|
4
4
|
constructor() {
|
|
5
5
|
let data = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { validateSchema } from
|
|
2
|
-
import { Actor } from
|
|
3
|
-
import { InfoSchema } from
|
|
4
|
-
import { InfoAction } from
|
|
1
|
+
import { validateSchema } from '../../../core/utils';
|
|
2
|
+
import { Actor } from '../Actor';
|
|
3
|
+
import { InfoSchema } from '../../schema/message';
|
|
4
|
+
import { InfoAction } from '../../enum';
|
|
5
5
|
export default class Info {
|
|
6
6
|
constructor() {
|
|
7
7
|
let data = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { validateSchema } from
|
|
2
|
-
import { LocationSchema } from
|
|
1
|
+
import { validateSchema } from '../../../core/utils';
|
|
2
|
+
import { LocationSchema } from '../../schema';
|
|
3
3
|
export default class Location {
|
|
4
4
|
constructor() {
|
|
5
5
|
let data = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
|
|
@@ -1,12 +1,12 @@
|
|
|
1
|
-
import { validateSchema } from
|
|
2
|
-
import { MessageDirection, MessageStatus, MessageTypes } from
|
|
3
|
-
import { MessageSchema } from
|
|
4
|
-
import { Actor } from
|
|
5
|
-
import { Attachment } from
|
|
6
|
-
import Action from
|
|
7
|
-
import ExternalInfo from
|
|
8
|
-
import Info from
|
|
9
|
-
import Location from
|
|
1
|
+
import { validateSchema } from '../../../core/utils';
|
|
2
|
+
import { MessageDirection, MessageStatus, MessageTypes } from '../../enum';
|
|
3
|
+
import { MessageSchema } from '../../schema';
|
|
4
|
+
import { Actor } from '../Actor';
|
|
5
|
+
import { Attachment } from '../Attachment';
|
|
6
|
+
import Action from './Action';
|
|
7
|
+
import ExternalInfo from './ExternalInfo';
|
|
8
|
+
import Info from './Info';
|
|
9
|
+
import Location from './Location';
|
|
10
10
|
export default class Message {
|
|
11
11
|
constructor() {
|
|
12
12
|
let data = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
|
|
@@ -70,6 +70,13 @@ export default class Message {
|
|
|
70
70
|
return !!systemMsgType;
|
|
71
71
|
}
|
|
72
72
|
|
|
73
|
+
static getMetaValue() {
|
|
74
|
+
let meta = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : [];
|
|
75
|
+
let key = arguments.length > 1 ? arguments[1] : undefined;
|
|
76
|
+
const item = (meta || []).find(item => item.name === key);
|
|
77
|
+
return item ? item.value : '';
|
|
78
|
+
}
|
|
79
|
+
|
|
73
80
|
toJSON() {
|
|
74
81
|
return { ...this.data
|
|
75
82
|
};
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { validateSchema } from
|
|
2
|
-
import { MessageWithSessionSchema } from
|
|
3
|
-
import { Session } from
|
|
4
|
-
import Message from
|
|
1
|
+
import { validateSchema } from '../../../core/utils';
|
|
2
|
+
import { MessageWithSessionSchema } from '../../schema';
|
|
3
|
+
import { Session } from '../Session';
|
|
4
|
+
import Message from './Message';
|
|
5
5
|
export default class MessageWithSession {
|
|
6
6
|
constructor() {
|
|
7
7
|
let data = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
export { default as Message } from
|
|
2
|
-
export { default as Info } from
|
|
3
|
-
export { default as Action } from
|
|
4
|
-
export { default as ExternalInfo } from
|
|
5
|
-
export { default as Location } from
|
|
6
|
-
export { default as MessageWithSession } from
|
|
1
|
+
export { default as Message } from './Message';
|
|
2
|
+
export { default as Info } from './Info';
|
|
3
|
+
export { default as Action } from './Action';
|
|
4
|
+
export { default as ExternalInfo } from './ExternalInfo';
|
|
5
|
+
export { default as Location } from './Location';
|
|
6
|
+
export { default as MessageWithSession } from './MessageWithSession';
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { validateSchema } from
|
|
2
|
-
import { SessionSchema } from
|
|
3
|
-
import { Actor } from
|
|
4
|
-
import { SessionReplyStatus, SessionStatus } from
|
|
1
|
+
import { validateSchema } from '../../../core/utils';
|
|
2
|
+
import { SessionSchema } from '../../schema';
|
|
3
|
+
import { Actor } from '../Actor';
|
|
4
|
+
import { SessionReplyStatus, SessionStatus } from '../../enum';
|
|
5
5
|
export default class Session {
|
|
6
6
|
constructor() {
|
|
7
7
|
let data = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
|