@webitel/api-services 26.12.38 → 26.12.39
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/validations/_shared/__tests__/timeRange.validations.spec.ts +21 -3
- package/src/validations/_shared/timeRange.validations.ts +25 -5
- package/src/validations/shiftTemplate/__tests__/shiftTemplate.validations.spec.ts +19 -17
- package/src/validations/shiftTemplate/shiftTemplate.validations.ts +12 -3
- package/types/.tsbuildinfo +1 -1
- package/types/validations/_shared/timeRange.validations.d.ts +5 -2
|
@@ -10,16 +10,19 @@ export type TimeRangeError = {
|
|
|
10
10
|
key: string;
|
|
11
11
|
};
|
|
12
12
|
export declare const refineTimeRangeStartLessThanEnd: (item: TimeRange, ctx: z.RefinementCtx) => void;
|
|
13
|
+
/** [Claude] an empty range (start = end) is reported once, on `end` */
|
|
14
|
+
export declare const refineTimeRangeEndNotEqualStart: (item: TimeRange, ctx: z.RefinementCtx) => void;
|
|
13
15
|
export declare const timeRangeSchema: z.ZodObject<{
|
|
14
16
|
start: z.ZodNumber;
|
|
15
17
|
end: z.ZodNumber;
|
|
16
18
|
}, z.core.$strip>;
|
|
17
19
|
/**
|
|
18
|
-
* [Claude] range length in minutes
|
|
20
|
+
* [Claude] range length in minutes, crossing midnight when `end` is before `start`
|
|
21
|
+
* (22:00–06:00 → 8h); an unset bound counts as 0
|
|
19
22
|
*/
|
|
20
23
|
export declare const getTimeRangeDuration: (range: Partial<TimeRange>) => number;
|
|
21
24
|
/**
|
|
22
|
-
* [Claude] sets the length by moving `end
|
|
25
|
+
* [Claude] sets the length by moving `end`, wrapping past midnight; `start` stays
|
|
23
26
|
*/
|
|
24
27
|
export declare const setTimeRangeDuration: (range: Partial<TimeRange>, minutes: number) => void;
|
|
25
28
|
export declare const refineTimeRangesNotIntersect: <T extends TimeRange>(groupBy?: (item: T) => unknown) => (items: T[], ctx: z.RefinementCtx) => void;
|