Moved return types to models package

This commit is contained in:
dankito 2024-11-30 21:08:11 +01:00
parent 51d9bdd617
commit e596b9483b
7 changed files with 19 additions and 17 deletions

View File

@ -1,13 +0,0 @@
package net.codinux.invoicing.email
enum class FetchEmailErrorType {
GetEmail,
GetMesssageBody,
GetAttachment,
ExtractInvoice,
ListenForNewEmails
}

View File

@ -1,6 +1,7 @@
package net.codinux.invoicing.email
import net.codinux.invoicing.email.model.Email
import net.codinux.invoicing.email.model.FetchEmailError
import java.io.File
import java.time.Instant
import java.time.LocalDate

View File

@ -5,6 +5,8 @@ import jakarta.mail.Message
import jakarta.mail.Part
import jakarta.mail.Store
import net.codinux.invoicing.email.model.EmailAccount
import net.codinux.invoicing.email.model.FetchEmailError
import net.codinux.invoicing.email.model.FetchEmailErrorType
import net.codinux.invoicing.filesystem.FileUtil
import org.eclipse.angus.mail.imap.IMAPFolder
import java.io.File

View File

@ -1,6 +1,7 @@
package net.codinux.invoicing.email
import net.codinux.invoicing.email.model.Email
import net.codinux.invoicing.email.model.FetchEmailError
import java.io.File
import java.util.concurrent.atomic.AtomicBoolean

View File

@ -1,4 +1,4 @@
package net.codinux.invoicing.email
package net.codinux.invoicing.email.model
data class FetchEmailError(
val type: FetchEmailErrorType,

View File

@ -0,0 +1,13 @@
package net.codinux.invoicing.email.model
enum class FetchEmailErrorType {
GetEmail,
GetMesssageBody,
GetAttachment,
ExtractInvoice, // TODO: due to orNull() these errors aren't caught anymore
ListenForNewEmails
}

View File

@ -1,6 +1,4 @@
package net.codinux.invoicing.email
import net.codinux.invoicing.email.model.Email
package net.codinux.invoicing.email.model
data class FetchEmailsResult(
val emails: List<Email>,