@zohoim/client-sdk 1.0.0-canned07 → 1.0.0-leftPanelPoc1

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.
Files changed (119) hide show
  1. package/es/application/services/cannedMessages/CannedMessageService.js +1 -21
  2. package/es/application/services/channels/ChannelService.js +6 -1
  3. package/es/application/services/index.js +3 -1
  4. package/es/application/services/integrationServices/IntegrationService.js +21 -0
  5. package/es/application/services/integrationServices/index.js +2 -0
  6. package/es/application/services/sessions/SessionService.js +6 -1
  7. package/es/application/services/templateMessages/TemplateMessageService.js +1 -6
  8. package/es/application/services/userPreferences/UserPreferenceService.js +26 -0
  9. package/es/application/services/userPreferences/index.js +2 -0
  10. package/es/core/constants/ModuleNames.js +3 -1
  11. package/es/domain/dto/cannedMessages/index.js +1 -5
  12. package/es/domain/dto/{cannedMessages/deleteTranslationRequest.js → channels/getChannelRequest.js} +3 -4
  13. package/es/domain/dto/channels/getChannelsRequest.js +3 -1
  14. package/es/domain/dto/channels/index.js +2 -1
  15. package/es/domain/dto/index.js +3 -1
  16. package/es/domain/dto/{templateMessages/getTemplateTagsRequest.js → integrationServices/getIntegrationsRequest.js} +2 -2
  17. package/es/domain/dto/integrationServices/index.js +1 -0
  18. package/es/domain/dto/sessions/getSessionMetricsRequest.js +16 -0
  19. package/es/domain/dto/sessions/index.js +2 -1
  20. package/es/domain/dto/templateMessages/index.js +1 -2
  21. package/es/domain/dto/userPreferences/getPreferencesRequest.js +7 -0
  22. package/es/domain/dto/userPreferences/index.js +2 -0
  23. package/es/domain/dto/userPreferences/updatePreferencesRequest.js +9 -0
  24. package/es/domain/entities/CannedMessage/CannedMessage.js +5 -33
  25. package/es/domain/entities/CannedMessage/index.js +1 -2
  26. package/es/domain/entities/Channel/Channel.js +20 -4
  27. package/es/domain/entities/IntegrationService/IntegrationService.js +8 -1
  28. package/es/domain/entities/Session/SessionMetrics.js +21 -0
  29. package/es/domain/entities/Session/index.js +2 -1
  30. package/es/domain/entities/UserPreference/UserPreference.js +26 -0
  31. package/es/domain/entities/UserPreference/index.js +2 -0
  32. package/es/domain/entities/index.js +1 -1
  33. package/es/domain/enum/cannedMessage/CannedMessageStatus.js +1 -11
  34. package/es/domain/enum/cannedMessage/CannedMessageType.js +1 -3
  35. package/es/domain/enum/cannedMessage/TemplateItemButtonType.js +1 -6
  36. package/es/domain/enum/index.js +2 -1
  37. package/es/domain/enum/session/AssigneeFilter.js +6 -0
  38. package/es/domain/enum/session/SessionStatus.js +2 -1
  39. package/es/domain/enum/session/index.js +2 -1
  40. package/es/domain/enum/userPreference/CollapseSidePanel.js +5 -0
  41. package/es/domain/enum/userPreference/index.js +2 -0
  42. package/es/domain/interfaces/repositories/cannedMessages/ICannedMessageRepository.js +1 -21
  43. package/es/domain/interfaces/repositories/channels/IChannelRepository.js +7 -1
  44. package/es/domain/interfaces/repositories/index.js +3 -1
  45. package/es/domain/interfaces/repositories/integrationServices/IIntegrationServiceRepository.js +17 -0
  46. package/es/domain/interfaces/repositories/integrationServices/index.js +2 -0
  47. package/es/domain/interfaces/repositories/sessions/ISessionRepository.js +6 -1
  48. package/es/domain/interfaces/repositories/templateMessages/ITemplateMessageRepository.js +1 -7
  49. package/es/domain/interfaces/repositories/userPreferences/IUserPreferenceRepository.js +23 -0
  50. package/es/domain/interfaces/repositories/userPreferences/index.js +2 -0
  51. package/es/domain/schema/cannedMessage/CannedMessageSchema.js +0 -12
  52. package/es/domain/schema/cannedMessage/TranslationsSchema.js +1 -1
  53. package/es/domain/schema/cannedMessage/index.js +1 -2
  54. package/es/domain/schema/channel/ChannelSchema.js +35 -5
  55. package/es/domain/schema/index.js +1 -1
  56. package/es/domain/schema/integrationService/IntegrationServiceSchema.js +12 -0
  57. package/es/domain/schema/session/SessionMetrics/AssigneeSchema.js +20 -0
  58. package/es/domain/schema/session/SessionMetrics/SessionMetricsForAssigneeSchema.js +32 -0
  59. package/es/domain/schema/session/SessionMetrics/index.js +2 -0
  60. package/es/domain/schema/session/SessionMetricsSchema.js +9 -0
  61. package/es/domain/schema/session/index.js +2 -1
  62. package/es/domain/schema/userPreference/UserPreferenceSchema.js +9 -0
  63. package/es/domain/schema/userPreference/index.js +2 -0
  64. package/es/frameworks/managers/ModuleFactory.js +18 -0
  65. package/es/frameworks/managers/ModuleManager.js +1 -1
  66. package/es/frameworks/sdk/IMSDK.js +10 -0
  67. package/es/frameworks/sdk/integrationServices/IntegrationServiceSDK.js +30 -0
  68. package/es/frameworks/sdk/integrationServices/index.js +2 -0
  69. package/es/frameworks/sdk/userPreferences/UserPreferencesSDK.js +30 -0
  70. package/es/frameworks/sdk/userPreferences/index.js +2 -0
  71. package/es/infrastructure/adapters/cannedMessages/CannedMessageAdapter.js +2 -3
  72. package/es/infrastructure/adapters/cannedMessages/index.js +1 -2
  73. package/es/infrastructure/adapters/channels/ChannelAdapter.js +15 -2
  74. package/es/infrastructure/adapters/index.js +2 -1
  75. package/es/infrastructure/adapters/integrationServices/IntegrationServiceAdapter.js +25 -0
  76. package/es/infrastructure/adapters/integrationServices/index.js +2 -0
  77. package/es/infrastructure/adapters/sessions/SessionMetricsAdapter.js +19 -0
  78. package/es/infrastructure/adapters/sessions/index.js +2 -1
  79. package/es/infrastructure/adapters/userPreferences/UserPreferenceAdapter.js +19 -0
  80. package/es/infrastructure/adapters/userPreferences/index.js +2 -0
  81. package/es/infrastructure/api/cannedMessages/CannedMessageAPI.js +1 -41
  82. package/es/infrastructure/api/index.js +3 -1
  83. package/es/infrastructure/api/integrationServices/IntegrationServiceAPI.js +14 -0
  84. package/es/infrastructure/api/integrationServices/index.js +2 -0
  85. package/es/infrastructure/api/registry/cannedMessages/cannedMessageAPIRegistry.js +2 -22
  86. package/es/infrastructure/api/registry/getRegistryConfig.js +5 -1
  87. package/es/infrastructure/api/registry/integrationServices/constructIntegrationServiceEndPoint.js +10 -0
  88. package/es/infrastructure/api/registry/integrationServices/index.js +2 -0
  89. package/es/infrastructure/api/registry/integrationServices/integrationServiceAPIRegistry.js +12 -0
  90. package/es/infrastructure/api/registry/sessions/sessionAPIRegistry.js +8 -2
  91. package/es/infrastructure/api/registry/templateMessages/templateMessageAPIRegistry.js +2 -7
  92. package/es/infrastructure/api/registry/userPreferences/constructUserPreferencesEndPoint.js +10 -0
  93. package/es/infrastructure/api/registry/userPreferences/index.js +2 -0
  94. package/es/infrastructure/api/registry/userPreferences/userPreferenceAPIRegistry.js +17 -0
  95. package/es/infrastructure/api/sessions/SessionAPI.js +11 -1
  96. package/es/infrastructure/api/templateMessages/TemplateMessageAPI.js +1 -11
  97. package/es/infrastructure/api/userPreferences/UserPreferenceAPI.js +24 -0
  98. package/es/infrastructure/api/userPreferences/index.js +2 -0
  99. package/es/infrastructure/repositories/cannedMessages/CannedMessageRepository.js +7 -50
  100. package/es/infrastructure/repositories/channels/ChannelRepository.js +10 -1
  101. package/es/infrastructure/repositories/index.js +3 -1
  102. package/es/infrastructure/repositories/integrationServices/IntegrationServiceRepository.js +49 -0
  103. package/es/infrastructure/repositories/integrationServices/index.js +2 -0
  104. package/es/infrastructure/repositories/sessions/SessionRepository.js +14 -3
  105. package/es/infrastructure/repositories/templateMessages/TemplateMessageRepository.js +1 -10
  106. package/es/infrastructure/repositories/userPreferences/UserPreferenceRepository.js +58 -0
  107. package/es/infrastructure/repositories/userPreferences/index.js +2 -0
  108. package/package.json +1 -1
  109. package/es/domain/dto/cannedMessages/addTranslationRequest.js +0 -18
  110. package/es/domain/dto/cannedMessages/getCannedPlaceholdersRequest.js +0 -10
  111. package/es/domain/dto/cannedMessages/updateTranslationRequest.js +0 -18
  112. package/es/domain/entities/CannedMessage/Translation.js +0 -29
  113. package/es/domain/entities/Placeholder/Placeholder.js +0 -24
  114. package/es/domain/entities/Placeholder/index.js +0 -2
  115. package/es/domain/schema/placeholder/PlaceholderSchema.js +0 -19
  116. package/es/domain/schema/placeholder/index.js +0 -2
  117. package/es/infrastructure/adapters/cannedMessages/TranslationAdapter.js +0 -27
  118. package/es/infrastructure/adapters/placeholders/PlaceholderAdapter.js +0 -22
  119. package/es/infrastructure/adapters/placeholders/index.js +0 -2
