UNPKG

openclaw

Version:

Multi-channel AI gateway with extensible messaging integrations

29 lines • 1.21 kB
//#region src/channels/allow-from.d.ts declare function parseAccessGroupAllowFromEntry(entry: string): string | null; /** * Merges configured DM allowFrom entries with pairing-store sender ids when policy allows it. */ declare function mergeDmAllowFromSources(params: { allowFrom?: Array<string | number>; storeAllowFrom?: Array<string | number>; dmPolicy?: string; }): string[]; /** * Resolves the allowFrom entries used for group chats, optionally falling back to DM policy. */ declare function resolveGroupAllowFromSources(params: { allowFrom?: Array<string | number>; groupAllowFrom?: Array<string | number>; fallbackToAllowFrom?: boolean; }): string[]; /** * Returns the first value that is present, preserving falsy values such as false, 0, and "". */ declare function firstDefined<T>(...values: Array<T | undefined>): T | undefined; declare function isSenderIdAllowed(allow: { entries: string[]; hasWildcard: boolean; hasEntries: boolean; }, senderId: string | undefined, allowWhenEmpty: boolean): boolean; //#endregion export { resolveGroupAllowFromSources as a, parseAccessGroupAllowFromEntry as i, isSenderIdAllowed as n, mergeDmAllowFromSources as r, firstDefined as t };