UNPKG

amocrm-client

Version:
9 lines (8 loc) 627 B
import { ICriteria, IResourceEntity } from "../../../interfaces/api"; import { TConstructor, TEntityConstructor } from "../../../types"; import { IRequestOptions } from "../../../interfaces/common"; import { ICanGetByIdFactory } from "../../factories/mixins/hasGetById"; export interface IHasFetchEntity<T extends ICanGetByIdFactory<IResourceEntity<T>>> { fetch(criteria?: ICriteria<any, any>, options?: IRequestOptions): Promise<IHasFetchEntity<T> | false | null>; } export declare function hasFetch<T extends ICanGetByIdFactory<IResourceEntity<T>>>(Base: TEntityConstructor<T>): TConstructor<IResourceEntity<T>>;