@dronedeploy/rocos-js-sdk 3.0.1-alpha.8 → 3.0.1

Sign up to get free protection for your applications and to get access to all the features.
Files changed (378) hide show
  1. package/README.md +59 -29
  2. package/cjs/IRocosSDK.d.ts +4 -3
  3. package/cjs/RocosSDK.d.ts +19 -7
  4. package/cjs/RocosSDK.js +31 -10
  5. package/cjs/api/streams/caller/CallerStream.js +5 -2
  6. package/cjs/api/streams/caller/CallerStreamNode.js +2 -1
  7. package/cjs/api/streams/command/CommandStream.js +5 -2
  8. package/cjs/api/streams/command/CommandStreamNode.js +2 -1
  9. package/cjs/api/streams/control/ControlStream.js +5 -2
  10. package/cjs/api/streams/control/ControlStreamAbstract.d.ts +1 -1
  11. package/cjs/api/streams/control/ControlStreamNode.js +2 -1
  12. package/cjs/api/streams/fileAccessor/FileAccessorStream.js +4 -1
  13. package/cjs/api/streams/fileAccessor/FileAccessorStreamNode.js +3 -1
  14. package/cjs/api/streams/search/SearchStream.js +5 -2
  15. package/cjs/api/streams/search/SearchStreamNode.js +2 -1
  16. package/cjs/api/streams/telemetry/TelemetryStream.js +4 -1
  17. package/cjs/api/streams/telemetry/TelemetryStreamAbstract.d.ts +1 -1
  18. package/cjs/api/streams/telemetry/TelemetryStreamNode.js +2 -1
  19. package/cjs/api/streams/webRTCSignalling/WebRTCSignallingStream.js +5 -2
  20. package/cjs/constants/api.d.ts +31 -15
  21. package/cjs/constants/api.js +35 -18
  22. package/cjs/helpers/cleanObject.js +4 -1
  23. package/cjs/helpers/getUniqueConfigKey.d.ts +6 -2
  24. package/cjs/helpers/getUniqueConfigKey.js +7 -2
  25. package/cjs/helpers/index.d.ts +1 -0
  26. package/cjs/helpers/index.js +1 -0
  27. package/cjs/helpers/kscript/Context.d.ts +34 -0
  28. package/cjs/helpers/kscript/Context.js +52 -0
  29. package/cjs/helpers/kscript/index.d.ts +1 -0
  30. package/cjs/helpers/kscript/index.js +27 -0
  31. package/cjs/helpers/kscript/kscript.d.ts +6 -0
  32. package/cjs/helpers/kscript/kscript.js +115 -0
  33. package/cjs/helpers/kscript/nodes/Identifier.d.ts +12 -0
  34. package/cjs/helpers/kscript/nodes/Identifier.js +20 -0
  35. package/cjs/helpers/kscript/nodes/Literal.d.ts +11 -0
  36. package/cjs/helpers/kscript/nodes/Literal.js +22 -0
  37. package/cjs/helpers/kscript/nodes/Node.d.ts +9 -0
  38. package/cjs/helpers/kscript/nodes/Node.js +15 -0
  39. package/cjs/helpers/kscript/nodes/Program.d.ts +11 -0
  40. package/cjs/helpers/kscript/nodes/Program.js +24 -0
  41. package/cjs/helpers/kscript/nodes/TemplateLiteral.d.ts +23 -0
  42. package/cjs/helpers/kscript/nodes/TemplateLiteral.js +35 -0
  43. package/cjs/helpers/kscript/nodes/expressions/ArrayExpression.d.ts +7 -0
  44. package/cjs/helpers/kscript/nodes/expressions/ArrayExpression.js +31 -0
  45. package/cjs/helpers/kscript/nodes/expressions/ArrowFunctionExpression.d.ts +14 -0
  46. package/cjs/helpers/kscript/nodes/expressions/ArrowFunctionExpression.js +40 -0
  47. package/cjs/helpers/kscript/nodes/expressions/BinaryExpression.d.ts +16 -0
  48. package/cjs/helpers/kscript/nodes/expressions/BinaryExpression.js +104 -0
  49. package/cjs/helpers/kscript/nodes/expressions/CallExpression.d.ts +8 -0
  50. package/cjs/helpers/kscript/nodes/expressions/CallExpression.js +38 -0
  51. package/cjs/helpers/kscript/nodes/expressions/ChainExpression.d.ts +16 -0
  52. package/cjs/helpers/kscript/nodes/expressions/ChainExpression.js +25 -0
  53. package/cjs/helpers/kscript/nodes/expressions/ConditionalExpression.d.ts +14 -0
  54. package/cjs/helpers/kscript/nodes/expressions/ConditionalExpression.js +30 -0
  55. package/cjs/helpers/kscript/nodes/expressions/ExpressionStatement.d.ts +7 -0
  56. package/cjs/helpers/kscript/nodes/expressions/ExpressionStatement.js +18 -0
  57. package/cjs/helpers/kscript/nodes/expressions/LogicalExpression.d.ts +10 -0
  58. package/cjs/helpers/kscript/nodes/expressions/LogicalExpression.js +47 -0
  59. package/cjs/helpers/kscript/nodes/expressions/MemberExpression.d.ts +44 -0
  60. package/cjs/helpers/kscript/nodes/expressions/MemberExpression.js +98 -0
  61. package/cjs/helpers/kscript/nodes/expressions/ObjectExpression.d.ts +11 -0
  62. package/cjs/helpers/kscript/nodes/expressions/ObjectExpression.js +59 -0
  63. package/cjs/helpers/kscript/nodes/expressions/UnaryExpression.d.ts +12 -0
  64. package/cjs/helpers/kscript/nodes/expressions/UnaryExpression.js +44 -0
  65. package/cjs/helpers/kscript/nodes/expressions/index.d.ts +11 -0
  66. package/cjs/helpers/kscript/nodes/expressions/index.js +28 -0
  67. package/cjs/helpers/kscript/nodes/index.d.ts +4 -0
  68. package/cjs/helpers/kscript/nodes/index.js +10 -0
  69. package/cjs/helpers/kscript/nodes/nodeTypes.d.ts +33 -0
  70. package/cjs/helpers/kscript/nodes/nodeTypes.js +29 -0
  71. package/cjs/helpers/kscript/utils.d.ts +4 -0
  72. package/cjs/helpers/kscript/utils.js +15 -0
  73. package/cjs/helpers/websandbox/connection.d.ts +2 -1
  74. package/cjs/helpers/websandbox/connection.js +6 -5
  75. package/cjs/helpers/websandbox/frame/frame.js +4 -1
  76. package/cjs/helpers/websandbox/frame/frame.source.js +1 -1
  77. package/cjs/helpers/websandbox/frame/worker/manager.d.ts +8 -4
  78. package/cjs/helpers/websandbox/frame/worker/manager.js +32 -14
  79. package/cjs/helpers/websandbox/frame/worker/worker.source.js +1 -1
  80. package/cjs/helpers/websandbox/sandbox.d.ts +1 -1
  81. package/cjs/helpers/websandbox/sandbox.js +7 -7
  82. package/cjs/models/IConnectedCallsign.d.ts +10 -0
  83. package/cjs/models/IConnectedCallsign.js +8 -0
  84. package/cjs/models/RocosError.d.ts +3 -0
  85. package/cjs/models/RocosError.js +3 -0
  86. package/cjs/models/ServiceEnum.d.ts +20 -17
  87. package/cjs/models/ServiceEnum.js +20 -17
  88. package/cjs/models/TelemetryStatus.d.ts +12 -0
  89. package/cjs/models/TelemetryStatus.js +17 -0
  90. package/cjs/models/Token.d.ts +2 -2
  91. package/cjs/models/Token.js +5 -5
  92. package/cjs/models/asset-storage/{AssetModelItem.d.ts → AssetItem.d.ts} +2 -0
  93. package/cjs/models/asset-storage/SyncIntegrations.d.ts +1 -1
  94. package/cjs/models/device-credentials/DeviceCredentials.d.ts +61 -0
  95. package/cjs/models/device-credentials/DeviceCredentials.js +2 -0
  96. package/cjs/models/graph/Position.d.ts +6 -0
  97. package/cjs/models/graph/Position.js +2 -0
  98. package/cjs/models/graph/Quaternion.d.ts +6 -0
  99. package/cjs/models/graph/Quaternion.js +2 -0
  100. package/cjs/models/graph/Vector3.d.ts +5 -0
  101. package/cjs/models/graph/Vector3.js +2 -0
  102. package/cjs/models/graph/index.d.ts +3 -0
  103. package/cjs/models/graph/index.js +19 -0
  104. package/cjs/models/index.d.ts +9 -2
  105. package/cjs/models/index.js +9 -2
  106. package/cjs/models/integrations/Location.d.ts +24 -0
  107. package/cjs/models/integrations/Location.js +2 -0
  108. package/cjs/models/integrations/PaginatedResults.d.ts +4 -0
  109. package/cjs/models/integrations/PaginatedResults.js +2 -0
  110. package/cjs/models/maps/Panorama.d.ts +12 -21
  111. package/cjs/models/projects/ExternalProject.d.ts +10 -0
  112. package/cjs/models/projects/ExternalProject.js +2 -0
  113. package/cjs/models/projects/NewProjectRequest.d.ts +8 -0
  114. package/cjs/models/projects/NewProjectRequest.js +2 -0
  115. package/cjs/models/target/Target.d.ts +30 -0
  116. package/cjs/models/target/Target.js +15 -0
  117. package/cjs/node/RocosSDKNode.d.ts +1 -5
  118. package/cjs/node/RocosSDKNode.js +9 -9
  119. package/cjs/services/AssetStorageService.d.ts +19 -19
  120. package/cjs/services/AssetStorageService.js +20 -9
  121. package/cjs/services/AuthService.d.ts +12 -1
  122. package/cjs/services/AuthService.js +25 -1
  123. package/cjs/services/BaseServiceAbstract.d.ts +1 -1
  124. package/cjs/services/BaseServiceAbstract.js +2 -2
  125. package/cjs/services/DeviceCredentialsService.d.ts +15 -0
  126. package/cjs/services/DeviceCredentialsService.js +56 -0
  127. package/cjs/services/EnvironmentService.d.ts +28 -0
  128. package/cjs/services/EnvironmentService.js +48 -0
  129. package/cjs/services/EvaluatorService.js +1 -1
  130. package/cjs/services/IntegrationService.d.ts +7 -1
  131. package/cjs/services/IntegrationService.js +8 -0
  132. package/cjs/services/MapService.d.ts +18 -8
  133. package/cjs/services/MapService.js +37 -19
  134. package/cjs/services/ProfileService.d.ts +24 -0
  135. package/cjs/services/ProfileService.js +34 -0
  136. package/cjs/services/ProjectService.d.ts +7 -2
  137. package/cjs/services/ProjectService.js +7 -3
  138. package/cjs/services/RTPWebRTCService.d.ts +6 -1
  139. package/cjs/services/RTPWebRTCService.js +10 -2
  140. package/cjs/services/RobotService.d.ts +3 -1
  141. package/cjs/services/RobotService.js +6 -0
  142. package/cjs/services/SpotProvisioningService.d.ts +1 -1
  143. package/cjs/services/SpotProvisioningServiceNode.d.ts +1 -1
  144. package/cjs/services/TargetService.d.ts +16 -0
  145. package/cjs/services/TargetService.js +58 -0
  146. package/cjs/services/TelemetryService.d.ts +10 -1
  147. package/cjs/services/TelemetryService.js +27 -5
  148. package/cjs/services/WorkflowService.d.ts +18 -8
  149. package/cjs/services/WorkflowService.js +37 -11
  150. package/cjs/services/index.d.ts +11 -9
  151. package/cjs/services/index.js +11 -9
  152. package/cjs/store/RocosStore.d.ts +1 -2
  153. package/esm/IRocosSDK.d.ts +4 -3
  154. package/esm/RocosSDK.d.ts +19 -7
  155. package/esm/RocosSDK.js +32 -11
  156. package/esm/api/streams/caller/CallerStream.js +5 -2
  157. package/esm/api/streams/caller/CallerStreamNode.js +2 -1
  158. package/esm/api/streams/command/CommandStream.js +5 -2
  159. package/esm/api/streams/command/CommandStreamNode.js +2 -1
  160. package/esm/api/streams/control/ControlStream.js +5 -2
  161. package/esm/api/streams/control/ControlStreamAbstract.d.ts +1 -1
  162. package/esm/api/streams/control/ControlStreamNode.js +2 -1
  163. package/esm/api/streams/fileAccessor/FileAccessorStream.js +4 -1
  164. package/esm/api/streams/fileAccessor/FileAccessorStreamNode.js +3 -1
  165. package/esm/api/streams/search/SearchStream.js +5 -2
  166. package/esm/api/streams/search/SearchStreamNode.js +2 -1
  167. package/esm/api/streams/telemetry/TelemetryStream.js +4 -1
  168. package/esm/api/streams/telemetry/TelemetryStreamAbstract.d.ts +1 -1
  169. package/esm/api/streams/telemetry/TelemetryStreamNode.js +2 -1
  170. package/esm/api/streams/webRTCSignalling/WebRTCSignallingStream.js +5 -2
  171. package/esm/constants/api.d.ts +31 -15
  172. package/esm/constants/api.js +31 -15
  173. package/esm/helpers/cleanObject.js +4 -1
  174. package/esm/helpers/getUniqueConfigKey.d.ts +6 -2
  175. package/esm/helpers/getUniqueConfigKey.js +7 -2
  176. package/esm/helpers/index.d.ts +1 -0
  177. package/esm/helpers/index.js +1 -0
  178. package/esm/helpers/kscript/Context.d.ts +34 -0
  179. package/esm/helpers/kscript/Context.js +49 -0
  180. package/esm/helpers/kscript/index.d.ts +1 -0
  181. package/esm/helpers/kscript/index.js +1 -0
  182. package/esm/helpers/kscript/kscript.d.ts +6 -0
  183. package/esm/helpers/kscript/kscript.js +107 -0
  184. package/esm/helpers/kscript/nodes/Identifier.d.ts +12 -0
  185. package/esm/helpers/kscript/nodes/Identifier.js +14 -0
  186. package/esm/helpers/kscript/nodes/Literal.d.ts +11 -0
  187. package/esm/helpers/kscript/nodes/Literal.js +16 -0
  188. package/esm/helpers/kscript/nodes/Node.d.ts +9 -0
  189. package/esm/helpers/kscript/nodes/Node.js +12 -0
  190. package/esm/helpers/kscript/nodes/Program.d.ts +11 -0
  191. package/esm/helpers/kscript/nodes/Program.js +18 -0
  192. package/esm/helpers/kscript/nodes/TemplateLiteral.d.ts +23 -0
  193. package/esm/helpers/kscript/nodes/TemplateLiteral.js +29 -0
  194. package/esm/helpers/kscript/nodes/expressions/ArrayExpression.d.ts +7 -0
  195. package/esm/helpers/kscript/nodes/expressions/ArrayExpression.js +25 -0
  196. package/esm/helpers/kscript/nodes/expressions/ArrowFunctionExpression.d.ts +14 -0
  197. package/esm/helpers/kscript/nodes/expressions/ArrowFunctionExpression.js +34 -0
  198. package/esm/helpers/kscript/nodes/expressions/BinaryExpression.d.ts +16 -0
  199. package/esm/helpers/kscript/nodes/expressions/BinaryExpression.js +98 -0
  200. package/esm/helpers/kscript/nodes/expressions/CallExpression.d.ts +8 -0
  201. package/esm/helpers/kscript/nodes/expressions/CallExpression.js +32 -0
  202. package/esm/helpers/kscript/nodes/expressions/ChainExpression.d.ts +16 -0
  203. package/esm/helpers/kscript/nodes/expressions/ChainExpression.js +19 -0
  204. package/esm/helpers/kscript/nodes/expressions/ConditionalExpression.d.ts +14 -0
  205. package/esm/helpers/kscript/nodes/expressions/ConditionalExpression.js +24 -0
  206. package/esm/helpers/kscript/nodes/expressions/ExpressionStatement.d.ts +7 -0
  207. package/esm/helpers/kscript/nodes/expressions/ExpressionStatement.js +12 -0
  208. package/esm/helpers/kscript/nodes/expressions/LogicalExpression.d.ts +10 -0
  209. package/esm/helpers/kscript/nodes/expressions/LogicalExpression.js +41 -0
  210. package/esm/helpers/kscript/nodes/expressions/MemberExpression.d.ts +44 -0
  211. package/esm/helpers/kscript/nodes/expressions/MemberExpression.js +92 -0
  212. package/esm/helpers/kscript/nodes/expressions/ObjectExpression.d.ts +11 -0
  213. package/esm/helpers/kscript/nodes/expressions/ObjectExpression.js +53 -0
  214. package/esm/helpers/kscript/nodes/expressions/UnaryExpression.d.ts +12 -0
  215. package/esm/helpers/kscript/nodes/expressions/UnaryExpression.js +38 -0
  216. package/esm/helpers/kscript/nodes/expressions/index.d.ts +11 -0
  217. package/esm/helpers/kscript/nodes/expressions/index.js +11 -0
  218. package/esm/helpers/kscript/nodes/index.d.ts +4 -0
  219. package/esm/helpers/kscript/nodes/index.js +3 -0
  220. package/esm/helpers/kscript/nodes/nodeTypes.d.ts +33 -0
  221. package/esm/helpers/kscript/nodes/nodeTypes.js +24 -0
  222. package/esm/helpers/kscript/utils.d.ts +4 -0
  223. package/esm/helpers/kscript/utils.js +11 -0
  224. package/esm/helpers/websandbox/connection.d.ts +2 -1
  225. package/esm/helpers/websandbox/connection.js +6 -5
  226. package/esm/helpers/websandbox/frame/frame.js +4 -1
  227. package/esm/helpers/websandbox/frame/frame.source.js +1 -1
  228. package/esm/helpers/websandbox/frame/worker/manager.d.ts +8 -4
  229. package/esm/helpers/websandbox/frame/worker/manager.js +32 -14
  230. package/esm/helpers/websandbox/frame/worker/worker.source.js +1 -1
  231. package/esm/helpers/websandbox/sandbox.d.ts +1 -1
  232. package/esm/helpers/websandbox/sandbox.js +7 -7
  233. package/esm/models/IConnectedCallsign.d.ts +10 -0
  234. package/esm/models/IConnectedCallsign.js +5 -0
  235. package/esm/models/RocosError.d.ts +3 -0
  236. package/esm/models/RocosError.js +3 -0
  237. package/esm/models/ServiceEnum.d.ts +20 -17
  238. package/esm/models/ServiceEnum.js +20 -17
  239. package/esm/models/TelemetryStatus.d.ts +12 -0
  240. package/esm/models/TelemetryStatus.js +14 -0
  241. package/esm/models/Token.d.ts +2 -2
  242. package/esm/models/Token.js +5 -5
  243. package/esm/models/asset-storage/{AssetModelItem.d.ts → AssetItem.d.ts} +2 -0
  244. package/esm/models/asset-storage/SyncIntegrations.d.ts +1 -1
  245. package/esm/models/device-credentials/DeviceCredentials.d.ts +61 -0
  246. package/esm/models/graph/Position.d.ts +6 -0
  247. package/esm/models/graph/Quaternion.d.ts +6 -0
  248. package/esm/models/graph/Vector3.d.ts +5 -0
  249. package/esm/models/graph/index.d.ts +3 -0
  250. package/esm/models/graph/index.js +3 -0
  251. package/esm/models/index.d.ts +9 -2
  252. package/esm/models/index.js +9 -2
  253. package/esm/models/integrations/Location.d.ts +24 -0
  254. package/esm/models/integrations/PaginatedResults.d.ts +4 -0
  255. package/esm/models/maps/Panorama.d.ts +12 -21
  256. package/esm/models/projects/ExternalProject.d.ts +10 -0
  257. package/esm/models/projects/NewProjectRequest.d.ts +8 -0
  258. package/esm/models/target/Target.d.ts +30 -0
  259. package/esm/models/target/Target.js +9 -0
  260. package/esm/node/RocosSDKNode.d.ts +1 -5
  261. package/esm/node/RocosSDKNode.js +10 -10
  262. package/esm/services/AssetStorageService.d.ts +19 -19
  263. package/esm/services/AssetStorageService.js +20 -9
  264. package/esm/services/AuthService.d.ts +12 -1
  265. package/esm/services/AuthService.js +25 -1
  266. package/esm/services/BaseServiceAbstract.d.ts +1 -1
  267. package/esm/services/BaseServiceAbstract.js +3 -3
  268. package/esm/services/DeviceCredentialsService.d.ts +15 -0
  269. package/esm/services/DeviceCredentialsService.js +52 -0
  270. package/esm/services/EnvironmentService.d.ts +28 -0
  271. package/esm/services/EnvironmentService.js +44 -0
  272. package/esm/services/EvaluatorService.js +1 -1
  273. package/esm/services/IntegrationService.d.ts +7 -1
  274. package/esm/services/IntegrationService.js +10 -2
  275. package/esm/services/MapService.d.ts +18 -8
  276. package/esm/services/MapService.js +38 -20
  277. package/esm/services/ProfileService.d.ts +24 -0
  278. package/esm/services/ProfileService.js +35 -1
  279. package/esm/services/ProjectService.d.ts +7 -2
  280. package/esm/services/ProjectService.js +9 -5
  281. package/esm/services/RTPWebRTCService.d.ts +6 -1
  282. package/esm/services/RTPWebRTCService.js +10 -2
  283. package/esm/services/RobotService.d.ts +3 -1
  284. package/esm/services/RobotService.js +8 -2
  285. package/esm/services/SpotProvisioningService.d.ts +1 -1
  286. package/esm/services/SpotProvisioningServiceNode.d.ts +1 -1
  287. package/esm/services/TargetService.d.ts +16 -0
  288. package/esm/services/TargetService.js +54 -0
  289. package/esm/services/TelemetryService.d.ts +10 -1
  290. package/esm/services/TelemetryService.js +28 -6
  291. package/esm/services/WorkflowService.d.ts +18 -8
  292. package/esm/services/WorkflowService.js +38 -12
  293. package/esm/services/index.d.ts +11 -9
  294. package/esm/services/index.js +11 -9
  295. package/esm/store/RocosStore.d.ts +1 -2
  296. package/package.json +2 -2
  297. package/cjs/helpers/cleanObject.spec.js +0 -55
  298. package/cjs/helpers/flattenObject.spec.js +0 -31
  299. package/cjs/helpers/flattenOneOf.spec.js +0 -159
  300. package/cjs/helpers/formatServiceUrl.spec.js +0 -18
  301. package/cjs/helpers/getSha256Hex.spec.js +0 -19
  302. package/cjs/helpers/getSha256HexNode.spec.js +0 -10
  303. package/cjs/helpers/getURLSearchParams.spec.js +0 -21
  304. package/cjs/helpers/nanosecondToMillisecond.spec.js +0 -22
  305. package/cjs/helpers/splitRobotTopic.spec.js +0 -53
  306. package/cjs/helpers/standardDeviation.spec.d.ts +0 -1
  307. package/cjs/helpers/standardDeviation.spec.js +0 -13
  308. package/cjs/helpers/websandbox/frame/worker/manager.spec.d.ts +0 -4
  309. package/cjs/helpers/websandbox/frame/worker/manager.spec.js +0 -132
  310. package/cjs/models/CallsignStatus.d.ts +0 -6
  311. package/cjs/models/CallsignStatus.js +0 -10
  312. package/cjs/models/ExternalProject.d.ts +0 -6
  313. package/cjs/models/ExternalProject.js +0 -6
  314. package/cjs/models/Token.spec.d.ts +0 -1
  315. package/cjs/models/Token.spec.js +0 -110
  316. package/cjs/services/AuthService.spec.d.ts +0 -1
  317. package/cjs/services/AuthService.spec.js +0 -165
  318. package/cjs/services/CallerService.spec.d.ts +0 -1
  319. package/cjs/services/CallerService.spec.js +0 -229
  320. package/cjs/services/FunctionService.d.ts +0 -68
  321. package/cjs/services/FunctionService.js +0 -103
  322. package/cjs/services/PlatformTimeService.spec.d.ts +0 -1
  323. package/cjs/services/PlatformTimeService.spec.js +0 -182
  324. package/cjs/services/RTPWebRTCService.spec.d.ts +0 -4
  325. package/cjs/services/RTPWebRTCService.spec.js +0 -171
  326. package/cjs/services/TelemetryService.spec.d.ts +0 -1
  327. package/cjs/services/TelemetryService.spec.js +0 -39
  328. package/esm/helpers/cleanObject.spec.d.ts +0 -1
  329. package/esm/helpers/cleanObject.spec.js +0 -53
  330. package/esm/helpers/flattenObject.spec.d.ts +0 -1
  331. package/esm/helpers/flattenObject.spec.js +0 -29
  332. package/esm/helpers/flattenOneOf.spec.d.ts +0 -1
  333. package/esm/helpers/flattenOneOf.spec.js +0 -157
  334. package/esm/helpers/formatServiceUrl.spec.d.ts +0 -1
  335. package/esm/helpers/formatServiceUrl.spec.js +0 -16
  336. package/esm/helpers/getSha256Hex.spec.d.ts +0 -1
  337. package/esm/helpers/getSha256Hex.spec.js +0 -14
  338. package/esm/helpers/getSha256HexNode.spec.d.ts +0 -1
  339. package/esm/helpers/getSha256HexNode.spec.js +0 -8
  340. package/esm/helpers/getURLSearchParams.spec.d.ts +0 -1
  341. package/esm/helpers/getURLSearchParams.spec.js +0 -19
  342. package/esm/helpers/nanosecondToMillisecond.spec.d.ts +0 -1
  343. package/esm/helpers/nanosecondToMillisecond.spec.js +0 -20
  344. package/esm/helpers/splitRobotTopic.spec.d.ts +0 -1
  345. package/esm/helpers/splitRobotTopic.spec.js +0 -51
  346. package/esm/helpers/standardDeviation.spec.d.ts +0 -1
  347. package/esm/helpers/standardDeviation.spec.js +0 -11
  348. package/esm/helpers/websandbox/frame/worker/manager.spec.d.ts +0 -4
  349. package/esm/helpers/websandbox/frame/worker/manager.spec.js +0 -127
  350. package/esm/models/CallsignStatus.d.ts +0 -6
  351. package/esm/models/CallsignStatus.js +0 -7
  352. package/esm/models/ExternalProject.d.ts +0 -6
  353. package/esm/models/ExternalProject.js +0 -2
  354. package/esm/models/Token.spec.d.ts +0 -1
  355. package/esm/models/Token.spec.js +0 -108
  356. package/esm/models/asset-storage/AssetModelItem.js +0 -1
  357. package/esm/services/AuthService.spec.d.ts +0 -1
  358. package/esm/services/AuthService.spec.js +0 -163
  359. package/esm/services/CallerService.spec.d.ts +0 -1
  360. package/esm/services/CallerService.spec.js +0 -227
  361. package/esm/services/FunctionService.d.ts +0 -68
  362. package/esm/services/FunctionService.js +0 -99
  363. package/esm/services/PlatformTimeService.spec.d.ts +0 -1
  364. package/esm/services/PlatformTimeService.spec.js +0 -180
  365. package/esm/services/RTPWebRTCService.spec.d.ts +0 -4
  366. package/esm/services/RTPWebRTCService.spec.js +0 -169
  367. package/esm/services/TelemetryService.spec.d.ts +0 -1
  368. package/esm/services/TelemetryService.spec.js +0 -37
  369. /package/cjs/models/asset-storage/{AssetModelItem.js → AssetItem.js} +0 -0
  370. /package/{cjs/helpers/cleanObject.spec.d.ts → esm/models/asset-storage/AssetItem.js} +0 -0
  371. /package/{cjs/helpers/flattenObject.spec.d.ts → esm/models/device-credentials/DeviceCredentials.js} +0 -0
  372. /package/{cjs/helpers/flattenOneOf.spec.d.ts → esm/models/graph/Position.js} +0 -0
  373. /package/{cjs/helpers/formatServiceUrl.spec.d.ts → esm/models/graph/Quaternion.js} +0 -0
  374. /package/{cjs/helpers/getSha256Hex.spec.d.ts → esm/models/graph/Vector3.js} +0 -0
  375. /package/{cjs/helpers/getSha256HexNode.spec.d.ts → esm/models/integrations/Location.js} +0 -0
  376. /package/{cjs/helpers/getURLSearchParams.spec.d.ts → esm/models/integrations/PaginatedResults.js} +0 -0
  377. /package/{cjs/helpers/nanosecondToMillisecond.spec.d.ts → esm/models/projects/ExternalProject.js} +0 -0
  378. /package/{cjs/helpers/splitRobotTopic.spec.d.ts → esm/models/projects/NewProjectRequest.js} +0 -0
