@azure/arm-commerce 4.0.0-alpha.20250718.1 → 4.0.0-alpha.20250730.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (43) hide show
  1. package/dist/browser/models/mappers.js +19 -8
  2. package/dist/browser/models/mappers.js.map +1 -1
  3. package/dist/browser/operations/rateCard.js +1 -0
  4. package/dist/browser/operations/rateCard.js.map +1 -1
  5. package/dist/browser/operations/usageAggregates.js +23 -40
  6. package/dist/browser/operations/usageAggregates.js.map +1 -1
  7. package/dist/browser/pagingHelper.js +2 -4
  8. package/dist/browser/pagingHelper.js.map +1 -1
  9. package/dist/browser/usageManagementClient.js +15 -5
  10. package/dist/browser/usageManagementClient.js.map +1 -1
  11. package/dist/commonjs/models/mappers.js +19 -8
  12. package/dist/commonjs/models/mappers.js.map +1 -1
  13. package/dist/commonjs/operations/rateCard.js +1 -0
  14. package/dist/commonjs/operations/rateCard.js.map +1 -1
  15. package/dist/commonjs/operations/usageAggregates.js +23 -39
  16. package/dist/commonjs/operations/usageAggregates.js.map +1 -1
  17. package/dist/commonjs/pagingHelper.js +2 -4
  18. package/dist/commonjs/pagingHelper.js.map +1 -1
  19. package/dist/commonjs/tsdoc-metadata.json +11 -11
  20. package/dist/commonjs/usageManagementClient.js +15 -5
  21. package/dist/commonjs/usageManagementClient.js.map +1 -1
  22. package/dist/esm/models/mappers.js +19 -8
  23. package/dist/esm/models/mappers.js.map +1 -1
  24. package/dist/esm/operations/rateCard.js +1 -0
  25. package/dist/esm/operations/rateCard.js.map +1 -1
  26. package/dist/esm/operations/usageAggregates.js +23 -40
  27. package/dist/esm/operations/usageAggregates.js.map +1 -1
  28. package/dist/esm/pagingHelper.js +2 -4
  29. package/dist/esm/pagingHelper.js.map +1 -1
  30. package/dist/esm/usageManagementClient.js +15 -5
  31. package/dist/esm/usageManagementClient.js.map +1 -1
  32. package/dist/react-native/models/mappers.js +19 -8
  33. package/dist/react-native/models/mappers.js.map +1 -1
  34. package/dist/react-native/operations/rateCard.js +1 -0
  35. package/dist/react-native/operations/rateCard.js.map +1 -1
  36. package/dist/react-native/operations/usageAggregates.js +23 -40
  37. package/dist/react-native/operations/usageAggregates.js.map +1 -1
  38. package/dist/react-native/pagingHelper.js +2 -4
  39. package/dist/react-native/pagingHelper.js.map +1 -1
  40. package/dist/react-native/usageManagementClient.js +15 -5
  41. package/dist/react-native/usageManagementClient.js.map +1 -1
  42. package/package.json +2 -2
  43. package/review/arm-commerce-node.api.md +181 -181
@@ -1 +1 @@
1
- {"version":3,"file":"usageAggregates.js","sourceRoot":"","sources":["../../../src/operations/usageAggregates.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;;AAGH,OAAO,EAAE,oBAAoB,EAAE,MAAM,oBAAoB,CAAC;AAE1D,OAAO,KAAK,UAAU,MAAM,oBAAoB,CAAC;AACjD,OAAO,KAAK,OAAO,MAAM,sBAAsB,CAAC;AAChD,OAAO,KAAK,UAAU,MAAM,yBAAyB,CAAC;AAUtD,4CAA4C;AAC5C,mDAAmD;AACnD,MAAM,OAAO,mBAAmB;IAG9B;;;OAGG;IACH,YAAY,MAA6B;QACvC,IAAI,CAAC,MAAM,GAAG,MAAM,CAAC;IACvB,CAAC;IAED;;;;;OAKG;IACI,IAAI,CACT,iBAAuB,EACvB,eAAqB,EACrB,OAA2C;QAE3C,MAAM,IAAI,GAAG,IAAI,CAAC,aAAa,CAC7B,iBAAiB,EACjB,eAAe,EACf,OAAO,CACR,CAAC;QACF,OAAO;YACL,IAAI;gBACF,OAAO,IAAI,CAAC,IAAI,EAAE,CAAC;YACrB,CAAC;YACD,CAAC,MAAM,CAAC,aAAa,CAAC;gBACpB,OAAO,IAAI,CAAC;YACd,CAAC;YACD,MAAM,EAAE,CAAC,QAAuB,EAAE,EAAE;gBAClC,IAAI,QAAQ,aAAR,QAAQ,uBAAR,QAAQ,CAAE,WAAW,EAAE,CAAC;oBAC1B,MAAM,IAAI,KAAK,CAAC,iDAAiD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rC,UAAU;CACX,CAAC;AACF,MAAM,qBAAqB,GAA6B;IACtD,IAAI,EAAE,YAAY;IAClB,UAAU,EAAE,KAAK;IACjB,SAAS,EAAE;QACT,GAAG,EAAE;YACH,UAAU,EAAE,OAAO,CAAC,0BAA0B;SAC/C;QACD,OAAO,EAAE;YACP,UAAU,EAAE,OAAO,CAAC,aAAa;SAClC;KACF;IACD,eAAe,EAAE;QACf,UAAU,CAAC,iBAAiB;QAC5B,UAAU,CAAC,eAAe;QAC1B,UAAU,CAAC,WAAW;QACtB,UAAU,CAAC,sBAAsB;QACjC,UAAU,CAAC,iBAAiB;QAC5B,UAAU,CAAC,UAAU;KACtB;IACD,aAAa,EAAE;QACb,UAAU,CAAC,KAAK;QAChB,UAAU,CAAC,cAAc;QACzB,UAAU,CAAC,QAAQ;KACpB;IACD,gBAAgB,EAAE,CAAC,UAAU,CAAC,MAAM,CAAC;IACrC,UAAU;CACX,CAAC","sourcesContent":["/*\n * Copyright (c) Microsoft Corporation.\n * Licensed under the MIT License.\n *\n * Code generated by Microsoft (R) AutoRest Code Generator.\n * Changes may cause incorrect behavior and will be lost if the code is regenerated.\n */\n\nimport { PagedAsyncIterableIterator, PageSettings } from \"@azure/core-paging\";\nimport { setContinuationToken } from \"../pagingHelper.js\";\nimport { UsageAggregates } from \"../operationsInterfaces/index.js\";\nimport * as coreClient from \"@azure/core-client\";\nimport * as Mappers from \"../models/mappers.js\";\nimport * as Parameters from \"../models/parameters.js\";\nimport { UsageManagementClient } from \"../usageManagementClient.js\";\nimport {\n UsageAggregation,\n UsageAggregatesListNextOptionalParams,\n UsageAggregatesListOptionalParams,\n UsageAggregatesListResponse,\n UsageAggregatesListNextResponse\n} from \"../models/index.js\";\n\n/// <reference lib=\"esnext.asynciterable\" />\n/** Class containing UsageAggregates operations. */\nexport class UsageAggregatesImpl implements UsageAggregates {\n private readonly client: UsageManagementClient;\n\n /**\n * Initialize a new instance of the class UsageAggregates class.\n * @param client Reference to the service client\n */\n constructor(client: UsageManagementClient) {\n this.client = client;\n }\n\n /**\n * Query aggregated Azure subscription consumption data for a date range.\n * @param reportedStartTime The start of the time range to retrieve data for.\n * @param reportedEndTime The end of the time range to retrieve data for.\n * @param options The options parameters.\n */\n public list(\n reportedStartTime: Date,\n reportedEndTime: Date,\n options?: UsageAggregatesListOptionalParams\n ): PagedAsyncIterableIterator<UsageAggregation> {\n const iter = this.listPagingAll(\n reportedStartTime,\n reportedEndTime,\n options\n );\n return {\n next() {\n return iter.next();\n },\n [Symbol.asyncIterator]() {\n return this;\n },\n byPage: (settings?: PageSettings) => {\n if (settings?.maxPageSize) {\n throw new Error(\"maxPageSize is not supported by this operation.\");\n }\n return this.listPagingPage(\n reportedStartTime,\n reportedEndTime,\n options,\n settings\n );\n }\n };\n }\n\n private async *listPagingPage(\n reportedStartTime: Date,\n reportedEndTime: Date,\n options?: UsageAggregatesListOptionalParams,\n settings?: PageSettings\n ): AsyncIterableIterator<UsageAggregation[]> {\n let result: UsageAggregatesListResponse;\n let continuationToken = settings?.continuationToken;\n if (!continuationToken) {\n result = await this._list(reportedStartTime, reportedEndTime, options);\n let page = result.value || [];\n continuationToken = result.nextLink;\n setContinuationToken(page, continuationToken);\n yield page;\n }\n while (continuationToken) {\n result = await this._listNext(\n reportedStartTime,\n reportedEndTime,\n continuationToken,\n options\n );\n continuationToken = result.nextLink;\n let page = result.value || [];\n setContinuationToken(page, continuationToken);\n yield page;\n }\n }\n\n private async *listPagingAll(\n reportedStartTime: Date,\n reportedEndTime: Date,\n options?: UsageAggregatesListOptionalParams\n ): AsyncIterableIterator<UsageAggregation> {\n for await (const page of this.listPagingPage(\n reportedStartTime,\n reportedEndTime,\n options\n )) {\n yield* page;\n }\n }\n\n /**\n * Query aggregated Azure subscription consumption data for a date range.\n * @param reportedStartTime The start of the time range to retrieve data for.\n * @param reportedEndTime The end of the time range to retrieve data for.\n * @param options The options parameters.\n */\n private _list(\n reportedStartTime: Date,\n reportedEndTime: Date,\n options?: UsageAggregatesListOptionalParams\n ): Promise<UsageAggregatesListResponse> {\n return this.client.sendOperationRequest(\n { reportedStartTime, reportedEndTime, options },\n listOperationSpec\n );\n }\n\n /**\n * ListNext\n * @param reportedStartTime The start of the time range to retrieve data for.\n * @param reportedEndTime The end of the time range to retrieve data for.\n * @param nextLink The nextLink from the previous successful call to the List method.\n * @param options The options parameters.\n */\n private _listNext(\n reportedStartTime: Date,\n reportedEndTime: Date,\n nextLink: string,\n options?: UsageAggregatesListNextOptionalParams\n ): Promise<UsageAggregatesListNextResponse> {\n return this.client.sendOperationRequest(\n { reportedStartTime, reportedEndTime, nextLink, options },\n listNextOperationSpec\n );\n }\n}\n// Operation Specifications\nconst serializer = coreClient.createSerializer(Mappers, /* isXml */ false);\n\nconst listOperationSpec: coreClient.OperationSpec = {\n path:\n \"/subscriptions/{subscriptionId}/providers/Microsoft.Commerce/UsageAggregates\",\n httpMethod: \"GET\",\n responses: {\n 200: {\n bodyMapper: Mappers.UsageAggregationListResult\n },\n default: {\n bodyMapper: Mappers.ErrorResponse\n }\n },\n queryParameters: [\n Parameters.reportedStartTime,\n Parameters.reportedEndTime,\n Parameters.showDetails,\n Parameters.aggregationGranularity,\n Parameters.continuationToken,\n Parameters.apiVersion\n ],\n urlParameters: [Parameters.$host, Parameters.subscriptionId],\n headerParameters: [Parameters.accept],\n serializer\n};\nconst listNextOperationSpec: coreClient.OperationSpec = {\n path: \"{nextLink}\",\n httpMethod: \"GET\",\n responses: {\n 200: {\n bodyMapper: Mappers.UsageAggregationListResult\n },\n default: {\n bodyMapper: Mappers.ErrorResponse\n }\n },\n queryParameters: [\n Parameters.reportedStartTime,\n Parameters.reportedEndTime,\n Parameters.showDetails,\n Parameters.aggregationGranularity,\n Parameters.continuationToken,\n Parameters.apiVersion\n ],\n urlParameters: [\n Parameters.$host,\n Parameters.subscriptionId,\n Parameters.nextLink\n ],\n headerParameters: [Parameters.accept],\n serializer\n};\n"]}
1
+ {"version":3,"file":"usageAggregates.js","sourceRoot":"","sources":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IACrC,UAAU;CACX,CAAC","sourcesContent":["/*\n * Copyright (c) Microsoft Corporation.\n * Licensed under the MIT License.\n *\n * Code generated by Microsoft (R) AutoRest Code Generator.\n * Changes may cause incorrect behavior and will be lost if the code is regenerated.\n */\n\nimport { PagedAsyncIterableIterator, PageSettings } from \"@azure/core-paging\";\nimport { setContinuationToken } from \"../pagingHelper.js\";\nimport { UsageAggregates } from \"../operationsInterfaces/index.js\";\nimport * as coreClient from \"@azure/core-client\";\nimport * as Mappers from \"../models/mappers.js\";\nimport * as Parameters from \"../models/parameters.js\";\nimport { UsageManagementClient } from \"../usageManagementClient.js\";\nimport {\n UsageAggregation,\n UsageAggregatesListNextOptionalParams,\n UsageAggregatesListOptionalParams,\n UsageAggregatesListResponse,\n UsageAggregatesListNextResponse\n} from \"../models/index.js\";\n\n/// <reference lib=\"esnext.asynciterable\" />\n/** Class containing UsageAggregates operations. */\nexport class UsageAggregatesImpl implements UsageAggregates {\n private readonly client: UsageManagementClient;\n\n /**\n * Initialize a new instance of the class UsageAggregates class.\n * @param client Reference to the service client\n */\n constructor(client: UsageManagementClient) {\n this.client = client;\n }\n\n /**\n * Query aggregated Azure subscription consumption data for a date range.\n * @param reportedStartTime The start of the time range to retrieve data for.\n * @param reportedEndTime The end of the time range to retrieve data for.\n * @param options The options parameters.\n */\n public list(\n reportedStartTime: Date,\n reportedEndTime: Date,\n options?: UsageAggregatesListOptionalParams\n ): PagedAsyncIterableIterator<UsageAggregation> {\n const iter = this.listPagingAll(\n reportedStartTime,\n reportedEndTime,\n options\n );\n return {\n next() {\n return iter.next();\n },\n [Symbol.asyncIterator]() {\n return this;\n },\n byPage: (settings?: PageSettings) => {\n if (settings?.maxPageSize) {\n throw new Error(\"maxPageSize is not supported by this operation.\");\n }\n return this.listPagingPage(\n reportedStartTime,\n reportedEndTime,\n options,\n settings\n );\n }\n };\n }\n\n private async *listPagingPage(\n reportedStartTime: Date,\n reportedEndTime: Date,\n options?: UsageAggregatesListOptionalParams,\n settings?: PageSettings\n ): AsyncIterableIterator<UsageAggregation[]> {\n let result: UsageAggregatesListResponse;\n let continuationToken = settings?.continuationToken;\n if (!continuationToken) {\n result = await this._list(reportedStartTime, reportedEndTime, options);\n let page = result.value || [];\n continuationToken = result.nextLink;\n setContinuationToken(page, continuationToken);\n yield page;\n }\n while (continuationToken) {\n result = await this._listNext(\n reportedStartTime,\n reportedEndTime,\n continuationToken,\n options\n );\n continuationToken = result.nextLink;\n let page = result.value || [];\n setContinuationToken(page, continuationToken);\n yield page;\n }\n }\n\n private async *listPagingAll(\n reportedStartTime: Date,\n reportedEndTime: Date,\n options?: UsageAggregatesListOptionalParams\n ): AsyncIterableIterator<UsageAggregation> {\n for await (const page of this.listPagingPage(\n reportedStartTime,\n reportedEndTime,\n options\n )) {\n yield* page;\n }\n }\n\n /**\n * Query aggregated Azure subscription consumption data for a date range.\n * @param reportedStartTime The start of the time range to retrieve data for.\n * @param reportedEndTime The end of the time range to retrieve data for.\n * @param options The options parameters.\n */\n private _list(\n reportedStartTime: Date,\n reportedEndTime: Date,\n options?: UsageAggregatesListOptionalParams\n ): Promise<UsageAggregatesListResponse> {\n return this.client.sendOperationRequest(\n { reportedStartTime, reportedEndTime, options },\n listOperationSpec\n );\n }\n\n /**\n * ListNext\n * @param reportedStartTime The start of the time range to retrieve data for.\n * @param reportedEndTime The end of the time range to retrieve data for.\n * @param nextLink The nextLink from the previous successful call to the List method.\n * @param options The options parameters.\n */\n private _listNext(\n reportedStartTime: Date,\n reportedEndTime: Date,\n nextLink: string,\n options?: UsageAggregatesListNextOptionalParams\n ): Promise<UsageAggregatesListNextResponse> {\n return this.client.sendOperationRequest(\n { reportedStartTime, reportedEndTime, nextLink, options },\n listNextOperationSpec\n );\n }\n}\n// Operation Specifications\nconst serializer = coreClient.createSerializer(Mappers, /* isXml */ false);\n\nconst listOperationSpec: coreClient.OperationSpec = {\n path:\n \"/subscriptions/{subscriptionId}/providers/Microsoft.Commerce/UsageAggregates\",\n httpMethod: \"GET\",\n responses: {\n 200: {\n bodyMapper: Mappers.UsageAggregationListResult\n },\n default: {\n bodyMapper: Mappers.ErrorResponse\n }\n },\n queryParameters: [\n Parameters.reportedStartTime,\n Parameters.reportedEndTime,\n Parameters.showDetails,\n Parameters.aggregationGranularity,\n Parameters.continuationToken,\n Parameters.apiVersion\n ],\n urlParameters: [Parameters.$host, Parameters.subscriptionId],\n headerParameters: [Parameters.accept],\n serializer\n};\nconst listNextOperationSpec: coreClient.OperationSpec = {\n path: \"{nextLink}\",\n httpMethod: \"GET\",\n responses: {\n 200: {\n bodyMapper: Mappers.UsageAggregationListResult\n },\n default: {\n bodyMapper: Mappers.ErrorResponse\n }\n },\n queryParameters: [\n Parameters.reportedStartTime,\n Parameters.reportedEndTime,\n Parameters.showDetails,\n Parameters.aggregationGranularity,\n Parameters.continuationToken,\n Parameters.apiVersion\n ],\n urlParameters: [\n Parameters.$host,\n Parameters.subscriptionId,\n Parameters.nextLink\n ],\n headerParameters: [Parameters.accept],\n serializer\n};\n"]}
@@ -14,18 +14,16 @@ const pageMap = new WeakMap();
14
14
  * @returns The continuation token that can be passed into byPage().
15
15
  */
16
16
  export function getContinuationToken(page) {
17
- var _a;
18
17
  if (typeof page !== "object" || page === null) {
19
18
  return undefined;
20
19
  }
21
- return (_a = pageMap.get(page)) === null || _a === void 0 ? void 0 : _a.continuationToken;
20
+ return pageMap.get(page)?.continuationToken;
22
21
  }
23
22
  export function setContinuationToken(page, continuationToken) {
24
- var _a;
25
23
  if (typeof page !== "object" || page === null || !continuationToken) {
26
24
  return;
27
25
  }
28
- const pageInfo = (_a = pageMap.get(page)) !== null && _a !== void 0 ? _a : {};
26
+ const pageInfo = pageMap.get(page) ?? {};
29
27
  pageInfo.continuationToken = continuationToken;
30
28
  pageMap.set(page, pageInfo);
31
29
  }
@@ -1 +1 @@
1
- {"version":3,"file":"pagingHelper.js","sourceRoot":"","sources":["../../src/pagingHelper.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAMH,MAAM,OAAO,GAAG,IAAI,OAAO,EAAoB,CAAC;AAEhD;;;;;;GAMG;AACH,MAAM,UAAU,oBAAoB,CAAC,IAAa;;IAChD,IAAI,OAAO,IAAI,KAAK,QAAQ,IAAI,IAAI,KAAK,IAAI,EAAE,CAAC;QAC9C,OAAO,SAAS,CAAC;IACnB,CAAC;IACD,OAAO,MAAA,OAAO,CAAC,GAAG,CAAC,IAAI,CAAC,0CAAE,iBAAiB,CAAC;AAC9C,CAAC;AAED,MAAM,UAAU,oBAAoB,CAClC,IAAa,EACb,iBAAqC;;IAErC,IAAI,OAAO,IAAI,KAAK,QAAQ,IAAI,IAAI,KAAK,IAAI,IAAI,CAAC,iBAAiB,EAAE,CAAC;QACpE,OAAO;IACT,CAAC;IACD,MAAM,QAAQ,GAAG,MAAA,OAAO,CAAC,GAAG,CAAC,IAAI,CAAC,mCAAI,EAAE,CAAC;IACzC,QAAQ,CAAC,iBAAiB,GAAG,iBAAiB,CAAC;IAC/C,OAAO,CAAC,GAAG,CAAC,IAAI,EAAE,QAAQ,CAAC,CAAC;AAC9B,CAAC","sourcesContent":["/*\n * Copyright (c) Microsoft Corporation.\n * Licensed under the MIT License.\n *\n * Code generated by Microsoft (R) AutoRest Code Generator.\n * Changes may cause incorrect behavior and will be lost if the code is regenerated.\n */\n\nexport interface PageInfo {\n continuationToken?: string;\n}\n\nconst pageMap = new WeakMap<object, PageInfo>();\n\n/**\n * Given a result page from a pageable operation, returns a\n * continuation token that can be used to begin paging from\n * that point later.\n * @param page A result object from calling .byPage() on a paged operation.\n * @returns The continuation token that can be passed into byPage().\n */\nexport function getContinuationToken(page: unknown): string | undefined {\n if (typeof page !== \"object\" || page === null) {\n return undefined;\n }\n return pageMap.get(page)?.continuationToken;\n}\n\nexport function setContinuationToken(\n page: unknown,\n continuationToken: string | undefined\n): void {\n if (typeof page !== \"object\" || page === null || !continuationToken) {\n return;\n }\n const pageInfo = pageMap.get(page) ?? {};\n pageInfo.continuationToken = continuationToken;\n pageMap.set(page, pageInfo);\n}\n"]}
1
+ {"version":3,"file":"pagingHelper.js","sourceRoot":"","sources":["../../src/pagingHelper.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAMH,MAAM,OAAO,GAAG,IAAI,OAAO,EAAoB,CAAC;AAEhD;;;;;;GAMG;AACH,MAAM,UAAU,oBAAoB,CAAC,IAAa;IAChD,IAAI,OAAO,IAAI,KAAK,QAAQ,IAAI,IAAI,KAAK,IAAI,EAAE,CAAC;QAC9C,OAAO,SAAS,CAAC;IACnB,CAAC;IACD,OAAO,OAAO,CAAC,GAAG,CAAC,IAAI,CAAC,EAAE,iBAAiB,CAAC;AAC9C,CAAC;AAED,MAAM,UAAU,oBAAoB,CAClC,IAAa,EACb,iBAAqC;IAErC,IAAI,OAAO,IAAI,KAAK,QAAQ,IAAI,IAAI,KAAK,IAAI,IAAI,CAAC,iBAAiB,EAAE,CAAC;QACpE,OAAO;IACT,CAAC;IACD,MAAM,QAAQ,GAAG,OAAO,CAAC,GAAG,CAAC,IAAI,CAAC,IAAI,EAAE,CAAC;IACzC,QAAQ,CAAC,iBAAiB,GAAG,iBAAiB,CAAC;IAC/C,OAAO,CAAC,GAAG,CAAC,IAAI,EAAE,QAAQ,CAAC,CAAC;AAC9B,CAAC","sourcesContent":["/*\n * Copyright (c) Microsoft Corporation.\n * Licensed under the MIT License.\n *\n * Code generated by Microsoft (R) AutoRest Code Generator.\n * Changes may cause incorrect behavior and will be lost if the code is regenerated.\n */\n\nexport interface PageInfo {\n continuationToken?: string;\n}\n\nconst pageMap = new WeakMap<object, PageInfo>();\n\n/**\n * Given a result page from a pageable operation, returns a\n * continuation token that can be used to begin paging from\n * that point later.\n * @param page A result object from calling .byPage() on a paged operation.\n * @returns The continuation token that can be passed into byPage().\n */\nexport function getContinuationToken(page: unknown): string | undefined {\n if (typeof page !== \"object\" || page === null) {\n return undefined;\n }\n return pageMap.get(page)?.continuationToken;\n}\n\nexport function setContinuationToken(\n page: unknown,\n continuationToken: string | undefined\n): void {\n if (typeof page !== \"object\" || page === null || !continuationToken) {\n return;\n }\n const pageInfo = pageMap.get(page) ?? {};\n pageInfo.continuationToken = continuationToken;\n pageMap.set(page, pageInfo);\n}\n"]}
@@ -9,6 +9,9 @@ import * as coreClient from "@azure/core-client";
9
9
  import * as coreRestPipeline from "@azure/core-rest-pipeline";
10
10
  import { UsageAggregatesImpl, RateCardImpl } from "./operations/index.js";
11
11
  export class UsageManagementClient extends coreClient.ServiceClient {
12
+ $host;
13
+ apiVersion;
14
+ subscriptionId;
12
15
  /**
13
16
  * Initializes a new instance of the UsageManagementClient class.
14
17
  * @param credentials Subscription credentials which uniquely identify client subscription.
@@ -17,7 +20,6 @@ export class UsageManagementClient extends coreClient.ServiceClient {
17
20
  * @param options The parameter options
18
21
  */
19
22
  constructor(credentials, subscriptionId, options) {
20
- var _a, _b, _c;
21
23
  if (credentials === undefined) {
22
24
  throw new Error("'credentials' cannot be null");
23
25
  }
@@ -36,12 +38,17 @@ export class UsageManagementClient extends coreClient.ServiceClient {
36
38
  const userAgentPrefix = options.userAgentOptions && options.userAgentOptions.userAgentPrefix
37
39
  ? `${options.userAgentOptions.userAgentPrefix} ${packageDetails}`
38
40
  : `${packageDetails}`;
39
- const optionsWithDefaults = Object.assign(Object.assign(Object.assign({}, defaults), options), { userAgentOptions: {
41
+ const optionsWithDefaults = {
42
+ ...defaults,
43
+ ...options,
44
+ userAgentOptions: {
40
45
  userAgentPrefix
41
- }, endpoint: (_b = (_a = options.endpoint) !== null && _a !== void 0 ? _a : options.baseUri) !== null && _b !== void 0 ? _b : "https://management.azure.com" });
46
+ },
47
+ endpoint: options.endpoint ?? options.baseUri ?? "https://management.azure.com"
48
+ };
42
49
  super(optionsWithDefaults);
43
50
  let bearerTokenAuthenticationPolicyFound = false;
44
- if ((options === null || options === void 0 ? void 0 : options.pipeline) && options.pipeline.getOrderedPolicies().length > 0) {
51
+ if (options?.pipeline && options.pipeline.getOrderedPolicies().length > 0) {
45
52
  const pipelinePolicies = options.pipeline.getOrderedPolicies();
46
53
  bearerTokenAuthenticationPolicyFound = pipelinePolicies.some((pipelinePolicy) => pipelinePolicy.name ===
47
54
  coreRestPipeline.bearerTokenAuthenticationPolicyName);
@@ -55,7 +62,8 @@ export class UsageManagementClient extends coreClient.ServiceClient {
55
62
  });
56
63
  this.pipeline.addPolicy(coreRestPipeline.bearerTokenAuthenticationPolicy({
57
64
  credential: credentials,
58
- scopes: (_c = optionsWithDefaults.credentialScopes) !== null && _c !== void 0 ? _c : `${optionsWithDefaults.endpoint}/.default`,
65
+ scopes: optionsWithDefaults.credentialScopes ??
66
+ `${optionsWithDefaults.endpoint}/.default`,
59
67
  challengeCallbacks: {
60
68
  authorizeRequestOnChallenge: coreClient.authorizeRequestOnClaimChallenge
61
69
  }
@@ -95,5 +103,7 @@ export class UsageManagementClient extends coreClient.ServiceClient {
95
103
  };
96
104
  this.pipeline.addPolicy(apiVersionPolicy);
97
105
  }
106
+ usageAggregates;
107
+ rateCard;
98
108
  }
99
109
  //# sourceMappingURL=usageManagementClient.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"usageManagementClient.js","sourceRoot":"","sources":["../../src/usageManagementClient.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAEH,OAAO,KAAK,UAAU,MAAM,oBAAoB,CAAC;AACjD,OAAO,KAAK,gBAAgB,MAAM,2BAA2B,CAAC;AAO9D,OAAO,EAAE,mBAAmB,EAAE,YAAY,EAAE,MAAM,uBAAuB,CAAC;AAI1E,MAAM,OAAO,qBAAsB,SAAQ,UAAU,CAAC,aAAa;IAKjE;;;;;;OAMG;IACH,YACE,WAAqC,EACrC,cAAsB,EACtB,OAA6C;;QAE7C,IAAI,WAAW,KAAK,SAAS,EAAE,CAAC;YAC9B,MAAM,IAAI,KAAK,CAAC,8BAA8B,CAAC,CAAC;QAClD,CAAC;QACD,IAAI,cAAc,KAAK,SAAS,EAAE,CAAC;YACjC,MAAM,IAAI,KAAK,CAAC,iCAAiC,CAAC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AAC,GAAG,CAAC,CAAC,IAAI,EAAE,EAAE;wBACjD,IAAI,IAAI,CAAC,OAAO,CAAC,aAAa,CAAC,GAAG,CAAC,CAAC,EAAE,CAAC;4BACrC,OAAO,cAAc,GAAG,UAAU,CAAC;wBACrC,CAAC;6BAAM,CAAC;4BACN,OAAO,IAAI,CAAC;wBACd,CAAC;oBACH,CAAC,CAAC,CAAC;oBACH,OAAO,CAAC,GAAG,GAAG,KAAK,CAAC,CAAC,CAAC,GAAG,GAAG,GAAG,SAAS,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC;gBACrD,CAAC;gBACD,OAAO,IAAI,CAAC,OAAO,CAAC,CAAC;YACvB,CAAC;SACF,CAAC;QACF,IAAI,CAAC,QAAQ,CAAC,SAAS,CAAC,gBAAgB,CAAC,CAAC;IAC5C,CAAC;CAIF","sourcesContent":["/*\n * Copyright (c) Microsoft Corporation.\n * Licensed under the MIT License.\n *\n * Code generated by Microsoft (R) AutoRest Code Generator.\n * Changes may cause incorrect behavior and will be lost if the code is regenerated.\n */\n\nimport * as coreClient from \"@azure/core-client\";\nimport * as coreRestPipeline from \"@azure/core-rest-pipeline\";\nimport {\n PipelineRequest,\n PipelineResponse,\n SendRequest\n} from \"@azure/core-rest-pipeline\";\nimport * as coreAuth from \"@azure/core-auth\";\nimport { UsageAggregatesImpl, RateCardImpl } from \"./operations/index.js\";\nimport { UsageAggregates, RateCard } from \"./operationsInterfaces/index.js\";\nimport { UsageManagementClientOptionalParams } from \"./models/index.js\";\n\nexport class UsageManagementClient extends coreClient.ServiceClient {\n $host: string;\n apiVersion: string;\n subscriptionId: string;\n\n /**\n * Initializes a new instance of the UsageManagementClient class.\n * @param credentials Subscription credentials which uniquely identify client subscription.\n * @param subscriptionId It uniquely identifies Microsoft Azure subscription. The subscription ID forms\n * part of the URI for every service call.\n * @param options The parameter options\n */\n constructor(\n credentials: coreAuth.TokenCredential,\n subscriptionId: string,\n options?: UsageManagementClientOptionalParams\n ) {\n if (credentials === undefined) {\n throw new Error(\"'credentials' cannot be null\");\n }\n if (subscriptionId === undefined) {\n throw new Error(\"'subscriptionId' cannot be null\");\n }\n\n // Initializing default values for options\n if (!options) {\n options = {};\n }\n const defaults: UsageManagementClientOptionalParams = {\n requestContentType: \"application/json; charset=utf-8\",\n credential: credentials\n };\n\n const packageDetails = `azsdk-js-arm-commerce/4.0.0-beta.4`;\n const userAgentPrefix =\n options.userAgentOptions && options.userAgentOptions.userAgentPrefix\n ? `${options.userAgentOptions.userAgentPrefix} ${packageDetails}`\n : `${packageDetails}`;\n\n const optionsWithDefaults = {\n ...defaults,\n ...options,\n userAgentOptions: {\n userAgentPrefix\n },\n endpoint:\n options.endpoint ?? options.baseUri ?? \"https://management.azure.com\"\n };\n super(optionsWithDefaults);\n\n let bearerTokenAuthenticationPolicyFound: boolean = false;\n if (options?.pipeline && options.pipeline.getOrderedPolicies().length > 0) {\n const pipelinePolicies: coreRestPipeline.PipelinePolicy[] = options.pipeline.getOrderedPolicies();\n bearerTokenAuthenticationPolicyFound = pipelinePolicies.some(\n (pipelinePolicy) =>\n pipelinePolicy.name ===\n coreRestPipeline.bearerTokenAuthenticationPolicyName\n );\n }\n if (\n !options ||\n !options.pipeline ||\n options.pipeline.getOrderedPolicies().length == 0 ||\n !bearerTokenAuthenticationPolicyFound\n ) {\n this.pipeline.removePolicy({\n name: coreRestPipeline.bearerTokenAuthenticationPolicyName\n });\n this.pipeline.addPolicy(\n coreRestPipeline.bearerTokenAuthenticationPolicy({\n credential: credentials,\n scopes:\n optionsWithDefaults.credentialScopes ??\n `${optionsWithDefaults.endpoint}/.default`,\n challengeCallbacks: {\n authorizeRequestOnChallenge:\n coreClient.authorizeRequestOnClaimChallenge\n }\n })\n );\n }\n // Parameter assignments\n this.subscriptionId = subscriptionId;\n\n // Assigning values to Constant parameters\n this.$host = options.$host || \"https://management.azure.com\";\n this.apiVersion = options.apiVersion || \"2015-06-01-preview\";\n this.usageAggregates = new UsageAggregatesImpl(this);\n this.rateCard = new RateCardImpl(this);\n this.addCustomApiVersionPolicy(options.apiVersion);\n }\n\n /** A function that adds a policy that sets the api-version (or equivalent) to reflect the library version. */\n private addCustomApiVersionPolicy(apiVersion?: string) {\n if (!apiVersion) {\n return;\n }\n const apiVersionPolicy = {\n name: \"CustomApiVersionPolicy\",\n async sendRequest(\n request: PipelineRequest,\n next: SendRequest\n ): Promise<PipelineResponse> {\n const param = request.url.split(\"?\");\n if (param.length > 1) {\n const newParams = param[1].split(\"&\").map((item) => {\n if (item.indexOf(\"api-version\") > -1) {\n return \"api-version=\" + apiVersion;\n } else {\n return item;\n }\n });\n request.url = param[0] + \"?\" + newParams.join(\"&\");\n }\n return next(request);\n }\n };\n this.pipeline.addPolicy(apiVersionPolicy);\n }\n\n usageAggregates: UsageAggregates;\n rateCard: RateCard;\n}\n"]}
1
+ {"version":3,"file":"usageManagementClient.js","sourceRoot":"","sources":["../../src/usageManagementClient.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAEH,OAAO,KAAK,UAAU,MAAM,oBAAoB,CAAC;AACjD,OAAO,KAAK,gBAAgB,MAAM,2BAA2B,CAAC;AAO9D,OAAO,EAAE,mBAAmB,EAAE,YAAY,EAAE,MAAM,uBAAuB,CAAC;AAI1E,MAAM,OAAO,qBAAsB,SAAQ,UAAU,CAAC,aAAa;IACjE,KAAK,CAAS;IACd,UAAU,CAAS;IACnB,cAAc,CAAS;IAEvB;;;;;;OAMG;IACH,YACE,WAAqC,EACrC,cAAsB,EACtB,OAA6C;QAE7C,IAAI,WAAW,KAAK,SAAS,EAAE,CAAC;YAC9B,MAAM,IAAI,KAAK,CAAC,8BAA8B,CAAC,CAAC;QAClD,CAAC;QACD,IAAI,cAAc,KAAK,SAAS,EAAE,CAAC;YACjC,MAAM,IAAI,KAAK,CAAC,iCAAiC,CAAC,CAAC;QACrD,CAAC;QAED,0CAA0C;QAC1C,IAAI,CAAC,OAAO,EAAE,CAAC;YACb,OAAO,GAAG,EAAE,CAAC;QACf,CAA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AAG,UAAU,CAAC;wBACrC,CAAC;6BAAM,CAAC;4BACN,OAAO,IAAI,CAAC;wBACd,CAAC;oBACH,CAAC,CAAC,CAAC;oBACH,OAAO,CAAC,GAAG,GAAG,KAAK,CAAC,CAAC,CAAC,GAAG,GAAG,GAAG,SAAS,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC;gBACrD,CAAC;gBACD,OAAO,IAAI,CAAC,OAAO,CAAC,CAAC;YACvB,CAAC;SACF,CAAC;QACF,IAAI,CAAC,QAAQ,CAAC,SAAS,CAAC,gBAAgB,CAAC,CAAC;IAC5C,CAAC;IAED,eAAe,CAAkB;IACjC,QAAQ,CAAW;CACpB","sourcesContent":["/*\n * Copyright (c) Microsoft Corporation.\n * Licensed under the MIT License.\n *\n * Code generated by Microsoft (R) AutoRest Code Generator.\n * Changes may cause incorrect behavior and will be lost if the code is regenerated.\n */\n\nimport * as coreClient from \"@azure/core-client\";\nimport * as coreRestPipeline from \"@azure/core-rest-pipeline\";\nimport {\n PipelineRequest,\n PipelineResponse,\n SendRequest\n} from \"@azure/core-rest-pipeline\";\nimport * as coreAuth from \"@azure/core-auth\";\nimport { UsageAggregatesImpl, RateCardImpl } from \"./operations/index.js\";\nimport { UsageAggregates, RateCard } from \"./operationsInterfaces/index.js\";\nimport { UsageManagementClientOptionalParams } from \"./models/index.js\";\n\nexport class UsageManagementClient extends coreClient.ServiceClient {\n $host: string;\n apiVersion: string;\n subscriptionId: string;\n\n /**\n * Initializes a new instance of the UsageManagementClient class.\n * @param credentials Subscription credentials which uniquely identify client subscription.\n * @param subscriptionId It uniquely identifies Microsoft Azure subscription. The subscription ID forms\n * part of the URI for every service call.\n * @param options The parameter options\n */\n constructor(\n credentials: coreAuth.TokenCredential,\n subscriptionId: string,\n options?: UsageManagementClientOptionalParams\n ) {\n if (credentials === undefined) {\n throw new Error(\"'credentials' cannot be null\");\n }\n if (subscriptionId === undefined) {\n throw new Error(\"'subscriptionId' cannot be null\");\n }\n\n // Initializing default values for options\n if (!options) {\n options = {};\n }\n const defaults: UsageManagementClientOptionalParams = {\n requestContentType: \"application/json; charset=utf-8\",\n credential: credentials\n };\n\n const packageDetails = `azsdk-js-arm-commerce/4.0.0-beta.4`;\n const userAgentPrefix =\n options.userAgentOptions && options.userAgentOptions.userAgentPrefix\n ? `${options.userAgentOptions.userAgentPrefix} ${packageDetails}`\n : `${packageDetails}`;\n\n const optionsWithDefaults = {\n ...defaults,\n ...options,\n userAgentOptions: {\n userAgentPrefix\n },\n endpoint:\n options.endpoint ?? options.baseUri ?? \"https://management.azure.com\"\n };\n super(optionsWithDefaults);\n\n let bearerTokenAuthenticationPolicyFound: boolean = false;\n if (options?.pipeline && options.pipeline.getOrderedPolicies().length > 0) {\n const pipelinePolicies: coreRestPipeline.PipelinePolicy[] = options.pipeline.getOrderedPolicies();\n bearerTokenAuthenticationPolicyFound = pipelinePolicies.some(\n (pipelinePolicy) =>\n pipelinePolicy.name ===\n coreRestPipeline.bearerTokenAuthenticationPolicyName\n );\n }\n if (\n !options ||\n !options.pipeline ||\n options.pipeline.getOrderedPolicies().length == 0 ||\n !bearerTokenAuthenticationPolicyFound\n ) {\n this.pipeline.removePolicy({\n name: coreRestPipeline.bearerTokenAuthenticationPolicyName\n });\n this.pipeline.addPolicy(\n coreRestPipeline.bearerTokenAuthenticationPolicy({\n credential: credentials,\n scopes:\n optionsWithDefaults.credentialScopes ??\n `${optionsWithDefaults.endpoint}/.default`,\n challengeCallbacks: {\n authorizeRequestOnChallenge:\n coreClient.authorizeRequestOnClaimChallenge\n }\n })\n );\n }\n // Parameter assignments\n this.subscriptionId = subscriptionId;\n\n // Assigning values to Constant parameters\n this.$host = options.$host || \"https://management.azure.com\";\n this.apiVersion = options.apiVersion || \"2015-06-01-preview\";\n this.usageAggregates = new UsageAggregatesImpl(this);\n this.rateCard = new RateCardImpl(this);\n this.addCustomApiVersionPolicy(options.apiVersion);\n }\n\n /** A function that adds a policy that sets the api-version (or equivalent) to reflect the library version. */\n private addCustomApiVersionPolicy(apiVersion?: string) {\n if (!apiVersion) {\n return;\n }\n const apiVersionPolicy = {\n name: \"CustomApiVersionPolicy\",\n async sendRequest(\n request: PipelineRequest,\n next: SendRequest\n ): Promise<PipelineResponse> {\n const param = request.url.split(\"?\");\n if (param.length > 1) {\n const newParams = param[1].split(\"&\").map((item) => {\n if (item.indexOf(\"api-version\") > -1) {\n return \"api-version=\" + apiVersion;\n } else {\n return item;\n }\n });\n request.url = param[0] + \"?\" + newParams.join(\"&\");\n }\n return next(request);\n }\n };\n this.pipeline.addPolicy(apiVersionPolicy);\n }\n\n usageAggregates: UsageAggregates;\n rateCard: RateCard;\n}\n"]}
package/package.json CHANGED
@@ -3,7 +3,7 @@
3
3
  "sdk-type": "mgmt",
4
4
  "author": "Microsoft Corporation",
5
5
  "description": "A generated SDK for UsageManagementClient.",
6
- "version": "4.0.0-alpha.20250718.1",
6
+ "version": "4.0.0-alpha.20250730.1",
7
7
  "engines": {
8
8
  "node": ">=20.0.0"
9
9
  },
@@ -89,7 +89,7 @@
89
89
  },
90
90
  "type": "module",
91
91
  "tshy": {
92
- "project": "./tsconfig.src.json",
92
+ "project": "../../../tsconfig.src.build.json",
93
93
  "exports": {
94
94
  "./package.json": "./package.json",
95
95
  ".": "./src/index.ts"
@@ -1,181 +1,181 @@
1
- ## API Report File for "@azure/arm-commerce"
2
-
3
- > Do not edit this file. It is a report generated by [API Extractor](https://api-extractor.com/).
4
-
5
- ```ts
6
-
7
- import * as coreAuth from '@azure/core-auth';
8
- import * as coreClient from '@azure/core-client';
9
- import { PagedAsyncIterableIterator } from '@azure/core-paging';
10
-
11
- // @public
12
- export type AggregationGranularity = "Daily" | "Hourly";
13
-
14
- // @public
15
- export interface ErrorResponse {
16
- code?: string;
17
- message?: string;
18
- }
19
-
20
- // @public
21
- export function getContinuationToken(page: unknown): string | undefined;
22
-
23
- // @public
24
- export interface InfoField {
25
- project?: string;
26
- }
27
-
28
- // @public
29
- export interface MeterInfo {
30
- effectiveDate?: Date;
31
- includedQuantity?: number;
32
- meterCategory?: string;
33
- meterId?: string;
34
- meterName?: string;
35
- meterRates?: {
36
- [propertyName: string]: number;
37
- };
38
- meterRegion?: string;
39
- meterSubCategory?: string;
40
- meterTags?: string[];
41
- unit?: string;
42
- }
43
-
44
- // @public
45
- export interface MonetaryCommitment extends OfferTermInfoAutoGenerated {
46
- excludedMeterIds?: string[];
47
- name: "Monetary Commitment";
48
- tieredDiscount?: {
49
- [propertyName: string]: number;
50
- };
51
- }
52
-
53
- // @public
54
- export interface MonetaryCredit extends OfferTermInfoAutoGenerated {
55
- credit?: number;
56
- excludedMeterIds?: string[];
57
- name: "Monetary Credit";
58
- }
59
-
60
- // @public
61
- export type OfferTermInfo = "Recurring Charge" | "Monetary Commitment" | "Monetary Credit";
62
-
63
- // @public
64
- export interface OfferTermInfoAutoGenerated {
65
- effectiveDate?: Date;
66
- name: "Monetary Credit" | "Monetary Commitment" | "Recurring Charge";
67
- }
68
-
69
- // @public (undocumented)
70
- export type OfferTermInfoAutoGeneratedUnion = OfferTermInfoAutoGenerated | MonetaryCredit | MonetaryCommitment | RecurringCharge;
71
-
72
- // @public
73
- export interface RateCard {
74
- get(filter: string, options?: RateCardGetOptionalParams): Promise<RateCardGetResponse>;
75
- }
76
-
77
- // @public
78
- export interface RateCardGetOptionalParams extends coreClient.OperationOptions {
79
- }
80
-
81
- // @public
82
- export type RateCardGetResponse = ResourceRateCardInfo;
83
-
84
- // @public
85
- export interface RateCardQueryParameters {
86
- currency: string;
87
- locale: string;
88
- offerDurableId: string;
89
- regionInfo: string;
90
- }
91
-
92
- // @public
93
- export interface RecurringCharge extends OfferTermInfoAutoGenerated {
94
- name: "Recurring Charge";
95
- recurringCharge?: number;
96
- }
97
-
98
- // @public
99
- export interface ResourceRateCardInfo {
100
- currency?: string;
101
- isTaxIncluded?: boolean;
102
- locale?: string;
103
- meters?: MeterInfo[];
104
- offerTerms?: OfferTermInfoAutoGeneratedUnion[];
105
- }
106
-
107
- // @public
108
- export interface UsageAggregates {
109
- list(reportedStartTime: Date, reportedEndTime: Date, options?: UsageAggregatesListOptionalParams): PagedAsyncIterableIterator<UsageAggregation>;
110
- }
111
-
112
- // @public
113
- export interface UsageAggregatesListNextOptionalParams extends coreClient.OperationOptions {
114
- aggregationGranularity?: AggregationGranularity;
115
- continuationToken?: string;
116
- showDetails?: boolean;
117
- }
118
-
119
- // @public
120
- export type UsageAggregatesListNextResponse = UsageAggregationListResult;
121
-
122
- // @public
123
- export interface UsageAggregatesListOptionalParams extends coreClient.OperationOptions {
124
- aggregationGranularity?: AggregationGranularity;
125
- continuationToken?: string;
126
- showDetails?: boolean;
127
- }
128
-
129
- // @public
130
- export type UsageAggregatesListResponse = UsageAggregationListResult;
131
-
132
- // @public
133
- export interface UsageAggregation {
134
- id?: string;
135
- infoFields?: InfoField;
136
- instanceData?: string;
137
- meterCategory?: string;
138
- meterId?: string;
139
- meterName?: string;
140
- meterRegion?: string;
141
- meterSubCategory?: string;
142
- name?: string;
143
- quantity?: number;
144
- subscriptionId?: string;
145
- type?: string;
146
- unit?: string;
147
- usageEndTime?: Date;
148
- usageStartTime?: Date;
149
- }
150
-
151
- // @public
152
- export interface UsageAggregationListResult {
153
- nextLink?: string;
154
- value?: UsageAggregation[];
155
- }
156
-
157
- // @public (undocumented)
158
- export class UsageManagementClient extends coreClient.ServiceClient {
159
- // (undocumented)
160
- $host: string;
161
- constructor(credentials: coreAuth.TokenCredential, subscriptionId: string, options?: UsageManagementClientOptionalParams);
162
- // (undocumented)
163
- apiVersion: string;
164
- // (undocumented)
165
- rateCard: RateCard;
166
- // (undocumented)
167
- subscriptionId: string;
168
- // (undocumented)
169
- usageAggregates: UsageAggregates;
170
- }
171
-
172
- // @public
173
- export interface UsageManagementClientOptionalParams extends coreClient.ServiceClientOptions {
174
- $host?: string;
175
- apiVersion?: string;
176
- endpoint?: string;
177
- }
178
-
179
- // (No @packageDocumentation comment for this package)
180
-
181
- ```
1
+ ## API Report File for "@azure/arm-commerce"
2
+
3
+ > Do not edit this file. It is a report generated by [API Extractor](https://api-extractor.com/).
4
+
5
+ ```ts
6
+
7
+ import * as coreAuth from '@azure/core-auth';
8
+ import * as coreClient from '@azure/core-client';
9
+ import { PagedAsyncIterableIterator } from '@azure/core-paging';
10
+
11
+ // @public
12
+ export type AggregationGranularity = "Daily" | "Hourly";
13
+
14
+ // @public
15
+ export interface ErrorResponse {
16
+ code?: string;
17
+ message?: string;
18
+ }
19
+
20
+ // @public
21
+ export function getContinuationToken(page: unknown): string | undefined;
22
+
23
+ // @public
24
+ export interface InfoField {
25
+ project?: string;
26
+ }
27
+
28
+ // @public
29
+ export interface MeterInfo {
30
+ effectiveDate?: Date;
31
+ includedQuantity?: number;
32
+ meterCategory?: string;
33
+ meterId?: string;
34
+ meterName?: string;
35
+ meterRates?: {
36
+ [propertyName: string]: number;
37
+ };
38
+ meterRegion?: string;
39
+ meterSubCategory?: string;
40
+ meterTags?: string[];
41
+ unit?: string;
42
+ }
43
+
44
+ // @public
45
+ export interface MonetaryCommitment extends OfferTermInfoAutoGenerated {
46
+ excludedMeterIds?: string[];
47
+ name: "Monetary Commitment";
48
+ tieredDiscount?: {
49
+ [propertyName: string]: number;
50
+ };
51
+ }
52
+
53
+ // @public
54
+ export interface MonetaryCredit extends OfferTermInfoAutoGenerated {
55
+ credit?: number;
56
+ excludedMeterIds?: string[];
57
+ name: "Monetary Credit";
58
+ }
59
+
60
+ // @public
61
+ export type OfferTermInfo = "Recurring Charge" | "Monetary Commitment" | "Monetary Credit";
62
+
63
+ // @public
64
+ export interface OfferTermInfoAutoGenerated {
65
+ effectiveDate?: Date;
66
+ name: "Monetary Credit" | "Monetary Commitment" | "Recurring Charge";
67
+ }
68
+
69
+ // @public (undocumented)
70
+ export type OfferTermInfoAutoGeneratedUnion = OfferTermInfoAutoGenerated | MonetaryCredit | MonetaryCommitment | RecurringCharge;
71
+
72
+ // @public
73
+ export interface RateCard {
74
+ get(filter: string, options?: RateCardGetOptionalParams): Promise<RateCardGetResponse>;
75
+ }
76
+
77
+ // @public
78
+ export interface RateCardGetOptionalParams extends coreClient.OperationOptions {
79
+ }
80
+
81
+ // @public
82
+ export type RateCardGetResponse = ResourceRateCardInfo;
83
+
84
+ // @public
85
+ export interface RateCardQueryParameters {
86
+ currency: string;
87
+ locale: string;
88
+ offerDurableId: string;
89
+ regionInfo: string;
90
+ }
91
+
92
+ // @public
93
+ export interface RecurringCharge extends OfferTermInfoAutoGenerated {
94
+ name: "Recurring Charge";
95
+ recurringCharge?: number;
96
+ }
97
+
98
+ // @public
99
+ export interface ResourceRateCardInfo {
100
+ currency?: string;
101
+ isTaxIncluded?: boolean;
102
+ locale?: string;
103
+ meters?: MeterInfo[];
104
+ offerTerms?: OfferTermInfoAutoGeneratedUnion[];
105
+ }
106
+
107
+ // @public
108
+ export interface UsageAggregates {
109
+ list(reportedStartTime: Date, reportedEndTime: Date, options?: UsageAggregatesListOptionalParams): PagedAsyncIterableIterator<UsageAggregation>;
110
+ }
111
+
112
+ // @public
113
+ export interface UsageAggregatesListNextOptionalParams extends coreClient.OperationOptions {
114
+ aggregationGranularity?: AggregationGranularity;
115
+ continuationToken?: string;
116
+ showDetails?: boolean;
117
+ }
118
+
119
+ // @public
120
+ export type UsageAggregatesListNextResponse = UsageAggregationListResult;
121
+
122
+ // @public
123
+ export interface UsageAggregatesListOptionalParams extends coreClient.OperationOptions {
124
+ aggregationGranularity?: AggregationGranularity;
125
+ continuationToken?: string;
126
+ showDetails?: boolean;
127
+ }
128
+
129
+ // @public
130
+ export type UsageAggregatesListResponse = UsageAggregationListResult;
131
+
132
+ // @public
133
+ export interface UsageAggregation {
134
+ id?: string;
135
+ infoFields?: InfoField;
136
+ instanceData?: string;
137
+ meterCategory?: string;
138
+ meterId?: string;
139
+ meterName?: string;
140
+ meterRegion?: string;
141
+ meterSubCategory?: string;
142
+ name?: string;
143
+ quantity?: number;
144
+ subscriptionId?: string;
145
+ type?: string;
146
+ unit?: string;
147
+ usageEndTime?: Date;
148
+ usageStartTime?: Date;
149
+ }
150
+
151
+ // @public
152
+ export interface UsageAggregationListResult {
153
+ nextLink?: string;
154
+ value?: UsageAggregation[];
155
+ }
156
+
157
+ // @public (undocumented)
158
+ export class UsageManagementClient extends coreClient.ServiceClient {
159
+ // (undocumented)
160
+ $host: string;
161
+ constructor(credentials: coreAuth.TokenCredential, subscriptionId: string, options?: UsageManagementClientOptionalParams);
162
+ // (undocumented)
163
+ apiVersion: string;
164
+ // (undocumented)
165
+ rateCard: RateCard;
166
+ // (undocumented)
167
+ subscriptionId: string;
168
+ // (undocumented)
169
+ usageAggregates: UsageAggregates;
170
+ }
171
+
172
+ // @public
173
+ export interface UsageManagementClientOptionalParams extends coreClient.ServiceClientOptions {
174
+ $host?: string;
175
+ apiVersion?: string;
176
+ endpoint?: string;
177
+ }
178
+
179
+ // (No @packageDocumentation comment for this package)
180
+
181
+ ```