linagora / tmail-flutter

A multi-platform (Flutter) application for reading your emails, with your favorite devices, using the JMAP protocol!
GNU Affero General Public License v3.0
299 stars 65 forks source link

[PublicAsset][Dev] Create data handler backbone with PublicAsset methods #3040

Closed tddang-linagora closed 1 week ago

tddang-linagora commented 1 month ago

Description

This data handler will connect "PublicAsset/get" and "PublicAsset/set" methods from the back-end to Flutter client, in order to further implement public link image in Twake Mail signature.

API/DataSource/Repository abstraction

// PublicAsset/get
Future<List<PublicAsset>> getPublicAssetFromIds(List<Id> publicAssetIds);

// PublicAsset/set destroy
Future<void> deletePublicAssets(List<Id> publicAssetIds);

// PublicAsset/set create
Future<void> createPublicAssets(Map<BlobId, List<IdentityId>> blobWithIdentityIds);

// PublicAsset/set update
enum PublicAssetUpdateAction {add, remove}
Future<void> updatePublicAssets(Map<Id, Map<IdentityId, PublicAssetUpdateAction>> publicAssetToUpdate);

DoD

hoangdat commented 1 month ago
hoangdat commented 1 month ago