@webitel/api-services 0.1.68 → 0.1.70

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.
Files changed (96) hide show
  1. package/package.json +3 -1
  2. package/src/api/clients/_shared/types.ts +25 -0
  3. package/src/api/clients/caseServiceCatalogs/serviceCatalogs.ts +37 -71
  4. package/src/api/clients/caseServices/services.ts +43 -57
  5. package/src/api/clients/index.ts +9 -0
  6. package/src/api/clients/queues/__tests__/fieldsToSend.spec.ts +135 -0
  7. package/src/api/clients/queues/__tests__/queueLogs.spec.ts +132 -0
  8. package/src/api/clients/queues/__tests__/queueMembers.spec.ts +175 -0
  9. package/src/api/clients/queues/__tests__/queues.spec.ts +130 -0
  10. package/src/api/clients/queues/defaults/__tests__/queueTypeDefaults.spec.ts +143 -0
  11. package/src/api/clients/queues/defaults/amd.ts +17 -0
  12. package/src/api/clients/queues/defaults/defaultQueue.ts +9 -0
  13. package/src/api/clients/queues/defaults/processing.ts +8 -4
  14. package/src/api/clients/queues/defaults/queueTypeDefaults.ts +305 -0
  15. package/src/api/clients/queues/queueAgents.ts +48 -0
  16. package/src/api/clients/queues/queueBuckets.ts +187 -0
  17. package/src/api/clients/queues/queueHooks.ts +184 -0
  18. package/src/api/clients/queues/queueLogs.ts +80 -0
  19. package/src/api/clients/queues/queueMembers.ts +426 -0
  20. package/src/api/clients/queues/queueResGroups.ts +176 -0
  21. package/src/api/clients/queues/queueSkills.ts +183 -0
  22. package/src/api/clients/queues/queueState.ts +97 -0
  23. package/src/api/clients/queues/queues.ts +124 -94
  24. package/src/api/clients/queues/scripts/__tests__/mapResetMembersFilters.spec.ts +132 -0
  25. package/src/api/clients/queues/scripts/mapResetMembersFilters.ts +52 -0
  26. package/src/enums/CallReportingStatus/CallReportingStatus.ts +13 -0
  27. package/src/enums/MemberStopCause/MemberStopCause.ts +13 -0
  28. package/src/enums/QueueStrategy/QueueStrategy.ts +27 -0
  29. package/src/enums/QueueType/QueueType.ts +31 -0
  30. package/src/enums/TimeBaseScore/TimeBaseScore.ts +6 -0
  31. package/src/enums/TypesResourceStrategy/TypesResourceStrategy.ts +7 -0
  32. package/src/enums/index.ts +21 -1
  33. package/src/scripts/index.ts +19 -1
  34. package/src/scripts/normalizeDatetime/normalizeDatetime.ts +132 -0
  35. package/src/validations/_shared/isFilled.ts +15 -0
  36. package/src/validations/_shared/lookup.validations.ts +28 -0
  37. package/src/validations/_shared/variablePair.validations.ts +18 -0
  38. package/src/validations/caseService/caseService.validations.ts +15 -0
  39. package/src/validations/caseServiceCatalog/caseServiceCatalog.validations.ts +23 -0
  40. package/src/validations/index.ts +14 -0
  41. package/src/validations/queue/__tests__/queue.validations.spec.ts +159 -0
  42. package/src/validations/queue/queue.rules.ts +166 -0
  43. package/src/validations/queue/queue.validations.ts +105 -0
  44. package/src/validations/queue/queueAmd.validations.ts +22 -0
  45. package/src/validations/queue/queuePayload.validations.ts +71 -0
  46. package/src/validations/queue/taskProcessing.validations.ts +21 -0
  47. package/src/validations/queueBucket/queueBucket.validations.ts +10 -0
  48. package/src/validations/queueHook/queueHook.validations.ts +10 -0
  49. package/src/validations/queueMember/memberCommunication.validations.ts +25 -0
  50. package/src/validations/queueMember/queueMember.validations.ts +38 -0
  51. package/src/validations/queueResGroup/queueResGroup.validations.ts +15 -0
  52. package/src/validations/queueSkill/queueSkill.validations.ts +42 -0
  53. package/types/.tsbuildinfo +1 -1
  54. package/types/api/clients/_shared/types.d.ts +20 -0
  55. package/types/api/clients/caseServices/services.d.ts +4 -2
  56. package/types/api/clients/index.d.ts +9 -0
  57. package/types/api/clients/queues/defaults/amd.d.ts +17 -0
  58. package/types/api/clients/queues/defaults/defaultQueue.d.ts +9 -0
  59. package/types/api/clients/queues/defaults/processing.d.ts +7 -2
  60. package/types/api/clients/queues/defaults/queueTypeDefaults.d.ts +31 -0
  61. package/types/api/clients/queues/queueAgents.d.ts +7 -0
  62. package/types/api/clients/queues/queueBuckets.d.ts +12 -0
  63. package/types/api/clients/queues/queueHooks.d.ts +12 -0
  64. package/types/api/clients/queues/queueLogs.d.ts +7 -0
  65. package/types/api/clients/queues/queueMembers.d.ts +30 -0
  66. package/types/api/clients/queues/queueResGroups.d.ts +15 -0
  67. package/types/api/clients/queues/queueSkills.d.ts +12 -0
  68. package/types/api/clients/queues/queueState.d.ts +8 -0
  69. package/types/api/clients/queues/queues.d.ts +9 -1
  70. package/types/api/clients/queues/scripts/mapResetMembersFilters.d.ts +30 -0
  71. package/types/enums/CallReportingStatus/CallReportingStatus.d.ts +11 -0
  72. package/types/enums/MemberStopCause/MemberStopCause.d.ts +11 -0
  73. package/types/enums/QueueStrategy/QueueStrategy.d.ts +21 -0
  74. package/types/enums/QueueType/QueueType.d.ts +28 -0
  75. package/types/enums/TimeBaseScore/TimeBaseScore.d.ts +5 -0
  76. package/types/enums/TypesResourceStrategy/TypesResourceStrategy.d.ts +5 -0
  77. package/types/enums/index.d.ts +7 -1
  78. package/types/scripts/index.d.ts +3 -1
  79. package/types/scripts/normalizeDatetime/normalizeDatetime.d.ts +14 -0
  80. package/types/validations/_shared/isFilled.d.ts +9 -0
  81. package/types/validations/_shared/lookup.validations.d.ts +18 -0
  82. package/types/validations/_shared/variablePair.validations.d.ts +16 -0
  83. package/types/validations/caseService/caseService.validations.d.ts +20 -0
  84. package/types/validations/caseServiceCatalog/caseServiceCatalog.validations.d.ts +21 -0
  85. package/types/validations/index.d.ts +14 -0
  86. package/types/validations/queue/queue.rules.d.ts +21 -0
  87. package/types/validations/queue/queue.validations.d.ts +285 -0
  88. package/types/validations/queue/queueAmd.validations.d.ts +22 -0
  89. package/types/validations/queue/queuePayload.validations.d.ts +75 -0
  90. package/types/validations/queue/taskProcessing.validations.d.ts +22 -0
  91. package/types/validations/queueBucket/queueBucket.validations.d.ts +9 -0
  92. package/types/validations/queueHook/queueHook.validations.d.ts +10 -0
  93. package/types/validations/queueMember/memberCommunication.validations.d.ts +16 -0
  94. package/types/validations/queueMember/queueMember.validations.d.ts +48 -0
  95. package/types/validations/queueResGroup/queueResGroup.validations.d.ts +11 -0
  96. package/types/validations/queueSkill/queueSkill.validations.d.ts +34 -0
