export interface RequestResult<T = any> {
  data: T;
  errorCode: number;
  message?: string;
}

export interface SkillInfo {
  id?: number | string;
  name?: string;
  displayName?: string;
  description?: string;
  categoryId?: number | string;
  metadataJson?: Record<string, any>;
  skillContent?: string;
  enabled?: boolean;
  visibilityScope?: string;
  sourceType?: string;
  referenceCount?: number;
  scriptCount?: number;
  assetCount?: number;
  publishStatus?: string;
  displayPublishStatus?: string;
  approvalPending?: boolean;
  currentApprovalActionType?: string;
  currentApprovalInstanceId?: number | string;
  created?: string;
  createdByName?: string;
  references?: SkillReference[];
  scripts?: SkillScript[];
  assets?: SkillAsset[];
  [key: string]: any;
}

export interface SkillReference {
  id?: number | string;
  path: string;
  name?: string;
  content?: string;
  contentHash?: string;
  size?: number;
  metadataJson?: Record<string, any>;
}

export interface SkillScript {
  id?: number | string;
  path: string;
  language?: string;
  content?: string;
  contentHash?: string;
  size?: number;
  metadataJson?: Record<string, any>;
}

export interface SkillAsset {
  id?: number | string;
  path: string;
  name?: string;
  mediaType?: string;
  contentRef?: string;
  contentHash?: string;
  size?: number;
  metadataJson?: Record<string, any>;
}

export interface SkillFileNode {
  key: string;
  path: string;
  name: string;
  type: 'ASSET' | 'DIRECTORY' | 'REFERENCE' | 'SCRIPT' | 'SKILL' | string;
  language?: string;
  mediaType?: string;
  size?: number;
  children?: SkillFileNode[];
}

export interface SkillFileContent {
  path: string;
  type: 'ASSET' | 'REFERENCE' | 'SCRIPT' | 'SKILL' | string;
  content?: string;
  language?: string;
  mediaType?: string;
  size?: number;
  downloadUrl?: string;
}

export interface SkillImportPreviewItem {
  packageId: string;
  name: string;
  description: string;
  referenceCount: number;
  scriptCount: number;
  assetCount: number;
  conflict: boolean;
}

export interface SkillImportPreview {
  skills: SkillImportPreviewItem[];
}

