amocrm-client
Version:
JS Library for AmoCRM
8 lines (7 loc) • 583 B
TypeScript
import { TFactoryConstructor } from "../../../types";
import { ICriteria, IResourceEntity, IResourceFactory } from "../../../interfaces/api";
import { IRequestOptions } from "../../../interfaces/common";
export interface ICanGetByIdFactory<T extends IResourceEntity<IResourceFactory<T>>> extends IResourceFactory<T> {
getById(identity: number, criteria?: Partial<ICriteria<any, any>>, options?: IRequestOptions): Promise<T | null>;
}
export declare function hasGetById<T extends IResourceEntity<IResourceFactory<T>>>(Base: TFactoryConstructor<T>): TFactoryConstructor<T>;