forked from rinkp/custommailcow-ldap
-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
2 changed files
with
88 additions
and
94 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -30,123 +30,127 @@ export async function initializeMailcowDB(config: ContainerConfig): Promise<void | |
.select('c_defaults') | ||
.from('sogo_user_profile', 'profile') | ||
.where('c_uid = "[email protected]"') | ||
.getRawOne(); | ||
.getRawOne<Result>(); | ||
|
||
// eslint-disable-next-line @typescript-eslint/no-use-before-define | ||
const test2 = plainToClass(Test, test); | ||
// const test2 = plainToClass(Test, test); | ||
|
||
console.log(test2); | ||
console.log(test); | ||
console.log('=-=-=-=-=-=-=-=-=-=--=-=-=-=-=-=-=-=-=-=-'); | ||
console.log(test2.SOGoMailIdentities); | ||
// @ts-ignore | ||
console.log(test.SOGoMailIdentities); | ||
|
||
} | ||
|
||
export class Test { | ||
SOGoCalendarCategoriesColors: SOGoCalendarCategoriesColors; | ||
export class Result { | ||
c_defaults: Defaults; | ||
} | ||
|
||
SOGoGravatarEnabled: number; | ||
export interface Defaults { | ||
SOGoCalendarCategoriesColors: SOGoCalendarCategoriesColors; | ||
SOGoGravatarEnabled: number; | ||
|
||
LocaleCode: string; | ||
LocaleCode: string; | ||
|
||
SOGoMailComposeFontSize: number; | ||
SOGoMailComposeFontSize: number; | ||
|
||
SOGoMailReceiptNonRecipientAction: string; | ||
SOGoMailReceiptNonRecipientAction: string; | ||
|
||
SOGoDayStartTime: string; | ||
SOGoDayStartTime: string; | ||
|
||
SOGoAlternateAvatar: string; | ||
SOGoAlternateAvatar: string; | ||
|
||
SOGoLoginModule: string; | ||
SOGoLoginModule: string; | ||
|
||
SOGoLDAPGroupExpansionEnabled: number; | ||
SOGoLDAPGroupExpansionEnabled: number; | ||
|
||
SOGoCalendarCategories: string[]; | ||
SOGoCalendarCategories: string[]; | ||
|
||
SOGoTOTPEnabled: number; | ||
SOGoTOTPEnabled: number; | ||
|
||
emailSeparatorKeys: number[]; | ||
emailSeparatorKeys: number[]; | ||
|
||
SOGoDayEndTime: string; | ||
SOGoDayEndTime: string; | ||
|
||
SOGoMailComposeMessageType: string; | ||
SOGoMailComposeMessageType: string; | ||
|
||
SOGoCalendarWeekdays: string[]; | ||
SOGoCalendarWeekdays: string[]; | ||
|
||
hasActiveExternalSieveScripts: number; | ||
hasActiveExternalSieveScripts: number; | ||
|
||
SOGoShortDateFormat: string; | ||
SOGoShortDateFormat: string; | ||
|
||
SOGoMailSignaturePlacement: string; | ||
SOGoMailSignaturePlacement: string; | ||
|
||
SOGoMailMessageForwarding: string; | ||
SOGoMailMessageForwarding: string; | ||
|
||
ckLocaleCode: string; | ||
ckLocaleCode: string; | ||
|
||
SOGoMailReceiptOutsideDomainAction: string; | ||
SOGoMailReceiptOutsideDomainAction: string; | ||
|
||
Forward: Forward; | ||
Forward: Forward; | ||
|
||
SOGoTimeZone: string; | ||
SOGoTimeZone: string; | ||
|
||
SOGoMailReceiptAllow: string; | ||
SOGoMailReceiptAllow: string; | ||
|
||
UserTimeZoneSecondsFromGMT: number; | ||
UserTimeZoneSecondsFromGMT: number; | ||
|
||
SOGoMailComposeWindow: string; | ||
SOGoMailComposeWindow: string; | ||
|
||
SOGoTimeFormat: string; | ||
SOGoTimeFormat: string; | ||
|
||
Vacation: Vacation; | ||
Vacation: Vacation; | ||
|
||
SOGoRememberLastModule: number; | ||
SOGoRememberLastModule: number; | ||
|
||
SOGoCalendarTasksDefaultClassification: string; | ||
SOGoCalendarTasksDefaultClassification: string; | ||
|
||
SOGoPasswordRecoveryMode: string; | ||
SOGoPasswordRecoveryMode: string; | ||
|
||
SOGoRefreshViewCheck: string; | ||
SOGoRefreshViewCheck: string; | ||
|
||
SOGoCalendarDefaultReminder: string; | ||
SOGoCalendarDefaultReminder: string; | ||
|
||
SOGoMailAutoSave: number; | ||
SOGoMailAutoSave: number; | ||
|
||
SOGoMailLabelsColors: { [key: string]: string[] }; | ||
SOGoMailLabelsColors: { [key: string]: string[] }; | ||
|
||
SOGoLongDateFormat: string; | ||
SOGoLongDateFormat: string; | ||
|
||
SOGoMailReceiptAnyAction: string; | ||
SOGoMailReceiptAnyAction: string; | ||
|
||
SOGoMailAutoMarkAsReadDelay: number; | ||
SOGoMailAutoMarkAsReadDelay: number; | ||
|
||
SOGoDefaultCalendar: string; | ||
SOGoDefaultCalendar: string; | ||
|
||
SOGoMailReplyPlacement: string; | ||
SOGoMailReplyPlacement: string; | ||
|
||
SOGoAppointmentSendEMailNotifications: number; | ||
SOGoAppointmentSendEMailNotifications: number; | ||
|
||
SOGoFirstWeekOfYear: string; | ||
SOGoFirstWeekOfYear: string; | ||
|
||
SOGoSelectedAddressBook: string; | ||
SOGoSelectedAddressBook: string; | ||
|
||
SOGoCalendarEventsDefaultClassification: string; | ||
|
||
SOGoAnimationMode: string; | ||
SOGoAnimationMode: string; | ||
|
||
SOGoPasswordRecoveryQuestion: string; | ||
SOGoPasswordRecoveryQuestion: string; | ||
|
||
SOGoMailAddOutgoingAddresses: number; | ||
SOGoMailAddOutgoingAddresses: number; | ||
|
||
AuxiliaryMailAccounts: any[]; | ||
AuxiliaryMailAccounts: any[]; | ||
|
||
SOGoFirstDayOfWeek: number; | ||
SOGoFirstDayOfWeek: number; | ||
|
||
SOGoLanguage: string; | ||
SOGoLanguage: string; | ||
|
||
SOGoContactsCategories: string[]; | ||
SOGoContactsCategories: string[]; | ||
|
||
SOGoMailIdentities: SOGoMailIdentity[]; | ||
SOGoMailIdentities: SOGoMailIdentity[]; | ||
|
||
SOGoMailDisplayRemoteInlineImages: string; | ||
SOGoMailDisplayRemoteInlineImages: string; | ||
} | ||
|
||
export interface Forward { | ||
|
@@ -155,54 +159,44 @@ export interface Forward { | |
|
||
export interface SOGoCalendarCategoriesColors { | ||
Miscellaneous: string; | ||
Personal: string; | ||
Customer: string; | ||
Gifts: string; | ||
Business: string; | ||
Status: string; | ||
Anniversary: string; | ||
Vacation: string; | ||
Travel: string; | ||
Clients: string; | ||
Competition: string; | ||
Favorites: string; | ||
Calls: string; | ||
Personal: string; | ||
Customer: string; | ||
Gifts: string; | ||
Business: string; | ||
Status: string; | ||
Anniversary: string; | ||
Vacation: string; | ||
Travel: string; | ||
Clients: string; | ||
Competition: string; | ||
Favorites: string; | ||
Calls: string; | ||
PublicHoliday: string; | ||
Issues: string; | ||
Meeting: string; | ||
Projects: string; | ||
Holidays: string; | ||
Ideas: string; | ||
Birthday: string; | ||
Suppliers: string; | ||
Followup: string; | ||
Issues: string; | ||
Meeting: string; | ||
Projects: string; | ||
Holidays: string; | ||
Ideas: string; | ||
Birthday: string; | ||
Suppliers: string; | ||
Followup: string; | ||
} | ||
|
||
export interface SOGoMailIdentity { | ||
isDefault?: number; | ||
email: string; | ||
fullName: string; | ||
signature: string; | ||
replyTo: string; | ||
email: string; | ||
fullName: string; | ||
signature: string; | ||
replyTo: string; | ||
} | ||
|
||
export interface Vacation { | ||
daysBetweenResponse: number; | ||
daysBetweenResponse: number; | ||
autoReplyEmailAddresses: string[]; | ||
days: any[]; | ||
days: any[]; | ||
} | ||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
// UPDATE sogo_user_profile SET c_defaults = | ||
// { | ||
// "SOGoCalendarCategoriesColors":{ | ||
|
Large diffs are not rendered by default.
Oops, something went wrong.