/** * Сделка (сущность) */ import ResourceEntity from "../ResourceEntity"; import { IContactFactory } from "../factories/ContactFactory"; import { JSONObject, TConstructor } from "../../types"; import { IEmbeddedEntity, IEntityAttributes, IResourceEntity } from "../../interfaces/api"; import { hasSave, IHasSave } from "./mixins/hasSave"; import { hasFetch, IHasFetch } from "./mixins/hasFetch"; import { IHasEmbeddedTags } from "./Tag"; import { IHasEmbeddedCompanies } from "./Company"; import { IHasEmbeddedCatalogElements } from "./CatalogElement"; import { IHasEmbeddedCustomers } from "./Customer"; import { IHasEmbeddedTagsEntity } from "./mixins/embedded/hasEmbeddedTags"; import { IHasEmbeddedCompaniesEntity } from "./mixins/embedded/hasEmbeddedCompanies"; import { IHasEmbeddedCatalogElementsEntity } from "./mixins/embedded/hasEmbeddedCatalogElements"; import { IHasEmbeddedCustomersEntity } from "./mixins/embedded/hasEmbeddedCustomers"; import { IHasEmbedded } from "./mixins/hasEmbedded"; import { hasTasks, IHasTasks } from "./mixins/hasTasks"; export interface ContactAttributes extends IEntityAttributes { id?: number; name?: string; first_name?: string; last_name?: string; responsible_user_id?: number; group_id?: number; created_by?: number; updated_by?: number; created_at?: number; updated_at?: number; is_deleted?: boolean; closed_task_at?: number; custom_fields_values?: JSONObject[] | null; account_id?: number; _embedded?: IContactEmbedded; } export interface IEmbeddedContact extends IEmbeddedEntity { id?: number; is_main?: boolean; } export declare type IContactEmbedded = IHasEmbeddedTags & IHasEmbeddedCompanies & IHasEmbeddedCustomers & IHasEmbeddedCatalogElements; export interface IHasEmbeddedContacts { contacts?: IEmbeddedContact[]; } export declare type IContactHasEmbedded = IHasEmbeddedTagsEntity & IHasEmbeddedCompaniesEntity & IHasEmbeddedCustomersEntity & IHasEmbeddedCatalogElementsEntity; export declare type IContact = IResourceEntity & ContactAttributes & IHasEmbedded & IHasSave & IHasFetch & IHasTasks & IContactHasEmbedded; export declare class BaseContact extends ResourceEntity { name?: string; first_name?: string; last_name?: string; responsible_user_id?: number; group_id?: number; created_by?: number; updated_by?: number; created_at?: number; updated_at?: number; is_deleted?: boolean; closed_task_at?: number; custom_fields_values?: JSONObject[] | null; account_id?: number; _embedded?: IContactEmbedded; getAttributes(): ContactAttributes; setAttributes(attributes?: ContactAttributes): void; } export declare const mixins: (typeof hasSave | typeof hasFetch | typeof hasTasks)[]; export declare const embeddedMixins: ((>>(Base: TConstructor>) => TConstructor>) | (>>(Base: TConstructor>) => TConstructor>))[]; export declare const Contact: TConstructor;