@zohoim/client-sdk 1.0.0-replyAreaPoc9 → 1.0.0-rightPanelSessionInfo-2
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/calls/CallService.js +36 -0
- package/es/application/services/calls/index.js +1 -0
- package/es/application/services/cannedMessages/CannedMessageService.js +21 -1
- package/es/application/services/channels/ChannelService.js +6 -1
- package/es/application/services/contacts/ContactService.js +6 -1
- package/es/application/services/index.js +6 -1
- 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/subscription/SubscriptionService.js +36 -0
- package/es/application/services/subscription/index.js +2 -0
- package/es/application/services/templateMessages/TemplateMessageService.js +6 -1
- package/es/application/services/userPreferences/UserPreferenceService.js +26 -0
- package/es/application/services/userPreferences/index.js +2 -0
- package/es/application/services/whatsAppPricing/WhatsAppPricingService.js +21 -0
- package/es/application/services/whatsAppPricing/index.js +2 -0
- package/es/core/constants/ModuleNames.js +6 -1
- package/es/core/constants/ModuleTypes.js +5 -0
- package/es/core/constants/index.js +2 -1
- package/es/core/utils/validateSchema.js +27 -2
- package/es/domain/dto/calls/getCallRequest.js +14 -0
- package/es/domain/dto/calls/getCallsRequest.js +20 -0
- package/es/domain/dto/calls/index.js +4 -0
- package/es/domain/dto/calls/initiateCallRequest.js +15 -0
- package/es/domain/dto/calls/updateCallStatusRequest.js +15 -0
- package/es/domain/dto/cannedMessages/addTranslationRequest.js +19 -0
- package/es/domain/dto/cannedMessages/deleteTranslationRequest.js +14 -0
- package/es/domain/dto/cannedMessages/getCannedPlaceholdersRequest.js +7 -0
- package/es/domain/dto/cannedMessages/index.js +5 -1
- package/es/domain/dto/cannedMessages/updateTranslationRequest.js +20 -0
- 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/contacts/getContactRequest.js +13 -0
- package/es/domain/dto/contacts/index.js +2 -1
- package/es/domain/dto/index.js +6 -1
- package/es/domain/dto/integrationServices/getIntegrationsRequest.js +7 -0
- package/es/domain/dto/integrationServices/index.js +1 -0
- package/es/domain/dto/sessions/getSessionAttachmentsRequest.js +6 -1
- package/es/domain/dto/sessions/getSessionMetricsRequest.js +16 -0
- package/es/domain/dto/sessions/index.js +2 -1
- package/es/domain/dto/subscription/buyAddOnRequest.js +18 -0
- package/es/domain/dto/subscription/getAddOnsRequest.js +15 -0
- package/es/domain/dto/subscription/getLicenseDetailsRequest.js +7 -0
- package/es/domain/dto/subscription/index.js +4 -0
- package/es/domain/dto/subscription/modifyAddOnRequest.js +18 -0
- package/es/domain/dto/templateMessages/getTemplateCreditExhaustStatusRequest.js +3 -2
- package/es/domain/dto/templateMessages/getTemplateTagsRequest.js +7 -0
- package/es/domain/dto/templateMessages/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/dto/whatsAppPricing/calculateWhatsAppPricingRequest.js +14 -0
- package/es/domain/dto/whatsAppPricing/index.js +1 -0
- package/es/domain/entities/Actor/Actor.js +4 -0
- package/es/domain/entities/Call/Call.js +47 -0
- package/es/domain/entities/Call/index.js +1 -0
- package/es/domain/entities/CannedMessage/CannedMessage.js +34 -6
- package/es/domain/entities/CannedMessage/Translation.js +48 -0
- package/es/domain/entities/CannedMessage/index.js +2 -1
- package/es/domain/entities/Channel/Channel.js +22 -4
- package/es/domain/entities/Contact/Contact.js +4 -1
- package/es/domain/entities/IntegrationService/IntegrationService.js +8 -1
- package/es/domain/entities/Placeholder/Placeholder.js +24 -0
- package/es/domain/entities/Placeholder/index.js +2 -0
- package/es/domain/entities/Session/SessionMetrics.js +21 -0
- package/es/domain/entities/Session/index.js +2 -1
- package/es/domain/entities/Subscription/AddOn.js +26 -0
- package/es/domain/entities/Subscription/LicenseDetails.js +21 -0
- package/es/domain/entities/Subscription/SubscriptionInfo.js +26 -0
- package/es/domain/entities/Subscription/index.js +4 -0
- package/es/domain/entities/TemplateMessage/TemplateItemButton.js +48 -0
- package/es/domain/entities/TemplateMessage/TemplateItemFooter.js +27 -0
- package/es/domain/entities/TemplateMessage/TemplateItemHeader.js +48 -0
- package/es/domain/entities/TemplateMessage/TemplateTags.js +21 -0
- package/es/domain/entities/TemplateMessage/index.js +5 -1
- package/es/domain/entities/UserPreference/UserPreference.js +26 -0
- package/es/domain/entities/UserPreference/index.js +2 -0
- package/es/domain/entities/WhatsAppPricing/WhatsAppPricing.js +25 -0
- package/es/domain/entities/WhatsAppPricing/WhatsAppPricingCategory.js +22 -0
- package/es/domain/entities/WhatsAppPricing/index.js +3 -0
- package/es/domain/entities/index.js +6 -1
- package/es/domain/enum/call/CallStatus.js +8 -0
- package/es/domain/enum/call/index.js +1 -0
- package/es/domain/enum/cannedMessage/CannedMessageStatus.js +11 -1
- package/es/domain/enum/cannedMessage/CannedMessageType.js +3 -1
- package/es/domain/enum/cannedMessage/TemplateItemButtonType.js +7 -1
- package/es/domain/enum/cannedMessage/TemplateItemHeaderType.js +3 -1
- package/es/domain/enum/index.js +4 -1
- package/es/domain/enum/message/InfoAction.js +4 -1
- package/es/domain/enum/session/AssigneeFilter.js +6 -0
- package/es/domain/enum/session/SessionReplyStatus.js +4 -1
- package/es/domain/enum/session/SessionStatus.js +2 -1
- package/es/domain/enum/session/index.js +2 -1
- package/es/domain/enum/subscription/AddOnModule.js +5 -0
- package/es/domain/enum/subscription/AddOnName.js +5 -0
- package/es/domain/enum/subscription/AddOnType.js +5 -0
- package/es/domain/enum/subscription/SubscriptionStatus.js +4 -0
- package/es/domain/enum/subscription/index.js +5 -0
- package/es/domain/enum/userPreference/CollapseSidePanel.js +5 -0
- package/es/domain/enum/userPreference/index.js +2 -0
- package/es/domain/interfaces/repositories/calls/ICallRepository.js +32 -0
- package/es/domain/interfaces/repositories/calls/index.js +1 -0
- package/es/domain/interfaces/repositories/cannedMessages/ICannedMessageRepository.js +21 -1
- package/es/domain/interfaces/repositories/channels/IChannelRepository.js +7 -1
- package/es/domain/interfaces/repositories/contacts/IContactRepository.js +7 -1
- package/es/domain/interfaces/repositories/index.js +6 -1
- 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/subscription/ISubscriptionRepository.js +32 -0
- package/es/domain/interfaces/repositories/subscription/index.js +2 -0
- package/es/domain/interfaces/repositories/templateMessages/ITemplateMessageRepository.js +7 -1
- package/es/domain/interfaces/repositories/userPreferences/IUserPreferenceRepository.js +23 -0
- package/es/domain/interfaces/repositories/userPreferences/index.js +2 -0
- package/es/domain/interfaces/repositories/whatsAppPricing/IWhatsAppPricingRepository.js +18 -0
- package/es/domain/interfaces/repositories/whatsAppPricing/index.js +2 -0
- package/es/domain/schema/call/CallSchema.js +63 -0
- package/es/domain/schema/call/index.js +1 -0
- package/es/domain/schema/cannedMessage/CannedMessageSchema.js +12 -0
- package/es/domain/schema/cannedMessage/TemplateItem/TemplateItemButtonsSchema.js +1 -1
- package/es/domain/schema/cannedMessage/TranslationsSchema.js +2 -2
- package/es/domain/schema/cannedMessage/index.js +3 -1
- package/es/domain/schema/channel/ChannelSchema.js +39 -5
- package/es/domain/schema/contact/ContactSchema.js +12 -0
- package/es/domain/schema/index.js +6 -1
- package/es/domain/schema/integrationService/IntegrationServiceSchema.js +12 -0
- package/es/domain/schema/placeholder/PlaceholderSchema.js +19 -0
- package/es/domain/schema/placeholder/index.js +2 -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/subscription/AddOnSchema.js +29 -0
- package/es/domain/schema/subscription/LicenseDetailsSchema.js +7 -0
- package/es/domain/schema/subscription/SubscriptionInfoSchema.js +29 -0
- package/es/domain/schema/subscription/index.js +4 -0
- package/es/domain/schema/templateMessage/TemplateTagsSchema.js +7 -0
- package/es/domain/schema/templateMessage/index.js +2 -1
- package/es/domain/schema/userPreference/UserPreferenceSchema.js +9 -0
- package/es/domain/schema/userPreference/index.js +2 -0
- package/es/domain/schema/whatsAppPricing/WhatsAppPricingCategorySchema.js +11 -0
- package/es/domain/schema/whatsAppPricing/WhatsAppPricingSchema.js +21 -0
- package/es/domain/schema/whatsAppPricing/index.js +3 -0
- package/es/frameworks/managers/ModuleFactory.js +95 -24
- package/es/frameworks/managers/ModuleManager.js +25 -2
- package/es/frameworks/sdk/IMSDK.js +38 -11
- package/es/frameworks/sdk/calls/CallSDK.js +27 -0
- package/es/frameworks/sdk/calls/index.js +1 -0
- package/es/frameworks/sdk/integrationServices/IntegrationServiceSDK.js +30 -0
- package/es/frameworks/sdk/integrationServices/index.js +2 -0
- package/es/frameworks/sdk/subscription/SubscriptionSDK.js +32 -0
- package/es/frameworks/sdk/subscription/index.js +2 -0
- package/es/frameworks/sdk/userPreferences/UserPreferencesSDK.js +30 -0
- package/es/frameworks/sdk/userPreferences/index.js +2 -0
- package/es/frameworks/sdk/whatsAppPricing/WhatsAppPricingSDK.js +28 -0
- package/es/frameworks/sdk/whatsAppPricing/index.js +2 -0
- package/es/infrastructure/adapters/calls/CallAdapter.js +31 -0
- package/es/infrastructure/adapters/calls/index.js +1 -0
- package/es/infrastructure/adapters/cannedMessages/CannedMessageAdapter.js +3 -1
- package/es/infrastructure/adapters/cannedMessages/TranslationAdapter.js +27 -0
- package/es/infrastructure/adapters/cannedMessages/index.js +2 -1
- package/es/infrastructure/adapters/channels/ChannelAdapter.js +16 -2
- package/es/infrastructure/adapters/contacts/ContactAdapter.js +4 -1
- package/es/infrastructure/adapters/index.js +7 -1
- package/es/infrastructure/adapters/integrationServices/IntegrationServiceAdapter.js +25 -0
- package/es/infrastructure/adapters/integrationServices/index.js +2 -0
- package/es/infrastructure/adapters/placeholders/PlaceholderAdapter.js +22 -0
- package/es/infrastructure/adapters/placeholders/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/subscription/AddOnAdapter.js +24 -0
- package/es/infrastructure/adapters/subscription/LicenseDetailsAdapter.js +20 -0
- package/es/infrastructure/adapters/subscription/index.js +3 -0
- package/es/infrastructure/adapters/templateMessages/TemplateTagsAdapter.js +21 -0
- package/es/infrastructure/adapters/templateMessages/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/adapters/whatsAppPricing/WhatsAppPricingAdapter.js +22 -0
- package/es/infrastructure/adapters/whatsAppPricing/index.js +2 -0
- package/es/infrastructure/api/BaseAPI.js +5 -4
- package/es/infrastructure/api/calls/CallAPI.js +44 -0
- package/es/infrastructure/api/calls/index.js +1 -0
- package/es/infrastructure/api/cannedMessages/CannedMessageAPI.js +41 -1
- package/es/infrastructure/api/channels/ChannelAPI.js +11 -1
- package/es/infrastructure/api/contacts/ContactAPI.js +11 -1
- package/es/infrastructure/api/index.js +6 -1
- package/es/infrastructure/api/integrationServices/IntegrationServiceAPI.js +14 -0
- package/es/infrastructure/api/integrationServices/index.js +2 -0
- package/es/infrastructure/api/registry/calls/callAPIRegistry.js +29 -0
- package/es/infrastructure/api/registry/calls/constructCallEndPoint.js +10 -0
- package/es/infrastructure/api/registry/calls/index.js +1 -0
- package/es/infrastructure/api/registry/cannedMessages/cannedMessageAPIRegistry.js +22 -2
- package/es/infrastructure/api/registry/channels/channelAPIRegistry.js +7 -1
- package/es/infrastructure/api/registry/channels/channelAgentAPIRegistry.js +1 -1
- package/es/infrastructure/api/registry/contacts/contactAPIRegistry.js +8 -2
- package/es/infrastructure/api/registry/createPublicBaseUrl.js +4 -0
- package/es/infrastructure/api/registry/getRegistryConfig.js +11 -1
- 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 +9 -3
- package/es/infrastructure/api/registry/subscription/constructSubscriptionEndPoint.js +10 -0
- package/es/infrastructure/api/registry/subscription/index.js +2 -0
- package/es/infrastructure/api/registry/subscription/subscriptionAPIRegistry.js +30 -0
- package/es/infrastructure/api/registry/templateMessages/templateMessageAPIRegistry.js +7 -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/registry/whatsAppPricing/constructWhatsAppPricingEndPoint.js +10 -0
- package/es/infrastructure/api/registry/whatsAppPricing/index.js +2 -0
- package/es/infrastructure/api/registry/whatsAppPricing/whatsAppPricingAPIRegistry.js +13 -0
- package/es/infrastructure/api/sessions/SessionAPI.js +11 -1
- package/es/infrastructure/api/subscription/SubscriptionAPI.js +48 -0
- package/es/infrastructure/api/subscription/index.js +2 -0
- package/es/infrastructure/api/templateMessages/TemplateMessageAPI.js +11 -1
- package/es/infrastructure/api/userPreferences/UserPreferenceAPI.js +24 -0
- package/es/infrastructure/api/userPreferences/index.js +2 -0
- package/es/infrastructure/api/whatsAppPricing/WhatsAppPricingAPI.js +14 -0
- package/es/infrastructure/api/whatsAppPricing/index.js +2 -0
- package/es/infrastructure/config/configRegistry.js +8 -1
- package/es/infrastructure/repositories/calls/CallRepository.js +73 -0
- package/es/infrastructure/repositories/calls/index.js +1 -0
- package/es/infrastructure/repositories/cannedMessages/CannedMessageRepository.js +50 -7
- package/es/infrastructure/repositories/channels/ChannelRepository.js +10 -1
- package/es/infrastructure/repositories/contacts/ContactRepository.js +9 -1
- package/es/infrastructure/repositories/index.js +6 -1
- 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/subscription/SubscriptionRepository.js +83 -0
- package/es/infrastructure/repositories/subscription/index.js +2 -0
- package/es/infrastructure/repositories/templateMessages/TemplateMessageRepository.js +15 -3
- package/es/infrastructure/repositories/userPreferences/UserPreferenceRepository.js +58 -0
- package/es/infrastructure/repositories/userPreferences/index.js +2 -0
- package/es/infrastructure/repositories/whatsAppPricing/WhatsAppPricingRepository.js +49 -0
- package/es/infrastructure/repositories/whatsAppPricing/index.js +2 -0
- package/package.json +2 -2
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import { validateSchema } from '../../../core/utils';
|
|
2
|
+
import { TemplateTagsSchema } from '../../schema';
|
|
3
|
+
export default class TemplateTags {
|
|
4
|
+
constructor() {
|
|
5
|
+
let data = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
|
|
6
|
+
const validatedData = validateSchema({
|
|
7
|
+
schema: TemplateTagsSchema,
|
|
8
|
+
data,
|
|
9
|
+
entityName: 'TemplateTags'
|
|
10
|
+
});
|
|
11
|
+
this.data = {
|
|
12
|
+
tags: validatedData.tags
|
|
13
|
+
};
|
|
14
|
+
}
|
|
15
|
+
|
|
16
|
+
toJSON() {
|
|
17
|
+
return { ...this.data
|
|
18
|
+
};
|
|
19
|
+
}
|
|
20
|
+
|
|
21
|
+
}
|
|
@@ -1,3 +1,7 @@
|
|
|
1
1
|
import TemplateLanguage from './TemplateLanguage';
|
|
2
2
|
import TemplateCreditExhaustStatus from './TemplateCreditExhaustStatus';
|
|
3
|
-
|
|
3
|
+
import TemplateTags from './TemplateTags';
|
|
4
|
+
import TemplateItemButton from './TemplateItemButton';
|
|
5
|
+
import TemplateItemHeader from './TemplateItemHeader';
|
|
6
|
+
import TemplateItemFooter from './TemplateItemFooter';
|
|
7
|
+
export { TemplateLanguage, TemplateCreditExhaustStatus, TemplateTags, TemplateItemButton, TemplateItemHeader, TemplateItemFooter };
|
|
@@ -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
|
+
}
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
import { validateSchema } from '../../../core/utils';
|
|
2
|
+
import { WhatsAppPricingSchema } from '../../schema';
|
|
3
|
+
import WhatsAppPricingCategory from './WhatsAppPricingCategory';
|
|
4
|
+
export default class WhatsAppPricing {
|
|
5
|
+
constructor() {
|
|
6
|
+
let data = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
|
|
7
|
+
const validatedData = validateSchema({
|
|
8
|
+
schema: WhatsAppPricingSchema,
|
|
9
|
+
data,
|
|
10
|
+
entityName: 'WhatsAppPricing'
|
|
11
|
+
});
|
|
12
|
+
this.data = {
|
|
13
|
+
total: validatedData.total,
|
|
14
|
+
creditsCount: validatedData.creditsCount,
|
|
15
|
+
actutalCreditsAmount: validatedData.actutalCreditsAmount,
|
|
16
|
+
category: validatedData.category.map(item => new WhatsAppPricingCategory(item).toJSON())
|
|
17
|
+
};
|
|
18
|
+
}
|
|
19
|
+
|
|
20
|
+
toJSON() {
|
|
21
|
+
return { ...this.data
|
|
22
|
+
};
|
|
23
|
+
}
|
|
24
|
+
|
|
25
|
+
}
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
import { validateSchema } from '../../../core/utils';
|
|
2
|
+
import { WhatsAppPricingCategorySchema } from '../../schema';
|
|
3
|
+
export default class WhatsAppPricingCategory {
|
|
4
|
+
constructor() {
|
|
5
|
+
let data = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
|
|
6
|
+
const validatedData = validateSchema({
|
|
7
|
+
schema: WhatsAppPricingCategorySchema,
|
|
8
|
+
data,
|
|
9
|
+
entityName: 'WhatsAppPricingCategory'
|
|
10
|
+
});
|
|
11
|
+
this.data = {
|
|
12
|
+
type: validatedData.type,
|
|
13
|
+
value: validatedData.value
|
|
14
|
+
};
|
|
15
|
+
}
|
|
16
|
+
|
|
17
|
+
toJSON() {
|
|
18
|
+
return { ...this.data
|
|
19
|
+
};
|
|
20
|
+
}
|
|
21
|
+
|
|
22
|
+
}
|
|
@@ -9,4 +9,9 @@ export * from './Contact';
|
|
|
9
9
|
export * from './IntegrationService';
|
|
10
10
|
export * from './CannedMessage';
|
|
11
11
|
export * from './TemplateMessage';
|
|
12
|
-
export * from './CustomReplyExtension';
|
|
12
|
+
export * from './CustomReplyExtension';
|
|
13
|
+
export * from './Placeholder';
|
|
14
|
+
export * from './UserPreference';
|
|
15
|
+
export * from './WhatsAppPricing';
|
|
16
|
+
export * from './Call';
|
|
17
|
+
export * from './Subscription';
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { default as CallStatus } from './CallStatus';
|
|
@@ -2,6 +2,16 @@ const CannedMessageStatus = {
|
|
|
2
2
|
APPROVED: 'APPROVED',
|
|
3
3
|
PENDING: 'PENDING',
|
|
4
4
|
REJECTED: 'REJECTED',
|
|
5
|
-
FAILED: 'FAILED'
|
|
5
|
+
FAILED: 'FAILED',
|
|
6
|
+
DELETION_IN_PROGRESS: 'DELETION_IN_PROGRESS',
|
|
7
|
+
DELETION_FAILED: 'DELETION_FAILED',
|
|
8
|
+
PARTIALLY_APPROVED: 'PARTIALLY_APPROVED',
|
|
9
|
+
UNKNOWN: 'UNKNOWN',
|
|
10
|
+
IN_APPEAL: 'IN_APPEAL',
|
|
11
|
+
PENDING_DELETION: 'PENDING_DELETION',
|
|
12
|
+
DELETED: 'DELETED',
|
|
13
|
+
DISABLED: 'DISABLED',
|
|
14
|
+
PAUSED: 'PAUSED',
|
|
15
|
+
LIMIT_EXCEEDED: 'LIMIT_EXCEEDED'
|
|
6
16
|
};
|
|
7
17
|
export default CannedMessageStatus;
|
|
@@ -1,6 +1,12 @@
|
|
|
1
1
|
const TemplateItemButtonType = {
|
|
2
2
|
QUICK_REPLY: 'QUICK_REPLY',
|
|
3
3
|
URL: 'URL',
|
|
4
|
-
PHONE_NUMBER: 'PHONE_NUMBER'
|
|
4
|
+
PHONE_NUMBER: 'PHONE_NUMBER',
|
|
5
|
+
OTP: 'OTP',
|
|
6
|
+
CATALOG: 'CATALOG',
|
|
7
|
+
MPM: 'MPM',
|
|
8
|
+
CALL_PERMISSION_REQUEST: 'CALL_PERMISSION_REQUEST',
|
|
9
|
+
VOICE_CALL: 'VOICE_CALL',
|
|
10
|
+
NONE: 'NONE'
|
|
5
11
|
};
|
|
6
12
|
export default TemplateItemButtonType;
|
package/es/domain/enum/index.js
CHANGED
|
@@ -5,4 +5,7 @@ export * from './bot';
|
|
|
5
5
|
export * from './message';
|
|
6
6
|
export * from './attachment';
|
|
7
7
|
export * from './cannedMessage';
|
|
8
|
-
export * from './templateMessage';
|
|
8
|
+
export * from './templateMessage';
|
|
9
|
+
export * from './userPreference';
|
|
10
|
+
export * from './call';
|
|
11
|
+
export * from './subscription';
|
|
@@ -12,6 +12,9 @@ const InfoAction = {
|
|
|
12
12
|
CHAT_REOPENED_ON_TRANSFER: 'CHAT_REOPENED_ON_TRANSFER',
|
|
13
13
|
CHAT_INITIATION: 'CHAT_INITIATION',
|
|
14
14
|
USER_LEFT: 'USER_LEFT',
|
|
15
|
-
USER_JOINED: 'USER_JOINED'
|
|
15
|
+
USER_JOINED: 'USER_JOINED',
|
|
16
|
+
CALL_ENDED: 'CALL_ENDED',
|
|
17
|
+
CALL_MISSED: 'CALL_MISSED',
|
|
18
|
+
CALL_REJECTED: 'CALL_REJECTED'
|
|
16
19
|
};
|
|
17
20
|
export default InfoAction;
|
|
@@ -16,6 +16,9 @@ const SessionReplyStatus = {
|
|
|
16
16
|
CHANNEL_DELETED: 'CHANNEL_DELETED',
|
|
17
17
|
ENDUSER_OFFLINE: 'ENDUSER_OFFLINE',
|
|
18
18
|
CONFIG_SKIPPED_CHANNEL: 'CONFIG_SKIPPED_CHANNEL',
|
|
19
|
-
ASSIGNED_TO_OTHER_SERVICE: 'ASSIGNED_TO_OTHER_SERVICE'
|
|
19
|
+
ASSIGNED_TO_OTHER_SERVICE: 'ASSIGNED_TO_OTHER_SERVICE',
|
|
20
|
+
WECOM_TRAIL_EXPIRED: 'WECOM_TRAIL_EXPIRED',
|
|
21
|
+
WECOM_LICENSE_EXPIRED: 'WECOM_LICENSE_EXPIRED',
|
|
22
|
+
OUTGOING_LIMIT_REACHED: 'OUTGOING_LIMIT_REACHED'
|
|
20
23
|
};
|
|
21
24
|
export default SessionReplyStatus;
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
/* eslint-disable no-unused-vars */
|
|
2
|
+
import { ModuleNames } from '../../../../core/constants';
|
|
3
|
+
import BaseAPI from '../../../../infrastructure/api/BaseAPI';
|
|
4
|
+
import { getCallsRequest, getCallRequest, initiateCallRequest, updateCallStatusRequest } from '../../../dto';
|
|
5
|
+
export default class ICallRepository extends BaseAPI {
|
|
6
|
+
constructor() {
|
|
7
|
+
super({
|
|
8
|
+
module: ModuleNames.CALLS
|
|
9
|
+
});
|
|
10
|
+
}
|
|
11
|
+
|
|
12
|
+
getCalls() {
|
|
13
|
+
let request = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : getCallsRequest();
|
|
14
|
+
throw new Error('Method not implemented.');
|
|
15
|
+
}
|
|
16
|
+
|
|
17
|
+
getCall() {
|
|
18
|
+
let request = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : getCallRequest();
|
|
19
|
+
throw new Error('Method not implemented.');
|
|
20
|
+
}
|
|
21
|
+
|
|
22
|
+
updateCallStatus() {
|
|
23
|
+
let request = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : updateCallStatusRequest();
|
|
24
|
+
throw new Error('Method not implemented.');
|
|
25
|
+
}
|
|
26
|
+
|
|
27
|
+
initiateCall() {
|
|
28
|
+
let request = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : initiateCallRequest();
|
|
29
|
+
throw new Error('Method not implemented.');
|
|
30
|
+
}
|
|
31
|
+
|
|
32
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { default as ICallRepository } from './ICallRepository';
|
|
@@ -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 { getCannedMessageRequest, getCannedMessagesRequest, createCannedMessageRequest, updateCannedMessageRequest, deleteCannedMessageRequest, disableCannedMessageRequest, enableCannedMessageRequest } from '../../../dto';
|
|
4
|
+
import { getCannedMessageRequest, getCannedMessagesRequest, createCannedMessageRequest, updateCannedMessageRequest, deleteCannedMessageRequest, disableCannedMessageRequest, enableCannedMessageRequest, addTranslationRequest, updateTranslationRequest, deleteTranslationRequest, getCannedPlaceholdersRequest } from '../../../dto';
|
|
5
5
|
export default class ICannedMessageRepository extends BaseAPI {
|
|
6
6
|
constructor() {
|
|
7
7
|
super({
|
|
@@ -44,4 +44,24 @@ export default class ICannedMessageRepository extends BaseAPI {
|
|
|
44
44
|
throw new Error('Method not implemented.');
|
|
45
45
|
}
|
|
46
46
|
|
|
47
|
+
addTranslation() {
|
|
48
|
+
let request = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : addTranslationRequest();
|
|
49
|
+
throw new Error('Method not implemented.');
|
|
50
|
+
}
|
|
51
|
+
|
|
52
|
+
updateTranslation() {
|
|
53
|
+
let request = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : updateTranslationRequest();
|
|
54
|
+
throw new Error('Method not implemented.');
|
|
55
|
+
}
|
|
56
|
+
|
|
57
|
+
deleteTranslation() {
|
|
58
|
+
let request = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : deleteTranslationRequest();
|
|
59
|
+
throw new Error('Method not implemented.');
|
|
60
|
+
}
|
|
61
|
+
|
|
62
|
+
getCannedPlaceholders() {
|
|
63
|
+
let request = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : getCannedPlaceholdersRequest();
|
|
64
|
+
throw new Error('Method not implemented.');
|
|
65
|
+
}
|
|
66
|
+
|
|
47
67
|
}
|
|
@@ -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
|
}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { ModuleNames } from '../../../../core/constants';
|
|
2
2
|
import BaseAPI from '../../../../infrastructure/api/BaseAPI';
|
|
3
|
-
import { getContactsRequest } from '../../../dto';
|
|
3
|
+
import { getContactsRequest, getContactRequest } from '../../../dto';
|
|
4
4
|
export default class IContactRepository extends BaseAPI {
|
|
5
5
|
constructor() {
|
|
6
6
|
super({
|
|
@@ -12,6 +12,12 @@ export default class IContactRepository extends BaseAPI {
|
|
|
12
12
|
async getContacts() {
|
|
13
13
|
let request = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : getContactsRequest();
|
|
14
14
|
throw new Error('Method not implemented');
|
|
15
|
+
} // eslint-disable-next-line no-unused-vars
|
|
16
|
+
|
|
17
|
+
|
|
18
|
+
async getContact() {
|
|
19
|
+
let request = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : getContactRequest();
|
|
20
|
+
throw new Error('Method not implemented');
|
|
15
21
|
}
|
|
16
22
|
|
|
17
23
|
}
|
|
@@ -5,4 +5,9 @@ export * from './messages';
|
|
|
5
5
|
export * from './agents';
|
|
6
6
|
export * from './contacts';
|
|
7
7
|
export * from './cannedMessages';
|
|
8
|
-
export * from './templateMessages';
|
|
8
|
+
export * from './templateMessages';
|
|
9
|
+
export * from './integrationServices';
|
|
10
|
+
export * from './userPreferences';
|
|
11
|
+
export * from './whatsAppPricing';
|
|
12
|
+
export * from './calls';
|
|
13
|
+
export * from './subscription';
|
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,32 @@
|
|
|
1
|
+
/* eslint-disable no-unused-vars */
|
|
2
|
+
import { ModuleNames } from '../../../../core/constants';
|
|
3
|
+
import BaseAPI from '../../../../infrastructure/api/BaseAPI';
|
|
4
|
+
import { getAddOnsRequest, buyAddOnRequest, modifyAddOnRequest, getLicenseDetailsRequest } from '../../../dto';
|
|
5
|
+
export default class ISubscriptionRepository extends BaseAPI {
|
|
6
|
+
constructor() {
|
|
7
|
+
super({
|
|
8
|
+
module: ModuleNames.SUBSCRIPTION
|
|
9
|
+
});
|
|
10
|
+
}
|
|
11
|
+
|
|
12
|
+
getAddOns() {
|
|
13
|
+
let request = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : getAddOnsRequest();
|
|
14
|
+
throw new Error('Method not implemented.');
|
|
15
|
+
}
|
|
16
|
+
|
|
17
|
+
buyAddOn() {
|
|
18
|
+
let request = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : buyAddOnRequest();
|
|
19
|
+
throw new Error('Method not implemented.');
|
|
20
|
+
}
|
|
21
|
+
|
|
22
|
+
modifyAddOn() {
|
|
23
|
+
let request = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : modifyAddOnRequest();
|
|
24
|
+
throw new Error('Method not implemented.');
|
|
25
|
+
}
|
|
26
|
+
|
|
27
|
+
getLicenseDetails() {
|
|
28
|
+
let request = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : getLicenseDetailsRequest();
|
|
29
|
+
throw new Error('Method not implemented.');
|
|
30
|
+
}
|
|
31
|
+
|
|
32
|
+
}
|
|
@@ -1,6 +1,7 @@
|
|
|
1
|
+
/* eslint-disable no-unused-vars */
|
|
1
2
|
import { ModuleNames } from '../../../../core/constants';
|
|
2
3
|
import BaseAPI from '../../../../infrastructure/api/BaseAPI';
|
|
3
|
-
import { getTemplateCreditExhaustStatusRequest, getTemplateLanguagesRequest } from '../../../dto';
|
|
4
|
+
import { getTemplateCreditExhaustStatusRequest, getTemplateLanguagesRequest, getTemplateTagsRequest } from '../../../dto';
|
|
4
5
|
export default class ITemplateMessageRepository extends BaseAPI {
|
|
5
6
|
constructor() {
|
|
6
7
|
super({
|
|
@@ -18,4 +19,9 @@ export default class ITemplateMessageRepository extends BaseAPI {
|
|
|
18
19
|
throw new Error('Method not implemented');
|
|
19
20
|
}
|
|
20
21
|
|
|
22
|
+
async getTemplateTags() {
|
|
23
|
+
let request = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : getTemplateTagsRequest();
|
|
24
|
+
throw new Error('Method not implemented');
|
|
25
|
+
}
|
|
26
|
+
|
|
21
27
|
}
|
|
@@ -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
|
+
}
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
/* eslint-disable no-unused-vars */
|
|
2
|
+
import { ModuleNames, ModuleTypes } from '../../../../core/constants';
|
|
3
|
+
import BaseAPI from '../../../../infrastructure/api/BaseAPI';
|
|
4
|
+
import { calculateWhatsAppPricingRequest } from '../../../dto';
|
|
5
|
+
export default class IWhatsAppPricingRepository extends BaseAPI {
|
|
6
|
+
constructor() {
|
|
7
|
+
super({
|
|
8
|
+
module: ModuleNames.WHATSAPP_PRICING,
|
|
9
|
+
moduleType: ModuleTypes.PUBLIC
|
|
10
|
+
});
|
|
11
|
+
}
|
|
12
|
+
|
|
13
|
+
async calculateWhatsAppPricing() {
|
|
14
|
+
let request = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : calculateWhatsAppPricingRequest();
|
|
15
|
+
throw new Error('Method not implemented');
|
|
16
|
+
}
|
|
17
|
+
|
|
18
|
+
}
|
|
@@ -0,0 +1,63 @@
|
|
|
1
|
+
import { MessageDirection } from '../../enum/message';
|
|
2
|
+
import { CallStatus } from '../../enum/call';
|
|
3
|
+
import { ActorSchema } from '../actor';
|
|
4
|
+
import { IntegrationServices } from '../../enum';
|
|
5
|
+
const CallSchema = {
|
|
6
|
+
id: {
|
|
7
|
+
type: 'string',
|
|
8
|
+
required: true
|
|
9
|
+
},
|
|
10
|
+
actor: {
|
|
11
|
+
type: 'object',
|
|
12
|
+
required: true,
|
|
13
|
+
schema: ActorSchema
|
|
14
|
+
},
|
|
15
|
+
channelId: {
|
|
16
|
+
type: 'string',
|
|
17
|
+
required: true
|
|
18
|
+
},
|
|
19
|
+
createdTime: {
|
|
20
|
+
type: 'string',
|
|
21
|
+
required: true
|
|
22
|
+
},
|
|
23
|
+
direction: {
|
|
24
|
+
type: 'string',
|
|
25
|
+
required: true,
|
|
26
|
+
enum: Object.values(MessageDirection)
|
|
27
|
+
},
|
|
28
|
+
integrationServiceId: {
|
|
29
|
+
type: 'string',
|
|
30
|
+
required: true,
|
|
31
|
+
enum: Object.values(IntegrationServices)
|
|
32
|
+
},
|
|
33
|
+
meta: {
|
|
34
|
+
type: 'array',
|
|
35
|
+
required: false
|
|
36
|
+
},
|
|
37
|
+
participants: {
|
|
38
|
+
type: 'array',
|
|
39
|
+
required: false
|
|
40
|
+
},
|
|
41
|
+
sessionId: {
|
|
42
|
+
type: 'string',
|
|
43
|
+
required: true
|
|
44
|
+
},
|
|
45
|
+
session: {
|
|
46
|
+
type: 'object',
|
|
47
|
+
required: false
|
|
48
|
+
},
|
|
49
|
+
status: {
|
|
50
|
+
type: 'string',
|
|
51
|
+
required: true,
|
|
52
|
+
enum: Object.values(CallStatus)
|
|
53
|
+
},
|
|
54
|
+
statuses: {
|
|
55
|
+
type: 'array',
|
|
56
|
+
required: false
|
|
57
|
+
},
|
|
58
|
+
duration: {
|
|
59
|
+
type: 'string',
|
|
60
|
+
required: false
|
|
61
|
+
}
|
|
62
|
+
};
|
|
63
|
+
export default CallSchema;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { default as CallSchema } from './CallSchema';
|