export interface LookupInRecord {
    _id: number;
    _display: string;
}
export interface FileInRecord {
    _id: number;
    name: string;
    path: string;
    type: string;
    size: number;
}
export interface BaseRecord {
    _id: number;
    _created_at: string;
    _updated_at: string;
    _created_by: LookupInRecord;
    _updated_by: LookupInRecord;
}
export type OmitBaseField<T extends BaseRecord> = Omit<T, keyof BaseRecord>;
type LookupInRecordToInput<T> = T extends LookupInRecord ? (LookupInRecord extends T ? {
    _id: number;
} : T) : T;
type LookupInRecordToInputWithArray<T> = T extends Array<infer R> ? Array<LookupInRecordToInput<R>> : LookupInRecordToInput<T>;
type FileInRecordToInput<T> = T extends FileInRecord ? (FileInRecord extends T ? {
    _id: number;
} : T) : T;
type FileInRecordToInputWithArray<T> = T extends Array<infer R> ? Array<FileInRecordToInput<R>> : FileInRecordToInput<T>;
export type ToInputRecord<T extends Record<string, any>> = {
    [K in keyof T]: FileInRecordToInputWithArray<LookupInRecordToInputWithArray<T[K]>>;
};
type UnionToIoF<U> = (U extends any ? (k: (x: U) => void) => void : never) extends (k: infer I) => void ? I : never;
type LastTypeInUnion<T> = UnionToIoF<T> extends (k: infer R) => any ? R : never;
export type ObjectToUnion<T extends Record<string, any>> = ((k: LastTypeInUnion<keyof T>) => void) extends (k: infer K) => void ? K extends string ? Pick<T, K> | ObjectToUnion<Omit<T, K>> : never : never;
export {};
