diff --git a/package-lock.json b/package-lock.json index 5058609a..2ea7fa83 100644 --- a/package-lock.json +++ b/package-lock.json @@ -20,7 +20,7 @@ "vue-i18n": "^9.2.2", "vue-router": "^4.0.3", "vuex": "^4.1.0", - "webitel-sdk": "^23.9.5" + "webitel-sdk": "^24.2.4" }, "devDependencies": { "@babel/core": "^7.12.16", @@ -1431,6 +1431,14 @@ "@babel/types": "^7.20.7" } }, + "node_modules/@types/debug": { + "version": "4.1.12", + "resolved": "https://registry.npmjs.org/@types/debug/-/debug-4.1.12.tgz", + "integrity": "sha512-vIChWdVG3LG1SMxEvI/AK+FWJthlrqlTu7fbrlywTkkaONwk/UAGaULXRlf8vkzFBLVm0zkMdCquhL5aOjhXPQ==", + "dependencies": { + "@types/ms": "*" + } + }, "node_modules/@types/eslint": { "version": "8.40.1", "resolved": "https://registry.npmjs.org/@types/eslint/-/eslint-8.40.1.tgz", @@ -1459,6 +1467,11 @@ "integrity": "sha512-/kYRxGDLWzHOB7q+wtSUQlFrtcdUccpfy+X+9iMBpHK8QLLhx2wIPYuS5DYtR9Wa/YlZAbIovy7qVdB1Aq6Lyw==", "dev": true }, + "node_modules/@types/events": { + "version": "3.0.3", + "resolved": "https://registry.npmjs.org/@types/events/-/events-3.0.3.tgz", + "integrity": "sha512-trOc4AAUThEz9hapPtSd7wf5tiQKvTtu5b371UxXdTuqzIh0ArcRspRP0i0Viu+LXstIQ1z96t1nsPxT9ol01g==" + }, "node_modules/@types/istanbul-lib-coverage": { "version": "2.0.4", "resolved": "https://registry.npmjs.org/@types/istanbul-lib-coverage/-/istanbul-lib-coverage-2.0.4.tgz", @@ -1478,6 +1491,11 @@ "integrity": "sha512-dRLjCWHYg4oaA77cxO64oO+7JwCwnIzkZPdrrC71jQmQtlhM556pwKo5bUzqvZndkVbeFLIIi+9TC40JNF5hNQ==", "dev": true }, + "node_modules/@types/ms": { + "version": "0.7.34", + "resolved": "https://registry.npmjs.org/@types/ms/-/ms-0.7.34.tgz", + "integrity": "sha512-nG96G3Wp6acyAgJqGasjODb+acrI7KltPiRxzHPXnP3NgI28bpQDRv53olbqGXbfcgF5aiiHmO3xpwEpS5Ld9g==" + }, "node_modules/@types/node": { "version": "20.3.0", "resolved": "https://registry.npmjs.org/@types/node/-/node-20.3.0.tgz", @@ -1491,9 +1509,9 @@ "integrity": "sha512-g9gZnnXVq7gM7v3tJCWV/qw7w+KeOlSHAhgF9RytFyifW6AF61hdT2ucrYhPq9hLs5JIryeupHV3qGk95dH9ow==" }, "node_modules/@types/webrtc": { - "version": "0.0.26", - "resolved": "https://registry.npmjs.org/@types/webrtc/-/webrtc-0.0.26.tgz", - "integrity": "sha512-hTDoPKPYbgcogZA9eqhihPO+HnUs5BNPfnoOyc9bzcuq56eYV28zwJ+3tortPN0uXgmDvNs3f1JaT4oTbtWxqg==" + "version": "0.0.42", + "resolved": "https://registry.npmjs.org/@types/webrtc/-/webrtc-0.0.42.tgz", + "integrity": "sha512-YyrG3yzw/JvZs0q3f9SY+AiJr0FJw1qhBjvoQJEUy07udiyakAax2A87BHpB3qnaxsm2ExCvhyUvjTxdsn+qSw==" }, "node_modules/@ungap/structured-clone": { "version": "1.2.0", @@ -2456,6 +2474,64 @@ "url": "https://github.com/sponsors/sindresorhus" } }, + "node_modules/@webitel/ui-sdk/node_modules/webitel-sdk": { + "version": "23.12.28", + "resolved": "https://registry.npmjs.org/webitel-sdk/-/webitel-sdk-23.12.28.tgz", + "integrity": "sha512-ukTNoZl/J6BHLfcYVoO7BXLmS/czPJBrItJDZmMk/CcYrWx7+mXsUgqIqIV6UoDrRz6rSiskeUpeeX+xMlj4Mw==", + "dependencies": { + "@types/webrtc": "~0.0.41", + "deep-copy": "1.4.2", + "ee-ts": "1.0.1", + "json-refs": "3.0.13", + "jssip": "=3.10.1", + "query-string": "7.0.0" + }, + "peerDependencies": { + "axios": "1.6.5", + "ee-ts": "1.0.1" + } + }, + "node_modules/@webitel/ui-sdk/node_modules/webitel-sdk/node_modules/decode-uri-component": { + "version": "0.2.2", + "resolved": "https://registry.npmjs.org/decode-uri-component/-/decode-uri-component-0.2.2.tgz", + "integrity": "sha512-FqUYQ+8o158GyGTrMFJms9qh3CqTKvAqgqsTnkLI8sKu0028orqBhxNMFkFen0zGyg6epACD32pjVk58ngIErQ==", + "engines": { + "node": ">=0.10" + } + }, + "node_modules/@webitel/ui-sdk/node_modules/webitel-sdk/node_modules/filter-obj": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/filter-obj/-/filter-obj-1.1.0.tgz", + "integrity": "sha512-8rXg1ZnX7xzy2NGDVkBVaAy+lSlPNwad13BtgSlLuxfIslyt5Vg64U7tFcCt4WS1R0hvtnQybT/IyCkGZ3DpXQ==", + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/@webitel/ui-sdk/node_modules/webitel-sdk/node_modules/query-string": { + "version": "7.0.0", + "resolved": "https://registry.npmjs.org/query-string/-/query-string-7.0.0.tgz", + "integrity": "sha512-Iy7moLybliR5ZgrK/1R3vjrXq03S13Vz4Rbm5Jg3EFq1LUmQppto0qtXz4vqZ386MSRjZgnTSZ9QC+NZOSd/XA==", + "dependencies": { + "decode-uri-component": "^0.2.0", + "filter-obj": "^1.1.0", + "split-on-first": "^1.0.0", + "strict-uri-encode": "^2.0.0" + }, + "engines": { + "node": ">=6" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/@webitel/ui-sdk/node_modules/webitel-sdk/node_modules/split-on-first": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/split-on-first/-/split-on-first-1.1.0.tgz", + "integrity": "sha512-43ZssAJaMusuKWL8sKUBQXHWOpq8d6CfN/u1p4gUzfJkM05C8rxTmYrkIPTXapZpORA6LkkzcUulJ8FqA7Uudw==", + "engines": { + "node": ">=6" + } + }, "node_modules/@xtuc/ieee754": { "version": "1.2.0", "resolved": "https://registry.npmjs.org/@xtuc/ieee754/-/ieee754-1.2.0.tgz", @@ -6882,13 +6958,15 @@ "dev": true }, "node_modules/jssip": { - "version": "3.3.6", - "resolved": "https://registry.npmjs.org/jssip/-/jssip-3.3.6.tgz", - "integrity": "sha512-kyLxEQ7GBVlEi1PIWToAob7mH8WPtdUE51382vtjYC4ZUEa6qCXB4i9EwysX2bvpJUPbieZ1UPY8C6tLXQeBbA==", + "version": "3.10.1", + "resolved": "https://registry.npmjs.org/jssip/-/jssip-3.10.1.tgz", + "integrity": "sha512-V82JW6fZF02VInHMKgTO9oEXbkZwqezGj9SNaQPh+btriC16FfSPsRBnD+i9IhU9C86JA9le6Z8AZirYnbKi2g==", "dependencies": { - "debug": "^4.1.1", - "events": "^3.0.0", - "sdp-transform": "^2.7.0" + "@types/debug": "^4.1.7", + "@types/events": "^3.0.0", + "debug": "^4.3.1", + "events": "^3.3.0", + "sdp-transform": "^2.14.1" } }, "node_modules/jszip": { @@ -8793,9 +8871,9 @@ } }, "node_modules/sdp-transform": { - "version": "2.14.1", - "resolved": "https://registry.npmjs.org/sdp-transform/-/sdp-transform-2.14.1.tgz", - "integrity": "sha512-RjZyX3nVwJyCuTo5tGPx+PZWkDMCg7oOLpSlhjDdZfwUoNqG1mM8nyj31IGHyaPWXhjbP7cdK3qZ2bmkJ1GzRw==", + "version": "2.14.2", + "resolved": "https://registry.npmjs.org/sdp-transform/-/sdp-transform-2.14.2.tgz", + "integrity": "sha512-icY6jVao7MfKCieyo1AyxFYm1baiM+fA00qW/KrNNVlkxHAd34riEKuEkUe4bBb3gJwLJZM+xT60Yj1QL8rHiA==", "bin": { "sdp-verify": "checker.js" } @@ -10084,12 +10162,6 @@ "node": ">=4" } }, - "node_modules/tslib": { - "version": "2.5.3", - "resolved": "https://registry.npmjs.org/tslib/-/tslib-2.5.3.tgz", - "integrity": "sha512-mSxlJJwl3BMEQCUNnxXBU9jP4JBktcEGhURcPR6VQVlnP0FdDEsIaz0C35dXNGLyRfrATNofF0F5p2KPxQgB+w==", - "peer": true - }, "node_modules/tty-browserify": { "version": "0.0.1", "resolved": "https://registry.npmjs.org/tty-browserify/-/tty-browserify-0.0.1.tgz", @@ -10751,22 +10823,20 @@ } }, "node_modules/webitel-sdk": { - "version": "23.9.5", - "resolved": "https://registry.npmjs.org/webitel-sdk/-/webitel-sdk-23.9.5.tgz", - "integrity": "sha512-2kexMAFaWD5dBw3ssW973NL01LMh0YEk72KICjDuPuVBGEqcBffhhUAg1r59ndI6+K3ACrxmNUo9YqxmmLyWBQ==", + "version": "24.2.4", + "resolved": "https://registry.npmjs.org/webitel-sdk/-/webitel-sdk-24.2.4.tgz", + "integrity": "sha512-7lg2CKR4iAdAQOOexi8A/5QqizK0mZ0JgV4E1x0L3hCZb6hP2UTapvwjUXx8Sie4WbJlq0wamIPuRVqoB/2r0Q==", "dependencies": { - "@types/webrtc": "0.0.26", + "@types/webrtc": "~0.0.41", "deep-copy": "1.4.2", "ee-ts": "1.0.1", "json-refs": "3.0.13", - "jssip": "=3.3.6", + "jssip": "=3.10.1", "query-string": "7.0.0" }, "peerDependencies": { - "axios": "0.27.2", - "ee-ts": "1.0.1", - "jssip": "=3.3.6", - "tslib": ">=1.10.0" + "axios": "1.6.5", + "ee-ts": "1.0.1" } }, "node_modules/webpack": { @@ -12020,6 +12090,14 @@ "@babel/types": "^7.20.7" } }, + "@types/debug": { + "version": "4.1.12", + "resolved": "https://registry.npmjs.org/@types/debug/-/debug-4.1.12.tgz", + "integrity": "sha512-vIChWdVG3LG1SMxEvI/AK+FWJthlrqlTu7fbrlywTkkaONwk/UAGaULXRlf8vkzFBLVm0zkMdCquhL5aOjhXPQ==", + "requires": { + "@types/ms": "*" + } + }, "@types/eslint": { "version": "8.40.1", "resolved": "https://registry.npmjs.org/@types/eslint/-/eslint-8.40.1.tgz", @@ -12048,6 +12126,11 @@ "integrity": "sha512-/kYRxGDLWzHOB7q+wtSUQlFrtcdUccpfy+X+9iMBpHK8QLLhx2wIPYuS5DYtR9Wa/YlZAbIovy7qVdB1Aq6Lyw==", "dev": true }, + "@types/events": { + "version": "3.0.3", + "resolved": "https://registry.npmjs.org/@types/events/-/events-3.0.3.tgz", + "integrity": "sha512-trOc4AAUThEz9hapPtSd7wf5tiQKvTtu5b371UxXdTuqzIh0ArcRspRP0i0Viu+LXstIQ1z96t1nsPxT9ol01g==" + }, "@types/istanbul-lib-coverage": { "version": "2.0.4", "resolved": "https://registry.npmjs.org/@types/istanbul-lib-coverage/-/istanbul-lib-coverage-2.0.4.tgz", @@ -12067,6 +12150,11 @@ "integrity": "sha512-dRLjCWHYg4oaA77cxO64oO+7JwCwnIzkZPdrrC71jQmQtlhM556pwKo5bUzqvZndkVbeFLIIi+9TC40JNF5hNQ==", "dev": true }, + "@types/ms": { + "version": "0.7.34", + "resolved": "https://registry.npmjs.org/@types/ms/-/ms-0.7.34.tgz", + "integrity": "sha512-nG96G3Wp6acyAgJqGasjODb+acrI7KltPiRxzHPXnP3NgI28bpQDRv53olbqGXbfcgF5aiiHmO3xpwEpS5Ld9g==" + }, "@types/node": { "version": "20.3.0", "resolved": "https://registry.npmjs.org/@types/node/-/node-20.3.0.tgz", @@ -12080,9 +12168,9 @@ "integrity": "sha512-g9gZnnXVq7gM7v3tJCWV/qw7w+KeOlSHAhgF9RytFyifW6AF61hdT2ucrYhPq9hLs5JIryeupHV3qGk95dH9ow==" }, "@types/webrtc": { - "version": "0.0.26", - "resolved": "https://registry.npmjs.org/@types/webrtc/-/webrtc-0.0.26.tgz", - "integrity": "sha512-hTDoPKPYbgcogZA9eqhihPO+HnUs5BNPfnoOyc9bzcuq56eYV28zwJ+3tortPN0uXgmDvNs3f1JaT4oTbtWxqg==" + "version": "0.0.42", + "resolved": "https://registry.npmjs.org/@types/webrtc/-/webrtc-0.0.42.tgz", + "integrity": "sha512-YyrG3yzw/JvZs0q3f9SY+AiJr0FJw1qhBjvoQJEUy07udiyakAax2A87BHpB3qnaxsm2ExCvhyUvjTxdsn+qSw==" }, "@ungap/structured-clone": { "version": "1.2.0", @@ -12771,6 +12859,47 @@ "version": "3.0.0", "resolved": "https://registry.npmjs.org/split-on-first/-/split-on-first-3.0.0.tgz", "integrity": "sha512-qxQJTx2ryR0Dw0ITYyekNQWpz6f8dGd7vffGNflQQ3Iqj9NJ6qiZ7ELpZsJ/QBhIVAiDfXdag3+Gp8RvWa62AA==" + }, + "webitel-sdk": { + "version": "23.12.28", + "resolved": "https://registry.npmjs.org/webitel-sdk/-/webitel-sdk-23.12.28.tgz", + "integrity": "sha512-ukTNoZl/J6BHLfcYVoO7BXLmS/czPJBrItJDZmMk/CcYrWx7+mXsUgqIqIV6UoDrRz6rSiskeUpeeX+xMlj4Mw==", + "requires": { + "@types/webrtc": "~0.0.41", + "deep-copy": "1.4.2", + "ee-ts": "1.0.1", + "json-refs": "3.0.13", + "jssip": "=3.10.1", + "query-string": "7.0.0" + }, + "dependencies": { + "decode-uri-component": { + "version": "0.2.2", + "resolved": "https://registry.npmjs.org/decode-uri-component/-/decode-uri-component-0.2.2.tgz", + "integrity": "sha512-FqUYQ+8o158GyGTrMFJms9qh3CqTKvAqgqsTnkLI8sKu0028orqBhxNMFkFen0zGyg6epACD32pjVk58ngIErQ==" + }, + "filter-obj": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/filter-obj/-/filter-obj-1.1.0.tgz", + "integrity": "sha512-8rXg1ZnX7xzy2NGDVkBVaAy+lSlPNwad13BtgSlLuxfIslyt5Vg64U7tFcCt4WS1R0hvtnQybT/IyCkGZ3DpXQ==" + }, + "query-string": { + "version": "7.0.0", + "resolved": "https://registry.npmjs.org/query-string/-/query-string-7.0.0.tgz", + "integrity": "sha512-Iy7moLybliR5ZgrK/1R3vjrXq03S13Vz4Rbm5Jg3EFq1LUmQppto0qtXz4vqZ386MSRjZgnTSZ9QC+NZOSd/XA==", + "requires": { + "decode-uri-component": "^0.2.0", + "filter-obj": "^1.1.0", + "split-on-first": "^1.0.0", + "strict-uri-encode": "^2.0.0" + } + }, + "split-on-first": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/split-on-first/-/split-on-first-1.1.0.tgz", + "integrity": "sha512-43ZssAJaMusuKWL8sKUBQXHWOpq8d6CfN/u1p4gUzfJkM05C8rxTmYrkIPTXapZpORA6LkkzcUulJ8FqA7Uudw==" + } + } } } }, @@ -16147,13 +16276,15 @@ "dev": true }, "jssip": { - "version": "3.3.6", - "resolved": "https://registry.npmjs.org/jssip/-/jssip-3.3.6.tgz", - "integrity": "sha512-kyLxEQ7GBVlEi1PIWToAob7mH8WPtdUE51382vtjYC4ZUEa6qCXB4i9EwysX2bvpJUPbieZ1UPY8C6tLXQeBbA==", + "version": "3.10.1", + "resolved": "https://registry.npmjs.org/jssip/-/jssip-3.10.1.tgz", + "integrity": "sha512-V82JW6fZF02VInHMKgTO9oEXbkZwqezGj9SNaQPh+btriC16FfSPsRBnD+i9IhU9C86JA9le6Z8AZirYnbKi2g==", "requires": { - "debug": "^4.1.1", - "events": "^3.0.0", - "sdp-transform": "^2.7.0" + "@types/debug": "^4.1.7", + "@types/events": "^3.0.0", + "debug": "^4.3.1", + "events": "^3.3.0", + "sdp-transform": "^2.14.1" } }, "jszip": { @@ -17633,9 +17764,9 @@ } }, "sdp-transform": { - "version": "2.14.1", - "resolved": "https://registry.npmjs.org/sdp-transform/-/sdp-transform-2.14.1.tgz", - "integrity": "sha512-RjZyX3nVwJyCuTo5tGPx+PZWkDMCg7oOLpSlhjDdZfwUoNqG1mM8nyj31IGHyaPWXhjbP7cdK3qZ2bmkJ1GzRw==" + "version": "2.14.2", + "resolved": "https://registry.npmjs.org/sdp-transform/-/sdp-transform-2.14.2.tgz", + "integrity": "sha512-icY6jVao7MfKCieyo1AyxFYm1baiM+fA00qW/KrNNVlkxHAd34riEKuEkUe4bBb3gJwLJZM+xT60Yj1QL8rHiA==" }, "semver": { "version": "6.3.0", @@ -18644,12 +18775,6 @@ } } }, - "tslib": { - "version": "2.5.3", - "resolved": "https://registry.npmjs.org/tslib/-/tslib-2.5.3.tgz", - "integrity": "sha512-mSxlJJwl3BMEQCUNnxXBU9jP4JBktcEGhURcPR6VQVlnP0FdDEsIaz0C35dXNGLyRfrATNofF0F5p2KPxQgB+w==", - "peer": true - }, "tty-browserify": { "version": "0.0.1", "resolved": "https://registry.npmjs.org/tty-browserify/-/tty-browserify-0.0.1.tgz", @@ -19093,15 +19218,15 @@ "peer": true }, "webitel-sdk": { - "version": "23.9.5", - "resolved": "https://registry.npmjs.org/webitel-sdk/-/webitel-sdk-23.9.5.tgz", - "integrity": "sha512-2kexMAFaWD5dBw3ssW973NL01LMh0YEk72KICjDuPuVBGEqcBffhhUAg1r59ndI6+K3ACrxmNUo9YqxmmLyWBQ==", + "version": "24.2.4", + "resolved": "https://registry.npmjs.org/webitel-sdk/-/webitel-sdk-24.2.4.tgz", + "integrity": "sha512-7lg2CKR4iAdAQOOexi8A/5QqizK0mZ0JgV4E1x0L3hCZb6hP2UTapvwjUXx8Sie4WbJlq0wamIPuRVqoB/2r0Q==", "requires": { - "@types/webrtc": "0.0.26", + "@types/webrtc": "~0.0.41", "deep-copy": "1.4.2", "ee-ts": "1.0.1", "json-refs": "3.0.13", - "jssip": "=3.3.6", + "jssip": "=3.10.1", "query-string": "7.0.0" } }, diff --git a/package.json b/package.json index 62931246..5b802c36 100644 --- a/package.json +++ b/package.json @@ -22,7 +22,7 @@ "vue-i18n": "^9.2.2", "vue-router": "^4.0.3", "vuex": "^4.1.0", - "webitel-sdk": "^23.9.5" + "webitel-sdk": "^24.2.4" }, "devDependencies": { "@babel/core": "^7.12.16", diff --git a/src/app/locale/en/en.js b/src/app/locale/en/en.js index 4a85e1f6..e597fcfd 100644 --- a/src/app/locale/en/en.js +++ b/src/app/locale/en/en.js @@ -1,3 +1,5 @@ +import ChatGatewayProvider + from '@webitel/ui-sdk/src/enums/ChatGatewayProvider/ChatGatewayProvider.enum'; import AccessMode from '../../../modules/contacts/modules/permissions/enums/AccessMode.enum'; @@ -25,6 +27,19 @@ export default { editTitle: 'Edit the phone number', dummy: 'There are no phone numbers yet', }, + messaging: { + gateway: 'Gateway', + provider: 'Provider ', + dummy: 'There is no messaging options yet', + messengers: { + [ChatGatewayProvider.TELEGRAM_BOT]: 'Telegram Bot', + [ChatGatewayProvider.TELEGRAM_APP]: 'Telegram App', + [ChatGatewayProvider.MESSENGER]: 'Meta', + [ChatGatewayProvider.VIBER]: 'Viber', + [ChatGatewayProvider.WEBCHAT]: 'Web chat', + [ChatGatewayProvider.INFOBIP]: 'Infobip', + }, + }, }, attributes: 'Attribute | Attributes', }, diff --git a/src/app/locale/ru/ru.js b/src/app/locale/ru/ru.js index 653875b3..4fd04498 100644 --- a/src/app/locale/ru/ru.js +++ b/src/app/locale/ru/ru.js @@ -1,3 +1,5 @@ +import ChatGatewayProvider + from '@webitel/ui-sdk/src/enums/ChatGatewayProvider/ChatGatewayProvider.enum'; import AccessMode from '../../../modules/contacts/modules/permissions/enums/AccessMode.enum'; @@ -25,6 +27,19 @@ export default { editTitle: 'Редактировать номер телефона', dummy: 'Телефонные номера еще не добавлены', }, + messaging: { + gateway: 'Шлюз', + provider: 'Провайдер', + dummy: 'Пока еще не было текстовых диалогов', + messengers: { + [ChatGatewayProvider.TELEGRAM_BOT]: 'Telegram Бот', + [ChatGatewayProvider.TELEGRAM_APP]: 'Telegram Приложение', + [ChatGatewayProvider.MESSENGER]: 'Meta', + [ChatGatewayProvider.VIBER]: 'Viber', + [ChatGatewayProvider.WEBCHAT]: 'Web chat', + [ChatGatewayProvider.INFOBIP]: 'Infobip', + }, + }, }, attributes: 'Атрибут | Атрибуты', }, diff --git a/src/app/locale/ua/ua.js b/src/app/locale/ua/ua.js index 010cbb27..a3208d24 100644 --- a/src/app/locale/ua/ua.js +++ b/src/app/locale/ua/ua.js @@ -1,3 +1,5 @@ +import ChatGatewayProvider + from '@webitel/ui-sdk/src/enums/ChatGatewayProvider/ChatGatewayProvider.enum'; import AccessMode from '../../../modules/contacts/modules/permissions/enums/AccessMode.enum'; @@ -25,6 +27,19 @@ export default { editTitle: 'Редагувати номер телефону', dummy: 'Телефонні номери ще не додано', }, + messaging: { + gateway: 'Шлюз', + provider: 'Провайдер', + dummy: 'Поки ще було текстових діалогів', + messengers: { + [ChatGatewayProvider.TELEGRAM_BOT]: 'Telegram Бот', + [ChatGatewayProvider.TELEGRAM_APP]: 'Telegram Застосунок', + [ChatGatewayProvider.MESSENGER]: 'Meta', + [ChatGatewayProvider.VIBER]: 'Viber', + [ChatGatewayProvider.WEBCHAT]: 'Web chat', + [ChatGatewayProvider.INFOBIP]: 'Infobip', + }, + }, }, attributes: 'Атрибут | Атрибути', }, diff --git a/src/app/router/index.js b/src/app/router/index.js index 82691621..906f6e53 100644 --- a/src/app/router/index.js +++ b/src/app/router/index.js @@ -73,6 +73,11 @@ const routes = [ name: `${CrmSections.CONTACTS}-communications-phones`, component: ContactCommunications, }, + { + path: 'messaging', + name: `${CrmSections.CONTACTS}-communications-messaging`, + component: ContactCommunications, + }, { path: 'emails', name: `${CrmSections.CONTACTS}-communications-emails`, @@ -80,7 +85,6 @@ const routes = [ }, ], }, - { path: 'variables', name: `${CrmSections.CONTACTS}-variables`, diff --git a/src/modules/contacts/components/opened-contact-communications.vue b/src/modules/contacts/components/opened-contact-communications.vue index 7bbf2638..6ccb2ae7 100644 --- a/src/modules/contacts/components/opened-contact-communications.vue +++ b/src/modules/contacts/components/opened-contact-communications.vue @@ -23,13 +23,14 @@ + + diff --git a/src/modules/contacts/modules/messaging/modules/filters/store/filters.js b/src/modules/contacts/modules/messaging/modules/filters/store/filters.js new file mode 100644 index 00000000..dbb28618 --- /dev/null +++ b/src/modules/contacts/modules/messaging/modules/filters/store/filters.js @@ -0,0 +1,26 @@ +import BaseFilterSchema + from '@webitel/ui-sdk/src/modules/Filters/classes/BaseFilterSchema'; +import FiltersStoreModule + from '@webitel/ui-sdk/src/modules/Filters/store/FiltersStoreModule'; +import router from '../../../../../../../app/router'; + +const state = { + page: new BaseFilterSchema({ + value: 1, + defaultValue: 1, + }), + size: new BaseFilterSchema({ + value: 1000, + defaultValue: 1000, + }), + sort: new BaseFilterSchema(), +}; + +const getters = { + ROUTER: () => router, + TABLE_NAMESPACE: () => 'contacts/card/messaging/table', +}; + +const filters = new FiltersStoreModule().getModule({ state, getters }); + +export default filters; diff --git a/src/modules/contacts/modules/messaging/store/_internals/headers.js b/src/modules/contacts/modules/messaging/store/_internals/headers.js new file mode 100644 index 00000000..2bb9672f --- /dev/null +++ b/src/modules/contacts/modules/messaging/store/_internals/headers.js @@ -0,0 +1,23 @@ +import { SortSymbols } from '@webitel/ui-sdk/src/scripts/sortQueryAdapters'; + +export default [ + { + value: 'icon', + show: true, + width: '24px', + }, + { + value: 'protocol', + locale: 'contacts.communications.messaging.provider', + show: true, + field: 'protocol', + sort: SortSymbols.NONE, + }, + { + value: 'app', + locale: 'contacts.communications.messaging.gateway', + show: true, + field: 'app', + sort: SortSymbols.NONE, + }, +]; diff --git a/src/modules/contacts/modules/messaging/store/messaging.js b/src/modules/contacts/modules/messaging/store/messaging.js new file mode 100644 index 00000000..6546d6af --- /dev/null +++ b/src/modules/contacts/modules/messaging/store/messaging.js @@ -0,0 +1,27 @@ +import TableStoreModule + from '@webitel/ui-sdk/src/modules/TableStoreModule/store/TableStoreModule'; +import ApiStoreModule + from '@webitel/ui-sdk/src/store/BaseStoreModules/ApiStoreModule'; +import BaseStoreModule + from '@webitel/ui-sdk/src/store/BaseStoreModules/BaseStoreModule'; +import MessagingAPI from '../api/MessagingAPI'; +import headers from './_internals/headers'; +import filters from '../modules/filters/store/filters'; + +const getters = { + PARENT_ID: (state, getters, rootState) => rootState.contacts.card.itemId, +}; + +const api = new ApiStoreModule() +.generateAPIActions(MessagingAPI) +.getModule(); + +const table = new TableStoreModule({ headers }) +.setChildModules({ api, filters }) +.getModule({getters}); + +const messaging = new BaseStoreModule() +.setChildModules({ table }) +.getModule(); + +export default messaging; diff --git a/src/modules/contacts/store/contacts.js b/src/modules/contacts/store/contacts.js index 22082aa0..2a084708 100644 --- a/src/modules/contacts/store/contacts.js +++ b/src/modules/contacts/store/contacts.js @@ -11,6 +11,7 @@ import headers from './_internals/headers'; import filters from '../modules/filters/store/filters'; import emails from '../modules/emails/store/emails'; import phones from '../modules/phones/store/phones'; +import messaging from '../modules/messaging/store/messaging'; import permissions from '../modules/permissions/store/permissions'; import variables from '../modules/variables/store/variables'; @@ -39,7 +40,7 @@ const table = new TableStoreModule({ headers }) .getModule({ getters: tableGetters }); const card = new CardStoreModule() - .setChildModules({ api, emails, phones, variables, permissions }) + .setChildModules({ api, emails, phones, messaging, variables, permissions }) .getModule({ state: cardState }); const contacts = new BaseStoreModule()