@azure/arm-powerbiembedded 2.0.0 → 2.0.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/CHANGELOG.md +6 -0
- package/README.md +11 -0
- package/dist/index.js +65 -18
- 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/src/operations/workspaceCollections.d.ts.map +1 -1
- package/dist-esm/src/operations/workspaceCollections.js +3 -1
- package/dist-esm/src/operations/workspaceCollections.js.map +1 -1
- package/dist-esm/src/powerBIEmbeddedManagementClient.d.ts.map +1 -1
- package/dist-esm/src/powerBIEmbeddedManagementClient.js +20 -2
- package/dist-esm/src/powerBIEmbeddedManagementClient.js.map +1 -1
- package/package.json +24 -14
- package/rollup.config.js +6 -72
- package/src/operations/workspaceCollections.ts +3 -1
- package/src/powerBIEmbeddedManagementClient.ts +27 -2
- package/tsconfig.json +18 -5
- package/types/tsdoc-metadata.json +1 -1
- package/LICENSE.txt +0 -21
package/CHANGELOG.md
CHANGED
package/README.md
CHANGED
|
@@ -16,6 +16,8 @@ Client to manage your Power BI Embedded workspace collections and retrieve works
|
|
|
16
16
|
- [LTS versions of Node.js](https://nodejs.org/about/releases/)
|
|
17
17
|
- Latest versions of Safari, Chrome, Edge and Firefox.
|
|
18
18
|
|
|
19
|
+
See our [support policy](https://github.com/Azure/azure-sdk-for-js/blob/main/SUPPORT.md) for more details.
|
|
20
|
+
|
|
19
21
|
### Prerequisites
|
|
20
22
|
|
|
21
23
|
- An [Azure subscription][azure_sub].
|
|
@@ -49,8 +51,17 @@ For more information about how to create an Azure AD Application check out [this
|
|
|
49
51
|
```javascript
|
|
50
52
|
const { PowerBIEmbeddedManagementClient } = require("@azure/arm-powerbiembedded");
|
|
51
53
|
const { DefaultAzureCredential } = require("@azure/identity");
|
|
54
|
+
// For client-side applications running in the browser, use InteractiveBrowserCredential instead of DefaultAzureCredential. See https://aka.ms/azsdk/js/identity/examples for more details.
|
|
55
|
+
|
|
52
56
|
const subscriptionId = "00000000-0000-0000-0000-000000000000";
|
|
53
57
|
const client = new PowerBIEmbeddedManagementClient(new DefaultAzureCredential(), subscriptionId);
|
|
58
|
+
|
|
59
|
+
// For client-side applications running in the browser, use this code instead:
|
|
60
|
+
// const credential = new InteractiveBrowserCredential({
|
|
61
|
+
// tenantId: "<YOUR_TENANT_ID>",
|
|
62
|
+
// clientId: "<YOUR_CLIENT_ID>"
|
|
63
|
+
// });
|
|
64
|
+
// const client = new PowerBIEmbeddedManagementClient(credential, subscriptionId);
|
|
54
65
|
```
|
|
55
66
|
|
|
56
67
|
|
package/dist/index.js
CHANGED
|
@@ -3,9 +3,31 @@
|
|
|
3
3
|
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
4
|
|
|
5
5
|
var coreClient = require('@azure/core-client');
|
|
6
|
+
var coreRestPipeline = require('@azure/core-rest-pipeline');
|
|
6
7
|
var tslib = require('tslib');
|
|
7
8
|
var coreLro = require('@azure/core-lro');
|
|
8
9
|
|
|
10
|
+
function _interopNamespace(e) {
|
|
11
|
+
if (e && e.__esModule) return e;
|
|
12
|
+
var n = Object.create(null);
|
|
13
|
+
if (e) {
|
|
14
|
+
Object.keys(e).forEach(function (k) {
|
|
15
|
+
if (k !== 'default') {
|
|
16
|
+
var d = Object.getOwnPropertyDescriptor(e, k);
|
|
17
|
+
Object.defineProperty(n, k, d.get ? d : {
|
|
18
|
+
enumerable: true,
|
|
19
|
+
get: function () { return e[k]; }
|
|
20
|
+
});
|
|
21
|
+
}
|
|
22
|
+
});
|
|
23
|
+
}
|
|
24
|
+
n["default"] = e;
|
|
25
|
+
return Object.freeze(n);
|
|
26
|
+
}
|
|
27
|
+
|
|
28
|
+
var coreClient__namespace = /*#__PURE__*/_interopNamespace(coreClient);
|
|
29
|
+
var coreRestPipeline__namespace = /*#__PURE__*/_interopNamespace(coreRestPipeline);
|
|
30
|
+
|
|
9
31
|
/*
|
|
10
32
|
* Copyright (c) Microsoft Corporation.
|
|
11
33
|
* Licensed under the MIT License.
|
|
@@ -13,12 +35,18 @@ var coreLro = require('@azure/core-lro');
|
|
|
13
35
|
* Code generated by Microsoft (R) AutoRest Code Generator.
|
|
14
36
|
* Changes may cause incorrect behavior and will be lost if the code is regenerated.
|
|
15
37
|
*/
|
|
38
|
+
/** Known values of {@link AzureSkuName} that the service accepts. */
|
|
39
|
+
exports.KnownAzureSkuName = void 0;
|
|
16
40
|
(function (KnownAzureSkuName) {
|
|
17
41
|
KnownAzureSkuName["S1"] = "S1";
|
|
18
42
|
})(exports.KnownAzureSkuName || (exports.KnownAzureSkuName = {}));
|
|
43
|
+
/** Known values of {@link AzureSkuTier} that the service accepts. */
|
|
44
|
+
exports.KnownAzureSkuTier = void 0;
|
|
19
45
|
(function (KnownAzureSkuTier) {
|
|
20
46
|
KnownAzureSkuTier["Standard"] = "Standard";
|
|
21
47
|
})(exports.KnownAzureSkuTier || (exports.KnownAzureSkuTier = {}));
|
|
48
|
+
/** Known values of {@link CheckNameReason} that the service accepts. */
|
|
49
|
+
exports.KnownCheckNameReason = void 0;
|
|
22
50
|
(function (KnownCheckNameReason) {
|
|
23
51
|
KnownCheckNameReason["Unavailable"] = "Unavailable";
|
|
24
52
|
KnownCheckNameReason["Invalid"] = "Invalid";
|
|
@@ -805,10 +833,12 @@ class WorkspaceCollectionsImpl {
|
|
|
805
833
|
};
|
|
806
834
|
});
|
|
807
835
|
const lro = new LroImpl(sendOperation, { resourceGroupName, workspaceCollectionName, options }, deleteOperationSpec);
|
|
808
|
-
|
|
836
|
+
const poller = new coreLro.LroEngine(lro, {
|
|
809
837
|
resumeFrom: options === null || options === void 0 ? void 0 : options.resumeFrom,
|
|
810
838
|
intervalInMs: options === null || options === void 0 ? void 0 : options.updateIntervalInMs
|
|
811
839
|
});
|
|
840
|
+
yield poller.poll();
|
|
841
|
+
return poller;
|
|
812
842
|
});
|
|
813
843
|
}
|
|
814
844
|
/**
|
|
@@ -878,7 +908,7 @@ class WorkspaceCollectionsImpl {
|
|
|
878
908
|
}
|
|
879
909
|
}
|
|
880
910
|
// Operation Specifications
|
|
881
|
-
const serializer =
|
|
911
|
+
const serializer$2 = coreClient__namespace.createSerializer(Mappers, /* isXml */ false);
|
|
882
912
|
const getByNameOperationSpec = {
|
|
883
913
|
path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.PowerBI/workspaceCollections/{workspaceCollectionName}",
|
|
884
914
|
httpMethod: "GET",
|
|
@@ -898,7 +928,7 @@ const getByNameOperationSpec = {
|
|
|
898
928
|
workspaceCollectionName
|
|
899
929
|
],
|
|
900
930
|
headerParameters: [accept],
|
|
901
|
-
serializer
|
|
931
|
+
serializer: serializer$2
|
|
902
932
|
};
|
|
903
933
|
const createOperationSpec = {
|
|
904
934
|
path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.PowerBI/workspaceCollections/{workspaceCollectionName}",
|
|
@@ -921,7 +951,7 @@ const createOperationSpec = {
|
|
|
921
951
|
],
|
|
922
952
|
headerParameters: [accept, contentType],
|
|
923
953
|
mediaType: "json",
|
|
924
|
-
serializer
|
|
954
|
+
serializer: serializer$2
|
|
925
955
|
};
|
|
926
956
|
const updateOperationSpec = {
|
|
927
957
|
path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.PowerBI/workspaceCollections/{workspaceCollectionName}",
|
|
@@ -944,7 +974,7 @@ const updateOperationSpec = {
|
|
|
944
974
|
],
|
|
945
975
|
headerParameters: [accept, contentType],
|
|
946
976
|
mediaType: "json",
|
|
947
|
-
serializer
|
|
977
|
+
serializer: serializer$2
|
|
948
978
|
};
|
|
949
979
|
const deleteOperationSpec = {
|
|
950
980
|
path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.PowerBI/workspaceCollections/{workspaceCollectionName}",
|
|
@@ -966,7 +996,7 @@ const deleteOperationSpec = {
|
|
|
966
996
|
workspaceCollectionName
|
|
967
997
|
],
|
|
968
998
|
headerParameters: [accept],
|
|
969
|
-
serializer
|
|
999
|
+
serializer: serializer$2
|
|
970
1000
|
};
|
|
971
1001
|
const checkNameAvailabilityOperationSpec = {
|
|
972
1002
|
path: "/subscriptions/{subscriptionId}/providers/Microsoft.PowerBI/locations/{location}/checkNameAvailability",
|
|
@@ -988,7 +1018,7 @@ const checkNameAvailabilityOperationSpec = {
|
|
|
988
1018
|
],
|
|
989
1019
|
headerParameters: [accept, contentType],
|
|
990
1020
|
mediaType: "json",
|
|
991
|
-
serializer
|
|
1021
|
+
serializer: serializer$2
|
|
992
1022
|
};
|
|
993
1023
|
const listByResourceGroupOperationSpec = {
|
|
994
1024
|
path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.PowerBI/workspaceCollections",
|
|
@@ -1008,7 +1038,7 @@ const listByResourceGroupOperationSpec = {
|
|
|
1008
1038
|
resourceGroupName
|
|
1009
1039
|
],
|
|
1010
1040
|
headerParameters: [accept],
|
|
1011
|
-
serializer
|
|
1041
|
+
serializer: serializer$2
|
|
1012
1042
|
};
|
|
1013
1043
|
const listBySubscriptionOperationSpec = {
|
|
1014
1044
|
path: "/subscriptions/{subscriptionId}/providers/Microsoft.PowerBI/workspaceCollections",
|
|
@@ -1024,7 +1054,7 @@ const listBySubscriptionOperationSpec = {
|
|
|
1024
1054
|
queryParameters: [apiVersion],
|
|
1025
1055
|
urlParameters: [$host, subscriptionId],
|
|
1026
1056
|
headerParameters: [accept],
|
|
1027
|
-
serializer
|
|
1057
|
+
serializer: serializer$2
|
|
1028
1058
|
};
|
|
1029
1059
|
const getAccessKeysOperationSpec = {
|
|
1030
1060
|
path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.PowerBI/workspaceCollections/{workspaceCollectionName}/listKeys",
|
|
@@ -1045,7 +1075,7 @@ const getAccessKeysOperationSpec = {
|
|
|
1045
1075
|
workspaceCollectionName
|
|
1046
1076
|
],
|
|
1047
1077
|
headerParameters: [accept],
|
|
1048
|
-
serializer
|
|
1078
|
+
serializer: serializer$2
|
|
1049
1079
|
};
|
|
1050
1080
|
const regenerateKeyOperationSpec = {
|
|
1051
1081
|
path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.PowerBI/workspaceCollections/{workspaceCollectionName}/regenerateKey",
|
|
@@ -1068,7 +1098,7 @@ const regenerateKeyOperationSpec = {
|
|
|
1068
1098
|
],
|
|
1069
1099
|
headerParameters: [accept, contentType],
|
|
1070
1100
|
mediaType: "json",
|
|
1071
|
-
serializer
|
|
1101
|
+
serializer: serializer$2
|
|
1072
1102
|
};
|
|
1073
1103
|
const migrateOperationSpec = {
|
|
1074
1104
|
path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/moveResources",
|
|
@@ -1088,7 +1118,7 @@ const migrateOperationSpec = {
|
|
|
1088
1118
|
],
|
|
1089
1119
|
headerParameters: [accept, contentType],
|
|
1090
1120
|
mediaType: "json",
|
|
1091
|
-
serializer
|
|
1121
|
+
serializer: serializer$2
|
|
1092
1122
|
};
|
|
1093
1123
|
|
|
1094
1124
|
/*
|
|
@@ -1163,7 +1193,7 @@ class WorkspacesImpl {
|
|
|
1163
1193
|
}
|
|
1164
1194
|
}
|
|
1165
1195
|
// Operation Specifications
|
|
1166
|
-
const serializer$1 =
|
|
1196
|
+
const serializer$1 = coreClient__namespace.createSerializer(Mappers, /* isXml */ false);
|
|
1167
1197
|
const listOperationSpec = {
|
|
1168
1198
|
path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.PowerBI/workspaceCollections/{workspaceCollectionName}/workspaces",
|
|
1169
1199
|
httpMethod: "GET",
|
|
@@ -1193,7 +1223,7 @@ const listOperationSpec = {
|
|
|
1193
1223
|
* Code generated by Microsoft (R) AutoRest Code Generator.
|
|
1194
1224
|
* Changes may cause incorrect behavior and will be lost if the code is regenerated.
|
|
1195
1225
|
*/
|
|
1196
|
-
class PowerBIEmbeddedManagementClient extends
|
|
1226
|
+
class PowerBIEmbeddedManagementClient extends coreClient__namespace.ServiceClient {
|
|
1197
1227
|
/**
|
|
1198
1228
|
* Initializes a new instance of the PowerBIEmbeddedManagementClient class.
|
|
1199
1229
|
* @param credentials Subscription credentials which uniquely identify client subscription.
|
|
@@ -1202,6 +1232,7 @@ class PowerBIEmbeddedManagementClient extends coreClient.ServiceClient {
|
|
|
1202
1232
|
* @param options The parameter options
|
|
1203
1233
|
*/
|
|
1204
1234
|
constructor(credentials, subscriptionId, options) {
|
|
1235
|
+
var _a, _b;
|
|
1205
1236
|
if (credentials === undefined) {
|
|
1206
1237
|
throw new Error("'credentials' cannot be null");
|
|
1207
1238
|
}
|
|
@@ -1216,7 +1247,7 @@ class PowerBIEmbeddedManagementClient extends coreClient.ServiceClient {
|
|
|
1216
1247
|
requestContentType: "application/json; charset=utf-8",
|
|
1217
1248
|
credential: credentials
|
|
1218
1249
|
};
|
|
1219
|
-
const packageDetails = `azsdk-js-arm-powerbiembedded/2.0.
|
|
1250
|
+
const packageDetails = `azsdk-js-arm-powerbiembedded/2.0.1`;
|
|
1220
1251
|
const userAgentPrefix = options.userAgentOptions && options.userAgentOptions.userAgentPrefix
|
|
1221
1252
|
? `${options.userAgentOptions.userAgentPrefix} ${packageDetails}`
|
|
1222
1253
|
: `${packageDetails}`;
|
|
@@ -1225,8 +1256,24 @@ class PowerBIEmbeddedManagementClient extends coreClient.ServiceClient {
|
|
|
1225
1256
|
}
|
|
1226
1257
|
const optionsWithDefaults = Object.assign(Object.assign(Object.assign({}, defaults), options), { userAgentOptions: {
|
|
1227
1258
|
userAgentPrefix
|
|
1228
|
-
}, baseUri: options.endpoint
|
|
1259
|
+
}, baseUri: (_b = (_a = options.endpoint) !== null && _a !== void 0 ? _a : options.baseUri) !== null && _b !== void 0 ? _b : "https://management.azure.com" });
|
|
1229
1260
|
super(optionsWithDefaults);
|
|
1261
|
+
if ((options === null || options === void 0 ? void 0 : options.pipeline) && options.pipeline.getOrderedPolicies().length > 0) {
|
|
1262
|
+
const pipelinePolicies = options.pipeline.getOrderedPolicies();
|
|
1263
|
+
const bearerTokenAuthenticationPolicyFound = pipelinePolicies.some((pipelinePolicy) => pipelinePolicy.name ===
|
|
1264
|
+
coreRestPipeline__namespace.bearerTokenAuthenticationPolicyName);
|
|
1265
|
+
if (!bearerTokenAuthenticationPolicyFound) {
|
|
1266
|
+
this.pipeline.removePolicy({
|
|
1267
|
+
name: coreRestPipeline__namespace.bearerTokenAuthenticationPolicyName
|
|
1268
|
+
});
|
|
1269
|
+
this.pipeline.addPolicy(coreRestPipeline__namespace.bearerTokenAuthenticationPolicy({
|
|
1270
|
+
scopes: `${optionsWithDefaults.baseUri}/.default`,
|
|
1271
|
+
challengeCallbacks: {
|
|
1272
|
+
authorizeRequestOnChallenge: coreClient__namespace.authorizeRequestOnClaimChallenge
|
|
1273
|
+
}
|
|
1274
|
+
}));
|
|
1275
|
+
}
|
|
1276
|
+
}
|
|
1230
1277
|
// Parameter assignments
|
|
1231
1278
|
this.subscriptionId = subscriptionId;
|
|
1232
1279
|
// Assigning values to Constant parameters
|
|
@@ -1244,7 +1291,7 @@ class PowerBIEmbeddedManagementClient extends coreClient.ServiceClient {
|
|
|
1244
1291
|
}
|
|
1245
1292
|
}
|
|
1246
1293
|
// Operation Specifications
|
|
1247
|
-
const serializer
|
|
1294
|
+
const serializer = coreClient__namespace.createSerializer(Mappers, /* isXml */ false);
|
|
1248
1295
|
const getAvailableOperationsOperationSpec = {
|
|
1249
1296
|
path: "/providers/Microsoft.PowerBI/operations",
|
|
1250
1297
|
httpMethod: "GET",
|
|
@@ -1259,7 +1306,7 @@ const getAvailableOperationsOperationSpec = {
|
|
|
1259
1306
|
queryParameters: [apiVersion],
|
|
1260
1307
|
urlParameters: [$host],
|
|
1261
1308
|
headerParameters: [accept],
|
|
1262
|
-
serializer
|
|
1309
|
+
serializer
|
|
1263
1310
|
};
|
|
1264
1311
|
|
|
1265
1312
|
exports.PowerBIEmbeddedManagementClient = PowerBIEmbeddedManagementClient;
|