( config: McpIntegrationConfigType, templateSlug: string | null, )
| 663 | * config-driven), so existing connections keep working. Ambiguity across |
| 664 | * several methods renders no auth rather than guessing. */ |
| 665 | const selectAuthMethod = ( |
| 666 | config: McpIntegrationConfigType, |
| 667 | templateSlug: string | null, |
| 668 | ): McpAuthMethod | undefined => { |
| 669 | const methods = projectedMcpAuthMethods(config); |
| 670 | if (templateSlug !== null) { |
| 671 | const match = methods.find((method: McpAuthMethod) => method.slug === templateSlug); |
| 672 | if (match) return match; |
| 673 | } |
| 674 | return methods.length === 1 ? methods[0] : undefined; |
| 675 | }; |
| 676 | |
| 677 | const buildConnectorInput = ( |
| 678 | config: McpIntegrationConfigType, |
no test coverage detected