@azure/arm-storage 17.0.0-beta.1 → 17.0.0

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 (401) hide show
  1. package/CHANGELOG.md +6 -11
  2. package/README.md +15 -9
  3. package/dist/index.js +474 -591
  4. package/dist/index.js.map +1 -1
  5. package/dist/index.min.js +1 -1
  6. package/dist/index.min.js.map +1 -1
  7. package/dist-esm/src/index.d.ts +5 -0
  8. package/dist-esm/src/index.d.ts.map +1 -0
  9. package/{esm → dist-esm/src}/index.js +0 -1
  10. package/dist-esm/src/index.js.map +1 -0
  11. package/dist-esm/src/lroImpl.d.ts +16 -0
  12. package/dist-esm/src/lroImpl.d.ts.map +1 -0
  13. package/dist-esm/src/lroImpl.js +29 -0
  14. package/dist-esm/src/lroImpl.js.map +1 -0
  15. package/{esm → dist-esm/src}/models/index.d.ts +157 -51
  16. package/dist-esm/src/models/index.d.ts.map +1 -0
  17. package/{esm → dist-esm/src}/models/index.js +13 -1
  18. package/dist-esm/src/models/index.js.map +1 -0
  19. package/{esm → dist-esm/src}/models/mappers.d.ts +5 -2
  20. package/dist-esm/src/models/mappers.d.ts.map +1 -0
  21. package/{esm → dist-esm/src}/models/mappers.js +214 -32
  22. package/dist-esm/src/models/mappers.js.map +1 -0
  23. package/{esm → dist-esm/src}/models/parameters.d.ts +1 -0
  24. package/dist-esm/src/models/parameters.d.ts.map +1 -0
  25. package/{esm → dist-esm/src}/models/parameters.js +11 -1
  26. package/dist-esm/src/models/parameters.js.map +1 -0
  27. package/{esm → dist-esm/src}/operations/blobContainers.d.ts +3 -4
  28. package/dist-esm/src/operations/blobContainers.d.ts.map +1 -0
  29. package/{esm → dist-esm/src}/operations/blobContainers.js +9 -6
  30. package/dist-esm/src/operations/blobContainers.js.map +1 -0
  31. package/{esm → dist-esm/src}/operations/blobInventoryPolicies.d.ts +3 -4
  32. package/dist-esm/src/operations/blobInventoryPolicies.d.ts.map +1 -0
  33. package/{esm → dist-esm/src}/operations/blobInventoryPolicies.js +1 -2
  34. package/dist-esm/src/operations/blobInventoryPolicies.js.map +1 -0
  35. package/{esm → dist-esm/src}/operations/blobServices.d.ts +3 -4
  36. package/dist-esm/src/operations/blobServices.d.ts.map +1 -0
  37. package/{esm → dist-esm/src}/operations/blobServices.js +1 -2
  38. package/dist-esm/src/operations/blobServices.js.map +1 -0
  39. package/{esm → dist-esm/src}/operations/deletedAccounts.d.ts +3 -4
  40. package/dist-esm/src/operations/deletedAccounts.d.ts.map +1 -0
  41. package/{esm → dist-esm/src}/operations/deletedAccounts.js +1 -2
  42. package/dist-esm/src/operations/deletedAccounts.js.map +1 -0
  43. package/{esm → dist-esm/src}/operations/encryptionScopes.d.ts +3 -4
  44. package/dist-esm/src/operations/encryptionScopes.d.ts.map +1 -0
  45. package/{esm → dist-esm/src}/operations/encryptionScopes.js +1 -2
  46. package/dist-esm/src/operations/encryptionScopes.js.map +1 -0
  47. package/{esm → dist-esm/src}/operations/fileServices.d.ts +3 -3
  48. package/dist-esm/src/operations/fileServices.d.ts.map +1 -0
  49. package/{esm → dist-esm/src}/operations/fileServices.js +1 -1
  50. package/dist-esm/src/operations/fileServices.js.map +1 -0
  51. package/{esm → dist-esm/src}/operations/fileShares.d.ts +3 -4
  52. package/dist-esm/src/operations/fileShares.d.ts.map +1 -0
  53. package/{esm → dist-esm/src}/operations/fileShares.js +1 -2
  54. package/dist-esm/src/operations/fileShares.js.map +1 -0
  55. package/{esm → dist-esm/src}/operations/index.d.ts +0 -0
  56. package/dist-esm/src/operations/index.d.ts.map +1 -0
  57. package/{esm → dist-esm/src}/operations/index.js +0 -0
  58. package/dist-esm/src/operations/index.js.map +1 -0
  59. package/{esm → dist-esm/src}/operations/managementPolicies.d.ts +3 -3
  60. package/dist-esm/src/operations/managementPolicies.d.ts.map +1 -0
  61. package/{esm → dist-esm/src}/operations/managementPolicies.js +1 -1
  62. package/dist-esm/src/operations/managementPolicies.js.map +1 -0
  63. package/{esm → dist-esm/src}/operations/objectReplicationPoliciesOperations.d.ts +8 -9
  64. package/dist-esm/src/operations/objectReplicationPoliciesOperations.d.ts.map +1 -0
  65. package/{esm → dist-esm/src}/operations/objectReplicationPoliciesOperations.js +1 -2
  66. package/dist-esm/src/operations/objectReplicationPoliciesOperations.js.map +1 -0
  67. package/{esm → dist-esm/src}/operations/operations.d.ts +3 -4
  68. package/dist-esm/src/operations/operations.d.ts.map +1 -0
  69. package/{esm → dist-esm/src}/operations/operations.js +1 -2
  70. package/dist-esm/src/operations/operations.js.map +1 -0
  71. package/{esm → dist-esm/src}/operations/privateEndpointConnections.d.ts +3 -4
  72. package/dist-esm/src/operations/privateEndpointConnections.d.ts.map +1 -0
  73. package/{esm → dist-esm/src}/operations/privateEndpointConnections.js +1 -2
  74. package/dist-esm/src/operations/privateEndpointConnections.js.map +1 -0
  75. package/{esm → dist-esm/src}/operations/privateLinkResources.d.ts +3 -3
  76. package/dist-esm/src/operations/privateLinkResources.d.ts.map +1 -0
  77. package/{esm → dist-esm/src}/operations/privateLinkResources.js +1 -1
  78. package/dist-esm/src/operations/privateLinkResources.js.map +1 -0
  79. package/{esm → dist-esm/src}/operations/queue.d.ts +3 -4
  80. package/dist-esm/src/operations/queue.d.ts.map +1 -0
  81. package/{esm → dist-esm/src}/operations/queue.js +1 -2
  82. package/dist-esm/src/operations/queue.js.map +1 -0
  83. package/{esm → dist-esm/src}/operations/queueServices.d.ts +3 -3
  84. package/dist-esm/src/operations/queueServices.d.ts.map +1 -0
  85. package/{esm → dist-esm/src}/operations/queueServices.js +1 -1
  86. package/dist-esm/src/operations/queueServices.js.map +1 -0
  87. package/{esm → dist-esm/src}/operations/skus.d.ts +3 -4
  88. package/dist-esm/src/operations/skus.d.ts.map +1 -0
  89. package/{esm → dist-esm/src}/operations/skus.js +1 -2
  90. package/dist-esm/src/operations/skus.js.map +1 -0
  91. package/{esm/operationsInterfaces → dist-esm/src/operations}/storageAccounts.d.ts +91 -4
  92. package/dist-esm/src/operations/storageAccounts.d.ts.map +1 -0
  93. package/{esm → dist-esm/src}/operations/storageAccounts.js +184 -10
  94. package/dist-esm/src/operations/storageAccounts.js.map +1 -0
  95. package/{esm → dist-esm/src}/operations/tableOperations.d.ts +9 -10
  96. package/dist-esm/src/operations/tableOperations.d.ts.map +1 -0
  97. package/{esm → dist-esm/src}/operations/tableOperations.js +1 -2
  98. package/dist-esm/src/operations/tableOperations.js.map +1 -0
  99. package/{esm → dist-esm/src}/operations/tableServices.d.ts +3 -3
  100. package/dist-esm/src/operations/tableServices.d.ts.map +1 -0
  101. package/{esm → dist-esm/src}/operations/tableServices.js +1 -1
  102. package/dist-esm/src/operations/tableServices.js.map +1 -0
  103. package/{esm → dist-esm/src}/operations/usages.d.ts +3 -4
  104. package/dist-esm/src/operations/usages.d.ts.map +1 -0
  105. package/{esm → dist-esm/src}/operations/usages.js +1 -2
  106. package/dist-esm/src/operations/usages.js.map +1 -0
  107. package/{esm → dist-esm/src}/operationsInterfaces/blobContainers.d.ts +0 -1
  108. package/dist-esm/src/operationsInterfaces/blobContainers.d.ts.map +1 -0
  109. package/dist-esm/src/operationsInterfaces/blobContainers.js +9 -0
  110. package/dist-esm/src/operationsInterfaces/blobContainers.js.map +1 -0
  111. package/{esm → dist-esm/src}/operationsInterfaces/blobInventoryPolicies.d.ts +0 -1
  112. package/dist-esm/src/operationsInterfaces/blobInventoryPolicies.d.ts.map +1 -0
  113. package/dist-esm/src/operationsInterfaces/blobInventoryPolicies.js +9 -0
  114. package/dist-esm/src/operationsInterfaces/blobInventoryPolicies.js.map +1 -0
  115. package/{esm → dist-esm/src}/operationsInterfaces/blobServices.d.ts +0 -1
  116. package/dist-esm/src/operationsInterfaces/blobServices.d.ts.map +1 -0
  117. package/dist-esm/src/operationsInterfaces/blobServices.js +9 -0
  118. package/dist-esm/src/operationsInterfaces/blobServices.js.map +1 -0
  119. package/{esm → dist-esm/src}/operationsInterfaces/deletedAccounts.d.ts +0 -1
  120. package/dist-esm/src/operationsInterfaces/deletedAccounts.d.ts.map +1 -0
  121. package/dist-esm/src/operationsInterfaces/deletedAccounts.js +9 -0
  122. package/dist-esm/src/operationsInterfaces/deletedAccounts.js.map +1 -0
  123. package/{esm → dist-esm/src}/operationsInterfaces/encryptionScopes.d.ts +0 -1
  124. package/dist-esm/src/operationsInterfaces/encryptionScopes.d.ts.map +1 -0
  125. package/dist-esm/src/operationsInterfaces/encryptionScopes.js +9 -0
  126. package/dist-esm/src/operationsInterfaces/encryptionScopes.js.map +1 -0
  127. package/{esm → dist-esm/src}/operationsInterfaces/fileServices.d.ts +0 -0
  128. package/dist-esm/src/operationsInterfaces/fileServices.d.ts.map +1 -0
  129. package/{esm → dist-esm/src}/operationsInterfaces/fileServices.js +0 -0
  130. package/dist-esm/src/operationsInterfaces/fileServices.js.map +1 -0
  131. package/{esm → dist-esm/src}/operationsInterfaces/fileShares.d.ts +0 -1
  132. package/dist-esm/src/operationsInterfaces/fileShares.d.ts.map +1 -0
  133. package/dist-esm/src/operationsInterfaces/fileShares.js +9 -0
  134. package/dist-esm/src/operationsInterfaces/fileShares.js.map +1 -0
  135. package/{esm → dist-esm/src}/operationsInterfaces/index.d.ts +0 -0
  136. package/{esm/operations/index.js.map → dist-esm/src/operationsInterfaces/index.d.ts.map} +1 -1
  137. package/{esm → dist-esm/src}/operationsInterfaces/index.js +0 -0
  138. package/dist-esm/src/operationsInterfaces/index.js.map +1 -0
  139. package/{esm → dist-esm/src}/operationsInterfaces/managementPolicies.d.ts +0 -0
  140. package/dist-esm/src/operationsInterfaces/managementPolicies.d.ts.map +1 -0
  141. package/{esm → dist-esm/src}/operationsInterfaces/managementPolicies.js +0 -0
  142. package/dist-esm/src/operationsInterfaces/managementPolicies.js.map +1 -0
  143. package/{esm → dist-esm/src}/operationsInterfaces/objectReplicationPoliciesOperations.d.ts +5 -6
  144. package/dist-esm/src/operationsInterfaces/objectReplicationPoliciesOperations.d.ts.map +1 -0
  145. package/dist-esm/src/operationsInterfaces/objectReplicationPoliciesOperations.js +9 -0
  146. package/dist-esm/src/operationsInterfaces/objectReplicationPoliciesOperations.js.map +1 -0
  147. package/{esm → dist-esm/src}/operationsInterfaces/operations.d.ts +0 -1
  148. package/dist-esm/src/operationsInterfaces/operations.d.ts.map +1 -0
  149. package/dist-esm/src/operationsInterfaces/operations.js +9 -0
  150. package/dist-esm/src/operationsInterfaces/operations.js.map +1 -0
  151. package/{esm → dist-esm/src}/operationsInterfaces/privateEndpointConnections.d.ts +0 -1
  152. package/dist-esm/src/operationsInterfaces/privateEndpointConnections.d.ts.map +1 -0
  153. package/dist-esm/src/operationsInterfaces/privateEndpointConnections.js +9 -0
  154. package/dist-esm/src/operationsInterfaces/privateEndpointConnections.js.map +1 -0
  155. package/{esm → dist-esm/src}/operationsInterfaces/privateLinkResources.d.ts +0 -0
  156. package/dist-esm/src/operationsInterfaces/privateLinkResources.d.ts.map +1 -0
  157. package/{esm → dist-esm/src}/operationsInterfaces/privateLinkResources.js +0 -0
  158. package/dist-esm/src/operationsInterfaces/privateLinkResources.js.map +1 -0
  159. package/{esm → dist-esm/src}/operationsInterfaces/queue.d.ts +0 -1
  160. package/dist-esm/src/operationsInterfaces/queue.d.ts.map +1 -0
  161. package/dist-esm/src/operationsInterfaces/queue.js +9 -0
  162. package/dist-esm/src/operationsInterfaces/queue.js.map +1 -0
  163. package/{esm → dist-esm/src}/operationsInterfaces/queueServices.d.ts +0 -0
  164. package/dist-esm/src/operationsInterfaces/queueServices.d.ts.map +1 -0
  165. package/{esm → dist-esm/src}/operationsInterfaces/queueServices.js +0 -0
  166. package/dist-esm/src/operationsInterfaces/queueServices.js.map +1 -0
  167. package/{esm → dist-esm/src}/operationsInterfaces/skus.d.ts +0 -1
  168. package/dist-esm/src/operationsInterfaces/skus.d.ts.map +1 -0
  169. package/dist-esm/src/operationsInterfaces/skus.js +9 -0
  170. package/dist-esm/src/operationsInterfaces/skus.js.map +1 -0
  171. package/{esm/operations → dist-esm/src/operationsInterfaces}/storageAccounts.d.ts +51 -44
  172. package/dist-esm/src/operationsInterfaces/storageAccounts.d.ts.map +1 -0
  173. package/dist-esm/src/operationsInterfaces/storageAccounts.js +9 -0
  174. package/dist-esm/src/operationsInterfaces/storageAccounts.js.map +1 -0
  175. package/{esm → dist-esm/src}/operationsInterfaces/tableOperations.d.ts +6 -7
  176. package/dist-esm/src/operationsInterfaces/tableOperations.d.ts.map +1 -0
  177. package/dist-esm/src/operationsInterfaces/tableOperations.js +9 -0
  178. package/dist-esm/src/operationsInterfaces/tableOperations.js.map +1 -0
  179. package/{esm → dist-esm/src}/operationsInterfaces/tableServices.d.ts +0 -0
  180. package/dist-esm/src/operationsInterfaces/tableServices.d.ts.map +1 -0
  181. package/{esm → dist-esm/src}/operationsInterfaces/tableServices.js +0 -0
  182. package/dist-esm/src/operationsInterfaces/tableServices.js.map +1 -0
  183. package/{esm → dist-esm/src}/operationsInterfaces/usages.d.ts +0 -1
  184. package/dist-esm/src/operationsInterfaces/usages.d.ts.map +1 -0
  185. package/dist-esm/src/operationsInterfaces/usages.js +9 -0
  186. package/dist-esm/src/operationsInterfaces/usages.js.map +1 -0
  187. package/{esm → dist-esm/src}/storageManagementClient.d.ts +5 -2
  188. package/dist-esm/src/storageManagementClient.d.ts.map +1 -0
  189. package/{esm → dist-esm/src}/storageManagementClient.js +32 -3
  190. package/dist-esm/src/storageManagementClient.js.map +1 -0
  191. package/dist-esm/test/storage_examples.d.ts +4 -0
  192. package/dist-esm/test/storage_examples.d.ts.map +1 -0
  193. package/dist-esm/test/storage_examples.js +196 -0
  194. package/dist-esm/test/storage_examples.js.map +1 -0
  195. package/package.json +27 -33
  196. package/review/arm-storage.api.md +122 -51
  197. package/src/index.ts +0 -1
  198. package/src/lroImpl.ts +34 -0
  199. package/src/models/index.ts +167 -52
  200. package/src/models/mappers.ts +230 -37
  201. package/src/models/parameters.ts +12 -1
  202. package/src/operations/blobContainers.ts +13 -12
  203. package/src/operations/blobInventoryPolicies.ts +4 -5
  204. package/src/operations/blobServices.ts +4 -5
  205. package/src/operations/deletedAccounts.ts +4 -5
  206. package/src/operations/encryptionScopes.ts +4 -5
  207. package/src/operations/fileServices.ts +4 -4
  208. package/src/operations/fileShares.ts +4 -5
  209. package/src/operations/managementPolicies.ts +4 -4
  210. package/src/operations/objectReplicationPoliciesOperations.ts +21 -22
  211. package/src/operations/operations.ts +4 -5
  212. package/src/operations/privateEndpointConnections.ts +4 -5
  213. package/src/operations/privateLinkResources.ts +4 -4
  214. package/src/operations/queue.ts +4 -5
  215. package/src/operations/queueServices.ts +4 -4
  216. package/src/operations/skus.ts +4 -5
  217. package/src/operations/storageAccounts.ts +258 -18
  218. package/src/operations/tableOperations.ts +29 -30
  219. package/src/operations/tableServices.ts +4 -4
  220. package/src/operations/usages.ts +4 -5
  221. package/src/operationsInterfaces/blobContainers.ts +0 -1
  222. package/src/operationsInterfaces/blobInventoryPolicies.ts +0 -1
  223. package/src/operationsInterfaces/blobServices.ts +0 -1
  224. package/src/operationsInterfaces/deletedAccounts.ts +0 -1
  225. package/src/operationsInterfaces/encryptionScopes.ts +0 -1
  226. package/src/operationsInterfaces/fileShares.ts +0 -1
  227. package/src/operationsInterfaces/objectReplicationPoliciesOperations.ts +12 -13
  228. package/src/operationsInterfaces/operations.ts +0 -1
  229. package/src/operationsInterfaces/privateEndpointConnections.ts +0 -1
  230. package/src/operationsInterfaces/queue.ts +0 -1
  231. package/src/operationsInterfaces/skus.ts +0 -1
  232. package/src/operationsInterfaces/storageAccounts.ts +68 -1
  233. package/src/operationsInterfaces/tableOperations.ts +16 -17
  234. package/src/operationsInterfaces/usages.ts +0 -1
  235. package/src/storageManagementClient.ts +46 -3
  236. package/tsconfig.json +2 -3
  237. package/{esm/index.d.ts → types/arm-storage.d.ts} +247 -94
  238. package/types/tsdoc-metadata.json +11 -0
  239. package/esm/coreClientLro.d.ts +0 -26
  240. package/esm/coreClientLro.d.ts.map +0 -1
  241. package/esm/coreClientLro.js +0 -186
  242. package/esm/coreClientLro.js.map +0 -1
  243. package/esm/index.d.ts.map +0 -1
  244. package/esm/index.js.map +0 -1
  245. package/esm/lro/azureAsyncPolling.d.ts +0 -3
  246. package/esm/lro/azureAsyncPolling.d.ts.map +0 -1
  247. package/esm/lro/azureAsyncPolling.js +0 -67
  248. package/esm/lro/azureAsyncPolling.js.map +0 -1
  249. package/esm/lro/bodyPolling.d.ts +0 -8
  250. package/esm/lro/bodyPolling.d.ts.map +0 -1
  251. package/esm/lro/bodyPolling.js +0 -37
  252. package/esm/lro/bodyPolling.js.map +0 -1
  253. package/esm/lro/index.d.ts +0 -4
  254. package/esm/lro/index.d.ts.map +0 -1
  255. package/esm/lro/index.js +0 -12
  256. package/esm/lro/index.js.map +0 -1
  257. package/esm/lro/locationPolling.d.ts +0 -3
  258. package/esm/lro/locationPolling.d.ts.map +0 -1
  259. package/esm/lro/locationPolling.js +0 -19
  260. package/esm/lro/locationPolling.js.map +0 -1
  261. package/esm/lro/lroEngine.d.ts +0 -14
  262. package/esm/lro/lroEngine.d.ts.map +0 -1
  263. package/esm/lro/lroEngine.js +0 -41
  264. package/esm/lro/lroEngine.js.map +0 -1
  265. package/esm/lro/models.d.ts +0 -138
  266. package/esm/lro/models.d.ts.map +0 -1
  267. package/esm/lro/models.js +0 -14
  268. package/esm/lro/models.js.map +0 -1
  269. package/esm/lro/operation.d.ts +0 -36
  270. package/esm/lro/operation.d.ts.map +0 -1
  271. package/esm/lro/operation.js +0 -82
  272. package/esm/lro/operation.js.map +0 -1
  273. package/esm/lro/passthrough.d.ts +0 -3
  274. package/esm/lro/passthrough.d.ts.map +0 -1
  275. package/esm/lro/passthrough.js +0 -15
  276. package/esm/lro/passthrough.js.map +0 -1
  277. package/esm/lro/requestUtils.d.ts +0 -16
  278. package/esm/lro/requestUtils.d.ts.map +0 -1
  279. package/esm/lro/requestUtils.js +0 -73
  280. package/esm/lro/requestUtils.js.map +0 -1
  281. package/esm/lro/stateMachine.d.ts +0 -18
  282. package/esm/lro/stateMachine.d.ts.map +0 -1
  283. package/esm/lro/stateMachine.js +0 -84
  284. package/esm/lro/stateMachine.js.map +0 -1
  285. package/esm/models/index.d.ts.map +0 -1
  286. package/esm/models/index.js.map +0 -1
  287. package/esm/models/mappers.d.ts.map +0 -1
  288. package/esm/models/mappers.js.map +0 -1
  289. package/esm/models/parameters.d.ts.map +0 -1
  290. package/esm/models/parameters.js.map +0 -1
  291. package/esm/operations/blobContainers.d.ts.map +0 -1
  292. package/esm/operations/blobContainers.js.map +0 -1
  293. package/esm/operations/blobInventoryPolicies.d.ts.map +0 -1
  294. package/esm/operations/blobInventoryPolicies.js.map +0 -1
  295. package/esm/operations/blobServices.d.ts.map +0 -1
  296. package/esm/operations/blobServices.js.map +0 -1
  297. package/esm/operations/deletedAccounts.d.ts.map +0 -1
  298. package/esm/operations/deletedAccounts.js.map +0 -1
  299. package/esm/operations/encryptionScopes.d.ts.map +0 -1
  300. package/esm/operations/encryptionScopes.js.map +0 -1
  301. package/esm/operations/fileServices.d.ts.map +0 -1
  302. package/esm/operations/fileServices.js.map +0 -1
  303. package/esm/operations/fileShares.d.ts.map +0 -1
  304. package/esm/operations/fileShares.js.map +0 -1
  305. package/esm/operations/index.d.ts.map +0 -1
  306. package/esm/operations/managementPolicies.d.ts.map +0 -1
  307. package/esm/operations/managementPolicies.js.map +0 -1
  308. package/esm/operations/objectReplicationPoliciesOperations.d.ts.map +0 -1
  309. package/esm/operations/objectReplicationPoliciesOperations.js.map +0 -1
  310. package/esm/operations/operations.d.ts.map +0 -1
  311. package/esm/operations/operations.js.map +0 -1
  312. package/esm/operations/privateEndpointConnections.d.ts.map +0 -1
  313. package/esm/operations/privateEndpointConnections.js.map +0 -1
  314. package/esm/operations/privateLinkResources.d.ts.map +0 -1
  315. package/esm/operations/privateLinkResources.js.map +0 -1
  316. package/esm/operations/queue.d.ts.map +0 -1
  317. package/esm/operations/queue.js.map +0 -1
  318. package/esm/operations/queueServices.d.ts.map +0 -1
  319. package/esm/operations/queueServices.js.map +0 -1
  320. package/esm/operations/skus.d.ts.map +0 -1
  321. package/esm/operations/skus.js.map +0 -1
  322. package/esm/operations/storageAccounts.d.ts.map +0 -1
  323. package/esm/operations/storageAccounts.js.map +0 -1
  324. package/esm/operations/tableOperations.d.ts.map +0 -1
  325. package/esm/operations/tableOperations.js.map +0 -1
  326. package/esm/operations/tableServices.d.ts.map +0 -1
  327. package/esm/operations/tableServices.js.map +0 -1
  328. package/esm/operations/usages.d.ts.map +0 -1
  329. package/esm/operations/usages.js.map +0 -1
  330. package/esm/operationsInterfaces/blobContainers.d.ts.map +0 -1
  331. package/esm/operationsInterfaces/blobContainers.js +0 -9
  332. package/esm/operationsInterfaces/blobContainers.js.map +0 -1
  333. package/esm/operationsInterfaces/blobInventoryPolicies.d.ts.map +0 -1
  334. package/esm/operationsInterfaces/blobInventoryPolicies.js +0 -9
  335. package/esm/operationsInterfaces/blobInventoryPolicies.js.map +0 -1
  336. package/esm/operationsInterfaces/blobServices.d.ts.map +0 -1
  337. package/esm/operationsInterfaces/blobServices.js +0 -9
  338. package/esm/operationsInterfaces/blobServices.js.map +0 -1
  339. package/esm/operationsInterfaces/deletedAccounts.d.ts.map +0 -1
  340. package/esm/operationsInterfaces/deletedAccounts.js +0 -9
  341. package/esm/operationsInterfaces/deletedAccounts.js.map +0 -1
  342. package/esm/operationsInterfaces/encryptionScopes.d.ts.map +0 -1
  343. package/esm/operationsInterfaces/encryptionScopes.js +0 -9
  344. package/esm/operationsInterfaces/encryptionScopes.js.map +0 -1
  345. package/esm/operationsInterfaces/fileServices.d.ts.map +0 -1
  346. package/esm/operationsInterfaces/fileServices.js.map +0 -1
  347. package/esm/operationsInterfaces/fileShares.d.ts.map +0 -1
  348. package/esm/operationsInterfaces/fileShares.js +0 -9
  349. package/esm/operationsInterfaces/fileShares.js.map +0 -1
  350. package/esm/operationsInterfaces/index.d.ts.map +0 -1
  351. package/esm/operationsInterfaces/index.js.map +0 -1
  352. package/esm/operationsInterfaces/managementPolicies.d.ts.map +0 -1
  353. package/esm/operationsInterfaces/managementPolicies.js.map +0 -1
  354. package/esm/operationsInterfaces/objectReplicationPoliciesOperations.d.ts.map +0 -1
  355. package/esm/operationsInterfaces/objectReplicationPoliciesOperations.js +0 -9
  356. package/esm/operationsInterfaces/objectReplicationPoliciesOperations.js.map +0 -1
  357. package/esm/operationsInterfaces/operations.d.ts.map +0 -1
  358. package/esm/operationsInterfaces/operations.js +0 -9
  359. package/esm/operationsInterfaces/operations.js.map +0 -1
  360. package/esm/operationsInterfaces/privateEndpointConnections.d.ts.map +0 -1
  361. package/esm/operationsInterfaces/privateEndpointConnections.js +0 -9
  362. package/esm/operationsInterfaces/privateEndpointConnections.js.map +0 -1
  363. package/esm/operationsInterfaces/privateLinkResources.d.ts.map +0 -1
  364. package/esm/operationsInterfaces/privateLinkResources.js.map +0 -1
  365. package/esm/operationsInterfaces/queue.d.ts.map +0 -1
  366. package/esm/operationsInterfaces/queue.js +0 -9
  367. package/esm/operationsInterfaces/queue.js.map +0 -1
  368. package/esm/operationsInterfaces/queueServices.d.ts.map +0 -1
  369. package/esm/operationsInterfaces/queueServices.js.map +0 -1
  370. package/esm/operationsInterfaces/skus.d.ts.map +0 -1
  371. package/esm/operationsInterfaces/skus.js +0 -9
  372. package/esm/operationsInterfaces/skus.js.map +0 -1
  373. package/esm/operationsInterfaces/storageAccounts.d.ts.map +0 -1
  374. package/esm/operationsInterfaces/storageAccounts.js +0 -9
  375. package/esm/operationsInterfaces/storageAccounts.js.map +0 -1
  376. package/esm/operationsInterfaces/tableOperations.d.ts.map +0 -1
  377. package/esm/operationsInterfaces/tableOperations.js +0 -9
  378. package/esm/operationsInterfaces/tableOperations.js.map +0 -1
  379. package/esm/operationsInterfaces/tableServices.d.ts.map +0 -1
  380. package/esm/operationsInterfaces/tableServices.js.map +0 -1
  381. package/esm/operationsInterfaces/usages.d.ts.map +0 -1
  382. package/esm/operationsInterfaces/usages.js +0 -9
  383. package/esm/operationsInterfaces/usages.js.map +0 -1
  384. package/esm/storageManagementClient.d.ts.map +0 -1
  385. package/esm/storageManagementClient.js.map +0 -1
  386. package/esm/storageManagementClientContext.d.ts +0 -16
  387. package/esm/storageManagementClientContext.d.ts.map +0 -1
  388. package/esm/storageManagementClientContext.js +0 -49
  389. package/esm/storageManagementClientContext.js.map +0 -1
  390. package/src/coreClientLro.ts +0 -323
  391. package/src/lro/azureAsyncPolling.ts +0 -96
  392. package/src/lro/bodyPolling.ts +0 -54
  393. package/src/lro/index.ts +0 -26
  394. package/src/lro/locationPolling.ts +0 -30
  395. package/src/lro/lroEngine.ts +0 -61
  396. package/src/lro/models.ts +0 -173
  397. package/src/lro/operation.ts +0 -120
  398. package/src/lro/passthrough.ts +0 -23
  399. package/src/lro/requestUtils.ts +0 -105
  400. package/src/lro/stateMachine.ts +0 -138
  401. package/src/storageManagementClientContext.ts +0 -70
