(obj: any)
| 2098 | } |
| 2099 | |
| 2100 | export const _removeCredentialId = (obj: any): any => { |
| 2101 | if (!obj || typeof obj !== 'object') return obj |
| 2102 | |
| 2103 | if (Array.isArray(obj)) { |
| 2104 | return obj.map((item) => _removeCredentialId(item)) |
| 2105 | } |
| 2106 | |
| 2107 | const newObj: Record<string, any> = {} |
| 2108 | for (const [key, value] of Object.entries(obj)) { |
| 2109 | if (key === 'FLOWISE_CREDENTIAL_ID') continue |
| 2110 | newObj[key] = _removeCredentialId(value) |
| 2111 | } |
| 2112 | return newObj |
| 2113 | } |
| 2114 | |
| 2115 | /** |
| 2116 | * Validates that history items follow the expected schema |
no outgoing calls
no test coverage detected