44
55use DirectoryTree \ImapEngine \Collections \ResponseCollection ;
66use DirectoryTree \ImapEngine \Connection \Responses \TaggedResponse ;
7+ use DirectoryTree \ImapEngine \Connection \Responses \UntaggedResponse ;
78
89interface ConnectionInterface
910{
@@ -45,19 +46,17 @@ public function done(): void;
4546 /**
4647 * Send noop command.
4748 */
48- public function noop (): ResponseCollection ;
49+ public function noop (): TaggedResponse ;
4950
5051 /**
5152 * Apply session saved changes to the server.
5253 */
5354 public function expunge (): ResponseCollection ;
5455
5556 /**
56- * Get an array of available capabilities.
57- *
58- * @return ResponseCollection containing a list of capabilities
57+ * Get the mailboxes available capabilities.
5958 */
60- public function capability (): ResponseCollection ;
59+ public function capability (): UntaggedResponse ;
6160
6261 /**
6362 * Execute a search request.
@@ -76,27 +75,27 @@ public function id(?array $ids = null): ResponseCollection;
7675 /**
7776 * Fetch message UIDs using the given message numbers.
7877 */
79- public function uids (int |array $ msgns ): ResponseCollection ;
78+ public function uids (int |array $ msgns ): UntaggedResponse ;
8079
8180 /**
8281 * Fetch message contents.
8382 */
84- public function contents (int |array $ ids ): ResponseCollection ;
83+ public function contents (int |array $ ids ): UntaggedResponse ;
8584
8685 /**
8786 * Fetch message headers.
8887 */
89- public function headers (int |array $ ids ): ResponseCollection ;
88+ public function headers (int |array $ ids ): UntaggedResponse ;
9089
9190 /**
9291 * Fetch message flags.
9392 */
94- public function flags (int |array $ ids ): ResponseCollection ;
93+ public function flags (int |array $ ids ): UntaggedResponse ;
9594
9695 /**
9796 * Fetch message sizes.
9897 */
99- public function sizes (int |array $ ids ): ResponseCollection ;
98+ public function sizes (int |array $ ids ): UntaggedResponse ;
10099
101100 /**
102101 * Select the given folder.
@@ -122,7 +121,7 @@ public function folders(string $reference = '', string $folder = '*'): ResponseC
122121 *
123122 * @return ResponseCollection list of STATUS items
124123 */
125- public function folderStatus (string $ folder , array $ arguments = ['MESSAGES ' , 'UNSEEN ' , 'RECENT ' , 'UIDNEXT ' , 'UIDVALIDITY ' ]): ResponseCollection ;
124+ public function folderStatus (string $ folder , array $ arguments = ['MESSAGES ' , 'UNSEEN ' , 'RECENT ' , 'UIDNEXT ' , 'UIDVALIDITY ' ]): UntaggedResponse ;
126125
127126 /**
128127 * Set message flags.
@@ -191,32 +190,32 @@ public function moveManyMessages(array $messages, string $folder): ResponseColle
191190 */
192191 public function createFolder (string $ folder ): ResponseCollection ;
193192
194- /**
195- * Rename an existing folder.
196- *
197- * @param string $oldPath old name
198- * @param string $newPath new name
199- */
200- public function renameFolder (string $ oldPath , string $ newPath ): ResponseCollection ;
201-
202193 /**
203194 * Delete a folder.
204195 *
205196 * @param string $folder folder name
206197 */
207- public function deleteFolder (string $ folder ): ResponseCollection ;
198+ public function deleteFolder (string $ folder ): TaggedResponse ;
208199
209200 /**
210201 * Subscribe to a folder.
211202 *
212203 * @param string $folder folder name
213204 */
214- public function subscribeFolder (string $ folder ): ResponseCollection ;
205+ public function subscribeFolder (string $ folder ): TaggedResponse ;
215206
216207 /**
217208 * Unsubscribe from a folder.
218209 *
219210 * @param string $folder folder name
220211 */
221- public function unsubscribeFolder (string $ folder ): ResponseCollection ;
212+ public function unsubscribeFolder (string $ folder ): TaggedResponse ;
213+
214+ /**
215+ * Rename an existing folder.
216+ *
217+ * @param string $oldPath old name
218+ * @param string $newPath new name
219+ */
220+ public function renameFolder (string $ oldPath , string $ newPath ): TaggedResponse ;
222221}
0 commit comments