package/README.md CHANGED
@@ -5,41 +5,70 @@ Javascript SDK for interacting with the Rocos platform.
5
5
  In order to use the SDK with node, you must be using node version 18.13 or higher.
6
6
 
7
7
  ## Installation
8
-
9
- Add a .npmrc to your project, in the same directory as your package.json
10
-
11
- ```bash
12
- @team-rocos:registry=https://npm.pkg.github.com
13
- ```
14
-
15
- Then install the package with npm
8
+ Install the package with npm
16
9
 
17
10
  ```bash
18
- npm install @team-rocos/rocos-js-sdk
11
+ npm install @dronedeploy/rocos-js-sdk
19
12
  ```
20
13
 
21
14
  or yarn
22
15
 
23
16
  ```bash
24
- yarn add @team-rocos/rocos-js-sdk rxjs@^7
17
+ yarn add @dronedeploy/rocos-js-sdk rxjs@^7
25
18
  ```
26
- ## What's New?
27
19
 
28
- ### 3.0.0
29
-
30
- *Breaking Changes*
31
- * `IToken` interface changes
32
- * `created` is now `issuedAt` and is a `Date` object instead of a `string`
33
- * `expiresIn` is now `expires` and is a `Date` object instead of a `number`
34
- * `Token` class is now only functional for JWT tokens
20
+ ## What's new
21
+
22
+ ### 3.0.1
23
+
24
+ #### Breaking Changes
25
+ * Change the protobuf generation to use the [protobuf-ts](https://github.com/timostamm/protobuf-ts) package instead of [protobuf-javascript](https://github.com/protocolbuffers/protobuf-javascript).
26
+ * No longer uses `@improbable-eng/grpc-web` implementation of the gRPC-web client.
27
+ * *CallerService*
28
+ * change `CallerService.invokeRequest` responses to be UTF-8 encoded UInt8Arrays instead of base64 encoded strings.
29
+ * change array field names to remove the `List` suffix.
30
+ * `IRocosCallerMessageResponses.responsesList` -> `IRocosCallerMessageResponses.responses`
31
+ * `IRocosCallerMessageChunks.rowsList` -> `IRocosCallerMessageChunks.rows`
32
+ * split `IRocosCallerMessageResponseReturn.header.created` field into `createdAt` and `createdNs` fields
33
+ * `createdAt` is a `Date` object representing the time the message was created, with millisecond precision.
34
+ * `createdNs` is a `string` representing the time the message was created, with nanosecond precision. You can use this with the `BigInt` constructor to get a `BigInt` representation of the time.
35
+ * *RTPWebRTCService*
36
+ * refactor the following functions to return a promise, rather than using a callback:
37
+ * `WebRTCSignallingStream.offerConnection()`
38
+ * `WebRTCSignallingStream.getDetails()`
39
+ * `WebRTCSignallingStream.addIceCandidate()`
40
+ * split the stream interface `IWebRTCSignallingResponseStream.on(type, handler)` into `onMessage(handler)`, `onError(handler)`, and `onComplete(handler)`.
41
+ * *MapService*
42
+ * Removed `initDB` method
43
+ * Changed `copyFromRobot` method to `sendToCloud`
44
+ * changed `copyFromCloud` method to `copy`
45
+ * *FileAccessorService*
46
+ * Removed `uploadFile` method
47
+ * *AuthService*
48
+ * Removed the ability to login with a username and password. Only api keys or tokens are supported now.
49
+ * Tokens are now checked for validity before being used
50
+ * `IToken` interface changes
51
+ * `created` is now `issuedAt` and is a `Date` object instead of a `string`
52
+ * `expiresIn` is now `expires` and is a `Date` object instead of a `number`
35
53
  * Logging in and signing up with email and password has been removed
36
54
  * Resetting password has been removed
37
-
38
- *New Features*
39
- * NodeJS requirement has been dropped, so that the SDK can be used in the browser regardless of node version. When using node SDK, you must be using node version 18.13 or higher.
40
- * `AuthService` now supports `refreshToken` method to refresh the access token
41
- * Auth Token will now be refreshed automatically when it expires
42
-
55
+ * *WorkflowService*
56
+ * Renamed `getDeployedOnRobot` to `getDeployedWorkflow`
57
+ * Renamed `listDeployedOnRobot` to `list`
58
+ * *Utils*
59
+ * Removed `generateUUID` method
60
+ * Refactor `Token` class
61
+ * `expiresIn: number` -> `expires?: Date`
62
+ * `created: string` -> `issuedAt?: Date`
63
+ * Removed unused math utility functions
64
+
65
+ #### Removed
66
+ - **Breaking:** remove `FileAccessorService.uploadFile`
67
+ - **Breaking:** remove the ability to authenticate using a username and password. Only API keys and tokens are supported now.
68
+ - **Breaking:** remove unused math utility functions
69
+
70
+ #### Fixed
71
+ - 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.__
43
72
 
44
73
  ### 2.6.1
45
74
 
@@ -48,7 +77,7 @@ yarn add @team-rocos/rocos-js-sdk rxjs@^7
48
77
  ### 2.6.0
49
78
 
50
79
  * Change `rxjs` dependency to a peer dependency (support for `^6.6.6 || ^7.0.0`)
51
- - If you are using `yarn` you may need to add `rxjs` to your dependencies
80
+ - If you are using `yarn` you may need to add `rxjs` to your dependencies
52
81
 
53
82
  ### 2.4.0
54
83
 
@@ -80,9 +109,9 @@ yarn add @team-rocos/rocos-js-sdk rxjs@^7
80
109
  * Updating base class for all REST requests to go via fetch instead of axios
81
110
  * Remove unused dependencies `source-map-loader`, `ts-loader`, `axios`
82
111
  * Mark certain auth methods as deprecated in AuthService
83
- * `login` Login with email and password.
84
- * `signup`
85
- * `resetPassword`
112
+ * `login` Login with email and password.
113
+ * `signup`
114
+ * `resetPassword`
86
115
  * Deleted legacy services, these services are prefixed with BC, e.g. `BCRocosClient`
87
116
  * Updated outdated dependencies in the Angular demo application
88
117
 
@@ -93,7 +122,7 @@ yarn add @team-rocos/rocos-js-sdk rxjs@^7
93
122
 
94
123
  ### 1.19.0
95
124
 
96
- New method added to the `IntegrationService` to create a new issue in the current location.
125
+ New method added to the `IntegrationService` to create a new issue in the current location.
97
126
 
98
127
  * createIssue - Creates a new issue in a specific location on the latest map plan
99
128
 
@@ -106,3 +135,4 @@ This can be retrieved by getIntegrationService(). Available methods:
106
135
  * getPlans - Gets a list of plans
107
136
  * getPlanById - Retrieves a specific plan with the tiled layer that can be used to render meshes, point clouds, or tiled maps
108
137
  * getWMTS - Returns WMTS tiles that can be rendered in tools such as mapbox if your project has WMTS feature enabled)
