Skip to content

Commit 33436b0

Browse files
author
SDKAuto
committed
CodeGen from PR 15207 in Azure/azure-rest-api-specs
Merge 99e40430b8671d79bd9b5d31496326d083b44ad2 into 406474c3807f2dec010af72286f22aa7a9a54920
1 parent eb5b44c commit 33436b0

File tree

17 files changed

+1391
-436
lines changed

17 files changed

+1391
-436
lines changed

sdk/deviceprovisioningservices/arm-deviceprovisioningservices/LICENSE.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
The MIT License (MIT)
22

3-
Copyright (c) 2018 Microsoft
3+
Copyright (c) 2021 Microsoft
44

55
Permission is hereby granted, free of charge, to any person obtaining a copy
66
of this software and associated documentation files (the "Software"), to deal

sdk/deviceprovisioningservices/arm-deviceprovisioningservices/README.md

Lines changed: 3 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,11 @@
11
## Azure IotDpsClient SDK for JavaScript
22

3-
This package contains an isomorphic SDK (runs both in Node.js and in browsers) for IotDpsClient.
3+
This package contains an isomorphic SDK (runs both in node.js and in browsers) for IotDpsClient.
44

55
### Currently supported environments
66

77
- [LTS versions of Node.js](https://nodejs.org/about/releases/)
8-
- Latest versions of Safari, Chrome, Edge, and Firefox.
8+
- Latest versions of Safari, Chrome, Edge and Firefox.
99

1010
### Prerequisites
1111

@@ -21,7 +21,6 @@ Install both packages using the below command:
2121
```bash
2222
npm install --save @azure/arm-deviceprovisioningservices @azure/identity
2323
```
24-
2524
> **Note**: You may have used either `@azure/ms-rest-nodeauth` or `@azure/ms-rest-browserauth` in the past. These packages are in maintenance mode receiving critical bug fixes, but no new features.
2625
If you are on a [Node.js that has LTS status](https://nodejs.org/about/releases/), or are writing a client side browser application, we strongly encourage you to upgrade to `@azure/identity` which uses the latest versions of Azure Active Directory and MSAL APIs and provides more authentication options.
2726

@@ -37,7 +36,6 @@ If you are on a [Node.js that has LTS status](https://nodejs.org/about/releases/
3736

3837
In the below samples, we pass the credential and the Azure subscription id to instantiate the client.
3938
Once the client is created, explore the operations on it either in your favorite editor or in our [API reference documentation](https://docs.microsoft.com/javascript/api) to get started.
40-
4139
#### nodejs - Authentication, client creation, and list operations as an example written in JavaScript.
4240

4341
##### Sample code
@@ -51,7 +49,6 @@ const subscriptionId = process.env["AZURE_SUBSCRIPTION_ID"];
5149
// Please note that you can also use credentials from the `@azure/ms-rest-nodeauth` package instead.
5250
const creds = new DefaultAzureCredential();
5351
const client = new IotDpsClient(creds, subscriptionId);
54-
5552
client.operations.list().then((result) => {
5653
console.log("The result is:");
5754
console.log(result);
@@ -86,7 +83,7 @@ In browser applications, we recommend using the `InteractiveBrowserCredential` t
8683
const credential = new InteractiveBrowserCredential(
8784
{
8885
clientId: "<client id for your Azure AD app>",
89-
tenantId: "<optional tenant for your organization>"
86+
tenant: "<optional tenant for your organization>"
9087
});
9188
const client = new Azure.ArmDeviceprovisioningservices.IotDpsClient(creds, subscriptionId);
9289
client.operations.list().then((result) => {

sdk/deviceprovisioningservices/arm-deviceprovisioningservices/package.json

Lines changed: 11 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -4,10 +4,10 @@
44
"description": "IotDpsClient Library with typescript type definitions for node.js and browser.",
55
"version": "2.2.0",
66
"dependencies": {
7-
"@azure/ms-rest-azure-js": "^1.4.0",
8-
"@azure/ms-rest-js": "^1.11.0",
7+
"@azure/ms-rest-azure-js": "^2.1.0",
8+
"@azure/ms-rest-js": "^2.2.0",
99
"@azure/core-auth": "^1.1.4",
10-
"tslib": "^1.9.3"
10+
"tslib": "^1.10.0"
1111
},
1212
"keywords": [
1313
"node",
@@ -22,17 +22,18 @@
2222
"types": "./esm/iotDpsClient.d.ts",
2323
"devDependencies": {
2424
"typescript": "^3.6.0",
25-
"rollup": "^0.66.2",
26-
"rollup-plugin-node-resolve": "^3.4.0",
27-
"uglify-js": "^3.4.9"
25+
"rollup": "^1.18.0",
26+
"rollup-plugin-node-resolve": "^5.2.0",
27+
"rollup-plugin-sourcemaps": "^0.4.2",
28+
"uglify-js": "^3.6.0"
2829
},
29-
"homepage": "https://github.com/azure/azure-sdk-for-js/tree/main/sdk/deviceprovisioningservices/arm-deviceprovisioningservices",
30+
"homepage": "https://github.com/Azure/azure-sdk-for-js/tree/master/sdk/deviceprovisioningservices/arm-deviceprovisioningservices",
3031
"repository": {
3132
"type": "git",
32-
"url": "https://github.com/azure/azure-sdk-for-js.git"
33+
"url": "https://github.com/Azure/azure-sdk-for-js.git"
3334
},
3435
"bugs": {
35-
"url": "https://github.com/azure/azure-sdk-for-js/issues"
36+
"url": "https://github.com/Azure/azure-sdk-for-js/issues"
3637
},
3738
"files": [
3839
"dist/**/*.js",
@@ -44,6 +45,7 @@
4445
"esm/**/*.d.ts",
4546
"esm/**/*.d.ts.map",
4647
"src/**/*.ts",
48+
"README.md",
4749
"rollup.config.js",
4850
"tsconfig.json"
4951
],
Lines changed: 15 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,16 @@
1+
import rollup from "rollup";
12
import nodeResolve from "rollup-plugin-node-resolve";
3+
import sourcemaps from "rollup-plugin-sourcemaps";
4+
25
/**
3-
* @type {import('rollup').RollupFileOptions}
6+
* @type {rollup.RollupFileOptions}
47
*/
58
const config = {
6-
input: './esm/iotDpsClient.js',
7-
external: ["@azure/ms-rest-js", "@azure/ms-rest-azure-js"],
9+
input: "./esm/iotDpsClient.js",
10+
external: [
11+
"@azure/ms-rest-js",
12+
"@azure/ms-rest-azure-js"
13+
],
814
output: {
915
file: "./dist/arm-deviceprovisioningservices.js",
1016
format: "umd",
@@ -15,17 +21,17 @@ const config = {
1521
"@azure/ms-rest-azure-js": "msRestAzure"
1622
},
1723
banner: `/*
18-
* Copyright (c) Microsoft Corporation. All rights reserved.
19-
* Licensed under the MIT License. See License.txt in the project root for
20-
* license information.
24+
* Copyright (c) Microsoft Corporation.
25+
* Licensed under the MIT License.
2126
*
2227
* Code generated by Microsoft (R) AutoRest Code Generator.
23-
* Changes may cause incorrect behavior and will be lost if the code is
24-
* regenerated.
28+
* Changes may cause incorrect behavior and will be lost if the code is regenerated.
2529
*/`
2630
},
2731
plugins: [
28-
nodeResolve({ module: true })
32+
nodeResolve({ mainFields: ['module', 'main'] }),
33+
sourcemaps()
2934
]
3035
};
36+
3137
export default config;

sdk/deviceprovisioningservices/arm-deviceprovisioningservices/src/iotDpsClient.ts

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
11
/*
2-
* Copyright (c) Microsoft Corporation. All rights reserved.
3-
* Licensed under the MIT License. See License.txt in the project root for
4-
* license information.
2+
* Copyright (c) Microsoft Corporation.
3+
* Licensed under the MIT License.
54
*
65
* Code generated by Microsoft (R) AutoRest Code Generator.
76
* Changes may cause incorrect behavior and will be lost if the code is

sdk/deviceprovisioningservices/arm-deviceprovisioningservices/src/iotDpsClientContext.ts

Lines changed: 7 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
11
/*
2-
* Copyright (c) Microsoft Corporation. All rights reserved.
3-
* Licensed under the MIT License. See License.txt in the project root for
4-
* license information.
2+
* Copyright (c) Microsoft Corporation.
3+
* Licensed under the MIT License.
54
*
65
* Code generated by Microsoft (R) AutoRest Code Generator.
76
* Changes may cause incorrect behavior and will be lost if the code is
@@ -10,8 +9,8 @@
109

1110
import * as Models from "./models";
1211
import * as msRest from "@azure/ms-rest-js";
13-
import { TokenCredential } from "@azure/core-auth";
1412
import * as msRestAzure from "@azure/ms-rest-azure-js";
13+
import { TokenCredential } from "@azure/core-auth";
1514

1615
const packageName = "@azure/arm-deviceprovisioningservices";
1716
const packageVersion = "2.2.0";
@@ -43,25 +42,25 @@ export class IotDpsClientContext extends msRestAzure.AzureServiceClient {
4342
if (!options) {
4443
options = {};
4544
}
46-
if(!options.userAgent) {
45+
if (!options.userAgent) {
4746
const defaultUserAgent = msRestAzure.getDefaultUserAgentValue();
4847
options.userAgent = `${packageName}/${packageVersion} ${defaultUserAgent}`;
4948
}
5049

5150
super(credentials, options);
5251

53-
this.apiVersion = '2018-01-22';
52+
this.apiVersion = '2020-03-01';
5453
this.acceptLanguage = 'en-US';
5554
this.longRunningOperationRetryTimeout = 30;
5655
this.baseUri = options.baseUri || this.baseUri || "https://management.azure.com";
5756
this.requestContentType = "application/json; charset=utf-8";
5857
this.credentials = credentials;
5958
this.subscriptionId = subscriptionId;
6059

61-
if(options.acceptLanguage !== null && options.acceptLanguage !== undefined) {
60+
if (options.acceptLanguage !== null && options.acceptLanguage !== undefined) {
6261
this.acceptLanguage = options.acceptLanguage;
6362
}
64-
if(options.longRunningOperationRetryTimeout !== null && options.longRunningOperationRetryTimeout !== undefined) {
63+
if (options.longRunningOperationRetryTimeout !== null && options.longRunningOperationRetryTimeout !== undefined) {
6564
this.longRunningOperationRetryTimeout = options.longRunningOperationRetryTimeout;
6665
}
6766
}

sdk/deviceprovisioningservices/arm-deviceprovisioningservices/src/models/dpsCertificateMappers.ts

Lines changed: 17 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -1,28 +1,30 @@
11
/*
2-
* Copyright (c) Microsoft Corporation. All rights reserved.
3-
* Licensed under the MIT License. See License.txt in the project root for
4-
* license information.
2+
* Copyright (c) Microsoft Corporation.
3+
* Licensed under the MIT License.
54
*
65
* Code generated by Microsoft (R) AutoRest Code Generator.
7-
* Changes may cause incorrect behavior and will be lost if the code is
8-
* regenerated.
6+
* Changes may cause incorrect behavior and will be lost if the code is regenerated.
97
*/
108

119
export {
12-
CertificateResponse,
1310
BaseResource,
14-
CertificateProperties,
15-
ErrorDetails,
1611
CertificateBodyDescription,
1712
CertificateListDescription,
18-
VerificationCodeResponse,
19-
VerificationCodeResponseProperties,
20-
VerificationCodeRequest,
21-
Resource,
22-
ProvisioningServiceDescription,
13+
CertificateProperties,
14+
CertificateResponse,
15+
ErrorDetails,
2316
IotDpsPropertiesDescription,
17+
IotDpsSkuInfo,
2418
IotHubDefinitionDescription,
19+
IpFilterRule,
20+
PrivateEndpoint,
21+
PrivateEndpointConnection,
22+
PrivateEndpointConnectionProperties,
23+
PrivateLinkServiceConnectionState,
24+
ProvisioningServiceDescription,
25+
Resource,
2526
SharedAccessSignatureAuthorizationRuleAccessRightsDescription,
26-
IotDpsSkuInfo
27+
VerificationCodeRequest,
28+
VerificationCodeResponse,
29+
VerificationCodeResponseProperties
2730
} from "../models/mappers";
28-

0 commit comments

Comments
 (0)