make more account config fields configurable through web interface

so users can change it themselves, instead of requiring an admin to change the
settings.
This commit is contained in:
Mechiel Lukkien
2024-04-17 21:30:54 +02:00
parent 8bcce40c55
commit baf4df55a6
8 changed files with 223 additions and 13 deletions

View File

@ -451,7 +451,7 @@ export class Client {
return await _sherpaCall(this.baseURL, this.authState, { ...this.options }, paramTypes, returnTypes, fn, params) as void
}
// KeepRetiredPeriodsSave save periods to save retired messages and webhooks.
// KeepRetiredPeriodsSave saves periods to save retired messages and webhooks.
async KeepRetiredPeriodsSave(keepRetiredMessagePeriod: number, keepRetiredWebhookPeriod: number): Promise<void> {
const fn: string = "KeepRetiredPeriodsSave"
const paramTypes: string[][] = [["int64"],["int64"]]
@ -459,6 +459,25 @@ export class Client {
const params: any[] = [keepRetiredMessagePeriod, keepRetiredWebhookPeriod]
return await _sherpaCall(this.baseURL, this.authState, { ...this.options }, paramTypes, returnTypes, fn, params) as void
}
// AutomaticJunkFlagsSave saves settings for automatically marking messages as
// junk/nonjunk when moved to mailboxes matching certain regular expressions.
async AutomaticJunkFlagsSave(enabled: boolean, junkRegexp: string, neutralRegexp: string, notJunkRegexp: string): Promise<void> {
const fn: string = "AutomaticJunkFlagsSave"
const paramTypes: string[][] = [["bool"],["string"],["string"],["string"]]
const returnTypes: string[][] = []
const params: any[] = [enabled, junkRegexp, neutralRegexp, notJunkRegexp]
return await _sherpaCall(this.baseURL, this.authState, { ...this.options }, paramTypes, returnTypes, fn, params) as void
}
// RejectsSave saves the RejectsMailbox and KeepRejects settings.
async RejectsSave(mailbox: string, keep: boolean): Promise<void> {
const fn: string = "RejectsSave"
const paramTypes: string[][] = [["string"],["bool"]]
const returnTypes: string[][] = []
const params: any[] = [mailbox, keep]
return await _sherpaCall(this.baseURL, this.authState, { ...this.options }, paramTypes, returnTypes, fn, params) as void
}
}
export const defaultBaseURL = (function() {