138
+
@@ -1,11 +1,11 @@
1
- import { AssetStorageService, AuthService, CallerService, CommandService, ConfigGroupService, ControlService, DashboardService, EvaluatorService, EventService, FileAccessorService, FunctionService, IntegrationService, MapService, ProfileService, ProjectService, RobotService, SearchService, SpotProvisioningService, SpotProvisioningServiceNode, StreamService, TelemetryService, TimeSyncerService, UserService, WebRTCSignallingService, WorkflowService } from './services';
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/cjs/RocosSDK.d.ts CHANGED
@@ -1,4 +1,4 @@
1
- import { AssetStorageService, AuthService, CallerService, CommandService, ConfigGroupService, ControlService, DashboardService, EvaluatorService, EventService, FileAccessorService, FunctionService, IntegrationService, MapService, ProfileService, ProjectService, RTPWebRTCService, RobotService, ScheduleService, SearchService, SpotProvisioningService, StreamService, TelemetryService, TimeSyncerService, UserService, WebRTCSignallingService, WorkflowService } from './services';
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
- * GEts the authentication service.
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/cjs/RocosSDK.js CHANGED
@@ -38,6 +38,9 @@ class RocosSDK {
38
38
  case models_1.ServiceEnum.ROBOT:
39
39
  this.services[name] = new services_1.RobotService(config);
40
40
  break;
41
+ case models_1.ServiceEnum.ENVIRONMENT:
42
+ this.services[name] = new services_1.EnvironmentService(config);
43
+ break;
41
44
  case models_1.ServiceEnum.EVENT:
42
45
  this.services[name] = new services_1.EventService(config);
43
46
  break;
@@ -62,9 +65,6 @@ class RocosSDK {
62
65
  case models_1.ServiceEnum.DASHBOARD:
63
66
  this.services[name] = new services_1.DashboardService(config);
64
67
  break;
65
- case models_1.ServiceEnum.FUNCTION:
66
- this.services[name] = new services_1.FunctionService(config);
67
- break;
68
68
  case models_1.ServiceEnum.STREAM:
69
69
  this.services[name] = new services_1.StreamService(config);
70
70
  break;
@@ -107,13 +107,19 @@ class RocosSDK {
107
107
  case models_1.ServiceEnum.EVALUATOR:
108
108
  this.services[name] = new services_1.EvaluatorService(config);
109
109
  break;
110
+ case models_1.ServiceEnum.DEVICE_CREDENTIALS:
111
+ this.services[name] = new services_1.DeviceCredentialsService(config);
112
+ break;
113
+ case models_1.ServiceEnum.TARGET:
114
+ this.services[name] = new services_1.TargetService(config);
115
+ break;
110
116
  }
111
117
  }
112
118
  this.logger.debug(`Found service ${name}.`);
113
119
  return this.services[name];
114
120
  }
