@dronedeploy/rocos-js-sdk
v4.1.1
Published
Javascript SDK for rocos
Readme
rocos-js-sdk
Javascript SDK for interacting with the Rocos platform.
Using with Node
In order to use the SDK with node, you must be using node version 18.13 or higher.
Installation
Install the package with npm
npm install @dronedeploy/rocos-js-sdkor yarn
yarn add @dronedeploy/rocos-js-sdk rxjs@^7What's new
4.0.0
- BREAKING: The default telemetry
transportis now'connect'(the Connect protocol) instead of'grpc-web'. Consumers that do not settransportexplicitly will switch to Connect automatically. If your backend or proxy only supports gRPC-web, restore the previous behaviour withtransport: 'grpc-web'. - The
'grpc-web'telemetry transport is deprecated and will be removed in a future release. Selecting it now logs a one-time deprecation warning.
3.1.2
- Use the optional
fetchimplementation for the gRPC-web transport too, so a customfetchcan be supplied consistently across transports.
3.1.1
- Allow an optional
fetchimplementation to be supplied to the Connect transport.
3.1.0
- Add a Connect-RPC telemetry transport variant.
- Upgrade
connectrpcandbufbuildto the latest versions and move to TypeScript 6. - Prune unused and trivially-replaceable dependencies.
3.0.30
- MapService
- Add a
createAPI and fix thecopyAPI.
- Add a
3.0.29
- Add new APIs for setting map content and metadata.
3.0.28
- Add
base_floor_plantoLevel.
3.0.27
- Add
staticAttributesfield toAssetSyncDefinitionModel.
3.0.25
- IntegrationService
- Add
getLevelsmethod.
- Add
3.0.23
- Add
metadatafield to device credentials.
3.0.21
- Export types for device credentials.
3.0.20
- Add library list/import endpoints.
3.0.19
- CallerService
- Add a cancel observable to service calls.
3.0.18
- CallerService
- Add a
rawPayloadoption to service calls.
- Add a
3.0.17
- RobotService
- List robots by account/org.
3.0.16
- Add missing types for
EventServiceandProfileService.
3.0.15
- ProfileService
- Change the profile export type to
Blob.
- Change the profile export type to
3.0.14
- Utils
- Expose
splitRobotTopic.
- Expose
3.0.13
- kscript
- Additional support for custom widgets.
3.0.11
- Improve the accuracy of file sync types.
3.0.10
- MapService
- Add a system parameter to the list maps endpoint.
3.0.9
- WorkflowService
- Add methods for importing/exporting workflows.
3.0.8
- Add an HTTP listener/hook.
3.0.7
- MapService
- Add
lastModifiedTimestampto list maps.
- Add
3.0.6
- WorkflowService
- Add a function to delete an asset.
3.0.5
- Add
nameto theLocationstype.
3.0.4
- Panorama
- Allow
anytype on thedataprop.
- Allow
3.0.3
- MapService
- Add a
hashproperty to the cloud map object.
- Add a
3.0.2
- Add a delete assets endpoint.
3.0.1
Breaking Changes
- Change the protobuf generation to use the protobuf-ts package instead of protobuf-javascript.
- No longer uses
@improbable-eng/grpc-webimplementation of the gRPC-web client.
- No longer uses
- CallerService
- change
CallerService.invokeRequestresponses to be UTF-8 encoded UInt8Arrays instead of base64 encoded strings. - change array field names to remove the
Listsuffix.IRocosCallerMessageResponses.responsesList->IRocosCallerMessageResponses.responsesIRocosCallerMessageChunks.rowsList->IRocosCallerMessageChunks.rows
- split
IRocosCallerMessageResponseReturn.header.createdfield intocreatedAtandcreatedNsfieldscreatedAtis aDateobject representing the time the message was created, with millisecond precision.createdNsis astringrepresenting the time the message was created, with nanosecond precision. You can use this with theBigIntconstructor to get aBigIntrepresentation of the time.
- change
- RTPWebRTCService
- refactor the following functions to return a promise, rather than using a callback:
WebRTCSignallingStream.offerConnection()WebRTCSignallingStream.getDetails()WebRTCSignallingStream.addIceCandidate()
- split the stream interface
IWebRTCSignallingResponseStream.on(type, handler)intoonMessage(handler),onError(handler), andonComplete(handler).
- refactor the following functions to return a promise, rather than using a callback:
- MapService
- Removed
initDBmethod - Changed
copyFromRobotmethod tosendToCloud - changed
copyFromCloudmethod tocopy
- Removed
- FileAccessorService
- Removed
uploadFilemethod
- Removed
- AuthService
- Removed the ability to login with a username and password. Only api keys or tokens are supported now.
- Tokens are now checked for validity before being used
ITokeninterface changescreatedis nowissuedAtand is aDateobject instead of astringexpiresInis nowexpiresand is aDateobject instead of anumber
- Logging in and signing up with email and password has been removed
- Resetting password has been removed
- WorkflowService
- Renamed
getDeployedOnRobottogetDeployedWorkflow - Renamed
listDeployedOnRobottolist
- Renamed
- Utils
- Removed
generateUUIDmethod - Refactor
TokenclassexpiresIn: number->expires?: Datecreated: string->issuedAt?: Date
- Removed unused math utility functions
- Removed
Removed
- Breaking: remove
FileAccessorService.uploadFile - Breaking: remove the ability to authenticate using a username and password. Only API keys and tokens are supported now.
- Breaking: remove unused math utility functions
Fixed
- Remove Node 18 engine requirement to allow building for web targets on previous Node versions. Node 18 is still required to run the SDK in Node.
2.6.1
- Modify map service response type
2.6.0
- Change
rxjsdependency to a peer dependency (support for^6.6.6 || ^7.0.0)- If you are using
yarnyou may need to addrxjsto your dependencies
- If you are using
2.4.0
- deleted unused endpoints relating to legacy accounts which are no longer supported
2.3.0
- Added
mapServicefor supporting agent map functionality
2.2.0
- Added
listUsersmethod in ProjectService to list project users - Added additional debug information for failed HTTP responses
2.1.0
- Added getPlansPaged method to the IntegrationService to retrieve plans in a paged manner
2.0.2
- Fix no-content responses attempting to parse as JSON
2.0.1
- Security updates for React demo app dependencies
2.0.0
- Updating base class for all REST requests to go via fetch instead of axios
- Remove unused dependencies
source-map-loader,ts-loader,axios - Mark certain auth methods as deprecated in AuthService
loginLogin with email and password.signupresetPassword
- Deleted legacy services, these services are prefixed with BC, e.g.
BCRocosClient - Updated outdated dependencies in the Angular demo application
Migrating from 1.x to 2.x
- NodeJS engine requirements need to be v18.13 and npm v8 to use in NodeJS as the underlying HTTP services now use fetch API
- Legacy services prefixed with BC will need to be migrated to use the standard services
1.19.0
New method added to the IntegrationService to create a new issue in the current location.
- createIssue - Creates a new issue in a specific location on the latest map plan
1.18.0
Added new integration service to be able to retrieve plans created in DroneDeploy
This can be retrieved by getIntegrationService(). Available methods:
- getPlans - Gets a list of plans
- getPlanById - Retrieves a specific plan with the tiled layer that can be used to render meshes, point clouds, or tiled maps
- getWMTS - Returns WMTS tiles that can be rendered in tools such as mapbox if your project has WMTS feature enabled)
