@webex/calling 0.0.1-next.0 → 0.0.1-next.1

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 (122) hide show
  1. package/README.md +51 -66
  2. package/dist/module/CallHistory/CallHistory.js +84 -84
  3. package/dist/module/CallHistory/callHistoryFixtures.js +307 -307
  4. package/dist/module/CallHistory/constants.js +9 -9
  5. package/dist/module/CallHistory/types.js +1 -1
  6. package/dist/module/CallSettings/CallSettings.js +65 -65
  7. package/dist/module/CallSettings/UcmBackendConnector.js +100 -100
  8. package/dist/module/CallSettings/WxCallBackendConnector.js +287 -287
  9. package/dist/module/CallSettings/constants.js +11 -11
  10. package/dist/module/CallSettings/testFixtures.js +62 -62
  11. package/dist/module/CallSettings/types.js +1 -1
  12. package/dist/module/CallingClient/CallingClient.js +268 -268
  13. package/dist/module/CallingClient/callRecordFixtures.js +93 -93
  14. package/dist/module/CallingClient/calling/CallerId/index.js +169 -169
  15. package/dist/module/CallingClient/calling/CallerId/types.js +1 -1
  16. package/dist/module/CallingClient/calling/call.js +1649 -1649
  17. package/dist/module/CallingClient/calling/callManager.js +274 -274
  18. package/dist/module/CallingClient/calling/index.js +2 -2
  19. package/dist/module/CallingClient/calling/types.js +53 -53
  20. package/dist/module/CallingClient/callingClientFixtures.js +38 -38
  21. package/dist/module/CallingClient/constants.js +122 -122
  22. package/dist/module/CallingClient/line/index.js +110 -110
  23. package/dist/module/CallingClient/line/types.js +14 -14
  24. package/dist/module/CallingClient/registration/index.js +1 -1
  25. package/dist/module/CallingClient/registration/register.js +507 -507
  26. package/dist/module/CallingClient/registration/registerFixtures.js +28 -28
  27. package/dist/module/CallingClient/registration/types.js +1 -1
  28. package/dist/module/CallingClient/types.js +1 -1
  29. package/dist/module/Contacts/ContactsClient.js +487 -487
  30. package/dist/module/Contacts/constants.js +20 -20
  31. package/dist/module/Contacts/contactFixtures.js +284 -284
  32. package/dist/module/Contacts/types.js +10 -10
  33. package/dist/module/Errors/catalog/CallError.js +26 -26
  34. package/dist/module/Errors/catalog/CallingDeviceError.js +18 -18
  35. package/dist/module/Errors/catalog/ExtendedError.js +10 -10
  36. package/dist/module/Errors/catalog/LineError.js +24 -24
  37. package/dist/module/Errors/index.js +2 -2
  38. package/dist/module/Errors/types.js +48 -48
  39. package/dist/module/Events/impl/index.js +19 -19
  40. package/dist/module/Events/types.js +74 -74
  41. package/dist/module/Logger/index.js +114 -114
  42. package/dist/module/Logger/types.js +25 -25
  43. package/dist/module/Metrics/index.js +232 -232
  44. package/dist/module/Metrics/types.js +37 -37
  45. package/dist/module/SDKConnector/index.js +39 -39
  46. package/dist/module/SDKConnector/types.js +1 -1
  47. package/dist/module/SDKConnector/utils.js +12 -12
  48. package/dist/module/Voicemail/BroadworksBackendConnector.js +289 -289
  49. package/dist/module/Voicemail/UcmBackendConnector.js +275 -275
  50. package/dist/module/Voicemail/Voicemail.js +110 -110
  51. package/dist/module/Voicemail/WxCallBackendConnector.js +279 -279
  52. package/dist/module/Voicemail/constants.js +29 -29
  53. package/dist/module/Voicemail/types.js +1 -1
  54. package/dist/module/Voicemail/voicemailFixture.js +449 -449
  55. package/dist/module/common/Utils.js +802 -802
  56. package/dist/module/common/constants.js +40 -40
  57. package/dist/module/common/index.js +1 -1
  58. package/dist/module/common/testUtil.js +938 -938
  59. package/dist/module/common/types.js +57 -57
  60. package/dist/module/index.js +8 -8
  61. package/dist/types/CallHistory/CallHistory.d.ts +18 -18
  62. package/dist/types/CallHistory/callHistoryFixtures.d.ts +94 -94
  63. package/dist/types/CallHistory/constants.d.ts +9 -9
  64. package/dist/types/CallHistory/types.d.ts +20 -20
  65. package/dist/types/CallSettings/CallSettings.d.ts +19 -19
  66. package/dist/types/CallSettings/UcmBackendConnector.d.ts +19 -19
  67. package/dist/types/CallSettings/WxCallBackendConnector.d.ts +21 -21
  68. package/dist/types/CallSettings/constants.d.ts +11 -11
  69. package/dist/types/CallSettings/testFixtures.d.ts +15 -15
  70. package/dist/types/CallSettings/types.d.ts +107 -107
  71. package/dist/types/CallingClient/CallingClient.d.ts +37 -37
  72. package/dist/types/CallingClient/callRecordFixtures.d.ts +3 -3
  73. package/dist/types/CallingClient/calling/CallerId/index.d.ts +17 -17
  74. package/dist/types/CallingClient/calling/CallerId/types.d.ts +41 -41
  75. package/dist/types/CallingClient/calling/call.d.ts +94 -94
  76. package/dist/types/CallingClient/calling/call.d.ts.map +1 -1
  77. package/dist/types/CallingClient/calling/callManager.d.ts +21 -21
  78. package/dist/types/CallingClient/calling/index.d.ts +2 -2
  79. package/dist/types/CallingClient/calling/types.d.ts +203 -203
  80. package/dist/types/CallingClient/calling/types.d.ts.map +1 -1
  81. package/dist/types/CallingClient/callingClientFixtures.d.ts +18 -18
  82. package/dist/types/CallingClient/constants.d.ts +122 -122
  83. package/dist/types/CallingClient/line/index.d.ts +38 -38
  84. package/dist/types/CallingClient/line/types.d.ts +50 -50
  85. package/dist/types/CallingClient/registration/index.d.ts +1 -1
  86. package/dist/types/CallingClient/registration/register.d.ts +64 -64
  87. package/dist/types/CallingClient/registration/registerFixtures.d.ts +28 -28
  88. package/dist/types/CallingClient/registration/types.d.ts +20 -20
  89. package/dist/types/CallingClient/types.d.ts +29 -29
  90. package/dist/types/Contacts/ContactsClient.d.ts +27 -27
  91. package/dist/types/Contacts/constants.d.ts +19 -19
  92. package/dist/types/Contacts/contactFixtures.d.ts +280 -280
  93. package/dist/types/Contacts/types.d.ts +74 -74
  94. package/dist/types/Errors/catalog/CallError.d.ts +11 -11
  95. package/dist/types/Errors/catalog/CallingDeviceError.d.ts +10 -10
  96. package/dist/types/Errors/catalog/ExtendedError.d.ts +6 -6
  97. package/dist/types/Errors/catalog/LineError.d.ts +10 -10
  98. package/dist/types/Errors/index.d.ts +2 -2
  99. package/dist/types/Errors/types.d.ts +60 -60
  100. package/dist/types/Events/impl/index.d.ts +8 -8
  101. package/dist/types/Events/types.d.ts +283 -283
  102. package/dist/types/Logger/index.d.ts +12 -12
  103. package/dist/types/Logger/types.d.ts +25 -25
  104. package/dist/types/Metrics/index.d.ts +5 -5
  105. package/dist/types/Metrics/types.d.ts +42 -42
  106. package/dist/types/SDKConnector/index.d.ts +12 -12
  107. package/dist/types/SDKConnector/types.d.ts +128 -128
  108. package/dist/types/SDKConnector/utils.d.ts +5 -5
  109. package/dist/types/Voicemail/BroadworksBackendConnector.d.ts +27 -27
  110. package/dist/types/Voicemail/UcmBackendConnector.d.ts +34 -34
  111. package/dist/types/Voicemail/Voicemail.d.ts +27 -27
  112. package/dist/types/Voicemail/WxCallBackendConnector.d.ts +23 -23
  113. package/dist/types/Voicemail/constants.d.ts +29 -29
  114. package/dist/types/Voicemail/types.d.ts +133 -133
  115. package/dist/types/Voicemail/voicemailFixture.d.ts +349 -349
  116. package/dist/types/common/Utils.d.ts +34 -34
  117. package/dist/types/common/constants.d.ts +40 -40
  118. package/dist/types/common/index.d.ts +1 -1
  119. package/dist/types/common/testUtil.d.ts +3611 -3611
  120. package/dist/types/common/types.d.ts +191 -191
  121. package/dist/types/index.d.ts +8 -8
  122. package/package.json +6 -41