115
121
  /**
116
- * GEts the authentication service.
122
+ * Gets the authentication service.
117
123
  */
118
124
  getAuthService() {
119
125
  return this.getService(models_1.ServiceEnum.AUTH);
@@ -124,6 +130,12 @@ class RocosSDK {
124
130
  getRobotService() {
125
131
  return this.getService(models_1.ServiceEnum.ROBOT);
126
132
  }
133
+ /**
134
+ * Gets the event service.
135
+ */
136
+ getEnvironmentService() {
137
+ return this.getService(models_1.ServiceEnum.ENVIRONMENT);
138
+ }
127
139
  /**
128
140
  * Gets the event service.
129
141
  */
@@ -178,12 +190,6 @@ class RocosSDK {
178
190
  getDashboardService() {
179
191
  return this.getService(models_1.ServiceEnum.DASHBOARD);
180
192
  }
181
- /**
182
- * Gets the function service
183
- */
184
- getFunctionService() {
185
- return this.getService(models_1.ServiceEnum.FUNCTION);
186
- }
187
193
  /**
188
194
  * Gets the stream service
189
195
  */
@@ -276,6 +282,20 @@ class RocosSDK {
276
282
  getEvaluatorService() {
277
283
  return this.getService(models_1.ServiceEnum.EVALUATOR);
278
284
  }
285
+ /**
286
+ * Gets the device credentials service.
287
+ * @returns DeviceCredentialsService
288
+ */
289
+ getDeviceCredentialsService() {
290
+ return this.getService(models_1.ServiceEnum.DEVICE_CREDENTIALS);
291
+ }
292
+ /**
293
+ * Gets the asset service.
294
+ * @returns AssetService
295
+ */
296
+ getTargetService() {
297
+ return this.getService(models_1.ServiceEnum.TARGET);
298
+ }
279
299
  get platformTimeOffset() {
280
300
  return services_1.PlatFormTimeService.getInstance(this.getTimeSyncerService())?.platformTimeOffset;
281
301
  }
@@ -322,6 +342,7 @@ class RocosSDK {
322
342
  return {
323
343
  ...config,
324
344
  ...this.config.overrides?.[service],
345
+ _parentConfig: this.config,
325
346
  };
326
347
  }
327
348
  }
@@ -71,12 +71,15 @@ class CallerStream extends CallerStreamAbstract_1.CallerStreamAbstract {
71
71
  return (0, stringToUint8Array_1.stringToUint8Array)(payload);
72
72
  }
73
73
  getMetadata(projectId, callsign, subsystem) {
74
- return {
75
- 'authorization': this.token,
74
+ const meta = {
76
75
  'r-p': projectId,
77
76
  'r-cs': callsign,
78
77
  'r-s': subsystem ?? '',
79
78
  };
79
+ if (this.token) {
80
+ meta.authorization = this.token;
81
+ }
82
+ return meta;
80
83
  }
81
84
  }
82
85
  exports.CallerStream = CallerStream;
@@ -135,7 +135,8 @@ class CallerStreamNode extends CallerStreamAbstract_1.CallerStreamAbstract {
135
135
  meta.add('r-p', projectId);
136
136
  meta.add('r-cs', callsign);
137
137
  meta.add('r-s', subsystem ?? '');
138
- meta.add('authorization', this.token);
138
+ if (this.token)
139
+ meta.add('authorization', this.token);
139
140
  return meta;
140
141
  }
141
142
  }
@@ -61,11 +61,14 @@ class CommandStream extends CommandStreamAbstract_1.CommandStreamAbstract {
61
61
  });
62
62
  }
