<?php
declare(strict_types=1);

namespace FreshCloud\Mail\ImapCommands;

interface ImapCommandsInterface
{
    /**
     * @return FolderInfo[]
     */
    public function listFolders(string $userId, string $accountId): array;

    /**
     * @return array{exists: int, recent: int, uidvalidity: int, uidnext: int, flags: array, permanentflags: array}
     */
    public function selectFolder(string $userId, string $accountId, string $folder): array;

    /**
     * @return MessageInfo[]
     */
    public function listMessages(string $userId, string $accountId, string $folder, int $limit = 50, int $offset = 0): array;

    public function getQuota(string $userId, string $accountId): QuotaInfo;

    /**
     * @return MessageInfo[]
     */
    public function searchMessages(string $userId, string $accountId, string $folder, string $criteria, int $limit = 50): array;
}