amocrm-client
Advanced tools
Comparing version 0.0.71 to 0.0.72
@@ -18,3 +18,3 @@ import { CustomFieldValue } from '../interfaces/custom_field'; | ||
contacts?: ResourceCollection<IContact>; | ||
constructor(factory: ILeadFactory, attibutes: ILeadEmbedded); | ||
constructor(factory: ILeadFactory, attributes: ILeadEmbedded); | ||
parseEmbedded<T extends IResourceEntity<IResourceFactory<T>>>(items: Record<any, any>[], factory: TFactoryConstructor<T>): ResourceCollection<T>; | ||
@@ -21,0 +21,0 @@ } |
@@ -10,5 +10,5 @@ "use strict"; | ||
let LeadEmbeddedDTO = class LeadEmbeddedDTO extends ResourceEntity_1.default { | ||
constructor(factory, attibutes) { | ||
super(factory); | ||
this.contacts = this.parseEmbedded(attibutes.contacts, ContactFactory_1.ContactFactory); | ||
constructor(factory, attributes) { | ||
super(factory, attributes); | ||
this.contacts = this.parseEmbedded(attributes.contacts, ContactFactory_1.ContactFactory); | ||
console.log('contacts', this.contacts); | ||
@@ -28,5 +28,5 @@ } | ||
constructor(factory, attributes) { | ||
attributes._embedded = new LeadEmbeddedDTO(factory, attributes._embedded); | ||
super(factory, attributes); | ||
this._embedded = (0, class_transformer_1.plainToClassFromExist)(new LeadEmbeddedDTO(factory, attributes._embedded), attributes._embedded); | ||
console.log("embedded", this._embedded); | ||
console.log("embedded", attributes._embedded); | ||
} | ||
@@ -33,0 +33,0 @@ }; |
{ | ||
"name": "amocrm-client", | ||
"version": "0.0.71", | ||
"version": "0.0.72", | ||
"description": "JS Library for AmoCRM", | ||
@@ -5,0 +5,0 @@ "main": "./dist/index.js", |
Sorry, the diff of this file is not supported yet
519352