63
63
  getMetadata(projectId, callsign) {
64
- return {
65
- 'authorization': this.token,
64
+ const meta = {
66
65
  'r-p': projectId,
67
66
  'r-cs': callsign,
68
67
  };
68
+ if (this.token) {
69
+ meta.authorization = this.token;
70
+ }
71
+ return meta;
69
72
  }
70
73
  }
71
74
  exports.CommandStream = CommandStream;
@@ -84,12 +84,13 @@ class CommandStreamNode extends CommandStreamAbstract_1.CommandStreamAbstract {
84
84
  }
85
85
  getMetadata(projectId, callsign, subsystem) {
86
86
  const meta = new grpc.Metadata();
87
- meta.add('authorization', this.token);
88
87
  meta.add('r-p', projectId);
89
88
  meta.add('r-cs', callsign);
90
89
  if (subsystem) {
91
90
  meta.add('r-s', subsystem);
92
91
  }
92
+ if (this.token)
93
+ meta.add('authorization', this.token);
93
94
  return meta;
94
95
  }
95
96
  }
@@ -70,11 +70,14 @@ class ControlStream extends ControlStreamAbstract_1.ControlStreamAbstract {
70
70
  return (0, stringToUint8Array_1.stringToUint8Array)(payload);
71
71
  }
