@azure/keyvault-certificates 4.9.1-alpha.20250113.1 → 4.9.1-alpha.20250120.1

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 (377) hide show
  1. package/dist/browser/certificatesModels.d.ts +6 -1
  2. package/dist/browser/certificatesModels.d.ts.map +1 -1
  3. package/dist/browser/certificatesModels.js.map +1 -1
  4. package/dist/browser/generated/api/index.d.ts +4 -0
  5. package/dist/browser/generated/api/index.d.ts.map +1 -0
  6. package/dist/browser/generated/api/index.js +5 -0
  7. package/dist/browser/generated/api/index.js.map +1 -0
  8. package/dist/browser/generated/api/keyVaultContext.d.ts +14 -0
  9. package/dist/browser/generated/api/keyVaultContext.d.ts.map +1 -0
  10. package/dist/browser/generated/api/keyVaultContext.js +37 -0
  11. package/dist/browser/generated/api/keyVaultContext.js.map +1 -0
  12. package/dist/browser/generated/api/operations.d.ts +113 -0
  13. package/dist/browser/generated/api/operations.d.ts.map +1 -0
  14. package/dist/browser/generated/api/operations.js +467 -0
  15. package/dist/browser/generated/api/operations.js.map +1 -0
  16. package/dist/browser/generated/api/options.d.ts +95 -0
  17. package/dist/browser/generated/api/options.d.ts.map +1 -0
  18. package/dist/browser/generated/api/options.js +4 -0
  19. package/dist/browser/generated/api/options.js.map +1 -0
  20. package/dist/browser/generated/helpers/serializerHelpers.d.ts +3 -0
  21. package/dist/browser/generated/helpers/serializerHelpers.d.ts.map +1 -0
  22. package/dist/browser/generated/helpers/serializerHelpers.js +25 -0
  23. package/dist/browser/generated/helpers/serializerHelpers.js.map +1 -0
  24. package/dist/browser/generated/index.d.ts +4 -1
  25. package/dist/browser/generated/index.d.ts.map +1 -1
  26. package/dist/browser/generated/index.js +3 -8
  27. package/dist/browser/generated/index.js.map +1 -1
  28. package/dist/browser/generated/keyVaultClient.d.ts +66 -276
  29. package/dist/browser/generated/keyVaultClient.d.ts.map +1 -1
  30. package/dist/browser/generated/keyVaultClient.js +118 -960
  31. package/dist/browser/generated/keyVaultClient.js.map +1 -1
  32. package/dist/browser/generated/logger.d.ts +2 -0
  33. package/dist/browser/generated/logger.d.ts.map +1 -0
  34. package/dist/browser/generated/logger.js +5 -0
  35. package/dist/browser/generated/logger.js.map +1 -0
  36. package/dist/browser/generated/models/index.d.ts +1 -812
  37. package/dist/browser/generated/models/index.d.ts.map +1 -1
  38. package/dist/browser/generated/models/index.js +3 -62
  39. package/dist/browser/generated/models/index.js.map +1 -1
  40. package/dist/browser/generated/models/models.d.ts +565 -0
  41. package/dist/browser/generated/models/models.d.ts.map +1 -0
  42. package/dist/browser/generated/models/models.js +690 -0
  43. package/dist/browser/generated/models/models.js.map +1 -0
  44. package/dist/browser/generated/static-helpers/pagingHelpers.d.ts +72 -0
  45. package/dist/browser/generated/static-helpers/pagingHelpers.d.ts.map +1 -0
  46. package/dist/browser/generated/static-helpers/pagingHelpers.js +139 -0
  47. package/dist/browser/generated/static-helpers/pagingHelpers.js.map +1 -0
  48. package/dist/browser/index.d.ts +3 -11
  49. package/dist/browser/index.d.ts.map +1 -1
  50. package/dist/browser/index.js +74 -308
  51. package/dist/browser/index.js.map +1 -1
  52. package/dist/browser/lro/create/operation.d.ts +2 -3
  53. package/dist/browser/lro/create/operation.d.ts.map +1 -1
  54. package/dist/browser/lro/create/operation.js +11 -14
  55. package/dist/browser/lro/create/operation.js.map +1 -1
  56. package/dist/browser/lro/create/poller.d.ts.map +1 -1
  57. package/dist/browser/lro/create/poller.js +2 -2
  58. package/dist/browser/lro/create/poller.js.map +1 -1
  59. package/dist/browser/lro/delete/operation.d.ts +2 -3
  60. package/dist/browser/lro/delete/operation.d.ts.map +1 -1
  61. package/dist/browser/lro/delete/operation.js +4 -8
  62. package/dist/browser/lro/delete/operation.js.map +1 -1
  63. package/dist/browser/lro/delete/poller.d.ts.map +1 -1
  64. package/dist/browser/lro/delete/poller.js +2 -2
  65. package/dist/browser/lro/delete/poller.js.map +1 -1
  66. package/dist/browser/lro/keyVaultCertificatePoller.d.ts +1 -1
  67. package/dist/browser/lro/keyVaultCertificatePoller.d.ts.map +1 -1
  68. package/dist/browser/lro/keyVaultCertificatePoller.js.map +1 -1
  69. package/dist/browser/lro/operation/operation.d.ts +2 -3
  70. package/dist/browser/lro/operation/operation.d.ts.map +1 -1
  71. package/dist/browser/lro/operation/operation.js +6 -13
  72. package/dist/browser/lro/operation/operation.js.map +1 -1
  73. package/dist/browser/lro/operation/poller.d.ts.map +1 -1
  74. package/dist/browser/lro/operation/poller.js +2 -2
  75. package/dist/browser/lro/operation/poller.js.map +1 -1
  76. package/dist/browser/lro/recover/operation.d.ts +2 -3
  77. package/dist/browser/lro/recover/operation.d.ts.map +1 -1
  78. package/dist/browser/lro/recover/operation.js +4 -8
  79. package/dist/browser/lro/recover/operation.js.map +1 -1
  80. package/dist/browser/lro/recover/poller.d.ts.map +1 -1
  81. package/dist/browser/lro/recover/poller.js +2 -2
  82. package/dist/browser/lro/recover/poller.js.map +1 -1
  83. package/dist/browser/transformations.d.ts +3 -1
  84. package/dist/browser/transformations.d.ts.map +1 -1
  85. package/dist/browser/transformations.js +34 -2
  86. package/dist/browser/transformations.js.map +1 -1
  87. package/dist/commonjs/certificatesModels.d.ts +6 -1
  88. package/dist/commonjs/certificatesModels.d.ts.map +1 -1
  89. package/dist/commonjs/certificatesModels.js.map +1 -1
  90. package/dist/commonjs/generated/api/index.d.ts +4 -0
  91. package/dist/commonjs/generated/api/index.d.ts.map +1 -0
  92. package/dist/commonjs/generated/api/index.js +36 -0
  93. package/dist/commonjs/generated/api/index.js.map +1 -0
  94. package/dist/commonjs/generated/api/keyVaultContext.d.ts +14 -0
  95. package/dist/commonjs/generated/api/keyVaultContext.d.ts.map +1 -0
  96. package/dist/commonjs/generated/api/keyVaultContext.js +40 -0
  97. package/dist/commonjs/generated/api/keyVaultContext.js.map +1 -0
  98. package/dist/commonjs/generated/api/operations.d.ts +113 -0
  99. package/dist/commonjs/generated/api/operations.d.ts.map +1 -0
  100. package/dist/commonjs/generated/api/operations.js +550 -0
  101. package/dist/commonjs/generated/api/operations.js.map +1 -0
  102. package/dist/commonjs/generated/api/options.d.ts +95 -0
  103. package/dist/commonjs/generated/api/options.d.ts.map +1 -0
  104. package/dist/commonjs/generated/api/options.js +5 -0
  105. package/dist/commonjs/generated/api/options.js.map +1 -0
  106. package/dist/commonjs/generated/helpers/serializerHelpers.d.ts +3 -0
  107. package/dist/commonjs/generated/helpers/serializerHelpers.d.ts.map +1 -0
  108. package/dist/commonjs/generated/helpers/serializerHelpers.js +28 -0
  109. package/dist/commonjs/generated/helpers/serializerHelpers.js.map +1 -0
  110. package/dist/commonjs/generated/index.d.ts +4 -1
  111. package/dist/commonjs/generated/index.d.ts.map +1 -1
  112. package/dist/commonjs/generated/index.js +9 -10
  113. package/dist/commonjs/generated/index.js.map +1 -1
  114. package/dist/commonjs/generated/keyVaultClient.d.ts +66 -276
  115. package/dist/commonjs/generated/keyVaultClient.d.ts.map +1 -1
  116. package/dist/commonjs/generated/keyVaultClient.js +118 -961
  117. package/dist/commonjs/generated/keyVaultClient.js.map +1 -1
  118. package/dist/commonjs/generated/logger.d.ts +2 -0
  119. package/dist/commonjs/generated/logger.d.ts.map +1 -0
  120. package/dist/commonjs/generated/logger.js +8 -0
  121. package/dist/commonjs/generated/logger.js.map +1 -0
  122. package/dist/commonjs/generated/models/index.d.ts +1 -812
  123. package/dist/commonjs/generated/models/index.d.ts.map +1 -1
  124. package/dist/commonjs/generated/models/index.js +9 -63
  125. package/dist/commonjs/generated/models/index.js.map +1 -1
  126. package/dist/commonjs/generated/models/models.d.ts +565 -0
  127. package/dist/commonjs/generated/models/models.d.ts.map +1 -0
  128. package/dist/commonjs/generated/models/models.js +754 -0
  129. package/dist/commonjs/generated/models/models.js.map +1 -0
  130. package/dist/commonjs/generated/static-helpers/pagingHelpers.d.ts +72 -0
  131. package/dist/commonjs/generated/static-helpers/pagingHelpers.d.ts.map +1 -0
  132. package/dist/commonjs/generated/static-helpers/pagingHelpers.js +142 -0
  133. package/dist/commonjs/generated/static-helpers/pagingHelpers.js.map +1 -0
  134. package/dist/commonjs/index.d.ts +3 -11
  135. package/dist/commonjs/index.d.ts.map +1 -1
  136. package/dist/commonjs/index.js +73 -307
  137. package/dist/commonjs/index.js.map +1 -1
  138. package/dist/commonjs/lro/create/operation.d.ts +2 -3
  139. package/dist/commonjs/lro/create/operation.d.ts.map +1 -1
  140. package/dist/commonjs/lro/create/operation.js +11 -14
  141. package/dist/commonjs/lro/create/operation.js.map +1 -1
  142. package/dist/commonjs/lro/create/poller.d.ts.map +1 -1
  143. package/dist/commonjs/lro/create/poller.js +2 -2
  144. package/dist/commonjs/lro/create/poller.js.map +1 -1
  145. package/dist/commonjs/lro/delete/operation.d.ts +2 -3
  146. package/dist/commonjs/lro/delete/operation.d.ts.map +1 -1
  147. package/dist/commonjs/lro/delete/operation.js +4 -8
  148. package/dist/commonjs/lro/delete/operation.js.map +1 -1
  149. package/dist/commonjs/lro/delete/poller.d.ts.map +1 -1
  150. package/dist/commonjs/lro/delete/poller.js +2 -2
  151. package/dist/commonjs/lro/delete/poller.js.map +1 -1
  152. package/dist/commonjs/lro/keyVaultCertificatePoller.d.ts +1 -1
  153. package/dist/commonjs/lro/keyVaultCertificatePoller.d.ts.map +1 -1
  154. package/dist/commonjs/lro/keyVaultCertificatePoller.js.map +1 -1
  155. package/dist/commonjs/lro/operation/operation.d.ts +2 -3
  156. package/dist/commonjs/lro/operation/operation.d.ts.map +1 -1
  157. package/dist/commonjs/lro/operation/operation.js +6 -13
  158. package/dist/commonjs/lro/operation/operation.js.map +1 -1
  159. package/dist/commonjs/lro/operation/poller.d.ts.map +1 -1
  160. package/dist/commonjs/lro/operation/poller.js +2 -2
  161. package/dist/commonjs/lro/operation/poller.js.map +1 -1
  162. package/dist/commonjs/lro/recover/operation.d.ts +2 -3
  163. package/dist/commonjs/lro/recover/operation.d.ts.map +1 -1
  164. package/dist/commonjs/lro/recover/operation.js +4 -8
  165. package/dist/commonjs/lro/recover/operation.js.map +1 -1
  166. package/dist/commonjs/lro/recover/poller.d.ts.map +1 -1
  167. package/dist/commonjs/lro/recover/poller.js +2 -2
  168. package/dist/commonjs/lro/recover/poller.js.map +1 -1
  169. package/dist/commonjs/transformations.d.ts +3 -1
  170. package/dist/commonjs/transformations.d.ts.map +1 -1
  171. package/dist/commonjs/transformations.js +35 -2
  172. package/dist/commonjs/transformations.js.map +1 -1
  173. package/dist/esm/certificatesModels.d.ts +6 -1
  174. package/dist/esm/certificatesModels.d.ts.map +1 -1
  175. package/dist/esm/certificatesModels.js.map +1 -1
  176. package/dist/esm/generated/api/index.d.ts +4 -0
  177. package/dist/esm/generated/api/index.d.ts.map +1 -0
  178. package/dist/esm/generated/api/index.js +5 -0
  179. package/dist/esm/generated/api/index.js.map +1 -0
  180. package/dist/esm/generated/api/keyVaultContext.d.ts +14 -0
  181. package/dist/esm/generated/api/keyVaultContext.d.ts.map +1 -0
  182. package/dist/esm/generated/api/keyVaultContext.js +37 -0
  183. package/dist/esm/generated/api/keyVaultContext.js.map +1 -0
  184. package/dist/esm/generated/api/operations.d.ts +113 -0
  185. package/dist/esm/generated/api/operations.d.ts.map +1 -0
  186. package/dist/esm/generated/api/operations.js +467 -0
  187. package/dist/esm/generated/api/operations.js.map +1 -0
  188. package/dist/esm/generated/api/options.d.ts +95 -0
  189. package/dist/esm/generated/api/options.d.ts.map +1 -0
  190. package/dist/esm/generated/api/options.js +4 -0
  191. package/dist/esm/generated/api/options.js.map +1 -0
  192. package/dist/esm/generated/helpers/serializerHelpers.d.ts +3 -0
  193. package/dist/esm/generated/helpers/serializerHelpers.d.ts.map +1 -0
  194. package/dist/esm/generated/helpers/serializerHelpers.js +25 -0
  195. package/dist/esm/generated/helpers/serializerHelpers.js.map +1 -0
  196. package/dist/esm/generated/index.d.ts +4 -1
  197. package/dist/esm/generated/index.d.ts.map +1 -1
  198. package/dist/esm/generated/index.js +3 -8
  199. package/dist/esm/generated/index.js.map +1 -1
  200. package/dist/esm/generated/keyVaultClient.d.ts +66 -276
  201. package/dist/esm/generated/keyVaultClient.d.ts.map +1 -1
  202. package/dist/esm/generated/keyVaultClient.js +118 -960
  203. package/dist/esm/generated/keyVaultClient.js.map +1 -1
  204. package/dist/esm/generated/logger.d.ts +2 -0
  205. package/dist/esm/generated/logger.d.ts.map +1 -0
  206. package/dist/esm/generated/logger.js +5 -0
  207. package/dist/esm/generated/logger.js.map +1 -0
  208. package/dist/esm/generated/models/index.d.ts +1 -812
  209. package/dist/esm/generated/models/index.d.ts.map +1 -1
  210. package/dist/esm/generated/models/index.js +3 -62
  211. package/dist/esm/generated/models/index.js.map +1 -1
  212. package/dist/esm/generated/models/models.d.ts +565 -0
  213. package/dist/esm/generated/models/models.d.ts.map +1 -0
  214. package/dist/esm/generated/models/models.js +690 -0
  215. package/dist/esm/generated/models/models.js.map +1 -0
  216. package/dist/esm/generated/static-helpers/pagingHelpers.d.ts +72 -0
  217. package/dist/esm/generated/static-helpers/pagingHelpers.d.ts.map +1 -0
  218. package/dist/esm/generated/static-helpers/pagingHelpers.js +139 -0
  219. package/dist/esm/generated/static-helpers/pagingHelpers.js.map +1 -0
  220. package/dist/esm/index.d.ts +3 -11
  221. package/dist/esm/index.d.ts.map +1 -1
  222. package/dist/esm/index.js +74 -308
  223. package/dist/esm/index.js.map +1 -1
  224. package/dist/esm/lro/create/operation.d.ts +2 -3
  225. package/dist/esm/lro/create/operation.d.ts.map +1 -1
  226. package/dist/esm/lro/create/operation.js +11 -14
  227. package/dist/esm/lro/create/operation.js.map +1 -1
  228. package/dist/esm/lro/create/poller.d.ts.map +1 -1
  229. package/dist/esm/lro/create/poller.js +2 -2
  230. package/dist/esm/lro/create/poller.js.map +1 -1
  231. package/dist/esm/lro/delete/operation.d.ts +2 -3
  232. package/dist/esm/lro/delete/operation.d.ts.map +1 -1
  233. package/dist/esm/lro/delete/operation.js +4 -8
  234. package/dist/esm/lro/delete/operation.js.map +1 -1
  235. package/dist/esm/lro/delete/poller.d.ts.map +1 -1
  236. package/dist/esm/lro/delete/poller.js +2 -2
  237. package/dist/esm/lro/delete/poller.js.map +1 -1
  238. package/dist/esm/lro/keyVaultCertificatePoller.d.ts +1 -1
  239. package/dist/esm/lro/keyVaultCertificatePoller.d.ts.map +1 -1
  240. package/dist/esm/lro/keyVaultCertificatePoller.js.map +1 -1
  241. package/dist/esm/lro/operation/operation.d.ts +2 -3
  242. package/dist/esm/lro/operation/operation.d.ts.map +1 -1
  243. package/dist/esm/lro/operation/operation.js +6 -13
  244. package/dist/esm/lro/operation/operation.js.map +1 -1
  245. package/dist/esm/lro/operation/poller.d.ts.map +1 -1
  246. package/dist/esm/lro/operation/poller.js +2 -2
  247. package/dist/esm/lro/operation/poller.js.map +1 -1
  248. package/dist/esm/lro/recover/operation.d.ts +2 -3
  249. package/dist/esm/lro/recover/operation.d.ts.map +1 -1
  250. package/dist/esm/lro/recover/operation.js +4 -8
  251. package/dist/esm/lro/recover/operation.js.map +1 -1
  252. package/dist/esm/lro/recover/poller.d.ts.map +1 -1
  253. package/dist/esm/lro/recover/poller.js +2 -2
  254. package/dist/esm/lro/recover/poller.js.map +1 -1
  255. package/dist/esm/transformations.d.ts +3 -1
  256. package/dist/esm/transformations.d.ts.map +1 -1
  257. package/dist/esm/transformations.js +34 -2
  258. package/dist/esm/transformations.js.map +1 -1
  259. package/dist/react-native/certificatesModels.d.ts +6 -1
  260. package/dist/react-native/certificatesModels.d.ts.map +1 -1
  261. package/dist/react-native/certificatesModels.js.map +1 -1
  262. package/dist/react-native/generated/api/index.d.ts +4 -0
  263. package/dist/react-native/generated/api/index.d.ts.map +1 -0
  264. package/dist/react-native/generated/api/index.js +5 -0
  265. package/dist/react-native/generated/api/index.js.map +1 -0
  266. package/dist/react-native/generated/api/keyVaultContext.d.ts +14 -0
  267. package/dist/react-native/generated/api/keyVaultContext.d.ts.map +1 -0
  268. package/dist/react-native/generated/api/keyVaultContext.js +37 -0
  269. package/dist/react-native/generated/api/keyVaultContext.js.map +1 -0
  270. package/dist/react-native/generated/api/operations.d.ts +113 -0
  271. package/dist/react-native/generated/api/operations.d.ts.map +1 -0
  272. package/dist/react-native/generated/api/operations.js +467 -0
  273. package/dist/react-native/generated/api/operations.js.map +1 -0
  274. package/dist/react-native/generated/api/options.d.ts +95 -0
  275. package/dist/react-native/generated/api/options.d.ts.map +1 -0
  276. package/dist/react-native/generated/api/options.js +4 -0
  277. package/dist/react-native/generated/api/options.js.map +1 -0
  278. package/dist/react-native/generated/helpers/serializerHelpers.d.ts +3 -0
  279. package/dist/react-native/generated/helpers/serializerHelpers.d.ts.map +1 -0
  280. package/dist/react-native/generated/helpers/serializerHelpers.js +25 -0
  281. package/dist/react-native/generated/helpers/serializerHelpers.js.map +1 -0
  282. package/dist/react-native/generated/index.d.ts +4 -1
  283. package/dist/react-native/generated/index.d.ts.map +1 -1
  284. package/dist/react-native/generated/index.js +3 -8
  285. package/dist/react-native/generated/index.js.map +1 -1
  286. package/dist/react-native/generated/keyVaultClient.d.ts +66 -276
  287. package/dist/react-native/generated/keyVaultClient.d.ts.map +1 -1
  288. package/dist/react-native/generated/keyVaultClient.js +118 -960
  289. package/dist/react-native/generated/keyVaultClient.js.map +1 -1
  290. package/dist/react-native/generated/logger.d.ts +2 -0
  291. package/dist/react-native/generated/logger.d.ts.map +1 -0
  292. package/dist/react-native/generated/logger.js +5 -0
  293. package/dist/react-native/generated/logger.js.map +1 -0
  294. package/dist/react-native/generated/models/index.d.ts +1 -812
  295. package/dist/react-native/generated/models/index.d.ts.map +1 -1
  296. package/dist/react-native/generated/models/index.js +3 -62
  297. package/dist/react-native/generated/models/index.js.map +1 -1
  298. package/dist/react-native/generated/models/models.d.ts +565 -0
  299. package/dist/react-native/generated/models/models.d.ts.map +1 -0
  300. package/dist/react-native/generated/models/models.js +690 -0
  301. package/dist/react-native/generated/models/models.js.map +1 -0
  302. package/dist/react-native/generated/static-helpers/pagingHelpers.d.ts +72 -0
  303. package/dist/react-native/generated/static-helpers/pagingHelpers.d.ts.map +1 -0
  304. package/dist/react-native/generated/static-helpers/pagingHelpers.js +139 -0
  305. package/dist/react-native/generated/static-helpers/pagingHelpers.js.map +1 -0
  306. package/dist/react-native/index.d.ts +3 -11
  307. package/dist/react-native/index.d.ts.map +1 -1
  308. package/dist/react-native/index.js +74 -308
  309. package/dist/react-native/index.js.map +1 -1
  310. package/dist/react-native/lro/create/operation.d.ts +2 -3
  311. package/dist/react-native/lro/create/operation.d.ts.map +1 -1
  312. package/dist/react-native/lro/create/operation.js +11 -14
  313. package/dist/react-native/lro/create/operation.js.map +1 -1
  314. package/dist/react-native/lro/create/poller.d.ts.map +1 -1
  315. package/dist/react-native/lro/create/poller.js +2 -2
  316. package/dist/react-native/lro/create/poller.js.map +1 -1
  317. package/dist/react-native/lro/delete/operation.d.ts +2 -3
  318. package/dist/react-native/lro/delete/operation.d.ts.map +1 -1
  319. package/dist/react-native/lro/delete/operation.js +4 -8
  320. package/dist/react-native/lro/delete/operation.js.map +1 -1
  321. package/dist/react-native/lro/delete/poller.d.ts.map +1 -1
  322. package/dist/react-native/lro/delete/poller.js +2 -2
  323. package/dist/react-native/lro/delete/poller.js.map +1 -1
  324. package/dist/react-native/lro/keyVaultCertificatePoller.d.ts +1 -1
  325. package/dist/react-native/lro/keyVaultCertificatePoller.d.ts.map +1 -1
  326. package/dist/react-native/lro/keyVaultCertificatePoller.js.map +1 -1
  327. package/dist/react-native/lro/operation/operation.d.ts +2 -3
  328. package/dist/react-native/lro/operation/operation.d.ts.map +1 -1
  329. package/dist/react-native/lro/operation/operation.js +6 -13
  330. package/dist/react-native/lro/operation/operation.js.map +1 -1
  331. package/dist/react-native/lro/operation/poller.d.ts.map +1 -1
  332. package/dist/react-native/lro/operation/poller.js +2 -2
  333. package/dist/react-native/lro/operation/poller.js.map +1 -1
  334. package/dist/react-native/lro/recover/operation.d.ts +2 -3
  335. package/dist/react-native/lro/recover/operation.d.ts.map +1 -1
  336. package/dist/react-native/lro/recover/operation.js +4 -8
  337. package/dist/react-native/lro/recover/operation.js.map +1 -1
  338. package/dist/react-native/lro/recover/poller.d.ts.map +1 -1
  339. package/dist/react-native/lro/recover/poller.js +2 -2
  340. package/dist/react-native/lro/recover/poller.js.map +1 -1
  341. package/dist/react-native/transformations.d.ts +3 -1
  342. package/dist/react-native/transformations.d.ts.map +1 -1
  343. package/dist/react-native/transformations.js +34 -2
  344. package/dist/react-native/transformations.js.map +1 -1
  345. package/package.json +3 -3
  346. package/dist/browser/generated/models/mappers.d.ts +0 -41
  347. package/dist/browser/generated/models/mappers.d.ts.map +0 -1
  348. package/dist/browser/generated/models/mappers.js +0 -1191
  349. package/dist/browser/generated/models/mappers.js.map +0 -1
  350. package/dist/browser/generated/models/parameters.d.ts +0 -39
  351. package/dist/browser/generated/models/parameters.d.ts.map +0 -1
  352. package/dist/browser/generated/models/parameters.js +0 -232
  353. package/dist/browser/generated/models/parameters.js.map +0 -1
  354. package/dist/commonjs/generated/models/mappers.d.ts +0 -41
  355. package/dist/commonjs/generated/models/mappers.d.ts.map +0 -1
  356. package/dist/commonjs/generated/models/mappers.js +0 -1194
  357. package/dist/commonjs/generated/models/mappers.js.map +0 -1
  358. package/dist/commonjs/generated/models/parameters.d.ts +0 -39
  359. package/dist/commonjs/generated/models/parameters.d.ts.map +0 -1
  360. package/dist/commonjs/generated/models/parameters.js +0 -235
  361. package/dist/commonjs/generated/models/parameters.js.map +0 -1
  362. package/dist/esm/generated/models/mappers.d.ts +0 -41
  363. package/dist/esm/generated/models/mappers.d.ts.map +0 -1
  364. package/dist/esm/generated/models/mappers.js +0 -1191
  365. package/dist/esm/generated/models/mappers.js.map +0 -1
  366. package/dist/esm/generated/models/parameters.d.ts +0 -39
  367. package/dist/esm/generated/models/parameters.d.ts.map +0 -1
  368. package/dist/esm/generated/models/parameters.js +0 -232
  369. package/dist/esm/generated/models/parameters.js.map +0 -1
  370. package/dist/react-native/generated/models/mappers.d.ts +0 -41
  371. package/dist/react-native/generated/models/mappers.d.ts.map +0 -1
  372. package/dist/react-native/generated/models/mappers.js +0 -1191
  373. package/dist/react-native/generated/models/mappers.js.map +0 -1
  374. package/dist/react-native/generated/models/parameters.d.ts +0 -39
  375. package/dist/react-native/generated/models/parameters.d.ts.map +0 -1
  376. package/dist/react-native/generated/models/parameters.js +0 -232
  377. package/dist/react-native/generated/models/parameters.js.map +0 -1
