@webitel/api-services 26.8.23 → 26.8.24
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
|
@@ -7,6 +7,8 @@ import {
|
|
|
7
7
|
CreateCallExportBody,
|
|
8
8
|
CreateScreenrecordingExportBody,
|
|
9
9
|
DownloadCallArchiveQueryParams,
|
|
10
|
+
DownloadScreenrecordingArchiveQueryParams,
|
|
11
|
+
DownloadScreenshotArchiveQueryParams,
|
|
10
12
|
getPdfService,
|
|
11
13
|
ListCallExportsQueryParams,
|
|
12
14
|
ListScreenrecordingExportsQueryParams,
|
|
@@ -189,6 +191,90 @@ const downloadCallArchive = async ({
|
|
|
189
191
|
}
|
|
190
192
|
};
|
|
191
193
|
|
|
194
|
+
const downloadScreenrecordingArchive = async ({
|
|
195
|
+
agentId,
|
|
196
|
+
fileIds,
|
|
197
|
+
from,
|
|
198
|
+
to,
|
|
199
|
+
}: {
|
|
200
|
+
agentId: ApiId;
|
|
201
|
+
fileIds?: (string | number)[];
|
|
202
|
+
from?: string | number;
|
|
203
|
+
to?: string | number;
|
|
204
|
+
}) => {
|
|
205
|
+
const fieldsToSend = getShallowFieldsToSendFromZodSchema(
|
|
206
|
+
DownloadScreenrecordingArchiveQueryParams,
|
|
207
|
+
);
|
|
208
|
+
|
|
209
|
+
const params = applyTransform(
|
|
210
|
+
{
|
|
211
|
+
fileIds,
|
|
212
|
+
from,
|
|
213
|
+
to,
|
|
214
|
+
},
|
|
215
|
+
[
|
|
216
|
+
sanitizeToWire(fieldsToSend),
|
|
217
|
+
camelToSnake(),
|
|
218
|
+
],
|
|
219
|
+
);
|
|
220
|
+
|
|
221
|
+
try {
|
|
222
|
+
return await getPdfService().downloadScreenrecordingArchive(
|
|
223
|
+
String(agentId),
|
|
224
|
+
params,
|
|
225
|
+
{
|
|
226
|
+
responseType: 'blob',
|
|
227
|
+
},
|
|
228
|
+
);
|
|
229
|
+
} catch (err) {
|
|
230
|
+
throw applyTransform(err, [
|
|
231
|
+
notify,
|
|
232
|
+
]);
|
|
233
|
+
}
|
|
234
|
+
};
|
|
235
|
+
|
|
236
|
+
const downloadScreenshotArchive = async ({
|
|
237
|
+
agentId,
|
|
238
|
+
fileIds,
|
|
239
|
+
from,
|
|
240
|
+
to,
|
|
241
|
+
}: {
|
|
242
|
+
agentId: ApiId;
|
|
243
|
+
fileIds?: (string | number)[];
|
|
244
|
+
from?: string | number;
|
|
245
|
+
to?: string | number;
|
|
246
|
+
}) => {
|
|
247
|
+
const fieldsToSend = getShallowFieldsToSendFromZodSchema(
|
|
248
|
+
DownloadScreenshotArchiveQueryParams,
|
|
249
|
+
);
|
|
250
|
+
|
|
251
|
+
const params = applyTransform(
|
|
252
|
+
{
|
|
253
|
+
fileIds,
|
|
254
|
+
from,
|
|
255
|
+
to,
|
|
256
|
+
},
|
|
257
|
+
[
|
|
258
|
+
sanitizeToWire(fieldsToSend),
|
|
259
|
+
camelToSnake(),
|
|
260
|
+
],
|
|
261
|
+
);
|
|
262
|
+
|
|
263
|
+
try {
|
|
264
|
+
return await getPdfService().downloadScreenshotArchive(
|
|
265
|
+
String(agentId),
|
|
266
|
+
params,
|
|
267
|
+
{
|
|
268
|
+
responseType: 'blob',
|
|
269
|
+
},
|
|
270
|
+
);
|
|
271
|
+
} catch (err) {
|
|
272
|
+
throw applyTransform(err, [
|
|
273
|
+
notify,
|
|
274
|
+
]);
|
|
275
|
+
}
|
|
276
|
+
};
|
|
277
|
+
|
|
192
278
|
const deleteExport = async (id: ApiId) => {
|
|
193
279
|
try {
|
|
194
280
|
const response = await getPdfService().deleteExport(String(id));
|
|
@@ -208,5 +294,7 @@ export const PdfServicesAPI = {
|
|
|
208
294
|
createCallExport,
|
|
209
295
|
listCallExports,
|
|
210
296
|
downloadCallArchive,
|
|
297
|
+
downloadScreenrecordingArchive,
|
|
298
|
+
downloadScreenshotArchive,
|
|
211
299
|
delete: deleteExport,
|
|
212
300
|
};
|