No JSDoc comment in source yet.
API
@Component()
export class ServerSettingsRepo implements Settings {
@Use() private readonly db!: Db;
get(key: string): string | null;
set(key: string, value: string): void;
watch(listener: (key: string) => void): () => void;
getProxyForApp(): boolean;
setProxyForApp(value: boolean): void;
getProxyForAgent(): boolean;
setProxyForAgent(value: boolean): void;
getProxyUrl(): string | null;
setProxyUrl(value: string | null): void;
getAttachmentMaxMb(): number;
setAttachmentMaxMb(value: number): void;
getAttachmentTotalMb(): number;
setAttachmentTotalMb(value: number): void;
getAttachmentLimitsMb(): { attachmentMaxMb: number; attachmentTotalMb: number };
getCompanyMode(): boolean;
setCompanyMode(value: boolean): void;
getBrowserExtensionsEnabled(): boolean;
setBrowserExtensionsEnabled(value: boolean): void;
getAgentApiEnabled(): boolean;
setAgentApiEnabled(value: boolean): void;
}Dependencies & Wiring
Extracted from class decoratorsMethods (20)
get
get(key: string): string | nullReturns the raw JSON-encoded value; null if never set.
stringstring | nullset
set(key: string, value: string): voidstringstringvoidwatch
watch(listener: (key: string) => void): () => void(key: string) => void() => voidgetProxyForApp
getProxyForApp(): booleanThe "application uses the proxy" switch (the server's own outbound dispatcher).
booleansetProxyForApp
setProxyForApp(value: boolean): voidbooleanvoidgetProxyForAgent
getProxyForAgent(): booleanThe "agent environment uses the proxy" switch (command subprocess env policy).
booleansetProxyForAgent
setProxyForAgent(value: boolean): voidbooleanvoidgetProxyUrl
getProxyUrl(): string | nullThe explicit proxy address (normalized at write time by the settings route); null = follow the proxy environment variables. An absent or unreadable row reads as null (the safe default: behave as before the setting existed).
string | nullsetProxyUrl
setProxyUrl(value: string | null): voidstring | nullvoidgetAttachmentMaxMb
getAttachmentMaxMb(): numberPer-file composer attachment cap, in whole MB.
numbersetAttachmentMaxMb
setAttachmentMaxMb(value: number): voidnumbervoidgetAttachmentTotalMb
getAttachmentTotalMb(): numberPer-message total attachment cap (decoded bytes), in whole MB.
numbersetAttachmentTotalMb
setAttachmentTotalMb(value: number): voidnumbervoidgetAttachmentLimitsMb
getAttachmentLimitsMb(): { attachmentMaxMb: number; attachmentTotalMb: number }The pair as one value — what the validators, the body cap and /api/me all read. Kept here
so no caller has to remember that the two numbers are only meaningful together (the total is
never below the per-file cap; the PUT enforces that against the effective post-write pair).
{ attachmentMaxMb: number; attachmentTotalMb: number }getCompanyMode
getCompanyMode(): booleanCompany mode master switch (default OFF): an absent row — and an unreadable one — means off, so the whole mode stays out of the way until an admin turns it on under System settings > Server > Company mode.
booleansetCompanyMode
setCompanyMode(value: boolean): voidbooleanvoidgetBrowserExtensionsEnabled
getBrowserExtensionsEnabled(): booleanWhether users may drive their own Chrome through the extension (default ON): only a stored
false turns it off, so an unreadable row leaves the feature as it ships.
booleansetBrowserExtensionsEnabled
setBrowserExtensionsEnabled(value: boolean): voidbooleanvoidgetAgentApiEnabled
getAgentApiEnabled(): booleanWhether external programs may reach Agents through the Agent API (default ON): only a stored
false turns it off, so an unreadable row leaves the feature as it ships. Read per request
by the /api/amsp/v1 gate, so flipping it needs no restart.
booleansetAgentApiEnabled
setAgentApiEnabled(value: boolean): voidbooleanvoid