@webex/calling 3.12.0-next.60 → 3.12.0-next.61
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/dist/CallRecording/CallRecording.js +158 -0
- package/dist/CallRecording/CallRecording.js.map +1 -0
- package/dist/CallRecording/CallRecording.test.js +257 -0
- package/dist/CallRecording/CallRecording.test.js.map +1 -0
- package/dist/CallRecording/WxcCallRecordingConnector.js +576 -0
- package/dist/CallRecording/WxcCallRecordingConnector.js.map +1 -0
- package/dist/CallRecording/WxcCallRecordingConnector.test.js +651 -0
- package/dist/CallRecording/WxcCallRecordingConnector.test.js.map +1 -0
- package/dist/CallRecording/callRecordingFixtures.js +235 -0
- package/dist/CallRecording/callRecordingFixtures.js.map +1 -0
- package/dist/CallRecording/constants.js +49 -0
- package/dist/CallRecording/constants.js.map +1 -0
- package/dist/CallRecording/types.js +136 -0
- package/dist/CallRecording/types.js.map +1 -0
- package/dist/CallRecording/utils.js +42 -0
- package/dist/CallRecording/utils.js.map +1 -0
- package/dist/CallRecording/utils.test.js +97 -0
- package/dist/CallRecording/utils.test.js.map +1 -0
- package/dist/Events/types.js +28 -1
- package/dist/Events/types.js.map +1 -1
- package/dist/SDKConnector/types.js.map +1 -1
- package/dist/api.js +56 -0
- package/dist/api.js.map +1 -1
- package/dist/common/testUtil.js +2 -1
- package/dist/common/testUtil.js.map +1 -1
- package/dist/common/types.js +1 -0
- package/dist/common/types.js.map +1 -1
- package/dist/index.js +138 -45
- package/dist/index.js.map +1 -1
- package/dist/module/CallRecording/CallRecording.js +56 -0
- package/dist/module/CallRecording/WxcCallRecordingConnector.js +264 -0
- package/dist/module/CallRecording/callRecordingFixtures.js +201 -0
- package/dist/module/CallRecording/constants.js +27 -0
- package/dist/module/CallRecording/types.js +19 -0
- package/dist/module/CallRecording/utils.js +14 -0
- package/dist/module/Events/types.js +19 -0
- package/dist/module/api.js +3 -2
- package/dist/module/common/testUtil.js +1 -0
- package/dist/module/common/types.js +1 -0
- package/dist/module/index.js +4 -1
- package/dist/types/CallRecording/CallRecording.d.ts +18 -0
- package/dist/types/CallRecording/CallRecording.d.ts.map +1 -0
- package/dist/types/CallRecording/WxcCallRecordingConnector.d.ts +23 -0
- package/dist/types/CallRecording/WxcCallRecordingConnector.d.ts.map +1 -0
- package/dist/types/CallRecording/callRecordingFixtures.d.ts +61 -0
- package/dist/types/CallRecording/callRecordingFixtures.d.ts.map +1 -0
- package/dist/types/CallRecording/constants.d.ts +28 -0
- package/dist/types/CallRecording/constants.d.ts.map +1 -0
- package/dist/types/CallRecording/types.d.ts +176 -0
- package/dist/types/CallRecording/types.d.ts.map +1 -0
- package/dist/types/CallRecording/utils.d.ts +3 -0
- package/dist/types/CallRecording/utils.d.ts.map +1 -0
- package/dist/types/Events/types.d.ts +65 -2
- package/dist/types/Events/types.d.ts.map +1 -1
- package/dist/types/SDKConnector/types.d.ts +2 -0
- package/dist/types/SDKConnector/types.d.ts.map +1 -1
- package/dist/types/api.d.ts +6 -4
- package/dist/types/api.d.ts.map +1 -1
- package/dist/types/common/testUtil.d.ts +1 -0
- package/dist/types/common/testUtil.d.ts.map +1 -1
- package/dist/types/common/types.d.ts +2 -1
- package/dist/types/common/types.d.ts.map +1 -1
- package/dist/types/index.d.ts +4 -1
- package/dist/types/index.d.ts.map +1 -1
- package/package.json +1 -1
|
@@ -0,0 +1,264 @@
|
|
|
1
|
+
import SDKConnector from '../SDKConnector';
|
|
2
|
+
import { ALLOWED_SERVICES, HTTP_METHODS } from '../common/types';
|
|
3
|
+
import log from '../Logger';
|
|
4
|
+
import { serviceErrorCodeHandler, uploadLogs } from '../common/Utils';
|
|
5
|
+
import { METHOD_START_MESSAGE, SUCCESS_MESSAGE, SUCCESS_STATUS_CODE } from '../common/constants';
|
|
6
|
+
import { COMMON_EVENT_KEYS, MOBIUS_EVENT_KEYS, RECORDING_EVENT_SUBTYPE, } from '../Events/types';
|
|
7
|
+
import { Eventing } from '../Events/impl';
|
|
8
|
+
import { RecordingRequestType, } from './types';
|
|
9
|
+
import { CALL_RECORDING_FILE, CONVERGED_RECORDINGS, DEFAULT_MAX, DEFAULT_NUMBER_OF_DAYS, DEFAULT_STATUS, FORMAT, FROM, LOCATION_ID, MAX, METADATA, METHODS, OWNER_TYPE, RECORDING_NOT_FOUND_MESSAGE, SERVICE_TYPE, STATUS, STORAGE_REGION, TO, TOPIC, WEBEX_USER_REQUEST_HEADER, } from './constants';
|
|
10
|
+
export class WxcCallRecordingConnector extends Eventing {
|
|
11
|
+
sdkConnector;
|
|
12
|
+
webex;
|
|
13
|
+
recordingServiceUrl;
|
|
14
|
+
constructor(webex, logger) {
|
|
15
|
+
super();
|
|
16
|
+
this.sdkConnector = SDKConnector;
|
|
17
|
+
if (!this.sdkConnector.getWebex()) {
|
|
18
|
+
SDKConnector.setWebex(webex);
|
|
19
|
+
}
|
|
20
|
+
this.webex = this.sdkConnector.getWebex();
|
|
21
|
+
this.recordingServiceUrl =
|
|
22
|
+
this.webex.internal.services._serviceUrls?.hydraDeveloperApi ||
|
|
23
|
+
this.webex.internal.services.get(this.webex.internal.services._activeServices?.hydraDeveloperApi);
|
|
24
|
+
this.registerRecordingListeners();
|
|
25
|
+
log.setLogger(logger.level, CALL_RECORDING_FILE);
|
|
26
|
+
}
|
|
27
|
+
buildRecordingsUrl(options) {
|
|
28
|
+
const params = new URLSearchParams();
|
|
29
|
+
let fromDate = options?.from;
|
|
30
|
+
if (!fromDate) {
|
|
31
|
+
const date = new Date();
|
|
32
|
+
date.setDate(date.getDate() - (options?.days ?? DEFAULT_NUMBER_OF_DAYS));
|
|
33
|
+
fromDate = date.toISOString();
|
|
34
|
+
}
|
|
35
|
+
const toDate = options?.to ?? new Date().toISOString();
|
|
36
|
+
params.append(FROM, fromDate);
|
|
37
|
+
params.append(TO, toDate);
|
|
38
|
+
params.append(STATUS, options?.status ?? DEFAULT_STATUS);
|
|
39
|
+
params.append(MAX, `${options?.max ?? DEFAULT_MAX}`);
|
|
40
|
+
const optionalParams = [
|
|
41
|
+
[SERVICE_TYPE, options?.serviceType],
|
|
42
|
+
[FORMAT, options?.format],
|
|
43
|
+
[OWNER_TYPE, options?.ownerType],
|
|
44
|
+
[STORAGE_REGION, options?.storageRegion],
|
|
45
|
+
[LOCATION_ID, options?.locationId],
|
|
46
|
+
[TOPIC, options?.topic],
|
|
47
|
+
];
|
|
48
|
+
optionalParams.forEach(([key, value]) => {
|
|
49
|
+
if (value) {
|
|
50
|
+
params.append(key, value);
|
|
51
|
+
}
|
|
52
|
+
});
|
|
53
|
+
return `${this.recordingServiceUrl}/${CONVERGED_RECORDINGS}?${params.toString()}`;
|
|
54
|
+
}
|
|
55
|
+
getCallRecording(request) {
|
|
56
|
+
return this.dispatchGetCallRecording(request);
|
|
57
|
+
}
|
|
58
|
+
dispatchGetCallRecording(request) {
|
|
59
|
+
switch (request.type) {
|
|
60
|
+
case RecordingRequestType.LIST:
|
|
61
|
+
return this.getRecordings(request.options);
|
|
62
|
+
case RecordingRequestType.DETAIL:
|
|
63
|
+
return this.getRecording(request.recordingId);
|
|
64
|
+
case RecordingRequestType.METADATA:
|
|
65
|
+
return this.getRecordingMetadata(request.recordingId);
|
|
66
|
+
case RecordingRequestType.BY_CALL_SESSION:
|
|
67
|
+
return this.getRecordingsByCallSessionId(request.callSessionId, request.options);
|
|
68
|
+
default: {
|
|
69
|
+
const exhaustiveCheck = request;
|
|
70
|
+
throw new Error(`Unsupported recording request type: ${JSON.stringify(exhaustiveCheck)}`);
|
|
71
|
+
}
|
|
72
|
+
}
|
|
73
|
+
}
|
|
74
|
+
async getRecordings(options) {
|
|
75
|
+
const loggerContext = {
|
|
76
|
+
file: CALL_RECORDING_FILE,
|
|
77
|
+
method: METHODS.GET_RECORDINGS,
|
|
78
|
+
};
|
|
79
|
+
log.info(`${METHOD_START_MESSAGE} with options=${JSON.stringify(options ?? {})}`, loggerContext);
|
|
80
|
+
try {
|
|
81
|
+
const url = this.buildRecordingsUrl(options);
|
|
82
|
+
const response = await this.webex.request({
|
|
83
|
+
uri: url,
|
|
84
|
+
method: HTTP_METHODS.GET,
|
|
85
|
+
service: ALLOWED_SERVICES.HYDRA_DEVELOPER_API,
|
|
86
|
+
...(options?.webexUserRequest ? { headers: { [WEBEX_USER_REQUEST_HEADER]: 'true' } } : {}),
|
|
87
|
+
});
|
|
88
|
+
log.log(`Response trackingId: ${response?.headers?.trackingid}`, loggerContext);
|
|
89
|
+
const body = (response.body ?? {});
|
|
90
|
+
const responseDetails = {
|
|
91
|
+
statusCode: Number(response.statusCode) || SUCCESS_STATUS_CODE,
|
|
92
|
+
data: {
|
|
93
|
+
recordings: body.items ?? [],
|
|
94
|
+
},
|
|
95
|
+
message: SUCCESS_MESSAGE,
|
|
96
|
+
};
|
|
97
|
+
log.log(`Successfully retrieved ${responseDetails.data.recordings?.length ?? 0} recordings`, loggerContext);
|
|
98
|
+
return responseDetails;
|
|
99
|
+
}
|
|
100
|
+
catch (err) {
|
|
101
|
+
log.error(`Failed to get recordings: ${JSON.stringify(err)}`, loggerContext);
|
|
102
|
+
await uploadLogs();
|
|
103
|
+
const errorInfo = err;
|
|
104
|
+
return serviceErrorCodeHandler(errorInfo, loggerContext);
|
|
105
|
+
}
|
|
106
|
+
}
|
|
107
|
+
async getRecording(recordingId) {
|
|
108
|
+
const loggerContext = {
|
|
109
|
+
file: CALL_RECORDING_FILE,
|
|
110
|
+
method: METHODS.GET_RECORDING,
|
|
111
|
+
};
|
|
112
|
+
log.info(`${METHOD_START_MESSAGE} with recordingId=${recordingId}`, loggerContext);
|
|
113
|
+
try {
|
|
114
|
+
const url = `${this.recordingServiceUrl}/${CONVERGED_RECORDINGS}/${recordingId}`;
|
|
115
|
+
const response = await this.webex.request({
|
|
116
|
+
uri: url,
|
|
117
|
+
method: HTTP_METHODS.GET,
|
|
118
|
+
service: ALLOWED_SERVICES.HYDRA_DEVELOPER_API,
|
|
119
|
+
});
|
|
120
|
+
log.log(`Response trackingId: ${response?.headers?.trackingid}`, loggerContext);
|
|
121
|
+
const responseDetails = {
|
|
122
|
+
statusCode: Number(response.statusCode) || SUCCESS_STATUS_CODE,
|
|
123
|
+
data: {
|
|
124
|
+
recording: response.body,
|
|
125
|
+
},
|
|
126
|
+
message: SUCCESS_MESSAGE,
|
|
127
|
+
};
|
|
128
|
+
log.log(`Successfully retrieved recording ${recordingId}`, loggerContext);
|
|
129
|
+
return responseDetails;
|
|
130
|
+
}
|
|
131
|
+
catch (err) {
|
|
132
|
+
log.error(`Failed to get recording: ${JSON.stringify(err)}`, loggerContext);
|
|
133
|
+
await uploadLogs();
|
|
134
|
+
const errorInfo = err;
|
|
135
|
+
return serviceErrorCodeHandler(errorInfo, loggerContext);
|
|
136
|
+
}
|
|
137
|
+
}
|
|
138
|
+
async getRecordingsByCallSessionId(callSessionId, options) {
|
|
139
|
+
const loggerContext = {
|
|
140
|
+
file: CALL_RECORDING_FILE,
|
|
141
|
+
method: METHODS.GET_RECORDINGS_BY_CALL_SESSION_ID,
|
|
142
|
+
};
|
|
143
|
+
log.info(`${METHOD_START_MESSAGE} with callSessionId=${callSessionId}`, loggerContext);
|
|
144
|
+
const listResponse = await this.getRecordings(options);
|
|
145
|
+
if (listResponse.statusCode !== SUCCESS_STATUS_CODE) {
|
|
146
|
+
return listResponse;
|
|
147
|
+
}
|
|
148
|
+
const filtered = (listResponse.data.recordings ?? []).filter((recording) => recording.serviceData?.callSessionId === callSessionId);
|
|
149
|
+
if (filtered.length === 0) {
|
|
150
|
+
log.info(RECORDING_NOT_FOUND_MESSAGE, loggerContext);
|
|
151
|
+
}
|
|
152
|
+
else {
|
|
153
|
+
log.log(`Successfully retrieved ${filtered.length} recordings for call session ${callSessionId}`, loggerContext);
|
|
154
|
+
}
|
|
155
|
+
return {
|
|
156
|
+
statusCode: SUCCESS_STATUS_CODE,
|
|
157
|
+
data: {
|
|
158
|
+
recordings: filtered,
|
|
159
|
+
},
|
|
160
|
+
message: SUCCESS_MESSAGE,
|
|
161
|
+
};
|
|
162
|
+
}
|
|
163
|
+
async getRecordingMetadata(recordingId) {
|
|
164
|
+
const loggerContext = {
|
|
165
|
+
file: CALL_RECORDING_FILE,
|
|
166
|
+
method: METHODS.GET_RECORDING_METADATA,
|
|
167
|
+
};
|
|
168
|
+
log.info(`${METHOD_START_MESSAGE} with recordingId=${recordingId}`, loggerContext);
|
|
169
|
+
try {
|
|
170
|
+
const url = `${this.recordingServiceUrl}/${CONVERGED_RECORDINGS}/${recordingId}/${METADATA}`;
|
|
171
|
+
const response = await this.webex.request({
|
|
172
|
+
uri: url,
|
|
173
|
+
method: HTTP_METHODS.GET,
|
|
174
|
+
service: ALLOWED_SERVICES.HYDRA_DEVELOPER_API,
|
|
175
|
+
});
|
|
176
|
+
log.log(`Response trackingId: ${response?.headers?.trackingid}`, loggerContext);
|
|
177
|
+
const responseDetails = {
|
|
178
|
+
statusCode: Number(response.statusCode) || SUCCESS_STATUS_CODE,
|
|
179
|
+
data: {
|
|
180
|
+
metadata: response.body,
|
|
181
|
+
},
|
|
182
|
+
message: SUCCESS_MESSAGE,
|
|
183
|
+
};
|
|
184
|
+
log.log(`Successfully retrieved metadata for recording ${recordingId}`, loggerContext);
|
|
185
|
+
return responseDetails;
|
|
186
|
+
}
|
|
187
|
+
catch (err) {
|
|
188
|
+
log.error(`Failed to get recording metadata: ${JSON.stringify(err)}`, loggerContext);
|
|
189
|
+
await uploadLogs();
|
|
190
|
+
const errorInfo = err;
|
|
191
|
+
return serviceErrorCodeHandler(errorInfo, loggerContext);
|
|
192
|
+
}
|
|
193
|
+
}
|
|
194
|
+
async deleteRecording(recordingId, options) {
|
|
195
|
+
const loggerContext = {
|
|
196
|
+
file: CALL_RECORDING_FILE,
|
|
197
|
+
method: METHODS.DELETE_RECORDING,
|
|
198
|
+
};
|
|
199
|
+
log.info(`${METHOD_START_MESSAGE} with recordingId=${recordingId}`, loggerContext);
|
|
200
|
+
try {
|
|
201
|
+
const url = `${this.recordingServiceUrl}/${CONVERGED_RECORDINGS}/${recordingId}`;
|
|
202
|
+
const body = {};
|
|
203
|
+
if (options?.reason) {
|
|
204
|
+
body.reason = options.reason;
|
|
205
|
+
}
|
|
206
|
+
if (options?.comment) {
|
|
207
|
+
body.comment = options.comment;
|
|
208
|
+
}
|
|
209
|
+
const response = await this.webex.request({
|
|
210
|
+
uri: url,
|
|
211
|
+
method: HTTP_METHODS.DELETE,
|
|
212
|
+
service: ALLOWED_SERVICES.HYDRA_DEVELOPER_API,
|
|
213
|
+
...(Object.keys(body).length > 0 ? { body } : {}),
|
|
214
|
+
});
|
|
215
|
+
log.log(`Response trackingId: ${response?.headers?.trackingid}`, loggerContext);
|
|
216
|
+
const responseDetails = {
|
|
217
|
+
statusCode: Number(response.statusCode) || SUCCESS_STATUS_CODE,
|
|
218
|
+
data: {},
|
|
219
|
+
message: SUCCESS_MESSAGE,
|
|
220
|
+
};
|
|
221
|
+
log.log(`Successfully deleted recording ${recordingId}`, loggerContext);
|
|
222
|
+
return responseDetails;
|
|
223
|
+
}
|
|
224
|
+
catch (err) {
|
|
225
|
+
log.error(`Failed to delete recording: ${JSON.stringify(err)}`, loggerContext);
|
|
226
|
+
await uploadLogs();
|
|
227
|
+
const errorInfo = err;
|
|
228
|
+
return serviceErrorCodeHandler(errorInfo, loggerContext);
|
|
229
|
+
}
|
|
230
|
+
}
|
|
231
|
+
handleRecordingCreatedEvent = async (event) => {
|
|
232
|
+
if (!event?.data?.activity) {
|
|
233
|
+
return;
|
|
234
|
+
}
|
|
235
|
+
this.emit(COMMON_EVENT_KEYS.CALL_RECORDING_CREATED, event);
|
|
236
|
+
};
|
|
237
|
+
handleRecordingUpdatedEvent = async (event) => {
|
|
238
|
+
if (!event?.data?.activity) {
|
|
239
|
+
return;
|
|
240
|
+
}
|
|
241
|
+
switch (event.data.eventSubType) {
|
|
242
|
+
case RECORDING_EVENT_SUBTYPE.TRASH:
|
|
243
|
+
case RECORDING_EVENT_SUBTYPE.PURGE:
|
|
244
|
+
this.emit(COMMON_EVENT_KEYS.CALL_RECORDING_DELETED, event);
|
|
245
|
+
break;
|
|
246
|
+
case RECORDING_EVENT_SUBTYPE.RESTORE:
|
|
247
|
+
this.emit(COMMON_EVENT_KEYS.CALL_RECORDING_CREATED, event);
|
|
248
|
+
break;
|
|
249
|
+
default:
|
|
250
|
+
this.emit(COMMON_EVENT_KEYS.CALL_RECORDING_UPDATED, event);
|
|
251
|
+
}
|
|
252
|
+
};
|
|
253
|
+
handleRecordingDeletedEvent = async (event) => {
|
|
254
|
+
if (!event?.data?.activity) {
|
|
255
|
+
return;
|
|
256
|
+
}
|
|
257
|
+
this.emit(COMMON_EVENT_KEYS.CALL_RECORDING_DELETED, event);
|
|
258
|
+
};
|
|
259
|
+
registerRecordingListeners() {
|
|
260
|
+
this.sdkConnector.registerListener(MOBIUS_EVENT_KEYS.RECORDING_EVENT_CREATED, this.handleRecordingCreatedEvent);
|
|
261
|
+
this.sdkConnector.registerListener(MOBIUS_EVENT_KEYS.RECORDING_EVENT_UPDATED, this.handleRecordingUpdatedEvent);
|
|
262
|
+
this.sdkConnector.registerListener(MOBIUS_EVENT_KEYS.RECORDING_EVENT_DELETED, this.handleRecordingDeletedEvent);
|
|
263
|
+
}
|
|
264
|
+
}
|
|
@@ -0,0 +1,201 @@
|
|
|
1
|
+
import { MOBIUS_EVENT_KEYS, RECORDING_EVENT_SUBTYPE, RECORDING_EVENT_TYPE, } from '../Events/types';
|
|
2
|
+
import { RecordingStatus } from './types';
|
|
3
|
+
export const CALL_SESSION_ID = 'a1b2c3d4-1111-2222-3333-444455556666';
|
|
4
|
+
export const RECORDING_ONE = {
|
|
5
|
+
id: '11111111-aaaa-bbbb-cccc-222222222222',
|
|
6
|
+
topic: 'Call with Alice',
|
|
7
|
+
createTime: '2024-05-01T10:01:05.000Z',
|
|
8
|
+
timeRecorded: '2024-05-01T10:00:00.000Z',
|
|
9
|
+
format: 'MP3',
|
|
10
|
+
serviceType: 'calling',
|
|
11
|
+
durationSeconds: 65,
|
|
12
|
+
sizeBytes: 1048576,
|
|
13
|
+
status: RecordingStatus.AVAILABLE,
|
|
14
|
+
ownerId: '8a67806f-fc4d-446b-a131-31e71ea5b0e9',
|
|
15
|
+
ownerEmail: 'owner@cisco.com',
|
|
16
|
+
ownerType: 'user',
|
|
17
|
+
storageRegion: 'US',
|
|
18
|
+
serviceData: {
|
|
19
|
+
locationId: 'loc-1',
|
|
20
|
+
callSessionId: CALL_SESSION_ID,
|
|
21
|
+
},
|
|
22
|
+
};
|
|
23
|
+
export const RECORDING_TWO = {
|
|
24
|
+
id: '33333333-dddd-eeee-ffff-444444444444',
|
|
25
|
+
topic: 'Call with Bob',
|
|
26
|
+
createTime: '2024-05-02T11:02:05.000Z',
|
|
27
|
+
timeRecorded: '2024-05-02T11:00:00.000Z',
|
|
28
|
+
format: 'MP3',
|
|
29
|
+
serviceType: 'calling',
|
|
30
|
+
durationSeconds: 120,
|
|
31
|
+
sizeBytes: 2097152,
|
|
32
|
+
status: RecordingStatus.AVAILABLE,
|
|
33
|
+
ownerId: '8a67806f-fc4d-446b-a131-31e71ea5b0e9',
|
|
34
|
+
ownerEmail: 'owner@cisco.com',
|
|
35
|
+
ownerType: 'user',
|
|
36
|
+
storageRegion: 'US',
|
|
37
|
+
serviceData: {
|
|
38
|
+
locationId: 'loc-1',
|
|
39
|
+
callSessionId: 'ffffffff-9999-8888-7777-666666666666',
|
|
40
|
+
},
|
|
41
|
+
};
|
|
42
|
+
export const MOCK_RECORDING_LIST_BODY = {
|
|
43
|
+
statusCode: 200,
|
|
44
|
+
body: {
|
|
45
|
+
items: [RECORDING_ONE, RECORDING_TWO],
|
|
46
|
+
},
|
|
47
|
+
};
|
|
48
|
+
export const MOCK_EMPTY_RECORDING_LIST_BODY = {
|
|
49
|
+
statusCode: 200,
|
|
50
|
+
body: {
|
|
51
|
+
items: [],
|
|
52
|
+
},
|
|
53
|
+
};
|
|
54
|
+
export const MOCK_RECORDING_BODY = {
|
|
55
|
+
statusCode: 200,
|
|
56
|
+
body: RECORDING_ONE,
|
|
57
|
+
};
|
|
58
|
+
export const RECORDING_OWNER_ID = '8a67806f-fc4d-446b-a131-31e71ea5b0e9';
|
|
59
|
+
export const RECORDING_REMOTE_PARTY_ID = '0fea4a63-4e27-46ee-99c3-2472cb12bf68';
|
|
60
|
+
export const MOCK_RECORDING_METADATA = {
|
|
61
|
+
id: RECORDING_ONE.id,
|
|
62
|
+
callSessionId: CALL_SESSION_ID,
|
|
63
|
+
owner: {
|
|
64
|
+
ownerID: RECORDING_OWNER_ID,
|
|
65
|
+
ownerEmail: 'owner@cisco.com',
|
|
66
|
+
ownerName: 'Mark',
|
|
67
|
+
orgID: '1704d30d-a131-4bc7-9449-948487643793',
|
|
68
|
+
},
|
|
69
|
+
participants: [
|
|
70
|
+
{ id: RECORDING_OWNER_ID, name: 'Mark', email: 'owner@cisco.com' },
|
|
71
|
+
{ id: RECORDING_REMOTE_PARTY_ID, name: 'Alice', email: 'alice@cisco.com' },
|
|
72
|
+
],
|
|
73
|
+
mediaStreams: [{ streamId: 'audio-1', type: 'audio', codec: 'opus', durationMS: 65000 }],
|
|
74
|
+
extensionData: {
|
|
75
|
+
callData: { direction: 'OUTGOING' },
|
|
76
|
+
acd: {},
|
|
77
|
+
redirectInfo: {},
|
|
78
|
+
},
|
|
79
|
+
serviceData: {
|
|
80
|
+
callRecordingId: RECORDING_ONE.id,
|
|
81
|
+
locationId: 'loc-1',
|
|
82
|
+
callSessionId: CALL_SESSION_ID,
|
|
83
|
+
personality: 'originator',
|
|
84
|
+
callingParty: {
|
|
85
|
+
actor: { type: 'USER', id: RECORDING_OWNER_ID, email: 'owner@cisco.com' },
|
|
86
|
+
number: '9902',
|
|
87
|
+
name: 'Mark',
|
|
88
|
+
},
|
|
89
|
+
calledParty: {
|
|
90
|
+
actor: { type: 'USER', id: RECORDING_REMOTE_PARTY_ID, email: 'alice@cisco.com' },
|
|
91
|
+
number: '9903',
|
|
92
|
+
name: 'Alice',
|
|
93
|
+
},
|
|
94
|
+
},
|
|
95
|
+
};
|
|
96
|
+
export const MOCK_RECORDING_METADATA_BODY = {
|
|
97
|
+
statusCode: 200,
|
|
98
|
+
body: MOCK_RECORDING_METADATA,
|
|
99
|
+
};
|
|
100
|
+
export const ERROR_DETAILS_400 = {
|
|
101
|
+
statusCode: 400,
|
|
102
|
+
data: {
|
|
103
|
+
error: '400 Bad request',
|
|
104
|
+
},
|
|
105
|
+
message: 'FAILURE',
|
|
106
|
+
};
|
|
107
|
+
export const ERROR_DETAILS_401 = {
|
|
108
|
+
statusCode: 401,
|
|
109
|
+
data: {
|
|
110
|
+
error: 'User is unauthorised, possible token expiry',
|
|
111
|
+
},
|
|
112
|
+
message: 'FAILURE',
|
|
113
|
+
};
|
|
114
|
+
export const ERROR_DETAILS_404 = {
|
|
115
|
+
statusCode: 404,
|
|
116
|
+
data: {
|
|
117
|
+
error: 'User info not found',
|
|
118
|
+
},
|
|
119
|
+
message: 'FAILURE',
|
|
120
|
+
};
|
|
121
|
+
const RECORDING_ACTIVITY = {
|
|
122
|
+
id: 'activity-1',
|
|
123
|
+
objectType: 'activity',
|
|
124
|
+
verb: 'add',
|
|
125
|
+
published: '2024-05-01T10:01:05.000Z',
|
|
126
|
+
actor: {
|
|
127
|
+
id: '8a67806f-fc4d-446b-a131-31e71ea5b0e9',
|
|
128
|
+
objectType: 'person',
|
|
129
|
+
emailAddress: 'owner@cisco.com',
|
|
130
|
+
},
|
|
131
|
+
object: {
|
|
132
|
+
id: RECORDING_ONE.id,
|
|
133
|
+
objectType: 'wxCallingCallRecording',
|
|
134
|
+
callSessionId: CALL_SESSION_ID,
|
|
135
|
+
durationSeconds: 65,
|
|
136
|
+
sizeBytes: 1048576,
|
|
137
|
+
},
|
|
138
|
+
};
|
|
139
|
+
export const MOCK_RECORDING_CREATED_EVENT = {
|
|
140
|
+
id: 'event-created',
|
|
141
|
+
data: {
|
|
142
|
+
activity: RECORDING_ACTIVITY,
|
|
143
|
+
eventType: RECORDING_EVENT_TYPE.CREATED,
|
|
144
|
+
},
|
|
145
|
+
timestamp: 12345,
|
|
146
|
+
trackingId: 'tracking-id',
|
|
147
|
+
};
|
|
148
|
+
export const MOCK_RECORDING_UPDATED_EVENT = {
|
|
149
|
+
id: 'event-updated',
|
|
150
|
+
data: {
|
|
151
|
+
activity: RECORDING_ACTIVITY,
|
|
152
|
+
eventType: RECORDING_EVENT_TYPE.UPDATED,
|
|
153
|
+
eventSubType: RECORDING_EVENT_SUBTYPE.SUMMARY_CREATE,
|
|
154
|
+
},
|
|
155
|
+
timestamp: 12346,
|
|
156
|
+
trackingId: 'tracking-id',
|
|
157
|
+
};
|
|
158
|
+
export const MOCK_RECORDING_DELETED_EVENT = {
|
|
159
|
+
id: 'event-deleted',
|
|
160
|
+
data: {
|
|
161
|
+
activity: RECORDING_ACTIVITY,
|
|
162
|
+
eventType: RECORDING_EVENT_TYPE.DELETED,
|
|
163
|
+
},
|
|
164
|
+
timestamp: 12347,
|
|
165
|
+
trackingId: 'tracking-id',
|
|
166
|
+
};
|
|
167
|
+
export const MOCK_RECORDING_TRASH_EVENT = {
|
|
168
|
+
id: 'event-trash',
|
|
169
|
+
data: {
|
|
170
|
+
activity: RECORDING_ACTIVITY,
|
|
171
|
+
eventType: RECORDING_EVENT_TYPE.UPDATED,
|
|
172
|
+
eventSubType: RECORDING_EVENT_SUBTYPE.TRASH,
|
|
173
|
+
},
|
|
174
|
+
timestamp: 12348,
|
|
175
|
+
trackingId: 'tracking-id',
|
|
176
|
+
};
|
|
177
|
+
export const MOCK_RECORDING_PURGE_EVENT = {
|
|
178
|
+
id: 'event-purge',
|
|
179
|
+
data: {
|
|
180
|
+
activity: RECORDING_ACTIVITY,
|
|
181
|
+
eventType: RECORDING_EVENT_TYPE.UPDATED,
|
|
182
|
+
eventSubType: RECORDING_EVENT_SUBTYPE.PURGE,
|
|
183
|
+
},
|
|
184
|
+
timestamp: 12349,
|
|
185
|
+
trackingId: 'tracking-id',
|
|
186
|
+
};
|
|
187
|
+
export const MOCK_RECORDING_RESTORE_EVENT = {
|
|
188
|
+
id: 'event-restore',
|
|
189
|
+
data: {
|
|
190
|
+
activity: RECORDING_ACTIVITY,
|
|
191
|
+
eventType: RECORDING_EVENT_TYPE.UPDATED,
|
|
192
|
+
eventSubType: RECORDING_EVENT_SUBTYPE.RESTORE,
|
|
193
|
+
},
|
|
194
|
+
timestamp: 12350,
|
|
195
|
+
trackingId: 'tracking-id',
|
|
196
|
+
};
|
|
197
|
+
export const RECORDING_MERCURY_KEYS = {
|
|
198
|
+
CREATED: MOBIUS_EVENT_KEYS.RECORDING_EVENT_CREATED,
|
|
199
|
+
UPDATED: MOBIUS_EVENT_KEYS.RECORDING_EVENT_UPDATED,
|
|
200
|
+
DELETED: MOBIUS_EVENT_KEYS.RECORDING_EVENT_DELETED,
|
|
201
|
+
};
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
export const CALL_RECORDING_FILE = 'CallRecording';
|
|
2
|
+
export const CONVERGED_RECORDINGS = 'convergedRecordings';
|
|
3
|
+
export const METADATA = 'metadata';
|
|
4
|
+
export const FROM = 'from';
|
|
5
|
+
export const TO = 'to';
|
|
6
|
+
export const STATUS = 'status';
|
|
7
|
+
export const MAX = 'max';
|
|
8
|
+
export const SERVICE_TYPE = 'serviceType';
|
|
9
|
+
export const FORMAT = 'format';
|
|
10
|
+
export const OWNER_TYPE = 'ownerType';
|
|
11
|
+
export const STORAGE_REGION = 'storageRegion';
|
|
12
|
+
export const LOCATION_ID = 'locationId';
|
|
13
|
+
export const TOPIC = 'topic';
|
|
14
|
+
export const DEFAULT_STATUS = 'available';
|
|
15
|
+
export const DEFAULT_MAX = 30;
|
|
16
|
+
export const DEFAULT_NUMBER_OF_DAYS = 30;
|
|
17
|
+
export const WEBEX_USER_REQUEST_HEADER = 'WebexUserRequest';
|
|
18
|
+
export const RECORDING_NOT_FOUND_MESSAGE = 'No recordings found for the given call session id.';
|
|
19
|
+
export const METHODS = {
|
|
20
|
+
INITIALIZE_BACKEND_CONNECTOR: 'initializeBackendConnector',
|
|
21
|
+
GET_CALL_RECORDING: 'getCallRecording',
|
|
22
|
+
GET_RECORDINGS: 'getRecordings',
|
|
23
|
+
GET_RECORDING: 'getRecording',
|
|
24
|
+
GET_RECORDINGS_BY_CALL_SESSION_ID: 'getRecordingsByCallSessionId',
|
|
25
|
+
GET_RECORDING_METADATA: 'getRecordingMetadata',
|
|
26
|
+
DELETE_RECORDING: 'deleteRecording',
|
|
27
|
+
};
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
export var RecordingStatus;
|
|
2
|
+
(function (RecordingStatus) {
|
|
3
|
+
RecordingStatus["AVAILABLE"] = "available";
|
|
4
|
+
RecordingStatus["DELETED"] = "deleted";
|
|
5
|
+
})(RecordingStatus || (RecordingStatus = {}));
|
|
6
|
+
export var AiGenerationStatus;
|
|
7
|
+
(function (AiGenerationStatus) {
|
|
8
|
+
AiGenerationStatus["NOT_STARTED"] = "NOT_STARTED";
|
|
9
|
+
AiGenerationStatus["IN_PROGRESS"] = "IN_PROGRESS";
|
|
10
|
+
AiGenerationStatus["COMPLETED"] = "COMPLETED";
|
|
11
|
+
AiGenerationStatus["FAILED"] = "FAILED";
|
|
12
|
+
})(AiGenerationStatus || (AiGenerationStatus = {}));
|
|
13
|
+
export var RecordingRequestType;
|
|
14
|
+
(function (RecordingRequestType) {
|
|
15
|
+
RecordingRequestType["LIST"] = "list";
|
|
16
|
+
RecordingRequestType["DETAIL"] = "detail";
|
|
17
|
+
RecordingRequestType["METADATA"] = "metadata";
|
|
18
|
+
RecordingRequestType["BY_CALL_SESSION"] = "byCallSession";
|
|
19
|
+
})(RecordingRequestType || (RecordingRequestType = {}));
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
export const getRemoteParty = (serviceData) => {
|
|
2
|
+
if (!serviceData) {
|
|
3
|
+
return undefined;
|
|
4
|
+
}
|
|
5
|
+
const { personality, callingParty, calledParty } = serviceData;
|
|
6
|
+
switch (personality) {
|
|
7
|
+
case 'originator':
|
|
8
|
+
return calledParty;
|
|
9
|
+
case 'terminator':
|
|
10
|
+
return callingParty;
|
|
11
|
+
default:
|
|
12
|
+
return undefined;
|
|
13
|
+
}
|
|
14
|
+
};
|
|
@@ -7,6 +7,9 @@ export var COMMON_EVENT_KEYS;
|
|
|
7
7
|
COMMON_EVENT_KEYS["CALL_HISTORY_USER_SESSION_INFO"] = "callHistory:user_recent_sessions";
|
|
8
8
|
COMMON_EVENT_KEYS["CALL_HISTORY_USER_VIEWED_SESSIONS"] = "callHistory:user_viewed_sessions";
|
|
9
9
|
COMMON_EVENT_KEYS["CALL_HISTORY_USER_SESSIONS_DELETED"] = "callHistory:user_sessions_deleted";
|
|
10
|
+
COMMON_EVENT_KEYS["CALL_RECORDING_CREATED"] = "callRecording:created";
|
|
11
|
+
COMMON_EVENT_KEYS["CALL_RECORDING_UPDATED"] = "callRecording:updated";
|
|
12
|
+
COMMON_EVENT_KEYS["CALL_RECORDING_DELETED"] = "callRecording:deleted";
|
|
10
13
|
})(COMMON_EVENT_KEYS || (COMMON_EVENT_KEYS = {}));
|
|
11
14
|
export var LINE_EVENT_KEYS;
|
|
12
15
|
(function (LINE_EVENT_KEYS) {
|
|
@@ -69,12 +72,28 @@ export var MOBIUS_EVENT_KEYS;
|
|
|
69
72
|
MOBIUS_EVENT_KEYS["CALL_SESSION_EVENT_LEGACY"] = "event:janus.user_sessions";
|
|
70
73
|
MOBIUS_EVENT_KEYS["CALL_SESSION_EVENT_VIEWED"] = "event:janus.user_viewed_sessions";
|
|
71
74
|
MOBIUS_EVENT_KEYS["CALL_SESSION_EVENT_DELETED"] = "event:janus.user_sessions_deleted";
|
|
75
|
+
MOBIUS_EVENT_KEYS["RECORDING_EVENT_CREATED"] = "event:convergedRecordings.created";
|
|
76
|
+
MOBIUS_EVENT_KEYS["RECORDING_EVENT_UPDATED"] = "event:convergedRecordings.updated";
|
|
77
|
+
MOBIUS_EVENT_KEYS["RECORDING_EVENT_DELETED"] = "event:convergedRecordings.deleted";
|
|
72
78
|
})(MOBIUS_EVENT_KEYS || (MOBIUS_EVENT_KEYS = {}));
|
|
73
79
|
export var MEDIA_CONNECTION_EVENT_KEYS;
|
|
74
80
|
(function (MEDIA_CONNECTION_EVENT_KEYS) {
|
|
75
81
|
MEDIA_CONNECTION_EVENT_KEYS["ROAP_MESSAGE_TO_SEND"] = "roap:messageToSend";
|
|
76
82
|
MEDIA_CONNECTION_EVENT_KEYS["MEDIA_TYPE_AUDIO"] = "audio";
|
|
77
83
|
})(MEDIA_CONNECTION_EVENT_KEYS || (MEDIA_CONNECTION_EVENT_KEYS = {}));
|
|
84
|
+
export var RECORDING_EVENT_TYPE;
|
|
85
|
+
(function (RECORDING_EVENT_TYPE) {
|
|
86
|
+
RECORDING_EVENT_TYPE["CREATED"] = "convergedRecordings.created";
|
|
87
|
+
RECORDING_EVENT_TYPE["UPDATED"] = "convergedRecordings.updated";
|
|
88
|
+
RECORDING_EVENT_TYPE["DELETED"] = "convergedRecordings.deleted";
|
|
89
|
+
})(RECORDING_EVENT_TYPE || (RECORDING_EVENT_TYPE = {}));
|
|
90
|
+
export var RECORDING_EVENT_SUBTYPE;
|
|
91
|
+
(function (RECORDING_EVENT_SUBTYPE) {
|
|
92
|
+
RECORDING_EVENT_SUBTYPE["TRASH"] = "TRASH";
|
|
93
|
+
RECORDING_EVENT_SUBTYPE["PURGE"] = "PURGE";
|
|
94
|
+
RECORDING_EVENT_SUBTYPE["RESTORE"] = "RESTORE";
|
|
95
|
+
RECORDING_EVENT_SUBTYPE["SUMMARY_CREATE"] = "SUMMARY_CREATE";
|
|
96
|
+
})(RECORDING_EVENT_SUBTYPE || (RECORDING_EVENT_SUBTYPE = {}));
|
|
78
97
|
var CALL_STATE;
|
|
79
98
|
(function (CALL_STATE) {
|
|
80
99
|
CALL_STATE["HELD"] = "held";
|
package/dist/module/api.js
CHANGED
|
@@ -3,5 +3,6 @@ import { CallSettings, createCallSettingsClient } from './CallSettings/CallSetti
|
|
|
3
3
|
import { CallingClient, createClient } from './CallingClient/CallingClient';
|
|
4
4
|
import { ContactsClient, createContactsClient } from './Contacts/ContactsClient';
|
|
5
5
|
import { Voicemail, createVoicemailClient } from './Voicemail/Voicemail';
|
|
6
|
-
|
|
7
|
-
export {
|
|
6
|
+
import { CallRecording, createCallRecordingClient } from './CallRecording/CallRecording';
|
|
7
|
+
export { CallHistory, CallSettings, CallingClient, ContactsClient, Voicemail, CallRecording };
|
|
8
|
+
export { createCallHistoryClient, createCallSettingsClient, createClient, createContactsClient, createVoicemailClient, createCallRecordingClient, };
|
|
@@ -65,6 +65,7 @@ export function getTestUtilsWebex() {
|
|
|
65
65
|
mercuryApi: 'https://mercury-api-intb.ciscospark.com/v1',
|
|
66
66
|
'ucmgmt-gateway': 'https://gw.telemetry.int-ucmgmt.cisco.com',
|
|
67
67
|
contactsService: 'https://contacts-service-a.wbx2.com/contact/api/v1',
|
|
68
|
+
hydraDeveloperApi: 'https://integration.webexapis.com/v1',
|
|
68
69
|
},
|
|
69
70
|
fetchClientRegionInfo: jest.fn(),
|
|
70
71
|
getMobiusClusters: jest.fn(),
|
|
@@ -3,6 +3,7 @@ export var ALLOWED_SERVICES;
|
|
|
3
3
|
(function (ALLOWED_SERVICES) {
|
|
4
4
|
ALLOWED_SERVICES["MOBIUS"] = "mobius";
|
|
5
5
|
ALLOWED_SERVICES["JANUS"] = "janus";
|
|
6
|
+
ALLOWED_SERVICES["HYDRA_DEVELOPER_API"] = "hydraDeveloperApi";
|
|
6
7
|
})(ALLOWED_SERVICES || (ALLOWED_SERVICES = {}));
|
|
7
8
|
export var HTTP_METHODS;
|
|
8
9
|
(function (HTTP_METHODS) {
|
package/dist/module/index.js
CHANGED
|
@@ -4,9 +4,12 @@ import { createContactsClient } from './Contacts/ContactsClient';
|
|
|
4
4
|
import { createClient } from './CallingClient/CallingClient';
|
|
5
5
|
import { createCallHistoryClient } from './CallHistory/CallHistory';
|
|
6
6
|
import { createVoicemailClient } from './Voicemail/Voicemail';
|
|
7
|
+
import { createCallRecordingClient } from './CallRecording/CallRecording';
|
|
7
8
|
import Logger from './Logger';
|
|
8
|
-
export { createClient, createCallHistoryClient, createCallSettingsClient, createContactsClient, createMicrophoneStream, createVoicemailClient, Logger, NoiseReductionEffect, };
|
|
9
|
+
export { createClient, createCallHistoryClient, createCallSettingsClient, createContactsClient, createMicrophoneStream, createVoicemailClient, createCallRecordingClient, Logger, NoiseReductionEffect, };
|
|
9
10
|
export { ERROR_LAYER, ERROR_TYPE } from './Errors/types';
|
|
11
|
+
export { RecordingStatus, RecordingRequestType, } from './CallRecording/types';
|
|
12
|
+
export { getRemoteParty } from './CallRecording/utils';
|
|
10
13
|
export { GroupType } from './Contacts/types';
|
|
11
14
|
export { LINE_EVENTS } from './CallingClient/line/types';
|
|
12
15
|
export { CALLING_CLIENT_EVENT_KEYS, CALL_EVENT_KEYS, Disposition, LINE_EVENT_KEYS, COMMON_EVENT_KEYS, MOBIUS_SOCKET_DISCONNECT_REASON, } from './Events/types';
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import { WebexSDK } from '../SDKConnector/types';
|
|
2
|
+
import { CallRecordingEventTypes } from '../Events/types';
|
|
3
|
+
import { Eventing } from '../Events/impl';
|
|
4
|
+
import { DeleteRecordingOptions, GetCallRecordingRequest, ICallRecording, LoggerInterface, RecordingDeleteResponse, RecordingResponseFor } from './types';
|
|
5
|
+
export declare class CallRecording extends Eventing<CallRecordingEventTypes> implements ICallRecording {
|
|
6
|
+
logger: LoggerInterface;
|
|
7
|
+
private sdkConnector;
|
|
8
|
+
private webex;
|
|
9
|
+
private callingBackend;
|
|
10
|
+
private backendConnector;
|
|
11
|
+
constructor(webex: WebexSDK, logger: LoggerInterface);
|
|
12
|
+
private initializeBackendConnector;
|
|
13
|
+
private forwardRecordingEvents;
|
|
14
|
+
getCallRecording<T extends GetCallRecordingRequest>(request: T): Promise<RecordingResponseFor<T>>;
|
|
15
|
+
deleteRecording(recordingId: string, options?: DeleteRecordingOptions): Promise<RecordingDeleteResponse>;
|
|
16
|
+
}
|
|
17
|
+
export declare const createCallRecordingClient: (webex: WebexSDK, logger: LoggerInterface) => ICallRecording;
|
|
18
|
+
//# sourceMappingURL=CallRecording.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"CallRecording.d.ts","sourceRoot":"","sources":["../../../src/CallRecording/CallRecording.ts"],"names":[],"mappings":"AAGA,OAAO,EAAgB,QAAQ,EAAC,MAAM,uBAAuB,CAAC;AAK9D,OAAO,EAAC,uBAAuB,EAAoC,MAAM,iBAAiB,CAAC;AAC3F,OAAO,EAAC,QAAQ,EAAC,MAAM,gBAAgB,CAAC;AACxC,OAAO,EACL,sBAAsB,EACtB,uBAAuB,EACvB,cAAc,EACd,eAAe,EACf,uBAAuB,EACvB,oBAAoB,EACrB,MAAM,SAAS,CAAC;AAmBjB,qBAAa,aAAc,SAAQ,QAAQ,CAAC,uBAAuB,CAAE,YAAW,cAAc;IAYxD,MAAM,EAAE,eAAe;IAX3D,OAAO,CAAC,YAAY,CAAgB;IAEpC,OAAO,CAAC,KAAK,CAAW;IAExB,OAAO,CAAC,cAAc,CAAkB;IAExC,OAAO,CAAC,gBAAgB,CAAkB;gBAK9B,KAAK,EAAE,QAAQ,EAAS,MAAM,EAAE,eAAe;IAiB3D,OAAO,CAAC,0BAA0B;IAsBlC,OAAO,CAAC,sBAAsB;IAiBvB,gBAAgB,CAAC,CAAC,SAAS,uBAAuB,EACvD,OAAO,EAAE,CAAC,GACT,OAAO,CAAC,oBAAoB,CAAC,CAAC,CAAC,CAAC;IAStB,eAAe,CAC1B,WAAW,EAAE,MAAM,EACnB,OAAO,CAAC,EAAE,sBAAsB,GAC/B,OAAO,CAAC,uBAAuB,CAAC;CAGpC;AAQD,eAAO,MAAM,yBAAyB,UAC7B,QAAQ,UACP,eAAe,KACtB,cAAkD,CAAC"}
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
import { WebexSDK } from '../SDKConnector/types';
|
|
2
|
+
import { CallRecordingEventTypes, RecordingEvent } from '../Events/types';
|
|
3
|
+
import { Eventing } from '../Events/impl';
|
|
4
|
+
import { DeleteRecordingOptions, GetCallRecordingRequest, ICallRecording, LoggerInterface, RecordingDeleteResponse, RecordingResponseFor } from './types';
|
|
5
|
+
export declare class WxcCallRecordingConnector extends Eventing<CallRecordingEventTypes> implements ICallRecording {
|
|
6
|
+
private sdkConnector;
|
|
7
|
+
private webex;
|
|
8
|
+
private recordingServiceUrl;
|
|
9
|
+
constructor(webex: WebexSDK, logger: LoggerInterface);
|
|
10
|
+
private buildRecordingsUrl;
|
|
11
|
+
getCallRecording<T extends GetCallRecordingRequest>(request: T): Promise<RecordingResponseFor<T>>;
|
|
12
|
+
private dispatchGetCallRecording;
|
|
13
|
+
private getRecordings;
|
|
14
|
+
private getRecording;
|
|
15
|
+
private getRecordingsByCallSessionId;
|
|
16
|
+
private getRecordingMetadata;
|
|
17
|
+
deleteRecording(recordingId: string, options?: DeleteRecordingOptions): Promise<RecordingDeleteResponse>;
|
|
18
|
+
handleRecordingCreatedEvent: (event?: RecordingEvent) => Promise<void>;
|
|
19
|
+
handleRecordingUpdatedEvent: (event?: RecordingEvent) => Promise<void>;
|
|
20
|
+
handleRecordingDeletedEvent: (event?: RecordingEvent) => Promise<void>;
|
|
21
|
+
private registerRecordingListeners;
|
|
22
|
+
}
|
|
23
|
+
//# sourceMappingURL=WxcCallRecordingConnector.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"WxcCallRecordingConnector.d.ts","sourceRoot":"","sources":["../../../src/CallRecording/WxcCallRecordingConnector.ts"],"names":[],"mappings":"AAGA,OAAO,EAAgB,QAAQ,EAAC,MAAM,uBAAuB,CAAC;AAK9D,OAAO,EACL,uBAAuB,EAIvB,cAAc,EACf,MAAM,iBAAiB,CAAC;AACzB,OAAO,EAAC,QAAQ,EAAC,MAAM,gBAAgB,CAAC;AACxC,OAAO,EACL,sBAAsB,EACtB,uBAAuB,EAEvB,cAAc,EACd,eAAe,EAEf,uBAAuB,EAOvB,oBAAoB,EACrB,MAAM,SAAS,CAAC;AAgCjB,qBAAa,yBACX,SAAQ,QAAQ,CAAC,uBAAuB,CACxC,YAAW,cAAc;IAEzB,OAAO,CAAC,YAAY,CAAgB;IAEpC,OAAO,CAAC,KAAK,CAAW;IAExB,OAAO,CAAC,mBAAmB,CAAS;gBAMxB,KAAK,EAAE,QAAQ,EAAE,MAAM,EAAE,eAAe;IAmCpD,OAAO,CAAC,kBAAkB;IAyCnB,gBAAgB,CAAC,CAAC,SAAS,uBAAuB,EACvD,OAAO,EAAE,CAAC,GACT,OAAO,CAAC,oBAAoB,CAAC,CAAC,CAAC,CAAC;IAYnC,OAAO,CAAC,wBAAwB;YA4BlB,aAAa;YAqDb,YAAY;YAqDZ,4BAA4B;YA2C5B,oBAAoB;IAgDrB,eAAe,CAC1B,WAAW,EAAE,MAAM,EACnB,OAAO,CAAC,EAAE,sBAAsB,GAC/B,OAAO,CAAC,uBAAuB,CAAC;IAiDnC,2BAA2B,WAAkB,cAAc,mBAMzD;IAaF,2BAA2B,WAAkB,cAAc,mBAkBzD;IAEF,2BAA2B,WAAkB,cAAc,mBAMzD;IAKF,OAAO,CAAC,0BAA0B;CAcnC"}
|