@webitel/api-services 26.8.76 → 26.8.78
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/pauseTemplates/__tests__/pauseTemplates.spec.ts +144 -0
- package/src/api/clients/pauseTemplates/pauseTemplates.ts +33 -71
- package/src/api/clients/workingConditions/__tests__/workingConditions.spec.ts +162 -0
- package/src/api/clients/workingConditions/workingConditions.ts +31 -46
- package/src/validations/index.ts +2 -0
- package/src/validations/pauseTemplate/__tests__/pauseTemplate.validations.spec.ts +85 -0
- package/src/validations/pauseTemplate/pauseTemplate.validations.ts +51 -0
- package/src/validations/workingCondition/__tests__/workingCondition.validations.spec.ts +81 -0
- package/src/validations/workingCondition/workingCondition.validations.ts +25 -0
- package/types/.tsbuildinfo +1 -1
- package/types/api/clients/pauseTemplates/pauseTemplates.d.ts +1 -6
- package/types/api/clients/workingConditions/workingConditions.d.ts +1 -6
- package/types/validations/index.d.ts +2 -0
- package/types/validations/pauseTemplate/pauseTemplate.validations.d.ts +30 -0
- package/types/validations/workingCondition/workingCondition.validations.d.ts +19 -0
|
@@ -1,8 +1,4 @@
|
|
|
1
1
|
import type { AddItemParams, ApiParams, DeleteItemParams, GetItemParams, UpdateItemParams } from '../_shared/types';
|
|
2
|
-
declare const getPauseTemplatesList: (params: ApiParams) => Promise<{
|
|
3
|
-
items: any;
|
|
4
|
-
next: any;
|
|
5
|
-
}>;
|
|
6
2
|
export declare const PauseTemplatesAPI: {
|
|
7
3
|
getList: (params: ApiParams) => Promise<{
|
|
8
4
|
items: any;
|
|
@@ -12,9 +8,8 @@ export declare const PauseTemplatesAPI: {
|
|
|
12
8
|
add: ({ itemInstance }: AddItemParams) => Promise<any>;
|
|
13
9
|
update: ({ itemInstance, itemId: id, }: UpdateItemParams) => Promise<any>;
|
|
14
10
|
delete: ({ id }: DeleteItemParams) => Promise<any>;
|
|
15
|
-
getLookup: (params:
|
|
11
|
+
getLookup: (params: ApiParams) => Promise<{
|
|
16
12
|
items: any;
|
|
17
13
|
next: any;
|
|
18
14
|
}>;
|
|
19
15
|
};
|
|
20
|
-
export {};
|
|
@@ -1,8 +1,4 @@
|
|
|
1
1
|
import type { AddItemParams, ApiParams, DeleteItemParams, GetItemParams, UpdateItemParams } from '../_shared/types';
|
|
2
|
-
declare const getWorkingConditionsList: (params: ApiParams) => Promise<{
|
|
3
|
-
items: any;
|
|
4
|
-
next: any;
|
|
5
|
-
}>;
|
|
6
2
|
export declare const WorkingConditionsAPI: {
|
|
7
3
|
getList: (params: ApiParams) => Promise<{
|
|
8
4
|
items: any;
|
|
@@ -12,9 +8,8 @@ export declare const WorkingConditionsAPI: {
|
|
|
12
8
|
add: ({ itemInstance }: AddItemParams) => Promise<any>;
|
|
13
9
|
update: ({ itemInstance, itemId: id, }: UpdateItemParams) => Promise<any>;
|
|
14
10
|
delete: ({ id }: DeleteItemParams) => Promise<any>;
|
|
15
|
-
getLookup: (params:
|
|
11
|
+
getLookup: (params: ApiParams) => Promise<{
|
|
16
12
|
items: any;
|
|
17
13
|
next: any;
|
|
18
14
|
}>;
|
|
19
15
|
};
|
|
20
|
-
export {};
|
|
@@ -34,6 +34,7 @@ export * from './device/device.validations';
|
|
|
34
34
|
export * from './license/licenseImport.validations';
|
|
35
35
|
export * from './OAuth/OAuth.validations';
|
|
36
36
|
export * from './onlineSkill/onlineSkill.validations';
|
|
37
|
+
export * from './pauseTemplate/pauseTemplate.validations';
|
|
37
38
|
export * from './queue/queue.rules';
|
|
38
39
|
export * from './queue/queue.validations';
|
|
39
40
|
export * from './queue/queueAmd.validations';
|
|
@@ -61,3 +62,4 @@ export * from './types';
|
|
|
61
62
|
export * from './user/user.validations';
|
|
62
63
|
export * from './userToken/userToken.validations';
|
|
63
64
|
export * from './variable/variable.validations';
|
|
65
|
+
export * from './workingCondition/workingCondition.validations';
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
import type { WfmPauseTemplateCause } from '@webitel/api-services/gen/models';
|
|
2
|
+
import { z } from 'zod';
|
|
3
|
+
/**
|
|
4
|
+
* [Claude] the pause cause is optional ("Not selected"), the duration is not.
|
|
5
|
+
*/
|
|
6
|
+
export declare const pauseTemplateCauseSchema: z.ZodObject<{
|
|
7
|
+
cause: z.ZodOptional<z.ZodNullable<z.ZodObject<{
|
|
8
|
+
id: z.ZodOptional<z.ZodUnion<readonly [z.ZodString, z.ZodNumber]>>;
|
|
9
|
+
name: z.ZodOptional<z.ZodString>;
|
|
10
|
+
}, z.core.$strip>>>;
|
|
11
|
+
duration: z.ZodPreprocess<z.ZodNumber>;
|
|
12
|
+
}, z.core.$strip>;
|
|
13
|
+
/**
|
|
14
|
+
* [Claude] a new template row: no pause cause ("Not selected"), 30 minutes.
|
|
15
|
+
* Shared by the schema default and the form's "add row" action.
|
|
16
|
+
*/
|
|
17
|
+
export declare const getDefaultPauseTemplateCause: () => WfmPauseTemplateCause & {
|
|
18
|
+
duration: string;
|
|
19
|
+
};
|
|
20
|
+
export declare const pauseTemplateSchema: z.ZodObject<{
|
|
21
|
+
causes?: z.ZodType<unknown, unknown, z.core.$ZodTypeInternals<unknown, unknown>> | undefined;
|
|
22
|
+
createdAt?: z.ZodType<unknown, unknown, z.core.$ZodTypeInternals<unknown, unknown>> | undefined;
|
|
23
|
+
createdBy?: z.ZodType<unknown, unknown, z.core.$ZodTypeInternals<unknown, unknown>> | undefined;
|
|
24
|
+
description?: z.ZodType<unknown, unknown, z.core.$ZodTypeInternals<unknown, unknown>> | undefined;
|
|
25
|
+
domainId?: z.ZodType<unknown, unknown, z.core.$ZodTypeInternals<unknown, unknown>> | undefined;
|
|
26
|
+
id?: z.ZodType<unknown, unknown, z.core.$ZodTypeInternals<unknown, unknown>> | undefined;
|
|
27
|
+
name?: z.ZodType<unknown, unknown, z.core.$ZodTypeInternals<unknown, unknown>> | undefined;
|
|
28
|
+
updatedAt?: z.ZodType<unknown, unknown, z.core.$ZodTypeInternals<unknown, unknown>> | undefined;
|
|
29
|
+
updatedBy?: z.ZodType<unknown, unknown, z.core.$ZodTypeInternals<unknown, unknown>> | undefined;
|
|
30
|
+
}, z.core.$strip>;
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import { z } from 'zod';
|
|
2
|
+
export declare const workingConditionSchema: z.ZodObject<{
|
|
3
|
+
createdAt?: z.ZodType<unknown, unknown, z.core.$ZodTypeInternals<unknown, unknown>> | undefined;
|
|
4
|
+
createdBy?: z.ZodType<unknown, unknown, z.core.$ZodTypeInternals<unknown, unknown>> | undefined;
|
|
5
|
+
daysOff?: z.ZodType<unknown, unknown, z.core.$ZodTypeInternals<unknown, unknown>> | undefined;
|
|
6
|
+
description?: z.ZodType<unknown, unknown, z.core.$ZodTypeInternals<unknown, unknown>> | undefined;
|
|
7
|
+
domainId?: z.ZodType<unknown, unknown, z.core.$ZodTypeInternals<unknown, unknown>> | undefined;
|
|
8
|
+
id?: z.ZodType<unknown, unknown, z.core.$ZodTypeInternals<unknown, unknown>> | undefined;
|
|
9
|
+
name?: z.ZodType<unknown, unknown, z.core.$ZodTypeInternals<unknown, unknown>> | undefined;
|
|
10
|
+
pauseDuration?: z.ZodType<unknown, unknown, z.core.$ZodTypeInternals<unknown, unknown>> | undefined;
|
|
11
|
+
pauseTemplate?: z.ZodType<unknown, unknown, z.core.$ZodTypeInternals<unknown, unknown>> | undefined;
|
|
12
|
+
shiftTemplate?: z.ZodType<unknown, unknown, z.core.$ZodTypeInternals<unknown, unknown>> | undefined;
|
|
13
|
+
sickLeaves?: z.ZodType<unknown, unknown, z.core.$ZodTypeInternals<unknown, unknown>> | undefined;
|
|
14
|
+
updatedAt?: z.ZodType<unknown, unknown, z.core.$ZodTypeInternals<unknown, unknown>> | undefined;
|
|
15
|
+
updatedBy?: z.ZodType<unknown, unknown, z.core.$ZodTypeInternals<unknown, unknown>> | undefined;
|
|
16
|
+
vacation?: z.ZodType<unknown, unknown, z.core.$ZodTypeInternals<unknown, unknown>> | undefined;
|
|
17
|
+
workdayHours?: z.ZodType<unknown, unknown, z.core.$ZodTypeInternals<unknown, unknown>> | undefined;
|
|
18
|
+
workdaysPerMonth?: z.ZodType<unknown, unknown, z.core.$ZodTypeInternals<unknown, unknown>> | undefined;
|
|
19
|
+
}, z.core.$strip>;
|