Releases: Autodesk-Forge/aps-sdk-node
New major version with breaking changes
All API clients except AuthenticationClient can now be initialized in a consistent way. Their constructors accept the following 3 arguments:
- auth config object including either
client_idandclient_secretproperties (for two-legged authentication), or a singletokenproperty (with an existing two-legged or three-legged access token) - optional string with Forge API host (default: https://developer.api.autodesk.com)
- optional string with Forge availability region (US or EMEA, default: US)
Moving to TypeScript
Since the library is now used not only by vanilla Node.js projects but also in TypeScript projects (e.g., https://github.com/petrbroz/vscode-forge-tools), the existing codebase has been ported to TypeScript.
In previous versions of this library, providing authentication data to Forge client classes was optional (the clients would pull the credentials from env. variables instead), but starting with version 2 the authentication data is required. This breaking change is introduced so that in future this library can be used in environments where process is not available, e.g., bundled for browsers.
Basic model derivative APIs
A couple of new model derivative APIs have been introduced.
First minor number bump
The available APIs are now a bit more stabilized. Most importantly, the AuthenticationClient#authenticate method now returns an object with access_token and expires_in fields instead of just the token string. This is so that the expires_in field can be sent to the client and used by the Forge Viewer.