@azure/arm-mixedreality 3.1.0 → 4.0.1-alpha.20220131.2
Sign up to get free protection for your applications and to get access to all the features.
- package/CHANGELOG.md +17 -0
- package/LICENSE +21 -0
- package/README.md +69 -80
- package/dist/index.js +2016 -0
- package/dist/index.js.map +1 -0
- package/dist/index.min.js +1 -0
- package/dist/index.min.js.map +1 -0
- package/dist-esm/samples-dev/checkLocalNameAvailability.d.ts +2 -0
- package/dist-esm/samples-dev/checkLocalNameAvailability.d.ts.map +1 -0
- package/dist-esm/samples-dev/checkLocalNameAvailability.js +34 -0
- package/dist-esm/samples-dev/checkLocalNameAvailability.js.map +1 -0
- package/dist-esm/samples-dev/createRemoteRenderingAccount.d.ts +2 -0
- package/dist-esm/samples-dev/createRemoteRenderingAccount.d.ts.map +1 -0
- package/dist-esm/samples-dev/createRemoteRenderingAccount.js +35 -0
- package/dist-esm/samples-dev/createRemoteRenderingAccount.js.map +1 -0
- package/dist-esm/samples-dev/createSpatialAnchorAccount.d.ts +2 -0
- package/dist-esm/samples-dev/createSpatialAnchorAccount.d.ts.map +1 -0
- package/dist-esm/samples-dev/createSpatialAnchorAccount.js +34 -0
- package/dist-esm/samples-dev/createSpatialAnchorAccount.js.map +1 -0
- package/dist-esm/samples-dev/deleteRemoteRenderingAccount.d.ts +2 -0
- package/dist-esm/samples-dev/deleteRemoteRenderingAccount.d.ts.map +1 -0
- package/dist-esm/samples-dev/deleteRemoteRenderingAccount.js +31 -0
- package/dist-esm/samples-dev/deleteRemoteRenderingAccount.js.map +1 -0
- package/dist-esm/samples-dev/deleteSpatialAnchorsAccount.d.ts +2 -0
- package/dist-esm/samples-dev/deleteSpatialAnchorsAccount.d.ts.map +1 -0
- package/dist-esm/samples-dev/deleteSpatialAnchorsAccount.js +31 -0
- package/dist-esm/samples-dev/deleteSpatialAnchorsAccount.js.map +1 -0
- package/dist-esm/samples-dev/getRemoteRenderingAccount.d.ts +2 -0
- package/dist-esm/samples-dev/getRemoteRenderingAccount.d.ts.map +1 -0
- package/dist-esm/samples-dev/getRemoteRenderingAccount.js +31 -0
- package/dist-esm/samples-dev/getRemoteRenderingAccount.js.map +1 -0
- package/dist-esm/samples-dev/getSpatialAnchorsAccount.d.ts +2 -0
- package/dist-esm/samples-dev/getSpatialAnchorsAccount.d.ts.map +1 -0
- package/dist-esm/samples-dev/getSpatialAnchorsAccount.js +31 -0
- package/dist-esm/samples-dev/getSpatialAnchorsAccount.js.map +1 -0
- package/dist-esm/samples-dev/listAvailableOperations.d.ts +2 -0
- package/dist-esm/samples-dev/listAvailableOperations.d.ts.map +1 -0
- package/dist-esm/samples-dev/listAvailableOperations.js +43 -0
- package/dist-esm/samples-dev/listAvailableOperations.js.map +1 -0
- package/dist-esm/samples-dev/listRemoteRenderingAccountKey.d.ts +2 -0
- package/dist-esm/samples-dev/listRemoteRenderingAccountKey.d.ts.map +1 -0
- package/dist-esm/samples-dev/listRemoteRenderingAccountKey.js +31 -0
- package/dist-esm/samples-dev/listRemoteRenderingAccountKey.js.map +1 -0
- package/dist-esm/samples-dev/listRemoteRenderingAccountsByResourceGroup.d.ts +2 -0
- package/dist-esm/samples-dev/listRemoteRenderingAccountsByResourceGroup.d.ts.map +1 -0
- package/dist-esm/samples-dev/listRemoteRenderingAccountsByResourceGroup.js +44 -0
- package/dist-esm/samples-dev/listRemoteRenderingAccountsByResourceGroup.js.map +1 -0
- package/dist-esm/samples-dev/listRemoteRenderingAccountsBySubscription.d.ts +2 -0
- package/dist-esm/samples-dev/listRemoteRenderingAccountsBySubscription.d.ts.map +1 -0
- package/dist-esm/samples-dev/listRemoteRenderingAccountsBySubscription.js +43 -0
- package/dist-esm/samples-dev/listRemoteRenderingAccountsBySubscription.js.map +1 -0
- package/dist-esm/samples-dev/listSpatialAnchorAccountKey.d.ts +2 -0
- package/dist-esm/samples-dev/listSpatialAnchorAccountKey.d.ts.map +1 -0
- package/dist-esm/samples-dev/listSpatialAnchorAccountKey.js +31 -0
- package/dist-esm/samples-dev/listSpatialAnchorAccountKey.js.map +1 -0
- package/dist-esm/samples-dev/listSpatialAnchorAccountsByResourceGroup.d.ts +2 -0
- package/dist-esm/samples-dev/listSpatialAnchorAccountsByResourceGroup.d.ts.map +1 -0
- package/dist-esm/samples-dev/listSpatialAnchorAccountsByResourceGroup.js +44 -0
- package/dist-esm/samples-dev/listSpatialAnchorAccountsByResourceGroup.js.map +1 -0
- package/dist-esm/samples-dev/listSpatialAnchorsAccountsBySubscription.d.ts +2 -0
- package/dist-esm/samples-dev/listSpatialAnchorsAccountsBySubscription.d.ts.map +1 -0
- package/dist-esm/samples-dev/listSpatialAnchorsAccountsBySubscription.js +43 -0
- package/dist-esm/samples-dev/listSpatialAnchorsAccountsBySubscription.js.map +1 -0
- package/dist-esm/samples-dev/regenerateRemoteRenderingAccountKeys.d.ts +2 -0
- package/dist-esm/samples-dev/regenerateRemoteRenderingAccountKeys.d.ts.map +1 -0
- package/dist-esm/samples-dev/regenerateRemoteRenderingAccountKeys.js +32 -0
- package/dist-esm/samples-dev/regenerateRemoteRenderingAccountKeys.js.map +1 -0
- package/dist-esm/samples-dev/regenerateSpatialAnchorsAccountKeys.d.ts +2 -0
- package/dist-esm/samples-dev/regenerateSpatialAnchorsAccountKeys.d.ts.map +1 -0
- package/dist-esm/samples-dev/regenerateSpatialAnchorsAccountKeys.js +32 -0
- package/dist-esm/samples-dev/regenerateSpatialAnchorsAccountKeys.js.map +1 -0
- package/dist-esm/samples-dev/updateRemoteRenderingAccount.d.ts +2 -0
- package/dist-esm/samples-dev/updateRemoteRenderingAccount.d.ts.map +1 -0
- package/dist-esm/samples-dev/updateRemoteRenderingAccount.js +36 -0
- package/dist-esm/samples-dev/updateRemoteRenderingAccount.js.map +1 -0
- package/dist-esm/samples-dev/updateSpatialAnchorsAccount.d.ts +2 -0
- package/dist-esm/samples-dev/updateSpatialAnchorsAccount.d.ts.map +1 -0
- package/dist-esm/samples-dev/updateSpatialAnchorsAccount.js +35 -0
- package/dist-esm/samples-dev/updateSpatialAnchorsAccount.js.map +1 -0
- package/dist-esm/src/index.d.ts +5 -0
- package/dist-esm/src/index.d.ts.map +1 -0
- package/dist-esm/src/index.js +12 -0
- package/dist-esm/src/index.js.map +1 -0
- package/dist-esm/src/mixedRealityClient.d.ts +28 -0
- package/dist-esm/src/mixedRealityClient.d.ts.map +1 -0
- package/dist-esm/src/mixedRealityClient.js +89 -0
- package/dist-esm/src/mixedRealityClient.js.map +1 -0
- package/dist-esm/src/models/index.d.ts +444 -0
- package/dist-esm/src/models/index.d.ts.map +1 -0
- package/dist-esm/src/models/index.js +22 -0
- package/dist-esm/src/models/index.js.map +1 -0
- package/dist-esm/src/models/mappers.d.ts +25 -0
- package/dist-esm/src/models/mappers.d.ts.map +1 -0
- package/{esm → dist-esm/src}/models/mappers.js +362 -457
- package/dist-esm/src/models/mappers.js.map +1 -0
- package/dist-esm/src/models/parameters.d.ts +15 -0
- package/dist-esm/src/models/parameters.d.ts.map +1 -0
- package/dist-esm/src/models/parameters.js +135 -0
- package/dist-esm/src/models/parameters.js.map +1 -0
- package/{esm → dist-esm/src}/operations/index.d.ts +0 -0
- package/dist-esm/src/operations/index.d.ts.map +1 -0
- package/{esm → dist-esm/src}/operations/index.js +1 -2
- package/dist-esm/src/operations/index.js.map +1 -0
- package/dist-esm/src/operations/operations.d.ts +32 -0
- package/dist-esm/src/operations/operations.d.ts.map +1 -0
- package/dist-esm/src/operations/operations.js +120 -0
- package/dist-esm/src/operations/operations.js.map +1 -0
- package/dist-esm/src/operations/remoteRenderingAccounts.d.ts +98 -0
- package/dist-esm/src/operations/remoteRenderingAccounts.d.ts.map +1 -0
- package/dist-esm/src/operations/remoteRenderingAccounts.js +422 -0
- package/dist-esm/src/operations/remoteRenderingAccounts.js.map +1 -0
- package/dist-esm/src/operations/spatialAnchorsAccounts.d.ts +98 -0
- package/dist-esm/src/operations/spatialAnchorsAccounts.d.ts.map +1 -0
- package/dist-esm/src/operations/spatialAnchorsAccounts.js +422 -0
- package/dist-esm/src/operations/spatialAnchorsAccounts.js.map +1 -0
- package/dist-esm/src/operationsInterfaces/index.d.ts +4 -0
- package/dist-esm/src/operationsInterfaces/index.d.ts.map +1 -0
- package/dist-esm/src/operationsInterfaces/index.js +11 -0
- package/dist-esm/src/operationsInterfaces/index.js.map +1 -0
- package/dist-esm/src/operationsInterfaces/operations.d.ts +11 -0
- package/dist-esm/src/operationsInterfaces/operations.d.ts.map +1 -0
- package/{esm/models/index.js → dist-esm/src/operationsInterfaces/operations.js} +2 -1
- package/dist-esm/src/operationsInterfaces/operations.js.map +1 -0
- package/dist-esm/src/operationsInterfaces/remoteRenderingAccounts.d.ts +62 -0
- package/dist-esm/src/operationsInterfaces/remoteRenderingAccounts.d.ts.map +1 -0
- package/dist-esm/src/operationsInterfaces/remoteRenderingAccounts.js +9 -0
- package/dist-esm/src/operationsInterfaces/remoteRenderingAccounts.js.map +1 -0
- package/dist-esm/src/operationsInterfaces/spatialAnchorsAccounts.d.ts +62 -0
- package/dist-esm/src/operationsInterfaces/spatialAnchorsAccounts.d.ts.map +1 -0
- package/dist-esm/src/operationsInterfaces/spatialAnchorsAccounts.js +9 -0
- package/dist-esm/src/operationsInterfaces/spatialAnchorsAccounts.js.map +1 -0
- package/dist-esm/test/sampleTest.d.ts +2 -0
- package/dist-esm/test/sampleTest.d.ts.map +1 -0
- package/dist-esm/test/sampleTest.js +40 -0
- package/dist-esm/test/sampleTest.js.map +1 -0
- package/package.json +79 -22
- package/review/arm-mixedreality.api.md +436 -0
- package/rollup.config.js +181 -30
- package/src/{models/operationsMappers.ts → index.ts} +4 -11
- package/src/mixedRealityClient.ts +102 -80
- package/src/models/index.ts +370 -884
- package/src/models/mappers.ts +367 -478
- package/src/models/parameters.ts +100 -39
- package/src/operations/index.ts +1 -2
- package/src/operations/operations.ts +85 -73
- package/src/operations/remoteRenderingAccounts.ts +319 -392
- package/src/operations/spatialAnchorsAccounts.ts +319 -392
- package/src/operationsInterfaces/index.ts +11 -0
- package/src/operationsInterfaces/operations.ts +22 -0
- package/src/operationsInterfaces/remoteRenderingAccounts.ts +119 -0
- package/src/operationsInterfaces/spatialAnchorsAccounts.ts +119 -0
- package/tsconfig.json +5 -4
- package/types/arm-mixedreality.d.ts +674 -0
- package/types/tsdoc-metadata.json +11 -0
- package/dist/arm-mixedreality.js +0 -2052
- package/dist/arm-mixedreality.js.map +0 -1
- package/dist/arm-mixedreality.min.js +0 -1
- package/dist/arm-mixedreality.min.js.map +0 -1
- package/esm/mixedRealityClient.d.ts +0 -48
- package/esm/mixedRealityClient.d.ts.map +0 -1
- package/esm/mixedRealityClient.js +0 -77
- package/esm/mixedRealityClient.js.map +0 -1
- package/esm/mixedRealityClientContext.d.ts +0 -23
- package/esm/mixedRealityClientContext.d.ts.map +0 -1
- package/esm/mixedRealityClientContext.js +0 -61
- package/esm/mixedRealityClientContext.js.map +0 -1
- package/esm/models/index.d.ts +0 -957
- package/esm/models/index.d.ts.map +0 -1
- package/esm/models/index.js.map +0 -1
- package/esm/models/mappers.d.ts +0 -32
- package/esm/models/mappers.d.ts.map +0 -1
- package/esm/models/mappers.js.map +0 -1
- package/esm/models/operationsMappers.d.ts +0 -2
- package/esm/models/operationsMappers.d.ts.map +0 -1
- package/esm/models/operationsMappers.js +0 -9
- package/esm/models/operationsMappers.js.map +0 -1
- package/esm/models/parameters.d.ts +0 -9
- package/esm/models/parameters.d.ts.map +0 -1
- package/esm/models/parameters.js +0 -95
- package/esm/models/parameters.js.map +0 -1
- package/esm/models/remoteRenderingAccountsMappers.d.ts +0 -2
- package/esm/models/remoteRenderingAccountsMappers.d.ts.map +0 -1
- package/esm/models/remoteRenderingAccountsMappers.js +0 -9
- package/esm/models/remoteRenderingAccountsMappers.js.map +0 -1
- package/esm/models/spatialAnchorsAccountsMappers.d.ts +0 -2
- package/esm/models/spatialAnchorsAccountsMappers.d.ts.map +0 -1
- package/esm/models/spatialAnchorsAccountsMappers.js +0 -9
- package/esm/models/spatialAnchorsAccountsMappers.js.map +0 -1
- package/esm/operations/index.d.ts.map +0 -1
- package/esm/operations/index.js.map +0 -1
- package/esm/operations/operations.d.ts +0 -46
- package/esm/operations/operations.d.ts.map +0 -1
- package/esm/operations/operations.js +0 -79
- package/esm/operations/operations.js.map +0 -1
- package/esm/operations/remoteRenderingAccounts.d.ts +0 -217
- package/esm/operations/remoteRenderingAccounts.d.ts.map +0 -1
- package/esm/operations/remoteRenderingAccounts.js +0 -344
- package/esm/operations/remoteRenderingAccounts.js.map +0 -1
- package/esm/operations/spatialAnchorsAccounts.d.ts +0 -217
- package/esm/operations/spatialAnchorsAccounts.d.ts.map +0 -1
- package/esm/operations/spatialAnchorsAccounts.js +0 -344
- package/esm/operations/spatialAnchorsAccounts.js.map +0 -1
- package/src/mixedRealityClientContext.ts +0 -68
- package/src/models/remoteRenderingAccountsMappers.ts +0 -29
- package/src/models/spatialAnchorsAccountsMappers.ts +0 -29
package/CHANGELOG.md
ADDED
@@ -0,0 +1,17 @@
|
|
1
|
+
# Release History
|
2
|
+
|
3
|
+
## 4.0.1 (2022-01-20)
|
4
|
+
|
5
|
+
**Feature**
|
6
|
+
|
7
|
+
- Bump version
|
8
|
+
|
9
|
+
## 4.0.0 (2022-01-20)
|
10
|
+
|
11
|
+
The package of @azure/arm-mixedreality is using our next generation design principles since version 4.0.0, which contains breaking changes.
|
12
|
+
|
13
|
+
To understand the detail of the change, please refer to [Changelog](https://aka.ms/js-track2-changelog).
|
14
|
+
|
15
|
+
To migrate the existing applications to the latest version, please refer to [Migration Guide](https://aka.ms/js-track2-migration-guide).
|
16
|
+
|
17
|
+
To learn more, please refer to our documentation [Quick Start](https://aka.ms/js-track2-quickstart).
|
package/LICENSE
ADDED
@@ -0,0 +1,21 @@
|
|
1
|
+
The MIT License (MIT)
|
2
|
+
|
3
|
+
Copyright (c) 2022 Microsoft
|
4
|
+
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
7
|
+
in the Software without restriction, including without limitation the rights
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
10
|
+
furnished to do so, subject to the following conditions:
|
11
|
+
|
12
|
+
The above copyright notice and this permission notice shall be included in all
|
13
|
+
copies or substantial portions of the Software.
|
14
|
+
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
21
|
+
SOFTWARE.
|
package/README.md
CHANGED
@@ -1,109 +1,98 @@
|
|
1
|
-
|
1
|
+
# Azure MixedReality client library for JavaScript
|
2
2
|
|
3
|
-
This package contains an isomorphic SDK (runs both in Node.js and in browsers) for
|
3
|
+
This package contains an isomorphic SDK (runs both in Node.js and in browsers) for Azure MixedReality client.
|
4
|
+
|
5
|
+
Mixed Reality Client
|
6
|
+
|
7
|
+
[Source code](https://github.com/Azure/azure-sdk-for-js/tree/main/sdk/mixedreality/arm-mixedreality) |
|
8
|
+
[Package (NPM)](https://www.npmjs.com/package/@azure/arm-mixedreality) |
|
9
|
+
[API reference documentation](https://docs.microsoft.com/javascript/api/@azure/arm-mixedreality) |
|
10
|
+
[Samples](https://github.com/Azure-Samples/azure-samples-js-management)
|
11
|
+
|
12
|
+
## Getting started
|
4
13
|
|
5
14
|
### Currently supported environments
|
6
15
|
|
7
16
|
- [LTS versions of Node.js](https://nodejs.org/about/releases/)
|
8
|
-
- Latest versions of Safari, Chrome, Edge
|
17
|
+
- Latest versions of Safari, Chrome, Edge and Firefox.
|
9
18
|
|
10
19
|
### Prerequisites
|
11
20
|
|
12
|
-
|
21
|
+
- An [Azure subscription][azure_sub].
|
13
22
|
|
14
|
-
###
|
23
|
+
### Install the `@azure/arm-mixedreality` package
|
15
24
|
|
16
|
-
|
17
|
-
- `@azure/arm-mixedreality` that contains the client.
|
18
|
-
- `@azure/identity` that provides different mechanisms for the client to authenticate your requests using Azure Active Directory.
|
25
|
+
Install the Azure MixedReality client library for JavaScript with `npm`:
|
19
26
|
|
20
|
-
Install both packages using the below command:
|
21
27
|
```bash
|
22
|
-
npm install
|
28
|
+
npm install @azure/arm-mixedreality
|
23
29
|
```
|
24
30
|
|
25
|
-
|
26
|
-
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.
|
31
|
+
### Create and authenticate a `MixedRealityClient`
|
27
32
|
|
28
|
-
|
33
|
+
To create a client object to access the Azure MixedReality API, you will need the `endpoint` of your Azure MixedReality resource and a `credential`. The Azure MixedReality client can use Azure Active Directory credentials to authenticate.
|
34
|
+
You can find the endpoint for your Azure MixedReality resource in the [Azure Portal][azure_portal].
|
29
35
|
|
30
|
-
|
31
|
-
- Follow the instructions in the section on Authenticating client side browser applications in [Azure Identity examples](https://aka.ms/azsdk/js/identity/examples) to register your application in the Microsoft identity platform and set the right permissions.
|
32
|
-
- Copy the client ID and tenant ID from the Overview section of your app registration in Azure portal and use it in the browser sample below.
|
33
|
-
- If you are writing a server side application,
|
34
|
-
- [Select a credential from `@azure/identity` based on the authentication method of your choice](https://aka.ms/azsdk/js/identity/examples)
|
35
|
-
- Complete the set up steps required by the credential if any.
|
36
|
-
- Use the credential you picked in the place of `DefaultAzureCredential` in the Node.js sample below.
|
36
|
+
You can authenticate with Azure Active Directory using a credential from the [@azure/identity][azure_identity] library or [an existing AAD Token](https://github.com/Azure/azure-sdk-for-js/blob/master/sdk/identity/identity/samples/AzureIdentityExamples.md#authenticating-with-a-pre-fetched-access-token).
|
37
37
|
|
38
|
-
|
39
|
-
|
38
|
+
To use the [DefaultAzureCredential][defaultazurecredential] provider shown below, or other credential providers provided with the Azure SDK, please install the `@azure/identity` package:
|
39
|
+
|
40
|
+
```bash
|
41
|
+
npm install @azure/identity
|
42
|
+
```
|
40
43
|
|
41
|
-
|
44
|
+
You will also need to **register a new AAD application and grant access to Azure MixedReality** by assigning the suitable role to your service principal (note: roles such as `"Owner"` will not grant the necessary permissions).
|
45
|
+
Set the values of the client ID, tenant ID, and client secret of the AAD application as environment variables: `AZURE_CLIENT_ID`, `AZURE_TENANT_ID`, `AZURE_CLIENT_SECRET`.
|
42
46
|
|
43
|
-
|
47
|
+
For more information about how to create an Azure AD Application check out [this guide](https://docs.microsoft.com/azure/active-directory/develop/howto-create-service-principal-portal).
|
44
48
|
|
45
49
|
```javascript
|
46
|
-
const { DefaultAzureCredential } = require("@azure/identity");
|
47
50
|
const { MixedRealityClient } = require("@azure/arm-mixedreality");
|
48
|
-
const
|
49
|
-
|
50
|
-
|
51
|
-
// Please note that you can also use credentials from the `@azure/ms-rest-nodeauth` package instead.
|
52
|
-
const creds = new DefaultAzureCredential();
|
53
|
-
const client = new MixedRealityClient(creds, subscriptionId);
|
54
|
-
|
55
|
-
client.operations.list().then((result) => {
|
56
|
-
console.log("The result is:");
|
57
|
-
console.log(result);
|
58
|
-
}).catch((err) => {
|
59
|
-
console.log("An error occurred:");
|
60
|
-
console.error(err);
|
61
|
-
});
|
51
|
+
const { DefaultAzureCredential } = require("@azure/identity");
|
52
|
+
const subscriptionId = "00000000-0000-0000-0000-000000000000";
|
53
|
+
const client = new MixedRealityClient(new DefaultAzureCredential(), subscriptionId);
|
62
54
|
```
|
63
55
|
|
64
|
-
|
65
|
-
|
66
|
-
|
67
|
-
|
68
|
-
|
69
|
-
|
70
|
-
|
71
|
-
|
72
|
-
|
73
|
-
|
74
|
-
|
75
|
-
|
76
|
-
|
77
|
-
|
78
|
-
|
79
|
-
|
80
|
-
|
81
|
-
|
82
|
-
|
83
|
-
const subscriptionId = "<Subscription_Id>";
|
84
|
-
// Create credentials using the `@azure/identity` package.
|
85
|
-
// Please note that you can also use credentials from the `@azure/ms-rest-browserauth` package instead.
|
86
|
-
const credential = new InteractiveBrowserCredential(
|
87
|
-
{
|
88
|
-
clientId: "<client id for your Azure AD app>",
|
89
|
-
tenantId: "<optional tenant for your organization>"
|
90
|
-
});
|
91
|
-
const client = new Azure.ArmMixedreality.MixedRealityClient(creds, subscriptionId);
|
92
|
-
client.operations.list().then((result) => {
|
93
|
-
console.log("The result is:");
|
94
|
-
console.log(result);
|
95
|
-
}).catch((err) => {
|
96
|
-
console.log("An error occurred:");
|
97
|
-
console.error(err);
|
98
|
-
});
|
99
|
-
</script>
|
100
|
-
</head>
|
101
|
-
<body></body>
|
102
|
-
</html>
|
56
|
+
|
57
|
+
### JavaScript Bundle
|
58
|
+
To use this client library in the browser, first you need to use a bundler. For details on how to do this, please refer to our [bundling documentation](https://aka.ms/AzureSDKBundling).
|
59
|
+
|
60
|
+
## Key concepts
|
61
|
+
|
62
|
+
### MixedRealityClient
|
63
|
+
|
64
|
+
`MixedRealityClient` is the primary interface for developers using the Azure MixedReality client library. Explore the methods on this client object to understand the different features of the Azure MixedReality service that you can access.
|
65
|
+
|
66
|
+
## Troubleshooting
|
67
|
+
|
68
|
+
### Logging
|
69
|
+
|
70
|
+
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`:
|
71
|
+
|
72
|
+
```javascript
|
73
|
+
const { setLogLevel } = require("@azure/logger");
|
74
|
+
setLogLevel("info");
|
103
75
|
```
|
104
76
|
|
77
|
+
For more detailed instructions on how to enable logs, you can look at the [@azure/logger package docs](https://github.com/Azure/azure-sdk-for-js/tree/main/sdk/core/logger).
|
78
|
+
|
79
|
+
## Next steps
|
80
|
+
|
81
|
+
Please take a look at the [samples](https://github.com/Azure-Samples/azure-samples-js-management) directory for detailed examples on how to use this library.
|
82
|
+
|
83
|
+
## Contributing
|
84
|
+
|
85
|
+
If you'd like to contribute to this library, please read the [contributing guide](https://github.com/Azure/azure-sdk-for-js/blob/main/CONTRIBUTING.md) to learn more about how to build and test the code.
|
86
|
+
|
105
87
|
## Related projects
|
106
88
|
|
107
|
-
- [Microsoft Azure SDK for
|
89
|
+
- [Microsoft Azure SDK for JavaScript](https://github.com/Azure/azure-sdk-for-js)
|
90
|
+
|
91
|
+
![Impressions](https://azure-sdk-impressions.azurewebsites.net/api/impressions/azure-sdk-for-js%2Fsdk%2Fmixedreality%2Farm-mixedreality%2FREADME.png)
|
108
92
|
|
109
|
-
|
93
|
+
[azure_cli]: https://docs.microsoft.com/cli/azure
|
94
|
+
[azure_sub]: https://azure.microsoft.com/free/
|
95
|
+
[azure_sub]: https://azure.microsoft.com/free/
|
96
|
+
[azure_portal]: https://portal.azure.com
|
97
|
+
[azure_identity]: https://github.com/Azure/azure-sdk-for-js/tree/main/sdk/identity/identity
|
98
|
+
[defaultazurecredential]: https://github.com/Azure/azure-sdk-for-js/tree/main/sdk/identity/identity#defaultazurecredential
|