@azure/service-bus 7.10.0-beta.1 → 7.10.0-beta.3

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 (848) hide show
  1. package/README.md +114 -57
  2. package/dist/browser/connectionContext.d.ts +109 -0
  3. package/dist/browser/connectionContext.d.ts.map +1 -0
  4. package/{dist-esm/src → dist/browser}/connectionContext.js +9 -9
  5. package/dist/browser/connectionContext.js.map +1 -0
  6. package/dist/browser/constructorHelpers.d.ts +79 -0
  7. package/dist/browser/constructorHelpers.d.ts.map +1 -0
  8. package/{dist-esm/src → dist/browser}/constructorHelpers.js +5 -5
  9. package/dist/browser/constructorHelpers.js.map +1 -0
  10. package/dist/browser/core/autoLockRenewer.d.ts +58 -0
  11. package/dist/browser/core/autoLockRenewer.d.ts.map +1 -0
  12. package/{dist-esm/src → dist/browser}/core/autoLockRenewer.js +12 -8
  13. package/dist/browser/core/autoLockRenewer.js.map +1 -0
  14. package/dist/browser/core/batchingReceiver.d.ts +120 -0
  15. package/dist/browser/core/batchingReceiver.d.ts.map +1 -0
  16. package/{dist-esm/src → dist/browser}/core/batchingReceiver.js +23 -13
  17. package/dist/browser/core/batchingReceiver.js.map +1 -0
  18. package/dist/browser/core/linkEntity.d.ts +192 -0
  19. package/dist/browser/core/linkEntity.d.ts.map +1 -0
  20. package/{dist-esm/src → dist/browser}/core/linkEntity.js +77 -14
  21. package/dist/browser/core/linkEntity.js.map +1 -0
  22. package/dist/browser/core/managementClient.d.ts +312 -0
  23. package/dist/browser/core/managementClient.d.ts.map +1 -0
  24. package/{dist-esm/src → dist/browser}/core/managementClient.js +37 -33
  25. package/dist/browser/core/managementClient.js.map +1 -0
  26. package/dist/browser/core/messageReceiver.d.ts +147 -0
  27. package/dist/browser/core/messageReceiver.d.ts.map +1 -0
  28. package/{dist-esm/src → dist/browser}/core/messageReceiver.js +36 -14
  29. package/dist/browser/core/messageReceiver.js.map +1 -0
  30. package/dist/browser/core/messageSender.d.ts +93 -0
  31. package/dist/browser/core/messageSender.d.ts.map +1 -0
  32. package/{dist-esm/src → dist/browser}/core/messageSender.js +36 -12
  33. package/dist/browser/core/messageSender.js.map +1 -0
  34. package/dist/browser/core/receiverHelper.d.ts +45 -0
  35. package/dist/browser/core/receiverHelper.d.ts.map +1 -0
  36. package/{dist-esm/src → dist/browser}/core/receiverHelper.js +6 -5
  37. package/dist/browser/core/receiverHelper.js.map +1 -0
  38. package/dist/browser/core/shared.d.ts +34 -0
  39. package/dist/browser/core/shared.d.ts.map +1 -0
  40. package/{dist-esm/src → dist/browser}/core/shared.js +3 -3
  41. package/dist/browser/core/shared.js.map +1 -0
  42. package/dist/browser/core/streamingReceiver.d.ts +142 -0
  43. package/dist/browser/core/streamingReceiver.d.ts.map +1 -0
  44. package/{dist-esm/src → dist/browser}/core/streamingReceiver.js +73 -36
  45. package/dist/browser/core/streamingReceiver.js.map +1 -0
  46. package/dist/browser/dataTransformer.d.ts +77 -0
  47. package/dist/browser/dataTransformer.d.ts.map +1 -0
  48. package/{dist-esm/src → dist/browser}/dataTransformer.js +2 -2
  49. package/dist/browser/dataTransformer.js.map +1 -0
  50. package/dist/browser/diagnostics/instrumentServiceBusMessage.d.ts +50 -0
  51. package/dist/browser/diagnostics/instrumentServiceBusMessage.d.ts.map +1 -0
  52. package/{dist-esm/src → dist/browser}/diagnostics/instrumentServiceBusMessage.js +2 -2
  53. package/dist/browser/diagnostics/instrumentServiceBusMessage.js.map +1 -0
  54. package/dist/browser/diagnostics/tracing.d.ts +21 -0
  55. package/dist/browser/diagnostics/tracing.d.ts.map +1 -0
  56. package/{dist-esm/src → dist/browser}/diagnostics/tracing.js +2 -2
  57. package/dist/browser/diagnostics/tracing.js.map +1 -0
  58. package/dist/browser/experimental/index.d.ts +10 -0
  59. package/dist/browser/experimental/index.d.ts.map +1 -0
  60. package/dist/browser/experimental/index.js +4 -0
  61. package/dist/browser/experimental/index.js.map +1 -0
  62. package/dist/browser/index.d.ts +26 -0
  63. package/dist/browser/index.d.ts.map +1 -0
  64. package/{dist-esm/src → dist/browser}/index.js +5 -5
  65. package/dist/browser/index.js.map +1 -0
  66. package/dist/browser/log.d.ts +70 -0
  67. package/dist/browser/log.d.ts.map +1 -0
  68. package/{dist-esm/src → dist/browser}/log.js +1 -1
  69. package/dist/browser/log.js.map +1 -0
  70. package/dist/browser/models.d.ts +328 -0
  71. package/dist/browser/models.d.ts.map +1 -0
  72. package/dist/browser/models.js +4 -0
  73. package/dist/browser/models.js.map +1 -0
  74. package/dist/browser/modelsToBeSharedWithEventHubs.d.ts +18 -0
  75. package/dist/browser/modelsToBeSharedWithEventHubs.d.ts.map +1 -0
  76. package/dist/browser/modelsToBeSharedWithEventHubs.js +4 -0
  77. package/dist/browser/modelsToBeSharedWithEventHubs.js.map +1 -0
  78. package/dist/browser/package.json +3 -0
  79. package/dist/browser/receivers/receiver.d.ts +299 -0
  80. package/dist/browser/receivers/receiver.d.ts.map +1 -0
  81. package/{dist-esm/src → dist/browser}/receivers/receiver.js +40 -22
  82. package/dist/browser/receivers/receiver.js.map +1 -0
  83. package/dist/browser/receivers/receiverCommon.d.ts +81 -0
  84. package/dist/browser/receivers/receiverCommon.d.ts.map +1 -0
  85. package/{dist-esm/src → dist/browser}/receivers/receiverCommon.js +7 -8
  86. package/dist/browser/receivers/receiverCommon.js.map +1 -0
  87. package/dist/browser/receivers/sessionReceiver.d.ts +189 -0
  88. package/dist/browser/receivers/sessionReceiver.d.ts.map +1 -0
  89. package/{dist-esm/src → dist/browser}/receivers/sessionReceiver.js +32 -24
  90. package/dist/browser/receivers/sessionReceiver.js.map +1 -0
  91. package/dist/browser/sender.d.ts +125 -0
  92. package/dist/browser/sender.d.ts.map +1 -0
  93. package/{dist-esm/src → dist/browser}/sender.js +19 -13
  94. package/dist/browser/sender.js.map +1 -0
  95. package/dist/browser/serializers/namespaceResourceSerializer.d.ts +46 -0
  96. package/dist/browser/serializers/namespaceResourceSerializer.d.ts.map +1 -0
  97. package/{dist-esm/src → dist/browser}/serializers/namespaceResourceSerializer.js +3 -3
  98. package/dist/browser/serializers/namespaceResourceSerializer.js.map +1 -0
  99. package/dist/browser/serializers/queueResourceSerializer.d.ts +461 -0
  100. package/dist/browser/serializers/queueResourceSerializer.d.ts.map +1 -0
  101. package/{dist-esm/src → dist/browser}/serializers/queueResourceSerializer.js +4 -4
  102. package/dist/browser/serializers/queueResourceSerializer.js.map +1 -0
  103. package/dist/browser/serializers/ruleResourceSerializer.d.ts +135 -0
  104. package/dist/browser/serializers/ruleResourceSerializer.d.ts.map +1 -0
  105. package/{dist-esm/src → dist/browser}/serializers/ruleResourceSerializer.js +4 -4
  106. package/dist/browser/serializers/ruleResourceSerializer.js.map +1 -0
  107. package/dist/browser/serializers/subscriptionResourceSerializer.d.ts +396 -0
  108. package/dist/browser/serializers/subscriptionResourceSerializer.d.ts.map +1 -0
  109. package/{dist-esm/src → dist/browser}/serializers/subscriptionResourceSerializer.js +5 -5
  110. package/dist/browser/serializers/subscriptionResourceSerializer.js.map +1 -0
  111. package/dist/browser/serializers/topicResourceSerializer.d.ts +335 -0
  112. package/dist/browser/serializers/topicResourceSerializer.d.ts.map +1 -0
  113. package/{dist-esm/src → dist/browser}/serializers/topicResourceSerializer.js +4 -4
  114. package/dist/browser/serializers/topicResourceSerializer.js.map +1 -0
  115. package/dist/browser/serviceBusAtomManagementClient.d.ts +652 -0
  116. package/dist/browser/serviceBusAtomManagementClient.d.ts.map +1 -0
  117. package/{dist-esm/src → dist/browser}/serviceBusAtomManagementClient.js +78 -109
  118. package/dist/browser/serviceBusAtomManagementClient.js.map +1 -0
  119. package/dist/browser/serviceBusClient.d.ts +231 -0
  120. package/dist/browser/serviceBusClient.d.ts.map +1 -0
  121. package/{dist-esm/src → dist/browser}/serviceBusClient.js +24 -11
  122. package/dist/browser/serviceBusClient.js.map +1 -0
  123. package/dist/browser/serviceBusError.d.ts +119 -0
  124. package/dist/browser/serviceBusError.d.ts.map +1 -0
  125. package/{dist-esm/src → dist/browser}/serviceBusError.js +21 -1
  126. package/dist/browser/serviceBusError.js.map +1 -0
  127. package/dist/browser/serviceBusMessage.d.ts +529 -0
  128. package/dist/browser/serviceBusMessage.d.ts.map +1 -0
  129. package/{dist-esm/src → dist/browser}/serviceBusMessage.js +193 -5
  130. package/dist/browser/serviceBusMessage.js.map +1 -0
  131. package/dist/browser/serviceBusMessageBatch.d.ts +153 -0
  132. package/dist/browser/serviceBusMessageBatch.d.ts.map +1 -0
  133. package/{dist-esm/src → dist/browser}/serviceBusMessageBatch.js +37 -13
  134. package/dist/browser/serviceBusMessageBatch.js.map +1 -0
  135. package/dist/browser/serviceBusRuleManager.d.ts +103 -0
  136. package/dist/browser/serviceBusRuleManager.d.ts.map +1 -0
  137. package/{dist-esm/src → dist/browser}/serviceBusRuleManager.js +16 -13
  138. package/dist/browser/serviceBusRuleManager.js.map +1 -0
  139. package/dist/browser/session/messageSession.d.ts +236 -0
  140. package/dist/browser/session/messageSession.d.ts.map +1 -0
  141. package/{dist-esm/src → dist/browser}/session/messageSession.js +145 -30
  142. package/dist/browser/session/messageSession.js.map +1 -0
  143. package/dist/browser/util/atomXmlHelper.d.ts +56 -0
  144. package/dist/browser/util/atomXmlHelper.d.ts.map +1 -0
  145. package/{dist-esm/src → dist/browser}/util/atomXmlHelper.js +7 -7
  146. package/dist/browser/util/atomXmlHelper.js.map +1 -0
  147. package/dist/browser/util/compat/compatibility.d.ts +109 -0
  148. package/dist/browser/util/compat/compatibility.d.ts.map +1 -0
  149. package/{dist-esm/src → dist/browser}/util/compat/compatibility.js +2 -2
  150. package/dist/browser/util/compat/compatibility.js.map +1 -0
  151. package/dist/browser/util/compat/httpHeaders.d.ts +136 -0
  152. package/dist/browser/util/compat/httpHeaders.d.ts.map +1 -0
  153. package/{dist-esm/src → dist/browser}/util/compat/httpHeaders.js +2 -1
  154. package/dist/browser/util/compat/httpHeaders.js.map +1 -0
  155. package/dist/browser/util/compat/index.d.ts +3 -0
  156. package/dist/browser/util/compat/index.d.ts.map +1 -0
  157. package/dist/browser/util/compat/index.js +5 -0
  158. package/dist/browser/util/compat/index.js.map +1 -0
  159. package/dist/browser/util/connectionStringUtils.d.ts +53 -0
  160. package/dist/browser/util/connectionStringUtils.d.ts.map +1 -0
  161. package/{dist-esm/src → dist/browser}/util/connectionStringUtils.js +8 -2
  162. package/dist/browser/util/connectionStringUtils.js.map +1 -0
  163. package/dist/browser/util/constants.d.ts +322 -0
  164. package/dist/browser/util/constants.d.ts.map +1 -0
  165. package/{dist-esm/src → dist/browser}/util/constants.js +3 -3
  166. package/{dist-esm/src → dist/browser}/util/constants.js.map +1 -1
  167. package/dist/browser/util/crypto-browser.d.mts.map +1 -0
  168. package/dist/browser/util/crypto-browser.mjs.map +1 -0
  169. package/dist/browser/util/crypto.d.ts +5 -0
  170. package/{dist-esm/src/util/crypto.browser.js → dist/browser/util/crypto.js} +2 -4
  171. package/dist/browser/util/errors.d.ts +130 -0
  172. package/dist/browser/util/errors.d.ts.map +1 -0
  173. package/{dist-esm/src → dist/browser}/util/errors.js +4 -4
  174. package/dist/browser/util/errors.js.map +1 -0
  175. package/dist/browser/util/parseUrl-browser.d.mts.map +1 -0
  176. package/dist/browser/util/parseUrl-browser.mjs.map +1 -0
  177. package/dist/browser/util/parseUrl.d.ts +5 -0
  178. package/{dist-esm/src/util/parseUrl.browser.js → dist/browser/util/parseUrl.js} +1 -3
  179. package/dist/browser/util/runtimeInfo-browser.d.mts.map +1 -0
  180. package/dist/browser/util/runtimeInfo-browser.mjs.map +1 -0
  181. package/dist/browser/util/runtimeInfo.d.ts +7 -0
  182. package/{dist-esm/src/util/runtimeInfo.browser.js → dist/browser/util/runtimeInfo.js} +2 -2
  183. package/dist/browser/util/sasServiceClientCredentials.d.ts +31 -0
  184. package/dist/browser/util/sasServiceClientCredentials.d.ts.map +1 -0
  185. package/{dist-esm/src → dist/browser}/util/sasServiceClientCredentials.js +9 -3
  186. package/dist/browser/util/sasServiceClientCredentials.js.map +1 -0
  187. package/dist/browser/util/semaphore.d.ts +38 -0
  188. package/dist/browser/util/semaphore.d.ts.map +1 -0
  189. package/{dist-esm/src → dist/browser}/util/semaphore.js +7 -3
  190. package/dist/browser/util/semaphore.js.map +1 -0
  191. package/dist/browser/util/typeGuards.d.ts +8 -0
  192. package/dist/browser/util/typeGuards.d.ts.map +1 -0
  193. package/{dist-esm/src → dist/browser}/util/typeGuards.js +2 -2
  194. package/dist/browser/util/typeGuards.js.map +1 -0
  195. package/dist/browser/util/utils.d.ts +247 -0
  196. package/dist/browser/util/utils.d.ts.map +1 -0
  197. package/{dist-esm/src → dist/browser}/util/utils.js +5 -7
  198. package/dist/browser/util/utils.js.map +1 -0
  199. package/dist/commonjs/connectionContext.d.ts +109 -0
  200. package/dist/commonjs/connectionContext.d.ts.map +1 -0
  201. package/dist/commonjs/connectionContext.js +358 -0
  202. package/dist/commonjs/connectionContext.js.map +1 -0
  203. package/dist/commonjs/constructorHelpers.d.ts +79 -0
  204. package/dist/commonjs/constructorHelpers.d.ts.map +1 -0
  205. package/dist/commonjs/constructorHelpers.js +103 -0
  206. package/dist/commonjs/constructorHelpers.js.map +1 -0
  207. package/dist/commonjs/core/autoLockRenewer.d.ts +58 -0
  208. package/dist/commonjs/core/autoLockRenewer.d.ts.map +1 -0
  209. package/dist/commonjs/core/autoLockRenewer.js +178 -0
  210. package/dist/commonjs/core/autoLockRenewer.js.map +1 -0
  211. package/dist/commonjs/core/batchingReceiver.d.ts +120 -0
  212. package/dist/commonjs/core/batchingReceiver.d.ts.map +1 -0
  213. package/dist/commonjs/core/batchingReceiver.js +405 -0
  214. package/dist/commonjs/core/batchingReceiver.js.map +1 -0
  215. package/dist/commonjs/core/linkEntity.d.ts +192 -0
  216. package/dist/commonjs/core/linkEntity.d.ts.map +1 -0
  217. package/dist/commonjs/core/linkEntity.js +344 -0
  218. package/dist/commonjs/core/linkEntity.js.map +1 -0
  219. package/dist/commonjs/core/managementClient.d.ts +312 -0
  220. package/dist/commonjs/core/managementClient.d.ts.map +1 -0
  221. package/dist/commonjs/core/managementClient.js +1078 -0
  222. package/dist/commonjs/core/managementClient.js.map +1 -0
  223. package/dist/commonjs/core/messageReceiver.d.ts +147 -0
  224. package/dist/commonjs/core/messageReceiver.d.ts.map +1 -0
  225. package/dist/commonjs/core/messageReceiver.js +169 -0
  226. package/dist/commonjs/core/messageReceiver.js.map +1 -0
  227. package/dist/commonjs/core/messageSender.d.ts +93 -0
  228. package/dist/commonjs/core/messageSender.d.ts.map +1 -0
  229. package/dist/commonjs/core/messageSender.js +307 -0
  230. package/dist/commonjs/core/messageSender.js.map +1 -0
  231. package/dist/commonjs/core/receiverHelper.d.ts +45 -0
  232. package/dist/commonjs/core/receiverHelper.d.ts.map +1 -0
  233. package/dist/commonjs/core/receiverHelper.js +123 -0
  234. package/dist/commonjs/core/receiverHelper.js.map +1 -0
  235. package/dist/commonjs/core/shared.d.ts +34 -0
  236. package/dist/commonjs/core/shared.d.ts.map +1 -0
  237. package/dist/commonjs/core/shared.js +70 -0
  238. package/dist/commonjs/core/shared.js.map +1 -0
  239. package/dist/commonjs/core/streamingReceiver.d.ts +142 -0
  240. package/dist/commonjs/core/streamingReceiver.d.ts.map +1 -0
  241. package/dist/commonjs/core/streamingReceiver.js +526 -0
  242. package/dist/commonjs/core/streamingReceiver.js.map +1 -0
  243. package/dist/commonjs/dataTransformer.d.ts +77 -0
  244. package/dist/commonjs/dataTransformer.d.ts.map +1 -0
  245. package/dist/commonjs/dataTransformer.js +169 -0
  246. package/dist/commonjs/dataTransformer.js.map +1 -0
  247. package/dist/commonjs/diagnostics/instrumentServiceBusMessage.d.ts +50 -0
  248. package/dist/commonjs/diagnostics/instrumentServiceBusMessage.d.ts.map +1 -0
  249. package/dist/commonjs/diagnostics/instrumentServiceBusMessage.js +107 -0
  250. package/dist/commonjs/diagnostics/instrumentServiceBusMessage.js.map +1 -0
  251. package/dist/commonjs/diagnostics/tracing.d.ts +21 -0
  252. package/dist/commonjs/diagnostics/tracing.d.ts.map +1 -0
  253. package/dist/commonjs/diagnostics/tracing.js +41 -0
  254. package/dist/commonjs/diagnostics/tracing.js.map +1 -0
  255. package/dist/commonjs/experimental/index.d.ts +10 -0
  256. package/dist/commonjs/experimental/index.d.ts.map +1 -0
  257. package/dist/commonjs/experimental/index.js +5 -0
  258. package/dist/commonjs/experimental/index.js.map +1 -0
  259. package/dist/commonjs/index.d.ts +26 -0
  260. package/dist/commonjs/index.d.ts.map +1 -0
  261. package/dist/commonjs/index.js +22 -0
  262. package/dist/commonjs/index.js.map +1 -0
  263. package/dist/commonjs/log.d.ts +70 -0
  264. package/dist/commonjs/log.d.ts.map +1 -0
  265. package/dist/commonjs/log.js +94 -0
  266. package/dist/commonjs/log.js.map +1 -0
  267. package/dist/commonjs/models.d.ts +328 -0
  268. package/dist/commonjs/models.d.ts.map +1 -0
  269. package/dist/commonjs/models.js +5 -0
  270. package/dist/commonjs/models.js.map +1 -0
  271. package/dist/commonjs/modelsToBeSharedWithEventHubs.d.ts +18 -0
  272. package/dist/commonjs/modelsToBeSharedWithEventHubs.d.ts.map +1 -0
  273. package/dist/commonjs/modelsToBeSharedWithEventHubs.js +5 -0
  274. package/dist/commonjs/modelsToBeSharedWithEventHubs.js.map +1 -0
  275. package/dist/commonjs/package.json +3 -0
  276. package/dist/commonjs/receivers/receiver.d.ts +299 -0
  277. package/dist/commonjs/receivers/receiver.d.ts.map +1 -0
  278. package/dist/commonjs/receivers/receiver.js +383 -0
  279. package/dist/commonjs/receivers/receiver.js.map +1 -0
  280. package/dist/commonjs/receivers/receiverCommon.d.ts +81 -0
  281. package/dist/commonjs/receivers/receiverCommon.d.ts.map +1 -0
  282. package/dist/commonjs/receivers/receiverCommon.js +269 -0
  283. package/dist/commonjs/receivers/receiverCommon.js.map +1 -0
  284. package/dist/commonjs/receivers/sessionReceiver.d.ts +189 -0
  285. package/dist/commonjs/receivers/sessionReceiver.d.ts.map +1 -0
  286. package/dist/commonjs/receivers/sessionReceiver.js +432 -0
  287. package/dist/commonjs/receivers/sessionReceiver.js.map +1 -0
  288. package/dist/commonjs/sender.d.ts +125 -0
  289. package/dist/commonjs/sender.d.ts.map +1 -0
  290. package/dist/commonjs/sender.js +191 -0
  291. package/dist/commonjs/sender.js.map +1 -0
  292. package/dist/commonjs/serializers/namespaceResourceSerializer.d.ts +46 -0
  293. package/dist/commonjs/serializers/namespaceResourceSerializer.d.ts.map +1 -0
  294. package/dist/commonjs/serializers/namespaceResourceSerializer.js +39 -0
  295. package/dist/commonjs/serializers/namespaceResourceSerializer.js.map +1 -0
  296. package/dist/commonjs/serializers/queueResourceSerializer.d.ts +461 -0
  297. package/dist/commonjs/serializers/queueResourceSerializer.d.ts.map +1 -0
  298. package/dist/commonjs/serializers/queueResourceSerializer.js +107 -0
  299. package/dist/commonjs/serializers/queueResourceSerializer.js.map +1 -0
  300. package/dist/commonjs/serializers/ruleResourceSerializer.d.ts +135 -0
  301. package/dist/commonjs/serializers/ruleResourceSerializer.d.ts.map +1 -0
  302. package/dist/commonjs/serializers/ruleResourceSerializer.js +287 -0
  303. package/dist/commonjs/serializers/ruleResourceSerializer.js.map +1 -0
  304. package/dist/commonjs/serializers/subscriptionResourceSerializer.d.ts +396 -0
  305. package/dist/commonjs/serializers/subscriptionResourceSerializer.d.ts.map +1 -0
  306. package/dist/commonjs/serializers/subscriptionResourceSerializer.js +103 -0
  307. package/dist/commonjs/serializers/subscriptionResourceSerializer.js.map +1 -0
  308. package/dist/commonjs/serializers/topicResourceSerializer.d.ts +335 -0
  309. package/dist/commonjs/serializers/topicResourceSerializer.d.ts.map +1 -0
  310. package/dist/commonjs/serializers/topicResourceSerializer.js +97 -0
  311. package/dist/commonjs/serializers/topicResourceSerializer.js.map +1 -0
  312. package/dist/commonjs/serviceBusAtomManagementClient.d.ts +652 -0
  313. package/dist/commonjs/serviceBusAtomManagementClient.d.ts.map +1 -0
  314. package/dist/commonjs/serviceBusAtomManagementClient.js +1648 -0
  315. package/dist/commonjs/serviceBusAtomManagementClient.js.map +1 -0
  316. package/dist/commonjs/serviceBusClient.d.ts +231 -0
  317. package/dist/commonjs/serviceBusClient.d.ts.map +1 -0
  318. package/dist/commonjs/serviceBusClient.js +221 -0
  319. package/dist/commonjs/serviceBusClient.js.map +1 -0
  320. package/dist/commonjs/serviceBusError.d.ts +119 -0
  321. package/dist/commonjs/serviceBusError.d.ts.map +1 -0
  322. package/dist/commonjs/serviceBusError.js +109 -0
  323. package/dist/commonjs/serviceBusError.js.map +1 -0
  324. package/dist/commonjs/serviceBusMessage.d.ts +529 -0
  325. package/dist/commonjs/serviceBusMessage.d.ts.map +1 -0
  326. package/dist/commonjs/serviceBusMessage.js +611 -0
  327. package/dist/commonjs/serviceBusMessage.js.map +1 -0
  328. package/dist/commonjs/serviceBusMessageBatch.d.ts +153 -0
  329. package/dist/commonjs/serviceBusMessageBatch.d.ts.map +1 -0
  330. package/dist/commonjs/serviceBusMessageBatch.js +196 -0
  331. package/dist/commonjs/serviceBusMessageBatch.js.map +1 -0
  332. package/dist/commonjs/serviceBusRuleManager.d.ts +103 -0
  333. package/dist/commonjs/serviceBusRuleManager.d.ts.map +1 -0
  334. package/dist/commonjs/serviceBusRuleManager.js +153 -0
  335. package/dist/commonjs/serviceBusRuleManager.js.map +1 -0
  336. package/dist/commonjs/session/messageSession.d.ts +236 -0
  337. package/dist/commonjs/session/messageSession.d.ts.map +1 -0
  338. package/dist/commonjs/session/messageSession.js +759 -0
  339. package/dist/commonjs/session/messageSession.js.map +1 -0
  340. package/dist/commonjs/tsdoc-metadata.json +11 -0
  341. package/dist/commonjs/util/atomXmlHelper.d.ts +56 -0
  342. package/dist/commonjs/util/atomXmlHelper.d.ts.map +1 -0
  343. package/dist/commonjs/util/atomXmlHelper.js +386 -0
  344. package/dist/commonjs/util/atomXmlHelper.js.map +1 -0
  345. package/dist/commonjs/util/compat/compatibility.d.ts +109 -0
  346. package/dist/commonjs/util/compat/compatibility.d.ts.map +1 -0
  347. package/dist/commonjs/util/compat/compatibility.js +30 -0
  348. package/dist/commonjs/util/compat/compatibility.js.map +1 -0
  349. package/dist/commonjs/util/compat/httpHeaders.d.ts +136 -0
  350. package/dist/commonjs/util/compat/httpHeaders.d.ts.map +1 -0
  351. package/dist/commonjs/util/compat/httpHeaders.js +157 -0
  352. package/dist/commonjs/util/compat/httpHeaders.js.map +1 -0
  353. package/dist/commonjs/util/compat/index.d.ts +3 -0
  354. package/dist/commonjs/util/compat/index.d.ts.map +1 -0
  355. package/dist/commonjs/util/compat/index.js +8 -0
  356. package/dist/commonjs/util/compat/index.js.map +1 -0
  357. package/dist/commonjs/util/connectionStringUtils.d.ts +53 -0
  358. package/dist/commonjs/util/connectionStringUtils.d.ts.map +1 -0
  359. package/dist/commonjs/util/connectionStringUtils.js +51 -0
  360. package/dist/commonjs/util/connectionStringUtils.js.map +1 -0
  361. package/dist/commonjs/util/constants.d.ts +322 -0
  362. package/dist/commonjs/util/constants.d.ts.map +1 -0
  363. package/dist/commonjs/util/constants.js +327 -0
  364. package/dist/commonjs/util/constants.js.map +1 -0
  365. package/dist/commonjs/util/crypto.d.ts +5 -0
  366. package/dist/commonjs/util/crypto.d.ts.map +1 -0
  367. package/dist/commonjs/util/crypto.js +15 -0
  368. package/dist/commonjs/util/crypto.js.map +1 -0
  369. package/dist/commonjs/util/errors.d.ts +130 -0
  370. package/dist/commonjs/util/errors.d.ts.map +1 -0
  371. package/dist/commonjs/util/errors.js +236 -0
  372. package/dist/commonjs/util/errors.js.map +1 -0
  373. package/dist/commonjs/util/parseUrl.d.ts +5 -0
  374. package/dist/commonjs/util/parseUrl.d.ts.map +1 -0
  375. package/dist/commonjs/util/parseUrl.js +13 -0
  376. package/dist/commonjs/util/parseUrl.js.map +1 -0
  377. package/dist/commonjs/util/runtimeInfo.d.ts +7 -0
  378. package/dist/commonjs/util/runtimeInfo.d.ts.map +1 -0
  379. package/dist/commonjs/util/runtimeInfo.js +24 -0
  380. package/dist/commonjs/util/runtimeInfo.js.map +1 -0
  381. package/dist/commonjs/util/sasServiceClientCredentials.d.ts +31 -0
  382. package/dist/commonjs/util/sasServiceClientCredentials.d.ts.map +1 -0
  383. package/dist/commonjs/util/sasServiceClientCredentials.js +56 -0
  384. package/dist/commonjs/util/sasServiceClientCredentials.js.map +1 -0
  385. package/dist/commonjs/util/semaphore.d.ts +38 -0
  386. package/dist/commonjs/util/semaphore.d.ts.map +1 -0
  387. package/dist/commonjs/util/semaphore.js +85 -0
  388. package/dist/commonjs/util/semaphore.js.map +1 -0
  389. package/dist/commonjs/util/typeGuards.d.ts +8 -0
  390. package/dist/commonjs/util/typeGuards.d.ts.map +1 -0
  391. package/dist/commonjs/util/typeGuards.js +15 -0
  392. package/dist/commonjs/util/typeGuards.js.map +1 -0
  393. package/dist/commonjs/util/utils.d.ts +247 -0
  394. package/dist/commonjs/util/utils.d.ts.map +1 -0
  395. package/dist/commonjs/util/utils.js +524 -0
  396. package/dist/commonjs/util/utils.js.map +1 -0
  397. package/dist/esm/connectionContext.d.ts +109 -0
  398. package/dist/esm/connectionContext.d.ts.map +1 -0
  399. package/dist/esm/connectionContext.js +355 -0
  400. package/dist/esm/connectionContext.js.map +1 -0
  401. package/dist/esm/constructorHelpers.d.ts +79 -0
  402. package/dist/esm/constructorHelpers.d.ts.map +1 -0
  403. package/dist/esm/constructorHelpers.js +96 -0
  404. package/dist/esm/constructorHelpers.js.map +1 -0
  405. package/dist/esm/core/autoLockRenewer.d.ts +58 -0
  406. package/dist/esm/core/autoLockRenewer.d.ts.map +1 -0
  407. package/dist/esm/core/autoLockRenewer.js +174 -0
  408. package/dist/esm/core/autoLockRenewer.js.map +1 -0
  409. package/dist/esm/core/batchingReceiver.d.ts +120 -0
  410. package/dist/esm/core/batchingReceiver.d.ts.map +1 -0
  411. package/dist/esm/core/batchingReceiver.js +399 -0
  412. package/dist/esm/core/batchingReceiver.js.map +1 -0
  413. package/dist/esm/core/linkEntity.d.ts +192 -0
  414. package/dist/esm/core/linkEntity.d.ts.map +1 -0
  415. package/dist/esm/core/linkEntity.js +340 -0
  416. package/dist/esm/core/linkEntity.js.map +1 -0
  417. package/dist/esm/core/managementClient.d.ts +312 -0
  418. package/dist/esm/core/managementClient.d.ts.map +1 -0
  419. package/dist/esm/core/managementClient.js +1072 -0
  420. package/dist/esm/core/managementClient.js.map +1 -0
  421. package/dist/esm/core/messageReceiver.d.ts +147 -0
  422. package/dist/esm/core/messageReceiver.d.ts.map +1 -0
  423. package/dist/esm/core/messageReceiver.js +165 -0
  424. package/dist/esm/core/messageReceiver.js.map +1 -0
  425. package/dist/esm/core/messageSender.d.ts +93 -0
  426. package/dist/esm/core/messageSender.d.ts.map +1 -0
  427. package/dist/esm/core/messageSender.js +303 -0
  428. package/dist/esm/core/messageSender.js.map +1 -0
  429. package/dist/esm/core/receiverHelper.d.ts +45 -0
  430. package/dist/esm/core/receiverHelper.d.ts.map +1 -0
  431. package/dist/esm/core/receiverHelper.js +119 -0
  432. package/dist/esm/core/receiverHelper.js.map +1 -0
  433. package/dist/esm/core/shared.d.ts +34 -0
  434. package/dist/esm/core/shared.d.ts.map +1 -0
  435. package/dist/esm/core/shared.js +66 -0
  436. package/dist/esm/core/shared.js.map +1 -0
  437. package/dist/esm/core/streamingReceiver.d.ts +142 -0
  438. package/dist/esm/core/streamingReceiver.d.ts.map +1 -0
  439. package/dist/esm/core/streamingReceiver.js +522 -0
  440. package/dist/esm/core/streamingReceiver.js.map +1 -0
  441. package/dist/esm/dataTransformer.d.ts +77 -0
  442. package/dist/esm/dataTransformer.d.ts.map +1 -0
  443. package/dist/esm/dataTransformer.js +163 -0
  444. package/dist/esm/dataTransformer.js.map +1 -0
  445. package/dist/esm/diagnostics/instrumentServiceBusMessage.d.ts +50 -0
  446. package/dist/esm/diagnostics/instrumentServiceBusMessage.d.ts.map +1 -0
  447. package/dist/esm/diagnostics/instrumentServiceBusMessage.js +101 -0
  448. package/dist/esm/diagnostics/instrumentServiceBusMessage.js.map +1 -0
  449. package/dist/esm/diagnostics/tracing.d.ts +21 -0
  450. package/dist/esm/diagnostics/tracing.d.ts.map +1 -0
  451. package/dist/esm/diagnostics/tracing.js +37 -0
  452. package/dist/esm/diagnostics/tracing.js.map +1 -0
  453. package/dist/esm/experimental/index.d.ts +10 -0
  454. package/dist/esm/experimental/index.d.ts.map +1 -0
  455. package/dist/esm/experimental/index.js +4 -0
  456. package/dist/esm/experimental/index.js.map +1 -0
  457. package/dist/esm/index.d.ts +26 -0
  458. package/dist/esm/index.d.ts.map +1 -0
  459. package/dist/esm/index.js +10 -0
  460. package/dist/esm/index.js.map +1 -0
  461. package/dist/esm/log.d.ts +70 -0
  462. package/dist/esm/log.d.ts.map +1 -0
  463. package/dist/esm/log.js +89 -0
  464. package/dist/esm/log.js.map +1 -0
  465. package/dist/esm/models.d.ts +328 -0
  466. package/dist/esm/models.d.ts.map +1 -0
  467. package/dist/esm/models.js +4 -0
  468. package/dist/esm/models.js.map +1 -0
  469. package/dist/esm/modelsToBeSharedWithEventHubs.d.ts +18 -0
  470. package/dist/esm/modelsToBeSharedWithEventHubs.d.ts.map +1 -0
  471. package/dist/esm/modelsToBeSharedWithEventHubs.js +4 -0
  472. package/dist/esm/modelsToBeSharedWithEventHubs.js.map +1 -0
  473. package/dist/esm/package.json +3 -0
  474. package/dist/esm/receivers/receiver.d.ts +299 -0
  475. package/dist/esm/receivers/receiver.d.ts.map +1 -0
  476. package/dist/esm/receivers/receiver.js +379 -0
  477. package/dist/esm/receivers/receiver.js.map +1 -0
  478. package/dist/esm/receivers/receiverCommon.d.ts +81 -0
  479. package/dist/esm/receivers/receiverCommon.d.ts.map +1 -0
  480. package/dist/esm/receivers/receiverCommon.js +257 -0
  481. package/dist/esm/receivers/receiverCommon.js.map +1 -0
  482. package/dist/esm/receivers/sessionReceiver.d.ts +189 -0
  483. package/dist/esm/receivers/sessionReceiver.d.ts.map +1 -0
  484. package/dist/esm/receivers/sessionReceiver.js +428 -0
  485. package/dist/esm/receivers/sessionReceiver.js.map +1 -0
  486. package/dist/esm/sender.d.ts +125 -0
  487. package/dist/esm/sender.d.ts.map +1 -0
  488. package/dist/esm/sender.js +186 -0
  489. package/dist/esm/sender.js.map +1 -0
  490. package/dist/esm/serializers/namespaceResourceSerializer.d.ts +46 -0
  491. package/dist/esm/serializers/namespaceResourceSerializer.d.ts.map +1 -0
  492. package/dist/esm/serializers/namespaceResourceSerializer.js +34 -0
  493. package/dist/esm/serializers/namespaceResourceSerializer.js.map +1 -0
  494. package/dist/esm/serializers/queueResourceSerializer.d.ts +461 -0
  495. package/dist/esm/serializers/queueResourceSerializer.d.ts.map +1 -0
  496. package/dist/esm/serializers/queueResourceSerializer.js +99 -0
  497. package/dist/esm/serializers/queueResourceSerializer.js.map +1 -0
  498. package/dist/esm/serializers/ruleResourceSerializer.d.ts +135 -0
  499. package/dist/esm/serializers/ruleResourceSerializer.d.ts.map +1 -0
  500. package/dist/esm/serializers/ruleResourceSerializer.js +278 -0
  501. package/dist/esm/serializers/ruleResourceSerializer.js.map +1 -0
  502. package/dist/esm/serializers/subscriptionResourceSerializer.d.ts +396 -0
  503. package/dist/esm/serializers/subscriptionResourceSerializer.d.ts.map +1 -0
  504. package/dist/esm/serializers/subscriptionResourceSerializer.js +95 -0
  505. package/dist/esm/serializers/subscriptionResourceSerializer.js.map +1 -0
  506. package/dist/esm/serializers/topicResourceSerializer.d.ts +335 -0
  507. package/dist/esm/serializers/topicResourceSerializer.d.ts.map +1 -0
  508. package/dist/esm/serializers/topicResourceSerializer.js +89 -0
  509. package/dist/esm/serializers/topicResourceSerializer.js.map +1 -0
  510. package/dist/esm/serviceBusAtomManagementClient.d.ts +652 -0
  511. package/dist/esm/serviceBusAtomManagementClient.d.ts.map +1 -0
  512. package/dist/esm/serviceBusAtomManagementClient.js +1643 -0
  513. package/dist/esm/serviceBusAtomManagementClient.js.map +1 -0
  514. package/dist/esm/serviceBusClient.d.ts +231 -0
  515. package/dist/esm/serviceBusClient.d.ts.map +1 -0
  516. package/dist/esm/serviceBusClient.js +216 -0
  517. package/dist/esm/serviceBusClient.js.map +1 -0
  518. package/dist/esm/serviceBusError.d.ts +119 -0
  519. package/dist/esm/serviceBusError.d.ts.map +1 -0
  520. package/dist/esm/serviceBusError.js +103 -0
  521. package/dist/esm/serviceBusError.js.map +1 -0
  522. package/dist/esm/serviceBusMessage.d.ts +529 -0
  523. package/dist/esm/serviceBusMessage.d.ts.map +1 -0
  524. package/dist/esm/serviceBusMessage.js +598 -0
  525. package/dist/esm/serviceBusMessage.js.map +1 -0
  526. package/dist/esm/serviceBusMessageBatch.d.ts +153 -0
  527. package/dist/esm/serviceBusMessageBatch.d.ts.map +1 -0
  528. package/dist/esm/serviceBusMessageBatch.js +192 -0
  529. package/dist/esm/serviceBusMessageBatch.js.map +1 -0
  530. package/dist/esm/serviceBusRuleManager.d.ts +103 -0
  531. package/dist/esm/serviceBusRuleManager.d.ts.map +1 -0
  532. package/dist/esm/serviceBusRuleManager.js +149 -0
  533. package/dist/esm/serviceBusRuleManager.js.map +1 -0
  534. package/dist/esm/session/messageSession.d.ts +236 -0
  535. package/dist/esm/session/messageSession.d.ts.map +1 -0
  536. package/dist/esm/session/messageSession.js +755 -0
  537. package/dist/esm/session/messageSession.js.map +1 -0
  538. package/dist/esm/util/atomXmlHelper.d.ts +56 -0
  539. package/dist/esm/util/atomXmlHelper.d.ts.map +1 -0
  540. package/dist/esm/util/atomXmlHelper.js +378 -0
  541. package/dist/esm/util/atomXmlHelper.js.map +1 -0
  542. package/dist/esm/util/compat/compatibility.d.ts +109 -0
  543. package/dist/esm/util/compat/compatibility.d.ts.map +1 -0
  544. package/dist/esm/util/compat/compatibility.js +27 -0
  545. package/dist/esm/util/compat/compatibility.js.map +1 -0
  546. package/dist/esm/util/compat/httpHeaders.d.ts +136 -0
  547. package/dist/esm/util/compat/httpHeaders.d.ts.map +1 -0
  548. package/dist/esm/util/compat/httpHeaders.js +152 -0
  549. package/dist/esm/util/compat/httpHeaders.js.map +1 -0
  550. package/dist/esm/util/compat/index.d.ts +3 -0
  551. package/dist/esm/util/compat/index.d.ts.map +1 -0
  552. package/dist/esm/util/compat/index.js +5 -0
  553. package/dist/esm/util/compat/index.js.map +1 -0
  554. package/dist/esm/util/connectionStringUtils.d.ts +53 -0
  555. package/dist/esm/util/connectionStringUtils.d.ts.map +1 -0
  556. package/dist/esm/util/connectionStringUtils.js +48 -0
  557. package/dist/esm/util/connectionStringUtils.js.map +1 -0
  558. package/dist/esm/util/constants.d.ts +322 -0
  559. package/dist/esm/util/constants.d.ts.map +1 -0
  560. package/dist/esm/util/constants.js +324 -0
  561. package/dist/esm/util/constants.js.map +1 -0
  562. package/dist/esm/util/crypto.d.ts +5 -0
  563. package/dist/esm/util/crypto.d.ts.map +1 -0
  564. package/{dist-esm/src → dist/esm}/util/crypto.js +1 -3
  565. package/dist/esm/util/crypto.js.map +1 -0
  566. package/dist/esm/util/errors.d.ts +130 -0
  567. package/dist/esm/util/errors.d.ts.map +1 -0
  568. package/dist/esm/util/errors.js +220 -0
  569. package/dist/esm/util/errors.js.map +1 -0
  570. package/dist/esm/util/parseUrl.d.ts +5 -0
  571. package/dist/esm/util/parseUrl.d.ts.map +1 -0
  572. package/{dist-esm/src → dist/esm}/util/parseUrl.js +0 -6
  573. package/dist/esm/util/parseUrl.js.map +1 -0
  574. package/dist/esm/util/runtimeInfo.d.ts +7 -0
  575. package/dist/esm/util/runtimeInfo.d.ts.map +1 -0
  576. package/{dist-esm/src → dist/esm}/util/runtimeInfo.js +2 -2
  577. package/dist/esm/util/runtimeInfo.js.map +1 -0
  578. package/dist/esm/util/sasServiceClientCredentials.d.ts +31 -0
  579. package/dist/esm/util/sasServiceClientCredentials.d.ts.map +1 -0
  580. package/dist/esm/util/sasServiceClientCredentials.js +52 -0
  581. package/dist/esm/util/sasServiceClientCredentials.js.map +1 -0
  582. package/dist/esm/util/semaphore.d.ts +38 -0
  583. package/dist/esm/util/semaphore.d.ts.map +1 -0
  584. package/dist/esm/util/semaphore.js +81 -0
  585. package/dist/esm/util/semaphore.js.map +1 -0
  586. package/dist/esm/util/typeGuards.d.ts +8 -0
  587. package/dist/esm/util/typeGuards.d.ts.map +1 -0
  588. package/dist/esm/util/typeGuards.js +12 -0
  589. package/dist/esm/util/typeGuards.js.map +1 -0
  590. package/dist/esm/util/utils.d.ts +247 -0
  591. package/dist/esm/util/utils.d.ts.map +1 -0
  592. package/dist/esm/util/utils.js +496 -0
  593. package/dist/esm/util/utils.js.map +1 -0
  594. package/dist/react-native/connectionContext.d.ts +109 -0
  595. package/dist/react-native/connectionContext.d.ts.map +1 -0
  596. package/dist/react-native/connectionContext.js +355 -0
  597. package/dist/react-native/connectionContext.js.map +1 -0
  598. package/dist/react-native/constructorHelpers.d.ts +79 -0
  599. package/dist/react-native/constructorHelpers.d.ts.map +1 -0
  600. package/dist/react-native/constructorHelpers.js +96 -0
  601. package/dist/react-native/constructorHelpers.js.map +1 -0
  602. package/dist/react-native/core/autoLockRenewer.d.ts +58 -0
  603. package/dist/react-native/core/autoLockRenewer.d.ts.map +1 -0
  604. package/dist/react-native/core/autoLockRenewer.js +174 -0
  605. package/dist/react-native/core/autoLockRenewer.js.map +1 -0
  606. package/dist/react-native/core/batchingReceiver.d.ts +120 -0
  607. package/dist/react-native/core/batchingReceiver.d.ts.map +1 -0
  608. package/dist/react-native/core/batchingReceiver.js +399 -0
  609. package/dist/react-native/core/batchingReceiver.js.map +1 -0
  610. package/dist/react-native/core/linkEntity.d.ts +192 -0
  611. package/dist/react-native/core/linkEntity.d.ts.map +1 -0
  612. package/dist/react-native/core/linkEntity.js +340 -0
  613. package/dist/react-native/core/linkEntity.js.map +1 -0
  614. package/dist/react-native/core/managementClient.d.ts +312 -0
  615. package/dist/react-native/core/managementClient.d.ts.map +1 -0
  616. package/dist/react-native/core/managementClient.js +1072 -0
  617. package/dist/react-native/core/managementClient.js.map +1 -0
  618. package/dist/react-native/core/messageReceiver.d.ts +147 -0
  619. package/dist/react-native/core/messageReceiver.d.ts.map +1 -0
  620. package/dist/react-native/core/messageReceiver.js +165 -0
  621. package/dist/react-native/core/messageReceiver.js.map +1 -0
  622. package/dist/react-native/core/messageSender.d.ts +93 -0
  623. package/dist/react-native/core/messageSender.d.ts.map +1 -0
  624. package/dist/react-native/core/messageSender.js +303 -0
  625. package/dist/react-native/core/messageSender.js.map +1 -0
  626. package/dist/react-native/core/receiverHelper.d.ts +45 -0
  627. package/dist/react-native/core/receiverHelper.d.ts.map +1 -0
  628. package/dist/react-native/core/receiverHelper.js +119 -0
  629. package/dist/react-native/core/receiverHelper.js.map +1 -0
  630. package/dist/react-native/core/shared.d.ts +34 -0
  631. package/dist/react-native/core/shared.d.ts.map +1 -0
  632. package/dist/react-native/core/shared.js +66 -0
  633. package/dist/react-native/core/shared.js.map +1 -0
  634. package/dist/react-native/core/streamingReceiver.d.ts +142 -0
  635. package/dist/react-native/core/streamingReceiver.d.ts.map +1 -0
  636. package/dist/react-native/core/streamingReceiver.js +522 -0
  637. package/dist/react-native/core/streamingReceiver.js.map +1 -0
  638. package/dist/react-native/dataTransformer.d.ts +77 -0
  639. package/dist/react-native/dataTransformer.d.ts.map +1 -0
  640. package/dist/react-native/dataTransformer.js +163 -0
  641. package/dist/react-native/dataTransformer.js.map +1 -0
  642. package/dist/react-native/diagnostics/instrumentServiceBusMessage.d.ts +50 -0
  643. package/dist/react-native/diagnostics/instrumentServiceBusMessage.d.ts.map +1 -0
  644. package/dist/react-native/diagnostics/instrumentServiceBusMessage.js +101 -0
  645. package/dist/react-native/diagnostics/instrumentServiceBusMessage.js.map +1 -0
  646. package/dist/react-native/diagnostics/tracing.d.ts +21 -0
  647. package/dist/react-native/diagnostics/tracing.d.ts.map +1 -0
  648. package/dist/react-native/diagnostics/tracing.js +37 -0
  649. package/dist/react-native/diagnostics/tracing.js.map +1 -0
  650. package/dist/react-native/experimental/index.d.ts +10 -0
  651. package/dist/react-native/experimental/index.d.ts.map +1 -0
  652. package/dist/react-native/experimental/index.js +4 -0
  653. package/dist/react-native/experimental/index.js.map +1 -0
  654. package/dist/react-native/index.d.ts +26 -0
  655. package/dist/react-native/index.d.ts.map +1 -0
  656. package/dist/react-native/index.js +10 -0
  657. package/dist/react-native/index.js.map +1 -0
  658. package/dist/react-native/log.d.ts +70 -0
  659. package/dist/react-native/log.d.ts.map +1 -0
  660. package/dist/react-native/log.js +89 -0
  661. package/dist/react-native/log.js.map +1 -0
  662. package/dist/react-native/models.d.ts +328 -0
  663. package/dist/react-native/models.d.ts.map +1 -0
  664. package/dist/react-native/models.js +4 -0
  665. package/dist/react-native/models.js.map +1 -0
  666. package/dist/react-native/modelsToBeSharedWithEventHubs.d.ts +18 -0
  667. package/dist/react-native/modelsToBeSharedWithEventHubs.d.ts.map +1 -0
  668. package/dist/react-native/modelsToBeSharedWithEventHubs.js +4 -0
  669. package/dist/react-native/modelsToBeSharedWithEventHubs.js.map +1 -0
  670. package/dist/react-native/package.json +3 -0
  671. package/dist/react-native/receivers/receiver.d.ts +299 -0
  672. package/dist/react-native/receivers/receiver.d.ts.map +1 -0
  673. package/dist/react-native/receivers/receiver.js +379 -0
  674. package/dist/react-native/receivers/receiver.js.map +1 -0
  675. package/dist/react-native/receivers/receiverCommon.d.ts +81 -0
  676. package/dist/react-native/receivers/receiverCommon.d.ts.map +1 -0
  677. package/dist/react-native/receivers/receiverCommon.js +257 -0
  678. package/dist/react-native/receivers/receiverCommon.js.map +1 -0
  679. package/dist/react-native/receivers/sessionReceiver.d.ts +189 -0
  680. package/dist/react-native/receivers/sessionReceiver.d.ts.map +1 -0
  681. package/dist/react-native/receivers/sessionReceiver.js +428 -0
  682. package/dist/react-native/receivers/sessionReceiver.js.map +1 -0
  683. package/dist/react-native/sender.d.ts +125 -0
  684. package/dist/react-native/sender.d.ts.map +1 -0
  685. package/dist/react-native/sender.js +186 -0
  686. package/dist/react-native/sender.js.map +1 -0
  687. package/dist/react-native/serializers/namespaceResourceSerializer.d.ts +46 -0
  688. package/dist/react-native/serializers/namespaceResourceSerializer.d.ts.map +1 -0
  689. package/dist/react-native/serializers/namespaceResourceSerializer.js +34 -0
  690. package/dist/react-native/serializers/namespaceResourceSerializer.js.map +1 -0
  691. package/dist/react-native/serializers/queueResourceSerializer.d.ts +461 -0
  692. package/dist/react-native/serializers/queueResourceSerializer.d.ts.map +1 -0
  693. package/dist/react-native/serializers/queueResourceSerializer.js +99 -0
  694. package/dist/react-native/serializers/queueResourceSerializer.js.map +1 -0
  695. package/dist/react-native/serializers/ruleResourceSerializer.d.ts +135 -0
  696. package/dist/react-native/serializers/ruleResourceSerializer.d.ts.map +1 -0
  697. package/dist/react-native/serializers/ruleResourceSerializer.js +278 -0
  698. package/dist/react-native/serializers/ruleResourceSerializer.js.map +1 -0
  699. package/dist/react-native/serializers/subscriptionResourceSerializer.d.ts +396 -0
  700. package/dist/react-native/serializers/subscriptionResourceSerializer.d.ts.map +1 -0
  701. package/dist/react-native/serializers/subscriptionResourceSerializer.js +95 -0
  702. package/dist/react-native/serializers/subscriptionResourceSerializer.js.map +1 -0
  703. package/dist/react-native/serializers/topicResourceSerializer.d.ts +335 -0
  704. package/dist/react-native/serializers/topicResourceSerializer.d.ts.map +1 -0
  705. package/dist/react-native/serializers/topicResourceSerializer.js +89 -0
  706. package/dist/react-native/serializers/topicResourceSerializer.js.map +1 -0
  707. package/dist/react-native/serviceBusAtomManagementClient.d.ts +652 -0
  708. package/dist/react-native/serviceBusAtomManagementClient.d.ts.map +1 -0
  709. package/dist/react-native/serviceBusAtomManagementClient.js +1643 -0
  710. package/dist/react-native/serviceBusAtomManagementClient.js.map +1 -0
  711. package/dist/react-native/serviceBusClient.d.ts +231 -0
  712. package/dist/react-native/serviceBusClient.d.ts.map +1 -0
  713. package/dist/react-native/serviceBusClient.js +216 -0
  714. package/dist/react-native/serviceBusClient.js.map +1 -0
  715. package/dist/react-native/serviceBusError.d.ts +119 -0
  716. package/dist/react-native/serviceBusError.d.ts.map +1 -0
  717. package/dist/react-native/serviceBusError.js +103 -0
  718. package/dist/react-native/serviceBusError.js.map +1 -0
  719. package/dist/react-native/serviceBusMessage.d.ts +529 -0
  720. package/dist/react-native/serviceBusMessage.d.ts.map +1 -0
  721. package/dist/react-native/serviceBusMessage.js +598 -0
  722. package/dist/react-native/serviceBusMessage.js.map +1 -0
  723. package/dist/react-native/serviceBusMessageBatch.d.ts +153 -0
  724. package/dist/react-native/serviceBusMessageBatch.d.ts.map +1 -0
  725. package/dist/react-native/serviceBusMessageBatch.js +192 -0
  726. package/dist/react-native/serviceBusMessageBatch.js.map +1 -0
  727. package/dist/react-native/serviceBusRuleManager.d.ts +103 -0
  728. package/dist/react-native/serviceBusRuleManager.d.ts.map +1 -0
  729. package/dist/react-native/serviceBusRuleManager.js +149 -0
  730. package/dist/react-native/serviceBusRuleManager.js.map +1 -0
  731. package/dist/react-native/session/messageSession.d.ts +236 -0
  732. package/dist/react-native/session/messageSession.d.ts.map +1 -0
  733. package/dist/react-native/session/messageSession.js +755 -0
  734. package/dist/react-native/session/messageSession.js.map +1 -0
  735. package/dist/react-native/util/atomXmlHelper.d.ts +56 -0
  736. package/dist/react-native/util/atomXmlHelper.d.ts.map +1 -0
  737. package/dist/react-native/util/atomXmlHelper.js +378 -0
  738. package/dist/react-native/util/atomXmlHelper.js.map +1 -0
  739. package/dist/react-native/util/compat/compatibility.d.ts +109 -0
  740. package/dist/react-native/util/compat/compatibility.d.ts.map +1 -0
  741. package/dist/react-native/util/compat/compatibility.js +27 -0
  742. package/dist/react-native/util/compat/compatibility.js.map +1 -0
  743. package/dist/react-native/util/compat/httpHeaders.d.ts +136 -0
  744. package/dist/react-native/util/compat/httpHeaders.d.ts.map +1 -0
  745. package/dist/react-native/util/compat/httpHeaders.js +152 -0
  746. package/dist/react-native/util/compat/httpHeaders.js.map +1 -0
  747. package/dist/react-native/util/compat/index.d.ts +3 -0
  748. package/dist/react-native/util/compat/index.d.ts.map +1 -0
  749. package/dist/react-native/util/compat/index.js +5 -0
  750. package/dist/react-native/util/compat/index.js.map +1 -0
  751. package/dist/react-native/util/connectionStringUtils.d.ts +53 -0
  752. package/dist/react-native/util/connectionStringUtils.d.ts.map +1 -0
  753. package/dist/react-native/util/connectionStringUtils.js +48 -0
  754. package/dist/react-native/util/connectionStringUtils.js.map +1 -0
  755. package/dist/react-native/util/constants.d.ts +322 -0
  756. package/dist/react-native/util/constants.d.ts.map +1 -0
  757. package/dist/react-native/util/constants.js +324 -0
  758. package/dist/react-native/util/constants.js.map +1 -0
  759. package/dist/react-native/util/crypto.d.ts +5 -0
  760. package/dist/react-native/util/crypto.d.ts.map +1 -0
  761. package/dist/react-native/util/crypto.js +11 -0
  762. package/dist/react-native/util/crypto.js.map +1 -0
  763. package/dist/react-native/util/errors.d.ts +130 -0
  764. package/dist/react-native/util/errors.d.ts.map +1 -0
  765. package/dist/react-native/util/errors.js +220 -0
  766. package/dist/react-native/util/errors.js.map +1 -0
  767. package/dist/react-native/util/parseUrl.d.ts +5 -0
  768. package/dist/react-native/util/parseUrl.d.ts.map +1 -0
  769. package/dist/react-native/util/parseUrl.js +9 -0
  770. package/dist/react-native/util/parseUrl.js.map +1 -0
  771. package/dist/react-native/util/runtimeInfo-react-native.d.mts.map +1 -0
  772. package/dist/react-native/util/runtimeInfo-react-native.mjs.map +1 -0
  773. package/dist/react-native/util/runtimeInfo.d.ts +7 -0
  774. package/{dist-esm/src/util/runtimeInfo.native.js → dist/react-native/util/runtimeInfo.js} +3 -3
  775. package/dist/react-native/util/sasServiceClientCredentials.d.ts +31 -0
  776. package/dist/react-native/util/sasServiceClientCredentials.d.ts.map +1 -0
  777. package/dist/react-native/util/sasServiceClientCredentials.js +52 -0
  778. package/dist/react-native/util/sasServiceClientCredentials.js.map +1 -0
  779. package/dist/react-native/util/semaphore.d.ts +38 -0
  780. package/dist/react-native/util/semaphore.d.ts.map +1 -0
  781. package/dist/react-native/util/semaphore.js +81 -0
  782. package/dist/react-native/util/semaphore.js.map +1 -0
  783. package/dist/react-native/util/typeGuards.d.ts +8 -0
  784. package/dist/react-native/util/typeGuards.d.ts.map +1 -0
  785. package/dist/react-native/util/typeGuards.js +12 -0
  786. package/dist/react-native/util/typeGuards.js.map +1 -0
  787. package/dist/react-native/util/utils.d.ts +247 -0
  788. package/dist/react-native/util/utils.d.ts.map +1 -0
  789. package/dist/react-native/util/utils.js +496 -0
  790. package/dist/react-native/util/utils.js.map +1 -0
  791. package/package.json +123 -104
  792. package/dist/index.js +0 -10438
  793. package/dist/index.js.map +0 -1
  794. package/dist-esm/src/connectionContext.js.map +0 -1
  795. package/dist-esm/src/constructorHelpers.js.map +0 -1
  796. package/dist-esm/src/core/autoLockRenewer.js.map +0 -1
  797. package/dist-esm/src/core/batchingReceiver.js.map +0 -1
  798. package/dist-esm/src/core/linkEntity.js.map +0 -1
  799. package/dist-esm/src/core/managementClient.js.map +0 -1
  800. package/dist-esm/src/core/messageReceiver.js.map +0 -1
  801. package/dist-esm/src/core/messageSender.js.map +0 -1
  802. package/dist-esm/src/core/receiverHelper.js.map +0 -1
  803. package/dist-esm/src/core/shared.js.map +0 -1
  804. package/dist-esm/src/core/streamingReceiver.js.map +0 -1
  805. package/dist-esm/src/dataTransformer.js.map +0 -1
  806. package/dist-esm/src/diagnostics/instrumentServiceBusMessage.js.map +0 -1
  807. package/dist-esm/src/diagnostics/tracing.js.map +0 -1
  808. package/dist-esm/src/index.js.map +0 -1
  809. package/dist-esm/src/log.js.map +0 -1
  810. package/dist-esm/src/models.js +0 -4
  811. package/dist-esm/src/models.js.map +0 -1
  812. package/dist-esm/src/modelsToBeSharedWithEventHubs.js +0 -4
  813. package/dist-esm/src/modelsToBeSharedWithEventHubs.js.map +0 -1
  814. package/dist-esm/src/receivers/receiver.js.map +0 -1
  815. package/dist-esm/src/receivers/receiverCommon.js.map +0 -1
  816. package/dist-esm/src/receivers/sessionReceiver.js.map +0 -1
  817. package/dist-esm/src/sender.js.map +0 -1
  818. package/dist-esm/src/serializers/namespaceResourceSerializer.js.map +0 -1
  819. package/dist-esm/src/serializers/queueResourceSerializer.js.map +0 -1
  820. package/dist-esm/src/serializers/ruleResourceSerializer.js.map +0 -1
  821. package/dist-esm/src/serializers/subscriptionResourceSerializer.js.map +0 -1
  822. package/dist-esm/src/serializers/topicResourceSerializer.js.map +0 -1
  823. package/dist-esm/src/serviceBusAtomManagementClient.js.map +0 -1
  824. package/dist-esm/src/serviceBusClient.js.map +0 -1
  825. package/dist-esm/src/serviceBusError.js.map +0 -1
  826. package/dist-esm/src/serviceBusMessage.js.map +0 -1
  827. package/dist-esm/src/serviceBusMessageBatch.js.map +0 -1
  828. package/dist-esm/src/serviceBusRuleManager.js.map +0 -1
  829. package/dist-esm/src/session/messageSession.js.map +0 -1
  830. package/dist-esm/src/util/atomXmlHelper.js.map +0 -1
  831. package/dist-esm/src/util/compat/compatibility.js.map +0 -1
  832. package/dist-esm/src/util/compat/httpHeaders.js.map +0 -1
  833. package/dist-esm/src/util/compat/index.js +0 -5
  834. package/dist-esm/src/util/compat/index.js.map +0 -1
  835. package/dist-esm/src/util/connectionStringUtils.js.map +0 -1
  836. package/dist-esm/src/util/crypto.browser.js.map +0 -1
  837. package/dist-esm/src/util/crypto.js.map +0 -1
  838. package/dist-esm/src/util/errors.js.map +0 -1
  839. package/dist-esm/src/util/parseUrl.browser.js.map +0 -1
  840. package/dist-esm/src/util/parseUrl.js.map +0 -1
  841. package/dist-esm/src/util/runtimeInfo.browser.js.map +0 -1
  842. package/dist-esm/src/util/runtimeInfo.js.map +0 -1
  843. package/dist-esm/src/util/runtimeInfo.native.js.map +0 -1
  844. package/dist-esm/src/util/sasServiceClientCredentials.js.map +0 -1
  845. package/dist-esm/src/util/semaphore.js.map +0 -1
  846. package/dist-esm/src/util/typeGuards.js.map +0 -1
  847. package/dist-esm/src/util/utils.js.map +0 -1
  848. package/types/latest/service-bus-beta.d.ts +0 -3197
