Moved return types to models package
This commit is contained in:
parent
51d9bdd617
commit
e596b9483b
|
@ -1,13 +0,0 @@
|
|||
package net.codinux.invoicing.email
|
||||
|
||||
enum class FetchEmailErrorType {
|
||||
GetEmail,
|
||||
|
||||
GetMesssageBody,
|
||||
|
||||
GetAttachment,
|
||||
|
||||
ExtractInvoice,
|
||||
|
||||
ListenForNewEmails
|
||||
}
|
|
@ -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
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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
|
||||
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
package net.codinux.invoicing.email
|
||||
package net.codinux.invoicing.email.model
|
||||
|
||||
data class FetchEmailError(
|
||||
val type: FetchEmailErrorType,
|
|
@ -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
|
||||
}
|
|
@ -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>,
|
Loading…
Reference in New Issue