@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 CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@webitel/api-services",
3
- "version": "0.1.58",
3
+ "version": "0.1.60",
4
4
  "private": false,
5
5
  "repository": {
6
6
  "type": "git",
@@ -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
- id.map(String),
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
- id.map(String),
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
+ });
@@ -1,3 +1,4 @@
1
+ export * from './auditForm/auditForm.validations';
1
2
  export * from './casePriority/casePriority.validations';
2
3
  export * from './caseSource/caseSource.validations';
3
4
  export * from './caseStatus/caseStatus.validations';