-
Notifications
You must be signed in to change notification settings - Fork 2
fix: Introduction of devices.update
#19
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks pretty good!
I think as far as types go we should have some common properties type that Device
extends from (interface Device<Properties extends CommonDeviceProperties, Type = DeviceType>
) and then specify mutable properties as a subset of that (type MutableDeviceProperties = Pick<CommonDeviceProperties, 'name'>
).
src/types/route-requests.ts
Outdated
|
||
export type DeviceUpdateRequest = { | ||
device_id: string | ||
properties?: DeviceProperties |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hmm this is tricky, the properties depend on the device type, maybe we could create a type BaseDeviceProperties and have LockProperties extend it
@andrii-balitskyi if you update your local Git remote with |
@codetheweb now I have some other issue, u changed the types? |
Yeah, sorry about that. Take a look at |
devices.update
devices.update
## [2.4.1](v2.4.0...v2.4.1) (2022-03-15) ### Bug Fixes * Introduction of `devices.update` ([#19](#19)) ([b98ed08](b98ed08))
🎉 This PR is included in version 2.4.1 🎉 The release is available on: Your semantic-release bot 📦🚀 |
No description provided.