@azure-rest/iot-device-update 1.1.0-alpha.20250130.1 → 1.1.0-alpha.20250203.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.
- package/README.md +11 -17
- package/package.json +11 -10
package/README.md
CHANGED
|
@@ -48,13 +48,12 @@ AZURE_CLIENT_ID, AZURE_TENANT_ID, AZURE_CLIENT_SECRET
|
|
|
48
48
|
|
|
49
49
|
Use the returned token credential to authenticate the client:
|
|
50
50
|
|
|
51
|
-
```
|
|
51
|
+
```ts snippet:ReadmeSampleCreateClient_Node
|
|
52
52
|
import DeviceUpdate from "@azure-rest/iot-device-update";
|
|
53
53
|
import { DefaultAzureCredential } from "@azure/identity";
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
);
|
|
54
|
+
|
|
55
|
+
const endpoint = "https://<my-instance-id>.api.adu.microsoft.com";
|
|
56
|
+
const client = DeviceUpdate(endpoint, new DefaultAzureCredential());
|
|
58
57
|
```
|
|
59
58
|
|
|
60
59
|
## Key concepts
|
|
@@ -69,22 +68,17 @@ The following section shows you how to initialize and authenticate your client,
|
|
|
69
68
|
|
|
70
69
|
- [Get All Devices](#get-all-devices "Get All Devices")
|
|
71
70
|
|
|
72
|
-
```
|
|
71
|
+
```ts snippet:ReadmeSampleGetAllDevices
|
|
73
72
|
import DeviceUpdate from "@azure-rest/iot-device-update";
|
|
74
73
|
import { DefaultAzureCredential } from "@azure/identity";
|
|
75
74
|
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
const client = DeviceUpdate(endpoint, new DefaultAzureCredential());
|
|
79
|
-
|
|
80
|
-
const result = await client
|
|
81
|
-
.path("/deviceupdate/{instanceId}/management/devices", instanceId)
|
|
82
|
-
.get();
|
|
75
|
+
const endpoint = "https://<my-instance-id>.api.adu.microsoft.com";
|
|
76
|
+
const client = DeviceUpdate(endpoint, new DefaultAzureCredential());
|
|
83
77
|
|
|
84
|
-
|
|
85
|
-
}
|
|
78
|
+
const instanceId = "<my-instance-id>";
|
|
79
|
+
const result = await client.path("/deviceupdate/{instanceId}/management/devices", instanceId).get();
|
|
86
80
|
|
|
87
|
-
|
|
81
|
+
console.log(result);
|
|
88
82
|
```
|
|
89
83
|
|
|
90
84
|
## Troubleshooting
|
|
@@ -93,7 +87,7 @@ main().catch(console.error);
|
|
|
93
87
|
|
|
94
88
|
Enabling logging may help uncover useful information about failures. In order to see a log of HTTP requests and responses, set the `AZURE_LOG_LEVEL` environment variable to `info`. Alternatively, logging can be enabled at runtime by calling `setLogLevel` in the `@azure/logger`:
|
|
95
89
|
|
|
96
|
-
```
|
|
90
|
+
```ts snippet:SetLogLevel
|
|
97
91
|
import { setLogLevel } from "@azure/logger";
|
|
98
92
|
|
|
99
93
|
setLogLevel("info");
|
package/package.json
CHANGED
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
"sdk-type": "client",
|
|
4
4
|
"author": "Microsoft Corporation",
|
|
5
5
|
"description": "Device Update for IoT Hub is an Azure service that enables customers to publish update for their IoT devices to the cloud, and then deploy that update to their devices (approve updates to groups of devices managed and provisioned in IoT Hub). It leverages the proven security and reliability of the Windows Update platform, optimized for IoT devices. It works globally and knows when and how to update devices, enabling customers to focus on their business goals and let Device Update for IoT Hub handle the updates.",
|
|
6
|
-
"version": "1.1.0-alpha.
|
|
6
|
+
"version": "1.1.0-alpha.20250203.1",
|
|
7
7
|
"keywords": [
|
|
8
8
|
"node",
|
|
9
9
|
"azure",
|
|
@@ -71,17 +71,17 @@
|
|
|
71
71
|
"unit-test": "npm run unit-test:node && npm run unit-test:browser",
|
|
72
72
|
"unit-test:browser": "npm run clean && dev-tool run build-package && dev-tool run build-test && dev-tool run test:vitest --browser",
|
|
73
73
|
"unit-test:node": "dev-tool run test:vitest",
|
|
74
|
-
"update-snippets": "
|
|
74
|
+
"update-snippets": "dev-tool run update-snippets"
|
|
75
75
|
},
|
|
76
76
|
"sideEffects": false,
|
|
77
77
|
"autoPublish": false,
|
|
78
78
|
"dependencies": {
|
|
79
|
-
"@azure/core-lro": "^3.1.0",
|
|
80
|
-
"@azure/abort-controller": "^2.1.2",
|
|
81
79
|
"@azure-rest/core-client": "^2.3.1",
|
|
80
|
+
"@azure/abort-controller": "^2.1.2",
|
|
82
81
|
"@azure/core-auth": "^1.9.0",
|
|
82
|
+
"@azure/core-lro": "^3.1.0",
|
|
83
83
|
"@azure/core-paging": "^1.6.2",
|
|
84
|
-
"@azure/core-rest-pipeline": "^1.18.
|
|
84
|
+
"@azure/core-rest-pipeline": "^1.18.2",
|
|
85
85
|
"@azure/logger": "^1.1.4",
|
|
86
86
|
"tslib": "^2.8.1"
|
|
87
87
|
},
|
|
@@ -92,18 +92,19 @@
|
|
|
92
92
|
"@azure/core-util": "^1.11.0",
|
|
93
93
|
"@azure/dev-tool": ">=1.0.0-alpha <1.0.0-alphb",
|
|
94
94
|
"@azure/eslint-plugin-azure-sdk": ">=3.0.0-alpha <3.0.0-alphb",
|
|
95
|
-
"@azure/identity": "^4.0
|
|
95
|
+
"@azure/identity": "^4.6.0",
|
|
96
96
|
"@types/node": "^18.0.0",
|
|
97
97
|
"@vitest/browser": "^3.0.3",
|
|
98
98
|
"@vitest/coverage-istanbul": "^3.0.3",
|
|
99
99
|
"dotenv": "^16.0.0",
|
|
100
100
|
"eslint": "^9.9.0",
|
|
101
|
-
"playwright": "^1.
|
|
101
|
+
"playwright": "^1.50.0",
|
|
102
102
|
"typescript": "~5.7.2",
|
|
103
103
|
"vitest": "^3.0.3"
|
|
104
104
|
},
|
|
105
105
|
"type": "module",
|
|
106
106
|
"tshy": {
|
|
107
|
+
"project": "./tsconfig.src.json",
|
|
107
108
|
"exports": {
|
|
108
109
|
"./package.json": "./package.json",
|
|
109
110
|
".": "./src/index.ts"
|
|
@@ -116,8 +117,7 @@
|
|
|
116
117
|
"browser",
|
|
117
118
|
"react-native"
|
|
118
119
|
],
|
|
119
|
-
"selfLink": false
|
|
120
|
-
"project": "./tsconfig.src.json"
|
|
120
|
+
"selfLink": false
|
|
121
121
|
},
|
|
122
122
|
"exports": {
|
|
123
123
|
"./package.json": "./package.json",
|
|
@@ -139,5 +139,6 @@
|
|
|
139
139
|
"default": "./dist/commonjs/index.js"
|
|
140
140
|
}
|
|
141
141
|
}
|
|
142
|
-
}
|
|
142
|
+
},
|
|
143
|
+
"react-native": "./dist/react-native/index.js"
|
|
143
144
|
}
|