@@ -1 +1 @@
1
- {"version":3,"file":"operation.js","sourceRoot":"","sources":["../../../../src/lro/delete/operation.ts"],"names":[],"mappings":";AAAA,uCAAuC;AACvC,kCAAkC;;;AAUlC,kFAAmF;AAEnF,iEAA6F;AAC7F,iDAAiD;AAajD;;GAEG;AACH,MAAa,8BAA+B,SAAQ,+DAGnD;IACC,YACS,KAA0C,EACzC,QAAgB,EAChB,MAAsB,EACtB,mBAAqC,EAAE;QAE/C,KAAK,CAAC,KAAK,EAAE,EAAE,aAAa,EAAE,2DAA2D,EAAE,CAAC,CAAC;QALtF,UAAK,GAAL,KAAK,CAAqC;QACzC,aAAQ,GAAR,QAAQ,CAAQ;QAChB,WAAM,GAAN,MAAM,CAAgB;QACtB,qBAAgB,GAAhB,gBAAgB,CAAuB;IAGjD,CAAC;IAED;;;OAGG;IACK,iBAAiB,CACvB,eAAuB,EACvB,UAAoC,EAAE;QAEtC,OAAO,0BAAa,CAAC,QAAQ,CAC3B,2CAA2C,EAC3C,OAAO,EACP,KAAK,EAAE,cAAc,EAAE,EAAE;YACvB,MAAM,QAAQ,GAAG,MAAM,IAAI,CAAC,MAAM,CAAC,iBAAiB,CAClD,IAAI,CAAC,QAAQ,EACb,eAAe,EACf,cAAc,CACf,CAAC;YACF,OAAO,IAAA,sEAAiD,EAAC,QAAQ,CAAC,CAAC;QACrE,CAAC,CACF,CAAC;IACJ,CAAC;IAED;;;OAGG;IACI,KAAK,CAAC,qBAAqB,CAChC,eAAuB,EACvB,UAAwC,EAAE;QAE1C,OAAO,0BAAa,CAAC,QAAQ,CAC3B,+CAA+C,EAC/C,OAAO,EACP,KAAK,EAAE,cAAc,EAAE,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AAU,KAAK,GAAG,EAAE,CAAC;oBAC7B,6EAA6E;oBAC7E,KAAK,CAAC,WAAW,GAAG,IAAI,CAAC;gBAC3B,CAAC;qBAAM,IAAI,KAAK,CAAC,UAAU,KAAK,GAAG,EAAE,CAAC;oBACpC,KAAK,CAAC,KAAK,GAAG,KAAK,CAAC;oBACpB,KAAK,CAAC,WAAW,GAAG,IAAI,CAAC;oBACzB,MAAM,KAAK,CAAC;gBACd,CAAC;YACH,CAAC;QACH,CAAC;QAED,OAAO,IAAI,CAAC;IACd,CAAC;CACF;AA1GD,wEA0GC","sourcesContent":["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT License.\n\nimport type { AbortSignalLike } from \"@azure/abort-controller\";\nimport type { OperationOptions } from \"@azure/core-client\";\nimport type {\n DeleteCertificateOptions,\n DeletedCertificate,\n GetDeletedCertificateOptions,\n} from \"../../certificatesModels.js\";\nimport type { KeyVaultCertificatePollOperationState } from \"../keyVaultCertificatePoller.js\";\nimport { KeyVaultCertificatePollOperation } from \"../keyVaultCertificatePoller.js\";\nimport type { KeyVaultClient } from \"../../generated/keyVaultClient.js\";\nimport { getDeletedCertificateFromDeletedCertificateBundle } from \"../../transformations.js\";\nimport { tracingClient } from \"../../tracing.js\";\n\n/**\n * The public representation of the DeleteCertificatePoller operation state.\n */\nexport type DeleteCertificateState = KeyVaultCertificatePollOperationState<DeletedCertificate>;\n\n/**\n * An interface representing the state of a delete certificate's poll operation\n */\nexport interface DeleteCertificatePollOperationState\n extends KeyVaultCertificatePollOperationState<DeletedCertificate> {}\n\n/**\n * An interface representing a delete certificate's poll operation\n */\nexport class DeleteCertificatePollOperation extends KeyVaultCertificatePollOperation<\n DeleteCertificatePollOperationState,\n DeletedCertificate\n> {\n constructor(\n public state: DeleteCertificatePollOperationState,\n private vaultUrl: string,\n private client: KeyVaultClient,\n private operationOptions: OperationOptions = {},\n ) {\n super(state, { cancelMessage: \"Canceling the deletion of a certificate is not supported.\" });\n }\n\n /**\n * The DELETE operation applies to any certificate stored in Azure Key Vault. DELETE cannot be applied\n * to an individual version of a certificate. This operation requires the certificates/delete permission.\n */\n private deleteCertificate(\n certificateName: string,\n options: DeleteCertificateOptions = {},\n ): Promise<DeletedCertificate> {\n return tracingClient.withSpan(\n \"DeleteCertificatePoller.deleteCertificate\",\n options,\n async (updatedOptions) => {\n const response = await this.client.deleteCertificate(\n this.vaultUrl,\n certificateName,\n updatedOptions,\n );\n return getDeletedCertificateFromDeletedCertificateBundle(response);\n },\n );\n }\n\n /**\n * Retrieves the deleted certificate information plus its attributes, such as retention interval, scheduled permanent deletion and the\n * current deletion recovery level. This operation requires the certificates/get permission.\n */\n public async getDeletedCertificate(\n certificateName: string,\n options: GetDeletedCertificateOptions = {},\n ): Promise<DeletedCertificate> {\n return tracingClient.withSpan(\n \"DeleteCertificatePoller.getDeletedCertificate\",\n options,\n async (updatedOptions) => {\n let parsedBody: any;\n await this.client.getDeletedCertificate(this.vaultUrl, certificateName, {\n ...updatedOptions,\n onResponse: (response) => {\n parsedBody = response.parsedBody;\n },\n });\n return getDeletedCertificateFromDeletedCertificateBundle(parsedBody);\n },\n );\n }\n\n /**\n * Reaches to the service and updates the delete certificate's poll operation.\n */\n async update(\n this: DeleteCertificatePollOperation,\n options: {\n abortSignal?: AbortSignalLike;\n fireProgress?: (state: DeleteCertificatePollOperationState) => void;\n } = {},\n ): Promise<DeleteCertificatePollOperation> {\n const state = this.state;\n const { certificateName } = state;\n\n if (options.abortSignal) {\n this.operationOptions.abortSignal = options.abortSignal;\n }\n\n if (!state.isStarted) {\n const deletedCertificate = await this.deleteCertificate(\n certificateName,\n this.operationOptions,\n );\n state.isStarted = true;\n state.result = deletedCertificate;\n if (!deletedCertificate.recoveryId) {\n state.isCompleted = true;\n }\n }\n\n if (!state.isCompleted) {\n try {\n state.result = await this.getDeletedCertificate(certificateName, this.operationOptions);\n state.isCompleted = true;\n } catch (error: any) {\n if (error.statusCode === 403) {\n // At this point, the resource exists but the user doesn't have access to it.\n state.isCompleted = true;\n } else if (error.statusCode !== 404) {\n state.error = error;\n state.isCompleted = true;\n throw error;\n }\n }\n }\n\n return this;\n }\n}\n"]}
1
+ {"version":3,"file":"operation.js","sourceRoot":"","sources":["../../../../src/lro/delete/operation.ts"],"names":[],"mappings":";AAAA,uCAAuC;AACvC,kCAAkC;;;AAUlC,kFAAmF;AAEnF,iEAA6F;AAC7F,iDAAiD;AAajD;;GAEG;AACH,MAAa,8BAA+B,SAAQ,+DAGnD;IACC,YACS,KAA0C,EACzC,MAAsB,EACtB,mBAAqC,EAAE;QAE/C,KAAK,CAAC,KAAK,EAAE,EAAE,aAAa,EAAE,2DAA2D,EAAE,CAAC,CAAC;QAJtF,UAAK,GAAL,KAAK,CAAqC;QACzC,WAAM,GAAN,MAAM,CAAgB;QACtB,qBAAgB,GAAhB,gBAAgB,CAAuB;IAGjD,CAAC;IAED;;;OAGG;IACK,iBAAiB,CACvB,eAAuB,EACvB,UAAoC,EAAE;QAEtC,OAAO,0BAAa,CAAC,QAAQ,CAC3B,2CAA2C,EAC3C,OAAO,EACP,KAAK,EAAE,cAAc,EAAE,EAAE;YACvB,MAAM,QAAQ,GAAG,MAAM,IAAI,CAAC,MAAM,CAAC,iBAAiB,CAAC,eAAe,EAAE,cAAc,CAAC,CAAC;YACtF,OAAO,IAAA,sEAAiD,EAAC,QAAQ,CAAC,CAAC;QACrE,CAAC,CACF,CAAC;IACJ,CAAC;IAED;;;OAGG;IACI,KAAK,CAAC,qBAAqB,CAChC,eAAuB,EACvB,UAAwC,EAAE;QAE1C,OAAO,0BAAa,CAAC,QAAQ,CAC3B,+CAA+C,EAC/C,OAAO,EACP,KAAK,EAAE,cAAc,EAAE,EAAE;YACvB,MAAM,QAAQ,GAAG,MAAM,IAAI,CAAC,MAAM,CAAC,qBAAqB,CAAC,eAAe,EAAE,cAAc,CAAC,CAAC;YAC1F,OAAO,IAAA,sEAAiD,EAAC,QAAQ,CAAC,CAAC;QACrE,CAAC,CACF,CAAC;IACJ,C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IAAI,CAAC;IACd,CAAC;CACF;AA/FD,wEA+FC","sourcesContent":["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT License.\n\nimport type { AbortSignalLike } from \"@azure/abort-controller\";\nimport type { OperationOptions } from \"@azure-rest/core-client\";\nimport type {\n DeleteCertificateOptions,\n DeletedCertificate,\n GetDeletedCertificateOptions,\n} from \"../../certificatesModels.js\";\nimport type { KeyVaultCertificatePollOperationState } from \"../keyVaultCertificatePoller.js\";\nimport { KeyVaultCertificatePollOperation } from \"../keyVaultCertificatePoller.js\";\nimport type { KeyVaultClient } from \"../../generated/keyVaultClient.js\";\nimport { getDeletedCertificateFromDeletedCertificateBundle } from \"../../transformations.js\";\nimport { tracingClient } from \"../../tracing.js\";\n\n/**\n * The public representation of the DeleteCertificatePoller operation state.\n */\nexport type DeleteCertificateState = KeyVaultCertificatePollOperationState<DeletedCertificate>;\n\n/**\n * An interface representing the state of a delete certificate's poll operation\n */\nexport interface DeleteCertificatePollOperationState\n extends KeyVaultCertificatePollOperationState<DeletedCertificate> {}\n\n/**\n * An interface representing a delete certificate's poll operation\n */\nexport class DeleteCertificatePollOperation extends KeyVaultCertificatePollOperation<\n DeleteCertificatePollOperationState,\n DeletedCertificate\n> {\n constructor(\n public state: DeleteCertificatePollOperationState,\n private client: KeyVaultClient,\n private operationOptions: OperationOptions = {},\n ) {\n super(state, { cancelMessage: \"Canceling the deletion of a certificate is not supported.\" });\n }\n\n /**\n * The DELETE operation applies to any certificate stored in Azure Key Vault. DELETE cannot be applied\n * to an individual version of a certificate. This operation requires the certificates/delete permission.\n */\n private deleteCertificate(\n certificateName: string,\n options: DeleteCertificateOptions = {},\n ): Promise<DeletedCertificate> {\n return tracingClient.withSpan(\n \"DeleteCertificatePoller.deleteCertificate\",\n options,\n async (updatedOptions) => {\n const response = await this.client.deleteCertificate(certificateName, updatedOptions);\n return getDeletedCertificateFromDeletedCertificateBundle(response);\n },\n );\n }\n\n /**\n * Retrieves the deleted certificate information plus its attributes, such as retention interval, scheduled permanent deletion and the\n * current deletion recovery level. This operation requires the certificates/get permission.\n */\n public async getDeletedCertificate(\n certificateName: string,\n options: GetDeletedCertificateOptions = {},\n ): Promise<DeletedCertificate> {\n return tracingClient.withSpan(\n \"DeleteCertificatePoller.getDeletedCertificate\",\n options,\n async (updatedOptions) => {\n const response = await this.client.getDeletedCertificate(certificateName, updatedOptions);\n return getDeletedCertificateFromDeletedCertificateBundle(response);\n },\n );\n }\n\n /**\n * Reaches to the service and updates the delete certificate's poll operation.\n */\n async update(\n this: DeleteCertificatePollOperation,\n options: {\n abortSignal?: AbortSignalLike;\n fireProgress?: (state: DeleteCertificatePollOperationState) => void;\n } = {},\n ): Promise<DeleteCertificatePollOperation> {\n const state = this.state;\n const { certificateName } = state;\n\n if (options.abortSignal) {\n this.operationOptions.abortSignal = options.abortSignal;\n }\n\n if (!state.isStarted) {\n const deletedCertificate = await this.deleteCertificate(\n certificateName,\n this.operationOptions,\n );\n state.isStarted = true;\n state.result = deletedCertificate;\n if (!deletedCertificate.recoveryId) {\n state.isCompleted = true;\n }\n }\n\n if (!state.isCompleted) {\n try {\n state.result = await this.getDeletedCertificate(certificateName, this.operationOptions);\n state.isCompleted = true;\n } catch (error: any) {\n if (error.statusCode === 403) {\n // At this point, the resource exists but the user doesn't have access to it.\n state.isCompleted = true;\n } else if (error.statusCode !== 404) {\n state.error = error;\n state.isCompleted = true;\n throw error;\n }\n }\n }\n\n return this;\n }\n}\n"]}
@@ -1 +1 @@
1
- {"version":3,"file":"poller.d.ts","sourceRoot":"","sources":["../../../../src/lro/delete/poller.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAE,mCAAmC,EAAE,MAAM,gBAAgB,CAAC;AAE1E,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,6BAA6B,CAAC;AACtE,OAAO,KAAK,EAAE,gCAAgC,EAAE,MAAM,iCAAiC,CAAC;AACxF,OAAO,EAAE,yBAAyB,EAAE,MAAM,iCAAiC,CAAC;AAE5E,MAAM,WAAW,8BAA+B,SAAQ,gCAAgC;CAAG;AAE3F;;;GAGG;AACH,qBAAa,uBAAwB,SAAQ,yBAAyB,CACpE,mCAAmC,EACnC,kBAAkB,CACnB;gBACa,OAAO,EAAE,8BAA8B;CA8BpD"}
1
+ {"version":3,"file":"poller.d.ts","sourceRoot":"","sources":["../../../../src/lro/delete/poller.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAE,mCAAmC,EAAE,MAAM,gBAAgB,CAAC;AAE1E,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,6BAA6B,CAAC;AACtE,OAAO,KAAK,EAAE,gCAAgC,EAAE,MAAM,iCAAiC,CAAC;AACxF,OAAO,EAAE,yBAAyB,EAAE,MAAM,iCAAiC,CAAC;AAE5E,MAAM,WAAW,8BAA+B,SAAQ,gCAAgC;CAAG;AAE3F;;;GAGG;AACH,qBAAa,uBAAwB,SAAQ,yBAAyB,CACpE,mCAAmC,EACnC,kBAAkB,CACnB;gBACa,OAAO,EAAE,8BAA8B;CAsBpD"}
@@ -11,12 +11,12 @@ const keyVaultCertificatePoller_js_1 = require("../keyVaultCertificatePoller.js"
11
11
  */
12
12
  class DeleteCertificatePoller extends keyVaultCertificatePoller_js_1.KeyVaultCertificatePoller {
13
13
  constructor(options) {
14
- const { vaultUrl, client, certificateName, operationOptions, intervalInMs = 2000, resumeFrom, } = options;
14
+ const { client, certificateName, operationOptions, intervalInMs = 2000, resumeFrom } = options;
15
15
  let state;
16
16
  if (resumeFrom) {
17
17
  state = JSON.parse(resumeFrom).state;
18
18
  }
19
- const operation = new operation_js_1.DeleteCertificatePollOperation(Object.assign(Object.assign({}, state), { certificateName }), vaultUrl, client, operationOptions);
19
+ const operation = new operation_js_1.DeleteCertificatePollOperation(Object.assign(Object.assign({}, state), { certificateName }), client, operationOptions);
20
20
  super(operation);
21
21
  this.intervalInMs = intervalInMs;
22
22
  }
@@ -1 +1 @@
1
- {"version":3,"file":"poller.js","sourceRoot":"","sources":["../../../../src/lro/delete/poller.ts"],"names":[],"mappings":";AAAA,uCAAuC;AACvC,kCAAkC;;;AAGlC,iDAAgE;AAGhE,kFAA4E;AAI5E;;;GAGG;AACH,MAAa,uBAAwB,SAAQ,wDAG5C;IACC,YAAY,OAAuC;QACjD,MAAM,EACJ,QAAQ,EACR,MAAM,EACN,eAAe,EACf,gBAAgB,EAChB,YAAY,GAAG,IAAI,EACnB,UAAU,GACX,GAAG,OAAO,CAAC;QAEZ,IAAI,KAAsD,CAAC;QAE3D,IAAI,UAAU,EAAE,CAAC;YACf,KAAK,GAAG,IAAI,CAAC,KAAK,CAAC,UAAU,CAAC,CAAC,KAAK,CAAC;QACvC,CAAC;QAED,MAAM,SAAS,GAAG,IAAI,6CAA8B,iCAE7C,KAAK,KACR,eAAe,KAEjB,QAAQ,EACR,MAAM,EACN,gBAAgB,CACjB,CAAC;QAEF,KAAK,CAAC,SAAS,CAAC,CAAC;QAEjB,IAAI,CAAC,YAAY,GAAG,YAAY,CAAC;IACnC,CAAC;CACF;AAlCD,0DAkCC","sourcesContent":["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT License.\n\nimport type { DeleteCertificatePollOperationState } from \"./operation.js\";\nimport { DeleteCertificatePollOperation } from \"./operation.js\";\nimport type { DeletedCertificate } from \"../../certificatesModels.js\";\nimport type { KeyVaultCertificatePollerOptions } from \"../keyVaultCertificatePoller.js\";\nimport { KeyVaultCertificatePoller } from \"../keyVaultCertificatePoller.js\";\n\nexport interface DeleteCertificatePollerOptions extends KeyVaultCertificatePollerOptions {}\n\n/**\n * Class that deletes a poller that waits until a certificate finishes being deleted\n * @internal\n */\nexport class DeleteCertificatePoller extends KeyVaultCertificatePoller<\n DeleteCertificatePollOperationState,\n DeletedCertificate\n> {\n constructor(options: DeleteCertificatePollerOptions) {\n const {\n vaultUrl,\n client,\n certificateName,\n operationOptions,\n intervalInMs = 2000,\n resumeFrom,\n } = options;\n\n let state: DeleteCertificatePollOperationState | undefined;\n\n if (resumeFrom) {\n state = JSON.parse(resumeFrom).state;\n }\n\n const operation = new DeleteCertificatePollOperation(\n {\n ...state,\n certificateName,\n },\n vaultUrl,\n client,\n operationOptions,\n );\n\n super(operation);\n\n this.intervalInMs = intervalInMs;\n }\n}\n"]}
1
+ {"version":3,"file":"poller.js","sourceRoot":"","sources":["../../../../src/lro/delete/poller.ts"],"names":[],"mappings":";AAAA,uCAAuC;AACvC,kCAAkC;;;AAGlC,iDAAgE;AAGhE,kFAA4E;AAI5E;;;GAGG;AACH,MAAa,uBAAwB,SAAQ,wDAG5C;IACC,YAAY,OAAuC;QACjD,MAAM,EAAE,MAAM,EAAE,eAAe,EAAE,gBAAgB,EAAE,YAAY,GAAG,IAAI,EAAE,UAAU,EAAE,GAAG,OAAO,CAAC;QAE/F,IAAI,KAAsD,CAAC;QAE3D,IAAI,UAAU,EAAE,CAAC;YACf,KAAK,GAAG,IAAI,CAAC,KAAK,CAAC,UAAU,CAAC,CAAC,KAAK,CAAC;QACvC,CAAC;QAED,MAAM,SAAS,GAAG,IAAI,6CAA8B,iCAE7C,KAAK,KACR,eAAe,KAEjB,MAAM,EACN,gBAAgB,CACjB,CAAC;QAEF,KAAK,CAAC,SAAS,CAAC,CAAC;QAEjB,IAAI,CAAC,YAAY,GAAG,YAAY,CAAC;IACnC,CAAC;CACF;AA1BD,0DA0BC","sourcesContent":["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT License.\n\nimport type { DeleteCertificatePollOperationState } from \"./operation.js\";\nimport { DeleteCertificatePollOperation } from \"./operation.js\";\nimport type { DeletedCertificate } from \"../../certificatesModels.js\";\nimport type { KeyVaultCertificatePollerOptions } from \"../keyVaultCertificatePoller.js\";\nimport { KeyVaultCertificatePoller } from \"../keyVaultCertificatePoller.js\";\n\nexport interface DeleteCertificatePollerOptions extends KeyVaultCertificatePollerOptions {}\n\n/**\n * Class that deletes a poller that waits until a certificate finishes being deleted\n * @internal\n */\nexport class DeleteCertificatePoller extends KeyVaultCertificatePoller<\n DeleteCertificatePollOperationState,\n DeletedCertificate\n> {\n constructor(options: DeleteCertificatePollerOptions) {\n const { client, certificateName, operationOptions, intervalInMs = 2000, resumeFrom } = options;\n\n let state: DeleteCertificatePollOperationState | undefined;\n\n if (resumeFrom) {\n state = JSON.parse(resumeFrom).state;\n }\n\n const operation = new DeleteCertificatePollOperation(\n {\n ...state,\n certificateName,\n },\n client,\n operationOptions,\n );\n\n super(operation);\n\n this.intervalInMs = intervalInMs;\n }\n}\n"]}
@@ -1,4 +1,4 @@
1
- import type { OperationOptions } from "@azure/core-client";
1
+ import type { OperationOptions } from "@azure-rest/core-client";
2
2
  import type { PollOperation, PollOperationState } from "@azure/core-lro";
3
3
  import { Poller } from "@azure/core-lro";
4
4
  import type { KeyVaultClient } from "../generated/keyVaultClient.js";
@@ -1 +1 @@
1
- {"version":3,"file":"keyVaultCertificatePoller.d.ts","sourceRoot":"","sources":["../../../src/lro/keyVaultCertificatePoller.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,oBAAoB,CAAC;AAE3D,OAAO,KAAK,EAAE,aAAa,EAAE,kBAAkB,EAAE,MAAM,iBAAiB,CAAC;AACzE,OAAO,EAAE,MAAM,EAAE,MAAM,iBAAiB,CAAC;AACzC,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,gCAAgC,CAAC;AAErE;;GAEG;AACH,MAAM,WAAW,gCAAgC;IAC/C,eAAe,EAAE,MAAM,CAAC;IACxB,QAAQ,EAAE,MAAM,CAAC;IACjB,MAAM,EAAE,cAAc,CAAC;IACvB,gBAAgB,CAAC,EAAE,gBAAgB,CAAC;IACpC,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB,UAAU,CAAC,EAAE,MAAM,CAAC;CACrB;AAED;;GAEG;AACH,MAAM,WAAW,qCAAqC,CAAC,OAAO,CAC5D,SAAQ,kBAAkB,CAAC,OAAO,CAAC;IACnC;;OAEG;IACH,eAAe,EAAE,MAAM,CAAC;CACzB;A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C;YAC1B,IAAI,CAAC,aAAa,GAAG,OAAO,CAAC,aAAa,CAAC;QAC7C,CAAC;IACH,CAAC;IAED;;OAEG;IACI,KAAK,CAAC,MAAM;QACjB,MAAM,IAAI,KAAK,CAAC,0BAA0B,CAAC,CAAC;IAC9C,CAAC;IAED;;OAEG;IACI,KAAK,CAAC,MAAM;QACjB,MAAM,IAAI,KAAK,CAAC,IAAI,CAAC,aAAa,CAAC,CAAC;IACtC,CAAC;IAED;;OAEG;IACI,QAAQ;QACb,OAAO,IAAI,CAAC,SAAS,CAAC;YACpB,KAAK,EAAE,UAAU,CAAC,IAAI,CAAC,KAAK,CAAC;SAC9B,CAAC,CAAC;IACL,CAAC;CACF;AAtCD,4EAsCC","sourcesContent":["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT License.\n\nimport type { OperationOptions } from \"@azure/core-client\";\nimport { delay } from \"@azure/core-util\";\nimport type { PollOperation, PollOperationState } from \"@azure/core-lro\";\nimport { Poller } from \"@azure/core-lro\";\nimport type { KeyVaultClient } from \"../generated/keyVaultClient.js\";\n\n/**\n * Common parameters to a Key Vault Certificate Poller.\n */\nexport interface KeyVaultCertificatePollerOptions {\n certificateName: string;\n vaultUrl: string;\n client: KeyVaultClient;\n operationOptions?: OperationOptions;\n intervalInMs?: number;\n resumeFrom?: string;\n}\n\n/**\n * An interface representing the public shape of the state of a Key Vault Certificate Poller's operations.\n */\nexport interface KeyVaultCertificatePollOperationState<TResult>\n extends PollOperationState<TResult> {\n /**\n * The name of the certificate.\n */\n certificateName: string;\n}\n\n/**\n * Generates a version of the state with only public properties. At least those common for all of the Key Vault Certificates pollers.\n */\nexport function cleanState<TState extends KeyVaultCertificatePollOperationState<TResult>, TResult>(\n state: TState,\n): KeyVaultCertificatePollOperationState<TResult> {\n return {\n certificateName: state.certificateName,\n isStarted: state.isStarted,\n isCancelled: state.isCancelled,\n isCompleted: state.isCompleted,\n error: state.error,\n result: state.result,\n };\n}\n\n/**\n * Common properties and methods of the Key Vault Certificate Pollers.\n */\nexport abstract class KeyVaultCertificatePoller<\n TState extends KeyVaultCertificatePollOperationState<TResult>,\n TResult,\n> extends Poller<TState, TResult> {\n /**\n * Defines how much time the poller is going to wait before making a new request to the service.\n */\n public intervalInMs: number = 2000;\n\n /**\n * The method used by the poller to wait before attempting to update its operation.\n */\n async delay(): Promise<void> {\n return delay(this.intervalInMs);\n }\n\n /**\n * Gets the public state of the polling operation\n */\n public getOperationState(): TState {\n return cleanState(this.operation.state) as TState;\n }\n}\n\n/**\n * Optional parameters to the KeyVaultCertificatePollOperation\n */\nexport interface KeyVaultCertificatePollOperationOptions {\n cancelMessage?: string;\n}\n\n/**\n * Common properties and methods of the Key Vault Certificate Poller operations.\n */\nexport class KeyVaultCertificatePollOperation<\n TState extends KeyVaultCertificatePollOperationState<TResult>,\n TResult,\n> implements PollOperation<TState, TResult>\n{\n private cancelMessage: string = \"\";\n\n constructor(\n public state: TState,\n options: KeyVaultCertificatePollOperationOptions = {},\n ) {\n if (options.cancelMessage) {\n this.cancelMessage = options.cancelMessage;\n }\n }\n\n /**\n * Meant to reach to the service and update the Poller operation.\n */\n public async update(): Promise<PollOperation<TState, TResult>> {\n throw new Error(\"Operation not supported.\");\n }\n\n /**\n * Meant to reach to the service and cancel the Poller operation.\n */\n public async cancel(): Promise<PollOperation<TState, TResult>> {\n throw new Error(this.cancelMessage);\n }\n\n /**\n * Serializes the create certificate's poll operation\n */\n public toString(): string {\n return JSON.stringify({\n state: cleanState(this.state),\n });\n }\n}\n"]}
1
+ {"version":3,"file":"keyVaultCertificatePoller.js","sourceRoot":"","sources":["../../../src/lro/keyVaultCertificatePoller.ts"],"names":[],"mappings":";AAAA,uCAAuC;AACvC,kCAAkC;;;AAkClC,gCAWC;AA1CD,gDAAyC;AAEzC,8CAAyC;AA0BzC;;GAEG;AACH,SAAgB,UAAU,CACxB,KAAa;IAEb,OAAO;QACL,eAAe,EAAE,KAAK,CAAC,eAAe;QACtC,SAAS,EAAE,KAAK,CAAC,SAAS;QAC1B,WAAW,EAAE,KAAK,CAAC,WAAW;QAC9B,WAAW,EAAE,KAAK,CAAC,WAAW;QAC9B,KAAK,EAAE,KAAK,CAAC,KAAK;QAClB,MAAM,EAAE,KAAK,CAAC,MAAM;KACrB,CAAC;AACJ,CAAC;AAED;;GAEG;AACH,MAAsB,yBAGpB,SAAQ,iBAAuB;IAHjC;;QAIE;;WAEG;QACI,iBAAY,GAAW,IAAI,CAAC;IAerC,CAAC;IAbC;;OAEG;IACH,KAAK,CAAC,KAAK;QACT,OAAO,IAAA,iBAAK,EAAC,IAAI,CAAC,YAAY,CAAC,CAAC;IAClC,CAAC;IAED;;OAEG;IACI,iBAAiB;QACtB,OAAO,UAAU,CAAC,IAAI,CAAC,SAAS,CAAC,KAAK,CAAW,CAAC;IACpD,CAAC;CACF;AAtBD,8DAsBC;AASD;;GAEG;AACH,MAAa,gCAAgC;IAO3C,YACS,KAAa,EACpB,UAAmD,EAAE;QAD9C,UAAK,GAAL,KAAK,CAAQ;QAHd,kBAAa,GAAW,EAAE,CAAC;QAMjC,IAAI,OAAO,CAAC,aAAa,EAAE,CAAC;YAC1B,IAAI,CAAC,aAAa,GAAG,OAAO,CAAC,aAAa,CAAC;QAC7C,CAAC;IACH,CAAC;IAED;;OAEG;IACI,KAAK,CAAC,MAAM;QACjB,MAAM,IAAI,KAAK,CAAC,0BAA0B,CAAC,CAAC;IAC9C,CAAC;IAED;;OAEG;IACI,KAAK,CAAC,MAAM;QACjB,MAAM,IAAI,KAAK,CAAC,IAAI,CAAC,aAAa,CAAC,CAAC;IACtC,CAAC;IAED;;OAEG;IACI,QAAQ;QACb,OAAO,IAAI,CAAC,SAAS,CAAC;YACpB,KAAK,EAAE,UAAU,CAAC,IAAI,CAAC,KAAK,CAAC;SAC9B,CAAC,CAAC;IACL,CAAC;CACF;AAtCD,4EAsCC","sourcesContent":["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT License.\n\nimport type { OperationOptions } from \"@azure-rest/core-client\";\nimport { delay } from \"@azure/core-util\";\nimport type { PollOperation, PollOperationState } from \"@azure/core-lro\";\nimport { Poller } from \"@azure/core-lro\";\nimport type { KeyVaultClient } from \"../generated/keyVaultClient.js\";\n\n/**\n * Common parameters to a Key Vault Certificate Poller.\n */\nexport interface KeyVaultCertificatePollerOptions {\n certificateName: string;\n vaultUrl: string;\n client: KeyVaultClient;\n operationOptions?: OperationOptions;\n intervalInMs?: number;\n resumeFrom?: string;\n}\n\n/**\n * An interface representing the public shape of the state of a Key Vault Certificate Poller's operations.\n */\nexport interface KeyVaultCertificatePollOperationState<TResult>\n extends PollOperationState<TResult> {\n /**\n * The name of the certificate.\n */\n certificateName: string;\n}\n\n/**\n * Generates a version of the state with only public properties. At least those common for all of the Key Vault Certificates pollers.\n */\nexport function cleanState<TState extends KeyVaultCertificatePollOperationState<TResult>, TResult>(\n state: TState,\n): KeyVaultCertificatePollOperationState<TResult> {\n return {\n certificateName: state.certificateName,\n isStarted: state.isStarted,\n isCancelled: state.isCancelled,\n isCompleted: state.isCompleted,\n error: state.error,\n result: state.result,\n };\n}\n\n/**\n * Common properties and methods of the Key Vault Certificate Pollers.\n */\nexport abstract class KeyVaultCertificatePoller<\n TState extends KeyVaultCertificatePollOperationState<TResult>,\n TResult,\n> extends Poller<TState, TResult> {\n /**\n * Defines how much time the poller is going to wait before making a new request to the service.\n */\n public intervalInMs: number = 2000;\n\n /**\n * The method used by the poller to wait before attempting to update its operation.\n */\n async delay(): Promise<void> {\n return delay(this.intervalInMs);\n }\n\n /**\n * Gets the public state of the polling operation\n */\n public getOperationState(): TState {\n return cleanState(this.operation.state) as TState;\n }\n}\n\n/**\n * Optional parameters to the KeyVaultCertificatePollOperation\n */\nexport interface KeyVaultCertificatePollOperationOptions {\n cancelMessage?: string;\n}\n\n/**\n * Common properties and methods of the Key Vault Certificate Poller operations.\n */\nexport class KeyVaultCertificatePollOperation<\n TState extends KeyVaultCertificatePollOperationState<TResult>,\n TResult,\n> implements PollOperation<TState, TResult>\n{\n private cancelMessage: string = \"\";\n\n constructor(\n public state: TState,\n options: KeyVaultCertificatePollOperationOptions = {},\n ) {\n if (options.cancelMessage) {\n this.cancelMessage = options.cancelMessage;\n }\n }\n\n /**\n * Meant to reach to the service and update the Poller operation.\n */\n public async update(): Promise<PollOperation<TState, TResult>> {\n throw new Error(\"Operation not supported.\");\n }\n\n /**\n * Meant to reach to the service and cancel the Poller operation.\n */\n public async cancel(): Promise<PollOperation<TState, TResult>> {\n throw new Error(this.cancelMessage);\n }\n\n /**\n * Serializes the create certificate's poll operation\n */\n public toString(): string {\n return JSON.stringify({\n state: cleanState(this.state),\n });\n }\n}\n"]}
@@ -1,5 +1,5 @@
1
1
  import type { AbortSignalLike } from "@azure/abort-controller";
2
- import type { OperationOptions } from "@azure/core-client";
2
+ import type { OperationOptions } from "@azure-rest/core-client";
3
3
  import type { CertificateOperation, KeyVaultCertificateWithPolicy } from "../../certificatesModels.js";
4
4
  import type { KeyVaultCertificatePollOperationState } from "../keyVaultCertificatePoller.js";
5
5
  import { KeyVaultCertificatePollOperation } from "../keyVaultCertificatePoller.js";
@@ -19,10 +19,9 @@ export interface CertificateOperationState extends KeyVaultCertificatePollOperat
19
19
  */
20
20
  export declare class CertificateOperationPollOperation extends KeyVaultCertificatePollOperation<CertificateOperationState, KeyVaultCertificateWithPolicy> {
21
21
  state: CertificateOperationState;
22
- private vaultUrl;
23
22
  private client;
24
23
  private operationOptions;
25
- constructor(state: CertificateOperationState, vaultUrl: string, client: KeyVaultClient, operationOptions?: OperationOptions);
24
+ constructor(state: CertificateOperationState, client: KeyVaultClient, operationOptions?: OperationOptions);
26
25
  /**
27
26
  * Cancels a certificate creation operation that is already in progress. This operation requires the certificates/update permission.
28
27
  */
@@ -1 +1 @@
1
- {"version":3,"file":"operation.d.ts","sourceRoot":"","sources":["../../../../src/lro/operation/operation.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,yBAAyB,CAAC;AAC/D,OA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C,OAAO,CAAC,iCAAiC,CAAC;IAiB7C;;OAEG;IACI,QAAQ,IAAI,MAAM;CAS1B"}
@@ -11,10 +11,9 @@ const tracing_js_1 = require("../../tracing.js");
11
11
  * which is represented locally as the "operation" of an active LRO Poller.
12
12
  */
13
13
  class CertificateOperationPollOperation extends keyVaultCertificatePoller_js_1.KeyVaultCertificatePollOperation {
14
- constructor(state, vaultUrl, client, operationOptions = {}) {
14
+ constructor(state, client, operationOptions = {}) {
15
15
  super(state);
16
16
  this.state = state;
17
- this.vaultUrl = vaultUrl;
18
17
  this.client = client;
19
18
  this.operationOptions = operationOptions;
20
19
  }
@@ -23,11 +22,8 @@ class CertificateOperationPollOperation extends keyVaultCertificatePoller_js_1.K
23
22
  */
24
23
  cancelCertificateOperation(certificateName, options = {}) {
25
24
  return tracing_js_1.tracingClient.withSpan("CertificateOperationPoller.cancelCertificateOperation", options, async (updatedOptions) => {
26
- let parsedBody;
27
- await this.client.updateCertificateOperation(this.vaultUrl, certificateName, true, Object.assign(Object.assign({}, updatedOptions), { onResponse: (response) => {
28
- parsedBody = response.parsedBody;
29
- } }));
30
- return (0, transformations_js_1.getCertificateOperationFromCoreOperation)(certificateName, this.vaultUrl, parsedBody);
25
+ const response = await this.client.updateCertificateOperation(certificateName, { cancellationRequested: true }, updatedOptions);
26
+ return (0, transformations_js_1.getCertificateOperationFromCoreOperation)(certificateName, response);
31
27
  });
32
28
  }
33
29
  /**
@@ -35,7 +31,7 @@ class CertificateOperationPollOperation extends keyVaultCertificatePoller_js_1.K
35
31
  */
36
32
  getCertificate(certificateName, options = {}) {
37
33
  return tracing_js_1.tracingClient.withSpan("CertificateOperationPoller.getCertificate", options, async (updatedOptions) => {
38
- const result = await this.client.getCertificate(this.vaultUrl, certificateName, "", updatedOptions);
34
+ const result = await this.client.getCertificate(certificateName, "", updatedOptions);
39
35
  return (0, transformations_js_1.getCertificateWithPolicyFromCertificateBundle)(result);
40
36
  });
41
37
  }
@@ -44,11 +40,8 @@ class CertificateOperationPollOperation extends keyVaultCertificatePoller_js_1.K
44
40
  */
45
41
  getPlainCertificateOperation(certificateName, options = {}) {
46
42
  return tracing_js_1.tracingClient.withSpan("CertificateOperationPoller.getPlainCertificateOperation", options, async (updatedOptions) => {
47
- let parsedBody;
48
- await this.client.getCertificateOperation(this.vaultUrl, certificateName, Object.assign(Object.assign({}, updatedOptions), { onResponse: (response) => {
49
- parsedBody = response.parsedBody;
50
- } }));
51
- return (0, transformations_js_1.getCertificateOperationFromCoreOperation)(certificateName, this.vaultUrl, parsedBody);
43
+ const response = await this.client.getCertificateOperation(certificateName, updatedOptions);
44
+ return (0, transformations_js_1.getCertificateOperationFromCoreOperation)(certificateName, response);
52
45
  });
53
46
  }
54
47
  /**
@@ -1 +1 @@
1
- {"version":3,"file":"operation.js","sourceRoot":"","sources":["../../../../src/lro/operation/operation.ts"],"names":[],"mappings":";AAAA,uCAAuC;AACvC,kCAAkC;;;AAYlC,kFAA+F;AAE/F,iEAGkC;AAClC,iDAAiD;AAajD;;;GAGG;AACH,MAAa,iCAAkC,SAAQ,+DAGtD;IACC,YACS,KAAgC,EAC/B,QAAgB,EAChB,MAAsB,EACtB,mBAAqC,EAAE;QAE/C,KAAK,CAAC,KAAK,CAAC,CAAC;QALN,UAAK,GAAL,KAAK,CAA2B;QAC/B,aAAQ,GAAR,QAAQ,CAAQ;QAChB,WAAM,GAAN,MAAM,CAAgB;QACtB,qBAAgB,GAAhB,gBAAgB,CAAuB;IAGjD,CAAC;IAED;;OAEG;IACK,0BAA0B,CAChC,eAAuB,EACvB,UAA6C,EAAE;QAE/C,OAAO,0BAAa,CAAC,QAAQ,CAC3B,uDAAuD,EACvD,OAAO,EACP,KAAK,EAAE,cAAc,EAAE,EAAE;YACvB,IAAI,UAAe,CAAC;YACpB,MAAM,IAAI,CAAC,MAAM,CAAC,0BAA0B,CAAC,IAAI,CAAC,QAAQ,EAAE,eAAe,EAAE,IAAI,kCAC5E,cAAc,KACjB,UAAU,EAAE,CAAC,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IAAI,OAAO,CAAC,WAAW,EAAE,CAAC;YACxB,IAAI,CAAC,gBAAgB,CAAC,WAAW,GAAG,OAAO,CAAC,WAAW,CAAC;QAC1D,CAAC;QAED,KAAK,CAAC,oBAAoB,GAAG,MAAM,IAAI,CAAC,0BAA0B,CAChE,eAAe,EACf,IAAI,CAAC,gBAAgB,CACtB,CAAC;QAEF,IAAI,CAAC,KAAK,CAAC,WAAW,GAAG,IAAI,CAAC;QAC9B,OAAO,IAAI,CAAC;IACd,CAAC;IAED;;OAEG;IACI,QAAQ;QACb,MAAM,KAAK,mBACT,oBAAoB,EAAE,IAAI,CAAC,KAAK,CAAC,oBAAoB,IAClD,IAAA,yCAAU,EAAC,IAAI,CAAC,KAAK,CAAC,CAC1B,CAAC;QACF,OAAO,IAAI,CAAC,SAAS,CAAC;YACpB,KAAK;SACN,CAAC,CAAC;IACL,CAAC;CACF;AA7JD,8EA6JC","sourcesContent":["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT License.\n\nimport type { AbortSignalLike } from \"@azure/abort-controller\";\nimport type { OperationOptions } from \"@azure/core-client\";\nimport type {\n CancelCertificateOperationOptions,\n CertificateOperation,\n GetCertificateOptions,\n GetPlainCertificateOperationOptions,\n KeyVaultCertificateWithPolicy,\n} from \"../../certificatesModels.js\";\nimport type { KeyVaultCertificatePollOperationState } from \"../keyVaultCertificatePoller.js\";\nimport { cleanState, KeyVaultCertificatePollOperation } from \"../keyVaultCertificatePoller.js\";\nimport type { KeyVaultClient } from \"../../generated/keyVaultClient.js\";\nimport {\n getCertificateOperationFromCoreOperation,\n getCertificateWithPolicyFromCertificateBundle,\n} from \"../../transformations.js\";\nimport { tracingClient } from \"../../tracing.js\";\n\n/**\n * An interface representing the publicly available properties of the state of the CertificateOperationPoller.\n */\nexport interface CertificateOperationState\n extends KeyVaultCertificatePollOperationState<KeyVaultCertificateWithPolicy> {\n /**\n * The operation of the certificate\n */\n certificateOperation?: CertificateOperation;\n}\n\n/**\n * An interface representing the active operation of a certificate's creation,\n * which is represented locally as the \"operation\" of an active LRO Poller.\n */\nexport class CertificateOperationPollOperation extends KeyVaultCertificatePollOperation<\n CertificateOperationState,\n KeyVaultCertificateWithPolicy\n> {\n constructor(\n public state: CertificateOperationState,\n private vaultUrl: string,\n private client: KeyVaultClient,\n private operationOptions: OperationOptions = {},\n ) {\n super(state);\n }\n\n /**\n * Cancels a certificate creation operation that is already in progress. This operation requires the certificates/update permission.\n */\n private cancelCertificateOperation(\n certificateName: string,\n options: CancelCertificateOperationOptions = {},\n ): Promise<CertificateOperation> {\n return tracingClient.withSpan(\n \"CertificateOperationPoller.cancelCertificateOperation\",\n options,\n async (updatedOptions) => {\n let parsedBody: any;\n await this.client.updateCertificateOperation(this.vaultUrl, certificateName, true, {\n ...updatedOptions,\n onResponse: (response) => {\n parsedBody = response.parsedBody;\n },\n });\n return getCertificateOperationFromCoreOperation(certificateName, this.vaultUrl, parsedBody);\n },\n );\n }\n\n /**\n * Gets the latest information available from a specific certificate, including the certificate's policy. This operation requires the certificates/get permission.\n */\n private getCertificate(\n certificateName: string,\n options: GetCertificateOptions = {},\n ): Promise<KeyVaultCertificateWithPolicy> {\n return tracingClient.withSpan(\n \"CertificateOperationPoller.getCertificate\",\n options,\n async (updatedOptions) => {\n const result = await this.client.getCertificate(\n this.vaultUrl,\n certificateName,\n \"\",\n updatedOptions,\n );\n return getCertificateWithPolicyFromCertificateBundle(result);\n },\n );\n }\n\n /**\n * Gets the certificate operation.\n */\n private getPlainCertificateOperation(\n certificateName: string,\n options: GetPlainCertificateOperationOptions = {},\n ): Promise<CertificateOperation> {\n return tracingClient.withSpan(\n \"CertificateOperationPoller.getPlainCertificateOperation\",\n options,\n async (updatedOptions) => {\n let parsedBody: any;\n await this.client.getCertificateOperation(this.vaultUrl, certificateName, {\n ...updatedOptions,\n onResponse: (response) => {\n parsedBody = response.parsedBody;\n },\n });\n return getCertificateOperationFromCoreOperation(certificateName, this.vaultUrl, parsedBody);\n },\n );\n }\n\n /**\n * Reaches to the service and updates the poll operation.\n */\n async update(\n options: {\n abortSignal?: AbortSignalLike;\n fireProgress?: (state: CertificateOperationState) => void;\n } = {},\n ): Promise<CertificateOperationPollOperation> {\n const state = this.state;\n const certificateName = state.certificateName!;\n\n if (options.abortSignal) {\n this.operationOptions.abortSignal = options.abortSignal;\n }\n\n if (!state.isStarted) {\n state.isStarted = true;\n state.result = await this.getCertificate(certificateName, this.operationOptions);\n state.certificateOperation = await this.getPlainCertificateOperation(\n certificateName,\n this.operationOptions,\n );\n } else if (!state.isCompleted) {\n state.certificateOperation = await this.getPlainCertificateOperation(\n certificateName,\n this.operationOptions,\n );\n }\n\n if (state.certificateOperation && state.certificateOperation.status !== \"inProgress\") {\n state.isCompleted = true;\n state.result = await this.getCertificate(certificateName, this.operationOptions);\n if (state.certificateOperation.error) {\n state.error = new Error(state.certificateOperation.error.message);\n }\n }\n\n return this;\n }\n\n /**\n * Reaches to the service and cancels the certificate's operation, also updating the poll operation.\n */\n async cancel(\n this: CertificateOperationPollOperation,\n options: { abortSignal?: AbortSignal } = {},\n ): Promise<CertificateOperationPollOperation> {\n const state = this.state;\n const certificateName = state.certificateName!;\n\n if (options.abortSignal) {\n this.operationOptions.abortSignal = options.abortSignal;\n }\n\n state.certificateOperation = await this.cancelCertificateOperation(\n certificateName,\n this.operationOptions,\n );\n\n this.state.isCancelled = true;\n return this;\n }\n\n /**\n * Serializes the certificate's poll operation\n */\n public toString(): string {\n const state: CertificateOperationState = {\n certificateOperation: this.state.certificateOperation,\n ...cleanState(this.state),\n };\n return JSON.stringify({\n state,\n });\n }\n}\n"]}
1
+ {"version":3,"file":"operation.js","sourceRoot":"","sources":["../../../../src/lro/operation/operation.ts"],"names":[],"mappings":";AAAA,uCAAuC;AACvC,kCAAkC;;;AAYlC,kFAA+F;AAE/F,iEAGkC;AAClC,iDAAiD;AAajD;;;GAGG;AACH,MAAa,iCAAkC,SAAQ,+DAGtD;IACC,YACS,KAAgC,EAC/B,MAAsB,EACtB,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C;IACd,CAAC;IAED;;OAEG;IACH,KAAK,CAAC,MAAM,CAEV,UAAyC,EAAE;QAE3C,MAAM,KAAK,GAAG,IAAI,CAAC,KAAK,CAAC;QACzB,MAAM,eAAe,GAAG,KAAK,CAAC,eAAgB,CAAC;QAE/C,IAAI,OAAO,CAAC,WAAW,EAAE,CAAC;YACxB,IAAI,CAAC,gBAAgB,CAAC,WAAW,GAAG,OAAO,CAAC,WAAW,CAAC;QAC1D,CAAC;QAED,KAAK,CAAC,oBAAoB,GAAG,MAAM,IAAI,CAAC,0BAA0B,CAChE,eAAe,EACf,IAAI,CAAC,gBAAgB,CACtB,CAAC;QAEF,IAAI,CAAC,KAAK,CAAC,WAAW,GAAG,IAAI,CAAC;QAC9B,OAAO,IAAI,CAAC;IACd,CAAC;IAED;;OAEG;IACI,QAAQ;QACb,MAAM,KAAK,mBACT,oBAAoB,EAAE,IAAI,CAAC,KAAK,CAAC,oBAAoB,IAClD,IAAA,yCAAU,EAAC,IAAI,CAAC,KAAK,CAAC,CAC1B,CAAC;QACF,OAAO,IAAI,CAAC,SAAS,CAAC;YACpB,KAAK;SACN,CAAC,CAAC;IACL,CAAC;CACF;AA/ID,8EA+IC","sourcesContent":["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT License.\n\nimport type { AbortSignalLike } from \"@azure/abort-controller\";\nimport type { OperationOptions } from \"@azure-rest/core-client\";\nimport type {\n CancelCertificateOperationOptions,\n CertificateOperation,\n GetCertificateOptions,\n GetPlainCertificateOperationOptions,\n KeyVaultCertificateWithPolicy,\n} from \"../../certificatesModels.js\";\nimport type { KeyVaultCertificatePollOperationState } from \"../keyVaultCertificatePoller.js\";\nimport { cleanState, KeyVaultCertificatePollOperation } from \"../keyVaultCertificatePoller.js\";\nimport type { KeyVaultClient } from \"../../generated/keyVaultClient.js\";\nimport {\n getCertificateOperationFromCoreOperation,\n getCertificateWithPolicyFromCertificateBundle,\n} from \"../../transformations.js\";\nimport { tracingClient } from \"../../tracing.js\";\n\n/**\n * An interface representing the publicly available properties of the state of the CertificateOperationPoller.\n */\nexport interface CertificateOperationState\n extends KeyVaultCertificatePollOperationState<KeyVaultCertificateWithPolicy> {\n /**\n * The operation of the certificate\n */\n certificateOperation?: CertificateOperation;\n}\n\n/**\n * An interface representing the active operation of a certificate's creation,\n * which is represented locally as the \"operation\" of an active LRO Poller.\n */\nexport class CertificateOperationPollOperation extends KeyVaultCertificatePollOperation<\n CertificateOperationState,\n KeyVaultCertificateWithPolicy\n> {\n constructor(\n public state: CertificateOperationState,\n private client: KeyVaultClient,\n private operationOptions: OperationOptions = {},\n ) {\n super(state);\n }\n\n /**\n * Cancels a certificate creation operation that is already in progress. This operation requires the certificates/update permission.\n */\n private cancelCertificateOperation(\n certificateName: string,\n options: CancelCertificateOperationOptions = {},\n ): Promise<CertificateOperation> {\n return tracingClient.withSpan(\n \"CertificateOperationPoller.cancelCertificateOperation\",\n options,\n async (updatedOptions) => {\n const response = await this.client.updateCertificateOperation(\n certificateName,\n { cancellationRequested: true },\n updatedOptions,\n );\n return getCertificateOperationFromCoreOperation(certificateName, response);\n },\n );\n }\n\n /**\n * Gets the latest information available from a specific certificate, including the certificate's policy. This operation requires the certificates/get permission.\n */\n private getCertificate(\n certificateName: string,\n options: GetCertificateOptions = {},\n ): Promise<KeyVaultCertificateWithPolicy> {\n return tracingClient.withSpan(\n \"CertificateOperationPoller.getCertificate\",\n options,\n async (updatedOptions) => {\n const result = await this.client.getCertificate(certificateName, \"\", updatedOptions);\n return getCertificateWithPolicyFromCertificateBundle(result);\n },\n );\n }\n\n /**\n * Gets the certificate operation.\n */\n private getPlainCertificateOperation(\n certificateName: string,\n options: GetPlainCertificateOperationOptions = {},\n ): Promise<CertificateOperation> {\n return tracingClient.withSpan(\n \"CertificateOperationPoller.getPlainCertificateOperation\",\n options,\n async (updatedOptions) => {\n const response = await this.client.getCertificateOperation(certificateName, updatedOptions);\n return getCertificateOperationFromCoreOperation(certificateName, response);\n },\n );\n }\n\n /**\n * Reaches to the service and updates the poll operation.\n */\n async update(\n options: {\n abortSignal?: AbortSignalLike;\n fireProgress?: (state: CertificateOperationState) => void;\n } = {},\n ): Promise<CertificateOperationPollOperation> {\n const state = this.state;\n const certificateName = state.certificateName!;\n\n if (options.abortSignal) {\n this.operationOptions.abortSignal = options.abortSignal;\n }\n\n if (!state.isStarted) {\n state.isStarted = true;\n state.result = await this.getCertificate(certificateName, this.operationOptions);\n state.certificateOperation = await this.getPlainCertificateOperation(\n certificateName,\n this.operationOptions,\n );\n } else if (!state.isCompleted) {\n state.certificateOperation = await this.getPlainCertificateOperation(\n certificateName,\n this.operationOptions,\n );\n }\n\n if (state.certificateOperation && state.certificateOperation.status !== \"inProgress\") {\n state.isCompleted = true;\n state.result = await this.getCertificate(certificateName, this.operationOptions);\n if (state.certificateOperation.error) {\n state.error = new Error(state.certificateOperation.error.message);\n }\n }\n\n return this;\n }\n\n /**\n * Reaches to the service and cancels the certificate's operation, also updating the poll operation.\n */\n async cancel(\n this: CertificateOperationPollOperation,\n options: { abortSignal?: AbortSignal } = {},\n ): Promise<CertificateOperationPollOperation> {\n const state = this.state;\n const certificateName = state.certificateName!;\n\n if (options.abortSignal) {\n this.operationOptions.abortSignal = options.abortSignal;\n }\n\n state.certificateOperation = await this.cancelCertificateOperation(\n certificateName,\n this.operationOptions,\n );\n\n this.state.isCancelled = true;\n return this;\n }\n\n /**\n * Serializes the certificate's poll operation\n */\n public toString(): string {\n const state: CertificateOperationState = {\n certificateOperation: this.state.certificateOperation,\n ...cleanState(this.state),\n };\n return JSON.stringify({\n state,\n });\n }\n}\n"]}
@@ -1 +1 @@
1
- {"version":3,"file":"poller.d.ts","sourceRoot":"","sources":["../../../../src/lro/operation/poller.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAE,yBAAyB,EAAE,MAAM,gBAAgB,CAAC;AAEhE,OAAO,KAAK,EAAE,6BAA6B,EAAE,MAAM,6BAA6B,CAAC;AACjF,OAAO,KAAK,EAAE,gCAAgC,EAAE,MAAM,iCAAiC,CAAC;AACxF,OAAO,EAAE,yBAAyB,EAAc,MAAM,iCAAiC,CAAC;AAExF,MAAM,WAAW,iCAAkC,SAAQ,gCAAgC;CAAG;AAE9F;;GAEG;AACH,qBAAa,0BAA2B,SAAQ,yBAAyB,CACvE,yBAAyB,EACzB,6BAA6B,CAC9B;gBACa,OAAO,EAAE,iCAAiC;IA+BtD;;OAEG;IACI,iBAAiB,IAAI,yBAAyB;CAMtD"}
1
+ {"version":3,"file":"poller.d.ts","sourceRoot":"","sources":["../../../../src/lro/operation/poller.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAE,yBAAyB,EAAE,MAAM,gBAAgB,CAAC;AAEhE,OAAO,KAAK,EAAE,6BAA6B,EAAE,MAAM,6BAA6B,CAAC;AACjF,OAAO,KAAK,EAAE,gCAAgC,EAAE,MAAM,iCAAiC,CAAC;AACxF,OAAO,EAAE,yBAAyB,EAAc,MAAM,iCAAiC,CAAC;AAExF,MAAM,WAAW,iCAAkC,SAAQ,gCAAgC;CAAG;AAE9F;;GAEG;AACH,qBAAa,0BAA2B,SAAQ,yBAAyB,CACvE,yBAAyB,EACzB,6BAA6B,CAC9B;gBACa,OAAO,EAAE,iCAAiC;IAuBtD;;OAEG;IACI,iBAAiB,IAAI,yBAAyB;CAMtD"}
@@ -10,12 +10,12 @@ const keyVaultCertificatePoller_js_1 = require("../keyVaultCertificatePoller.js"
10
10
  */
11
11
  class CertificateOperationPoller extends keyVaultCertificatePoller_js_1.KeyVaultCertificatePoller {
12
12
  constructor(options) {
13
- const { vaultUrl, client, certificateName, operationOptions, intervalInMs = 2000, resumeFrom, } = options;
13
+ const { client, certificateName, operationOptions, intervalInMs = 2000, resumeFrom } = options;
14
14
  let state;
15
15
  if (resumeFrom) {
16
16
  state = JSON.parse(resumeFrom).state;
17
17
  }
18
- const operation = new operation_js_1.CertificateOperationPollOperation(Object.assign(Object.assign({}, state), { certificateName }), vaultUrl, client, operationOptions);
18
+ const operation = new operation_js_1.CertificateOperationPollOperation(Object.assign(Object.assign({}, state), { certificateName }), client, operationOptions);
19
19
  super(operation);
20
20
  this.intervalInMs = intervalInMs;
21
21
  }
@@ -1 +1 @@
1
- {"version":3,"file":"poller.js","sourceRoot":"","sources":["../../../../src/lro/operation/poller.ts"],"names":[],"mappings":";AAAA,uCAAuC;AACvC,kCAAkC;;;AAGlC,iDAAmE;AAGnE,kFAAwF;AAIxF;;GAEG;AACH,MAAa,0BAA2B,SAAQ,wDAG/C;IACC,YAAY,OAA0C;QACpD,MAAM,EACJ,QAAQ,EACR,MAAM,EACN,eAAe,EACf,gBAAgB,EAChB,YAAY,GAAG,IAAI,EACnB,UAAU,GACX,GAAG,OAAO,CAAC;QAEZ,IAAI,KAA4C,CAAC;QAEjD,IAAI,UAAU,EAAE,CAAC;YACf,KAAK,GAAG,IAAI,CAAC,KAAK,CAAC,UAAU,CAAC,CAAC,KAAK,CAAC;QACvC,CAAC;QAED,MAAM,SAAS,GAAG,IAAI,gDAAiC,iCAEhD,KAAK,KACR,eAAe,KAEjB,QAAQ,EACR,MAAM,EACN,gBAAgB,CACjB,CAAC;QAEF,KAAK,CAAC,SAAS,CAAC,CAAC;QAEjB,IAAI,CAAC,YAAY,GAAG,YAAY,CAAC;IACnC,CAAC;IAED;;OAEG;IACI,iBAAiB;QACtB,uCACK,IAAA,yCAAU,EAAC,IAAI,CAAC,SAAS,CAAC,KAAK,CAAC,KACnC,oBAAoB,EAAE,IAAI,CAAC,SAAS,CAAC,KAAK,CAAC,oBAAoB,IAC/D;IACJ,CAAC;CACF;AA5CD,gEA4CC","sourcesContent":["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT License.\n\nimport type { CertificateOperationState } from \"./operation.js\";\nimport { CertificateOperationPollOperation } from \"./operation.js\";\nimport type { KeyVaultCertificateWithPolicy } from \"../../certificatesModels.js\";\nimport type { KeyVaultCertificatePollerOptions } from \"../keyVaultCertificatePoller.js\";\nimport { KeyVaultCertificatePoller, cleanState } from \"../keyVaultCertificatePoller.js\";\n\nexport interface CertificateOperationPollerOptions extends KeyVaultCertificatePollerOptions {}\n\n/**\n * Class that creates a poller that waits until a certificate finishes being created\n */\nexport class CertificateOperationPoller extends KeyVaultCertificatePoller<\n CertificateOperationState,\n KeyVaultCertificateWithPolicy\n> {\n constructor(options: CertificateOperationPollerOptions) {\n const {\n vaultUrl,\n client,\n certificateName,\n operationOptions,\n intervalInMs = 2000,\n resumeFrom,\n } = options;\n\n let state: CertificateOperationState | undefined;\n\n if (resumeFrom) {\n state = JSON.parse(resumeFrom).state;\n }\n\n const operation = new CertificateOperationPollOperation(\n {\n ...state,\n certificateName,\n },\n vaultUrl,\n client,\n operationOptions,\n );\n\n super(operation);\n\n this.intervalInMs = intervalInMs;\n }\n\n /**\n * Gets the public state of the polling operation\n */\n public getOperationState(): CertificateOperationState {\n return {\n ...cleanState(this.operation.state),\n certificateOperation: this.operation.state.certificateOperation,\n };\n }\n}\n"]}
1
+ {"version":3,"file":"poller.js","sourceRoot":"","sources":["../../../../src/lro/operation/poller.ts"],"names":[],"mappings":";AAAA,uCAAuC;AACvC,kCAAkC;;;AAGlC,iDAAmE;AAGnE,kFAAwF;AAIxF;;GAEG;AACH,MAAa,0BAA2B,SAAQ,wDAG/C;IACC,YAAY,OAA0C;QACpD,MAAM,EAAE,MAAM,EAAE,eAAe,EAAE,gBAAgB,EAAE,YAAY,GAAG,IAAI,EAAE,UAAU,EAAE,GAAG,OAAO,CAAC;QAE/F,IAAI,KAA4C,CAAC;QAEjD,IAAI,UAAU,EAAE,CAAC;YACf,KAAK,GAAG,IAAI,CAAC,KAAK,CAAC,UAAU,CAAC,CAAC,KAAK,CAAC;QACvC,CAAC;QAED,MAAM,SAAS,GAAG,IAAI,gDAAiC,iCAEhD,KAAK,KACR,eAAe,KAEjB,MAAM,EACN,gBAAgB,CACjB,CAAC;QAEF,KAAK,CAAC,SAAS,CAAC,CAAC;QAEjB,IAAI,CAAC,YAAY,GAAG,YAAY,CAAC;IACnC,CAAC;IAED;;OAEG;IACI,iBAAiB;QACtB,uCACK,IAAA,yCAAU,EAAC,IAAI,CAAC,SAAS,CAAC,KAAK,CAAC,KACnC,oBAAoB,EAAE,IAAI,CAAC,SAAS,CAAC,KAAK,CAAC,oBAAoB,IAC/D;IACJ,CAAC;CACF;AApCD,gEAoCC","sourcesContent":["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT License.\n\nimport type { CertificateOperationState } from \"./operation.js\";\nimport { CertificateOperationPollOperation } from \"./operation.js\";\nimport type { KeyVaultCertificateWithPolicy } from \"../../certificatesModels.js\";\nimport type { KeyVaultCertificatePollerOptions } from \"../keyVaultCertificatePoller.js\";\nimport { KeyVaultCertificatePoller, cleanState } from \"../keyVaultCertificatePoller.js\";\n\nexport interface CertificateOperationPollerOptions extends KeyVaultCertificatePollerOptions {}\n\n/**\n * Class that creates a poller that waits until a certificate finishes being created\n */\nexport class CertificateOperationPoller extends KeyVaultCertificatePoller<\n CertificateOperationState,\n KeyVaultCertificateWithPolicy\n> {\n constructor(options: CertificateOperationPollerOptions) {\n const { client, certificateName, operationOptions, intervalInMs = 2000, resumeFrom } = options;\n\n let state: CertificateOperationState | undefined;\n\n if (resumeFrom) {\n state = JSON.parse(resumeFrom).state;\n }\n\n const operation = new CertificateOperationPollOperation(\n {\n ...state,\n certificateName,\n },\n client,\n operationOptions,\n );\n\n super(operation);\n\n this.intervalInMs = intervalInMs;\n }\n\n /**\n * Gets the public state of the polling operation\n */\n public getOperationState(): CertificateOperationState {\n return {\n ...cleanState(this.operation.state),\n certificateOperation: this.operation.state.certificateOperation,\n };\n }\n}\n"]}
@@ -1,5 +1,5 @@
1
1
  import type { AbortSignalLike } from "@azure/abort-controller";
2
- import type { OperationOptions } from "@azure/core-client";
2
+ import type { OperationOptions } from "@azure-rest/core-client";
3
3
  import type { KeyVaultCertificateWithPolicy } from "../../certificatesModels.js";
4
4
  import type { KeyVaultClient } from "../../generated/keyVaultClient.js";
5
5
  import type { KeyVaultCertificatePollOperationState } from "../keyVaultCertificatePoller.js";
@@ -13,10 +13,9 @@ export type RecoverDeletedCertificateState = KeyVaultCertificatePollOperationSta
13
13
  */
14
14
  export declare class RecoverDeletedCertificatePollOperation extends KeyVaultCertificatePollOperation<RecoverDeletedCertificateState, KeyVaultCertificateWithPolicy> {
15
15
  state: RecoverDeletedCertificateState;
16
- private vaultUrl;
17
16
  private client;
18
17
  private operationOptions;
19
- constructor(state: RecoverDeletedCertificateState, vaultUrl: string, client: KeyVaultClient, operationOptions?: OperationOptions);
18
+ constructor(state: RecoverDeletedCertificateState, client: KeyVaultClient, operationOptions?: OperationOptions);
20
19
  /**
21
20
  * Gets the latest information available from a specific certificate, including the certificate's policy. This operation requires the certificates/get permission.
22
21
  */
@@ -1 +1 @@
1
- {"version":3,"file":"operation.d.ts","sourceRoot":"","sources":["../../../../src/lro/recover/operation.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,yBAAyB,CAAC;AAC/D,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,oBAAoB,CAAC;AAC3D,OAAO,KAAK,EAEV,6BAA6B,EAE9B,MAAM,6BAA6B,CAAC;AACrC,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,mCAAmC,CAAC;AAGxE,OAAO,KAAK,EAAE,qCAAqC,EAAE,MAAM,iCAAiC,CAAC;AAC7F,OAAO,EAAE,gCAAgC,EAAE,MAAM,iCAAiC,CAAC;AAEnF;;GAEG;AACH,MAAM,MAAM,8BAA8B,GACxC,qCAAqC,CAAC,6BAA6B,CAAC,CAAC;AAEvE;;GAEG;AACH,qBAAa,sCAAuC,SAAQ,gCAAgC,CAC1F,8BAA8B,EAC9B,6BAA6B,CAC9B;IAEU,KAAK,EAAE,8BAA8B;IAC5C,OAAO,CAAC,QAAQ;IAChB,OAAO,CAAC,MAAM;IACd,OAAO,CAAC,gBAAgB;gBAHjB,KAAK,EAAE,8BAA8B,EACpC,QAAQ,EAAE,MAAM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,CAAC;QAC9B,YAAY,CAAC,EAAE,CAAC,KAAK,EAAE,8BAA8B,KAAK,IAAI,CAAC;KAC3D,GACL,OAAO,CAAC,sCAAsC,CAAC;CAuCnD"}
@@ -10,12 +10,11 @@ const keyVaultCertificatePoller_js_1 = require("../keyVaultCertificatePoller.js"
10
10
  * An interface representing the recovery of a deleted certificate's poll operation
11
11
  */
12
12
  class RecoverDeletedCertificatePollOperation extends keyVaultCertificatePoller_js_1.KeyVaultCertificatePollOperation {
13
- constructor(state, vaultUrl, client, operationOptions = {}) {
13
+ constructor(state, client, operationOptions = {}) {
14
14
  super(state, {
15
15
  cancelMessage: "Canceling the recovery of a deleted certificate is not supported.",
16
16
  });
17
17
  this.state = state;
18
- this.vaultUrl = vaultUrl;
19
18
  this.client = client;
20
19
  this.operationOptions = operationOptions;
21
20
  }
@@ -24,7 +23,7 @@ class RecoverDeletedCertificatePollOperation extends keyVaultCertificatePoller_j
24
23
  */
25
24
  getCertificate(certificateName, options = {}) {
26
25
  return tracing_js_1.tracingClient.withSpan("RecoverDeletedCertificatePoller.getCertificate", options, async (updatedOptions) => {
27
- const result = await this.client.getCertificate(this.vaultUrl, certificateName, "", updatedOptions);
26
+ const result = await this.client.getCertificate(certificateName, "", updatedOptions);
28
27
  return (0, transformations_js_1.getCertificateWithPolicyFromCertificateBundle)(result);
29
28
  });
30
29
  }
@@ -33,12 +32,9 @@ class RecoverDeletedCertificatePollOperation extends keyVaultCertificatePoller_j
33
32
  * requires the certificate/recover permission.
34
33
  */
35
34
  recoverDeletedCertificate(certificateName, options = {}) {
36
- let parsedBody;
37
35
  return tracing_js_1.tracingClient.withSpan("RecoverDeletedCertificatePoller.recoverDeletedCertificate", options, async (updatedOptions) => {
38
- await this.client.recoverDeletedCertificate(this.vaultUrl, certificateName, Object.assign(Object.assign({}, updatedOptions), { onResponse: (response) => {
39
- parsedBody = response.parsedBody;
40
- } }));
41
- return (0, transformations_js_1.getCertificateWithPolicyFromCertificateBundle)(parsedBody);
36
+ const response = await this.client.recoverDeletedCertificate(certificateName, updatedOptions);
37
+ return (0, transformations_js_1.getCertificateWithPolicyFromCertificateBundle)(response);
42
38
  });
43
39
  }
44
40
  /**
@@ -1 +1 @@
1
- {"version":3,"file":"operation.js","sourceRoot":"","sources":["../../../../src/lro/recover/operation.ts"],"names":[],"mappings":";AAAA,uCAAuC;AACvC,kCAAkC;;;AAUlC,iDAAiD;AACjD,iEAAyF;AAEzF,kFAAmF;AAQnF;;GAEG;AACH,MAAa,sCAAuC,SAAQ,+DAG3D;IACC,YACS,KAAqC,EACpC,QAAgB,EAChB,MAAsB,EACtB,mBAAqC,EAAE;QAE/C,KAAK,CAAC,KAAK,EAAE;YACX,aAAa,EAAE,mEAAmE;SACnF,CAAC,CAAC;QAPI,UAAK,GAAL,KAAK,CAAgC;QACpC,aAAQ,GAAR,QAAQ,CAAQ;QAChB,WAAM,GAAN,MAAM,CAAgB;QACtB,qBAAgB,GAAhB,gBAAgB,CAAuB;IAKjD,CAAC;IAED;;OAEG;IACK,cAAc,CACpB,eAAuB,EACvB,UAAiC,EAAE;QAEnC,OAAO,0BAAa,CAAC,QAAQ,CAC3B,gDAAgD,EAChD,OAAO,EACP,KAAK,EAAE,cAAc,EAAE,EAAE;YACvB,MAAM,MAAM,GAAG,MAAM,IAAI,CAAC,MAAM,CAAC,cAAc,CAC7C,IAAI,CAAC,QAAQ,EACb,eAAe,EACf,EAAE,EACF,cAAc,CACf,CAAC;YACF,OAAO,IAAA,kEAA6C,EAAC,MAAM,CAAC,CAAC;QAC/D,CAAC,CACF,CAAC;IACJ,CAAC;IAED;;;OAGG;IACK,yBAAyB,CAC/B,eAAuB,EACvB,UAA4C,EAAE;QAE9C,IAAI,UAAe,CAAC;QACpB,OAAO,0BAAa,CAAC,QAAQ,CAC3B,2DAA2D,EAC3D,OAAO,EACP,KAAK,EAAE,cAAc,EAAE,EAAE;YACvB,MAAM,IAAI,CAAC,MAAM,CAAC,yBAAyB,CAAC,IAAI,CAAC,QA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YAAC,OAAO,KAAU,EAAE,CAAC;gBACpB,IAAI,KAAK,CAAC,UAAU,KAAK,GAAG,EAAE,CAAC;oBAC7B,6EAA6E;oBAC7E,KAAK,CAAC,WAAW,GAAG,IAAI,CAAC;gBAC3B,CAAC;qBAAM,IAAI,KAAK,CAAC,UAAU,KAAK,GAAG,EAAE,CAAC;oBACpC,KAAK,CAAC,KAAK,GAAG,KAAK,CAAC;oBACpB,KAAK,CAAC,WAAW,GAAG,IAAI,CAAC;oBACzB,MAAM,KAAK,CAAC;gBACd,CAAC;YACH,CAAC;QACH,CAAC;QAED,OAAO,IAAI,CAAC;IACd,CAAC;CACF;AA5GD,wFA4GC","sourcesContent":["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT License.\n\nimport type { AbortSignalLike } from \"@azure/abort-controller\";\nimport type { OperationOptions } from \"@azure/core-client\";\nimport type {\n GetCertificateOptions,\n KeyVaultCertificateWithPolicy,\n RecoverDeletedCertificateOptions,\n} from \"../../certificatesModels.js\";\nimport type { KeyVaultClient } from \"../../generated/keyVaultClient.js\";\nimport { tracingClient } from \"../../tracing.js\";\nimport { getCertificateWithPolicyFromCertificateBundle } from \"../../transformations.js\";\nimport type { KeyVaultCertificatePollOperationState } from \"../keyVaultCertificatePoller.js\";\nimport { KeyVaultCertificatePollOperation } from \"../keyVaultCertificatePoller.js\";\n\n/**\n * Deprecated: Public representation of the recovery of a deleted certificate poll operation\n */\nexport type RecoverDeletedCertificateState =\n KeyVaultCertificatePollOperationState<KeyVaultCertificateWithPolicy>;\n\n/**\n * An interface representing the recovery of a deleted certificate's poll operation\n */\nexport class RecoverDeletedCertificatePollOperation extends KeyVaultCertificatePollOperation<\n RecoverDeletedCertificateState,\n KeyVaultCertificateWithPolicy\n> {\n constructor(\n public state: RecoverDeletedCertificateState,\n private vaultUrl: string,\n private client: KeyVaultClient,\n private operationOptions: OperationOptions = {},\n ) {\n super(state, {\n cancelMessage: \"Canceling the recovery of a deleted certificate is not supported.\",\n });\n }\n\n /**\n * Gets the latest information available from a specific certificate, including the certificate's policy. This operation requires the certificates/get permission.\n */\n private getCertificate(\n certificateName: string,\n options: GetCertificateOptions = {},\n ): Promise<KeyVaultCertificateWithPolicy> {\n return tracingClient.withSpan(\n \"RecoverDeletedCertificatePoller.getCertificate\",\n options,\n async (updatedOptions) => {\n const result = await this.client.getCertificate(\n this.vaultUrl,\n certificateName,\n \"\",\n updatedOptions,\n );\n return getCertificateWithPolicyFromCertificateBundle(result);\n },\n );\n }\n\n /**\n * Recovers the deleted certificate in the specified vault. This operation can only be performed on a soft-delete enabled vault. This operation\n * requires the certificate/recover permission.\n */\n private recoverDeletedCertificate(\n certificateName: string,\n options: RecoverDeletedCertificateOptions = {},\n ): Promise<KeyVaultCertificateWithPolicy> {\n let parsedBody: any;\n return tracingClient.withSpan(\n \"RecoverDeletedCertificatePoller.recoverDeletedCertificate\",\n options,\n async (updatedOptions) => {\n await this.client.recoverDeletedCertificate(this.vaultUrl, certificateName, {\n ...updatedOptions,\n onResponse: (response) => {\n parsedBody = response.parsedBody;\n },\n });\n return getCertificateWithPolicyFromCertificateBundle(parsedBody);\n },\n );\n }\n\n /**\n * Reaches to the service and updates the poll operation.\n */\n async update(\n options: {\n abortSignal?: AbortSignalLike;\n fireProgress?: (state: RecoverDeletedCertificateState) => void;\n } = {},\n ): Promise<RecoverDeletedCertificatePollOperation> {\n const state = this.state;\n const { certificateName } = state;\n\n if (options.abortSignal) {\n this.operationOptions.abortSignal = options.abortSignal;\n }\n\n if (!state.isStarted) {\n try {\n state.result = await this.getCertificate(certificateName, this.operationOptions);\n state.isCompleted = true;\n } catch (e: any) {\n // getCertificate will only work once the LRO is completed.\n }\n if (!state.isCompleted) {\n state.result = await this.recoverDeletedCertificate(certificateName, this.operationOptions);\n state.isStarted = true;\n }\n }\n\n if (!state.isCompleted) {\n try {\n state.result = await this.getCertificate(certificateName, this.operationOptions);\n state.isCompleted = true;\n } catch (error: any) {\n if (error.statusCode === 403) {\n // At this point, the resource exists but the user doesn't have access to it.\n state.isCompleted = true;\n } else if (error.statusCode !== 404) {\n state.error = error;\n state.isCompleted = true;\n throw error;\n }\n }\n }\n\n return this;\n }\n}\n"]}
1
+ {"version":3,"file":"operation.js","sourceRoot":"","sources":["../../../../src/lro/recover/operation.ts"],"names":[],"mappings":";AAAA,uCAAuC;AACvC,kCAAkC;;;AAUlC,iDAAiD;AACjD,iEAAyF;AAEzF,kFAAmF;AAQnF;;GAEG;AACH,MAAa,sCAAuC,SAAQ,+DAG3D;IACC,YACS,KAAqC,EACpC,MAAsB,EACtB,mBAAqC,EAAE;QAE/C,KAAK,CAAC,KAAK,EAAE;YACX,aAAa,EAAE,mEAAmE;SACnF,CAAC,CAAC;QANI,UAAK,GAAL,KAAK,CAAgC;QACpC,WAAM,GAAN,MAAM,CAAgB;QACtB,qBAAgB,GAAhB,gBAAgB,CAAuB;IAKjD,CAAC;IAED;;OAEG;IACK,cAAc,CACpB,eAAuB,EACvB,UAAiC,EAAE;QAEnC,OAAO,0BAAa,CAAC,QAAQ,CAC3B,gDAAgD,EAChD,OAAO,EACP,KAAK,EAAE,cAAc,EAAE,EAAE;YACvB,MAAM,MAAM,GAAG,MAAM,IAAI,CAAC,MAAM,CAAC,cAAc,CAAC,eAAe,EAAE,EAAE,EAAE,cAAc,CAAC,CAAC;YACrF,OAAO,IAAA,kEAA6C,EAAC,MAAM,CAAC,CAAC;QAC/D,CAAC,CACF,CAAC;IACJ,CAAC;IAED;;;OAGG;IACK,yBAAyB,CAC/B,eAAuB,EACvB,UAA4C,EAAE;QAE9C,OAAO,0BAAa,CAAC,QAAQ,CAC3B,2DAA2D,EAC3D,OAAO,EACP,KAAK,EAAE,cAAc,EAAE,EAAE;YACvB,MAAM,QAAQ,GAAG,MAAM,IAAI,CAAC,MAAM,CAAC,yBAAyB,CAC1D,eAAe,EACf,cAAc,CACf,CAAC;YACF,OAAO,IAAA,kEAA6C,EAAC,QAAQ,CAAC,CAAC;QACjE,CAAC,CACF,CAAC;I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;oBACpC,KAAK,CAAC,KAAK,GAAG,KAAK,CAAC;oBACpB,KAAK,CAAC,WAAW,GAAG,IAAI,CAAC;oBACzB,MAAM,KAAK,CAAC;gBACd,CAAC;YACH,CAAC;QACH,CAAC;QAED,OAAO,IAAI,CAAC;IACd,CAAC;CACF;AAnGD,wFAmGC","sourcesContent":["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT License.\n\nimport type { AbortSignalLike } from \"@azure/abort-controller\";\nimport type { OperationOptions } from \"@azure-rest/core-client\";\nimport type {\n GetCertificateOptions,\n KeyVaultCertificateWithPolicy,\n RecoverDeletedCertificateOptions,\n} from \"../../certificatesModels.js\";\nimport type { KeyVaultClient } from \"../../generated/keyVaultClient.js\";\nimport { tracingClient } from \"../../tracing.js\";\nimport { getCertificateWithPolicyFromCertificateBundle } from \"../../transformations.js\";\nimport type { KeyVaultCertificatePollOperationState } from \"../keyVaultCertificatePoller.js\";\nimport { KeyVaultCertificatePollOperation } from \"../keyVaultCertificatePoller.js\";\n\n/**\n * Deprecated: Public representation of the recovery of a deleted certificate poll operation\n */\nexport type RecoverDeletedCertificateState =\n KeyVaultCertificatePollOperationState<KeyVaultCertificateWithPolicy>;\n\n/**\n * An interface representing the recovery of a deleted certificate's poll operation\n */\nexport class RecoverDeletedCertificatePollOperation extends KeyVaultCertificatePollOperation<\n RecoverDeletedCertificateState,\n KeyVaultCertificateWithPolicy\n> {\n constructor(\n public state: RecoverDeletedCertificateState,\n private client: KeyVaultClient,\n private operationOptions: OperationOptions = {},\n ) {\n super(state, {\n cancelMessage: \"Canceling the recovery of a deleted certificate is not supported.\",\n });\n }\n\n /**\n * Gets the latest information available from a specific certificate, including the certificate's policy. This operation requires the certificates/get permission.\n */\n private getCertificate(\n certificateName: string,\n options: GetCertificateOptions = {},\n ): Promise<KeyVaultCertificateWithPolicy> {\n return tracingClient.withSpan(\n \"RecoverDeletedCertificatePoller.getCertificate\",\n options,\n async (updatedOptions) => {\n const result = await this.client.getCertificate(certificateName, \"\", updatedOptions);\n return getCertificateWithPolicyFromCertificateBundle(result);\n },\n );\n }\n\n /**\n * Recovers the deleted certificate in the specified vault. This operation can only be performed on a soft-delete enabled vault. This operation\n * requires the certificate/recover permission.\n */\n private recoverDeletedCertificate(\n certificateName: string,\n options: RecoverDeletedCertificateOptions = {},\n ): Promise<KeyVaultCertificateWithPolicy> {\n return tracingClient.withSpan(\n \"RecoverDeletedCertificatePoller.recoverDeletedCertificate\",\n options,\n async (updatedOptions) => {\n const response = await this.client.recoverDeletedCertificate(\n certificateName,\n updatedOptions,\n );\n return getCertificateWithPolicyFromCertificateBundle(response);\n },\n );\n }\n\n /**\n * Reaches to the service and updates the poll operation.\n */\n async update(\n options: {\n abortSignal?: AbortSignalLike;\n fireProgress?: (state: RecoverDeletedCertificateState) => void;\n } = {},\n ): Promise<RecoverDeletedCertificatePollOperation> {\n const state = this.state;\n const { certificateName } = state;\n\n if (options.abortSignal) {\n this.operationOptions.abortSignal = options.abortSignal;\n }\n\n if (!state.isStarted) {\n try {\n state.result = await this.getCertificate(certificateName, this.operationOptions);\n state.isCompleted = true;\n } catch (e: any) {\n // getCertificate will only work once the LRO is completed.\n }\n if (!state.isCompleted) {\n state.result = await this.recoverDeletedCertificate(certificateName, this.operationOptions);\n state.isStarted = true;\n }\n }\n\n if (!state.isCompleted) {\n try {\n state.result = await this.getCertificate(certificateName, this.operationOptions);\n state.isCompleted = true;\n } catch (error: any) {\n if (error.statusCode === 403) {\n // At this point, the resource exists but the user doesn't have access to it.\n state.isCompleted = true;\n } else if (error.statusCode !== 404) {\n state.error = error;\n state.isCompleted = true;\n throw error;\n }\n }\n }\n\n return this;\n }\n}\n"]}
@@ -1 +1 @@
1
- {"version":3,"file":"poller.d.ts","sourceRoot":"","sources":["../../../../src/lro/recover/poller.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAE,8BAA8B,EAAE,MAAM,gBAAgB,CAAC;AAErE,OAAO,KAAK,EAAE,6BAA6B,EAAE,MAAM,6BAA6B,CAAC;AACjF,OAAO,KAAK,EAAE,gCAAgC,EAAE,MAAM,iCAAiC,CAAC;AACxF,OAAO,EAAE,yBAAyB,EAAE,MAAM,iCAAiC,CAAC;AAE5E,MAAM,WAAW,sCAAuC,SAAQ,gCAAgC;CAAG;AAEnG;;GAEG;AACH,qBAAa,+BAAgC,SAAQ,yBAAyB,CAC5E,8BAA8B,EAC9B,6BAA6B,CAC9B;gBACa,OAAO,EAAE,sCAAsC;CA8B5D"}
1
+ {"version":3,"file":"poller.d.ts","sourceRoot":"","sources":["../../../../src/lro/recover/poller.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAE,8BAA8B,EAAE,MAAM,gBAAgB,CAAC;AAErE,OAAO,KAAK,EAAE,6BAA6B,EAAE,MAAM,6BAA6B,CAAC;AACjF,OAAO,KAAK,EAAE,gCAAgC,EAAE,MAAM,iCAAiC,CAAC;AACxF,OAAO,EAAE,yBAAyB,EAAE,MAAM,iCAAiC,CAAC;AAE5E,MAAM,WAAW,sCAAuC,SAAQ,gCAAgC;CAAG;AAEnG;;GAEG;AACH,qBAAa,+BAAgC,SAAQ,yBAAyB,CAC5E,8BAA8B,EAC9B,6BAA6B,CAC9B;gBACa,OAAO,EAAE,sCAAsC;CAsB5D"}
@@ -10,12 +10,12 @@ const keyVaultCertificatePoller_js_1 = require("../keyVaultCertificatePoller.js"
10
10
  */
11
11
  class RecoverDeletedCertificatePoller extends keyVaultCertificatePoller_js_1.KeyVaultCertificatePoller {
12
12
  constructor(options) {
13
- const { vaultUrl, client, certificateName, operationOptions, intervalInMs = 2000, resumeFrom, } = options;
13
+ const { client, certificateName, operationOptions, intervalInMs = 2000, resumeFrom } = options;
14
14
  let state;
15
15
  if (resumeFrom) {
16
16
  state = JSON.parse(resumeFrom).state;
17
17
  }
18
- const operation = new operation_js_1.RecoverDeletedCertificatePollOperation(Object.assign(Object.assign({}, state), { certificateName }), vaultUrl, client, operationOptions);
18
+ const operation = new operation_js_1.RecoverDeletedCertificatePollOperation(Object.assign(Object.assign({}, state), { certificateName }), client, operationOptions);
19
19
  super(operation);
20
20
  this.intervalInMs = intervalInMs;
21
21
  }
@@ -1 +1 @@
1
- {"version":3,"file":"poller.js","sourceRoot":"","sources":["../../../../src/lro/recover/poller.ts"],"names":[],"mappings":";AAAA,uCAAuC;AACvC,kCAAkC;;;AAGlC,iDAAwE;AAGxE,kFAA4E;AAI5E;;GAEG;AACH,MAAa,+BAAgC,SAAQ,wDAGpD;IACC,YAAY,OAA+C;QACzD,MAAM,EACJ,QAAQ,EACR,MAAM,EACN,eAAe,EACf,gBAAgB,EAChB,YAAY,GAAG,IAAI,EACnB,UAAU,GACX,GAAG,OAAO,CAAC;QAEZ,IAAI,KAAiD,CAAC;QAEtD,IAAI,UAAU,EAAE,CAAC;YACf,KAAK,GAAG,IAAI,CAAC,KAAK,CAAC,UAAU,CAAC,CAAC,KAAK,CAAC;QACvC,CAAC;QAED,MAAM,SAAS,GAAG,IAAI,qDAAsC,iCAErD,KAAK,KACR,eAAe,KAEjB,QAAQ,EACR,MAAM,EACN,gBAAgB,CACjB,CAAC;QAEF,KAAK,CAAC,SAAS,CAAC,CAAC;QAEjB,IAAI,CAAC,YAAY,GAAG,YAAY,CAAC;IACnC,CAAC;CACF;AAlCD,0EAkCC","sourcesContent":["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT License.\n\nimport type { RecoverDeletedCertificateState } from \"./operation.js\";\nimport { RecoverDeletedCertificatePollOperation } from \"./operation.js\";\nimport type { KeyVaultCertificateWithPolicy } from \"../../certificatesModels.js\";\nimport type { KeyVaultCertificatePollerOptions } from \"../keyVaultCertificatePoller.js\";\nimport { KeyVaultCertificatePoller } from \"../keyVaultCertificatePoller.js\";\n\nexport interface RecoverDeletedCertificatePollerOptions extends KeyVaultCertificatePollerOptions {}\n\n/**\n * Class that creates a poller that waits until a deleted certificate is fully recovered.\n */\nexport class RecoverDeletedCertificatePoller extends KeyVaultCertificatePoller<\n RecoverDeletedCertificateState,\n KeyVaultCertificateWithPolicy\n> {\n constructor(options: RecoverDeletedCertificatePollerOptions) {\n const {\n vaultUrl,\n client,\n certificateName,\n operationOptions,\n intervalInMs = 2000,\n resumeFrom,\n } = options;\n\n let state: RecoverDeletedCertificateState | undefined;\n\n if (resumeFrom) {\n state = JSON.parse(resumeFrom).state;\n }\n\n const operation = new RecoverDeletedCertificatePollOperation(\n {\n ...state,\n certificateName,\n },\n vaultUrl,\n client,\n operationOptions,\n );\n\n super(operation);\n\n this.intervalInMs = intervalInMs;\n }\n}\n"]}
1
+ {"version":3,"file":"poller.js","sourceRoot":"","sources":["../../../../src/lro/recover/poller.ts"],"names":[],"mappings":";AAAA,uCAAuC;AACvC,kCAAkC;;;AAGlC,iDAAwE;AAGxE,kFAA4E;AAI5E;;GAEG;AACH,MAAa,+BAAgC,SAAQ,wDAGpD;IACC,YAAY,OAA+C;QACzD,MAAM,EAAE,MAAM,EAAE,eAAe,EAAE,gBAAgB,EAAE,YAAY,GAAG,IAAI,EAAE,UAAU,EAAE,GAAG,OAAO,CAAC;QAE/F,IAAI,KAAiD,CAAC;QAEtD,IAAI,UAAU,EAAE,CAAC;YACf,KAAK,GAAG,IAAI,CAAC,KAAK,CAAC,UAAU,CAAC,CAAC,KAAK,CAAC;QACvC,CAAC;QAED,MAAM,SAAS,GAAG,IAAI,qDAAsC,iCAErD,KAAK,KACR,eAAe,KAEjB,MAAM,EACN,gBAAgB,CACjB,CAAC;QAEF,KAAK,CAAC,SAAS,CAAC,CAAC;QAEjB,IAAI,CAAC,YAAY,GAAG,YAAY,CAAC;IACnC,CAAC;CACF;AA1BD,0EA0BC","sourcesContent":["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT License.\n\nimport type { RecoverDeletedCertificateState } from \"./operation.js\";\nimport { RecoverDeletedCertificatePollOperation } from \"./operation.js\";\nimport type { KeyVaultCertificateWithPolicy } from \"../../certificatesModels.js\";\nimport type { KeyVaultCertificatePollerOptions } from \"../keyVaultCertificatePoller.js\";\nimport { KeyVaultCertificatePoller } from \"../keyVaultCertificatePoller.js\";\n\nexport interface RecoverDeletedCertificatePollerOptions extends KeyVaultCertificatePollerOptions {}\n\n/**\n * Class that creates a poller that waits until a deleted certificate is fully recovered.\n */\nexport class RecoverDeletedCertificatePoller extends KeyVaultCertificatePoller<\n RecoverDeletedCertificateState,\n KeyVaultCertificateWithPolicy\n> {\n constructor(options: RecoverDeletedCertificatePollerOptions) {\n const { client, certificateName, operationOptions, intervalInMs = 2000, resumeFrom } = options;\n\n let state: RecoverDeletedCertificateState | undefined;\n\n if (resumeFrom) {\n state = JSON.parse(resumeFrom).state;\n }\n\n const operation = new RecoverDeletedCertificatePollOperation(\n {\n ...state,\n certificateName,\n },\n client,\n operationOptions,\n );\n\n super(operation);\n\n this.intervalInMs = intervalInMs;\n }\n}\n"]}
@@ -1,5 +1,6 @@
1
1
  import type { CertificateOperation, CertificateIssuer, CertificatePolicy, CertificateProperties, DeletedCertificate, KeyVaultCertificate, KeyVaultCertificateWithPolicy, CertificateContact } from "./certificatesModels.js";
2
2
  import type { CertificateAttributes, CertificateBundle, CertificatePolicy as CoreCertificatePolicy, DeletedCertificateBundle, DeletedCertificateItem, IssuerBundle, CertificateOperation as CoreCertificateOperation, Contacts as CoreContacts } from "./generated/models/index.js";
3
+ import { PagedAsyncIterableIterator } from "@azure/core-paging";
3
4
  export declare function toCoreAttributes(properties: CertificateProperties): CertificateAttributes;
4
5
  export declare function toCorePolicy(id: string | undefined, policy: CertificatePolicy, attributes?: CertificateAttributes): CoreCertificatePolicy;
5
6
  export declare function toPublicPolicy(policy?: CoreCertificatePolicy): CertificatePolicy;
@@ -8,7 +9,8 @@ export declare function getCertificateFromCertificateBundle(certificateBundle: C
8
9
  export declare function getCertificateWithPolicyFromCertificateBundle(certificateBundle: CertificateBundle): KeyVaultCertificateWithPolicy;
9
10
  export declare function getDeletedCertificateFromDeletedCertificateBundle(certificateBundle: DeletedCertificateBundle): DeletedCertificate;
10
11
  export declare function getDeletedCertificateFromItem(item: DeletedCertificateItem): DeletedCertificate;
11
- export declare function getCertificateOperationFromCoreOperation(certificateName: string, vaultUrl: string, operation: CoreCertificateOperation): CertificateOperation;
12
+ export declare function getCertificateOperationFromCoreOperation(certificateName: string, operation: CoreCertificateOperation): CertificateOperation;
12
13
  export declare function coreContactsToCertificateContacts(contacts: CoreContacts): CertificateContact[];
13
14
  export declare function getPropertiesFromCertificateBundle(certificateBundle: CertificateBundle): CertificateProperties;
15
+ export declare function mapPagedAsyncIterable<T, U>(iter: PagedAsyncIterableIterator<T>, mapper: (x: T) => U): PagedAsyncIterableIterator<U>;
14
16
  //# sourceMappingURL=transformations.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"transformations.d.ts","sourceRoot":"","sources":["../../src/transformations.ts"],"names":[],"mappings":"AAIA,OAAO,KAAK,EAGV,oBAAoB,EACpB,iBAAiB,EACjB,iBAAiB,EACjB,qBAAqB,EACrB,kBAAkB,EAClB,mBAAmB,EACnB,6BAA6B,EAE7B,kBAAkB,EAEnB,MAAM,yBAAyB,CAAC;AACjC,OAAO,KAAK,EACV,qBAAqB,EACrB,iBAAiB,EACjB,iBAAiB,IAAI,qBAAqB,EAC1C,wBAAwB,EACxB,sBAAsB,EAEtB,YAAY,EAGZ,oBAAoB,IAAI,wBAAwB,EAChD,QAAQ,IAAI,YAAY,EAGzB,MAAM,6BAA6B,CAAC;AAGrC,wBAAgB,gBAAgB,CAAC,UAAU,EAAE,qBAAqB,GAAG,qBAAqB,CASzF;AAED,wBAAgB,YAAY,CAC1B,EAAE,EAAE,MAAM,GAAG,SAAS,EACtB,MAAM,EAAE,iBAAiB,EACzB,UAAU,GAAE,qBAA0B,GACrC,qBAAqB,CA6CvB;AAED,wBAAgB,cAAc,CAAC,MAAM,GAAE,qBAA0B,GAAG,iBAAiB,CAkEpF;AAED,wBAAgB,cAAc,CAAC,MAAM,GAAE,YAAiB,GAAG,iBAAiB,CA2B3E;AAED,wBAAgB,mCAAmC,CACjD,iBA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BAAgB,cAAc,CAAC,MAAM,GAAE,qBAA0B,GAAG,iBAAiB,CAkEpF;AAED,wBAAgB,cAAc,CAAC,MAAM,GAAE,YAAiB,GAAG,iBAAiB,CA2B3E;AAED,wBAAgB,mCAAmC,CACjD,iBAAiB,EAAE,iBAAiB,GACnC,mBAAmB,CA+BrB;AAED,wBAAgB,6CAA6C,CAC3D,iBAAiB,EAAE,iBAAiB,GACnC,6BAA6B,CAiC/B;AAED,wBAAgB,iDAAiD,CAC/D,iBAAiB,EAAE,wBAAwB,GAC1C,kBAAkB,CAgBpB;AAED,wBAAgB,6BAA6B,CAAC,IAAI,EAAE,sBAAsB,GAAG,kBAAkB,CA8B9F;AAeD,wBAAgB,wCAAwC,CACtD,eAAe,EAAE,MAAM,EACvB,SAAS,EAAE,wBAAwB,GAClC,oBAAoB,CAmBtB;AAED,wBAAgB,iCAAiC,CAAC,QAAQ,EAAE,YAAY,GAAG,kBAAkB,EAAE,CAM9F;AAED,wBAAgB,kCAAkC,CAChD,iBAAiB,EAAE,iBAAiB,GACnC,qBAAqB,CAwBvB;AAED,wBAAgB,qBAAqB,CAAC,CAAC,EAAE,CAAC,EACxC,IAAI,EAAE,0BAA0B,CAAC,CAAC,CAAC,EACnC,MAAM,EAAE,CAAC,CAAC,EAAE,CAAC,KAAK,CAAC,GAClB,0BAA0B,CAAC,CAAC,CAAC,CAoB/B"}
@@ -13,6 +13,8 @@ exports.getDeletedCertificateFromItem = getDeletedCertificateFromItem;
13
13
  exports.getCertificateOperationFromCoreOperation = getCertificateOperationFromCoreOperation;
14
14
  exports.coreContactsToCertificateContacts = coreContactsToCertificateContacts;
15
15
  exports.getPropertiesFromCertificateBundle = getPropertiesFromCertificateBundle;
16
+ exports.mapPagedAsyncIterable = mapPagedAsyncIterable;
17
+ const tslib_1 = require("tslib");
16
18
  const core_util_1 = require("@azure/core-util");
17
19
  const identifier_js_1 = require("./identifier.js");
18
20
  function toCoreAttributes(properties) {
@@ -257,7 +259,7 @@ function getCertificateOperationErrorFromErrorModel(error) {
257
259
  }
258
260
  return undefined;
259
261
  }
260
- function getCertificateOperationFromCoreOperation(certificateName, vaultUrl, operation) {
262
+ function getCertificateOperationFromCoreOperation(certificateName, operation) {
261
263
  return {
262
264
  cancellationRequested: operation.cancellationRequested,
263
265
  name: certificateName,
@@ -275,7 +277,6 @@ function getCertificateOperationFromCoreOperation(certificateName, vaultUrl, ope
275
277
  status: operation.status,
276
278
  statusDetails: operation.statusDetails,
277
279
  target: operation.target,
278
- vaultUrl: vaultUrl,
279
280
  };
280
281
  }
281
282
  function coreContactsToCertificateContacts(contacts) {
@@ -305,4 +306,36 @@ function getPropertiesFromCertificateBundle(certificateBundle) {
305
306
  };
306
307
  return abstractProperties;
307
308
  }
309
+ function mapPagedAsyncIterable(iter, mapper) {
310
+ return {
311
+ async next() {
312
+ const result = await iter.next();
313
+ return Object.assign(Object.assign({}, result), { value: result.value && mapper(result.value) });
314
+ },
315
+ [Symbol.asyncIterator]() {
316
+ return this;
317
+ },
318
+ byPage(settings) {
319
+ return tslib_1.__asyncGenerator(this, arguments, function* byPage_1() {
320
+ var _a, e_1, _b, _c;
321
+ const iteratorByPage = iter.byPage(settings);
322
+ try {
323
+ for (var _d = true, iteratorByPage_1 = tslib_1.__asyncValues(iteratorByPage), iteratorByPage_1_1; iteratorByPage_1_1 = yield tslib_1.__await(iteratorByPage_1.next()), _a = iteratorByPage_1_1.done, !_a; _d = true) {
324
+ _c = iteratorByPage_1_1.value;
325
+ _d = false;
326
+ const page = _c;
327
+ yield yield tslib_1.__await(page.map(mapper));
328
+ }
329
+ }
330
+ catch (e_1_1) { e_1 = { error: e_1_1 }; }
331
+ finally {
332
+ try {
333
+ if (!_d && !_a && (_b = iteratorByPage_1.return)) yield tslib_1.__await(_b.call(iteratorByPage_1));
334
+ }
335
+ finally { if (e_1) throw e_1.error; }
336
+ }
337
+ });
338
+ },
339
+ };
340
+ }
308
341
  //# sourceMappingURL=transformations.js.map