@webitel/api-services 0.0.27 → 0.0.28
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/package.json +42 -26
- package/src/api/clients/_shared/generatePermissionsApi.ts +4 -3
- package/src/api/clients/agents/agentChats.ts +5 -7
- package/src/api/clients/agents/agents.ts +4 -3
- package/src/api/clients/buckets/buckets.ts +4 -3
- package/src/api/clients/calendars/calendars.ts +4 -3
- package/src/api/clients/caseCloseReasonGroups/caseCloseReasonGroups.ts +4 -3
- package/src/api/clients/caseCloseReasons/caseCloseReasons.ts +4 -3
- package/src/api/clients/casePriorities/casePriorities.ts +4 -3
- package/src/api/clients/caseServiceCatalogs/serviceCatalogs.ts +9 -9
- package/src/api/clients/caseServices/services.ts +4 -3
- package/src/api/clients/caseSources/caseSources.ts +8 -12
- package/src/api/clients/caseStatusConditions/caseStatusConditions.ts +6 -5
- package/src/api/clients/caseStatuses/caseStatuses.ts +4 -3
- package/src/api/clients/catalog/catalog.ts +2 -5
- package/src/api/clients/chatGateways/chatGateways.ts +2 -2
- package/src/api/clients/communications/communications.ts +9 -7
- package/src/api/clients/configurations/configurations.ts +4 -3
- package/src/api/clients/contactGroups/contactGroups.ts +4 -3
- package/src/api/clients/flows/flow.ts +4 -3
- package/src/api/clients/gateways/gateways.ts +4 -3
- package/src/api/clients/history/transcript/callTranscript.ts +79 -0
- package/src/api/clients/index.ts +34 -68
- package/src/api/clients/labels/labels.ts +4 -3
- package/src/api/clients/lists/blacklists.ts +4 -3
- package/src/api/clients/media/media.ts +4 -3
- package/src/api/clients/object/object.ts +4 -3
- package/src/api/clients/queues/queues.ts +5 -4
- package/src/api/clients/quickReplies/quickReplies.ts +8 -12
- package/src/api/clients/roles/roles.ts +4 -3
- package/src/api/clients/skills/skills.ts +4 -3
- package/src/api/clients/slaConditions/slaConditions.ts +4 -3
- package/src/api/clients/slas/slas.ts +4 -3
- package/src/api/clients/teams/teams.ts +4 -3
- package/src/api/clients/users/users.ts +4 -3
- package/src/api/clients/wtTypes/index.ts +2 -0
- package/src/api/clients/wtTypes/sysTypes/sysTypes.ts +2 -1
- package/src/api/clients/wtTypes/typeExtensions/typeExtensions.ts +3 -2
- package/src/api/clients//321/201ontacts/contactChatMessagesHistory.ts +5 -7
- package/src/api/clients//321/201ontacts/contacts.ts +5 -4
- package/src/api/clients//321/201ontacts/enums/ContactsSearchMode.ts +1 -3
- package/src/api/clients//321/201ontacts/index.ts +3 -5
- package/src/api/defaults/index.ts +4 -11
- package/src/api/interceptors/request/index.ts +1 -1
- package/src/api/interceptors/response/index.ts +1 -1
- package/src/api/transformers/camelToSnake/camelToSnake.transformer.ts +1 -1
- package/src/api/transformers/notify/notify.transformer.ts +3 -3
- package/src/api/transformers/snakeToCamel/snakeToCamel.transformer.ts +1 -1
- package/src/api/transformers/starToSearch/starToSearch.transformer.ts +2 -4
- package/src/config/config.ts +13 -0
- package/src/gen/_docs/.nojekyll +1 -0
- package/src/gen/_docs/html/assets/hierarchy.js +1 -1
- package/src/gen/_docs/html/assets/highlight.css +101 -76
- package/src/gen/_docs/html/assets/icons.js +20 -17
- package/src/gen/_docs/html/assets/main.js +2503 -6
- package/src/gen/_docs/html/assets/navigation.js +2 -1
- package/src/gen/_docs/html/assets/search.js +2 -1
- package/src/gen/_docs/html/assets/style.css +1623 -1634
- package/src/index.ts +2 -2
- package/src/utils/api/caseConverters.ts +77 -0
- package/src/utils/api/index.ts +1 -0
- package/src/utils/gen/index.ts +19 -1
- package/src/utils/index.ts +1 -20
- package/types/api/clients/caseStatusConditions/caseStatusConditions.d.ts +2 -1
- package/types/api/clients/history/transcript/callTranscript.d.ts +11 -0
- package/types/api/clients/index.d.ts +31 -33
- package/types/api/clients/media/media.d.ts +2 -2
- package/types/api/clients/wtTypes/index.d.ts +2 -0
- package/types/api/clients/wtTypes/typeExtensions/typeExtensions.d.ts +1 -1
- package/types/api/clients//321/201ontacts/enums/ContactsSearchMode.d.ts +1 -2
- package/types/api/clients//321/201ontacts/index.d.ts +3 -4
- package/types/api/defaults/index.d.ts +4 -5
- package/types/api/interceptors/request/index.d.ts +1 -1
- package/types/api/interceptors/response/index.d.ts +1 -1
- package/types/config/config.d.ts +7 -0
- package/types/gen/_models/casesCaseCustom.d.ts +12 -0
- package/types/gen/_models/casesInputCaseCustom.d.ts +12 -0
- package/types/gen/_models/casesInputCreateCaseCustom.d.ts +12 -0
- package/types/gen/_models/engineTriggerObjectType.d.ts +1 -0
- package/types/gen/_models/fileServiceSearchFilesChannelItem.d.ts +2 -0
- package/types/gen/_models/protobufNullValue.d.ts +18 -0
- package/types/gen/_models/storageUploadFileChannel.d.ts +2 -0
- package/types/gen/file-policies-service/file-policies-service.zod.gen.d.ts +18 -0
- package/types/gen/file-service/file-service.api.gen.d.ts +3 -1
- package/types/gen/file-service/file-service.msw.api.gen.d.ts +3 -1
- package/types/gen/file-service/file-service.zod.gen.d.ts +18 -0
- package/types/gen/trigger-service/trigger-service.zod.gen.d.ts +9 -0
- package/types/index.d.ts +2 -2
- package/types/utils/api/caseConverters.d.ts +9 -0
- package/types/utils/api/index.d.ts +1 -0
- package/types/utils/index.d.ts +1 -7
- package/types/gen/_models/googleRpcStatus.d.ts +0 -12
- package/types/gen/_models/webitelCasesStatus.d.ts +0 -16
|
@@ -0,0 +1,79 @@
|
|
|
1
|
+
import { FileTranscriptServiceApiFactory } from 'webitel-sdk';
|
|
2
|
+
|
|
3
|
+
import {
|
|
4
|
+
getDefaultGetListResponse,
|
|
5
|
+
getDefaultInstance,
|
|
6
|
+
getDefaultOpenAPIConfig,
|
|
7
|
+
} from '../../../defaults';
|
|
8
|
+
import {
|
|
9
|
+
applyTransform,
|
|
10
|
+
camelToSnake,
|
|
11
|
+
merge,
|
|
12
|
+
notify,
|
|
13
|
+
snakeToCamel,
|
|
14
|
+
} from '../../../transformers';
|
|
15
|
+
|
|
16
|
+
const instance = getDefaultInstance();
|
|
17
|
+
const configuration = getDefaultOpenAPIConfig();
|
|
18
|
+
|
|
19
|
+
const transcriptService = FileTranscriptServiceApiFactory(
|
|
20
|
+
configuration,
|
|
21
|
+
'',
|
|
22
|
+
instance,
|
|
23
|
+
);
|
|
24
|
+
|
|
25
|
+
const getTranscript = async ({ id, page = 1, size = 10000 }) => {
|
|
26
|
+
try {
|
|
27
|
+
const response = await transcriptService.getFileTranscriptPhrases(
|
|
28
|
+
id,
|
|
29
|
+
page,
|
|
30
|
+
size,
|
|
31
|
+
);
|
|
32
|
+
const { items } = applyTransform(response.data, [
|
|
33
|
+
snakeToCamel(),
|
|
34
|
+
merge(getDefaultGetListResponse()),
|
|
35
|
+
]);
|
|
36
|
+
return items;
|
|
37
|
+
} catch (err) {
|
|
38
|
+
throw applyTransform(err, [notify]);
|
|
39
|
+
}
|
|
40
|
+
};
|
|
41
|
+
|
|
42
|
+
const createTranscript = async ({ callId }) => {
|
|
43
|
+
const preRequestHandler = (callId) => {
|
|
44
|
+
return Array.isArray(callId) ? callId : [callId];
|
|
45
|
+
};
|
|
46
|
+
|
|
47
|
+
const uuid = applyTransform(callId, [preRequestHandler, camelToSnake()]);
|
|
48
|
+
|
|
49
|
+
try {
|
|
50
|
+
const response = await transcriptService.createFileTranscript({ uuid });
|
|
51
|
+
return applyTransform(response.data, [snakeToCamel()]);
|
|
52
|
+
} catch (err) {
|
|
53
|
+
throw applyTransform(err, [notify]);
|
|
54
|
+
}
|
|
55
|
+
};
|
|
56
|
+
|
|
57
|
+
const deleteTranscript = async (item) => {
|
|
58
|
+
const preRequestHandler = ({ fileId, callId }) => {
|
|
59
|
+
if (fileId) {
|
|
60
|
+
return { id: Array.isArray(fileId) ? fileId : [fileId] };
|
|
61
|
+
}
|
|
62
|
+
return { uuid: Array.isArray(callId) ? callId : [callId] };
|
|
63
|
+
};
|
|
64
|
+
|
|
65
|
+
const body = applyTransform(item, [preRequestHandler, camelToSnake()]);
|
|
66
|
+
|
|
67
|
+
try {
|
|
68
|
+
const response = await transcriptService.deleteFileTranscript(body);
|
|
69
|
+
return applyTransform(response.data, []);
|
|
70
|
+
} catch (err) {
|
|
71
|
+
throw applyTransform(err, [notify]);
|
|
72
|
+
}
|
|
73
|
+
};
|
|
74
|
+
|
|
75
|
+
export const CallTranscriptAPI = {
|
|
76
|
+
create: createTranscript,
|
|
77
|
+
get: getTranscript,
|
|
78
|
+
delete: deleteTranscript,
|
|
79
|
+
};
|
package/src/api/clients/index.ts
CHANGED
|
@@ -1,68 +1,34 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
export
|
|
35
|
-
agentChats,
|
|
36
|
-
agents,
|
|
37
|
-
buckets,
|
|
38
|
-
calendars,
|
|
39
|
-
caseCloseReasonGroups,
|
|
40
|
-
caseCloseReasons,
|
|
41
|
-
casePriorities,
|
|
42
|
-
caseServiceCatalogs,
|
|
43
|
-
caseSources,
|
|
44
|
-
caseStatusConditions,
|
|
45
|
-
caseStatuses,
|
|
46
|
-
catalog,
|
|
47
|
-
chatGateways,
|
|
48
|
-
communications,
|
|
49
|
-
configurations,
|
|
50
|
-
contactChatMessagesHistory,
|
|
51
|
-
contactGroups,
|
|
52
|
-
contacts,
|
|
53
|
-
flows,
|
|
54
|
-
gateways,
|
|
55
|
-
labels,
|
|
56
|
-
lists,
|
|
57
|
-
media,
|
|
58
|
-
object,
|
|
59
|
-
queues,
|
|
60
|
-
quickReplies,
|
|
61
|
-
roles,
|
|
62
|
-
skills,
|
|
63
|
-
slas,
|
|
64
|
-
sysTypes,
|
|
65
|
-
teams,
|
|
66
|
-
typeExtensions,
|
|
67
|
-
users,
|
|
68
|
-
};
|
|
1
|
+
export * from './_shared/generatePermissionsApi';
|
|
2
|
+
export * from './agents/agentChats';
|
|
3
|
+
// export * from './agents/agents'; fixme: file imports
|
|
4
|
+
export * from './buckets/buckets';
|
|
5
|
+
export * from './calendars/calendars';
|
|
6
|
+
export * from './caseCloseReasonGroups/caseCloseReasonGroups';
|
|
7
|
+
export * from './caseCloseReasons/caseCloseReasons';
|
|
8
|
+
export * from './casePriorities/casePriorities';
|
|
9
|
+
export * from './caseServiceCatalogs/serviceCatalogs';
|
|
10
|
+
export * from './caseSources/caseSources';
|
|
11
|
+
export * from './caseStatusConditions/caseStatusConditions';
|
|
12
|
+
export * from './caseStatuses/caseStatuses';
|
|
13
|
+
export * from './catalog/catalog';
|
|
14
|
+
// export * from './chatGateways/chatGateways'; fixme: file imports
|
|
15
|
+
export * from './communications/communications';
|
|
16
|
+
export * from './configurations/configurations';
|
|
17
|
+
export * from './contactGroups/contactGroups';
|
|
18
|
+
export * from './flows/flow';
|
|
19
|
+
export * from './gateways/gateways';
|
|
20
|
+
export * from './history/transcript/callTranscript';
|
|
21
|
+
export * from './labels/labels';
|
|
22
|
+
export * from './lists/blacklists';
|
|
23
|
+
export * from './media/media';
|
|
24
|
+
export * from './object/object';
|
|
25
|
+
export * from './queues/queues';
|
|
26
|
+
export * from './quickReplies/quickReplies';
|
|
27
|
+
// export * from './roles/roles'; // fixme: file imports
|
|
28
|
+
export * from './skills/skills';
|
|
29
|
+
export * from './slas/slas';
|
|
30
|
+
export * from './teams/teams';
|
|
31
|
+
export * from './users/users';
|
|
32
|
+
export * from './wtTypes/sysTypes/sysTypes';
|
|
33
|
+
export * from './wtTypes/typeExtensions/typeExtensions';
|
|
34
|
+
export * from './сontacts';
|
|
@@ -3,15 +3,16 @@ import {
|
|
|
3
3
|
getDefaultGetParams,
|
|
4
4
|
getDefaultInstance,
|
|
5
5
|
getDefaultOpenAPIConfig,
|
|
6
|
-
} from '../../defaults
|
|
7
|
-
import
|
|
6
|
+
} from '../../defaults';
|
|
7
|
+
import {
|
|
8
|
+
applyTransform,
|
|
8
9
|
camelToSnake,
|
|
9
10
|
merge,
|
|
10
11
|
notify,
|
|
11
12
|
sanitize,
|
|
12
13
|
snakeToCamel,
|
|
13
14
|
starToSearch,
|
|
14
|
-
} from '../../transformers
|
|
15
|
+
} from '../../transformers';
|
|
15
16
|
|
|
16
17
|
const instance = getDefaultInstance();
|
|
17
18
|
const configuration = getDefaultOpenAPIConfig();
|
|
@@ -5,8 +5,9 @@ import {
|
|
|
5
5
|
getDefaultGetParams,
|
|
6
6
|
getDefaultInstance,
|
|
7
7
|
getDefaultOpenAPIConfig,
|
|
8
|
-
} from '../../defaults
|
|
9
|
-
import
|
|
8
|
+
} from '../../defaults';
|
|
9
|
+
import {
|
|
10
|
+
applyTransform,
|
|
10
11
|
camelToSnake,
|
|
11
12
|
merge,
|
|
12
13
|
mergeEach,
|
|
@@ -14,7 +15,7 @@ import applyTransform, {
|
|
|
14
15
|
sanitize,
|
|
15
16
|
snakeToCamel,
|
|
16
17
|
starToSearch,
|
|
17
|
-
} from '../../transformers
|
|
18
|
+
} from '../../transformers';
|
|
18
19
|
|
|
19
20
|
const instance = getDefaultInstance();
|
|
20
21
|
const configuration = getDefaultOpenAPIConfig();
|
|
@@ -6,13 +6,14 @@ import {
|
|
|
6
6
|
getDefaultGetParams,
|
|
7
7
|
getDefaultInstance,
|
|
8
8
|
getDefaultOpenAPIConfig,
|
|
9
|
-
} from '../../defaults
|
|
10
|
-
import
|
|
9
|
+
} from '../../defaults';
|
|
10
|
+
import {
|
|
11
|
+
applyTransform,
|
|
11
12
|
merge,
|
|
12
13
|
notify,
|
|
13
14
|
snakeToCamel,
|
|
14
15
|
starToSearch,
|
|
15
|
-
} from '../../transformers
|
|
16
|
+
} from '../../transformers';
|
|
16
17
|
|
|
17
18
|
const instance = getDefaultInstance();
|
|
18
19
|
const configuration = getDefaultOpenAPIConfig();
|
|
@@ -5,8 +5,9 @@ import {
|
|
|
5
5
|
getDefaultGetParams,
|
|
6
6
|
getDefaultInstance,
|
|
7
7
|
getDefaultOpenAPIConfig,
|
|
8
|
-
} from '../../defaults
|
|
9
|
-
import
|
|
8
|
+
} from '../../defaults';
|
|
9
|
+
import {
|
|
10
|
+
applyTransform,
|
|
10
11
|
camelToSnake,
|
|
11
12
|
generateUrl,
|
|
12
13
|
merge,
|
|
@@ -14,7 +15,7 @@ import applyTransform, {
|
|
|
14
15
|
sanitize,
|
|
15
16
|
snakeToCamel,
|
|
16
17
|
starToSearch,
|
|
17
|
-
} from '../../transformers
|
|
18
|
+
} from '../../transformers';
|
|
18
19
|
|
|
19
20
|
const instance = getDefaultInstance();
|
|
20
21
|
const configuration = getDefaultOpenAPIConfig();
|
|
@@ -1,14 +1,15 @@
|
|
|
1
1
|
import deepCopy from 'deep-copy';
|
|
2
|
+
import { isEmpty } from 'lodash-es';
|
|
2
3
|
import { QueueServiceApiFactory } from 'webitel-sdk';
|
|
3
4
|
|
|
4
|
-
import isEmpty from '../../../scripts/isEmpty';
|
|
5
5
|
import {
|
|
6
6
|
getDefaultGetListResponse,
|
|
7
7
|
getDefaultGetParams,
|
|
8
8
|
getDefaultInstance,
|
|
9
9
|
getDefaultOpenAPIConfig,
|
|
10
|
-
} from '../../defaults
|
|
11
|
-
import
|
|
10
|
+
} from '../../defaults';
|
|
11
|
+
import {
|
|
12
|
+
applyTransform,
|
|
12
13
|
camelToSnake,
|
|
13
14
|
merge,
|
|
14
15
|
mergeEach,
|
|
@@ -16,7 +17,7 @@ import applyTransform, {
|
|
|
16
17
|
sanitize,
|
|
17
18
|
snakeToCamel,
|
|
18
19
|
starToSearch,
|
|
19
|
-
} from '../../transformers
|
|
20
|
+
} from '../../transformers';
|
|
20
21
|
import processing from './defaults/processing';
|
|
21
22
|
|
|
22
23
|
const instance = getDefaultInstance();
|
|
@@ -1,18 +1,14 @@
|
|
|
1
1
|
import { getQuickRepliesService } from '@webitel/api-services/gen';
|
|
2
2
|
|
|
3
|
+
import { getDefaultGetListResponse, getDefaultGetParams } from '../../defaults';
|
|
3
4
|
import {
|
|
4
|
-
|
|
5
|
-
getDefaultGetParams,
|
|
6
|
-
} from '../../defaults/index';
|
|
7
|
-
import applyTransform, {
|
|
5
|
+
applyTransform,
|
|
8
6
|
camelToSnake,
|
|
9
7
|
merge,
|
|
10
8
|
notify,
|
|
11
9
|
sanitize,
|
|
12
10
|
snakeToCamel,
|
|
13
|
-
} from '../../transformers
|
|
14
|
-
|
|
15
|
-
const quickReplyService = getQuickRepliesService();
|
|
11
|
+
} from '../../transformers';
|
|
16
12
|
|
|
17
13
|
const fieldsToSend = ['name', 'queues', 'article', 'teams', 'text'];
|
|
18
14
|
|
|
@@ -27,7 +23,7 @@ const getQuickRepliesList = async (params) => {
|
|
|
27
23
|
]);
|
|
28
24
|
|
|
29
25
|
try {
|
|
30
|
-
const response = await
|
|
26
|
+
const response = await getQuickRepliesService().searchQuickReplies({
|
|
31
27
|
page,
|
|
32
28
|
size,
|
|
33
29
|
fields,
|
|
@@ -49,7 +45,7 @@ const getQuickRepliesList = async (params) => {
|
|
|
49
45
|
|
|
50
46
|
const getQuickReply = async ({ itemId: id }) => {
|
|
51
47
|
try {
|
|
52
|
-
const response = await
|
|
48
|
+
const response = await getQuickRepliesService().readQuickReply(id);
|
|
53
49
|
return applyTransform(response.data, [snakeToCamel()]);
|
|
54
50
|
} catch (err) {
|
|
55
51
|
throw applyTransform(err, [notify]);
|
|
@@ -62,7 +58,7 @@ const addQuickReply = async ({ itemInstance }) => {
|
|
|
62
58
|
camelToSnake(),
|
|
63
59
|
]);
|
|
64
60
|
try {
|
|
65
|
-
const response = await
|
|
61
|
+
const response = await getQuickRepliesService().createQuickReply(item);
|
|
66
62
|
return applyTransform(response.data, [snakeToCamel()]);
|
|
67
63
|
} catch (err) {
|
|
68
64
|
throw applyTransform(err, [notify]);
|
|
@@ -76,7 +72,7 @@ const updateQuickReply = async ({ itemInstance, itemId: id }) => {
|
|
|
76
72
|
]);
|
|
77
73
|
|
|
78
74
|
try {
|
|
79
|
-
const response = await
|
|
75
|
+
const response = await getQuickRepliesService().updateQuickReply(id, item);
|
|
80
76
|
return applyTransform(response.data, [snakeToCamel()]);
|
|
81
77
|
} catch (err) {
|
|
82
78
|
throw applyTransform(err, [notify]);
|
|
@@ -85,7 +81,7 @@ const updateQuickReply = async ({ itemInstance, itemId: id }) => {
|
|
|
85
81
|
|
|
86
82
|
const deleteQuickReply = async ({ id }) => {
|
|
87
83
|
try {
|
|
88
|
-
const response = await
|
|
84
|
+
const response = await getQuickRepliesService().deleteQuickReply(id);
|
|
89
85
|
return applyTransform(response.data, []);
|
|
90
86
|
} catch (err) {
|
|
91
87
|
throw applyTransform(err, [notify]);
|
|
@@ -5,8 +5,9 @@ import {
|
|
|
5
5
|
getDefaultGetListResponse,
|
|
6
6
|
getDefaultGetParams,
|
|
7
7
|
getDefaultInstance,
|
|
8
|
-
} from '../../defaults
|
|
9
|
-
import
|
|
8
|
+
} from '../../defaults';
|
|
9
|
+
import {
|
|
10
|
+
applyTransform,
|
|
10
11
|
camelToSnake,
|
|
11
12
|
generateUrl,
|
|
12
13
|
merge,
|
|
@@ -14,7 +15,7 @@ import applyTransform, {
|
|
|
14
15
|
sanitize,
|
|
15
16
|
snakeToCamel,
|
|
16
17
|
starToSearch,
|
|
17
|
-
} from '../../transformers
|
|
18
|
+
} from '../../transformers';
|
|
18
19
|
|
|
19
20
|
const instance = getDefaultInstance();
|
|
20
21
|
|
|
@@ -5,15 +5,16 @@ import {
|
|
|
5
5
|
getDefaultGetParams,
|
|
6
6
|
getDefaultInstance,
|
|
7
7
|
getDefaultOpenAPIConfig,
|
|
8
|
-
} from '../../defaults
|
|
9
|
-
import
|
|
8
|
+
} from '../../defaults';
|
|
9
|
+
import {
|
|
10
|
+
applyTransform,
|
|
10
11
|
camelToSnake,
|
|
11
12
|
merge,
|
|
12
13
|
notify,
|
|
13
14
|
sanitize,
|
|
14
15
|
snakeToCamel,
|
|
15
16
|
starToSearch,
|
|
16
|
-
} from '../../transformers
|
|
17
|
+
} from '../../transformers';
|
|
17
18
|
|
|
18
19
|
const instance = getDefaultInstance();
|
|
19
20
|
const configuration = getDefaultOpenAPIConfig();
|
|
@@ -5,14 +5,15 @@ import {
|
|
|
5
5
|
getDefaultGetParams,
|
|
6
6
|
getDefaultInstance,
|
|
7
7
|
getDefaultOpenAPIConfig,
|
|
8
|
-
} from '../../defaults
|
|
9
|
-
import
|
|
8
|
+
} from '../../defaults';
|
|
9
|
+
import {
|
|
10
|
+
applyTransform,
|
|
10
11
|
camelToSnake,
|
|
11
12
|
merge,
|
|
12
13
|
notify,
|
|
13
14
|
sanitize,
|
|
14
15
|
snakeToCamel,
|
|
15
|
-
} from '../../transformers
|
|
16
|
+
} from '../../transformers';
|
|
16
17
|
|
|
17
18
|
const instance = getDefaultInstance();
|
|
18
19
|
const configuration = getDefaultOpenAPIConfig();
|
|
@@ -5,14 +5,15 @@ import {
|
|
|
5
5
|
getDefaultGetParams,
|
|
6
6
|
getDefaultInstance,
|
|
7
7
|
getDefaultOpenAPIConfig,
|
|
8
|
-
} from '../../defaults
|
|
9
|
-
import
|
|
8
|
+
} from '../../defaults';
|
|
9
|
+
import {
|
|
10
|
+
applyTransform,
|
|
10
11
|
camelToSnake,
|
|
11
12
|
merge,
|
|
12
13
|
notify,
|
|
13
14
|
sanitize,
|
|
14
15
|
snakeToCamel,
|
|
15
|
-
} from '../../transformers
|
|
16
|
+
} from '../../transformers';
|
|
16
17
|
|
|
17
18
|
const instance = getDefaultInstance();
|
|
18
19
|
const configuration = getDefaultOpenAPIConfig();
|
|
@@ -5,15 +5,16 @@ import {
|
|
|
5
5
|
getDefaultGetParams,
|
|
6
6
|
getDefaultInstance,
|
|
7
7
|
getDefaultOpenAPIConfig,
|
|
8
|
-
} from '../../defaults
|
|
9
|
-
import
|
|
8
|
+
} from '../../defaults';
|
|
9
|
+
import {
|
|
10
|
+
applyTransform,
|
|
10
11
|
camelToSnake,
|
|
11
12
|
merge,
|
|
12
13
|
notify,
|
|
13
14
|
sanitize,
|
|
14
15
|
snakeToCamel,
|
|
15
16
|
starToSearch,
|
|
16
|
-
} from '../../transformers
|
|
17
|
+
} from '../../transformers';
|
|
17
18
|
|
|
18
19
|
const instance = getDefaultInstance();
|
|
19
20
|
const configuration = getDefaultOpenAPIConfig();
|
|
@@ -4,8 +4,9 @@ import {
|
|
|
4
4
|
getDefaultGetListResponse,
|
|
5
5
|
getDefaultGetParams,
|
|
6
6
|
getDefaultInstance,
|
|
7
|
-
} from '../../defaults
|
|
8
|
-
import
|
|
7
|
+
} from '../../defaults';
|
|
8
|
+
import {
|
|
9
|
+
applyTransform,
|
|
9
10
|
camelToSnake,
|
|
10
11
|
generateUrl,
|
|
11
12
|
merge,
|
|
@@ -13,7 +14,7 @@ import applyTransform, {
|
|
|
13
14
|
notify,
|
|
14
15
|
sanitize,
|
|
15
16
|
snakeToCamel,
|
|
16
|
-
} from '../../transformers
|
|
17
|
+
} from '../../transformers';
|
|
17
18
|
import { generatePermissionsApi } from '../_shared/generatePermissionsApi';
|
|
18
19
|
|
|
19
20
|
const instance = getDefaultInstance();
|
|
@@ -1,7 +1,8 @@
|
|
|
1
1
|
import { ExtensionsApiFactory, type WebitelProtoDataStruct } from 'webitel-sdk';
|
|
2
2
|
|
|
3
3
|
import { getDefaultInstance, getDefaultOpenAPIConfig } from '../../../defaults';
|
|
4
|
-
import
|
|
4
|
+
import {
|
|
5
|
+
applyTransform,
|
|
5
6
|
camelToSnake,
|
|
6
7
|
notify,
|
|
7
8
|
sanitize,
|
|
@@ -106,7 +107,7 @@ const updateTypeExtension = async ({ itemInstance, itemId: typeRepo }) => {
|
|
|
106
107
|
}
|
|
107
108
|
};
|
|
108
109
|
|
|
109
|
-
export const
|
|
110
|
+
export const WtTypeExtensionAPI = {
|
|
110
111
|
getList: getTypeExtension,
|
|
111
112
|
add: addTypeExtension,
|
|
112
113
|
update: updateTypeExtension,
|
|
@@ -1,18 +1,16 @@
|
|
|
1
1
|
import { ContactsChatCatalogApiFactory } from 'webitel-sdk';
|
|
2
2
|
|
|
3
|
-
import i18n from '../../../locale/i18n';
|
|
4
3
|
import {
|
|
5
4
|
getDefaultGetListResponse,
|
|
6
5
|
getDefaultInstance,
|
|
7
6
|
getDefaultOpenAPIConfig,
|
|
8
|
-
} from '../../defaults
|
|
9
|
-
import
|
|
7
|
+
} from '../../defaults';
|
|
8
|
+
import {
|
|
9
|
+
applyTransform,
|
|
10
10
|
merge,
|
|
11
11
|
notify,
|
|
12
12
|
snakeToCamel,
|
|
13
|
-
} from '../../transformers
|
|
14
|
-
|
|
15
|
-
const { t } = i18n.global;
|
|
13
|
+
} from '../../transformers';
|
|
16
14
|
|
|
17
15
|
const instance = getDefaultInstance();
|
|
18
16
|
const configuration = getDefaultOpenAPIConfig();
|
|
@@ -85,7 +83,7 @@ const getAllMessages = async (params) => {
|
|
|
85
83
|
notify(({ callback }) =>
|
|
86
84
|
callback({
|
|
87
85
|
type: 'error',
|
|
88
|
-
text:
|
|
86
|
+
text: 'errorNotifications.chatHistoryApi',
|
|
89
87
|
}),
|
|
90
88
|
),
|
|
91
89
|
]);
|
|
@@ -6,15 +6,16 @@ import {
|
|
|
6
6
|
getDefaultGetParams,
|
|
7
7
|
getDefaultInstance,
|
|
8
8
|
getDefaultOpenAPIConfig,
|
|
9
|
-
} from '../../defaults
|
|
10
|
-
import
|
|
9
|
+
} from '../../defaults';
|
|
10
|
+
import {
|
|
11
|
+
applyTransform,
|
|
11
12
|
camelToSnake,
|
|
12
13
|
merge,
|
|
13
14
|
notify,
|
|
14
15
|
sanitize,
|
|
15
16
|
snakeToCamel,
|
|
16
|
-
} from '../../transformers
|
|
17
|
-
import ContactsSearchMode from './enums/ContactsSearchMode';
|
|
17
|
+
} from '../../transformers';
|
|
18
|
+
import { ContactsSearchMode } from './enums/ContactsSearchMode';
|
|
18
19
|
|
|
19
20
|
const instance = getDefaultInstance();
|
|
20
21
|
const configuration = getDefaultOpenAPIConfig();
|
|
@@ -1,5 +1,3 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
export { contactChatMessagesHistory, contacts, ContactsSearchMode };
|
|
1
|
+
export * from './contactChatMessagesHistory';
|
|
2
|
+
export * from './contacts';
|
|
3
|
+
export * from './enums/ContactsSearchMode';
|
|
@@ -1,11 +1,4 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
export {
|
|
7
|
-
getDefaultGetListResponse,
|
|
8
|
-
getDefaultGetParams,
|
|
9
|
-
getDefaultInstance,
|
|
10
|
-
getDefaultOpenAPIConfig,
|
|
11
|
-
};
|
|
1
|
+
export * from './getDefaultGetListResponse/getDefaultGetListResponse';
|
|
2
|
+
export * from './getDefaultGetParams/getDefaultGetParams';
|
|
3
|
+
export * from './getDefaultInstance/getDefaultInstance';
|
|
4
|
+
export * from './getDefaultOpenAPIConfig/getDefaultOpenAPIConfig';
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
// Export request interceptors
|
|
2
|
-
export {
|
|
2
|
+
export { updateTokenInterceptor } from './updateToken.interceptor';
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
// Export response interceptors
|
|
2
|
-
export {
|
|
2
|
+
export { handleUnauthorizedInterceptor } from './handleUnauthorized.interceptor';
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import
|
|
1
|
+
import { config as apiServicesConfig } from '../../../config/config';
|
|
2
2
|
|
|
3
3
|
const notifyTransformer = (notificationObject) => {
|
|
4
4
|
/*
|
|
@@ -10,7 +10,7 @@ const notifyTransformer = (notificationObject) => {
|
|
|
10
10
|
so, create a callback which will send notification with params, passed to it
|
|
11
11
|
*/
|
|
12
12
|
const callback = ({ type, text }) =>
|
|
13
|
-
eventBus.$emit('notification', {
|
|
13
|
+
apiServicesConfig.eventBus.$emit('notification', {
|
|
14
14
|
type,
|
|
15
15
|
text,
|
|
16
16
|
});
|
|
@@ -25,7 +25,7 @@ const notifyTransformer = (notificationObject) => {
|
|
|
25
25
|
};
|
|
26
26
|
}
|
|
27
27
|
if (notificationObject instanceof Error) {
|
|
28
|
-
eventBus
|
|
28
|
+
apiServicesConfig.eventBus?.$emit('notification', {
|
|
29
29
|
type: 'error',
|
|
30
30
|
text:
|
|
31
31
|
notificationObject.response?.data?.detail ||
|