import type { EntityBase } from "./Entity"; import type { FieldStyle } from "./Field"; import type { User } from "./User"; export type ProjectCustomFieldBundle = BuildBundle | EnumBundle | StateBundle | VersionBundle | OwnedBundle | UserBundle; export type Bundle> = EntityBase<`${T}Bundle`> & { name: string; values: V[]; isUpdateable: boolean; }; export type BuildBundle = Bundle<"Build", BuildBundleElement>; export type EnumBundle = Bundle<"Enum", EnumBundleElement>; export type StateBundle = Bundle<"State", StateBundleElement>; export type VersionBundle = Bundle<"Version", VersionBundleElement>; export type OwnedBundle = Bundle<"Owned", OwnedBundleElement>; export type UserBundle = Bundle<"User", UserBundleElement>; export type BundleElement = EntityBase & { name: string; description: string | null; archived: boolean; ordinal: number | null; color: FieldStyle | null; }; export type EnumBundleElement = BundleElement<"EnumBundleElement"> & { localizedName: string | null; hasRunningJob: boolean; }; export type BuildBundleElement = BundleElement<"BuildBundleElement"> & { assembleDate: number | null; hasRunningJob: boolean; }; export type StateBundleElement = BundleElement<"StateBundleElement"> & { isResolved: boolean; localizedName: string | null; hasRunningJob: boolean; }; export type VersionBundleElement = BundleElement<"VersionBundleElement"> & { released: boolean; releaseDate: number | null; startDate: number | null; hasRunningJob: boolean; }; export type OwnedBundleElement = BundleElement<"OwnedBundleElement"> & { owner: User | null; hasRunningJob: boolean; }; export type UserBundleElement = BundleElement<"UserBundleElement"> & { owner: User | null; hasRunningJob: boolean; };