/**
 * Federation Component Types
 */

import type { Task, Event } from "@mosaic/shared";

/**
 * Provenance information - where the data came from
 */
export interface ProvenanceInfo {
  instanceId: string;
  instanceName: string;
  instanceUrl: string;
  timestamp: string;
}

/**
 * Federated task with provenance
 */
export interface FederatedTask {
  task: Task;
  provenance: ProvenanceInfo;
}

/**
 * Federated event with provenance
 */
export interface FederatedEvent {
  event: Event;
  provenance: ProvenanceInfo;
}

/**
 * Federated data item (union type)
 */
export type FederatedItem = FederatedTask | FederatedEvent;
