@dronedeploy/rocos-js-sdk 3.0.1-alpha.9 → 3.0.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +59 -29
- package/cjs/IRocosSDK.d.ts +4 -3
- package/cjs/RocosSDK.d.ts +19 -7
- package/cjs/RocosSDK.js +31 -10
- package/cjs/api/streams/caller/CallerStream.js +5 -2
- package/cjs/api/streams/caller/CallerStreamNode.js +2 -1
- package/cjs/api/streams/command/CommandStream.js +5 -2
- package/cjs/api/streams/command/CommandStreamNode.js +2 -1
- package/cjs/api/streams/control/ControlStream.js +5 -2
- package/cjs/api/streams/control/ControlStreamAbstract.d.ts +1 -1
- package/cjs/api/streams/control/ControlStreamNode.js +2 -1
- package/cjs/api/streams/fileAccessor/FileAccessorStream.js +4 -1
- package/cjs/api/streams/fileAccessor/FileAccessorStreamNode.js +3 -1
- package/cjs/api/streams/search/SearchStream.js +5 -2
- package/cjs/api/streams/search/SearchStreamNode.js +2 -1
- package/cjs/api/streams/telemetry/TelemetryStream.js +4 -1
- package/cjs/api/streams/telemetry/TelemetryStreamAbstract.d.ts +1 -1
- package/cjs/api/streams/telemetry/TelemetryStreamNode.js +2 -1
- package/cjs/api/streams/webRTCSignalling/WebRTCSignallingStream.js +5 -2
- package/cjs/constants/api.d.ts +31 -15
- package/cjs/constants/api.js +35 -18
- package/cjs/helpers/cleanObject.js +4 -1
- package/cjs/helpers/getUniqueConfigKey.d.ts +6 -2
- package/cjs/helpers/getUniqueConfigKey.js +7 -2
- package/cjs/helpers/index.d.ts +1 -0
- package/cjs/helpers/index.js +1 -0
- package/cjs/helpers/kscript/Context.d.ts +34 -0
- package/cjs/helpers/kscript/Context.js +52 -0
- package/cjs/helpers/kscript/index.d.ts +1 -0
- package/cjs/helpers/kscript/index.js +27 -0
- package/cjs/helpers/kscript/kscript.d.ts +6 -0
- package/cjs/helpers/kscript/kscript.js +115 -0
- package/cjs/helpers/kscript/nodes/Identifier.d.ts +12 -0
- package/cjs/helpers/kscript/nodes/Identifier.js +20 -0
- package/cjs/helpers/kscript/nodes/Literal.d.ts +11 -0
- package/cjs/helpers/kscript/nodes/Literal.js +22 -0
- package/cjs/helpers/kscript/nodes/Node.d.ts +9 -0
- package/cjs/helpers/kscript/nodes/Node.js +15 -0
- package/cjs/helpers/kscript/nodes/Program.d.ts +11 -0
- package/cjs/helpers/kscript/nodes/Program.js +24 -0
- package/cjs/helpers/kscript/nodes/TemplateLiteral.d.ts +23 -0
- package/cjs/helpers/kscript/nodes/TemplateLiteral.js +35 -0
- package/cjs/helpers/kscript/nodes/expressions/ArrayExpression.d.ts +7 -0
- package/cjs/helpers/kscript/nodes/expressions/ArrayExpression.js +31 -0
- package/cjs/helpers/kscript/nodes/expressions/ArrowFunctionExpression.d.ts +14 -0
- package/cjs/helpers/kscript/nodes/expressions/ArrowFunctionExpression.js +40 -0
- package/cjs/helpers/kscript/nodes/expressions/BinaryExpression.d.ts +16 -0
- package/cjs/helpers/kscript/nodes/expressions/BinaryExpression.js +104 -0
- package/cjs/helpers/kscript/nodes/expressions/CallExpression.d.ts +8 -0
- package/cjs/helpers/kscript/nodes/expressions/CallExpression.js +38 -0
- package/cjs/helpers/kscript/nodes/expressions/ChainExpression.d.ts +16 -0
- package/cjs/helpers/kscript/nodes/expressions/ChainExpression.js +25 -0
- package/cjs/helpers/kscript/nodes/expressions/ConditionalExpression.d.ts +14 -0
- package/cjs/helpers/kscript/nodes/expressions/ConditionalExpression.js +30 -0
- package/cjs/helpers/kscript/nodes/expressions/ExpressionStatement.d.ts +7 -0
- package/cjs/helpers/kscript/nodes/expressions/ExpressionStatement.js +18 -0
- package/cjs/helpers/kscript/nodes/expressions/LogicalExpression.d.ts +10 -0
- package/cjs/helpers/kscript/nodes/expressions/LogicalExpression.js +47 -0
- package/cjs/helpers/kscript/nodes/expressions/MemberExpression.d.ts +44 -0
- package/cjs/helpers/kscript/nodes/expressions/MemberExpression.js +98 -0
- package/cjs/helpers/kscript/nodes/expressions/ObjectExpression.d.ts +11 -0
- package/cjs/helpers/kscript/nodes/expressions/ObjectExpression.js +59 -0
- package/cjs/helpers/kscript/nodes/expressions/UnaryExpression.d.ts +12 -0
- package/cjs/helpers/kscript/nodes/expressions/UnaryExpression.js +44 -0
- package/cjs/helpers/kscript/nodes/expressions/index.d.ts +11 -0
- package/cjs/helpers/kscript/nodes/expressions/index.js +28 -0
- package/cjs/helpers/kscript/nodes/index.d.ts +4 -0
- package/cjs/helpers/kscript/nodes/index.js +10 -0
- package/cjs/helpers/kscript/nodes/nodeTypes.d.ts +33 -0
- package/cjs/helpers/kscript/nodes/nodeTypes.js +29 -0
- package/cjs/helpers/kscript/utils.d.ts +4 -0
- package/cjs/helpers/kscript/utils.js +15 -0
- package/cjs/helpers/websandbox/connection.d.ts +2 -1
- package/cjs/helpers/websandbox/connection.js +6 -5
- package/cjs/helpers/websandbox/frame/frame.js +4 -1
- package/cjs/helpers/websandbox/frame/frame.source.js +1 -1
- package/cjs/helpers/websandbox/frame/worker/manager.d.ts +8 -4
- package/cjs/helpers/websandbox/frame/worker/manager.js +32 -14
- package/cjs/helpers/websandbox/frame/worker/worker.source.js +1 -1
- package/cjs/helpers/websandbox/sandbox.d.ts +1 -1
- package/cjs/helpers/websandbox/sandbox.js +7 -7
- package/cjs/models/IConnectedCallsign.d.ts +10 -0
- package/cjs/models/IConnectedCallsign.js +8 -0
- package/cjs/models/RocosError.d.ts +3 -0
- package/cjs/models/RocosError.js +3 -0
- package/cjs/models/ServiceEnum.d.ts +20 -17
- package/cjs/models/ServiceEnum.js +20 -17
- package/cjs/models/TelemetryStatus.d.ts +12 -0
- package/cjs/models/TelemetryStatus.js +17 -0
- package/cjs/models/Token.d.ts +2 -2
- package/cjs/models/Token.js +5 -5
- package/cjs/models/asset-storage/{AssetModelItem.d.ts → AssetItem.d.ts} +2 -0
- package/cjs/models/device-credentials/DeviceCredentials.d.ts +61 -0
- package/cjs/models/device-credentials/DeviceCredentials.js +2 -0
- package/cjs/models/graph/Position.d.ts +6 -0
- package/cjs/models/graph/Position.js +2 -0
- package/cjs/models/graph/Quaternion.d.ts +6 -0
- package/cjs/models/graph/Quaternion.js +2 -0
- package/cjs/models/graph/Vector3.d.ts +5 -0
- package/cjs/models/graph/Vector3.js +2 -0
- package/cjs/models/graph/index.d.ts +3 -0
- package/cjs/models/graph/index.js +19 -0
- package/cjs/models/index.d.ts +9 -2
- package/cjs/models/index.js +9 -2
- package/cjs/models/integrations/Location.d.ts +24 -0
- package/cjs/models/integrations/Location.js +2 -0
- package/cjs/models/integrations/PaginatedResults.d.ts +4 -0
- package/cjs/models/integrations/PaginatedResults.js +2 -0
- package/cjs/models/maps/Panorama.d.ts +12 -21
- package/cjs/models/projects/ExternalProject.d.ts +10 -0
- package/cjs/models/projects/ExternalProject.js +2 -0
- package/cjs/models/projects/NewProjectRequest.d.ts +8 -0
- package/cjs/models/projects/NewProjectRequest.js +2 -0
- package/cjs/models/target/Target.d.ts +30 -0
- package/cjs/models/target/Target.js +15 -0
- package/cjs/node/RocosSDKNode.d.ts +1 -5
- package/cjs/node/RocosSDKNode.js +9 -9
- package/cjs/services/AssetStorageService.d.ts +9 -1
- package/cjs/services/AssetStorageService.js +12 -1
- package/cjs/services/AuthService.d.ts +12 -1
- package/cjs/services/AuthService.js +25 -1
- package/cjs/services/DeviceCredentialsService.d.ts +15 -0
- package/cjs/services/DeviceCredentialsService.js +56 -0
- package/cjs/services/EnvironmentService.d.ts +34 -0
- package/cjs/services/EnvironmentService.js +56 -0
- package/cjs/services/EvaluatorService.js +1 -1
- package/cjs/services/IntegrationService.d.ts +7 -1
- package/cjs/services/IntegrationService.js +8 -0
- package/cjs/services/MapService.d.ts +18 -8
- package/cjs/services/MapService.js +37 -19
- package/cjs/services/ProfileService.d.ts +24 -0
- package/cjs/services/ProfileService.js +34 -0
- package/cjs/services/ProjectService.d.ts +7 -2
- package/cjs/services/ProjectService.js +7 -3
- package/cjs/services/RTPWebRTCService.d.ts +6 -1
- package/cjs/services/RTPWebRTCService.js +10 -2
- package/cjs/services/RobotService.d.ts +3 -1
- package/cjs/services/RobotService.js +6 -0
- package/cjs/services/SpotProvisioningService.d.ts +1 -1
- package/cjs/services/SpotProvisioningServiceNode.d.ts +1 -1
- package/cjs/services/TargetService.d.ts +17 -0
- package/cjs/services/TargetService.js +66 -0
- package/cjs/services/TelemetryService.d.ts +10 -1
- package/cjs/services/TelemetryService.js +27 -5
- package/cjs/services/WorkflowService.d.ts +18 -8
- package/cjs/services/WorkflowService.js +37 -11
- package/cjs/services/index.d.ts +11 -9
- package/cjs/services/index.js +11 -9
- package/cjs/store/RocosStore.d.ts +1 -2
- package/esm/IRocosSDK.d.ts +4 -3
- package/esm/RocosSDK.d.ts +19 -7
- package/esm/RocosSDK.js +32 -11
- package/esm/api/streams/caller/CallerStream.js +5 -2
- package/esm/api/streams/caller/CallerStreamNode.js +2 -1
- package/esm/api/streams/command/CommandStream.js +5 -2
- package/esm/api/streams/command/CommandStreamNode.js +2 -1
- package/esm/api/streams/control/ControlStream.js +5 -2
- package/esm/api/streams/control/ControlStreamAbstract.d.ts +1 -1
- package/esm/api/streams/control/ControlStreamNode.js +2 -1
- package/esm/api/streams/fileAccessor/FileAccessorStream.js +4 -1
- package/esm/api/streams/fileAccessor/FileAccessorStreamNode.js +3 -1
- package/esm/api/streams/search/SearchStream.js +5 -2
- package/esm/api/streams/search/SearchStreamNode.js +2 -1
- package/esm/api/streams/telemetry/TelemetryStream.js +4 -1
- package/esm/api/streams/telemetry/TelemetryStreamAbstract.d.ts +1 -1
- package/esm/api/streams/telemetry/TelemetryStreamNode.js +2 -1
- package/esm/api/streams/webRTCSignalling/WebRTCSignallingStream.js +5 -2
- package/esm/constants/api.d.ts +31 -15
- package/esm/constants/api.js +31 -15
- package/esm/helpers/cleanObject.js +4 -1
- package/esm/helpers/getUniqueConfigKey.d.ts +6 -2
- package/esm/helpers/getUniqueConfigKey.js +7 -2
- package/esm/helpers/index.d.ts +1 -0
- package/esm/helpers/index.js +1 -0
- package/esm/helpers/kscript/Context.d.ts +34 -0
- package/esm/helpers/kscript/Context.js +49 -0
- package/esm/helpers/kscript/index.d.ts +1 -0
- package/esm/helpers/kscript/index.js +1 -0
- package/esm/helpers/kscript/kscript.d.ts +6 -0
- package/esm/helpers/kscript/kscript.js +107 -0
- package/esm/helpers/kscript/nodes/Identifier.d.ts +12 -0
- package/esm/helpers/kscript/nodes/Identifier.js +14 -0
- package/esm/helpers/kscript/nodes/Literal.d.ts +11 -0
- package/esm/helpers/kscript/nodes/Literal.js +16 -0
- package/esm/helpers/kscript/nodes/Node.d.ts +9 -0
- package/esm/helpers/kscript/nodes/Node.js +12 -0
- package/esm/helpers/kscript/nodes/Program.d.ts +11 -0
- package/esm/helpers/kscript/nodes/Program.js +18 -0
- package/esm/helpers/kscript/nodes/TemplateLiteral.d.ts +23 -0
- package/esm/helpers/kscript/nodes/TemplateLiteral.js +29 -0
- package/esm/helpers/kscript/nodes/expressions/ArrayExpression.d.ts +7 -0
- package/esm/helpers/kscript/nodes/expressions/ArrayExpression.js +25 -0
- package/esm/helpers/kscript/nodes/expressions/ArrowFunctionExpression.d.ts +14 -0
- package/esm/helpers/kscript/nodes/expressions/ArrowFunctionExpression.js +34 -0
- package/esm/helpers/kscript/nodes/expressions/BinaryExpression.d.ts +16 -0
- package/esm/helpers/kscript/nodes/expressions/BinaryExpression.js +98 -0
- package/esm/helpers/kscript/nodes/expressions/CallExpression.d.ts +8 -0
- package/esm/helpers/kscript/nodes/expressions/CallExpression.js +32 -0
- package/esm/helpers/kscript/nodes/expressions/ChainExpression.d.ts +16 -0
- package/esm/helpers/kscript/nodes/expressions/ChainExpression.js +19 -0
- package/esm/helpers/kscript/nodes/expressions/ConditionalExpression.d.ts +14 -0
- package/esm/helpers/kscript/nodes/expressions/ConditionalExpression.js +24 -0
- package/esm/helpers/kscript/nodes/expressions/ExpressionStatement.d.ts +7 -0
- package/esm/helpers/kscript/nodes/expressions/ExpressionStatement.js +12 -0
- package/esm/helpers/kscript/nodes/expressions/LogicalExpression.d.ts +10 -0
- package/esm/helpers/kscript/nodes/expressions/LogicalExpression.js +41 -0
- package/esm/helpers/kscript/nodes/expressions/MemberExpression.d.ts +44 -0
- package/esm/helpers/kscript/nodes/expressions/MemberExpression.js +92 -0
- package/esm/helpers/kscript/nodes/expressions/ObjectExpression.d.ts +11 -0
- package/esm/helpers/kscript/nodes/expressions/ObjectExpression.js +53 -0
- package/esm/helpers/kscript/nodes/expressions/UnaryExpression.d.ts +12 -0
- package/esm/helpers/kscript/nodes/expressions/UnaryExpression.js +38 -0
- package/esm/helpers/kscript/nodes/expressions/index.d.ts +11 -0
- package/esm/helpers/kscript/nodes/expressions/index.js +11 -0
- package/esm/helpers/kscript/nodes/index.d.ts +4 -0
- package/esm/helpers/kscript/nodes/index.js +3 -0
- package/esm/helpers/kscript/nodes/nodeTypes.d.ts +33 -0
- package/esm/helpers/kscript/nodes/nodeTypes.js +24 -0
- package/esm/helpers/kscript/utils.d.ts +4 -0
- package/esm/helpers/kscript/utils.js +11 -0
- package/esm/helpers/websandbox/connection.d.ts +2 -1
- package/esm/helpers/websandbox/connection.js +6 -5
- package/esm/helpers/websandbox/frame/frame.js +4 -1
- package/esm/helpers/websandbox/frame/frame.source.js +1 -1
- package/esm/helpers/websandbox/frame/worker/manager.d.ts +8 -4
- package/esm/helpers/websandbox/frame/worker/manager.js +32 -14
- package/esm/helpers/websandbox/frame/worker/worker.source.js +1 -1
- package/esm/helpers/websandbox/sandbox.d.ts +1 -1
- package/esm/helpers/websandbox/sandbox.js +7 -7
- package/esm/models/IConnectedCallsign.d.ts +10 -0
- package/esm/models/IConnectedCallsign.js +5 -0
- package/esm/models/RocosError.d.ts +3 -0
- package/esm/models/RocosError.js +3 -0
- package/esm/models/ServiceEnum.d.ts +20 -17
- package/esm/models/ServiceEnum.js +20 -17
- package/esm/models/TelemetryStatus.d.ts +12 -0
- package/esm/models/TelemetryStatus.js +14 -0
- package/esm/models/Token.d.ts +2 -2
- package/esm/models/Token.js +5 -5
- package/esm/models/asset-storage/{AssetModelItem.d.ts → AssetItem.d.ts} +2 -0
- package/esm/models/device-credentials/DeviceCredentials.d.ts +61 -0
- package/esm/models/graph/Position.d.ts +6 -0
- package/esm/models/graph/Quaternion.d.ts +6 -0
- package/esm/models/graph/Vector3.d.ts +5 -0
- package/esm/models/graph/index.d.ts +3 -0
- package/esm/models/graph/index.js +3 -0
- package/esm/models/index.d.ts +9 -2
- package/esm/models/index.js +9 -2
- package/esm/models/integrations/Location.d.ts +24 -0
- package/esm/models/integrations/PaginatedResults.d.ts +4 -0
- package/esm/models/maps/Panorama.d.ts +12 -21
- package/esm/models/projects/ExternalProject.d.ts +10 -0
- package/esm/models/projects/NewProjectRequest.d.ts +8 -0
- package/esm/models/target/Target.d.ts +30 -0
- package/esm/models/target/Target.js +9 -0
- package/esm/node/RocosSDKNode.d.ts +1 -5
- package/esm/node/RocosSDKNode.js +10 -10
- package/esm/services/AssetStorageService.d.ts +9 -1
- package/esm/services/AssetStorageService.js +13 -2
- package/esm/services/AuthService.d.ts +12 -1
- package/esm/services/AuthService.js +25 -1
- package/esm/services/BaseServiceAbstract.js +1 -1
- package/esm/services/DeviceCredentialsService.d.ts +15 -0
- package/esm/services/DeviceCredentialsService.js +52 -0
- package/esm/services/EnvironmentService.d.ts +34 -0
- package/esm/services/EnvironmentService.js +52 -0
- package/esm/services/EvaluatorService.js +1 -1
- package/esm/services/IntegrationService.d.ts +7 -1
- package/esm/services/IntegrationService.js +10 -2
- package/esm/services/MapService.d.ts +18 -8
- package/esm/services/MapService.js +38 -20
- package/esm/services/ProfileService.d.ts +24 -0
- package/esm/services/ProfileService.js +35 -1
- package/esm/services/ProjectService.d.ts +7 -2
- package/esm/services/ProjectService.js +9 -5
- package/esm/services/RTPWebRTCService.d.ts +6 -1
- package/esm/services/RTPWebRTCService.js +10 -2
- package/esm/services/RobotService.d.ts +3 -1
- package/esm/services/RobotService.js +8 -2
- package/esm/services/SpotProvisioningService.d.ts +1 -1
- package/esm/services/SpotProvisioningServiceNode.d.ts +1 -1
- package/esm/services/TargetService.d.ts +17 -0
- package/esm/services/TargetService.js +62 -0
- package/esm/services/TelemetryService.d.ts +10 -1
- package/esm/services/TelemetryService.js +28 -6
- package/esm/services/WorkflowService.d.ts +18 -8
- package/esm/services/WorkflowService.js +38 -12
- package/esm/services/index.d.ts +11 -9
- package/esm/services/index.js +11 -9
- package/esm/store/RocosStore.d.ts +1 -2
- package/package.json +2 -2
- package/cjs/helpers/cleanObject.spec.js +0 -55
- package/cjs/helpers/flattenObject.spec.js +0 -31
- package/cjs/helpers/flattenOneOf.spec.js +0 -159
- package/cjs/helpers/formatServiceUrl.spec.js +0 -18
- package/cjs/helpers/getSha256Hex.spec.js +0 -19
- package/cjs/helpers/getSha256HexNode.spec.js +0 -10
- package/cjs/helpers/getURLSearchParams.spec.js +0 -21
- package/cjs/helpers/nanosecondToMillisecond.spec.js +0 -22
- package/cjs/helpers/splitRobotTopic.spec.js +0 -53
- package/cjs/helpers/standardDeviation.spec.d.ts +0 -1
- package/cjs/helpers/standardDeviation.spec.js +0 -13
- package/cjs/helpers/websandbox/frame/worker/manager.spec.d.ts +0 -4
- package/cjs/helpers/websandbox/frame/worker/manager.spec.js +0 -132
- package/cjs/models/CallsignStatus.d.ts +0 -6
- package/cjs/models/CallsignStatus.js +0 -10
- package/cjs/models/ExternalProject.d.ts +0 -6
- package/cjs/models/ExternalProject.js +0 -6
- package/cjs/models/Token.spec.d.ts +0 -1
- package/cjs/models/Token.spec.js +0 -110
- package/cjs/services/AuthService.spec.d.ts +0 -1
- package/cjs/services/AuthService.spec.js +0 -165
- package/cjs/services/CallerService.spec.d.ts +0 -1
- package/cjs/services/CallerService.spec.js +0 -229
- package/cjs/services/FunctionService.d.ts +0 -68
- package/cjs/services/FunctionService.js +0 -103
- package/cjs/services/PlatformTimeService.spec.d.ts +0 -1
- package/cjs/services/PlatformTimeService.spec.js +0 -182
- package/cjs/services/RTPWebRTCService.spec.d.ts +0 -4
- package/cjs/services/RTPWebRTCService.spec.js +0 -171
- package/cjs/services/TelemetryService.spec.d.ts +0 -1
- package/cjs/services/TelemetryService.spec.js +0 -39
- package/esm/helpers/cleanObject.spec.d.ts +0 -1
- package/esm/helpers/cleanObject.spec.js +0 -53
- package/esm/helpers/flattenObject.spec.d.ts +0 -1
- package/esm/helpers/flattenObject.spec.js +0 -29
- package/esm/helpers/flattenOneOf.spec.d.ts +0 -1
- package/esm/helpers/flattenOneOf.spec.js +0 -157
- package/esm/helpers/formatServiceUrl.spec.d.ts +0 -1
- package/esm/helpers/formatServiceUrl.spec.js +0 -16
- package/esm/helpers/getSha256Hex.spec.d.ts +0 -1
- package/esm/helpers/getSha256Hex.spec.js +0 -14
- package/esm/helpers/getSha256HexNode.spec.d.ts +0 -1
- package/esm/helpers/getSha256HexNode.spec.js +0 -8
- package/esm/helpers/getURLSearchParams.spec.d.ts +0 -1
- package/esm/helpers/getURLSearchParams.spec.js +0 -19
- package/esm/helpers/nanosecondToMillisecond.spec.d.ts +0 -1
- package/esm/helpers/nanosecondToMillisecond.spec.js +0 -20
- package/esm/helpers/splitRobotTopic.spec.d.ts +0 -1
- package/esm/helpers/splitRobotTopic.spec.js +0 -51
- package/esm/helpers/standardDeviation.spec.d.ts +0 -1
- package/esm/helpers/standardDeviation.spec.js +0 -11
- package/esm/helpers/websandbox/frame/worker/manager.spec.d.ts +0 -4
- package/esm/helpers/websandbox/frame/worker/manager.spec.js +0 -127
- package/esm/models/CallsignStatus.d.ts +0 -6
- package/esm/models/CallsignStatus.js +0 -7
- package/esm/models/ExternalProject.d.ts +0 -6
- package/esm/models/ExternalProject.js +0 -2
- package/esm/models/Token.spec.d.ts +0 -1
- package/esm/models/Token.spec.js +0 -108
- package/esm/models/asset-storage/AssetModelItem.js +0 -1
- package/esm/services/AuthService.spec.d.ts +0 -1
- package/esm/services/AuthService.spec.js +0 -163
- package/esm/services/CallerService.spec.d.ts +0 -1
- package/esm/services/CallerService.spec.js +0 -227
- package/esm/services/FunctionService.d.ts +0 -68
- package/esm/services/FunctionService.js +0 -99
- package/esm/services/PlatformTimeService.spec.d.ts +0 -1
- package/esm/services/PlatformTimeService.spec.js +0 -180
- package/esm/services/RTPWebRTCService.spec.d.ts +0 -4
- package/esm/services/RTPWebRTCService.spec.js +0 -169
- package/esm/services/TelemetryService.spec.d.ts +0 -1
- package/esm/services/TelemetryService.spec.js +0 -37
- /package/cjs/models/asset-storage/{AssetModelItem.js → AssetItem.js} +0 -0
- /package/{cjs/helpers/cleanObject.spec.d.ts → esm/models/asset-storage/AssetItem.js} +0 -0
- /package/{cjs/helpers/flattenObject.spec.d.ts → esm/models/device-credentials/DeviceCredentials.js} +0 -0
- /package/{cjs/helpers/flattenOneOf.spec.d.ts → esm/models/graph/Position.js} +0 -0
- /package/{cjs/helpers/formatServiceUrl.spec.d.ts → esm/models/graph/Quaternion.js} +0 -0
- /package/{cjs/helpers/getSha256Hex.spec.d.ts → esm/models/graph/Vector3.js} +0 -0
- /package/{cjs/helpers/getSha256HexNode.spec.d.ts → esm/models/integrations/Location.js} +0 -0
- /package/{cjs/helpers/getURLSearchParams.spec.d.ts → esm/models/integrations/PaginatedResults.js} +0 -0
- /package/{cjs/helpers/nanosecondToMillisecond.spec.d.ts → esm/models/projects/ExternalProject.js} +0 -0
- /package/{cjs/helpers/splitRobotTopic.spec.d.ts → esm/models/projects/NewProjectRequest.js} +0 -0
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import { Asset, IBaseService, IRocosSDKConfig, RocosError, Target, TargetMedia } from '../models';
|
|
2
|
+
import { BaseServiceAbstract } from './BaseServiceAbstract';
|
|
3
|
+
/**
|
|
4
|
+
* Service for managing targets (such as assets, PoI's, or FLOCS) on DroneDeploy
|
|
5
|
+
*/
|
|
6
|
+
export declare class TargetService extends BaseServiceAbstract implements IBaseService {
|
|
7
|
+
list: (projectId: string, frameID?: string) => Promise<Target[]>;
|
|
8
|
+
constructor(config: IRocosSDKConfig);
|
|
9
|
+
getStatus(): boolean;
|
|
10
|
+
protected getError(e: Error): RocosError;
|
|
11
|
+
createTargets(projectId: string, targets: Target[]): Promise<void>;
|
|
12
|
+
listTargets(projectId: string, frameID?: string): Promise<Target[]>;
|
|
13
|
+
createAssets(projectId: string, assets: Asset[]): Promise<void>;
|
|
14
|
+
listAssets(projectId: string, frameID?: string): Promise<Asset[]>;
|
|
15
|
+
deleteAssets(projectId: string, assetIds: string[]): Promise<void>;
|
|
16
|
+
addMedia(projectId: string, targetId: string, media: TargetMedia): Promise<void>;
|
|
17
|
+
}
|
|
@@ -0,0 +1,66 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.TargetService = void 0;
|
|
4
|
+
const api_1 = require("../constants/api");
|
|
5
|
+
const models_1 = require("../models");
|
|
6
|
+
const BaseServiceAbstract_1 = require("./BaseServiceAbstract");
|
|
7
|
+
const RocosLogger_1 = require("../logger/RocosLogger");
|
|
8
|
+
const formatServiceUrl_1 = require("../helpers/formatServiceUrl");
|
|
9
|
+
/**
|
|
10
|
+
* Service for managing targets (such as assets, PoI's, or FLOCS) on DroneDeploy
|
|
11
|
+
*/
|
|
12
|
+
class TargetService extends BaseServiceAbstract_1.BaseServiceAbstract {
|
|
13
|
+
constructor(config) {
|
|
14
|
+
super(config);
|
|
15
|
+
this.logger = RocosLogger_1.RocosLogger.getInstance(`TargetService(${this.config.url})`);
|
|
16
|
+
this.list = this.listTargets;
|
|
17
|
+
}
|
|
18
|
+
getStatus() {
|
|
19
|
+
return true;
|
|
20
|
+
}
|
|
21
|
+
getError(e) {
|
|
22
|
+
return new models_1.RocosError(e, models_1.errorCodes.TARGET_SERVICE_ERROR);
|
|
23
|
+
}
|
|
24
|
+
async createTargets(projectId, targets) {
|
|
25
|
+
return this.callPut((0, formatServiceUrl_1.formatServiceUrl)(api_1.API_GRAPHS_TARGET_UPLOAD_URL, {
|
|
26
|
+
url: this.config.url,
|
|
27
|
+
projectId,
|
|
28
|
+
}, this.config.insecure), targets, `Failed to upload targets for ${projectId}`);
|
|
29
|
+
}
|
|
30
|
+
async listTargets(projectId, frameID = 'seed') {
|
|
31
|
+
const resp = await this.callGet((0, formatServiceUrl_1.formatServiceUrl)(api_1.API_GRAPHS_TARGETS_URL, {
|
|
32
|
+
url: this.config.url,
|
|
33
|
+
projectId,
|
|
34
|
+
}, this.config.insecure), 'Failed to list targets', { frameID });
|
|
35
|
+
return resp;
|
|
36
|
+
}
|
|
37
|
+
async createAssets(projectId, assets) {
|
|
38
|
+
return this.callPut((0, formatServiceUrl_1.formatServiceUrl)(api_1.API_GRAPHS_ASSETS_UPLOAD_URL, {
|
|
39
|
+
url: this.config.url,
|
|
40
|
+
projectId,
|
|
41
|
+
}, this.config.insecure), assets, `Failed to upload assets for ${projectId}`);
|
|
42
|
+
}
|
|
43
|
+
async listAssets(projectId, frameID = 'seed') {
|
|
44
|
+
const resp = await this.callGet((0, formatServiceUrl_1.formatServiceUrl)(api_1.API_GRAPHS_ASSETS_URL, {
|
|
45
|
+
url: this.config.url,
|
|
46
|
+
projectId,
|
|
47
|
+
}, this.config.insecure), 'Failed to list assets', { frameID });
|
|
48
|
+
return resp;
|
|
49
|
+
}
|
|
50
|
+
async deleteAssets(projectId, assetIds) {
|
|
51
|
+
await this.callDelete((0, formatServiceUrl_1.formatServiceUrl)(api_1.API_GRAPHS_ASSETS_URL, {
|
|
52
|
+
url: this.config.url,
|
|
53
|
+
projectId,
|
|
54
|
+
}, this.config.insecure), 'Failed to delete assets', {
|
|
55
|
+
assetIds,
|
|
56
|
+
});
|
|
57
|
+
}
|
|
58
|
+
async addMedia(projectId, targetId, media) {
|
|
59
|
+
await this.callPost((0, formatServiceUrl_1.formatServiceUrl)(api_1.API_GRAPHS_TARGETS_URL, {
|
|
60
|
+
url: this.config.url,
|
|
61
|
+
projectId,
|
|
62
|
+
targetId,
|
|
63
|
+
}, this.config.insecure), media, 'Failed to add media to a target');
|
|
64
|
+
}
|
|
65
|
+
}
|
|
66
|
+
exports.TargetService = TargetService;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { Observable } from 'rxjs';
|
|
2
|
-
import { CallsignStatus, IRocosSDKConfig, IRocosTelemetryMessage, IStreamStatusMessage, ITelemetryStream, ITelemetryStreamConfig, ITelemetrySubscriptionParams, ITelemetrySubscriptions } from '../models';
|
|
2
|
+
import { CallsignStatus, IRocosSDKConfig, IRocosTelemetryMessage, IStreamStatusMessage, ITelemetryStream, ITelemetryStreamConfig, ITelemetrySubscriptionParams, ITelemetrySubscriptions, TelemetryMonitorStatus } from '../models';
|
|
3
3
|
import { BaseStreamService } from './BaseStreamService';
|
|
4
4
|
export declare class TelemetryService extends BaseStreamService<ITelemetryStream, ITelemetryStreamConfig> {
|
|
5
5
|
private statusSubscription;
|
|
@@ -34,6 +34,15 @@ export declare class TelemetryService extends BaseStreamService<ITelemetryStream
|
|
|
34
34
|
* @param intervalMs optionally override the interval to check for heartbeats (in ms). Default 2000ms
|
|
35
35
|
*/
|
|
36
36
|
getRobotStatusChanges(projectId: string, callsign: string, heartbeatTimeoutMs?: number, intervalMs?: number): Observable<CallsignStatus>;
|
|
37
|
+
/**
|
|
38
|
+
* Subscribes to the given telemetry and checks we receive one at least emission every `heartbeatTimeoutMs` (default 5s)
|
|
39
|
+
* @param projectId
|
|
40
|
+
* @param callsign
|
|
41
|
+
* @param source the telemetry source to monitor
|
|
42
|
+
* @param heartbeatTimeoutMs optionally override the deadline for telemetry emissions (in ms). Default 5000ms
|
|
43
|
+
* @param intervalMs optionally override the interval to check for telemetry emissions (in ms). Default 2000ms
|
|
44
|
+
*/
|
|
45
|
+
monitorTelemetryWithTimeout(projectId: string, callsign: string, source: string, heartbeatTimeoutMs?: number, intervalMs?: number): Observable<TelemetryMonitorStatus>;
|
|
37
46
|
protected initStream(stream: ITelemetryStream): Promise<void>;
|
|
38
47
|
private buildScope;
|
|
39
48
|
private createStream;
|
|
@@ -98,23 +98,45 @@ class TelemetryService extends BaseStreamService_1.BaseStreamService {
|
|
|
98
98
|
* @param intervalMs optionally override the interval to check for heartbeats (in ms). Default 2000ms
|
|
99
99
|
*/
|
|
100
100
|
getRobotStatusChanges(projectId, callsign, heartbeatTimeoutMs = HEARTBEAT_TIMEOUT, intervalMs = 2000) {
|
|
101
|
+
return this.monitorTelemetryWithTimeout(projectId, callsign, HEARTBEAT_SOURCE, heartbeatTimeoutMs, intervalMs).pipe((0, rxjs_1.map)((status) => {
|
|
102
|
+
switch (status) {
|
|
103
|
+
case models_1.TelemetryMonitorStatus.CONNECTED:
|
|
104
|
+
return models_1.CallsignStatus.ONLINE;
|
|
105
|
+
case models_1.TelemetryMonitorStatus.DISCONNECTED:
|
|
106
|
+
return models_1.CallsignStatus.OFFLINE;
|
|
107
|
+
case models_1.TelemetryMonitorStatus.ERROR:
|
|
108
|
+
return models_1.CallsignStatus.ERROR;
|
|
109
|
+
default:
|
|
110
|
+
return models_1.CallsignStatus.UNKNOWN;
|
|
111
|
+
}
|
|
112
|
+
}));
|
|
113
|
+
}
|
|
114
|
+
/**
|
|
115
|
+
* Subscribes to the given telemetry and checks we receive one at least emission every `heartbeatTimeoutMs` (default 5s)
|
|
116
|
+
* @param projectId
|
|
117
|
+
* @param callsign
|
|
118
|
+
* @param source the telemetry source to monitor
|
|
119
|
+
* @param heartbeatTimeoutMs optionally override the deadline for telemetry emissions (in ms). Default 5000ms
|
|
120
|
+
* @param intervalMs optionally override the interval to check for telemetry emissions (in ms). Default 2000ms
|
|
121
|
+
*/
|
|
122
|
+
monitorTelemetryWithTimeout(projectId, callsign, source, heartbeatTimeoutMs = HEARTBEAT_TIMEOUT, intervalMs = 2000) {
|
|
101
123
|
const startedAt = Date.now();
|
|
102
124
|
const heartbeatTime$ = this.subscribe({
|
|
103
125
|
projectId,
|
|
104
|
-
sources: [
|
|
126
|
+
sources: [source],
|
|
105
127
|
callsigns: [callsign],
|
|
106
128
|
}).pipe((0, rxjs_1.map)(() => Date.now()));
|
|
107
129
|
return (0, rxjs_1.combineLatest)([heartbeatTime$.pipe((0, rxjs_1.startWith)(startedAt)), (0, rxjs_1.interval)(intervalMs)]).pipe((0, rxjs_1.map)(([lastHeartbeat, _]) => {
|
|
108
130
|
const now = Date.now();
|
|
109
131
|
// If we haven't received a heartbeat, but we've only just started
|
|
110
132
|
if (lastHeartbeat === startedAt && now - startedAt <= heartbeatTimeoutMs) {
|
|
111
|
-
return models_1.
|
|
133
|
+
return models_1.TelemetryMonitorStatus.UNKNOWN;
|
|
112
134
|
}
|
|
113
135
|
if (now - lastHeartbeat > heartbeatTimeoutMs) {
|
|
114
|
-
return models_1.
|
|
136
|
+
return models_1.TelemetryMonitorStatus.DISCONNECTED;
|
|
115
137
|
}
|
|
116
|
-
return models_1.
|
|
117
|
-
}), (0, rxjs_1.startWith)(models_1.
|
|
138
|
+
return models_1.TelemetryMonitorStatus.CONNECTED;
|
|
139
|
+
}), (0, rxjs_1.startWith)(models_1.TelemetryMonitorStatus.UNKNOWN), (0, rxjs_1.distinctUntilChanged)(), (0, rxjs_1.catchError)(() => (0, rxjs_1.of)(models_1.TelemetryMonitorStatus.ERROR)));
|
|
118
140
|
}
|
|
119
141
|
async initStream(stream) {
|
|
120
142
|
await super.initStream(stream);
|
|
@@ -36,27 +36,37 @@ export declare class WorkflowService extends BaseServiceAbstract implements IBas
|
|
|
36
36
|
*/
|
|
37
37
|
update(projectId: string, workflowId: string, model: Workflow): Promise<Workflow>;
|
|
38
38
|
/**
|
|
39
|
-
*
|
|
39
|
+
* Delete a workflow
|
|
40
40
|
*
|
|
41
41
|
* @param projectId - Project Id
|
|
42
42
|
* @param workflowId - Workflow Id
|
|
43
|
-
* @param fileName - Name of file including extension
|
|
44
|
-
* @param arrayBuffer - data to upload
|
|
45
43
|
*/
|
|
46
|
-
|
|
47
|
-
protected uploadAssetWithHash(projectId: string, workflowId: string, fileName: string, arrayBuffer: ArrayBuffer, hash: string): Promise<void>;
|
|
44
|
+
delete(projectId: string, workflowId: string): Promise<void>;
|
|
48
45
|
/**
|
|
49
|
-
*
|
|
46
|
+
* Upload workflow asset
|
|
50
47
|
*
|
|
51
48
|
* @param projectId - Project Id
|
|
52
49
|
* @param workflowId - Workflow Id
|
|
50
|
+
* @param fileName - Name of file including extension
|
|
51
|
+
* @param arrayBuffer - data to upload
|
|
53
52
|
*/
|
|
54
|
-
|
|
53
|
+
uploadAsset(projectId: string, workflowId: string, fileName: string, arrayBuffer: ArrayBuffer): Promise<void>;
|
|
54
|
+
protected uploadAssetWithHash(projectId: string, workflowId: string, fileName: string, arrayBuffer: ArrayBuffer, hash: string): Promise<void>;
|
|
55
55
|
/**
|
|
56
56
|
* Get deployed workflows on robot
|
|
57
57
|
*
|
|
58
58
|
* @param projectId - Project Id
|
|
59
59
|
* @param callsign - Robot callsign
|
|
60
60
|
*/
|
|
61
|
-
getDeployedWorkflows(projectId: string,
|
|
61
|
+
getDeployedWorkflows(projectId: string, profileId: string, callsign?: string): Promise<Workflow[]>;
|
|
62
|
+
addRobotDeployment(projectId: string, callsign: string, workflowId: string): Promise<void>;
|
|
63
|
+
addProfileDeployment(projectId: string, profileId: string, workflowId: string): Promise<void>;
|
|
64
|
+
removeRobotDeployment(projectId: string, callsign: string, workflowId: string): Promise<void>;
|
|
65
|
+
removeProfileDeployment(projectId: string, profileId: string, workflowId: string): Promise<void>;
|
|
66
|
+
updateRobotDeployments(projectId: string, callsign: string, workflows: string[]): Promise<void>;
|
|
67
|
+
updateProfileDeployments(projectId: string, profileId: string, workflows: string[]): Promise<void>;
|
|
68
|
+
getAffectedRobots(projectId: string, workflowId: string): Promise<{
|
|
69
|
+
callsigns: string[];
|
|
70
|
+
profileIds: string[];
|
|
71
|
+
}>;
|
|
62
72
|
}
|
|
@@ -54,6 +54,16 @@ class WorkflowService extends BaseServiceAbstract_1.BaseServiceAbstract {
|
|
|
54
54
|
async update(projectId, workflowId, model) {
|
|
55
55
|
return this.callPut((0, formatServiceUrl_1.formatServiceUrl)(api_1.API_PROJECT_WORKFLOW_ID_URL, { url: this.config.url, projectId, workflowId }, this.config.insecure), model, `Failed to update workflow for ${projectId}, workflowId ${workflowId}.`);
|
|
56
56
|
}
|
|
57
|
+
/**
|
|
58
|
+
* Delete a workflow
|
|
59
|
+
*
|
|
60
|
+
* @param projectId - Project Id
|
|
61
|
+
* @param workflowId - Workflow Id
|
|
62
|
+
*/
|
|
63
|
+
async delete(projectId, workflowId) {
|
|
64
|
+
return this.callDelete((0, formatServiceUrl_1.formatServiceUrl)(api_1.API_PROJECT_WORKFLOW_ID_URL, { url: this.config.url, projectId, workflowId }, this.config.insecure), `Failed to delete workflow for ${projectId}, workflowId ${workflowId}.`);
|
|
65
|
+
}
|
|
66
|
+
// Assets
|
|
57
67
|
/**
|
|
58
68
|
* Upload workflow asset
|
|
59
69
|
*
|
|
@@ -85,23 +95,39 @@ class WorkflowService extends BaseServiceAbstract_1.BaseServiceAbstract {
|
|
|
85
95
|
if (uploadResponse.status !== 200)
|
|
86
96
|
throw new Error(`Failed to upload file: ${uploadResponse.statusText}`);
|
|
87
97
|
}
|
|
88
|
-
|
|
89
|
-
* Delete a workflow
|
|
90
|
-
*
|
|
91
|
-
* @param projectId - Project Id
|
|
92
|
-
* @param workflowId - Workflow Id
|
|
93
|
-
*/
|
|
94
|
-
async delete(projectId, workflowId) {
|
|
95
|
-
return this.callDelete((0, formatServiceUrl_1.formatServiceUrl)(api_1.API_PROJECT_WORKFLOW_ID_URL, { url: this.config.url, projectId, workflowId }, this.config.insecure), `Failed to delete workflow for ${projectId}, workflowId ${workflowId}.`);
|
|
96
|
-
}
|
|
98
|
+
// Deployments
|
|
97
99
|
/**
|
|
98
100
|
* Get deployed workflows on robot
|
|
99
101
|
*
|
|
100
102
|
* @param projectId - Project Id
|
|
101
103
|
* @param callsign - Robot callsign
|
|
102
104
|
*/
|
|
103
|
-
async getDeployedWorkflows(projectId, callsign) {
|
|
104
|
-
|
|
105
|
+
async getDeployedWorkflows(projectId, profileId, callsign) {
|
|
106
|
+
if (callsign) {
|
|
107
|
+
return this.callGet((0, formatServiceUrl_1.formatServiceUrl)(api_1.API_PROJECT_ROBOT_DEPLOYMENTS_URL, { url: this.config.url, projectId, profileId, callsign }, this.config.insecure), `Failed to get workflows for project ${projectId}, profile ${profileId}, callsign ${callsign}.`);
|
|
108
|
+
}
|
|
109
|
+
return this.callGet((0, formatServiceUrl_1.formatServiceUrl)(api_1.API_PROJECT_PROFILE_DEPLOYMENTS_URL, { url: this.config.url, projectId, profileId }, this.config.insecure), `Failed to get workflows for project ${projectId}, profile ${profileId}.`);
|
|
110
|
+
}
|
|
111
|
+
async addRobotDeployment(projectId, callsign, workflowId) {
|
|
112
|
+
return this.callPost((0, formatServiceUrl_1.formatServiceUrl)(api_1.API_PROJECT_ROBOT_DEPLOYED_WORKFLOW_URL, { url: this.config.url, projectId, callsign, workflowId }, this.config.insecure), undefined, `Failed to add workflow for ${projectId}, callsign ${callsign}.`);
|
|
113
|
+
}
|
|
114
|
+
async addProfileDeployment(projectId, profileId, workflowId) {
|
|
115
|
+
return this.callPost((0, formatServiceUrl_1.formatServiceUrl)(api_1.API_PROJECT_PROFILE_DEPLOYED_WORKFLOW_URL, { url: this.config.url, projectId, profileId, workflowId }, this.config.insecure), undefined, `Failed to add workflow for ${projectId}, profile ${profileId}.`);
|
|
116
|
+
}
|
|
117
|
+
async removeRobotDeployment(projectId, callsign, workflowId) {
|
|
118
|
+
return this.callDelete((0, formatServiceUrl_1.formatServiceUrl)(api_1.API_PROJECT_ROBOT_DEPLOYED_WORKFLOW_URL, { url: this.config.url, projectId, callsign, workflowId }, this.config.insecure), `Failed to remove workflow for ${projectId}, callsign ${callsign}.`);
|
|
119
|
+
}
|
|
120
|
+
async removeProfileDeployment(projectId, profileId, workflowId) {
|
|
121
|
+
return this.callDelete((0, formatServiceUrl_1.formatServiceUrl)(api_1.API_PROJECT_PROFILE_DEPLOYED_WORKFLOW_URL, { url: this.config.url, projectId, profileId, workflowId }, this.config.insecure), `Failed to remove workflow for ${projectId}, profile ${profileId}.`);
|
|
122
|
+
}
|
|
123
|
+
async updateRobotDeployments(projectId, callsign, workflows) {
|
|
124
|
+
return this.callPost((0, formatServiceUrl_1.formatServiceUrl)(api_1.API_PROJECT_ROBOT_NO_PROFILE_DEPLOYMENTS_URL, { url: this.config.url, projectId, callsign }, this.config.insecure), { deployed: workflows }, `Failed to update workflows for ${projectId}, callsign ${callsign}.`);
|
|
125
|
+
}
|
|
126
|
+
async updateProfileDeployments(projectId, profileId, workflows) {
|
|
127
|
+
return this.callPost((0, formatServiceUrl_1.formatServiceUrl)(api_1.API_PROJECT_PROFILE_DEPLOYMENTS_URL, { url: this.config.url, projectId, profileId }, this.config.insecure), { deployed: workflows }, `Failed to update workflows for ${projectId}, profile ${profileId}.`);
|
|
128
|
+
}
|
|
129
|
+
async getAffectedRobots(projectId, workflowId) {
|
|
130
|
+
return this.callGet((0, formatServiceUrl_1.formatServiceUrl)(api_1.API_PROJECT_WORKFLOW_AFFECTED_URL, { url: this.config.url, projectId, workflowId, flowId: workflowId }, this.config.insecure), `Failed to get affected robots for ${projectId}, workflowId ${workflowId}.`);
|
|
105
131
|
}
|
|
106
132
|
}
|
|
107
133
|
exports.WorkflowService = WorkflowService;
|
package/cjs/services/index.d.ts
CHANGED
|
@@ -5,24 +5,26 @@ export * from './CommandService';
|
|
|
5
5
|
export * from './ConfigGroupService';
|
|
6
6
|
export * from './ControlService';
|
|
7
7
|
export * from './DashboardService';
|
|
8
|
+
export * from './DeviceCredentialsService';
|
|
9
|
+
export * from './EnvironmentService';
|
|
10
|
+
export * from './EvaluatorService';
|
|
8
11
|
export * from './EventService';
|
|
9
12
|
export * from './FileAccessorService';
|
|
10
|
-
export * from './FunctionService';
|
|
11
13
|
export * from './IntegrationService';
|
|
14
|
+
export * from './MapService';
|
|
15
|
+
export * from './PlatformTimeService';
|
|
12
16
|
export * from './ProfileService';
|
|
13
17
|
export * from './ProjectService';
|
|
18
|
+
export * from './RTPWebRTCService';
|
|
14
19
|
export * from './RobotService';
|
|
20
|
+
export * from './ScheduleService';
|
|
15
21
|
export * from './SearchService';
|
|
22
|
+
export * from './SpotProvisioningService';
|
|
23
|
+
export * from './SpotProvisioningServiceNode';
|
|
16
24
|
export * from './StreamService';
|
|
25
|
+
export * from './TargetService';
|
|
17
26
|
export * from './TelemetryService';
|
|
27
|
+
export * from './TimeSyncerService';
|
|
18
28
|
export * from './UserService';
|
|
19
29
|
export * from './WebRTCSignallingService';
|
|
20
30
|
export * from './WorkflowService';
|
|
21
|
-
export * from './ScheduleService';
|
|
22
|
-
export * from './TimeSyncerService';
|
|
23
|
-
export * from './PlatformTimeService';
|
|
24
|
-
export * from './SpotProvisioningService';
|
|
25
|
-
export * from './SpotProvisioningServiceNode';
|
|
26
|
-
export * from './MapService';
|
|
27
|
-
export * from './EvaluatorService';
|
|
28
|
-
export * from './RTPWebRTCService';
|
package/cjs/services/index.js
CHANGED
|
@@ -21,24 +21,26 @@ __exportStar(require("./CommandService"), exports);
|
|
|
21
21
|
__exportStar(require("./ConfigGroupService"), exports);
|
|
22
22
|
__exportStar(require("./ControlService"), exports);
|
|
23
23
|
__exportStar(require("./DashboardService"), exports);
|
|
24
|
+
__exportStar(require("./DeviceCredentialsService"), exports);
|
|
25
|
+
__exportStar(require("./EnvironmentService"), exports);
|
|
26
|
+
__exportStar(require("./EvaluatorService"), exports);
|
|
24
27
|
__exportStar(require("./EventService"), exports);
|
|
25
28
|
__exportStar(require("./FileAccessorService"), exports);
|
|
26
|
-
__exportStar(require("./FunctionService"), exports);
|
|
27
29
|
__exportStar(require("./IntegrationService"), exports);
|
|
30
|
+
__exportStar(require("./MapService"), exports);
|
|
31
|
+
__exportStar(require("./PlatformTimeService"), exports);
|
|
28
32
|
__exportStar(require("./ProfileService"), exports);
|
|
29
33
|
__exportStar(require("./ProjectService"), exports);
|
|
34
|
+
__exportStar(require("./RTPWebRTCService"), exports);
|
|
30
35
|
__exportStar(require("./RobotService"), exports);
|
|
36
|
+
__exportStar(require("./ScheduleService"), exports);
|
|
31
37
|
__exportStar(require("./SearchService"), exports);
|
|
38
|
+
__exportStar(require("./SpotProvisioningService"), exports);
|
|
39
|
+
__exportStar(require("./SpotProvisioningServiceNode"), exports);
|
|
32
40
|
__exportStar(require("./StreamService"), exports);
|
|
41
|
+
__exportStar(require("./TargetService"), exports);
|
|
33
42
|
__exportStar(require("./TelemetryService"), exports);
|
|
43
|
+
__exportStar(require("./TimeSyncerService"), exports);
|
|
34
44
|
__exportStar(require("./UserService"), exports);
|
|
35
45
|
__exportStar(require("./WebRTCSignallingService"), exports);
|
|
36
46
|
__exportStar(require("./WorkflowService"), exports);
|
|
37
|
-
__exportStar(require("./ScheduleService"), exports);
|
|
38
|
-
__exportStar(require("./TimeSyncerService"), exports);
|
|
39
|
-
__exportStar(require("./PlatformTimeService"), exports);
|
|
40
|
-
__exportStar(require("./SpotProvisioningService"), exports);
|
|
41
|
-
__exportStar(require("./SpotProvisioningServiceNode"), exports);
|
|
42
|
-
__exportStar(require("./MapService"), exports);
|
|
43
|
-
__exportStar(require("./EvaluatorService"), exports);
|
|
44
|
-
__exportStar(require("./RTPWebRTCService"), exports);
|
|
@@ -1,6 +1,5 @@
|
|
|
1
|
-
import { IRocosChangeMessage } from '../models
|
|
1
|
+
import { IRocosChangeMessage, IRocosSDKConfig } from '../models';
|
|
2
2
|
import { IRocosSDK } from '../IRocosSDK';
|
|
3
|
-
import { IRocosSDKConfig } from '../models/IRocosSDKConfig';
|
|
4
3
|
import { Subject } from 'rxjs';
|
|
5
4
|
export declare class RocosStore {
|
|
6
5
|
private static changeSubject$?;
|
package/esm/IRocosSDK.d.ts
CHANGED
|
@@ -1,11 +1,11 @@
|
|
|
1
|
-
import { AssetStorageService, AuthService, CallerService, CommandService, ConfigGroupService, ControlService, DashboardService, EvaluatorService, EventService, FileAccessorService,
|
|
1
|
+
import { AssetStorageService, AuthService, CallerService, CommandService, ConfigGroupService, ControlService, DashboardService, DeviceCredentialsService, EnvironmentService, EvaluatorService, EventService, FileAccessorService, IntegrationService, MapService, ProfileService, ProjectService, RTPWebRTCService, RobotService, SearchService, SpotProvisioningService, SpotProvisioningServiceNode, StreamService, TargetService, TelemetryService, TimeSyncerService, UserService, WebRTCSignallingService, WorkflowService } from './services';
|
|
2
2
|
import { IBaseService, IDebugLevel, ServiceEnum } from './models';
|
|
3
|
-
import { RTPWebRTCService } from './services/RTPWebRTCService';
|
|
4
3
|
export declare abstract class IRocosSDK {
|
|
5
4
|
abstract getService<T extends IBaseService>(name: ServiceEnum): T;
|
|
6
5
|
abstract getAuthService(): AuthService;
|
|
7
6
|
abstract getRobotService(): RobotService;
|
|
8
7
|
abstract getEventService(): EventService;
|
|
8
|
+
abstract getEnvironmentService(): EnvironmentService;
|
|
9
9
|
abstract getProjectService(): ProjectService;
|
|
10
10
|
abstract getTelemetryService(): TelemetryService;
|
|
11
11
|
abstract getCallerService(): CallerService;
|
|
@@ -14,7 +14,6 @@ export declare abstract class IRocosSDK {
|
|
|
14
14
|
abstract getSearchService(): SearchService;
|
|
15
15
|
abstract getConfigGroupService(): ConfigGroupService;
|
|
16
16
|
abstract getDashboardService(): DashboardService;
|
|
17
|
-
abstract getFunctionService(): FunctionService;
|
|
18
17
|
abstract getStreamService(): StreamService;
|
|
19
18
|
abstract getUserService(): UserService;
|
|
20
19
|
abstract getMapService(): MapService;
|
|
@@ -28,6 +27,8 @@ export declare abstract class IRocosSDK {
|
|
|
28
27
|
abstract getSpotProvisionerService(): SpotProvisioningService | SpotProvisioningServiceNode;
|
|
29
28
|
abstract getIntegrationService(): IntegrationService;
|
|
30
29
|
abstract getEvaluatorService(): EvaluatorService;
|
|
30
|
+
abstract getDeviceCredentialsService(): DeviceCredentialsService;
|
|
31
|
+
abstract getTargetService(): TargetService;
|
|
31
32
|
abstract cleanup(): Promise<boolean>;
|
|
32
33
|
abstract enableDebugMode(on: boolean): void;
|
|
33
34
|
abstract setDebugLevel(level: IDebugLevel): void;
|
package/esm/RocosSDK.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { AssetStorageService, AuthService, CallerService, CommandService, ConfigGroupService, ControlService, DashboardService, EvaluatorService, EventService, FileAccessorService,
|
|
1
|
+
import { AssetStorageService, AuthService, CallerService, CommandService, ConfigGroupService, ControlService, DashboardService, DeviceCredentialsService, EnvironmentService, EvaluatorService, EventService, FileAccessorService, IntegrationService, MapService, ProfileService, ProjectService, RTPWebRTCService, RobotService, ScheduleService, SearchService, SpotProvisioningService, StreamService, TargetService, TelemetryService, TimeSyncerService, UserService, WebRTCSignallingService, WorkflowService } from './services';
|
|
2
2
|
import { AuthorisedConfig, IBaseService, IDebugLevel, IRocosSDKConfig, ServiceEnum } from './models';
|
|
3
3
|
import { IRocosSDK } from './IRocosSDK';
|
|
4
4
|
import { Logger } from 'loglevel';
|
|
@@ -19,13 +19,17 @@ export declare class RocosSDK implements IRocosSDK {
|
|
|
19
19
|
*/
|
|
20
20
|
getService<T extends IBaseService>(name: ServiceEnum): T;
|
|
21
21
|
/**
|
|
22
|
-
*
|
|
22
|
+
* Gets the authentication service.
|
|
23
23
|
*/
|
|
24
24
|
getAuthService(): AuthService;
|
|
25
25
|
/**
|
|
26
26
|
* Gets the robot service.
|
|
27
27
|
*/
|
|
28
28
|
getRobotService(): RobotService;
|
|
29
|
+
/**
|
|
30
|
+
* Gets the event service.
|
|
31
|
+
*/
|
|
32
|
+
getEnvironmentService(): EnvironmentService;
|
|
29
33
|
/**
|
|
30
34
|
* Gets the event service.
|
|
31
35
|
*/
|
|
@@ -62,10 +66,6 @@ export declare class RocosSDK implements IRocosSDK {
|
|
|
62
66
|
* Gets the dashboard service
|
|
63
67
|
*/
|
|
64
68
|
getDashboardService(): DashboardService;
|
|
65
|
-
/**
|
|
66
|
-
* Gets the function service
|
|
67
|
-
*/
|
|
68
|
-
getFunctionService(): FunctionService;
|
|
69
69
|
/**
|
|
70
70
|
* Gets the stream service
|
|
71
71
|
*/
|
|
@@ -130,6 +130,16 @@ export declare class RocosSDK implements IRocosSDK {
|
|
|
130
130
|
* @returns EvaluatorService
|
|
131
131
|
*/
|
|
132
132
|
getEvaluatorService(): EvaluatorService;
|
|
133
|
+
/**
|
|
134
|
+
* Gets the device credentials service.
|
|
135
|
+
* @returns DeviceCredentialsService
|
|
136
|
+
*/
|
|
137
|
+
getDeviceCredentialsService(): DeviceCredentialsService;
|
|
138
|
+
/**
|
|
139
|
+
* Gets the asset service.
|
|
140
|
+
* @returns AssetService
|
|
141
|
+
*/
|
|
142
|
+
getTargetService(): TargetService;
|
|
133
143
|
get platformTimeOffset(): number;
|
|
134
144
|
get platformTime(): number;
|
|
135
145
|
/**
|
|
@@ -145,5 +155,7 @@ export declare class RocosSDK implements IRocosSDK {
|
|
|
145
155
|
*/
|
|
146
156
|
enableDebugMode(on: boolean): void;
|
|
147
157
|
setDebugLevel(level: IDebugLevel): void;
|
|
148
|
-
protected overrideConfig(service: ServiceEnum): AuthorisedConfig
|
|
158
|
+
protected overrideConfig(service: ServiceEnum): AuthorisedConfig & {
|
|
159
|
+
_parentConfig?: IRocosSDKConfig;
|
|
160
|
+
};
|
|
149
161
|
}
|
package/esm/RocosSDK.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { AssetStorageService, AuthService, CallerService, CommandService, ConfigGroupService, ControlService, DashboardService, EvaluatorService, EventService, FileAccessorService,
|
|
1
|
+
import { AssetStorageService, AuthService, CallerService, CommandService, ConfigGroupService, ControlService, DashboardService, DeviceCredentialsService, EnvironmentService, EvaluatorService, EventService, FileAccessorService, IntegrationService, MapService, PlatFormTimeService, ProfileService, ProjectService, RTPWebRTCService, RobotService, ScheduleService, SearchService, SpotProvisioningService, StreamService, TargetService, TelemetryService, TimeSyncerService, UserService, WebRTCSignallingService, WorkflowService, } from './services';
|
|
2
2
|
import { ServiceEnum } from './models';
|
|
3
3
|
import { RocosLogger } from './logger/RocosLogger';
|
|
4
4
|
import { RocosStore } from './store/RocosStore';
|
|
@@ -35,6 +35,9 @@ export class RocosSDK {
|
|
|
35
35
|
case ServiceEnum.ROBOT:
|
|
36
36
|
this.services[name] = new RobotService(config);
|
|
37
37
|
break;
|
|
38
|
+
case ServiceEnum.ENVIRONMENT:
|
|
39
|
+
this.services[name] = new EnvironmentService(config);
|
|
40
|
+
break;
|
|
38
41
|
case ServiceEnum.EVENT:
|
|
39
42
|
this.services[name] = new EventService(config);
|
|
40
43
|
break;
|
|
@@ -59,9 +62,6 @@ export class RocosSDK {
|
|
|
59
62
|
case ServiceEnum.DASHBOARD:
|
|
60
63
|
this.services[name] = new DashboardService(config);
|
|
61
64
|
break;
|
|
62
|
-
case ServiceEnum.FUNCTION:
|
|
63
|
-
this.services[name] = new FunctionService(config);
|
|
64
|
-
break;
|
|
65
65
|
case ServiceEnum.STREAM:
|
|
66
66
|
this.services[name] = new StreamService(config);
|
|
67
67
|
break;
|
|
@@ -104,13 +104,19 @@ export class RocosSDK {
|
|
|
104
104
|
case ServiceEnum.EVALUATOR:
|
|
105
105
|
this.services[name] = new EvaluatorService(config);
|
|
106
106
|
break;
|
|
107
|
+
case ServiceEnum.DEVICE_CREDENTIALS:
|
|
108
|
+
this.services[name] = new DeviceCredentialsService(config);
|
|
109
|
+
break;
|
|
110
|
+
case ServiceEnum.TARGET:
|
|
111
|
+
this.services[name] = new TargetService(config);
|
|
112
|
+
break;
|
|
107
113
|
}
|
|
108
114
|
}
|
|
109
115
|
this.logger.debug(`Found service ${name}.`);
|
|
110
116
|
return this.services[name];
|
|
111
117
|
}
|
|
112
118
|
/**
|
|
113
|
-
*
|
|
119
|
+
* Gets the authentication service.
|
|
114
120
|
*/
|
|
115
121
|
getAuthService() {
|
|
116
122
|
return this.getService(ServiceEnum.AUTH);
|
|
@@ -121,6 +127,12 @@ export class RocosSDK {
|
|
|
121
127
|
getRobotService() {
|
|
122
128
|
return this.getService(ServiceEnum.ROBOT);
|
|
123
129
|
}
|
|
130
|
+
/**
|
|
131
|
+
* Gets the event service.
|
|
132
|
+
*/
|
|
133
|
+
getEnvironmentService() {
|
|
134
|
+
return this.getService(ServiceEnum.ENVIRONMENT);
|
|
135
|
+
}
|
|
124
136
|
/**
|
|
125
137
|
* Gets the event service.
|
|
126
138
|
*/
|
|
@@ -175,12 +187,6 @@ export class RocosSDK {
|
|
|
175
187
|
getDashboardService() {
|
|
176
188
|
return this.getService(ServiceEnum.DASHBOARD);
|
|
177
189
|
}
|
|
178
|
-
/**
|
|
179
|
-
* Gets the function service
|
|
180
|
-
*/
|
|
181
|
-
getFunctionService() {
|
|
182
|
-
return this.getService(ServiceEnum.FUNCTION);
|
|
183
|
-
}
|
|
184
190
|
/**
|
|
185
191
|
* Gets the stream service
|
|
186
192
|
*/
|
|
@@ -273,6 +279,20 @@ export class RocosSDK {
|
|
|
273
279
|
getEvaluatorService() {
|
|
274
280
|
return this.getService(ServiceEnum.EVALUATOR);
|
|
275
281
|
}
|
|
282
|
+
/**
|
|
283
|
+
* Gets the device credentials service.
|
|
284
|
+
* @returns DeviceCredentialsService
|
|
285
|
+
*/
|
|
286
|
+
getDeviceCredentialsService() {
|
|
287
|
+
return this.getService(ServiceEnum.DEVICE_CREDENTIALS);
|
|
288
|
+
}
|
|
289
|
+
/**
|
|
290
|
+
* Gets the asset service.
|
|
291
|
+
* @returns AssetService
|
|
292
|
+
*/
|
|
293
|
+
getTargetService() {
|
|
294
|
+
return this.getService(ServiceEnum.TARGET);
|
|
295
|
+
}
|
|
276
296
|
get platformTimeOffset() {
|
|
277
297
|
return PlatFormTimeService.getInstance(this.getTimeSyncerService())?.platformTimeOffset;
|
|
278
298
|
}
|
|
@@ -319,6 +339,7 @@ export class RocosSDK {
|
|
|
319
339
|
return {
|
|
320
340
|
...config,
|
|
321
341
|
...this.config.overrides?.[service],
|
|
342
|
+
_parentConfig: this.config,
|
|
322
343
|
};
|
|
323
344
|
}
|
|
324
345
|
}
|
|
@@ -68,11 +68,14 @@ export class CallerStream extends CallerStreamAbstract {
|
|
|
68
68
|
return stringToUint8Array(payload);
|
|
69
69
|
}
|
|
70
70
|
getMetadata(projectId, callsign, subsystem) {
|
|
71
|
-
|
|
72
|
-
'authorization': this.token,
|
|
71
|
+
const meta = {
|
|
73
72
|
'r-p': projectId,
|
|
74
73
|
'r-cs': callsign,
|
|
75
74
|
'r-s': subsystem ?? '',
|
|
76
75
|
};
|
|
76
|
+
if (this.token) {
|
|
77
|
+
meta.authorization = this.token;
|
|
78
|
+
}
|
|
79
|
+
return meta;
|
|
77
80
|
}
|
|
78
81
|
}
|
|
@@ -109,7 +109,8 @@ export class CallerStreamNode extends CallerStreamAbstract {
|
|
|
109
109
|
meta.add('r-p', projectId);
|
|
110
110
|
meta.add('r-cs', callsign);
|
|
111
111
|
meta.add('r-s', subsystem ?? '');
|
|
112
|
-
|
|
112
|
+
if (this.token)
|
|
113
|
+
meta.add('authorization', this.token);
|
|
113
114
|
return meta;
|
|
114
115
|
}
|
|
115
116
|
}
|
|
@@ -58,10 +58,13 @@ export class CommandStream extends CommandStreamAbstract {
|
|
|
58
58
|
});
|
|
59
59
|
}
|
|
60
60
|
getMetadata(projectId, callsign) {
|
|
61
|
-
|
|
62
|
-
'authorization': this.token,
|
|
61
|
+
const meta = {
|
|
63
62
|
'r-p': projectId,
|
|
64
63
|
'r-cs': callsign,
|
|
65
64
|
};
|
|
65
|
+
if (this.token) {
|
|
66
|
+
meta.authorization = this.token;
|
|
67
|
+
}
|
|
68
|
+
return meta;
|
|
66
69
|
}
|
|
67
70
|
}
|
|
@@ -58,12 +58,13 @@ export class CommandStreamNode extends CommandStreamAbstract {
|
|
|
58
58
|
}
|
|
59
59
|
getMetadata(projectId, callsign, subsystem) {
|
|
60
60
|
const meta = new grpc.Metadata();
|
|
61
|
-
meta.add('authorization', this.token);
|
|
62
61
|
meta.add('r-p', projectId);
|
|
63
62
|
meta.add('r-cs', callsign);
|
|
64
63
|
if (subsystem) {
|
|
65
64
|
meta.add('r-s', subsystem);
|
|
66
65
|
}
|
|
66
|
+
if (this.token)
|
|
67
|
+
meta.add('authorization', this.token);
|
|
67
68
|
return meta;
|
|
68
69
|
}
|
|
69
70
|
}
|
|
@@ -67,10 +67,13 @@ export class ControlStream extends ControlStreamAbstract {
|
|
|
67
67
|
return stringToUint8Array(payload);
|
|
68
68
|
}
|
|
69
69
|
getMetadata(projectId, callsign) {
|
|
70
|
-
|
|
71
|
-
'authorization': this.token,
|
|
70
|
+
const meta = {
|
|
72
71
|
'r-p': projectId,
|
|
73
72
|
'r-cs': callsign,
|
|
74
73
|
};
|
|
74
|
+
if (this.token) {
|
|
75
|
+
meta.authorization = this.token;
|
|
76
|
+
}
|
|
77
|
+
return meta;
|
|
75
78
|
}
|
|
76
79
|
}
|
|
@@ -5,7 +5,7 @@ import { Logger } from 'loglevel';
|
|
|
5
5
|
export declare abstract class ControlStreamAbstract implements IControlStream {
|
|
6
6
|
identifier: string;
|
|
7
7
|
statusStream$: BehaviorSubject<SubscriberStatusEnum>;
|
|
8
|
-
protected token
|
|
8
|
+
protected token?: string;
|
|
9
9
|
private readonly scope;
|
|
10
10
|
protected url: string;
|
|
11
11
|
protected subscriberStatus: SubscriberStatusEnum;
|
|
@@ -65,9 +65,10 @@ export class ControlStreamNode extends ControlStreamAbstract {
|
|
|
65
65
|
}
|
|
66
66
|
getMetadata(projectId, callsign) {
|
|
67
67
|
const meta = new grpc.Metadata();
|
|
68
|
-
meta.add('authorization', this.token);
|
|
69
68
|
meta.add('r-p', projectId);
|
|
70
69
|
meta.add('r-cs', callsign);
|
|
70
|
+
if (this.token)
|
|
71
|
+
meta.add('authorization', this.token);
|
|
71
72
|
return meta;
|
|
72
73
|
}
|
|
73
74
|
}
|