@azure/digital-twins-core 2.0.0-alpha.20250109.1 → 2.0.0-alpha.20250110.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 +8 -8
- package/package.json +2 -2
package/README.md
CHANGED
|
@@ -13,7 +13,7 @@ See our [support policy](https://github.com/Azure/azure-sdk-for-js/blob/main/SUP
|
|
|
13
13
|
|
|
14
14
|
### Prerequisites
|
|
15
15
|
|
|
16
|
-
- An [Azure Digital Twins instance](https://
|
|
16
|
+
- An [Azure Digital Twins instance](https://learn.microsoft.com/azure/digital-twins/how-to-set-up-instance-portal).
|
|
17
17
|
|
|
18
18
|
### Install the `@azure/digital-twins-core` package
|
|
19
19
|
|
|
@@ -42,7 +42,7 @@ Please refer to [this document](https://github.com/Azure/azure-sdk-for-js/blob/m
|
|
|
42
42
|
|
|
43
43
|
Azure Digital Twins is an Azure IoT service that creates comprehensive models of the physical environment.
|
|
44
44
|
It can create spatial intelligence graphs to model the relationships and interactions between people, spaces, and devices.
|
|
45
|
-
You can learn more about Azure Digital Twins by visiting [Azure Digital Twins Documentation](https://
|
|
45
|
+
You can learn more about Azure Digital Twins by visiting [Azure Digital Twins Documentation](https://learn.microsoft.com/azure/digital-twins/).
|
|
46
46
|
|
|
47
47
|
### `DigitalTwinsClient`
|
|
48
48
|
|
|
@@ -151,7 +151,7 @@ console.log(`DigitalTwin: ${twin}`);
|
|
|
151
151
|
|
|
152
152
|
#### Query digital twins
|
|
153
153
|
|
|
154
|
-
Query the Azure Digital Twins instance for digital twins using the [Azure Digital Twins query language](https://
|
|
154
|
+
Query the Azure Digital Twins instance for digital twins using the [Azure Digital Twins query language](https://learn.microsoft.com/azure/digital-twins/how-to-query-graph).
|
|
155
155
|
Here's an example of how to query for digital twins and how to iterate over the results.
|
|
156
156
|
|
|
157
157
|
```javascript
|
|
@@ -222,7 +222,7 @@ const relationship = {
|
|
|
222
222
|
await serviceClient.upsertRelationship(
|
|
223
223
|
relationship["$sourceId"],
|
|
224
224
|
relationship["$relationshipId"],
|
|
225
|
-
relationship
|
|
225
|
+
relationship,
|
|
226
226
|
);
|
|
227
227
|
```
|
|
228
228
|
|
|
@@ -251,7 +251,7 @@ for await (const incomingRelationship of incomingRelationships) {
|
|
|
251
251
|
#### Create event route
|
|
252
252
|
|
|
253
253
|
To create an event route, provide an ID of an event route (in this case, "myEventRouteId") and event route data containing the endpoint and optional filter like the example shown below.
|
|
254
|
-
For more information on filtering events, see [this documentation](https://
|
|
254
|
+
For more information on filtering events, see [this documentation](https://learn.microsoft.com/azure/digital-twins/how-to-manage-routes-apis-cli#filter-events).
|
|
255
255
|
|
|
256
256
|
```javascript
|
|
257
257
|
const eventHubEndpointName = "myEventHubEndpointName";
|
|
@@ -301,7 +301,7 @@ const telemetryPayload = '{"Telemetry1": 5}';
|
|
|
301
301
|
const response = await serviceClient.publishTelemetry(
|
|
302
302
|
digitalTwinId,
|
|
303
303
|
telemetryPayload,
|
|
304
|
-
"<unique message ID>"
|
|
304
|
+
"<unique message ID>",
|
|
305
305
|
);
|
|
306
306
|
```
|
|
307
307
|
|
|
@@ -316,7 +316,7 @@ const response = await serviceClient.publishComponentTelemetry(
|
|
|
316
316
|
digitalTwinId,
|
|
317
317
|
componentPath,
|
|
318
318
|
telemetryPayload,
|
|
319
|
-
"<unique message ID>"
|
|
319
|
+
"<unique message ID>",
|
|
320
320
|
);
|
|
321
321
|
```
|
|
322
322
|
|
|
@@ -342,7 +342,7 @@ For more detailed instructions on how to enable logs, you can look at the [@azur
|
|
|
342
342
|
## Next steps
|
|
343
343
|
|
|
344
344
|
- Take a look at the [samples](https://github.com/Azure/azure-sdk-for-js/tree/main/sdk/digitaltwins/digital-twins-core/samples) directory for detailed examples that demonstrate how to use the client libraries.
|
|
345
|
-
- Explore the Azure Digital Twins [documentation](https://
|
|
345
|
+
- Explore the Azure Digital Twins [documentation](https://learn.microsoft.com/azure/digital-twins/)
|
|
346
346
|
|
|
347
347
|
## Contributing
|
|
348
348
|
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@azure/digital-twins-core",
|
|
3
|
-
"version": "2.0.0-alpha.
|
|
3
|
+
"version": "2.0.0-alpha.20250110.1",
|
|
4
4
|
"description": "An isomorphic client library for Azure Digital Twins",
|
|
5
5
|
"sdk-type": "client",
|
|
6
6
|
"author": "Microsoft Corporation",
|
|
@@ -112,7 +112,7 @@
|
|
|
112
112
|
]
|
|
113
113
|
},
|
|
114
114
|
"requiredResources": {
|
|
115
|
-
"Azure Digital Twins instance": "https://
|
|
115
|
+
"Azure Digital Twins instance": "https://learn.microsoft.com/azure/digital-twins/how-to-set-up-instance-portal"
|
|
116
116
|
},
|
|
117
117
|
"skipFolder": true
|
|
118
118
|
},
|