@azure/arm-trustedsigning 1.0.0-alpha.20251015.1 → 1.0.0-alpha.20251016.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (358) hide show
  1. package/LICENSE +1 -1
  2. package/README.md +12 -5
  3. package/dist/browser/api/certificateProfiles/index.d.ts +2 -31
  4. package/dist/browser/api/certificateProfiles/index.js +1 -328
  5. package/dist/browser/api/certificateProfiles/index.js.map +1 -1
  6. package/dist/browser/api/certificateProfiles/operations.d.ts +32 -0
  7. package/dist/browser/api/certificateProfiles/operations.js +181 -0
  8. package/dist/browser/api/certificateProfiles/operations.js.map +1 -0
  9. package/dist/browser/api/certificateProfiles/options.d.ts +21 -0
  10. package/dist/browser/api/certificateProfiles/options.js.map +1 -0
  11. package/dist/browser/api/codeSigningAccounts/index.d.ts +2 -39
  12. package/dist/browser/api/codeSigningAccounts/index.js +1 -326
  13. package/dist/browser/api/codeSigningAccounts/index.js.map +1 -1
  14. package/dist/browser/api/codeSigningAccounts/operations.d.ts +40 -0
  15. package/dist/browser/api/codeSigningAccounts/operations.js +247 -0
  16. package/dist/browser/api/codeSigningAccounts/operations.js.map +1 -0
  17. package/dist/{esm/models → browser/api/codeSigningAccounts}/options.d.ts +7 -29
  18. package/dist/browser/api/codeSigningAccounts/options.js.map +1 -0
  19. package/dist/browser/api/codeSigningContext.d.ts +13 -3
  20. package/dist/browser/api/codeSigningContext.js +7 -6
  21. package/dist/browser/api/codeSigningContext.js.map +1 -1
  22. package/dist/browser/api/operations/index.d.ts +2 -9
  23. package/dist/browser/api/operations/index.js +1 -36
  24. package/dist/browser/api/operations/index.js.map +1 -1
  25. package/dist/browser/api/operations/operations.d.ts +10 -0
  26. package/dist/browser/api/operations/operations.js +34 -0
  27. package/dist/browser/api/operations/operations.js.map +1 -0
  28. package/dist/browser/api/operations/options.d.ts +5 -0
  29. package/dist/browser/api/operations/options.js.map +1 -0
  30. package/dist/browser/classic/certificateProfiles/index.d.ts +14 -21
  31. package/dist/browser/classic/certificateProfiles/index.js +9 -9
  32. package/dist/browser/classic/certificateProfiles/index.js.map +1 -1
  33. package/dist/browser/classic/codeSigningAccounts/index.d.ts +18 -27
  34. package/dist/browser/classic/codeSigningAccounts/index.js +11 -11
  35. package/dist/browser/classic/codeSigningAccounts/index.js.map +1 -1
  36. package/dist/browser/classic/operations/index.d.ts +5 -8
  37. package/dist/browser/classic/operations/index.js +4 -4
  38. package/dist/browser/classic/operations/index.js.map +1 -1
  39. package/dist/browser/codeSigningClient.d.ts +11 -11
  40. package/dist/browser/codeSigningClient.js +14 -14
  41. package/dist/browser/codeSigningClient.js.map +1 -1
  42. package/dist/browser/index.d.ts +8 -2
  43. package/dist/browser/index.js +3 -1
  44. package/dist/browser/index.js.map +1 -1
  45. package/dist/browser/models/index.d.ts +1 -2
  46. package/dist/browser/models/index.js +1 -1
  47. package/dist/browser/models/index.js.map +1 -1
  48. package/dist/browser/models/models.d.ts +302 -254
  49. package/dist/browser/models/models.js +346 -117
  50. package/dist/browser/models/models.js.map +1 -1
  51. package/dist/browser/restorePollerHelpers.d.ts +4 -4
  52. package/dist/browser/restorePollerHelpers.js +13 -10
  53. package/dist/browser/restorePollerHelpers.js.map +1 -1
  54. package/dist/browser/static-helpers/cloudSettingHelpers.d.ts +22 -0
  55. package/dist/browser/static-helpers/cloudSettingHelpers.js +38 -0
  56. package/dist/browser/static-helpers/cloudSettingHelpers.js.map +1 -0
  57. package/dist/browser/static-helpers/pagingHelpers.d.ts +1 -1
  58. package/dist/browser/static-helpers/pagingHelpers.js.map +1 -1
  59. package/dist/browser/static-helpers/pollingHelpers.d.ts +3 -3
  60. package/dist/browser/static-helpers/pollingHelpers.js +1 -1
  61. package/dist/browser/static-helpers/pollingHelpers.js.map +1 -1
  62. package/dist/browser/static-helpers/urlTemplate.d.ts +5 -0
  63. package/dist/browser/static-helpers/urlTemplate.js +185 -0
  64. package/dist/browser/static-helpers/urlTemplate.js.map +1 -0
  65. package/dist/commonjs/api/certificateProfiles/index.d.ts +2 -31
  66. package/dist/commonjs/api/certificateProfiles/index.js +7 -343
  67. package/dist/commonjs/api/certificateProfiles/index.js.map +1 -1
  68. package/dist/commonjs/api/certificateProfiles/operations.d.ts +32 -0
  69. package/dist/commonjs/api/certificateProfiles/operations.js +198 -0
  70. package/dist/commonjs/api/certificateProfiles/operations.js.map +1 -0
  71. package/dist/commonjs/api/certificateProfiles/options.d.ts +21 -0
  72. package/dist/commonjs/api/certificateProfiles/options.js.map +1 -0
  73. package/dist/commonjs/api/codeSigningAccounts/index.d.ts +2 -39
  74. package/dist/commonjs/api/codeSigningAccounts/index.js +9 -347
  75. package/dist/commonjs/api/codeSigningAccounts/index.js.map +1 -1
  76. package/dist/commonjs/api/codeSigningAccounts/operations.d.ts +40 -0
  77. package/dist/commonjs/api/codeSigningAccounts/operations.js +270 -0
  78. package/dist/commonjs/api/codeSigningAccounts/operations.js.map +1 -0
  79. package/dist/{browser/models → commonjs/api/codeSigningAccounts}/options.d.ts +7 -29
  80. package/dist/commonjs/api/codeSigningAccounts/options.js +5 -0
  81. package/dist/commonjs/api/codeSigningAccounts/options.js.map +1 -0
  82. package/dist/commonjs/api/codeSigningContext.d.ts +13 -3
  83. package/dist/commonjs/api/codeSigningContext.js +7 -6
  84. package/dist/commonjs/api/codeSigningContext.js.map +1 -1
  85. package/dist/commonjs/api/operations/index.d.ts +2 -9
  86. package/dist/commonjs/api/operations/index.js +3 -39
  87. package/dist/commonjs/api/operations/index.js.map +1 -1
  88. package/dist/commonjs/api/operations/operations.d.ts +10 -0
  89. package/dist/commonjs/api/operations/operations.js +39 -0
  90. package/dist/commonjs/api/operations/operations.js.map +1 -0
  91. package/dist/commonjs/api/operations/options.d.ts +5 -0
  92. package/dist/commonjs/api/operations/options.js +5 -0
  93. package/dist/commonjs/api/operations/options.js.map +1 -0
  94. package/dist/commonjs/classic/certificateProfiles/index.d.ts +14 -21
  95. package/dist/commonjs/classic/certificateProfiles/index.js +10 -11
  96. package/dist/commonjs/classic/certificateProfiles/index.js.map +1 -1
  97. package/dist/commonjs/classic/codeSigningAccounts/index.d.ts +18 -27
  98. package/dist/commonjs/classic/codeSigningAccounts/index.js +12 -13
  99. package/dist/commonjs/classic/codeSigningAccounts/index.js.map +1 -1
  100. package/dist/commonjs/classic/operations/index.d.ts +5 -8
  101. package/dist/commonjs/classic/operations/index.js +6 -7
  102. package/dist/commonjs/classic/operations/index.js.map +1 -1
  103. package/dist/commonjs/codeSigningClient.d.ts +11 -11
  104. package/dist/commonjs/codeSigningClient.js +14 -14
  105. package/dist/commonjs/codeSigningClient.js.map +1 -1
  106. package/dist/commonjs/index.d.ts +8 -2
  107. package/dist/commonjs/index.js +9 -6
  108. package/dist/commonjs/index.js.map +1 -1
  109. package/dist/commonjs/models/index.d.ts +1 -2
  110. package/dist/commonjs/models/index.js +7 -6
  111. package/dist/commonjs/models/index.js.map +1 -1
  112. package/dist/commonjs/models/models.d.ts +302 -254
  113. package/dist/commonjs/models/models.js +382 -124
  114. package/dist/commonjs/models/models.js.map +1 -1
  115. package/dist/commonjs/restorePollerHelpers.d.ts +4 -4
  116. package/dist/commonjs/restorePollerHelpers.js +13 -10
  117. package/dist/commonjs/restorePollerHelpers.js.map +1 -1
  118. package/dist/commonjs/static-helpers/cloudSettingHelpers.d.ts +22 -0
  119. package/dist/commonjs/static-helpers/cloudSettingHelpers.js +42 -0
  120. package/dist/commonjs/static-helpers/cloudSettingHelpers.js.map +1 -0
  121. package/dist/commonjs/static-helpers/pagingHelpers.d.ts +1 -1
  122. package/dist/commonjs/static-helpers/pagingHelpers.js.map +1 -1
  123. package/dist/commonjs/static-helpers/pollingHelpers.d.ts +3 -3
  124. package/dist/commonjs/static-helpers/pollingHelpers.js.map +1 -1
  125. package/dist/commonjs/static-helpers/urlTemplate.d.ts +5 -0
  126. package/dist/commonjs/static-helpers/urlTemplate.js +188 -0
  127. package/dist/commonjs/static-helpers/urlTemplate.js.map +1 -0
  128. package/dist/commonjs/tsdoc-metadata.json +1 -1
  129. package/dist/esm/api/certificateProfiles/index.d.ts +2 -31
  130. package/dist/esm/api/certificateProfiles/index.js +1 -328
  131. package/dist/esm/api/certificateProfiles/index.js.map +1 -1
  132. package/dist/esm/api/certificateProfiles/operations.d.ts +32 -0
  133. package/dist/esm/api/certificateProfiles/operations.js +181 -0
  134. package/dist/esm/api/certificateProfiles/operations.js.map +1 -0
  135. package/dist/esm/api/certificateProfiles/options.d.ts +21 -0
  136. package/dist/esm/api/certificateProfiles/options.js +4 -0
  137. package/dist/esm/api/certificateProfiles/options.js.map +1 -0
  138. package/dist/esm/api/codeSigningAccounts/index.d.ts +2 -39
  139. package/dist/esm/api/codeSigningAccounts/index.js +1 -326
  140. package/dist/esm/api/codeSigningAccounts/index.js.map +1 -1
  141. package/dist/esm/api/codeSigningAccounts/operations.d.ts +40 -0
  142. package/dist/esm/api/codeSigningAccounts/operations.js +247 -0
  143. package/dist/esm/api/codeSigningAccounts/operations.js.map +1 -0
  144. package/dist/{react-native/models → esm/api/codeSigningAccounts}/options.d.ts +7 -29
  145. package/dist/esm/api/codeSigningAccounts/options.js +4 -0
  146. package/dist/esm/api/codeSigningAccounts/options.js.map +1 -0
  147. package/dist/esm/api/codeSigningContext.d.ts +13 -3
  148. package/dist/esm/api/codeSigningContext.js +7 -6
  149. package/dist/esm/api/codeSigningContext.js.map +1 -1
  150. package/dist/esm/api/operations/index.d.ts +2 -9
  151. package/dist/esm/api/operations/index.js +1 -36
  152. package/dist/esm/api/operations/index.js.map +1 -1
  153. package/dist/esm/api/operations/operations.d.ts +10 -0
  154. package/dist/esm/api/operations/operations.js +34 -0
  155. package/dist/esm/api/operations/operations.js.map +1 -0
  156. package/dist/esm/api/operations/options.d.ts +5 -0
  157. package/dist/esm/api/operations/options.js +4 -0
  158. package/dist/esm/api/operations/options.js.map +1 -0
  159. package/dist/esm/classic/certificateProfiles/index.d.ts +14 -21
  160. package/dist/esm/classic/certificateProfiles/index.js +9 -9
  161. package/dist/esm/classic/certificateProfiles/index.js.map +1 -1
  162. package/dist/esm/classic/codeSigningAccounts/index.d.ts +18 -27
  163. package/dist/esm/classic/codeSigningAccounts/index.js +11 -11
  164. package/dist/esm/classic/codeSigningAccounts/index.js.map +1 -1
  165. package/dist/esm/classic/operations/index.d.ts +5 -8
  166. package/dist/esm/classic/operations/index.js +4 -4
  167. package/dist/esm/classic/operations/index.js.map +1 -1
  168. package/dist/esm/codeSigningClient.d.ts +11 -11
  169. package/dist/esm/codeSigningClient.js +14 -14
  170. package/dist/esm/codeSigningClient.js.map +1 -1
  171. package/dist/esm/index.d.ts +8 -2
  172. package/dist/esm/index.js +3 -1
  173. package/dist/esm/index.js.map +1 -1
  174. package/dist/esm/models/index.d.ts +1 -2
  175. package/dist/esm/models/index.js +1 -1
  176. package/dist/esm/models/index.js.map +1 -1
  177. package/dist/esm/models/models.d.ts +302 -254
  178. package/dist/esm/models/models.js +346 -117
  179. package/dist/esm/models/models.js.map +1 -1
  180. package/dist/esm/restorePollerHelpers.d.ts +4 -4
  181. package/dist/esm/restorePollerHelpers.js +13 -10
  182. package/dist/esm/restorePollerHelpers.js.map +1 -1
  183. package/dist/esm/static-helpers/cloudSettingHelpers.d.ts +22 -0
  184. package/dist/esm/static-helpers/cloudSettingHelpers.js +38 -0
  185. package/dist/esm/static-helpers/cloudSettingHelpers.js.map +1 -0
  186. package/dist/esm/static-helpers/pagingHelpers.d.ts +1 -1
  187. package/dist/esm/static-helpers/pagingHelpers.js.map +1 -1
  188. package/dist/esm/static-helpers/pollingHelpers.d.ts +3 -3
  189. package/dist/esm/static-helpers/pollingHelpers.js +1 -1
  190. package/dist/esm/static-helpers/pollingHelpers.js.map +1 -1
  191. package/dist/esm/static-helpers/urlTemplate.d.ts +5 -0
  192. package/dist/esm/static-helpers/urlTemplate.js +185 -0
  193. package/dist/esm/static-helpers/urlTemplate.js.map +1 -0
  194. package/dist/react-native/api/certificateProfiles/index.d.ts +2 -31
  195. package/dist/react-native/api/certificateProfiles/index.js +1 -328
  196. package/dist/react-native/api/certificateProfiles/index.js.map +1 -1
  197. package/dist/react-native/api/certificateProfiles/operations.d.ts +32 -0
  198. package/dist/react-native/api/certificateProfiles/operations.js +181 -0
  199. package/dist/react-native/api/certificateProfiles/operations.js.map +1 -0
  200. package/dist/react-native/api/certificateProfiles/options.d.ts +21 -0
  201. package/dist/react-native/api/certificateProfiles/options.js +4 -0
  202. package/dist/react-native/api/certificateProfiles/options.js.map +1 -0
  203. package/dist/react-native/api/codeSigningAccounts/index.d.ts +2 -39
  204. package/dist/react-native/api/codeSigningAccounts/index.js +1 -326
  205. package/dist/react-native/api/codeSigningAccounts/index.js.map +1 -1
  206. package/dist/react-native/api/codeSigningAccounts/operations.d.ts +40 -0
  207. package/dist/react-native/api/codeSigningAccounts/operations.js +247 -0
  208. package/dist/react-native/api/codeSigningAccounts/operations.js.map +1 -0
  209. package/dist/{commonjs/models → react-native/api/codeSigningAccounts}/options.d.ts +7 -29
  210. package/dist/react-native/api/codeSigningAccounts/options.js +4 -0
  211. package/dist/react-native/api/codeSigningAccounts/options.js.map +1 -0
  212. package/dist/react-native/api/codeSigningContext.d.ts +13 -3
  213. package/dist/react-native/api/codeSigningContext.js +7 -6
  214. package/dist/react-native/api/codeSigningContext.js.map +1 -1
  215. package/dist/react-native/api/operations/index.d.ts +2 -9
  216. package/dist/react-native/api/operations/index.js +1 -36
  217. package/dist/react-native/api/operations/index.js.map +1 -1
  218. package/dist/react-native/api/operations/operations.d.ts +10 -0
  219. package/dist/react-native/api/operations/operations.js +34 -0
  220. package/dist/react-native/api/operations/operations.js.map +1 -0
  221. package/dist/react-native/api/operations/options.d.ts +5 -0
  222. package/dist/react-native/api/operations/options.js +4 -0
  223. package/dist/react-native/api/operations/options.js.map +1 -0
  224. package/dist/react-native/classic/certificateProfiles/index.d.ts +14 -21
  225. package/dist/react-native/classic/certificateProfiles/index.js +9 -9
  226. package/dist/react-native/classic/certificateProfiles/index.js.map +1 -1
  227. package/dist/react-native/classic/codeSigningAccounts/index.d.ts +18 -27
  228. package/dist/react-native/classic/codeSigningAccounts/index.js +11 -11
  229. package/dist/react-native/classic/codeSigningAccounts/index.js.map +1 -1
  230. package/dist/react-native/classic/operations/index.d.ts +5 -8
  231. package/dist/react-native/classic/operations/index.js +4 -4
  232. package/dist/react-native/classic/operations/index.js.map +1 -1
  233. package/dist/react-native/codeSigningClient.d.ts +11 -11
  234. package/dist/react-native/codeSigningClient.js +14 -14
  235. package/dist/react-native/codeSigningClient.js.map +1 -1
  236. package/dist/react-native/index.d.ts +8 -2
  237. package/dist/react-native/index.js +3 -1
  238. package/dist/react-native/index.js.map +1 -1
  239. package/dist/react-native/models/index.d.ts +1 -2
  240. package/dist/react-native/models/index.js +1 -1
  241. package/dist/react-native/models/index.js.map +1 -1
  242. package/dist/react-native/models/models.d.ts +302 -254
  243. package/dist/react-native/models/models.js +346 -117
  244. package/dist/react-native/models/models.js.map +1 -1
  245. package/dist/react-native/restorePollerHelpers.d.ts +4 -4
  246. package/dist/react-native/restorePollerHelpers.js +13 -10
  247. package/dist/react-native/restorePollerHelpers.js.map +1 -1
  248. package/dist/react-native/static-helpers/cloudSettingHelpers.d.ts +22 -0
  249. package/dist/react-native/static-helpers/cloudSettingHelpers.js +38 -0
  250. package/dist/react-native/static-helpers/cloudSettingHelpers.js.map +1 -0
  251. package/dist/react-native/static-helpers/pagingHelpers.d.ts +1 -1
  252. package/dist/react-native/static-helpers/pagingHelpers.js.map +1 -1
  253. package/dist/react-native/static-helpers/pollingHelpers.d.ts +3 -3
  254. package/dist/react-native/static-helpers/pollingHelpers.js +1 -1
  255. package/dist/react-native/static-helpers/pollingHelpers.js.map +1 -1
  256. package/dist/react-native/static-helpers/urlTemplate.d.ts +5 -0
  257. package/dist/react-native/static-helpers/urlTemplate.js +185 -0
  258. package/dist/react-native/static-helpers/urlTemplate.js.map +1 -0
  259. package/package.json +126 -49
  260. package/CHANGELOG.md +0 -29
  261. package/dist/browser/api/certificateProfiles/index.d.ts.map +0 -1
  262. package/dist/browser/api/codeSigningAccounts/index.d.ts.map +0 -1
  263. package/dist/browser/api/codeSigningContext.d.ts.map +0 -1
  264. package/dist/browser/api/index.d.ts.map +0 -1
  265. package/dist/browser/api/operations/index.d.ts.map +0 -1
  266. package/dist/browser/classic/certificateProfiles/index.d.ts.map +0 -1
  267. package/dist/browser/classic/codeSigningAccounts/index.d.ts.map +0 -1
  268. package/dist/browser/classic/index.d.ts.map +0 -1
  269. package/dist/browser/classic/operations/index.d.ts.map +0 -1
  270. package/dist/browser/codeSigningClient.d.ts.map +0 -1
  271. package/dist/browser/helpers/serializerHelpers.d.ts +0 -3
  272. package/dist/browser/helpers/serializerHelpers.d.ts.map +0 -1
  273. package/dist/browser/helpers/serializerHelpers.js +0 -24
  274. package/dist/browser/helpers/serializerHelpers.js.map +0 -1
  275. package/dist/browser/index.d.ts.map +0 -1
  276. package/dist/browser/logger.d.ts.map +0 -1
  277. package/dist/browser/models/index.d.ts.map +0 -1
  278. package/dist/browser/models/models.d.ts.map +0 -1
  279. package/dist/browser/models/options.d.ts.map +0 -1
  280. package/dist/browser/models/options.js.map +0 -1
  281. package/dist/browser/restorePollerHelpers.d.ts.map +0 -1
  282. package/dist/browser/static-helpers/pagingHelpers.d.ts.map +0 -1
  283. package/dist/browser/static-helpers/pollingHelpers.d.ts.map +0 -1
  284. package/dist/commonjs/api/certificateProfiles/index.d.ts.map +0 -1
  285. package/dist/commonjs/api/codeSigningAccounts/index.d.ts.map +0 -1
  286. package/dist/commonjs/api/codeSigningContext.d.ts.map +0 -1
  287. package/dist/commonjs/api/index.d.ts.map +0 -1
  288. package/dist/commonjs/api/operations/index.d.ts.map +0 -1
  289. package/dist/commonjs/classic/certificateProfiles/index.d.ts.map +0 -1
  290. package/dist/commonjs/classic/codeSigningAccounts/index.d.ts.map +0 -1
  291. package/dist/commonjs/classic/index.d.ts.map +0 -1
  292. package/dist/commonjs/classic/operations/index.d.ts.map +0 -1
  293. package/dist/commonjs/codeSigningClient.d.ts.map +0 -1
  294. package/dist/commonjs/helpers/serializerHelpers.d.ts +0 -3
  295. package/dist/commonjs/helpers/serializerHelpers.d.ts.map +0 -1
  296. package/dist/commonjs/helpers/serializerHelpers.js +0 -27
  297. package/dist/commonjs/helpers/serializerHelpers.js.map +0 -1
  298. package/dist/commonjs/index.d.ts.map +0 -1
  299. package/dist/commonjs/logger.d.ts.map +0 -1
  300. package/dist/commonjs/models/index.d.ts.map +0 -1
  301. package/dist/commonjs/models/models.d.ts.map +0 -1
  302. package/dist/commonjs/models/options.d.ts.map +0 -1
  303. package/dist/commonjs/models/options.js.map +0 -1
  304. package/dist/commonjs/restorePollerHelpers.d.ts.map +0 -1
  305. package/dist/commonjs/static-helpers/pagingHelpers.d.ts.map +0 -1
  306. package/dist/commonjs/static-helpers/pollingHelpers.d.ts.map +0 -1
  307. package/dist/esm/api/certificateProfiles/index.d.ts.map +0 -1
  308. package/dist/esm/api/codeSigningAccounts/index.d.ts.map +0 -1
  309. package/dist/esm/api/codeSigningContext.d.ts.map +0 -1
  310. package/dist/esm/api/index.d.ts.map +0 -1
  311. package/dist/esm/api/operations/index.d.ts.map +0 -1
  312. package/dist/esm/classic/certificateProfiles/index.d.ts.map +0 -1
  313. package/dist/esm/classic/codeSigningAccounts/index.d.ts.map +0 -1
  314. package/dist/esm/classic/index.d.ts.map +0 -1
  315. package/dist/esm/classic/operations/index.d.ts.map +0 -1
  316. package/dist/esm/codeSigningClient.d.ts.map +0 -1
  317. package/dist/esm/helpers/serializerHelpers.d.ts +0 -3
  318. package/dist/esm/helpers/serializerHelpers.d.ts.map +0 -1
  319. package/dist/esm/helpers/serializerHelpers.js +0 -24
  320. package/dist/esm/helpers/serializerHelpers.js.map +0 -1
  321. package/dist/esm/index.d.ts.map +0 -1
  322. package/dist/esm/logger.d.ts.map +0 -1
  323. package/dist/esm/models/index.d.ts.map +0 -1
  324. package/dist/esm/models/models.d.ts.map +0 -1
  325. package/dist/esm/models/options.d.ts.map +0 -1
  326. package/dist/esm/models/options.js.map +0 -1
  327. package/dist/esm/restorePollerHelpers.d.ts.map +0 -1
  328. package/dist/esm/static-helpers/pagingHelpers.d.ts.map +0 -1
  329. package/dist/esm/static-helpers/pollingHelpers.d.ts.map +0 -1
  330. package/dist/react-native/api/certificateProfiles/index.d.ts.map +0 -1
  331. package/dist/react-native/api/codeSigningAccounts/index.d.ts.map +0 -1
  332. package/dist/react-native/api/codeSigningContext.d.ts.map +0 -1
  333. package/dist/react-native/api/index.d.ts.map +0 -1
  334. package/dist/react-native/api/operations/index.d.ts.map +0 -1
  335. package/dist/react-native/classic/certificateProfiles/index.d.ts.map +0 -1
  336. package/dist/react-native/classic/codeSigningAccounts/index.d.ts.map +0 -1
  337. package/dist/react-native/classic/index.d.ts.map +0 -1
  338. package/dist/react-native/classic/operations/index.d.ts.map +0 -1
  339. package/dist/react-native/codeSigningClient.d.ts.map +0 -1
  340. package/dist/react-native/helpers/serializerHelpers.d.ts +0 -3
  341. package/dist/react-native/helpers/serializerHelpers.d.ts.map +0 -1
  342. package/dist/react-native/helpers/serializerHelpers.js +0 -24
  343. package/dist/react-native/helpers/serializerHelpers.js.map +0 -1
  344. package/dist/react-native/index.d.ts.map +0 -1
  345. package/dist/react-native/logger.d.ts.map +0 -1
  346. package/dist/react-native/models/index.d.ts.map +0 -1
  347. package/dist/react-native/models/models.d.ts.map +0 -1
  348. package/dist/react-native/models/options.d.ts.map +0 -1
  349. package/dist/react-native/models/options.js.map +0 -1
  350. package/dist/react-native/restorePollerHelpers.d.ts.map +0 -1
  351. package/dist/react-native/static-helpers/pagingHelpers.d.ts.map +0 -1
  352. package/dist/react-native/static-helpers/pollingHelpers.d.ts.map +0 -1
  353. package/review/arm-trustedsigning-models-node.api.md +0 -313
  354. package/review/arm-trustedsigning-node.api.md +0 -386
  355. /package/dist/browser/{models → api/certificateProfiles}/options.js +0 -0
  356. /package/dist/{esm/models → browser/api/codeSigningAccounts}/options.js +0 -0
  357. /package/dist/{react-native/models → browser/api/operations}/options.js +0 -0
  358. /package/dist/commonjs/{models → api/certificateProfiles}/options.js +0 -0
