@webitel/ui-datalist 1.1.81 → 1.1.82
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 +1 -1
- package/src/modules/filter-presets/api/PresetQuery.ts +18 -22
- package/src/modules/filters/modules/filterConfig/components/_custom/filterConfig.ts +1 -1
- package/src/modules/filters/modules/filterConfig/components/agent/config.js +1 -1
- package/src/modules/filters/modules/filterConfig/components/case-assignee/filterConfig.ts +1 -1
- package/src/modules/filters/modules/filterConfig/components/case-author/config.js +1 -1
- package/src/modules/filters/modules/filterConfig/components/case-close-reason-groups/config.js +4 -2
- package/src/modules/filters/modules/filterConfig/components/case-impacted/config.js +1 -1
- package/src/modules/filters/modules/filterConfig/components/case-priority/config.js +1 -1
- package/src/modules/filters/modules/filterConfig/components/case-reporter/config.js +1 -1
- package/src/modules/filters/modules/filterConfig/components/case-service/config.js +1 -2
- package/src/modules/filters/modules/filterConfig/components/case-sla/config.js +1 -1
- package/src/modules/filters/modules/filterConfig/components/case-sla-condition/config.js +1 -2
- package/src/modules/filters/modules/filterConfig/components/case-source/config.js +1 -1
- package/src/modules/filters/modules/filterConfig/components/case-status/config.js +4 -2
- package/src/modules/filters/modules/filterConfig/components/contact/config.js +1 -1
- package/src/modules/filters/modules/filterConfig/components/contact-group/index.ts +1 -1
- package/src/modules/filters/modules/filterConfig/components/contact-label/index.ts +1 -1
- package/src/modules/filters/modules/filterConfig/components/contact-owner/index.ts +1 -1
- package/src/modules/filters/modules/filterConfig/components/gateway/config.js +1 -1
- package/src/modules/filters/modules/filterConfig/components/queue/index.ts +1 -1
- package/src/modules/filters/modules/filterConfig/components/rated-by/config.js +1 -1
- package/src/modules/filters/modules/filterConfig/components/team/index.ts +1 -1
- package/src/modules/filters/modules/filterConfig/components/user/config.js +1 -1
- package/types/.tsbuildinfo +1 -1
- package/types/modules/filter-presets/api/PresetQuery.d.ts +1 -1
- package/types/modules/filters/modules/filterConfig/components/agent/config.d.ts +7 -2
- package/types/modules/filters/modules/filterConfig/components/case-author/config.d.ts +4 -1
- package/types/modules/filters/modules/filterConfig/components/case-close-reason-groups/config.d.ts +16 -4
- package/types/modules/filters/modules/filterConfig/components/case-impacted/config.d.ts +7 -2
- package/types/modules/filters/modules/filterConfig/components/case-priority/config.d.ts +7 -2
- package/types/modules/filters/modules/filterConfig/components/case-reporter/config.d.ts +7 -2
- package/types/modules/filters/modules/filterConfig/components/case-service/config.d.ts +14 -4
- package/types/modules/filters/modules/filterConfig/components/case-sla/config.d.ts +7 -2
- package/types/modules/filters/modules/filterConfig/components/case-sla-condition/config.d.ts +16 -4
- package/types/modules/filters/modules/filterConfig/components/case-source/config.d.ts +7 -1
- package/types/modules/filters/modules/filterConfig/components/case-status/config.d.ts +17 -4
- package/types/modules/filters/modules/filterConfig/components/contact/config.d.ts +7 -2
- package/types/modules/filters/modules/filterConfig/components/gateway/config.d.ts +7 -2
- package/types/modules/filters/modules/filterConfig/components/rated-by/config.d.ts +4 -1
- package/types/modules/filters/modules/filterConfig/components/user/config.d.ts +4 -1
package/package.json
CHANGED
|
@@ -1,8 +1,11 @@
|
|
|
1
|
+
import type {
|
|
2
|
+
EngineCreatePresetQueryRequest,
|
|
3
|
+
EnginePresetQuery,
|
|
4
|
+
} from '@webitel/api-services/gen/models';
|
|
5
|
+
import { getPresetQueryService } from '@webitel/api-services/gen-wire';
|
|
1
6
|
import {
|
|
2
7
|
getDefaultGetListResponse,
|
|
3
8
|
getDefaultGetParams,
|
|
4
|
-
getDefaultInstance,
|
|
5
|
-
getDefaultOpenAPIConfig,
|
|
6
9
|
} from '@webitel/ui-sdk/api/defaults/index';
|
|
7
10
|
import applyTransform, {
|
|
8
11
|
camelToSnake,
|
|
@@ -13,16 +16,6 @@ import applyTransform, {
|
|
|
13
16
|
starToSearch,
|
|
14
17
|
} from '@webitel/ui-sdk/api/transformers/index';
|
|
15
18
|
import type { Id } from '@webitel/ui-sdk/api/types/ApiModule';
|
|
16
|
-
import {
|
|
17
|
-
type EngineCreatePresetQueryRequest,
|
|
18
|
-
type EnginePresetQuery,
|
|
19
|
-
PresetQueryServiceApiFactory,
|
|
20
|
-
} from 'webitel-sdk';
|
|
21
|
-
|
|
22
|
-
const instance = getDefaultInstance();
|
|
23
|
-
const configuration = getDefaultOpenAPIConfig();
|
|
24
|
-
|
|
25
|
-
const service = PresetQueryServiceApiFactory(configuration, '', instance);
|
|
26
19
|
|
|
27
20
|
const isConflictError = (err: unknown): boolean =>
|
|
28
21
|
typeof err === 'object' &&
|
|
@@ -53,22 +46,23 @@ const getPresetList = async (
|
|
|
53
46
|
useStarToSearch ? starToSearch('search')(params) : params,
|
|
54
47
|
]);
|
|
55
48
|
try {
|
|
56
|
-
const response = await
|
|
49
|
+
const response = await getPresetQueryService().searchPresetQuery({
|
|
57
50
|
page,
|
|
58
51
|
size,
|
|
59
|
-
search
|
|
60
|
-
|
|
61
|
-
|
|
52
|
+
// the generated param is `q`; `search` is what the datalist store sends
|
|
53
|
+
q: search,
|
|
54
|
+
sort: sort || '-created_at',
|
|
55
|
+
fields: fields || [
|
|
62
56
|
'id',
|
|
63
57
|
'name',
|
|
64
58
|
'preset',
|
|
65
59
|
'description',
|
|
66
60
|
],
|
|
67
61
|
id,
|
|
68
|
-
[
|
|
62
|
+
section: [
|
|
69
63
|
presetNamespace,
|
|
70
64
|
],
|
|
71
|
-
);
|
|
65
|
+
});
|
|
72
66
|
const { items, next } = applyTransform(response.data, [
|
|
73
67
|
snakeToCamel(),
|
|
74
68
|
merge(getDefaultGetListResponse()),
|
|
@@ -86,7 +80,7 @@ const getPresetList = async (
|
|
|
86
80
|
|
|
87
81
|
const getPreset = async ({ id }: { id?: Id | null }) => {
|
|
88
82
|
try {
|
|
89
|
-
const response = await
|
|
83
|
+
const response = await getPresetQueryService().readPresetQuery(Number(id));
|
|
90
84
|
return applyTransform(response.data, [
|
|
91
85
|
snakeToCamel(),
|
|
92
86
|
]);
|
|
@@ -118,7 +112,7 @@ const addPreset = async ({
|
|
|
118
112
|
},
|
|
119
113
|
]);
|
|
120
114
|
try {
|
|
121
|
-
const response = await
|
|
115
|
+
const response = await getPresetQueryService().createPresetQuery(item);
|
|
122
116
|
return applyTransform(response.data, [
|
|
123
117
|
snakeToCamel(),
|
|
124
118
|
]);
|
|
@@ -152,7 +146,7 @@ const updatePreset = async ({
|
|
|
152
146
|
},
|
|
153
147
|
]);
|
|
154
148
|
try {
|
|
155
|
-
const response = await
|
|
149
|
+
const response = await getPresetQueryService().updatePresetQuery(id, item);
|
|
156
150
|
return applyTransform(response.data, [
|
|
157
151
|
snakeToCamel(),
|
|
158
152
|
]);
|
|
@@ -165,7 +159,9 @@ const updatePreset = async ({
|
|
|
165
159
|
|
|
166
160
|
const deletePreset = async ({ id }: { id?: Id | null }) => {
|
|
167
161
|
try {
|
|
168
|
-
const response = await
|
|
162
|
+
const response = await getPresetQueryService().deletePresetQuery(
|
|
163
|
+
Number(id),
|
|
164
|
+
);
|
|
169
165
|
return applyTransform(response.data, []);
|
|
170
166
|
} catch (err) {
|
|
171
167
|
throw applyTransform(err, [
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
+
import { SysTypesAPI as sysTypes } from '@webitel/api-services/api';
|
|
1
2
|
import type { DataField } from '@webitel/api-services/gen/models';
|
|
2
|
-
import { sysTypes } from '@webitel/ui-sdk/api/clients/index';
|
|
3
3
|
import { WtTypeExtensionFieldKind } from '@webitel/ui-sdk/enums';
|
|
4
4
|
import { get } from 'lodash';
|
|
5
5
|
import type {
|
package/src/modules/filters/modules/filterConfig/components/case-close-reason-groups/config.js
CHANGED
|
@@ -1,5 +1,7 @@
|
|
|
1
|
-
import
|
|
2
|
-
|
|
1
|
+
import {
|
|
2
|
+
CaseCloseReasonGroupsAPI,
|
|
3
|
+
CaseCloseReasonsAPI,
|
|
4
|
+
} from '@webitel/api-services/api';
|
|
3
5
|
|
|
4
6
|
export const caseCloseReasonsGroupsSearchMethod =
|
|
5
7
|
CaseCloseReasonGroupsAPI.getLookup;
|
|
@@ -1,5 +1,4 @@
|
|
|
1
|
-
import ServiceCatalogsAPI from '@webitel/
|
|
2
|
-
import ServicesAPI from '@webitel/ui-sdk/api/clients/caseServices/services';
|
|
1
|
+
import { ServiceCatalogsAPI, ServicesAPI } from '@webitel/api-services/api';
|
|
3
2
|
|
|
4
3
|
export const searchMethod = ServiceCatalogsAPI.getList;
|
|
5
4
|
export const servicesSearchMethod = ServicesAPI.getLookup;
|
|
@@ -1,5 +1,4 @@
|
|
|
1
|
-
import SLAConditionsAPI from '@webitel/
|
|
2
|
-
import SlasAPI from '@webitel/ui-sdk/api/clients/slas/slas';
|
|
1
|
+
import { SLAConditionsAPI, SlasAPI } from '@webitel/api-services/api';
|
|
3
2
|
|
|
4
3
|
export const slasConditionsSearchMethod = SLAConditionsAPI.getLookup;
|
|
5
4
|
export const slasSearchMethod = SlasAPI.getLookup;
|
|
@@ -1,5 +1,7 @@
|
|
|
1
|
-
import
|
|
2
|
-
|
|
1
|
+
import {
|
|
2
|
+
CaseStatusConditionsAPI,
|
|
3
|
+
CaseStatusesAPI as CaseStatusesApi,
|
|
4
|
+
} from '@webitel/api-services/api';
|
|
3
5
|
|
|
4
6
|
export const caseStatusesSearchMethod = CaseStatusesApi.getLookup;
|
|
5
7
|
export const caseStatusConditionsSearchMethod =
|