@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 CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@webitel/api-services",
3
- "version": "0.0.70",
3
+ "version": "0.0.71",
4
4
  "private": false,
5
5
  "scripts": {
6
6
  "make-all": "npm run gen:api && npm version patch && (npm run build:types || true) && (npm run format:all || true) && npm run publish-lib",
@@ -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 = ['page', 'size', 'q', 'sort', 'fields', 'id'];
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(params, [
20
- merge(getDefaultGetParams()),
21
- (params) => ({ ...params, q: params.search }),
22
- sanitize(fieldsToSend),
23
- starToSearch('q'),
24
- camelToSnake(),
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()),
@@ -13,4 +13,5 @@ export type SearchQuickRepliesParams = {
13
13
  fields?: string[];
14
14
  id?: number[];
15
15
  queue?: number[];
16
+ restrictToAgent?: boolean;
16
17
  };
@@ -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({
@@ -12,4 +12,5 @@ export type SearchQuickRepliesParams = {
12
12
  fields?: string[];
13
13
  id?: number[];
14
14
  queue?: number[];
15
+ restrictToAgent?: boolean;
15
16
  };
@@ -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<{