@webitel/api-services 0.1.58 → 0.1.60
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/fileServices/fileServices.ts +12 -4
- package/src/validations/auditForm/auditForm.validations.ts +12 -0
- package/src/validations/index.ts +1 -0
- package/types/.tsbuildinfo +1 -1
- package/types/api/clients/fileServices/fileServices.d.ts +2 -2
- package/types/validations/auditForm/auditForm.validations.d.ts +14 -0
- package/types/validations/index.d.ts +1 -0
package/package.json
CHANGED
|
@@ -168,12 +168,16 @@ const deleteScreenRecordingsByUser = async ({
|
|
|
168
168
|
id,
|
|
169
169
|
}: {
|
|
170
170
|
userId: ApiId;
|
|
171
|
-
id: ApiId[];
|
|
171
|
+
id: ApiId | ApiId[];
|
|
172
172
|
}) => {
|
|
173
173
|
try {
|
|
174
174
|
const response = await getFileService().deleteScreenRecordings(
|
|
175
175
|
String(userId),
|
|
176
|
-
|
|
176
|
+
Array.isArray(id)
|
|
177
|
+
? id.map(String)
|
|
178
|
+
: [
|
|
179
|
+
String(id),
|
|
180
|
+
],
|
|
177
181
|
{},
|
|
178
182
|
);
|
|
179
183
|
return applyTransform(response.data, [
|
|
@@ -263,12 +267,16 @@ const deleteScreenRecordingsByAgent = async ({
|
|
|
263
267
|
id,
|
|
264
268
|
}: {
|
|
265
269
|
agentId: ApiId;
|
|
266
|
-
id: ApiId[];
|
|
270
|
+
id: ApiId | ApiId[];
|
|
267
271
|
}) => {
|
|
268
272
|
try {
|
|
269
273
|
const response = await getFileService().deleteScreenRecordingsByAgent(
|
|
270
274
|
String(agentId),
|
|
271
|
-
|
|
275
|
+
Array.isArray(id)
|
|
276
|
+
? id.map(String)
|
|
277
|
+
: [
|
|
278
|
+
String(id),
|
|
279
|
+
],
|
|
272
280
|
{},
|
|
273
281
|
);
|
|
274
282
|
return applyTransform(response.data, [
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import type { EngineAuditForm } from '@webitel/api-services/gen/models';
|
|
2
|
+
import { z } from 'zod';
|
|
3
|
+
import { lookupSchema } from '../_shared/lookup.validations';
|
|
4
|
+
import type { ZodShape } from '../types';
|
|
5
|
+
|
|
6
|
+
export const auditFormSchema = z.object<ZodShape<EngineAuditForm>>({
|
|
7
|
+
name: z.string().min(3),
|
|
8
|
+
description: z.string().optional(),
|
|
9
|
+
teams: z.array(lookupSchema).optional().default([]),
|
|
10
|
+
enabled: z.boolean().optional().default(true),
|
|
11
|
+
questions: z.array(z.any()).min(1).default([]),
|
|
12
|
+
});
|
package/src/validations/index.ts
CHANGED