import { IParsedPackageTarget } from "../helpers";

export enum PlatformOS {
  linux = "linux",
}

export interface IPlatform {
  os: PlatformOS;
  dist: string;
  codename: string;
}

export interface IScriptDependency {
  name: string;
  version: string;
}
export interface IScript {
  version: string;
  description: string;
  category: string;
  execute: {
    id: string;
  };
  readme: {
    id: string;
  };
  superuser: boolean;
  dependencies: IScriptDependency[] | null;
  resolvedDependencies: IParsedPackageTarget[] | null;
  platform: IPlatform[] | null;
}

export interface IScriptRecord extends IScript {
  packageHash: string;
  package: {
    name: string;
    namespace: string;
  };
}
