Skip to content
This repository was archived by the owner on Nov 15, 2024. It is now read-only.

Conversation

andrii-balitskyi
Copy link
Contributor

No description provided.

Copy link
Contributor

@codetheweb codetheweb left a 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'>).


export type DeviceUpdateRequest = {
device_id: string
properties?: DeviceProperties
Copy link
Contributor

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

@codetheweb
Copy link
Contributor

@andrii-balitskyi if you update your local Git remote with git remote remove origin and git remote add origin git@github.com:seamapi/seamapi-javascript.git (replace with the HTTPS URL if that's what you use) and run yarn build:docs to fix the org name references I think this will be good to merge. 👍

@andrii-balitskyi
Copy link
Contributor Author

@codetheweb now I have some other issue, u changed the types?
image

@codetheweb
Copy link
Contributor

Yeah, sorry about that. Take a look at devices.get() above that to see what you need to change. You'll have to add a DeviceUpdateResponse interface.

@seveibar seveibar changed the title Introduction of devices.update fix: Introduction of devices.update Mar 15, 2022
@seveibar seveibar merged commit b98ed08 into main Mar 15, 2022
@seveibar seveibar deleted the andrii-devices-update branch March 15, 2022 01:19
github-actions bot pushed a commit that referenced this pull request Mar 15, 2022
## [2.4.1](v2.4.0...v2.4.1) (2022-03-15)

### Bug Fixes

* Introduction of `devices.update` ([#19](#19)) ([b98ed08](b98ed08))
@github-actions
Copy link

🎉 This PR is included in version 2.4.1 🎉

The release is available on:

Your semantic-release bot 📦🚀

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants