@azure/arm-commerce 4.0.0-beta.3 → 4.0.0-beta.4

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 (317) hide show
  1. package/LICENSE +3 -3
  2. package/README.md +30 -24
  3. package/dist/browser/api/index.d.ts +3 -0
  4. package/dist/browser/api/index.js +4 -0
  5. package/dist/browser/api/index.js.map +1 -0
  6. package/dist/browser/api/rateCard/index.d.ts +3 -0
  7. package/dist/browser/api/rateCard/index.js +4 -0
  8. package/dist/browser/api/rateCard/index.js.map +1 -0
  9. package/dist/browser/api/rateCard/operations.d.ts +9 -0
  10. package/dist/browser/api/rateCard/operations.js +33 -0
  11. package/dist/browser/api/rateCard/operations.js.map +1 -0
  12. package/dist/browser/api/rateCard/options.d.ts +5 -0
  13. package/dist/browser/api/rateCard/options.js +4 -0
  14. package/dist/browser/api/rateCard/options.js.map +1 -0
  15. package/dist/browser/api/usageAggregates/index.d.ts +3 -0
  16. package/dist/browser/api/usageAggregates/index.js +4 -0
  17. package/dist/browser/api/usageAggregates/index.js.map +1 -0
  18. package/dist/browser/api/usageAggregates/operations.d.ts +10 -0
  19. package/dist/browser/api/usageAggregates/operations.js +47 -0
  20. package/dist/browser/api/usageAggregates/operations.js.map +1 -0
  21. package/dist/browser/api/usageAggregates/options.d.ts +12 -0
  22. package/dist/browser/api/usageAggregates/options.js +4 -0
  23. package/dist/browser/api/usageAggregates/options.js.map +1 -0
  24. package/dist/browser/api/usageManagementContext.d.ts +20 -0
  25. package/dist/browser/api/usageManagementContext.js +23 -0
  26. package/dist/browser/api/usageManagementContext.js.map +1 -0
  27. package/dist/browser/classic/index.d.ts +3 -0
  28. package/dist/browser/classic/index.js +4 -0
  29. package/dist/browser/classic/index.js.map +1 -0
  30. package/dist/browser/classic/rateCard/index.d.ts +10 -0
  31. package/dist/browser/classic/rateCard/index.js +14 -0
  32. package/dist/browser/classic/rateCard/index.js.map +1 -0
  33. package/dist/browser/classic/usageAggregates/index.d.ts +11 -0
  34. package/dist/browser/classic/usageAggregates/index.js +14 -0
  35. package/dist/browser/classic/usageAggregates/index.js.map +1 -0
  36. package/dist/browser/index.d.ts +14 -0
  37. package/dist/browser/index.js +7 -0
  38. package/dist/browser/index.js.map +1 -0
  39. package/dist/browser/logger.d.ts +2 -0
  40. package/dist/browser/logger.js +5 -0
  41. package/dist/browser/logger.js.map +1 -0
  42. package/dist/browser/models/index.d.ts +3 -0
  43. package/dist/browser/models/index.js +4 -0
  44. package/dist/browser/models/index.js.map +1 -0
  45. package/dist/browser/models/models.d.ts +193 -0
  46. package/dist/browser/models/models.js +169 -0
  47. package/dist/browser/models/models.js.map +1 -0
  48. package/dist/browser/package.json +3 -0
  49. package/dist/browser/static-helpers/cloudSettingHelpers.d.ts +22 -0
  50. package/dist/browser/static-helpers/cloudSettingHelpers.js +38 -0
  51. package/dist/browser/static-helpers/cloudSettingHelpers.js.map +1 -0
  52. package/dist/browser/static-helpers/pagingHelpers.d.ts +74 -0
  53. package/dist/browser/static-helpers/pagingHelpers.js +143 -0
  54. package/dist/browser/static-helpers/pagingHelpers.js.map +1 -0
  55. package/dist/browser/static-helpers/urlTemplate.d.ts +5 -0
  56. package/dist/browser/static-helpers/urlTemplate.js +200 -0
  57. package/dist/browser/static-helpers/urlTemplate.js.map +1 -0
  58. package/dist/browser/usageManagementClient.d.ts +17 -0
  59. package/dist/browser/usageManagementClient.js +32 -0
  60. package/dist/browser/usageManagementClient.js.map +1 -0
  61. package/dist/commonjs/api/index.d.ts +3 -0
  62. package/dist/commonjs/api/index.js +28 -0
  63. package/dist/commonjs/api/index.js.map +7 -0
  64. package/dist/commonjs/api/rateCard/index.d.ts +3 -0
  65. package/dist/commonjs/api/rateCard/index.js +28 -0
  66. package/dist/commonjs/api/rateCard/index.js.map +7 -0
  67. package/dist/commonjs/api/rateCard/operations.d.ts +9 -0
  68. package/dist/commonjs/api/rateCard/operations.js +64 -0
  69. package/dist/commonjs/api/rateCard/operations.js.map +7 -0
  70. package/dist/commonjs/api/rateCard/options.d.ts +5 -0
  71. package/dist/commonjs/api/rateCard/options.js +16 -0
  72. package/dist/commonjs/api/rateCard/options.js.map +7 -0
  73. package/dist/commonjs/api/usageAggregates/index.d.ts +3 -0
  74. package/dist/commonjs/api/usageAggregates/index.js +28 -0
  75. package/dist/commonjs/api/usageAggregates/index.js.map +7 -0
  76. package/dist/commonjs/api/usageAggregates/operations.d.ts +10 -0
  77. package/dist/commonjs/api/usageAggregates/operations.js +83 -0
  78. package/dist/commonjs/api/usageAggregates/operations.js.map +7 -0
  79. package/dist/commonjs/api/usageAggregates/options.d.ts +12 -0
  80. package/dist/commonjs/api/usageAggregates/options.js +16 -0
  81. package/dist/commonjs/api/usageAggregates/options.js.map +7 -0
  82. package/dist/commonjs/api/usageManagementContext.d.ts +20 -0
  83. package/dist/commonjs/api/usageManagementContext.js +45 -0
  84. package/dist/commonjs/api/usageManagementContext.js.map +7 -0
  85. package/dist/commonjs/classic/index.d.ts +3 -0
  86. package/dist/commonjs/classic/index.js +16 -0
  87. package/dist/commonjs/classic/index.js.map +7 -0
  88. package/dist/commonjs/classic/rateCard/index.d.ts +10 -0
  89. package/dist/commonjs/classic/rateCard/index.js +38 -0
  90. package/dist/commonjs/classic/rateCard/index.js.map +7 -0
  91. package/dist/commonjs/classic/usageAggregates/index.d.ts +11 -0
  92. package/dist/commonjs/classic/usageAggregates/index.js +38 -0
  93. package/dist/commonjs/classic/usageAggregates/index.js.map +7 -0
  94. package/dist/commonjs/index.d.ts +14 -0
  95. package/dist/commonjs/index.js +34 -0
  96. package/dist/commonjs/index.js.map +7 -0
  97. package/dist/commonjs/logger.d.ts +2 -0
  98. package/dist/commonjs/logger.js +29 -0
  99. package/dist/commonjs/logger.js.map +7 -0
  100. package/dist/commonjs/models/index.d.ts +3 -0
  101. package/dist/commonjs/models/index.js +28 -0
  102. package/dist/commonjs/models/index.js.map +7 -0
  103. package/dist/commonjs/models/models.d.ts +193 -0
  104. package/dist/commonjs/models/models.js +209 -0
  105. package/dist/commonjs/models/models.js.map +7 -0
  106. package/dist/commonjs/package.json +3 -0
  107. package/dist/commonjs/static-helpers/cloudSettingHelpers.d.ts +22 -0
  108. package/dist/commonjs/static-helpers/cloudSettingHelpers.js +52 -0
  109. package/dist/commonjs/static-helpers/cloudSettingHelpers.js.map +7 -0
  110. package/dist/commonjs/static-helpers/pagingHelpers.d.ts +74 -0
  111. package/dist/commonjs/static-helpers/pagingHelpers.js +143 -0
  112. package/dist/commonjs/static-helpers/pagingHelpers.js.map +7 -0
  113. package/dist/commonjs/static-helpers/urlTemplate.d.ts +5 -0
  114. package/dist/commonjs/static-helpers/urlTemplate.js +197 -0
  115. package/dist/commonjs/static-helpers/urlTemplate.js.map +7 -0
  116. package/{types → dist/commonjs}/tsdoc-metadata.json +11 -11
  117. package/dist/commonjs/usageManagementClient.d.ts +17 -0
  118. package/dist/commonjs/usageManagementClient.js +54 -0
  119. package/dist/commonjs/usageManagementClient.js.map +7 -0
  120. package/dist/esm/api/index.d.ts +3 -0
  121. package/dist/esm/api/index.js +4 -0
  122. package/dist/esm/api/index.js.map +1 -0
  123. package/dist/esm/api/rateCard/index.d.ts +3 -0
  124. package/dist/esm/api/rateCard/index.js +4 -0
  125. package/dist/esm/api/rateCard/index.js.map +1 -0
  126. package/dist/esm/api/rateCard/operations.d.ts +9 -0
  127. package/dist/esm/api/rateCard/operations.js +33 -0
  128. package/dist/esm/api/rateCard/operations.js.map +1 -0
  129. package/dist/esm/api/rateCard/options.d.ts +5 -0
  130. package/dist/esm/api/rateCard/options.js +4 -0
  131. package/dist/esm/api/rateCard/options.js.map +1 -0
  132. package/dist/esm/api/usageAggregates/index.d.ts +3 -0
  133. package/dist/esm/api/usageAggregates/index.js +4 -0
  134. package/dist/esm/api/usageAggregates/index.js.map +1 -0
  135. package/dist/esm/api/usageAggregates/operations.d.ts +10 -0
  136. package/dist/esm/api/usageAggregates/operations.js +47 -0
  137. package/dist/esm/api/usageAggregates/operations.js.map +1 -0
  138. package/dist/esm/api/usageAggregates/options.d.ts +12 -0
  139. package/dist/esm/api/usageAggregates/options.js +4 -0
  140. package/dist/esm/api/usageAggregates/options.js.map +1 -0
  141. package/dist/esm/api/usageManagementContext.d.ts +20 -0
  142. package/dist/esm/api/usageManagementContext.js +23 -0
  143. package/dist/esm/api/usageManagementContext.js.map +1 -0
  144. package/dist/esm/classic/index.d.ts +3 -0
  145. package/dist/esm/classic/index.js +4 -0
  146. package/dist/esm/classic/index.js.map +1 -0
  147. package/dist/esm/classic/rateCard/index.d.ts +10 -0
  148. package/dist/esm/classic/rateCard/index.js +14 -0
  149. package/dist/esm/classic/rateCard/index.js.map +1 -0
  150. package/dist/esm/classic/usageAggregates/index.d.ts +11 -0
  151. package/dist/esm/classic/usageAggregates/index.js +14 -0
  152. package/dist/esm/classic/usageAggregates/index.js.map +1 -0
  153. package/dist/esm/index.d.ts +14 -0
  154. package/dist/esm/index.js +7 -0
  155. package/dist/esm/index.js.map +1 -0
  156. package/dist/esm/logger.d.ts +2 -0
  157. package/dist/esm/logger.js +5 -0
  158. package/dist/esm/logger.js.map +1 -0
  159. package/dist/esm/models/index.d.ts +3 -0
  160. package/dist/esm/models/index.js +4 -0
  161. package/dist/esm/models/index.js.map +1 -0
  162. package/dist/esm/models/models.d.ts +193 -0
  163. package/dist/esm/models/models.js +169 -0
  164. package/dist/esm/models/models.js.map +1 -0
  165. package/dist/esm/package.json +3 -0
  166. package/dist/esm/static-helpers/cloudSettingHelpers.d.ts +22 -0
  167. package/dist/esm/static-helpers/cloudSettingHelpers.js +38 -0
  168. package/dist/esm/static-helpers/cloudSettingHelpers.js.map +1 -0
  169. package/dist/esm/static-helpers/pagingHelpers.d.ts +74 -0
  170. package/dist/esm/static-helpers/pagingHelpers.js +143 -0
  171. package/dist/esm/static-helpers/pagingHelpers.js.map +1 -0
  172. package/dist/esm/static-helpers/urlTemplate.d.ts +5 -0
  173. package/dist/esm/static-helpers/urlTemplate.js +200 -0
  174. package/dist/esm/static-helpers/urlTemplate.js.map +1 -0
  175. package/dist/esm/usageManagementClient.d.ts +17 -0
  176. package/dist/esm/usageManagementClient.js +32 -0
  177. package/dist/esm/usageManagementClient.js.map +1 -0
  178. package/dist/react-native/api/index.d.ts +3 -0
  179. package/dist/react-native/api/index.js +4 -0
  180. package/dist/react-native/api/index.js.map +1 -0
  181. package/dist/react-native/api/rateCard/index.d.ts +3 -0
  182. package/dist/react-native/api/rateCard/index.js +4 -0
  183. package/dist/react-native/api/rateCard/index.js.map +1 -0
  184. package/dist/react-native/api/rateCard/operations.d.ts +9 -0
  185. package/dist/react-native/api/rateCard/operations.js +33 -0
  186. package/dist/react-native/api/rateCard/operations.js.map +1 -0
  187. package/dist/react-native/api/rateCard/options.d.ts +5 -0
  188. package/dist/react-native/api/rateCard/options.js +4 -0
  189. package/dist/react-native/api/rateCard/options.js.map +1 -0
  190. package/dist/react-native/api/usageAggregates/index.d.ts +3 -0
  191. package/dist/react-native/api/usageAggregates/index.js +4 -0
  192. package/dist/react-native/api/usageAggregates/index.js.map +1 -0
  193. package/dist/react-native/api/usageAggregates/operations.d.ts +10 -0
  194. package/dist/react-native/api/usageAggregates/operations.js +47 -0
  195. package/dist/react-native/api/usageAggregates/operations.js.map +1 -0
  196. package/dist/react-native/api/usageAggregates/options.d.ts +12 -0
  197. package/dist/react-native/api/usageAggregates/options.js +4 -0
  198. package/dist/react-native/api/usageAggregates/options.js.map +1 -0
  199. package/dist/react-native/api/usageManagementContext.d.ts +20 -0
  200. package/dist/react-native/api/usageManagementContext.js +23 -0
  201. package/dist/react-native/api/usageManagementContext.js.map +1 -0
  202. package/dist/react-native/classic/index.d.ts +3 -0
  203. package/dist/react-native/classic/index.js +4 -0
  204. package/dist/react-native/classic/index.js.map +1 -0
  205. package/dist/react-native/classic/rateCard/index.d.ts +10 -0
  206. package/dist/react-native/classic/rateCard/index.js +14 -0
  207. package/dist/react-native/classic/rateCard/index.js.map +1 -0
  208. package/dist/react-native/classic/usageAggregates/index.d.ts +11 -0
  209. package/dist/react-native/classic/usageAggregates/index.js +14 -0
  210. package/dist/react-native/classic/usageAggregates/index.js.map +1 -0
  211. package/dist/react-native/index.d.ts +14 -0
  212. package/dist/react-native/index.js +7 -0
  213. package/dist/react-native/index.js.map +1 -0
  214. package/dist/react-native/logger.d.ts +2 -0
  215. package/dist/react-native/logger.js +5 -0
  216. package/dist/react-native/logger.js.map +1 -0
  217. package/dist/react-native/models/index.d.ts +3 -0
  218. package/dist/react-native/models/index.js +4 -0
  219. package/dist/react-native/models/index.js.map +1 -0
  220. package/dist/react-native/models/models.d.ts +193 -0
  221. package/dist/react-native/models/models.js +169 -0
  222. package/dist/react-native/models/models.js.map +1 -0
  223. package/dist/react-native/package.json +3 -0
  224. package/dist/react-native/static-helpers/cloudSettingHelpers.d.ts +22 -0
  225. package/dist/react-native/static-helpers/cloudSettingHelpers.js +38 -0
  226. package/dist/react-native/static-helpers/cloudSettingHelpers.js.map +1 -0
  227. package/dist/react-native/static-helpers/pagingHelpers.d.ts +74 -0
  228. package/dist/react-native/static-helpers/pagingHelpers.js +143 -0
  229. package/dist/react-native/static-helpers/pagingHelpers.js.map +1 -0
  230. package/dist/react-native/static-helpers/urlTemplate.d.ts +5 -0
  231. package/dist/react-native/static-helpers/urlTemplate.js +200 -0
  232. package/dist/react-native/static-helpers/urlTemplate.js.map +1 -0
  233. package/dist/react-native/usageManagementClient.d.ts +17 -0
  234. package/dist/react-native/usageManagementClient.js +32 -0
  235. package/dist/react-native/usageManagementClient.js.map +1 -0
  236. package/package.json +164 -87
  237. package/CHANGELOG.md +0 -11
  238. package/dist/index.js +0 -935
  239. package/dist/index.js.map +0 -1
  240. package/dist/index.min.js +0 -1
  241. package/dist/index.min.js.map +0 -1
  242. package/dist-esm/samples-dev/getRateCard.d.ts +0 -2
  243. package/dist-esm/samples-dev/getRateCard.d.ts.map +0 -1
  244. package/dist-esm/samples-dev/getRateCard.js +0 -30
  245. package/dist-esm/samples-dev/getRateCard.js.map +0 -1
  246. package/dist-esm/samples-dev/rateCardGetSample.d.ts +0 -2
  247. package/dist-esm/samples-dev/rateCardGetSample.d.ts.map +0 -1
  248. package/dist-esm/samples-dev/rateCardGetSample.js +0 -30
  249. package/dist-esm/samples-dev/rateCardGetSample.js.map +0 -1
  250. package/dist-esm/src/index.d.ts +0 -6
  251. package/dist-esm/src/index.d.ts.map +0 -1
  252. package/dist-esm/src/index.js +0 -13
  253. package/dist-esm/src/index.js.map +0 -1
  254. package/dist-esm/src/models/index.d.ts +0 -178
  255. package/dist-esm/src/models/index.d.ts.map +0 -1
  256. package/dist-esm/src/models/index.js +0 -9
  257. package/dist-esm/src/models/index.js.map +0 -1
  258. package/dist-esm/src/models/mappers.d.ts +0 -19
  259. package/dist-esm/src/models/mappers.d.ts.map +0 -1
  260. package/dist-esm/src/models/mappers.js +0 -433
  261. package/dist-esm/src/models/mappers.js.map +0 -1
  262. package/dist-esm/src/models/parameters.d.ts +0 -13
  263. package/dist-esm/src/models/parameters.d.ts.map +0 -1
  264. package/dist-esm/src/models/parameters.js +0 -121
  265. package/dist-esm/src/models/parameters.js.map +0 -1
  266. package/dist-esm/src/operations/index.d.ts +0 -3
  267. package/dist-esm/src/operations/index.d.ts.map +0 -1
  268. package/dist-esm/src/operations/index.js +0 -10
  269. package/dist-esm/src/operations/index.js.map +0 -1
  270. package/dist-esm/src/operations/rateCard.d.ts +0 -27
  271. package/dist-esm/src/operations/rateCard.d.ts.map +0 -1
  272. package/dist-esm/src/operations/rateCard.js +0 -55
  273. package/dist-esm/src/operations/rateCard.js.map +0 -1
  274. package/dist-esm/src/operations/usageAggregates.d.ts +0 -38
  275. package/dist-esm/src/operations/usageAggregates.d.ts.map +0 -1
  276. package/dist-esm/src/operations/usageAggregates.js +0 -156
  277. package/dist-esm/src/operations/usageAggregates.js.map +0 -1
  278. package/dist-esm/src/operationsInterfaces/index.d.ts +0 -3
  279. package/dist-esm/src/operationsInterfaces/index.d.ts.map +0 -1
  280. package/dist-esm/src/operationsInterfaces/index.js +0 -10
  281. package/dist-esm/src/operationsInterfaces/index.js.map +0 -1
  282. package/dist-esm/src/operationsInterfaces/rateCard.d.ts +0 -19
  283. package/dist-esm/src/operationsInterfaces/rateCard.d.ts.map +0 -1
  284. package/dist-esm/src/operationsInterfaces/rateCard.js +0 -9
  285. package/dist-esm/src/operationsInterfaces/rateCard.js.map +0 -1
  286. package/dist-esm/src/operationsInterfaces/usageAggregates.d.ts +0 -13
  287. package/dist-esm/src/operationsInterfaces/usageAggregates.d.ts.map +0 -1
  288. package/dist-esm/src/operationsInterfaces/usageAggregates.js +0 -9
  289. package/dist-esm/src/operationsInterfaces/usageAggregates.js.map +0 -1
  290. package/dist-esm/src/pagingHelper.d.ts +0 -13
  291. package/dist-esm/src/pagingHelper.d.ts.map +0 -1
  292. package/dist-esm/src/pagingHelper.js +0 -32
  293. package/dist-esm/src/pagingHelper.js.map +0 -1
  294. package/dist-esm/src/usageManagementClient.d.ts +0 -22
  295. package/dist-esm/src/usageManagementClient.d.ts.map +0 -1
  296. package/dist-esm/src/usageManagementClient.js +0 -102
  297. package/dist-esm/src/usageManagementClient.js.map +0 -1
  298. package/dist-esm/test/commerce_examples.d.ts +0 -4
  299. package/dist-esm/test/commerce_examples.d.ts.map +0 -1
  300. package/dist-esm/test/commerce_examples.js +0 -56
  301. package/dist-esm/test/commerce_examples.js.map +0 -1
  302. package/review/arm-commerce.api.md +0 -181
  303. package/rollup.config.js +0 -122
  304. package/src/index.ts +0 -13
  305. package/src/models/index.ts +0 -211
  306. package/src/models/mappers.ts +0 -460
  307. package/src/models/parameters.ts +0 -137
  308. package/src/operations/index.ts +0 -10
  309. package/src/operations/rateCard.ts +0 -69
  310. package/src/operations/usageAggregates.ts +0 -206
  311. package/src/operationsInterfaces/index.ts +0 -10
  312. package/src/operationsInterfaces/rateCard.ts +0 -30
  313. package/src/operationsInterfaces/usageAggregates.ts +0 -26
  314. package/src/pagingHelper.ts +0 -39
  315. package/src/usageManagementClient.ts +0 -143
  316. package/tsconfig.json +0 -33
  317. package/types/arm-commerce.d.ts +0 -258
