Sketch promises and deferred object API