@azure/arm-digitaltwins 3.1.0-beta.1 → 3.1.0
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/CHANGELOG.md +2 -1
- package/README.md +1 -1
- package/dist/index.js +81 -14
- package/dist/index.js.map +1 -1
- package/dist/index.min.js +1 -1
- package/dist/index.min.js.map +1 -1
- package/dist-esm/samples-dev/digitalTwinsCheckNameAvailabilitySample.js +1 -1
- package/dist-esm/samples-dev/digitalTwinsCreateOrUpdateSample.js +3 -3
- package/dist-esm/samples-dev/digitalTwinsDeleteSample.js +2 -2
- package/dist-esm/samples-dev/digitalTwinsEndpointCreateOrUpdateSample.js +2 -2
- package/dist-esm/samples-dev/digitalTwinsEndpointDeleteSample.js +2 -2
- package/dist-esm/samples-dev/digitalTwinsEndpointGetSample.js +2 -2
- package/dist-esm/samples-dev/digitalTwinsEndpointListSample.js +2 -2
- package/dist-esm/samples-dev/digitalTwinsGetSample.js +3 -3
- package/dist-esm/samples-dev/digitalTwinsListByResourceGroupSample.js +1 -1
- package/dist-esm/samples-dev/digitalTwinsListSample.js +1 -1
- package/dist-esm/samples-dev/digitalTwinsUpdateSample.js +3 -3
- package/dist-esm/samples-dev/operationsListSample.js +1 -1
- package/dist-esm/samples-dev/privateEndpointConnectionsCreateOrUpdateSample.js +1 -1
- package/dist-esm/samples-dev/privateEndpointConnectionsDeleteSample.js +1 -1
- package/dist-esm/samples-dev/privateEndpointConnectionsGetSample.js +1 -1
- package/dist-esm/samples-dev/privateEndpointConnectionsListSample.js +1 -1
- package/dist-esm/samples-dev/privateLinkResourcesGetSample.js +1 -1
- package/dist-esm/samples-dev/privateLinkResourcesListSample.js +1 -1
- package/dist-esm/samples-dev/timeSeriesDatabaseConnectionsCreateOrUpdateSample.js +1 -1
- package/dist-esm/samples-dev/timeSeriesDatabaseConnectionsDeleteSample.js +1 -1
- package/dist-esm/samples-dev/timeSeriesDatabaseConnectionsGetSample.js +1 -1
- package/dist-esm/samples-dev/timeSeriesDatabaseConnectionsListSample.js +1 -1
- package/dist-esm/src/azureDigitalTwinsManagementClient.d.ts +2 -0
- package/dist-esm/src/azureDigitalTwinsManagementClient.d.ts.map +1 -1
- package/dist-esm/src/azureDigitalTwinsManagementClient.js +50 -3
- package/dist-esm/src/azureDigitalTwinsManagementClient.js.map +1 -1
- package/dist-esm/src/models/index.d.ts +5 -1
- package/dist-esm/src/models/index.d.ts.map +1 -1
- package/dist-esm/src/models/index.js +2 -0
- package/dist-esm/src/models/index.js.map +1 -1
- package/dist-esm/src/models/parameters.js +1 -1
- package/dist-esm/src/models/parameters.js.map +1 -1
- package/dist-esm/src/operations/digitalTwins.d.ts.map +1 -1
- package/dist-esm/src/operations/digitalTwins.js +9 -3
- package/dist-esm/src/operations/digitalTwins.js.map +1 -1
- package/dist-esm/src/operations/digitalTwinsEndpoint.d.ts.map +1 -1
- package/dist-esm/src/operations/digitalTwinsEndpoint.js +6 -2
- package/dist-esm/src/operations/digitalTwinsEndpoint.js.map +1 -1
- package/dist-esm/src/operations/privateEndpointConnections.d.ts.map +1 -1
- package/dist-esm/src/operations/privateEndpointConnections.js +6 -2
- package/dist-esm/src/operations/privateEndpointConnections.js.map +1 -1
- package/dist-esm/src/operations/timeSeriesDatabaseConnections.d.ts.map +1 -1
- package/dist-esm/src/operations/timeSeriesDatabaseConnections.js +6 -2
- package/dist-esm/src/operations/timeSeriesDatabaseConnections.js.map +1 -1
- package/dist-esm/test/sampleTest.js +11 -13
- package/dist-esm/test/sampleTest.js.map +1 -1
- package/package.json +12 -8
- package/review/arm-digitaltwins.api.md +5 -1
- package/src/azureDigitalTwinsManagementClient.ts +62 -3
- package/src/models/index.ts +5 -1
- package/src/models/parameters.ts +1 -1
- package/src/operations/digitalTwins.ts +9 -3
- package/src/operations/digitalTwinsEndpoint.ts +6 -2
- package/src/operations/privateEndpointConnections.ts +6 -2
- package/src/operations/timeSeriesDatabaseConnections.ts +6 -2
- package/types/arm-digitaltwins.d.ts +7 -1
- package/types/tsdoc-metadata.json +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
# Release History
|
|
2
2
|
|
|
3
|
-
## 3.1.0
|
|
3
|
+
## 3.1.0 (2022-06-22)
|
|
4
4
|
|
|
5
5
|
**Features**
|
|
6
6
|
|
|
@@ -33,6 +33,7 @@
|
|
|
33
33
|
- Added Enum KnownConnectionType
|
|
34
34
|
- Added Enum KnownCreatedByType
|
|
35
35
|
- Added Enum KnownTimeSeriesDatabaseConnectionState
|
|
36
|
+
- Enum KnownEndpointProvisioningState has a new value Updating
|
|
36
37
|
|
|
37
38
|
|
|
38
39
|
## 3.0.0 (2022-01-13)
|
package/README.md
CHANGED
|
@@ -6,7 +6,7 @@ Azure Digital Twins Client for managing DigitalTwinsInstance
|
|
|
6
6
|
|
|
7
7
|
[Source code](https://github.com/Azure/azure-sdk-for-js/tree/main/sdk/digitaltwins/arm-digitaltwins) |
|
|
8
8
|
[Package (NPM)](https://www.npmjs.com/package/@azure/arm-digitaltwins) |
|
|
9
|
-
[API reference documentation](https://docs.microsoft.com/javascript/api/@azure/arm-digitaltwins
|
|
9
|
+
[API reference documentation](https://docs.microsoft.com/javascript/api/@azure/arm-digitaltwins) |
|
|
10
10
|
[Samples](https://github.com/Azure-Samples/azure-samples-js-management)
|
|
11
11
|
|
|
12
12
|
## Getting started
|
package/dist/index.js
CHANGED
|
@@ -2,8 +2,9 @@
|
|
|
2
2
|
|
|
3
3
|
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
4
|
|
|
5
|
-
var coreClient = require('@azure/core-client');
|
|
6
5
|
var tslib = require('tslib');
|
|
6
|
+
var coreClient = require('@azure/core-client');
|
|
7
|
+
var coreRestPipeline = require('@azure/core-rest-pipeline');
|
|
7
8
|
var coreLro = require('@azure/core-lro');
|
|
8
9
|
|
|
9
10
|
function _interopNamespace(e) {
|
|
@@ -25,6 +26,7 @@ function _interopNamespace(e) {
|
|
|
25
26
|
}
|
|
26
27
|
|
|
27
28
|
var coreClient__namespace = /*#__PURE__*/_interopNamespace(coreClient);
|
|
29
|
+
var coreRestPipeline__namespace = /*#__PURE__*/_interopNamespace(coreRestPipeline);
|
|
28
30
|
|
|
29
31
|
/*
|
|
30
32
|
* Copyright (c) Microsoft Corporation.
|
|
@@ -96,6 +98,7 @@ exports.KnownEndpointProvisioningState = void 0;
|
|
|
96
98
|
(function (KnownEndpointProvisioningState) {
|
|
97
99
|
KnownEndpointProvisioningState["Provisioning"] = "Provisioning";
|
|
98
100
|
KnownEndpointProvisioningState["Deleting"] = "Deleting";
|
|
101
|
+
KnownEndpointProvisioningState["Updating"] = "Updating";
|
|
99
102
|
KnownEndpointProvisioningState["Succeeded"] = "Succeeded";
|
|
100
103
|
KnownEndpointProvisioningState["Failed"] = "Failed";
|
|
101
104
|
KnownEndpointProvisioningState["Canceled"] = "Canceled";
|
|
@@ -128,6 +131,7 @@ exports.KnownTimeSeriesDatabaseConnectionState = void 0;
|
|
|
128
131
|
(function (KnownTimeSeriesDatabaseConnectionState) {
|
|
129
132
|
KnownTimeSeriesDatabaseConnectionState["Provisioning"] = "Provisioning";
|
|
130
133
|
KnownTimeSeriesDatabaseConnectionState["Deleting"] = "Deleting";
|
|
134
|
+
KnownTimeSeriesDatabaseConnectionState["Updating"] = "Updating";
|
|
131
135
|
KnownTimeSeriesDatabaseConnectionState["Succeeded"] = "Succeeded";
|
|
132
136
|
KnownTimeSeriesDatabaseConnectionState["Failed"] = "Failed";
|
|
133
137
|
KnownTimeSeriesDatabaseConnectionState["Canceled"] = "Canceled";
|
|
@@ -1311,7 +1315,7 @@ const $host = {
|
|
|
1311
1315
|
const apiVersion = {
|
|
1312
1316
|
parameterPath: "apiVersion",
|
|
1313
1317
|
mapper: {
|
|
1314
|
-
defaultValue: "
|
|
1318
|
+
defaultValue: "2022-05-31",
|
|
1315
1319
|
isConstant: true,
|
|
1316
1320
|
serializedName: "api-version",
|
|
1317
1321
|
type: {
|
|
@@ -1653,10 +1657,12 @@ class DigitalTwinsImpl {
|
|
|
1653
1657
|
};
|
|
1654
1658
|
});
|
|
1655
1659
|
const lro = new LroImpl(sendOperation, { resourceGroupName, resourceName, digitalTwinsCreate, options }, createOrUpdateOperationSpec$3);
|
|
1656
|
-
|
|
1660
|
+
const poller = new coreLro.LroEngine(lro, {
|
|
1657
1661
|
resumeFrom: options === null || options === void 0 ? void 0 : options.resumeFrom,
|
|
1658
1662
|
intervalInMs: options === null || options === void 0 ? void 0 : options.updateIntervalInMs
|
|
1659
1663
|
});
|
|
1664
|
+
yield poller.poll();
|
|
1665
|
+
return poller;
|
|
1660
1666
|
});
|
|
1661
1667
|
}
|
|
1662
1668
|
/**
|
|
@@ -1711,10 +1717,12 @@ class DigitalTwinsImpl {
|
|
|
1711
1717
|
digitalTwinsPatchDescription,
|
|
1712
1718
|
options
|
|
1713
1719
|
}, updateOperationSpec);
|
|
1714
|
-
|
|
1720
|
+
const poller = new coreLro.LroEngine(lro, {
|
|
1715
1721
|
resumeFrom: options === null || options === void 0 ? void 0 : options.resumeFrom,
|
|
1716
1722
|
intervalInMs: options === null || options === void 0 ? void 0 : options.updateIntervalInMs
|
|
1717
1723
|
});
|
|
1724
|
+
yield poller.poll();
|
|
1725
|
+
return poller;
|
|
1718
1726
|
});
|
|
1719
1727
|
}
|
|
1720
1728
|
/**
|
|
@@ -1761,10 +1769,12 @@ class DigitalTwinsImpl {
|
|
|
1761
1769
|
};
|
|
1762
1770
|
});
|
|
1763
1771
|
const lro = new LroImpl(sendOperation, { resourceGroupName, resourceName, options }, deleteOperationSpec$3);
|
|
1764
|
-
|
|
1772
|
+
const poller = new coreLro.LroEngine(lro, {
|
|
1765
1773
|
resumeFrom: options === null || options === void 0 ? void 0 : options.resumeFrom,
|
|
1766
1774
|
intervalInMs: options === null || options === void 0 ? void 0 : options.updateIntervalInMs
|
|
1767
1775
|
});
|
|
1776
|
+
yield poller.poll();
|
|
1777
|
+
return poller;
|
|
1768
1778
|
});
|
|
1769
1779
|
}
|
|
1770
1780
|
/**
|
|
@@ -2164,10 +2174,12 @@ class DigitalTwinsEndpointImpl {
|
|
|
2164
2174
|
endpointDescription,
|
|
2165
2175
|
options
|
|
2166
2176
|
}, createOrUpdateOperationSpec$2);
|
|
2167
|
-
|
|
2177
|
+
const poller = new coreLro.LroEngine(lro, {
|
|
2168
2178
|
resumeFrom: options === null || options === void 0 ? void 0 : options.resumeFrom,
|
|
2169
2179
|
intervalInMs: options === null || options === void 0 ? void 0 : options.updateIntervalInMs
|
|
2170
2180
|
});
|
|
2181
|
+
yield poller.poll();
|
|
2182
|
+
return poller;
|
|
2171
2183
|
});
|
|
2172
2184
|
}
|
|
2173
2185
|
/**
|
|
@@ -2216,10 +2228,12 @@ class DigitalTwinsEndpointImpl {
|
|
|
2216
2228
|
};
|
|
2217
2229
|
});
|
|
2218
2230
|
const lro = new LroImpl(sendOperation, { resourceGroupName, resourceName, endpointName, options }, deleteOperationSpec$2);
|
|
2219
|
-
|
|
2231
|
+
const poller = new coreLro.LroEngine(lro, {
|
|
2220
2232
|
resumeFrom: options === null || options === void 0 ? void 0 : options.resumeFrom,
|
|
2221
2233
|
intervalInMs: options === null || options === void 0 ? void 0 : options.updateIntervalInMs
|
|
2222
2234
|
});
|
|
2235
|
+
yield poller.poll();
|
|
2236
|
+
return poller;
|
|
2223
2237
|
});
|
|
2224
2238
|
}
|
|
2225
2239
|
/**
|
|
@@ -2653,10 +2667,12 @@ class PrivateEndpointConnectionsImpl {
|
|
|
2653
2667
|
privateEndpointConnectionName,
|
|
2654
2668
|
options
|
|
2655
2669
|
}, deleteOperationSpec$1);
|
|
2656
|
-
|
|
2670
|
+
const poller = new coreLro.LroEngine(lro, {
|
|
2657
2671
|
resumeFrom: options === null || options === void 0 ? void 0 : options.resumeFrom,
|
|
2658
2672
|
intervalInMs: options === null || options === void 0 ? void 0 : options.updateIntervalInMs
|
|
2659
2673
|
});
|
|
2674
|
+
yield poller.poll();
|
|
2675
|
+
return poller;
|
|
2660
2676
|
});
|
|
2661
2677
|
}
|
|
2662
2678
|
/**
|
|
@@ -2711,10 +2727,12 @@ class PrivateEndpointConnectionsImpl {
|
|
|
2711
2727
|
privateEndpointConnection,
|
|
2712
2728
|
options
|
|
2713
2729
|
}, createOrUpdateOperationSpec$1);
|
|
2714
|
-
|
|
2730
|
+
const poller = new coreLro.LroEngine(lro, {
|
|
2715
2731
|
resumeFrom: options === null || options === void 0 ? void 0 : options.resumeFrom,
|
|
2716
2732
|
intervalInMs: options === null || options === void 0 ? void 0 : options.updateIntervalInMs
|
|
2717
2733
|
});
|
|
2734
|
+
yield poller.poll();
|
|
2735
|
+
return poller;
|
|
2718
2736
|
});
|
|
2719
2737
|
}
|
|
2720
2738
|
/**
|
|
@@ -2964,10 +2982,12 @@ class TimeSeriesDatabaseConnectionsImpl {
|
|
|
2964
2982
|
timeSeriesDatabaseConnectionDescription,
|
|
2965
2983
|
options
|
|
2966
2984
|
}, createOrUpdateOperationSpec);
|
|
2967
|
-
|
|
2985
|
+
const poller = new coreLro.LroEngine(lro, {
|
|
2968
2986
|
resumeFrom: options === null || options === void 0 ? void 0 : options.resumeFrom,
|
|
2969
2987
|
intervalInMs: options === null || options === void 0 ? void 0 : options.updateIntervalInMs
|
|
2970
2988
|
});
|
|
2989
|
+
yield poller.poll();
|
|
2990
|
+
return poller;
|
|
2971
2991
|
});
|
|
2972
2992
|
}
|
|
2973
2993
|
/**
|
|
@@ -3021,10 +3041,12 @@ class TimeSeriesDatabaseConnectionsImpl {
|
|
|
3021
3041
|
timeSeriesDatabaseConnectionName,
|
|
3022
3042
|
options
|
|
3023
3043
|
}, deleteOperationSpec);
|
|
3024
|
-
|
|
3044
|
+
const poller = new coreLro.LroEngine(lro, {
|
|
3025
3045
|
resumeFrom: options === null || options === void 0 ? void 0 : options.resumeFrom,
|
|
3026
3046
|
intervalInMs: options === null || options === void 0 ? void 0 : options.updateIntervalInMs
|
|
3027
3047
|
});
|
|
3048
|
+
yield poller.poll();
|
|
3049
|
+
return poller;
|
|
3028
3050
|
});
|
|
3029
3051
|
}
|
|
3030
3052
|
/**
|
|
@@ -3198,6 +3220,7 @@ class AzureDigitalTwinsManagementClient extends coreClient__namespace.ServiceCli
|
|
|
3198
3220
|
* @param options The parameter options
|
|
3199
3221
|
*/
|
|
3200
3222
|
constructor(credentials, subscriptionId, options) {
|
|
3223
|
+
var _a, _b;
|
|
3201
3224
|
if (credentials === undefined) {
|
|
3202
3225
|
throw new Error("'credentials' cannot be null");
|
|
3203
3226
|
}
|
|
@@ -3212,7 +3235,7 @@ class AzureDigitalTwinsManagementClient extends coreClient__namespace.ServiceCli
|
|
|
3212
3235
|
requestContentType: "application/json; charset=utf-8",
|
|
3213
3236
|
credential: credentials
|
|
3214
3237
|
};
|
|
3215
|
-
const packageDetails = `azsdk-js-arm-digitaltwins/3.1.0
|
|
3238
|
+
const packageDetails = `azsdk-js-arm-digitaltwins/3.1.0`;
|
|
3216
3239
|
const userAgentPrefix = options.userAgentOptions && options.userAgentOptions.userAgentPrefix
|
|
3217
3240
|
? `${options.userAgentOptions.userAgentPrefix} ${packageDetails}`
|
|
3218
3241
|
: `${packageDetails}`;
|
|
@@ -3221,19 +3244,63 @@ class AzureDigitalTwinsManagementClient extends coreClient__namespace.ServiceCli
|
|
|
3221
3244
|
}
|
|
3222
3245
|
const optionsWithDefaults = Object.assign(Object.assign(Object.assign({}, defaults), options), { userAgentOptions: {
|
|
3223
3246
|
userAgentPrefix
|
|
3224
|
-
}, baseUri: options.endpoint
|
|
3247
|
+
}, baseUri: (_b = (_a = options.endpoint) !== null && _a !== void 0 ? _a : options.baseUri) !== null && _b !== void 0 ? _b : "https://management.azure.com" });
|
|
3225
3248
|
super(optionsWithDefaults);
|
|
3249
|
+
if ((options === null || options === void 0 ? void 0 : options.pipeline) && options.pipeline.getOrderedPolicies().length > 0) {
|
|
3250
|
+
const pipelinePolicies = options.pipeline.getOrderedPolicies();
|
|
3251
|
+
const bearerTokenAuthenticationPolicyFound = pipelinePolicies.some((pipelinePolicy) => pipelinePolicy.name ===
|
|
3252
|
+
coreRestPipeline__namespace.bearerTokenAuthenticationPolicyName);
|
|
3253
|
+
if (!bearerTokenAuthenticationPolicyFound) {
|
|
3254
|
+
this.pipeline.removePolicy({
|
|
3255
|
+
name: coreRestPipeline__namespace.bearerTokenAuthenticationPolicyName
|
|
3256
|
+
});
|
|
3257
|
+
this.pipeline.addPolicy(coreRestPipeline__namespace.bearerTokenAuthenticationPolicy({
|
|
3258
|
+
scopes: `${optionsWithDefaults.baseUri}/.default`,
|
|
3259
|
+
challengeCallbacks: {
|
|
3260
|
+
authorizeRequestOnChallenge: coreClient__namespace.authorizeRequestOnClaimChallenge
|
|
3261
|
+
}
|
|
3262
|
+
}));
|
|
3263
|
+
}
|
|
3264
|
+
}
|
|
3226
3265
|
// Parameter assignments
|
|
3227
3266
|
this.subscriptionId = subscriptionId;
|
|
3228
3267
|
// Assigning values to Constant parameters
|
|
3229
3268
|
this.$host = options.$host || "https://management.azure.com";
|
|
3230
|
-
this.apiVersion = options.apiVersion || "
|
|
3269
|
+
this.apiVersion = options.apiVersion || "2022-05-31";
|
|
3231
3270
|
this.digitalTwins = new DigitalTwinsImpl(this);
|
|
3232
3271
|
this.digitalTwinsEndpoint = new DigitalTwinsEndpointImpl(this);
|
|
3233
3272
|
this.operations = new OperationsImpl(this);
|
|
3234
3273
|
this.privateLinkResources = new PrivateLinkResourcesImpl(this);
|
|
3235
3274
|
this.privateEndpointConnections = new PrivateEndpointConnectionsImpl(this);
|
|
3236
3275
|
this.timeSeriesDatabaseConnections = new TimeSeriesDatabaseConnectionsImpl(this);
|
|
3276
|
+
this.addCustomApiVersionPolicy(options.apiVersion);
|
|
3277
|
+
}
|
|
3278
|
+
/** A function that adds a policy that sets the api-version (or equivalent) to reflect the library version. */
|
|
3279
|
+
addCustomApiVersionPolicy(apiVersion) {
|
|
3280
|
+
if (!apiVersion) {
|
|
3281
|
+
return;
|
|
3282
|
+
}
|
|
3283
|
+
const apiVersionPolicy = {
|
|
3284
|
+
name: "CustomApiVersionPolicy",
|
|
3285
|
+
sendRequest(request, next) {
|
|
3286
|
+
return tslib.__awaiter(this, void 0, void 0, function* () {
|
|
3287
|
+
const param = request.url.split("?");
|
|
3288
|
+
if (param.length > 1) {
|
|
3289
|
+
const newParams = param[1].split("&").map((item) => {
|
|
3290
|
+
if (item.indexOf("api-version") > -1) {
|
|
3291
|
+
return item.replace(/(?<==).*$/, apiVersion);
|
|
3292
|
+
}
|
|
3293
|
+
else {
|
|
3294
|
+
return item;
|
|
3295
|
+
}
|
|
3296
|
+
});
|
|
3297
|
+
request.url = param[0] + "?" + newParams.join("&");
|
|
3298
|
+
}
|
|
3299
|
+
return next(request);
|
|
3300
|
+
});
|
|
3301
|
+
}
|
|
3302
|
+
};
|
|
3303
|
+
this.pipeline.addPolicy(apiVersionPolicy);
|
|
3237
3304
|
}
|
|
3238
3305
|
}
|
|
3239
3306
|
|