72
72
  getMetadata(projectId, callsign) {
73
- return {
74
- 'authorization': this.token,
73
+ const meta = {
75
74
  'r-p': projectId,
76
75
  'r-cs': callsign,
77
76
  };
77
+ if (this.token) {
78
+ meta.authorization = this.token;
79
+ }
80
+ return meta;
78
81
  }
79
82
  }
80
83
  exports.ControlStream = ControlStream;
@@ -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: string;
8
+ protected token?: string;
9
9
  private readonly scope;
10
10
  protected url: string;
11
11
  protected subscriberStatus: SubscriberStatusEnum;
@@ -91,9 +91,10 @@ class ControlStreamNode extends ControlStreamAbstract_1.ControlStreamAbstract {
91
91
  }
92
92
  getMetadata(projectId, callsign) {
93
93
  const meta = new grpc.Metadata();
94
- meta.add('authorization', this.token);
95
94
  meta.add('r-p', projectId);
96
95
  meta.add('r-cs', callsign);
96
+ if (this.token)
97
+ meta.add('authorization', this.token);
97
98
  return meta;
98
99
  }
99
100
  }
@@ -51,7 +51,10 @@ class FileAccessorStream extends FileAccessorStreamAbstract_1.FileAccessorStream
51
51
  throw new Error('Error in serverReqOp call');
52
52
  }
53
53
  getMetadata(projectId, callsign) {
54
- const result = { authorization: this.token };
54
+ const result = {};
55
+ if (this.token) {
56
+ result.authorization = this.token;
57
+ }
55
58
  if (projectId) {
56
59
  result['r-p'] = projectId;
57
60
  }
@@ -80,7 +80,9 @@ class FileAccessorStreamNode extends FileAccessorStreamAbstract_1.FileAccessorSt
80
80
  }
81
81
  getMetadata(projectId, callsign) {
82
82
  const meta = new grpc.Metadata();
83
- meta.add('authorization', this.token);
83
+ if (this.token) {
84
+ meta.add('authorization', this.token);
85
+ }
84
86
  if (projectId) {
85
87
  meta.add('r-p', projectId);
86
88
  }
@@ -92,10 +92,13 @@ class SearchStream extends SearchStreamAbstract_1.SearchStreamAbstract {
92
92
  return response;
93
93
  }
94
94
  getMetadata(projectId) {
95
- return {
96
- 'authorization': this.token,
95
+ const meta = {
97
96
  'r-p': projectId,
98
97
  };
98
+ if (this.token) {
99
+ meta.authorization = this.token;
100
+ }
101
+ return meta;
99
102
  }
100
103
  }
101
104
  exports.SearchStream = SearchStream;
@@ -137,8 +137,9 @@ class SearchStreamNode extends SearchStreamAbstract_1.SearchStreamAbstract {
137
137
  }
138
138
  getMetadata(projectId) {
139
139
  const meta = new grpc.Metadata();
140
- meta.add('authorization', this.token);
141
140
  meta.add('r-p', projectId);
141
+ if (this.token)
142
+ meta.add('authorization', this.token);
142
143
  return meta;
143
144
  }
144
145
  }