@@ -1,284 +1,284 @@
1
- import type { ICall } from '../CallingClient/calling/types';
2
- import { CallId, DisplayInformation } from '../common/types';
3
- import { CallError, CallingClientError } from '../Errors';
4
- export declare enum EVENT_KEYS {
5
- ALERTING = "call:alerting",
6
- CALL_ERROR = "call:error",
7
- CALLER_ID = "call:caller_id",
8
- CONNECT = "call:connect",
9
- DISCONNECT = "call:disconnect",
10
- ERROR = "callingClient:error",
11
- ESTABLISHED = "call:established",
12
- HELD = "call:held",
13
- HOLD_ERROR = "call:hold_error",
14
- INCOMING_CALL = "callingClient:incoming_call",
15
- OUTGOING_CALL = "callingClient:outgoing_call",
16
- PROGRESS = "call:progress",
17
- REMOTE_MEDIA = "call:remote_media",
18
- RESUME_ERROR = "call:resume_error",
19
- RESUMED = "call:resumed",
20
- TRANSFER_ERROR = "call:transfer_error",
21
- USER_SESSION_INFO = "callingClient:user_recent_sessions",
22
- CB_VOICEMESSAGE_CONTENT_GET = "call_back_voicemail_content_get",
23
- CALL_HISTORY_USER_SESSION_INFO = "callHistory:user_recent_sessions",
24
- ALL_CALLS_CLEARED = "callingClient:all_calls_cleared"
25
- }
26
- export declare enum SUPPLEMENTARY_SERVICES {
27
- HOLD = "hold",
28
- RESUME = "resume",
29
- DIVERT = "divert",
30
- TRANSFER = "transfer",
31
- PARK = "park"
32
- }
33
- export declare enum MOBIUS_MIDCALL_STATE {
34
- HELD = "HELD",
35
- CONNECTED = "CONNECTED"
36
- }
37
- export declare enum Disposition {
38
- ANSWERED = "Answered",
39
- CANCELED = "Canceled",
40
- INITIATED = "Initiated",
41
- MISSED = "MISSED"
42
- }
43
- export type CallRecordLink = {
44
- locusUrl?: string;
45
- conversationUrl?: string;
46
- callbackAddress: string;
47
- };
48
- export type CallBackInfo = {
49
- callbackAddress: string;
50
- callbackType: string;
51
- };
52
- export type LookUpInfo = {
53
- lookupLink: string;
54
- type: string;
55
- };
56
- export type CallRecordSelf = {
57
- id: string;
58
- name?: string;
59
- phoneNumber: string;
60
- };
61
- export type CallRecordListOther = {
62
- ownerId?: string;
63
- id: string;
64
- name?: string;
65
- sipUrl?: string;
66
- primaryDisplayString?: string;
67
- secondaryDisplayString?: string;
68
- isPrivate: boolean;
69
- callbackAddress: string;
70
- phoneNumber: string;
71
- contact?: string;
72
- email?: string;
73
- };
74
- export declare enum SessionType {
75
- SPARK = "SPARK",
76
- WEBEX_CALLING = "WEBEXCALLING"
77
- }
78
- export type UserSession = {
79
- id: string;
80
- sessionId: string;
81
- disposition: Disposition;
82
- startTime: string;
83
- endTime: string;
84
- url: string;
85
- durationSeconds: number;
86
- joinedDurationSeconds: number;
87
- participantCount: number;
88
- isDeleted: boolean;
89
- isPMR: boolean;
90
- correlationIds: string[];
91
- links: CallRecordLink;
92
- self: CallRecordSelf;
93
- durationSecs: number;
94
- other: CallRecordListOther;
95
- sessionType: SessionType;
96
- direction: string;
97
- };
98
- export type CallingParty = {
99
- name?: string;
100
- number?: string;
101
- privacyEnabled?: boolean;
102
- userId?: string;
103
- address?: string;
104
- };
105
- export type Item = {
106
- id?: string;
107
- duration?: number;
108
- callingParty?: CallingParty;
109
- urgent?: boolean;
110
- confidential?: boolean;
111
- read?: boolean;
112
- created?: string;
113
- messageId?: string;
114
- time?: number;
115
- };
116
- export declare enum MOBIUS_EVENT_KEYS {
117
- SERVER_EVENT_INCLUSIVE = "event:mobius",
118
- CALL_SESSION_EVENT_INCLUSIVE = "event:janus.user_recent_sessions"
119
- }
120
- export type CallSessionData = {
121
- userSessions: {
122
- userSessions: UserSession[];
123
- statusCode: number;
124
- };
125
- eventType: MOBIUS_EVENT_KEYS.CALL_SESSION_EVENT_INCLUSIVE;
126
- };
127
- export type CallSessionEvent = {
128
- id: string;
129
- data: CallSessionData;
130
- timestamp: number;
131
- trackingId: string;
132
- };
133
- export declare enum MEDIA_CONNECTION_EVENT_KEYS {
134
- ROAP_MESSAGE_TO_SEND = "roap:messageToSend",
135
- MEDIA_TYPE_AUDIO = "audio"
136
- }
137
- export type CallerIdDisplay = {
138
- correlationId: string;
139
- callerId: DisplayInformation;
140
- };
141
- export type CallEventTypes = {
142
- [EVENT_KEYS.ALERTING]: (callId: CallId) => void;
143
- [EVENT_KEYS.CALL_ERROR]: (error: CallError) => void;
144
- [EVENT_KEYS.CALLER_ID]: (display: CallerIdDisplay) => void;
145
- [EVENT_KEYS.CONNECT]: (callId: CallId) => void;
146
- [EVENT_KEYS.DISCONNECT]: (callId: CallId) => void;
147
- [EVENT_KEYS.ESTABLISHED]: (callId: CallId) => void;
148
- [EVENT_KEYS.HELD]: (callId: CallId) => void;
149
- [EVENT_KEYS.HOLD_ERROR]: (error: CallError) => void;
150
- [EVENT_KEYS.INCOMING_CALL]: (callObj: ICall) => void;
151
- [EVENT_KEYS.PROGRESS]: (callId: CallId) => void;
152
- [EVENT_KEYS.REMOTE_MEDIA]: (track: MediaStreamTrack) => void;
153
- [EVENT_KEYS.RESUME_ERROR]: (error: CallError) => void;
154
- [EVENT_KEYS.RESUMED]: (callId: CallId) => void;
155
- [EVENT_KEYS.TRANSFER_ERROR]: (error: CallError) => void;
156
- [EVENT_KEYS.ALL_CALLS_CLEARED]: () => void;
157
- };
158
- export type MessageId = {
159
- messageId: string;
160
- };
161
- export type VoicemailEventTypes = {
162
- [EVENT_KEYS.CB_VOICEMESSAGE_CONTENT_GET]: (messageId: MessageId) => void;
163
- };
164
- export type CallingClientEventTypes = {
165
- [EVENT_KEYS.ERROR]: (error: CallingClientError) => void;
166
- [EVENT_KEYS.USER_SESSION_INFO]: (event: CallSessionEvent) => void;
167
- [EVENT_KEYS.INCOMING_CALL]: (callObj: ICall) => void;
168
- [EVENT_KEYS.OUTGOING_CALL]: (callId: string) => void;
169
- [EVENT_KEYS.ALL_CALLS_CLEARED]: () => void;
170
- };
171
- export type CallHistoryEventTypes = {
172
- [EVENT_KEYS.CALL_HISTORY_USER_SESSION_INFO]: (event: CallSessionEvent) => void;
173
- };
174
- type eventType = string;
175
- export type CallerIdInfo = {
176
- 'x-broadworks-remote-party-info'?: string;
177
- 'p-asserted-identity'?: string;
178
- from?: string;
179
- };
180
- type callId = string;
181
- type deviceId = string;
182
- type correlationId = string;
183
- type callUrl = string;
184
- interface BaseMessage {
185
- eventType: eventType;
186
- correlationId: correlationId;
187
- deviceId: deviceId;
188
- callId: callId;
189
- callUrl: callUrl;
190
- }
191
- export interface CallSetupMessage extends BaseMessage {
192
- callerId: CallerIdInfo;
193
- trackingId: string;
194
- alertType: string;
195
- }
196
- export declare const WEBSOCKET_SCOPE = "mobius";
197
- export declare enum WEBSOCKET_KEYS {
198
- CALL_PROGRESS = "callprogress",
199
- CALL_CONNECTED = "callconnected",
200
- CALL_DISCONNECTED = "callconnected",
201
- CALL_INFO = "callinfo",
202
- CALL = "call",
203
- ROAP = "ROAP"
204
- }
205
- export type CallEvent = {
206
- type: 'E_RECV_CALL_SETUP';
207
- data?: unknown;
208
- } | {
209
- type: 'E_RECV_CALL_PROGRESS';
210
- data?: unknown;
211
- } | {
212
- type: 'E_RECV_CALL_CONNECT';
213
- data?: unknown;
214
- } | {
215
- type: 'E_RECV_CALL_DISCONNECT';
216
- data?: unknown;
217
- } | {
218
- type: 'E_SEND_CALL_SETUP';
219
- data?: unknown;
220
- } | {
221
- type: 'E_SEND_CALL_ALERTING';
222
- data?: unknown;
223
- } | {
224
- type: 'E_SEND_CALL_CONNECT';
225
- data?: unknown;
226
- } | {
227
- type: 'E_SEND_CALL_DISCONNECT';
228
- data?: unknown;
229
- } | {
230
- type: 'E_CALL_ESTABLISHED';
231
- data?: unknown;
232
- } | {
233
- type: 'E_CALL_INFO';
234
- data?: unknown;
235
- } | {
236
- type: 'E_UNKNOWN';
237
- data?: unknown;
238
- } | {
239
- type: 'E_CALL_CLEARED';
240
- data?: unknown;
241
- } | {
242
- type: 'E_CALL_HOLD';
243
- data?: unknown;
244
- } | {
245
- type: 'E_CALL_RESUME';
246
- data?: unknown;
247
- };
248
- export type RoapEvent = {
249
- type: 'E_SEND_ROAP_OFFER';
250
- data?: unknown;
251
- } | {
252
- type: 'E_SEND_ROAP_ANSWER';
253
- data?: unknown;
254
- } | {
255
- type: 'E_RECV_ROAP_OFFER';
256
- data?: unknown;
257
- } | {
258
- type: 'E_RECV_ROAP_ANSWER';
259
- data?: unknown;
260
- } | {
261
- type: 'E_ROAP_ERROR';
262
- data?: unknown;
263
- } | {
264
- type: 'E_ROAP_OK';
265
- data?: unknown;
266
- } | {
267
- type: 'E_RECV_ROAP_OFFER_REQUEST';
268
- data?: unknown;
269
- } | {
270
- type: 'E_ROAP_TEARDOWN';
271
- data?: unknown;
272
- };
273
- export interface RoapMessage {
274
- seq: number;
275
- messageType: 'OFFER' | 'ANSWER' | 'OK' | 'ERROR' | 'OFFER_REQUEST';
276
- offererSessionId?: string;
277
- answererSessionId?: string;
278
- sdp?: string;
279
- version?: string;
280
- tieBreaker?: string;
281
- errorType?: string;
282
- }
283
- export {};
1
+ import type { ICall } from '../CallingClient/calling/types';
2
+ import { CallId, DisplayInformation } from '../common/types';
3
+ import { CallError, CallingClientError } from '../Errors';
4
+ export declare enum EVENT_KEYS {
5
+ ALERTING = "call:alerting",
6
+ CALL_ERROR = "call:error",
7
+ CALLER_ID = "call:caller_id",
8
+ CONNECT = "call:connect",
9
+ DISCONNECT = "call:disconnect",
10
+ ERROR = "callingClient:error",
11
+ ESTABLISHED = "call:established",
12
+ HELD = "call:held",
13
+ HOLD_ERROR = "call:hold_error",
14
+ INCOMING_CALL = "callingClient:incoming_call",
15
+ OUTGOING_CALL = "callingClient:outgoing_call",
16
+ PROGRESS = "call:progress",
17
+ REMOTE_MEDIA = "call:remote_media",
18
+ RESUME_ERROR = "call:resume_error",
19
+ RESUMED = "call:resumed",
20
+ TRANSFER_ERROR = "call:transfer_error",
21
+ USER_SESSION_INFO = "callingClient:user_recent_sessions",
22
+ CB_VOICEMESSAGE_CONTENT_GET = "call_back_voicemail_content_get",
23
+ CALL_HISTORY_USER_SESSION_INFO = "callHistory:user_recent_sessions",
24
+ ALL_CALLS_CLEARED = "callingClient:all_calls_cleared"
25
+ }
26
+ export declare enum SUPPLEMENTARY_SERVICES {
27
+ HOLD = "hold",
28
+ RESUME = "resume",
29
+ DIVERT = "divert",
30
+ TRANSFER = "transfer",
31
+ PARK = "park"
32
+ }
33
+ export declare enum MOBIUS_MIDCALL_STATE {
34
+ HELD = "HELD",
35
+ CONNECTED = "CONNECTED"
36
+ }
37
+ export declare enum Disposition {
38
+ ANSWERED = "Answered",
39
+ CANCELED = "Canceled",
40
+ INITIATED = "Initiated",
41
+ MISSED = "MISSED"
42
+ }
43
+ export type CallRecordLink = {
44
+ locusUrl?: string;
45
+ conversationUrl?: string;
46
+ callbackAddress: string;
47
+ };
48
+ export type CallBackInfo = {
49
+ callbackAddress: string;
50
+ callbackType: string;
51
+ };
52
+ export type LookUpInfo = {
53
+ lookupLink: string;
54
+ type: string;
55
+ };
56
+ export type CallRecordSelf = {
57
+ id: string;
58
+ name?: string;
59
+ phoneNumber: string;
60
+ };
61
+ export type CallRecordListOther = {
62
+ ownerId?: string;
63
+ id: string;
64
+ name?: string;
65
+ sipUrl?: string;
66
+ primaryDisplayString?: string;
67
+ secondaryDisplayString?: string;
68
+ isPrivate: boolean;
69
+ callbackAddress: string;
70
+ phoneNumber: string;
71
+ contact?: string;
72
+ email?: string;
73
+ };
74
+ export declare enum SessionType {
75
+ SPARK = "SPARK",
76
+ WEBEX_CALLING = "WEBEXCALLING"
77
+ }
78
+ export type UserSession = {
79
+ id: string;
80
+ sessionId: string;
81
+ disposition: Disposition;
82
+ startTime: string;
83
+ endTime: string;
84
+ url: string;
85
+ durationSeconds: number;
86
+ joinedDurationSeconds: number;
87
+ participantCount: number;
88
+ isDeleted: boolean;
89
+ isPMR: boolean;
90
+ correlationIds: string[];
91
+ links: CallRecordLink;
92
+ self: CallRecordSelf;
93
+ durationSecs: number;
94
+ other: CallRecordListOther;
95
+ sessionType: SessionType;
96
+ direction: string;
97
+ };
98
+ export type CallingParty = {
99
+ name?: string;
100
+ number?: string;
101
+ privacyEnabled?: boolean;
102
+ userId?: string;
103
+ address?: string;
104
+ };
105
+ export type Item = {
106
+ id?: string;
107
+ duration?: number;
108
+ callingParty?: CallingParty;
109
+ urgent?: boolean;
110
+ confidential?: boolean;
111
+ read?: boolean;
112
+ created?: string;
113
+ messageId?: string;
114
+ time?: number;
115
+ };
116
+ export declare enum MOBIUS_EVENT_KEYS {
117
+ SERVER_EVENT_INCLUSIVE = "event:mobius",
118
+ CALL_SESSION_EVENT_INCLUSIVE = "event:janus.user_recent_sessions"
119
+ }
120
+ export type CallSessionData = {
121
+ userSessions: {
122
+ userSessions: UserSession[];
123
+ statusCode: number;
124
+ };
125
+ eventType: MOBIUS_EVENT_KEYS.CALL_SESSION_EVENT_INCLUSIVE;
126
+ };
127
+ export type CallSessionEvent = {
128
+ id: string;
129
+ data: CallSessionData;
130
+ timestamp: number;
131
+ trackingId: string;
132
+ };
133
+ export declare enum MEDIA_CONNECTION_EVENT_KEYS {
134
+ ROAP_MESSAGE_TO_SEND = "roap:messageToSend",
135
+ MEDIA_TYPE_AUDIO = "audio"
136
+ }
137
+ export type CallerIdDisplay = {
138
+ correlationId: string;
139
+ callerId: DisplayInformation;
140
+ };
141
+ export type CallEventTypes = {
142
+ [EVENT_KEYS.ALERTING]: (callId: CallId) => void;
143
+ [EVENT_KEYS.CALL_ERROR]: (error: CallError) => void;
144
+ [EVENT_KEYS.CALLER_ID]: (display: CallerIdDisplay) => void;
145
+ [EVENT_KEYS.CONNECT]: (callId: CallId) => void;
146
+ [EVENT_KEYS.DISCONNECT]: (callId: CallId) => void;
147
+ [EVENT_KEYS.ESTABLISHED]: (callId: CallId) => void;
148
+ [EVENT_KEYS.HELD]: (callId: CallId) => void;
149
+ [EVENT_KEYS.HOLD_ERROR]: (error: CallError) => void;
150
+ [EVENT_KEYS.INCOMING_CALL]: (callObj: ICall) => void;
151
+ [EVENT_KEYS.PROGRESS]: (callId: CallId) => void;
152
+ [EVENT_KEYS.REMOTE_MEDIA]: (track: MediaStreamTrack) => void;
153
+ [EVENT_KEYS.RESUME_ERROR]: (error: CallError) => void;
154
+ [EVENT_KEYS.RESUMED]: (callId: CallId) => void;
155
+ [EVENT_KEYS.TRANSFER_ERROR]: (error: CallError) => void;
156
+ [EVENT_KEYS.ALL_CALLS_CLEARED]: () => void;
157
+ };
158
+ export type MessageId = {
159
+ messageId: string;
160
+ };
161
+ export type VoicemailEventTypes = {
162
+ [EVENT_KEYS.CB_VOICEMESSAGE_CONTENT_GET]: (messageId: MessageId) => void;
163
+ };
164
+ export type CallingClientEventTypes = {
165
+ [EVENT_KEYS.ERROR]: (error: CallingClientError) => void;
166
+ [EVENT_KEYS.USER_SESSION_INFO]: (event: CallSessionEvent) => void;
167
+ [EVENT_KEYS.INCOMING_CALL]: (callObj: ICall) => void;
168
+ [EVENT_KEYS.OUTGOING_CALL]: (callId: string) => void;
169
+ [EVENT_KEYS.ALL_CALLS_CLEARED]: () => void;
170
+ };
171
+ export type CallHistoryEventTypes = {
172
+ [EVENT_KEYS.CALL_HISTORY_USER_SESSION_INFO]: (event: CallSessionEvent) => void;
173
+ };
174
+ type eventType = string;
175
+ export type CallerIdInfo = {
176
+ 'x-broadworks-remote-party-info'?: string;
177
+ 'p-asserted-identity'?: string;
178
+ from?: string;
179
+ };
180
+ type callId = string;
181
+ type deviceId = string;
182
+ type correlationId = string;
183
+ type callUrl = string;
184
+ interface BaseMessage {
185
+ eventType: eventType;
186
+ correlationId: correlationId;
187
+ deviceId: deviceId;
188
+ callId: callId;
189
+ callUrl: callUrl;
190
+ }
191
+ export interface CallSetupMessage extends BaseMessage {
192
+ callerId: CallerIdInfo;
193
+ trackingId: string;
194
+ alertType: string;
195
+ }
196
+ export declare const WEBSOCKET_SCOPE = "mobius";
197
+ export declare enum WEBSOCKET_KEYS {
198
+ CALL_PROGRESS = "callprogress",
199
+ CALL_CONNECTED = "callconnected",
200
+ CALL_DISCONNECTED = "callconnected",
201
+ CALL_INFO = "callinfo",
202
+ CALL = "call",
203
+ ROAP = "ROAP"
204
+ }
205
+ export type CallEvent = {
206
+ type: 'E_RECV_CALL_SETUP';
207
+ data?: unknown;
208
+ } | {
209
+ type: 'E_RECV_CALL_PROGRESS';
210
+ data?: unknown;
211
+ } | {
212
+ type: 'E_RECV_CALL_CONNECT';
213
+ data?: unknown;
214
+ } | {
215
+ type: 'E_RECV_CALL_DISCONNECT';
216
+ data?: unknown;
217
+ } | {
218
+ type: 'E_SEND_CALL_SETUP';
219
+ data?: unknown;
220
+ } | {
221
+ type: 'E_SEND_CALL_ALERTING';
222
+ data?: unknown;
223
+ } | {
224
+ type: 'E_SEND_CALL_CONNECT';
225
+ data?: unknown;
226
+ } | {
227
+ type: 'E_SEND_CALL_DISCONNECT';
228
+ data?: unknown;
229
+ } | {
230
+ type: 'E_CALL_ESTABLISHED';
231
+ data?: unknown;
232
+ } | {
233
+ type: 'E_CALL_INFO';
234
+ data?: unknown;
235
+ } | {
236
+ type: 'E_UNKNOWN';
237
+ data?: unknown;
238
+ } | {
239
+ type: 'E_CALL_CLEARED';
240
+ data?: unknown;
241
+ } | {
242
+ type: 'E_CALL_HOLD';
243
+ data?: unknown;
244
+ } | {
245
+ type: 'E_CALL_RESUME';
246
+ data?: unknown;
247
+ };
248
+ export type RoapEvent = {
249
+ type: 'E_SEND_ROAP_OFFER';
250
+ data?: unknown;
251
+ } | {
252
+ type: 'E_SEND_ROAP_ANSWER';
253
+ data?: unknown;
254
+ } | {
255
+ type: 'E_RECV_ROAP_OFFER';
256
+ data?: unknown;
257
+ } | {
258
+ type: 'E_RECV_ROAP_ANSWER';
259
+ data?: unknown;
260
+ } | {
261
+ type: 'E_ROAP_ERROR';
262
+ data?: unknown;
263
+ } | {
264
+ type: 'E_ROAP_OK';
265
+ data?: unknown;
266
+ } | {
267
+ type: 'E_RECV_ROAP_OFFER_REQUEST';
268
+ data?: unknown;
269
+ } | {
270
+ type: 'E_ROAP_TEARDOWN';
271
+ data?: unknown;
272
+ };
273
+ export interface RoapMessage {
274
+ seq: number;
275
+ messageType: 'OFFER' | 'ANSWER' | 'OK' | 'ERROR' | 'OFFER_REQUEST';
276
+ offererSessionId?: string;
277
+ answererSessionId?: string;
278
+ sdp?: string;
279
+ version?: string;
280
+ tieBreaker?: string;
281
+ errorType?: string;
282
+ }
283
+ export {};
284
284
  //# sourceMappingURL=types.d.ts.map
