amocrm-client
Advanced tools
Comparing version 0.0.51 to 0.0.52
@@ -23,3 +23,3 @@ import { CustomFieldValue } from '../interfaces/custom_field'; | ||
loss_reason?: LossReasonDTO[]; | ||
contacts?: IContact[]; | ||
contacts?: ResourceCollection<IContact>; | ||
} | ||
@@ -26,0 +26,0 @@ export declare class LeadDTO extends ResourceEntity<ILeadFactory> implements ILeadAttributes { |
@@ -14,8 +14,7 @@ "use strict"; | ||
tslib_1.__decorate([ | ||
(0, class_transformer_1.Type)(() => Contact_1.Contact), | ||
(0, class_transformer_1.Transform)(({ value, key, obj }) => { | ||
console.log("transform", value, key, obj); | ||
return (0, class_transformer_1.plainToClassFromExist)(new ResourceCollection_1.ResourceCollection(obj[key], Contact_1.Contact), obj[key]); | ||
(0, class_transformer_1.Transform)(({ value }) => { | ||
const values = value; | ||
return new ResourceCollection_1.ResourceCollection(values.map((entity) => (0, class_transformer_1.plainToInstance)(Contact_1.Contact, entity)), Contact_1.Contact); | ||
}), | ||
tslib_1.__metadata("design:type", Array) | ||
tslib_1.__metadata("design:type", ResourceCollection_1.ResourceCollection) | ||
], LeadEmbeddedDTO.prototype, "contacts", void 0); | ||
@@ -22,0 +21,0 @@ LeadEmbeddedDTO = tslib_1.__decorate([ |
{ | ||
"name": "amocrm-client", | ||
"version": "0.0.51", | ||
"version": "0.0.52", | ||
"description": "JS Library for AmoCRM", | ||
@@ -5,0 +5,0 @@ "main": "./dist/index.js", |
Sorry, the diff of this file is not supported yet
517269
5622