@@ -65,7 +65,10 @@ class TelemetryStream extends TelemetryStreamAbstract_1.TelemetryStreamAbstract
65
65
  }
66
66
  }
67
67
  getMetadata(projectId) {
68
- const result = { authorization: this.token };
68
+ const result = {};
69
+ if (this.token) {
70
+ result.authorization = this.token;
71
+ }
69
72
  if (projectId) {
70
73
  result['r-p'] = projectId;
71
74
  }
@@ -11,7 +11,7 @@ export declare abstract class TelemetryStreamAbstract implements ITelemetryStrea
11
11
  protected projectId: string;
12
12
  private callsignsLookup;
13
13
  private sources;
14
- protected token: string;
14
+ protected token?: string;
15
15
  private scope;
16
16
  protected url: string;
17
17
  private timerIntervalInSec;
@@ -129,10 +129,11 @@ class TelemetryStreamNode extends TelemetryStreamAbstract_1.TelemetryStreamAbstr
129
129
  }
130
130
  getMetaData() {
131
131
  const meta = new grpc.Metadata();
132
- meta.add('authorization', this.token);
133
132
  meta.add('r-p', this.projectId);
134
133
  meta.add('r-tid', (0, uuid_1.v4)());
135
134
  meta.add('r-cs', 'rocos-js-sdk-agent');
135
+ if (this.token)
136
+ meta.add('authorization', this.token);
136
137
  return meta;
137
138
  }
138
139
  requestTelemetry(req) {
@@ -80,10 +80,13 @@ class WebRTCSignallingStream extends WebRTCSignallingStreamAbstract_1.WebRTCSign
80
80
  return this.webRTCOperatorclient.addIceCandidate(request, { meta: metadata }).response;
81
81
  }
82
82
  getMetadata(projectId) {
83
- return {
84
- 'authorization': this.token,
83
+ const meta = {
85
84
  'r-p': projectId,
86
85
  };
86
+ if (this.token) {
87
+ meta.authorization = this.token;
88
+ }
89
+ return meta;
87
90
  }
88
91
  }
89
92
  exports.WebRTCSignallingStream = WebRTCSignallingStream;
@@ -28,6 +28,7 @@ export declare const API_ACCOUNT_PROJECT_USER_URL = "https://{url}/accounts/{acc
28
28
  export declare const API_ACCOUNT_PROJECT_USER_ID_URL = "https://{url}/accounts/{accountId}/projects/{projectId}/users/{userId}";
29
29
  export declare const API_ACCOUNT_PROJECT_APPLICATION_URL = "https://{url}/accounts/{accountId}/projects/{projectId}/applications";
30
30
  export declare const API_ACCOUNT_PROJECT_APPLICATION_ID_URL = "https://{url}/accounts/{accountId}/projects/{projectId}/applications/{applicationId}";
31
+ export declare const API_ACCOUNT_EXTERNAL_PROJECTS_URL = "https://{url}/accounts/{accountId}/external-projects";
31
32
  export declare const API_PROJECT_URL = "https://{url}/projects";
32
33
  export declare const API_PROJECT_ID_URL = "https://{url}/projects/{projectId}";
33
34
  export declare const API_PROJECT_USERS_URL = "https://{url}/projects/{projectId}/users";
@@ -43,6 +44,7 @@ export declare const API_PROJECT_FLOW_ASSET_PATH_URL = "https://{url}/projects/{
43
44
  export declare const API_PROJECT_MISSION_ASSETS_PATH_URL = "https://{url}/projects/{projectId}/missionassets";
44
45
  export declare const API_PROJECT_MISSION_ASSET_PATH_URL = "https://{url}/projects/{projectId}/missionassets/{assetId}";
45
46
  export declare const API_PROJECT_MAPPED_ASSETS_PATH_URL = "https://{url}/projects/{projectId}/mappedassets";
47
+ export declare const API_PROJECT_MAPPED_ASSET_PATH_URL = "https://{url}/projects/{projectId}/mappedassets/{assetId}";
46
48
  export declare const API_PROJECT_ROBOT_URL = "https://{url}/projects/{projectId}/robots";
47
49
  export declare const API_PROJECT_ROBOT_ID_URL = "https://{url}/projects/{projectId}/robots/{callsign}";
48
50
  export declare const API_PROJECT_ROBOT_ATTRIBUTES_URL = "https://{url}/projects/{projectId}/robots/{callsign}/attributes";
@@ -57,6 +59,8 @@ export declare const API_PROJECT_ROBOT_COMMAND2_URL = "https://{url}/projects/{p
57
59
  export declare const API_PROJECT_ROBOT_BUTTON_URL = "https://{url}/projects/{projectId}/robots/{callsign}/buttons";
58
60
  export declare const API_PROJECT_ROBOT_TRIGGER_URL = "https://{url}/projects/{projectId}/robots/{callsign}/triggers";
59
61
  export declare const API_PROJECT_ROBOT_GAMEPAD_URL = "https://{url}/projects/{projectId}/robots/{callsign}/gamepads";
62
+ export declare const API_PROJECT_ROBOT_CONFIGS_CONNECTIONS_URL = "https://{url}/robot-configs/connections/projects/{projectId}";
63
+ export declare const API_PROJECT_ROBOT_CONFIGS_CONNECTION_URL = "https://{url}/robot-configs/connections/projects/{projectId}/callsigns/{callsign}";
60
64
  export declare const API_PROJECT_OPERATION_URL = "https://{url}/projects/{projectId}/operations";
61
65
  export declare const API_PROJECT_OPERATION_ID_URL = "https://{url}/projects/{projectId}/operations/{operationId}";
62
66
  export declare const API_PROJECT_DASHBOARD_URL = "https://{url}/projects/{projectId}/dashboards";
@@ -82,6 +86,9 @@ export declare const API_PROJECT_DEFINITION_ACTION_URL = "https://{url}/projects
82
86
  export declare const API_PROJECT_DEFINITION_BUTTON_URL = "https://{url}/projects/{projectId}/robot-definitions/{definitionId}/buttons";
83
87
  export declare const API_PROJECT_DEFINITION_TRIGGER_URL = "https://{url}/projects/{projectId}/robot-definitions/{definitionId}/triggers";
84
88
  export declare const API_PROJECT_DEFINITION_GAMEPAD_URL = "https://{url}/projects/{projectId}/robot-definitions/{definitionId}/gamepads";
89
+ export declare const API_PROJECT_DEFINITION_EXPORT = "https://{url}/import-export/projects/{projectId}/robot-definitions/{definitionId}/export";
90
+ export declare const API_PROJECT_DEFINITION_IMPORT = "https://{url}/import-export/projects/{projectId}/robot-definitions/import";
91
+ export declare const API_PROJECT_ENVIRONMENT_URL = "https://{url}/graphs/projects/{projectId}/environments";
85
92
  export declare const API_PROJECT_GROUP_TYPE_URL = "https://{url}/projects/{projectId}/config-groups/{type}";
86
93
  export declare const API_PROJECT_GROUP_TYPE_ID_URL = "https://{url}/projects/{projectId}/config-groups/{type}/{configGroupId}";
87
94
  export declare const API_PROJECT_GROUP_TYPE_PUBLISH_URL = "https://{url}/projects/{projectId}/config-groups/{type}/{configGroupId}/publish";
@@ -89,10 +96,6 @@ export declare const API_PROJECT_GROUP_TYPE_CONFIG_URL = "https://{url}/projects
89
96
  export declare const API_PROJECT_GROUP_TYPE_VERSION_URL = "https://{url}/projects/{projectId}/config-groups/{type}/{configGroupId}/{version}";
