* Classify a canonical group as a credential/resource selector based on the * sub-block type of its members (oauth-input -> credential, *-selector -> * resource).
( blockConfig: any, memberIds: string[] )
| 529 | * resource). |
| 530 | */ |
| 531 | function classifyCanonicalKind( |
| 532 | blockConfig: any, |
| 533 | memberIds: string[] |
| 534 | ): 'credential' | 'resource' | 'other' { |
| 535 | for (const id of memberIds) { |
| 536 | const cfg = blockConfig.subBlocks?.find((sb: any) => sb.id === id) |
| 537 | const type = cfg?.type |
| 538 | if (type === 'oauth-input') return 'credential' |
| 539 | if (typeof type === 'string' && type.endsWith('-selector')) return 'resource' |
| 540 | } |
| 541 | return 'other' |
| 542 | } |
| 543 | |
| 544 | /** |
| 545 | * Non-throwing analysis of a block's required fields and canonical-mode value |
no outgoing calls
no test coverage detected