amocrm-client
Version:
JS Library for AmoCRM
11 lines (10 loc) • 831 B
TypeScript
import { IResourceEntityWithEmbedded } from "../../../interfaces/api";
import { TConstructor, TEntityEmbeddedConstructor } from "../../../types";
import { IRequestOptions } from "../../../interfaces/common";
import { IContact } from "../Contact";
import { ICanGetByIdFactory } from "../../factories/mixins/hasGetById";
import { CustomerCriteria } from "../../../interfaces/customer";
export interface IHasCustomersEntity<T extends ICanGetByIdFactory<IResourceEntityWithEmbedded<T>>> extends IResourceEntityWithEmbedded<T> {
customers(criteria?: Pick<CustomerCriteria, "with">, options?: IRequestOptions): Promise<IContact | false>;
}
export declare function hasCustomers<T extends ICanGetByIdFactory<IResourceEntityWithEmbedded<T>>>(Base: TEntityEmbeddedConstructor<T>): TConstructor<IResourceEntityWithEmbedded<T>>;