( enabledOrOptions?: boolean | UseOAuthCredentialsOptions )
| 67 | } |
| 68 | |
| 69 | function resolveOptions( |
| 70 | enabledOrOptions?: boolean | UseOAuthCredentialsOptions |
| 71 | ): Required<UseOAuthCredentialsOptions> { |
| 72 | if (typeof enabledOrOptions === 'boolean') { |
| 73 | return { |
| 74 | enabled: enabledOrOptions, |
| 75 | workspaceId: '', |
| 76 | workflowId: '', |
| 77 | } |
| 78 | } |
| 79 | |
| 80 | return { |
| 81 | enabled: enabledOrOptions?.enabled ?? true, |
| 82 | workspaceId: enabledOrOptions?.workspaceId ?? '', |
| 83 | workflowId: enabledOrOptions?.workflowId ?? '', |
| 84 | } |
| 85 | } |
| 86 | |
| 87 | export function useOAuthCredentials( |
| 88 | providerId?: string, |
no outgoing calls
no test coverage detected