amocrm-client
Version:
JS Library for AmoCRM
21 lines • 749 B
JavaScript
;
Object.defineProperty(exports, "__esModule", { value: true });
exports.hasFetch = void 0;
const tslib_1 = require("tslib");
function hasFetch(Base) {
return class HasFetch extends Base {
fetch(criteria, options) {
return tslib_1.__awaiter(this, void 0, void 0, function* () {
if (this.isNew() && this.updated_at != undefined) {
return false;
}
const id = this.id;
const factory = this.getFactory();
const entity = yield factory.getById(id, criteria, options);
return entity;
});
}
};
}
exports.hasFetch = hasFetch;
//# sourceMappingURL=hasFetch.js.map