(provider: ProviderV2.Info, integration: Integration.Info | undefined)
| 69 | const integrations = yield* Integration.Service |
| 70 | |
| 71 | const available = (provider: ProviderV2.Info, integration: Integration.Info | undefined) => { |
| 72 | if (provider.disabled) return false |
| 73 | if (typeof provider.request.body.apiKey === "string") return true |
| 74 | if (integration?.connections.length) return true |
| 75 | return provider.integrationID === undefined && !integration |
| 76 | } |
| 77 | |
| 78 | const projectModel = (model: ModelV2.Info, provider: ProviderV2.Info) => { |
| 79 | const api = |