@prismshadow/penguin-library-setting · library/setting/src/setting.ts:7

Settings

interface

Settings: the mechanism ServerSettingsRepo implements.

API

@Interface()
export abstract class Settings {
  abstract get(key: string): string | null;
  abstract set(key: string, value: string): void;
  abstract getProxyForApp(): boolean;
  abstract setProxyForApp(value: boolean): void;
  abstract getProxyForAgent(): boolean;
  abstract setProxyForAgent(value: boolean): void;
  abstract getProxyUrl(): string | null;
  abstract setProxyUrl(value: string | null): void;
  abstract getAttachmentMaxMb(): number;
  abstract setAttachmentMaxMb(value: number): void;
  abstract getAttachmentTotalMb(): number;
  abstract setAttachmentTotalMb(value: number): void;
  abstract getAttachmentLimitsMb(): { attachmentMaxMb: number; attachmentTotalMb: number };
  abstract getCompanyMode(): boolean;
  abstract setCompanyMode(value: boolean): void;
  abstract getBrowserExtensionsEnabled(): boolean;
  abstract setBrowserExtensionsEnabled(value: boolean): void;
  abstract getAgentApiEnabled(): boolean;
  abstract setAgentApiEnabled(value: boolean): void;
  abstract watch(listener: (key: string) => void): () => void;
}

Contract Topology

Static AST wiring across @Module / @Provide / @Use

Members (20)

get

get(key: string): string | null
@paramkeystring
@returnsstring | null

set

set(key: string, value: string): void
@paramkeystring
@paramvaluestring
@returnsvoid

getProxyForApp

getProxyForApp(): boolean
@returnsboolean

setProxyForApp

setProxyForApp(value: boolean): void
@paramvalueboolean
@returnsvoid

getProxyForAgent

getProxyForAgent(): boolean
@returnsboolean

setProxyForAgent

setProxyForAgent(value: boolean): void
@paramvalueboolean
@returnsvoid

getProxyUrl

getProxyUrl(): string | null
@returnsstring | null

setProxyUrl

setProxyUrl(value: string | null): void
@paramvaluestring | null
@returnsvoid

getAttachmentMaxMb

getAttachmentMaxMb(): number
@returnsnumber

setAttachmentMaxMb

setAttachmentMaxMb(value: number): void
@paramvaluenumber
@returnsvoid

getAttachmentTotalMb

getAttachmentTotalMb(): number
@returnsnumber

setAttachmentTotalMb

setAttachmentTotalMb(value: number): void
@paramvaluenumber
@returnsvoid

getAttachmentLimitsMb

getAttachmentLimitsMb(): { attachmentMaxMb: number; attachmentTotalMb: number }
@returns{ attachmentMaxMb: number; attachmentTotalMb: number }

getCompanyMode

getCompanyMode(): boolean
@returnsboolean

setCompanyMode

setCompanyMode(value: boolean): void
@paramvalueboolean
@returnsvoid

getBrowserExtensionsEnabled

getBrowserExtensionsEnabled(): boolean
@returnsboolean

setBrowserExtensionsEnabled

setBrowserExtensionsEnabled(value: boolean): void
@paramvalueboolean
@returnsvoid

getAgentApiEnabled

getAgentApiEnabled(): boolean
@returnsboolean

setAgentApiEnabled

setAgentApiEnabled(value: boolean): void
@paramvalueboolean
@returnsvoid

watch

watch(listener: (key: string) => void): () => void

Hears every write, by key (a switch that must act at once, not on its next read). Returns the unsubscribe.

@paramlistener(key: string) => void
@returns() => void