@@ -1,3197 +0,0 @@
1
- /// <reference types="node" />
2
-
3
- import { AbortSignalLike } from '@azure/abort-controller';
4
- import { AmqpAnnotatedMessage } from '@azure/core-amqp';
5
- import { Buffer as Buffer_2 } from 'buffer';
6
- import { CommonClientOptions } from '@azure/core-client';
7
- import { delay } from '@azure/core-amqp';
8
- import { Delivery } from 'rhea-promise';
9
- import { HttpMethods } from '@azure/core-rest-pipeline';
10
- import Long from 'long';
11
- import { MessagingError } from '@azure/core-amqp';
12
- import { NamedKeyCredential } from '@azure/core-auth';
13
- import { OperationOptions } from '@azure/core-client';
14
- import { OperationTracingOptions } from '@azure/core-tracing';
15
- import { PagedAsyncIterableIterator } from '@azure/core-paging';
16
- import { PageSettings } from '@azure/core-paging';
17
- import { ProxySettings } from '@azure/core-rest-pipeline';
18
- import { RetryMode } from '@azure/core-amqp';
19
- import { RetryOptions } from '@azure/core-amqp';
20
- import { SASCredential } from '@azure/core-auth';
21
- import { ServiceClient } from '@azure/core-client';
22
- import { TokenCredential } from '@azure/core-auth';
23
- import { TokenType } from '@azure/core-amqp';
24
- import { TracingContext } from '@azure/core-tracing';
25
- import { UserAgentPolicyOptions } from '@azure/core-rest-pipeline';
26
- import { WebSocketImpl } from 'rhea-promise';
27
- import { WebSocketOptions } from '@azure/core-amqp';
28
-
29
- /**
30
- * Represents type of `AuthorizationRule` in ATOM based management operations.
31
- */
32
- export declare interface AuthorizationRule {
33
- /**
34
- * The claim type.
35
- */
36
- claimType: string;
37
- /**
38
- * The list of rights("Manage" | "Send" | "Listen").
39
- */
40
- accessRights?: ("Manage" | "Send" | "Listen")[];
41
- /**
42
- * The authorization rule key name.
43
- */
44
- keyName: string;
45
- /**
46
- * The primary key for the authorization rule.
47
- */
48
- primaryKey?: string;
49
- /**
50
- * The secondary key for the authorization rule.
51
- */
52
- secondaryKey?: string;
53
- }
54
-
55
- /**
56
- * Represents the correlation filter expression.
57
- * A CorrelationRuleFilter holds a set of conditions that are matched against user and system properties
58
- * of incoming messages from a Subscription.
59
- */
60
- export declare interface CorrelationRuleFilter {
61
- /**
62
- * Value to be matched with the `correlationId` property of the incoming message.
63
- */
64
- correlationId?: string;
65
- /**
66
- * Value to be matched with the `messageId` property of the incoming message.
67
- */
68
- messageId?: string;
69
- /**
70
- * Value to be matched with the `to` property of the incoming message.
71
- */
72
- to?: string;
73
- /**
74
- * Value to be matched with the `replyTo` property of the incoming message.
75
- */
76
- replyTo?: string;
77
- /**
78
- * Value to be matched with the `subject` property of the incoming message.
79
- */
80
- subject?: string;
81
- /**
82
- * Value to be matched with the `sessionId` property of the incoming message.
83
- */
84
- sessionId?: string;
85
- /**
86
- * Value to be matched with the `replyToSessionId` property of the incoming message.
87
- */
88
- replyToSessionId?: string;
89
- /**
90
- * Value to be matched with the `contentType` property of the incoming message.
91
- */
92
- contentType?: string;
93
- /**
94
- * Value to be matched with the user properties of the incoming message.
95
- */
96
- applicationProperties?: {
97
- [key: string]: string | number | boolean | Date;
98
- };
99
- }
100
-
101
- /**
102
- * Options to configure the `createBatch` method on the `Sender`.
103
- * - `maxSizeInBytes`: The upper limit for the size of batch.
104
- *
105
- * Example usage:
106
- * ```js
107
- * {
108
- * maxSizeInBytes: 1024 * 1024 // 1 MB
109
- * }
110
- * ```
111
- */
112
- export declare interface CreateMessageBatchOptions extends OperationOptionsBase {
113
- /**
114
- * The upper limit for the size of batch. The `tryAdd` function will return `false` after this limit is reached.
115
- */
116
- maxSizeInBytes?: number;
117
- }
118
-
119
- /**
120
- * Represents settable options on a queue
121
- */
122
- export declare interface CreateQueueOptions extends OperationOptions {
123
- /**
124
- * Determines the amount of time in seconds in which a message should be locked for
125
- * processing by a receiver. After this period, the message is unlocked and available
126
- * for consumption by the next receiver.
127
- * (If sessions are enabled, this lock duration is applicable for sessions and not for messages.)
128
- *
129
- * This is to be specified in ISO-8601 duration format
130
- * such as "PT1M" for 1 minute, "PT5S" for 5 seconds.
131
- *
132
- * More on ISO-8601 duration format: https://en.wikipedia.org/wiki/ISO_8601#Durations
133
- */
134
- lockDuration?: string;
135
- /**
136
- * Specifies the maximum queue size in megabytes. Any attempt to enqueue a message that
137
- * will cause the queue to exceed this value will fail.
138
- */
139
- maxSizeInMegabytes?: number;
140
- /**
141
- * The maximum message size in kilobytes for messages sent to this queue.
142
- *
143
- * (Configurable only for Premium Tier Service Bus namespace.)
144
- */
145
- maxMessageSizeInKilobytes?: number;
146
- /**
147
- * If enabled, the topic will detect duplicate messages within the time
148
- * span specified by the DuplicateDetectionHistoryTimeWindow property.
149
- * Settable only at queue creation time.
150
- */
151
- requiresDuplicateDetection?: boolean;
152
- /**
153
- * If set to true, the queue will be session-aware and only SessionReceiver
154
- * will be supported. Session-aware queues are not supported through REST.
155
- * Settable only at queue creation time.
156
- */
157
- requiresSession?: boolean;
158
- /**
159
- * Depending on whether DeadLettering is enabled, a message is automatically
160
- * moved to the dead-letter sub-queue or deleted if it has been stored in the
161
- * queue for longer than the specified time.
162
- * This value is overwritten by a TTL specified on the message
163
- * if and only if the message TTL is smaller than the TTL set on the queue.
164
- * This value is immutable after the Queue has been created.
165
- * This is to be specified in ISO-8601 duration format
166
- * such as "PT1M" for 1 minute, "PT5S" for 5 seconds.
167
- *
168
- * More on ISO-8601 duration format: https://en.wikipedia.org/wiki/ISO_8601#Durations
169
- */
170
- defaultMessageTimeToLive?: string;
171
- /**
172
- * If it is enabled and a message expires, the Service Bus moves the message
173
- * from the queue into the queue’s dead-letter sub-queue. If disabled,
174
- * message will be permanently deleted from the queue.
175
- * Settable only at queue creation time.
176
- */
177
- deadLetteringOnMessageExpiration?: boolean;
178
- /**
179
- * Specifies the time span during which the Service Bus detects message duplication.
180
- * This is to be specified in ISO-8601 duration format
181
- * such as "PT1M" for 1 minute, "PT5S" for 5 seconds.
182
- *
183
- * More on ISO-8601 duration format: https://en.wikipedia.org/wiki/ISO_8601#Durations
184
- */
185
- duplicateDetectionHistoryTimeWindow?: string;
186
- /**
187
- * The maximum delivery count of messages after which if it is still not settled,
188
- * gets moved to the dead-letter sub-queue.
189
- */
190
- maxDeliveryCount?: number;
191
- /**
192
- * Specifies if batched operations should be allowed.
193
- */
194
- enableBatchedOperations?: boolean;
195
- /**
196
- * Authorization rules on the queue
197
- */
198
- authorizationRules?: AuthorizationRule[];
199
- /**
200
- * Status of the messaging entity.
201
- */
202
- status?: EntityStatus;
203
- /**
204
- * Absolute URL or the name of the queue or topic the
205
- * messages are to be forwarded to.
206
- * For example, an absolute URL input would be of the form
207
- * `sb://<your-service-bus-namespace-endpoint>/<queue-or-topic-name>`
208
- */
209
- forwardTo?: string;
210
- /**
211
- * The user provided metadata information associated with the queue.
212
- * Used to specify textual content such as tags, labels, etc.
213
- * Value must not exceed 1024 bytes encoded in utf-8.
214
- */
215
- userMetadata?: string;
216
- /**
217
- * Max idle time before entity is deleted.
218
- * This is to be specified in ISO-8601 duration format
219
- * such as "PT1M" for 1 minute, "PT5S" for 5 seconds.
220
- *
221
- * More on ISO-8601 duration format: https://en.wikipedia.org/wiki/ISO_8601#Durations
222
- */
223
- autoDeleteOnIdle?: string;
224
- /**
225
- * Specifies whether the queue should be partitioned.
226
- */
227
- enablePartitioning?: boolean;
228
- /**
229
- * Absolute URL or the name of the queue or topic the dead-lettered
230
- * messages are to be forwarded to.
231
- * For example, an absolute URL input would be of the form
232
- * `sb://<your-service-bus-namespace-endpoint>/<queue-or-topic-name>`
233
- */
234
- forwardDeadLetteredMessagesTo?: string;
235
- /**
236
- * Specifies whether express entities are enabled on queue.
237
- */
238
- enableExpress?: boolean;
239
- /**
240
- * Availability status of the messaging entity.
241
- */
242
- availabilityStatus?: EntityAvailabilityStatus;
243
- }
244
-
245
- /**
246
- * Represents settable options on a subscription
247
- */
248
- export declare interface CreateSubscriptionOptions extends OperationOptions {
249
- /**
250
- * The default lock duration is applied to subscriptions that do not define a lock
251
- * duration.
252
- * (If sessions are enabled, this lock duration is applicable for sessions and not for messages.)
253
- *
254
- * This is to be specified in ISO-8601 duration format
255
- * such as "PT1M" for 1 minute, "PT5S" for 5 seconds.
256
- *
257
- * More on ISO-8601 duration format: https://en.wikipedia.org/wiki/ISO_8601#Durations
258
- */
259
- lockDuration?: string;
260
- /**
261
- * If set to true, the subscription will be session-aware and only SessionReceiver
262
- * will be supported. Session-aware subscription are not supported through REST.
263
- * Settable only at subscription creation time.
264
- */
265
- requiresSession?: boolean;
266
- /**
267
- * Determines how long a message lives in the subscription. Based on whether
268
- * dead-lettering is enabled, a message whose TTL has expired will either be moved
269
- * to the subscription’s associated DeadLtterQueue or permanently deleted.
270
- * This is to be specified in ISO-8601 duration format
271
- * such as "PT1M" for 1 minute, "PT5S" for 5 seconds.
272
- *
273
- * More on ISO-8601 duration format: https://en.wikipedia.org/wiki/ISO_8601#Durations
274
- */
275
- defaultMessageTimeToLive?: string;
276
- /**
277
- * If it is enabled and a message expires, the Service Bus moves the message from
278
- * the queue into the subscription’s dead-letter sub-queue. If disabled, message
279
- * will be permanently deleted from the subscription’s main queue.
280
- * Settable only at subscription creation time.
281
- */
282
- deadLetteringOnMessageExpiration?: boolean;
283
- /**
284
- * Determines how the Service Bus handles a message that causes an exception during
285
- * a subscription’s filter evaluation. If the value is set to true, the message that
286
- * caused the exception will be moved to the subscription’s dead-letter sub-queue.
287
- * Otherwise, it will be discarded. By default this parameter is set to true,
288
- * allowing the user a chance to investigate the cause of the exception.
289
- * It can occur from a malformed message or some incorrect assumptions being made
290
- * in the filter about the form of the message. Settable only at topic creation time.
291
- */
292
- deadLetteringOnFilterEvaluationExceptions?: boolean;
293
- /**
294
- * Represents the options to create the default rule for the subscription.
295
- */
296
- defaultRuleOptions?: {
297
- /**
298
- * Name of the rule
299
- */
300
- name: string;
301
- /**
302
- * Defines the filter expression that the rule evaluates. For `SqlRuleFilter` input,
303
- * the expression string is interpreted as a SQL92 expression which must
304
- * evaluate to True or False. Only one between a `CorrelationRuleFilter` or
305
- * a `SqlRuleFilter` can be defined.
306
- */
307
- filter?: SqlRuleFilter | CorrelationRuleFilter;
308
- /**
309
- * The SQL like expression that can be executed on the message should the
310
- * associated filter apply.
311
- */
312
- action?: SqlRuleAction;
313
- };
314
- /**
315
- * The maximum delivery count of messages after which if it is still not settled,
316
- * gets moved to the dead-letter sub-queue.
317
- *
318
- */
319
- maxDeliveryCount?: number;
320
- /**
321
- * Specifies if batched operations should be allowed.
322
- */
323
- enableBatchedOperations?: boolean;
324
- /**
325
- * Status of the messaging entity.
326
- */
327
- status?: EntityStatus;
328
- /**
329
- * Absolute URL or the name of the queue or topic the
330
- * messages are to be forwarded to.
331
- * For example, an absolute URL input would be of the form
332
- * `sb://<your-service-bus-namespace-endpoint>/<queue-or-topic-name>`
333
- */
334
- forwardTo?: string;
335
- /**
336
- * The user provided metadata information associated with the subscription.
337
- * Used to specify textual content such as tags, labels, etc.
338
- * Value must not exceed 1024 bytes encoded in utf-8.
339
- */
340
- userMetadata?: string;
341
- /**
342
- * Absolute URL or the name of the queue or topic the dead-lettered
343
- * messages are to be forwarded to.
344
- * For example, an absolute URL input would be of the form
345
- * `sb://<your-service-bus-namespace-endpoint>/<queue-or-topic-name>`
346
- */
347
- forwardDeadLetteredMessagesTo?: string;
348
- /**
349
- * Max idle time before entity is deleted.
350
- * This is to be specified in ISO-8601 duration format
351
- * such as "PT1M" for 1 minute, "PT5S" for 5 seconds.
352
- *
353
- * More on ISO-8601 duration format: https://en.wikipedia.org/wiki/ISO_8601#Durations
354
- */
355
- autoDeleteOnIdle?: string;
356
- /**
357
- * Availability status of the messaging entity.
358
- */
359
- availabilityStatus?: EntityAvailabilityStatus;
360
- }
361
-
362
- /**
363
- * Represents settable options on a topic
364
- */
365
- export declare interface CreateTopicOptions extends OperationOptions {
366
- /**
367
- * Determines how long a message lives in the associated subscriptions.
368
- * Subscriptions inherit the TTL from the topic unless they are created explicitly
369
- * with a smaller TTL. Based on whether dead-lettering is enabled, a message whose
370
- * TTL has expired will either be moved to the subscription’s associated dead-letter
371
- * sub-queue or will be permanently deleted.
372
- * This is to be specified in ISO-8601 duration format
373
- * such as "PT1M" for 1 minute, "PT5S" for 5 seconds.
374
- *
375
- * More on ISO-8601 duration format: https://en.wikipedia.org/wiki/ISO_8601#Durations
376
- */
377
- defaultMessageTimeToLive?: string;
378
- /**
379
- * Specifies the maximum topic size in megabytes. Any attempt to enqueue a message
380
- * that will cause the topic to exceed this value will fail. All messages that are
381
- * stored in the topic or any of its subscriptions count towards this value.
382
- * Multiple copies of a message that reside in one or multiple subscriptions count
383
- * as a single messages. For example, if message m exists once in subscription s1
384
- * and twice in subscription s2, m is counted as a single message.
385
- */
386
- maxSizeInMegabytes?: number;
387
- /**
388
- * The maximum message size in kilobytes for messages sent to this topic.
389
- *
390
- * (Configurable only for Premium Tier Service Bus namespace.)
391
- */
392
- maxMessageSizeInKilobytes?: number;
393
- /**
394
- * If enabled, the topic will detect duplicate messages within the time span
395
- * specified by the DuplicateDetectionHistoryTimeWindow property.
396
- * Settable only at topic creation time.
397
- */
398
- requiresDuplicateDetection?: boolean;
399
- /**
400
- * Specifies the time span during which the Service Bus will detect message duplication.
401
- * This is to be specified in ISO-8601 duration format
402
- * such as "PT1M" for 1 minute, "PT5S" for 5 seconds.
403
- *
404
- * More on ISO-8601 duration format: https://en.wikipedia.org/wiki/ISO_8601#Durations
405
- */
406
- duplicateDetectionHistoryTimeWindow?: string;
407
- /**
408
- * Specifies if batched operations should be allowed.
409
- */
410
- enableBatchedOperations?: boolean;
411
- /**
412
- * Authorization rules on the topic
413
- */
414
- authorizationRules?: AuthorizationRule[];
415
- /**
416
- * Status of the messaging entity.
417
- */
418
- status?: EntityStatus;
419
- /**
420
- * The user provided metadata information associated with the topic.
421
- * Used to specify textual content such as tags, labels, etc.
422
- * Value must not exceed 1024 bytes encoded in utf-8.
423
- */
424
- userMetadata?: string;
425
- /**
426
- * Specifies whether the topic supports message ordering.
427
- */
428
- supportOrdering?: boolean;
429
- /**
430
- * Max idle time before entity is deleted.
431
- * This is to be specified in ISO-8601 duration format
432
- * such as "PT1M" for 1 minute, "PT5S" for 5 seconds.
433
- *
434
- * More on ISO-8601 duration format: https://en.wikipedia.org/wiki/ISO_8601#Durations
435
- */
436
- autoDeleteOnIdle?: string;
437
- /**
438
- * Specifies whether the topic should be partitioned
439
- */
440
- enablePartitioning?: boolean;
441
- /**
442
- * Specifies whether express entities are enabled on topic.
443
- */
444
- enableExpress?: boolean;
445
- /**
446
- * Availability status of the messaging entity.
447
- */
448
- availabilityStatus?: EntityAvailabilityStatus;
449
- }
450
-
451
- /**
452
- * Describes the reason and error description for dead lettering a message using the `deadLetter()`
453
- * method on the message received from Service Bus.
454
- */
455
- export declare interface DeadLetterOptions {
456
- /**
457
- * The reason for deadlettering the message.
458
- */
459
- deadLetterReason: string;
460
- /**
461
- * The error description for deadlettering the message.
462
- */
463
- deadLetterErrorDescription: string;
464
- }
465
-
466
- export { delay }
467
-
468
- /**
469
- * Options to configure messages deletion.
470
- */
471
- export declare interface DeleteMessagesOptions extends OperationOptionsBase {
472
- /**
473
- * If specified, only messages enqueued before this time are deleted.
474
- */
475
- beforeEnqueueTime?: Date;
476
- /**
477
- * Up to `maxMessageCount` messages will be deleted.
478
- */
479
- maxMessageCount: number;
480
- }
481
-
482
- export { Delivery }
483
-
484
- /**
485
- * Represents the result of list operation on entities which also contains the `continuationToken` to start iterating over from.
486
- */
487
- export declare type EntitiesResponse<T extends object> = WithResponse<Array<T>> & Pick<PageSettings, "continuationToken">;
488
-
489
- /**
490
- * Possible values for `availabilityStatus` of the Service Bus messaging entities.
491
- */
492
- export declare type EntityAvailabilityStatus = "Available" | "Limited" | "Renaming" | "Restoring" | "Unknown";
493
-
494
- /**
495
- * Possible values for `status` of the Service Bus messaging entities.
496
- */
497
- export declare type EntityStatus = "Active" | "Creating" | "Deleting" | "ReceiveDisabled" | "SendDisabled" | "Disabled" | "Renaming" | "Restoring" | "Unknown";
498
-
499
- /**
500
- * Options when getting an iterable iterator from Service Bus.
501
- */
502
- export declare interface GetMessageIteratorOptions extends OperationOptionsBase {
503
- }
504
-
505
- /**
506
- * An individual header within a HttpHeaders collection.
507
- */
508
- export declare interface HttpHeader {
509
- /**
510
- * The name of the header.
511
- */
512
- name: string;
513
- /**
514
- * The value of the header.
515
- */
516
- value: string;
517
- }
518
-
519
- /**
520
- * A collection of HTTP header key/value pairs.
521
- */
522
- export declare interface HttpHeadersLike {
523
- /**
524
- * Set a header in this collection with the provided name and value. The name is
525
- * case-insensitive.
526
- * @param headerName - The name of the header to set. This value is case-insensitive.
527
- * @param headerValue - The value of the header to set.
528
- */
529
- set(headerName: string, headerValue: string | number): void;
530
- /**
531
- * Get the header value for the provided header name, or undefined if no header exists in this
532
- * collection with the provided name.
533
- * @param headerName - The name of the header.
534
- */
535
- get(headerName: string): string | undefined;
536
- /**
537
- * Get whether or not this header collection contains a header entry for the provided header name.
538
- */
539
- contains(headerName: string): boolean;
540
- /**
541
- * Remove the header with the provided headerName. Return whether or not the header existed and
542
- * was removed.
543
- * @param headerName - The name of the header to remove.
544
- */
545
- remove(headerName: string): boolean;
546
- /**
547
- * Get the headers that are contained this collection as an object.
548
- */
549
- rawHeaders(): RawHttpHeaders;
550
- /**
551
- * Get the headers that are contained in this collection as an array.
552
- */
553
- headersArray(): HttpHeader[];
554
- /**
555
- * Get the header names that are contained in this collection.
556
- */
557
- headerNames(): string[];
558
- /**
559
- * Get the header values that are contained in this collection.
560
- */
561
- headerValues(): string[];
562
- /**
563
- * Create a deep clone/copy of this HttpHeaders collection.
564
- */
565
- clone(): HttpHeadersLike;
566
- /**
567
- * Get the JSON object representation of this HTTP header collection.
568
- * The result is the same as `rawHeaders()`.
569
- */
570
- toJson(options?: {
571
- preserveCase?: boolean;
572
- }): RawHttpHeaders;
573
- }
574
-
575
- /**
576
- * The properties on an HTTP response which will always be present.
577
- */
578
- export declare interface HttpResponse {
579
- /**
580
- * The raw request
581
- */
582
- request: WebResourceLike;
583
- /**
584
- * The HTTP response status (e.g. 200)
585
- */
586
- status: number;
587
- /**
588
- * The HTTP response headers.
589
- */
590
- headers: HttpHeadersLike;
591
- }
592
-
593
- /**
594
- * Determines if an error is of type `ServiceBusError`
595
- *
596
- * @param err - An error to check to see if it's of type ServiceBusError
597
- */
598
- export declare function isServiceBusError(err: unknown): err is ServiceBusError;
599
-
600
- /**
601
- * The general message handler interface (used for streamMessages).
602
- */
603
- export declare interface MessageHandlers {
604
- /**
605
- * Handler that processes messages from service bus.
606
- *
607
- * @param message - A message received from Service Bus.
608
- */
609
- processMessage(message: ServiceBusReceivedMessage): Promise<void>;
610
- /**
611
- * Handler that processes errors that occur during receiving.
612
- *
613
- * This handler will be called for any error that occurs in the receiver when
614
- * - receiving the message, or
615
- * - executing your `processMessage` callback, or
616
- * - receiver is completing the message on your behalf after successfully running your `processMessage` callback and `autoCompleteMessages` is enabled
617
- * - receiver is abandoning the message on your behalf if running your `processMessage` callback fails and `autoCompleteMessages` is enabled
618
- * - receiver is renewing the lock on your behalf due to auto lock renewal feature being enabled
619
- *
620
- * Note that when receiving messages in a stream using `subscribe()`, the receiver will automatically retry receiving messages on all errors unless
621
- * `close()` is called on the subscription. It is completely up to users to decide what errors are considered non-recoverable and to handle them
622
- * accordingly in this callback.
623
- * For a list of errors occurs within Service Bus, please refer to https://docs.microsoft.com/javascript/api/\@azure/service-bus/servicebuserror?view=azure-node-latest
624
- * @param args - The error and additional context to indicate where
625
- * the error originated.
626
- */
627
- processError(args: ProcessErrorArgs): Promise<void>;
628
- }
629
-
630
- export { MessagingError }
631
-
632
- /**
633
- * Represents the metadata related to a service bus namespace.
634
- *
635
- */
636
- export declare interface NamespaceProperties {
637
- /**
638
- * The time at which the namespace was created.
639
- */
640
- createdAt: Date;
641
- /**
642
- * The SKU/tier of the namespace.
643
- * "Basic", "Standard" and "Premium"
644
- */
645
- messagingSku: "Basic" | "Premium" | "Standard";
646
- /**
647
- * The last time at which the namespace was modified.
648
- */
649
- modifiedAt: Date;
650
- /**
651
- * Name of the namespace.
652
- */
653
- name: string;
654
- /**
655
- * Number of messaging units allocated for namespace.
656
- * Valid only for Premium namespaces.
657
- * messagingUnits would be set to `undefined` for Basic and Standard namespaces.
658
- */
659
- messagingUnits: number | undefined;
660
- }
661
-
662
- export { OperationOptions }
663
-
664
- /**
665
- * NOTE: This type is intended to mirror the relevant fields and structure from `@azure/core-client` OperationOptions
666
- *
667
- * Options for configuring tracing and the abortSignal.
668
- */
669
- export declare type OperationOptionsBase = Pick<OperationOptions, "abortSignal" | "tracingOptions">;
670
-
671
- /**
672
- * Parses given connection string into the different properties applicable to Azure Service Bus.
673
- * The properties are useful to then construct a ServiceBusClient.
674
- * @param connectionString - The connection string associated with the Shared Access Policy created
675
- * for the Service Bus namespace, queue or topic.
676
- */
677
- export declare function parseServiceBusConnectionString(connectionString: string): ServiceBusConnectionStringProperties;
678
-
679
- /**
680
- * Describes the options passed to the `peekMessages` method on a receiver.
681
- */
682
- export declare interface PeekMessagesOptions extends OperationOptionsBase {
683
- /**
684
- * The sequence number to start peeking messages from (inclusive).
685
- */
686
- fromSequenceNumber?: Long;
687
- /**
688
- * @beta
689
- * (Experimental for diagnostic purpose) Specifies whether to omit the body when peeking messages. Default value `false`.
690
- */
691
- omitMessageBody?: boolean;
692
- }
693
-
694
- /**
695
- * Arguments to the `processError` callback.
696
- */
697
- export declare interface ProcessErrorArgs {
698
- /**
699
- * The error.
700
- */
701
- error: Error | ServiceBusError;
702
- /**
703
- * The operation where the error originated.
704
- *
705
- * 'abandon': Errors that occur when if `abandon` is triggered automatically.
706
- * 'complete': Errors that occur when autoComplete completes a message.
707
- * 'processMessageCallback': Errors thrown from the user's `processMessage` callback passed to `subscribe`.
708
- * 'receive': Errors thrown when receiving messages.
709
- * 'renewLock': Errors thrown when automatic lock renewal fails.
710
- */
711
- errorSource: "abandon" | "complete" | "processMessageCallback" | "receive" | "renewLock";
712
- /**
713
- * The entity path for the current receiver.
714
- */
715
- entityPath: string;
716
- /**
717
- * The fully qualified namespace for the Service Bus.
718
- */
719
- fullyQualifiedNamespace: string;
720
- /**
721
- * The identifier of the client that raised this event.
722
- */
723
- identifier: string;
724
- }
725
-
726
- /**
727
- * Options to configure deletion of all messages in an entity.
728
- */
729
- export declare interface PurgeMessagesOptions extends OperationOptionsBase {
730
- /**
731
- * If specified, only messages enqueued before this time are deleted.
732
- */
733
- beforeEnqueueTime?: Date;
734
- }
735
-
736
- /**
737
- * Represents the input for updateQueue.
738
- *
739
- */
740
- export declare interface QueueProperties {
741
- /**
742
- * Name of the queue
743
- */
744
- readonly name: string;
745
- /**
746
- * Determines the amount of time in seconds in which a message should be locked for
747
- * processing by a receiver. After this period, the message is unlocked and available
748
- * for consumption by the next receiver.
749
- * (If sessions are enabled, this lock duration is applicable for sessions and not for messages.)
750
- *
751
- * This is to be specified in ISO-8601 duration format
752
- * such as "PT1M" for 1 minute, "PT5S" for 5 seconds.
753
- *
754
- * More on ISO-8601 duration format: https://en.wikipedia.org/wiki/ISO_8601#Durations
755
- */
756
- lockDuration: string;
757
- /**
758
- * Specifies the maximum queue size in megabytes. Any attempt to enqueue a message that
759
- * will cause the queue to exceed this value will fail.
760
- */
761
- maxSizeInMegabytes: number;
762
- /**
763
- * The maximum message size in kilobytes for messages sent to this queue.
764
- *
765
- * Not applicable if service version "2017-04" is chosen when creating the `ServiceBusAdministrationClient`.
766
- */
767
- maxMessageSizeInKilobytes?: number;
768
- /**
769
- * If enabled, the topic will detect duplicate messages within the time
770
- * span specified by the DuplicateDetectionHistoryTimeWindow property.
771
- * Settable only at queue creation time.
772
- */
773
- readonly requiresDuplicateDetection: boolean;
774
- /**
775
- * If set to true, the queue will be session-aware and only SessionReceiver
776
- * will be supported. Session-aware queues are not supported through REST.
777
- * Settable only at queue creation time.
778
- */
779
- readonly requiresSession: boolean;
780
- /**
781
- * Depending on whether DeadLettering is enabled, a message is automatically
782
- * moved to the dead-letter sub-queue or deleted if it has been stored in the
783
- * queue for longer than the specified time.
784
- * This value is overwritten by a TTL specified on the message
785
- * if and only if the message TTL is smaller than the TTL set on the queue.
786
- * This value is immutable after the Queue has been created.
787
- * This is to be specified in ISO-8601 duration format
788
- * such as "PT1M" for 1 minute, "PT5S" for 5 seconds.
789
- *
790
- * More on ISO-8601 duration format: https://en.wikipedia.org/wiki/ISO_8601#Durations
791
- */
792
- defaultMessageTimeToLive: string;
793
- /**
794
- * If it is enabled and a message expires, the Service Bus moves the message
795
- * from the queue into the queue’s dead-letter sub-queue. If disabled,
796
- * message will be permanently deleted from the queue.
797
- * Settable only at queue creation time.
798
- */
799
- deadLetteringOnMessageExpiration: boolean;
800
- /**
801
- * Specifies the time span during which the Service Bus detects message duplication.
802
- * This is to be specified in ISO-8601 duration format
803
- * such as "PT1M" for 1 minute, "PT5S" for 5 seconds.
804
- *
805
- * More on ISO-8601 duration format: https://en.wikipedia.org/wiki/ISO_8601#Durations
806
- */
807
- duplicateDetectionHistoryTimeWindow: string;
808
- /**
809
- * The maximum delivery count of messages after which if it is still not settled,
810
- * gets moved to the dead-letter sub-queue.
811
- */
812
- maxDeliveryCount: number;
813
- /**
814
- * Specifies if batched operations should be allowed.
815
- */
816
- enableBatchedOperations: boolean;
817
- /**
818
- * Authorization rules on the queue
819
- */
820
- authorizationRules?: AuthorizationRule[];
821
- /**
822
- * Status of the messaging entity.
823
- */
824
- status: EntityStatus;
825
- /**
826
- * Absolute URL or the name of the queue or topic the
827
- * messages are to be forwarded to.
828
- * For example, an absolute URL input would be of the form
829
- * `sb://<your-service-bus-namespace-endpoint>/<queue-or-topic-name>`
830
- */
831
- forwardTo?: string;
832
- /**
833
- * The user provided metadata information associated with the queue.
834
- * Used to specify textual content such as tags, labels, etc.
835
- * Value must not exceed 1024 bytes encoded in utf-8.
836
- */
837
- userMetadata: string;
838
- /**
839
- * Max idle time before entity is deleted.
840
- * This is to be specified in ISO-8601 duration format
841
- * such as "PT1M" for 1 minute, "PT5S" for 5 seconds.
842
- *
843
- * More on ISO-8601 duration format: https://en.wikipedia.org/wiki/ISO_8601#Durations
844
- */
845
- autoDeleteOnIdle: string;
846
- /**
847
- * Specifies whether the queue should be partitioned.
848
- */
849
- readonly enablePartitioning: boolean;
850
- /**
851
- * Absolute URL or the name of the queue or topic the dead-lettered
852
- * messages are to be forwarded to.
853
- * For example, an absolute URL input would be of the form
854
- * `sb://<your-service-bus-namespace-endpoint>/<queue-or-topic-name>`
855
- */
856
- forwardDeadLetteredMessagesTo?: string;
857
- /**
858
- * Specifies whether express entities are enabled on queue.
859
- */
860
- readonly enableExpress: boolean;
861
- /**
862
- * Availability status of the messaging entity.
863
- */
864
- readonly availabilityStatus: EntityAvailabilityStatus;
865
- }
866
-
867
- /**
868
- * Represents runtime info attributes of a queue entity
869
- */
870
- export declare interface QueueRuntimeProperties {
871
- /**
872
- * Name of the queue
873
- */
874
- name: string;
875
- /**
876
- * Created at timestamp
877
- */
878
- createdAt: Date;
879
- /**
880
- * Updated at timestamp
881
- */
882
- modifiedAt: Date;
883
- /**
884
- * Accessed at timestamp
885
- */
886
- accessedAt: Date;
887
- /**
888
- * The entity's message count.
889
- *
890
- */
891
- totalMessageCount?: number;
892
- /**
893
- * The number of active messages in the queue.
894
- */
895
- activeMessageCount: number;
896
- /**
897
- * The number of messages that have been dead lettered.
898
- */
899
- deadLetterMessageCount: number;
900
- /**
901
- * The number of scheduled messages.
902
- */
903
- scheduledMessageCount: number;
904
- /**
905
- * The number of messages transferred to another queue, topic, or subscription
906
- */
907
- transferMessageCount: number;
908
- /**
909
- * The number of messages transferred to the dead letter queue.
910
- */
911
- transferDeadLetterMessageCount: number;
912
- /**
913
- * The entity's size in bytes.
914
- *
915
- */
916
- sizeInBytes?: number;
917
- }
918
-
919
- /**
920
- * A HttpHeaders collection represented as a simple JSON object.
921
- */
922
- export declare type RawHttpHeaders = {
923
- [headerName: string]: string;
924
- };
925
-
926
- /**
927
- * Options when receiving a batch of messages from Service Bus.
928
- */
929
- export declare interface ReceiveMessagesOptions extends OperationOptionsBase {
930
- /**
931
- * The maximum amount of time to wait for messages to arrive.
932
- * **Default**: `60000` milliseconds.
933
- */
934
- maxWaitTimeInMs?: number;
935
- }
936
-
937
- export { RetryMode }
938
-
939
- export { RetryOptions }
940
-
941
- /**
942
- * Represents all the attributes of a rule.
943
- */
944
- export declare interface RuleProperties {
945
- /**
946
- * Name of the rule
947
- */
948
- readonly name: string;
949
- /**
950
- * Defines the filter expression that the rule evaluates. For `SqlRuleFilter` input,
951
- * the expression string is interpreted as a SQL92 expression which must
952
- * evaluate to True or False. Only one between a `CorrelationRuleFilter` or
953
- * a `SqlRuleFilter` can be defined.
954
- */
955
- filter: SqlRuleFilter | CorrelationRuleFilter;
956
- /**
957
- * The SQL like expression that can be executed on the message should the
958
- * associated filter apply.
959
- */
960
- action: SqlRuleAction;
961
- }
962
-
963
- /**
964
- * All operations return promises that resolve to an object that has the relevant output.
965
- * These objects also have a property called `_response` that you can use if you want to
966
- * access the direct response from the service.
967
- */
968
- export declare class ServiceBusAdministrationClient extends ServiceClient {
969
- /**
970
- * Reference to the endpoint as extracted from input connection string.
971
- */
972
- private endpoint;
973
- /**
974
- * Reference to the endpoint with protocol prefix as extracted from input connection string.
975
- */
976
- private endpointWithProtocol;
977
- private serviceVersion;
978
- /**
979
- * Singleton instances of serializers used across the various operations.
980
- */
981
- private namespaceResourceSerializer;
982
- private queueResourceSerializer;
983
- private topicResourceSerializer;
984
- private subscriptionResourceSerializer;
985
- private ruleResourceSerializer;
986
- /**
987
- * Credentials used to generate tokens as required for the various operations.
988
- */
989
- private credentials;
990
- /**
991
- * Initializes a new instance of the ServiceBusAdministrationClient class.
992
- * @param connectionString - The connection string needed for the client to connect to Azure.
993
- * @param options - PipelineOptions
994
- */
995
- constructor(connectionString: string, options?: ServiceBusAdministrationClientOptions);
996
- /**
997
- *
998
- * @param fullyQualifiedNamespace - The fully qualified namespace of your Service Bus instance which is
999
- * likely to be similar to <yournamespace>.servicebus.windows.net.
1000
- * @param credential - A credential object used by the client to get the token to authenticate the connection
1001
- * with the Azure Service Bus. See &commat;azure/identity for creating the credentials.
1002
- * If you're using your own implementation of the `TokenCredential` interface against AAD, then set the "scopes" for service-bus
1003
- * to be `["https://servicebus.azure.net//user_impersonation"]` to get the appropriate token.
1004
- * Use the `AzureNamedKeyCredential` from &commat;azure/core-auth if you want to pass in a `SharedAccessKeyName`
1005
- * and `SharedAccessKey` without using a connection string. These fields map to the `name` and `key` field respectively
1006
- * in `AzureNamedKeyCredential`.
1007
- * @param options - PipelineOptions
1008
- */
1009
- constructor(fullyQualifiedNamespace: string, credential: TokenCredential | NamedKeyCredential, options?: ServiceBusAdministrationClientOptions);
1010
- /**
1011
- * Returns an object representing the metadata related to a service bus namespace.
1012
- * @param operationOptions - The options that can be used to abort, trace and control other configurations on the HTTP request.
1013
- *
1014
- */
1015
- getNamespaceProperties(operationOptions?: OperationOptions): Promise<WithResponse<NamespaceProperties>>;
1016
- /**
1017
- * Creates a queue with given name, configured using the given options
1018
- * @param options - Options to configure the Queue being created(For example, you can configure a queue to support partitions or sessions)
1019
- * and the operation options that can be used to abort, trace and control other configurations on the HTTP request.
1020
- *
1021
- * Following are errors that can be expected from this operation
1022
- * @throws `RestError` with code `UnauthorizedRequestError` when given request fails due to authorization problems,
1023
- * @throws `RestError` with code `MessageEntityAlreadyExistsError` when requested messaging entity already exists,
1024
- * @throws `RestError` with code `InvalidOperationError` when requested operation is invalid and we encounter a 403 HTTP status code,
1025
- * @throws `RestError` with code `QuotaExceededError` when requested operation fails due to quote limits exceeding from service side,
1026
- * @throws `RestError` with code `ServerBusyError` when the request fails due to server being busy,
1027
- * @throws `RestError` with code `ServiceError` when receiving unrecognized HTTP status or for a scenarios such as
1028
- * bad requests or requests resulting in conflicting operation on the server,
1029
- * @throws `RestError` with code and statusCode representing the standard set of REST API errors.
1030
- */
1031
- createQueue(queueName: string, options?: CreateQueueOptions): Promise<WithResponse<QueueProperties>>;
1032
- /**
1033
- * Returns an object representing the Queue and its properties.
1034
- * If you want to get the Queue runtime info like message count details, use `getQueueRuntimeProperties` API.
1035
- * @param operationOptions - The options that can be used to abort, trace and control other configurations on the HTTP request.
1036
- *
1037
- * Following are errors that can be expected from this operation
1038
- * @throws `RestError` with code `UnauthorizedRequestError` when given request fails due to authorization problems,
1039
- * @throws `RestError` with code `MessageEntityNotFoundError` when requested messaging entity does not exist,
1040
- * @throws `RestError` with code `InvalidOperationError` when requested operation is invalid and we encounter a 403 HTTP status code,
1041
- * @throws `RestError` with code `ServerBusyError` when the request fails due to server being busy,
1042
- * @throws `RestError` with code `ServiceError` when receiving unrecognized HTTP status or for a scenarios such as
1043
- * bad requests or requests resulting in conflicting operation on the server,
1044
- * @throws `RestError` with code and statusCode representing the standard set of REST API errors.
1045
- */
1046
- getQueue(queueName: string, operationOptions?: OperationOptions): Promise<WithResponse<QueueProperties>>;
1047
- /**
1048
- * Returns an object representing the Queue runtime info like message count details.
1049
- * @param operationOptions - The options that can be used to abort, trace and control other configurations on the HTTP request.
1050
- *
1051
- * Following are errors that can be expected from this operation
1052
- * @throws `RestError` with code `UnauthorizedRequestError` when given request fails due to authorization problems,
1053
- * @throws `RestError` with code `MessageEntityNotFoundError` when requested messaging entity does not exist,
1054
- * @throws `RestError` with code `InvalidOperationError` when requested operation is invalid and we encounter a 403 HTTP status code,
1055
- * @throws `RestError` with code `ServerBusyError` when the request fails due to server being busy,
1056
- * @throws `RestError` with code `ServiceError` when receiving unrecognized HTTP status or for a scenarios such as
1057
- * bad requests or requests resulting in conflicting operation on the server,
1058
- * @throws `RestError` with code and statusCode representing the standard set of REST API errors.
1059
- */
1060
- getQueueRuntimeProperties(queueName: string, operationOptions?: OperationOptions): Promise<WithResponse<QueueRuntimeProperties>>;
1061
- /**
1062
- * Returns a list of objects, each representing a Queue along with its properties.
1063
- * If you want to get the runtime info of the queues like message count, use `getQueuesRuntimeProperties` API instead.
1064
- * @param options - The options include the maxCount and the count of entities to skip, the operation options that can be used to abort, trace and control other configurations on the HTTP request.
1065
- *
1066
- * Following are errors that can be expected from this operation
1067
- * @throws `RestError` with code `UnauthorizedRequestError` when given request fails due to authorization problems,
1068
- * @throws `RestError` with code `InvalidOperationError` when requested operation is invalid and we encounter a 403 HTTP status code,
1069
- * @throws `RestError` with code `ServerBusyError` when the request fails due to server being busy,
1070
- * @throws `RestError` with code `ServiceError` when receiving unrecognized HTTP status or for a scenarios such as
1071
- * bad requests or requests resulting in conflicting operation on the server,
1072
- * @throws `RestError` with code and statusCode representing the standard set of REST API errors.
1073
- */
1074
- private getQueues;
1075
- private listQueuesPage;
1076
- private listQueuesAll;
1077
- /**
1078
- * Returns an async iterable iterator to list all the queues.
1079
- *
1080
- * .byPage() returns an async iterable iterator to list the queues in pages.
1081
- *
1082
- * @returns An asyncIterableIterator that supports paging.
1083
- */
1084
- listQueues(options?: OperationOptions): PagedAsyncIterableIterator<QueueProperties, EntitiesResponse<QueueProperties>>;
1085
- /**
1086
- * Returns a list of objects, each representing a Queue's runtime info like message count details.
1087
- * @param options - The options include the maxCount and the count of entities to skip, the operation options that can be used to abort, trace and control other configurations on the HTTP request.
1088
- *
1089
- * Following are errors that can be expected from this operation
1090
- * @throws `RestError` with code `UnauthorizedRequestError` when given request fails due to authorization problems,
1091
- * @throws `RestError` with code `InvalidOperationError` when requested operation is invalid and we encounter a 403 HTTP status code,
1092
- * @throws `RestError` with code `ServerBusyError` when the request fails due to server being busy,
1093
- * @throws `RestError` with code `ServiceError` when receiving unrecognized HTTP status or for a scenarios such as
1094
- * bad requests or requests resulting in conflicting operation on the server,
1095
- * @throws `RestError` with code and statusCode representing the standard set of REST API errors.
1096
- */
1097
- private getQueuesRuntimeProperties;
1098
- private listQueuesRuntimePropertiesPage;
1099
- private listQueuesRuntimePropertiesAll;
1100
- /**
1101
- * Returns an async iterable iterator to list runtime info of the queues.
1102
- *
1103
- * .byPage() returns an async iterable iterator to list runtime info of the queues in pages.
1104
- *
1105
- *
1106
- * @returns An asyncIterableIterator that supports paging.
1107
- */
1108
- listQueuesRuntimeProperties(options?: OperationOptions): PagedAsyncIterableIterator<QueueRuntimeProperties, EntitiesResponse<QueueRuntimeProperties>>;
1109
- /**
1110
- * Updates the queue based on the queue properties provided.
1111
- * All queue properties must be set even though only a subset of them are actually updatable.
1112
- * Therefore, the suggested flow is to use the output from `getQueue()`, update the desired properties in it, and then pass the modified object to `updateQueue()`.
1113
- *
1114
- * The properties that cannot be updated are marked as readonly in the `QueueProperties` interface.
1115
- *
1116
- * @param queue - Object representing the properties of the queue and the raw response.
1117
- * `requiresSession`, `requiresDuplicateDetection`, `enablePartitioning`, and `name` can't be updated after creating the queue.
1118
- * @param operationOptions - The options that can be used to abort, trace and control other configurations on the HTTP request.
1119
- *
1120
- * Following are errors that can be expected from this operation
1121
- * @throws `RestError` with code `UnauthorizedRequestError` when given request fails due to authorization problems,
1122
- * @throws `RestError` with code `MessageEntityNotFoundError` when requested messaging entity does not exist,
1123
- * @throws `RestError` with code `InvalidOperationError` when requested operation is invalid and we encounter a 403 HTTP status code,
1124
- * @throws `RestError` with code `ServerBusyError` when the request fails due to server being busy,
1125
- * @throws `RestError` with code `ServiceError` when receiving unrecognized HTTP status or for a scenarios such as
1126
- * bad requests or requests resulting in conflicting operation on the server,
1127
- * @throws `RestError` with code and statusCode representing the standard set of REST API errors.
1128
- */
1129
- updateQueue(queue: WithResponse<QueueProperties>, operationOptions?: OperationOptions): Promise<WithResponse<QueueProperties>>;
1130
- /**
1131
- * Deletes a queue.
1132
- * @param operationOptions - The options that can be used to abort, trace and control other configurations on the HTTP request.
1133
- *
1134
- * Following are errors that can be expected from this operation
1135
- * @throws `RestError` with code `UnauthorizedRequestError` when given request fails due to authorization problems,
1136
- * @throws `RestError` with code `MessageEntityNotFoundError` when requested messaging entity does not exist,
1137
- * @throws `RestError` with code `InvalidOperationError` when requested operation is invalid and we encounter a 403 HTTP status code,
1138
- * @throws `RestError` with code `ServerBusyError` when the request fails due to server being busy,
1139
- * @throws `RestError` with code `ServiceError` when receiving unrecognized HTTP status or for a scenarios such as
1140
- * bad requests or requests resulting in conflicting operation on the server,
1141
- * @throws `RestError` with code and statusCode representing the standard set of REST API errors.
1142
- */
1143
- deleteQueue(queueName: string, operationOptions?: OperationOptions): Promise<WithResponse<{}>>;
1144
- /**
1145
- * Checks whether a given queue exists or not.
1146
- * @param operationOptions - The options that can be used to abort, trace and control other configurations on the HTTP request.
1147
- */
1148
- queueExists(queueName: string, operationOptions?: OperationOptions): Promise<boolean>;
1149
- /**
1150
- * Creates a topic with given name, configured using the given options
1151
- * @param options - Options to configure the Topic being created(For example, you can configure a topic to support partitions)
1152
- * and the operation options that can be used to abort, trace and control other configurations on the HTTP request.
1153
- *
1154
- * Following are errors that can be expected from this operation
1155
- * @throws `RestError` with code `UnauthorizedRequestError` when given request fails due to authorization problems,
1156
- * @throws `RestError` with code `MessageEntityAlreadyExistsError` when requested messaging entity already exists,
1157
- * @throws `RestError` with code `InvalidOperationError` when requested operation is invalid and we encounter a 403 HTTP status code,
1158
- * @throws `RestError` with code `QuotaExceededError` when requested operation fails due to quote limits exceeding from service side,
1159
- * @throws `RestError` with code `ServerBusyError` when the request fails due to server being busy,
1160
- * @throws `RestError` with code `ServiceError` when receiving unrecognized HTTP status or for a scenarios such as
1161
- * bad requests or requests resulting in conflicting operation on the server,
1162
- * @throws `RestError` with code and statusCode representing the standard set of REST API errors.
1163
- */
1164
- createTopic(topicName: string, options?: CreateTopicOptions): Promise<WithResponse<TopicProperties>>;
1165
- /**
1166
- * Returns an object representing the Topic and its properties.
1167
- * If you want to get the Topic runtime info like subscription count details, use `getTopicRuntimeProperties` API.
1168
- * @param operationOptions - The options that can be used to abort, trace and control other configurations on the HTTP request.
1169
- *
1170
- * Following are errors that can be expected from this operation
1171
- * @throws `RestError` with code `UnauthorizedRequestError` when given request fails due to authorization problems,
1172
- * @throws `RestError` with code `MessageEntityNotFoundError` when requested messaging entity does not exist,
1173
- * @throws `RestError` with code `InvalidOperationError` when requested operation is invalid and we encounter a 403 HTTP status code,
1174
- * @throws `RestError` with code `ServerBusyError` when the request fails due to server being busy,
1175
- * @throws `RestError` with code `ServiceError` when receiving unrecognized HTTP status or for a scenarios such as
1176
- * bad requests or requests resulting in conflicting operation on the server,
1177
- * @throws `RestError` with code and statusCode representing the standard set of REST API errors.
1178
- */
1179
- getTopic(topicName: string, operationOptions?: OperationOptions): Promise<WithResponse<TopicProperties>>;
1180
- /**
1181
- * Returns an object representing the Topic runtime info like subscription count.
1182
- * @param operationOptions - The options that can be used to abort, trace and control other configurations on the HTTP request.
1183
- *
1184
- * Following are errors that can be expected from this operation
1185
- * @throws `RestError` with code `UnauthorizedRequestError` when given request fails due to authorization problems,
1186
- * @throws `RestError` with code `MessageEntityNotFoundError` when requested messaging entity does not exist,
1187
- * @throws `RestError` with code `InvalidOperationError` when requested operation is invalid and we encounter a 403 HTTP status code,
1188
- * @throws `RestError` with code `ServerBusyError` when the request fails due to server being busy,
1189
- * @throws `RestError` with code `ServiceError` when receiving unrecognized HTTP status or for a scenarios such as
1190
- * bad requests or requests resulting in conflicting operation on the server,
1191
- * @throws `RestError` with code and statusCode representing the standard set of REST API errors.
1192
- */
1193
- getTopicRuntimeProperties(topicName: string, operationOptions?: OperationOptions): Promise<WithResponse<TopicRuntimeProperties>>;
1194
- /**
1195
- * Returns a list of objects, each representing a Topic along with its properties.
1196
- * If you want to get the runtime info of the topics like subscription count, use `getTopicsRuntimeProperties` API instead.
1197
- * @param options - The options include the maxCount and the count of entities to skip, the operation options that can be used to abort, trace and control other configurations on the HTTP request.
1198
- *
1199
- * Following are errors that can be expected from this operation
1200
- * @throws `RestError` with code `UnauthorizedRequestError` when given request fails due to authorization problems,
1201
- * @throws `RestError` with code `InvalidOperationError` when requested operation is invalid and we encounter a 403 HTTP status code,
1202
- * @throws `RestError` with code `ServerBusyError` when the request fails due to server being busy,
1203
- * @throws `RestError` with code `ServiceError` when receiving unrecognized HTTP status or for a scenarios such as
1204
- * bad requests or requests resulting in conflicting operation on the server,
1205
- * @throws `RestError` with code and statusCode representing the standard set of REST API errors.
1206
- */
1207
- private getTopics;
1208
- private listTopicsPage;
1209
- private listTopicsAll;
1210
- /**
1211
- * Returns an async iterable iterator to list all the topics.
1212
- *
1213
- * .byPage() returns an async iterable iterator to list the topics in pages.
1214
- *
1215
- *
1216
- * @returns An asyncIterableIterator that supports paging.
1217
- */
1218
- listTopics(options?: OperationOptions): PagedAsyncIterableIterator<TopicProperties, EntitiesResponse<TopicProperties>>;
1219
- /**
1220
- * Returns a list of objects, each representing a Topic's runtime info like subscription count.
1221
- * @param options - The options include the maxCount and the count of entities to skip, the operation options that can be used to abort, trace and control other configurations on the HTTP request.
1222
- *
1223
- * Following are errors that can be expected from this operation
1224
- * @throws `RestError` with code `UnauthorizedRequestError` when given request fails due to authorization problems,
1225
- * @throws `RestError` with code `InvalidOperationError` when requested operation is invalid and we encounter a 403 HTTP status code,
1226
- * @throws `RestError` with code `ServerBusyError` when the request fails due to server being busy,
1227
- * @throws `RestError` with code `ServiceError` when receiving unrecognized HTTP status or for a scenarios such as
1228
- * bad requests or requests resulting in conflicting operation on the server,
1229
- * @throws `RestError` with code and statusCode representing the standard set of REST API errors.
1230
- */
1231
- private getTopicsRuntimeProperties;
1232
- private listTopicsRuntimePropertiesPage;
1233
- private listTopicsRuntimePropertiesAll;
1234
- /**
1235
- * Returns an async iterable iterator to list runtime info of the topics.
1236
- *
1237
- * .byPage() returns an async iterable iterator to list runtime info of the topics in pages.
1238
- *
1239
- *
1240
- * @returns An asyncIterableIterator that supports paging.
1241
- */
1242
- listTopicsRuntimeProperties(options?: OperationOptions): PagedAsyncIterableIterator<TopicRuntimeProperties, EntitiesResponse<TopicRuntimeProperties>>;
1243
- /**
1244
- * Updates the topic based on the topic properties provided.
1245
- * All topic properties must be set even though only a subset of them are actually updatable.
1246
- * Therefore, the suggested flow is to use the output from `getTopic()`, update the desired properties in it, and then pass the modified object to `updateTopic()`.
1247
- *
1248
- * The properties that cannot be updated are marked as readonly in the `TopicProperties` interface.
1249
- *
1250
- * @param topic - Object representing the properties of the topic and the raw response.
1251
- * `requiresDuplicateDetection`, `enablePartitioning`, and `name` can't be updated after creating the topic.
1252
- * @param operationOptions - The options that can be used to abort, trace and control other configurations on the HTTP request.
1253
- *
1254
- * Following are errors that can be expected from this operation
1255
- * @throws `RestError` with code `UnauthorizedRequestError` when given request fails due to authorization problems,
1256
- * @throws `RestError` with code `MessageEntityNotFoundError` when requested messaging entity does not exist,
1257
- * @throws `RestError` with code `InvalidOperationError` when requested operation is invalid and we encounter a 403 HTTP status code,
1258
- * @throws `RestError` with code `ServerBusyError` when the request fails due to server being busy,
1259
- * @throws `RestError` with code `ServiceError` when receiving unrecognized HTTP status or for a scenarios such as
1260
- * bad requests or requests resulting in conflicting operation on the server,
1261
- * @throws `RestError` with code and statusCode representing the standard set of REST API errors.
1262
- */
1263
- updateTopic(topic: WithResponse<TopicProperties>, operationOptions?: OperationOptions): Promise<WithResponse<TopicProperties>>;
1264
- /**
1265
- * Deletes a topic.
1266
- * @param operationOptions - The options that can be used to abort, trace and control other configurations on the HTTP request.
1267
- *
1268
- * Following are errors that can be expected from this operation
1269
- * @throws `RestError` with code `UnauthorizedRequestError` when given request fails due to authorization problems,
1270
- * @throws `RestError` with code `MessageEntityNotFoundError` when requested messaging entity does not exist,
1271
- * @throws `RestError` with code `InvalidOperationError` when requested operation is invalid and we encounter a 403 HTTP status code,
1272
- * @throws `RestError` with code `ServerBusyError` when the request fails due to server being busy,
1273
- * @throws `RestError` with code `ServiceError` when receiving unrecognized HTTP status or for a scenarios such as
1274
- * bad requests or requests resulting in conflicting operation on the server,
1275
- * @throws `RestError` with code and statusCode representing the standard set of REST API errors.
1276
- */
1277
- deleteTopic(topicName: string, operationOptions?: OperationOptions): Promise<WithResponse<{}>>;
1278
- /**
1279
- * Checks whether a given topic exists or not.
1280
- * @param operationOptions - The options that can be used to abort, trace and control other configurations on the HTTP request.
1281
- */
1282
- topicExists(topicName: string, operationOptions?: OperationOptions): Promise<boolean>;
1283
- /**
1284
- * Creates a subscription with given name, configured using the given options
1285
- * @param options - Options to configure the Subscription being created(For example, you can configure a Subscription to support partitions or sessions)
1286
- * and the operation options that can be used to abort, trace and control other configurations on the HTTP request.
1287
- *
1288
- * Following are errors that can be expected from this operation
1289
- * @throws `RestError` with code `UnauthorizedRequestError` when given request fails due to authorization problems,
1290
- * @throws `RestError` with code `MessageEntityAlreadyExistsError` when requested messaging entity already exists,
1291
- * @throws `RestError` with code `InvalidOperationError` when requested operation is invalid and we encounter a 403 HTTP status code,
1292
- * @throws `RestError` with code `QuotaExceededError` when requested operation fails due to quote limits exceeding from service side,
1293
- * @throws `RestError` with code `ServerBusyError` when the request fails due to server being busy,
1294
- * @throws `RestError` with code `ServiceError` when receiving unrecognized HTTP status or for a scenarios such as
1295
- * bad requests or requests resulting in conflicting operation on the server,
1296
- * @throws `RestError` with code and statusCode representing the standard set of REST API errors.
1297
- */
1298
- createSubscription(topicName: string, subscriptionName: string, options?: CreateSubscriptionOptions): Promise<WithResponse<SubscriptionProperties>>;
1299
- /**
1300
- * Returns an object representing the Subscription and its properties.
1301
- * If you want to get the Subscription runtime info like message count details, use `getSubscriptionRuntimeProperties` API.
1302
- * @param operationOptions - The options that can be used to abort, trace and control other configurations on the HTTP request.
1303
- *
1304
- * Following are errors that can be expected from this operation
1305
- * @throws `RestError` with code `UnauthorizedRequestError` when given request fails due to authorization problems,
1306
- * @throws `RestError` with code `MessageEntityNotFoundError` when requested messaging entity does not exist,
1307
- * @throws `RestError` with code `InvalidOperationError` when requested operation is invalid and we encounter a 403 HTTP status code,
1308
- * @throws `RestError` with code `ServerBusyError` when the request fails due to server being busy,
1309
- * @throws `RestError` with code `ServiceError` when receiving unrecognized HTTP status or for a scenarios such as
1310
- * bad requests or requests resulting in conflicting operation on the server,
1311
- * @throws `RestError` with code and statusCode representing the standard set of REST API errors.
1312
- */
1313
- getSubscription(topicName: string, subscriptionName: string, operationOptions?: OperationOptions): Promise<WithResponse<SubscriptionProperties>>;
1314
- /**
1315
- * Returns an object representing the Subscription runtime info like message count details.
1316
- * @param operationOptions - The options that can be used to abort, trace and control other configurations on the HTTP request.
1317
- *
1318
- * Following are errors that can be expected from this operation
1319
- * @throws `RestError` with code `UnauthorizedRequestError` when given request fails due to authorization problems,
1320
- * @throws `RestError` with code `MessageEntityNotFoundError` when requested messaging entity does not exist,
1321
- * @throws `RestError` with code `InvalidOperationError` when requested operation is invalid and we encounter a 403 HTTP status code,
1322
- * @throws `RestError` with code `ServerBusyError` when the request fails due to server being busy,
1323
- * @throws `RestError` with code `ServiceError` when receiving unrecognized HTTP status or for a scenarios such as
1324
- * bad requests or requests resulting in conflicting operation on the server,
1325
- * @throws `RestError` with code and statusCode representing the standard set of REST API errors.
1326
- */
1327
- getSubscriptionRuntimeProperties(topicName: string, subscriptionName: string, operationOptions?: OperationOptions): Promise<WithResponse<SubscriptionRuntimeProperties>>;
1328
- /**
1329
- * Returns a list of objects, each representing a Subscription along with its properties.
1330
- * If you want to get the runtime info of the subscriptions like message count, use `getSubscriptionsRuntimeProperties` API instead.
1331
- * @param options - The options include the maxCount and the count of entities to skip, the operation options that can be used to abort, trace and control other configurations on the HTTP request.
1332
- *
1333
- * Following are errors that can be expected from this operation
1334
- * @throws `RestError` with code `UnauthorizedRequestError` when given request fails due to authorization problems,
1335
- * @throws `RestError` with code `InvalidOperationError` when requested operation is invalid and we encounter a 403 HTTP status code,
1336
- * @throws `RestError` with code `ServerBusyError` when the request fails due to server being busy,
1337
- * @throws `RestError` with code `ServiceError` when receiving unrecognized HTTP status or for a scenarios such as
1338
- * bad requests or requests resulting in conflicting operation on the server,
1339
- * @throws `RestError` with code and statusCode representing the standard set of REST API errors.
1340
- */
1341
- private getSubscriptions;
1342
- private listSubscriptionsPage;
1343
- private listSubscriptionsAll;
1344
- /**
1345
- *
1346
- * Returns an async iterable iterator to list all the subscriptions
1347
- * under the specified topic.
1348
- *
1349
- * .byPage() returns an async iterable iterator to list the subscriptions in pages.
1350
- *
1351
- * @returns An asyncIterableIterator that supports paging.
1352
- */
1353
- listSubscriptions(topicName: string, options?: OperationOptions): PagedAsyncIterableIterator<SubscriptionProperties, EntitiesResponse<SubscriptionProperties>>;
1354
- /**
1355
- * Returns a list of objects, each representing a Subscription's runtime info like message count details.
1356
- * @param options - The options include the maxCount and the count of entities to skip, the operation options that can be used to abort, trace and control other configurations on the HTTP request.
1357
- *
1358
- * Following are errors that can be expected from this operation
1359
- * @throws `RestError` with code `UnauthorizedRequestError` when given request fails due to authorization problems,
1360
- * @throws `RestError` with code `InvalidOperationError` when requested operation is invalid and we encounter a 403 HTTP status code,
1361
- * @throws `RestError` with code `ServerBusyError` when the request fails due to server being busy,
1362
- * @throws `RestError` with code `ServiceError` when receiving unrecognized HTTP status or for a scenarios such as
1363
- * bad requests or requests resulting in conflicting operation on the server,
1364
- * @throws `RestError` with code and statusCode representing the standard set of REST API errors.
1365
- */
1366
- private getSubscriptionsRuntimeProperties;
1367
- private listSubscriptionsRuntimePropertiesPage;
1368
- private listSubscriptionsRuntimePropertiesAll;
1369
- /**
1370
- * Returns an async iterable iterator to list runtime info of the subscriptions
1371
- * under the specified topic.
1372
- *
1373
- * .byPage() returns an async iterable iterator to list runtime info of subscriptions in pages.
1374
- *
1375
- * @returns An asyncIterableIterator that supports paging.
1376
- */
1377
- listSubscriptionsRuntimeProperties(topicName: string, options?: OperationOptions): PagedAsyncIterableIterator<SubscriptionRuntimeProperties, EntitiesResponse<SubscriptionRuntimeProperties>>;
1378
- /**
1379
- * Updates the subscription based on the subscription properties provided.
1380
- * All subscription properties must be set even though only a subset of them are actually updatable.
1381
- * Therefore, the suggested flow is to use the output from `getSubscription()`, update the desired properties in it, and then pass the modified object to `updateSubscription()`.
1382
- *
1383
- * The properties that cannot be updated are marked as readonly in the `SubscriptionProperties` interface.
1384
- * @param subscription - Object representing the properties of the subscription and the raw response.
1385
- * `subscriptionName`, `topicName`, and `requiresSession` can't be updated after creating the subscription.
1386
- * @param operationOptions - The options that can be used to abort, trace and control other configurations on the HTTP request.
1387
- *
1388
- * Following are errors that can be expected from this operation
1389
- * @throws `RestError` with code `UnauthorizedRequestError` when given request fails due to authorization problems,
1390
- * @throws `RestError` with code `MessageEntityNotFoundError` when requested messaging entity does not exist,
1391
- * @throws `RestError` with code `InvalidOperationError` when requested operation is invalid and we encounter a 403 HTTP status code,
1392
- * @throws `RestError` with code `ServerBusyError` when the request fails due to server being busy,
1393
- * @throws `RestError` with code `ServiceError` when receiving unrecognized HTTP status or for a scenarios such as
1394
- * bad requests or requests resulting in conflicting operation on the server,
1395
- * @throws `RestError` with code and statusCode representing the standard set of REST API errors.
1396
- */
1397
- updateSubscription(subscription: WithResponse<SubscriptionProperties>, operationOptions?: OperationOptions): Promise<WithResponse<SubscriptionProperties>>;
1398
- /**
1399
- * Deletes a subscription.
1400
- * @param operationOptions - The options that can be used to abort, trace and control other configurations on the HTTP request.
1401
- *
1402
- * Following are errors that can be expected from this operation
1403
- * @throws `RestError` with code `UnauthorizedRequestError` when given request fails due to authorization problems,
1404
- * @throws `RestError` with code `MessageEntityNotFoundError` when requested messaging entity does not exist,
1405
- * @throws `RestError` with code `InvalidOperationError` when requested operation is invalid and we encounter a 403 HTTP status code,
1406
- * @throws `RestError` with code `ServerBusyError` when the request fails due to server being busy,
1407
- * @throws `RestError` with code `ServiceError` when receiving unrecognized HTTP status or for a scenarios such as
1408
- * bad requests or requests resulting in conflicting operation on the server,
1409
- * @throws `RestError` with code and statusCode representing the standard set of REST API errors.
1410
- */
1411
- deleteSubscription(topicName: string, subscriptionName: string, operationOptions?: OperationOptions): Promise<WithResponse<{}>>;
1412
- /**
1413
- * Checks whether a given subscription exists in the topic or not.
1414
- * @param operationOptions - The options that can be used to abort, trace and control other configurations on the HTTP request.
1415
- */
1416
- subscriptionExists(topicName: string, subscriptionName: string, operationOptions?: OperationOptions): Promise<boolean>;
1417
- /**
1418
- * Creates a rule with given name, configured using the given options.
1419
- * @param ruleFilter - Defines the filter expression that the rule evaluates.
1420
- * @param operationOptions - The options that can be used to abort, trace and control other configurations on the HTTP request.
1421
- *
1422
- * Following are errors that can be expected from this operation
1423
- * @throws `RestError` with code `UnauthorizedRequestError` when given request fails due to authorization problems,
1424
- * @throws `RestError` with code `MessageEntityAlreadyExistsError` when requested messaging entity already exists,
1425
- * @throws `RestError` with code `InvalidOperationError` when requested operation is invalid and we encounter a 403 HTTP status code,
1426
- * @throws `RestError` with code `QuotaExceededError` when requested operation fails due to quote limits exceeding from service side,
1427
- * @throws `RestError` with code `ServerBusyError` when the request fails due to server being busy,
1428
- * @throws `RestError` with code `ServiceError` when receiving unrecognized HTTP status or for a scenarios such as
1429
- * bad requests or requests resulting in conflicting operation on the server,
1430
- * @throws `RestError` with code and statusCode representing the standard set of REST API errors.
1431
- */
1432
- createRule(topicName: string, subscriptionName: string, ruleName: string, ruleFilter: SqlRuleFilter | CorrelationRuleFilter, operationOptions?: OperationOptions): Promise<WithResponse<RuleProperties>>;
1433
- /**
1434
- * Creates a rule with given name, configured using the given options.
1435
- * @param ruleFilter - Defines the filter expression that the rule evaluates.
1436
- * @param ruleAction - The SQL like expression that can be executed on the message should the associated filter apply.
1437
- * @param operationOptions - The options that can be used to abort, trace and control other configurations on the HTTP request.
1438
- *
1439
- * Following are errors that can be expected from this operation
1440
- * @throws `RestError` with code `UnauthorizedRequestError` when given request fails due to authorization problems,
1441
- * @throws `RestError` with code `MessageEntityAlreadyExistsError` when requested messaging entity already exists,
1442
- * @throws `RestError` with code `InvalidOperationError` when requested operation is invalid and we encounter a 403 HTTP status code,
1443
- * @throws `RestError` with code `QuotaExceededError` when requested operation fails due to quote limits exceeding from service side,
1444
- * @throws `RestError` with code `ServerBusyError` when the request fails due to server being busy,
1445
- * @throws `RestError` with code `ServiceError` when receiving unrecognized HTTP status or for a scenarios such as
1446
- * bad requests or requests resulting in conflicting operation on the server,
1447
- * @throws `RestError` with code and statusCode representing the standard set of REST API errors.
1448
- */
1449
- createRule(topicName: string, subscriptionName: string, ruleName: string, ruleFilter: SqlRuleFilter | CorrelationRuleFilter, ruleAction: SqlRuleAction, operationOptions?: OperationOptions): Promise<WithResponse<RuleProperties>>;
1450
- /**
1451
- * Returns an object representing the Rule with the given name along with all its properties.
1452
- * @param operationOptions - The options that can be used to abort, trace and control other configurations on the HTTP request.
1453
- *
1454
- * Following are errors that can be expected from this operation
1455
- * @throws `RestError` with code `UnauthorizedRequestError` when given request fails due to authorization problems,
1456
- * @throws `RestError` with code `MessageEntityNotFoundError` when requested messaging entity does not exist,
1457
- * @throws `RestError` with code `InvalidOperationError` when requested operation is invalid and we encounter a 403 HTTP status code,
1458
- * @throws `RestError` with code `ServerBusyError` when the request fails due to server being busy,
1459
- * @throws `RestError` with code `ServiceError` when receiving unrecognized HTTP status or for a scenarios such as
1460
- * bad requests or requests resulting in conflicting operation on the server,
1461
- * @throws `RestError` with code and statusCode representing the standard set of REST API errors.
1462
- */
1463
- getRule(topicName: string, subscriptionName: string, ruleName: string, operationOptions?: OperationOptions): Promise<WithResponse<RuleProperties>>;
1464
- /**
1465
- * Lists existing rules.
1466
- * @param options - The options include the maxCount and the count of entities to skip, the operation options that can be used to abort, trace and control other configurations on the HTTP request.
1467
- *
1468
- * Following are errors that can be expected from this operation
1469
- * @throws `RestError` with code `UnauthorizedRequestError` when given request fails due to authorization problems,
1470
- * @throws `RestError` with code `InvalidOperationError` when requested operation is invalid and we encounter a 403 HTTP status code,
1471
- * @throws `RestError` with code `ServerBusyError` when the request fails due to server being busy,
1472
- * @throws `RestError` with code `ServiceError` when receiving unrecognized HTTP status or for a scenarios such as
1473
- * bad requests or requests resulting in conflicting operation on the server,
1474
- * @throws `RestError` with code and statusCode representing the standard set of REST API errors.
1475
- */
1476
- private getRules;
1477
- private listRulesPage;
1478
- private listRulesAll;
1479
- /**
1480
- * Returns an async iterable iterator to list all the rules
1481
- * under the specified subscription.
1482
- *
1483
- * .byPage() returns an async iterable iterator to list the rules in pages.
1484
- *
1485
- * @returns An asyncIterableIterator that supports paging.
1486
- */
1487
- listRules(topicName: string, subscriptionName: string, options?: OperationOptions): PagedAsyncIterableIterator<RuleProperties, EntitiesResponse<RuleProperties>>;
1488
- /**
1489
- * Updates properties on the Rule by the given name based on the given options.
1490
- * All rule properties must be set even if one of them is being updated.
1491
- * Therefore, the suggested flow is to use the output from `getRule()`, update the desired properties in it, and then pass the modified object to `updateRule()`.
1492
- *
1493
- * @param rule - Options to configure the Rule being updated and the raw response.
1494
- * For example, you can configure the filter to apply on associated Topic/Subscription.
1495
- * @param operationOptions - The options that can be used to abort, trace and control other configurations on the HTTP request.
1496
- *
1497
- * Following are errors that can be expected from this operation
1498
- * @throws `RestError` with code `UnauthorizedRequestError` when given request fails due to authorization problems,
1499
- * @throws `RestError` with code `MessageEntityNotFoundError` when requested messaging entity does not exist,
1500
- * @throws `RestError` with code `InvalidOperationError` when requested operation is invalid and we encounter a 403 HTTP status code,
1501
- * @throws `RestError` with code `ServerBusyError` when the request fails due to server being busy,
1502
- * @throws `RestError` with code `ServiceError` when receiving unrecognized HTTP status or for a scenarios such as
1503
- * bad requests or requests resulting in conflicting operation on the server,
1504
- * @throws `RestError` with code and statusCode representing the standard set of REST API errors.
1505
- */
1506
- updateRule(topicName: string, subscriptionName: string, rule: WithResponse<RuleProperties>, operationOptions?: OperationOptions): Promise<WithResponse<RuleProperties>>;
1507
- /**
1508
- * Deletes a rule.
1509
- * @param operationOptions - The options that can be used to abort, trace and control other configurations on the HTTP request.
1510
- *
1511
- * Following are errors that can be expected from this operation
1512
- * @throws `RestError` with code `UnauthorizedRequestError` when given request fails due to authorization problems,
1513
- * @throws `RestError` with code `MessageEntityNotFoundError` when requested messaging entity does not exist,
1514
- * @throws `RestError` with code `InvalidOperationError` when requested operation is invalid and we encounter a 403 HTTP status code,
1515
- * @throws `RestError` with code `ServerBusyError` when the request fails due to server being busy,
1516
- * @throws `RestError` with code `ServiceError` when receiving unrecognized HTTP status or for a scenarios such as
1517
- * bad requests or requests resulting in conflicting operation on the server,
1518
- * @throws `RestError` with code and statusCode representing the standard set of REST API errors.
1519
- */
1520
- deleteRule(topicName: string, subscriptionName: string, ruleName: string, operationOptions?: OperationOptions): Promise<WithResponse<{}>>;
1521
- /**
1522
- * Checks whether a given rule exists or not.
1523
- *
1524
- */
1525
- ruleExists(topicName: string, subscriptionName: string, ruleName: string, operationOptions?: OperationOptions): Promise<boolean>;
1526
- /**
1527
- * Creates or updates a resource based on `isUpdate` parameter.
1528
- */
1529
- private putResource;
1530
- /**
1531
- * Gets a resource.
1532
- */
1533
- private getResource;
1534
- /**
1535
- * Lists existing resources
1536
- */
1537
- private listResources;
1538
- /**
1539
- * Deletes a resource.
1540
- */
1541
- private deleteResource;
1542
- private getUrl;
1543
- private getSubscriptionPath;
1544
- private getRulePath;
1545
- private getMarkerFromNextLinkUrl;
1546
- private buildNamespacePropertiesResponse;
1547
- private buildListQueuesResponse;
1548
- private buildListQueuesRuntimePropertiesResponse;
1549
- private buildQueueResponse;
1550
- private buildQueueRuntimePropertiesResponse;
1551
- private buildListTopicsResponse;
1552
- private buildListTopicsRuntimePropertiesResponse;
1553
- private buildTopicResponse;
1554
- private buildTopicRuntimePropertiesResponse;
1555
- private buildListSubscriptionsResponse;
1556
- private buildListSubscriptionsRuntimePropertiesResponse;
1557
- private buildSubscriptionResponse;
1558
- private buildSubscriptionRuntimePropertiesResponse;
1559
- private buildListRulesResponse;
1560
- private buildRuleResponse;
1561
- private throwIfInvalidContinuationToken;
1562
- }
1563
-
1564
- /**
1565
- * Represents the client options of the `ServiceBusAdministrationClient`.
1566
- */
1567
- export declare interface ServiceBusAdministrationClientOptions extends CommonClientOptions {
1568
- /**
1569
- * Service version of the ATOM API.
1570
- *
1571
- * Currently supported = "2021-05" | "2017-04"
1572
- *
1573
- * Defaults to "2021-05".
1574
- */
1575
- serviceVersion?: "2021-05" | "2017-04";
1576
- }
1577
-
1578
- /**
1579
- * A client that can create Sender instances for sending messages to queues and
1580
- * topics as well as Receiver instances to receive messages from queues and subscriptions.
1581
- */
1582
- export declare class ServiceBusClient {
1583
- private _connectionContext;
1584
- private _clientOptions;
1585
- /**
1586
- * The fully qualified namespace of the Service Bus instance for which this client is created.
1587
- * This is likely to be similar to <yournamespace>.servicebus.windows.net.
1588
- */
1589
- fullyQualifiedNamespace: string;
1590
- /**
1591
- * The name used to identify this ServiceBusClient.
1592
- * If not specified or empty, a random unique one will be generated.
1593
- */
1594
- identifier: string;
1595
- /**
1596
- * Creates an instance of the ServiceBusClient class which can be used to create senders and receivers to
1597
- * the Azure Service Bus namespace provided in the connection string. No connection is made to the service
1598
- * until the senders/receivers created with the client are used to send/receive messages.
1599
- * @param connectionString - A connection string for Azure Service Bus namespace.
1600
- * NOTE: this connection string can contain an EntityPath, which is ignored.
1601
- * @param options - Options for the service bus client.
1602
- */
1603
- constructor(connectionString: string, options?: ServiceBusClientOptions);
1604
- /**
1605
- * Creates an instance of the ServiceBusClient class which can be used to create senders and receivers to
1606
- * the Azure Service Bus namespace provided. No connection is made to the service until
1607
- * the senders/receivers created with the client are used to send/receive messages.
1608
- * @param fullyQualifiedNamespace - The full namespace of your Service Bus instance which is
1609
- * likely to be similar to <yournamespace>.servicebus.windows.net.
1610
- * @param credential - A credential object used by the client to get the token to authenticate the connection
1611
- * with the Azure Service Bus. See &commat;azure/identity for creating the credentials.
1612
- * If you're using an own implementation of the `TokenCredential` interface against AAD, then set the "scopes" for service-bus
1613
- * to be `["https://servicebus.azure.net//user_impersonation"]` to get the appropriate token.
1614
- * Use the `AzureNamedKeyCredential` from &commat;azure/core-auth if you want to pass in a `SharedAccessKeyName`
1615
- * and `SharedAccessKey` without using a connection string. These fields map to the `name` and `key` field respectively
1616
- * in `AzureNamedKeyCredential`.
1617
- * Use the `AzureSASCredential` from &commat;azure/core-auth if you want to pass in a `SharedAccessSignature`
1618
- * without using a connection string. This field maps to `signature` in `AzureSASCredential`.
1619
- * @param options - A set of options to apply when configuring the client.
1620
- * - `retryOptions` : Configures the retry policy for all the operations on the client.
1621
- * For example, `{ "maxRetries": 4 }` or `{ "maxRetries": 4, "retryDelayInMs": 30000 }`.
1622
- * - `webSocketOptions`: Configures the channelling of the AMQP connection over Web Sockets.
1623
- */
1624
- constructor(fullyQualifiedNamespace: string, credential: TokenCredential | NamedKeyCredential | SASCredential, options?: ServiceBusClientOptions);
1625
- /**
1626
- * Creates a receiver for an Azure Service Bus queue. No connection is made
1627
- * to the service until one of the methods on the receiver is called.
1628
- *
1629
- * To target sub queues like the dead letter queue or the transfer dead letter queue, provide the
1630
- * `subQueue` in the options. To learn more about dead letter queues, see
1631
- * https://docs.microsoft.com/azure/service-bus-messaging/service-bus-dead-letter-queues
1632
- *
1633
- * You can choose between two receive modes: "peekLock" (default) and "receiveAndDelete".
1634
- * - In peekLock mode, the receiver has a lock on the message for the duration specified on the
1635
- * queue.
1636
- * - In receiveAndDelete mode, messages are deleted from Service Bus as they are received.
1637
- *
1638
- * Messages that are not settled within the lock duration will be redelivered as many times as
1639
- * the max delivery count set on the queue, after which they get sent to a separate dead letter
1640
- * queue.
1641
- *
1642
- * You can settle a message by calling completeMessage(), abandonMessage(), deferMessage() or
1643
- * deadletterMessage() methods on the receiver.
1644
- *
1645
- * More information about how peekLock and message settlement works here:
1646
- * https://docs.microsoft.com/azure/service-bus-messaging/message-transfers-locks-settlement#peeklock
1647
- *
1648
- * @param queueName - The name of the queue to receive from.
1649
- * @param options - Options to pass the receiveMode, defaulted to peekLock.
1650
- * @returns A receiver that can be used to receive, peek and settle messages.
1651
- */
1652
- createReceiver(queueName: string, options?: ServiceBusReceiverOptions): ServiceBusReceiver;
1653
- /**
1654
- * Creates a receiver for an Azure Service Bus subscription. No connection is made
1655
- * to the service until one of the methods on the receiver is called.
1656
- *
1657
- * To target sub queues like the dead letter queue or the transfer dead letter queue, provide the
1658
- * `subQueue` in the options. To learn more about dead letter queues, see
1659
- * https://docs.microsoft.com/azure/service-bus-messaging/service-bus-dead-letter-queues
1660
- *
1661
- * You can choose between two receive modes: "peekLock" (default) and "receiveAndDelete".
1662
- * - In peekLock mode, the receiver has a lock on the message for the duration specified on the
1663
- * queue.
1664
- * - In receiveAndDelete mode, messages are deleted from Service Bus as they are received.
1665
- *
1666
- * Messages that are not settled within the lock duration will be redelivered as many times as
1667
- * the max delivery count set on the subscription, after which they get sent to a separate dead letter
1668
- * queue.
1669
- *
1670
- * You can settle a message by calling completeMessage(), abandonMessage(), deferMessage() or
1671
- * deadletterMessage() methods on the receiver.
1672
- *
1673
- * More information about how peekLock and message settlement works here:
1674
- * https://docs.microsoft.com/azure/service-bus-messaging/message-transfers-locks-settlement#peeklock
1675
- *
1676
- * @param topicName - Name of the topic for the subscription we want to receive from.
1677
- * @param subscriptionName - Name of the subscription (under the `topic`) that we want to receive from.
1678
- * @param options - Options to pass the receiveMode, defaulted to peekLock.
1679
- * @returns A receiver that can be used to receive, peek and settle messages.
1680
- */
1681
- createReceiver(topicName: string, subscriptionName: string, options?: ServiceBusReceiverOptions): ServiceBusReceiver;
1682
- /**
1683
- * Creates an instance of {@link ServiceBusRuleManager} that is used to manage
1684
- * the rules for a subscription.
1685
- *
1686
- * @param topicName - the topic to create {@link ServiceBusRuleManager}
1687
- * @param subscriptionName - the subscription specific to the specified topic to create a {@link ServiceBusRuleManager} for.
1688
- * @returns a {@link ServiceBusRuleManager} scoped to the specified subscription and topic.
1689
- */
1690
- createRuleManager(topicName: string, subscriptionName: string): ServiceBusRuleManager;
1691
- /**
1692
- * Creates a receiver for a session enabled Azure Service Bus queue.
1693
- *
1694
- * You can choose between two receive modes: "peekLock" (default) and "receiveAndDelete".
1695
- * - In peekLock mode, the receiver has a lock on the message for the duration specified on the
1696
- * queue.
1697
- * - In receiveAndDelete mode, messages are deleted from Service Bus as they are received.
1698
- *
1699
- * You can settle a message by calling completeMessage(), abandonMessage(), deferMessage() or
1700
- * deadletterMessage() methods on the receiver.
1701
- *
1702
- * More information about how peekLock and message settlement works here:
1703
- * https://docs.microsoft.com/azure/service-bus-messaging/message-transfers-locks-settlement#peeklock
1704
- *
1705
- * @param queueName - The name of the queue to receive from.
1706
- * @param sessionId - The id of the session from which messages need to be received
1707
- * @param options - Options include receiveMode(defaulted to peekLock), options to create session receiver.
1708
- * @returns A receiver that can be used to receive, peek and settle messages.
1709
- */
1710
- acceptSession(queueName: string, sessionId: string, options?: ServiceBusSessionReceiverOptions): Promise<ServiceBusSessionReceiver>;
1711
- /**
1712
- * Creates a receiver for a session enabled Azure Service Bus subscription.
1713
- *
1714
- * You can choose between two receive modes: "peekLock" (default) and "receiveAndDelete".
1715
- * - In peekLock mode, the receiver has a lock on the message for the duration specified on the
1716
- * queue.
1717
- * - In receiveAndDelete mode, messages are deleted from Service Bus as they are received.
1718
- *
1719
- * You can settle a message by calling completeMessage(), abandonMessage(), deferMessage() or
1720
- * deadletterMessage() methods on the receiver.
1721
- *
1722
- * More information about how peekLock and message settlement works here:
1723
- * https://docs.microsoft.com/azure/service-bus-messaging/message-transfers-locks-settlement#peeklock
1724
- *
1725
- * @param topicName - Name of the topic for the subscription we want to receive from.
1726
- * @param subscriptionName - Name of the subscription (under the `topic`) that we want to receive from.
1727
- * @param sessionId - The id of the session from which messages need to be received
1728
- * @param options - Options include receiveMode(defaulted to peekLock), options to create session receiver.
1729
- * @returns A receiver that can be used to receive, peek and settle messages.
1730
- */
1731
- acceptSession(topicName: string, subscriptionName: string, sessionId: string, options?: ServiceBusSessionReceiverOptions): Promise<ServiceBusSessionReceiver>;
1732
- /**
1733
- * Creates a receiver for the next available session in a session-enabled Azure Service Bus queue.
1734
- *
1735
- * You can choose between two receive modes: "peekLock" (default) and "receiveAndDelete".
1736
- * - In peekLock mode, the receiver has a lock on the message for the duration specified on the
1737
- * queue.
1738
- * - In receiveAndDelete mode, messages are deleted from Service Bus as they are received.
1739
- *
1740
- * You can settle a message by calling completeMessage(), abandonMessage(), deferMessage() or
1741
- * deadletterMessage() methods on the receiver.
1742
- *
1743
- * More information about how peekLock and message settlement works here:
1744
- * https://docs.microsoft.com/azure/service-bus-messaging/message-transfers-locks-settlement#peeklock
1745
- *
1746
- * @param queueName - The name of the queue to receive from.
1747
- * @param options - Options include receiveMode(defaulted to peekLock), options to create session receiver.
1748
- * @returns A receiver that can be used to receive, peek and settle messages.
1749
- */
1750
- acceptNextSession(queueName: string, options?: ServiceBusSessionReceiverOptions): Promise<ServiceBusSessionReceiver>;
1751
- /**
1752
- * Creates a receiver for the next available session in a session-enabled Azure Service Bus subscription.
1753
- *
1754
- * You can choose between two receive modes: "peekLock" (default) and "receiveAndDelete".
1755
- * - In peekLock mode, the receiver has a lock on the message for the duration specified on the
1756
- * queue.
1757
- * - In receiveAndDelete mode, messages are deleted from Service Bus as they are received.
1758
- *
1759
- * You can settle a message by calling completeMessage(), abandonMessage(), deferMessage() or
1760
- * deadletterMessage() methods on the receiver.
1761
- *
1762
- * More information about how peekLock and message settlement works here:
1763
- * https://docs.microsoft.com/azure/service-bus-messaging/message-transfers-locks-settlement#peeklock
1764
- *
1765
- * @param topicName - Name of the topic for the subscription we want to receive from.
1766
- * @param subscriptionName - Name of the subscription (under the `topic`) that we want to receive from.
1767
- * @param options - Options include receiveMode(defaulted to peekLock), options to create session receiver.
1768
- * @returns A receiver that can be used to receive, peek and settle messages.
1769
- */
1770
- acceptNextSession(topicName: string, subscriptionName: string, options?: ServiceBusSessionReceiverOptions): Promise<ServiceBusSessionReceiver>;
1771
- /**
1772
- * Creates a Sender which can be used to send messages, schedule messages to be
1773
- * sent at a later time and cancel such scheduled messages. No connection is made
1774
- * to the service until one of the methods on the sender is called.
1775
- * @param queueOrTopicName - The name of a queue or topic to send messages to.
1776
- */
1777
- createSender(queueOrTopicName: string, options?: ServiceBusSenderOptions): ServiceBusSender;
1778
- /**
1779
- * Closes the underlying AMQP connection.
1780
- * NOTE: this will also disconnect any Receiver or Sender instances created from this
1781
- * instance.
1782
- */
1783
- close(): Promise<void>;
1784
- }
1785
-
1786
- /**
1787
- * Describes the options that can be provided while creating the ServiceBusClient.
1788
- *
1789
- * - `webSocketOptions` : Options to configure the channelling of the AMQP connection over Web Sockets.
1790
- * - `websocket` : The WebSocket constructor used to create an AMQP connection if you choose to make the connection
1791
- * over a WebSocket.
1792
- * - `webSocketConstructorOptions` : Options to pass to the Websocket constructor when you choose to make the connection
1793
- * over a WebSocket.
1794
- * - `retryOptions` : The retry options for all the operations on the client.
1795
- * - `maxRetries` : The number of times the operation can be retried in case of a retryable error.
1796
- * - `maxRetryDelayInMs`: The maximum delay between retries. Applicable only when performing exponential retries.
1797
- * - `mode`: Which retry mode to apply, specified by the `RetryMode` enum. Options are `Exponential` and `Fixed`. Defaults to `Fixed`.
1798
- * - `retryDelayInMs`: Amount of time to wait in milliseconds before making the next attempt. When `mode` is set to `Exponential`,
1799
- * this is used to compute the exponentially increasing delays between retries. Default: 30000 milliseconds.
1800
- * - `timeoutInMs`: Amount of time in milliseconds to wait before the operation times out. This will trigger a retry if there are any
1801
- * retry attempts remaining. Minimum value: 60000 milliseconds.
1802
- */
1803
- export declare interface ServiceBusClientOptions {
1804
- /**
1805
- * ID to identify this client. This can be used to correlate logs and exceptions.
1806
- */
1807
- identifier?: string;
1808
- /**
1809
- * A custom endpoint to use when connecting to the Service Bus service.
1810
- * This can be useful when your network does not allow connecting to the
1811
- * standard Azure Service Bus endpoint address, but does allow connecting
1812
- * through an intermediary.
1813
- *
1814
- * Example: "https://my.custom.endpoint:100/"
1815
- */
1816
- customEndpointAddress?: string;
1817
- /**
1818
- * Retry policy options that determine the mode, number of retries, retry interval etc.
1819
- */
1820
- retryOptions?: RetryOptions;
1821
- /**
1822
- * Options to configure the channelling of the AMQP connection over Web Sockets.
1823
- */
1824
- webSocketOptions?: WebSocketOptions;
1825
- /**
1826
- * Options for adding user agent details to outgoing requests.
1827
- */
1828
- userAgentOptions?: UserAgentPolicyOptions;
1829
- }
1830
-
1831
- /**
1832
- * The set of properties that comprise a Service Bus connection string.
1833
- */
1834
- export declare interface ServiceBusConnectionStringProperties {
1835
- /**
1836
- * The fully qualified Service Bus namespace extracted from the "Endpoint" in the
1837
- * connection string. This is likely to be similar to `{yournamespace}.servicebus.windows.net`.
1838
- * This is typically used to construct the ServiceBusClient.
1839
- */
1840
- fullyQualifiedNamespace: string;
1841
- /**
1842
- * The value for "Endpoint" in the connection string.
1843
- */
1844
- endpoint: string;
1845
- /**
1846
- * The value for "EntityPath" in the connection string which would be the name of the queue or
1847
- * topic associated with the connection string.
1848
- * Connection string from a Shared Access Policy created at the namespace level
1849
- * will not have the EntityPath in it.
1850
- */
1851
- entityPath?: string;
1852
- /**
1853
- * The value for "SharedAccessKey" in the connection string. This along with the "SharedAccessKeyName"
1854
- * in the connection string is used to generate a SharedAccessSignature which can be used authorize
1855
- * the connection to the service.
1856
- */
1857
- sharedAccessKey?: string;
1858
- /**
1859
- * The value for "SharedAccessKeyName" in the connection string. This along with the "SharedAccessKey"
1860
- * in the connection string is used to generate a SharedAccessSignature which can be used authorize
1861
- * the connection to the service.
1862
- */
1863
- sharedAccessKeyName?: string;
1864
- /**
1865
- * The value for "SharedAccessSignature" in the connection string. This is typically not present in the
1866
- * connection string generated for a Shared Access Policy. It is instead generated by the
1867
- * user and appended to the connection string for ease of use.
1868
- */
1869
- sharedAccessSignature?: string;
1870
- }
1871
-
1872
- /**
1873
- * Errors that occur within Service Bus.
1874
- */
1875
- export declare class ServiceBusError extends MessagingError {
1876
- /**
1877
- * The reason for the failure.
1878
- *
1879
- * - **GeneralError**: The exception was the result of a general error within the client library.
1880
- * - **MessagingEntityNotFound**: A Service Bus resource cannot be found by the Service Bus service.
1881
- * - **MessageLockLost**: The lock on the message is lost. Callers should attempt to receive and process the message again.
1882
- * - **MessageNotFound**: The requested message was not found.
1883
- * - **MessageSizeExceeded**: A message is larger than the maximum size allowed for its transport.
1884
- * - **MessagingEntityAlreadyExists**: An entity with the same name exists under the same namespace.
1885
- * - **MessagingEntityDisabled**: The Messaging Entity is disabled. Enable the entity again using Portal.
1886
- * - **QuotaExceeded**: The quota applied to an Service Bus resource has been exceeded while interacting with the Azure Service Bus service.
1887
- * - **ServiceBusy**: The Azure Service Bus service reports that it is busy in response to a client request to perform an operation.
1888
- * - **ServiceTimeout**: An operation or other request timed out while interacting with the Azure Service Bus service.
1889
- * - **ServiceCommunicationProblem**: There was a general communications error encountered when interacting with the Azure Service Bus service.
1890
- * - **SessionCannotBeLocked**: The requested session cannot be locked.
1891
- * - **SessionLockLost**: The lock on the session has expired. Callers should request the session again.
1892
- * - **UnauthorizedAccess"**: The user doesn't have access to the entity.
1893
- */
1894
- code: ServiceBusErrorCode;
1895
- /**
1896
- * @param message - The error message that provides more information about the error.
1897
- * @param code - The reason for the failure.
1898
- */
1899
- constructor(message: string, code: ServiceBusErrorCode);
1900
- /**
1901
- * @param messagingError - An error whose properties will be copied to the ServiceBusError.
1902
- */
1903
- constructor(messagingError: MessagingError);
1904
- private static normalizeMessagingCode;
1905
- }
1906
-
1907
- /**
1908
- * Service Bus failure codes.
1909
- */
1910
- export declare type ServiceBusErrorCode =
1911
- /**
1912
- * The exception was the result of a general error within the client library.
1913
- */
1914
- "GeneralError"
1915
- /**
1916
- * A Service Bus resource cannot be found by the Service Bus service.
1917
- */
1918
- | "MessagingEntityNotFound"
1919
- /**
1920
- * The lock on the message is lost. Callers should attempt to receive and process the message again.
1921
- */
1922
- | "MessageLockLost"
1923
- /**
1924
- * The requested message was not found.
1925
- */
1926
- | "MessageNotFound"
1927
- /**
1928
- * A message is larger than the maximum size allowed for its transport.
1929
- */
1930
- | "MessageSizeExceeded"
1931
- /**
1932
- * An entity with the same name exists under the same namespace.
1933
- */
1934
- | "MessagingEntityAlreadyExists"
1935
- /**
1936
- * The Messaging Entity is disabled. Enable the entity again using Portal.
1937
- */
1938
- | "MessagingEntityDisabled"
1939
- /**
1940
- * The quota applied to an Service Bus resource has been exceeded while interacting with the Azure Service Bus service.
1941
- */
1942
- | "QuotaExceeded"
1943
- /**
1944
- * The Azure Service Bus service reports that it is busy in response to a client request to perform an operation.
1945
- */
1946
- | "ServiceBusy"
1947
- /**
1948
- * An operation or other request timed out while interacting with the Azure Service Bus service.
1949
- */
1950
- | "ServiceTimeout"
1951
- /**
1952
- * There was a general communications error encountered when interacting with the Azure Service Bus service.
1953
- */
1954
- | "ServiceCommunicationProblem"
1955
- /**
1956
- * The requested session cannot be locked.
1957
- */
1958
- | "SessionCannotBeLocked"
1959
- /**
1960
- * The lock on the session has expired. Callers should request the session again.
1961
- */
1962
- | "SessionLockLost"
1963
- /**
1964
- * The user doesn't have access to the entity.
1965
- */
1966
- | "UnauthorizedAccess";
1967
-
1968
- /**
1969
- * Describes the message to be sent to Service Bus.
1970
- */
1971
- export declare interface ServiceBusMessage {
1972
- /**
1973
- * The message body that needs to be sent or is received.
1974
- * If the application receiving the message is not using this SDK,
1975
- * convert your body payload to a byte array or Buffer for better
1976
- * cross-language compatibility.
1977
- */
1978
- body: any;
1979
- /**
1980
- * The message identifier is an
1981
- * application-defined value that uniquely identifies the message and its payload.
1982
- *
1983
- * Note: Numbers that are not whole integers are not allowed.
1984
- */
1985
- messageId?: string | number | Buffer_2;
1986
- /**
1987
- * The content type of the message. Optionally describes
1988
- * the payload of the message, with a descriptor following the format of RFC2045, Section 5, for
1989
- * example "application/json".
1990
- */
1991
- contentType?: string;
1992
- /**
1993
- * The correlation identifier that allows an
1994
- * application to specify a context for the message for the purposes of correlation, for example
1995
- * reflecting the MessageId of a message that is being replied to.
1996
- * See {@link https://docs.microsoft.com/azure/service-bus-messaging/service-bus-messages-payloads?#message-routing-and-correlation | Message Routing and Correlation}.
1997
- */
1998
- correlationId?: string | number | Buffer_2;
1999
- /**
2000
- * The partition key for sending a message to a partitioned entity.
2001
- * Maximum length is 128 characters. For {@link https://docs.microsoft.com/azure/service-bus-messaging/service-bus-partitioning | partitioned entities},
2002
- * setting this value enables assigning related messages to the same internal partition,
2003
- * so that submission sequence order is correctly recorded. The partition is chosen by a hash
2004
- * function over this value and cannot be chosen directly.
2005
- * - For session-aware entities, the `sessionId` property overrides this value.
2006
- * - For non partitioned entities, partition key will be ignored
2007
- *
2008
- */
2009
- partitionKey?: string;
2010
- /**
2011
- * The partition key for sending a message into an entity
2012
- * via a partitioned transfer queue. Maximum length is 128 characters. If a message is sent via a
2013
- * transfer queue in the scope of a transaction, this value selects the transfer queue partition:
2014
- * This is functionally equivalent to `partitionKey` property and ensures that messages are kept
2015
- * together and in order as they are transferred.
2016
- * See {@link https://docs.microsoft.com/azure/service-bus-messaging/service-bus-transactions#transfers-and-send-via | Transfers and Send Via}.
2017
- */
2018
- /**
2019
- * The session identifier for a session-aware entity. Maximum
2020
- * length is 128 characters. For session-aware entities, this application-defined value specifies
2021
- * the session affiliation of the message. Messages with the same session identifier are subject
2022
- * to summary locking and enable exact in-order processing and demultiplexing. For
2023
- * session-unaware entities, this value is ignored.
2024
- * {@link https://docs.microsoft.com/azure/service-bus-messaging/message-sessions | Message Sessions}.
2025
- */
2026
- sessionId?: string;
2027
- /**
2028
- * The session identifier augmenting the `replyTo` address.
2029
- * Maximum length is 128 characters. This value augments the ReplyTo information and specifies
2030
- * which SessionId should be set for the reply when sent to the reply entity.
2031
- * See {@link https://docs.microsoft.com/azure/service-bus-messaging/service-bus-messages-payloads?#message-routing-and-correlation | Message Routing and Correlation}.
2032
- */
2033
- replyToSessionId?: string;
2034
- /**
2035
- * The message’s time to live value. This value is the relative
2036
- * duration after which the message expires, starting from the instant the message has been
2037
- * accepted and stored by the broker, as captured in `enqueuedTimeUtc`. When not set explicitly,
2038
- * the assumed value is the DefaultTimeToLive for the respective queue or topic. A message-level
2039
- * `timeToLive` value cannot be longer than the entity's DefaultTimeToLive setting and it is
2040
- * silently adjusted if it does. See
2041
- * {@link https://docs.microsoft.com/azure/service-bus-messaging/message-expiration | Expiration}.
2042
- */
2043
- timeToLive?: number;
2044
- /**
2045
- * The application specific label. This property enables the
2046
- * application to indicate the purpose of the message to the receiver in a standardized. fashion,
2047
- * similar to an email subject line. The mapped AMQP property is "subject".
2048
- */
2049
- subject?: string;
2050
- /**
2051
- * The "to" address. This property is reserved for future use in routing
2052
- * scenarios and presently ignored by the broker itself. Applications can use this value in
2053
- * rule-driven {@link https://docs.microsoft.com/azure/service-bus-messaging/service-bus-auto-forwarding | auto-forward chaining}
2054
- * scenarios to indicate the intended logical destination of the message.
2055
- */
2056
- to?: string;
2057
- /**
2058
- * The address of an entity to send replies to. This optional and
2059
- * application-defined value is a standard way to express a reply path to the receiver of the
2060
- * message. When a sender expects a reply, it sets the value to the absolute or relative path of
2061
- * the queue or topic it expects the reply to be sent to. See
2062
- * {@link https://docs.microsoft.com/azure/service-bus-messaging/service-bus-messages-payloads?#message-routing-and-correlation | Message Routing and Correlation}.
2063
- */
2064
- replyTo?: string;
2065
- /**
2066
- * The date and time in UTC at which the message will
2067
- * be enqueued. This property returns the time in UTC; when setting the property, the
2068
- * supplied DateTime value must also be in UTC. This value is for delayed message sending.
2069
- * It is utilized to delay messages sending to a specific time in the future. Message enqueuing
2070
- * time does not mean that the message will be sent at the same time. It will get enqueued,
2071
- * but the actual sending time depends on the queue's workload and its state.
2072
- */
2073
- scheduledEnqueueTimeUtc?: Date;
2074
- /**
2075
- * The application specific properties which can be
2076
- * used for custom message metadata.
2077
- */
2078
- applicationProperties?: {
2079
- [key: string]: number | boolean | string | Date | null;
2080
- };
2081
- }
2082
-
2083
- /**
2084
- * A batch of messages that you can create using the {@link createBatch} method.
2085
- *
2086
- */
2087
- export declare interface ServiceBusMessageBatch {
2088
- /**
2089
- * Size of the batch in bytes after the events added to it have been encoded into a single AMQP
2090
- * message.
2091
- * @readonly
2092
- */
2093
- readonly sizeInBytes: number;
2094
- /**
2095
- * Number of messages added to the batch.
2096
- * @readonly
2097
- */
2098
- readonly count: number;
2099
- /**
2100
- * The maximum size of the batch, in bytes. The `tryAddMessage` function on the batch will return `false`
2101
- * if the message being added causes the size of the batch to exceed this limit. Use the `createMessageBatch()` method on
2102
- * the `Sender` to set the maxSizeInBytes.
2103
- * @readonly
2104
- */
2105
- readonly maxSizeInBytes: number;
2106
- /**
2107
- * Adds a message to the batch if permitted by the batch's size limit.
2108
- * **NOTE**: Always remember to check the return value of this method, before calling it again
2109
- * for the next event.
2110
- *
2111
- * @param message - The message to add to the batch.
2112
- * @returns A boolean value indicating if the message has been added to the batch or not.
2113
- */
2114
- tryAddMessage(message: ServiceBusMessage | AmqpAnnotatedMessage, options?: TryAddOptions): boolean;
2115
- /* Excluded from this release type: _generateMessage */
2116
- /* Excluded from this release type: _messageSpanContexts */
2117
- }
2118
-
2119
- /**
2120
- * Describes the message received from Service Bus during peek operations and so cannot be settled.
2121
- */
2122
- export declare interface ServiceBusReceivedMessage extends ServiceBusMessage {
2123
- /**
2124
- * The reason for deadlettering the message.
2125
- * @readonly
2126
- */
2127
- readonly deadLetterReason?: string;
2128
- /**
2129
- * The error description for deadlettering the message.
2130
- * @readonly
2131
- */
2132
- readonly deadLetterErrorDescription?: string;
2133
- /**
2134
- * The lock token is a reference to the lock that is being held by the broker in
2135
- * `peekLock` receive mode. Locks are used internally settle messages as explained in the
2136
- * {@link https://docs.microsoft.com/azure/service-bus-messaging/message-transfers-locks-settlement | product documentation in more detail}
2137
- * - Not applicable when the message is received in `receiveAndDelete` receive mode.
2138
- * mode.
2139
- * @readonly
2140
- */
2141
- readonly lockToken?: string;
2142
- /**
2143
- * Number of deliveries that have been attempted for this message. The count is
2144
- * incremented when a message lock expires, or the message is explicitly abandoned using the
2145
- * `abandon()` method on the message.
2146
- * @readonly
2147
- */
2148
- readonly deliveryCount?: number;
2149
- /**
2150
- * The UTC instant at which the message has been accepted and stored in Service Bus.
2151
- * @readonly
2152
- */
2153
- readonly enqueuedTimeUtc?: Date;
2154
- /**
2155
- * The UTC instant at which the message is marked for removal and no longer available for
2156
- * retrieval from the entity due to expiration. This property is computed from 2 other properties
2157
- * on the message: `enqueuedTimeUtc` + `timeToLive`.
2158
- */
2159
- readonly expiresAtUtc?: Date;
2160
- /**
2161
- * The UTC instant until which the message is held locked in the queue/subscription.
2162
- * When the lock expires, the `deliveryCount` is incremented and the message is again available
2163
- * for retrieval.
2164
- * - Not applicable when the message is received in `receiveAndDelete` receive mode.
2165
- * mode.
2166
- */
2167
- lockedUntilUtc?: Date;
2168
- /**
2169
- * The original sequence number of the message. For
2170
- * messages that have been auto-forwarded, this property reflects the sequence number that had
2171
- * first been assigned to the message at its original point of submission.
2172
- * @readonly
2173
- */
2174
- readonly enqueuedSequenceNumber?: number;
2175
- /**
2176
- * The unique number assigned to a message by Service Bus.
2177
- * The sequence number is a unique 64-bit integer assigned to a message as it is accepted
2178
- * and stored by the broker and functions as its true identifier. For partitioned entities,
2179
- * the topmost 16 bits reflect the partition identifier. Sequence numbers monotonically increase.
2180
- * They roll over to 0 when the 48-64 bit range is exhausted.
2181
- *
2182
- * **Max safe integer** that Javascript currently supports is `2^53 - 1`. The sequence number
2183
- * is an AMQP `Long` type which can be upto 64 bits long. To represent that we are using a
2184
- * library named {@link https://github.com/dcodeIO/long.js | long.js}. We expect customers
2185
- * to use the **`Long`** type exported by this library.
2186
- * @readonly
2187
- */
2188
- readonly sequenceNumber?: Long;
2189
- /**
2190
- * The name of the queue or subscription that this message
2191
- * was enqueued on, before it was deadlettered. Only set in messages that have been dead-lettered
2192
- * and subsequently auto-forwarded from the dead-letter sub-queue to another entity. Indicates the
2193
- * entity in which the message was dead-lettered.
2194
- * @readonly
2195
- */
2196
- readonly deadLetterSource?: string;
2197
- /**
2198
- * State of the message can be active, deferred or scheduled. Deferred messages have deferred state,
2199
- * scheduled messages have scheduled state, all other messages have active state.
2200
- */
2201
- readonly state: "active" | "deferred" | "scheduled";
2202
- /**
2203
- * The underlying raw amqp message.
2204
- * @readonly
2205
- */
2206
- readonly _rawAmqpMessage: AmqpAnnotatedMessage;
2207
- }
2208
-
2209
- /**
2210
- * A receiver that does not handle sessions.
2211
- */
2212
- export declare interface ServiceBusReceiver {
2213
- /**
2214
- * A name used to identify the receiver. This can be used to correlate logs and exceptions.
2215
- * If not specified or empty, a random unique one will be generated.
2216
- */
2217
- identifier: string;
2218
- /**
2219
- * Streams messages to message handlers.
2220
- * @param handlers - A handler that gets called for messages and errors.
2221
- * @param options - Options for subscribe.
2222
- * @returns An object that can be closed, sending any remaining messages to `handlers` and
2223
- * stopping new messages from arriving.
2224
- */
2225
- subscribe(handlers: MessageHandlers, options?: SubscribeOptions): {
2226
- /**
2227
- * Causes the subscriber to stop receiving new messages.
2228
- */
2229
- close(): Promise<void>;
2230
- };
2231
- /**
2232
- * Returns an iterator that can be used to receive messages from Service Bus.
2233
- *
2234
- * @param options - A set of options to control the receive operation.
2235
- * - `abortSignal`: The signal to use to abort the ongoing operation.
2236
- *
2237
- * @throws Error if the underlying connection, client or receiver is closed.
2238
- * @throws Error if current receiver is already in state of receiving messages.
2239
- * @throws `ServiceBusError` if the service returns an error while receiving messages.
2240
- */
2241
- getMessageIterator(options?: GetMessageIteratorOptions): AsyncIterableIterator<ServiceBusReceivedMessage>;
2242
- /**
2243
- * Returns a promise that resolves to an array of messages received from Service Bus.
2244
- *
2245
- * @param maxMessageCount - The maximum number of messages to receive.
2246
- * @param options - A set of options to control the receive operation.
2247
- * - `maxWaitTimeInMs`: The maximum time to wait for the first message before returning an empty array if no messages are available.
2248
- * - `abortSignal`: The signal to use to abort the ongoing operation.
2249
- * @returns A promise that resolves with an array of messages.
2250
- * @throws Error if the underlying connection, client or receiver is closed.
2251
- * @throws Error if current receiver is already in state of receiving messages.
2252
- * @throws `ServiceBusError` if the service returns an error while receiving messages.
2253
- */
2254
- receiveMessages(maxMessageCount: number, options?: ReceiveMessagesOptions): Promise<ServiceBusReceivedMessage[]>;
2255
- /**
2256
- * Returns a promise that resolves to an array of deferred messages identified by given `sequenceNumbers`.
2257
- * @param sequenceNumbers - The sequence number or an array of sequence numbers for the messages that need to be received.
2258
- * @param options - Options bag to pass an abort signal or tracing options.
2259
- * @returns A list of messages identified by the given sequenceNumbers or an empty list if no messages are found.
2260
- * @throws Error if the underlying connection or receiver is closed.
2261
- * @throws `ServiceBusError` if the service returns an error while receiving deferred messages.
2262
- */
2263
- receiveDeferredMessages(sequenceNumbers: Long | Long[], options?: OperationOptionsBase): Promise<ServiceBusReceivedMessage[]>;
2264
- /**
2265
- * Peek the next batch of active messages (including deferred but not deadlettered messages) on the
2266
- * queue or subscription without modifying them.
2267
- * - The first call to `peekMessages()` fetches the first active message. Each subsequent call fetches the
2268
- * subsequent message.
2269
- * - Unlike a "received" message, "peeked" message is a read-only version of the message.
2270
- * It cannot be `Completed/Abandoned/Deferred/Deadlettered`.
2271
- * @param maxMessageCount - The maximum number of messages to peek.
2272
- * @param options - Options that allow to specify the maximum number of messages to peek,
2273
- * the sequenceNumber to start peeking from or an abortSignal to abort the operation.
2274
- */
2275
- peekMessages(maxMessageCount: number, options?: PeekMessagesOptions): Promise<ServiceBusReceivedMessage[]>;
2276
- /**
2277
- * Delete messages. If no option is specified, all messages will be deleted.
2278
- *
2279
- * @param options - Options to configure the operation.
2280
- * @returns number of messages that have been deleted.
2281
- */
2282
- deleteMessages(options: DeleteMessagesOptions): Promise<number>;
2283
- /**
2284
- * Attempts to purge all messages from an entity. Locked messages are not eligible for removal and
2285
- * will remain in the entity.
2286
- *
2287
- * @param options - Options that allow to specify the cutoff time for deletion. Only messages that were enqueued
2288
- * before this time will be deleted. If not specified, current time will be used.
2289
- * @returns number of messages deleted.
2290
- */
2291
- purgeMessages(options?: PurgeMessagesOptions): Promise<number>;
2292
- /**
2293
- * Path of the entity for which the receiver has been created.
2294
- */
2295
- entityPath: string;
2296
- /**
2297
- * The receive mode used to create the receiver.
2298
- */
2299
- receiveMode: "peekLock" | "receiveAndDelete";
2300
- /**
2301
- * Returns `true` if either the receiver or the client that created it has been closed.
2302
- * @readonly
2303
- */
2304
- isClosed: boolean;
2305
- /**
2306
- * Closes the receiver.
2307
- * Once closed, the receiver cannot be used for any further operations.
2308
- * Use the `createReceiver()` method on the ServiceBusClient to create a new Receiver.
2309
- */
2310
- close(): Promise<void>;
2311
- /**
2312
- * Removes the message from Service Bus.
2313
- *
2314
- * @throws Error with name `SessionLockLostError` (for messages from a Queue/Subscription with sessions enabled)
2315
- * if the AMQP link with which the message was received is no longer alive. This can
2316
- * happen either because the lock on the session expired or the receiver was explicitly closed by
2317
- * the user or the AMQP link is closed by the library due to network loss or service error.
2318
- * @throws Error with name `MessageLockLostError` (for messages from a Queue/Subscription with sessions not enabled)
2319
- * if the lock on the message has expired or the AMQP link with which the message was received is
2320
- * no longer alive. The latter can happen if the receiver was explicitly closed by the user or the
2321
- * AMQP link got closed by the library due to network loss or service error.
2322
- * @throws Error if the message is already settled.
2323
- * property on the message if you are not sure whether the message is settled.
2324
- * @throws Error if used in `receiveAndDelete` mode because all messages received in this mode
2325
- * are pre-settled. To avoid this error, update your code to not settle a message which is received
2326
- * in this mode.
2327
- * @throws Error with name `ServiceUnavailableError` if Service Bus does not acknowledge the request to settle
2328
- * the message in time. The message may or may not have been settled successfully.
2329
- */
2330
- completeMessage(message: ServiceBusReceivedMessage): Promise<void>;
2331
- /**
2332
- * The lock held on the message by the receiver is let go, making the message available again in
2333
- * Service Bus for another receive operation.
2334
- *
2335
- * @throws `ServiceBusError` with the code `SessionLockLost` (for messages from a Queue/Subscription with sessions enabled)
2336
- * if the AMQP link with which the message was received is no longer alive. This can
2337
- * happen either because the lock on the session expired or the receiver was explicitly closed by
2338
- * the user or the AMQP link is closed by the library due to network loss or service error.
2339
- * @throws `ServiceBusError` with the code `MessageLockLost` (for messages from a Queue/Subscription with sessions not enabled)
2340
- * if the lock on the message has expired or the AMQP link with which the message was received is
2341
- * no longer alive. The latter can happen if the receiver was explicitly closed by the user or the
2342
- * AMQP link got closed by the library due to network loss or service error.
2343
- * @throws Error if the message is already settled.
2344
- * property on the message if you are not sure whether the message is settled.
2345
- * @throws Error if used in `receiveAndDelete` mode because all messages received in this mode
2346
- * are pre-settled. To avoid this error, update your code to not settle a message which is received
2347
- * in this mode.
2348
- * @throws `ServiceBusError` with the code `ServiceTimeout` if Service Bus does not acknowledge the request to settle
2349
- * the message in time. The message may or may not have been settled successfully.
2350
- *
2351
- * @param propertiesToModify - The properties of the message to modify while abandoning the message.
2352
- */
2353
- abandonMessage(message: ServiceBusReceivedMessage, propertiesToModify?: {
2354
- [key: string]: number | boolean | string | Date | null;
2355
- }): Promise<void>;
2356
- /**
2357
- * Defers the processing of the message. Save the `sequenceNumber` of the message, in order to
2358
- * receive it message again in the future using the `receiveDeferredMessage` method.
2359
- *
2360
- * @throws `ServiceBusError` with the code `SessionLockLost` (for messages from a Queue/Subscription with sessions enabled)
2361
- * if the AMQP link with which the message was received is no longer alive. This can
2362
- * happen either because the lock on the session expired or the receiver was explicitly closed by
2363
- * the user or the AMQP link is closed by the library due to network loss or service error.
2364
- * @throws `ServiceBusError` with the code `MessageLockLost` (for messages from a Queue/Subscription with sessions not enabled)
2365
- * if the lock on the message has expired or the AMQP link with which the message was received is
2366
- * no longer alive. The latter can happen if the receiver was explicitly closed by the user or the
2367
- * AMQP link got closed by the library due to network loss or service error.
2368
- * @throws Error if the message is already settled.
2369
- * property on the message if you are not sure whether the message is settled.
2370
- * @throws Error if used in `receiveAndDelete` mode because all messages received in this mode
2371
- * are pre-settled. To avoid this error, update your code to not settle a message which is received
2372
- * in this mode.
2373
- * @throws `ServiceBusError` with the code `ServiceTimeout` if Service Bus does not acknowledge the request to settle
2374
- * the message in time. The message may or may not have been settled successfully.
2375
- *
2376
- * @param propertiesToModify - The properties of the message to modify while deferring the message
2377
- */
2378
- deferMessage(message: ServiceBusReceivedMessage, propertiesToModify?: {
2379
- [key: string]: number | boolean | string | Date | null;
2380
- }): Promise<void>;
2381
- /**
2382
- * Moves the message to the deadletter sub-queue. To receive a deadletted message, create a new
2383
- * QueueClient/SubscriptionClient using the path for the deadletter sub-queue.
2384
- *
2385
- * @throws `ServiceBusError` with the code `SessionLockLost` (for messages from a Queue/Subscription with sessions enabled)
2386
- * if the AMQP link with which the message was received is no longer alive. This can
2387
- * happen either because the lock on the session expired or the receiver was explicitly closed by
2388
- * the user or the AMQP link is closed by the library due to network loss or service error.
2389
- * @throws `ServiceBusError` with the code `MessageLockLost` (for messages from a Queue/Subscription with sessions not enabled)
2390
- * if the lock on the message has expired or the AMQP link with which the message was received is
2391
- * no longer alive. The latter can happen if the receiver was explicitly closed by the user or the
2392
- * AMQP link got closed by the library due to network loss or service error.
2393
- * @throws Error if the message is already settled.
2394
- * property on the message if you are not sure whether the message is settled.
2395
- * @throws Error if used in `receiveAndDelete` mode because all messages received in this mode
2396
- * are pre-settled. To avoid this error, update your code to not settle a message which is received
2397
- * in this mode.
2398
- * @throws `ServiceBusError` with the code `ServiceTimeout` if Service Bus does not acknowledge the request to settle
2399
- * the message in time. The message may or may not have been settled successfully.
2400
- *
2401
- * @param options - The DeadLetter options that can be provided while
2402
- * rejecting the message.
2403
- */
2404
- deadLetterMessage(message: ServiceBusReceivedMessage, options?: DeadLetterOptions & {
2405
- [key: string]: number | boolean | string | Date | null;
2406
- }): Promise<void>;
2407
- /**
2408
- * Renews the lock on the message for the duration as specified during the Queue/Subscription
2409
- * creation.
2410
- * - Check the `lockedUntilUtc` property on the message for the time when the lock expires.
2411
- * - If a message is not settled (using either `complete()`, `defer()` or `deadletter()`,
2412
- * before its lock expires, then the message lands back in the Queue/Subscription for the next
2413
- * receive operation.
2414
- *
2415
- * @returns New lock token expiry date and time in UTC format.
2416
- * @throws Error if the underlying connection, client or receiver is closed.
2417
- * @throws ServiceBusError if the service returns an error while renewing message lock.
2418
- */
2419
- renewMessageLock(message: ServiceBusReceivedMessage): Promise<Date>;
2420
- }
2421
-
2422
- /**
2423
- * Options to use when creating a receiver.
2424
- */
2425
- export declare interface ServiceBusReceiverOptions {
2426
- /**
2427
- * Represents the receive mode for the receiver.
2428
- *
2429
- * In receiveAndDelete mode, messages are deleted from Service Bus as they are received.
2430
- *
2431
- * In peekLock mode, the receiver has a lock on the message for the duration specified on the
2432
- * queue/subscription.
2433
- *
2434
- * Messages that are not settled within the lock duration will be redelivered as many times as
2435
- * the max delivery count set on the queue/subscription, after which they get sent to a separate
2436
- * dead letter queue.
2437
- *
2438
- * You can settle a message by calling complete(), abandon(), defer() or deadletter() methods on
2439
- * the message.
2440
- *
2441
- * More information about how peekLock and message settlement works here:
2442
- * https://docs.microsoft.com/azure/service-bus-messaging/message-transfers-locks-settlement#peeklock
2443
- *
2444
- */
2445
- receiveMode?: "peekLock" | "receiveAndDelete";
2446
- /**
2447
- * Represents the sub queue that is applicable for any queue or subscription.
2448
- * Valid values are "deadLetter" and "transferDeadLetter". To learn more about dead letter queues,
2449
- * see https://docs.microsoft.com/azure/service-bus-messaging/service-bus-dead-letter-queues
2450
- */
2451
- subQueueType?: "deadLetter" | "transferDeadLetter";
2452
- /**
2453
- * The maximum duration, in milliseconds, that the lock on the message will be renewed automatically by the client.
2454
- * This auto renewal stops once the message is settled.
2455
- *
2456
- * - **Default**: `300 * 1000` milliseconds (5 minutes).
2457
- * - **To disable autolock renewal**, set this to `0`.
2458
- *
2459
- * **Example:**
2460
- *
2461
- * If the message lock expires in 2 minutes and your message processing time is 8 minutes...
2462
- *
2463
- * Set maxAutoLockRenewalDurationInMs to 10 minutes, and the message lock will be automatically renewed for 4 times
2464
- * (equivalent to having the message locked for 4 times its lock duration by leveraging the lock renewals).
2465
- */
2466
- maxAutoLockRenewalDurationInMs?: number;
2467
- /**
2468
- * Option to disable the client from running JSON.parse() on the message body when receiving the message.
2469
- * Not applicable if the message was sent with AMQP body type value or sequence. Use this option when you
2470
- * prefer to work directly with the bytes present in the message body than have the client attempt to parse it.
2471
- */
2472
- skipParsingBodyAsJson?: boolean;
2473
- /**
2474
- * Whether to skip converting Date type on properties of message annotations
2475
- * or application properties into numbers when receiving the message. By
2476
- * default, properties of Date type is converted into UNIX epoch number for
2477
- * compatibility.
2478
- */
2479
- skipConvertingDate?: boolean;
2480
- /**
2481
- * Sets the name to identify the receiver. This can be used to correlate logs and exceptions.
2482
- * If not specified or empty, a random unique one will be used.
2483
- */
2484
- identifier?: string;
2485
- }
2486
-
2487
- /**
2488
- * Allows rules for a subscription to be managed. This rule manager requires only Listen claims, whereas the
2489
- * {@link ServiceBusAdministrationClient} requires Manage claims.
2490
- */
2491
- export declare interface ServiceBusRuleManager {
2492
- /**
2493
- * Adds a rule to the current subscription to filter the messages reaching from topic to the subscription.
2494
- *
2495
- * @param ruleName - the name of the rule
2496
- * @param filter - the filter expression that the rule evaluates.
2497
- * @param options - The options that can be used to abort, trace and control other configurations on the request.
2498
- */
2499
- createRule(ruleName: string, filter: SqlRuleFilter | CorrelationRuleFilter, options?: OperationOptionsBase): Promise<void>;
2500
- /**
2501
- * Adds a rule to the current subscription to filter the messages reaching from topic to the subscription.
2502
- *
2503
- * @param ruleName - the name of the rule
2504
- * @param filter - the filter expression that the rule evaluates.
2505
- * @param ruleAction - The SQL like expression that can be executed on the message should the associated filter apply.
2506
- * @param options - The options that can be used to abort, trace and control other configurations on the request.
2507
- */
2508
- createRule(ruleName: string, filter: SqlRuleFilter | CorrelationRuleFilter, ruleAction?: SqlRuleAction, options?: OperationOptionsBase): Promise<void>;
2509
- /**
2510
- * Deletes a rule.
2511
- *
2512
- * @param ruleName - the name of the rule
2513
- */
2514
- deleteRule(ruleName: string, options?: OperationOptionsBase): Promise<void>;
2515
- /**
2516
- * Returns an async iterable iterator to list all the rules
2517
- * under the specified subscription.
2518
- *
2519
- * .byPage() returns an async iterable iterator to list the rules in pages.
2520
- *
2521
- * @returns An asyncIterableIterator that supports paging.
2522
- */
2523
- listRules(options?: OperationOptions): PagedAsyncIterableIterator<RuleProperties>;
2524
- }
2525
-
2526
- /**
2527
- * A Sender can be used to send messages, schedule messages to be sent at a later time
2528
- * and cancel such scheduled messages.
2529
- * Use the `createSender` function on the ServiceBusClient to instantiate a Sender.
2530
- * The Sender class is an abstraction over the underlying AMQP sender link.
2531
- */
2532
- export declare interface ServiceBusSender {
2533
- /**
2534
- * A name used to identify the sender. This can be used to correlate logs and exceptions.
2535
- * If not specified or empty, a random unique one will be generated.
2536
- */
2537
- identifier: string;
2538
- /**
2539
- * Sends the given messages after creating an AMQP Sender link if it doesn't already exist.
2540
- *
2541
- * - To send messages to a `session` and/or `partition` enabled Queue/Topic, set the `sessionId`
2542
- * and/or `partitionKey` properties respectively on the messages.
2543
- * - All messages passed to the same sendMessages() call should have the same `sessionId` (if using
2544
- * sessions) and the same `partitionKey` (if using partitions).
2545
- *
2546
- * **Note:**
2547
- *
2548
- * __If you want to send messages of size greater than 1MB, please send individual messages instead of sending a batched message or an array of messages like below.__
2549
- *
2550
- * `await sender.sendMessages(message);`
2551
- *
2552
- * __This is because the batched messages are not capable of sending the larger messages yet. You'll hit the `force detached` error in this case otherwise. Read [service-bus-premium-messaging#large-messages-support](https://docs.microsoft.com/en-us/azure/service-bus-messaging/service-bus-premium-messaging#large-messages-support). More info at [#23014](https://github.com/Azure/azure-sdk-for-js/pull/23014).__
2553
- *
2554
- * @param messages - A single message or an array of messages or a batch of messages created via the createBatch()
2555
- * method to send.
2556
- * @param options - Options bag to pass an abort signal or tracing options.
2557
- * @throws `ServiceBusError` with the code `MessageSizeExceeded` if the provided messages do not fit in a single `ServiceBusMessageBatch`.
2558
- * @throws Error if the underlying connection, client or sender is closed.
2559
- * @throws `ServiceBusError` if the service returns an error while sending messages to the service.
2560
- */
2561
- sendMessages(messages: ServiceBusMessage | ServiceBusMessage[] | ServiceBusMessageBatch | AmqpAnnotatedMessage | AmqpAnnotatedMessage[], options?: OperationOptionsBase): Promise<void>;
2562
- /**
2563
- * Creates an instance of `ServiceBusMessageBatch` to which one can add messages until the maximum supported size is reached.
2564
- * The batch can be passed to the {@link send} method to send the messages to Azure Service Bus.
2565
- * @param options - Configures the behavior of the batch.
2566
- * - `maxSizeInBytes`: The upper limit for the size of batch. The `tryAdd` function will return `false` after this limit is reached.
2567
- *
2568
- * @throws `ServiceBusError` if an error is encountered while sending a message.
2569
- * @throws Error if the underlying connection or sender has been closed.
2570
- */
2571
- createMessageBatch(options?: CreateMessageBatchOptions): Promise<ServiceBusMessageBatch>;
2572
- /**
2573
- * Returns `true` if either the sender or the client that created it has been closed.
2574
- * @readonly
2575
- */
2576
- isClosed: boolean;
2577
- /**
2578
- * Schedules given messages to appear on Service Bus Queue/Subscription at a later time.
2579
- *
2580
- * @param messages - Message or an array of messages that need to be scheduled.
2581
- * @param scheduledEnqueueTimeUtc - The UTC time at which the messages should be enqueued.
2582
- * @param options - Options bag to pass an abort signal or tracing options.
2583
- * @returns The sequence numbers of messages that were scheduled.
2584
- * You will need the sequence number if you intend to cancel the scheduling of the messages.
2585
- * Save the `Long` type as-is in your application without converting to number. Since JavaScript
2586
- * only supports 53 bit numbers, converting the `Long` to number will cause loss in precision.
2587
- * @throws Error if the underlying connection, client or sender is closed.
2588
- * @throws `ServiceBusError` if the service returns an error while scheduling messages.
2589
- */
2590
- scheduleMessages(messages: ServiceBusMessage | ServiceBusMessage[] | AmqpAnnotatedMessage | AmqpAnnotatedMessage[], scheduledEnqueueTimeUtc: Date, options?: OperationOptionsBase): Promise<Long[]>;
2591
- /**
2592
- * Cancels multiple messages that were scheduled to appear on a ServiceBus Queue/Subscription.
2593
- * @param sequenceNumbers - Sequence number or an array of sequence numbers of the messages to be cancelled.
2594
- * @param options - Options bag to pass an abort signal or tracing options.
2595
- * @throws Error if the underlying connection, client or sender is closed.
2596
- * @throws `ServiceBusError` if the service returns an error while canceling scheduled messages.
2597
- */
2598
- cancelScheduledMessages(sequenceNumbers: Long | Long[], options?: OperationOptionsBase): Promise<void>;
2599
- /**
2600
- * Path of the entity for which the sender has been created.
2601
- */
2602
- entityPath: string;
2603
- /**
2604
- * Closes the underlying AMQP sender link.
2605
- * Once closed, the sender cannot be used for any further operations.
2606
- * Use the `createSender` function on the QueueClient or TopicClient to instantiate a new Sender
2607
- *
2608
- */
2609
- close(): Promise<void>;
2610
- }
2611
-
2612
- /**
2613
- * Options to use when creating a sender.
2614
- */
2615
- export declare interface ServiceBusSenderOptions {
2616
- /**
2617
- * Sets the name to identify the sender. This can be used to correlate logs and exceptions.
2618
- * If not specified or empty, a random unique one will be used.
2619
- */
2620
- identifier?: string;
2621
- }
2622
-
2623
- /**
2624
- *A receiver that handles sessions, including renewing the session lock.
2625
- */
2626
- export declare interface ServiceBusSessionReceiver extends ServiceBusReceiver {
2627
- /**
2628
- * The session ID.
2629
- */
2630
- readonly sessionId: string;
2631
- /**
2632
- * The time in UTC until which the session is locked.
2633
- * Every time `renewSessionLock()` is called, this time gets updated to current time plus the lock
2634
- * duration as specified during the Queue/Subscription creation.
2635
- *
2636
- * Will return undefined until a AMQP receiver link has been successfully set up for the session.
2637
- *
2638
- * @readonly
2639
- */
2640
- readonly sessionLockedUntilUtc: Date;
2641
- /**
2642
- * Streams messages to message handlers.
2643
- * @param handlers - A handler that gets called for messages and errors.
2644
- * @param options - Options for subscribe.
2645
- * @returns An object that can be closed, sending any remaining messages to `handlers` and
2646
- * stopping new messages from arriving.
2647
- */
2648
- subscribe(handlers: MessageHandlers, options?: SubscribeOptions): {
2649
- /**
2650
- * Causes the subscriber to stop receiving new messages.
2651
- */
2652
- close(): Promise<void>;
2653
- };
2654
- /**
2655
- * Renews the lock on the session.
2656
- */
2657
- renewSessionLock(options?: OperationOptionsBase): Promise<Date>;
2658
- /**
2659
- * Gets the state of the Session. For more on session states, see
2660
- * {@link https://docs.microsoft.com/azure/service-bus-messaging/message-sessions#message-session-state | Session State}
2661
- * @param options - Options bag to pass an abort signal or tracing options.
2662
- * @returns The state of that session
2663
- * @throws Error if the underlying connection or receiver is closed.
2664
- * @throws `ServiceBusError` if the service returns an error while retrieving session state.
2665
- */
2666
- getSessionState(options?: OperationOptionsBase): Promise<any>;
2667
- /**
2668
- * Sets the state on the Session. For more on session states, see
2669
- * {@link https://docs.microsoft.com/azure/service-bus-messaging/message-sessions#message-session-state | Session State}
2670
- * @param state - The state that needs to be set.
2671
- * @param options - Options bag to pass an abort signal or tracing options.
2672
- * @throws Error if the underlying connection or receiver is closed.
2673
- * @throws `ServiceBusError` if the service returns an error while setting the session state.
2674
- *
2675
- */
2676
- setSessionState(state: any, options?: OperationOptionsBase): Promise<void>;
2677
- }
2678
-
2679
- /**
2680
- * Describes the options passed to the `acceptSession` and `acceptNextSession` methods
2681
- * when using a Queue/Subscription that has sessions enabled.
2682
- */
2683
- export declare interface ServiceBusSessionReceiverOptions extends OperationOptionsBase {
2684
- /**
2685
- * Represents the receive mode for the receiver.
2686
- *
2687
- * In receiveAndDelete mode, messages are deleted from Service Bus as they are received.
2688
- *
2689
- * In peekLock mode, the receiver has a lock on the message for the duration specified on the
2690
- * queue/subscription.
2691
- *
2692
- * Messages that are not settled within the lock duration will be redelivered as many times as
2693
- * the max delivery count set on the queue/subscription, after which they get sent to a separate
2694
- * dead letter queue.
2695
- *
2696
- * You can settle a message by calling complete(), abandon(), defer() or deadletter() methods on
2697
- * the message.
2698
- *
2699
- * More information about how peekLock and message settlement works here:
2700
- * https://docs.microsoft.com/azure/service-bus-messaging/message-transfers-locks-settlement#peeklock
2701
- *
2702
- */
2703
- receiveMode?: "peekLock" | "receiveAndDelete";
2704
- /**
2705
- * The maximum duration, in milliseconds, that the lock on the session will be renewed automatically by the client.
2706
- *
2707
- * - **Default**: `300000` milliseconds (5 minutes).
2708
- * - **To disable autolock renewal**, set this to `0`.
2709
- *
2710
- * **Example:**
2711
- *
2712
- * If the lock expires in 2 minutes and your processing time is 8 minutes...
2713
- *
2714
- * Set maxAutoLockRenewalDurationInMs to 10 minutes, and the lock will be automatically renewed about 4 times
2715
- * (equivalent to having the session locked for 4 times its lock duration by leveraging the lock renewals).
2716
- */
2717
- maxAutoLockRenewalDurationInMs?: number;
2718
- /**
2719
- * Option to disable the client from running JSON.parse() on the message body when receiving the message.
2720
- * Not applicable if the message was sent with AMQP body type value or sequence. Use this option when you
2721
- * prefer to work directly with the bytes present in the message body than have the client attempt to parse it.
2722
- */
2723
- skipParsingBodyAsJson?: boolean;
2724
- /**
2725
- * Whether to skip converting Date type on properties of message annotations
2726
- * or application properties into numbers when receiving the message. By
2727
- * default, properties of Date type is converted into UNIX epoch number for
2728
- * compatibility.
2729
- */
2730
- skipConvertingDate?: boolean;
2731
- /**
2732
- * Sets the name to identify the session receiver. This can be used to correlate logs and exceptions.
2733
- * If not specified or empty, a random unique one will be used.
2734
- */
2735
- identifier?: string;
2736
- }
2737
-
2738
- /**
2739
- * Represents all possible fields on SqlRuleAction
2740
- */
2741
- export declare type SqlRuleAction = {
2742
- /**
2743
- * SQL expression to use in the rule action.
2744
- */
2745
- sqlExpression?: string;
2746
- /**
2747
- * SQL parameters to the SQL expression in the rule action.
2748
- */
2749
- sqlParameters?: {
2750
- [key: string]: string | number | boolean;
2751
- };
2752
- };
2753
-
2754
- /**
2755
- * Represents all possible fields on SqlRuleFilter
2756
- */
2757
- export declare interface SqlRuleFilter {
2758
- /**
2759
- * SQL expression to use in the rule filter. It is evaluated against the messages'
2760
- * user-defined properties and system properties. All system properties will be prefixed with
2761
- * `sys.` in the condition expression.
2762
- * Defaults to creating a true filter if none specified
2763
- */
2764
- sqlExpression: string;
2765
- /**
2766
- * SQL parameters to the SQL expression in the rule filter.
2767
- */
2768
- sqlParameters?: {
2769
- [key: string]: string | number | boolean;
2770
- };
2771
- }
2772
-
2773
- /**
2774
- * Options used when subscribing to a Service Bus queue or subscription.
2775
- */
2776
- export declare interface SubscribeOptions extends OperationOptionsBase {
2777
- /**
2778
- * Indicates whether the message should be settled automatically based on the result from the
2779
- * user provided `processMessage` callback.
2780
- *
2781
- * - If an error is thrown from the `processMessage` callback the message will be abandoned
2782
- * using `receiver.abandonMessage()`. Doing so will make the message available again from the
2783
- * queue/subscription and the delivery count will be incremented.
2784
- * - If NO error is thrown from `processMessage` the message will be completed
2785
- * using `receiver.completeMessage()`. Doing so removes the message from the queue/subscription.
2786
- *
2787
- * This option is ignored if messages are received in the `receiveAndDelete` receive mode or if
2788
- * the message is already settled in the user provided message callback.
2789
- *
2790
- * - **Default**: `true`.
2791
- */
2792
- autoCompleteMessages?: boolean;
2793
- /**
2794
- * The maximum number of concurrent calls that the library
2795
- * can make to the user's message handler. Once this limit has been reached, more messages will
2796
- * not be received until atleast one of the calls to the user's message handler has completed.
2797
- * - **Default**: `1`.
2798
- */
2799
- maxConcurrentCalls?: number;
2800
- }
2801
-
2802
- /**
2803
- * Represents the input for updateSubscription.
2804
- *
2805
- */
2806
- export declare interface SubscriptionProperties {
2807
- /**
2808
- * Name of the subscription
2809
- */
2810
- readonly subscriptionName: string;
2811
- /**
2812
- * Name of the topic
2813
- */
2814
- readonly topicName: string;
2815
- /**
2816
- * The default lock duration is applied to subscriptions that do not define a lock
2817
- * duration.
2818
- * (If sessions are enabled, this lock duration is applicable for sessions and not for messages.)
2819
- *
2820
- * This is to be specified in ISO-8601 duration format
2821
- * such as "PT1M" for 1 minute, "PT5S" for 5 seconds.
2822
- *
2823
- * More on ISO-8601 duration format: https://en.wikipedia.org/wiki/ISO_8601#Durations
2824
- */
2825
- lockDuration: string;
2826
- /**
2827
- * If set to true, the subscription will be session-aware and only SessionReceiver
2828
- * will be supported. Session-aware subscription are not supported through REST.
2829
- * Settable only at subscription creation time.
2830
- */
2831
- readonly requiresSession: boolean;
2832
- /**
2833
- * Determines how long a message lives in the subscription. Based on whether
2834
- * dead-lettering is enabled, a message whose TTL has expired will either be moved
2835
- * to the subscription’s associated DeadLtterQueue or permanently deleted.
2836
- * This is to be specified in ISO-8601 duration format
2837
- * such as "PT1M" for 1 minute, "PT5S" for 5 seconds.
2838
- *
2839
- * More on ISO-8601 duration format: https://en.wikipedia.org/wiki/ISO_8601#Durations
2840
- */
2841
- defaultMessageTimeToLive: string;
2842
- /**
2843
- * If it is enabled and a message expires, the Service Bus moves the message from
2844
- * the queue into the subscription’s dead-letter sub-queue. If disabled, message
2845
- * will be permanently deleted from the subscription’s main queue.
2846
- * Settable only at subscription creation time.
2847
- */
2848
- deadLetteringOnMessageExpiration: boolean;
2849
- /**
2850
- * Determines how the Service Bus handles a message that causes an exception during
2851
- * a subscription’s filter evaluation. If the value is set to true, the message that
2852
- * caused the exception will be moved to the subscription’s dead-letter sub-queue.
2853
- * Otherwise, it will be discarded. By default this parameter is set to true,
2854
- * allowing the user a chance to investigate the cause of the exception.
2855
- * It can occur from a malformed message or some incorrect assumptions being made
2856
- * in the filter about the form of the message. Settable only at topic creation time.
2857
- */
2858
- deadLetteringOnFilterEvaluationExceptions: boolean;
2859
- /**
2860
- * The maximum delivery count of messages after which if it is still not settled,
2861
- * gets moved to the dead-letter sub-queue.
2862
- *
2863
- */
2864
- maxDeliveryCount: number;
2865
- /**
2866
- * Specifies if batched operations should be allowed.
2867
- */
2868
- enableBatchedOperations: boolean;
2869
- /**
2870
- * Status of the messaging entity.
2871
- */
2872
- status: EntityStatus;
2873
- /**
2874
- * Absolute URL or the name of the queue or topic the
2875
- * messages are to be forwarded to.
2876
- * For example, an absolute URL input would be of the form
2877
- * `sb://<your-service-bus-namespace-endpoint>/<queue-or-topic-name>`
2878
- */
2879
- forwardTo?: string;
2880
- /**
2881
- * The user provided metadata information associated with the subscription.
2882
- * Used to specify textual content such as tags, labels, etc.
2883
- * Value must not exceed 1024 bytes encoded in utf-8.
2884
- */
2885
- userMetadata?: string;
2886
- /**
2887
- * Absolute URL or the name of the queue or topic the dead-lettered
2888
- * messages are to be forwarded to.
2889
- * For example, an absolute URL input would be of the form
2890
- * `sb://<your-service-bus-namespace-endpoint>/<queue-or-topic-name>`
2891
- */
2892
- forwardDeadLetteredMessagesTo?: string;
2893
- /**
2894
- * Max idle time before entity is deleted.
2895
- * This is to be specified in ISO-8601 duration format
2896
- * such as "PT1M" for 1 minute, "PT5S" for 5 seconds.
2897
- *
2898
- * More on ISO-8601 duration format: https://en.wikipedia.org/wiki/ISO_8601#Durations
2899
- */
2900
- autoDeleteOnIdle: string;
2901
- /**
2902
- * Availability status of the messaging entity.
2903
- */
2904
- availabilityStatus?: EntityAvailabilityStatus;
2905
- }
2906
-
2907
- /**
2908
- * Represents runtime info attributes of a subscription entity
2909
- */
2910
- export declare interface SubscriptionRuntimeProperties {
2911
- /**
2912
- * Name of the subscription
2913
- */
2914
- subscriptionName: string;
2915
- /**
2916
- * Name of the topic
2917
- */
2918
- topicName: string;
2919
- /**
2920
- * The entity's message count.
2921
- *
2922
- */
2923
- totalMessageCount: number;
2924
- /**
2925
- * The number of active messages in the queue.
2926
- */
2927
- activeMessageCount: number;
2928
- /**
2929
- * The number of messages that have been dead lettered.
2930
- */
2931
- deadLetterMessageCount: number;
2932
- /**
2933
- * The number of messages transferred to another queue, topic, or subscription
2934
- */
2935
- transferMessageCount: number;
2936
- /**
2937
- * The number of messages transferred to the dead letter queue.
2938
- */
2939
- transferDeadLetterMessageCount: number;
2940
- /**
2941
- * Created at timestamp
2942
- */
2943
- createdAt: Date;
2944
- /**
2945
- * Updated at timestamp
2946
- */
2947
- modifiedAt: Date;
2948
- /**
2949
- * Accessed at timestamp
2950
- */
2951
- accessedAt: Date;
2952
- }
2953
-
2954
- export { TokenCredential }
2955
-
2956
- export { TokenType }
2957
-
2958
- /**
2959
- * Represents the input for updateTopic.
2960
- *
2961
- */
2962
- export declare interface TopicProperties {
2963
- /**
2964
- * Name of the topic
2965
- */
2966
- readonly name: string;
2967
- /**
2968
- * Determines how long a message lives in the associated subscriptions.
2969
- * Subscriptions inherit the TTL from the topic unless they are created explicitly
2970
- * with a smaller TTL. Based on whether dead-lettering is enabled, a message whose
2971
- * TTL has expired will either be moved to the subscription’s associated dead-letter
2972
- * sub-queue or will be permanently deleted.
2973
- * This is to be specified in ISO-8601 duration format
2974
- * such as "PT1M" for 1 minute, "PT5S" for 5 seconds.
2975
- *
2976
- * More on ISO-8601 duration format: https://en.wikipedia.org/wiki/ISO_8601#Durations
2977
- */
2978
- defaultMessageTimeToLive: string;
2979
- /**
2980
- * Specifies the maximum topic size in megabytes. Any attempt to enqueue a message
2981
- * that will cause the topic to exceed this value will fail. All messages that are
2982
- * stored in the topic or any of its subscriptions count towards this value.
2983
- * Multiple copies of a message that reside in one or multiple subscriptions count
2984
- * as a single messages. For example, if message m exists once in subscription s1
2985
- * and twice in subscription s2, m is counted as a single message.
2986
- */
2987
- maxSizeInMegabytes: number;
2988
- /**
2989
- * The maximum message size in kilobytes for messages sent to this queue/topic.
2990
- *
2991
- * Not applicable if service version "2017-04" is chosen when creating the `ServiceBusAdministrationClient`.
2992
- */
2993
- maxMessageSizeInKilobytes?: number;
2994
- /**
2995
- * If enabled, the topic will detect duplicate messages within the time span
2996
- * specified by the DuplicateDetectionHistoryTimeWindow property.
2997
- * Settable only at topic creation time.
2998
- */
2999
- readonly requiresDuplicateDetection: boolean;
3000
- /**
3001
- * Specifies the time span during which the Service Bus will detect message duplication.
3002
- * This is to be specified in ISO-8601 duration format
3003
- * such as "PT1M" for 1 minute, "PT5S" for 5 seconds.
3004
- *
3005
- * More on ISO-8601 duration format: https://en.wikipedia.org/wiki/ISO_8601#Durations
3006
- */
3007
- duplicateDetectionHistoryTimeWindow: string;
3008
- /**
3009
- * Specifies if batched operations should be allowed.
3010
- */
3011
- enableBatchedOperations: boolean;
3012
- /**
3013
- * Authorization rules on the topic
3014
- */
3015
- authorizationRules?: AuthorizationRule[];
3016
- /**
3017
- * Status of the messaging entity.
3018
- */
3019
- status: EntityStatus;
3020
- /**
3021
- * The user provided metadata information associated with the topic.
3022
- * Used to specify textual content such as tags, labels, etc.
3023
- * Value must not exceed 1024 bytes encoded in utf-8.
3024
- */
3025
- userMetadata: string;
3026
- /**
3027
- * Specifies whether the topic supports message ordering.
3028
- */
3029
- supportOrdering: boolean;
3030
- /**
3031
- * Max idle time before entity is deleted.
3032
- * This is to be specified in ISO-8601 duration format
3033
- * such as "PT1M" for 1 minute, "PT5S" for 5 seconds.
3034
- *
3035
- * More on ISO-8601 duration format: https://en.wikipedia.org/wiki/ISO_8601#Durations
3036
- */
3037
- autoDeleteOnIdle: string;
3038
- /**
3039
- * Specifies whether the topic should be partitioned
3040
- */
3041
- readonly enablePartitioning: boolean;
3042
- /**
3043
- * Specifies whether express entities are enabled on topic.
3044
- */
3045
- readonly enableExpress: boolean;
3046
- /**
3047
- * Availability status of the messaging entity.
3048
- */
3049
- readonly availabilityStatus: EntityAvailabilityStatus;
3050
- }
3051
-
3052
- /**
3053
- * Represents runtime info attributes of a topic entity
3054
- */
3055
- export declare interface TopicRuntimeProperties {
3056
- /**
3057
- * Name of the topic
3058
- */
3059
- name: string;
3060
- /**
3061
- * Specifies the topic size in bytes.
3062
- */
3063
- sizeInBytes?: number;
3064
- /**
3065
- * The subscription count on given topic.
3066
- *
3067
- */
3068
- subscriptionCount?: number;
3069
- /**
3070
- * The number of scheduled messages.
3071
- */
3072
- scheduledMessageCount: number;
3073
- /**
3074
- * Created at timestamp
3075
- */
3076
- createdAt: Date;
3077
- /**
3078
- * Updated at timestamp
3079
- */
3080
- modifiedAt: Date;
3081
- /**
3082
- * Accessed at timestamp
3083
- */
3084
- accessedAt: Date;
3085
- }
3086
-
3087
- /**
3088
- * Fired in response to upload or download progress.
3089
- */
3090
- export declare type TransferProgressEvent = {
3091
- /**
3092
- * The number of bytes loaded so far.
3093
- */
3094
- loadedBytes: number;
3095
- };
3096
-
3097
- /**
3098
- * The set of options to manually propagate `Span` context for distributed tracing.
3099
- */
3100
- export declare interface TryAddOptions {
3101
- /**
3102
- * The options to use when creating Spans for tracing.
3103
- */
3104
- tracingOptions?: OperationTracingOptions;
3105
- }
3106
-
3107
- /**
3108
- * A description of a HTTP request to be made to a remote server.
3109
- */
3110
- export declare interface WebResourceLike {
3111
- /**
3112
- * The URL being accessed by the request.
3113
- */
3114
- url: string;
3115
- /**
3116
- * The HTTP method to use when making the request.
3117
- */
3118
- method: HttpMethods;
3119
- /**
3120
- * The HTTP body contents of the request.
3121
- */
3122
- body?: any;
3123
- /**
3124
- * The HTTP headers to use when making the request.
3125
- */
3126
- headers: HttpHeadersLike;
3127
- /**
3128
- * Whether or not the body of the HttpOperationResponse should be treated as a stream.
3129
- * @deprecated Use streamResponseStatusCodes property instead.
3130
- */
3131
- streamResponseBody?: boolean;
3132
- /**
3133
- * A list of response status codes whose corresponding HttpOperationResponse body should be treated as a stream.
3134
- */
3135
- streamResponseStatusCodes?: Set<number>;
3136
- /**
3137
- * Form data, used to build the request body.
3138
- */
3139
- formData?: any;
3140
- /**
3141
- * A query string represented as an object.
3142
- */
3143
- query?: {
3144
- [key: string]: any;
3145
- };
3146
- /**
3147
- * If credentials (cookies) should be sent along during an XHR.
3148
- */
3149
- withCredentials: boolean;
3150
- /**
3151
- * The number of milliseconds a request can take before automatically being terminated.
3152
- * If the request is terminated, an `AbortError` is thrown.
3153
- */
3154
- timeout: number;
3155
- /**
3156
- * Proxy configuration.
3157
- */
3158
- proxySettings?: ProxySettings;
3159
- /**
3160
- * If the connection should be reused.
3161
- */
3162
- keepAlive?: boolean;
3163
- /**
3164
- * Whether or not to decompress response according to Accept-Encoding header (node-fetch only)
3165
- */
3166
- decompressResponse?: boolean;
3167
- /**
3168
- * A unique identifier for the request. Used for logging and tracing.
3169
- */
3170
- requestId: string;
3171
- /**
3172
- * Signal of an abort controller. Can be used to abort both sending a network request and waiting for a response.
3173
- */
3174
- abortSignal?: AbortSignalLike;
3175
- /**
3176
- * Callback which fires upon upload progress.
3177
- */
3178
- onUploadProgress?: (progress: TransferProgressEvent) => void;
3179
- /** Callback which fires upon download progress. */
3180
- onDownloadProgress?: (progress: TransferProgressEvent) => void;
3181
- }
3182
-
3183
- export { WebSocketImpl }
3184
-
3185
- export { WebSocketOptions }
3186
-
3187
- /**
3188
- * Represents the returned response of the operation along with the raw response.
3189
- */
3190
- export declare type WithResponse<T extends object> = T & {
3191
- /**
3192
- * The underlying HTTP response.
3193
- */
3194
- _response: HttpResponse;
3195
- };
3196
-
3197
- export { }