The best way to control Claude Code, Codex and more from any computer or phone
Mirrored from https://github.com/Camo67/t3code.git
Synced Nov 21, 06:00 UTC
| 1 | import * as Redacted from "effect/Redacted"; |
| 2 | |
| 3 | /** |
| 4 | * Unwrap a distilled `SensitiveString` (`string | Redacted<string>`) into a |
| 5 | * plain string, preserving `undefined`. |
| 6 | * |
| 7 | * The Account API marks contact fields (names, emails, phone numbers, |
| 8 | * addresses) as sensitive at the wire level, so distilled returns them as |
| 9 | * `string | Redacted<string>`. These are PII rather than credentials, so |
| 10 | * alchemy stores them as plain strings in Attributes. |
| 11 | */ |
| 12 | export const unwrapSensitive = ( |
| 13 | value: string | Redacted.Redacted<string> | undefined, |
| 14 | ): string | undefined => |
| 15 | value === undefined ? undefined : typeof value === "string" ? value : Redacted.value(value); |