@webitel/api-services 26.8.69 → 26.8.71

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.
@@ -0,0 +1,2 @@
1
+ export declare const minToSec: (min: number) => number;
2
+ export declare const secToMin: (sec: number) => number;
@@ -1,6 +1,7 @@
1
1
  import convertDuration from './convertDuration/convertDuration';
2
+ import { minToSec, secToMin } from './convertTimeUnits/convertTimeUnits';
2
3
  import downloadFile from './downloadFile/downloadFile';
3
4
  import { FileFormat } from './downloadFile/types/fileFormat.types';
4
5
  import { isRelativeDatetimeValue, normalizeDatetimeRange, normalizeToTimestamp } from './normalizeDatetime/normalizeDatetime';
5
6
  export type { DatetimeRangeValue, NormalizeDatetimeOptions, NormalizeDatetimeValueParam, RelativeDatetimeRoundOption, } from './normalizeDatetime/normalizeDatetime';
6
- export { convertDuration, downloadFile, FileFormat, isRelativeDatetimeValue, normalizeDatetimeRange, normalizeToTimestamp, };
7
+ export { convertDuration, downloadFile, FileFormat, isRelativeDatetimeValue, minToSec, normalizeDatetimeRange, normalizeToTimestamp, secToMin, };
@@ -0,0 +1,18 @@
1
+ import { z } from 'zod';
2
+ export declare const dayMinuteSchema: z.ZodNumber;
3
+ export type TimeRange = {
4
+ start: number;
5
+ end: number;
6
+ };
7
+ export type TimeRangeError = {
8
+ index: number;
9
+ prop: string;
10
+ key: string;
11
+ };
12
+ export declare const refineTimeRangeStartLessThanEnd: (item: TimeRange, ctx: z.RefinementCtx) => void;
13
+ export declare const timeRangeSchema: z.ZodObject<{
14
+ start: z.ZodNumber;
15
+ end: z.ZodNumber;
16
+ }, z.core.$strip>;
17
+ export declare const refineTimeRangesNotIntersect: <T extends TimeRange>(groupBy?: (item: T) => unknown) => (items: T[], ctx: z.RefinementCtx) => void;
18
+ export declare const getTimeRangeErrors: (schema: z.ZodType, items: unknown) => TimeRangeError[];
@@ -1,10 +1,4 @@
1
1
  import { z } from 'zod';
2
- export type CalendarDayRangeIssue = {
3
- index: number;
4
- prop: string;
5
- /** message key, resolve as `validation.<key>` */
6
- key: string;
7
- };
8
2
  /**
9
3
  * The same rules as the card schema, reported per row so a form can mark the
10
4
  * offending inputs while the user types.
@@ -13,7 +7,7 @@ export type CalendarDayRangeIssue = {
13
7
  * verdicts (overlapping ranges) are only re-derived by a full `$validate()`,
14
8
  * so a row the user has not touched keeps a message that is no longer true.
15
9
  */
16
- export declare const getCalendarDayRangeIssues: (items: unknown) => CalendarDayRangeIssue[];
10
+ export declare const getCalendarDayRangeErrors: (items: unknown) => import("..").TimeRangeError[];
17
11
  export declare const calendarExceptSchema: z.ZodObject<{
18
12
  name: z.ZodString;
19
13
  date: z.ZodOptional<z.ZodUnion<readonly [z.ZodNumber, z.ZodString]>>;
@@ -23,10 +23,10 @@ export declare const caseSchema: z.ZodObject<{
23
23
  final: z.ZodOptional<z.ZodBoolean>;
24
24
  initial: z.ZodOptional<z.ZodBoolean>;
25
25
  }, z.core.$loose>>;
26
- closeReason: z.ZodOptional<z.ZodNullable<z.ZodObject<{
26
+ closeReason: z.ZodDefault<z.ZodOptional<z.ZodNullable<z.ZodObject<{
27
27
  id: z.ZodOptional<z.ZodString>;
28
28
  name: z.ZodOptional<z.ZodString>;
29
- }, z.core.$loose>>>;
29
+ }, z.core.$loose>>>>;
30
30
  closeResult: z.ZodDefault<z.ZodString>;
31
31
  }, z.core.$strip>;
32
32
  type CaseCloseFields = Pick<z.infer<typeof caseSchema>, 'statusCondition' | 'closeReason' | 'closeResult'>;
@@ -3,6 +3,7 @@ export * from './_shared/duration.validations';
3
3
  export * from './_shared/i18nIssue';
4
4
  export * from './_shared/lookup.validations';
5
5
  export * from './_shared/phoneNumber.validations';
6
+ export * from './_shared/timeRange.validations';
6
7
  export * from './_shared/variablePair.validations';
7
8
  export * from './adjunctType/adjunctType.validations';
8
9
  export * from './agent/agent.validations';
@@ -44,6 +45,8 @@ export * from './queueMember/memberCommunication.validations';
44
45
  export * from './queueMember/queueMember.validations';
45
46
  export * from './queueResGroup/queueResGroup.validations';
46
47
  export * from './queueSkill/queueSkill.validations';
48
+ export * from './resourceGroup/resourceGroup.validations';
49
+ export * from './resourceInGroup/resourceInGroup.validations';
47
50
  export * from './sla/sla.validations';
48
51
  export * from './slaCondition/slaCondition.validations';
49
52
  export * from './team/team.validations';
@@ -0,0 +1,17 @@
1
+ import { z } from 'zod';
2
+ import { type TimeRange } from '../_shared/timeRange.validations';
3
+ export declare const getResourceGroupTimeRangeErrors: (items: unknown) => import("..").TimeRangeError[];
4
+ export declare const getDefaultResourceGroupTimeRange: () => TimeRange;
5
+ export declare const resourceGroupSchema: z.ZodObject<{
6
+ communication?: z.ZodType<unknown, unknown, z.core.$ZodTypeInternals<unknown, unknown>> | undefined;
7
+ createdAt?: z.ZodType<unknown, unknown, z.core.$ZodTypeInternals<unknown, unknown>> | undefined;
8
+ createdBy?: z.ZodType<unknown, unknown, z.core.$ZodTypeInternals<unknown, unknown>> | undefined;
9
+ description?: z.ZodType<unknown, unknown, z.core.$ZodTypeInternals<unknown, unknown>> | undefined;
10
+ domainId?: z.ZodType<unknown, unknown, z.core.$ZodTypeInternals<unknown, unknown>> | undefined;
11
+ id?: z.ZodType<unknown, unknown, z.core.$ZodTypeInternals<unknown, unknown>> | undefined;
12
+ name?: z.ZodType<unknown, unknown, z.core.$ZodTypeInternals<unknown, unknown>> | undefined;
13
+ strategy?: z.ZodType<unknown, unknown, z.core.$ZodTypeInternals<unknown, unknown>> | undefined;
14
+ time?: z.ZodType<unknown, unknown, z.core.$ZodTypeInternals<unknown, unknown>> | undefined;
15
+ updatedAt?: z.ZodType<unknown, unknown, z.core.$ZodTypeInternals<unknown, unknown>> | undefined;
16
+ updatedBy?: z.ZodType<unknown, unknown, z.core.$ZodTypeInternals<unknown, unknown>> | undefined;
17
+ }, z.core.$strip>;
@@ -0,0 +1,8 @@
1
+ import { z } from 'zod';
2
+ export declare const resourceInGroupSchema: z.ZodObject<{
3
+ groupId?: z.ZodType<unknown, unknown, z.core.$ZodTypeInternals<unknown, unknown>> | undefined;
4
+ id?: z.ZodType<unknown, unknown, z.core.$ZodTypeInternals<unknown, unknown>> | undefined;
5
+ priority?: z.ZodType<unknown, unknown, z.core.$ZodTypeInternals<unknown, unknown>> | undefined;
6
+ reserveResource?: z.ZodType<unknown, unknown, z.core.$ZodTypeInternals<unknown, unknown>> | undefined;
7
+ resource?: z.ZodType<unknown, unknown, z.core.$ZodTypeInternals<unknown, unknown>> | undefined;
8
+ }, z.core.$strip>;