UNPKG

amocrm-client

Version:
42 lines (38 loc) 1.47 kB
import { Type, Expose } from 'class-transformer'; import { IContactFactory } from '../api/factories/ContactFactory'; import { ICompany } from '../api/models/Company'; import { ICustomer } from '../api/models/Customer'; import { ITag } from '../api/models/Tag'; import { ResourceCollection } from '../api/ResourceCollection'; import ResourceEntity from '../api/ResourceEntity'; import { Moment } from '../interfaces/common'; import { IContactAttributes, IContactEmbedded } from "../interfaces/contact"; import { ICustomFieldValue } from "../interfaces/custom_field"; import { SelfLinkDTO } from './link.dto'; @Expose() export class ContactDTO extends ResourceEntity<IContactFactory> implements IContactAttributes { id: number; name: string; first_name: string; last_name: string; is_main?: boolean | undefined; responsible_user_id: number; group_id: number; closest_task_at: Date; is_deleted: boolean; is_unsorted: boolean; custom_fields_values: ICustomFieldValue[] | null; _embedded: ContactEmbeddedDTO; updated_at: Date; created_at: Date; updated_by: number; created_by: number; account_id: number; _links: SelfLinkDTO; } class ContactEmbeddedDTO implements IContactEmbedded { tags: ResourceCollection<ITag>; catalog_elements?: ResourceCollection<any>; companies: ResourceCollection<ICompany>; customers?: ResourceCollection<ICustomer>; }