From 31654d21d2b417f312e6d549462ce262ecdb3a7b Mon Sep 17 00:00:00 2001 From: SDK Automation Date: Mon, 26 Oct 2020 03:06:21 +0000 Subject: [PATCH] Generated from cc28f75ab2ba0ba66287204b34457d1f060c1461 --- sdk/commerce/arm-commerce/LICENSE.txt | 2 +- sdk/commerce/arm-commerce/README.md | 6 +- sdk/commerce/arm-commerce/package.json | 20 +- sdk/commerce/arm-commerce/rollup.config.js | 2 +- sdk/commerce/arm-commerce/src/models/index.ts | 231 ++++++------------ .../arm-commerce/src/models/mappers.ts | 7 +- .../src/models/rateCardMappers.ts | 17 +- .../src/models/usageAggregatesMappers.ts | 13 +- sdk/commerce/arm-commerce/tsconfig.json | 2 +- 9 files changed, 106 insertions(+), 194 deletions(-) diff --git a/sdk/commerce/arm-commerce/LICENSE.txt b/sdk/commerce/arm-commerce/LICENSE.txt index a70e8cf66038..ea8fb1516028 100644 --- a/sdk/commerce/arm-commerce/LICENSE.txt +++ b/sdk/commerce/arm-commerce/LICENSE.txt @@ -1,6 +1,6 @@ The MIT License (MIT) -Copyright (c) 2018 Microsoft +Copyright (c) 2020 Microsoft Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal diff --git a/sdk/commerce/arm-commerce/README.md b/sdk/commerce/arm-commerce/README.md index 328e15132f6a..55815e43a1cc 100644 --- a/sdk/commerce/arm-commerce/README.md +++ b/sdk/commerce/arm-commerce/README.md @@ -19,8 +19,9 @@ npm install @azure/arm-commerce ##### Install @azure/ms-rest-nodeauth +- Please install minimum version of `"@azure/ms-rest-nodeauth": "^3.0.0"`. ```bash -npm install @azure/ms-rest-nodeauth +npm install @azure/ms-rest-nodeauth@"^3.0.0" ``` ##### Sample code @@ -105,5 +106,4 @@ See https://github.com/Azure/ms-rest-browserauth to learn how to authenticate to - [Microsoft Azure SDK for Javascript](https://github.com/Azure/azure-sdk-for-js) - -![Impressions](https://azure-sdk-impressions.azurewebsites.net/api/impressions/azure-sdk-for-js%2Fsdk%2Fcommerce%2Farm-commerce%2FREADME.png) +![Impressions](https://azure-sdk-impressions.azurewebsites.net/api/impressions/azure-sdk-for-js/sdk/commerce/arm-commerce/README.png) diff --git a/sdk/commerce/arm-commerce/package.json b/sdk/commerce/arm-commerce/package.json index d626b9efb1f8..84990830f378 100644 --- a/sdk/commerce/arm-commerce/package.json +++ b/sdk/commerce/arm-commerce/package.json @@ -4,9 +4,9 @@ "description": "UsageManagementClient Library with typescript type definitions for node.js and browser.", "version": "2.1.1", "dependencies": { - "@azure/ms-rest-azure-js": "^1.2.0", - "@azure/ms-rest-js": "^1.2.0", - "tslib": "^1.9.3" + "@azure/ms-rest-azure-js": "^2.0.1", + "@azure/ms-rest-js": "^2.0.4", + "tslib": "^1.10.0" }, "keywords": [ "node", @@ -20,19 +20,19 @@ "module": "./esm/usageManagementClient.js", "types": "./esm/usageManagementClient.d.ts", "devDependencies": { - "typescript": "^3.1.1", - "rollup": "^0.66.2", - "rollup-plugin-node-resolve": "^3.4.0", + "typescript": "^3.5.3", + "rollup": "^1.18.0", + "rollup-plugin-node-resolve": "^5.2.0", "rollup-plugin-sourcemaps": "^0.4.2", - "uglify-js": "^3.4.9" + "uglify-js": "^3.6.0" }, - "homepage": "https://github.com/azure/azure-sdk-for-js/tree/master/sdk/commerce/arm-commerce", + "homepage": "https://github.com/Azure/azure-sdk-for-js/tree/master/sdk/commerce/arm-commerce", "repository": { "type": "git", - "url": "https://github.com/azure/azure-sdk-for-js.git" + "url": "https://github.com/Azure/azure-sdk-for-js.git" }, "bugs": { - "url": "https://github.com/azure/azure-sdk-for-js/issues" + "url": "https://github.com/Azure/azure-sdk-for-js/issues" }, "files": [ "dist/**/*.js", diff --git a/sdk/commerce/arm-commerce/rollup.config.js b/sdk/commerce/arm-commerce/rollup.config.js index 4dac60a49527..9610d6a8337e 100644 --- a/sdk/commerce/arm-commerce/rollup.config.js +++ b/sdk/commerce/arm-commerce/rollup.config.js @@ -29,7 +29,7 @@ const config = { */` }, plugins: [ - nodeResolve({ module: true }), + nodeResolve({ mainFields: ['module', 'main'] }), sourcemaps() ] }; diff --git a/sdk/commerce/arm-commerce/src/models/index.ts b/sdk/commerce/arm-commerce/src/models/index.ts index f9ba948659c4..8fbd51f8b6d9 100644 --- a/sdk/commerce/arm-commerce/src/models/index.ts +++ b/sdk/commerce/arm-commerce/src/models/index.ts @@ -1,11 +1,9 @@ /* * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for - * license information. + * Licensed under the MIT License. See License.txt in the project root for license information. * * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is - * regenerated. + * Changes may cause incorrect behavior and will be lost if the code is regenerated. */ import { BaseResource, CloudError, AzureServiceClientOptions } from "@azure/ms-rest-azure-js"; @@ -13,128 +11,104 @@ import * as msRest from "@azure/ms-rest-js"; export { BaseResource, CloudError }; - /** - * @interface - * An interface representing InfoField. * Key-value pairs of instance details in the legacy format. - * */ export interface InfoField { /** - * @member {string} [project] Identifies the name of the instance provisioned - * by the user. + * Identifies the name of the instance provisioned by the user. */ project?: string; } /** - * @interface - * An interface representing UsageAggregation. * Describes the usageAggregation. - * */ export interface UsageAggregation { /** - * @member {string} [id] Unique Id for the usage aggregate. + * Unique Id for the usage aggregate. */ id?: string; /** - * @member {string} [name] Name of the usage aggregate. + * Name of the usage aggregate. */ name?: string; /** - * @member {string} [type] Type of the resource being returned. + * Type of the resource being returned. */ type?: string; /** - * @member {string} [subscriptionId] The subscription identifier for the - * Azure user. + * The subscription identifier for the Azure user. */ subscriptionId?: string; /** - * @member {string} [meterId] Unique ID for the resource that was consumed - * (aka ResourceID). + * Unique ID for the resource that was consumed (aka ResourceID). */ meterId?: string; /** - * @member {Date} [usageStartTime] UTC start time for the usage bucket to - * which this usage aggregate belongs. + * UTC start time for the usage bucket to which this usage aggregate belongs. */ usageStartTime?: Date; /** - * @member {Date} [usageEndTime] UTC end time for the usage bucket to which - * this usage aggregate belongs. + * UTC end time for the usage bucket to which this usage aggregate belongs. */ usageEndTime?: Date; /** - * @member {number} [quantity] The amount of the resource consumption that - * occurred in this time frame. + * The amount of the resource consumption that occurred in this time frame. */ quantity?: number; /** - * @member {string} [unit] The unit in which the usage for this resource is - * being counted, e.g. Hours, GB. + * The unit in which the usage for this resource is being counted, e.g. Hours, GB. */ unit?: string; /** - * @member {string} [meterName] Friendly name of the resource being consumed. + * Friendly name of the resource being consumed. */ meterName?: string; /** - * @member {string} [meterCategory] Category of the consumed resource. + * Category of the consumed resource. */ meterCategory?: string; /** - * @member {string} [meterSubCategory] Sub-category of the consumed resource. + * Sub-category of the consumed resource. */ meterSubCategory?: string; /** - * @member {string} [meterRegion] Region of the meterId used for billing - * purposes + * Region of the meterId used for billing purposes */ meterRegion?: string; /** - * @member {InfoField} [infoFields] Key-value pairs of instance details - * (legacy format). + * Key-value pairs of instance details (legacy format). */ infoFields?: InfoField; /** - * @member {string} [instanceData] Key-value pairs of instance details - * represented as a string. + * Key-value pairs of instance details represented as a string. */ instanceData?: string; } /** - * @interface - * An interface representing RateCardQueryParameters. - * Parameters that are used in the odata $filter query parameter for providing - * RateCard information. - * + * Parameters that are used in the odata $filter query parameter for providing RateCard + * information. */ export interface RateCardQueryParameters { /** - * @member {string} offerDurableId The Offer ID parameter consists of the - * 'MS-AZR-' prefix, plus the Offer ID number (e.g., MS-AZR-0026P). See - * https://azure.microsoft.com/en-us/support/legal/offer-details/ for more - * information on the list of available Offer IDs, country/region - * availability, and billing currency. + * The Offer ID parameter consists of the 'MS-AZR-' prefix, plus the Offer ID number (e.g., + * MS-AZR-0026P). See https://azure.microsoft.com/en-us/support/legal/offer-details/ for more + * information on the list of available Offer IDs, country/region availability, and billing + * currency. */ offerDurableId: string; /** - * @member {string} currency The currency in which the rates need to be - * provided. + * The currency in which the rates need to be provided. */ currency: string; /** - * @member {string} locale The culture in which the resource metadata needs - * to be localized. + * The culture in which the resource metadata needs to be localized. */ locale: string; /** - * @member {string} regionInfo 2 letter ISO code where the offer was - * purchased. + * 2 letter ISO code where the offer was purchased. */ regionInfo: string; } @@ -145,270 +119,212 @@ export interface RateCardQueryParameters { export type OfferTermInfoUnion = OfferTermInfo | MonetaryCredit | MonetaryCommitment | RecurringCharge; /** - * @interface - * An interface representing OfferTermInfo. * Describes the offer term. - * */ export interface OfferTermInfo { /** - * @member {string} name Polymorphic Discriminator + * Polymorphic Discriminator */ name: "OfferTermInfo"; /** - * @member {Date} [effectiveDate] Indicates the date from which the offer - * term is effective. + * Indicates the date from which the offer term is effective. */ effectiveDate?: Date; } /** - * @interface - * An interface representing MeterInfo. * Detailed information about the meter. - * */ export interface MeterInfo { /** - * @member {string} [meterId] The unique identifier of the resource. + * The unique identifier of the resource. */ meterId?: string; /** - * @member {string} [meterName] The name of the meter, within the given meter - * category + * The name of the meter, within the given meter category */ meterName?: string; /** - * @member {string} [meterCategory] The category of the meter, e.g., 'Cloud - * services', 'Networking', etc.. + * The category of the meter, e.g., 'Cloud services', 'Networking', etc.. */ meterCategory?: string; /** - * @member {string} [meterSubCategory] The subcategory of the meter, e.g., - * 'A6 Cloud services', 'ExpressRoute (IXP)', etc.. + * The subcategory of the meter, e.g., 'A6 Cloud services', 'ExpressRoute (IXP)', etc.. */ meterSubCategory?: string; /** - * @member {string} [unit] The unit in which the meter consumption is - * charged, e.g., 'Hours', 'GB', etc. + * The unit in which the meter consumption is charged, e.g., 'Hours', 'GB', etc. */ unit?: string; /** - * @member {string[]} [meterTags] Provides additional meter data. 'Third - * Party' indicates a meter with no discount. Blanks indicate First Party. + * Provides additional meter data. 'Third Party' indicates a meter with no discount. Blanks + * indicate First Party. */ meterTags?: string[]; /** - * @member {string} [meterRegion] The region in which the Azure service is - * available. + * The region in which the Azure service is available. */ meterRegion?: string; /** - * @member {{ [propertyName: string]: number }} [meterRates] 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 + * 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 */ meterRates?: { [propertyName: string]: number }; /** - * @member {Date} [effectiveDate] Indicates the date from which the meter - * rate is effective. + * Indicates the date from which the meter rate is effective. */ effectiveDate?: Date; /** - * @member {number} [includedQuantity] The resource quantity that is included - * in the offer at no cost. Consumption beyond this quantity will be charged. + * The resource quantity that is included in the offer at no cost. Consumption beyond this + * quantity will be charged. */ includedQuantity?: number; } /** - * @interface - * An interface representing ResourceRateCardInfo. * Price and Metadata information for resources - * */ export interface ResourceRateCardInfo { /** - * @member {string} [currency] The currency in which the rates are provided. + * The currency in which the rates are provided. */ currency?: string; /** - * @member {string} [locale] The culture in which the resource information is - * localized. + * The culture in which the resource information is localized. */ locale?: string; /** - * @member {boolean} [isTaxIncluded] All rates are pretax, so this will - * always be returned as 'false'. + * All rates are pretax, so this will always be returned as 'false'. */ isTaxIncluded?: boolean; /** - * @member {OfferTermInfoUnion[]} [offerTerms] A list of offer terms. + * A list of offer terms. */ offerTerms?: OfferTermInfoUnion[]; /** - * @member {MeterInfo[]} [meters] A list of meters. + * A list of meters. */ meters?: MeterInfo[]; } /** - * @interface - * An interface representing MonetaryCredit. * Indicates that this is a monetary credit offer. - * */ export interface MonetaryCredit { /** - * @member {string} name Polymorphic Discriminator + * Polymorphic Discriminator */ name: "Monetary Credit"; /** - * @member {Date} [effectiveDate] Indicates the date from which the offer - * term is effective. + * Indicates the date from which the offer term is effective. */ effectiveDate?: Date; /** - * @member {number} [credit] The amount of credit provided under the terms of - * the given offer level. + * The amount of credit provided under the terms of the given offer level. */ credit?: number; /** - * @member {string[]} [excludedMeterIds] An array of meter ids that are - * excluded from the given offer terms. + * An array of meter ids that are excluded from the given offer terms. */ excludedMeterIds?: string[]; } /** - * @interface - * An interface representing MonetaryCommitment. * Indicates that a monetary commitment is required for this offer - * */ export interface MonetaryCommitment { /** - * @member {string} name Polymorphic Discriminator + * Polymorphic Discriminator */ name: "Monetary Commitment"; /** - * @member {Date} [effectiveDate] Indicates the date from which the offer - * term is effective. + * Indicates the date from which the offer term is effective. */ effectiveDate?: Date; /** - * @member {{ [propertyName: string]: number }} [tieredDiscount] 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'. + * 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'. */ tieredDiscount?: { [propertyName: string]: number }; /** - * @member {string[]} [excludedMeterIds] An array of meter ids that are - * excluded from the given offer terms. + * An array of meter ids that are excluded from the given offer terms. */ excludedMeterIds?: string[]; } /** - * @interface - * An interface representing RecurringCharge. * Indicates a recurring charge is present for this offer. - * */ export interface RecurringCharge { /** - * @member {string} name Polymorphic Discriminator + * Polymorphic Discriminator */ name: "Recurring Charge"; /** - * @member {Date} [effectiveDate] Indicates the date from which the offer - * term is effective. + * Indicates the date from which the offer term is effective. */ effectiveDate?: Date; /** - * @member {number} [recurringCharge] The amount of recurring charge as per - * the offer term. + * The amount of recurring charge as per the offer term. */ recurringCharge?: number; } /** - * @interface - * An interface representing ErrorResponse. * Describes the format of Error response. - * */ export interface ErrorResponse { /** - * @member {string} [code] Error code + * Error code */ code?: string; /** - * @member {string} [message] Error message indicating why the operation - * failed. + * Error message indicating why the operation failed. */ message?: string; } /** - * @interface - * An interface representing UsageAggregatesListOptionalParams. * Optional Parameters. - * - * @extends RequestOptionsBase */ export interface UsageAggregatesListOptionalParams extends msRest.RequestOptionsBase { /** - * @member {boolean} [showDetails] `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). + * `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). */ showDetails?: boolean; /** - * @member {AggregationGranularity} [aggregationGranularity] `Daily` - * (default) returns the data in daily granularity, `Hourly` returns the data - * in hourly granularity. Possible values include: 'Daily', 'Hourly'. Default - * value: 'Daily' . + * `Daily` (default) returns the data in daily granularity, `Hourly` returns the data in hourly + * granularity. Possible values include: 'Daily', 'Hourly'. Default value: 'Daily'. */ aggregationGranularity?: AggregationGranularity; /** - * @member {string} [continuationToken] 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 + * 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. */ continuationToken?: string; } /** - * @interface * An interface representing UsageManagementClientOptions. - * @extends AzureServiceClientOptions */ export interface UsageManagementClientOptions extends AzureServiceClientOptions { - /** - * @member {string} [baseUri] - */ baseUri?: string; } - /** * @interface - * An interface representing the UsageAggregationListResult. * The Get UsageAggregates operation response. - * * @extends Array */ export interface UsageAggregationListResult extends Array { /** - * @member {string} [nextLink] Gets or sets the link to the next set of - * results. + * Gets or sets the link to the next set of results. */ nextLink?: string; } @@ -433,6 +349,7 @@ export type UsageAggregatesListResponse = UsageAggregationListResult & { * The response body as text (string format) */ bodyAsText: string; + /** * The response body as parsed JSON or XML */ @@ -452,6 +369,7 @@ export type UsageAggregatesListNextResponse = UsageAggregationListResult & { * The response body as text (string format) */ bodyAsText: string; + /** * The response body as parsed JSON or XML */ @@ -471,6 +389,7 @@ export type RateCardGetResponse = ResourceRateCardInfo & { * The response body as text (string format) */ bodyAsText: string; + /** * The response body as parsed JSON or XML */ diff --git a/sdk/commerce/arm-commerce/src/models/mappers.ts b/sdk/commerce/arm-commerce/src/models/mappers.ts index d35dd7532add..e6a6e21a1cef 100644 --- a/sdk/commerce/arm-commerce/src/models/mappers.ts +++ b/sdk/commerce/arm-commerce/src/models/mappers.ts @@ -1,11 +1,9 @@ /* * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for - * license information. + * Licensed under the MIT License. See License.txt in the project root for license information. * * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is - * regenerated. + * Changes may cause incorrect behavior and will be lost if the code is regenerated. */ import { CloudErrorMapper, BaseResourceMapper } from "@azure/ms-rest-azure-js"; @@ -471,4 +469,5 @@ export const discriminators = { 'OfferTermInfo.Monetary Credit' : MonetaryCredit, 'OfferTermInfo.Monetary Commitment' : MonetaryCommitment, 'OfferTermInfo.Recurring Charge' : RecurringCharge + }; diff --git a/sdk/commerce/arm-commerce/src/models/rateCardMappers.ts b/sdk/commerce/arm-commerce/src/models/rateCardMappers.ts index 7be716abd051..d55bf72283e8 100644 --- a/sdk/commerce/arm-commerce/src/models/rateCardMappers.ts +++ b/sdk/commerce/arm-commerce/src/models/rateCardMappers.ts @@ -1,21 +1,18 @@ /* * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for - * license information. + * Licensed under the MIT License. See License.txt in the project root for license information. * * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is - * regenerated. + * Changes may cause incorrect behavior and will be lost if the code is regenerated. */ export { discriminators, - ResourceRateCardInfo, - OfferTermInfo, - MeterInfo, ErrorResponse, - MonetaryCredit, + MeterInfo, MonetaryCommitment, - RecurringCharge + MonetaryCredit, + OfferTermInfo, + RecurringCharge, + ResourceRateCardInfo } from "../models/mappers"; - diff --git a/sdk/commerce/arm-commerce/src/models/usageAggregatesMappers.ts b/sdk/commerce/arm-commerce/src/models/usageAggregatesMappers.ts index a6537c2d3c95..e902eb830d81 100644 --- a/sdk/commerce/arm-commerce/src/models/usageAggregatesMappers.ts +++ b/sdk/commerce/arm-commerce/src/models/usageAggregatesMappers.ts @@ -1,18 +1,15 @@ /* * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for - * license information. + * Licensed under the MIT License. See License.txt in the project root for license information. * * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is - * regenerated. + * Changes may cause incorrect behavior and will be lost if the code is regenerated. */ export { discriminators, - UsageAggregationListResult, - UsageAggregation, + ErrorResponse, InfoField, - ErrorResponse + UsageAggregation, + UsageAggregationListResult } from "../models/mappers"; - diff --git a/sdk/commerce/arm-commerce/tsconfig.json b/sdk/commerce/arm-commerce/tsconfig.json index 87bbf5b5fa49..422b584abd5e 100644 --- a/sdk/commerce/arm-commerce/tsconfig.json +++ b/sdk/commerce/arm-commerce/tsconfig.json @@ -9,7 +9,7 @@ "esModuleInterop": true, "allowSyntheticDefaultImports": true, "forceConsistentCasingInFileNames": true, - "lib": ["es6"], + "lib": ["es6", "dom"], "declaration": true, "outDir": "./esm", "importHelpers": true