@@ -1 +1 @@
1
- {"version":3,"file":"models.js","sourceRoot":"","sources":["../../../src/models/models.ts"],"names":[],"mappings":"AAAA,uCAAuC;AACvC,kCAAkC;AAElC,OAAO,EAAE,eAAe,EAAE,MAAM,iCAAiC,CAAC;AAclE,MAAM,UAAU,kBAAkB,CAAC,IAAc;IAC/C,OAAO,IAAW,CAAC;AACrB,CAAC;AAkBD,sEAAsE;AACtE,MAAM,CAAN,IAAY,kBASX;AATD,WAAY,kBAAkB;IAC5B,WAAW;IACX,mCAAa,CAAA;IACb,kBAAkB;IAClB,iDAA2B,CAAA;IAC3B,sBAAsB;IACtB,yDAAmC,CAAA;IACnC,UAAU;IACV,iCAAW,CAAA;AACb,CAAC,EATW,kBAAkB,KAAlB,kBAAkB,QAS7B;AAiBD,MAAM,UAAU,uBAAuB,CAAC,IAAmB;IACzD,OAAO,IAAW,CAAC;AACrB,CAAC;AAQD,MAAM,UAAU,4BAA4B,CAAC,IAAwB;IACnE,OAAO;QACL,UAAU,EAAE,CAAC,IAAI,CAAC,UAAU;YAC1B,CAAC,CAAC,IAAI,CAAC,UAAU;YACjB,CAAC,CAAC,sCAAsC,CAAC,IAAI,CAAC,UAAU,CAAC;KAC5D,CAAC;AACJ,CAAC;AA4CD,MAAM,UAAU,sCAAsC,CACpD,IAAkC;IAElC,OAAO;QACL,WAAW,EAAE,IAAI,CAAC,aAAa,CAAC;QAChC,oBAAoB,EAAE,IAAI,CAAC,sBAAsB,CAAC;QAClD,WAAW,EAAE,IAAI,CAAC,aAAa,CAAC;QAChC,YAAY,EAAE,IAAI,CAAC,cAAc,CAAC;QAClC,cAAc,EAAE,IAAI,CAAC,gBAAgB,CAAC;QACtC,iBAAiB,EAAE,IAAI,CAAC,mBAAmB,CAAC;QAC5C,oBAAoB,EAAE,IAAI,CAAC,sBAAsB,CAAC;KACnD,CAAC;AACJ,CAAC;AAED,oEAAoE;A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C5B,CAAC,EAPW,WAAW,KAAX,WAAW,QAOtB;AAaD,mEAAmE;AACnE,MAAM,CAAN,IAAY,eAGX;AAHD,WAAY,eAAe;IACzB,eAAe;IACf,wCAAqB,CAAA;AACvB,CAAC,EAHW,eAAe,KAAf,eAAe,QAG1B","sourcesContent":["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT License.\n\nimport { serializeRecord } from \"../helpers/serializerHelpers.js\";\n\n/** Common fields that are returned in the response for all Azure Resource Manager resources */\nexport interface Resource {\n /** Fully qualified resource ID for the resource. Ex - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName} */\n readonly id?: string;\n /** The name of the resource */\n readonly name?: string;\n /** The type of the resource. E.g. \"Microsoft.Compute/virtualMachines\" or \"Microsoft.Storage/storageAccounts\" */\n readonly type?: string;\n /** Azure Resource Manager metadata containing createdBy and modifiedBy information. */\n readonly systemData?: SystemData;\n}\n\nexport function resourceSerializer(item: Resource) {\n return item as any;\n}\n\n/** Metadata pertaining to creation and last modification of the resource. */\nexport interface SystemData {\n /** The identity that created the resource. */\n createdBy?: string;\n /** The type of identity that created the resource. */\n createdByType?: CreatedByType;\n /** The timestamp of resource creation (UTC). */\n createdAt?: Date;\n /** The identity that last modified the resource. */\n lastModifiedBy?: string;\n /** The type of identity that last modified the resource. */\n lastModifiedByType?: CreatedByType;\n /** The timestamp of resource last modification (UTC) */\n lastModifiedAt?: Date;\n}\n\n/** Known values of {@link CreatedByType} that the service accepts. */\nexport enum KnownCreatedByType {\n /** User */\n User = \"User\",\n /** Application */\n Application = \"Application\",\n /** ManagedIdentity */\n ManagedIdentity = \"ManagedIdentity\",\n /** Key */\n Key = \"Key\",\n}\n\n/**\n * The kind of entity that created the resource. \\\n * {@link KnownCreatedByType} can be used interchangeably with CreatedByType,\n * this enum contains the known values that the service supports.\n * ### Known values supported by the service\n * **User** \\\n * **Application** \\\n * **ManagedIdentity** \\\n * **Key**\n */\nexport type CreatedByType = string;\n\n/** The resource model definition for a Azure Resource Manager proxy resource. It will not have tags and a location */\nexport interface ProxyResource extends Resource {}\n\nexport function proxyResourceSerializer(item: ProxyResource) {\n return item as any;\n}\n\n/** Certificate profile resource. */\nexport interface CertificateProfile extends ProxyResource {\n /** The resource-specific properties for this resource. */\n properties?: CertificateProfileProperties;\n}\n\nexport function certificateProfileSerializer(item: CertificateProfile): Record<string, unknown> {\n return {\n properties: !item.properties\n ? item.properties\n : certificateProfilePropertiesSerializer(item.properties),\n };\n}\n\n/** Properties of the certificate profile. */\nexport interface CertificateProfileProperties {\n /** Profile type of the certificate. */\n profileType: ProfileType;\n /** Used as CN in the certificate subject name. */\n readonly commonName?: string;\n /** Used as O in the certificate subject name. */\n readonly organization?: string;\n /** Used as OU in the private trust certificate subject name. */\n readonly organizationUnit?: string;\n /** Used as STREET in the certificate subject name. */\n readonly streetAddress?: string;\n /** Whether to include STREET in the certificate subject name. */\n includeStreetAddress?: boolean;\n /** Used as L in the certificate subject name. */\n readonly city?: string;\n /** Whether to include L in the certificate subject name. Applicable only for private trust, private trust ci profile types */\n includeCity?: boolean;\n /** Used as S in the certificate subject name. */\n readonly state?: string;\n /** Whether to include S in the certificate subject name. Applicable only for private trust, private trust ci profile types */\n includeState?: boolean;\n /** Used as C in the certificate subject name. */\n readonly country?: string;\n /** Whether to include C in the certificate subject name. Applicable only for private trust, private trust ci profile types */\n includeCountry?: boolean;\n /** Used as PC in the certificate subject name. */\n readonly postalCode?: string;\n /** Whether to include PC in the certificate subject name. */\n includePostalCode?: boolean;\n /** Enhanced key usage of the certificate. */\n readonly enhancedKeyUsage?: string;\n /** Identity validation id used for the certificate subject name. */\n identityValidationId?: string;\n /** Status of the current operation on certificate profile. */\n readonly provisioningState?: ProvisioningState;\n /** Status of the certificate profile. */\n readonly status?: CertificateProfileStatus;\n /** List of renewed certificates. */\n readonly certificates?: Certificate[];\n}\n\nexport function certificateProfilePropertiesSerializer(\n item: CertificateProfileProperties,\n): Record<string, unknown> {\n return {\n profileType: item[\"profileType\"],\n includeStreetAddress: item[\"includeStreetAddress\"],\n includeCity: item[\"includeCity\"],\n includeState: item[\"includeState\"],\n includeCountry: item[\"includeCountry\"],\n includePostalCode: item[\"includePostalCode\"],\n identityValidationId: item[\"identityValidationId\"],\n };\n}\n\n/** Known values of {@link ProfileType} that the service accepts. */\nexport enum KnownProfileType {\n /** PublicTrust */\n PublicTrust = \"PublicTrust\",\n /** PrivateTrust */\n PrivateTrust = \"PrivateTrust\",\n /** PrivateTrustCIPolicy */\n PrivateTrustCIPolicy = \"PrivateTrustCIPolicy\",\n /** VBSEnclave */\n VBSEnclave = \"VBSEnclave\",\n /** PublicTrustTest */\n PublicTrustTest = \"PublicTrustTest\",\n}\n\n/**\n * Type of the certificate \\\n * {@link KnownProfileType} can be used interchangeably with ProfileType,\n * this enum contains the known values that the service supports.\n * ### Known values supported by the service\n * **PublicTrust** \\\n * **PrivateTrust** \\\n * **PrivateTrustCIPolicy** \\\n * **VBSEnclave** \\\n * **PublicTrustTest**\n */\nexport type ProfileType = string;\n\n/** Known values of {@link ProvisioningState} that the service accepts. */\nexport enum KnownProvisioningState {\n /** Succeeded */\n Succeeded = \"Succeeded\",\n /** Failed */\n Failed = \"Failed\",\n /** Canceled */\n Canceled = \"Canceled\",\n /** Updating */\n Updating = \"Updating\",\n /** Deleting */\n Deleting = \"Deleting\",\n /** Accepted */\n Accepted = \"Accepted\",\n}\n\n/**\n * The status of the current operation. \\\n * {@link KnownProvisioningState} can be used interchangeably with ProvisioningState,\n * this enum contains the known values that the service supports.\n * ### Known values supported by the service\n * **Succeeded** \\\n * **Failed** \\\n * **Canceled** \\\n * **Updating** \\\n * **Deleting** \\\n * **Accepted**\n */\nexport type ProvisioningState = string;\n\n/** Known values of {@link CertificateProfileStatus} that the service accepts. */\nexport enum KnownCertificateProfileStatus {\n /** Active */\n Active = \"Active\",\n /** Disabled */\n Disabled = \"Disabled\",\n /** Suspended */\n Suspended = \"Suspended\",\n}\n\n/**\n * Status of the certificate profiles. \\\n * {@link KnownCertificateProfileStatus} can be used interchangeably with CertificateProfileStatus,\n * this enum contains the known values that the service supports.\n * ### Known values supported by the service\n * **Active** \\\n * **Disabled** \\\n * **Suspended**\n */\nexport type CertificateProfileStatus = string;\n\n/** Properties of the certificate. */\nexport interface Certificate {\n /** Serial number of the certificate. */\n serialNumber?: string;\n /** Subject name of the certificate. */\n subjectName?: string;\n /** Thumbprint of the certificate. */\n thumbprint?: string;\n /** Certificate created date. */\n createdDate?: string;\n /** Certificate expiry date. */\n expiryDate?: string;\n /** Status of the certificate. */\n status?: CertificateStatus;\n /** Revocations history of a certificate. */\n revocation?: Revocation;\n}\n\n/** Known values of {@link CertificateStatus} that the service accepts. */\nexport enum KnownCertificateStatus {\n /** Active */\n Active = \"Active\",\n /** Expired */\n Expired = \"Expired\",\n /** Revoked */\n Revoked = \"Revoked\",\n}\n\n/**\n * Status of the certificate \\\n * {@link KnownCertificateStatus} can be used interchangeably with CertificateStatus,\n * this enum contains the known values that the service supports.\n * ### Known values supported by the service\n * **Active** \\\n * **Expired** \\\n * **Revoked**\n */\nexport type CertificateStatus = string;\n\n/** Revocation details of the certificate. */\nexport interface Revocation {\n /** The timestamp when the revocation is requested. */\n requestedAt?: Date;\n /** The timestamp when the revocation is effective. */\n effectiveAt?: Date;\n /** Reason for revocation. */\n reason?: string;\n /** Remarks for the revocation. */\n remarks?: string;\n /** Status of the revocation. */\n status?: RevocationStatus;\n /** Reason for the revocation failure. */\n failureReason?: string;\n}\n\n/** Known values of {@link RevocationStatus} that the service accepts. */\nexport enum KnownRevocationStatus {\n /** Succeeded */\n Succeeded = \"Succeeded\",\n /** InProgress */\n InProgress = \"InProgress\",\n /** Failed */\n Failed = \"Failed\",\n}\n\n/**\n * Revocation status of the certificate. \\\n * {@link KnownRevocationStatus} can be used interchangeably with RevocationStatus,\n * this enum contains the known values that the service supports.\n * ### Known values supported by the service\n * **Succeeded** \\\n * **InProgress** \\\n * **Failed**\n */\nexport type RevocationStatus = string;\n\n/** The response of a CertificateProfile list operation. */\nexport interface _CertificateProfileListResult {\n /** The CertificateProfile items on this page */\n value: CertificateProfile[];\n /** The link to the next page of items */\n nextLink?: string;\n}\n\n/** Defines the certificate revocation properties. */\nexport interface RevokeCertificate {\n /** Serial number of the certificate. */\n serialNumber: string;\n /** Thumbprint of the certificate. */\n thumbprint: string;\n /** The timestamp when the revocation is effective. */\n effectiveAt: Date;\n /** Reason for the revocation. */\n reason: string;\n /** Remarks for the revocation. */\n remarks?: string;\n}\n\nexport function revokeCertificateSerializer(item: RevokeCertificate): Record<string, unknown> {\n return {\n serialNumber: item[\"serialNumber\"],\n thumbprint: item[\"thumbprint\"],\n effectiveAt: item[\"effectiveAt\"].toISOString(),\n reason: item[\"reason\"],\n remarks: item[\"remarks\"],\n };\n}\n\n/** The resource model definition for an Azure Resource Manager tracked top level resource which has 'tags' and a 'location' */\nexport interface TrackedResource extends Resource {\n /** Resource tags. */\n tags?: Record<string, string>;\n /** The geo-location where the resource lives */\n location: string;\n}\n\nexport function trackedResourceSerializer(item: TrackedResource): Record<string, unknown> {\n return {\n tags: !item.tags ? item.tags : (serializeRecord(item.tags as any) as any),\n location: item[\"location\"],\n };\n}\n\n/** Trusted signing account resource. */\nexport interface CodeSigningAccount extends TrackedResource {\n /** The resource-specific properties for this resource. */\n properties?: CodeSigningAccountProperties;\n}\n\nexport function codeSigningAccountSerializer(item: CodeSigningAccount): Record<string, unknown> {\n return {\n tags: !item.tags ? item.tags : (serializeRecord(item.tags as any) as any),\n location: item[\"location\"],\n properties: !item.properties\n ? item.properties\n : codeSigningAccountPropertiesSerializer(item.properties),\n };\n}\n\n/** Properties of the trusted signing account. */\nexport interface CodeSigningAccountProperties {\n /** The URI of the trusted signing account which is used during signing files. */\n readonly accountUri?: string;\n /** SKU of the trusted signing account. */\n sku?: AccountSku;\n /** Status of the current operation on trusted signing account. */\n readonly provisioningState?: ProvisioningState;\n}\n\nexport function codeSigningAccountPropertiesSerializer(\n item: CodeSigningAccountProperties,\n): Record<string, unknown> {\n return {\n sku: !item.sku ? item.sku : accountSkuSerializer(item.sku),\n };\n}\n\n/** SKU of the trusted signing account. */\nexport interface AccountSku {\n /** Name of the SKU. */\n name: SkuName;\n}\n\nexport function accountSkuSerializer(item: AccountSku): Record<string, unknown> {\n return {\n name: item[\"name\"],\n };\n}\n\n/** Known values of {@link SkuName} that the service accepts. */\nexport enum KnownSkuName {\n /** Basic */\n Basic = \"Basic\",\n /** Premium */\n Premium = \"Premium\",\n}\n\n/**\n * Name of the sku. \\\n * {@link KnownSkuName} can be used interchangeably with SkuName,\n * this enum contains the known values that the service supports.\n * ### Known values supported by the service\n * **Basic** \\\n * **Premium**\n */\nexport type SkuName = string;\n\n/** Parameters for creating or updating a trusted signing account. */\nexport interface CodeSigningAccountPatch {\n /** Resource tags. */\n tags?: Record<string, string>;\n /** Properties of the trusted signing account. */\n properties?: CodeSigningAccountPatchProperties;\n}\n\nexport function codeSigningAccountPatchSerializer(\n item: CodeSigningAccountPatch,\n): Record<string, unknown> {\n return {\n tags: !item.tags ? item.tags : (serializeRecord(item.tags as any) as any),\n properties: !item.properties\n ? item.properties\n : codeSigningAccountPatchPropertiesSerializer(item.properties),\n };\n}\n\n/** Properties of the trusted signing account. */\nexport interface CodeSigningAccountPatchProperties {\n /** SKU of the trusted signing account. */\n sku?: AccountSku;\n}\n\nexport function codeSigningAccountPatchPropertiesSerializer(\n item: CodeSigningAccountPatchProperties,\n): Record<string, unknown> {\n return {\n sku: !item.sku ? item.sku : accountSkuSerializer(item.sku),\n };\n}\n\n/** The response of a CodeSigningAccount list operation. */\nexport interface _CodeSigningAccountListResult {\n /** The CodeSigningAccount items on this page */\n value: CodeSigningAccount[];\n /** The link to the next page of items */\n nextLink?: string;\n}\n\n/** The parameters used to check the availability of the trusted signing account name. */\nexport interface CheckNameAvailability {\n /** Trusted signing account name. */\n name: string;\n}\n\nexport function checkNameAvailabilitySerializer(\n item: CheckNameAvailability,\n): Record<string, unknown> {\n return {\n name: item[\"name\"],\n };\n}\n\n/** The CheckNameAvailability operation response. */\nexport interface CheckNameAvailabilityResult {\n /** A boolean value that indicates whether the name is available for you to use. If true, the name is available. If false, the name has already been taken or is invalid and cannot be used. */\n readonly nameAvailable?: boolean;\n /** The reason that a trusted signing account name could not be used. The Reason element is only returned if nameAvailable is false. */\n readonly reason?: NameUnavailabilityReason;\n /** An error message explaining the Reason value in more detail. */\n readonly message?: string;\n}\n\n/** Known values of {@link NameUnavailabilityReason} that the service accepts. */\nexport enum KnownNameUnavailabilityReason {\n /** AccountNameInvalid */\n AccountNameInvalid = \"AccountNameInvalid\",\n /** AlreadyExists */\n AlreadyExists = \"AlreadyExists\",\n}\n\n/**\n * The reason that a trusted signing account name could not be used. The Reason element is only returned if nameAvailable is false. \\\n * {@link KnownNameUnavailabilityReason} can be used interchangeably with NameUnavailabilityReason,\n * this enum contains the known values that the service supports.\n * ### Known values supported by the service\n * **AccountNameInvalid** \\\n * **AlreadyExists**\n */\nexport type NameUnavailabilityReason = string;\n\n/** A list of REST API operations supported by an Azure Resource Provider. It contains an URL link to get the next set of results. */\nexport interface _OperationListResult {\n /** The Operation items on this page */\n value: Operation[];\n /** The link to the next page of items */\n nextLink?: string;\n}\n\n/** Details of a REST API operation, returned from the Resource Provider Operations API */\nexport interface Operation {\n /** The name of the operation, as per Resource-Based Access Control (RBAC). Examples: \"Microsoft.Compute/virtualMachines/write\", \"Microsoft.Compute/virtualMachines/capture/action\" */\n readonly name?: string;\n /** Whether the operation applies to data-plane. This is \"true\" for data-plane operations and \"false\" for Azure Resource Manager/control-plane operations. */\n readonly isDataAction?: boolean;\n /** Localized display information for this particular operation. */\n readonly display?: OperationDisplay;\n /** The intended executor of the operation; as in Resource Based Access Control (RBAC) and audit logs UX. Default value is \"user,system\" */\n readonly origin?: Origin;\n /** Extensible enum. Indicates the action type. \"Internal\" refers to actions that are for internal only APIs. */\n actionType?: ActionType;\n}\n\n/** Localized display information for and operation. */\nexport interface OperationDisplay {\n /** The localized friendly form of the resource provider name, e.g. \"Microsoft Monitoring Insights\" or \"Microsoft Compute\". */\n readonly provider?: string;\n /** The localized friendly name of the resource type related to this operation. E.g. \"Virtual Machines\" or \"Job Schedule Collections\". */\n readonly resource?: string;\n /** The concise, localized friendly name for the operation; suitable for dropdowns. E.g. \"Create or Update Virtual Machine\", \"Restart Virtual Machine\". */\n readonly operation?: string;\n /** The short, localized friendly description of the operation; suitable for tool tips and detailed views. */\n readonly description?: string;\n}\n\n/** Known values of {@link Origin} that the service accepts. */\nexport enum KnownOrigin {\n /** user */\n User = \"user\",\n /** system */\n System = \"system\",\n /** user,system */\n UserSystem = \"user,system\",\n}\n\n/**\n * The intended executor of the operation; as in Resource Based Access Control (RBAC) and audit logs UX. Default value is \"user,system\" \\\n * {@link KnownOrigin} can be used interchangeably with Origin,\n * this enum contains the known values that the service supports.\n * ### Known values supported by the service\n * **user** \\\n * **system** \\\n * **user,system**\n */\nexport type Origin = string;\n\n/** Known values of {@link ActionType} that the service accepts. */\nexport enum KnownActionType {\n /** Internal */\n Internal = \"Internal\",\n}\n\n/**\n * Extensible enum. Indicates the action type. \"Internal\" refers to actions that are for internal only APIs. \\\n * {@link KnownActionType} can be used interchangeably with ActionType,\n * this enum contains the known values that the service supports.\n * ### Known values supported by the service\n * **Internal**\n */\nexport type ActionType = string;\n"]}
1
+ {"version":3,"file":"models.js","sourceRoot":"","sources":["../../../src/models/models.ts"],"names":[],"mappings":"AAAA,uCAAuC;AACvC,kCAAkC;AAUlC,MAAM,UAAU,gCAAgC,CAAC,IAAS;IACxD,OAAO;QACL,KAAK,EAAE,0BAA0B,CAAC,IAAI,CAAC,OAAO,CAAC,CAAC;QAChD,QAAQ,EAAE,IAAI,CAAC,UAAU,CAAC;KAC3B,CAAC;AACJ,CAAC;AAED,MAAM,UAAU,0BAA0B,CAAC,MAAwB;IACjE,OAAO,MAAM,CAAC,GAAG,CAAC,CAAC,IAAI,EAAE,EAAE;QACzB,OA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YAC7B,CAAC,CAAC,IAAI,CAAC,YAAY,CAAC;YACpB,CAAC,CAAC,sBAAsB,CAAC,IAAI,CAAC,YAAY,CAAC,CAAC;KAC/C,CAAC;AACJ,CAAC;AAUD,MAAM,UAAU,yCAAyC,CACvD,IAAS;IAET,OAAO;QACL,KAAK,EAAE,mCAAmC,CAAC,IAAI,CAAC,OAAO,CAAC,CAAC;QACzD,QAAQ,EAAE,IAAI,CAAC,UAAU,CAAC;KAC3B,CAAC;AACJ,CAAC;AAED,MAAM,UAAU,iCAAiC,CAAC,MAAiC;IACjF,OAAO,MAAM,CAAC,GAAG,CAAC,CAAC,IAAI,EAAE,EAAE;QACzB,OAAO,4BAA4B,CAAC,IAAI,CAAC,CAAC;IAC5C,CAAC,CAAC,CAAC;AACL,CAAC;AAED,MAAM,UAAU,mCAAmC,CAAC,MAAiC;IACnF,OAAO,MAAM,CAAC,GAAG,CAAC,CAAC,IAAI,EAAE,EAAE;QACzB,OAAO,8BAA8B,CAAC,IAAI,CAAC,CAAC;IAC9C,CAAC,CAAC,CAAC;AACL,CAAC;AAgBD,MAAM,UAAU,2BAA2B,CAAC,IAAuB;IACjE,OAAO;QACL,YAAY,EAAE,IAAI,CAAC,cAAc,CAAC;QAClC,UAAU,EAAE,IAAI,CAAC,YAAY,CAAC;QAC9B,WAAW,EAAE,IAAI,CAAC,aAAa,CAAC,CAAC,WAAW,EAAE;QAC9C,MAAM,EAAE,IAAI,CAAC,QAAQ,CAAC;QACtB,OAAO,EAAE,IAAI,CAAC,SAAS,CAAC;KACzB,CAAC;AACJ,CAAC;AAED,kCAAkC;AAClC,MAAM,CAAN,IAAY,aAGX;AAHD,WAAY,aAAa;IACvB,iBAAiB;IACjB,yCAAwB,CAAA;AAC1B,CAAC,EAHW,aAAa,KAAb,aAAa,QAGxB","sourcesContent":["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT License.\n\n/** A list of REST API operations supported by an Azure Resource Provider. It contains an URL link to get the next set of results. */\nexport interface _OperationListResult {\n /** The Operation items on this page */\n value: Operation[];\n /** The link to the next page of items */\n nextLink?: string;\n}\n\nexport function _operationListResultDeserializer(item: any): _OperationListResult {\n return {\n value: operationArrayDeserializer(item[\"value\"]),\n nextLink: item[\"nextLink\"],\n };\n}\n\nexport function operationArrayDeserializer(result: Array<Operation>): any[] {\n return result.map((item) => {\n return operationDeserializer(item);\n });\n}\n\n/** Details of a REST API operation, returned from the Resource Provider Operations API */\nexport interface Operation {\n /** The name of the operation, as per Resource-Based Access Control (RBAC). Examples: \"Microsoft.Compute/virtualMachines/write\", \"Microsoft.Compute/virtualMachines/capture/action\" */\n readonly name?: string;\n /** Whether the operation applies to data-plane. This is \"true\" for data-plane operations and \"false\" for Azure Resource Manager/control-plane operations. */\n readonly isDataAction?: boolean;\n /** Localized display information for this particular operation. */\n display?: OperationDisplay;\n /** The intended executor of the operation; as in Resource Based Access Control (RBAC) and audit logs UX. Default value is \"user,system\" */\n readonly origin?: Origin;\n /** Extensible enum. Indicates the action type. \"Internal\" refers to actions that are for internal only APIs. */\n readonly actionType?: ActionType;\n}\n\nexport function operationDeserializer(item: any): Operation {\n return {\n name: item[\"name\"],\n isDataAction: item[\"isDataAction\"],\n display: !item[\"display\"] ? item[\"display\"] : operationDisplayDeserializer(item[\"display\"]),\n origin: item[\"origin\"],\n actionType: item[\"actionType\"],\n };\n}\n\n/** Localized display information for and operation. */\nexport interface OperationDisplay {\n /** The localized friendly form of the resource provider name, e.g. \"Microsoft Monitoring Insights\" or \"Microsoft Compute\". */\n readonly provider?: string;\n /** The localized friendly name of the resource type related to this operation. E.g. \"Virtual Machines\" or \"Job Schedule Collections\". */\n readonly resource?: string;\n /** The concise, localized friendly name for the operation; suitable for dropdowns. E.g. \"Create or Update Virtual Machine\", \"Restart Virtual Machine\". */\n readonly operation?: string;\n /** The short, localized friendly description of the operation; suitable for tool tips and detailed views. */\n readonly description?: string;\n}\n\nexport function operationDisplayDeserializer(item: any): OperationDisplay {\n return {\n provider: item[\"provider\"],\n resource: item[\"resource\"],\n operation: item[\"operation\"],\n description: item[\"description\"],\n };\n}\n\n/** The intended executor of the operation; as in Resource Based Access Control (RBAC) and audit logs UX. Default value is \"user,system\" */\nexport enum KnownOrigin {\n /** Indicates the operation is initiated by a user. */\n User = \"user\",\n /** Indicates the operation is initiated by a system. */\n System = \"system\",\n /** Indicates the operation is initiated by a user or system. */\n UserSystem = \"user,system\",\n}\n\n/**\n * The intended executor of the operation; as in Resource Based Access Control (RBAC) and audit logs UX. Default value is \"user,system\" \\\n * {@link KnownOrigin} can be used interchangeably with Origin,\n * this enum contains the known values that the service supports.\n * ### Known values supported by the service\n * **user**: Indicates the operation is initiated by a user. \\\n * **system**: Indicates the operation is initiated by a system. \\\n * **user,system**: Indicates the operation is initiated by a user or system.\n */\nexport type Origin = string;\n\n/** Extensible enum. Indicates the action type. \"Internal\" refers to actions that are for internal only APIs. */\nexport enum KnownActionType {\n /** Actions are for internal-only APIs. */\n Internal = \"Internal\",\n}\n\n/**\n * Extensible enum. Indicates the action type. \"Internal\" refers to actions that are for internal only APIs. \\\n * {@link KnownActionType} can be used interchangeably with ActionType,\n * this enum contains the known values that the service supports.\n * ### Known values supported by the service\n * **Internal**: Actions are for internal-only APIs.\n */\nexport type ActionType = string;\n\n/** Common error response for all Azure Resource Manager APIs to return error details for failed operations. */\nexport interface ErrorResponse {\n /** The error object. */\n error?: ErrorDetail;\n}\n\nexport function errorResponseDeserializer(item: any): ErrorResponse {\n return {\n error: !item[\"error\"] ? item[\"error\"] : errorDetailDeserializer(item[\"error\"]),\n };\n}\n\n/** The error detail. */\nexport interface ErrorDetail {\n /** The error code. */\n readonly code?: string;\n /** The error message. */\n readonly message?: string;\n /** The error target. */\n readonly target?: string;\n /** The error details. */\n readonly details?: ErrorDetail[];\n /** The error additional info. */\n readonly additionalInfo?: ErrorAdditionalInfo[];\n}\n\nexport function errorDetailDeserializer(item: any): ErrorDetail {\n return {\n code: item[\"code\"],\n message: item[\"message\"],\n target: item[\"target\"],\n details: !item[\"details\"] ? item[\"details\"] : errorDetailArrayDeserializer(item[\"details\"]),\n additionalInfo: !item[\"additionalInfo\"]\n ? item[\"additionalInfo\"]\n : errorAdditionalInfoArrayDeserializer(item[\"additionalInfo\"]),\n };\n}\n\nexport function errorDetailArrayDeserializer(result: Array<ErrorDetail>): any[] {\n return result.map((item) => {\n return errorDetailDeserializer(item);\n });\n}\n\nexport function errorAdditionalInfoArrayDeserializer(result: Array<ErrorAdditionalInfo>): any[] {\n return result.map((item) => {\n return errorAdditionalInfoDeserializer(item);\n });\n}\n\n/** The resource management error additional info. */\nexport interface ErrorAdditionalInfo {\n /** The additional info type. */\n readonly type?: string;\n /** The additional info. */\n readonly info?: any;\n}\n\nexport function errorAdditionalInfoDeserializer(item: any): ErrorAdditionalInfo {\n return {\n type: item[\"type\"],\n info: item[\"info\"],\n };\n}\n\n/** Trusted signing account resource. */\nexport interface CodeSigningAccount extends TrackedResource {\n /** The resource-specific properties for this resource. */\n properties?: CodeSigningAccountProperties;\n}\n\nexport function codeSigningAccountSerializer(item: CodeSigningAccount): any {\n return {\n tags: item[\"tags\"],\n location: item[\"location\"],\n properties: !item[\"properties\"]\n ? item[\"properties\"]\n : codeSigningAccountPropertiesSerializer(item[\"properties\"]),\n };\n}\n\nexport function codeSigningAccountDeserializer(item: any): CodeSigningAccount {\n return {\n tags: item[\"tags\"],\n location: item[\"location\"],\n id: item[\"id\"],\n name: item[\"name\"],\n type: item[\"type\"],\n systemData: !item[\"systemData\"]\n ? item[\"systemData\"]\n : systemDataDeserializer(item[\"systemData\"]),\n properties: !item[\"properties\"]\n ? item[\"properties\"]\n : codeSigningAccountPropertiesDeserializer(item[\"properties\"]),\n };\n}\n\n/** Properties of the trusted signing account. */\nexport interface CodeSigningAccountProperties {\n /** The URI of the trusted signing account which is used during signing files. */\n readonly accountUri?: string;\n /** SKU of the trusted signing account. */\n sku?: AccountSku;\n /** Status of the current operation on trusted signing account. */\n readonly provisioningState?: ProvisioningState;\n}\n\nexport function codeSigningAccountPropertiesSerializer(item: CodeSigningAccountProperties): any {\n return {\n sku: !item[\"sku\"] ? item[\"sku\"] : accountSkuSerializer(item[\"sku\"]),\n };\n}\n\nexport function codeSigningAccountPropertiesDeserializer(item: any): CodeSigningAccountProperties {\n return {\n accountUri: item[\"accountUri\"],\n sku: !item[\"sku\"] ? item[\"sku\"] : accountSkuDeserializer(item[\"sku\"]),\n provisioningState: item[\"provisioningState\"],\n };\n}\n\n/** SKU of the trusted signing account. */\nexport interface AccountSku {\n /** Name of the SKU. */\n name: SkuName;\n}\n\nexport function accountSkuSerializer(item: AccountSku): any {\n return { name: item[\"name\"] };\n}\n\nexport function accountSkuDeserializer(item: any): AccountSku {\n return {\n name: item[\"name\"],\n };\n}\n\n/** Name of the sku. */\nexport enum KnownSkuName {\n /** Basic sku. */\n Basic = \"Basic\",\n /** Premium sku. */\n Premium = \"Premium\",\n}\n\n/**\n * Name of the sku. \\\n * {@link KnownSkuName} can be used interchangeably with SkuName,\n * this enum contains the known values that the service supports.\n * ### Known values supported by the service\n * **Basic**: Basic sku. \\\n * **Premium**: Premium sku.\n */\nexport type SkuName = string;\n\n/** The status of the current operation. */\nexport enum KnownProvisioningState {\n /** Resource has been created. */\n Succeeded = \"Succeeded\",\n /** Resource creation failed. */\n Failed = \"Failed\",\n /** Resource creation was canceled. */\n Canceled = \"Canceled\",\n /** Updating in progress. */\n Updating = \"Updating\",\n /** Deletion in progress. */\n Deleting = \"Deleting\",\n /** Resource creation started. */\n Accepted = \"Accepted\",\n}\n\n/**\n * The status of the current operation. \\\n * {@link KnownProvisioningState} can be used interchangeably with ProvisioningState,\n * this enum contains the known values that the service supports.\n * ### Known values supported by the service\n * **Succeeded**: Resource has been created. \\\n * **Failed**: Resource creation failed. \\\n * **Canceled**: Resource creation was canceled. \\\n * **Updating**: Updating in progress. \\\n * **Deleting**: Deletion in progress. \\\n * **Accepted**: Resource creation started.\n */\nexport type ProvisioningState = string;\n\n/** The resource model definition for an Azure Resource Manager tracked top level resource which has 'tags' and a 'location' */\nexport interface TrackedResource extends Resource {\n /** Resource tags. */\n tags?: Record<string, string>;\n /** The geo-location where the resource lives */\n location: string;\n}\n\nexport function trackedResourceSerializer(item: TrackedResource): any {\n return { tags: item[\"tags\"], location: item[\"location\"] };\n}\n\nexport function trackedResourceDeserializer(item: any): TrackedResource {\n return {\n id: item[\"id\"],\n name: item[\"name\"],\n type: item[\"type\"],\n systemData: !item[\"systemData\"]\n ? item[\"systemData\"]\n : systemDataDeserializer(item[\"systemData\"]),\n tags: item[\"tags\"],\n location: item[\"location\"],\n };\n}\n\n/** Common fields that are returned in the response for all Azure Resource Manager resources */\nexport interface Resource {\n /** Fully qualified resource ID for the resource. Ex - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName} */\n readonly id?: string;\n /** The name of the resource */\n readonly name?: string;\n /** The type of the resource. E.g. \"Microsoft.Compute/virtualMachines\" or \"Microsoft.Storage/storageAccounts\" */\n readonly type?: string;\n /** Azure Resource Manager metadata containing createdBy and modifiedBy information. */\n readonly systemData?: SystemData;\n}\n\nexport function resourceSerializer(item: Resource): any {\n return item;\n}\n\nexport function resourceDeserializer(item: any): Resource {\n return {\n id: item[\"id\"],\n name: item[\"name\"],\n type: item[\"type\"],\n systemData: !item[\"systemData\"]\n ? item[\"systemData\"]\n : systemDataDeserializer(item[\"systemData\"]),\n };\n}\n\n/** Metadata pertaining to creation and last modification of the resource. */\nexport interface SystemData {\n /** The identity that created the resource. */\n createdBy?: string;\n /** The type of identity that created the resource. */\n createdByType?: CreatedByType;\n /** The timestamp of resource creation (UTC). */\n createdAt?: Date;\n /** The identity that last modified the resource. */\n lastModifiedBy?: string;\n /** The type of identity that last modified the resource. */\n lastModifiedByType?: CreatedByType;\n /** The timestamp of resource last modification (UTC) */\n lastModifiedAt?: Date;\n}\n\nexport function systemDataDeserializer(item: any): SystemData {\n return {\n createdBy: item[\"createdBy\"],\n createdByType: item[\"createdByType\"],\n createdAt: !item[\"createdAt\"] ? item[\"createdAt\"] : new Date(item[\"createdAt\"]),\n lastModifiedBy: item[\"lastModifiedBy\"],\n lastModifiedByType: item[\"lastModifiedByType\"],\n lastModifiedAt: !item[\"lastModifiedAt\"]\n ? item[\"lastModifiedAt\"]\n : new Date(item[\"lastModifiedAt\"]),\n };\n}\n\n/** The kind of entity that created the resource. */\nexport enum KnownCreatedByType {\n /** The entity was created by a user. */\n User = \"User\",\n /** The entity was created by an application. */\n Application = \"Application\",\n /** The entity was created by a managed identity. */\n ManagedIdentity = \"ManagedIdentity\",\n /** The entity was created by a key. */\n Key = \"Key\",\n}\n\n/**\n * The kind of entity that created the resource. \\\n * {@link KnownCreatedByType} can be used interchangeably with CreatedByType,\n * this enum contains the known values that the service supports.\n * ### Known values supported by the service\n * **User**: The entity was created by a user. \\\n * **Application**: The entity was created by an application. \\\n * **ManagedIdentity**: The entity was created by a managed identity. \\\n * **Key**: The entity was created by a key.\n */\nexport type CreatedByType = string;\n\n/** Parameters for creating or updating a trusted signing account. */\nexport interface CodeSigningAccountPatch {\n /** Resource tags. */\n tags?: Record<string, string>;\n /** Properties of the trusted signing account. */\n properties?: CodeSigningAccountPatchProperties;\n}\n\nexport function codeSigningAccountPatchSerializer(item: CodeSigningAccountPatch): any {\n return {\n tags: item[\"tags\"],\n properties: !item[\"properties\"]\n ? item[\"properties\"]\n : codeSigningAccountPatchPropertiesSerializer(item[\"properties\"]),\n };\n}\n\n/** Properties of the trusted signing account. */\nexport interface CodeSigningAccountPatchProperties {\n /** SKU of the trusted signing account. */\n sku?: AccountSkuPatch;\n}\n\nexport function codeSigningAccountPatchPropertiesSerializer(\n item: CodeSigningAccountPatchProperties,\n): any {\n return {\n sku: !item[\"sku\"] ? item[\"sku\"] : accountSkuPatchSerializer(item[\"sku\"]),\n };\n}\n\n/** SKU of the trusted signing account. */\nexport interface AccountSkuPatch {\n /** Name of the SKU. */\n name?: SkuName;\n}\n\nexport function accountSkuPatchSerializer(item: AccountSkuPatch): any {\n return { name: item[\"name\"] };\n}\n\n/** The response of a CodeSigningAccount list operation. */\nexport interface _CodeSigningAccountListResult {\n /** The CodeSigningAccount items on this page */\n value: CodeSigningAccount[];\n /** The link to the next page of items */\n nextLink?: string;\n}\n\nexport function _codeSigningAccountListResultDeserializer(\n item: any,\n): _CodeSigningAccountListResult {\n return {\n value: codeSigningAccountArrayDeserializer(item[\"value\"]),\n nextLink: item[\"nextLink\"],\n };\n}\n\nexport function codeSigningAccountArraySerializer(result: Array<CodeSigningAccount>): any[] {\n return result.map((item) => {\n return codeSigningAccountSerializer(item);\n });\n}\n\nexport function codeSigningAccountArrayDeserializer(result: Array<CodeSigningAccount>): any[] {\n return result.map((item) => {\n return codeSigningAccountDeserializer(item);\n });\n}\n\n/** The parameters used to check the availability of the trusted signing account name. */\nexport interface CheckNameAvailability {\n /** Trusted signing account name. */\n name: string;\n}\n\nexport function checkNameAvailabilitySerializer(item: CheckNameAvailability): any {\n return { name: item[\"name\"] };\n}\n\n/** The CheckNameAvailability operation response. */\nexport interface CheckNameAvailabilityResult {\n /** A boolean value that indicates whether the name is available for you to use. If true, the name is available. If false, the name has already been taken or is invalid and cannot be used. */\n readonly nameAvailable?: boolean;\n /** The reason that a trusted signing account name could not be used. The Reason element is only returned if nameAvailable is false. */\n readonly reason?: NameUnavailabilityReason;\n /** An error message explaining the Reason value in more detail. */\n readonly message?: string;\n}\n\nexport function checkNameAvailabilityResultDeserializer(item: any): CheckNameAvailabilityResult {\n return {\n nameAvailable: item[\"nameAvailable\"],\n reason: item[\"reason\"],\n message: item[\"message\"],\n };\n}\n\n/** The reason that a trusted signing account name could not be used. The Reason element is only returned if nameAvailable is false. */\nexport enum KnownNameUnavailabilityReason {\n /** Account name is invalid */\n AccountNameInvalid = \"AccountNameInvalid\",\n /** Account name already exists */\n AlreadyExists = \"AlreadyExists\",\n}\n\n/**\n * The reason that a trusted signing account name could not be used. The Reason element is only returned if nameAvailable is false. \\\n * {@link KnownNameUnavailabilityReason} can be used interchangeably with NameUnavailabilityReason,\n * this enum contains the known values that the service supports.\n * ### Known values supported by the service\n * **AccountNameInvalid**: Account name is invalid \\\n * **AlreadyExists**: Account name already exists\n */\nexport type NameUnavailabilityReason = string;\n\n/** Certificate profile resource. */\nexport interface CertificateProfile extends ProxyResource {\n /** The resource-specific properties for this resource. */\n properties?: CertificateProfileProperties;\n}\n\nexport function certificateProfileSerializer(item: CertificateProfile): any {\n return {\n properties: !item[\"properties\"]\n ? item[\"properties\"]\n : certificateProfilePropertiesSerializer(item[\"properties\"]),\n };\n}\n\nexport function certificateProfileDeserializer(item: any): CertificateProfile {\n return {\n id: item[\"id\"],\n name: item[\"name\"],\n type: item[\"type\"],\n systemData: !item[\"systemData\"]\n ? item[\"systemData\"]\n : systemDataDeserializer(item[\"systemData\"]),\n properties: !item[\"properties\"]\n ? item[\"properties\"]\n : certificateProfilePropertiesDeserializer(item[\"properties\"]),\n };\n}\n\n/** Properties of the certificate profile. */\nexport interface CertificateProfileProperties {\n /** Profile type of the certificate. */\n profileType: ProfileType;\n /** Whether to include STREET in the certificate subject name. */\n includeStreetAddress?: boolean;\n /** Whether to include L in the certificate subject name. Applicable only for private trust, private trust ci profile types */\n includeCity?: boolean;\n /** Whether to include S in the certificate subject name. Applicable only for private trust, private trust ci profile types */\n includeState?: boolean;\n /** Whether to include C in the certificate subject name. Applicable only for private trust, private trust ci profile types */\n includeCountry?: boolean;\n /** Whether to include PC in the certificate subject name. */\n includePostalCode?: boolean;\n /** Identity validation id used for the certificate subject name. */\n identityValidationId: string;\n /** Status of the current operation on certificate profile. */\n readonly provisioningState?: ProvisioningState;\n /** Status of the certificate profile. */\n readonly status?: CertificateProfileStatus;\n /** List of renewed certificates. */\n readonly certificates?: Certificate[];\n}\n\nexport function certificateProfilePropertiesSerializer(item: CertificateProfileProperties): any {\n return {\n profileType: item[\"profileType\"],\n includeStreetAddress: item[\"includeStreetAddress\"],\n includeCity: item[\"includeCity\"],\n includeState: item[\"includeState\"],\n includeCountry: item[\"includeCountry\"],\n includePostalCode: item[\"includePostalCode\"],\n identityValidationId: item[\"identityValidationId\"],\n };\n}\n\nexport function certificateProfilePropertiesDeserializer(item: any): CertificateProfileProperties {\n return {\n profileType: item[\"profileType\"],\n includeStreetAddress: item[\"includeStreetAddress\"],\n includeCity: item[\"includeCity\"],\n includeState: item[\"includeState\"],\n includeCountry: item[\"includeCountry\"],\n includePostalCode: item[\"includePostalCode\"],\n identityValidationId: item[\"identityValidationId\"],\n provisioningState: item[\"provisioningState\"],\n status: item[\"status\"],\n certificates: !item[\"certificates\"]\n ? item[\"certificates\"]\n : certificateArrayDeserializer(item[\"certificates\"]),\n };\n}\n\n/** Type of the certificate */\nexport enum KnownProfileType {\n /** Used for signing files which are distributed publicly. */\n PublicTrust = \"PublicTrust\",\n /** Used for signing files which are distributed internally within organization or group boundary. */\n PrivateTrust = \"PrivateTrust\",\n /** Used for signing CI policy files. */\n PrivateTrustCIPolicy = \"PrivateTrustCIPolicy\",\n /** Used for signing files which are run in secure vbs enclave. */\n VBSEnclave = \"VBSEnclave\",\n /** Used for signing files for testing purpose. */\n PublicTrustTest = \"PublicTrustTest\",\n}\n\n/**\n * Type of the certificate \\\n * {@link KnownProfileType} can be used interchangeably with ProfileType,\n * this enum contains the known values that the service supports.\n * ### Known values supported by the service\n * **PublicTrust**: Used for signing files which are distributed publicly. \\\n * **PrivateTrust**: Used for signing files which are distributed internally within organization or group boundary. \\\n * **PrivateTrustCIPolicy**: Used for signing CI policy files. \\\n * **VBSEnclave**: Used for signing files which are run in secure vbs enclave. \\\n * **PublicTrustTest**: Used for signing files for testing purpose.\n */\nexport type ProfileType = string;\n\n/** Status of the certificate profiles. */\nexport enum KnownCertificateProfileStatus {\n /** The certificate profile is active. */\n Active = \"Active\",\n /** The certificate profile is disabled. */\n Disabled = \"Disabled\",\n /** The certificate profile is suspended. */\n Suspended = \"Suspended\",\n}\n\n/**\n * Status of the certificate profiles. \\\n * {@link KnownCertificateProfileStatus} can be used interchangeably with CertificateProfileStatus,\n * this enum contains the known values that the service supports.\n * ### Known values supported by the service\n * **Active**: The certificate profile is active. \\\n * **Disabled**: The certificate profile is disabled. \\\n * **Suspended**: The certificate profile is suspended.\n */\nexport type CertificateProfileStatus = string;\n\nexport function certificateArrayDeserializer(result: Array<Certificate>): any[] {\n return result.map((item) => {\n return certificateDeserializer(item);\n });\n}\n\n/** Properties of the certificate. */\nexport interface Certificate {\n /** Serial number of the certificate. */\n serialNumber?: string;\n /** Enhanced key usage of the certificate. */\n enhancedKeyUsage?: string;\n /** Subject name of the certificate. */\n subjectName?: string;\n /** Thumbprint of the certificate. */\n thumbprint?: string;\n /** Certificate created date. */\n createdDate?: string;\n /** Certificate expiry date. */\n expiryDate?: string;\n /** Status of the certificate. */\n status?: CertificateStatus;\n /** Revocations history of a certificate. */\n revocation?: Revocation;\n}\n\nexport function certificateDeserializer(item: any): Certificate {\n return {\n serialNumber: item[\"serialNumber\"],\n enhancedKeyUsage: item[\"enhancedKeyUsage\"],\n subjectName: item[\"subjectName\"],\n thumbprint: item[\"thumbprint\"],\n createdDate: item[\"createdDate\"],\n expiryDate: item[\"expiryDate\"],\n status: item[\"status\"],\n revocation: !item[\"revocation\"]\n ? item[\"revocation\"]\n : revocationDeserializer(item[\"revocation\"]),\n };\n}\n\n/** Status of the certificate */\nexport enum KnownCertificateStatus {\n /** The certificate is active. */\n Active = \"Active\",\n /** The certificate is expired. */\n Expired = \"Expired\",\n /** The certificate is revoked. */\n Revoked = \"Revoked\",\n}\n\n/**\n * Status of the certificate \\\n * {@link KnownCertificateStatus} can be used interchangeably with CertificateStatus,\n * this enum contains the known values that the service supports.\n * ### Known values supported by the service\n * **Active**: The certificate is active. \\\n * **Expired**: The certificate is expired. \\\n * **Revoked**: The certificate is revoked.\n */\nexport type CertificateStatus = string;\n\n/** Revocation details of the certificate. */\nexport interface Revocation {\n /** The timestamp when the revocation is requested. */\n requestedAt?: Date;\n /** The timestamp when the revocation is effective. */\n effectiveAt?: Date;\n /** Reason for revocation. */\n reason?: string;\n /** Remarks for the revocation. */\n remarks?: string;\n /** Status of the revocation. */\n status?: RevocationStatus;\n /** Reason for the revocation failure. */\n failureReason?: string;\n}\n\nexport function revocationDeserializer(item: any): Revocation {\n return {\n requestedAt: !item[\"requestedAt\"] ? item[\"requestedAt\"] : new Date(item[\"requestedAt\"]),\n effectiveAt: !item[\"effectiveAt\"] ? item[\"effectiveAt\"] : new Date(item[\"effectiveAt\"]),\n reason: item[\"reason\"],\n remarks: item[\"remarks\"],\n status: item[\"status\"],\n failureReason: item[\"failureReason\"],\n };\n}\n\n/** Revocation status of the certificate. */\nexport enum KnownRevocationStatus {\n /** Certificate revocation succeeded. */\n Succeeded = \"Succeeded\",\n /** Certificate revocation is in progress. */\n InProgress = \"InProgress\",\n /** Certificate revocation failed. */\n Failed = \"Failed\",\n}\n\n/**\n * Revocation status of the certificate. \\\n * {@link KnownRevocationStatus} can be used interchangeably with RevocationStatus,\n * this enum contains the known values that the service supports.\n * ### Known values supported by the service\n * **Succeeded**: Certificate revocation succeeded. \\\n * **InProgress**: Certificate revocation is in progress. \\\n * **Failed**: Certificate revocation failed.\n */\nexport type RevocationStatus = string;\n\n/** The resource model definition for a Azure Resource Manager proxy resource. It will not have tags and a location */\nexport interface ProxyResource extends Resource {}\n\nexport function proxyResourceSerializer(item: ProxyResource): any {\n return item;\n}\n\nexport function proxyResourceDeserializer(item: any): ProxyResource {\n return {\n id: item[\"id\"],\n name: item[\"name\"],\n type: item[\"type\"],\n systemData: !item[\"systemData\"]\n ? item[\"systemData\"]\n : systemDataDeserializer(item[\"systemData\"]),\n };\n}\n\n/** The response of a CertificateProfile list operation. */\nexport interface _CertificateProfileListResult {\n /** The CertificateProfile items on this page */\n value: CertificateProfile[];\n /** The link to the next page of items */\n nextLink?: string;\n}\n\nexport function _certificateProfileListResultDeserializer(\n item: any,\n): _CertificateProfileListResult {\n return {\n value: certificateProfileArrayDeserializer(item[\"value\"]),\n nextLink: item[\"nextLink\"],\n };\n}\n\nexport function certificateProfileArraySerializer(result: Array<CertificateProfile>): any[] {\n return result.map((item) => {\n return certificateProfileSerializer(item);\n });\n}\n\nexport function certificateProfileArrayDeserializer(result: Array<CertificateProfile>): any[] {\n return result.map((item) => {\n return certificateProfileDeserializer(item);\n });\n}\n\n/** Defines the certificate revocation properties. */\nexport interface RevokeCertificate {\n /** Serial number of the certificate. */\n serialNumber: string;\n /** Thumbprint of the certificate. */\n thumbprint: string;\n /** The timestamp when the revocation is effective. */\n effectiveAt: Date;\n /** Reason for the revocation. */\n reason: string;\n /** Remarks for the revocation. */\n remarks?: string;\n}\n\nexport function revokeCertificateSerializer(item: RevokeCertificate): any {\n return {\n serialNumber: item[\"serialNumber\"],\n thumbprint: item[\"thumbprint\"],\n effectiveAt: item[\"effectiveAt\"].toISOString(),\n reason: item[\"reason\"],\n remarks: item[\"remarks\"],\n };\n}\n\n/** The available API versions. */\nexport enum KnownVersions {\n /** 2025-10-13 */\n V20251013 = \"2025-10-13\",\n}\n"]}
@@ -1,7 +1,7 @@
1
- import { CodeSigningClient } from "./codeSigningClient.js";
2
- import { OperationOptions, PathUncheckedResponse } from "@azure-rest/core-client";
3
- import { AbortSignalLike } from "@azure/abort-controller";
4
- import { PollerLike, OperationState } from "@azure/core-lro";
1
+ import type { CodeSigningClient } from "./codeSigningClient.js";
2
+ import type { OperationOptions, PathUncheckedResponse } from "@azure-rest/core-client";
3
+ import type { AbortSignalLike } from "@azure/abort-controller";
4
+ import type { PollerLike, OperationState } from "@azure/core-lro";
5
5
  export interface RestorePollerOptions<TResult, TResponse extends PathUncheckedResponse = PathUncheckedResponse> extends OperationOptions {
6
6
  /** Delay to wait until next poll, in milliseconds. */
7
7
  updateIntervalInMs?: number;
@@ -1,9 +1,9 @@
1
1
  // Copyright (c) Microsoft Corporation.
2
2
  // Licensed under the MIT License.
3
- import { _createDeserialize, _updateDeserialize, _$deleteDeserialize, } from "./api/codeSigningAccounts/index.js";
4
- import { _createDeserialize as _createDeserializeCertificateProfiles, _$deleteDeserialize as _$deleteDeserializeCertificateProfiles, } from "./api/certificateProfiles/index.js";
3
+ import { _$deleteDeserialize, _createDeserialize } from "./api/certificateProfiles/operations.js";
4
+ import { _$deleteDeserialize as _$deleteDeserializeCodeSigningAccounts, _updateDeserialize, _createDeserialize as _createDeserializeCodeSigningAccounts, } from "./api/codeSigningAccounts/operations.js";
5
5
  import { getLongRunningPoller } from "./static-helpers/pollingHelpers.js";
6
- import { deserializeState, } from "@azure/core-lro";
6
+ import { deserializeState } from "@azure/core-lro";
7
7
  /**
8
8
  * Creates a poller from the serialized state of another poller. This can be
9
9
  * useful when you want to create pollers on a different host or a poller
@@ -30,20 +30,23 @@ export function restorePoller(client, serializedState, sourceOperation, options)
30
30
  });
31
31
  }
32
32
  const deserializeMap = {
33
- "PUT /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.CodeSigning/codeSigningAccounts/{accountName}": { deserializer: _createDeserialize, expectedStatuses: ["200", "201"] },
34
- "PATCH /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.CodeSigning/codeSigningAccounts/{accountName}": { deserializer: _updateDeserialize, expectedStatuses: ["200", "202"] },
35
- "DELETE /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.CodeSigning/codeSigningAccounts/{accountName}": {
33
+ "DELETE /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.CodeSigning/codeSigningAccounts/{accountName}/certificateProfiles/{profileName}": {
36
34
  deserializer: _$deleteDeserialize,
37
35
  expectedStatuses: ["202", "204", "200"],
38
36
  },
39
37
  "PUT /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.CodeSigning/codeSigningAccounts/{accountName}/certificateProfiles/{profileName}": {
40
- deserializer: _createDeserializeCertificateProfiles,
41
- expectedStatuses: ["200", "201"],
38
+ deserializer: _createDeserialize,
39
+ expectedStatuses: ["200", "201", "202"],
42
40
  },
43
- "DELETE /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.CodeSigning/codeSigningAccounts/{accountName}/certificateProfiles/{profileName}": {
44
- deserializer: _$deleteDeserializeCertificateProfiles,
41
+ "DELETE /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.CodeSigning/codeSigningAccounts/{accountName}": {
42
+ deserializer: _$deleteDeserializeCodeSigningAccounts,
45
43
  expectedStatuses: ["202", "204", "200"],
46
44
  },
45
+ "PATCH /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.CodeSigning/codeSigningAccounts/{accountName}": { deserializer: _updateDeserialize, expectedStatuses: ["200", "202"] },
46
+ "PUT /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.CodeSigning/codeSigningAccounts/{accountName}": {
47
+ deserializer: _createDeserializeCodeSigningAccounts,
48
+ expectedStatuses: ["200", "201", "202"],
49
+ },
47
50
  };
48
51
  function getDeserializationHelper(urlStr, method) {
49
52
  const path = new URL(urlStr).pathname;
@@ -1 +1 @@
1
- {"version":3,"file":"restorePollerHelpers.js","sourceRoot":"","sources":["../../src/restorePollerHelpers.ts"],"names":[],"mappings":"AAAA,uCAAuC;AACvC,kCAAkC;AAGlC,OAAO,EACL,kBAAkB,EAClB,kBAAkB,EAClB,mBAAmB,GACpB,MAAM,oCAAoC,CAAC;AAC5C,OAAO,EACL,kBAAkB,IAAI,qCAAqC,EAC3D,mBAAmB,IAAI,sCAAsC,GAC9D,MAAM,oCAAoC,CAAC;AAC5C,OAAO,EAAE,oBAAoB,EAAE,MAAM,oCAAoC,CAAC;AAG1E,OAAO,EAGL,gBAAgB,GAEjB,MAAM,iBAAiB,CAAC;AAgBzB;;;;GAIG;AACH,MAAM,UAAU,aAAa,CAC3B,MAAyB,EACzB,eAAuB,EACvB,eAAiF,EACjF,OAAuC;IAEvC,MAAM,YAAY,GAAG,gBAAgB,CAAC,e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IT License.\n\nimport { CodeSigningClient } from \"./codeSigningClient.js\";\nimport {\n _createDeserialize,\n _updateDeserialize,\n _$deleteDeserialize,\n} from \"./api/codeSigningAccounts/index.js\";\nimport {\n _createDeserialize as _createDeserializeCertificateProfiles,\n _$deleteDeserialize as _$deleteDeserializeCertificateProfiles,\n} from \"./api/certificateProfiles/index.js\";\nimport { getLongRunningPoller } from \"./static-helpers/pollingHelpers.js\";\nimport { OperationOptions, PathUncheckedResponse } from \"@azure-rest/core-client\";\nimport { AbortSignalLike } from \"@azure/abort-controller\";\nimport {\n PollerLike,\n OperationState,\n deserializeState,\n ResourceLocationConfig,\n} from \"@azure/core-lro\";\n\nexport interface RestorePollerOptions<\n TResult,\n TResponse extends PathUncheckedResponse = PathUncheckedResponse,\n> extends OperationOptions {\n /** Delay to wait until next poll, in milliseconds. */\n updateIntervalInMs?: number;\n /**\n * The signal which can be used to abort requests.\n */\n abortSignal?: AbortSignalLike;\n /** Deserialization function for raw response body */\n processResponseBody?: (result: TResponse) => Promise<TResult>;\n}\n\n/**\n * Creates a poller from the serialized state of another poller. This can be\n * useful when you want to create pollers on a different host or a poller\n * needs to be constructed after the original one is not in scope.\n */\nexport function restorePoller<TResponse extends PathUncheckedResponse, TResult>(\n client: CodeSigningClient,\n serializedState: string,\n sourceOperation: (...args: any[]) => PollerLike<OperationState<TResult>, TResult>,\n options?: RestorePollerOptions<TResult>,\n): PollerLike<OperationState<TResult>, TResult> {\n const pollerConfig = deserializeState(serializedState).config;\n const { initialRequestUrl, requestMethod, metadata } = pollerConfig;\n if (!initialRequestUrl || !requestMethod) {\n throw new Error(\n `Invalid serialized state: ${serializedState} for sourceOperation ${sourceOperation?.name}`,\n );\n }\n const resourceLocationConfig = metadata?.[\"resourceLocationConfig\"] as\n | ResourceLocationConfig\n | undefined;\n const { deserializer, expectedStatuses = [] } =\n getDeserializationHelper(initialRequestUrl, requestMethod) ?? {};\n const deserializeHelper = options?.processResponseBody ?? deserializer;\n if (!deserializeHelper) {\n throw new Error(\n `Please ensure the operation is in this client! We can't find its deserializeHelper for ${sourceOperation?.name}.`,\n );\n }\n return getLongRunningPoller(\n (client as any)[\"_client\"] ?? client,\n deserializeHelper as (result: TResponse) => Promise<TResult>,\n expectedStatuses,\n {\n updateIntervalInMs: options?.updateIntervalInMs,\n abortSignal: options?.abortSignal,\n resourceLocationConfig,\n restoreFrom: serializedState,\n initialRequestUrl,\n },\n );\n}\n\ninterface DeserializationHelper {\n deserializer: Function;\n expectedStatuses: string[];\n}\n\nconst deserializeMap: Record<string, DeserializationHelper> = {\n \"PUT /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.CodeSigning/codeSigningAccounts/{accountName}\":\n { deserializer: _createDeserialize, expectedStatuses: [\"200\", \"201\"] },\n \"PATCH /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.CodeSigning/codeSigningAccounts/{accountName}\":\n { deserializer: _updateDeserialize, expectedStatuses: [\"200\", \"202\"] },\n \"DELETE /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.CodeSigning/codeSigningAccounts/{accountName}\":\n {\n deserializer: _$deleteDeserialize,\n expectedStatuses: [\"202\", \"204\", \"200\"],\n },\n \"PUT /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.CodeSigning/codeSigningAccounts/{accountName}/certificateProfiles/{profileName}\":\n {\n deserializer: _createDeserializeCertificateProfiles,\n expectedStatuses: [\"200\", \"201\"],\n },\n \"DELETE /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.CodeSigning/codeSigningAccounts/{accountName}/certificateProfiles/{profileName}\":\n {\n deserializer: _$deleteDeserializeCertificateProfiles,\n expectedStatuses: [\"202\", \"204\", \"200\"],\n },\n};\n\nfunction getDeserializationHelper(\n urlStr: string,\n method: string,\n): DeserializationHelper | undefined {\n const path = new URL(urlStr).pathname;\n const pathParts = path.split(\"/\");\n\n // Traverse list to match the longest candidate\n // matchedLen: the length of candidate path\n // matchedValue: the matched status code array\n let matchedLen = -1,\n matchedValue: DeserializationHelper | undefined;\n\n // Iterate the responseMap to find a match\n for (const [key, value] of Object.entries(deserializeMap)) {\n // Extracting the path from the map key which is in format\n // GET /path/foo\n if (!key.startsWith(method)) {\n continue;\n }\n const candidatePath = getPathFromMapKey(key);\n // Get each part of the url path\n const candidateParts = candidatePath.split(\"/\");\n\n // track if we have found a match to return the values found.\n let found = true;\n for (let i = candidateParts.length - 1, j = pathParts.length - 1; i >= 1 && j >= 1; i--, j--) {\n if (candidateParts[i]?.startsWith(\"{\") && candidateParts[i]?.indexOf(\"}\") !== -1) {\n const start = candidateParts[i]!.indexOf(\"}\") + 1,\n end = candidateParts[i]?.length;\n // If the current part of the candidate is a \"template\" part\n // Try to use the suffix of pattern to match the path\n // {guid} ==> $\n // {guid}:export ==> :export$\n const isMatched = new RegExp(`${candidateParts[i]?.slice(start, end)}`).test(\n pathParts[j] || \"\",\n );\n\n if (!isMatched) {\n found = false;\n break;\n }\n continue;\n }\n\n // If the candidate part is not a template and\n // the parts don't match mark the candidate as not found\n // to move on with the next candidate path.\n if (candidateParts[i] !== pathParts[j]) {\n found = false;\n break;\n }\n }\n\n // We finished evaluating the current candidate parts\n // Update the matched value if and only if we found the longer pattern\n if (found && candidatePath.length > matchedLen) {\n matchedLen = candidatePath.length;\n matchedValue = value;\n }\n }\n\n return matchedValue;\n}\n\nfunction getPathFromMapKey(mapKey: string): string {\n const pathStart = mapKey.indexOf(\"/\");\n return mapKey.slice(pathStart);\n}\n"]}
1
+ {"version":3,"file":"restorePollerHelpers.js","sourceRoot":"","sources":["../../src/restorePollerHelpers.ts"],"names":[],"mappings":"AAAA,uCAAuC;AACvC,kCAAkC;AAGlC,OAAO,EAAE,mBAAmB,EAAE,kBAAkB,EAAE,MAAM,yCAAyC,CAAC;AAClG,OAAO,EACL,mBAAmB,IAAI,sCAAsC,EAC7D,kBAAkB,EAClB,kBAAkB,IAAI,qCA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C;YAClC,YAAY,GAAG,KAAK,CAAC;QACvB,CAAC;IACH,CAAC;IAED,OAAO,YAAY,CAAC;AACtB,CAAC;AAED,SAAS,iBAAiB,CAAC,MAAc;IACvC,MAAM,SAAS,GAAG,MAAM,CAAC,OAAO,CAAC,GAAG,CAAC,CAAC;IACtC,OAAO,MAAM,CAAC,KAAK,CAAC,SAAS,CAAC,CAAC;AACjC,CAAC","sourcesContent":["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT License.\n\nimport type { CodeSigningClient } from \"./codeSigningClient.js\";\nimport { _$deleteDeserialize, _createDeserialize } from \"./api/certificateProfiles/operations.js\";\nimport {\n _$deleteDeserialize as _$deleteDeserializeCodeSigningAccounts,\n _updateDeserialize,\n _createDeserialize as _createDeserializeCodeSigningAccounts,\n} from \"./api/codeSigningAccounts/operations.js\";\nimport { getLongRunningPoller } from \"./static-helpers/pollingHelpers.js\";\nimport type { OperationOptions, PathUncheckedResponse } from \"@azure-rest/core-client\";\nimport type { AbortSignalLike } from \"@azure/abort-controller\";\nimport type { PollerLike, OperationState, ResourceLocationConfig } from \"@azure/core-lro\";\nimport { deserializeState } from \"@azure/core-lro\";\n\nexport interface RestorePollerOptions<\n TResult,\n TResponse extends PathUncheckedResponse = PathUncheckedResponse,\n> extends OperationOptions {\n /** Delay to wait until next poll, in milliseconds. */\n updateIntervalInMs?: number;\n /**\n * The signal which can be used to abort requests.\n */\n abortSignal?: AbortSignalLike;\n /** Deserialization function for raw response body */\n processResponseBody?: (result: TResponse) => Promise<TResult>;\n}\n\n/**\n * Creates a poller from the serialized state of another poller. This can be\n * useful when you want to create pollers on a different host or a poller\n * needs to be constructed after the original one is not in scope.\n */\nexport function restorePoller<TResponse extends PathUncheckedResponse, TResult>(\n client: CodeSigningClient,\n serializedState: string,\n sourceOperation: (...args: any[]) => PollerLike<OperationState<TResult>, TResult>,\n options?: RestorePollerOptions<TResult>,\n): PollerLike<OperationState<TResult>, TResult> {\n const pollerConfig = deserializeState(serializedState).config;\n const { initialRequestUrl, requestMethod, metadata } = pollerConfig;\n if (!initialRequestUrl || !requestMethod) {\n throw new Error(\n `Invalid serialized state: ${serializedState} for sourceOperation ${sourceOperation?.name}`,\n );\n }\n const resourceLocationConfig = metadata?.[\"resourceLocationConfig\"] as\n | ResourceLocationConfig\n | undefined;\n const { deserializer, expectedStatuses = [] } =\n getDeserializationHelper(initialRequestUrl, requestMethod) ?? {};\n const deserializeHelper = options?.processResponseBody ?? deserializer;\n if (!deserializeHelper) {\n throw new Error(\n `Please ensure the operation is in this client! We can't find its deserializeHelper for ${sourceOperation?.name}.`,\n );\n }\n return getLongRunningPoller(\n (client as any)[\"_client\"] ?? client,\n deserializeHelper as (result: TResponse) => Promise<TResult>,\n expectedStatuses,\n {\n updateIntervalInMs: options?.updateIntervalInMs,\n abortSignal: options?.abortSignal,\n resourceLocationConfig,\n restoreFrom: serializedState,\n initialRequestUrl,\n },\n );\n}\n\ninterface DeserializationHelper {\n // eslint-disable-next-line @typescript-eslint/no-unsafe-function-type\n deserializer: Function;\n expectedStatuses: string[];\n}\n\nconst deserializeMap: Record<string, DeserializationHelper> = {\n \"DELETE /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.CodeSigning/codeSigningAccounts/{accountName}/certificateProfiles/{profileName}\":\n {\n deserializer: _$deleteDeserialize,\n expectedStatuses: [\"202\", \"204\", \"200\"],\n },\n \"PUT /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.CodeSigning/codeSigningAccounts/{accountName}/certificateProfiles/{profileName}\":\n {\n deserializer: _createDeserialize,\n expectedStatuses: [\"200\", \"201\", \"202\"],\n },\n \"DELETE /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.CodeSigning/codeSigningAccounts/{accountName}\":\n {\n deserializer: _$deleteDeserializeCodeSigningAccounts,\n expectedStatuses: [\"202\", \"204\", \"200\"],\n },\n \"PATCH /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.CodeSigning/codeSigningAccounts/{accountName}\":\n { deserializer: _updateDeserialize, expectedStatuses: [\"200\", \"202\"] },\n \"PUT /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.CodeSigning/codeSigningAccounts/{accountName}\":\n {\n deserializer: _createDeserializeCodeSigningAccounts,\n expectedStatuses: [\"200\", \"201\", \"202\"],\n },\n};\n\nfunction getDeserializationHelper(\n urlStr: string,\n method: string,\n): DeserializationHelper | undefined {\n const path = new URL(urlStr).pathname;\n const pathParts = path.split(\"/\");\n\n // Traverse list to match the longest candidate\n // matchedLen: the length of candidate path\n // matchedValue: the matched status code array\n let matchedLen = -1,\n matchedValue: DeserializationHelper | undefined;\n\n // Iterate the responseMap to find a match\n for (const [key, value] of Object.entries(deserializeMap)) {\n // Extracting the path from the map key which is in format\n // GET /path/foo\n if (!key.startsWith(method)) {\n continue;\n }\n const candidatePath = getPathFromMapKey(key);\n // Get each part of the url path\n const candidateParts = candidatePath.split(\"/\");\n\n // track if we have found a match to return the values found.\n let found = true;\n for (let i = candidateParts.length - 1, j = pathParts.length - 1; i >= 1 && j >= 1; i--, j--) {\n if (candidateParts[i]?.startsWith(\"{\") && candidateParts[i]?.indexOf(\"}\") !== -1) {\n const start = candidateParts[i]!.indexOf(\"}\") + 1,\n end = candidateParts[i]?.length;\n // If the current part of the candidate is a \"template\" part\n // Try to use the suffix of pattern to match the path\n // {guid} ==> $\n // {guid}:export ==> :export$\n const isMatched = new RegExp(`${candidateParts[i]?.slice(start, end)}`).test(\n pathParts[j] || \"\",\n );\n\n if (!isMatched) {\n found = false;\n break;\n }\n continue;\n }\n\n // If the candidate part is not a template and\n // the parts don't match mark the candidate as not found\n // to move on with the next candidate path.\n if (candidateParts[i] !== pathParts[j]) {\n found = false;\n break;\n }\n }\n\n // We finished evaluating the current candidate parts\n // Update the matched value if and only if we found the longer pattern\n if (found && candidatePath.length > matchedLen) {\n matchedLen = candidatePath.length;\n matchedValue = value;\n }\n }\n\n return matchedValue;\n}\n\nfunction getPathFromMapKey(mapKey: string): string {\n const pathStart = mapKey.indexOf(\"/\");\n return mapKey.slice(pathStart);\n}\n"]}
@@ -0,0 +1,22 @@
1
+ /**
2
+ * An enum to describe Azure Cloud environments.
3
+ * @enum {string}
4
+ */
5
+ export declare enum AzureClouds {
6
+ /** Azure public cloud, which is the default cloud for Azure SDKs. */
7
+ AZURE_PUBLIC_CLOUD = "AZURE_PUBLIC_CLOUD",
8
+ /** Azure China cloud */
9
+ AZURE_CHINA_CLOUD = "AZURE_CHINA_CLOUD",
10
+ /** Azure US government cloud */
11
+ AZURE_US_GOVERNMENT = "AZURE_US_GOVERNMENT"
12
+ }
13
+ /** The supported values for cloud setting as a string literal type */
14
+ export type AzureSupportedClouds = `${AzureClouds}`;
15
+ /**
16
+ * Gets the Azure Resource Manager endpoint URL for the specified cloud setting.
17
+ * @param cloudSetting - The Azure cloud environment setting. Use one of the AzureClouds enum values.
18
+ * @returns The ARM endpoint URL for the specified cloud, or undefined if cloudSetting is undefined.
19
+ * @throws {Error} Throws an error if an unknown cloud setting is provided.
20
+ */
21
+ export declare function getArmEndpoint(cloudSetting?: AzureSupportedClouds): string | undefined;
22
+ //# sourceMappingURL=cloudSettingHelpers.d.ts.map
@@ -0,0 +1,38 @@
1
+ // Copyright (c) Microsoft Corporation.
2
+ // Licensed under the MIT License.
3
+ /**
4
+ * An enum to describe Azure Cloud environments.
5
+ * @enum {string}
6
+ */
7
+ export var AzureClouds;
8
+ (function (AzureClouds) {
9
+ /** Azure public cloud, which is the default cloud for Azure SDKs. */
10
+ AzureClouds["AZURE_PUBLIC_CLOUD"] = "AZURE_PUBLIC_CLOUD";
11
+ /** Azure China cloud */
12
+ AzureClouds["AZURE_CHINA_CLOUD"] = "AZURE_CHINA_CLOUD";
13
+ /** Azure US government cloud */
14
+ AzureClouds["AZURE_US_GOVERNMENT"] = "AZURE_US_GOVERNMENT";
15
+ })(AzureClouds || (AzureClouds = {}));
16
+ /**
17
+ * Gets the Azure Resource Manager endpoint URL for the specified cloud setting.
18
+ * @param cloudSetting - The Azure cloud environment setting. Use one of the AzureClouds enum values.
19
+ * @returns The ARM endpoint URL for the specified cloud, or undefined if cloudSetting is undefined.
20
+ * @throws {Error} Throws an error if an unknown cloud setting is provided.
21
+ */
22
+ export function getArmEndpoint(cloudSetting) {
23
+ if (cloudSetting === undefined) {
24
+ return undefined;
25
+ }
26
+ const cloudEndpoints = {
27
+ AZURE_CHINA_CLOUD: "https://management.chinacloudapi.cn/",
28
+ AZURE_US_GOVERNMENT: "https://management.usgovcloudapi.net/",
29
+ AZURE_PUBLIC_CLOUD: "https://management.azure.com/",
30
+ };
31
+ if (cloudSetting in cloudEndpoints) {
32
+ return cloudEndpoints[cloudSetting];
33
+ }
34
+ else {
35
+ throw new Error(`Unknown cloud setting: ${cloudSetting}. Please refer to the enum AzureClouds for possible values.`);
36
+ }
37
+ }
38
+ //# sourceMappingURL=cloudSettingHelpers.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"cloudSettingHelpers.js","sourceRoot":"","sources":["../../../src/static-helpers/cloudSettingHelpers.ts"],"names":[],"mappings":"AAAA,uCAAuC;AACvC,kCAAkC;AAElC;;;GAGG;AACH,MAAM,CAAN,IAAY,WAOX;AAPD,WAAY,WAAW;IACrB,qEAAqE;IACrE,wDAAyC,CAAA;IACzC,wBAAwB;IACxB,sDAAuC,CAAA;IACvC,gCAAgC;IAChC,0DAA2C,CAAA;AAC7C,CAAC,EAPW,WAAW,KAAX,WAAW,QAOtB;AAKD;;;;;GAKG;AACH,MAAM,UAAU,cAAc,CAAC,YAAmC;IAChE,IAAI,YAAY,KAAK,SAAS,EAAE,CAAC;QAC/B,OAAO,SAAS,CAAC;IACnB,CAAC;IACD,MAAM,cAAc,GAA6C;QAC/D,iBAAiB,EAAE,sCAAsC;QACzD,mBAAmB,EAAE,uCAAuC;QAC5D,kBAAkB,EAAE,+BAA+B;KACpD,CAAC;IACF,IAAI,YAAY,IAAI,cAAc,EAAE,CAAC;QACnC,OAAO,cAAc,CAAC,YAAY,CAAC,CAAC;IACtC,CAAC;SAAM,CAAC;QACN,MAAM,IAAI,KAAK,CACb,0BAA0B,YAAY,6DAA6D,CACpG,CAAC;IACJ,CAAC;AACH,CAAC","sourcesContent":["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT License.\n\n/**\n * An enum to describe Azure Cloud environments.\n * @enum {string}\n */\nexport enum AzureClouds {\n /** Azure public cloud, which is the default cloud for Azure SDKs. */\n AZURE_PUBLIC_CLOUD = \"AZURE_PUBLIC_CLOUD\",\n /** Azure China cloud */\n AZURE_CHINA_CLOUD = \"AZURE_CHINA_CLOUD\",\n /** Azure US government cloud */\n AZURE_US_GOVERNMENT = \"AZURE_US_GOVERNMENT\",\n}\n\n/** The supported values for cloud setting as a string literal type */\nexport type AzureSupportedClouds = `${AzureClouds}`;\n\n/**\n * Gets the Azure Resource Manager endpoint URL for the specified cloud setting.\n * @param cloudSetting - The Azure cloud environment setting. Use one of the AzureClouds enum values.\n * @returns The ARM endpoint URL for the specified cloud, or undefined if cloudSetting is undefined.\n * @throws {Error} Throws an error if an unknown cloud setting is provided.\n */\nexport function getArmEndpoint(cloudSetting?: AzureSupportedClouds): string | undefined {\n if (cloudSetting === undefined) {\n return undefined;\n }\n const cloudEndpoints: Record<keyof typeof AzureClouds, string> = {\n AZURE_CHINA_CLOUD: \"https://management.chinacloudapi.cn/\",\n AZURE_US_GOVERNMENT: \"https://management.usgovcloudapi.net/\",\n AZURE_PUBLIC_CLOUD: \"https://management.azure.com/\",\n };\n if (cloudSetting in cloudEndpoints) {\n return cloudEndpoints[cloudSetting];\n } else {\n throw new Error(\n `Unknown cloud setting: ${cloudSetting}. Please refer to the enum AzureClouds for possible values.`,\n );\n }\n}\n"]}
@@ -1,4 +1,4 @@
1
- import { Client, PathUncheckedResponse } from "@azure-rest/core-client";
1
+ import type { Client, PathUncheckedResponse } from "@azure-rest/core-client";
2
2
  /**
3
3
  * Options for the byPage method
4
4
  */
