@@ -58,7 +58,7 @@ type RelayFrame = 's' | 'm' | 'h' | 'd';
5858/**
5959 * Domain creation payload.
6060 */
61- export interface DomainPostRequest extends BaseDomainAttributes {
61+ export interface DomainPostRequest extends BaseDomainAttributes {
6262 /**
6363 * The domain to create.
6464 */
@@ -92,7 +92,7 @@ export interface DomainDeleteRequest {
9292 */
9393export interface DomainEditAttributes extends BaseDomainAttributes {
9494 /**
95- * Is domain global address list active or not, it enables shared contacts across domain in SOGo webmail
95+ * Is domain global address list active or not, it enables shared contacts across domain in SOGo webmail
9696 */
9797 gal : boolean
9898 /**
@@ -156,7 +156,7 @@ export interface Domain {
156156 */
157157 domain_name : string ;
158158 /**
159- * Is domain global address list active or not, it enables shared contacts across domain in SOGo webmail
159+ * Is domain global address list active or not, it enables shared contacts across domain in SOGo webmail
160160 */
161161 gal : boolean ;
162162 /**
@@ -366,7 +366,7 @@ export interface MailboxDeleteRequest {
366366/**
367367 * Attributes of the mailbox you can edit.
368368 */
369- export interface MailboxEditAttributes extends BaseMailboxAttributes {
369+ export interface MailboxEditAttributes extends BaseMailboxAttributes {
370370 /**
371371 * List of allowed send from addresses.
372372 */
@@ -723,7 +723,7 @@ export interface AliasEditRequest {
723723 /**
724724 * List of IDs of the aliases to update.
725725 */
726- items : number [ ] ;
726+ items : number | number [ ] ;
727727 /**
728728 * The attributes to set.
729729 */
@@ -783,6 +783,163 @@ export interface Alias extends AliasAttributes {
783783 modified : string | null
784784}
785785
786+ /**
787+ * All the attributes of a sync job.
788+ */
789+ export interface SyncjobAttributes {
790+ /**
791+ * Your local mailcow mailbox.
792+ */
793+ username : string ;
794+ /**
795+ * The smtp server where mails should be synced from.
796+ */
797+ host1 : string ;
798+ /**
799+ * The smtp port of the target mail server.
800+ */
801+ port1 : number ;
802+ /**
803+ * The password of the mailbox.
804+ */
805+ password1 : string ;
806+ /**
807+ * The target email account.
808+ */
809+ user1 : string ,
810+ /**
811+ * The encryption method used to connect to the mailserver.
812+ */
813+ enc1 : "TLS" | "SSL" | "PLAIN" ;
814+ /**
815+ * The interval in which messages should be synced.
816+ */
817+ mins_interval : number ;
818+ /**
819+ * Sync into subfolder on destination (empty = do not use subfolder).
820+ */
821+ subfolder2 : string ;
822+ /**
823+ * Only sync messages up to this age in days.
824+ */
825+ maxage : number ;
826+ /**
827+ * Max speed transfer limit for the sync.
828+ */
829+ maxbytespersecond : number ;
830+ /**
831+ * Timeout for connection to remote host.
832+ */
833+ timeout1 : number ;
834+ /**
835+ * Timeout for connection to local host.
836+ */
837+ timeout2 : number ;
838+ /**
839+ * Exclude objects (regex).
840+ */
841+ exclude : string ;
842+ /**
843+ * Custom parameters.
844+ */
845+ custom_params : string ;
846+ /**
847+ * Delete duplicates on destination (--delete2duplicates).
848+ */
849+ delete2duplicates : boolean ;
850+ /**
851+ * Delete from source when completed (--delete1).
852+ */
853+ delete1 : boolean ;
854+ /**
855+ * Delete messages on destination that are not on source (--delete2).
856+ */
857+ delete2 : boolean ;
858+ /**
859+ * Try to automap folders ("sent items", "sent" => "sent" etc.) (--automap).
860+ */
861+ automap : boolean ;
862+ /**
863+ * Skip duplicate messages across folders (first come, first serve) (--skipcrossduplicates).
864+ */
865+ skipcrossduplicates : boolean ;
866+ /**
867+ * Subscribe all folders (--subscribeall).
868+ */
869+ subscribeall : boolean ;
870+ /**
871+ * Enables or disables the sync job.
872+ */
873+ active : boolean ;
874+ }
875+
876+ /**
877+ * Sync job creation payload.
878+ */
879+ export type SyncjobPostRequest = SyncjobAttributes
880+
881+ /**
882+ * Sync job delete payload.
883+ */
884+ export interface SyncjobDeleteRequest {
885+ /**
886+ * Array of IDs to delete.
887+ */
888+ items : number [ ]
889+ }
890+
891+ export type SyncjobEditAttributes = Partial < SyncjobAttributes >
892+
893+ /**
894+ * Sync job update payload.
895+ */
896+ export interface SyncjobUpdateRequest {
897+ /**
898+ * The attributes to set.
899+ */
900+ attr : SyncjobEditAttributes
901+ /**
902+ * List of IDs to update.
903+ */
904+ items : number | number [ ]
905+ }
906+
907+ /**
908+ * Sync job as returned by the Mailcow API.
909+ */
910+ export interface Syncjob {
911+ active : boolean ,
912+ authmd51 : boolean ,
913+ authmech1 : "TLS" | "SSL" | "PLAIN" ,
914+ automap : boolean ,
915+ created : string ,
916+ custom_params : string ,
917+ delete1 : boolean ,
918+ delete2 : boolean ,
919+ delete2duplicates : boolean ,
920+ domain2 : string ,
921+ enc1 : "TLS" | "SSL" | "PLAIN" ,
922+ exclude : string ,
923+ host1 : string ,
924+ id : number ,
925+ is_running : boolean ,
926+ last_run : string ,
927+ log : string ,
928+ maxage : number ,
929+ maxbytespersecond : number ,
930+ mins_interval : number ,
931+ modified : string ,
932+ port1 : number ,
933+ regextrans2 : string ,
934+ skipcrossduplicates : boolean ,
935+ subfolder2 : string ,
936+ subscribeall : boolean
937+ timeout1 : number ,
938+ timeout2 : number ,
939+ user1 : string ,
940+ user2 : string
941+ }
942+
786943/**
787944 * Error class used for exception handling.
788945 */
0 commit comments