@@ -25,3 +25,23 @@ export interface PatchItemParams {
25
25
  export interface DeleteItemParams {
26
26
  id: ApiId;
27
27
  }
28
+ /**
29
+ * Params for entities that only exist under a parent — queue hooks, skills,
30
+ * buckets, resource groups, members. ui-datalist threads `parentId` through
31
+ * every call a nested table or its card popup makes.
32
+ */
33
+ export interface NestedGetItemParams extends GetItemParams {
34
+ parentId: ApiId;
35
+ }
36
+ export interface NestedAddItemParams extends AddItemParams {
37
+ parentId: ApiId;
38
+ }
39
+ export interface NestedUpdateItemParams extends UpdateItemParams {
40
+ parentId: ApiId;
41
+ }
42
+ export interface NestedPatchItemParams extends PatchItemParams {
43
+ parentId: ApiId;
44
+ }
45
+ export interface NestedDeleteItemParams extends DeleteItemParams {
46
+ parentId: ApiId;
47
+ }
@@ -1,12 +1,14 @@
1
1
  import type { ApiId, ApiParams, DeleteItemParams, GetItemParams, PatchItemParams } from '../_shared/types';
2
- declare const getServicesList: ({ rootId, ...rest }: {
2
+ declare const getServicesList: ({ parentId, rootId, ...rest }: {
3
+ parentId?: ApiId;
3
4
  rootId: ApiId;
4
5
  } & ApiParams) => Promise<{
5
6
  items: any;
6
7
  next: any;
7
8
  }>;
8
9
  export declare const ServicesAPI: {
9
- getList: ({ rootId, ...rest }: {
10
+ getList: ({ parentId, rootId, ...rest }: {
11
+ parentId?: ApiId;
10
12
  rootId: ApiId;
11
13
  } & ApiParams) => Promise<{
12
14
  items: any;
@@ -10,6 +10,7 @@ export * from './caseCloseReasonGroups/caseCloseReasonGroups';
10
10
  export * from './caseCloseReasons/caseCloseReasons';
11
11
  export * from './casePriorities/casePriorities';
12
12
  export * from './caseServiceCatalogs/serviceCatalogs';
13
+ export * from './caseServices/services';
13
14
  export * from './caseSources/caseSources';
14
15
  export * from './caseStatusConditions/caseStatusConditions';
15
16
  export * from './caseStatuses/caseStatuses';
@@ -36,6 +37,14 @@ export * from './object/object';
36
37
  export * from './onlineSkills/onlineSkills';
37
38
  export * from './pdfServices/pdfServices';
38
39
  export * from './phones/phones';
40
+ export * from './queues/queueAgents';
41
+ export * from './queues/queueBuckets';
42
+ export * from './queues/queueHooks';
43
+ export * from './queues/queueLogs';
44
+ export * from './queues/queueMembers';
45
+ export * from './queues/queueResGroups';
46
+ export * from './queues/queueSkills';
47
+ export * from './queues/queueState';
39
48
  export * from './queues/queues';
40
49
  export * from './quickReplies/quickReplies';
41
50
  export * from './regions/regions';
@@ -0,0 +1,17 @@
1
+ export declare const amd: () => {
2
+ enabled: boolean;
3
+ ai: boolean;
4
+ positive: never[];
5
+ playback: {};
6
+ allowNotSure: boolean;
7
+ silenceNotSure: boolean;
8
+ maxWordLength: number;
9
+ maxNumberOfWords: number;
10
+ betweenWordsSilence: number;
11
+ minWordLength: number;
12
+ totalAnalysisTime: number;
13
+ silenceThreshold: number;
14
+ afterGreetingSilence: number;
15
+ greeting: number;
16
+ initialSilence: number;
17
+ };
@@ -0,0 +1,9 @@
1
+ export declare const defaultQueue: () => {
2
+ name: string;
3
+ description: string;
4
+ priority: number;
5
+ tags: never[];
6
+ dncList: {};
7
+ calendar: {};
8
+ variables: never[];
9
+ };
@@ -1,7 +1,12 @@
1
- declare const processing: (processing?: {}) => {
1
+ export declare const processing: (overrides?: {}) => {
2
2
  enabled: boolean;
3
3
  formSchema: {};
4
4
  sec: number;
5
5
  renewalSec: number;
6
+ prolongationOptions: {
7
+ enabled: boolean;
8
+ isTimeoutRetry: boolean;
9
+ prolongationTimeSec: number;
10
+ repeatsNumber: number;
11
+ };
6
12
  };
7
- export default processing;
@@ -0,0 +1,31 @@
1
+ import { QueueType } from '../../../../enums';
2
+ /**
3
+ * @description
4
+ * The default field set a queue of a given type is created with.
5
+ *
6
+ * These are NOT cosmetic. Regle builds its nested `$fields` from the *state*
7
+ * keys, not from the Zod schema shape — a field that is declared in
8
+ * `queueSchema` but missing from the draft has no validation entry at all, so
9
+ * its required marker and error text silently disappear from the form.
10
+ * Every key a queue type's UI can touch must therefore be seeded here, on
11
+ * create (via the card store) and on read (see `QueuesAPI.get`).
12
+ *
13
+ * Ported 1:1 from the admin app's legacy `store/_internals/queueSchema/*.js`.
14
+ * Keep the per-type key sets exactly as they are: `sanitize(fieldsToSend)` only
15
+ * filters top-level keys, so `payload` is sent whole and a stray cross-type
16
+ * field (e.g. `progressiveCount` on an inbound queue) would reach the backend.
17
+ */
18
+ export interface QueueDefaults {
19
+ [key: string]: unknown;
20
+ type: QueueType;
21
+ payload: Record<string, unknown>;
22
+ }
23
+ export declare const QueueTypeDefaults: Record<number, () => QueueDefaults>;
24
+ export declare const hasQueueTypeDefaults: (type: number | string | undefined) => boolean;
25
+ /**
26
+ * @description
27
+ * A fresh defaults object for `type`. Always a new object — callers deepmerge
28
+ * into it, and the legacy code relied on factories for exactly this reason.
29
+ * Falls back to the type-agnostic base when `type` is unknown.
30
+ */
31
+ export declare const getQueueDefaults: (type: number | string | undefined) => Partial<QueueDefaults>;
@@ -0,0 +1,7 @@
1
+ import type { ApiParams } from '../_shared/types';
2
+ export declare const QueueAgentsAPI: {
3
+ getList: (params: ApiParams) => Promise<{
4
+ items: any;
5
+ next: any;
6
+ }>;
7
+ };
@@ -0,0 +1,12 @@
1
+ import type { ApiParams, NestedAddItemParams, NestedDeleteItemParams, NestedGetItemParams, NestedPatchItemParams, NestedUpdateItemParams } from '../_shared/types';
2
+ export declare const QueueBucketsAPI: {
3
+ getList: (params: ApiParams) => Promise<{
4
+ items: any;
5
+ next: any;
6
+ }>;
7
+ get: ({ parentId, itemId: id, }: NestedGetItemParams) => Promise<any>;
8
+ add: ({ parentId, itemInstance, }: NestedAddItemParams) => Promise<any>;
9
+ update: ({ itemInstance, itemId: id, parentId, }: NestedUpdateItemParams) => Promise<any>;
10
+ delete: ({ parentId, id }: NestedDeleteItemParams) => Promise<any>;
11
+ patch: ({ changes, id, parentId, }: NestedPatchItemParams) => Promise<any>;
12
+ };
@@ -0,0 +1,12 @@
1
+ import type { ApiParams, NestedAddItemParams, NestedDeleteItemParams, NestedGetItemParams, NestedPatchItemParams, NestedUpdateItemParams } from '../_shared/types';
2
+ export declare const QueueHooksAPI: {
3
+ getList: (params: ApiParams) => Promise<{
4
+ items: any;
5
+ next: any;
6
+ }>;
7
+ get: ({ parentId, itemId: id }: NestedGetItemParams) => Promise<any>;
8
+ add: ({ parentId, itemInstance, }: NestedAddItemParams) => Promise<any>;
9
+ patch: ({ changes, id, parentId, }: NestedPatchItemParams) => Promise<any>;
10
+ update: ({ itemInstance, itemId: id, parentId, }: NestedUpdateItemParams) => Promise<any>;
11
+ delete: ({ parentId, id }: NestedDeleteItemParams) => Promise<any>;
12
+ };
@@ -0,0 +1,7 @@
1
+ import type { ApiParams } from '../_shared/types';
2
+ export declare const QueueLogsAPI: {
3
+ getList: (params: ApiParams) => Promise<{
4
+ items: any;
5
+ next: any;
6
+ }>;
7
+ };
@@ -0,0 +1,30 @@
1
+ import type { ApiId, ApiParams, NestedAddItemParams, NestedDeleteItemParams, NestedGetItemParams, NestedUpdateItemParams } from '../_shared/types';
2
+ export declare const QueueMembersAPI: {
3
+ getList: (params: ApiParams) => Promise<{
4
+ items: any;
5
+ next: any;
6
+ }>;
7
+ getQuantity: ({ parentId, filters, }: {
8
+ parentId: ApiId;
9
+ filters?: ApiParams;
10
+ }) => Promise<number>;
11
+ get: ({ parentId, itemId: id }: NestedGetItemParams) => Promise<any>;
12
+ add: ({ parentId, itemInstance }: NestedAddItemParams) => Promise<any>;
13
+ addBulk: ({ parentId, fileName, items, }: {
14
+ parentId: ApiId;
15
+ fileName: string;
16
+ items: ApiParams[];
17
+ }) => Promise<any>;
18
+ update: ({ itemInstance, itemId: id, parentId, }: NestedUpdateItemParams) => Promise<any>;
19
+ delete: ({ parentId, id }: NestedDeleteItemParams) => Promise<any>;
20
+ deleteBulk: ({ parentId, id, filters, }: {
21
+ parentId: ApiId;
22
+ id?: ApiId[];
23
+ filters?: ApiParams;
24
+ }) => Promise<any>;
25
+ resetMembers: ({ parentId, filters, }: {
26
+ parentId: ApiId;
27
+ filters?: ApiParams;
28
+ }) => Promise<any>;
29
+ resetActiveAttempts: (body: ApiParams) => Promise<any>;
30
+ };
@@ -0,0 +1,15 @@
1
+ import type { ApiParams, NestedAddItemParams, NestedDeleteItemParams, NestedGetItemParams, NestedUpdateItemParams } from '../_shared/types';
2
+ export declare const QueueResGroupsAPI: {
3
+ getList: (params: ApiParams) => Promise<{
4
+ items: any;
5
+ next: any;
6
+ }>;
7
+ get: ({ parentId, itemId: id, domainId, }: NestedGetItemParams & {
8
+ domainId?: string;
9
+ }) => Promise<any>;
10
+ add: ({ parentId, itemInstance, }: NestedAddItemParams) => Promise<any>;
11
+ update: ({ parentId, itemInstance, itemId: id, }: NestedUpdateItemParams) => Promise<any>;
12
+ delete: ({ parentId, id, domainId, }: NestedDeleteItemParams & {
13
+ domainId?: string;
14
+ }) => Promise<any>;
15
+ };
@@ -0,0 +1,12 @@
1
+ import type { ApiParams, NestedAddItemParams, NestedDeleteItemParams, NestedGetItemParams, NestedPatchItemParams, NestedUpdateItemParams } from '../_shared/types';
2
+ export declare const QueueSkillsAPI: {
3
+ getList: (params: ApiParams) => Promise<{
4
+ items: any;
5
+ next: any;
6
+ }>;
7
+ get: ({ parentId, itemId: id }: NestedGetItemParams) => Promise<any>;
8
+ add: ({ parentId, itemInstance, }: NestedAddItemParams) => Promise<any>;
9
+ patch: ({ changes, id, parentId, }: NestedPatchItemParams) => Promise<any>;
10
+ update: ({ itemInstance, itemId: id, parentId, }: NestedUpdateItemParams) => Promise<any>;
11
+ delete: ({ parentId, id }: NestedDeleteItemParams) => Promise<any>;
12
+ };
@@ -0,0 +1,8 @@
1
+ import type { ApiParams } from '../_shared/types';
2
+ export declare const QueuesStateAPI: {
3
+ getQueuesGlobalState: (params?: ApiParams) => Promise<any>;
4
+ setQueuesGlobalState: ({ enabled, params, }: {
5
+ enabled: boolean;
6
+ params: ApiParams;
7
+ }) => Promise<any>;
8
+ };
@@ -3,7 +3,16 @@ declare const getQueuesList: (params: ApiParams) => Promise<{
3
3
  items: any;
4
4
  next: any;
5
5
  }>;
6
+ export type { QueueDefaults } from './defaults/queueTypeDefaults';
7
+ export { getQueueDefaults, hasQueueTypeDefaults, QueueTypeDefaults, } from './defaults/queueTypeDefaults';
6
8
  export declare const QueuesAPI: {
9
+ getPermissionsList: ({ parentId, ...params }: {
10
+ parentId: import("../_shared/types").ApiId;
11
+ } & ApiParams) => Promise<{
12
+ items: any;
13
+ next: any;
14
+ }>;
15
+ patchPermissions: ({ changes, id }: PatchItemParams) => Promise<any>;
7
16
  getList: (params: ApiParams) => Promise<{
8
17
  items: any;
9
18
  next: any;
@@ -22,4 +31,3 @@ export declare const QueuesAPI: {
22
31
  next: any;
23
32
  }>;
24
33
  };
25
- export {};
@@ -0,0 +1,30 @@
1
+ import type { ApiParams } from '../../_shared/types';
2
+ export declare const mapResetMembersFilters: (filters?: ApiParams) => {
3
+ agent_id: any;
4
+ bucket_id: any;
5
+ created_at: {
6
+ from: any;
7
+ to: any;
8
+ };
9
+ priority: {
10
+ from: any;
11
+ to: any;
12
+ };
13
+ q: any;
14
+ stop_cause: any;
15
+ };
16
+ /**
17
+ * The count endpoint is a GET, so the nested messages have to be spelled out
18
+ * as dotted query keys. `qs` emits these unencoded, which is what the backend
19
+ * expects — do NOT let `camelToSnake` near them.
20
+ */
21
+ export declare const mapResetMembersQuantityFilters: (filters?: ApiParams) => {
22
+ 'created_at.from': any;
23
+ 'created_at.to': any;
24
+ 'priority.from': any;
25
+ 'priority.to': any;
26
+ agent_id: any;
27
+ bucket_id: any;
28
+ q: any;
29
+ stop_cause: any;
30
+ };
@@ -0,0 +1,11 @@
1
+ export declare const CallReportingStatus: {
2
+ readonly ABANDONED: "abandoned";
3
+ readonly CANCEL: "cancel";
4
+ readonly SUCCESS: "success";
5
+ readonly FAILED: "failed";
6
+ readonly MISSED: "missed";
7
+ readonly TIMEOUT: "timeout";
8
+ readonly ENDLESS: "endless";
9
+ readonly TRANSFERRED: "transferred";
10
+ };
11
+ export type CallReportingStatus = (typeof CallReportingStatus)[keyof typeof CallReportingStatus];
@@ -0,0 +1,11 @@
1
+ export declare const MemberStopCause: {
2
+ readonly MISSED: "missed";
3
+ readonly TIMEOUT: "timeout";
4
+ readonly FAILED: "failed";
5
+ readonly ABANDONED: "abandoned";
6
+ readonly SUCCESS: "success";
7
+ readonly CANCEL: "cancel";
8
+ readonly EXPIRED: "expired";
9
+ readonly CANCELED_BY_TIMEOUT: "canceled_by_timeout";
10
+ };
11
+ export type MemberStopCause = (typeof MemberStopCause)[keyof typeof MemberStopCause];
@@ -0,0 +1,21 @@
1
+ export declare const QueueStrategy: {
2
+ readonly FIFO: "fifo";
3
+ readonly LIFO: "lifo";
4
+ readonly STRICT_FIFO: "strict_fifo";
5
+ };
6
+ export type QueueStrategy = (typeof QueueStrategy)[keyof typeof QueueStrategy];
7
+ /**
8
+ * @description
9
+ * Select options for the queue `strategy` field, in display order.
10
+ * `name` is the raw label the admin UI shows — not a locale key.
11
+ */
12
+ export declare const QueueStrategyList: readonly [{
13
+ readonly name: "FIFO";
14
+ readonly value: "fifo";
15
+ }, {
16
+ readonly name: "LIFO";
17
+ readonly value: "lifo";
18
+ }, {
19
+ readonly name: "STRICT_FIFO";
20
+ readonly value: "strict_fifo";
21
+ }];
@@ -0,0 +1,28 @@
1
+ export declare const QueueType: {
2
+ readonly OFFLINE_QUEUE: 0;
3
+ readonly INBOUND_QUEUE: 1;
4
+ readonly OUTBOUND_IVR_QUEUE: 2;
5
+ readonly PREVIEW_DIALER: 3;
6
+ readonly PROGRESSIVE_DIALER: 4;
7
+ readonly PREDICTIVE_DIALER: 5;
8
+ readonly CHAT_INBOUND_QUEUE: 6;
9
+ readonly INBOUND_JOB_QUEUE: 7;
10
+ readonly OUTBOUND_JOB_QUEUE: 8;
11
+ readonly IM_CHAT_QUEUE: 9;
12
+ };
13
+ export type QueueType = (typeof QueueType)[keyof typeof QueueType];
14
+ export declare const QueueTypeName: {
15
+ readonly OFFLINE_QUEUE: "offline";
16
+ readonly INBOUND_QUEUE: "inbound";
17
+ readonly OUTBOUND_IVR_QUEUE: "ivr";
18
+ readonly PREVIEW_DIALER: "preview";
19
+ readonly PROGRESSIVE_DIALER: "progressive";
20
+ readonly PREDICTIVE_DIALER: "predictive";
21
+ readonly CHAT_INBOUND_QUEUE: "inbound chat";
22
+ readonly INBOUND_JOB_QUEUE: "task";
23
+ readonly OUTBOUND_JOB_QUEUE: "outbound_task";
24
+ readonly OUTBOUND_CALL: "outbound_call";
25
+ readonly IM_CHAT_QUEUE: "im_chat";
26
+ readonly NOT_IMPLEMENT: "NOT_IMPLEMENT";
27
+ };
28
+ export type QueueTypeName = (typeof QueueTypeName)[keyof typeof QueueTypeName];
@@ -0,0 +1,5 @@
1
+ export declare const TimeBaseScore: {
2
+ readonly QUEUE: "queue";
3
+ readonly SYSTEM: "system";
4
+ };
5
+ export type TimeBaseScore = (typeof TimeBaseScore)[keyof typeof TimeBaseScore];
@@ -0,0 +1,5 @@
1
+ export declare const TypesResourceStrategy: {
2
+ readonly PRIORITY_BASED: "priority-based";
3
+ readonly EVEN_DISTRIBUTION: "even-distribution";
4
+ };
5
+ export type TypesResourceStrategy = (typeof TypesResourceStrategy)[keyof typeof TypesResourceStrategy];
@@ -1,3 +1,9 @@
1
+ import { CallReportingStatus } from './CallReportingStatus/CallReportingStatus';
1
2
  import { ChatGatewayProvider } from './ChatGatewayProvider/ChatGatewayPrivider';
3
+ import { MemberStopCause } from './MemberStopCause/MemberStopCause';
4
+ import { QueueStrategy, QueueStrategyList } from './QueueStrategy/QueueStrategy';
5
+ import { QueueType, QueueTypeName } from './QueueType/QueueType';
2
6
  import { RelativeDatetimeValue } from './RelativeDatetimeValue/RelativeDatetimeValue';
3
- export { ChatGatewayProvider, RelativeDatetimeValue };
7
+ import { TimeBaseScore } from './TimeBaseScore/TimeBaseScore';
8
+ import { TypesResourceStrategy } from './TypesResourceStrategy/TypesResourceStrategy';
9
+ export { CallReportingStatus, ChatGatewayProvider, MemberStopCause, QueueStrategy, QueueStrategyList, QueueType, QueueTypeName, RelativeDatetimeValue, TimeBaseScore, TypesResourceStrategy, };
@@ -1,4 +1,6 @@
1
1
  import convertDuration from './convertDuration/convertDuration';
2
2
  import downloadFile from './downloadFile/downloadFile';
3
3
  import { FileFormat } from './downloadFile/types/fileFormat.types';
4
- export { convertDuration, downloadFile, FileFormat };
4
+ import { isRelativeDatetimeValue, normalizeDatetimeRange, normalizeToTimestamp } from './normalizeDatetime/normalizeDatetime';
5
+ export type { DatetimeRangeValue, NormalizeDatetimeOptions, NormalizeDatetimeValueParam, RelativeDatetimeRoundOption, } from './normalizeDatetime/normalizeDatetime';
6
+ export { convertDuration, downloadFile, FileFormat, isRelativeDatetimeValue, normalizeDatetimeRange, normalizeToTimestamp, };
@@ -0,0 +1,14 @@
1
+ import { RelativeDatetimeValue } from '../../enums';
2
+ export type RelativeDatetimeRoundOption = 'start' | 'end';
3
+ export type NormalizeDatetimeValueParam = RelativeDatetimeValue | number | string | null | undefined;
4
+ export type NormalizeDatetimeOptions = {
5
+ round?: RelativeDatetimeRoundOption;
6
+ };
7
+ export declare const isRelativeDatetimeValue: (value: unknown) => value is RelativeDatetimeValue;
8
+ export declare const normalizeToTimestamp: (value?: NormalizeDatetimeValueParam, options?: NormalizeDatetimeOptions) => number;
9
+ export type DatetimeRangeValue = {
10
+ from?: NormalizeDatetimeValueParam;
11
+ to?: NormalizeDatetimeValueParam;
12
+ };
13
+ export declare const isDatetimeRangeValue: (value: unknown) => value is DatetimeRangeValue;
14
+ export declare const normalizeDatetimeRange: (value?: NormalizeDatetimeValueParam | DatetimeRangeValue) => DatetimeRangeValue | undefined;
@@ -0,0 +1,9 @@
1
+ /**
2
+ * @description
3
+ * Vuelidate's `required` semantics, preserved so migrated forms keep behaving
4
+ * the same: `{}` and `[]` count as empty, but `0` and `false` are filled.
5
+ *
6
+ * Getting this wrong is silent — a queue's `priority: 0` or `enabled: false`
7
+ * would start failing a required check that never fired before.
8
+ */
9
+ export declare const isFilled: (value: unknown) => boolean;
@@ -7,3 +7,21 @@ export declare const requiredLookupSchema: z.ZodObject<{
7
7
  id: z.ZodString;
8
8
  name: z.ZodOptional<z.ZodString>;
9
9
  }, z.core.$strip>;
10
+ /**
11
+ * @description
12
+ * A lookup whose `id` may arrive as a number. Several call-center endpoints
13
+ * return numeric ids, and validating those against `lookupSchema`'s
14
+ * string-only `id` would fail a field the user filled in correctly.
15
+ */
16
+ export declare const flexibleLookupSchema: z.ZodObject<{
17
+ id: z.ZodOptional<z.ZodUnion<readonly [z.ZodString, z.ZodNumber]>>;
18
+ name: z.ZodOptional<z.ZodString>;
19
+ }, z.core.$strip>;
20
+ /**
21
+ * The same, but required — reproducing Vuelidate's `required` on a lookup,
22
+ * which treated an empty object as missing.
23
+ */
24
+ export declare const filledLookupSchema: z.ZodObject<{
25
+ id: z.ZodOptional<z.ZodUnion<readonly [z.ZodString, z.ZodNumber]>>;
26
+ name: z.ZodOptional<z.ZodString>;
27
+ }, z.core.$strip>;
@@ -0,0 +1,16 @@
1
+ import { z } from 'zod';
2
+ /**
3
+ * @description
4
+ * Queues and queue members both hold user-defined variables as an editable
5
+ * list of pairs, while the wire format is a plain map. The api modules convert
6
+ * between the two; this is the form-side shape.
7
+ */
8
+ export declare const variablePairSchema: z.ZodObject<{
9
+ key: z.ZodString;
10
+ value: z.ZodString;
11
+ }, z.core.$strip>;
12
+ /**
13
+ * The form-side pair, for the components that edit the list. Inferred from the
14
+ * schema so it cannot drift from what the api modules convert against.
15
+ */
16
+ export type VariablePair = z.infer<typeof variablePairSchema>;
@@ -0,0 +1,20 @@
1
+ import { z } from 'zod';
2
+ export declare const caseServiceSchema: z.ZodObject<{
3
+ assignee?: z.ZodType<unknown, unknown, z.core.$ZodTypeInternals<unknown, unknown>> | undefined;
4
+ catalogId?: z.ZodType<unknown, unknown, z.core.$ZodTypeInternals<unknown, unknown>> | undefined;
5
+ code?: z.ZodType<unknown, unknown, z.core.$ZodTypeInternals<unknown, unknown>> | undefined;
6
+ createdAt?: z.ZodType<unknown, unknown, z.core.$ZodTypeInternals<unknown, unknown>> | undefined;
7
+ createdBy?: z.ZodType<unknown, unknown, z.core.$ZodTypeInternals<unknown, unknown>> | undefined;
8
+ defaultPriority?: z.ZodType<unknown, unknown, z.core.$ZodTypeInternals<unknown, unknown>> | undefined;
9
+ description?: z.ZodType<unknown, unknown, z.core.$ZodTypeInternals<unknown, unknown>> | undefined;
10
+ group?: 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
+ rootId?: z.ZodType<unknown, unknown, z.core.$ZodTypeInternals<unknown, unknown>> | undefined;
14
+ searched?: z.ZodType<unknown, unknown, z.core.$ZodTypeInternals<unknown, unknown>> | undefined;
15
+ service?: z.ZodType<unknown, unknown, z.core.$ZodTypeInternals<unknown, unknown>> | undefined;
16
+ sla?: z.ZodType<unknown, unknown, z.core.$ZodTypeInternals<unknown, unknown>> | undefined;
17
+ state?: z.ZodType<unknown, unknown, z.core.$ZodTypeInternals<unknown, unknown>> | undefined;
18
+ updatedAt?: z.ZodType<unknown, unknown, z.core.$ZodTypeInternals<unknown, unknown>> | undefined;
19
+ updatedBy?: z.ZodType<unknown, unknown, z.core.$ZodTypeInternals<unknown, unknown>> | undefined;
20
+ }, z.core.$strip>;
@@ -0,0 +1,21 @@
1
+ import { z } from 'zod';
2
+ export declare const caseServiceCatalogSchema: z.ZodObject<{
3
+ closeReasonGroup?: z.ZodType<unknown, unknown, z.core.$ZodTypeInternals<unknown, unknown>> | undefined;
4
+ code?: z.ZodType<unknown, unknown, z.core.$ZodTypeInternals<unknown, unknown>> | undefined;
5
+ createdAt?: z.ZodType<unknown, unknown, z.core.$ZodTypeInternals<unknown, unknown>> | undefined;
6
+ createdBy?: z.ZodType<unknown, unknown, z.core.$ZodTypeInternals<unknown, unknown>> | undefined;
7
+ defaultPriority?: z.ZodType<unknown, unknown, z.core.$ZodTypeInternals<unknown, unknown>> | undefined;
8
+ description?: z.ZodType<unknown, unknown, z.core.$ZodTypeInternals<unknown, unknown>> | undefined;
9
+ id?: z.ZodType<unknown, unknown, z.core.$ZodTypeInternals<unknown, unknown>> | undefined;
10
+ name?: z.ZodType<unknown, unknown, z.core.$ZodTypeInternals<unknown, unknown>> | undefined;
11
+ prefix?: z.ZodType<unknown, unknown, z.core.$ZodTypeInternals<unknown, unknown>> | undefined;
12
+ searched?: z.ZodType<unknown, unknown, z.core.$ZodTypeInternals<unknown, unknown>> | undefined;
13
+ service?: z.ZodType<unknown, unknown, z.core.$ZodTypeInternals<unknown, unknown>> | undefined;
14
+ skills?: z.ZodType<unknown, unknown, z.core.$ZodTypeInternals<unknown, unknown>> | undefined;
15
+ sla?: z.ZodType<unknown, unknown, z.core.$ZodTypeInternals<unknown, unknown>> | undefined;
16
+ state?: z.ZodType<unknown, unknown, z.core.$ZodTypeInternals<unknown, unknown>> | undefined;
17
+ status?: z.ZodType<unknown, unknown, z.core.$ZodTypeInternals<unknown, unknown>> | undefined;
18
+ teams?: z.ZodType<unknown, unknown, z.core.$ZodTypeInternals<unknown, unknown>> | undefined;
19
+ updatedAt?: z.ZodType<unknown, unknown, z.core.$ZodTypeInternals<unknown, unknown>> | undefined;
20
+ updatedBy?: z.ZodType<unknown, unknown, z.core.$ZodTypeInternals<unknown, unknown>> | undefined;
21
+ }, z.core.$strip>;
@@ -1,11 +1,14 @@
1
1
  export * from './_shared/duration.validations';
2
2
  export * from './_shared/lookup.validations';
3
+ export * from './_shared/variablePair.validations';
3
4
  export * from './auditForm/auditForm.validations';
4
5
  export * from './bucket/bucket.validations';
5
6
  export * from './calendar/calendar.validations';
6
7
  export * from './caseCloseReason/caseCloseReason.validations';
7
8
  export * from './caseCloseReasonGroup/caseCloseReasonGroup.validations';
8
9
  export * from './casePriority/casePriority.validations';
10
+ export * from './caseService/caseService.validations';
11
+ export * from './caseServiceCatalog/caseServiceCatalog.validations';
9
12
  export * from './caseSource/caseSource.validations';
10
13
  export * from './caseStatus/caseStatus.validations';
11
14
  export * from './caseStatusCondition/caseStatusCondition.validations';
@@ -13,6 +16,17 @@ export * from './contactGroup/contactGroup.validations';
13
16
  export * from './contactGroupCondition/contactGroupCondition.validations';
14
17
  export * from './OAuth/OAuth.validations';
15
18
  export * from './onlineSkill/onlineSkill.validations';
19
+ export * from './queue/queue.rules';
20
+ export * from './queue/queue.validations';
21
+ export * from './queue/queueAmd.validations';
22
+ export * from './queue/queuePayload.validations';
23
+ export * from './queue/taskProcessing.validations';
24
+ export * from './queueBucket/queueBucket.validations';
25
+ export * from './queueHook/queueHook.validations';
26
+ export * from './queueMember/memberCommunication.validations';
27
+ export * from './queueMember/queueMember.validations';
28
+ export * from './queueResGroup/queueResGroup.validations';
29
+ export * from './queueSkill/queueSkill.validations';
16
30
  export * from './sla/sla.validations';
17
31
  export * from './slaCondition/slaCondition.validations';
18
32
  export * from './types';
@@ -0,0 +1,21 @@
1
+ export interface QueueTypeRule {
2
+ /** dot-paths, relative to the queue object */
3
+ required?: string[];
4
+ /** dot-path → inclusive minimum */
5
+ minValue?: Record<string, number>;
6
+ }
7
+ /**
8
+ * @description
9
+ * Per-queue-type validation, transcribed from the admin app's
10
+ * `opened-queue.vue` `validations()` switch.
11
+ *
12
+ * Two things in here look like mistakes and are not:
13
+ *
14
+ * - `team` is commented "required" in every legacy queue schema but was never
15
+ * actually validated. That is preserved — adding it would start rejecting
16
+ * queues that save fine today.
17
+ * - `priority` and `payload.minOnlineAgents` carry `minValue(0)` for *all* ten
18
+ * types, including the ones whose form never shows `minOnlineAgents`.
19
+ */
20
+ export declare const sharedQueueRules: QueueTypeRule;
21
+ export declare const queueTypeRules: Record<number, QueueTypeRule>;