feat: implement attachement preview
Signed-off-by: Sebastian Krupinski <krupinski01@gmail.com>
This commit is contained in:
@@ -2,7 +2,7 @@
|
||||
* Entity management service
|
||||
*/
|
||||
|
||||
import { transceivePost, transceiveStream, transceiveDownload } from './transceive';
|
||||
import { transceivePost, transceiveStream, transceiveDownload, transceiveBlob } from './transceive';
|
||||
import type {
|
||||
EntityFetchRequest,
|
||||
EntityFetchResponse,
|
||||
@@ -28,6 +28,7 @@ import type {
|
||||
EntityPatchResponse,
|
||||
EntityPatchRequest,
|
||||
EntityDownloadRequest,
|
||||
EntityPreviewRequest,
|
||||
EntityBlobsRequest,
|
||||
EntityBlobsResponse,
|
||||
EntityBlobsWireResponse,
|
||||
@@ -231,6 +232,10 @@ export const entityService = {
|
||||
return transceiveDownload<EntityDownloadRequest>('entity.download', request);
|
||||
},
|
||||
|
||||
async preview(request: EntityPreviewRequest): Promise<Blob> {
|
||||
return await transceiveBlob<EntityPreviewRequest>('entity.preview', request);
|
||||
},
|
||||
|
||||
/**
|
||||
* Fetch one or more message parts (attachments) inline for rendering.
|
||||
*
|
||||
|
||||
Reference in New Issue
Block a user