( config: McpIntegrationConfigType, templateSlug: string | null, )
| 524 | * config-driven), so existing connections keep working. Ambiguity across |
| 525 | * several methods renders no auth rather than guessing. */ |
| 526 | const selectAuthMethod = ( |
| 527 | config: McpIntegrationConfigType, |
| 528 | templateSlug: string | null, |
| 529 | ): McpAuthMethod | undefined => { |
| 530 | const methods = config.authenticationTemplate ?? []; |
| 531 | if (templateSlug !== null) { |
| 532 | const match = methods.find((method: McpAuthMethod) => method.slug === templateSlug); |
| 533 | if (match) return match; |
| 534 | } |
| 535 | return methods.length === 1 ? methods[0] : undefined; |
| 536 | }; |
| 537 | |
| 538 | const buildConnectorInput = ( |
| 539 | config: McpIntegrationConfigType, |
no outgoing calls
no test coverage detected