diff --git a/packages/@azure/arm-reservations/LICENSE.txt b/packages/@azure/arm-reservations/LICENSE.txt index 5431ba98b936..8f3d856145c5 100644 --- a/packages/@azure/arm-reservations/LICENSE.txt +++ b/packages/@azure/arm-reservations/LICENSE.txt @@ -1,6 +1,6 @@ The MIT License (MIT) -Copyright (c) 2018 Microsoft +Copyright (c) 2019 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/packages/@azure/arm-reservations/README.md b/packages/@azure/arm-reservations/README.md index 06a209cc1f5f..0418370237b1 100644 --- a/packages/@azure/arm-reservations/README.md +++ b/packages/@azure/arm-reservations/README.md @@ -9,7 +9,7 @@ This package contains an isomorphic SDK for AzureReservationAPI. ### How to Install -``` +```bash npm install @azure/arm-reservations ``` @@ -19,13 +19,13 @@ npm install @azure/arm-reservations ##### Install @azure/ms-rest-nodeauth -``` +```bash npm install @azure/ms-rest-nodeauth ``` ##### Sample code -```ts +```typescript import * as msRest from "@azure/ms-rest-js"; import * as msRestAzure from "@azure/ms-rest-azure-js"; import * as msRestNodeAuth from "@azure/ms-rest-nodeauth"; @@ -50,7 +50,7 @@ msRestNodeAuth.interactiveLogin().then((creds) => { ##### Install @azure/ms-rest-browserauth -``` +```bash npm install @azure/ms-rest-browserauth ``` @@ -100,6 +100,3 @@ See https://github.com/Azure/ms-rest-browserauth to learn how to authenticate to ## Related projects - [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%2Fpackages%2F%40azure%2Farm-reservations%2FREADME.png) diff --git a/packages/@azure/arm-reservations/lib/azureReservationAPIContext.ts b/packages/@azure/arm-reservations/lib/azureReservationAPIContext.ts index 876e2db3e748..0f0983c31538 100644 --- a/packages/@azure/arm-reservations/lib/azureReservationAPIContext.ts +++ b/packages/@azure/arm-reservations/lib/azureReservationAPIContext.ts @@ -13,7 +13,7 @@ import * as msRest from "@azure/ms-rest-js"; import * as msRestAzure from "@azure/ms-rest-azure-js"; const packageName = "@azure/arm-reservations"; -const packageVersion = "0.1.0"; +const packageVersion = "2.2.0"; export class AzureReservationAPIContext extends msRestAzure.AzureServiceClient { credentials: msRest.ServiceClientCredentials; @@ -39,7 +39,7 @@ export class AzureReservationAPIContext extends msRestAzure.AzureServiceClient { super(credentials, options); - this.apiVersion = '2018-06-01'; + this.apiVersion = '2019-04-01'; this.acceptLanguage = 'en-US'; this.longRunningOperationRetryTimeout = 30; this.baseUri = options.baseUri || this.baseUri || "https://management.azure.com"; diff --git a/packages/@azure/arm-reservations/lib/models/index.ts b/packages/@azure/arm-reservations/lib/models/index.ts index 37c76d7f06ae..b61d1e552b08 100644 --- a/packages/@azure/arm-reservations/lib/models/index.ts +++ b/packages/@azure/arm-reservations/lib/models/index.ts @@ -166,13 +166,12 @@ export interface ReservationMergeProperties { export interface ReservationProperties { /** * @member {ReservedResourceType} [reservedResourceType] Possible values - * include: 'VirtualMachines', 'SqlDatabases', 'SuseLinux', 'CosmosDb', - * 'RedHat' + * include: 'VirtualMachines', 'SqlDatabases', 'SuseLinux', 'CosmosDb' */ reservedResourceType?: ReservedResourceType; /** * @member {InstanceFlexibility} [instanceFlexibility] Possible values - * include: 'On', 'Off', 'NotSupported' + * include: 'True', 'False' */ instanceFlexibility?: InstanceFlexibility; /** @@ -190,8 +189,7 @@ export interface ReservationProperties { */ appliedScopeType?: AppliedScopeType; /** - * @member {number} [quantity] Quantity of the SKUs that are part of the - * Reservation. + * @member {number} [quantity] */ quantity?: number; /** @@ -322,8 +320,7 @@ export interface ReservationOrderResponse extends BaseResource { */ expiryDate?: Date; /** - * @member {number} [originalQuantity] Total Quantity of the SKUs purchased - * in the Reservation. + * @member {number} [originalQuantity] */ originalQuantity?: number; /** @@ -347,6 +344,104 @@ export interface ReservationOrderResponse extends BaseResource { readonly type?: string; } +/** + * @interface + * An interface representing CalculatePriceResponsePropertiesBillingCurrencyTotal. + * Currency and amount that customer will be charged in customer's local + * currency. Tax is not included. + * + */ +export interface CalculatePriceResponsePropertiesBillingCurrencyTotal { + /** + * @member {string} [currencyCode] + */ + currencyCode?: string; + /** + * @member {number} [amount] + */ + amount?: number; +} + +/** + * @interface + * An interface representing CalculatePriceResponsePropertiesPricingCurrencyTotal. + * Amount that Microsoft uses for record. Used during refund for calculating + * refund limit. Tax is not included. + * + */ +export interface CalculatePriceResponsePropertiesPricingCurrencyTotal { + /** + * @member {string} [currencyCode] + */ + currencyCode?: string; + /** + * @member {number} [amount] + */ + amount?: number; +} + +/** + * @interface + * An interface representing CalculatePriceResponseProperties. + */ +export interface CalculatePriceResponseProperties { + /** + * @member {CalculatePriceResponsePropertiesBillingCurrencyTotal} + * [billingCurrencyTotal] Currency and amount that customer will be charged + * in customer's local currency. Tax is not included. + */ + billingCurrencyTotal?: CalculatePriceResponsePropertiesBillingCurrencyTotal; + /** + * @member {boolean} [isBillingPartnerManaged] + */ + isBillingPartnerManaged?: boolean; + /** + * @member {string} [reservationOrderId] GUID that represents reservation + * order that can be placed after calculating price + */ + reservationOrderId?: string; + /** + * @member {string} [skuTitle] Long name for the SKU that is being purchased + */ + skuTitle?: string; + /** + * @member {string} [skuDescription] Short name for the SKU that is being + * purchased + */ + skuDescription?: string; + /** + * @member {CalculatePriceResponsePropertiesPricingCurrencyTotal} + * [pricingCurrencyTotal] Amount that Microsoft uses for record. Used during + * refund for calculating refund limit. Tax is not included. + */ + pricingCurrencyTotal?: CalculatePriceResponsePropertiesPricingCurrencyTotal; +} + +/** + * @interface + * An interface representing CalculatePriceResponse. + */ +export interface CalculatePriceResponse { + /** + * @member {CalculatePriceResponseProperties} [properties] + */ + properties?: CalculatePriceResponseProperties; +} + +/** + * @interface + * An interface representing PurchaseRequestPropertiesReservedResourceProperties. + * properties specific to each reserved resource type. + * + */ +export interface PurchaseRequestPropertiesReservedResourceProperties { + /** + * @member {InstanceFlexibility} [instanceFlexibility] Possible values + * include: 'True', 'False' + */ + instanceFlexibility?: InstanceFlexibility; +} + /** * @interface * An interface representing MergeRequest. @@ -359,6 +454,58 @@ export interface MergeRequest { sources?: string[]; } +/** + * @interface + * An interface representing PurchaseRequest. + */ +export interface PurchaseRequest { + /** + * @member {SkuName} [sku] + */ + sku?: SkuName; + /** + * @member {string} [location] The Azure Region where the reserved resource + * lives. + */ + location?: string; + /** + * @member {ReservedResourceType} [reservedResourceType] Possible values + * include: 'VirtualMachines', 'SqlDatabases', 'SuseLinux', 'CosmosDb' + */ + reservedResourceType?: ReservedResourceType; + /** + * @member {string} [billingScopeId] + */ + billingScopeId?: string; + /** + * @member {ReservationTerm} [term] Possible values include: 'P1Y', 'P3Y' + */ + term?: ReservationTerm; + /** + * @member {number} [quantity] + */ + quantity?: number; + /** + * @member {string} [displayName] Friendly name of the Reservation + */ + displayName?: string; + /** + * @member {AppliedScopeType} [appliedScopeType] Possible values include: + * 'Single', 'Shared' + */ + appliedScopeType?: AppliedScopeType; + /** + * @member {string[]} [appliedScopes] + */ + appliedScopes?: string[]; + /** + * @member {PurchaseRequestPropertiesReservedResourceProperties} + * [reservedResourceProperties] properties specific to each reserved resource + * type. + */ + reservedResourceProperties?: PurchaseRequestPropertiesReservedResourceProperties; +} + /** * @interface * An interface representing Patch. @@ -375,7 +522,7 @@ export interface Patch { appliedScopes?: string[]; /** * @member {InstanceFlexibility} [instanceFlexibility] Possible values - * include: 'On', 'Off', 'NotSupported' + * include: 'True', 'False' */ instanceFlexibility?: InstanceFlexibility; /** @@ -649,19 +796,19 @@ export type ReservationTerm = 'P1Y' | 'P3Y'; /** * Defines values for ReservedResourceType. - * Possible values include: 'VirtualMachines', 'SqlDatabases', 'SuseLinux', 'CosmosDb', 'RedHat' + * Possible values include: 'VirtualMachines', 'SqlDatabases', 'SuseLinux', 'CosmosDb' * @readonly * @enum {string} */ -export type ReservedResourceType = 'VirtualMachines' | 'SqlDatabases' | 'SuseLinux' | 'CosmosDb' | 'RedHat'; +export type ReservedResourceType = 'VirtualMachines' | 'SqlDatabases' | 'SuseLinux' | 'CosmosDb'; /** * Defines values for InstanceFlexibility. - * Possible values include: 'On', 'Off', 'NotSupported' + * Possible values include: 'True', 'False' * @readonly * @enum {string} */ -export type InstanceFlexibility = 'On' | 'Off' | 'NotSupported'; +export type InstanceFlexibility = 'True' | 'False'; /** * Defines values for AppliedScopeType. @@ -709,6 +856,25 @@ export type GetAppliedReservationListResponse = AppliedReservations & { }; }; +/** + * Contains response data for the calculate operation. + */ +export type ReservationOrderCalculateResponse = CalculatePriceResponse & { + /** + * The underlying HTTP response. + */ + _response: msRest.HttpResponse & { + /** + * The response body as text (string format) + */ + bodyAsText: string; + /** + * The response body as parsed JSON or XML + */ + parsedBody: CalculatePriceResponse; + }; +}; + /** * Contains response data for the list operation. */ @@ -728,6 +894,25 @@ export type ReservationOrderListResponse = ReservationOrderList & { }; }; +/** + * Contains response data for the purchase operation. + */ +export type ReservationOrderPurchaseResponse = ReservationOrderResponse & { + /** + * The underlying HTTP response. + */ + _response: msRest.HttpResponse & { + /** + * The response body as text (string format) + */ + bodyAsText: string; + /** + * The response body as parsed JSON or XML + */ + parsedBody: ReservationOrderResponse; + }; +}; + /** * Contains response data for the get operation. */ @@ -747,6 +932,25 @@ export type ReservationOrderGetResponse = ReservationOrderResponse & { }; }; +/** + * Contains response data for the beginPurchase operation. + */ +export type ReservationOrderBeginPurchaseResponse = ReservationOrderResponse & { + /** + * The underlying HTTP response. + */ + _response: msRest.HttpResponse & { + /** + * The response body as text (string format) + */ + bodyAsText: string; + /** + * The response body as parsed JSON or XML + */ + parsedBody: ReservationOrderResponse; + }; +}; + /** * Contains response data for the listNext operation. */ diff --git a/packages/@azure/arm-reservations/lib/models/mappers.ts b/packages/@azure/arm-reservations/lib/models/mappers.ts index 2b3f56a52339..ea1d038f0a8a 100644 --- a/packages/@azure/arm-reservations/lib/models/mappers.ts +++ b/packages/@azure/arm-reservations/lib/models/mappers.ts @@ -487,6 +487,131 @@ export const ReservationOrderResponse: msRest.CompositeMapper = { } }; +export const CalculatePriceResponsePropertiesBillingCurrencyTotal: msRest.CompositeMapper = { + serializedName: "CalculatePriceResponseProperties_billingCurrencyTotal", + type: { + name: "Composite", + className: "CalculatePriceResponsePropertiesBillingCurrencyTotal", + modelProperties: { + currencyCode: { + serializedName: "currencyCode", + type: { + name: "String" + } + }, + amount: { + serializedName: "amount", + type: { + name: "Number" + } + } + } + } +}; + +export const CalculatePriceResponsePropertiesPricingCurrencyTotal: msRest.CompositeMapper = { + serializedName: "CalculatePriceResponseProperties_pricingCurrencyTotal", + type: { + name: "Composite", + className: "CalculatePriceResponsePropertiesPricingCurrencyTotal", + modelProperties: { + currencyCode: { + serializedName: "currencyCode", + type: { + name: "String" + } + }, + amount: { + serializedName: "amount", + type: { + name: "Number" + } + } + } + } +}; + +export const CalculatePriceResponseProperties: msRest.CompositeMapper = { + serializedName: "CalculatePriceResponseProperties", + type: { + name: "Composite", + className: "CalculatePriceResponseProperties", + modelProperties: { + billingCurrencyTotal: { + serializedName: "billingCurrencyTotal", + type: { + name: "Composite", + className: "CalculatePriceResponsePropertiesBillingCurrencyTotal" + } + }, + isBillingPartnerManaged: { + serializedName: "isBillingPartnerManaged", + type: { + name: "Boolean" + } + }, + reservationOrderId: { + serializedName: "reservationOrderId", + type: { + name: "String" + } + }, + skuTitle: { + serializedName: "skuTitle", + type: { + name: "String" + } + }, + skuDescription: { + serializedName: "skuDescription", + type: { + name: "String" + } + }, + pricingCurrencyTotal: { + serializedName: "pricingCurrencyTotal", + type: { + name: "Composite", + className: "CalculatePriceResponsePropertiesPricingCurrencyTotal" + } + } + } + } +}; + +export const CalculatePriceResponse: msRest.CompositeMapper = { + serializedName: "CalculatePriceResponse", + type: { + name: "Composite", + className: "CalculatePriceResponse", + modelProperties: { + properties: { + serializedName: "properties", + type: { + name: "Composite", + className: "CalculatePriceResponseProperties" + } + } + } + } +}; + +export const PurchaseRequestPropertiesReservedResourceProperties: msRest.CompositeMapper = { + serializedName: "PurchaseRequestProperties_reservedResourceProperties", + type: { + name: "Composite", + className: "PurchaseRequestPropertiesReservedResourceProperties", + modelProperties: { + instanceFlexibility: { + serializedName: "instanceFlexibility", + type: { + name: "String" + } + } + } + } +}; + export const MergeRequest: msRest.CompositeMapper = { serializedName: "MergeRequest", type: { @@ -508,6 +633,83 @@ export const MergeRequest: msRest.CompositeMapper = { } }; +export const PurchaseRequest: msRest.CompositeMapper = { + serializedName: "PurchaseRequest", + type: { + name: "Composite", + className: "PurchaseRequest", + modelProperties: { + sku: { + serializedName: "sku", + type: { + name: "Composite", + className: "SkuName" + } + }, + location: { + serializedName: "location", + type: { + name: "String" + } + }, + reservedResourceType: { + serializedName: "properties.reservedResourceType", + type: { + name: "String" + } + }, + billingScopeId: { + serializedName: "properties.billingScopeId", + type: { + name: "String" + } + }, + term: { + serializedName: "properties.term", + type: { + name: "String" + } + }, + quantity: { + serializedName: "properties.quantity", + type: { + name: "Number" + } + }, + displayName: { + serializedName: "properties.displayName", + type: { + name: "String" + } + }, + appliedScopeType: { + serializedName: "properties.appliedScopeType", + type: { + name: "String" + } + }, + appliedScopes: { + serializedName: "properties.appliedScopes", + type: { + name: "Sequence", + element: { + type: { + name: "String" + } + } + } + }, + reservedResourceProperties: { + serializedName: "properties.reservedResourceProperties", + type: { + name: "Composite", + className: "PurchaseRequestPropertiesReservedResourceProperties" + } + } + } + } +}; + export const Patch: msRest.CompositeMapper = { serializedName: "Patch", type: { diff --git a/packages/@azure/arm-reservations/lib/models/reservationOrderMappers.ts b/packages/@azure/arm-reservations/lib/models/reservationOrderMappers.ts index 0a476fb0a220..e43785ce0768 100644 --- a/packages/@azure/arm-reservations/lib/models/reservationOrderMappers.ts +++ b/packages/@azure/arm-reservations/lib/models/reservationOrderMappers.ts @@ -9,16 +9,22 @@ */ export { + PurchaseRequest, + SkuName, + PurchaseRequestPropertiesReservedResourceProperties, + CalculatePriceResponse, + CalculatePriceResponseProperties, + CalculatePriceResponsePropertiesBillingCurrencyTotal, + CalculatePriceResponsePropertiesPricingCurrencyTotal, + ErrorModel, + ExtendedErrorInfo, ReservationOrderList, ReservationOrderResponse, BaseResource, ReservationResponse, - SkuName, ReservationProperties, ExtendedStatusInfo, ReservationSplitProperties, - ReservationMergeProperties, - ErrorModel, - ExtendedErrorInfo + ReservationMergeProperties } from "../models/mappers"; diff --git a/packages/@azure/arm-reservations/lib/operations/reservationOrder.ts b/packages/@azure/arm-reservations/lib/operations/reservationOrder.ts index 067aa4599177..fdd29ce57a2e 100644 --- a/packages/@azure/arm-reservations/lib/operations/reservationOrder.ts +++ b/packages/@azure/arm-reservations/lib/operations/reservationOrder.ts @@ -9,6 +9,7 @@ */ import * as msRest from "@azure/ms-rest-js"; +import * as msRestAzure from "@azure/ms-rest-azure-js"; import * as Models from "../models"; import * as Mappers from "../models/reservationOrderMappers"; import * as Parameters from "../models/parameters"; @@ -26,6 +27,35 @@ export class ReservationOrder { this.client = client; } + /** + * Calculate price for placing a `ReservationOrder` + * @summary Calculate price for a `ReservationOrder`. + * @param body Information needed for calculate or purchase reservation + * @param [options] The optional parameters + * @returns Promise + */ + calculate(body: Models.PurchaseRequest, options?: msRest.RequestOptionsBase): Promise; + /** + * @param body Information needed for calculate or purchase reservation + * @param callback The callback + */ + calculate(body: Models.PurchaseRequest, callback: msRest.ServiceCallback): void; + /** + * @param body Information needed for calculate or purchase reservation + * @param options The optional parameters + * @param callback The callback + */ + calculate(body: Models.PurchaseRequest, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; + calculate(body: Models.PurchaseRequest, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { + return this.client.sendOperationRequest( + { + body, + options + }, + calculateOperationSpec, + callback) as Promise; + } + /** * List of all the `ReservationOrder`s that the user has access to in the current tenant. * @summary Get all `ReservationOrder`s. @@ -51,6 +81,19 @@ export class ReservationOrder { callback) as Promise; } + /** + * Purchase `ReservationOrder` and create resource under the specificed URI + * @summary Purchase `ReservationOrder` + * @param reservationOrderId Order Id of the reservation + * @param body Information needed for calculate or purchase reservation + * @param [options] The optional parameters + * @returns Promise + */ + purchase(reservationOrderId: string, body: Models.PurchaseRequest, options?: msRest.RequestOptionsBase): Promise { + return this.beginPurchase(reservationOrderId,body,options) + .then(lroPoller => lroPoller.pollUntilFinished()) as Promise; + } + /** * Get the details of the `ReservationOrder`. * @summary Get a specific `ReservationOrder`. @@ -80,6 +123,25 @@ export class ReservationOrder { callback) as Promise; } + /** + * Purchase `ReservationOrder` and create resource under the specificed URI + * @summary Purchase `ReservationOrder` + * @param reservationOrderId Order Id of the reservation + * @param body Information needed for calculate or purchase reservation + * @param [options] The optional parameters + * @returns Promise + */ + beginPurchase(reservationOrderId: string, body: Models.PurchaseRequest, options?: msRest.RequestOptionsBase): Promise { + return this.client.sendLRORequest( + { + reservationOrderId, + body, + options + }, + beginPurchaseOperationSpec, + options); + } + /** * List of all the `ReservationOrder`s that the user has access to in the current tenant. * @summary Get all `ReservationOrder`s. @@ -112,6 +174,33 @@ export class ReservationOrder { // Operation Specifications const serializer = new msRest.Serializer(Mappers); +const calculateOperationSpec: msRest.OperationSpec = { + httpMethod: "POST", + path: "providers/Microsoft.Capacity/calculatePrice", + queryParameters: [ + Parameters.apiVersion + ], + headerParameters: [ + Parameters.acceptLanguage + ], + requestBody: { + parameterPath: "body", + mapper: { + ...Mappers.PurchaseRequest, + required: true + } + }, + responses: { + 200: { + bodyMapper: Mappers.CalculatePriceResponse + }, + default: { + bodyMapper: Mappers.ErrorModel + } + }, + serializer +}; + const listOperationSpec: msRest.OperationSpec = { httpMethod: "GET", path: "providers/Microsoft.Capacity/reservationOrders", @@ -155,6 +244,39 @@ const getOperationSpec: msRest.OperationSpec = { serializer }; +const beginPurchaseOperationSpec: msRest.OperationSpec = { + httpMethod: "PUT", + path: "providers/Microsoft.Capacity/reservationOrders/{reservationOrderId}", + urlParameters: [ + Parameters.reservationOrderId + ], + queryParameters: [ + Parameters.apiVersion + ], + headerParameters: [ + Parameters.acceptLanguage + ], + requestBody: { + parameterPath: "body", + mapper: { + ...Mappers.PurchaseRequest, + required: true + } + }, + responses: { + 200: { + bodyMapper: Mappers.ReservationOrderResponse + }, + 202: { + bodyMapper: Mappers.ReservationOrderResponse + }, + default: { + bodyMapper: Mappers.ErrorModel + } + }, + serializer +}; + const listNextOperationSpec: msRest.OperationSpec = { httpMethod: "GET", baseUrl: "https://management.azure.com", diff --git a/packages/@azure/arm-reservations/package.json b/packages/@azure/arm-reservations/package.json index 029737577f62..5d5a11d7830f 100644 --- a/packages/@azure/arm-reservations/package.json +++ b/packages/@azure/arm-reservations/package.json @@ -4,8 +4,8 @@ "description": "AzureReservationAPI Library with typescript type definitions for node.js and browser.", "version": "2.2.0", "dependencies": { - "@azure/ms-rest-azure-js": "^1.1.0", - "@azure/ms-rest-js": "^1.1.0", + "@azure/ms-rest-azure-js": "^1.2.0", + "@azure/ms-rest-js": "^1.2.0", "tslib": "^1.9.3" }, "keywords": [ @@ -23,6 +23,7 @@ "typescript": "^3.1.1", "rollup": "^0.66.2", "rollup-plugin-node-resolve": "^3.4.0", + "rollup-plugin-sourcemaps": "^0.4.2", "uglify-js": "^3.4.9" }, "homepage": "https://github.com/azure/azure-sdk-for-js/tree/master/packages/@azure/arm-reservations", @@ -51,6 +52,5 @@ "minify": "uglifyjs -c -m --comments --source-map \"content='./dist/arm-reservations.js.map'\" -o ./dist/arm-reservations.min.js ./dist/arm-reservations.js", "prepack": "npm install && npm run build" }, - "sideEffects": false, - "authPublish": true + "sideEffects": false } diff --git a/packages/@azure/arm-reservations/rollup.config.js b/packages/@azure/arm-reservations/rollup.config.js index 5329add81622..1dce01e8ad4f 100644 --- a/packages/@azure/arm-reservations/rollup.config.js +++ b/packages/@azure/arm-reservations/rollup.config.js @@ -1,10 +1,16 @@ +import rollup from "rollup"; import nodeResolve from "rollup-plugin-node-resolve"; +import sourcemaps from "rollup-plugin-sourcemaps"; + /** - * @type {import('rollup').RollupFileOptions} + * @type {rollup.RollupFileOptions} */ const config = { - input: './esm/azureReservationAPI.js', - external: ["@azure/ms-rest-js", "@azure/ms-rest-azure-js"], + input: "./esm/azureReservationAPI.js", + external: [ + "@azure/ms-rest-js", + "@azure/ms-rest-azure-js" + ], output: { file: "./dist/arm-reservations.js", format: "umd", @@ -16,16 +22,16 @@ const config = { }, banner: `/* * 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. */` }, plugins: [ - nodeResolve({ module: true }) + nodeResolve({ module: true }), + sourcemaps() ] }; + export default config;