export type Id = number | string; export interface ApiModule { getList?: (params?: unknown) => Promise<{ items?: Entity[]; next?: boolean; aggs?: unknown; }>; getLookup?: (params?: unknown) => Promise<{ items?: Entity[]; next?: boolean; }>; get?: ({ itemId }: { itemId: Id }) => Promise; add?: ({ itemInstance }: { itemInstance?: Entity }) => Promise; update?: ({ itemId, itemInstance, }: { itemId: Id; itemInstance?: Entity; }) => Promise; patch?: ({ id, changes }: { id?: Id; changes?: Entity }) => Promise; delete?: ({ itemId }: { itemId: Id }) => Promise; }