@webitel/api-services 26.12.28 → 26.12.30

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": "26.12.28",
3
+ "version": "26.12.30",
4
4
  "private": false,
5
5
  "repository": {
6
6
  "type": "git",
@@ -87,6 +87,13 @@ const getLogsByConfigList = async ({ parentId, ...params }: ApiParams) => {
87
87
  const requestParams = toLogsListParams(
88
88
  {
89
89
  ...params,
90
+ fields: params.fields && [
91
+ ...new Set(
92
+ params.fields.map((field: string) =>
93
+ field === 'user_id' ? 'user' : field,
94
+ ),
95
+ ),
96
+ ],
90
97
  userId: params.modifiedBy ?? params.user,
91
98
  },
92
99
  getShallowFieldsToSendFromZodSchema(
@@ -34,4 +34,9 @@ export type ListSpacesParams = {
34
34
  * - SPACE_STATE_INACTIVE: Articles are kept but excluded from search and suggestions.
35
35
  */
36
36
  state?: ListSpacesState;
37
+ /**
38
+ * Optional language filter, at most 50 tags; matches the base language of
39
+ * any of them.
40
+ */
41
+ languages?: string[];
37
42
  };
@@ -6,9 +6,17 @@
6
6
  */
7
7
 
8
8
  /**
9
- * MoveArticleRequest reparents an article.
9
+ * MoveArticleRequest reparents an article, possibly into another space.
10
10
  */
11
11
  export interface WebitelKbArticlesMoveArticleBody {
12
- /** New parent id; 0 to move to top level. */
12
+ /**
13
+ * New parent id; 0 to move to top level. The article moves into the space
14
+ * of the parent.
15
+ */
13
16
  newParentId?: string;
17
+ /**
18
+ * Target space id of the same language for a move to top level; 0 keeps
19
+ * the current space. With a new parent it may only repeat its space.
20
+ */
21
+ newSpaceId?: string;
14
22
  }
@@ -34,4 +34,9 @@ export type ListSpacesParams = {
34
34
  * - SPACE_STATE_INACTIVE: Articles are kept but excluded from search and suggestions.
35
35
  */
36
36
  state?: ListSpacesState;
37
+ /**
38
+ * Optional language filter, at most 50 tags; matches the base language of
39
+ * any of them.
40
+ */
41
+ languages?: string[];
37
42
  };
@@ -6,9 +6,17 @@
6
6
  */
7
7
 
8
8
  /**
9
- * MoveArticleRequest reparents an article.
9
+ * MoveArticleRequest reparents an article, possibly into another space.
10
10
  */
11
11
  export interface WebitelKbArticlesMoveArticleBody {
12
- /** New parent id; 0 to move to top level. */
12
+ /**
13
+ * New parent id; 0 to move to top level. The article moves into the space
14
+ * of the parent.
15
+ */
13
16
  new_parent_id?: string;
17
+ /**
18
+ * Target space id of the same language for a move to top level; 0 keeps
19
+ * the current space. With a new parent it may only repeat its space.
20
+ */
21
+ new_space_id?: string;
14
22
  }
@@ -2041,9 +2041,19 @@ export const MoveArticleBody = zod
2041
2041
  new_parent_id: zod
2042
2042
  .string()
2043
2043
  .optional()
2044
- .describe('New parent id; 0 to move to top level.'),
2044
+ .describe(
2045
+ 'New parent id; 0 to move to top level. The article moves into the space\nof the parent.',
2046
+ ),
2047
+ new_space_id: zod
2048
+ .string()
2049
+ .optional()
2050
+ .describe(
2051
+ 'Target space id of the same language for a move to top level; 0 keeps\nthe current space. With a new parent it may only repeat its space.',
2052
+ ),
2045
2053
  })
2046
- .describe('MoveArticleRequest reparents an article.');
2054
+ .describe(
2055
+ 'MoveArticleRequest reparents an article, possibly into another space.',
2056
+ );
2047
2057
 
2048
2058
  export const moveArticleResponseIndexStateDefault = `INDEX_STATE_UNSPECIFIED`;
2049
2059
  export const moveArticleResponseStateDefault = `ARTICLE_STATE_UNSPECIFIED`;
@@ -574,6 +574,12 @@ export const ListSpacesQueryParams = zod.object({
574
574
  .describe(
575
575
  'Optional state filter.\n\n - SPACE_STATE_ACTIVE: Articles of the space are retrievable.\n - SPACE_STATE_INACTIVE: Articles are kept but excluded from search and suggestions.',
576
576
  ),
577
+ languages: zod
578
+ .array(zod.string())
579
+ .optional()
580
+ .describe(
581
+ 'Optional language filter, at most 50 tags; matches the base language of\nany of them.',
582
+ ),
577
583
  });
578
584
 
579
585
  export const listSpacesResponseItemsItemStateDefault = `SPACE_STATE_UNSPECIFIED`;