mirror of
https://github.com/hexastack/hexabot
synced 2025-06-26 18:27:28 +00:00
feat(api): add strict Setting types to plugins
This commit is contained in:
parent
801a60b331
commit
c15c30895f
@ -10,7 +10,7 @@ import { ChannelEvent } from '@/channel/lib/EventWrapper';
|
||||
import { BlockCreateDto } from '@/chat/dto/block.dto';
|
||||
import { Block } from '@/chat/schemas/block.schema';
|
||||
import { Conversation } from '@/chat/schemas/conversation.schema';
|
||||
import { SettingCreateDto } from '@/setting/dto/setting.dto';
|
||||
import { AnySetting, StrictSetting } from '@/setting/schemas/types';
|
||||
|
||||
export type PluginName = `${string}-plugin`;
|
||||
|
||||
@ -23,7 +23,7 @@ export interface CustomBlocks {}
|
||||
|
||||
type BlockAttrs = Partial<BlockCreateDto> & { name: string };
|
||||
|
||||
export type PluginSetting = Omit<SettingCreateDto, 'weight'>;
|
||||
export type PluginSetting = StrictSetting<AnySetting>;
|
||||
|
||||
export type PluginBlockTemplate = Omit<
|
||||
BlockAttrs,
|
||||
|
Loading…
Reference in New Issue
Block a user