amocrm-client
Advanced tools
Comparing version 0.0.41 to 0.0.42
@@ -5,3 +5,3 @@ import { IResourceCollection } from "../interfaces/api"; | ||
data: T[]; | ||
constructor(data: T[], type?: Function); | ||
constructor(data?: T[], type?: Function); | ||
get(id: number): T | undefined; | ||
@@ -8,0 +8,0 @@ map<U>(callbackfn: (value: T, index: number, array: T[]) => U): ResourceCollection<U>; |
@@ -10,3 +10,3 @@ "use strict"; | ||
this.data = data || []; | ||
this, type = Function; | ||
this.type = Function; | ||
} | ||
@@ -13,0 +13,0 @@ get(id) { |
@@ -9,4 +9,4 @@ "use strict"; | ||
const Contact_1 = require("../api/models/Contact"); | ||
class LeadDTO extends ResourceEntity_1.default { | ||
} | ||
let LeadDTO = class LeadDTO extends ResourceEntity_1.default { | ||
}; | ||
tslib_1.__decorate([ | ||
@@ -22,2 +22,5 @@ (0, class_transformer_1.Type)(() => Date), | ||
], LeadDTO.prototype, "closest_task_at", void 0); | ||
LeadDTO = tslib_1.__decorate([ | ||
(0, class_transformer_1.Expose)() | ||
], LeadDTO); | ||
exports.LeadDTO = LeadDTO; | ||
@@ -28,3 +31,6 @@ class LeadEmbeddedDTO { | ||
(0, class_transformer_1.Type)(() => ResourceCollection_1.ResourceCollection), | ||
(0, class_transformer_1.Transform)(({ value }) => (0, class_transformer_1.plainToClassFromExist)(new ResourceCollection_1.ResourceCollection(value, Contact_1.Contact), value)), | ||
(0, class_transformer_1.Transform)(({ value }) => { | ||
console.log("transform", value); | ||
return (0, class_transformer_1.plainToClassFromExist)(new ResourceCollection_1.ResourceCollection(value, Contact_1.Contact), value); | ||
}), | ||
tslib_1.__metadata("design:type", ResourceCollection_1.ResourceCollection) | ||
@@ -31,0 +37,0 @@ ], LeadEmbeddedDTO.prototype, "contacts", void 0); |
{ | ||
"name": "amocrm-client", | ||
"version": "0.0.41", | ||
"version": "0.0.42", | ||
"description": "JS Library for AmoCRM", | ||
@@ -5,0 +5,0 @@ "main": "./dist/index.js", |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
516132
5604