@azure/digital-twins-core 2.0.0-alpha.20241204.1 → 2.0.0-alpha.20241205.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.
Files changed (361) hide show
  1. package/dist/browser/constants.d.ts +2 -0
  2. package/dist/browser/constants.d.ts.map +1 -0
  3. package/{types/digital-twins-core.d.ts → dist/browser/digitalTwinsClient.d.ts} +270 -546
  4. package/dist/browser/digitalTwinsClient.d.ts.map +1 -0
  5. package/{dist-esm/src → dist/browser}/digitalTwinsClient.js +6 -6
  6. package/dist/browser/digitalTwinsClient.js.map +1 -0
  7. package/dist/browser/generated/azureDigitalTwinsAPI.d.ts +19 -0
  8. package/dist/browser/generated/azureDigitalTwinsAPI.d.ts.map +1 -0
  9. package/{dist-esm/src → dist/browser}/generated/azureDigitalTwinsAPI.js +1 -1
  10. package/dist/browser/generated/azureDigitalTwinsAPI.js.map +1 -0
  11. package/dist/browser/generated/index.d.ts +5 -0
  12. package/dist/browser/generated/index.d.ts.map +1 -0
  13. package/{dist-esm/src → dist/browser}/generated/index.js +4 -4
  14. package/dist/browser/generated/index.js.map +1 -0
  15. package/dist/browser/generated/models/index.d.ts +335 -0
  16. package/dist/browser/generated/models/index.d.ts.map +1 -0
  17. package/dist/browser/generated/models/mappers.d.ts +23 -0
  18. package/dist/browser/generated/models/mappers.d.ts.map +1 -0
  19. package/dist/browser/generated/models/parameters.d.ts +27 -0
  20. package/dist/browser/generated/models/parameters.d.ts.map +1 -0
  21. package/{dist-esm/src → dist/browser}/generated/models/parameters.js +1 -1
  22. package/dist/browser/generated/models/parameters.js.map +1 -0
  23. package/dist/browser/generated/operations/digitalTwinModels.d.ts +106 -0
  24. package/dist/browser/generated/operations/digitalTwinModels.d.ts.map +1 -0
  25. package/{dist-esm/src → dist/browser}/generated/operations/digitalTwinModels.js +3 -3
  26. package/dist/browser/generated/operations/digitalTwinModels.js.map +1 -0
  27. package/dist/browser/generated/operations/digitalTwins.d.ts +285 -0
  28. package/dist/browser/generated/operations/digitalTwins.d.ts.map +1 -0
  29. package/{dist-esm/src → dist/browser}/generated/operations/digitalTwins.js +3 -3
  30. package/dist/browser/generated/operations/digitalTwins.js.map +1 -0
  31. package/dist/browser/generated/operations/eventRoutes.d.ts +69 -0
  32. package/dist/browser/generated/operations/eventRoutes.d.ts.map +1 -0
  33. package/{dist-esm/src → dist/browser}/generated/operations/eventRoutes.js +3 -3
  34. package/dist/browser/generated/operations/eventRoutes.js.map +1 -0
  35. package/dist/browser/generated/operations/index.d.ts +5 -0
  36. package/dist/browser/generated/operations/index.d.ts.map +1 -0
  37. package/{dist-esm/src/generated/operationsInterfaces → dist/browser/generated/operations}/index.js +4 -4
  38. package/dist/browser/generated/operations/index.js.map +1 -0
  39. package/dist/browser/generated/operations/query.d.ts +28 -0
  40. package/dist/browser/generated/operations/query.d.ts.map +1 -0
  41. package/{dist-esm/src → dist/browser}/generated/operations/query.js +2 -2
  42. package/dist/browser/generated/operations/query.js.map +1 -0
  43. package/dist/browser/generated/operationsInterfaces/digitalTwinModels.d.ts +78 -0
  44. package/dist/browser/generated/operationsInterfaces/digitalTwinModels.d.ts.map +1 -0
  45. package/dist/browser/generated/operationsInterfaces/digitalTwinModels.js.map +1 -0
  46. package/dist/browser/generated/operationsInterfaces/digitalTwins.d.ts +234 -0
  47. package/dist/browser/generated/operationsInterfaces/digitalTwins.d.ts.map +1 -0
  48. package/dist/browser/generated/operationsInterfaces/digitalTwins.js.map +1 -0
  49. package/dist/browser/generated/operationsInterfaces/eventRoutes.d.ts +46 -0
  50. package/dist/browser/generated/operationsInterfaces/eventRoutes.d.ts.map +1 -0
  51. package/dist/browser/generated/operationsInterfaces/eventRoutes.js.map +1 -0
  52. package/dist/browser/generated/operationsInterfaces/index.d.ts +5 -0
  53. package/dist/browser/generated/operationsInterfaces/index.d.ts.map +1 -0
  54. package/{dist-esm/src/generated/operations → dist/browser/generated/operationsInterfaces}/index.js +4 -4
  55. package/dist/browser/generated/operationsInterfaces/index.js.map +1 -0
  56. package/dist/browser/generated/operationsInterfaces/query.d.ts +20 -0
  57. package/dist/browser/generated/operationsInterfaces/query.d.ts.map +1 -0
  58. package/dist/browser/generated/operationsInterfaces/query.js.map +1 -0
  59. package/dist/browser/generated/pagingHelper.d.ts +13 -0
  60. package/dist/browser/generated/pagingHelper.d.ts.map +1 -0
  61. package/dist/browser/index.d.ts +3 -0
  62. package/dist/browser/index.d.ts.map +1 -0
  63. package/dist/browser/index.js +4 -0
  64. package/dist/browser/index.js.map +1 -0
  65. package/dist/browser/logger.d.ts +5 -0
  66. package/dist/browser/logger.d.ts.map +1 -0
  67. package/dist/browser/package.json +3 -0
  68. package/dist/browser/tracing.d.ts +6 -0
  69. package/dist/browser/tracing.d.ts.map +1 -0
  70. package/{dist-esm/src → dist/browser}/tracing.js +1 -1
  71. package/dist/browser/tracing.js.map +1 -0
  72. package/dist/commonjs/constants.d.ts +2 -0
  73. package/dist/commonjs/constants.d.ts.map +1 -0
  74. package/dist/commonjs/constants.js +7 -0
  75. package/dist/commonjs/constants.js.map +1 -0
  76. package/dist/commonjs/digitalTwinsClient.d.ts +270 -0
  77. package/dist/commonjs/digitalTwinsClient.d.ts.map +1 -0
  78. package/dist/commonjs/digitalTwinsClient.js +410 -0
  79. package/dist/commonjs/digitalTwinsClient.js.map +1 -0
  80. package/dist/commonjs/generated/azureDigitalTwinsAPI.d.ts +19 -0
  81. package/dist/commonjs/generated/azureDigitalTwinsAPI.d.ts.map +1 -0
  82. package/dist/commonjs/generated/azureDigitalTwinsAPI.js +72 -0
  83. package/dist/commonjs/generated/azureDigitalTwinsAPI.js.map +1 -0
  84. package/dist/commonjs/generated/index.d.ts +5 -0
  85. package/dist/commonjs/generated/index.d.ts.map +1 -0
  86. package/dist/commonjs/generated/index.js +19 -0
  87. package/dist/commonjs/generated/index.js.map +1 -0
  88. package/dist/commonjs/generated/models/index.d.ts +335 -0
  89. package/dist/commonjs/generated/models/index.d.ts.map +1 -0
  90. package/dist/commonjs/generated/models/index.js +10 -0
  91. package/dist/commonjs/generated/models/index.js.map +1 -0
  92. package/dist/commonjs/generated/models/mappers.d.ts +23 -0
  93. package/dist/commonjs/generated/models/mappers.d.ts.map +1 -0
  94. package/dist/commonjs/generated/models/mappers.js +475 -0
  95. package/dist/commonjs/generated/models/mappers.js.map +1 -0
  96. package/dist/commonjs/generated/models/parameters.d.ts +27 -0
  97. package/dist/commonjs/generated/models/parameters.d.ts.map +1 -0
  98. package/dist/commonjs/generated/models/parameters.js +280 -0
  99. package/dist/commonjs/generated/models/parameters.js.map +1 -0
  100. package/dist/commonjs/generated/operations/digitalTwinModels.d.ts +106 -0
  101. package/dist/commonjs/generated/operations/digitalTwinModels.d.ts.map +1 -0
  102. package/dist/commonjs/generated/operations/digitalTwinModels.js +294 -0
  103. package/dist/commonjs/generated/operations/digitalTwinModels.js.map +1 -0
  104. package/dist/commonjs/generated/operations/digitalTwins.d.ts +285 -0
  105. package/dist/commonjs/generated/operations/digitalTwins.d.ts.map +1 -0
  106. package/dist/commonjs/generated/operations/digitalTwins.js +749 -0
  107. package/dist/commonjs/generated/operations/digitalTwins.js.map +1 -0
  108. package/dist/commonjs/generated/operations/eventRoutes.d.ts +69 -0
  109. package/dist/commonjs/generated/operations/eventRoutes.d.ts.map +1 -0
  110. package/dist/commonjs/generated/operations/eventRoutes.js +226 -0
  111. package/dist/commonjs/generated/operations/eventRoutes.js.map +1 -0
  112. package/dist/commonjs/generated/operations/index.d.ts +5 -0
  113. package/dist/commonjs/generated/operations/index.d.ts.map +1 -0
  114. package/dist/commonjs/generated/operations/index.js +15 -0
  115. package/dist/commonjs/generated/operations/index.js.map +1 -0
  116. package/dist/commonjs/generated/operations/query.d.ts +28 -0
  117. package/dist/commonjs/generated/operations/query.d.ts.map +1 -0
  118. package/dist/commonjs/generated/operations/query.js +68 -0
  119. package/dist/commonjs/generated/operations/query.js.map +1 -0
  120. package/dist/commonjs/generated/operationsInterfaces/digitalTwinModels.d.ts +78 -0
  121. package/dist/commonjs/generated/operationsInterfaces/digitalTwinModels.d.ts.map +1 -0
  122. package/dist/commonjs/generated/operationsInterfaces/digitalTwinModels.js +10 -0
  123. package/dist/commonjs/generated/operationsInterfaces/digitalTwinModels.js.map +1 -0
  124. package/dist/commonjs/generated/operationsInterfaces/digitalTwins.d.ts +234 -0
  125. package/dist/commonjs/generated/operationsInterfaces/digitalTwins.d.ts.map +1 -0
  126. package/dist/commonjs/generated/operationsInterfaces/digitalTwins.js +10 -0
  127. package/dist/commonjs/generated/operationsInterfaces/digitalTwins.js.map +1 -0
  128. package/dist/commonjs/generated/operationsInterfaces/eventRoutes.d.ts +46 -0
  129. package/dist/commonjs/generated/operationsInterfaces/eventRoutes.d.ts.map +1 -0
  130. package/dist/commonjs/generated/operationsInterfaces/eventRoutes.js +10 -0
  131. package/dist/commonjs/generated/operationsInterfaces/eventRoutes.js.map +1 -0
  132. package/dist/commonjs/generated/operationsInterfaces/index.d.ts +5 -0
  133. package/dist/commonjs/generated/operationsInterfaces/index.d.ts.map +1 -0
  134. package/dist/commonjs/generated/operationsInterfaces/index.js +15 -0
  135. package/dist/commonjs/generated/operationsInterfaces/index.js.map +1 -0
  136. package/dist/commonjs/generated/operationsInterfaces/query.d.ts +20 -0
  137. package/dist/commonjs/generated/operationsInterfaces/query.d.ts.map +1 -0
  138. package/dist/commonjs/generated/operationsInterfaces/query.js +10 -0
  139. package/dist/commonjs/generated/operationsInterfaces/query.js.map +1 -0
  140. package/dist/commonjs/generated/pagingHelper.d.ts +13 -0
  141. package/dist/commonjs/generated/pagingHelper.d.ts.map +1 -0
  142. package/dist/commonjs/generated/pagingHelper.js +36 -0
  143. package/dist/commonjs/generated/pagingHelper.js.map +1 -0
  144. package/dist/commonjs/index.d.ts +3 -0
  145. package/dist/commonjs/index.d.ts.map +1 -0
  146. package/dist/commonjs/index.js +8 -0
  147. package/dist/commonjs/index.js.map +1 -0
  148. package/dist/commonjs/logger.d.ts +5 -0
  149. package/dist/commonjs/logger.d.ts.map +1 -0
  150. package/dist/commonjs/logger.js +11 -0
  151. package/dist/commonjs/logger.js.map +1 -0
  152. package/dist/commonjs/package.json +3 -0
  153. package/dist/commonjs/tracing.d.ts +6 -0
  154. package/dist/commonjs/tracing.d.ts.map +1 -0
  155. package/dist/commonjs/tracing.js +17 -0
  156. package/dist/commonjs/tracing.js.map +1 -0
  157. package/dist/commonjs/tsdoc-metadata.json +11 -0
  158. package/dist/esm/constants.d.ts +2 -0
  159. package/dist/esm/constants.d.ts.map +1 -0
  160. package/dist/esm/constants.js +4 -0
  161. package/dist/esm/constants.js.map +1 -0
  162. package/dist/esm/digitalTwinsClient.d.ts +270 -0
  163. package/dist/esm/digitalTwinsClient.d.ts.map +1 -0
  164. package/dist/esm/digitalTwinsClient.js +406 -0
  165. package/dist/esm/digitalTwinsClient.js.map +1 -0
  166. package/dist/esm/generated/azureDigitalTwinsAPI.d.ts +19 -0
  167. package/dist/esm/generated/azureDigitalTwinsAPI.d.ts.map +1 -0
  168. package/dist/esm/generated/azureDigitalTwinsAPI.js +67 -0
  169. package/dist/esm/generated/azureDigitalTwinsAPI.js.map +1 -0
  170. package/dist/esm/generated/index.d.ts +5 -0
  171. package/dist/esm/generated/index.d.ts.map +1 -0
  172. package/dist/esm/generated/index.js +13 -0
  173. package/dist/esm/generated/index.js.map +1 -0
  174. package/dist/esm/generated/models/index.d.ts +335 -0
  175. package/dist/esm/generated/models/index.d.ts.map +1 -0
  176. package/dist/esm/generated/models/index.js +9 -0
  177. package/dist/esm/generated/models/index.js.map +1 -0
  178. package/dist/esm/generated/models/mappers.d.ts +23 -0
  179. package/dist/esm/generated/models/mappers.d.ts.map +1 -0
  180. package/dist/esm/generated/models/mappers.js +472 -0
  181. package/dist/esm/generated/models/mappers.js.map +1 -0
  182. package/dist/esm/generated/models/parameters.d.ts +27 -0
  183. package/dist/esm/generated/models/parameters.d.ts.map +1 -0
  184. package/dist/esm/generated/models/parameters.js +277 -0
  185. package/dist/esm/generated/models/parameters.js.map +1 -0
  186. package/dist/esm/generated/operations/digitalTwinModels.d.ts +106 -0
  187. package/dist/esm/generated/operations/digitalTwinModels.d.ts.map +1 -0
  188. package/dist/esm/generated/operations/digitalTwinModels.js +290 -0
  189. package/dist/esm/generated/operations/digitalTwinModels.js.map +1 -0
  190. package/dist/esm/generated/operations/digitalTwins.d.ts +285 -0
  191. package/dist/esm/generated/operations/digitalTwins.d.ts.map +1 -0
  192. package/dist/esm/generated/operations/digitalTwins.js +745 -0
  193. package/dist/esm/generated/operations/digitalTwins.js.map +1 -0
  194. package/dist/esm/generated/operations/eventRoutes.d.ts +69 -0
  195. package/dist/esm/generated/operations/eventRoutes.d.ts.map +1 -0
  196. package/dist/esm/generated/operations/eventRoutes.js +222 -0
  197. package/dist/esm/generated/operations/eventRoutes.js.map +1 -0
  198. package/dist/esm/generated/operations/index.d.ts +5 -0
  199. package/dist/esm/generated/operations/index.d.ts.map +1 -0
  200. package/dist/esm/generated/operations/index.js +12 -0
  201. package/dist/esm/generated/operations/index.js.map +1 -0
  202. package/dist/esm/generated/operations/query.d.ts +28 -0
  203. package/dist/esm/generated/operations/query.d.ts.map +1 -0
  204. package/dist/esm/generated/operations/query.js +63 -0
  205. package/dist/esm/generated/operations/query.js.map +1 -0
  206. package/dist/esm/generated/operationsInterfaces/digitalTwinModels.d.ts +78 -0
  207. package/dist/esm/generated/operationsInterfaces/digitalTwinModels.d.ts.map +1 -0
  208. package/dist/esm/generated/operationsInterfaces/digitalTwinModels.js +9 -0
  209. package/dist/esm/generated/operationsInterfaces/digitalTwinModels.js.map +1 -0
  210. package/dist/esm/generated/operationsInterfaces/digitalTwins.d.ts +234 -0
  211. package/dist/esm/generated/operationsInterfaces/digitalTwins.d.ts.map +1 -0
  212. package/dist/esm/generated/operationsInterfaces/digitalTwins.js +9 -0
  213. package/dist/esm/generated/operationsInterfaces/digitalTwins.js.map +1 -0
  214. package/dist/esm/generated/operationsInterfaces/eventRoutes.d.ts +46 -0
  215. package/dist/esm/generated/operationsInterfaces/eventRoutes.d.ts.map +1 -0
  216. package/dist/esm/generated/operationsInterfaces/eventRoutes.js +9 -0
  217. package/dist/esm/generated/operationsInterfaces/eventRoutes.js.map +1 -0
  218. package/dist/esm/generated/operationsInterfaces/index.d.ts +5 -0
  219. package/dist/esm/generated/operationsInterfaces/index.d.ts.map +1 -0
  220. package/dist/esm/generated/operationsInterfaces/index.js +12 -0
  221. package/dist/esm/generated/operationsInterfaces/index.js.map +1 -0
  222. package/dist/esm/generated/operationsInterfaces/query.d.ts +20 -0
  223. package/dist/esm/generated/operationsInterfaces/query.d.ts.map +1 -0
  224. package/dist/esm/generated/operationsInterfaces/query.js +9 -0
  225. package/dist/esm/generated/operationsInterfaces/query.js.map +1 -0
  226. package/dist/esm/generated/pagingHelper.d.ts +13 -0
  227. package/dist/esm/generated/pagingHelper.d.ts.map +1 -0
  228. package/dist/esm/generated/pagingHelper.js +32 -0
  229. package/dist/esm/generated/pagingHelper.js.map +1 -0
  230. package/dist/esm/index.d.ts +3 -0
  231. package/dist/esm/index.d.ts.map +1 -0
  232. package/dist/esm/index.js +4 -0
  233. package/dist/esm/index.js.map +1 -0
  234. package/dist/esm/logger.d.ts +5 -0
  235. package/dist/esm/logger.d.ts.map +1 -0
  236. package/dist/esm/logger.js +8 -0
  237. package/dist/esm/logger.js.map +1 -0
  238. package/dist/esm/package.json +3 -0
  239. package/dist/esm/tracing.d.ts +6 -0
  240. package/dist/esm/tracing.d.ts.map +1 -0
  241. package/dist/esm/tracing.js +14 -0
  242. package/dist/esm/tracing.js.map +1 -0
  243. package/dist/react-native/constants.d.ts +2 -0
  244. package/dist/react-native/constants.d.ts.map +1 -0
  245. package/dist/react-native/constants.js +4 -0
  246. package/dist/react-native/constants.js.map +1 -0
  247. package/dist/react-native/digitalTwinsClient.d.ts +270 -0
  248. package/dist/react-native/digitalTwinsClient.d.ts.map +1 -0
  249. package/dist/react-native/digitalTwinsClient.js +406 -0
  250. package/dist/react-native/digitalTwinsClient.js.map +1 -0
  251. package/dist/react-native/generated/azureDigitalTwinsAPI.d.ts +19 -0
  252. package/dist/react-native/generated/azureDigitalTwinsAPI.d.ts.map +1 -0
  253. package/dist/react-native/generated/azureDigitalTwinsAPI.js +67 -0
  254. package/dist/react-native/generated/azureDigitalTwinsAPI.js.map +1 -0
  255. package/dist/react-native/generated/index.d.ts +5 -0
  256. package/dist/react-native/generated/index.d.ts.map +1 -0
  257. package/dist/react-native/generated/index.js +13 -0
  258. package/dist/react-native/generated/index.js.map +1 -0
  259. package/dist/react-native/generated/models/index.d.ts +335 -0
  260. package/dist/react-native/generated/models/index.d.ts.map +1 -0
  261. package/dist/react-native/generated/models/index.js +9 -0
  262. package/dist/react-native/generated/models/index.js.map +1 -0
  263. package/dist/react-native/generated/models/mappers.d.ts +23 -0
  264. package/dist/react-native/generated/models/mappers.d.ts.map +1 -0
  265. package/dist/react-native/generated/models/mappers.js +472 -0
  266. package/dist/react-native/generated/models/mappers.js.map +1 -0
  267. package/dist/react-native/generated/models/parameters.d.ts +27 -0
  268. package/dist/react-native/generated/models/parameters.d.ts.map +1 -0
  269. package/dist/react-native/generated/models/parameters.js +277 -0
  270. package/dist/react-native/generated/models/parameters.js.map +1 -0
  271. package/dist/react-native/generated/operations/digitalTwinModels.d.ts +106 -0
  272. package/dist/react-native/generated/operations/digitalTwinModels.d.ts.map +1 -0
  273. package/dist/react-native/generated/operations/digitalTwinModels.js +290 -0
  274. package/dist/react-native/generated/operations/digitalTwinModels.js.map +1 -0
  275. package/dist/react-native/generated/operations/digitalTwins.d.ts +285 -0
  276. package/dist/react-native/generated/operations/digitalTwins.d.ts.map +1 -0
  277. package/dist/react-native/generated/operations/digitalTwins.js +745 -0
  278. package/dist/react-native/generated/operations/digitalTwins.js.map +1 -0
  279. package/dist/react-native/generated/operations/eventRoutes.d.ts +69 -0
  280. package/dist/react-native/generated/operations/eventRoutes.d.ts.map +1 -0
  281. package/dist/react-native/generated/operations/eventRoutes.js +222 -0
  282. package/dist/react-native/generated/operations/eventRoutes.js.map +1 -0
  283. package/dist/react-native/generated/operations/index.d.ts +5 -0
  284. package/dist/react-native/generated/operations/index.d.ts.map +1 -0
  285. package/dist/react-native/generated/operations/index.js +12 -0
  286. package/dist/react-native/generated/operations/index.js.map +1 -0
  287. package/dist/react-native/generated/operations/query.d.ts +28 -0
  288. package/dist/react-native/generated/operations/query.d.ts.map +1 -0
  289. package/dist/react-native/generated/operations/query.js +63 -0
  290. package/dist/react-native/generated/operations/query.js.map +1 -0
  291. package/dist/react-native/generated/operationsInterfaces/digitalTwinModels.d.ts +78 -0
  292. package/dist/react-native/generated/operationsInterfaces/digitalTwinModels.d.ts.map +1 -0
  293. package/dist/react-native/generated/operationsInterfaces/digitalTwinModels.js +9 -0
  294. package/dist/react-native/generated/operationsInterfaces/digitalTwinModels.js.map +1 -0
  295. package/dist/react-native/generated/operationsInterfaces/digitalTwins.d.ts +234 -0
  296. package/dist/react-native/generated/operationsInterfaces/digitalTwins.d.ts.map +1 -0
  297. package/dist/react-native/generated/operationsInterfaces/digitalTwins.js +9 -0
  298. package/dist/react-native/generated/operationsInterfaces/digitalTwins.js.map +1 -0
  299. package/dist/react-native/generated/operationsInterfaces/eventRoutes.d.ts +46 -0
  300. package/dist/react-native/generated/operationsInterfaces/eventRoutes.d.ts.map +1 -0
  301. package/dist/react-native/generated/operationsInterfaces/eventRoutes.js +9 -0
  302. package/dist/react-native/generated/operationsInterfaces/eventRoutes.js.map +1 -0
  303. package/dist/react-native/generated/operationsInterfaces/index.d.ts +5 -0
  304. package/dist/react-native/generated/operationsInterfaces/index.d.ts.map +1 -0
  305. package/dist/react-native/generated/operationsInterfaces/index.js +12 -0
  306. package/dist/react-native/generated/operationsInterfaces/index.js.map +1 -0
  307. package/dist/react-native/generated/operationsInterfaces/query.d.ts +20 -0
  308. package/dist/react-native/generated/operationsInterfaces/query.d.ts.map +1 -0
  309. package/dist/react-native/generated/operationsInterfaces/query.js +9 -0
  310. package/dist/react-native/generated/operationsInterfaces/query.js.map +1 -0
  311. package/dist/react-native/generated/pagingHelper.d.ts +13 -0
  312. package/dist/react-native/generated/pagingHelper.d.ts.map +1 -0
  313. package/dist/react-native/generated/pagingHelper.js +32 -0
  314. package/dist/react-native/generated/pagingHelper.js.map +1 -0
  315. package/dist/react-native/index.d.ts +3 -0
  316. package/dist/react-native/index.d.ts.map +1 -0
  317. package/dist/react-native/index.js +4 -0
  318. package/dist/react-native/index.js.map +1 -0
  319. package/dist/react-native/logger.d.ts +5 -0
  320. package/dist/react-native/logger.d.ts.map +1 -0
  321. package/dist/react-native/logger.js +8 -0
  322. package/dist/react-native/logger.js.map +1 -0
  323. package/dist/react-native/package.json +3 -0
  324. package/dist/react-native/tracing.d.ts +6 -0
  325. package/dist/react-native/tracing.d.ts.map +1 -0
  326. package/dist/react-native/tracing.js +14 -0
  327. package/dist/react-native/tracing.js.map +1 -0
  328. package/package.json +64 -49
  329. package/dist/index.js +0 -2613
  330. package/dist/index.js.map +0 -1
  331. package/dist-esm/src/digitalTwinsClient.js.map +0 -1
  332. package/dist-esm/src/generated/azureDigitalTwinsAPI.js.map +0 -1
  333. package/dist-esm/src/generated/index.js.map +0 -1
  334. package/dist-esm/src/generated/models/parameters.js.map +0 -1
  335. package/dist-esm/src/generated/operations/digitalTwinModels.js.map +0 -1
  336. package/dist-esm/src/generated/operations/digitalTwins.js.map +0 -1
  337. package/dist-esm/src/generated/operations/eventRoutes.js.map +0 -1
  338. package/dist-esm/src/generated/operations/index.js.map +0 -1
  339. package/dist-esm/src/generated/operations/query.js.map +0 -1
  340. package/dist-esm/src/generated/operationsInterfaces/digitalTwinModels.js.map +0 -1
  341. package/dist-esm/src/generated/operationsInterfaces/digitalTwins.js.map +0 -1
  342. package/dist-esm/src/generated/operationsInterfaces/eventRoutes.js.map +0 -1
  343. package/dist-esm/src/generated/operationsInterfaces/index.js.map +0 -1
  344. package/dist-esm/src/generated/operationsInterfaces/query.js.map +0 -1
  345. package/dist-esm/src/index.js +0 -4
  346. package/dist-esm/src/index.js.map +0 -1
  347. package/dist-esm/src/tracing.js.map +0 -1
  348. /package/{dist-esm/src → dist/browser}/constants.js +0 -0
  349. /package/{dist-esm/src → dist/browser}/constants.js.map +0 -0
  350. /package/{dist-esm/src → dist/browser}/generated/models/index.js +0 -0
  351. /package/{dist-esm/src → dist/browser}/generated/models/index.js.map +0 -0
  352. /package/{dist-esm/src → dist/browser}/generated/models/mappers.js +0 -0
  353. /package/{dist-esm/src → dist/browser}/generated/models/mappers.js.map +0 -0
  354. /package/{dist-esm/src → dist/browser}/generated/operationsInterfaces/digitalTwinModels.js +0 -0
  355. /package/{dist-esm/src → dist/browser}/generated/operationsInterfaces/digitalTwins.js +0 -0
  356. /package/{dist-esm/src → dist/browser}/generated/operationsInterfaces/eventRoutes.js +0 -0
  357. /package/{dist-esm/src → dist/browser}/generated/operationsInterfaces/query.js +0 -0
  358. /package/{dist-esm/src → dist/browser}/generated/pagingHelper.js +0 -0
  359. /package/{dist-esm/src → dist/browser}/generated/pagingHelper.js.map +0 -0
  360. /package/{dist-esm/src → dist/browser}/logger.js +0 -0
  361. /package/{dist-esm/src → dist/browser}/logger.js.map +0 -0
