@webitel/api-services 0.0.70 → 0.0.71
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/api/clients/quickReplies/quickReplies.ts +20 -8
- package/src/gen/_models/searchQuickRepliesParams.ts +1 -0
- package/src/gen/quick-replies-service/quick-replies-service.zod.gen.ts +1 -0
- package/types/gen/_models/searchQuickRepliesParams.d.ts +1 -0
- package/types/gen/quick-replies-service/quick-replies-service.zod.gen.d.ts +1 -0
package/package.json
CHANGED
|
@@ -14,15 +14,26 @@ import {
|
|
|
14
14
|
const fieldsToSend = ['name', 'queues', 'article', 'teams', 'text'];
|
|
15
15
|
|
|
16
16
|
const getQuickRepliesList = async (params) => {
|
|
17
|
-
const fieldsToSend = [
|
|
17
|
+
const fieldsToSend = [
|
|
18
|
+
'page',
|
|
19
|
+
'size',
|
|
20
|
+
'q',
|
|
21
|
+
'sort',
|
|
22
|
+
'fields',
|
|
23
|
+
'id',
|
|
24
|
+
'restrictToAgent',
|
|
25
|
+
];
|
|
18
26
|
|
|
19
|
-
const { page, size, fields, sort, id, q } = applyTransform(
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
27
|
+
const { page, size, fields, sort, id, q, restrict_to_agent } = applyTransform(
|
|
28
|
+
params,
|
|
29
|
+
[
|
|
30
|
+
merge(getDefaultGetParams()),
|
|
31
|
+
(params) => ({ ...params, q: params.search }),
|
|
32
|
+
sanitize(fieldsToSend),
|
|
33
|
+
starToSearch('q'),
|
|
34
|
+
camelToSnake(),
|
|
35
|
+
],
|
|
36
|
+
);
|
|
26
37
|
|
|
27
38
|
try {
|
|
28
39
|
const response = await getQuickRepliesService().searchQuickReplies({
|
|
@@ -32,6 +43,7 @@ const getQuickRepliesList = async (params) => {
|
|
|
32
43
|
sort,
|
|
33
44
|
id,
|
|
34
45
|
q,
|
|
46
|
+
restrict_to_agent,
|
|
35
47
|
});
|
|
36
48
|
const { items, next } = applyTransform(response.data, [
|
|
37
49
|
merge(getDefaultGetListResponse()),
|
|
@@ -14,6 +14,7 @@ export const searchQuickRepliesQueryParams = zod.object({
|
|
|
14
14
|
fields: zod.array(zod.string()).optional(),
|
|
15
15
|
id: zod.array(zod.number()).optional(),
|
|
16
16
|
queue: zod.array(zod.number()).optional(),
|
|
17
|
+
restrictToAgent: zod.boolean().optional(),
|
|
17
18
|
});
|
|
18
19
|
|
|
19
20
|
export const searchQuickRepliesResponse = zod.object({
|
|
@@ -13,6 +13,7 @@ export declare const searchQuickRepliesQueryParams: zod.ZodObject<{
|
|
|
13
13
|
fields: zod.ZodOptional<zod.ZodArray<zod.ZodString>>;
|
|
14
14
|
id: zod.ZodOptional<zod.ZodArray<zod.ZodNumber>>;
|
|
15
15
|
queue: zod.ZodOptional<zod.ZodArray<zod.ZodNumber>>;
|
|
16
|
+
restrictToAgent: zod.ZodOptional<zod.ZodBoolean>;
|
|
16
17
|
}, zod.core.$strip>;
|
|
17
18
|
export declare const searchQuickRepliesResponse: zod.ZodObject<{
|
|
18
19
|
items: zod.ZodOptional<zod.ZodArray<zod.ZodObject<{
|