| 240 | // --------------------------------------------------------------------------- |
| 241 | |
| 242 | const stringRecord = (value: unknown): Record<string, string> => { |
| 243 | if (!value || typeof value !== "object" || Array.isArray(value)) return {}; |
| 244 | const out: Record<string, string> = {}; |
| 245 | for (const [k, v] of Object.entries(value as Record<string, unknown>)) { |
| 246 | if (typeof v === "string") out[k] = v; |
| 247 | } |
| 248 | return out; |
| 249 | }; |
| 250 | |
| 251 | const extractFlows = (rawFlows: unknown): Option.Option<OAuth2Flows> => { |
| 252 | if (!rawFlows || typeof rawFlows !== "object") return Option.none(); |