(data: Record<string, unknown>)
| 344 | } |
| 345 | |
| 346 | function transformProviderData(data: Record<string, unknown>): Record<string, unknown> { |
| 347 | const out: Record<string, unknown> = {}; |
| 348 | for (const [key, value] of Object.entries(data)) { |
| 349 | const targetKey = snakeToCamel(key); |
| 350 | if (targetKey === 'oauth') { |
| 351 | out[targetKey] = isPlainObject(value) ? transformPlainObject(value) : value; |
| 352 | } else if (targetKey === 'env' || targetKey === 'customHeaders') { |
| 353 | out[targetKey] = cloneObjectValue(value); |
| 354 | } else { |
| 355 | out[targetKey] = value; |
| 356 | } |
| 357 | } |
| 358 | return out; |
| 359 | } |
| 360 | |
| 361 | function transformModelData(data: Record<string, unknown>): Record<string, unknown> { |
| 362 | const out = transformPlainObject(data); |
nothing calls this directly
no test coverage detected