@azure/arm-devhub 1.0.0-alpha.20230103.1 → 1.0.0-beta.2
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 +8 -11
- package/LICENSE +1 -1
- package/dist/index.js +72 -22
- 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/gitHubOAuthCallbackSample.js +9 -2
- package/dist-esm/samples-dev/gitHubOAuthCallbackSample.js.map +1 -1
- package/dist-esm/samples-dev/gitHubOAuthSample.js +9 -2
- package/dist-esm/samples-dev/gitHubOAuthSample.js.map +1 -1
- package/dist-esm/samples-dev/listGitHubOAuthSample.js +9 -2
- package/dist-esm/samples-dev/listGitHubOAuthSample.js.map +1 -1
- package/dist-esm/samples-dev/operationsListSample.js +10 -2
- package/dist-esm/samples-dev/operationsListSample.js.map +1 -1
- package/dist-esm/samples-dev/workflowCreateOrUpdateSample.js +10 -3
- package/dist-esm/samples-dev/workflowCreateOrUpdateSample.js.map +1 -1
- package/dist-esm/samples-dev/workflowDeleteSample.js +10 -3
- package/dist-esm/samples-dev/workflowDeleteSample.js.map +1 -1
- package/dist-esm/samples-dev/workflowGetSample.js +10 -3
- package/dist-esm/samples-dev/workflowGetSample.js.map +1 -1
- package/dist-esm/samples-dev/workflowListByResourceGroupSample.js +10 -3
- package/dist-esm/samples-dev/workflowListByResourceGroupSample.js.map +1 -1
- package/dist-esm/samples-dev/workflowListSample.js +9 -2
- package/dist-esm/samples-dev/workflowListSample.js.map +1 -1
- package/dist-esm/samples-dev/workflowUpdateTagsSample.js +10 -3
- package/dist-esm/samples-dev/workflowUpdateTagsSample.js.map +1 -1
- package/dist-esm/src/developerHubServiceClient.d.ts.map +1 -1
- package/dist-esm/src/developerHubServiceClient.js +3 -6
- package/dist-esm/src/developerHubServiceClient.js.map +1 -1
- package/dist-esm/src/index.d.ts +1 -0
- package/dist-esm/src/index.d.ts.map +1 -1
- package/dist-esm/src/index.js +1 -0
- package/dist-esm/src/index.js.map +1 -1
- package/dist-esm/src/models/index.d.ts +0 -2
- package/dist-esm/src/models/index.d.ts.map +1 -1
- package/dist-esm/src/operations/workflowOperations.d.ts.map +1 -1
- package/dist-esm/src/operations/workflowOperations.js +37 -16
- package/dist-esm/src/operations/workflowOperations.js.map +1 -1
- package/dist-esm/src/pagingHelper.d.ts +13 -0
- package/dist-esm/src/pagingHelper.d.ts.map +1 -0
- package/dist-esm/src/pagingHelper.js +32 -0
- package/dist-esm/src/pagingHelper.js.map +1 -0
- package/package.json +9 -8
- package/review/arm-devhub.api.md +3 -1
- package/src/developerHubServiceClient.ts +4 -5
- package/src/index.ts +1 -0
- package/src/models/index.ts +1 -4
- package/src/operations/workflowOperations.ts +45 -18
- package/src/pagingHelper.ts +39 -0
- package/types/arm-devhub.d.ts +9 -2
package/CHANGELOG.md
CHANGED
|
@@ -1,15 +1,12 @@
|
|
|
1
1
|
# Release History
|
|
2
|
-
|
|
3
|
-
## 1.0.0-beta.2 (
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
### Other Changes
|
|
12
|
-
|
|
2
|
+
|
|
3
|
+
## 1.0.0-beta.2 (2023-01-04)
|
|
4
|
+
|
|
5
|
+
**Features**
|
|
6
|
+
|
|
7
|
+
- Interface WorkflowListByResourceGroupNextOptionalParams no longer has parameter managedClusterResource
|
|
8
|
+
|
|
9
|
+
|
|
13
10
|
## 1.0.0-beta.1 (2022-10-18)
|
|
14
11
|
|
|
15
12
|
The package of @azure/arm-devhub is using our next generation design principles. To learn more, please refer to our documentation [Quick Start](https://aka.ms/js-track2-quickstart).
|
package/LICENSE
CHANGED
package/dist/index.js
CHANGED
|
@@ -27,6 +27,38 @@ function _interopNamespace(e) {
|
|
|
27
27
|
var coreClient__namespace = /*#__PURE__*/_interopNamespace(coreClient);
|
|
28
28
|
var coreRestPipeline__namespace = /*#__PURE__*/_interopNamespace(coreRestPipeline);
|
|
29
29
|
|
|
30
|
+
/*
|
|
31
|
+
* Copyright (c) Microsoft Corporation.
|
|
32
|
+
* Licensed under the MIT License.
|
|
33
|
+
*
|
|
34
|
+
* Code generated by Microsoft (R) AutoRest Code Generator.
|
|
35
|
+
* Changes may cause incorrect behavior and will be lost if the code is regenerated.
|
|
36
|
+
*/
|
|
37
|
+
const pageMap = new WeakMap();
|
|
38
|
+
/**
|
|
39
|
+
* Given the last `.value` produced by the `byPage` iterator,
|
|
40
|
+
* returns a continuation token that can be used to begin paging from
|
|
41
|
+
* that point later.
|
|
42
|
+
* @param page An object from accessing `value` on the IteratorResult from a `byPage` iterator.
|
|
43
|
+
* @returns The continuation token that can be passed into byPage() during future calls.
|
|
44
|
+
*/
|
|
45
|
+
function getContinuationToken(page) {
|
|
46
|
+
var _a;
|
|
47
|
+
if (typeof page !== "object" || page === null) {
|
|
48
|
+
return undefined;
|
|
49
|
+
}
|
|
50
|
+
return (_a = pageMap.get(page)) === null || _a === void 0 ? void 0 : _a.continuationToken;
|
|
51
|
+
}
|
|
52
|
+
function setContinuationToken(page, continuationToken) {
|
|
53
|
+
var _a;
|
|
54
|
+
if (typeof page !== "object" || page === null || !continuationToken) {
|
|
55
|
+
return;
|
|
56
|
+
}
|
|
57
|
+
const pageInfo = (_a = pageMap.get(page)) !== null && _a !== void 0 ? _a : {};
|
|
58
|
+
pageInfo.continuationToken = continuationToken;
|
|
59
|
+
pageMap.set(page, pageInfo);
|
|
60
|
+
}
|
|
61
|
+
|
|
30
62
|
/*
|
|
31
63
|
* Copyright (c) Microsoft Corporation.
|
|
32
64
|
* Licensed under the MIT License.
|
|
@@ -991,20 +1023,31 @@ class WorkflowOperationsImpl {
|
|
|
991
1023
|
[Symbol.asyncIterator]() {
|
|
992
1024
|
return this;
|
|
993
1025
|
},
|
|
994
|
-
byPage: () => {
|
|
995
|
-
|
|
1026
|
+
byPage: (settings) => {
|
|
1027
|
+
if (settings === null || settings === void 0 ? void 0 : settings.maxPageSize) {
|
|
1028
|
+
throw new Error("maxPageSize is not supported by this operation.");
|
|
1029
|
+
}
|
|
1030
|
+
return this.listPagingPage(options, settings);
|
|
996
1031
|
}
|
|
997
1032
|
};
|
|
998
1033
|
}
|
|
999
|
-
listPagingPage(options) {
|
|
1034
|
+
listPagingPage(options, settings) {
|
|
1000
1035
|
return tslib.__asyncGenerator(this, arguments, function* listPagingPage_1() {
|
|
1001
|
-
let result
|
|
1002
|
-
|
|
1003
|
-
|
|
1036
|
+
let result;
|
|
1037
|
+
let continuationToken = settings === null || settings === void 0 ? void 0 : settings.continuationToken;
|
|
1038
|
+
if (!continuationToken) {
|
|
1039
|
+
result = yield tslib.__await(this._list(options));
|
|
1040
|
+
let page = result.value || [];
|
|
1041
|
+
continuationToken = result.nextLink;
|
|
1042
|
+
setContinuationToken(page, continuationToken);
|
|
1043
|
+
yield yield tslib.__await(page);
|
|
1044
|
+
}
|
|
1004
1045
|
while (continuationToken) {
|
|
1005
1046
|
result = yield tslib.__await(this._listNext(continuationToken, options));
|
|
1006
1047
|
continuationToken = result.nextLink;
|
|
1007
|
-
|
|
1048
|
+
let page = result.value || [];
|
|
1049
|
+
setContinuationToken(page, continuationToken);
|
|
1050
|
+
yield yield tslib.__await(page);
|
|
1008
1051
|
}
|
|
1009
1052
|
});
|
|
1010
1053
|
}
|
|
@@ -1040,20 +1083,31 @@ class WorkflowOperationsImpl {
|
|
|
1040
1083
|
[Symbol.asyncIterator]() {
|
|
1041
1084
|
return this;
|
|
1042
1085
|
},
|
|
1043
|
-
byPage: () => {
|
|
1044
|
-
|
|
1086
|
+
byPage: (settings) => {
|
|
1087
|
+
if (settings === null || settings === void 0 ? void 0 : settings.maxPageSize) {
|
|
1088
|
+
throw new Error("maxPageSize is not supported by this operation.");
|
|
1089
|
+
}
|
|
1090
|
+
return this.listByResourceGroupPagingPage(resourceGroupName, options, settings);
|
|
1045
1091
|
}
|
|
1046
1092
|
};
|
|
1047
1093
|
}
|
|
1048
|
-
listByResourceGroupPagingPage(resourceGroupName, options) {
|
|
1094
|
+
listByResourceGroupPagingPage(resourceGroupName, options, settings) {
|
|
1049
1095
|
return tslib.__asyncGenerator(this, arguments, function* listByResourceGroupPagingPage_1() {
|
|
1050
|
-
let result
|
|
1051
|
-
|
|
1052
|
-
|
|
1096
|
+
let result;
|
|
1097
|
+
let continuationToken = settings === null || settings === void 0 ? void 0 : settings.continuationToken;
|
|
1098
|
+
if (!continuationToken) {
|
|
1099
|
+
result = yield tslib.__await(this._listByResourceGroup(resourceGroupName, options));
|
|
1100
|
+
let page = result.value || [];
|
|
1101
|
+
continuationToken = result.nextLink;
|
|
1102
|
+
setContinuationToken(page, continuationToken);
|
|
1103
|
+
yield yield tslib.__await(page);
|
|
1104
|
+
}
|
|
1053
1105
|
while (continuationToken) {
|
|
1054
1106
|
result = yield tslib.__await(this._listByResourceGroupNext(resourceGroupName, continuationToken, options));
|
|
1055
1107
|
continuationToken = result.nextLink;
|
|
1056
|
-
|
|
1108
|
+
let page = result.value || [];
|
|
1109
|
+
setContinuationToken(page, continuationToken);
|
|
1110
|
+
yield yield tslib.__await(page);
|
|
1057
1111
|
}
|
|
1058
1112
|
});
|
|
1059
1113
|
}
|
|
@@ -1287,7 +1341,6 @@ const listNextOperationSpec = {
|
|
|
1287
1341
|
bodyMapper: ErrorResponse
|
|
1288
1342
|
}
|
|
1289
1343
|
},
|
|
1290
|
-
queryParameters: [apiVersion],
|
|
1291
1344
|
urlParameters: [
|
|
1292
1345
|
$host,
|
|
1293
1346
|
subscriptionId,
|
|
@@ -1307,7 +1360,6 @@ const listByResourceGroupNextOperationSpec = {
|
|
|
1307
1360
|
bodyMapper: ErrorResponse
|
|
1308
1361
|
}
|
|
1309
1362
|
},
|
|
1310
|
-
queryParameters: [apiVersion, managedClusterResource],
|
|
1311
1363
|
urlParameters: [
|
|
1312
1364
|
$host,
|
|
1313
1365
|
subscriptionId,
|
|
@@ -1333,7 +1385,7 @@ class DeveloperHubServiceClient extends coreClient__namespace.ServiceClient {
|
|
|
1333
1385
|
* @param options The parameter options
|
|
1334
1386
|
*/
|
|
1335
1387
|
constructor(credentials, subscriptionId, options) {
|
|
1336
|
-
var _a, _b;
|
|
1388
|
+
var _a, _b, _c;
|
|
1337
1389
|
if (credentials === undefined) {
|
|
1338
1390
|
throw new Error("'credentials' cannot be null");
|
|
1339
1391
|
}
|
|
@@ -1352,12 +1404,9 @@ class DeveloperHubServiceClient extends coreClient__namespace.ServiceClient {
|
|
|
1352
1404
|
const userAgentPrefix = options.userAgentOptions && options.userAgentOptions.userAgentPrefix
|
|
1353
1405
|
? `${options.userAgentOptions.userAgentPrefix} ${packageDetails}`
|
|
1354
1406
|
: `${packageDetails}`;
|
|
1355
|
-
if (!options.credentialScopes) {
|
|
1356
|
-
options.credentialScopes = ["https://management.azure.com/.default"];
|
|
1357
|
-
}
|
|
1358
1407
|
const optionsWithDefaults = Object.assign(Object.assign(Object.assign({}, defaults), options), { userAgentOptions: {
|
|
1359
1408
|
userAgentPrefix
|
|
1360
|
-
},
|
|
1409
|
+
}, endpoint: (_b = (_a = options.endpoint) !== null && _a !== void 0 ? _a : options.baseUri) !== null && _b !== void 0 ? _b : "https://management.azure.com" });
|
|
1361
1410
|
super(optionsWithDefaults);
|
|
1362
1411
|
let bearerTokenAuthenticationPolicyFound = false;
|
|
1363
1412
|
if ((options === null || options === void 0 ? void 0 : options.pipeline) && options.pipeline.getOrderedPolicies().length > 0) {
|
|
@@ -1374,7 +1423,7 @@ class DeveloperHubServiceClient extends coreClient__namespace.ServiceClient {
|
|
|
1374
1423
|
});
|
|
1375
1424
|
this.pipeline.addPolicy(coreRestPipeline__namespace.bearerTokenAuthenticationPolicy({
|
|
1376
1425
|
credential: credentials,
|
|
1377
|
-
scopes: `${optionsWithDefaults.
|
|
1426
|
+
scopes: (_c = optionsWithDefaults.credentialScopes) !== null && _c !== void 0 ? _c : `${optionsWithDefaults.endpoint}/.default`,
|
|
1378
1427
|
challengeCallbacks: {
|
|
1379
1428
|
authorizeRequestOnChallenge: coreClient__namespace.authorizeRequestOnClaimChallenge
|
|
1380
1429
|
}
|
|
@@ -1509,4 +1558,5 @@ const listGitHubOAuthOperationSpec = {
|
|
|
1509
1558
|
};
|
|
1510
1559
|
|
|
1511
1560
|
exports.DeveloperHubServiceClient = DeveloperHubServiceClient;
|
|
1561
|
+
exports.getContinuationToken = getContinuationToken;
|
|
1512
1562
|
//# sourceMappingURL=index.js.map
|