( spin: Spin, auth: AuthProvider, )
| 83 | } |
| 84 | |
| 85 | function getCell( |
| 86 | spin: Spin, |
| 87 | auth: AuthProvider, |
| 88 | ): Set<Capability> { |
| 89 | switch (spin) { |
| 90 | case 'dev': |
| 91 | return ALL |
| 92 | case 'internal': |
| 93 | switch (auth) { |
| 94 | case 'noumena-managed': |
| 95 | case 'noumena-apikey': |
| 96 | return INTERNAL_MANAGED |
| 97 | case 'byok-anthropic': |
| 98 | case 'byok-openai': |
| 99 | return INTERNAL_BYOK |
| 100 | } |
| 101 | break |
| 102 | case 'public': |
| 103 | switch (auth) { |
| 104 | case 'noumena-managed': |
| 105 | case 'noumena-apikey': |
| 106 | return PUBLIC_MANAGED |
| 107 | case 'byok-anthropic': |
| 108 | case 'byok-openai': |
| 109 | return PUBLIC_BYOK |
| 110 | } |
| 111 | break |
| 112 | } |
| 113 | return emptySet() |
| 114 | } |
| 115 | |
| 116 | /** |
| 117 | * Get the set of capabilities for a given spin + auth + access combination. |
no test coverage detected