refactor: share synology chat raw config fields

This commit is contained in:
Peter Steinberger 2026-03-13 21:15:42 +00:00
parent 1cea43d349
commit 534e4b1418
1 changed files with 6 additions and 14 deletions

View File

@ -2,8 +2,7 @@
* Type definitions for the Synology Chat channel plugin.
*/
/** Raw channel config from openclaw.json channels.synology-chat */
export interface SynologyChatChannelConfig {
type SynologyChatConfigFields = {
enabled?: boolean;
token?: string;
incomingUrl?: string;
@ -14,22 +13,15 @@ export interface SynologyChatChannelConfig {
rateLimitPerMinute?: number;
botName?: string;
allowInsecureSsl?: boolean;
};
/** Raw channel config from openclaw.json channels.synology-chat */
export interface SynologyChatChannelConfig extends SynologyChatConfigFields {
accounts?: Record<string, SynologyChatAccountRaw>;
}
/** Raw per-account config (overrides base config) */
export interface SynologyChatAccountRaw {
enabled?: boolean;
token?: string;
incomingUrl?: string;
nasHost?: string;
webhookPath?: string;
dmPolicy?: "open" | "allowlist" | "disabled";
allowedUserIds?: string | string[];
rateLimitPerMinute?: number;
botName?: string;
allowInsecureSsl?: boolean;
}
export interface SynologyChatAccountRaw extends SynologyChatConfigFields {}
/** Fully resolved account config with defaults applied */
export interface ResolvedSynologyChatAccount {