TheThingsNetwork / lorawan-stack

The Things Stack, an Open Source LoRaWAN Network Server
https://www.thethingsindustries.com/stack/
Apache License 2.0
980 stars 309 forks source link

Expose targeted stack component in `devices` service in JS SDK #3424

Closed bafonins closed 3 years ago

bafonins commented 4 years ago

Summary

We should add functionality to access request details (at least targeted stack component).

Why do we need this?

Current shape of payload returned from the devices service could be improved. When calling any CRUD method from the devices service the client has no information about targeted component. With end devices it is important as those are stored in several storages (is, as, js and ns) and for certain cases the client need this.

This can be helpful for https://github.com/TheThingsNetwork/lorawan-stack/issues/2681

What is already there? What do you see now?

Currently, js sdk clients cannot access any request details. With https://github.com/TheThingsNetwork/lorawan-stack/pull/3397 inplace, details will be available under the request_details entry. While this solves the issue such solution also changes the error shape.

What is missing? What do you want to see?

Functionality for js sdk client to access request details when using the devices service.

Environment

v3.10

How do you propose to implement this?

Consider my comment.

Can you do this yourself and submit a Pull Request?

yes

bafonins commented 3 years ago

This might not be needed after we change the manual creation form according to mocks from https://github.com/TheThingsNetwork/lorawan-stack/issues/3522