@webitel/api-services 26.8.30 → 26.8.32

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,8 @@
1
+ import { z } from 'zod';
2
+ /**
3
+ * Required phone-shaped value.
4
+ *
5
+ * `refine`, not `regex`: only a `custom` issue passes `params.i18nKey` to the ui.
6
+ * Empty string passes the refinement, so a blank field reports only `required`.
7
+ */
8
+ export declare const phoneNumberSchema: z.ZodString;
@@ -2,6 +2,7 @@ export * from './_shared/clearableNumber.validations';
2
2
  export * from './_shared/duration.validations';
3
3
  export * from './_shared/i18nIssue';
4
4
  export * from './_shared/lookup.validations';
5
+ export * from './_shared/phoneNumber.validations';
5
6
  export * from './_shared/variablePair.validations';
6
7
  export * from './adjunctType/adjunctType.validations';
7
8
  export * from './auditForm/auditForm.validations';
@@ -1,4 +1,11 @@
1
1
  import { z } from 'zod';
2
+ /**
3
+ * One way to reach a queue member.
4
+ *
5
+ * `destination` is only checked for non-empty: its format depends on the
6
+ * channel, which `type` does not carry. For phone channels use
7
+ * `phoneMemberCommunicationSchema`.
8
+ */
2
9
  export declare const memberCommunicationSchema: z.ZodObject<{
3
10
  destination: z.ZodString;
4
11
  type: z.ZodObject<{
@@ -14,3 +21,24 @@ export declare const memberCommunicationSchema: z.ZodObject<{
14
21
  }, z.core.$strip>>;
15
22
  description: z.ZodOptional<z.ZodString>;
16
23
  }, z.core.$strip>;
24
+ /**
25
+ * Communication for a `Phone` channel: `destination` is dialed, so it must be
26
+ * a valid number. A full schema because regle validates against object schemas.
27
+ *
28
+ * [WTEL-10374](https://webitel.atlassian.net/browse/WTEL-10374)
29
+ */
30
+ export declare const phoneMemberCommunicationSchema: z.ZodObject<{
31
+ type: z.ZodObject<{
32
+ id: z.ZodOptional<z.ZodUnion<readonly [z.ZodString, z.ZodNumber]>>;
33
+ name: z.ZodOptional<z.ZodString>;
34
+ }, z.core.$strip>;
35
+ dtmf: z.ZodOptional<z.ZodString>;
36
+ display: z.ZodOptional<z.ZodString>;
37
+ priority: z.ZodOptional<z.ZodNumber>;
38
+ resource: z.ZodOptional<z.ZodObject<{
39
+ id: z.ZodOptional<z.ZodUnion<readonly [z.ZodString, z.ZodNumber]>>;
40
+ name: z.ZodOptional<z.ZodString>;
41
+ }, z.core.$strip>>;
42
+ description: z.ZodOptional<z.ZodString>;
43
+ destination: z.ZodString;
44
+ }, z.core.$strip>;