(config: OpenConfig)
| 290 | } |
| 291 | |
| 292 | function botConfig(config: OpenConfig): BotConfigRequest { |
| 293 | return { |
| 294 | id: typeof config.id === 'string' ? config.id : undefined, |
| 295 | type: typeof config.type === 'string' ? config.type : '', |
| 296 | enabled: |
| 297 | typeof config.enable === 'boolean' |
| 298 | ? config.enable |
| 299 | : typeof config.enabled === 'boolean' |
| 300 | ? config.enabled |
| 301 | : undefined, |
| 302 | config, |
| 303 | }; |
| 304 | } |
| 305 | |
| 306 | function providerConfig(config: OpenConfig): ProviderConfigRequest { |
| 307 | return { config } as ProviderConfigRequest; |