@webitel/api-services 26.8.75 → 26.8.77
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/shiftTemplates/__tests__/shiftTemplates.spec.ts +145 -0
- package/src/api/clients/shiftTemplates/shiftTemplates.ts +34 -45
- 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/shiftTemplate/__tests__/shiftTemplate.validations.spec.ts +146 -0
- package/src/validations/shiftTemplate/shiftTemplate.validations.ts +38 -0
- package/types/.tsbuildinfo +1 -1
- package/types/api/clients/pauseTemplates/pauseTemplates.d.ts +1 -6
- package/types/api/clients/shiftTemplates/shiftTemplates.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/shiftTemplate/shiftTemplate.validations.d.ts +23 -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 getShiftTemplatesList: (params: ApiParams) => Promise<{
|
|
3
|
-
items: any;
|
|
4
|
-
next: any;
|
|
5
|
-
}>;
|
|
6
2
|
export declare const ShiftTemplatesAPI: {
|
|
7
3
|
getList: (params: ApiParams) => Promise<{
|
|
8
4
|
items: any;
|
|
@@ -12,9 +8,8 @@ export declare const ShiftTemplatesAPI: {
|
|
|
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';
|
|
@@ -49,6 +50,7 @@ export * from './resource/resource.validations';
|
|
|
49
50
|
export * from './resourceDisplay/resourceDisplay.validations';
|
|
50
51
|
export * from './resourceGroup/resourceGroup.validations';
|
|
51
52
|
export * from './resourceInGroup/resourceInGroup.validations';
|
|
53
|
+
export * from './shiftTemplate/shiftTemplate.validations';
|
|
52
54
|
export * from './sla/sla.validations';
|
|
53
55
|
export * from './slaCondition/slaCondition.validations';
|
|
54
56
|
export * from './team/team.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,23 @@
|
|
|
1
|
+
import { z } from 'zod';
|
|
2
|
+
import { type TimeRange } from '../_shared/timeRange.validations';
|
|
3
|
+
/**
|
|
4
|
+
* [Claude] row errors for `useTimeRangesValidation`: regle marks a row as a plain field,
|
|
5
|
+
* so the custom range issues are read from the schema directly
|
|
6
|
+
*/
|
|
7
|
+
export declare const getShiftTemplateTimeRangeErrors: (items: unknown) => import("..").TimeRangeError[];
|
|
8
|
+
/**
|
|
9
|
+
* [Claude] a new template row: 9:00–18:00, 9 hours (minutes of the day).
|
|
10
|
+
* Shared by the schema default and the form's "add row" action.
|
|
11
|
+
*/
|
|
12
|
+
export declare const getDefaultShiftTemplateTime: () => TimeRange;
|
|
13
|
+
export declare const shiftTemplateSchema: z.ZodObject<{
|
|
14
|
+
createdAt?: z.ZodType<unknown, unknown, z.core.$ZodTypeInternals<unknown, unknown>> | undefined;
|
|
15
|
+
createdBy?: z.ZodType<unknown, unknown, z.core.$ZodTypeInternals<unknown, unknown>> | undefined;
|
|
16
|
+
description?: z.ZodType<unknown, unknown, z.core.$ZodTypeInternals<unknown, unknown>> | undefined;
|
|
17
|
+
domainId?: z.ZodType<unknown, unknown, z.core.$ZodTypeInternals<unknown, unknown>> | undefined;
|
|
18
|
+
id?: z.ZodType<unknown, unknown, z.core.$ZodTypeInternals<unknown, unknown>> | undefined;
|
|
19
|
+
name?: z.ZodType<unknown, unknown, z.core.$ZodTypeInternals<unknown, unknown>> | undefined;
|
|
20
|
+
times?: z.ZodType<unknown, unknown, z.core.$ZodTypeInternals<unknown, unknown>> | undefined;
|
|
21
|
+
updatedAt?: z.ZodType<unknown, unknown, z.core.$ZodTypeInternals<unknown, unknown>> | undefined;
|
|
22
|
+
updatedBy?: z.ZodType<unknown, unknown, z.core.$ZodTypeInternals<unknown, unknown>> | undefined;
|
|
23
|
+
}, z.core.$strip>;
|