package/dist/index.js DELETED
@@ -1,2613 +0,0 @@
1
- 'use strict';
2
-
3
- Object.defineProperty(exports, '__esModule', { value: true });
4
-
5
- var tslib = require('tslib');
6
- var uuid = require('uuid');
7
- var coreClient = require('@azure/core-client');
8
- var coreTracing = require('@azure/core-tracing');
9
- var logger$1 = require('@azure/logger');
10
-
11
- function _interopNamespaceDefault(e) {
12
- var n = Object.create(null);
13
- if (e) {
14
- Object.keys(e).forEach(function (k) {
15
- if (k !== 'default') {
16
- var d = Object.getOwnPropertyDescriptor(e, k);
17
- Object.defineProperty(n, k, d.get ? d : {
18
- enumerable: true,
19
- get: function () { return e[k]; }
20
- });
21
- }
22
- });
23
- }
24
- n.default = e;
25
- return Object.freeze(n);
26
- }
27
-
28
- var coreClient__namespace = /*#__PURE__*/_interopNamespaceDefault(coreClient);
29
-
30
- /*
31
- * Copyright (c) Microsoft Corporation.
32
- * Licensed under the MIT License.
33
- *
34
- * Code generated by Microsoft (R) AutoRest Code Generator.
35
- * Changes may cause incorrect behavior and will be lost if the code is regenerated.
36
- */
37
- const pageMap = new WeakMap();
38
- function setContinuationToken(page, continuationToken) {
39
- var _a;
40
- if (typeof page !== "object" || page === null || !continuationToken) {
41
- return;
42
- }
43
- const pageInfo = (_a = pageMap.get(page)) !== null && _a !== void 0 ? _a : {};
44
- pageInfo.continuationToken = continuationToken;
45
- pageMap.set(page, pageInfo);
46
- }
47
-
48
- /*
49
- * Copyright (c) Microsoft Corporation.
50
- * Licensed under the MIT License.
51
- *
52
- * Code generated by Microsoft (R) AutoRest Code Generator.
53
- * Changes may cause incorrect behavior and will be lost if the code is regenerated.
54
- */
55
- const DigitalTwinsModelData = {
56
- type: {
57
- name: "Composite",
58
- className: "DigitalTwinsModelData",
59
- modelProperties: {
60
- displayName: {
61
- serializedName: "displayName",
62
- type: {
63
- name: "Dictionary",
64
- value: { type: { name: "String" } }
65
- }
66
- },
67
- description: {
68
- serializedName: "description",
69
- type: {
70
- name: "Dictionary",
71
- value: { type: { name: "String" } }
72
- }
73
- },
74
- id: {
75
- serializedName: "id",
76
- required: true,
77
- type: {
78
- name: "String"
79
- }
80
- },
81
- uploadTime: {
82
- serializedName: "uploadTime",
83
- type: {
84
- name: "DateTime"
85
- }
86
- },
87
- decommissioned: {
88
- defaultValue: false,
89
- serializedName: "decommissioned",
90
- type: {
91
- name: "Boolean"
92
- }
93
- },
94
- model: {
95
- serializedName: "model",
96
- type: {
97
- name: "Dictionary",
98
- value: { type: { name: "any" } }
99
- }
100
- }
101
- }
102
- }
103
- };
104
- const ErrorResponse = {
105
- type: {
106
- name: "Composite",
107
- className: "ErrorResponse",
108
- modelProperties: {
109
- error: {
110
- serializedName: "error",
111
- type: {
112
- name: "Composite",
113
- className: "ErrorModel"
114
- }
115
- }
116
- }
117
- }
118
- };
119
- const ErrorModel = {
120
- type: {
121
- name: "Composite",
122
- className: "ErrorModel",
123
- modelProperties: {
124
- code: {
125
- serializedName: "code",
126
- readOnly: true,
127
- type: {
128
- name: "String"
129
- }
130
- },
131
- message: {
132
- serializedName: "message",
133
- readOnly: true,
134
- type: {
135
- name: "String"
136
- }
137
- },
138
- details: {
139
- serializedName: "details",
140
- readOnly: true,
141
- type: {
142
- name: "Sequence",
143
- element: {
144
- type: {
145
- name: "Composite",
146
- className: "ErrorModel"
147
- }
148
- }
149
- }
150
- },
151
- innererror: {
152
- serializedName: "innererror",
153
- type: {
154
- name: "Composite",
155
- className: "InnerError"
156
- }
157
- }
158
- }
159
- }
160
- };
161
- const InnerError = {
162
- type: {
163
- name: "Composite",
164
- className: "InnerError",
165
- modelProperties: {
166
- code: {
167
- serializedName: "code",
168
- type: {
169
- name: "String"
170
- }
171
- },
172
- innererror: {
173
- serializedName: "innererror",
174
- type: {
175
- name: "Composite",
176
- className: "InnerError"
177
- }
178
- }
179
- }
180
- }
181
- };
182
- const PagedDigitalTwinsModelDataCollection = {
183
- type: {
184
- name: "Composite",
185
- className: "PagedDigitalTwinsModelDataCollection",
186
- modelProperties: {
187
- value: {
188
- serializedName: "value",
189
- type: {
190
- name: "Sequence",
191
- element: {
192
- type: {
193
- name: "Composite",
194
- className: "DigitalTwinsModelData"
195
- }
196
- }
197
- }
198
- },
199
- nextLink: {
200
- serializedName: "nextLink",
201
- type: {
202
- name: "String"
203
- }
204
- }
205
- }
206
- }
207
- };
208
- const QuerySpecification = {
209
- type: {
210
- name: "Composite",
211
- className: "QuerySpecification",
212
- modelProperties: {
213
- query: {
214
- serializedName: "query",
215
- type: {
216
- name: "String"
217
- }
218
- },
219
- continuationToken: {
220
- serializedName: "continuationToken",
221
- type: {
222
- name: "String"
223
- }
224
- }
225
- }
226
- }
227
- };
228
- const QueryResult = {
229
- type: {
230
- name: "Composite",
231
- className: "QueryResult",
232
- modelProperties: {
233
- value: {
234
- serializedName: "value",
235
- type: {
236
- name: "Sequence",
237
- element: {
238
- type: {
239
- name: "Dictionary",
240
- value: { type: { name: "any" } }
241
- }
242
- }
243
- }
244
- },
245
- continuationToken: {
246
- serializedName: "continuationToken",
247
- type: {
248
- name: "String"
249
- }
250
- }
251
- }
252
- }
253
- };
254
- const RelationshipCollection = {
255
- type: {
256
- name: "Composite",
257
- className: "RelationshipCollection",
258
- modelProperties: {
259
- value: {
260
- serializedName: "value",
261
- type: {
262
- name: "Sequence",
263
- element: {
264
- type: {
265
- name: "Dictionary",
266
- value: { type: { name: "any" } }
267
- }
268
- }
269
- }
270
- },
271
- nextLink: {
272
- serializedName: "nextLink",
273
- type: {
274
- name: "String"
275
- }
276
- }
277
- }
278
- }
279
- };
280
- const IncomingRelationshipCollection = {
281
- type: {
282
- name: "Composite",
283
- className: "IncomingRelationshipCollection",
284
- modelProperties: {
285
- value: {
286
- serializedName: "value",
287
- type: {
288
- name: "Sequence",
289
- element: {
290
- type: {
291
- name: "Composite",
292
- className: "IncomingRelationship"
293
- }
294
- }
295
- }
296
- },
297
- nextLink: {
298
- serializedName: "nextLink",
299
- type: {
300
- name: "String"
301
- }
302
- }
303
- }
304
- }
305
- };
306
- const IncomingRelationship = {
307
- type: {
308
- name: "Composite",
309
- className: "IncomingRelationship",
310
- modelProperties: {
311
- relationshipId: {
312
- serializedName: "$relationshipId",
313
- type: {
314
- name: "String"
315
- }
316
- },
317
- sourceId: {
318
- serializedName: "$sourceId",
319
- type: {
320
- name: "String"
321
- }
322
- },
323
- relationshipName: {
324
- serializedName: "$relationshipName",
325
- type: {
326
- name: "String"
327
- }
328
- },
329
- relationshipLink: {
330
- serializedName: "$relationshipLink",
331
- type: {
332
- name: "String"
333
- }
334
- }
335
- }
336
- }
337
- };
338
- const EventRouteCollection = {
339
- type: {
340
- name: "Composite",
341
- className: "EventRouteCollection",
342
- modelProperties: {
343
- value: {
344
- serializedName: "value",
345
- type: {
346
- name: "Sequence",
347
- element: {
348
- type: {
349
- name: "Composite",
350
- className: "EventRoute"
351
- }
352
- }
353
- }
354
- },
355
- nextLink: {
356
- serializedName: "nextLink",
357
- type: {
358
- name: "String"
359
- }
360
- }
361
- }
362
- }
363
- };
364
- const EventRoute = {
365
- type: {
366
- name: "Composite",
367
- className: "EventRoute",
368
- modelProperties: {
369
- id: {
370
- serializedName: "id",
371
- readOnly: true,
372
- type: {
373
- name: "String"
374
- }
375
- },
376
- endpointName: {
377
- serializedName: "endpointName",
378
- required: true,
379
- type: {
380
- name: "String"
381
- }
382
- },
383
- filter: {
384
- serializedName: "filter",
385
- required: true,
386
- type: {
387
- name: "String"
388
- }
389
- }
390
- }
391
- }
392
- };
393
- const QueryQueryTwinsHeaders = {
394
- type: {
395
- name: "Composite",
396
- className: "QueryQueryTwinsHeaders",
397
- modelProperties: {
398
- queryCharge: {
399
- serializedName: "query-charge",
400
- type: {
401
- name: "Number"
402
- }
403
- }
404
- }
405
- }
406
- };
407
- const DigitalTwinsGetByIdHeaders = {
408
- type: {
409
- name: "Composite",
410
- className: "DigitalTwinsGetByIdHeaders",
411
- modelProperties: {
412
- etag: {
413
- serializedName: "etag",
414
- type: {
415
- name: "String"
416
- }
417
- }
418
- }
419
- }
420
- };
421
- const DigitalTwinsAddHeaders = {
422
- type: {
423
- name: "Composite",
424
- className: "DigitalTwinsAddHeaders",
425
- modelProperties: {
426
- etag: {
427
- serializedName: "etag",
428
- type: {
429
- name: "String"
430
- }
431
- }
432
- }
433
- }
434
- };
435
- const DigitalTwinsUpdateHeaders = {
436
- type: {
437
- name: "Composite",
438
- className: "DigitalTwinsUpdateHeaders",
439
- modelProperties: {
440
- etag: {
441
- serializedName: "etag",
442
- type: {
443
- name: "String"
444
- }
445
- }
446
- }
447
- }
448
- };
449
- const DigitalTwinsGetRelationshipByIdHeaders = {
450
- type: {
451
- name: "Composite",
452
- className: "DigitalTwinsGetRelationshipByIdHeaders",
453
- modelProperties: {
454
- etag: {
455
- serializedName: "etag",
456
- type: {
457
- name: "String"
458
- }
459
- }
460
- }
461
- }
462
- };
463
- const DigitalTwinsAddRelationshipHeaders = {
464
- type: {
465
- name: "Composite",
466
- className: "DigitalTwinsAddRelationshipHeaders",
467
- modelProperties: {
468
- etag: {
469
- serializedName: "etag",
470
- type: {
471
- name: "String"
472
- }
473
- }
474
- }
475
- }
476
- };
477
- const DigitalTwinsUpdateRelationshipHeaders = {
478
- type: {
479
- name: "Composite",
480
- className: "DigitalTwinsUpdateRelationshipHeaders",
481
- modelProperties: {
482
- etag: {
483
- serializedName: "etag",
484
- type: {
485
- name: "String"
486
- }
487
- }
488
- }
489
- }
490
- };
491
- const DigitalTwinsGetComponentHeaders = {
492
- type: {
493
- name: "Composite",
494
- className: "DigitalTwinsGetComponentHeaders",
495
- modelProperties: {
496
- etag: {
497
- serializedName: "etag",
498
- type: {
499
- name: "String"
500
- }
501
- }
502
- }
503
- }
504
- };
505
- const DigitalTwinsUpdateComponentHeaders = {
506
- type: {
507
- name: "Composite",
508
- className: "DigitalTwinsUpdateComponentHeaders",
509
- modelProperties: {
510
- etag: {
511
- serializedName: "etag",
512
- type: {
513
- name: "String"
514
- }
515
- }
516
- }
517
- }
518
- };
519
-
520
- var Mappers = /*#__PURE__*/Object.freeze({
521
- __proto__: null,
522
- DigitalTwinsAddHeaders: DigitalTwinsAddHeaders,
523
- DigitalTwinsAddRelationshipHeaders: DigitalTwinsAddRelationshipHeaders,
524
- DigitalTwinsGetByIdHeaders: DigitalTwinsGetByIdHeaders,
525
- DigitalTwinsGetComponentHeaders: DigitalTwinsGetComponentHeaders,
526
- DigitalTwinsGetRelationshipByIdHeaders: DigitalTwinsGetRelationshipByIdHeaders,
527
- DigitalTwinsModelData: DigitalTwinsModelData,
528
- DigitalTwinsUpdateComponentHeaders: DigitalTwinsUpdateComponentHeaders,
529
- DigitalTwinsUpdateHeaders: DigitalTwinsUpdateHeaders,
530
- DigitalTwinsUpdateRelationshipHeaders: DigitalTwinsUpdateRelationshipHeaders,
531
- ErrorModel: ErrorModel,
532
- ErrorResponse: ErrorResponse,
533
- EventRoute: EventRoute,
534
- EventRouteCollection: EventRouteCollection,
535
- IncomingRelationship: IncomingRelationship,
536
- IncomingRelationshipCollection: IncomingRelationshipCollection,
537
- InnerError: InnerError,
538
- PagedDigitalTwinsModelDataCollection: PagedDigitalTwinsModelDataCollection,
539
- QueryQueryTwinsHeaders: QueryQueryTwinsHeaders,
540
- QueryResult: QueryResult,
541
- QuerySpecification: QuerySpecification,
542
- RelationshipCollection: RelationshipCollection
543
- });
544
-
545
- /*
546
- * Copyright (c) Microsoft Corporation.
547
- * Licensed under the MIT License.
548
- *
549
- * Code generated by Microsoft (R) AutoRest Code Generator.
550
- * Changes may cause incorrect behavior and will be lost if the code is regenerated.
551
- */
552
- const contentType = {
553
- parameterPath: ["options", "contentType"],
554
- mapper: {
555
- defaultValue: "application/json",
556
- isConstant: true,
557
- serializedName: "Content-Type",
558
- type: {
559
- name: "String"
560
- }
561
- }
562
- };
563
- const models = {
564
- parameterPath: ["options", "models"],
565
- mapper: {
566
- constraints: {
567
- MinItems: 1,
568
- UniqueItems: true
569
- },
570
- serializedName: "models",
571
- type: {
572
- name: "Sequence",
573
- element: {
574
- type: {
575
- name: "Dictionary",
576
- value: { type: { name: "any" } }
577
- }
578
- }
579
- }
580
- }
581
- };
582
- const accept = {
583
- parameterPath: "accept",
584
- mapper: {
585
- defaultValue: "application/json",
586
- isConstant: true,
587
- serializedName: "Accept",
588
- type: {
589
- name: "String"
590
- }
591
- }
592
- };
593
- const $host = {
594
- parameterPath: "$host",
595
- mapper: {
596
- serializedName: "$host",
597
- required: true,
598
- type: {
599
- name: "String"
600
- }
601
- },
602
- skipEncoding: true
603
- };
604
- const apiVersion = {
605
- parameterPath: "apiVersion",
606
- mapper: {
607
- defaultValue: "2020-10-31",
608
- isConstant: true,
609
- serializedName: "api-version",
610
- type: {
611
- name: "String"
612
- }
613
- }
614
- };
615
- const dependenciesFor = {
616
- parameterPath: ["options", "dependenciesFor"],
617
- mapper: {
618
- serializedName: "dependenciesFor",
619
- type: {
620
- name: "Sequence",
621
- element: {
622
- type: {
623
- name: "String"
624
- }
625
- }
626
- }
627
- },
628
- collectionFormat: "Multi"
629
- };
630
- const includeModelDefinition = {
631
- parameterPath: ["options", "includeModelDefinition"],
632
- mapper: {
633
- defaultValue: false,
634
- serializedName: "includeModelDefinition",
635
- type: {
636
- name: "Boolean"
637
- }
638
- }
639
- };
640
- const resultsPerPage = {
641
- parameterPath: ["options", "resultsPerPage"],
642
- mapper: {
643
- serializedName: "max-items-per-page",
644
- type: {
645
- name: "Number"
646
- }
647
- }
648
- };
649
- const id = {
650
- parameterPath: "id",
651
- mapper: {
652
- serializedName: "id",
653
- required: true,
654
- type: {
655
- name: "String"
656
- }
657
- }
658
- };
659
- const contentType1 = {
660
- parameterPath: ["options", "contentType"],
661
- mapper: {
662
- defaultValue: "application/json-patch+json",
663
- isConstant: true,
664
- serializedName: "Content-Type",
665
- type: {
666
- name: "String"
667
- }
668
- }
669
- };
670
- const updateModel = {
671
- parameterPath: "updateModel",
672
- mapper: {
673
- serializedName: "updateModel",
674
- required: true,
675
- type: {
676
- name: "Sequence",
677
- element: {
678
- type: {
679
- name: "Dictionary",
680
- value: { type: { name: "any" } }
681
- }
682
- }
683
- }
684
- }
685
- };
686
- const nextLink = {
687
- parameterPath: "nextLink",
688
- mapper: {
689
- serializedName: "nextLink",
690
- required: true,
691
- type: {
692
- name: "String"
693
- }
694
- },
695
- skipEncoding: true
696
- };
697
- const querySpecification = {
698
- parameterPath: "querySpecification",
699
- mapper: QuerySpecification
700
- };
701
- const twin = {
702
- parameterPath: "twin",
703
- mapper: {
704
- serializedName: "twin",
705
- required: true,
706
- type: {
707
- name: "Dictionary",
708
- value: { type: { name: "any" } }
709
- }
710
- }
711
- };
712
- const ifNoneMatch = {
713
- parameterPath: ["options", "ifNoneMatch"],
714
- mapper: {
715
- serializedName: "If-None-Match",
716
- type: {
717
- name: "String"
718
- }
719
- }
720
- };
721
- const ifMatch = {
722
- parameterPath: ["options", "ifMatch"],
723
- mapper: {
724
- serializedName: "If-Match",
725
- type: {
726
- name: "String"
727
- }
728
- }
729
- };
730
- const patchDocument = {
731
- parameterPath: "patchDocument",
732
- mapper: {
733
- serializedName: "patchDocument",
734
- required: true,
735
- type: {
736
- name: "Sequence",
737
- element: {
738
- type: {
739
- name: "Dictionary",
740
- value: { type: { name: "any" } }
741
- }
742
- }
743
- }
744
- }
745
- };
746
- const relationshipId = {
747
- parameterPath: "relationshipId",
748
- mapper: {
749
- serializedName: "relationshipId",
750
- required: true,
751
- type: {
752
- name: "String"
753
- }
754
- }
755
- };
756
- const relationship = {
757
- parameterPath: "relationship",
758
- mapper: {
759
- serializedName: "relationship",
760
- required: true,
761
- type: {
762
- name: "Dictionary",
763
- value: { type: { name: "any" } }
764
- }
765
- }
766
- };
767
- const relationshipName = {
768
- parameterPath: ["options", "relationshipName"],
769
- mapper: {
770
- serializedName: "relationshipName",
771
- type: {
772
- name: "String"
773
- }
774
- }
775
- };
776
- const telemetry = {
777
- parameterPath: "telemetry",
778
- mapper: {
779
- serializedName: "telemetry",
780
- required: true,
781
- type: {
782
- name: "Dictionary",
783
- value: { type: { name: "any" } }
784
- }
785
- }
786
- };
787
- const messageId = {
788
- parameterPath: "messageId",
789
- mapper: {
790
- serializedName: "Message-Id",
791
- required: true,
792
- type: {
793
- name: "String"
794
- }
795
- }
796
- };
797
- const telemetrySourceTime = {
798
- parameterPath: ["options", "telemetrySourceTime"],
799
- mapper: {
800
- serializedName: "Telemetry-Source-Time",
801
- type: {
802
- name: "String"
803
- }
804
- }
805
- };
806
- const componentPath = {
807
- parameterPath: "componentPath",
808
- mapper: {
809
- serializedName: "componentPath",
810
- required: true,
811
- type: {
812
- name: "String"
813
- }
814
- }
815
- };
816
- const eventRoute = {
817
- parameterPath: ["options", "eventRoute"],
818
- mapper: EventRoute
819
- };
820
-
821
- /*
822
- * Copyright (c) Microsoft Corporation.
823
- * Licensed under the MIT License.
824
- *
825
- * Code generated by Microsoft (R) AutoRest Code Generator.
826
- * Changes may cause incorrect behavior and will be lost if the code is regenerated.
827
- */
828
- /// <reference lib="esnext.asynciterable" />
829
- /** Class containing DigitalTwinModels operations. */
830
- class DigitalTwinModelsImpl {
831
- /**
832
- * Initialize a new instance of the class DigitalTwinModels class.
833
- * @param client Reference to the service client
834
- */
835
- constructor(client) {
836
- this.client = client;
837
- }
838
- /**
839
- * Retrieves model metadata and, optionally, model definitions.
840
- * Status codes:
841
- * * 200 OK
842
- * * 400 Bad Request
843
- * * InvalidArgument - The model id is invalid.
844
- * * LimitExceeded - The maximum number of model ids allowed in 'dependenciesFor' has been reached.
845
- * * 404 Not Found
846
- * * ModelNotFound - The model was not found.
847
- * @param options The options parameters.
848
- */
849
- list(options) {
850
- const iter = this.listPagingAll(options);
851
- return {
852
- next() {
853
- return iter.next();
854
- },
855
- [Symbol.asyncIterator]() {
856
- return this;
857
- },
858
- byPage: (settings) => {
859
- if (settings === null || settings === void 0 ? void 0 : settings.maxPageSize) {
860
- throw new Error("maxPageSize is not supported by this operation.");
861
- }
862
- return this.listPagingPage(options, settings);
863
- }
864
- };
865
- }
866
- listPagingPage(options, settings) {
867
- return tslib.__asyncGenerator(this, arguments, function* listPagingPage_1() {
868
- let result;
869
- let continuationToken = settings === null || settings === void 0 ? void 0 : settings.continuationToken;
870
- if (!continuationToken) {
871
- result = yield tslib.__await(this._list(options));
872
- let page = result.value || [];
873
- continuationToken = result.nextLink;
874
- setContinuationToken(page, continuationToken);
875
- yield yield tslib.__await(page);
876
- }
877
- while (continuationToken) {
878
- result = yield tslib.__await(this._listNext(continuationToken, options));
879
- continuationToken = result.nextLink;
880
- let page = result.value || [];
881
- setContinuationToken(page, continuationToken);
882
- yield yield tslib.__await(page);
883
- }
884
- });
885
- }
886
- listPagingAll(options) {
887
- return tslib.__asyncGenerator(this, arguments, function* listPagingAll_1() {
888
- var _a, e_1, _b, _c;
889
- try {
890
- for (var _d = true, _e = tslib.__asyncValues(this.listPagingPage(options)), _f; _f = yield tslib.__await(_e.next()), _a = _f.done, !_a; _d = true) {
891
- _c = _f.value;
892
- _d = false;
893
- const page = _c;
894
- yield tslib.__await(yield* tslib.__asyncDelegator(tslib.__asyncValues(page)));
895
- }
896
- }
897
- catch (e_1_1) { e_1 = { error: e_1_1 }; }
898
- finally {
899
- try {
900
- if (!_d && !_a && (_b = _e.return)) yield tslib.__await(_b.call(_e));
901
- }
902
- finally { if (e_1) throw e_1.error; }
903
- }
904
- });
905
- }
906
- /**
907
- * Uploads one or more models. When any error occurs, no models are uploaded.
908
- * Status codes:
909
- * * 201 Created
910
- * * 400 Bad Request
911
- * * DTDLParserError - The models provided are not valid DTDL.
912
- * * InvalidArgument - The model id is invalid.
913
- * * LimitExceeded - The maximum number of model ids allowed in 'dependenciesFor' has been reached.
914
- * * ModelVersionNotSupported - The version of DTDL used is not supported.
915
- * * 409 Conflict
916
- * * ModelAlreadyExists - The model provided already exists.
917
- * @param options The options parameters.
918
- */
919
- add(options) {
920
- return this.client.sendOperationRequest({ options }, addOperationSpec$2);
921
- }
922
- /**
923
- * Retrieves model metadata and, optionally, model definitions.
924
- * Status codes:
925
- * * 200 OK
926
- * * 400 Bad Request
927
- * * InvalidArgument - The model id is invalid.
928
- * * LimitExceeded - The maximum number of model ids allowed in 'dependenciesFor' has been reached.
929
- * * 404 Not Found
930
- * * ModelNotFound - The model was not found.
931
- * @param options The options parameters.
932
- */
933
- _list(options) {
934
- return this.client.sendOperationRequest({ options }, listOperationSpec$1);
935
- }
936
- /**
937
- * Retrieves model metadata and optionally the model definition.
938
- * Status codes:
939
- * * 200 OK
940
- * * 400 Bad Request
941
- * * InvalidArgument - The model id is invalid.
942
- * * MissingArgument - The model id was not provided.
943
- * * 404 Not Found
944
- * * ModelNotFound - The model was not found.
945
- * @param id The id for the model. The id is globally unique and case sensitive.
946
- * @param options The options parameters.
947
- */
948
- getById(id, options) {
949
- return this.client.sendOperationRequest({ id, options }, getByIdOperationSpec$2);
950
- }
951
- /**
952
- * Updates the metadata for a model.
953
- * Status codes:
954
- * * 204 No Content
955
- * * 400 Bad Request
956
- * * InvalidArgument - The model id is invalid.
957
- * * JsonPatchInvalid - The JSON Patch provided is invalid.
958
- * * MissingArgument - The model id was not provided.
959
- * * 404 Not Found
960
- * * ModelNotFound - The model was not found.
961
- * * 409 Conflict
962
- * * ModelReferencesNotDecommissioned - The model refers to models that are not decommissioned.
963
- * @param id The id for the model. The id is globally unique and case sensitive.
964
- * @param updateModel An update specification described by JSON Patch. Only the decommissioned property
965
- * can be replaced.
966
- * @param options The options parameters.
967
- */
968
- update(id, updateModel, options) {
969
- return this.client.sendOperationRequest({ id, updateModel, options }, updateOperationSpec$1);
970
- }
971
- /**
972
- * Deletes a model. A model can only be deleted if no other models reference it.
973
- * Status codes:
974
- * * 204 No Content
975
- * * 400 Bad Request
976
- * * InvalidArgument - The model id is invalid.
977
- * * MissingArgument - The model id was not provided.
978
- * * 404 Not Found
979
- * * ModelNotFound - The model was not found.
980
- * * 409 Conflict
981
- * * ModelReferencesNotDeleted - The model refers to models that are not deleted.
982
- * @param id The id for the model. The id is globally unique and case sensitive.
983
- * @param options The options parameters.
984
- */
985
- delete(id, options) {
986
- return this.client.sendOperationRequest({ id, options }, deleteOperationSpec$2);
987
- }
988
- /**
989
- * ListNext
990
- * @param nextLink The nextLink from the previous successful call to the List method.
991
- * @param options The options parameters.
992
- */
993
- _listNext(nextLink, options) {
994
- return this.client.sendOperationRequest({ nextLink, options }, listNextOperationSpec$1);
995
- }
996
- }
997
- // Operation Specifications
998
- const serializer$3 = coreClient__namespace.createSerializer(Mappers, /* isXml */ false);
999
- const addOperationSpec$2 = {
1000
- path: "/models",
1001
- httpMethod: "POST",
1002
- responses: {
1003
- 201: {
1004
- bodyMapper: {
1005
- type: {
1006
- name: "Sequence",
1007
- element: {
1008
- type: { name: "Composite", className: "DigitalTwinsModelData" }
1009
- }
1010
- }
1011
- }
1012
- },
1013
- default: {
1014
- bodyMapper: ErrorResponse
1015
- }
1016
- },
1017
- requestBody: models,
1018
- queryParameters: [apiVersion],
1019
- urlParameters: [$host],
1020
- headerParameters: [contentType, accept],
1021
- mediaType: "json",
1022
- serializer: serializer$3
1023
- };
1024
- const listOperationSpec$1 = {
1025
- path: "/models",
1026
- httpMethod: "GET",
1027
- responses: {
1028
- 200: {
1029
- bodyMapper: PagedDigitalTwinsModelDataCollection
1030
- },
1031
- default: {
1032
- bodyMapper: ErrorResponse
1033
- }
1034
- },
1035
- queryParameters: [
1036
- apiVersion,
1037
- dependenciesFor,
1038
- includeModelDefinition
1039
- ],
1040
- urlParameters: [$host],
1041
- headerParameters: [accept, resultsPerPage],
1042
- serializer: serializer$3
1043
- };
1044
- const getByIdOperationSpec$2 = {
1045
- path: "/models/{id}",
1046
- httpMethod: "GET",
1047
- responses: {
1048
- 200: {
1049
- bodyMapper: DigitalTwinsModelData
1050
- },
1051
- default: {
1052
- bodyMapper: ErrorResponse
1053
- }
1054
- },
1055
- queryParameters: [apiVersion, includeModelDefinition],
1056
- urlParameters: [$host, id],
1057
- headerParameters: [accept],
1058
- serializer: serializer$3
1059
- };
1060
- const updateOperationSpec$1 = {
1061
- path: "/models/{id}",
1062
- httpMethod: "PATCH",
1063
- responses: {
1064
- 204: {},
1065
- default: {
1066
- bodyMapper: ErrorResponse
1067
- }
1068
- },
1069
- requestBody: updateModel,
1070
- queryParameters: [apiVersion],
1071
- urlParameters: [$host, id],
1072
- headerParameters: [accept, contentType1],
1073
- mediaType: "json",
1074
- serializer: serializer$3
1075
- };
1076
- const deleteOperationSpec$2 = {
1077
- path: "/models/{id}",
1078
- httpMethod: "DELETE",
1079
- responses: {
1080
- 204: {},
1081
- default: {
1082
- bodyMapper: ErrorResponse
1083
- }
1084
- },
1085
- queryParameters: [apiVersion],
1086
- urlParameters: [$host, id],
1087
- headerParameters: [accept],
1088
- serializer: serializer$3
1089
- };
1090
- const listNextOperationSpec$1 = {
1091
- path: "{nextLink}",
1092
- httpMethod: "GET",
1093
- responses: {
1094
- 200: {
1095
- bodyMapper: PagedDigitalTwinsModelDataCollection
1096
- },
1097
- default: {
1098
- bodyMapper: ErrorResponse
1099
- }
1100
- },
1101
- urlParameters: [$host, nextLink],
1102
- headerParameters: [accept, resultsPerPage],
1103
- serializer: serializer$3
1104
- };
1105
-
1106
- /*
1107
- * Copyright (c) Microsoft Corporation.
1108
- * Licensed under the MIT License.
1109
- *
1110
- * Code generated by Microsoft (R) AutoRest Code Generator.
1111
- * Changes may cause incorrect behavior and will be lost if the code is regenerated.
1112
- */
1113
- /** Class containing Query operations. */
1114
- class QueryImpl {
1115
- /**
1116
- * Initialize a new instance of the class Query class.
1117
- * @param client Reference to the service client
1118
- */
1119
- constructor(client) {
1120
- this.client = client;
1121
- }
1122
- /**
1123
- * Executes a query that allows traversing relationships and filtering by property values.
1124
- * Status codes:
1125
- * * 200 OK
1126
- * * 400 Bad Request
1127
- * * BadRequest - The continuation token is invalid.
1128
- * * SqlQueryError - The query contains some errors.
1129
- * * TimeoutError - The query execution timed out after 60 seconds. Try simplifying the query or
1130
- * adding conditions to reduce the result size.
1131
- * * 429 Too Many Requests
1132
- * * QuotaReachedError - The maximum query rate limit has been reached.
1133
- * @param querySpecification The query specification to execute.
1134
- * @param options The options parameters.
1135
- */
1136
- queryTwins(querySpecification, options) {
1137
- return this.client.sendOperationRequest({ querySpecification, options }, queryTwinsOperationSpec);
1138
- }
1139
- }
1140
- // Operation Specifications
1141
- const serializer$2 = coreClient__namespace.createSerializer(Mappers, /* isXml */ false);
1142
- const queryTwinsOperationSpec = {
1143
- path: "/query",
1144
- httpMethod: "POST",
1145
- responses: {
1146
- 200: {
1147
- bodyMapper: QueryResult,
1148
- headersMapper: QueryQueryTwinsHeaders
1149
- },
1150
- default: {
1151
- bodyMapper: ErrorResponse
1152
- }
1153
- },
1154
- requestBody: querySpecification,
1155
- queryParameters: [apiVersion],
1156
- urlParameters: [$host],
1157
- headerParameters: [
1158
- contentType,
1159
- accept,
1160
- resultsPerPage
1161
- ],
1162
- mediaType: "json",
1163
- serializer: serializer$2
1164
- };
1165
-
1166
- /*
1167
- * Copyright (c) Microsoft Corporation.
1168
- * Licensed under the MIT License.
1169
- *
1170
- * Code generated by Microsoft (R) AutoRest Code Generator.
1171
- * Changes may cause incorrect behavior and will be lost if the code is regenerated.
1172
- */
1173
- /// <reference lib="esnext.asynciterable" />
1174
- /** Class containing DigitalTwins operations. */
1175
- class DigitalTwinsImpl {
1176
- /**
1177
- * Initialize a new instance of the class DigitalTwins class.
1178
- * @param client Reference to the service client
1179
- */
1180
- constructor(client) {
1181
- this.client = client;
1182
- }
1183
- /**
1184
- * Retrieves the relationships from a digital twin.
1185
- * Status codes:
1186
- * * 200 OK
1187
- * * 400 Bad Request
1188
- * * InvalidArgument - The digital twin id is invalid.
1189
- * * 404 Not Found
1190
- * * DigitalTwinNotFound - The digital twin was not found.
1191
- * @param id The id of the digital twin. The id is unique within the service and case sensitive.
1192
- * @param options The options parameters.
1193
- */
1194
- listRelationships(id, options) {
1195
- const iter = this.listRelationshipsPagingAll(id, options);
1196
- return {
1197
- next() {
1198
- return iter.next();
1199
- },
1200
- [Symbol.asyncIterator]() {
1201
- return this;
1202
- },
1203
- byPage: (settings) => {
1204
- if (settings === null || settings === void 0 ? void 0 : settings.maxPageSize) {
1205
- throw new Error("maxPageSize is not supported by this operation.");
1206
- }
1207
- return this.listRelationshipsPagingPage(id, options, settings);
1208
- }
1209
- };
1210
- }
1211
- listRelationshipsPagingPage(id, options, settings) {
1212
- return tslib.__asyncGenerator(this, arguments, function* listRelationshipsPagingPage_1() {
1213
- let result;
1214
- let continuationToken = settings === null || settings === void 0 ? void 0 : settings.continuationToken;
1215
- if (!continuationToken) {
1216
- result = yield tslib.__await(this._listRelationships(id, options));
1217
- let page = result.value || [];
1218
- continuationToken = result.nextLink;
1219
- setContinuationToken(page, continuationToken);
1220
- yield yield tslib.__await(page);
1221
- }
1222
- while (continuationToken) {
1223
- result = yield tslib.__await(this._listRelationshipsNext(id, continuationToken, options));
1224
- continuationToken = result.nextLink;
1225
- let page = result.value || [];
1226
- setContinuationToken(page, continuationToken);
1227
- yield yield tslib.__await(page);
1228
- }
1229
- });
1230
- }
1231
- listRelationshipsPagingAll(id, options) {
1232
- return tslib.__asyncGenerator(this, arguments, function* listRelationshipsPagingAll_1() {
1233
- var _a, e_1, _b, _c;
1234
- try {
1235
- for (var _d = true, _e = tslib.__asyncValues(this.listRelationshipsPagingPage(id, options)), _f; _f = yield tslib.__await(_e.next()), _a = _f.done, !_a; _d = true) {
1236
- _c = _f.value;
1237
- _d = false;
1238
- const page = _c;
1239
- yield tslib.__await(yield* tslib.__asyncDelegator(tslib.__asyncValues(page)));
1240
- }
1241
- }
1242
- catch (e_1_1) { e_1 = { error: e_1_1 }; }
1243
- finally {
1244
- try {
1245
- if (!_d && !_a && (_b = _e.return)) yield tslib.__await(_b.call(_e));
1246
- }
1247
- finally { if (e_1) throw e_1.error; }
1248
- }
1249
- });
1250
- }
1251
- /**
1252
- * Retrieves all incoming relationship for a digital twin.
1253
- * Status codes:
1254
- * * 200 OK
1255
- * * 400 Bad Request
1256
- * * InvalidArgument - The digital twin id is invalid.
1257
- * * 404 Not Found
1258
- * * DigitalTwinNotFound - The digital twin was not found.
1259
- * @param id The id of the digital twin. The id is unique within the service and case sensitive.
1260
- * @param options The options parameters.
1261
- */
1262
- listIncomingRelationships(id, options) {
1263
- const iter = this.listIncomingRelationshipsPagingAll(id, options);
1264
- return {
1265
- next() {
1266
- return iter.next();
1267
- },
1268
- [Symbol.asyncIterator]() {
1269
- return this;
1270
- },
1271
- byPage: (settings) => {
1272
- if (settings === null || settings === void 0 ? void 0 : settings.maxPageSize) {
1273
- throw new Error("maxPageSize is not supported by this operation.");
1274
- }
1275
- return this.listIncomingRelationshipsPagingPage(id, options, settings);
1276
- }
1277
- };
1278
- }
1279
- listIncomingRelationshipsPagingPage(id, options, settings) {
1280
- return tslib.__asyncGenerator(this, arguments, function* listIncomingRelationshipsPagingPage_1() {
1281
- let result;
1282
- let continuationToken = settings === null || settings === void 0 ? void 0 : settings.continuationToken;
1283
- if (!continuationToken) {
1284
- result = yield tslib.__await(this._listIncomingRelationships(id, options));
1285
- let page = result.value || [];
1286
- continuationToken = result.nextLink;
1287
- setContinuationToken(page, continuationToken);
1288
- yield yield tslib.__await(page);
1289
- }
1290
- while (continuationToken) {
1291
- result = yield tslib.__await(this._listIncomingRelationshipsNext(id, continuationToken, options));
1292
- continuationToken = result.nextLink;
1293
- let page = result.value || [];
1294
- setContinuationToken(page, continuationToken);
1295
- yield yield tslib.__await(page);
1296
- }
1297
- });
1298
- }
1299
- listIncomingRelationshipsPagingAll(id, options) {
1300
- return tslib.__asyncGenerator(this, arguments, function* listIncomingRelationshipsPagingAll_1() {
1301
- var _a, e_2, _b, _c;
1302
- try {
1303
- for (var _d = true, _e = tslib.__asyncValues(this.listIncomingRelationshipsPagingPage(id, options)), _f; _f = yield tslib.__await(_e.next()), _a = _f.done, !_a; _d = true) {
1304
- _c = _f.value;
1305
- _d = false;
1306
- const page = _c;
1307
- yield tslib.__await(yield* tslib.__asyncDelegator(tslib.__asyncValues(page)));
1308
- }
1309
- }
1310
- catch (e_2_1) { e_2 = { error: e_2_1 }; }
1311
- finally {
1312
- try {
1313
- if (!_d && !_a && (_b = _e.return)) yield tslib.__await(_b.call(_e));
1314
- }
1315
- finally { if (e_2) throw e_2.error; }
1316
- }
1317
- });
1318
- }
1319
- /**
1320
- * Retrieves a digital twin.
1321
- * Status codes:
1322
- * * 200 OK
1323
- * * 400 Bad Request
1324
- * * InvalidArgument - The digital twin id is invalid.
1325
- * * 404 Not Found
1326
- * * DigitalTwinNotFound - The digital twin was not found.
1327
- * @param id The id of the digital twin. The id is unique within the service and case sensitive.
1328
- * @param options The options parameters.
1329
- */
1330
- getById(id, options) {
1331
- return this.client.sendOperationRequest({ id, options }, getByIdOperationSpec$1);
1332
- }
1333
- /**
1334
- * Adds or replaces a digital twin.
1335
- * Status codes:
1336
- * * 200 OK
1337
- * * 400 Bad Request
1338
- * * InvalidArgument - The digital twin id or payload is invalid.
1339
- * * ModelDecommissioned - The model for the digital twin is decommissioned.
1340
- * * TwinLimitReached - The maximum number of digital twins allowed has been reached.
1341
- * * ValidationFailed - The digital twin payload is not valid.
1342
- * * 412 Precondition Failed
1343
- * * PreconditionFailed - The precondition check (If-Match or If-None-Match) failed.
1344
- * @param id The id of the digital twin. The id is unique within the service and case sensitive.
1345
- * @param twin The digital twin instance being added. If provided, the $dtId property is ignored.
1346
- * @param options The options parameters.
1347
- */
1348
- add(id, twin, options) {
1349
- return this.client.sendOperationRequest({ id, twin, options }, addOperationSpec$1);
1350
- }
1351
- /**
1352
- * Deletes a digital twin. All relationships referencing the digital twin must already be deleted.
1353
- * Status codes:
1354
- * * 204 No Content
1355
- * * 400 Bad Request
1356
- * * InvalidArgument - The digital twin id is invalid.
1357
- * * RelationshipsNotDeleted - The digital twin contains relationships.
1358
- * * 404 Not Found
1359
- * * DigitalTwinNotFound - The digital twin was not found.
1360
- * * 412 Precondition Failed
1361
- * * PreconditionFailed - The precondition check (If-Match or If-None-Match) failed.
1362
- * @param id The id of the digital twin. The id is unique within the service and case sensitive.
1363
- * @param options The options parameters.
1364
- */
1365
- delete(id, options) {
1366
- return this.client.sendOperationRequest({ id, options }, deleteOperationSpec$1);
1367
- }
1368
- /**
1369
- * Updates a digital twin.
1370
- * Status codes:
1371
- * * 204 No Content
1372
- * * 400 Bad Request
1373
- * * InvalidArgument - The digital twin id or payload is invalid.
1374
- * * JsonPatchInvalid - The JSON Patch provided is invalid.
1375
- * * ValidationFailed - Applying the patch results in an invalid digital twin.
1376
- * * 404 Not Found
1377
- * * DigitalTwinNotFound - The digital twin was not found.
1378
- * * 412 Precondition Failed
1379
- * * PreconditionFailed - The precondition check (If-Match or If-None-Match) failed.
1380
- * @param id The id of the digital twin. The id is unique within the service and case sensitive.
1381
- * @param patchDocument An update specification described by JSON Patch. Updates to property values and
1382
- * $model elements may happen in the same request. Operations are limited to add, replace and remove.
1383
- * @param options The options parameters.
1384
- */
1385
- update(id, patchDocument, options) {
1386
- return this.client.sendOperationRequest({ id, patchDocument, options }, updateOperationSpec);
1387
- }
1388
- /**
1389
- * Retrieves a relationship between two digital twins.
1390
- * Status codes:
1391
- * * 200 OK
1392
- * * 400 Bad Request
1393
- * * InvalidArgument - The digital twin id or relationship id is invalid.
1394
- * * 404 Not Found
1395
- * * DigitalTwinNotFound - The digital twin was not found.
1396
- * * RelationshipNotFound - The relationship was not found.
1397
- * @param id The id of the digital twin. The id is unique within the service and case sensitive.
1398
- * @param relationshipId The id of the relationship. The id is unique within the digital twin and case
1399
- * sensitive.
1400
- * @param options The options parameters.
1401
- */
1402
- getRelationshipById(id, relationshipId, options) {
1403
- return this.client.sendOperationRequest({ id, relationshipId, options }, getRelationshipByIdOperationSpec);
1404
- }
1405
- /**
1406
- * Adds a relationship between two digital twins.
1407
- * Status codes:
1408
- * * 200 OK
1409
- * * 400 Bad Request
1410
- * * InvalidArgument - The digital twin id, relationship id, or payload is invalid.
1411
- * * InvalidRelationship - The relationship is invalid.
1412
- * * OperationNotAllowed - The relationship cannot connect to the same digital twin.
1413
- * * ValidationFailed - The relationship content is invalid.
1414
- * * 404 Not Found
1415
- * * DigitalTwinNotFound - The digital twin was not found.
1416
- * * TargetTwinNotFound - The digital twin target of the relationship was not found.
1417
- * * 412 Precondition Failed
1418
- * * PreconditionFailed - The precondition check (If-Match or If-None-Match) failed.
1419
- * @param id The id of the digital twin. The id is unique within the service and case sensitive.
1420
- * @param relationshipId The id of the relationship. The id is unique within the digital twin and case
1421
- * sensitive.
1422
- * @param relationship The data for the relationship.
1423
- * @param options The options parameters.
1424
- */
1425
- addRelationship(id, relationshipId, relationship, options) {
1426
- return this.client.sendOperationRequest({ id, relationshipId, relationship, options }, addRelationshipOperationSpec);
1427
- }
1428
- /**
1429
- * Deletes a relationship between two digital twins.
1430
- * Status codes:
1431
- * * 204 No Content
1432
- * * 400 Bad Request
1433
- * * InvalidArgument - The digital twin id or relationship id is invalid.
1434
- * * 404 Not Found
1435
- * * DigitalTwinNotFound - The digital twin was not found.
1436
- * * RelationshipNotFound - The relationship was not found.
1437
- * * 412 Precondition Failed
1438
- * * PreconditionFailed - The precondition check (If-Match or If-None-Match) failed.
1439
- * @param id The id of the digital twin. The id is unique within the service and case sensitive.
1440
- * @param relationshipId The id of the relationship. The id is unique within the digital twin and case
1441
- * sensitive.
1442
- * @param options The options parameters.
1443
- */
1444
- deleteRelationship(id, relationshipId, options) {
1445
- return this.client.sendOperationRequest({ id, relationshipId, options }, deleteRelationshipOperationSpec);
1446
- }
1447
- /**
1448
- * Updates the properties on a relationship between two digital twins.
1449
- * Status codes:
1450
- * * 204 No Content
1451
- * * 400 Bad Request
1452
- * * InvalidArgument - The digital twin id or relationship id is invalid.
1453
- * * InvalidRelationship - The relationship is invalid.
1454
- * * JsonPatchInvalid - The JSON Patch provided is invalid.
1455
- * * ValidationFailed - The relationship content is invalid.
1456
- * * 404 Not Found
1457
- * * DigitalTwinNotFound - The digital twin was not found.
1458
- * * RelationshipNotFound - The relationship was not found.
1459
- * * 409 Conflict
1460
- * * RelationshipAlreadyExists - The relationship already exists.
1461
- * * 412 Precondition Failed
1462
- * * PreconditionFailed - The precondition check (If-Match or If-None-Match) failed.
1463
- * @param id The id of the digital twin. The id is unique within the service and case sensitive.
1464
- * @param relationshipId The id of the relationship. The id is unique within the digital twin and case
1465
- * sensitive.
1466
- * @param patchDocument JSON Patch description of the update to the relationship properties.
1467
- * @param options The options parameters.
1468
- */
1469
- updateRelationship(id, relationshipId, patchDocument, options) {
1470
- return this.client.sendOperationRequest({ id, relationshipId, patchDocument, options }, updateRelationshipOperationSpec);
1471
- }
1472
- /**
1473
- * Retrieves the relationships from a digital twin.
1474
- * Status codes:
1475
- * * 200 OK
1476
- * * 400 Bad Request
1477
- * * InvalidArgument - The digital twin id is invalid.
1478
- * * 404 Not Found
1479
- * * DigitalTwinNotFound - The digital twin was not found.
1480
- * @param id The id of the digital twin. The id is unique within the service and case sensitive.
1481
- * @param options The options parameters.
1482
- */
1483
- _listRelationships(id, options) {
1484
- return this.client.sendOperationRequest({ id, options }, listRelationshipsOperationSpec);
1485
- }
1486
- /**
1487
- * Retrieves all incoming relationship for a digital twin.
1488
- * Status codes:
1489
- * * 200 OK
1490
- * * 400 Bad Request
1491
- * * InvalidArgument - The digital twin id is invalid.
1492
- * * 404 Not Found
1493
- * * DigitalTwinNotFound - The digital twin was not found.
1494
- * @param id The id of the digital twin. The id is unique within the service and case sensitive.
1495
- * @param options The options parameters.
1496
- */
1497
- _listIncomingRelationships(id, options) {
1498
- return this.client.sendOperationRequest({ id, options }, listIncomingRelationshipsOperationSpec);
1499
- }
1500
- /**
1501
- * Sends telemetry on behalf of a digital twin.
1502
- * Status codes:
1503
- * * 204 No Content
1504
- * * 400 Bad Request
1505
- * * InvalidArgument - The digital twin id or message id is invalid.
1506
- * * ValidationFailed - The telemetry content is invalid.
1507
- * * 404 Not Found
1508
- * * DigitalTwinNotFound - The digital twin was not found.
1509
- * @param id The id of the digital twin. The id is unique within the service and case sensitive.
1510
- * @param messageId A unique message identifier (in the scope of the digital twin id) that is commonly
1511
- * used for de-duplicating messages.
1512
- * @param telemetry The telemetry measurements to send from the digital twin.
1513
- * @param options The options parameters.
1514
- */
1515
- sendTelemetry(id, messageId, telemetry, options) {
1516
- return this.client.sendOperationRequest({ id, messageId, telemetry, options }, sendTelemetryOperationSpec);
1517
- }
1518
- /**
1519
- * Sends telemetry on behalf of a component in a digital twin.
1520
- * Status codes:
1521
- * * 204 No Content
1522
- * * 400 Bad Request
1523
- * * InvalidArgument - The digital twin id, message id, or component path is invalid.
1524
- * * ValidationFailed - The telemetry content is invalid.
1525
- * * 404 Not Found
1526
- * * DigitalTwinNotFound - The digital twin was not found.
1527
- * * ComponentNotFound - The component path was not found.
1528
- * @param id The id of the digital twin. The id is unique within the service and case sensitive.
1529
- * @param componentPath The name of the DTDL component.
1530
- * @param messageId A unique message identifier (in the scope of the digital twin id) that is commonly
1531
- * used for de-duplicating messages.
1532
- * @param telemetry The telemetry measurements to send from the digital twin's component.
1533
- * @param options The options parameters.
1534
- */
1535
- sendComponentTelemetry(id, componentPath, messageId, telemetry, options) {
1536
- return this.client.sendOperationRequest({ id, componentPath, messageId, telemetry, options }, sendComponentTelemetryOperationSpec);
1537
- }
1538
- /**
1539
- * Retrieves a component from a digital twin.
1540
- * Status codes:
1541
- * * 200 OK
1542
- * * 400 Bad Request
1543
- * * InvalidArgument - The digital twin id or component path is invalid.
1544
- * * 404 Not Found
1545
- * * DigitalTwinNotFound - The digital twin was not found.
1546
- * * ComponentNotFound - The component path was not found.
1547
- * @param id The id of the digital twin. The id is unique within the service and case sensitive.
1548
- * @param componentPath The name of the DTDL component.
1549
- * @param options The options parameters.
1550
- */
1551
- getComponent(id, componentPath, options) {
1552
- return this.client.sendOperationRequest({ id, componentPath, options }, getComponentOperationSpec);
1553
- }
1554
- /**
1555
- * Updates a component on a digital twin.
1556
- * Status codes:
1557
- * * 204 No Content
1558
- * * 400 Bad Request
1559
- * * InvalidArgument - The digital twin id, component path, or payload is invalid.
1560
- * * JsonPatchInvalid - The JSON Patch provided is invalid.
1561
- * * ValidationFailed - Applying the patch results in an invalid digital twin.
1562
- * * 404 Not Found
1563
- * * DigitalTwinNotFound - The digital twin was not found.
1564
- * * 412 Precondition Failed
1565
- * * PreconditionFailed - The precondition check (If-Match or If-None-Match) failed.
1566
- * @param id The id of the digital twin. The id is unique within the service and case sensitive.
1567
- * @param componentPath The name of the DTDL component.
1568
- * @param patchDocument An update specification described by JSON Patch. Updates to property values and
1569
- * $model elements may happen in the same request. Operations are limited to add, replace and remove.
1570
- * @param options The options parameters.
1571
- */
1572
- updateComponent(id, componentPath, patchDocument, options) {
1573
- return this.client.sendOperationRequest({ id, componentPath, patchDocument, options }, updateComponentOperationSpec);
1574
- }
1575
- /**
1576
- * ListRelationshipsNext
1577
- * @param id The id of the digital twin. The id is unique within the service and case sensitive.
1578
- * @param nextLink The nextLink from the previous successful call to the ListRelationships method.
1579
- * @param options The options parameters.
1580
- */
1581
- _listRelationshipsNext(id, nextLink, options) {
1582
- return this.client.sendOperationRequest({ id, nextLink, options }, listRelationshipsNextOperationSpec);
1583
- }
1584
- /**
1585
- * ListIncomingRelationshipsNext
1586
- * @param id The id of the digital twin. The id is unique within the service and case sensitive.
1587
- * @param nextLink The nextLink from the previous successful call to the ListIncomingRelationships
1588
- * method.
1589
- * @param options The options parameters.
1590
- */
1591
- _listIncomingRelationshipsNext(id, nextLink, options) {
1592
- return this.client.sendOperationRequest({ id, nextLink, options }, listIncomingRelationshipsNextOperationSpec);
1593
- }
1594
- }
1595
- // Operation Specifications
1596
- const serializer$1 = coreClient__namespace.createSerializer(Mappers, /* isXml */ false);
1597
- const getByIdOperationSpec$1 = {
1598
- path: "/digitaltwins/{id}",
1599
- httpMethod: "GET",
1600
- responses: {
1601
- 200: {
1602
- bodyMapper: {
1603
- type: { name: "Dictionary", value: { type: { name: "any" } } }
1604
- },
1605
- headersMapper: DigitalTwinsGetByIdHeaders
1606
- },
1607
- default: {
1608
- bodyMapper: ErrorResponse
1609
- }
1610
- },
1611
- queryParameters: [apiVersion],
1612
- urlParameters: [$host, id],
1613
- headerParameters: [accept],
1614
- serializer: serializer$1
1615
- };
1616
- const addOperationSpec$1 = {
1617
- path: "/digitaltwins/{id}",
1618
- httpMethod: "PUT",
1619
- responses: {
1620
- 200: {
1621
- bodyMapper: {
1622
- type: { name: "Dictionary", value: { type: { name: "any" } } }
1623
- },
1624
- headersMapper: DigitalTwinsAddHeaders
1625
- },
1626
- 202: {},
1627
- default: {
1628
- bodyMapper: ErrorResponse
1629
- }
1630
- },
1631
- requestBody: twin,
1632
- queryParameters: [apiVersion],
1633
- urlParameters: [$host, id],
1634
- headerParameters: [
1635
- contentType,
1636
- accept,
1637
- ifNoneMatch
1638
- ],
1639
- mediaType: "json",
1640
- serializer: serializer$1
1641
- };
1642
- const deleteOperationSpec$1 = {
1643
- path: "/digitaltwins/{id}",
1644
- httpMethod: "DELETE",
1645
- responses: {
1646
- 204: {},
1647
- default: {
1648
- bodyMapper: ErrorResponse
1649
- }
1650
- },
1651
- queryParameters: [apiVersion],
1652
- urlParameters: [$host, id],
1653
- headerParameters: [accept, ifMatch],
1654
- serializer: serializer$1
1655
- };
1656
- const updateOperationSpec = {
1657
- path: "/digitaltwins/{id}",
1658
- httpMethod: "PATCH",
1659
- responses: {
1660
- 202: {},
1661
- 204: {
1662
- headersMapper: DigitalTwinsUpdateHeaders
1663
- },
1664
- default: {
1665
- bodyMapper: ErrorResponse
1666
- }
1667
- },
1668
- requestBody: patchDocument,
1669
- queryParameters: [apiVersion],
1670
- urlParameters: [$host, id],
1671
- headerParameters: [
1672
- accept,
1673
- contentType1,
1674
- ifMatch
1675
- ],
1676
- mediaType: "json",
1677
- serializer: serializer$1
1678
- };
1679
- const getRelationshipByIdOperationSpec = {
1680
- path: "/digitaltwins/{id}/relationships/{relationshipId}",
1681
- httpMethod: "GET",
1682
- responses: {
1683
- 200: {
1684
- bodyMapper: {
1685
- type: { name: "Dictionary", value: { type: { name: "any" } } }
1686
- },
1687
- headersMapper: DigitalTwinsGetRelationshipByIdHeaders
1688
- },
1689
- default: {
1690
- bodyMapper: ErrorResponse
1691
- }
1692
- },
1693
- queryParameters: [apiVersion],
1694
- urlParameters: [$host, id, relationshipId],
1695
- headerParameters: [accept],
1696
- serializer: serializer$1
1697
- };
1698
- const addRelationshipOperationSpec = {
1699
- path: "/digitaltwins/{id}/relationships/{relationshipId}",
1700
- httpMethod: "PUT",
1701
- responses: {
1702
- 200: {
1703
- bodyMapper: {
1704
- type: { name: "Dictionary", value: { type: { name: "any" } } }
1705
- },
1706
- headersMapper: DigitalTwinsAddRelationshipHeaders
1707
- },
1708
- default: {
1709
- bodyMapper: ErrorResponse
1710
- }
1711
- },
1712
- requestBody: relationship,
1713
- queryParameters: [apiVersion],
1714
- urlParameters: [$host, id, relationshipId],
1715
- headerParameters: [
1716
- contentType,
1717
- accept,
1718
- ifNoneMatch
1719
- ],
1720
- mediaType: "json",
1721
- serializer: serializer$1
1722
- };
1723
- const deleteRelationshipOperationSpec = {
1724
- path: "/digitaltwins/{id}/relationships/{relationshipId}",
1725
- httpMethod: "DELETE",
1726
- responses: {
1727
- 204: {},
1728
- default: {
1729
- bodyMapper: ErrorResponse
1730
- }
1731
- },
1732
- queryParameters: [apiVersion],
1733
- urlParameters: [$host, id, relationshipId],
1734
- headerParameters: [accept, ifMatch],
1735
- serializer: serializer$1
1736
- };
1737
- const updateRelationshipOperationSpec = {
1738
- path: "/digitaltwins/{id}/relationships/{relationshipId}",
1739
- httpMethod: "PATCH",
1740
- responses: {
1741
- 204: {
1742
- headersMapper: DigitalTwinsUpdateRelationshipHeaders
1743
- },
1744
- default: {
1745
- bodyMapper: ErrorResponse
1746
- }
1747
- },
1748
- requestBody: patchDocument,
1749
- queryParameters: [apiVersion],
1750
- urlParameters: [$host, id, relationshipId],
1751
- headerParameters: [
1752
- accept,
1753
- contentType1,
1754
- ifMatch
1755
- ],
1756
- mediaType: "json",
1757
- serializer: serializer$1
1758
- };
1759
- const listRelationshipsOperationSpec = {
1760
- path: "/digitaltwins/{id}/relationships",
1761
- httpMethod: "GET",
1762
- responses: {
1763
- 200: {
1764
- bodyMapper: RelationshipCollection
1765
- },
1766
- default: {
1767
- bodyMapper: ErrorResponse
1768
- }
1769
- },
1770
- queryParameters: [apiVersion, relationshipName],
1771
- urlParameters: [$host, id],
1772
- headerParameters: [accept],
1773
- serializer: serializer$1
1774
- };
1775
- const listIncomingRelationshipsOperationSpec = {
1776
- path: "/digitaltwins/{id}/incomingrelationships",
1777
- httpMethod: "GET",
1778
- responses: {
1779
- 200: {
1780
- bodyMapper: IncomingRelationshipCollection
1781
- },
1782
- default: {
1783
- bodyMapper: ErrorResponse
1784
- }
1785
- },
1786
- queryParameters: [apiVersion],
1787
- urlParameters: [$host, id],
1788
- headerParameters: [accept],
1789
- serializer: serializer$1
1790
- };
1791
- const sendTelemetryOperationSpec = {
1792
- path: "/digitaltwins/{id}/telemetry",
1793
- httpMethod: "POST",
1794
- responses: {
1795
- 204: {},
1796
- default: {
1797
- bodyMapper: ErrorResponse
1798
- }
1799
- },
1800
- requestBody: telemetry,
1801
- queryParameters: [apiVersion],
1802
- urlParameters: [$host, id],
1803
- headerParameters: [
1804
- contentType,
1805
- accept,
1806
- messageId,
1807
- telemetrySourceTime
1808
- ],
1809
- mediaType: "json",
1810
- serializer: serializer$1
1811
- };
1812
- const sendComponentTelemetryOperationSpec = {
1813
- path: "/digitaltwins/{id}/components/{componentPath}/telemetry",
1814
- httpMethod: "POST",
1815
- responses: {
1816
- 204: {},
1817
- default: {
1818
- bodyMapper: ErrorResponse
1819
- }
1820
- },
1821
- requestBody: telemetry,
1822
- queryParameters: [apiVersion],
1823
- urlParameters: [$host, id, componentPath],
1824
- headerParameters: [
1825
- contentType,
1826
- accept,
1827
- messageId,
1828
- telemetrySourceTime
1829
- ],
1830
- mediaType: "json",
1831
- serializer: serializer$1
1832
- };
1833
- const getComponentOperationSpec = {
1834
- path: "/digitaltwins/{id}/components/{componentPath}",
1835
- httpMethod: "GET",
1836
- responses: {
1837
- 200: {
1838
- bodyMapper: {
1839
- type: { name: "Dictionary", value: { type: { name: "any" } } }
1840
- },
1841
- headersMapper: DigitalTwinsGetComponentHeaders
1842
- },
1843
- default: {
1844
- bodyMapper: ErrorResponse
1845
- }
1846
- },
1847
- queryParameters: [apiVersion],
1848
- urlParameters: [$host, id, componentPath],
1849
- headerParameters: [accept],
1850
- serializer: serializer$1
1851
- };
1852
- const updateComponentOperationSpec = {
1853
- path: "/digitaltwins/{id}/components/{componentPath}",
1854
- httpMethod: "PATCH",
1855
- responses: {
1856
- 202: {},
1857
- 204: {
1858
- headersMapper: DigitalTwinsUpdateComponentHeaders
1859
- },
1860
- default: {
1861
- bodyMapper: ErrorResponse
1862
- }
1863
- },
1864
- requestBody: patchDocument,
1865
- queryParameters: [apiVersion],
1866
- urlParameters: [$host, id, componentPath],
1867
- headerParameters: [
1868
- accept,
1869
- contentType1,
1870
- ifMatch
1871
- ],
1872
- mediaType: "json",
1873
- serializer: serializer$1
1874
- };
1875
- const listRelationshipsNextOperationSpec = {
1876
- path: "{nextLink}",
1877
- httpMethod: "GET",
1878
- responses: {
1879
- 200: {
1880
- bodyMapper: RelationshipCollection
1881
- },
1882
- default: {
1883
- bodyMapper: ErrorResponse
1884
- }
1885
- },
1886
- urlParameters: [$host, id, nextLink],
1887
- headerParameters: [accept],
1888
- serializer: serializer$1
1889
- };
1890
- const listIncomingRelationshipsNextOperationSpec = {
1891
- path: "{nextLink}",
1892
- httpMethod: "GET",
1893
- responses: {
1894
- 200: {
1895
- bodyMapper: IncomingRelationshipCollection
1896
- },
1897
- default: {
1898
- bodyMapper: ErrorResponse
1899
- }
1900
- },
1901
- urlParameters: [$host, id, nextLink],
1902
- headerParameters: [accept],
1903
- serializer: serializer$1
1904
- };
1905
-
1906
- /*
1907
- * Copyright (c) Microsoft Corporation.
1908
- * Licensed under the MIT License.
1909
- *
1910
- * Code generated by Microsoft (R) AutoRest Code Generator.
1911
- * Changes may cause incorrect behavior and will be lost if the code is regenerated.
1912
- */
1913
- /// <reference lib="esnext.asynciterable" />
1914
- /** Class containing EventRoutes operations. */
1915
- class EventRoutesImpl {
1916
- /**
1917
- * Initialize a new instance of the class EventRoutes class.
1918
- * @param client Reference to the service client
1919
- */
1920
- constructor(client) {
1921
- this.client = client;
1922
- }
1923
- /**
1924
- * Retrieves all event routes.
1925
- * Status codes:
1926
- * * 200 OK
1927
- * @param options The options parameters.
1928
- */
1929
- list(options) {
1930
- const iter = this.listPagingAll(options);
1931
- return {
1932
- next() {
1933
- return iter.next();
1934
- },
1935
- [Symbol.asyncIterator]() {
1936
- return this;
1937
- },
1938
- byPage: (settings) => {
1939
- if (settings === null || settings === void 0 ? void 0 : settings.maxPageSize) {
1940
- throw new Error("maxPageSize is not supported by this operation.");
1941
- }
1942
- return this.listPagingPage(options, settings);
1943
- }
1944
- };
1945
- }
1946
- listPagingPage(options, settings) {
1947
- return tslib.__asyncGenerator(this, arguments, function* listPagingPage_1() {
1948
- let result;
1949
- let continuationToken = settings === null || settings === void 0 ? void 0 : settings.continuationToken;
1950
- if (!continuationToken) {
1951
- result = yield tslib.__await(this._list(options));
1952
- let page = result.value || [];
1953
- continuationToken = result.nextLink;
1954
- setContinuationToken(page, continuationToken);
1955
- yield yield tslib.__await(page);
1956
- }
1957
- while (continuationToken) {
1958
- result = yield tslib.__await(this._listNext(continuationToken, options));
1959
- continuationToken = result.nextLink;
1960
- let page = result.value || [];
1961
- setContinuationToken(page, continuationToken);
1962
- yield yield tslib.__await(page);
1963
- }
1964
- });
1965
- }
1966
- listPagingAll(options) {
1967
- return tslib.__asyncGenerator(this, arguments, function* listPagingAll_1() {
1968
- var _a, e_1, _b, _c;
1969
- try {
1970
- for (var _d = true, _e = tslib.__asyncValues(this.listPagingPage(options)), _f; _f = yield tslib.__await(_e.next()), _a = _f.done, !_a; _d = true) {
1971
- _c = _f.value;
1972
- _d = false;
1973
- const page = _c;
1974
- yield tslib.__await(yield* tslib.__asyncDelegator(tslib.__asyncValues(page)));
1975
- }
1976
- }
1977
- catch (e_1_1) { e_1 = { error: e_1_1 }; }
1978
- finally {
1979
- try {
1980
- if (!_d && !_a && (_b = _e.return)) yield tslib.__await(_b.call(_e));
1981
- }
1982
- finally { if (e_1) throw e_1.error; }
1983
- }
1984
- });
1985
- }
1986
- /**
1987
- * Retrieves all event routes.
1988
- * Status codes:
1989
- * * 200 OK
1990
- * @param options The options parameters.
1991
- */
1992
- _list(options) {
1993
- return this.client.sendOperationRequest({ options }, listOperationSpec);
1994
- }
1995
- /**
1996
- * Retrieves an event route.
1997
- * Status codes:
1998
- * * 200 OK
1999
- * * 404 Not Found
2000
- * * EventRouteNotFound - The event route was not found.
2001
- * @param id The id for an event route. The id is unique within event routes and case sensitive.
2002
- * @param options The options parameters.
2003
- */
2004
- getById(id, options) {
2005
- return this.client.sendOperationRequest({ id, options }, getByIdOperationSpec);
2006
- }
2007
- /**
2008
- * Adds or replaces an event route.
2009
- * Status codes:
2010
- * * 204 No Content
2011
- * * 400 Bad Request
2012
- * * EventRouteEndpointInvalid - The endpoint provided does not exist or is not active.
2013
- * * EventRouteFilterInvalid - The event route filter is invalid.
2014
- * * EventRouteIdInvalid - The event route id is invalid.
2015
- * * LimitExceeded - The maximum number of event routes allowed has been reached.
2016
- * @param id The id for an event route. The id is unique within event routes and case sensitive.
2017
- * @param options The options parameters.
2018
- */
2019
- add(id, options) {
2020
- return this.client.sendOperationRequest({ id, options }, addOperationSpec);
2021
- }
2022
- /**
2023
- * Deletes an event route.
2024
- * Status codes:
2025
- * * 204 No Content
2026
- * * 404 Not Found
2027
- * * EventRouteNotFound - The event route was not found.
2028
- * @param id The id for an event route. The id is unique within event routes and case sensitive.
2029
- * @param options The options parameters.
2030
- */
2031
- delete(id, options) {
2032
- return this.client.sendOperationRequest({ id, options }, deleteOperationSpec);
2033
- }
2034
- /**
2035
- * ListNext
2036
- * @param nextLink The nextLink from the previous successful call to the List method.
2037
- * @param options The options parameters.
2038
- */
2039
- _listNext(nextLink, options) {
2040
- return this.client.sendOperationRequest({ nextLink, options }, listNextOperationSpec);
2041
- }
2042
- }
2043
- // Operation Specifications
2044
- const serializer = coreClient__namespace.createSerializer(Mappers, /* isXml */ false);
2045
- const listOperationSpec = {
2046
- path: "/eventroutes",
2047
- httpMethod: "GET",
2048
- responses: {
2049
- 200: {
2050
- bodyMapper: EventRouteCollection
2051
- },
2052
- default: {
2053
- bodyMapper: ErrorResponse
2054
- }
2055
- },
2056
- queryParameters: [apiVersion],
2057
- urlParameters: [$host],
2058
- headerParameters: [accept, resultsPerPage],
2059
- serializer
2060
- };
2061
- const getByIdOperationSpec = {
2062
- path: "/eventroutes/{id}",
2063
- httpMethod: "GET",
2064
- responses: {
2065
- 200: {
2066
- bodyMapper: EventRoute
2067
- },
2068
- default: {
2069
- bodyMapper: ErrorResponse
2070
- }
2071
- },
2072
- queryParameters: [apiVersion],
2073
- urlParameters: [$host, id],
2074
- headerParameters: [accept],
2075
- serializer
2076
- };
2077
- const addOperationSpec = {
2078
- path: "/eventroutes/{id}",
2079
- httpMethod: "PUT",
2080
- responses: {
2081
- 204: {},
2082
- default: {
2083
- bodyMapper: ErrorResponse
2084
- }
2085
- },
2086
- requestBody: eventRoute,
2087
- queryParameters: [apiVersion],
2088
- urlParameters: [$host, id],
2089
- headerParameters: [contentType, accept],
2090
- mediaType: "json",
2091
- serializer
2092
- };
2093
- const deleteOperationSpec = {
2094
- path: "/eventroutes/{id}",
2095
- httpMethod: "DELETE",
2096
- responses: {
2097
- 204: {},
2098
- default: {
2099
- bodyMapper: ErrorResponse
2100
- }
2101
- },
2102
- queryParameters: [apiVersion],
2103
- urlParameters: [$host, id],
2104
- headerParameters: [accept],
2105
- serializer
2106
- };
2107
- const listNextOperationSpec = {
2108
- path: "{nextLink}",
2109
- httpMethod: "GET",
2110
- responses: {
2111
- 200: {
2112
- bodyMapper: EventRouteCollection
2113
- },
2114
- default: {
2115
- bodyMapper: ErrorResponse
2116
- }
2117
- },
2118
- urlParameters: [$host, nextLink],
2119
- headerParameters: [accept, resultsPerPage],
2120
- serializer
2121
- };
2122
-
2123
- /*
2124
- * Copyright (c) Microsoft Corporation.
2125
- * Licensed under the MIT License.
2126
- *
2127
- * Code generated by Microsoft (R) AutoRest Code Generator.
2128
- * Changes may cause incorrect behavior and will be lost if the code is regenerated.
2129
- */
2130
- class AzureDigitalTwinsAPI extends coreClient__namespace.ServiceClient {
2131
- /**
2132
- * Initializes a new instance of the AzureDigitalTwinsAPI class.
2133
- * @param options The parameter options
2134
- */
2135
- constructor(options) {
2136
- var _a, _b;
2137
- // Initializing default values for options
2138
- if (!options) {
2139
- options = {};
2140
- }
2141
- const defaults = {
2142
- requestContentType: "application/json; charset=utf-8"
2143
- };
2144
- const packageDetails = `azsdk-js-digital-twins-core/2.0.0`;
2145
- const userAgentPrefix = options.userAgentOptions && options.userAgentOptions.userAgentPrefix
2146
- ? `${options.userAgentOptions.userAgentPrefix} ${packageDetails}`
2147
- : `${packageDetails}`;
2148
- const optionsWithDefaults = Object.assign(Object.assign(Object.assign({}, defaults), options), { userAgentOptions: {
2149
- userAgentPrefix
2150
- }, endpoint: (_b = (_a = options.endpoint) !== null && _a !== void 0 ? _a : options.baseUri) !== null && _b !== void 0 ? _b : "https://digitaltwins-hostname" });
2151
- super(optionsWithDefaults);
2152
- // Assigning values to Constant parameters
2153
- this.$host = options.$host || "https://digitaltwins-hostname";
2154
- this.apiVersion = options.apiVersion || "2020-10-31";
2155
- this.digitalTwinModels = new DigitalTwinModelsImpl(this);
2156
- this.query = new QueryImpl(this);
2157
- this.digitalTwins = new DigitalTwinsImpl(this);
2158
- this.eventRoutes = new EventRoutesImpl(this);
2159
- this.addCustomApiVersionPolicy(options.apiVersion);
2160
- }
2161
- /** A function that adds a policy that sets the api-version (or equivalent) to reflect the library version. */
2162
- addCustomApiVersionPolicy(apiVersion) {
2163
- if (!apiVersion) {
2164
- return;
2165
- }
2166
- const apiVersionPolicy = {
2167
- name: "CustomApiVersionPolicy",
2168
- async sendRequest(request, next) {
2169
- const param = request.url.split("?");
2170
- if (param.length > 1) {
2171
- const newParams = param[1].split("&").map((item) => {
2172
- if (item.indexOf("api-version") > -1) {
2173
- return "api-version=" + apiVersion;
2174
- }
2175
- else {
2176
- return item;
2177
- }
2178
- });
2179
- request.url = param[0] + "?" + newParams.join("&");
2180
- }
2181
- return next(request);
2182
- }
2183
- };
2184
- this.pipeline.addPolicy(apiVersionPolicy);
2185
- }
2186
- }
2187
-
2188
- // Copyright (c) Microsoft Corporation.
2189
- // Licensed under the MIT License.
2190
- const SDK_VERSION = "2.0.0";
2191
-
2192
- // Copyright (c) Microsoft Corporation.
2193
- // Licensed under the MIT License.
2194
- /**
2195
- * Creates a tracing client to manage tracing spans.
2196
- * @internal
2197
- */
2198
- const tracingClient = coreTracing.createTracingClient({
2199
- namespace: "Microsoft.DigitalTwins",
2200
- packageName: "@azure/digital-twins-core",
2201
- packageVersion: SDK_VERSION,
2202
- });
2203
-
2204
- // Copyright (c) Microsoft Corporation.
2205
- // Licensed under the MIT License.
2206
- /**
2207
- * The \@azure/logger configuration for this package.
2208
- */
2209
- const logger = logger$1.createClientLogger("azure-digitaltwins-core");
2210
-
2211
- // Copyright (c) Microsoft Corporation.
2212
- // Licensed under the MIT License.
2213
- const DEFAULT_DIGITALTWINS_SCOPE = "https://digitaltwins.azure.net/.default";
2214
- /**
2215
- * Client for Azure IoT DigitalTwins API.
2216
- */
2217
- class DigitalTwinsClient {
2218
- /**
2219
- * Creates an instance of AzureDigitalTwinsAPI.
2220
- *
2221
- * Example usage:
2222
- * ```ts
2223
- * const { DigitalTwinsClient, ServiceClientCredentials } = require("@azure/digital-twins-core");
2224
- *
2225
- * const client = new DigitalTwinsClient(
2226
- * "<endpoint>",
2227
- * new DefaultAzureCredential();
2228
- * );
2229
- * ```
2230
- * @param endpointUrl - The endpoint URL of the service.
2231
- * @param credential - Used to authenticate requests to the service.
2232
- * @param options - Used to configure the service client.
2233
- */
2234
- constructor(endpointUrl, credential, options = {}) {
2235
- const internalPipelineOptions = Object.assign(Object.assign({}, options), { loggingOptions: {
2236
- logger: logger.info,
2237
- additionalAllowedHeaderNames: ["x-ms-request-id"],
2238
- } });
2239
- this.client = new AzureDigitalTwinsAPI(Object.assign({ endpoint: endpointUrl, credential, credentialScopes: DEFAULT_DIGITALTWINS_SCOPE }, internalPipelineOptions));
2240
- }
2241
- /**
2242
- * Get a digital twin
2243
- *
2244
- * @param digitalTwinId - The Id of the digital twin.
2245
- * @param options - The operation options
2246
- * @returns The application/json digital twin.
2247
- */
2248
- getDigitalTwin(digitalTwinId, options = {}) {
2249
- return tracingClient.withSpan("DigitalTwinsClient.getDigitalTwin", options, async (updatedOptions) => {
2250
- return this.client.digitalTwins.getById(digitalTwinId, updatedOptions);
2251
- });
2252
- }
2253
- /**
2254
- * Create or update a digital twin
2255
- *
2256
- * @param digitalTwinId - The Id of the digital twin to create or update.
2257
- * @param digitalTwinJson - The application/json digital twin to create.
2258
- * @param options - Extended operation options including
2259
- * ifNoneMatch: Only perform the operation if the entity does not already exist.
2260
- * @returns The created application/json digital twin.
2261
- */
2262
- upsertDigitalTwin(digitalTwinId, digitalTwinJson, options = {}) {
2263
- return tracingClient.withSpan("DigitalTwinsClient.upsertDigitalTwin", options, async (updatedOptions) => {
2264
- const payload = JSON.parse(digitalTwinJson);
2265
- return this.client.digitalTwins.add(digitalTwinId, payload, updatedOptions);
2266
- });
2267
- }
2268
- /**
2269
- * Update a digital twin using a json patch.
2270
- *
2271
- * @param digitalTwinId - The Id of the digital twin.
2272
- * @param jsonPatch - An update specification described by JSON Patch. Updates to property values
2273
- * and $model elements may happen in the same request. Operations are limited to add, replace and
2274
- * remove.
2275
- * @param options - Extended operation options including
2276
- * ifMatch: Only perform the operation if the entity's etag matches one of the etags provided or * is provided.
2277
-
2278
- */
2279
- updateDigitalTwin(digitalTwinId, jsonPatch, options = {}) {
2280
- return tracingClient.withSpan("DigitalTwinsClient.updateDigitalTwin", options, async (updatedOptions) => {
2281
- return this.client.digitalTwins.update(digitalTwinId, jsonPatch, updatedOptions);
2282
- });
2283
- }
2284
- /**
2285
- * Delete a digital twin
2286
- *
2287
- * @param digitalTwinId - The Id of the digital twin to delete.
2288
- * @param options - Extended operation options including
2289
- * ifMatch: Only perform the operation if the entity's etag matches one of the etags provided or * is provided.
2290
-
2291
- */
2292
- deleteDigitalTwin(digitalTwinId, options = {}) {
2293
- return tracingClient.withSpan("DigitalTwinsClient.deleteDigitalTwin", options, async (updatedOptions) => {
2294
- return this.client.digitalTwins.delete(digitalTwinId, updatedOptions);
2295
- });
2296
- }
2297
- /**
2298
- * Get a component on a digital twin.
2299
- *
2300
- * @param digitalTwinId - The Id of the digital twin.
2301
- * @param componentName - The component being retrieved.
2302
- * @param options - The operation options
2303
- * @returns Json string representation of the component corresponding to the provided componentName.
2304
- */
2305
- getComponent(digitalTwinId, componentName, options = {}) {
2306
- return tracingClient.withSpan("DigitalTwinsClient.getComponent", options, async (updatedOptions) => {
2307
- return this.client.digitalTwins.getComponent(digitalTwinId, componentName, updatedOptions);
2308
- });
2309
- }
2310
- /**
2311
- * Update properties of a component on a digital twin using a JSON patch.
2312
- *
2313
- * @param digitalTwinId - The Id of the digital twin.
2314
- * @param componentName - The component being updated.
2315
- * @param jsonPatch - The application/json-patch+json operations to be performed on the specified digital twin's component.
2316
- * @param enableUpdate - If true then update of an existing digital twin is enabled.
2317
- * @param options - Extended operation options including
2318
- * ifMatch: Only perform the operation if the entity's etag matches one of the etags provided or * is provided.
2319
-
2320
- */
2321
- updateComponent(digitalTwinId, componentName, jsonPatch, options = {}) {
2322
- return tracingClient.withSpan("DigitalTwinsClient.updateComponent", options, async (updatedOptions) => {
2323
- return this.client.digitalTwins.updateComponent(digitalTwinId, componentName, jsonPatch, updatedOptions);
2324
- });
2325
- }
2326
- /**
2327
- * Get a relationship on a digital twin.
2328
- *
2329
- * @param digitalTwinId - The Id of the source digital twin.
2330
- * @param relationshipId - The Id of the relationship to retrieve.
2331
- * @param options - The operation options
2332
- * @returns The pageable list of application/json relationships belonging to the specified digital twin.
2333
- */
2334
- getRelationship(digitalTwinId, relationshipId, options = {}) {
2335
- return tracingClient.withSpan("DigitalTwinsClient.getRelationship", options, async (updatedOptions) => {
2336
- return this.client.digitalTwins.getRelationshipById(digitalTwinId, relationshipId, updatedOptions);
2337
- });
2338
- }
2339
- /**
2340
- * Create or update a relationship on a digital twin.
2341
- *
2342
- * @param digitalTwinId - The Id of the source digital twin.
2343
- * @param relationshipId - The Id of the relationship to create.
2344
- * @param relationship - The application/json relationship to be created.
2345
- * @param options - Extended operation options including
2346
- * ifNoneMatch: Only perform the operation if the entity does not already exist.
2347
- */
2348
- upsertRelationship(digitalTwinId, relationshipId, relationship, options = {}) {
2349
- return tracingClient.withSpan("DigitalTwinsClient.upsertRelationship", options, async (updatedOptions) => {
2350
- return this.client.digitalTwins.addRelationship(digitalTwinId, relationshipId, relationship, updatedOptions);
2351
- });
2352
- }
2353
- /**
2354
- * Updates the properties of a relationship on a digital twin using a JSON patch.
2355
- *
2356
- * @param digitalTwinId - The Id of the digital twin to delete.
2357
- * @param relationshipId - The Id of the relationship to be updated.
2358
- * @param jsonPatch - The application/json-patch+json operations to be performed on the specified digital twin's relationship.
2359
- * @param options - Extended operation options
2360
- * ifMatch: Only perform the operation if the entity's etag matches one of the etags provided or * is provided.
2361
- */
2362
- updateRelationship(digitalTwinId, relationshipId, jsonPatch, options = {}) {
2363
- return tracingClient.withSpan("DigitalTwinsClient.updateRelationship", options, async (updatedOptions) => {
2364
- return this.client.digitalTwins.updateRelationship(digitalTwinId, relationshipId, jsonPatch, updatedOptions);
2365
- });
2366
- }
2367
- /**
2368
- * Delete a relationship on a digital twin.
2369
- *
2370
- * @param digitalTwinId - The Id of the source digital twin.
2371
- * @param relationshipId - The Id of the relationship to delete.
2372
- * @param options - The operation options
2373
- * ifMatch: Only perform the operation if the entity's etag matches one of the etags provided or * is
2374
-
2375
- */
2376
- deleteRelationship(digitalTwinId, relationshipId, options = {}) {
2377
- return tracingClient.withSpan("DigitalTwinsClient.deleteRelationship", options, async (updatedOptions) => {
2378
- return this.client.digitalTwins.deleteRelationship(digitalTwinId, relationshipId, updatedOptions);
2379
- });
2380
- }
2381
- /**
2382
- * Retrieve relationships for a digital twin.
2383
- *
2384
- * @param digitalTwinId - The Id of the digital twin.
2385
- */
2386
- listRelationships(digitalTwinId, options) {
2387
- return this.client.digitalTwins.listRelationships(digitalTwinId, options);
2388
- }
2389
- /**
2390
- * Retrieve all incoming relationships for a digital twin.
2391
- *
2392
- * @param digitalTwinId - The Id of the digital twin.
2393
- */
2394
- listIncomingRelationships(digitalTwinId, options) {
2395
- return this.client.digitalTwins.listIncomingRelationships(digitalTwinId, options);
2396
- }
2397
- /**
2398
- * Publish telemetry from a digital twin, which is then consumed by one or many destination endpoints (subscribers) defined under.
2399
- *
2400
- * @param digitalTwinId - The Id of the digital twin to delete.
2401
- * @param payload - The application/json telemetry payload to be sent.
2402
- * @param messageId - The message Id.
2403
- * @param options - The operation options
2404
-
2405
- */
2406
- publishTelemetry(digitalTwinId, payload, messageId, options = {}) {
2407
- return tracingClient.withSpan("DigitalTwinsClient.publishTelemetry", options, async (updatedOptions) => {
2408
- return this.client.digitalTwins.sendTelemetry(digitalTwinId, messageId || uuid.v4(), payload, Object.assign(Object.assign({}, updatedOptions), { telemetrySourceTime: new Date().toISOString() }));
2409
- });
2410
- }
2411
- /**
2412
- * Publish telemetry from a digital twin's component, which is then consumed by one or many destination endpoints (subscribers) defined under.
2413
- *
2414
- * @param digitalTwinId - The Id of the digital twin to delete.
2415
- * @param componentName - The name of the DTDL component.
2416
- * @param payload - The application/json telemetry payload to be sent.
2417
- * @param messageId - The message Id.
2418
- * @param options - The operation options
2419
-
2420
- */
2421
- publishComponentTelemetry(digitalTwinId, componentName, payload, messageId, options = {}) {
2422
- return tracingClient.withSpan("DigitalTwinsClient.publishComponentTelemetry", options, async (updatedOptions) => {
2423
- return this.client.digitalTwins.sendComponentTelemetry(digitalTwinId, componentName, messageId || uuid.v4(), payload, Object.assign(Object.assign({}, updatedOptions), { telemetrySourceTime: new Date().toISOString() }));
2424
- });
2425
- }
2426
- /**
2427
- * Get a model, including the model metadata and the model definition.
2428
- *
2429
- * @param modelId - The Id of the model.
2430
- * @param options - Options for this operation
2431
- * @returns The application/json model.
2432
- */
2433
- getModel(modelId, options = {}) {
2434
- var _a;
2435
- return tracingClient.withSpan("DigitalTwinsClient.getModel", Object.assign(Object.assign({}, options), { includeModelDefinition: (_a = options === null || options === void 0 ? void 0 : options.includeModelDefinition) !== null && _a !== void 0 ? _a : false }), async (updatedOptions) => {
2436
- return this.client.digitalTwinModels.getById(modelId, updatedOptions);
2437
- });
2438
- }
2439
- /**
2440
- * Get the list of models
2441
- *
2442
- * @param options - Options for listing models.
2443
- * @returns A pageable set of application/json models.
2444
- */
2445
- listModels(options = {}) {
2446
- var _a;
2447
- return this.client.digitalTwinModels.list(Object.assign(Object.assign({}, options), { includeModelDefinition: (_a = options === null || options === void 0 ? void 0 : options.includeModelDefinition) !== null && _a !== void 0 ? _a : false }));
2448
- }
2449
- /**
2450
- * Create one or many
2451
- *
2452
- * @param dtdlModels - The set of models to create. Each string corresponds to exactly one model.
2453
- * @param options - The operation options
2454
- * @returns The created application/json models.
2455
- */
2456
- createModels(dtdlModels, options = {}) {
2457
- return tracingClient.withSpan("DigitalTwinsClient.createModels", Object.assign(Object.assign({}, options), { models: dtdlModels }), async (updatedOptions) => {
2458
- return this.client.digitalTwinModels.add(updatedOptions);
2459
- });
2460
- }
2461
- /**
2462
- * Decommission a model using a json patch.
2463
- * When a model is decommissioned, new digital twins will no longer be able to be
2464
- * defined by this model. However, existing digital twins may continue to use this model.
2465
- * Once a model is decommissioned, it may not be recommissioned.
2466
- *
2467
- * @param modelId - The Id of the model to decommission.
2468
- * property can be replaced.
2469
- * @param options - The operation options
2470
-
2471
- *
2472
- */
2473
- decomissionModel(modelId, options = {}) {
2474
- const jsonPatch = [{ op: "replace", path: "/decommissioned", value: true }];
2475
- return tracingClient.withSpan("DigitalTwinsClient.decomissionModel", options, async (updatedOptions) => {
2476
- return this.client.digitalTwinModels.update(modelId, jsonPatch, updatedOptions);
2477
- });
2478
- }
2479
- /**
2480
- * Delete a model.
2481
- *
2482
- * @param modelId - The Id of the model to delete.
2483
- * @param options - The operation options
2484
-
2485
- */
2486
- deleteModel(modelId, options = {}) {
2487
- return tracingClient.withSpan("DigitalTwinsClient.deleteModel", options, async (updatedOptions) => {
2488
- return this.client.digitalTwinModels.delete(modelId, updatedOptions);
2489
- });
2490
- }
2491
- /**
2492
- * Get an event route.
2493
- *
2494
- * @param modelId - The Id of the event route.
2495
- * @param options - The operation options
2496
- * @returns The application/json event route.
2497
- */
2498
- getEventRoute(eventRouteId, options = {}) {
2499
- return tracingClient.withSpan("DigitalTwinsClient.getEventRoute", options, async (updatedOptions) => {
2500
- return this.client.eventRoutes.getById(eventRouteId, updatedOptions);
2501
- });
2502
- }
2503
- /**
2504
- * List the event routes in a digital twins instance.
2505
- *
2506
- * @param options - Options for listEventRoutes.
2507
- * @returns The application/json event route.
2508
- */
2509
- listEventRoutes(options) {
2510
- return this.client.eventRoutes.list(options);
2511
- }
2512
- /**
2513
- * Create or update an event route.
2514
- *
2515
- * @param eventRouteId - The Id of the event route to create or update.
2516
- * @param endpointId - The id of the endpoint this event route is bound to.
2517
- * @param filter - An expression which describes the events which are routed to the endpoint.
2518
- * @param options - The operation options
2519
-
2520
- */
2521
- upsertEventRoute(eventRouteId, endpointId, filter, options = {}) {
2522
- return tracingClient.withSpan("DigitalTwinsClient.upsertEventRoute", Object.assign({ eventRoute: {
2523
- endpointName: endpointId,
2524
- filter,
2525
- } }, options), async (updatedOptions) => {
2526
- return this.client.eventRoutes.add(eventRouteId, updatedOptions);
2527
- });
2528
- }
2529
- /**
2530
- * Delete an event route.
2531
- *
2532
- * @param eventRouteId - The Id of the eventRoute to delete.
2533
- * @param options - The operation options
2534
-
2535
- */
2536
- deleteEventRoute(eventRouteId, options = {}) {
2537
- return tracingClient.withSpan("DigitalTwinsClient.deleteEventRoute", options, async (updatedOptions) => {
2538
- return this.client.eventRoutes.delete(eventRouteId, updatedOptions);
2539
- });
2540
- }
2541
- /**
2542
- * Deals with the pagination of {@link query}.
2543
- *
2544
- * @param query - The query string, in SQL-like syntax.
2545
- * @param options - Common options for the iterative endpoints.
2546
- * @param continuationState - An object that indicates the position of the paginated request.
2547
- *
2548
- */
2549
- queryTwinsPage(query, options, continuationState) {
2550
- return tslib.__asyncGenerator(this, arguments, function* queryTwinsPage_1() {
2551
- let { continuationToken } = continuationState !== null && continuationState !== void 0 ? continuationState : {};
2552
- if (!continuationToken) {
2553
- const queryResult = yield tslib.__await(this.client.query.queryTwins({ query }, options));
2554
- continuationToken = queryResult.continuationToken;
2555
- yield yield tslib.__await(queryResult);
2556
- }
2557
- while (continuationToken) {
2558
- const queryResult = yield tslib.__await(this.client.query.queryTwins({ query, continuationToken }, options));
2559
- continuationToken = queryResult.continuationToken;
2560
- yield yield tslib.__await(queryResult);
2561
- }
2562
- });
2563
- }
2564
- /**
2565
- * Deals with the iteration of all the available results of {@link query}.
2566
- * @param query - The query string, in SQL-like syntax.
2567
- * @param options - Common options for the iterative endpoints.
2568
- */
2569
- queryTwinsAll(query, options) {
2570
- return tslib.__asyncGenerator(this, arguments, function* queryTwinsAll_1() {
2571
- var _a, e_1, _b, _c;
2572
- try {
2573
- for (var _d = true, _e = tslib.__asyncValues(this.queryTwinsPage(query, options)), _f; _f = yield tslib.__await(_e.next()), _a = _f.done, !_a; _d = true) {
2574
- _c = _f.value;
2575
- _d = false;
2576
- const page = _c;
2577
- if (page.value) {
2578
- yield tslib.__await(yield* tslib.__asyncDelegator(tslib.__asyncValues(page.value)));
2579
- }
2580
- }
2581
- }
2582
- catch (e_1_1) { e_1 = { error: e_1_1 }; }
2583
- finally {
2584
- try {
2585
- if (!_d && !_a && (_b = _e.return)) yield tslib.__await(_b.call(_e));
2586
- }
2587
- finally { if (e_1) throw e_1.error; }
2588
- }
2589
- });
2590
- }
2591
- /**
2592
- * Query for digital twins.
2593
- *
2594
- * @param query - The query string, in SQL-like syntax.
2595
- * @param options - Options for the query operation.
2596
- * @returns The pageable list of query results.
2597
- */
2598
- queryTwins(query, options = {}) {
2599
- const iter = this.queryTwinsAll(query, options);
2600
- return {
2601
- next() {
2602
- return iter.next();
2603
- },
2604
- [Symbol.asyncIterator]() {
2605
- return this;
2606
- },
2607
- byPage: (settings = {}) => this.queryTwinsPage(query, options, settings),
2608
- };
2609
- }
2610
- }
2611
-
2612
- exports.DigitalTwinsClient = DigitalTwinsClient;
2613
- //# sourceMappingURL=index.js.map