@@ -1,186 +0,0 @@
1
- /*
2
- * Copyright (c) Microsoft Corporation.
3
- * Licensed under the MIT License.
4
- *
5
- * Code generated by Microsoft (R) AutoRest Code Generator.
6
- * Changes may cause incorrect behavior and will be lost if the code is regenerated.
7
- */
8
- import { __awaiter, __rest } from "tslib";
9
- import { createGetLroStatusFromResponse } from "./lro";
10
- export const successStates = ["succeeded"];
11
- export const failureStates = ["failed", "canceled", "cancelled"];
12
- export const terminalStates = successStates.concat(failureStates);
13
- export function createPollingMethod(sendOperationFn, GetLroStatusFromResponse, args, spec, mode) {
14
- var _a;
15
- /**
16
- * Polling calls will always return a status object i.e. {"status": "success"}
17
- * these intermediate responses are not described in the swagger so we need to
18
- * pass custom mappers at runtime.
19
- * This function replaces all the existing mappers to be able to deserialize a status object
20
- * @param responses Original set of responses defined in the operation
21
- */
22
- function getCompositeMappers(responses) {
23
- return Object.keys(responses).reduce((acc, statusCode) => {
24
- return Object.assign(Object.assign({}, acc), { [statusCode]: Object.assign(Object.assign({}, responses[statusCode]), { bodyMapper: {
25
- type: {
26
- name: "Composite",
27
- modelProperties: {
28
- status: {
29
- serializedName: "status",
30
- type: {
31
- name: "String"
32
- }
33
- }
34
- }
35
- }
36
- } }) });
37
- }, {});
38
- }
39
- let response = undefined;
40
- const customerCallback = (_a = args === null || args === void 0 ? void 0 : args.options) === null || _a === void 0 ? void 0 : _a.onResponse;
41
- const updatedArgs = Object.assign(Object.assign({}, args), { options: Object.assign(Object.assign({}, args.options), { onResponse: (rawResponse, flatResponse) => {
42
- response = GetLroStatusFromResponse({
43
- statusCode: rawResponse.status,
44
- body: rawResponse.parsedBody,
45
- headers: rawResponse.headers.toJSON()
46
- }, flatResponse);
47
- if (response.done) {
48
- customerCallback === null || customerCallback === void 0 ? void 0 : customerCallback(rawResponse, flatResponse);
49
- }
50
- } }) });
51
- // Make sure we don't send any body to the get request
52
- const { requestBody, responses } = spec, restSpec = __rest(spec, ["requestBody", "responses"]);
53
- if (mode === "AzureAsync") {
54
- return (path) => __awaiter(this, void 0, void 0, function* () {
55
- yield sendOperationFn(updatedArgs, Object.assign(Object.assign(Object.assign({}, restSpec), { responses: getCompositeMappers(responses), httpMethod: "GET" }), (path && { path })));
56
- return response;
57
- });
58
- }
59
- return (path) => __awaiter(this, void 0, void 0, function* () {
60
- yield sendOperationFn(updatedArgs, Object.assign(Object.assign(Object.assign({}, restSpec), { responses: responses, httpMethod: "GET" }), (path && { path })));
61
- return response;
62
- });
63
- }
64
- /**
65
- * We need to selectively deserialize our responses, only deserializing if we
66
- * are in a final Lro response, not deserializing any polling non-terminal responses
67
- */
68
- export function shouldDeserializeLro(lroResourceLocationConfig) {
69
- let initialOperationInfo;
70
- let isInitialRequest = true;
71
- return (response) => {
72
- if (response.status < 200 || response.status >= 300) {
73
- return true;
74
- }
75
- if (!initialOperationInfo) {
76
- initialOperationInfo = getLroData(response);
77
- }
78
- else {
79
- isInitialRequest = false;
80
- }
81
- if (initialOperationInfo.azureAsyncOperation ||
82
- initialOperationInfo.operationLocation) {
83
- return (!isInitialRequest &&
84
- isAsyncOperationFinalResponse(response, initialOperationInfo, lroResourceLocationConfig));
85
- }
86
- if (initialOperationInfo.location) {
87
- return isLocationFinalResponse(response);
88
- }
89
- if (initialOperationInfo.requestMethod === "PUT") {
90
- return isBodyPollingFinalResponse(response);
91
- }
92
- return true;
93
- };
94
- }
95
- function isAsyncOperationFinalResponse(response, initialOperationInfo, lroResourceLocationConfig) {
96
- var _a;
97
- const status = ((_a = response.parsedBody) === null || _a === void 0 ? void 0 : _a.status) || "Succeeded";
98
- if (!terminalStates.includes(status.toLowerCase())) {
99
- return false;
100
- }
101
- if (initialOperationInfo.requestMethod === "DELETE") {
102
- return true;
103
- }
104
- if (initialOperationInfo.requestMethod === "PUT" &&
105
- lroResourceLocationConfig &&
106
- lroResourceLocationConfig.toLowerCase() === "azure-asyncoperation") {
107
- return true;
108
- }
109
- if (initialOperationInfo.requestMethod !== "PUT" &&
110
- !initialOperationInfo.location) {
111
- return true;
112
- }
113
- return false;
114
- }
115
- function isLocationFinalResponse(response) {
116
- return response.status !== 202;
117
- }
118
- function isBodyPollingFinalResponse(response) {
119
- var _a, _b;
120
- const provisioningState = ((_b = (_a = response.parsedBody) === null || _a === void 0 ? void 0 : _a.properties) === null || _b === void 0 ? void 0 : _b.provisioningState) || "Succeeded";
121
- if (terminalStates.includes(provisioningState.toLowerCase())) {
122
- return true;
123
- }
124
- return false;
125
- }
126
- function getLroData(result) {
127
- return {
128
- azureAsyncOperation: result.headers.get("azure-asyncoperation"),
129
- operationLocation: result.headers.get("operation-location"),
130
- location: result.headers.get("location"),
131
- requestMethod: result.request.method
132
- };
133
- }
134
- export function getSpecPath(spec) {
135
- if (spec.path) {
136
- return spec.path;
137
- }
138
- else {
139
- throw Error("Bad spec: request path is not found!");
140
- }
141
- }
142
- export class CoreClientLro {
143
- constructor(sendOperationFn, args, spec, lroResourceLocationConfig, requestPath = spec.path, requestMethod = spec.httpMethod) {
144
- this.sendOperationFn = sendOperationFn;
145
- this.args = args;
146
- this.spec = spec;
147
- this.lroResourceLocationConfig = lroResourceLocationConfig;
148
- this.requestPath = requestPath;
149
- this.requestMethod = requestMethod;
150
- }
151
- sendInitialRequest(initializeState) {
152
- return __awaiter(this, void 0, void 0, function* () {
153
- const _a = this.args.options || {}, { onResponse } = _a, restOptions = __rest(_a, ["onResponse"]);
154
- return this.sendOperationFn(Object.assign(Object.assign({}, this.args), { options: Object.assign(Object.assign({}, restOptions), { onResponse: (rawResponse, flatResponse) => {
155
- const isCompleted = initializeState({
156
- statusCode: rawResponse.status,
157
- body: rawResponse.parsedBody,
158
- headers: rawResponse.headers.toJSON()
159
- }, flatResponse);
160
- if (isCompleted) {
161
- onResponse === null || onResponse === void 0 ? void 0 : onResponse(rawResponse, flatResponse);
162
- }
163
- } }) }), this.spec);
164
- });
165
- }
166
- sendPollRequest(config, path) {
167
- return __awaiter(this, void 0, void 0, function* () {
168
- const getLroStatusFromResponse = createGetLroStatusFromResponse(this, config, this.lroResourceLocationConfig);
169
- return createPollingMethod(this.sendOperationFn, getLroStatusFromResponse, this.args, this.spec, config.mode)(path);
170
- });
171
- }
172
- retrieveAzureAsyncResource(path) {
173
- return __awaiter(this, void 0, void 0, function* () {
174
- const updatedArgs = Object.assign({}, this.args);
175
- if (updatedArgs.options) {
176
- updatedArgs.options.shouldDeserialize = true;
177
- }
178
- return createPollingMethod(this.sendOperationFn, (rawResponse, flatResponse) => ({
179
- rawResponse,
180
- flatResponse,
181
- done: true
182
- }), updatedArgs, this.spec)(path);
183
- });
184
- }
185
- }
186
- //# sourceMappingURL=coreClientLro.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"coreClientLro.js","sourceRoot":"","sources":["../src/coreClientLro.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;;AAWH,OAAO,EAQL,8BAA8B,EAE/B,MAAM,OAAO,CAAC;AAEf,MAAM,CAAC,MAAM,aAAa,GAAG,CAAC,WAAW,CAAC,CAAC;AAC3C,MAAM,CAAC,MAAM,aAAa,GAAG,CAAC,QAAQ,EAAE,UAAU,EAAE,WAAW,CAAC,CAAC;AACjE,MAAM,CAAC,MAAM,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AO,EAAE,8BAA8B,EAAE,MAAM,kCAAkC,CAAC;AAClF,cAAc,wBAAwB,CAAC"}
package/esm/index.js.map DELETED
@@ -1 +0,0 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAEH,4CAA4C;AAC5C,cAAc,UAAU,CAAC;AACzB,OAAO,EAAE,uBAAuB,EAAE,MAAM,2BAA2B,CAAC;AACpE,OAAO,EAAE,8BAA8B,EAAE,MAAM,kCAAkC,CAAC;AAClF,cAAc,wBAAwB,CAAC"}
@@ -1,3 +0,0 @@
1
- import { LroResourceLocationConfig, LongRunningOperation, LroStatus, RawResponse } from "./models";
2
- export declare function processAzureAsyncOperationResult<TResult>(lro: LongRunningOperation<TResult>, resourceLocation?: string, lroResourceLocationConfig?: LroResourceLocationConfig): (rawResponse: RawResponse, flatResponse: TResult) => LroStatus<TResult>;
3
- //# sourceMappingURL=azureAsyncPolling.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"azureAsyncPolling.d.ts","sourceRoot":"","sources":["../../src/lro/azureAsyncPolling.ts"],"names":[],"mappings":"AAWA,OAAO,EAEL,yBAAyB,EACzB,oBAAoB,EAGpB,SAAS,EACT,WAAW,EAEZ,MAAM,UAAU,CAAC;AAmClB,wBAAgB,gCAAgC,CAAC,OAAO,EACtD,GAAG,EAAE,oBAAoB,CAAC,OAAO,CAAC,EAClC,gBAAgB,CAAC,EAAE,MAAM,EACzB,yBAAyB,CAAC,EAAE,yBAAyB,GACpD,CAAC,WAAW,EAAE,WAAW,EAAE,YAAY,EAAE,OAAO,KAAK,SAAS,CAAC,OAAO,CAAC,CAoCzE"}
@@ -1,67 +0,0 @@
1
- /*
2
- * Copyright (c) Microsoft Corporation.
3
- * Licensed under the MIT License.
4
- *
5
- * Code generated by Microsoft (R) AutoRest Code Generator.
6
- * Changes may cause incorrect behavior and will be lost if the code is regenerated.
7
- */
8
- import { __awaiter } from "tslib";
9
- // Copyright (c) Microsoft Corporation.
10
- // Licensed under the MIT license.
11
- import { failureStates, successStates } from "./models";
12
- import { isUnexpectedPollingResponse } from "./requestUtils";
13
- function getResponseStatus(rawResponse) {
14
- var _a, _b;
15
- const { status } = (_a = rawResponse.body) !== null && _a !== void 0 ? _a : {};
16
- return (_b = status === null || status === void 0 ? void 0 : status.toLowerCase()) !== null && _b !== void 0 ? _b : "succeeded";
17
- }
18
- function isAzureAsyncPollingDone(rawResponse) {
19
- const state = getResponseStatus(rawResponse);
20
- if (isUnexpectedPollingResponse(rawResponse) ||
21
- failureStates.includes(state)) {
22
- throw new Error(`Operation status: ${state}`);
23
- }
24
- return successStates.includes(state);
25
- }
26
- function sendFinalRequest(lro, lroResourceLocationConfig, resourceLocation) {
27
- return __awaiter(this, void 0, void 0, function* () {
28
- switch (lroResourceLocationConfig) {
29
- case "original-uri":
30
- return lro.retrieveAzureAsyncResource();
31
- case "azure-async-operation":
32
- return Promise.resolve(undefined);
33
- case "location":
34
- default:
35
- return lro.retrieveAzureAsyncResource(resourceLocation);
36
- }
37
- });
38
- }
39
- export function processAzureAsyncOperationResult(lro, resourceLocation, lroResourceLocationConfig) {
40
- return (rawResponse, flatResponse) => {
41
- if (isAzureAsyncPollingDone(rawResponse)) {
42
- if (resourceLocation === undefined) {
43
- return { rawResponse, flatResponse, done: true };
44
- }
45
- else {
46
- return {
47
- rawResponse,
48
- flatResponse,
49
- done: false,
50
- next: () => __awaiter(this, void 0, void 0, function* () {
51
- const finalResponse = yield sendFinalRequest(lro, lroResourceLocationConfig, resourceLocation);
52
- return Object.assign(Object.assign({}, (finalResponse !== null && finalResponse !== void 0 ? finalResponse : {
53
- rawResponse,
54
- flatResponse
55
- })), { done: true });
56
- })
57
- };
58
- }
59
- }
60
- return {
61
- rawResponse,
62
- flatResponse,
63
- done: false
64
- };
65
- };
66
- }
67
- //# sourceMappingURL=azureAsyncPolling.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"azureAsyncPolling.js","sourceRo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,CAAC,EAAE;YACxC,IAAI,gBAAgB,KAAK,SAAS,EAAE;gBAClC,OAAO,EAAE,WAAW,EAAE,YAAY,EAAE,IAAI,EAAE,IAAI,EAAE,CAAC;aAClD;iBAAM;gBACL,OAAO;oBACL,WAAW;oBACX,YAAY;oBACZ,IAAI,EAAE,KAAK;oBACX,IAAI,EAAE,GAAS,EAAE;wBACf,MAAM,aAAa,GAAG,MAAM,gBAAgB,CAC1C,GAAG,EACH,yBAAyB,EACzB,gBAAgB,CACjB,CAAC;wBACF,uCACK,CAAC,aAAa,aAAb,aAAa,cAAb,aAAa,GAAI;4BACnB,WAAW;4BACX,YAAY;yBACb,CAAC,KACF,IAAI,EAAE,IAAI,IACV;oBACJ,CAAC,CAAA;iBACF,CAAC;aACH;SACF;QACD,OAAO;YACL,WAAW;YACX,YAAY;YACZ,IAAI,EAAE,KAAK;SACZ,CAAC;IACJ,CAAC,CAAC;AACJ,CAAC"}
@@ -1,8 +0,0 @@
1
- import { LroStatus, RawResponse } from "./models";
2
- export declare function isBodyPollingDone(rawResponse: RawResponse): boolean;
3
- /**
4
- * Creates a polling strategy based on BodyPolling which uses the provisioning state
5
- * from the result to determine the current operation state
6
- */
7
- export declare function processBodyPollingOperationResult<TResult>(rawResponse: RawResponse, flatResponse: TResult): LroStatus<TResult>;
8
- //# sourceMappingURL=bodyPolling.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"bodyPolling.d.ts","sourceRoot":"","sources":["../../src/lro/bodyPolling.ts"],"names":[],"mappings":"AAWA,OAAO,EAGL,SAAS,EACT,WAAW,EAEZ,MAAM,UAAU,CAAC;AAUlB,wBAAgB,iBAAiB,CAAC,WAAW,EAAE,WAAW,GAAG,OAAO,CAWnE;AAED;;;GAGG;AACH,wBAAgB,iCAAiC,CAAC,OAAO,EACvD,WAAW,EAAE,WAAW,EACxB,YAAY,EAAE,OAAO,GACpB,SAAS,CAAC,OAAO,CAAC,CAMpB"}
@@ -1,37 +0,0 @@
1
- /*
2
- * Copyright (c) Microsoft Corporation.
3
- * Licensed under the MIT License.
4
- *
5
- * Code generated by Microsoft (R) AutoRest Code Generator.
6
- * Changes may cause incorrect behavior and will be lost if the code is regenerated.
7
- */
8
- // Copyright (c) Microsoft Corporation.
9
- // Licensed under the MIT license.
10
- import { failureStates, successStates } from "./models";
11
- import { isUnexpectedPollingResponse } from "./requestUtils";
12
- function getProvisioningState(rawResponse) {
13
- var _a, _b, _c;
14
- const { properties, provisioningState } = (_a = rawResponse.body) !== null && _a !== void 0 ? _a : {};
15
- const state = (_b = properties === null || properties === void 0 ? void 0 : properties.provisioningState) !== null && _b !== void 0 ? _b : provisioningState;
16
- return (_c = state === null || state === void 0 ? void 0 : state.toLowerCase()) !== null && _c !== void 0 ? _c : "succeeded";
17
- }
18
- export function isBodyPollingDone(rawResponse) {
19
- const state = getProvisioningState(rawResponse);
20
- if (isUnexpectedPollingResponse(rawResponse) ||
21
- failureStates.includes(state)) {
22
- throw new Error(`The long running operation has failed. The provisioning state: ${state}.`);
23
- }
24
- return successStates.includes(state);
25
- }
26
- /**
27
- * Creates a polling strategy based on BodyPolling which uses the provisioning state
28
- * from the result to determine the current operation state
29
- */
30
- export function processBodyPollingOperationResult(rawResponse, flatResponse) {
31
- return {
32
- rawResponse,
33
- flatResponse,
34
- done: isBodyPollingDone(rawResponse)
35
- };
36
- }
37
- //# sourceMappingURL=bodyPolling.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"bodyPolling.js","sourceRoot":"","sources":["../../src/lro/bodyPolling.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAEH,uCAAuC;AACvC,kCAAkC;AAElC,OAAO,EACL,aAAa,EAIb,aAAa,EACd,MAAM,UAAU,CAAC;AAClB,OAAO,EAAE,2BAA2B,EAAE,MAAM,gBAAgB,CAAC;AAE7D,SAAS,oBAAoB,CAAC,WAAwB;;IACpD,MAAM,EAAE,UAAU,EAAE,iBAAiB,EAAE,GAAG,MAAC,WAAW,CAAC,IAAgB,mCAAI,EAAE,CAAC;IAC9E,MAAM,KAAK,GACT,MAAA,UAAU,aAAV,UAAU,uBAAV,UAAU,CAAE,iBAAiB,mCAAI,iBAAiB,CAAC;IACrD,OAAO,MAAA,KAAK,aAAL,KAAK,uBAAL,KAAK,CAAE,WAAW,EAAE,mCAAI,WAAW,CAAC;AAC7C,CAAC;AAED,MAAM,UAAU,iBAAiB,CAAC,WAAwB;IACxD,MAAM,KAAK,GAAG,oBAAoB,CAAC,WAAW,CAAC,CAAC;IAChD,IACE,2BAA2B,CAAC,WAAW,CAAC;QACxC,aAAa,CAAC,QAAQ,CAAC,KAAK,CAAC,EAC7B;QACA,MAAM,IAAI,KAAK,CACb,kEAAkE,KAAK,GAAG,CAC3E,CAAC;KACH;IACD,OAAO,aAAa,CAAC,QAAQ,CAAC,KAAK,CAAC,CAAC;AACvC,CAAC;AAED;;;GAGG;AACH,MAAM,UAAU,iCAAiC,CAC/C,WAAwB,EACxB,YAAqB;IAErB,OAAO;QACL,WAAW;QACX,YAAY;QACZ,IAAI,EAAE,iBAAiB,CAAC,WAAW,CAAC;KACrC,CAAC;AACJ,CAAC"}
@@ -1,4 +0,0 @@
1
- export { LroEngine } from "./lroEngine";
2
- export { createGetLroStatusFromResponse } from "./stateMachine";
3
- export { LroResourceLocationConfig, GetLroStatusFromResponse, RawResponse, LongRunningOperation, LroConfig, LroMode, LroResponse, LroStatus, LroTerminalState, LroInProgressState, LroEngineOptions } from "./models";
4
- //# sourceMappingURL=index.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/lro/index.ts"],"names":[],"mappings":"AAWA,OAAO,EAAE,SAAS,EAAE,MAAM,aAAa,CAAC;AACxC,OAAO,EAAE,8BAA8B,EAAE,MAAM,gBAAgB,CAAC;AAChE,OAAO,EACL,yBAAyB,EACzB,wBAAwB,EACxB,WAAW,EACX,oBAAoB,EACpB,SAAS,EACT,OAAO,EACP,WAAW,EACX,SAAS,EACT,gBAAgB,EAChB,kBAAkB,EAClB,gBAAgB,EACjB,MAAM,UAAU,CAAC"}
package/esm/lro/index.js DELETED
@@ -1,12 +0,0 @@
1
- /*
2
- * Copyright (c) Microsoft Corporation.
3
- * Licensed under the MIT License.
4
- *
5
- * Code generated by Microsoft (R) AutoRest Code Generator.
6
- * Changes may cause incorrect behavior and will be lost if the code is regenerated.
7
- */
8
- // Copyright (c) Microsoft Corporation.
9
- // Licensed under the MIT license.
10
- export { LroEngine } from "./lroEngine";
11
- export { createGetLroStatusFromResponse } from "./stateMachine";
12
- //# sourceMappingURL=index.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/lro/index.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAEH,uCAAuC;AACvC,kCAAkC;AAElC,OAAO,EAAE,SAAS,EAAE,MAAM,aAAa,CAAC;AACxC,OAAO,EAAE,8BAA8B,EAAE,MAAM,gBAAgB,CAAC"}
@@ -1,3 +0,0 @@
1
- import { LroStatus, RawResponse } from "./models";
2
- export declare function processLocationPollingOperationResult<TResult>(rawResponse: RawResponse, flatResponse: TResult): LroStatus<TResult>;
3
- //# sourceMappingURL=locationPolling.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"locationPolling.d.ts","sourceRoot":"","sources":["../../src/lro/locationPolling.ts"],"names":[],"mappings":"AAWA,OAAO,EAAE,SAAS,EAAE,WAAW,EAAE,MAAM,UAAU,CAAC;AASlD,wBAAgB,qCAAqC,CAAC,OAAO,EAC3D,WAAW,EAAE,WAAW,EACxB,YAAY,EAAE,OAAO,GACpB,SAAS,CAAC,OAAO,CAAC,CAMpB"}
@@ -1,19 +0,0 @@
1
- /*
2
- * Copyright (c) Microsoft Corporation.
3
- * Licensed under the MIT License.
4
- *
5
- * Code generated by Microsoft (R) AutoRest Code Generator.
6
- * Changes may cause incorrect behavior and will be lost if the code is regenerated.
7
- */
8
- import { isUnexpectedPollingResponse } from "./requestUtils";
9
- function isLocationPollingDone(rawResponse) {
10
- return (!isUnexpectedPollingResponse(rawResponse) && rawResponse.statusCode !== 202);
11
- }
12
- export function processLocationPollingOperationResult(rawResponse, flatResponse) {
13
- return {
14
- rawResponse,
15
- flatResponse,
16
- done: isLocationPollingDone(rawResponse)
17
- };
18
- }
19
- //# sourceMappingURL=locationPolling.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"locationPolling.js","sourceRoot":"","sources":["../../src/lro/locationPolling.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAMH,OAAO,EAAE,2BAA2B,EAAE,MAAM,gBAAgB,CAAC;AAE7D,SAAS,qBAAqB,CAAC,WAAwB;IACrD,OAAO,CACL,CAAC,2BAA2B,CAAC,WAAW,CAAC,IAAI,WAAW,CAAC,UAAU,KAAK,GAAG,CAC5E,CAAC;AACJ,CAAC;AAED,MAAM,UAAU,qCAAqC,CACnD,WAAwB,EACxB,YAAqB;IAErB,OAAO;QACL,WAAW;QACX,YAAY;QACZ,IAAI,EAAE,qBAAqB,CAAC,WAAW,CAAC;KACzC,CAAC;AACJ,CAAC"}
@@ -1,14 +0,0 @@
1
- import { Poller, PollOperationState } from "@azure/core-lro";
2
- import { LongRunningOperation, LroEngineOptions } from "./models";
3
- /**
4
- * The LRO Engine, a class that performs polling.
5
- */
6
- export declare class LroEngine<TResult, TState extends PollOperationState<TResult>> extends Poller<TState, TResult> {
7
- private intervalInMs;
8
- constructor(lro: LongRunningOperation<TResult>, options?: LroEngineOptions);
9
- /**
10
- * The method used by the poller to wait before attempting to update its operation.
11
- */
12
- delay(): Promise<void>;
13
- }
14
- //# sourceMappingURL=lroEngine.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"lroEngine.d.ts","sourceRoot":"","sources":["../../src/lro/lroEngine.ts"],"names":[],"mappings":"AAWA,OAAO,EAAE,MAAM,EAAE,kBAAkB,EAAE,MAAM,iBAAiB,CAAC;AAC7D,OAAO,EACL,oBAAoB,EACpB,gBAAgB,EAEjB,MAAM,UAAU,CAAC;AAGlB;;GAEG;AACH,qBAAa,SAAS,CACpB,OAAO,EACP,MAAM,SAAS,kBAAkB,CAAC,OAAO,CAAC,CAC1C,SAAQ,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC;IAC/B,OAAO,CAAC,YAAY,CAAS;gBAEjB,GAAG,EAAE,oBAAoB,CAAC,OAAO,CAAC,EAAE,OAAO,CAAC,EAAE,gBAAgB;IAwB1E;;OAEG;IACH,KAAK,IAAI,OAAO,CAAC,IAAI,CAAC;CAKvB"}
@@ -1,41 +0,0 @@
1
- /*
2
- * Copyright (c) Microsoft Corporation.
3
- * Licensed under the MIT License.
4
- *
5
- * Code generated by Microsoft (R) AutoRest Code Generator.
6
- * Changes may cause incorrect behavior and will be lost if the code is regenerated.
7
- */
8
- // Copyright (c) Microsoft Corporation.
9
- // Licensed under the MIT license.
10
- import { Poller } from "@azure/core-lro";
11
- import { GenericPollOperation } from "./operation";
12
- /**
13
- * The LRO Engine, a class that performs polling.
14
- */
15
- export class LroEngine extends Poller {
16
- constructor(lro, options) {
17
- const { intervalInMs = 2000, resumeFrom } = options || {};
18
- function deserializeState(resumeFrom) {
19
- try {
20
- return JSON.parse(resumeFrom).state;
21
- }
22
- catch (e) {
23
- throw new Error(`LroEngine: Unable to deserialize state: ${resumeFrom}`);
24
- }
25
- }
26
- const state = resumeFrom
27
- ? deserializeState(resumeFrom)
28
- : {};
29
- const operation = new GenericPollOperation(state, lro);
30
- super(operation);
31
- this.intervalInMs = intervalInMs;
32
- operation.setPollerConfig(this);
33
- }
34
- /**
35
- * The method used by the poller to wait before attempting to update its operation.
36
- */
37
- delay() {
38
- return new Promise((resolve) => setTimeout(() => resolve(), this.intervalInMs));
39
- }
40
- }
41
- //# sourceMappingURL=lroEngine.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"lroEngine.js","sourceRoot":"","sources":["../../src/lro/lroEngine.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAEH,uCAAuC;AACvC,kCAAkC;AAElC,OAAO,EAAE,MAAM,EAAsB,MAAM,iBAAiB,CAAC;AAM7D,OAAO,EAAE,oBAAoB,EAAE,MAAM,aAAa,CAAC;AAEnD;;GAEG;AACH,MAAM,OAAO,SAGX,SAAQ,MAAuB;IAG/B,YAAY,GAAkC,EAAE,OAA0B;QACxE,MAAM,EAAE,YAAY,GAAG,IAAI,EAAE,UAAU,EAAE,GAAG,OAAO,IAAI,EAAE,CAAC;QAC1D,SAAS,gBAAgB,CACvB,UAAkB;YAElB,IAAI;gBACF,OAAO,IAAI,CAAC,KAAK,CAAC,UAAU,CAAC,CAAC,KAAK,CAAC;aACrC;YAAC,OAAO,CAAC,EAAE;gBACV,MAAM,IAAI,KAAK,CACb,2CAA2C,UAAU,EAAE,CACxD,CAAC;aACH;QACH,CAAC;QACD,MAAM,KAAK,GAAkD,UAAU;YACrE,CAAC,CAAC,gBAAgB,CAAC,UAAU,CAAC;YAC9B,CAAC,CAAE,EAAU,CAAC;QAEhB,MAAM,SAAS,GAAG,IAAI,oBAAoB,CAAC,KAAK,EAAE,GAAG,CAAC,CAAC;QACvD,KAAK,CAAC,SAAS,CAAC,CAAC;QAEjB,IAAI,CAAC,YAAY,GAAG,YAAY,CAAC;QACjC,SAAS,CAAC,eAAe,CAAC,IAAW,CAAC,CAAC;IACzC,CAAC;IAED;;OAEG;IACH,KAAK;QACH,OAAO,IAAI,OAAO,CAAC,CAAC,OAAO,EAAE,EAAE,CAC7B,UAAU,CAAC,GAAG,EAAE,CAAC,OAAO,EAAE,EAAE,IAAI,CAAC,YAAY,CAAC,CAC/C,CAAC;IACJ,CAAC;CACF"}
@@ -1,138 +0,0 @@
1
- import { PollOperationState } from "@azure/core-lro";
2
- /**
3
- * Options for the LRO poller.
4
- */
5
- export interface LroEngineOptions {
6
- /**
7
- * Defines how much time the poller is going to wait before making a new request to the service.
8
- */
9
- intervalInMs?: number;
10
- /**
11
- * A serialized poller which can be used to resume an existing paused Long-Running-Operation.
12
- */
13
- resumeFrom?: string;
14
- }
15
- export declare const successStates: string[];
16
- export declare const failureStates: string[];
17
- /**
18
- * The LRO states that signal that the LRO has completed.
19
- */
20
- export declare const terminalStates: string[];
21
- /**
22
- * The potential location of the result of the LRO if specified by the LRO extension in the swagger.
23
- */
24
- export declare type LroResourceLocationConfig = "azure-async-operation" | "location" | "original-uri";
25
- /**
26
- * The type of a LRO response body. This is just a convenience type for checking the status of the operation.
27
- */
28
- export interface LroBody extends Record<string, unknown> {
29
- /** The status of the operation. */
30
- status?: string;
31
- /** The state of the provisioning process */
32
- provisioningState?: string;
33
- /** The properties of the provisioning process */
34
- properties?: {
35
- provisioningState?: string;
36
- } & Record<string, unknown>;
37
- }
38
- /**
39
- * Simple type of the raw response.
40
- */
41
- export interface RawResponse {
42
- /** The HTTP status code */
43
- statusCode: number;
44
- /** A HttpHeaders collection in the response represented as a simple JSON object where all header names have been normalized to be lower-case. */
45
- headers: {
46
- [headerName: string]: string;
47
- };
48
- /** The parsed response body */
49
- body?: unknown;
50
- }
51
- /**
52
- * The type of the response of a LRO.
53
- */
54
- export interface LroResponse<T> {
55
- /** The flattened response */
56
- flatResponse: T;
57
- /** The raw response */
58
- rawResponse: RawResponse;
59
- }
60
- /** The type of which LRO implementation being followed by a specific API. */
61
- export declare type LroMode = "AzureAsync" | "Location" | "Body";
62
- /**
63
- * The configuration of a LRO to determine how to perform polling and checking whether the operation has completed.
64
- */
65
- export interface LroConfig {
66
- /** The LRO mode */
67
- mode?: LroMode;
68
- /** The path of a provisioned resource */
69
- resourceLocation?: string;
70
- }
71
- /**
72
- * Type of a polling operation state that can actually be resumed.
73
- */
74
- export declare type ResumablePollOperationState<T> = PollOperationState<T> & {
75
- initialRawResponse?: RawResponse;
76
- config?: LroConfig;
77
- pollingURL?: string;
78
- };
79
- export interface PollerConfig {
80
- intervalInMs: number;
81
- }
82
- /**
83
- * The type of a terminal state of an LRO.
84
- */
85
- export interface LroTerminalState<T> extends LroResponse<T> {
86
- /**
87
- * Whether the operation has finished.
88
- */
89
- done: true;
90
- }
91
- /**
92
- * The type of an in-progress state of an LRO.
93
- */
94
- export interface LroInProgressState<T> extends LroResponse<T> {
95
- /**
96
- * Whether the operation has finished.
97
- */
98
- done: false;
99
- /**
100
- * The request to be sent next if it is different from the standard polling one.
101
- * Notice that it will disregard any polling URLs provided to it.
102
- */
103
- next?: () => Promise<LroStatus<T>>;
104
- }
105
- /**
106
- * The type of an LRO state which is a tagged union of terminal and in-progress states.
107
- */
108
- export declare type LroStatus<T> = LroTerminalState<T> | LroInProgressState<T>;
109
- /**
110
- * The type of the getLROStatusFromResponse method. It takes the response as input and returns along the response whether the operation has finished.
111
- */
112
- export declare type GetLroStatusFromResponse<T> = (rawResponse: RawResponse, flatResponse: T) => LroStatus<T>;
113
- /**
114
- * Description of a long running operation.
115
- */
116
- export interface LongRunningOperation<T> {
117
- /**
118
- * The request path.
119
- */
120
- requestPath: string;
121
- /**
122
- * The HTTP request method.
123
- */
124
- requestMethod: string;
125
- /**
126
- * A function that can be used to send initial request to the service.
127
- */
128
- sendInitialRequest: (initializeState: (rawResponse: RawResponse, flatResponse: unknown) => boolean) => Promise<LroResponse<T>>;
129
- /**
130
- * A function that can be used to poll for the current status of a long running operation.
131
- */
132
- sendPollRequest: (config: LroConfig, path: string) => Promise<LroStatus<T>>;
133
- /**
134
- * A function that can be used to retrieve the provisioned azure resource.
135
- */
136
- retrieveAzureAsyncResource: (path?: string) => Promise<LroResponse<T>>;
137
- }
138
- //# sourceMappingURL=models.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"models.d.ts","sourceRoot":"","sources":["../../src/lro/models.ts"],"names":[],"mappings":"AAWA,OAAO,EAAE,kBAAkB,EAAE,MAAM,iBAAiB,CAAC;AAErD;;GAEG;AACH,MAAM,WAAW,gBAAgB;IAC/B;;OAEG;IACH,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB;;OAEG;IACH,UAAU,CAAC,EAAE,MAAM,CAAC;CACrB;AAED,eAAO,MAAM,aA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,CAAC,EAAE,MAAM,KAAK,OAAO,CAAC,WAAW,CAAC,CAAC,CAAC,CAAC,CAAC;CACxE"}
package/esm/lro/models.js DELETED
@@ -1,14 +0,0 @@
1
- /*
2
- * Copyright (c) Microsoft Corporation.
3
- * Licensed under the MIT License.
4
- *
5
- * Code generated by Microsoft (R) AutoRest Code Generator.
6
- * Changes may cause incorrect behavior and will be lost if the code is regenerated.
7
- */
8
- export const successStates = ["succeeded"];
9
- export const failureStates = ["failed", "canceled", "cancelled"];
10
- /**
11
- * The LRO states that signal that the LRO has completed.
12
- */
13
- export const terminalStates = successStates.concat(failureStates);
14
- //# sourceMappingURL=models.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"models.js","sourceRoot":"","sources":["../../src/lro/models.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAqBH,MAAM,CAAC,MAAM,aAAa,GAAG,CAAC,WAAW,CAAC,CAAC;AAC3C,MAAM,CAAC,MAAM,aAAa,GAAG,CAAC,QAAQ,EAAE,UAAU,EAAE,WAAW,CAAC,CAAC;AACjE;;GAEG;AACH,MAAM,CAAC,MAAM,cAAc,GAAG,aAAa,CAAC,MAAM,CAAC,aAAa,CAAC,CAAC"}