Something went wrong. Try again.
opencode v2 mirror
Something went wrong. Try again.
TypeScript
12345678910111213141516171819202122232425export * as Connection from "./connection.js"
import { Schema } from "effect"import { Credential } from "./credential.js"
export interface CredentialInfo extends Schema.Schema.Type<typeof CredentialInfo> {}export const CredentialInfo = Schema.Struct({ type: Schema.Literal("credential"), id: Credential.ID, label: Schema.String, /** How the credential was obtained: a stored key or an OAuth grant. */ method: Schema.Literals(["key", "oauth"]),}).annotate({ identifier: "Connection.CredentialInfo" })
export interface EnvInfo extends Schema.Schema.Type<typeof EnvInfo> {}export const EnvInfo = Schema.Struct({ type: Schema.Literal("env"), name: Schema.String,}).annotate({ identifier: "Connection.EnvInfo" })
export const Info = Schema.Union([CredentialInfo, EnvInfo]) .pipe(Schema.toTaggedUnion("type")) .annotate({ identifier: "Connection.Info" })export type Info = typeof Info.Type