@@ -1,18 +0,0 @@
1
- import RequestBuilder from '../RequestBuilder';
2
-
3
- function addTranslationRequest() {
4
- let {
5
- params = {},
6
- body = {}
7
- } = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
8
- return new RequestBuilder().withParams({
9
- cannedMessageId: null,
10
- translationId: null,
11
- ...params
12
- }).withBody({
13
- message: null,
14
- ...body
15
- }).build();
16
- }
17
-
18
- export default addTranslationRequest;
@@ -1,10 +0,0 @@
1
- import RequestBuilder from '../RequestBuilder';
2
-
3
- function getCannedPlaceholdersRequest() {
4
- let {
5
- params = {}
6
- } = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
7
- return new RequestBuilder().withParams(params).build();
8
- }
9
-
10
- export default getCannedPlaceholdersRequest;
@@ -1,18 +0,0 @@
1
- import RequestBuilder from '../RequestBuilder';
2
-
3
- function updateTranslationRequest() {
4
- let {
5
- params = {},
6
- body = {}
7
- } = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
8
- return new RequestBuilder().withParams({
9
- cannedMessageId: null,
10
- translationId: null,
11
- ...params
12
- }).withBody({
13
- message: null,
14
- ...body
15
- }).build();
16
- }
17
-
18
- export default updateTranslationRequest;
@@ -1,29 +0,0 @@
1
- import { validateSchema } from '../../../core/utils';
2
- import TranslationsSchema from '../../schema/cannedMessage/TranslationsSchema';
3
- export default class Translation {
4
- constructor() {
5
- let data = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
6
- const validatedData = validateSchema({
7
- schema: TranslationsSchema,
8
- data,
9
- entityName: 'Translation'
10
- });
11
- this.data = {
12
- id: validatedData.id,
13
- language: validatedData.language,
14
- message: validatedData.message,
15
- displayMessage: validatedData.displayMessage,
16
- uuid: validatedData.uuid,
17
- status: validatedData.status,
18
- modifiedTime: validatedData.modifiedTime,
19
- failedReason: validatedData.failedReason,
20
- templateItems: validatedData.templateItems
21
- };
22
- }
23
-
24
- toJSON() {
25
- return { ...this.data
26
- };
27
- }
28
-
29
- }
@@ -1,24 +0,0 @@
1
- import { validateSchema } from '../../../core/utils';
2
- import { PlaceholderSchema } from '../../schema/placeholder';
3
- export default class Placeholder {
4
- constructor() {
5
- let data = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
6
- const validatedData = validateSchema({
7
- schema: PlaceholderSchema,
8
- data,
9
- entityName: 'Placeholder'
10
- });
11
- this.data = {
12
- apiName: validatedData.apiName,
13
- i18nFieldLabel: validatedData.i18nFieldLabel,
14
- fieldLabel: validatedData.fieldLabel,
15
- placeHolder: validatedData.placeHolder
16
- };
17
- }
18
-
19
- toJSON() {
20
- return { ...this.data
21
- };
22
- }
23
-
24
- }
@@ -1,2 +0,0 @@
1
- import Placeholder from './Placeholder';
2
- export { Placeholder };
@@ -1,19 +0,0 @@
1
- const PlaceholderSchema = {
2
- apiName: {
3
- type: 'string',
4
- required: false
5
- },
6
- i18nFieldLabel: {
7
- type: 'string',
8
- required: true
9
- },
10
- fieldLabel: {
11
- type: 'string',
12
- required: true
13
- },
14
- placeHolder: {
15
- type: 'string',
16
- required: true
17
- }
18
- };
19
- export default PlaceholderSchema;
@@ -1,2 +0,0 @@
1
- import PlaceholderSchema from './PlaceholderSchema';
2
- export { PlaceholderSchema };
@@ -1,27 +0,0 @@
1
- import { AdapterError } from '../../../core/errors';
2
- import { Translation } from '../../../domain/entities';
3
- import { IAdapter } from '../../../domain/interfaces';
4
- export default class TranslationAdapter extends IAdapter {
5
- adapt(translationData) {
6
- if (!translationData) {
7
- throw new AdapterError('Translation data is required');
8
- }
9
-
10
- try {
11
- return new Translation({
12
- id: translationData.id,
13
- language: translationData.language,
14
- message: translationData.message,
15
- displayMessage: translationData.displayMessage,
16
- uuid: translationData.uuid,
17
- status: translationData.status,
18
- modifiedTime: translationData.modifiedTime,
19
- failedReason: translationData.failedReason,
20
- templateItems: translationData.templateItems
21
- }).toJSON();
22
- } catch (error) {
23
- throw new AdapterError(`Failed to adapt translation: ${error.message}`);
24
- }
25
- }
26
-
27
- }
@@ -1,22 +0,0 @@
1
- import { AdapterError } from '../../../core/errors';
2
- import { Placeholder } from '../../../domain/entities/Placeholder';
3
- import { IAdapter } from '../../../domain/interfaces';
4
- export default class PlaceholderAdapter extends IAdapter {
5
- adapt(placeholderData) {
6
- if (!placeholderData) {
7
- throw new AdapterError('Placeholder data is required');
8
- }
9
-
10
- try {
11
- return new Placeholder({
12
- apiName: placeholderData.apiName,
13
- i18nFieldLabel: placeholderData.i18nFieldLabel,
14
- fieldLabel: placeholderData.fieldLabel,
15
- placeHolder: placeholderData.placeHolder
16
- }).toJSON();
17
- } catch (error) {
18
- throw new AdapterError(`Failed to adapt placeholder: ${error.message}`);
19
- }
20
- }
21
-
22
- }
@@ -1,2 +0,0 @@
1
- import PlaceholderAdapter from './PlaceholderAdapter';
2
- export { PlaceholderAdapter };