90
97
  export declare const API_PROJECT_GROUP_TYPE_OWNER_ID_URL = "https://{url}/projects/{projectId}/config-groups/{type}/{configGroupId}/owner/{ownerId}";
91
98
  export declare const API_PROJECT_GROUP_TYPE_OWNER_OVERRIDE_URL = "https://{url}/projects/{projectId}/config-groups/{type}/{configGroupId}/{ownerId}/override";
92
- export declare const API_PROJECT_FUNCTION_URL = "https://{url}/projects/{projectId}/functions";
93
- export declare const API_PROJECT_FUNCTION_ID_URL = "https://{url}/projects/{projectId}/functions/{functionId}";
94
- export declare const API_PROJECT_FUNCTION_RUN_URL = "https://{url}/projects/{projectId}/functions/{functionId}/run";
95
- export declare const API_PROJECT_FUNCTION_POD_URL = "https://{url}/projects/{projectId}/functions/{functionId}/pods";
96
99
  export declare const API_PROJECT_EXPORT_URL = "https://{url}/projects/{projectId}/export-jobs";
97
100
  export declare const API_PROJECT_STREAM_URL = "https://{url}/projects/{projectId}/streams";
98
101
  export declare const API_PROJECT_STREAM_ID_URL = "https://{url}/projects/{projectId}/streams/{streamId}";
@@ -118,18 +121,31 @@ export declare const API_DD_INTEGRATION_PLANS_URL = "https://{url}/projects/{pro
118
121
  export declare const API_DD_INTEGRATION_PLAN_BY_ID_URL = "https://{url}/projects/{projectId}/dd/plan/{planId}";
119
122
  export declare const API_DD_INTEGRATION_OVERLAYS_URL = "https://{url}/projects/{projectId}/dd/overlays";
120
123
  export declare const API_DD_INTEGRATION_ISSUES_URL = "https://{url}/projects/{projectId}/dd/issues";
121
- export declare const API_MAPS_URL = "https://{url}/projects/{projectId}/maps";
122
- export declare const API_MAPS_DEPLOYED_URL = "https://{url}/projects/{projectId}/maps/deployed?callsign={callsign}";
123
- export declare const API_MAPS_MERGE_URL = "https://{url}/projects/{projectId}/maps/merge";
124
- export declare const API_MAP_ID_URL = "https://{url}/projects/{projectId}/maps/{mapId}";
125
- export declare const API_MAPS_COPY_URL = "https://{url}/projects/{projectId}/maps/{mapId}/copy";
126
- export declare const API_MAPS_DEPLOY_URL = "https://{url}/projects/{projectId}/maps/{mapId}/deploy";
127
- export declare const API_MAPS_GEOJSON_URL = "https://{url}/projects/{projectId}/maps/{mapId}/geojson";
128
- export declare const API_MAPS_PANORAMA_OBSERVATIONS_URL = "https://{url}/projects/{projectId}/panoramas/{panoramaId}/observations";
129
- export declare const API_OBSERVATIONS_URL = "https://{url}/projects/{projectId}/observations";
130
- export declare const API_OBSERVATION_KEYS_URL = "https://{url}/projects/{projectId}/observations/keys";
124
+ export declare const API_DD_INTEGRATION_LOCATIONS_URL = "https://{url}/projects/{projectId}/dd/locations";
125
+ export declare const API_GRAPHS_MAPS_URL = "https://{url}/graphs/projects/{projectId}/maps";
126
+ export declare const API_GRAPHS_MAPS_DEPLOYED_URL = "https://{url}/graphs/projects/{projectId}/maps/deployed?callsign={callsign}";
127
+ export declare const API_GRAPHS_MAPS_MERGE_URL = "https://{url}/graphs/projects/{projectId}/maps/merge";
128
+ export declare const API_GRAPHS_MAP_ID_URL = "https://{url}/graphs/projects/{projectId}/maps/{mapId}";
129
+ export declare const API_GRAPHS_MAPS_COPY_URL = "https://{url}/graphs/projects/{projectId}/maps/{mapId}/copy";
130
+ export declare const API_GRAPHS_MAPS_DEPLOY_URL = "https://{url}/graphs/projects/{projectId}/maps/{mapId}/deploy";
131
+ export declare const API_GRAPHS_MAPS_GEOJSON_URL = "https://{url}/graphs/projects/{projectId}/maps/{mapId}/geojson";
132
+ export declare const API_GRAPHS_PANORAMA = "https://{url}/graphs/projects/{projectId}/panoramas/{panoramaId}";
133
+ export declare const API_GRAPHS_PANORAMA_OBSERVATIONS_URL = "https://{url}/graphs/projects/{projectId}/panoramas/{panoramaId}/observations";
134
+ export declare const API_GRAPHS_OBSERVATIONS_URL = "https://{url}/graphs/projects/{projectId}/observations";
135
+ export declare const API_GRAPHS_OBSERVATION_KEYS_URL = "https://{url}/graphs/projects/{projectId}/observations/keys";
136
+ export declare const API_GRAPHS_TARGET_UPLOAD_URL = "https://{url}/graphs/projects/{projectId}/targets/upload";
137
+ export declare const API_GRAPHS_TARGETS_URL = "https://{url}/graphs/projects/{projectId}/targets";
138
+ export declare const API_GRAPHS_ASSETS_UPLOAD_URL = "https://{url}/graphs/projects/{projectId}/assets/upload";
139
+ export declare const API_GRAPHS_ASSETS_URL = "https://{url}/graphs/projects/{projectId}/assets";
131
140
  export declare const API_PROJECT_WORKFLOW_URL = "https://{url}/projects/{projectId}/automate/flows";
132
141
  export declare const API_PROJECT_WORKFLOW_ID_URL = "https://{url}/projects/{projectId}/automate/flows/{workflowId}";
133
142
  export declare const API_PROJECT_WORKFLOW_ASSET_URL = "https://{url}/projects/{projectId}/automate/flows/{workflowId}/assets";
134
- export declare const API_PROJECT_DEPLOYED_WORKFLOW_URL = "https://{url}/projects/{projectId}/robots/{callsign}/automate/flows/deployments";
143
+ export declare const API_PROJECT_ROBOT_DEPLOYMENTS_URL = "https://{url}/projects/{projectId}/robot-definitions/{profileId}/robots/{callsign}/automate/flows/deployments";
144
+ export declare const API_PROJECT_PROFILE_DEPLOYMENTS_URL = "https://{url}/projects/{projectId}/robot-definitions/{profileId}/automate/flows/deployments";
145
+ export declare const API_PROJECT_ROBOT_NO_PROFILE_DEPLOYMENTS_URL = "https://{url}/projects/{projectId}/robots/{callsign}/automate/flows/deployments";
146
+ export declare const API_PROJECT_PROFILE_DEPLOYED_WORKFLOW_URL = "https://{url}/projects/{projectId}/robot-definitions/{profileId}/automate/flows/deployments/{workflowId}";
147
+ export declare const API_PROJECT_ROBOT_DEPLOYED_WORKFLOW_URL = "https://{url}/projects/{projectId}/robots/{callsign}/automate/flows/deployments/{workflowId}";
148
+ export declare const API_PROJECT_WORKFLOW_AFFECTED_URL = "https://{url}/projects/{projectId}/automate/flows/{flowId}/robots";
135
149
  export declare const API_LINKED_PROJECT_URL = "https://{url}/linked-projects/{linkedProjectId}";
150
+ export declare const API_DEVICE_CREDENTIALS_URL = "https://{url}/projects/{projectId}/callsigns/{callsign}/device-credentials";
151
+ export declare const API_DEVICE_CREDENTIALS_AUTH_URL = "https://{url}/device-credentials/auth";