@@ -0,0 +1,10 @@
1
+ import type { UsageManagementContext as Client } from "../index.js";
2
+ import type { _UsageAggregationListResult, UsageAggregation } from "../../models/models.js";
3
+ import type { PagedAsyncIterableIterator } from "../../static-helpers/pagingHelpers.js";
4
+ import type { UsageAggregatesListOptionalParams } from "./options.js";
5
+ import type { StreamableMethod, PathUncheckedResponse } from "@azure-rest/core-client";
6
+ export declare function _listSend(context: Client, reportedStartTime: Date, reportedEndTime: Date, options?: UsageAggregatesListOptionalParams): StreamableMethod;
7
+ export declare function _listDeserialize(result: PathUncheckedResponse): Promise<_UsageAggregationListResult>;
8
+ /** Query aggregated Azure subscription consumption data for a date range. */
9
+ export declare function list(context: Client, reportedStartTime: Date, reportedEndTime: Date, options?: UsageAggregatesListOptionalParams): PagedAsyncIterableIterator<UsageAggregation>;
10
+ //# sourceMappingURL=operations.d.ts.map
@@ -0,0 +1,47 @@
1
+ // Copyright (c) Microsoft Corporation.
2
+ // Licensed under the MIT License.
3
+ import { _usageAggregationListResultDeserializer, errorObjectResponseDeserializer, } from "../../models/models.js";
4
+ import { buildPagedAsyncIterator } from "../../static-helpers/pagingHelpers.js";
5
+ import { expandUrlTemplate } from "../../static-helpers/urlTemplate.js";
6
+ import { createRestError, operationOptionsToRequestParameters } from "@azure-rest/core-client";
7
+ export function _listSend(context, reportedStartTime, reportedEndTime, options = { requestOptions: {} }) {
8
+ const path = expandUrlTemplate("/subscriptions/{subscriptionId}/providers/Microsoft.Commerce/usageAggregates{?api%2Dversion,reportedStartTime,reportedEndTime,showDetails,aggregationGranularity,continuationToken}", {
9
+ subscriptionId: context.subscriptionId,
10
+ "api%2Dversion": context.apiVersion ?? "2015-06-01-preview",
11
+ reportedStartTime: reportedStartTime.toISOString(),
12
+ reportedEndTime: reportedEndTime.toISOString(),
13
+ showDetails: options?.showDetails,
14
+ aggregationGranularity: options?.aggregationGranularity ?? "Daily",
15
+ continuationToken: options?.continuationToken,
16
+ }, {
17
+ allowReserved: options?.requestOptions?.skipUrlEncoding,
18
+ });
19
+ return context.path(path).get({
20
+ ...operationOptionsToRequestParameters(options),
21
+ headers: { accept: "application/json", ...options.requestOptions?.headers },
22
+ });
23
+ }
24
+ export async function _listDeserialize(result) {
25
+ const expectedStatuses = ["200"];
26
+ if (!expectedStatuses.includes(result.status)) {
27
+ const error = createRestError(result);
28
+ const statusCode = Number.parseInt(result.status);
29
+ if (statusCode === 202) {
30
+ error.details = errorObjectResponseDeserializer(result.body);
31
+ }
32
+ else {
33
+ error.details = errorObjectResponseDeserializer(result.body);
34
+ }
35
+ throw error;
36
+ }
37
+ return _usageAggregationListResultDeserializer(result.body);
38
+ }
39
+ /** Query aggregated Azure subscription consumption data for a date range. */
40
+ export function list(context, reportedStartTime, reportedEndTime, options = { requestOptions: {} }) {
41
+ return buildPagedAsyncIterator(context, () => _listSend(context, reportedStartTime, reportedEndTime, options), _listDeserialize, ["200"], {
42
+ itemName: "value",
43
+ nextLinkName: "nextLink",
44
+ apiVersion: context.apiVersion ?? "2015-06-01-preview",
45
+ });
46
+ }
47
+ //# sourceMappingURL=operations.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"operations.js","sourceRoot":"","sources":["../../../../src/api/usageAggregates/operations.ts"],"names":[],"mappings":"AAAA,uCAAuC;AACvC,kCAAkC;AAIlC,OAAO,EACL,uCAAuC,EACvC,+BAA+B,GAChC,MAAM,wBAAwB,CAAC;AAEhC,OAAO,EAAE,uBAAuB,EAAE,MAAM,uCAAuC,CAAC;AAChF,OAAO,EAAE,iBAAiB,EAAE,MAAM,qCAAqC,CAAC;AAGxE,OAAO,EAAE,eAAe,EAAE,mCAAmC,EAAE,MAAM,yBAAyB,CAAC;AAE/F,MAAM,UAAU,SAAS,CACvB,OAAe,EACf,iBAAuB,EACvB,eAAqB,EACrB,UAA6C,EAAE,cAAc,EAAE,EAAE,EAAE;IAEnE,MAAM,IAAI,GAAG,iBAAiB,CAC5B,qLAAqL,EACrL;QACE,cAAc,EAAE,OAAO,CAAC,cAAc;QACtC,eAAe,EAAE,OAAO,CAAC,UAAU,IAAI,oBAAoB;QAC3D,iBAAiB,EAAE,iBAAiB,CAAC,WAAW,EAAE;QAClD,eAAe,EAAE,eAAe,CAAC,WAAW,EAAE;QAC9C,WAAW,EAAE,OAAO,EAAE,WAAW;QACjC,sBAAsB,EAAE,OAAO,EAAE,sBAAsB,IAAI,OAAO;QAClE,iBAAiB,EAAE,OAAO,EAAE,iBAAiB;KAC9C,EACD;QACE,aAAa,EAAE,OAAO,EAAE,cAAc,EAAE,eAAe;KACxD,CACF,CAAC;IACF,OAAO,OAAO,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC,GAAG,CAAC;QAC5B,GAAG,mCAAmC,CAAC,OAAO,CAAC;QAC/C,OAAO,EAAE,EAAE,MAAM,EAAE,kBAAkB,EAAE,GAAG,OAAO,CAAC,cAAc,EAAE,OAAO,EAAE;KAC5E,CAAC,CAAC;AACL,CAAC;AAED,MAAM,CAAC,KAAK,UAAU,gBAAgB,CACpC,MAA6B;IAE7B,MAAM,gBAAgB,GAAG,CAAC,KAAK,CAAC,CAAC;IACjC,IAAI,CAAC,gBAAgB,CAAC,QAAQ,CAAC,MAAM,CAAC,MAAM,CAAC,EAAE,CAAC;QAC9C,MAAM,KAAK,GAAG,eAAe,CAAC,MAAM,CAAC,CAAC;QACtC,MAAM,UAAU,GAAG,MAAM,CAAC,QAAQ,CAAC,MAAM,CAAC,MAAM,CAAC,CAAC;QAClD,IAAI,UAAU,KAAK,GAAG,EAAE,CAAC;YACvB,KAAK,CAAC,OAAO,GAAG,+BAA+B,CAAC,MAAM,CAAC,IAAI,CAAC,CAAC;QAC/D,CAAC;aAAM,CAAC;YACN,KAAK,CAAC,OAAO,GAAG,+BAA+B,CAAC,MAAM,CAAC,IAAI,CAAC,CAAC;QAC/D,CAAC;QACD,MAAM,KAAK,CAAC;IACd,CAAC;IAED,OAAO,uCAAuC,CAAC,MAAM,CAAC,IAAI,CAAC,CAAC;AAC9D,CAAC;AAED,6EAA6E;AAC7E,MAAM,UAAU,IAAI,CAClB,OAAe,EACf,iBAAuB,EACvB,eAAqB,EACrB,UAA6C,EAAE,cAAc,EAAE,EAAE,EAAE;IAEnE,OAAO,uBAAuB,CAC5B,OAAO,EACP,GAAG,EAAE,CAAC,SAAS,CAAC,OAAO,EAAE,iBAAiB,EAAE,eAAe,EAAE,OAAO,CAAC,EACrE,gBAAgB,EAChB,CAAC,KAAK,CAAC,EACP;QACE,QAAQ,EAAE,OAAO;QACjB,YAAY,EAAE,UAAU;QACxB,UAAU,EAAE,OAAO,CAAC,UAAU,IAAI,oBAAoB;KACvD,CACF,CAAC;AACJ,CAAC","sourcesContent":["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT License.\n\nimport type { UsageManagementContext as Client } from \"../index.js\";\nimport type { _UsageAggregationListResult, UsageAggregation } from \"../../models/models.js\";\nimport {\n _usageAggregationListResultDeserializer,\n errorObjectResponseDeserializer,\n} from \"../../models/models.js\";\nimport type { PagedAsyncIterableIterator } from \"../../static-helpers/pagingHelpers.js\";\nimport { buildPagedAsyncIterator } from \"../../static-helpers/pagingHelpers.js\";\nimport { expandUrlTemplate } from \"../../static-helpers/urlTemplate.js\";\nimport type { UsageAggregatesListOptionalParams } from \"./options.js\";\nimport type { StreamableMethod, PathUncheckedResponse } from \"@azure-rest/core-client\";\nimport { createRestError, operationOptionsToRequestParameters } from \"@azure-rest/core-client\";\n\nexport function _listSend(\n context: Client,\n reportedStartTime: Date,\n reportedEndTime: Date,\n options: UsageAggregatesListOptionalParams = { requestOptions: {} },\n): StreamableMethod {\n const path = expandUrlTemplate(\n \"/subscriptions/{subscriptionId}/providers/Microsoft.Commerce/usageAggregates{?api%2Dversion,reportedStartTime,reportedEndTime,showDetails,aggregationGranularity,continuationToken}\",\n {\n subscriptionId: context.subscriptionId,\n \"api%2Dversion\": context.apiVersion ?? \"2015-06-01-preview\",\n reportedStartTime: reportedStartTime.toISOString(),\n reportedEndTime: reportedEndTime.toISOString(),\n showDetails: options?.showDetails,\n aggregationGranularity: options?.aggregationGranularity ?? \"Daily\",\n continuationToken: options?.continuationToken,\n },\n {\n allowReserved: options?.requestOptions?.skipUrlEncoding,\n },\n );\n return context.path(path).get({\n ...operationOptionsToRequestParameters(options),\n headers: { accept: \"application/json\", ...options.requestOptions?.headers },\n });\n}\n\nexport async function _listDeserialize(\n result: PathUncheckedResponse,\n): Promise<_UsageAggregationListResult> {\n const expectedStatuses = [\"200\"];\n if (!expectedStatuses.includes(result.status)) {\n const error = createRestError(result);\n const statusCode = Number.parseInt(result.status);\n if (statusCode === 202) {\n error.details = errorObjectResponseDeserializer(result.body);\n } else {\n error.details = errorObjectResponseDeserializer(result.body);\n }\n throw error;\n }\n\n return _usageAggregationListResultDeserializer(result.body);\n}\n\n/** Query aggregated Azure subscription consumption data for a date range. */\nexport function list(\n context: Client,\n reportedStartTime: Date,\n reportedEndTime: Date,\n options: UsageAggregatesListOptionalParams = { requestOptions: {} },\n): PagedAsyncIterableIterator<UsageAggregation> {\n return buildPagedAsyncIterator(\n context,\n () => _listSend(context, reportedStartTime, reportedEndTime, options),\n _listDeserialize,\n [\"200\"],\n {\n itemName: \"value\",\n nextLinkName: \"nextLink\",\n apiVersion: context.apiVersion ?? \"2015-06-01-preview\",\n },\n );\n}\n"]}
@@ -0,0 +1,12 @@
1
+ import type { AggregationGranularity } from "../../models/models.js";
2
+ import type { OperationOptions } from "@azure-rest/core-client";
3
+ /** Optional parameters. */
4
+ export interface UsageAggregatesListOptionalParams extends OperationOptions {
5
+ /** `True` returns usage data in instance-level detail, `false` causes server-side aggregation with fewer details. For example, if you have 3 website instances, by default you will get 3 line items for website consumption. If you specify showDetails = false, the data will be aggregated as a single line item for website consumption within the time period (for the given subscriptionId, meterId, usageStartTime and usageEndTime). */
6
+ showDetails?: boolean;
7
+ /** `Daily` (default) returns the data in daily granularity, `Hourly` returns the data in hourly granularity. */
8
+ aggregationGranularity?: AggregationGranularity;
9
+ /** Used when a continuation token string is provided in the response body of the previous call, enabling paging through a large result set. If not present, the data is retrieved from the beginning of the day/hour (based on the granularity) passed in. */
10
+ continuationToken?: string;
11
+ }
12
+ //# sourceMappingURL=options.d.ts.map
@@ -0,0 +1,4 @@
1
+ // Copyright (c) Microsoft Corporation.
2
+ // Licensed under the MIT License.
3
+ export {};
4
+ //# sourceMappingURL=options.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"options.js","sourceRoot":"","sources":["../../../../src/api/usageAggregates/options.ts"],"names":[],"mappings":"AAAA,uCAAuC;AACvC,kCAAkC","sourcesContent":["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT License.\n\nimport type { AggregationGranularity } from \"../../models/models.js\";\nimport type { OperationOptions } from \"@azure-rest/core-client\";\n\n/** Optional parameters. */\nexport interface UsageAggregatesListOptionalParams extends OperationOptions {\n /** `True` returns usage data in instance-level detail, `false` causes server-side aggregation with fewer details. For example, if you have 3 website instances, by default you will get 3 line items for website consumption. If you specify showDetails = false, the data will be aggregated as a single line item for website consumption within the time period (for the given subscriptionId, meterId, usageStartTime and usageEndTime). */\n showDetails?: boolean;\n /** `Daily` (default) returns the data in daily granularity, `Hourly` returns the data in hourly granularity. */\n aggregationGranularity?: AggregationGranularity;\n /** Used when a continuation token string is provided in the response body of the previous call, enabling paging through a large result set. If not present, the data is retrieved from the beginning of the day/hour (based on the granularity) passed in. */\n continuationToken?: string;\n}\n"]}
@@ -0,0 +1,20 @@
1
+ import type { AzureSupportedClouds } from "../static-helpers/cloudSettingHelpers.js";
2
+ import type { Client, ClientOptions } from "@azure-rest/core-client";
3
+ import type { TokenCredential } from "@azure/core-auth";
4
+ export interface UsageManagementContext extends Client {
5
+ /** The ID of the target subscription. The value must be an UUID. */
6
+ subscriptionId: string;
7
+ /** The API version to use for this operation. */
8
+ /** Known values of {@link KnownVersions} that the service accepts. */
9
+ apiVersion?: string;
10
+ }
11
+ /** Optional parameters for the client. */
12
+ export interface UsageManagementClientOptionalParams extends ClientOptions {
13
+ /** The API version to use for this operation. */
14
+ /** Known values of {@link KnownVersions} that the service accepts. */
15
+ apiVersion?: string;
16
+ /** Specifies the Azure cloud environment for the client. */
17
+ cloudSetting?: AzureSupportedClouds;
18
+ }
19
+ export declare function createUsageManagement(credential: TokenCredential, subscriptionId: string, options?: UsageManagementClientOptionalParams): UsageManagementContext;
20
+ //# sourceMappingURL=usageManagementContext.d.ts.map
@@ -0,0 +1,23 @@
1
+ // Copyright (c) Microsoft Corporation.
2
+ // Licensed under the MIT License.
3
+ import { logger } from "../logger.js";
4
+ import { getArmEndpoint } from "../static-helpers/cloudSettingHelpers.js";
5
+ import { getClient } from "@azure-rest/core-client";
6
+ export function createUsageManagement(credential, subscriptionId, options = {}) {
7
+ const endpointUrl = options.endpoint ?? getArmEndpoint(options.cloudSetting) ?? "https://management.azure.com";
8
+ const prefixFromOptions = options?.userAgentOptions?.userAgentPrefix;
9
+ const userAgentInfo = `azsdk-js-arm-commerce/4.0.0-beta.4`;
10
+ const userAgentPrefix = prefixFromOptions
11
+ ? `${prefixFromOptions} azsdk-js-api ${userAgentInfo}`
12
+ : `azsdk-js-api ${userAgentInfo}`;
13
+ const { apiVersion: _, ...updatedOptions } = {
14
+ ...options,
15
+ userAgentOptions: { userAgentPrefix },
16
+ loggingOptions: { logger: options.loggingOptions?.logger ?? logger.info },
17
+ credentials: { scopes: options.credentials?.scopes ?? [`${endpointUrl}/.default`] },
18
+ };
19
+ const clientContext = getClient(endpointUrl, credential, updatedOptions);
20
+ const apiVersion = options.apiVersion;
21
+ return { ...clientContext, apiVersion, subscriptionId };
22
+ }
23
+ //# sourceMappingURL=usageManagementContext.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"usageManagementContext.js","sourceRoot":"","sources":["../../../src/api/usageManagementContext.ts"],"names":[],"mappings":"AAAA,uCAAuC;AACvC,kCAAkC;AAElC,OAAO,EAAE,MAAM,EAAE,MAAM,cAAc,CAAC;AAGtC,OAAO,EAAE,cAAc,EAAE,MAAM,0CAA0C,CAAC;AAE1E,OAAO,EAAE,SAAS,EAAE,MAAM,yBAAyB,CAAC;AAoBpD,MAAM,UAAU,qBAAqB,CACnC,UAA2B,EAC3B,cAAsB,EACtB,UAA+C,EAAE;IAEjD,MAAM,WAAW,GACf,OAAO,CAAC,QAAQ,IAAI,cAAc,CAAC,OAAO,CAAC,YAAY,CAAC,IAAI,8BAA8B,CAAC;IAC7F,MAAM,iBAAiB,GAAG,OAAO,EAAE,gBAAgB,EAAE,eAAe,CAAC;IACrE,MAAM,aAAa,GAAG,oCAAoC,CAAC;IAC3D,MAAM,eAAe,GAAG,iBAAiB;QACvC,CAAC,CAAC,GAAG,iBAAiB,iBAAiB,aAAa,EAAE;QACtD,CAAC,CAAC,gBAAgB,aAAa,EAAE,CAAC;IACpC,MAAM,EAAE,UAAU,EAAE,CAAC,EAAE,GAAG,cAAc,EAAE,GAAG;QAC3C,GAAG,OAAO;QACV,gBAAgB,EAAE,EAAE,eAAe,EAAE;QACrC,cAAc,EAAE,EAAE,MAAM,EAAE,OAAO,CAAC,cAAc,EAAE,MAAM,IAAI,MAAM,CAAC,IAAI,EAAE;QACzE,WAAW,EAAE,EAAE,MAAM,EAAE,OAAO,CAAC,WAAW,EAAE,MAAM,IAAI,CAAC,GAAG,WAAW,WAAW,CAAC,EAAE;KACpF,CAAC;IACF,MAAM,aAAa,GAAG,SAAS,CAAC,WAAW,EAAE,UAAU,EAAE,cAAc,CAAC,CAAC;IACzE,MAAM,UAAU,GAAG,OAAO,CAAC,UAAU,CAAC;IACtC,OAAO,EAAE,GAAG,aAAa,EAAE,UAAU,EAAE,cAAc,EAA4B,CAAC;AACpF,CAAC","sourcesContent":["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT License.\n\nimport { logger } from \"../logger.js\";\nimport { KnownVersions } from \"../models/models.js\";\nimport type { AzureSupportedClouds } from \"../static-helpers/cloudSettingHelpers.js\";\nimport { getArmEndpoint } from \"../static-helpers/cloudSettingHelpers.js\";\nimport type { Client, ClientOptions } from \"@azure-rest/core-client\";\nimport { getClient } from \"@azure-rest/core-client\";\nimport type { TokenCredential } from \"@azure/core-auth\";\n\nexport interface UsageManagementContext extends Client {\n /** The ID of the target subscription. The value must be an UUID. */\n subscriptionId: string;\n /** The API version to use for this operation. */\n /** Known values of {@link KnownVersions} that the service accepts. */\n apiVersion?: string;\n}\n\n/** Optional parameters for the client. */\nexport interface UsageManagementClientOptionalParams extends ClientOptions {\n /** The API version to use for this operation. */\n /** Known values of {@link KnownVersions} that the service accepts. */\n apiVersion?: string;\n /** Specifies the Azure cloud environment for the client. */\n cloudSetting?: AzureSupportedClouds;\n}\n\nexport function createUsageManagement(\n credential: TokenCredential,\n subscriptionId: string,\n options: UsageManagementClientOptionalParams = {},\n): UsageManagementContext {\n const endpointUrl =\n options.endpoint ?? getArmEndpoint(options.cloudSetting) ?? \"https://management.azure.com\";\n const prefixFromOptions = options?.userAgentOptions?.userAgentPrefix;\n const userAgentInfo = `azsdk-js-arm-commerce/4.0.0-beta.4`;\n const userAgentPrefix = prefixFromOptions\n ? `${prefixFromOptions} azsdk-js-api ${userAgentInfo}`\n : `azsdk-js-api ${userAgentInfo}`;\n const { apiVersion: _, ...updatedOptions } = {\n ...options,\n userAgentOptions: { userAgentPrefix },\n loggingOptions: { logger: options.loggingOptions?.logger ?? logger.info },\n credentials: { scopes: options.credentials?.scopes ?? [`${endpointUrl}/.default`] },\n };\n const clientContext = getClient(endpointUrl, credential, updatedOptions);\n const apiVersion = options.apiVersion;\n return { ...clientContext, apiVersion, subscriptionId } as UsageManagementContext;\n}\n"]}
@@ -0,0 +1,3 @@
1
+ export type { RateCardOperations } from "./rateCard/index.js";
2
+ export type { UsageAggregatesOperations } from "./usageAggregates/index.js";
3
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1,4 @@
1
+ // Copyright (c) Microsoft Corporation.
2
+ // Licensed under the MIT License.
3
+ export {};
4
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/classic/index.ts"],"names":[],"mappings":"AAAA,uCAAuC;AACvC,kCAAkC","sourcesContent":["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT License.\n\nexport type { RateCardOperations } from \"./rateCard/index.js\";\nexport type { UsageAggregatesOperations } from \"./usageAggregates/index.js\";\n"]}
@@ -0,0 +1,10 @@
1
+ import type { UsageManagementContext } from "../../api/usageManagementContext.js";
2
+ import type { RateCardGetOptionalParams } from "../../api/rateCard/options.js";
3
+ import type { ResourceRateCardInfo } from "../../models/models.js";
4
+ /** Interface representing a RateCard operations. */
5
+ export interface RateCardOperations {
6
+ /** Enables you to query for the resource/meter metadata and related prices used in a given subscription by Offer ID, Currency, Locale and Region. The metadata associated with the billing meters, including but not limited to service names, types, resources, units of measure, and regions, is subject to change at any time and without notice. If you intend to use this billing data in an automated fashion, please use the billing meter GUID to uniquely identify each billable item. If the billing meter GUID is scheduled to change due to a new billing model, you will be notified in advance of the change. */
7
+ get: (filter: string, options?: RateCardGetOptionalParams) => Promise<ResourceRateCardInfo>;
8
+ }
9
+ export declare function _getRateCardOperations(context: UsageManagementContext): RateCardOperations;
10
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1,14 @@
1
+ // Copyright (c) Microsoft Corporation.
2
+ // Licensed under the MIT License.
3
+ import { get } from "../../api/rateCard/operations.js";
4
+ function _getRateCard(context) {
5
+ return {
6
+ get: (filter, options) => get(context, filter, options),
7
+ };
8
+ }
9
+ export function _getRateCardOperations(context) {
10
+ return {
11
+ ..._getRateCard(context),
12
+ };
13
+ }
14
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/classic/rateCard/index.ts"],"names":[],"mappings":"AAAA,uCAAuC;AACvC,kCAAkC;AAGlC,OAAO,EAAE,GAAG,EAAE,MAAM,kCAAkC,CAAC;AAUvD,SAAS,YAAY,CAAC,OAA+B;IACnD,OAAO;QACL,GAAG,EAAE,CAAC,MAAc,EAAE,OAAmC,EAAE,EAAE,CAAC,GAAG,CAAC,OAAO,EAAE,MAAM,EAAE,OAAO,CAAC;KAC5F,CAAC;AACJ,CAAC;AAED,MAAM,UAAU,sBAAsB,CAAC,OAA+B;IACpE,OAAO;QACL,GAAG,YAAY,CAAC,OAAO,CAAC;KACzB,CAAC;AACJ,CAAC","sourcesContent":["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT License.\n\nimport type { UsageManagementContext } from \"../../api/usageManagementContext.js\";\nimport { get } from \"../../api/rateCard/operations.js\";\nimport type { RateCardGetOptionalParams } from \"../../api/rateCard/options.js\";\nimport type { ResourceRateCardInfo } from \"../../models/models.js\";\n\n/** Interface representing a RateCard operations. */\nexport interface RateCardOperations {\n /** Enables you to query for the resource/meter metadata and related prices used in a given subscription by Offer ID, Currency, Locale and Region. The metadata associated with the billing meters, including but not limited to service names, types, resources, units of measure, and regions, is subject to change at any time and without notice. If you intend to use this billing data in an automated fashion, please use the billing meter GUID to uniquely identify each billable item. If the billing meter GUID is scheduled to change due to a new billing model, you will be notified in advance of the change. */\n get: (filter: string, options?: RateCardGetOptionalParams) => Promise<ResourceRateCardInfo>;\n}\n\nfunction _getRateCard(context: UsageManagementContext) {\n return {\n get: (filter: string, options?: RateCardGetOptionalParams) => get(context, filter, options),\n };\n}\n\nexport function _getRateCardOperations(context: UsageManagementContext): RateCardOperations {\n return {\n ..._getRateCard(context),\n };\n}\n"]}
@@ -0,0 +1,11 @@
1
+ import type { UsageManagementContext } from "../../api/usageManagementContext.js";
2
+ import type { UsageAggregatesListOptionalParams } from "../../api/usageAggregates/options.js";
3
+ import type { UsageAggregation } from "../../models/models.js";
4
+ import type { PagedAsyncIterableIterator } from "../../static-helpers/pagingHelpers.js";
5
+ /** Interface representing a UsageAggregates operations. */
6
+ export interface UsageAggregatesOperations {
7
+ /** Query aggregated Azure subscription consumption data for a date range. */
8
+ list: (reportedStartTime: Date, reportedEndTime: Date, options?: UsageAggregatesListOptionalParams) => PagedAsyncIterableIterator<UsageAggregation>;
9
+ }
10
+ export declare function _getUsageAggregatesOperations(context: UsageManagementContext): UsageAggregatesOperations;
11
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1,14 @@
1
+ // Copyright (c) Microsoft Corporation.
2
+ // Licensed under the MIT License.
3
+ import { list } from "../../api/usageAggregates/operations.js";
4
+ function _getUsageAggregates(context) {
5
+ return {
6
+ list: (reportedStartTime, reportedEndTime, options) => list(context, reportedStartTime, reportedEndTime, options),
7
+ };
8
+ }
9
+ export function _getUsageAggregatesOperations(context) {
10
+ return {
11
+ ..._getUsageAggregates(context),
12
+ };
13
+ }
14
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/classic/usageAggregates/index.ts"],"names":[],"mappings":"AAAA,uCAAuC;AACvC,kCAAkC;AAGlC,OAAO,EAAE,IAAI,EAAE,MAAM,yCAAyC,CAAC;AAe/D,SAAS,mBAAmB,CAAC,OAA+B;IAC1D,OAAO;QACL,IAAI,EAAE,CACJ,iBAAuB,EACvB,eAAqB,EACrB,OAA2C,EAC3C,EAAE,CAAC,IAAI,CAAC,OAAO,EAAE,iBAAiB,EAAE,eAAe,EAAE,OAAO,CAAC;KAChE,CAAC;AACJ,CAAC;AAED,MAAM,UAAU,6BAA6B,CAC3C,OAA+B;IAE/B,OAAO;QACL,GAAG,mBAAmB,CAAC,OAAO,CAAC;KAChC,CAAC;AACJ,CAAC","sourcesContent":["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT License.\n\nimport type { UsageManagementContext } from \"../../api/usageManagementContext.js\";\nimport { list } from \"../../api/usageAggregates/operations.js\";\nimport type { UsageAggregatesListOptionalParams } from \"../../api/usageAggregates/options.js\";\nimport type { UsageAggregation } from \"../../models/models.js\";\nimport type { PagedAsyncIterableIterator } from \"../../static-helpers/pagingHelpers.js\";\n\n/** Interface representing a UsageAggregates operations. */\nexport interface UsageAggregatesOperations {\n /** Query aggregated Azure subscription consumption data for a date range. */\n list: (\n reportedStartTime: Date,\n reportedEndTime: Date,\n options?: UsageAggregatesListOptionalParams,\n ) => PagedAsyncIterableIterator<UsageAggregation>;\n}\n\nfunction _getUsageAggregates(context: UsageManagementContext) {\n return {\n list: (\n reportedStartTime: Date,\n reportedEndTime: Date,\n options?: UsageAggregatesListOptionalParams,\n ) => list(context, reportedStartTime, reportedEndTime, options),\n };\n}\n\nexport function _getUsageAggregatesOperations(\n context: UsageManagementContext,\n): UsageAggregatesOperations {\n return {\n ..._getUsageAggregates(context),\n };\n}\n"]}
@@ -0,0 +1,14 @@
1
+ import type { AzureSupportedClouds } from "./static-helpers/cloudSettingHelpers.js";
2
+ import { AzureClouds } from "./static-helpers/cloudSettingHelpers.js";
3
+ import type { PageSettings, ContinuablePage, PagedAsyncIterableIterator } from "./static-helpers/pagingHelpers.js";
4
+ export { UsageManagementClient } from "./usageManagementClient.js";
5
+ export type { UsageAggregation, UsageSample, ErrorObjectResponse, ErrorResponse, ResourceRateCardInfo, OfferTermInfo, OfferTermInfoUnion, OfferTermInfoName, MonetaryCredit, MonetaryCommitment, RecurringCharge, MeterInfo, AggregationGranularity, } from "./models/index.js";
6
+ export { KnownVersions } from "./models/index.js";
7
+ export type { UsageManagementClientOptionalParams } from "./api/index.js";
8
+ export type { RateCardGetOptionalParams } from "./api/rateCard/index.js";
9
+ export type { UsageAggregatesListOptionalParams } from "./api/usageAggregates/index.js";
10
+ export type { RateCardOperations, UsageAggregatesOperations } from "./classic/index.js";
11
+ export type { PageSettings, ContinuablePage, PagedAsyncIterableIterator };
12
+ export { AzureClouds };
13
+ export type { AzureSupportedClouds };
14
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1,7 @@
1
+ // Copyright (c) Microsoft Corporation.
2
+ // Licensed under the MIT License.
3
+ import { AzureClouds } from "./static-helpers/cloudSettingHelpers.js";
4
+ export { UsageManagementClient } from "./usageManagementClient.js";
5
+ export { KnownVersions } from "./models/index.js";
6
+ export { AzureClouds };
7
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":"AAAA,uCAAuC;AACvC,kCAAkC;AAGlC,OAAO,EAAE,WAAW,EAAE,MAAM,yCAAyC,CAAC;AAOtE,OAAO,EAAE,qBAAqB,EAAE,MAAM,4BAA4B,CAAC;AAgBnE,OAAO,EAAE,aAAa,EAAE,MAAM,mBAAmB,CAAC;AAMlD,OAAO,EAAE,WAAW,EAAE,CAAC","sourcesContent":["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT License.\n\nimport type { AzureSupportedClouds } from \"./static-helpers/cloudSettingHelpers.js\";\nimport { AzureClouds } from \"./static-helpers/cloudSettingHelpers.js\";\nimport type {\n PageSettings,\n ContinuablePage,\n PagedAsyncIterableIterator,\n} from \"./static-helpers/pagingHelpers.js\";\n\nexport { UsageManagementClient } from \"./usageManagementClient.js\";\nexport type {\n UsageAggregation,\n UsageSample,\n ErrorObjectResponse,\n ErrorResponse,\n ResourceRateCardInfo,\n OfferTermInfo,\n OfferTermInfoUnion,\n OfferTermInfoName,\n MonetaryCredit,\n MonetaryCommitment,\n RecurringCharge,\n MeterInfo,\n AggregationGranularity,\n} from \"./models/index.js\";\nexport { KnownVersions } from \"./models/index.js\";\nexport type { UsageManagementClientOptionalParams } from \"./api/index.js\";\nexport type { RateCardGetOptionalParams } from \"./api/rateCard/index.js\";\nexport type { UsageAggregatesListOptionalParams } from \"./api/usageAggregates/index.js\";\nexport type { RateCardOperations, UsageAggregatesOperations } from \"./classic/index.js\";\nexport type { PageSettings, ContinuablePage, PagedAsyncIterableIterator };\nexport { AzureClouds };\nexport type { AzureSupportedClouds };\n"]}
@@ -0,0 +1,2 @@
1
+ export declare const logger: import("@azure/logger").AzureLogger;
2
+ //# sourceMappingURL=logger.d.ts.map
@@ -0,0 +1,5 @@
1
+ // Copyright (c) Microsoft Corporation.
2
+ // Licensed under the MIT License.
3
+ import { createClientLogger } from "@azure/logger";
4
+ export const logger = createClientLogger("arm-commerce");
5
+ //# sourceMappingURL=logger.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"logger.js","sourceRoot":"","sources":["../../src/logger.ts"],"names":[],"mappings":"AAAA,uCAAuC;AACvC,kCAAkC;AAElC,OAAO,EAAE,kBAAkB,EAAE,MAAM,eAAe,CAAC;AACnD,MAAM,CAAC,MAAM,MAAM,GAAG,kBAAkB,CAAC,cAAc,CAAC,CAAC","sourcesContent":["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT License.\n\nimport { createClientLogger } from \"@azure/logger\";\nexport const logger = createClientLogger(\"arm-commerce\");\n"]}
@@ -0,0 +1,3 @@
1
+ export type { UsageAggregation, UsageSample, ErrorObjectResponse, ErrorResponse, ResourceRateCardInfo, OfferTermInfo, OfferTermInfoUnion, OfferTermInfoName, MonetaryCredit, MonetaryCommitment, RecurringCharge, MeterInfo, AggregationGranularity, } from "./models.js";
2
+ export { KnownVersions } from "./models.js";
3
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1,4 @@
1
+ // Copyright (c) Microsoft Corporation.
2
+ // Licensed under the MIT License.
3
+ export { KnownVersions } from "./models.js";
4
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/models/index.ts"],"names":[],"mappings":"AAAA,uCAAuC;AACvC,kCAAkC;AAiBlC,OAAO,EAAE,aAAa,EAAE,MAAM,aAAa,CAAC","sourcesContent":["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT License.\n\nexport type {\n UsageAggregation,\n UsageSample,\n ErrorObjectResponse,\n ErrorResponse,\n ResourceRateCardInfo,\n OfferTermInfo,\n OfferTermInfoUnion,\n OfferTermInfoName,\n MonetaryCredit,\n MonetaryCommitment,\n RecurringCharge,\n MeterInfo,\n AggregationGranularity,\n} from \"./models.js\";\nexport { KnownVersions } from \"./models.js\";\n"]}
@@ -0,0 +1,193 @@
1
+ /**
2
+ * This file contains only generated model types and their (de)serializers.
3
+ * Disable the following rules for internal models with '_' prefix and deserializers which require 'any' for raw JSON input.
4
+ */
5
+ /** The response of a UsageAggregation list operation. */
6
+ export interface _UsageAggregationListResult {
7
+ /** The UsageAggregation items on this page */
8
+ value: UsageAggregation[];
9
+ /** The link to the next page of items */
10
+ nextLink?: string;
11
+ }
12
+ export declare function _usageAggregationListResultDeserializer(item: any): _UsageAggregationListResult;
13
+ export declare function usageAggregationArrayDeserializer(result: Array<UsageAggregation>): any[];
14
+ /** Describes the usageAggregation. */
15
+ export interface UsageAggregation {
16
+ /** Unique Id for the usage aggregate. */
17
+ id?: string;
18
+ /** Name of the usage aggregate. */
19
+ name?: string;
20
+ /** Type of the resource being returned. */
21
+ type?: string;
22
+ /** The subscription identifier for the Azure user. */
23
+ subscriptionId?: string;
24
+ /** Unique ID for the resource that was consumed (aka ResourceID). */
25
+ meterId?: string;
26
+ /** UTC start time for the usage bucket to which this usage aggregate belongs. */
27
+ usageStartTime?: Date;
28
+ /** UTC end time for the usage bucket to which this usage aggregate belongs. */
29
+ usageEndTime?: Date;
30
+ /** The amount of the resource consumption that occurred in this time frame. */
31
+ quantity?: number;
32
+ /** The unit in which the usage for this resource is being counted, e.g. Hours, GB. */
33
+ unit?: string;
34
+ /** Friendly name of the resource being consumed. */
35
+ meterName?: string;
36
+ /** Category of the consumed resource. */
37
+ meterCategory?: string;
38
+ /** Sub-category of the consumed resource. */
39
+ meterSubCategory?: string;
40
+ /** Region of the meterId used for billing purposes */
41
+ meterRegion?: string;
42
+ /** Key-value pairs of instance details (legacy format). */
43
+ infoFields?: any;
44
+ /** Key-value pairs of instance details represented as a string. */
45
+ instanceData?: string;
46
+ }
47
+ export declare function usageAggregationDeserializer(item: any): UsageAggregation;
48
+ /** Describes a sample of the usageAggregation. */
49
+ export interface UsageSample {
50
+ /** The subscription identifier for the Azure user. */
51
+ subscriptionId?: string;
52
+ /** Unique ID for the resource that was consumed (aka ResourceID). */
53
+ meterId?: string;
54
+ /** UTC start time for the usage bucket to which this usage aggregate belongs. */
55
+ usageStartTime?: Date;
56
+ /** UTC end time for the usage bucket to which this usage aggregate belongs. */
57
+ usageEndTime?: Date;
58
+ /** The amount of the resource consumption that occurred in this time frame. */
59
+ quantity?: number;
60
+ /** The unit in which the usage for this resource is being counted, e.g. Hours, GB. */
61
+ unit?: string;
62
+ /** Friendly name of the resource being consumed. */
63
+ meterName?: string;
64
+ /** Category of the consumed resource. */
65
+ meterCategory?: string;
66
+ /** Sub-category of the consumed resource. */
67
+ meterSubCategory?: string;
68
+ /** Region of the meterId used for billing purposes */
69
+ meterRegion?: string;
70
+ /** Key-value pairs of instance details (legacy format). */
71
+ infoFields?: any;
72
+ /** Key-value pairs of instance details represented as a string. */
73
+ instanceData?: string;
74
+ }
75
+ export declare function usageSampleDeserializer(item: any): UsageSample;
76
+ /** Describes the format of Error response with a wrapper object */
77
+ export interface ErrorObjectResponse {
78
+ /** Wrapper object for error information */
79
+ error?: ErrorResponse;
80
+ }
81
+ export declare function errorObjectResponseDeserializer(item: any): ErrorObjectResponse;
82
+ /** Describes the format of Error response. */
83
+ export interface ErrorResponse {
84
+ /** Error code */
85
+ code?: string;
86
+ /** Error message indicating why the operation failed. */
87
+ message?: string;
88
+ }
89
+ export declare function errorResponseDeserializer(item: any): ErrorResponse;
90
+ /** Price and Metadata information for resources */
91
+ export interface ResourceRateCardInfo {
92
+ /** The currency in which the rates are provided. */
93
+ currency?: string;
94
+ /** The culture in which the resource information is localized. */
95
+ locale?: string;
96
+ /** All rates are pretax, so this will always be returned as 'false'. */
97
+ isTaxIncluded?: boolean;
98
+ /** A list of offer terms. */
99
+ offerTerms?: OfferTermInfoUnion[];
100
+ /** A list of meters. */
101
+ meters?: MeterInfo[];
102
+ }
103
+ export declare function resourceRateCardInfoDeserializer(item: any): ResourceRateCardInfo;
104
+ export declare function offerTermInfoUnionArrayDeserializer(result: Array<OfferTermInfoUnion>): any[];
105
+ /** Describes the offer term. */
106
+ export interface OfferTermInfo {
107
+ /** Name of the offer term */
108
+ /** The discriminator possible values: Monetary Credit, Monetary Commitment, Recurring Charge */
109
+ name: OfferTermInfoName;
110
+ /** Indicates the date from which the offer term is effective. */
111
+ effectiveDate?: Date;
112
+ }
113
+ export declare function offerTermInfoDeserializer(item: any): OfferTermInfo;
114
+ /** Alias for OfferTermInfoUnion */
115
+ export type OfferTermInfoUnion = MonetaryCredit | MonetaryCommitment | RecurringCharge | OfferTermInfo;
116
+ export declare function offerTermInfoUnionDeserializer(item: any): OfferTermInfoUnion;
117
+ /** Name of the offer term */
118
+ export type OfferTermInfoName = "Recurring Charge" | "Monetary Commitment" | "Monetary Credit";
119
+ /** Indicates that this is a monetary credit offer. */
120
+ export interface MonetaryCredit extends OfferTermInfo {
121
+ /** The amount of credit provided under the terms of the given offer level. */
122
+ credit?: number;
123
+ /** An array of meter ids that are excluded from the given offer terms. */
124
+ excludedMeterIds?: string[];
125
+ /** Name of the offer term */
126
+ name: "Monetary Credit";
127
+ }
128
+ export declare function monetaryCreditDeserializer(item: any): MonetaryCredit;
129
+ /** Indicates that a monetary commitment is required for this offer */
130
+ export interface MonetaryCommitment extends OfferTermInfo {
131
+ /** The list of key/value pairs for the tiered meter rates, in the format 'key':'value' where key = price, and value = the corresponding discount percentage. This field is used only by offer terms of type 'Monetary Commitment'. */
132
+ tieredDiscount?: Record<string, number>;
133
+ /** An array of meter ids that are excluded from the given offer terms. */
134
+ excludedMeterIds?: string[];
135
+ /** Name of the offer term */
136
+ name: "Monetary Commitment";
137
+ }
138
+ export declare function monetaryCommitmentDeserializer(item: any): MonetaryCommitment;
139
+ /** Indicates a recurring charge is present for this offer. */
140
+ export interface RecurringCharge extends OfferTermInfo {
141
+ /** The amount of recurring charge as per the offer term. */
142
+ recurringCharge?: number;
143
+ /** Name of the offer term */
144
+ name: "Recurring Charge";
145
+ }
146
+ export declare function recurringChargeDeserializer(item: any): RecurringCharge;
147
+ export declare function meterInfoArrayDeserializer(result: Array<MeterInfo>): any[];
148
+ /** Detailed information about the meter. */
149
+ export interface MeterInfo {
150
+ /** The unique identifier of the resource. */
151
+ meterId?: string;
152
+ /** The name of the meter, within the given meter category */
153
+ meterName?: string;
154
+ /** The category of the meter, e.g., 'Cloud services', 'Networking', etc.. */
155
+ meterCategory?: string;
156
+ /** The subcategory of the meter, e.g., 'A6 Cloud services', 'ExpressRoute (IXP)', etc.. */
157
+ meterSubCategory?: string;
158
+ /** The unit in which the meter consumption is charged, e.g., 'Hours', 'GB', etc. */
159
+ unit?: string;
160
+ /** Provides additional meter data. 'Third Party' indicates a meter with no discount. Blanks indicate First Party. */
161
+ meterTags?: string[];
162
+ /** The region in which the Azure service is available. */
163
+ meterRegion?: string;
164
+ /** The list of key/value pairs for the meter rates, in the format 'key':'value' where key = the meter quantity, and value = the corresponding price */
165
+ meterRates?: Record<string, number>;
166
+ /** Indicates the date from which the meter rate is effective. */
167
+ effectiveDate?: Date;
168
+ /** The resource quantity that is included in the offer at no cost. Consumption beyond this quantity will be charged. */
169
+ includedQuantity?: number;
170
+ }
171
+ export declare function meterInfoDeserializer(item: any): MeterInfo;
172
+ /** Type of AggregationGranularity */
173
+ export type AggregationGranularity = "Daily" | "Hourly";
174
+ /** The available API versions. */
175
+ export declare enum KnownVersions {
176
+ /** The 2015-06-01-preview API version. */
177
+ V20150601Preview = "2015-06-01-preview"
178
+ }
179
+ export declare function _usageAggregationPropertiesDeserializer(item: any): {
180
+ subscriptionId: any;
181
+ meterId: any;
182
+ usageStartTime: any;
183
+ usageEndTime: any;
184
+ quantity: any;
185
+ unit: any;
186
+ meterName: any;
187
+ meterCategory: any;
188
+ meterSubCategory: any;
189
+ meterRegion: any;
190
+ infoFields: any;
191
+ instanceData: any;
192
+ };
193
+ //# sourceMappingURL=models.d.ts.map