refactor: mail collections delete #52

Merged
Sebastian merged 1 commits from refactor/mail-collections into main 2026-05-06 16:28:44 +00:00
3 changed files with 4 additions and 4 deletions

View File

@@ -20,6 +20,7 @@ use JsonSerializable;
*/
enum CollectionRoles: string implements JsonSerializable {
case None = '';
case Inbox = 'inbox';
case Drafts = 'drafts';
case Sent = 'sent';
@@ -28,7 +29,6 @@ enum CollectionRoles: string implements JsonSerializable {
case Archive = 'archive';
case Outbox = 'outbox';
case Queue = 'queue';
case Custom = 'custom';
public function jsonSerialize(): string {
return $this->value;

View File

@@ -38,6 +38,7 @@ interface ServiceBaseInterface extends ResourceServiceBaseInterface {
// Collection Filter
public const CAPABILITY_COLLECTION_FILTER_LABEL = 'label';
public const CAPABILITY_COLLECTION_FILTER_ROLE = 'role';
public const CAPABILITY_COLLECTION_FILTER_SUBSCRIBED = 'subscribed';
// Collection Sort
public const CAPABILITY_COLLECTION_SORT_LABEL = 'label';
public const CAPABILITY_COLLECTION_SORT_RANK = 'rank';

View File

@@ -68,11 +68,10 @@ interface ServiceCollectionMutableInterface extends ServiceBaseInterface {
*
* @param string|int $identifier Collection ID
* @param bool $force Force deletion even if not empty
* @param bool $recursive Recursively delete contents
*
* @return bool True if deleted
* @return CollectionBaseInterface|true Collection object on soft delete, true on hard delete
*/
public function collectionDelete(string|int $identifier, bool $force = false, bool $recursive = false): bool;
public function collectionDelete(string|int $identifier, bool $force = false): CollectionBaseInterface | true;
/**
* Moves a collection to a new parent