@webitel/ui-sdk 25.8.8 → 25.8.10
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/README.md +69 -23
- package/dist/ui-sdk.css +1 -1
- package/dist/ui-sdk.js +65142 -21547
- package/dist/ui-sdk.umd.cjs +2928 -71
- package/package.json +140 -139
- package/src/api/axios/generateInstance.js +2 -28
- package/src/api/clients/index.js +2 -2
- package/src/api/clients/labels/labels.js +2 -1
- package/src/api/defaults/getDefaultInstance/getDefaultInstance.js +1 -0
- package/src/components/on-demand/wt-type-extension-value-input/wt-type-extension-value-input.vue +2 -2
- package/src/components/wt-select/wt-select.vue +1 -0
- package/src/components/wt-tags-input/wt-tags-input.vue +1 -1
- package/src/install.ts +2 -1
- package/src/mixins/validationMixin/vuelidate/useVuelidateValidation.ts +1 -1
- package/src/modules/AgentStatusSelect/api/pause-cause.js +3 -4
- package/src/modules/Userinfo/v2/api/UserinfoAPI.ts +6 -5
- package/src/scripts/caseConverters.js +11 -77
- package/src/validations/config/index.ts +1 -1
- package/types/api/axios/generateInstance.d.ts +0 -1
- package/types/api/clients/index.d.ts +2 -2
- package/types/api/clients/media/media.d.ts +2 -2
- package/types/api/defaults/getDefaultInstance/getDefaultInstance.d.ts +1 -1
- package/types/components/on-demand/wt-type-extension-value-input/wt-type-extension-value-input.vue.d.ts +5 -20
- package/types/components/wt-action-bar/WtActionBarActionsOrder.d.ts +2 -2
- package/types/components/wt-action-bar/wt-action-bar.vue.d.ts +14 -14
- package/types/components/wt-confirm-dialog/wt-confirm-dialog.vue.d.ts +2 -2
- package/types/components/wt-player/wt-player.vue.d.ts +1 -1
- package/types/components/wt-timepicker/wt-timepicker.vue.d.ts +1 -1
- package/types/mixins/validationMixin/vuelidate/useVuelidateValidation.d.ts +1 -1
- package/types/scripts/caseConverters.d.ts +1 -9
- package/types/validations/config/index.d.ts +1 -1
- package/src/api/history/index.js +0 -3
- package/src/api/history/transcript/callTranscript.js +0 -80
- package/types/api/history/index.d.ts +0 -2
- package/types/api/history/transcript/callTranscript.d.ts +0 -15
package/package.json
CHANGED
|
@@ -1,13 +1,14 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@webitel/ui-sdk",
|
|
3
|
-
"version": "25.8.
|
|
3
|
+
"version": "25.8.10",
|
|
4
4
|
"private": false,
|
|
5
5
|
"scripts": {
|
|
6
|
+
"make-all": "npm version patch --git-tag-version false && npm run build && (npm run build:types || true) && (npm run lint:fix || true) && npm run publish-lib",
|
|
6
7
|
"dev": "npm run docs:dev",
|
|
7
8
|
"build": "vite build",
|
|
8
9
|
"test:unit": "vitest",
|
|
9
10
|
"build:types": "vue-tsc -p ./tsconfig.build.json",
|
|
10
|
-
"publish-lib": "
|
|
11
|
+
"publish-lib": " npm publish --access public",
|
|
11
12
|
"docs:dev": "vitepress dev docs --port 8080",
|
|
12
13
|
"docs:build": "vitepress build docs",
|
|
13
14
|
"lint:fix": "eslint --fix ./src && prettier --write --check ./src",
|
|
@@ -53,7 +54,7 @@
|
|
|
53
54
|
"@vuelidate/validators": "^2.0.4",
|
|
54
55
|
"@vuepic/vue-datepicker": "^4.5.1",
|
|
55
56
|
"@vueuse/components": "^13.0.0",
|
|
56
|
-
"@webitel/api-services": "^0.0.
|
|
57
|
+
"@webitel/api-services": "^0.0.28",
|
|
57
58
|
"@webitel/styleguide": "^24.12.26",
|
|
58
59
|
"autosize": "^6.0.1",
|
|
59
60
|
"axios": "^1.8.3",
|
|
@@ -148,141 +149,141 @@
|
|
|
148
149
|
"import": "./dist/ui-sdk.js"
|
|
149
150
|
},
|
|
150
151
|
"./store": {
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
|
|
201
|
-
|
|
202
|
-
|
|
203
|
-
|
|
204
|
-
|
|
205
|
-
|
|
206
|
-
|
|
207
|
-
|
|
208
|
-
|
|
209
|
-
|
|
210
|
-
|
|
211
|
-
|
|
212
|
-
|
|
213
|
-
|
|
214
|
-
|
|
215
|
-
|
|
216
|
-
|
|
217
|
-
|
|
218
|
-
|
|
219
|
-
|
|
220
|
-
|
|
221
|
-
|
|
222
|
-
|
|
223
|
-
|
|
224
|
-
|
|
225
|
-
|
|
226
|
-
|
|
227
|
-
|
|
228
|
-
|
|
229
|
-
|
|
230
|
-
|
|
231
|
-
|
|
232
|
-
|
|
233
|
-
|
|
234
|
-
|
|
235
|
-
|
|
236
|
-
|
|
237
|
-
|
|
238
|
-
|
|
239
|
-
|
|
240
|
-
|
|
241
|
-
|
|
242
|
-
|
|
243
|
-
|
|
244
|
-
|
|
245
|
-
|
|
246
|
-
|
|
247
|
-
|
|
248
|
-
|
|
249
|
-
|
|
250
|
-
|
|
251
|
-
|
|
252
|
-
|
|
253
|
-
|
|
254
|
-
|
|
255
|
-
|
|
256
|
-
|
|
257
|
-
|
|
258
|
-
|
|
259
|
-
|
|
260
|
-
|
|
261
|
-
|
|
262
|
-
|
|
263
|
-
|
|
264
|
-
|
|
265
|
-
|
|
266
|
-
|
|
267
|
-
|
|
268
|
-
|
|
269
|
-
|
|
270
|
-
|
|
271
|
-
|
|
272
|
-
|
|
273
|
-
|
|
274
|
-
|
|
275
|
-
|
|
276
|
-
|
|
277
|
-
|
|
278
|
-
|
|
279
|
-
|
|
280
|
-
|
|
281
|
-
|
|
282
|
-
|
|
283
|
-
|
|
284
|
-
|
|
285
|
-
|
|
286
|
-
|
|
152
|
+
"types": "./types/store/new/index.d.ts",
|
|
153
|
+
"import": "./src/store/new/index.js"
|
|
154
|
+
},
|
|
155
|
+
"./store*": {
|
|
156
|
+
"types": "./types/store*",
|
|
157
|
+
"import": "./src/store*"
|
|
158
|
+
},
|
|
159
|
+
"./src/store*": {
|
|
160
|
+
"types": "./types/store*",
|
|
161
|
+
"import": "./src/store*"
|
|
162
|
+
},
|
|
163
|
+
"./enums": {
|
|
164
|
+
"types": "./types/enums/index.d.ts",
|
|
165
|
+
"import": "./src/enums/index.ts"
|
|
166
|
+
},
|
|
167
|
+
"./enums*": {
|
|
168
|
+
"types": "./types/enums*",
|
|
169
|
+
"import": "./src/enums*"
|
|
170
|
+
},
|
|
171
|
+
"./src/enums*": {
|
|
172
|
+
"types": "./types/enums*",
|
|
173
|
+
"import": "./src/enums*"
|
|
174
|
+
},
|
|
175
|
+
"./components": {
|
|
176
|
+
"types": "./types/components/index.d.ts",
|
|
177
|
+
"import": "./src/components/index.js"
|
|
178
|
+
},
|
|
179
|
+
"./components*": {
|
|
180
|
+
"types": "./types/components*",
|
|
181
|
+
"import": "./src/components*"
|
|
182
|
+
},
|
|
183
|
+
"./src/components*": {
|
|
184
|
+
"types": "./types/components*",
|
|
185
|
+
"import": "./src/components*"
|
|
186
|
+
},
|
|
187
|
+
"./scripts": {
|
|
188
|
+
"types": "./types/scripts/index.d.ts",
|
|
189
|
+
"import": "./src/scripts/index.js"
|
|
190
|
+
},
|
|
191
|
+
"./scripts*": {
|
|
192
|
+
"types": "./types/scripts*",
|
|
193
|
+
"import": "./src/scripts*"
|
|
194
|
+
},
|
|
195
|
+
"./src/scripts*": {
|
|
196
|
+
"types": "./types/scripts*",
|
|
197
|
+
"import": "./src/scripts*"
|
|
198
|
+
},
|
|
199
|
+
"./api*": {
|
|
200
|
+
"types": "./types/api*",
|
|
201
|
+
"import": "./src/api*"
|
|
202
|
+
},
|
|
203
|
+
"./src/api*": {
|
|
204
|
+
"types": "./types/api*",
|
|
205
|
+
"import": "./src/api*"
|
|
206
|
+
},
|
|
207
|
+
"./locale*": {
|
|
208
|
+
"types": "./types/locale*",
|
|
209
|
+
"import": "./src/locale*"
|
|
210
|
+
},
|
|
211
|
+
"./src/locale*": {
|
|
212
|
+
"types": "./types/locale*",
|
|
213
|
+
"import": "./src/locale*"
|
|
214
|
+
},
|
|
215
|
+
"./composables": {
|
|
216
|
+
"types": "./types/composables/index.d.ts",
|
|
217
|
+
"import": "./src/composables/index.ts"
|
|
218
|
+
},
|
|
219
|
+
"./composables*": {
|
|
220
|
+
"types": "./types/composables*",
|
|
221
|
+
"import": "./src/composables*"
|
|
222
|
+
},
|
|
223
|
+
"./src/composables*": {
|
|
224
|
+
"types": "./types/composables*",
|
|
225
|
+
"import": "./src/composables*"
|
|
226
|
+
},
|
|
227
|
+
"./css*": {
|
|
228
|
+
"import": "./src/css*"
|
|
229
|
+
},
|
|
230
|
+
"./src/css*": {
|
|
231
|
+
"import": "./src/css*"
|
|
232
|
+
},
|
|
233
|
+
"./directives*": {
|
|
234
|
+
"types": "./types/directives*",
|
|
235
|
+
"import": "./src/directives*"
|
|
236
|
+
},
|
|
237
|
+
"./src/directives*": {
|
|
238
|
+
"types": "./types/directives*",
|
|
239
|
+
"import": "./src/directives*"
|
|
240
|
+
},
|
|
241
|
+
"./mixins*": {
|
|
242
|
+
"types": "./types/mixins*",
|
|
243
|
+
"import": "./src/mixins*"
|
|
244
|
+
},
|
|
245
|
+
"./src/mixins*": {
|
|
246
|
+
"types": "./types/mixins*",
|
|
247
|
+
"import": "./src/mixins*"
|
|
248
|
+
},
|
|
249
|
+
"./validations": {
|
|
250
|
+
"types": "./types/validations/index.d.ts",
|
|
251
|
+
"import": "./src/validations/index.ts"
|
|
252
|
+
},
|
|
253
|
+
"./validators*": {
|
|
254
|
+
"types": "./types/validations/vuelidate/validators*",
|
|
255
|
+
"import": "./src/validations/vuelidate/validators*"
|
|
256
|
+
},
|
|
257
|
+
"./src/validators*": {
|
|
258
|
+
"types": "./types/validations/vuelidate/validators*",
|
|
259
|
+
"import": "./src/validations/vuelidate/validators*"
|
|
260
|
+
},
|
|
261
|
+
"./modules*": {
|
|
262
|
+
"types": "./types/modules*",
|
|
263
|
+
"import": "./src/modules*"
|
|
264
|
+
},
|
|
265
|
+
"./src/modules*": {
|
|
266
|
+
"types": "./types/modules*",
|
|
267
|
+
"import": "./src/modules*"
|
|
268
|
+
},
|
|
269
|
+
"./plugins*": {
|
|
270
|
+
"types": "./types/plugins*",
|
|
271
|
+
"import": "./src/plugins*"
|
|
272
|
+
},
|
|
273
|
+
"./src/plugins*": {
|
|
274
|
+
"types": "./types/plugins*",
|
|
275
|
+
"import": "./src/plugins*"
|
|
276
|
+
},
|
|
277
|
+
"./tests*": {
|
|
278
|
+
"types": "./types/tests*",
|
|
279
|
+
"import": "./src/tests*"
|
|
280
|
+
},
|
|
281
|
+
"./src/tests*": {
|
|
282
|
+
"types": "./types/tests*",
|
|
283
|
+
"import": "./src/tests*"
|
|
284
|
+
},
|
|
285
|
+
"./dist*": {
|
|
286
|
+
"import": "./dist*"
|
|
287
|
+
}
|
|
287
288
|
}
|
|
288
289
|
}
|
|
@@ -1,30 +1,4 @@
|
|
|
1
|
-
import
|
|
2
|
-
|
|
3
|
-
// 'X-Webitel-Access' ~ 'X-Access-Token'
|
|
4
|
-
const generateInstance = ({ interceptors, baseURL, ...rest } = {}) => {
|
|
5
|
-
const instance = axios.create({
|
|
6
|
-
baseURL,
|
|
7
|
-
headers: {
|
|
8
|
-
'X-Webitel-Access': localStorage.getItem('access-token') || '',
|
|
9
|
-
},
|
|
10
|
-
...rest,
|
|
11
|
-
});
|
|
12
|
-
|
|
13
|
-
if (interceptors) {
|
|
14
|
-
const { request, response } = interceptors;
|
|
15
|
-
if (request) {
|
|
16
|
-
request.forEach((interceptor) =>
|
|
17
|
-
instance.interceptors.request.use(...interceptor),
|
|
18
|
-
);
|
|
19
|
-
}
|
|
20
|
-
if (response) {
|
|
21
|
-
response.forEach((interceptor) =>
|
|
22
|
-
instance.interceptors.response.use(...interceptor),
|
|
23
|
-
);
|
|
24
|
-
}
|
|
25
|
-
}
|
|
26
|
-
|
|
27
|
-
return instance;
|
|
28
|
-
};
|
|
1
|
+
import { generateInstance } from '@webitel/api-services/src/api/axios';
|
|
29
2
|
|
|
3
|
+
// todo: replace imports of this file with source file, rm this file
|
|
30
4
|
export default generateInstance;
|
package/src/api/clients/index.js
CHANGED
|
@@ -21,6 +21,7 @@ import lists from './lists/blacklists';
|
|
|
21
21
|
import media from './media/media';
|
|
22
22
|
import object from './object/object';
|
|
23
23
|
import queues from './queues/queues';
|
|
24
|
+
import quickReplies from './quickReplies/quickReplies';
|
|
24
25
|
import roles from './roles/roles';
|
|
25
26
|
import skills from './skills/skills';
|
|
26
27
|
import slas from './slas/slas';
|
|
@@ -29,7 +30,6 @@ import users from './users/users';
|
|
|
29
30
|
import sysTypes from './wtTypes/sysTypes/sysTypes';
|
|
30
31
|
import typeExtensions from './wtTypes/typeExtensions/typeExtensions';
|
|
31
32
|
import { contactChatMessagesHistory, contacts } from './сontacts/index';
|
|
32
|
-
import quickReplies from './quickReplies/quickReplies';
|
|
33
33
|
|
|
34
34
|
export {
|
|
35
35
|
agentChats,
|
|
@@ -57,6 +57,7 @@ export {
|
|
|
57
57
|
media,
|
|
58
58
|
object,
|
|
59
59
|
queues,
|
|
60
|
+
quickReplies,
|
|
60
61
|
roles,
|
|
61
62
|
skills,
|
|
62
63
|
slas,
|
|
@@ -64,5 +65,4 @@ export {
|
|
|
64
65
|
teams,
|
|
65
66
|
typeExtensions,
|
|
66
67
|
users,
|
|
67
|
-
quickReplies,
|
|
68
68
|
};
|
|
@@ -1,3 +1,5 @@
|
|
|
1
|
+
import { LabelsApiFactory } from 'webitel-sdk';
|
|
2
|
+
|
|
1
3
|
import {
|
|
2
4
|
getDefaultGetParams,
|
|
3
5
|
getDefaultInstance, getDefaultOpenAPIConfig,
|
|
@@ -10,7 +12,6 @@ import applyTransform, {
|
|
|
10
12
|
snakeToCamel,
|
|
11
13
|
starToSearch,
|
|
12
14
|
} from '../../transformers/index';
|
|
13
|
-
import { LabelsApiFactory } from 'webitel-sdk';
|
|
14
15
|
|
|
15
16
|
const instance = getDefaultInstance();
|
|
16
17
|
const configuration = getDefaultOpenAPIConfig();
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import qs from 'qs';
|
|
2
|
+
|
|
2
3
|
import generateInstance from '../../axios/generateInstance.js';
|
|
3
4
|
import updateTokenInterceptor from '../../interceptors/request/updateToken.interceptor.js';
|
|
4
5
|
import handleUnauthorizedInterceptor from '../../interceptors/response/handleUnauthorized.interceptor.js';
|
package/src/components/on-demand/wt-type-extension-value-input/wt-type-extension-value-input.vue
CHANGED
|
@@ -74,12 +74,12 @@
|
|
|
74
74
|
</template>
|
|
75
75
|
|
|
76
76
|
<script lang="ts" setup>
|
|
77
|
+
import { SysTypesAPI } from "@webitel/api-services/api";
|
|
77
78
|
import { WtDatepicker, WtInput,WtSelect, WtSwitcher } from '@webitel/ui-sdk/components';
|
|
78
79
|
import { computed } from 'vue';
|
|
79
80
|
import { useI18n } from 'vue-i18n';
|
|
80
81
|
import { WebitelProtoDataField } from 'webitel-sdk';
|
|
81
82
|
|
|
82
|
-
import { getSysTypeRecordsLookup } from "../../../api/clients/wtTypes/sysTypes/sysTypes";
|
|
83
83
|
import { WtTypeExtensionFieldKind as FieldType } from '../../../enums';
|
|
84
84
|
|
|
85
85
|
const model = defineModel<unknown>();
|
|
@@ -136,7 +136,7 @@ const setValue = (value) => {
|
|
|
136
136
|
|
|
137
137
|
const loadLookupList = ({ path, display, primary }) => {
|
|
138
138
|
return (params) => {
|
|
139
|
-
return getSysTypeRecordsLookup({
|
|
139
|
+
return SysTypesAPI.getSysTypeRecordsLookup({
|
|
140
140
|
...params,
|
|
141
141
|
path,
|
|
142
142
|
display,
|
|
@@ -168,6 +168,7 @@
|
|
|
168
168
|
|
|
169
169
|
<script>
|
|
170
170
|
import { toRefs } from 'vue';
|
|
171
|
+
|
|
171
172
|
import { useValidation } from '../../mixins/validationMixin/useValidation';
|
|
172
173
|
import isEmpty from '../../scripts/isEmpty.js';
|
|
173
174
|
import taggableMixin from '../wt-tags-input/mixin/taggableMixin.js';
|
|
@@ -103,8 +103,8 @@
|
|
|
103
103
|
|
|
104
104
|
<script>
|
|
105
105
|
import deepEqual from 'deep-equal';
|
|
106
|
-
import validationMixin from '../../mixins/validationMixin/validationMixin';
|
|
107
106
|
|
|
107
|
+
import validationMixin from '../../mixins/validationMixin/validationMixin';
|
|
108
108
|
import multiselectMixin from '../wt-select/mixins/multiselectMixin.js';
|
|
109
109
|
import taggableMixin from './mixin/taggableMixin.js';
|
|
110
110
|
|
package/src/install.ts
CHANGED
|
@@ -5,7 +5,8 @@ import './css/main.scss';
|
|
|
5
5
|
import './css/tailwind.css';
|
|
6
6
|
import './assets/icons/sprite/index.js';
|
|
7
7
|
|
|
8
|
-
import generateInstance from '
|
|
8
|
+
import { generateInstance } from '@webitel/api-services/api/axios';
|
|
9
|
+
|
|
9
10
|
import Components from './components/index.js'; // init all components
|
|
10
11
|
import Directives from './directives/index.js'; // init all directives
|
|
11
12
|
import initPrimevue from './plugins/primevue/primevue.plugin.js';
|
|
@@ -1,12 +1,11 @@
|
|
|
1
|
-
import {
|
|
2
|
-
|
|
3
|
-
import { getDefaultGetListResponse } from '../../../api/defaults/index.js';
|
|
1
|
+
import { getDefaultGetListResponse } from '@webitel/api-services/api';
|
|
4
2
|
import applyTransform, {
|
|
5
3
|
merge,
|
|
6
4
|
mergeEach,
|
|
7
5
|
notify,
|
|
8
6
|
snakeToCamel,
|
|
9
|
-
} from '
|
|
7
|
+
} from '@webitel/api-services/api';
|
|
8
|
+
import { AgentServiceApiFactory } from 'webitel-sdk';
|
|
10
9
|
|
|
11
10
|
const PauseCauseAPIFactory = ({ instance, OpenAPIConfig }) => {
|
|
12
11
|
const service = new AgentServiceApiFactory(OpenAPIConfig, '', instance);
|
|
@@ -1,11 +1,12 @@
|
|
|
1
|
-
import
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
import applyTransform, {
|
|
1
|
+
import { getDefaultInstance } from '@webitel/api-services/api/defaults';
|
|
2
|
+
import {
|
|
3
|
+
applyTransform,
|
|
5
4
|
merge,
|
|
6
5
|
notify,
|
|
7
6
|
snakeToCamel,
|
|
8
|
-
} from '
|
|
7
|
+
} from '@webitel/api-services/api/transformers';
|
|
8
|
+
import type { AxiosInstance } from 'axios';
|
|
9
|
+
|
|
9
10
|
import type {
|
|
10
11
|
GlobalAccessApiResponseItem,
|
|
11
12
|
ScopeAccessApiResponseItem,
|
|
@@ -1,77 +1,11 @@
|
|
|
1
|
-
export
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
str.replace(/([-_][a-z])/g, (group) => group.toUpperCase().replace('-', ''));
|
|
13
|
-
|
|
14
|
-
export const camelToKebab = (str) =>
|
|
15
|
-
str.replace(/([A-Z])/g, (group) => group.toLowerCase().replace('', '-'));
|
|
16
|
-
|
|
17
|
-
export const kebabToSnake = (str) =>
|
|
18
|
-
str.replace(/([-_][a-z])/g, (group) => group.replace('-', '_'));
|
|
19
|
-
|
|
20
|
-
export const snakeToKebab = (str) =>
|
|
21
|
-
str.replace(/([-_][a-z])/g, (group) => group.replace('_', '-'));
|
|
22
|
-
|
|
23
|
-
const convertObject =
|
|
24
|
-
({ self, converter }) =>
|
|
25
|
-
(obj, skipKeys) => {
|
|
26
|
-
if (!obj) return obj;
|
|
27
|
-
const newObj = {};
|
|
28
|
-
if (Array.isArray(obj)) {
|
|
29
|
-
return obj.map((value) => {
|
|
30
|
-
if (typeof value === 'object') {
|
|
31
|
-
return self(value, skipKeys);
|
|
32
|
-
}
|
|
33
|
-
if (typeof value === 'string') return converter(value);
|
|
34
|
-
return value; // number
|
|
35
|
-
});
|
|
36
|
-
}
|
|
37
|
-
Object.keys(obj).forEach((oldKey) => {
|
|
38
|
-
if (skipKeys.includes(oldKey)) {
|
|
39
|
-
newObj[oldKey] = obj[oldKey];
|
|
40
|
-
} else {
|
|
41
|
-
const newKey = converter(oldKey);
|
|
42
|
-
let value = obj[oldKey];
|
|
43
|
-
if (
|
|
44
|
-
Array.isArray(value) ||
|
|
45
|
-
(value !== null &&
|
|
46
|
-
value !== undefined &&
|
|
47
|
-
value.constructor === Object)
|
|
48
|
-
) {
|
|
49
|
-
value = self(value, skipKeys);
|
|
50
|
-
}
|
|
51
|
-
newObj[newKey] = value;
|
|
52
|
-
}
|
|
53
|
-
});
|
|
54
|
-
|
|
55
|
-
return newObj;
|
|
56
|
-
};
|
|
57
|
-
|
|
58
|
-
export const objSnakeToCamel = (obj, skipKeys = []) => {
|
|
59
|
-
return convertObject({
|
|
60
|
-
self: objSnakeToCamel,
|
|
61
|
-
converter: snakeToCamel,
|
|
62
|
-
})(obj, skipKeys);
|
|
63
|
-
};
|
|
64
|
-
|
|
65
|
-
export const objCamelToSnake = (obj, skipKeys = []) => {
|
|
66
|
-
return convertObject({
|
|
67
|
-
self: objCamelToSnake,
|
|
68
|
-
converter: camelToSnake,
|
|
69
|
-
})(obj, skipKeys);
|
|
70
|
-
};
|
|
71
|
-
|
|
72
|
-
export const objCamelToKebab = (obj, skipKeys = []) => {
|
|
73
|
-
return convertObject({
|
|
74
|
-
self: objCamelToKebab,
|
|
75
|
-
converter: camelToKebab,
|
|
76
|
-
})(obj, skipKeys);
|
|
77
|
-
};
|
|
1
|
+
export {
|
|
2
|
+
camelToKebab,
|
|
3
|
+
camelToSnake,
|
|
4
|
+
kebabToCamel,
|
|
5
|
+
kebabToSnake,
|
|
6
|
+
objCamelToKebab,
|
|
7
|
+
objCamelToSnake,
|
|
8
|
+
objSnakeToCamel,
|
|
9
|
+
snakeToCamel,
|
|
10
|
+
snakeToKebab,
|
|
11
|
+
} from '@webitel/api-services/utils';
|
|
@@ -23,6 +23,7 @@ import lists from './lists/blacklists';
|
|
|
23
23
|
import media from './media/media';
|
|
24
24
|
import object from './object/object';
|
|
25
25
|
import queues from './queues/queues';
|
|
26
|
+
import quickReplies from './quickReplies/quickReplies';
|
|
26
27
|
import roles from './roles/roles';
|
|
27
28
|
import skills from './skills/skills';
|
|
28
29
|
import slas from './slas/slas';
|
|
@@ -30,5 +31,4 @@ import sysTypes from './wtTypes/sysTypes/sysTypes';
|
|
|
30
31
|
import teams from './teams/teams';
|
|
31
32
|
import typeExtensions from './wtTypes/typeExtensions/typeExtensions';
|
|
32
33
|
import users from './users/users';
|
|
33
|
-
|
|
34
|
-
export { agentChats, agents, buckets, calendars, caseCloseReasonGroups, caseCloseReasons, casePriorities, caseServiceCatalogs, caseSources, caseStatusConditions, caseStatuses, catalog, chatGateways, communications, configurations, contactChatMessagesHistory, contactGroups, contacts, flows, gateways, labels, lists, media, object, queues, roles, skills, slas, sysTypes, teams, typeExtensions, users, quickReplies };
|
|
34
|
+
export { agentChats, agents, buckets, calendars, caseCloseReasonGroups, caseCloseReasons, casePriorities, caseServiceCatalogs, caseSources, caseStatusConditions, caseStatuses, catalog, chatGateways, communications, configurations, contactChatMessagesHistory, contactGroups, contacts, flows, gateways, labels, lists, media, object, queues, quickReplies, roles, skills, slas, sysTypes, teams, typeExtensions, users };
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
export function downloadMedia(id: any): Promise<
|
|
1
|
+
export function downloadMedia(id: any): Promise<any>;
|
|
2
2
|
export default MediaAPI;
|
|
3
3
|
declare namespace MediaAPI {
|
|
4
4
|
export { getMediaList as getList };
|
|
@@ -13,7 +13,7 @@ declare function getMediaList(params: any): Promise<{
|
|
|
13
13
|
}>;
|
|
14
14
|
declare function getMedia({ itemId }: {
|
|
15
15
|
itemId: any;
|
|
16
|
-
}): Promise<
|
|
16
|
+
}): Promise<any>;
|
|
17
17
|
declare function addMedia(params: any): Promise<import("axios").AxiosResponse<any, any>>;
|
|
18
18
|
declare function deleteMedia({ id }: {
|
|
19
19
|
id: any;
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
export default getDefaultInstance;
|
|
2
|
-
export function getDefaultInstance():
|
|
2
|
+
export function getDefaultInstance(): any;
|