amocrm-client
Version:
JS Library for AmoCRM
20 lines • 701 B
JavaScript
;
Object.defineProperty(exports, "__esModule", { value: true });
exports.hasDelete = void 0;
const tslib_1 = require("tslib");
function hasDelete(Base) {
return class HasDelete extends Base {
fetch(criteria, options) {
return tslib_1.__awaiter(this, void 0, void 0, function* () {
if (this.isNew())
return false;
const id = this.id;
const factory = this.getFactory();
const isSuccess = yield factory.deleteById(id, options);
return isSuccess;
});
}
};
}
exports.hasDelete = hasDelete;
//# sourceMappingURL=hasDelete.js.map