( params: FetchOAuthCredentialsParams, signal?: AbortSignal )
| 28 | } |
| 29 | |
| 30 | export async function fetchOAuthCredentials( |
| 31 | params: FetchOAuthCredentialsParams, |
| 32 | signal?: AbortSignal |
| 33 | ): Promise<Credential[]> { |
| 34 | const { providerId, workspaceId, workflowId } = params |
| 35 | if (!providerId) return [] |
| 36 | const data = await requestJson(listOAuthCredentialsContract, { |
| 37 | signal, |
| 38 | query: { |
| 39 | provider: providerId, |
| 40 | workspaceId, |
| 41 | workflowId, |
| 42 | }, |
| 43 | }) |
| 44 | return data.credentials ?? [] |
| 45 | } |
| 46 | |
| 47 | export async function fetchOAuthCredentialDetail( |
| 48 | credentialId: string, |
no test coverage detected