diff --git a/sdk/machinelearning/arm-workspaces/LICENSE.txt b/sdk/machinelearning/arm-workspaces/LICENSE.txt index a70e8cf66038..b73b4a1293c3 100644 --- a/sdk/machinelearning/arm-workspaces/LICENSE.txt +++ b/sdk/machinelearning/arm-workspaces/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/sdk/machinelearning/arm-workspaces/README.md b/sdk/machinelearning/arm-workspaces/README.md index 040e03388cd8..afe7975db6d1 100644 --- a/sdk/machinelearning/arm-workspaces/README.md +++ b/sdk/machinelearning/arm-workspaces/README.md @@ -9,7 +9,7 @@ This package contains an isomorphic SDK for MachineLearningWorkspacesManagementC ### How to Install -``` +```bash npm install @azure/arm-workspaces ``` @@ -19,13 +19,14 @@ npm install @azure/arm-workspaces ##### Install @azure/ms-rest-nodeauth -``` -npm install @azure/ms-rest-nodeauth +- Please install minimum version of `"@azure/ms-rest-nodeauth": "^3.0.0"`. +```bash +npm install @azure/ms-rest-nodeauth@"^3.0.0" ``` ##### 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"; @@ -47,7 +48,7 @@ msRestNodeAuth.interactiveLogin().then((creds) => { ##### Install @azure/ms-rest-browserauth -``` +```bash npm install @azure/ms-rest-browserauth ``` @@ -95,5 +96,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/sdk/machinelearning/arm-workspaces/README.png) diff --git a/sdk/machinelearning/arm-workspaces/package.json b/sdk/machinelearning/arm-workspaces/package.json index 8ac05122b1cc..5b12fcaf4f83 100644 --- a/sdk/machinelearning/arm-workspaces/package.json +++ b/sdk/machinelearning/arm-workspaces/package.json @@ -4,9 +4,9 @@ "description": "MachineLearningWorkspacesManagementClient Library with typescript type definitions for node.js and browser.", "version": "0.1.1", "dependencies": { - "@azure/ms-rest-azure-js": "^1.1.0", - "@azure/ms-rest-js": "^1.1.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,18 +20,19 @@ "module": "./esm/machineLearningWorkspacesManagementClient.js", "types": "./esm/machineLearningWorkspacesManagementClient.d.ts", "devDependencies": { - "typescript": "^3.1.1", - "rollup": "^0.66.2", - "rollup-plugin-node-resolve": "^3.4.0", - "uglify-js": "^3.4.9" + "typescript": "^3.5.3", + "rollup": "^1.18.0", + "rollup-plugin-node-resolve": "^5.2.0", + "rollup-plugin-sourcemaps": "^0.4.2", + "uglify-js": "^3.6.0" }, - "homepage": "https://github.com/azure/azure-sdk-for-js/tree/master/sdk/machinelearning/arm-workspaces", + "homepage": "https://github.com/Azure/azure-sdk-for-js/tree/master/sdk/machinelearning/arm-workspaces", "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", @@ -43,6 +44,7 @@ "esm/**/*.d.ts", "esm/**/*.d.ts.map", "src/**/*.ts", + "README.md", "rollup.config.js", "tsconfig.json" ], @@ -52,5 +54,5 @@ "prepack": "npm install && npm run build" }, "sideEffects": false, - "authPublish": true + "autoPublish": true } diff --git a/sdk/machinelearning/arm-workspaces/rollup.config.js b/sdk/machinelearning/arm-workspaces/rollup.config.js index 026f43803d48..3e60ba365d80 100644 --- a/sdk/machinelearning/arm-workspaces/rollup.config.js +++ b/sdk/machinelearning/arm-workspaces/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/machineLearningWorkspacesManagementClient.js', - external: ["@azure/ms-rest-js", "@azure/ms-rest-azure-js"], + input: "./esm/machineLearningWorkspacesManagementClient.js", + external: [ + "@azure/ms-rest-js", + "@azure/ms-rest-azure-js" + ], output: { file: "./dist/arm-workspaces.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({ mainFields: ['module', 'main'] }), + sourcemaps() ] }; + export default config; diff --git a/sdk/machinelearning/arm-workspaces/src/models/index.ts b/sdk/machinelearning/arm-workspaces/src/models/index.ts index da141d07fc59..b365f74f92d2 100644 --- a/sdk/machinelearning/arm-workspaces/src/models/index.ts +++ b/sdk/machinelearning/arm-workspaces/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,230 +11,173 @@ import * as msRest from "@azure/ms-rest-js"; export { BaseResource, CloudError }; - /** - * @interface - * An interface representing ErrorResponse. * The error response send when an operation fails. - * */ export interface ErrorResponse { /** - * @member {string} code error code + * error code */ code: string; /** - * @member {string} message error message + * error message */ message: string; } /** - * @interface - * An interface representing Resource. * An Azure resource. - * - * @extends BaseResource */ export interface Resource extends BaseResource { /** - * @member {string} [id] The resource ID. - * **NOTE: This property will not be serialized. It can only be populated by - * the server.** + * The resource ID. + * **NOTE: This property will not be serialized. It can only be populated by the server.** */ readonly id?: string; /** - * @member {string} [name] The name of the resource. - * **NOTE: This property will not be serialized. It can only be populated by - * the server.** + * The name of the resource. + * **NOTE: This property will not be serialized. It can only be populated by the server.** */ readonly name?: string; /** - * @member {string} [type] The type of the resource. - * **NOTE: This property will not be serialized. It can only be populated by - * the server.** + * The type of the resource. + * **NOTE: This property will not be serialized. It can only be populated by the server.** */ readonly type?: string; /** - * @member {string} location The location of the resource. This cannot be - * changed after the resource is created. + * The location of the resource. This cannot be changed after the resource is created. */ location: string; /** - * @member {{ [propertyName: string]: string }} [tags] The tags of the - * resource. + * The tags of the resource. */ tags?: { [propertyName: string]: string }; } /** - * @interface - * An interface representing Workspace. * An object that represents a machine learning workspace. - * - * @extends Resource */ export interface Workspace extends Resource { /** - * @member {string} userStorageAccountId The fully qualified arm id of the - * storage account associated with this workspace. + * The fully qualified arm id of the storage account associated with this workspace. */ userStorageAccountId: string; /** - * @member {string} [ownerEmail] The email id of the owner for this - * workspace. + * The email id of the owner for this workspace. */ - ownerEmail?: string; + ownerEmail: string; /** - * @member {WorkspaceType} [workspaceType] The type of this workspace. - * Possible values include: 'Production', 'Free', 'Anonymous', + * The type of this workspace. Possible values include: 'Production', 'Free', 'Anonymous', * 'PaidStandard', 'PaidPremium' - * **NOTE: This property will not be serialized. It can only be populated by - * the server.** + * **NOTE: This property will not be serialized. It can only be populated by the server.** */ readonly workspaceType?: WorkspaceType; /** - * @member {WorkspaceState} [workspaceState] The current state of workspace - * resource. Possible values include: 'Deleted', 'Enabled', 'Disabled', - * 'Migrated', 'Updated', 'Registered', 'Unregistered' - * **NOTE: This property will not be serialized. It can only be populated by - * the server.** + * The current state of workspace resource. Possible values include: 'Deleted', 'Enabled', + * 'Disabled', 'Migrated', 'Updated', 'Registered', 'Unregistered' + * **NOTE: This property will not be serialized. It can only be populated by the server.** */ readonly workspaceState?: WorkspaceState; /** - * @member {string} [workspaceId] The immutable id associated with this - * workspace. - * **NOTE: This property will not be serialized. It can only be populated by - * the server.** + * The immutable id associated with this workspace. + * **NOTE: This property will not be serialized. It can only be populated by the server.** */ readonly workspaceId?: string; /** - * @member {string} [creationTime] The creation time for this workspace - * resource. - * **NOTE: This property will not be serialized. It can only be populated by - * the server.** + * The creation time for this workspace resource. + * **NOTE: This property will not be serialized. It can only be populated by the server.** */ readonly creationTime?: string; /** - * @member {string} [studioEndpoint] The regional endpoint for the machine - * learning studio service which hosts this workspace. - * **NOTE: This property will not be serialized. It can only be populated by - * the server.** + * The regional endpoint for the machine learning studio service which hosts this workspace. + * **NOTE: This property will not be serialized. It can only be populated by the server.** */ readonly studioEndpoint?: string; /** - * @member {string} [keyVaultIdentifierId] The key vault identifier used for - * encrypted workspaces. + * The key vault identifier used for encrypted workspaces. */ keyVaultIdentifierId?: string; } /** - * @interface - * An interface representing WorkspaceUpdateParameters. * The parameters for updating a machine learning workspace. - * */ export interface WorkspaceUpdateParameters { /** - * @member {{ [propertyName: string]: string }} [tags] The resource tags for - * the machine learning workspace. + * The resource tags for the machine learning workspace. */ tags?: { [propertyName: string]: string }; /** - * @member {WorkspaceState} [workspaceState] The current state of workspace - * resource. Possible values include: 'Deleted', 'Enabled', 'Disabled', - * 'Migrated', 'Updated', 'Registered', 'Unregistered' + * The current state of workspace resource. Possible values include: 'Deleted', 'Enabled', + * 'Disabled', 'Migrated', 'Updated', 'Registered', 'Unregistered' */ workspaceState?: WorkspaceState; /** - * @member {string} [keyVaultIdentifierId] The key vault identifier used for - * encrypted workspaces. + * The key vault identifier used for encrypted workspaces. */ keyVaultIdentifierId?: string; } /** - * @interface - * An interface representing WorkspaceKeysResponse. * Workspace authorization keys for a workspace. - * */ export interface WorkspaceKeysResponse { /** - * @member {string} [primaryToken] Primary authorization key for this - * workspace. + * Primary authorization key for this workspace. */ primaryToken?: string; /** - * @member {string} [secondaryToken] Secondary authorization key for this - * workspace. + * Secondary authorization key for this workspace. */ secondaryToken?: string; } /** - * @interface - * An interface representing OperationDisplay. * Display name of operation - * */ export interface OperationDisplay { /** - * @member {string} [provider] The resource provider name: - * Microsoft.MachineLearning + * The resource provider name: Microsoft.MachineLearning */ provider?: string; /** - * @member {string} [resource] The resource on which the operation is - * performed. + * The resource on which the operation is performed. */ resource?: string; /** - * @member {string} [operation] The operation that users can perform. + * The operation that users can perform. */ operation?: string; /** - * @member {string} [description] The description for the operation. + * The description for the operation. */ description?: string; } /** - * @interface - * An interface representing Operation. * Azure Machine Learning Studio REST API operation - * */ export interface Operation { /** - * @member {string} [name] Operation name: {provider}/{resource}/{operation} + * Operation name: {provider}/{resource}/{operation} */ name?: string; /** - * @member {OperationDisplay} [display] Display name of operation + * Display name of operation */ display?: OperationDisplay; } /** - * @interface * An interface representing MachineLearningWorkspacesManagementClientOptions. - * @extends AzureServiceClientOptions */ export interface MachineLearningWorkspacesManagementClientOptions extends AzureServiceClientOptions { - /** - * @member {string} [baseUri] - */ baseUri?: string; } - /** * @interface - * An interface representing the OperationListResult. * An array of operations supported by the resource provider. - * * @extends Array */ export interface OperationListResult extends Array { @@ -244,15 +185,12 @@ export interface OperationListResult extends Array { /** * @interface - * An interface representing the WorkspaceListResult. * The result of a request to list machine learning workspace keys. - * * @extends Array */ export interface WorkspaceListResult extends Array { /** - * @member {string} [nextLink] The URI that can be used to request the next - * list of machine learning workspaces. + * The URI that can be used to request the next list of machine learning workspaces. */ nextLink?: string; } @@ -286,6 +224,7 @@ export type OperationsListResponse = OperationListResult & { * The response body as text (string format) */ bodyAsText: string; + /** * The response body as parsed JSON or XML */ @@ -305,6 +244,7 @@ export type WorkspacesGetResponse = Workspace & { * The response body as text (string format) */ bodyAsText: string; + /** * The response body as parsed JSON or XML */ @@ -324,6 +264,7 @@ export type WorkspacesCreateOrUpdateResponse = Workspace & { * The response body as text (string format) */ bodyAsText: string; + /** * The response body as parsed JSON or XML */ @@ -343,6 +284,7 @@ export type WorkspacesUpdateResponse = Workspace & { * The response body as text (string format) */ bodyAsText: string; + /** * The response body as parsed JSON or XML */ @@ -362,6 +304,7 @@ export type WorkspacesListWorkspaceKeysResponse = WorkspaceKeysResponse & { * The response body as text (string format) */ bodyAsText: string; + /** * The response body as parsed JSON or XML */ @@ -381,6 +324,7 @@ export type WorkspacesListByResourceGroupResponse = WorkspaceListResult & { * The response body as text (string format) */ bodyAsText: string; + /** * The response body as parsed JSON or XML */ @@ -400,6 +344,7 @@ export type WorkspacesListResponse = WorkspaceListResult & { * The response body as text (string format) */ bodyAsText: string; + /** * The response body as parsed JSON or XML */ @@ -419,6 +364,7 @@ export type WorkspacesListByResourceGroupNextResponse = WorkspaceListResult & { * The response body as text (string format) */ bodyAsText: string; + /** * The response body as parsed JSON or XML */ @@ -438,6 +384,7 @@ export type WorkspacesListNextResponse = WorkspaceListResult & { * The response body as text (string format) */ bodyAsText: string; + /** * The response body as parsed JSON or XML */ diff --git a/sdk/machinelearning/arm-workspaces/src/models/mappers.ts b/sdk/machinelearning/arm-workspaces/src/models/mappers.ts index a4ff64510b08..ac434129133e 100644 --- a/sdk/machinelearning/arm-workspaces/src/models/mappers.ts +++ b/sdk/machinelearning/arm-workspaces/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"; @@ -102,6 +100,7 @@ export const Workspace: msRest.CompositeMapper = { } }, ownerEmail: { + required: true, serializedName: "properties.ownerEmail", type: { name: "String" diff --git a/sdk/machinelearning/arm-workspaces/src/models/operationsMappers.ts b/sdk/machinelearning/arm-workspaces/src/models/operationsMappers.ts index 715467ec9522..b8de8606cf9d 100644 --- a/sdk/machinelearning/arm-workspaces/src/models/operationsMappers.ts +++ b/sdk/machinelearning/arm-workspaces/src/models/operationsMappers.ts @@ -1,17 +1,14 @@ /* * 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 { - OperationListResult, + ErrorResponse, Operation, OperationDisplay, - ErrorResponse + OperationListResult } from "../models/mappers"; - diff --git a/sdk/machinelearning/arm-workspaces/src/models/workspacesMappers.ts b/sdk/machinelearning/arm-workspaces/src/models/workspacesMappers.ts index 7961193de7f1..0e8a112a4750 100644 --- a/sdk/machinelearning/arm-workspaces/src/models/workspacesMappers.ts +++ b/sdk/machinelearning/arm-workspaces/src/models/workspacesMappers.ts @@ -1,20 +1,17 @@ /* * 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 { - Workspace, - Resource, BaseResource, ErrorResponse, - WorkspaceUpdateParameters, + Resource, + Workspace, WorkspaceKeysResponse, - WorkspaceListResult + WorkspaceListResult, + WorkspaceUpdateParameters } from "../models/mappers"; - diff --git a/sdk/machinelearning/arm-workspaces/tsconfig.json b/sdk/machinelearning/arm-workspaces/tsconfig.json index 87bbf5b5fa49..422b584abd5e 100644 --- a/sdk/machinelearning/arm-workspaces/tsconfig.json +++ b/sdk/machinelearning/arm-workspaces/tsconfig.json @@ -9,7 +9,7 @@ "esModuleInterop": true, "allowSyntheticDefaultImports": true, "forceConsistentCasingInFileNames": true, - "lib": ["es6"], + "lib": ["es6", "dom"], "declaration": true, "outDir": "./esm", "importHelpers": true