| 1 | import * as Schema from "effect/Schema"; |
| 2 | |
| 3 | export const DesktopHostedAuthState = Schema.Struct({ |
| 4 | serverUrl: Schema.NullOr(Schema.String), |
| 5 | phase: Schema.Literals(["idle", "waiting", "connected", "error"]), |
| 6 | error: Schema.NullOr(Schema.String), |
| 7 | }); |
| 8 | export type DesktopHostedAuthState = typeof DesktopHostedAuthState.Type; |
| 9 | |
| 10 | export const SelfHostedConnectionStatus = Schema.Struct({ |
| 11 | configured: Schema.Boolean, |
| 12 | connected: Schema.Boolean, |
| 13 | expiresAt: Schema.NullOr(Schema.String), |
| 14 | }); |
| 15 | export type SelfHostedConnectionStatus = typeof SelfHostedConnectionStatus.Type; |