Add Feishu channel adapter with webhook and send path
This commit is contained in:
@@ -608,6 +608,33 @@ describe('configSchema — line', () => {
|
||||
});
|
||||
});
|
||||
|
||||
describe('configSchema — feishu', () => {
|
||||
const minimalConfig = {
|
||||
telegram: { bot_token: 'test', allowed_chat_ids: [1] },
|
||||
models: { default: { provider: 'anthropic', model: 'claude-3' } },
|
||||
};
|
||||
|
||||
it('accepts feishu config and defaults optional fields', () => {
|
||||
const result = configSchema.parse({
|
||||
...minimalConfig,
|
||||
feishu: {
|
||||
app_id: 'cli_a1b2c3',
|
||||
app_secret: 'secret',
|
||||
},
|
||||
});
|
||||
|
||||
expect(result.feishu).toBeDefined();
|
||||
if (!result.feishu) {
|
||||
throw new Error('Expected feishu config');
|
||||
}
|
||||
expect(result.feishu.app_id).toBe('cli_a1b2c3');
|
||||
expect(result.feishu.app_secret).toBe('secret');
|
||||
expect(result.feishu.allowed_chat_ids).toEqual([]);
|
||||
expect(result.feishu.require_mention).toBe(true);
|
||||
expect(result.feishu.mention_name).toBe('flynn');
|
||||
});
|
||||
});
|
||||
|
||||
describe('configSchema — whatsapp', () => {
|
||||
const minimalConfig = {
|
||||
telegram: { bot_token: 'test', allowed_chat_ids: [1] },
|
||||
|
||||
Reference in New Issue
Block a user