balena-io / balena-sdk

The SDK to make balena powered JavaScript applications.
https://www.balena.io/
Apache License 2.0
146 stars 46 forks source link

Update to the v7 model #1420

Open thgreasi opened 1 month ago

thgreasi commented 1 month ago

Change-type: major See: https://balena.fibery.io/Work/Project/Server-side-pagination-for-devices-Cycle-3-539

JSReds commented 3 days ago

testing it I've noticed that now we cannot make any requests without passing at least a $select, is this wanted ? if so we should probably make options to be mandatory as methods like getAllByApplication are not working anymore:

await sdk.models.device.getAllByApplication(<FLEET_ID>)

request.js:192 Uncaught BalenaRequestError: Request error: Must include a $select for top level 'device'
    at Object.eval (request.js:191:27)
    at Generator.next (<anonymous>)
    at fulfilled (tslib.es6.mjs:153:56)