TF-3040 Create public_asset feature
This commit is contained in:
@@ -0,0 +1,15 @@
|
||||
class UnsupportedCapabilityException implements Exception {
|
||||
const UnsupportedCapabilityException();
|
||||
}
|
||||
|
||||
class CannotCreatePublicAssetException implements Exception {
|
||||
const CannotCreatePublicAssetException();
|
||||
}
|
||||
|
||||
class CannotDestroyPublicAssetException implements Exception {
|
||||
const CannotDestroyPublicAssetException();
|
||||
}
|
||||
|
||||
class CannotUpdatePublicAssetException implements Exception {
|
||||
const CannotUpdatePublicAssetException();
|
||||
}
|
||||
@@ -0,0 +1,34 @@
|
||||
import 'package:jmap_dart_client/jmap/account_id.dart';
|
||||
import 'package:jmap_dart_client/jmap/core/id.dart';
|
||||
import 'package:jmap_dart_client/jmap/core/session/session.dart';
|
||||
import 'package:jmap_dart_client/jmap/identities/identity.dart';
|
||||
import 'package:jmap_dart_client/jmap/mail/extensions/public_asset/public_asset.dart';
|
||||
|
||||
abstract class PublicAssetRepository {
|
||||
Future<List<PublicAsset>> getPublicAssetsFromIds(
|
||||
Session session,
|
||||
AccountId accountId,
|
||||
{required List<Id> publicAssetIds}
|
||||
);
|
||||
|
||||
Future<PublicAsset> createPublicAsset(
|
||||
Session session,
|
||||
AccountId accountId,
|
||||
{
|
||||
required Id blobId,
|
||||
required IdentityId? identityId
|
||||
}
|
||||
);
|
||||
|
||||
Future<void> deletePublicAssets(
|
||||
Session session,
|
||||
AccountId accountId,
|
||||
{required List<Id> publicAssetIds}
|
||||
);
|
||||
|
||||
Future<void> updatePublicAssets(
|
||||
Session session,
|
||||
AccountId accountId,
|
||||
{required List<PublicAsset> publicAssets}
|
||||
);
|
||||
}
|
||||
Reference in New Issue
Block a user