@@ -1 +1 @@
1
- {"version":3,"file":"pagingHelpers.js","sourceRoot":"","sources":["../../../src/static-helpers/pagingHelpers.ts"],"names":[],"mappings":"AAAA,uCAAuC;AACvC,kCAAkC;AAElC,OAAO,EAAU,eAAe,EAAyB,MAAM,yBAAyB,CAAC;AACzF,OAAO,EAAE,SAAS,EAAE,MAAM,2BAA2B,CAAC;AA+EtD;;GAEG;AACH,MAAM,UAAU,uBAAuB,CAMrC,MAAc,EACd,kBAAgD,EAChD,mBAAgE,EAChE,gBAA0B,EAC1B,UAA0C,EAAE;IAE5C,MAAM,QAAQ,GAAG,OAAO,CAAC,QAAQ,IAAI,OAAO,CAAC;IAC7C,MAAM,YAAY,GAAG,OAAO,CAAC,YAAY,IAAI,UAAU,CAAC;IACxD,MAAM,WAAW,GAAgD;QAC/D,OAAO,EAAE,KAAK,EAAE,QAAiB,EAAE,EAAE;YACnC,MAAM,MAAM,GACV,QAAQ,KAAK,SAAS;gBACpB,CAAC,CAAC,MAAM,kBAAkB,EAAE;gBAC5B,CAAC,CAAC,MAAM,MAAM,CAAC,aAAa,CAAC,QAAQ,CAAC,CAAC,GAAG,EAAE,CAAC;YACjD,kBAAkB,CAAC,MAAM,EAAE,gBAAgB,CAAC,CAAC;YAC7C,MAAM,OAAO,GAAG,MAAM,mBAAmB,CAAC,MAAmB,CAAC,CAAC;YAC/D,MAAM,QAAQ,GAAG,WAAW,CAAC,OAAO,EAAE,YAAY,CAAC,CAAC;YACpD,MAAM,MAAM,GAAG,WAAW,CAAW,OAAO,EAAE,QAAQ,CAAU,CAAC;YACjE,OAAO;gBACL,IAAI,EAAE,MAAM;gBACZ,YAAY,EAAE,QAAQ;aACvB,CAAC;QACJ,CAAC;QACD,MAAM,EAAE,CAAC,QAAwB,EAAE,EAAE;YACnC,MAAM,EAAE,iBAAiB,EAAE,GAAG,QAAQ,IAAI,EAAE,CAAC;YAC7C,OAAO,oBAAoB,CAAC,WAAW,EAAE;gBACvC,Q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AE,gBAA0B;IACrF,IAAI,CAAC,gBAAgB,CAAC,QAAQ,CAAC,QAAQ,CAAC,MAAM,CAAC,EAAE,CAAC;QAChD,MAAM,eAAe,CACnB,gDAAgD,QAAQ,CAAC,MAAM,EAAE,EACjE,QAAQ,CACT,CAAC;IACJ,CAAC;AACH,CAAC","sourcesContent":["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT License.\n\nimport { Client, createRestError, PathUncheckedResponse } from \"@azure-rest/core-client\";\nimport { RestError } from \"@azure/core-rest-pipeline\";\n\n/**\n * Options for the byPage method\n */\nexport interface PageSettings {\n /**\n * A reference to a specific page to start iterating from.\n */\n continuationToken?: string;\n}\n\n/**\n * An interface that describes a page of results.\n */\nexport type ContinuablePage<TElement, TPage = TElement[]> = TPage & {\n /**\n * The token that keeps track of where to continue the iterator\n */\n continuationToken?: string;\n};\n\n/**\n * An interface that allows async iterable iteration both to completion and by page.\n */\nexport interface PagedAsyncIterableIterator<\n TElement,\n TPage = TElement[],\n TPageSettings extends PageSettings = PageSettings,\n> {\n /**\n * The next method, part of the iteration protocol\n */\n next(): Promise<IteratorResult<TElement>>;\n /**\n * The connection to the async iterator, part of the iteration protocol\n */\n [Symbol.asyncIterator](): PagedAsyncIterableIterator<TElement, TPage, TPageSettings>;\n /**\n * Return an AsyncIterableIterator that works a page at a time\n */\n byPage: (settings?: TPageSettings) => AsyncIterableIterator<ContinuablePage<TElement, TPage>>;\n}\n\n/**\n * An interface that describes how to communicate with the service.\n */\nexport interface PagedResult<\n TElement,\n TPage = TElement[],\n TPageSettings extends PageSettings = PageSettings,\n> {\n /**\n * Link to the first page of results.\n */\n firstPageLink?: string;\n /**\n * A method that returns a page of results.\n */\n getPage: (pageLink?: string) => Promise<{ page: TPage; nextPageLink?: string } | undefined>;\n /**\n * a function to implement the `byPage` method on the paged async iterator.\n */\n byPage?: (settings?: TPageSettings) => AsyncIterableIterator<ContinuablePage<TElement, TPage>>;\n\n /**\n * A function to extract elements from a page.\n */\n toElements?: (page: TPage) => TElement[];\n}\n\n/**\n * Options for the paging helper\n */\nexport interface BuildPagedAsyncIteratorOptions {\n itemName?: string;\n nextLinkName?: string;\n}\n\n/**\n * Helper to paginate results in a generic way and return a PagedAsyncIterableIterator\n */\nexport function buildPagedAsyncIterator<\n TElement,\n TPage = TElement[],\n TPageSettings extends PageSettings = PageSettings,\n TResponse extends PathUncheckedResponse = PathUncheckedResponse,\n>(\n client: Client,\n getInitialResponse: () => PromiseLike<TResponse>,\n processResponseBody: (result: TResponse) => PromiseLike<unknown>,\n expectedStatuses: string[],\n options: BuildPagedAsyncIteratorOptions = {},\n): PagedAsyncIterableIterator<TElement, TPage, TPageSettings> {\n const itemName = options.itemName ?? \"value\";\n const nextLinkName = options.nextLinkName ?? \"nextLink\";\n const pagedResult: PagedResult<TElement, TPage, TPageSettings> = {\n getPage: async (pageLink?: string) => {\n const result =\n pageLink === undefined\n ? await getInitialResponse()\n : await client.pathUnchecked(pageLink).get();\n checkPagingRequest(result, expectedStatuses);\n const results = await processResponseBody(result as TResponse);\n const nextLink = getNextLink(results, nextLinkName);\n const values = getElements<TElement>(results, itemName) as TPage;\n return {\n page: values,\n nextPageLink: nextLink,\n };\n },\n byPage: (settings?: TPageSettings) => {\n const { continuationToken } = settings ?? {};\n return getPageAsyncIterator(pagedResult, {\n pageLink: continuationToken,\n });\n },\n };\n return getPagedAsyncIterator(pagedResult);\n}\n\n/**\n * returns an async iterator that iterates over results. It also has a `byPage`\n * method that returns pages of items at once.\n *\n * @param pagedResult - an object that specifies how to get pages.\n * @returns a paged async iterator that iterates over results.\n */\n\nfunction getPagedAsyncIterator<\n TElement,\n TPage = TElement[],\n TPageSettings extends PageSettings = PageSettings,\n>(\n pagedResult: PagedResult<TElement, TPage, TPageSettings>,\n): PagedAsyncIterableIterator<TElement, TPage, TPageSettings> {\n const iter = getItemAsyncIterator<TElement, TPage, TPageSettings>(pagedResult);\n return {\n next() {\n return iter.next();\n },\n [Symbol.asyncIterator]() {\n return this;\n },\n byPage:\n pagedResult?.byPage ??\n ((settings?: TPageSettings) => {\n const { continuationToken } = settings ?? {};\n return getPageAsyncIterator(pagedResult, {\n pageLink: continuationToken,\n });\n }),\n };\n}\n\nasync function* getItemAsyncIterator<TElement, TPage, TPageSettings extends PageSettings>(\n pagedResult: PagedResult<TElement, TPage, TPageSettings>,\n): AsyncIterableIterator<TElement> {\n const pages = getPageAsyncIterator(pagedResult);\n for await (const page of pages) {\n yield* page as unknown as TElement[];\n }\n}\n\nasync function* getPageAsyncIterator<TElement, TPage, TPageSettings extends PageSettings>(\n pagedResult: PagedResult<TElement, TPage, TPageSettings>,\n options: {\n pageLink?: string;\n } = {},\n): AsyncIterableIterator<ContinuablePage<TElement, TPage>> {\n const { pageLink } = options;\n let response = await pagedResult.getPage(pageLink ?? pagedResult.firstPageLink);\n if (!response) {\n return;\n }\n let result = response.page as ContinuablePage<TElement, TPage>;\n result.continuationToken = response.nextPageLink;\n yield result;\n while (response.nextPageLink) {\n response = await pagedResult.getPage(response.nextPageLink);\n if (!response) {\n return;\n }\n result = response.page as ContinuablePage<TElement, TPage>;\n result.continuationToken = response.nextPageLink;\n yield result;\n }\n}\n\n/**\n * Gets for the value of nextLink in the body\n */\nfunction getNextLink(body: unknown, nextLinkName?: string): string | undefined {\n if (!nextLinkName) {\n return undefined;\n }\n\n const nextLink = (body as Record<string, unknown>)[nextLinkName];\n\n if (typeof nextLink !== \"string\" && typeof nextLink !== \"undefined\" && nextLink !== null) {\n throw new RestError(\n `Body Property ${nextLinkName} should be a string or undefined or null but got ${typeof nextLink}`,\n );\n }\n\n if (nextLink === null) {\n return undefined;\n }\n\n return nextLink;\n}\n\n/**\n * Gets the elements of the current request in the body.\n */\nfunction getElements<T = unknown>(body: unknown, itemName: string): T[] {\n const value = (body as Record<string, unknown>)[itemName] as T[];\n if (!Array.isArray(value)) {\n throw new RestError(\n `Couldn't paginate response\\n Body doesn't contain an array property with name: ${itemName}`,\n );\n }\n\n return value ?? [];\n}\n\n/**\n * Checks if a request failed\n */\nfunction checkPagingRequest(response: PathUncheckedResponse, expectedStatuses: string[]): void {\n if (!expectedStatuses.includes(response.status)) {\n throw createRestError(\n `Pagination failed with unexpected statusCode ${response.status}`,\n response,\n );\n }\n}\n"]}
1
+ {"version":3,"file":"pagingHelpers.js","sourceRoot":"","sources":["../../../src/static-helpers/pagingHelpers.ts"],"names":[],"mappings":"AAAA,uCAAuC;AACvC,kCAAkC;AAGlC,OAAO,EAAE,eAAe,EAAE,MAAM,yBAAyB,CAAC;AAC1D,OAAO,EAAE,SAAS,EAAE,MAAM,2BAA2B,CAAC;AA+EtD;;GAEG;AACH,MAAM,UAAU,uBAAuB,CAMrC,MAAc,EACd,kBAAgD,EAChD,mBAAgE,EAChE,gBAA0B,EAC1B,UAA0C,EAAE;IAE5C,MAAM,QAAQ,GAAG,OAAO,CAAC,QAAQ,IAAI,OAAO,CAAC;IAC7C,MAAM,YAAY,GAAG,OAAO,CAAC,YAAY,IAAI,UAAU,CAAC;IACxD,MAAM,WAAW,GAAgD;QAC/D,OAAO,EAAE,KAAK,EAAE,QAAiB,EAAE,EAAE;YACnC,MAAM,MAAM,GACV,QAAQ,KAAK,SAAS;gBACpB,CAAC,CAAC,MAAM,kBAAkB,EAAE;gBAC5B,CAAC,CAAC,MAAM,MAAM,CAAC,aAAa,CAAC,QAAQ,CAAC,CAAC,GAAG,EAAE,CAAC;YACjD,kBAAkB,CAAC,MAAM,EAAE,gBAAgB,CAAC,CAAC;YAC7C,MAAM,OAAO,GAAG,MAAM,mBAAmB,CAAC,MAAmB,CAAC,CAAC;YAC/D,MAAM,QAAQ,GAAG,WAAW,CAAC,OAAO,EAAE,YAAY,CAAC,CAAC;YACpD,MAAM,MAAM,GAAG,WAAW,CAAW,OAAO,EAAE,QAAQ,CAAU,CAAC;YACjE,OAAO;gBACL,IAAI,EAAE,MAAM;gBACZ,YAAY,EAAE,QAAQ;aACvB,CAAC;QACJ,CAAC;QACD,MAAM,EAAE,CAAC,QAAwB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EAAE,CAC7F,CAAC;IACJ,CAAC;IAED,OAAO,KAAK,IAAI,EAAE,CAAC;AACrB,CAAC;AAED;;GAEG;AACH,SAAS,kBAAkB,CAAC,QAA+B,EAAE,gBAA0B;IACrF,IAAI,CAAC,gBAAgB,CAAC,QAAQ,CAAC,QAAQ,CAAC,MAAM,CAAC,EAAE,CAAC;QAChD,MAAM,eAAe,CACnB,gDAAgD,QAAQ,CAAC,MAAM,EAAE,EACjE,QAAQ,CACT,CAAC;IACJ,CAAC;AACH,CAAC","sourcesContent":["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT License.\n\nimport type { Client, PathUncheckedResponse } from \"@azure-rest/core-client\";\nimport { createRestError } from \"@azure-rest/core-client\";\nimport { RestError } from \"@azure/core-rest-pipeline\";\n\n/**\n * Options for the byPage method\n */\nexport interface PageSettings {\n /**\n * A reference to a specific page to start iterating from.\n */\n continuationToken?: string;\n}\n\n/**\n * An interface that describes a page of results.\n */\nexport type ContinuablePage<TElement, TPage = TElement[]> = TPage & {\n /**\n * The token that keeps track of where to continue the iterator\n */\n continuationToken?: string;\n};\n\n/**\n * An interface that allows async iterable iteration both to completion and by page.\n */\nexport interface PagedAsyncIterableIterator<\n TElement,\n TPage = TElement[],\n TPageSettings extends PageSettings = PageSettings,\n> {\n /**\n * The next method, part of the iteration protocol\n */\n next(): Promise<IteratorResult<TElement>>;\n /**\n * The connection to the async iterator, part of the iteration protocol\n */\n [Symbol.asyncIterator](): PagedAsyncIterableIterator<TElement, TPage, TPageSettings>;\n /**\n * Return an AsyncIterableIterator that works a page at a time\n */\n byPage: (settings?: TPageSettings) => AsyncIterableIterator<ContinuablePage<TElement, TPage>>;\n}\n\n/**\n * An interface that describes how to communicate with the service.\n */\nexport interface PagedResult<\n TElement,\n TPage = TElement[],\n TPageSettings extends PageSettings = PageSettings,\n> {\n /**\n * Link to the first page of results.\n */\n firstPageLink?: string;\n /**\n * A method that returns a page of results.\n */\n getPage: (pageLink?: string) => Promise<{ page: TPage; nextPageLink?: string } | undefined>;\n /**\n * a function to implement the `byPage` method on the paged async iterator.\n */\n byPage?: (settings?: TPageSettings) => AsyncIterableIterator<ContinuablePage<TElement, TPage>>;\n\n /**\n * A function to extract elements from a page.\n */\n toElements?: (page: TPage) => TElement[];\n}\n\n/**\n * Options for the paging helper\n */\nexport interface BuildPagedAsyncIteratorOptions {\n itemName?: string;\n nextLinkName?: string;\n}\n\n/**\n * Helper to paginate results in a generic way and return a PagedAsyncIterableIterator\n */\nexport function buildPagedAsyncIterator<\n TElement,\n TPage = TElement[],\n TPageSettings extends PageSettings = PageSettings,\n TResponse extends PathUncheckedResponse = PathUncheckedResponse,\n>(\n client: Client,\n getInitialResponse: () => PromiseLike<TResponse>,\n processResponseBody: (result: TResponse) => PromiseLike<unknown>,\n expectedStatuses: string[],\n options: BuildPagedAsyncIteratorOptions = {},\n): PagedAsyncIterableIterator<TElement, TPage, TPageSettings> {\n const itemName = options.itemName ?? \"value\";\n const nextLinkName = options.nextLinkName ?? \"nextLink\";\n const pagedResult: PagedResult<TElement, TPage, TPageSettings> = {\n getPage: async (pageLink?: string) => {\n const result =\n pageLink === undefined\n ? await getInitialResponse()\n : await client.pathUnchecked(pageLink).get();\n checkPagingRequest(result, expectedStatuses);\n const results = await processResponseBody(result as TResponse);\n const nextLink = getNextLink(results, nextLinkName);\n const values = getElements<TElement>(results, itemName) as TPage;\n return {\n page: values,\n nextPageLink: nextLink,\n };\n },\n byPage: (settings?: TPageSettings) => {\n const { continuationToken } = settings ?? {};\n return getPageAsyncIterator(pagedResult, {\n pageLink: continuationToken,\n });\n },\n };\n return getPagedAsyncIterator(pagedResult);\n}\n\n/**\n * returns an async iterator that iterates over results. It also has a `byPage`\n * method that returns pages of items at once.\n *\n * @param pagedResult - an object that specifies how to get pages.\n * @returns a paged async iterator that iterates over results.\n */\n\nfunction getPagedAsyncIterator<\n TElement,\n TPage = TElement[],\n TPageSettings extends PageSettings = PageSettings,\n>(\n pagedResult: PagedResult<TElement, TPage, TPageSettings>,\n): PagedAsyncIterableIterator<TElement, TPage, TPageSettings> {\n const iter = getItemAsyncIterator<TElement, TPage, TPageSettings>(pagedResult);\n return {\n next() {\n return iter.next();\n },\n [Symbol.asyncIterator]() {\n return this;\n },\n byPage:\n pagedResult?.byPage ??\n ((settings?: TPageSettings) => {\n const { continuationToken } = settings ?? {};\n return getPageAsyncIterator(pagedResult, {\n pageLink: continuationToken,\n });\n }),\n };\n}\n\nasync function* getItemAsyncIterator<TElement, TPage, TPageSettings extends PageSettings>(\n pagedResult: PagedResult<TElement, TPage, TPageSettings>,\n): AsyncIterableIterator<TElement> {\n const pages = getPageAsyncIterator(pagedResult);\n for await (const page of pages) {\n yield* page as unknown as TElement[];\n }\n}\n\nasync function* getPageAsyncIterator<TElement, TPage, TPageSettings extends PageSettings>(\n pagedResult: PagedResult<TElement, TPage, TPageSettings>,\n options: {\n pageLink?: string;\n } = {},\n): AsyncIterableIterator<ContinuablePage<TElement, TPage>> {\n const { pageLink } = options;\n let response = await pagedResult.getPage(pageLink ?? pagedResult.firstPageLink);\n if (!response) {\n return;\n }\n let result = response.page as ContinuablePage<TElement, TPage>;\n result.continuationToken = response.nextPageLink;\n yield result;\n while (response.nextPageLink) {\n response = await pagedResult.getPage(response.nextPageLink);\n if (!response) {\n return;\n }\n result = response.page as ContinuablePage<TElement, TPage>;\n result.continuationToken = response.nextPageLink;\n yield result;\n }\n}\n\n/**\n * Gets for the value of nextLink in the body\n */\nfunction getNextLink(body: unknown, nextLinkName?: string): string | undefined {\n if (!nextLinkName) {\n return undefined;\n }\n\n const nextLink = (body as Record<string, unknown>)[nextLinkName];\n\n if (typeof nextLink !== \"string\" && typeof nextLink !== \"undefined\" && nextLink !== null) {\n throw new RestError(\n `Body Property ${nextLinkName} should be a string or undefined or null but got ${typeof nextLink}`,\n );\n }\n\n if (nextLink === null) {\n return undefined;\n }\n\n return nextLink;\n}\n\n/**\n * Gets the elements of the current request in the body.\n */\nfunction getElements<T = unknown>(body: unknown, itemName: string): T[] {\n const value = (body as Record<string, unknown>)[itemName] as T[];\n if (!Array.isArray(value)) {\n throw new RestError(\n `Couldn't paginate response\\n Body doesn't contain an array property with name: ${itemName}`,\n );\n }\n\n return value ?? [];\n}\n\n/**\n * Checks if a request failed\n */\nfunction checkPagingRequest(response: PathUncheckedResponse, expectedStatuses: string[]): void {\n if (!expectedStatuses.includes(response.status)) {\n throw createRestError(\n `Pagination failed with unexpected statusCode ${response.status}`,\n response,\n );\n }\n}\n"]}
@@ -1,6 +1,6 @@
1
- import { PollerLike, OperationState, ResourceLocationConfig } from "@azure/core-lro";
2
- import { Client, PathUncheckedResponse } from "@azure-rest/core-client";
3
- import { AbortSignalLike } from "@azure/abort-controller";
1
+ import type { PollerLike, OperationState, ResourceLocationConfig } from "@azure/core-lro";
2
+ import type { Client, PathUncheckedResponse } from "@azure-rest/core-client";
3
+ import type { AbortSignalLike } from "@azure/abort-controller";
4
4
  export interface GetLongRunningPollerOptions<TResponse> {
5
5
  /** Delay to wait until next poll, in milliseconds. */
6
6
  updateIntervalInMs?: number;
@@ -1,6 +1,6 @@
1
1
  // Copyright (c) Microsoft Corporation.
2
2
  // Licensed under the MIT License.
3
- import { createHttpPoller, } from "@azure/core-lro";
3
+ import { createHttpPoller } from "@azure/core-lro";
4
4
  import { createRestError } from "@azure-rest/core-client";
5
5
  export function getLongRunningPoller(client, processResponseBody, expectedStatuses, options) {
6
6
  const { restoreFrom, getInitialResponse } = options;
@@ -1 +1 @@
1
- {"version":3,"file":"pollingHelpers.js","sourceRoot":"","sources":["../../../src/static-helpers/pollingHelpers.ts"],"names":[],"mappings":"AAAA,uCAAuC;AACvC,kCAAkC;AAElC,OAAO,EAKL,gBAAgB,GAEjB,MAAM,iBAAiB,CAAC;AAEzB,OAAO,EAAiC,eAAe,EAAE,MAAM,yBAAyB,CAAC;AA4BzF,MAAM,UAAU,oBAAoB,CAClC,MAAc,EACd,mBAA4D,EAC5D,gBAA0B,EAC1B,OAA+C;IAE/C,MA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CAAC;YACD,IAAI,QAAQ,CAAC;YACb,IAAI,CAAC;gBACH,QAAQ,GAAG,MAAM,MAAM,CAAC,aAAa,CAAC,IAAI,CAAC,CAAC,GAAG,CAAC,EAAE,WAAW,EAAE,CAAC,CAAC;YACnE,CAAC;oBAAS,CAAC;gBACT,OAAO,CAAC,WAAW,EAAE,mBAAmB,CAAC,OAAO,EAAE,aAAa,CAAC,CAAC;gBACjE,WAAW,EAAE,WAAW,EAAE,mBAAmB,CAAC,OAAO,EAAE,aAAa,CAAC,CAAC;YACxE,CAAC;YAED,OAAO,cAAc,CAAC,QAAqB,EAAE,gBAAgB,CAAC,CAAC;QACjE,CAAC;KACF,CAAC;IACF,OAAO,gBAAgB,CAAC,MAAM,EAAE;QAC9B,YAAY,EAAE,OAAO,EAAE,kBAAkB;QACzC,sBAAsB,EAAE,OAAO,EAAE,sBAAsB;QACvD,WAAW,EAAE,OAAO,EAAE,WAAW;QACjC,aAAa,EAAE,CAAC,MAAe,EAAE,EAAE;YACjC,OAAO,mBAAmB,CAAC,MAAmB,CAAC,CAAC;QAClD,CAAC;KACF,CAAC,CAAC;AACL,CAAC;AACD;;;;;GAKG;AACH,SAAS,cAAc,CACrB,QAAmB,EACnB,gBAA0B;IAE1B,IAAI,CAAC,gBAAgB,CAAC,QAAQ,CAAC,QAAQ,CAAC,MAAM,CAAC,EAAE,CAAC;QAChD,MAAM,eAAe,CAAC,QAAQ,CAAC,CAAC;IAClC,CAAC;IAED,OAAO;QACL,YAAY,EAAE,QAAQ;QACtB,WAAW,EAAE;YACX,GAAG,QAAQ;YACX,UAAU,EAAE,MAAM,CAAC,QAAQ,CAAC,QAAQ,CAAC,MAAM,CAAC;YAC5C,IAAI,EAAE,QAAQ,CAAC,IAAI;SACpB;KACF,CAAC;AACJ,CAAC","sourcesContent":["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT License.\n\nimport {\n PollerLike,\n OperationState,\n ResourceLocationConfig,\n RunningOperation,\n createHttpPoller,\n OperationResponse,\n} from \"@azure/core-lro\";\n\nimport { Client, PathUncheckedResponse, createRestError } from \"@azure-rest/core-client\";\nimport { AbortSignalLike } from \"@azure/abort-controller\";\n\nexport interface GetLongRunningPollerOptions<TResponse> {\n /** Delay to wait until next poll, in milliseconds. */\n updateIntervalInMs?: number;\n /**\n * The signal which can be used to abort requests.\n */\n abortSignal?: AbortSignalLike;\n /**\n * The potential location of the result of the LRO if specified by the LRO extension in the swagger.\n */\n resourceLocationConfig?: ResourceLocationConfig;\n /**\n * The original url of the LRO\n * Should not be null when restoreFrom is set\n */\n initialRequestUrl?: string;\n /**\n * A serialized poller which can be used to resume an existing paused Long-Running-Operation.\n */\n restoreFrom?: string;\n /**\n * The function to get the initial response\n */\n getInitialResponse?: () => PromiseLike<TResponse>;\n}\nexport function getLongRunningPoller<TResponse extends PathUncheckedResponse, TResult = void>(\n client: Client,\n processResponseBody: (result: TResponse) => Promise<TResult>,\n expectedStatuses: string[],\n options: GetLongRunningPollerOptions<TResponse>,\n): PollerLike<OperationState<TResult>, TResult> {\n const { restoreFrom, getInitialResponse } = options;\n if (!restoreFrom && !getInitialResponse) {\n throw new Error(\"Either restoreFrom or getInitialResponse must be specified\");\n }\n let initialResponse: TResponse | undefined = undefined;\n const pollAbortController = new AbortController();\n const poller: RunningOperation<TResponse> = {\n sendInitialRequest: async () => {\n if (!getInitialResponse) {\n throw new Error(\"getInitialResponse is required when initializing a new poller\");\n }\n initialResponse = await getInitialResponse();\n return getLroResponse(initialResponse, expectedStatuses);\n },\n sendPollRequest: async (\n path: string,\n pollOptions?: {\n abortSignal?: AbortSignalLike;\n },\n ) => {\n // The poll request would both listen to the user provided abort signal and the poller's own abort signal\n function abortListener(): void {\n pollAbortController.abort();\n }\n const abortSignal = pollAbortController.signal;\n if (options.abortSignal?.aborted) {\n pollAbortController.abort();\n } else if (pollOptions?.abortSignal?.aborted) {\n pollAbortController.abort();\n } else if (!abortSignal.aborted) {\n options.abortSignal?.addEventListener(\"abort\", abortListener, {\n once: true,\n });\n pollOptions?.abortSignal?.addEventListener(\"abort\", abortListener, {\n once: true,\n });\n }\n let response;\n try {\n response = await client.pathUnchecked(path).get({ abortSignal });\n } finally {\n options.abortSignal?.removeEventListener(\"abort\", abortListener);\n pollOptions?.abortSignal?.removeEventListener(\"abort\", abortListener);\n }\n\n return getLroResponse(response as TResponse, expectedStatuses);\n },\n };\n return createHttpPoller(poller, {\n intervalInMs: options?.updateIntervalInMs,\n resourceLocationConfig: options?.resourceLocationConfig,\n restoreFrom: options?.restoreFrom,\n processResult: (result: unknown) => {\n return processResponseBody(result as TResponse);\n },\n });\n}\n/**\n * Converts a Rest Client response to a response that the LRO implementation understands\n * @param response - a rest client http response\n * @param deserializeFn - deserialize function to convert Rest response to modular output\n * @returns - An LRO response that the LRO implementation understands\n */\nfunction getLroResponse<TResponse extends PathUncheckedResponse>(\n response: TResponse,\n expectedStatuses: string[],\n): OperationResponse<TResponse> {\n if (!expectedStatuses.includes(response.status)) {\n throw createRestError(response);\n }\n\n return {\n flatResponse: response,\n rawResponse: {\n ...response,\n statusCode: Number.parseInt(response.status),\n body: response.body,\n },\n };\n}\n"]}
1
+ {"version":3,"file":"pollingHelpers.js","sourceRoot":"","sources":["../../../src/static-helpers/pollingHelpers.ts"],"names":[],"mappings":"AAAA,uCAAuC;AACvC,kCAAkC;AASlC,OAAO,EAAE,gBAAgB,EAAE,MAAM,iBAAiB,CAAC;AAGnD,OAAO,EAAE,eAAe,EAAE,MAAM,yBAAyB,CAAC;AA4B1D,MAAM,UAAU,oBAAoB,CAClC,MAAc,EACd,mBAA4D,EAC5D,gBAA0B,EAC1B,OAA+C;IAE/C,MAAM,EAAE,WAAW,EAAE,kBAAkB,EAAE,GAAG,OAAO,CAAC;IACpD,IAAI,CAAC,WAAW,IAAI,CAAC,kBAAkB,EAAE,CAAC;QACxC,MAAM,IAAI,KAAK,CAAC,4DAA4D,CAAC,CAAC;IAChF,CAAC;IACD,IAAI,eAAe,GAA0B,SAAS,CAAC;IAC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mBAAmB,CAAC,OAAO,EAAE,aAAa,CAAC,CAAC;gBACjE,WAAW,EAAE,WAAW,EAAE,mBAAmB,CAAC,OAAO,EAAE,aAAa,CAAC,CAAC;YACxE,CAAC;YAED,OAAO,cAAc,CAAC,QAAqB,EAAE,gBAAgB,CAAC,CAAC;QACjE,CAAC;KACF,CAAC;IACF,OAAO,gBAAgB,CAAC,MAAM,EAAE;QAC9B,YAAY,EAAE,OAAO,EAAE,kBAAkB;QACzC,sBAAsB,EAAE,OAAO,EAAE,sBAAsB;QACvD,WAAW,EAAE,OAAO,EAAE,WAAW;QACjC,aAAa,EAAE,CAAC,MAAe,EAAE,EAAE;YACjC,OAAO,mBAAmB,CAAC,MAAmB,CAAC,CAAC;QAClD,CAAC;KACF,CAAC,CAAC;AACL,CAAC;AACD;;;;;GAKG;AACH,SAAS,cAAc,CACrB,QAAmB,EACnB,gBAA0B;IAE1B,IAAI,CAAC,gBAAgB,CAAC,QAAQ,CAAC,QAAQ,CAAC,MAAM,CAAC,EAAE,CAAC;QAChD,MAAM,eAAe,CAAC,QAAQ,CAAC,CAAC;IAClC,CAAC;IAED,OAAO;QACL,YAAY,EAAE,QAAQ;QACtB,WAAW,EAAE;YACX,GAAG,QAAQ;YACX,UAAU,EAAE,MAAM,CAAC,QAAQ,CAAC,QAAQ,CAAC,MAAM,CAAC;YAC5C,IAAI,EAAE,QAAQ,CAAC,IAAI;SACpB;KACF,CAAC;AACJ,CAAC","sourcesContent":["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT License.\n\nimport type {\n PollerLike,\n OperationState,\n ResourceLocationConfig,\n RunningOperation,\n OperationResponse,\n} from \"@azure/core-lro\";\nimport { createHttpPoller } from \"@azure/core-lro\";\n\nimport type { Client, PathUncheckedResponse } from \"@azure-rest/core-client\";\nimport { createRestError } from \"@azure-rest/core-client\";\nimport type { AbortSignalLike } from \"@azure/abort-controller\";\n\nexport interface GetLongRunningPollerOptions<TResponse> {\n /** Delay to wait until next poll, in milliseconds. */\n updateIntervalInMs?: number;\n /**\n * The signal which can be used to abort requests.\n */\n abortSignal?: AbortSignalLike;\n /**\n * The potential location of the result of the LRO if specified by the LRO extension in the swagger.\n */\n resourceLocationConfig?: ResourceLocationConfig;\n /**\n * The original url of the LRO\n * Should not be null when restoreFrom is set\n */\n initialRequestUrl?: string;\n /**\n * A serialized poller which can be used to resume an existing paused Long-Running-Operation.\n */\n restoreFrom?: string;\n /**\n * The function to get the initial response\n */\n getInitialResponse?: () => PromiseLike<TResponse>;\n}\nexport function getLongRunningPoller<TResponse extends PathUncheckedResponse, TResult = void>(\n client: Client,\n processResponseBody: (result: TResponse) => Promise<TResult>,\n expectedStatuses: string[],\n options: GetLongRunningPollerOptions<TResponse>,\n): PollerLike<OperationState<TResult>, TResult> {\n const { restoreFrom, getInitialResponse } = options;\n if (!restoreFrom && !getInitialResponse) {\n throw new Error(\"Either restoreFrom or getInitialResponse must be specified\");\n }\n let initialResponse: TResponse | undefined = undefined;\n const pollAbortController = new AbortController();\n const poller: RunningOperation<TResponse> = {\n sendInitialRequest: async () => {\n if (!getInitialResponse) {\n throw new Error(\"getInitialResponse is required when initializing a new poller\");\n }\n initialResponse = await getInitialResponse();\n return getLroResponse(initialResponse, expectedStatuses);\n },\n sendPollRequest: async (\n path: string,\n pollOptions?: {\n abortSignal?: AbortSignalLike;\n },\n ) => {\n // The poll request would both listen to the user provided abort signal and the poller's own abort signal\n function abortListener(): void {\n pollAbortController.abort();\n }\n const abortSignal = pollAbortController.signal;\n if (options.abortSignal?.aborted) {\n pollAbortController.abort();\n } else if (pollOptions?.abortSignal?.aborted) {\n pollAbortController.abort();\n } else if (!abortSignal.aborted) {\n options.abortSignal?.addEventListener(\"abort\", abortListener, {\n once: true,\n });\n pollOptions?.abortSignal?.addEventListener(\"abort\", abortListener, {\n once: true,\n });\n }\n let response;\n try {\n response = await client.pathUnchecked(path).get({ abortSignal });\n } finally {\n options.abortSignal?.removeEventListener(\"abort\", abortListener);\n pollOptions?.abortSignal?.removeEventListener(\"abort\", abortListener);\n }\n\n return getLroResponse(response as TResponse, expectedStatuses);\n },\n };\n return createHttpPoller(poller, {\n intervalInMs: options?.updateIntervalInMs,\n resourceLocationConfig: options?.resourceLocationConfig,\n restoreFrom: options?.restoreFrom,\n processResult: (result: unknown) => {\n return processResponseBody(result as TResponse);\n },\n });\n}\n/**\n * Converts a Rest Client response to a response that the LRO implementation understands\n * @param response - a rest client http response\n * @param deserializeFn - deserialize function to convert Rest response to modular output\n * @returns - An LRO response that the LRO implementation understands\n */\nfunction getLroResponse<TResponse extends PathUncheckedResponse>(\n response: TResponse,\n expectedStatuses: string[],\n): OperationResponse<TResponse> {\n if (!expectedStatuses.includes(response.status)) {\n throw createRestError(response);\n }\n\n return {\n flatResponse: response,\n rawResponse: {\n ...response,\n statusCode: Number.parseInt(response.status),\n body: response.body,\n },\n };\n}\n"]}
@@ -0,0 +1,5 @@
1
+ export interface UrlTemplateOptions {
2
+ allowReserved?: boolean;
3
+ }
4
+ export declare function expandUrlTemplate(template: string, context: Record<string, any>, option?: UrlTemplateOptions): string;
5
+ //# sourceMappingURL=urlTemplate.d.ts.map