import type { ConnectorCapabilities } from "./capabilities.js"; /** * Credential references are opaque handles into the vault (WP2). * Raw tokens never appear in these types by design. */ export interface CredentialRef { readonly kind: "credential-ref"; readonly id: string; } export type ProviderId = string; export interface Channel { id: string; workspaceId: string; provider: ProviderId; displayName: string; createdAt: Date; } export interface ConnectorConnection { id: string; workspaceId: string; provider: ProviderId; channelId: string; credentialId: CredentialRef; /** Manifest-declared field values, e.g. instanceUrl for federated platforms. */ fields: Record; createdAt: Date; } export interface NormalizedIdentity { provider: ProviderId; remoteId: string; handle: string; displayName?: string; avatarUrl?: string; } /** Channel on a remote video platform; account ≠ channel (federated platforms). */ export interface RemoteVideoChannel { id: string; provider: ProviderId; instanceUrl: string; remoteChannelId: string; handle: string; displayName?: string; avatarUrl?: string; capabilities: ConnectorCapabilities; }