@@ -1,13 +1,13 @@
1
- import ExtendedError from '../Errors/catalog/ExtendedError';
2
- import { LogContext, LOGGER } from './types';
3
- declare const _default: {
4
- log: (message: string, context: LogContext) => void;
5
- error: (error: ExtendedError, context: LogContext) => void;
6
- info: (message: string, context: LogContext) => void;
7
- warn: (message: string, context: LogContext) => void;
8
- trace: (message: string, context: LogContext) => void;
9
- setLogger: (level: string, module: string) => void;
10
- getLogLevel: () => LOGGER;
11
- };
12
- export default _default;
1
+ import ExtendedError from '../Errors/catalog/ExtendedError';
2
+ import { LogContext, LOGGER } from './types';
3
+ declare const _default: {
4
+ log: (message: string, context: LogContext) => void;
5
+ error: (error: ExtendedError, context: LogContext) => void;
6
+ info: (message: string, context: LogContext) => void;
7
+ warn: (message: string, context: LogContext) => void;
8
+ trace: (message: string, context: LogContext) => void;
9
+ setLogger: (level: string, module: string) => void;
10
+ getLogLevel: () => LOGGER;
11
+ };
12
+ export default _default;
13
13
  //# sourceMappingURL=index.d.ts.map
@@ -1,26 +1,26 @@
1
- import { IMetaContext } from '../common/types';
2
- export interface LogContext extends IMetaContext {
3
- }
4
- export declare enum LOG_PREFIX {
5
- MAIN = "CALLING_SDK",
6
- FILE = "file",
7
- METHOD = "method",
8
- EVENT = "event",
9
- MESSAGE = "message",
10
- ERROR = "error"
11
- }
12
- export declare enum LOGGING_LEVEL {
13
- error = 1,
14
- warn = 2,
15
- log = 3,
16
- info = 4,
17
- trace = 5
18
- }
19
- export declare enum LOGGER {
20
- ERROR = "error",
21
- WARN = "warn",
22
- INFO = "info",
23
- LOG = "log",
24
- TRACE = "trace"
25
- }
1
+ import { IMetaContext } from '../common/types';
2
+ export interface LogContext extends IMetaContext {
3
+ }
4
+ export declare enum LOG_PREFIX {
5
+ MAIN = "CALLING_SDK",
6
+ FILE = "file",
7
+ METHOD = "method",
8
+ EVENT = "event",
9
+ MESSAGE = "message",
10
+ ERROR = "error"
11
+ }
12
+ export declare enum LOGGING_LEVEL {
13
+ error = 1,
14
+ warn = 2,
15
+ log = 3,
16
+ info = 4,
17
+ trace = 5
18
+ }
19
+ export declare enum LOGGER {
20
+ ERROR = "error",
21
+ WARN = "warn",
22
+ INFO = "info",
23
+ LOG = "log",
24
+ TRACE = "trace"
25
+ }
26
26
  //# sourceMappingURL=types.d.ts.map
@@ -1,6 +1,6 @@
1
- import { ServiceIndicator } from '../common/types';
2
- import { WebexSDK } from '../SDKConnector/types';
3
- import { IMetricManager } from './types';
4
- export declare const getMetricManager: (webex: WebexSDK, indicator?: ServiceIndicator) => IMetricManager;
5
- export default getMetricManager;
1
+ import { ServiceIndicator } from '../common/types';
2
+ import { WebexSDK } from '../SDKConnector/types';
3
+ import { IMetricManager } from './types';
4
+ export declare const getMetricManager: (webex: WebexSDK, indicator?: ServiceIndicator) => IMetricManager;
5
+ export default getMetricManager;
6
6
  //# sourceMappingURL=index.d.ts.map