@webitel/api-services 26.8.53 → 26.8.55

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 CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@webitel/api-services",
3
- "version": "26.8.53",
3
+ "version": "26.8.55",
4
4
  "private": false,
5
5
  "repository": {
6
6
  "type": "git",
@@ -5,6 +5,7 @@ import {
5
5
  getCaseTimeline,
6
6
  getTimeline,
7
7
  } from '../../../gen-wire';
8
+ import type { ContactsTimelineEventType } from '../../../gen-wire/_models';
8
9
 
9
10
  import { getDefaultGetParams } from '../../defaults';
10
11
  import {
@@ -24,6 +25,8 @@ const clients = {
24
25
  getCaseTimeline().getTimeline(parentId, params),
25
26
  getTimelineCounter: (parentId) =>
26
27
  getCaseTimeline().getTimelineCounter(parentId),
28
+ getTimelineItemInfo: (parentId, type, id) =>
29
+ getCaseTimeline().getTimelineItemInfo(parentId, type, id),
27
30
  queryParamsSchema: GetTimelineQueryParams,
28
31
  },
29
32
  contact: {
@@ -31,6 +34,8 @@ const clients = {
31
34
  getTimeline().getTimelineTimeline(parentId, params),
32
35
  getTimelineCounter: (parentId) =>
33
36
  getTimeline().getTimelineCounterTimeline(parentId),
37
+ getTimelineItemInfo: (parentId, type, id) =>
38
+ getTimeline().getTimelineItemInfoTimeline(parentId, type, id),
34
39
  queryParamsSchema: GetTimelineTimelineQueryParams,
35
40
  },
36
41
  } satisfies Record<
@@ -45,6 +50,13 @@ const clients = {
45
50
  getTimelineCounter: (parentId: string) => Promise<{
46
51
  data: unknown;
47
52
  }>;
53
+ getTimelineItemInfo: (
54
+ parentId: string,
55
+ type: ContactsTimelineEventType,
56
+ id: string,
57
+ ) => Promise<{
58
+ data: unknown;
59
+ }>;
48
60
  queryParamsSchema: unknown;
49
61
  }
50
62
  >;
@@ -119,16 +131,19 @@ const getCounters = async ({
119
131
  };
120
132
 
121
133
  const getInfo = async ({
134
+ entity,
122
135
  parentId,
123
136
  type,
124
137
  id,
125
138
  }: {
139
+ entity: TimelineEntity;
126
140
  parentId: ApiId;
127
- type: 'chat' | 'call' | 'email';
141
+ type: ContactsTimelineEventType;
128
142
  id: ApiId;
129
143
  }) => {
144
+ const { getTimelineItemInfo } = clients[entity];
130
145
  try {
131
- const response = await getTimeline().getTimelineItemInfoTimeline(
146
+ const response = await getTimelineItemInfo(
132
147
  String(parentId),
133
148
  type,
134
149
  String(id),
@@ -0,0 +1,9 @@
1
+ export const UserPresenceStatus = {
2
+ WEB: 'web',
3
+ SIP: 'sip',
4
+ DLG: 'dlg',
5
+ DND: 'dnd',
6
+ } as const;
7
+
8
+ export type UserPresenceStatus =
9
+ (typeof UserPresenceStatus)[keyof typeof UserPresenceStatus];
@@ -10,6 +10,7 @@ import { QueueType, QueueTypeName } from './QueueType/QueueType';
10
10
  import { RelativeDatetimeValue } from './RelativeDatetimeValue/RelativeDatetimeValue';
11
11
  import { TimeBaseScore } from './TimeBaseScore/TimeBaseScore';
12
12
  import { TypesResourceStrategy } from './TypesResourceStrategy/TypesResourceStrategy';
13
+ import { UserPresenceStatus } from './UserPresenceStatus/UserPresenceStatus';
13
14
 
14
15
  export {
15
16
  CallReportingStatus,
@@ -23,4 +24,5 @@ export {
23
24
  RelativeDatetimeValue,
24
25
  TimeBaseScore,
25
26
  TypesResourceStrategy,
27
+ UserPresenceStatus,
26
28
  };