@webitel/api-services 26.8.1 → 26.8.3

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.8.1",
3
+ "version": "26.8.3",
4
4
  "private": false,
5
5
  "repository": {
6
6
  "type": "git",
@@ -118,7 +118,33 @@ const getCounters = async ({
118
118
  }
119
119
  };
120
120
 
121
+ const getInfo = async ({
122
+ parentId,
123
+ type,
124
+ id,
125
+ }: {
126
+ parentId: ApiId;
127
+ type: 'chat' | 'call' | 'email';
128
+ id: ApiId;
129
+ }) => {
130
+ try {
131
+ const response = await getTimeline().getTimelineItemInfo(
132
+ String(parentId),
133
+ type,
134
+ String(id),
135
+ );
136
+ return applyTransform(response.data, [
137
+ snakeToCamel(),
138
+ ]);
139
+ } catch (err) {
140
+ throw applyTransform(err, [
141
+ notify,
142
+ ]);
143
+ }
144
+ };
145
+
121
146
  export const TimelineAPI = {
122
147
  getList,
123
148
  getCounters,
149
+ getInfo,
124
150
  };
@@ -1,6 +1,7 @@
1
1
  import type { DataInputDictionary } from '@webitel/api-services/gen/models';
2
2
  import { z } from 'zod';
3
3
 
4
+ import { i18nIssue } from '../_shared/i18nIssue';
4
5
  import type { ZodShape } from '../types';
5
6
 
6
7
  export const adjunctTypeSchema = z.object<ZodShape<DataInputDictionary>>({
@@ -8,7 +9,10 @@ export const adjunctTypeSchema = z.object<ZodShape<DataInputDictionary>>({
8
9
  repo: z
9
10
  .string()
10
11
  .min(1)
11
- .regex(/^[a-zA-Z_][a-zA-Z0-9_]*$/),
12
+ .refine(
13
+ (value) => /^[a-zA-Z_][a-zA-Z0-9_]*$/.test(value),
14
+ i18nIssue('latinWithNumber'),
15
+ ),
12
16
  about: z.string().optional(),
13
17
  administered: z.boolean().optional(),
14
18
  primary: z.string().optional(),