@pnp/cli-microsoft365 6.3.0-beta.fee5cdb → 6.4.0-beta.aacf728
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/.eslintrc.js +1 -0
- package/dist/appInsights.js +2 -1
- package/dist/cli/Cli.js +70 -2
- package/dist/m365/aad/commands/license/license-list.js +41 -0
- package/dist/m365/aad/commands/user/user-add.js +223 -0
- package/dist/m365/aad/commands/user/user-license-add.js +88 -0
- package/dist/m365/aad/commands/user/user-license-list.js +99 -0
- package/dist/m365/aad/commands/user/user-license-remove.js +115 -0
- package/dist/m365/aad/commands/user/user-recyclebinitem-clear.js +1 -1
- package/dist/m365/aad/commands/user/user-recyclebinitem-list.js +41 -0
- package/dist/m365/aad/commands/user/user-recyclebinitem-remove.js +92 -0
- package/dist/m365/aad/commands/user/user-recyclebinitem-restore.js +70 -0
- package/dist/m365/aad/commands/user/user-remove.js +107 -0
- package/dist/m365/aad/commands.js +9 -0
- package/dist/m365/flow/commands/environment/FlowEnvironmentDetails.js +3 -0
- package/dist/m365/flow/commands/environment/environment-get.js +26 -11
- package/dist/m365/flow/commands/flow-disable.js +9 -2
- package/dist/m365/flow/commands/flow-enable.js +9 -2
- package/dist/m365/flow/commands/flow-get.js +9 -2
- package/dist/m365/flow/commands/flow-list.js +1 -1
- package/dist/m365/flow/commands/flow-remove.js +2 -2
- package/dist/m365/flow/commands/owner/owner-list.js +89 -0
- package/dist/m365/flow/commands/run/run-cancel.js +9 -2
- package/dist/m365/flow/commands.js +1 -0
- package/dist/m365/pp/commands/environment/environment-get.js +18 -9
- package/dist/m365/spo/commands/file/file-move.js +0 -2
- package/dist/m365/spo/commands/folder/folder-copy.js +0 -2
- package/dist/m365/spo/commands/folder/folder-move.js +0 -2
- package/dist/m365/spo/commands/site/site-add.js +0 -3
- package/dist/m365/spo/commands/site/site-remove.js +0 -3
- package/dist/m365/spo/commands/site/site-set.js +0 -2
- package/dist/m365/spo/commands/tenant/tenant-recyclebinitem-remove.js +0 -1
- package/dist/m365/teams/commands/team/team-add.js +3 -8
- package/dist/utils/session.js +18 -0
- package/dist/utils/spo.js +3 -12
- package/docs/docs/cmd/aad/license/license-list.md +87 -0
- package/docs/docs/cmd/aad/user/user-add.md +168 -0
- package/docs/docs/cmd/aad/user/user-license-add.md +108 -0
- package/docs/docs/cmd/aad/user/user-license-list.md +98 -0
- package/docs/docs/cmd/aad/user/user-license-remove.md +43 -0
- package/docs/docs/cmd/aad/user/user-recyclebinitem-clear.md +1 -1
- package/docs/docs/cmd/aad/user/user-recyclebinitem-list.md +82 -0
- package/docs/docs/cmd/aad/user/user-recyclebinitem-remove.md +45 -0
- package/docs/docs/cmd/aad/user/user-recyclebinitem-restore.md +99 -0
- package/docs/docs/cmd/aad/user/user-remove.md +51 -0
- package/docs/docs/cmd/aad/user/user-set.md +1 -1
- package/docs/docs/cmd/flow/environment/environment-get.md +31 -3
- package/docs/docs/cmd/flow/owner/owner-list.md +90 -0
- package/docs/docs/cmd/spo/homesite/homesite-get.md +20 -1
- package/docs/docs/cmd/spo/homesite/homesite-remove.md +8 -2
- package/docs/docs/cmd/spo/homesite/homesite-set.md +8 -2
- package/docs/docs/cmd/spo/hubsite/hubsite-connect.md +9 -9
- package/docs/docs/cmd/spo/hubsite/hubsite-data-get.md +34 -5
- package/docs/docs/cmd/spo/hubsite/hubsite-disconnect.md +6 -6
- package/docs/docs/cmd/spo/hubsite/hubsite-get.md +36 -19
- package/docs/docs/cmd/spo/hubsite/hubsite-list.md +59 -1
- package/docs/docs/cmd/spo/hubsite/hubsite-register.md +30 -1
- package/docs/docs/cmd/spo/hubsite/hubsite-rights-grant.md +6 -6
- package/docs/docs/cmd/spo/hubsite/hubsite-rights-revoke.md +4 -4
- package/docs/docs/cmd/spo/hubsite/hubsite-set.md +40 -15
- package/docs/docs/cmd/spo/hubsite/hubsite-unregister.md +4 -4
- package/docs/docs/cmd/spo/knowledgehub/knowledgehub-get.md +7 -1
- package/docs/docs/cmd/spo/knowledgehub/knowledgehub-remove.md +9 -3
- package/docs/docs/cmd/spo/knowledgehub/knowledgehub-set.md +8 -2
- package/docs/docs/cmd/spo/list/list-add.md +123 -57
- package/docs/docs/cmd/spo/list/list-contenttype-add.md +50 -5
- package/docs/docs/cmd/spo/list/list-contenttype-default-set.md +4 -4
- package/docs/docs/cmd/spo/list/list-contenttype-list.md +49 -4
- package/docs/docs/cmd/spo/list/list-contenttype-remove.md +6 -6
- package/docs/docs/cmd/spo/list/list-get.md +70 -4
- package/docs/docs/cmd/spo/list/list-list.md +70 -2
- package/docs/docs/cmd/spo/list/list-remove.md +6 -6
- package/docs/docs/cmd/spo/list/list-retentionlabel-ensure.md +2 -2
- package/docs/docs/cmd/spo/list/list-retentionlabel-get.md +36 -3
- package/docs/docs/cmd/spo/list/list-retentionlabel-remove.md +3 -3
- package/docs/docs/cmd/spo/list/list-roleassignment-add.md +6 -6
- package/docs/docs/cmd/spo/list/list-roleassignment-remove.md +3 -3
- package/docs/docs/cmd/spo/list/list-roleinheritance-break.md +9 -9
- package/docs/docs/cmd/spo/list/list-roleinheritance-reset.md +7 -7
- package/docs/docs/cmd/spo/list/list-set.md +61 -61
- package/docs/docs/cmd/spo/list/list-sitescript-get.md +35 -3
- package/docs/docs/cmd/spo/list/list-view-add.md +66 -5
- package/docs/docs/cmd/spo/list/list-view-field-add.md +10 -10
- package/docs/docs/cmd/spo/list/list-view-get.md +61 -0
- package/docs/docs/cmd/spo/list/list-view-list.md +61 -0
- package/docs/docs/cmd/spo/list/list-view-set.md +1 -1
- package/docs/docs/cmd/spo/list/list-webhook-add.md +19 -0
- package/docs/docs/cmd/spo/list/list-webhook-get.md +19 -0
- package/docs/docs/cmd/spo/list/list-webhook-list.md +19 -0
- package/docs/docs/cmd/spo/listitem/listitem-add.md +29 -0
- package/docs/docs/cmd/spo/listitem/listitem-attachment-list.md +17 -2
- package/docs/docs/cmd/spo/listitem/listitem-get.md +57 -0
- package/docs/docs/cmd/spo/listitem/listitem-isrecord.md +6 -0
- package/docs/docs/cmd/spo/listitem/listitem-list.md +28 -0
- package/docs/docs/cmd/spo/listitem/listitem-record-declare.md +15 -0
- package/docs/docs/cmd/spo/listitem/listitem-set.md +30 -0
- package/docs/docs/cmd/spo/navigation/navigation-node-add.md +22 -0
- package/npm-shrinkwrap.json +3 -2
- package/package.json +2 -1
|
@@ -82,8 +82,8 @@ class FlowRemoveCommand extends AzmgmtCommand_1.default {
|
|
|
82
82
|
_FlowRemoveCommand_instances = new WeakSet(), _FlowRemoveCommand_initTelemetry = function _FlowRemoveCommand_initTelemetry() {
|
|
83
83
|
this.telemetry.push((args) => {
|
|
84
84
|
Object.assign(this.telemetryProperties, {
|
|
85
|
-
asAdmin:
|
|
86
|
-
confirm:
|
|
85
|
+
asAdmin: !!args.options.asAdmin,
|
|
86
|
+
confirm: !!args.options.confirm
|
|
87
87
|
});
|
|
88
88
|
});
|
|
89
89
|
}, _FlowRemoveCommand_initOptions = function _FlowRemoveCommand_initOptions() {
|
|
@@ -0,0 +1,89 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
|
|
3
|
+
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
|
4
|
+
return new (P || (P = Promise))(function (resolve, reject) {
|
|
5
|
+
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
|
6
|
+
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
|
|
7
|
+
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
|
|
8
|
+
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
9
|
+
});
|
|
10
|
+
};
|
|
11
|
+
var __classPrivateFieldGet = (this && this.__classPrivateFieldGet) || function (receiver, state, kind, f) {
|
|
12
|
+
if (kind === "a" && !f) throw new TypeError("Private accessor was defined without a getter");
|
|
13
|
+
if (typeof state === "function" ? receiver !== state || !f : !state.has(receiver)) throw new TypeError("Cannot read private member from an object whose class did not declare it");
|
|
14
|
+
return kind === "m" ? f : kind === "a" ? f.call(receiver) : f ? f.value : state.get(receiver);
|
|
15
|
+
};
|
|
16
|
+
var _FlowOwnerListCommand_instances, _FlowOwnerListCommand_initTelemetry, _FlowOwnerListCommand_initOptions, _FlowOwnerListCommand_initValidators;
|
|
17
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
18
|
+
const Cli_1 = require("../../../../cli/Cli");
|
|
19
|
+
const formatting_1 = require("../../../../utils/formatting");
|
|
20
|
+
const odata_1 = require("../../../../utils/odata");
|
|
21
|
+
const validation_1 = require("../../../../utils/validation");
|
|
22
|
+
const AzmgmtCommand_1 = require("../../../base/AzmgmtCommand");
|
|
23
|
+
const commands_1 = require("../../commands");
|
|
24
|
+
class FlowOwnerListCommand extends AzmgmtCommand_1.default {
|
|
25
|
+
get name() {
|
|
26
|
+
return commands_1.default.OWNER_LIST;
|
|
27
|
+
}
|
|
28
|
+
get description() {
|
|
29
|
+
return 'Lists all owners of a Power Automate flow';
|
|
30
|
+
}
|
|
31
|
+
defaultProperties() {
|
|
32
|
+
return ['roleName', 'id', 'type'];
|
|
33
|
+
}
|
|
34
|
+
constructor() {
|
|
35
|
+
super();
|
|
36
|
+
_FlowOwnerListCommand_instances.add(this);
|
|
37
|
+
__classPrivateFieldGet(this, _FlowOwnerListCommand_instances, "m", _FlowOwnerListCommand_initTelemetry).call(this);
|
|
38
|
+
__classPrivateFieldGet(this, _FlowOwnerListCommand_instances, "m", _FlowOwnerListCommand_initOptions).call(this);
|
|
39
|
+
__classPrivateFieldGet(this, _FlowOwnerListCommand_instances, "m", _FlowOwnerListCommand_initValidators).call(this);
|
|
40
|
+
}
|
|
41
|
+
commandAction(logger, args) {
|
|
42
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
43
|
+
try {
|
|
44
|
+
if (this.verbose) {
|
|
45
|
+
logger.logToStderr(`Listing owners for flow ${args.options.flowName} in environment ${args.options.environmentName}`);
|
|
46
|
+
}
|
|
47
|
+
const response = yield odata_1.odata.getAllItems(`${this.resource}providers/Microsoft.ProcessSimple/${args.options.asAdmin ? 'scopes/admin/' : ''}environments/${formatting_1.formatting.encodeQueryParameter(args.options.environmentName)}/flows/${formatting_1.formatting.encodeQueryParameter(args.options.flowName)}/permissions?api-version=2016-11-01`);
|
|
48
|
+
if (!Cli_1.Cli.shouldTrimOutput(args.options.output)) {
|
|
49
|
+
logger.log(response);
|
|
50
|
+
}
|
|
51
|
+
else {
|
|
52
|
+
//converted to text friendly output
|
|
53
|
+
logger.log(response.map(res => ({
|
|
54
|
+
roleName: res.properties.roleName,
|
|
55
|
+
id: res.properties.principal.id,
|
|
56
|
+
type: res.properties.principal.type
|
|
57
|
+
})));
|
|
58
|
+
}
|
|
59
|
+
}
|
|
60
|
+
catch (err) {
|
|
61
|
+
this.handleRejectedODataJsonPromise(err);
|
|
62
|
+
}
|
|
63
|
+
});
|
|
64
|
+
}
|
|
65
|
+
}
|
|
66
|
+
_FlowOwnerListCommand_instances = new WeakSet(), _FlowOwnerListCommand_initTelemetry = function _FlowOwnerListCommand_initTelemetry() {
|
|
67
|
+
this.telemetry.push((args) => {
|
|
68
|
+
Object.assign(this.telemetryProperties, {
|
|
69
|
+
asAdmin: !!args.options.asAdmin
|
|
70
|
+
});
|
|
71
|
+
});
|
|
72
|
+
}, _FlowOwnerListCommand_initOptions = function _FlowOwnerListCommand_initOptions() {
|
|
73
|
+
this.options.unshift({
|
|
74
|
+
option: '-e, --environmentName <environmentName>'
|
|
75
|
+
}, {
|
|
76
|
+
option: '-f, --flowName <flowName>'
|
|
77
|
+
}, {
|
|
78
|
+
option: '--asAdmin'
|
|
79
|
+
});
|
|
80
|
+
}, _FlowOwnerListCommand_initValidators = function _FlowOwnerListCommand_initValidators() {
|
|
81
|
+
this.validators.push((args) => __awaiter(this, void 0, void 0, function* () {
|
|
82
|
+
if (!validation_1.validation.isValidGuid(args.options.flowName)) {
|
|
83
|
+
return `${args.options.flowName} is not a valid GUID.`;
|
|
84
|
+
}
|
|
85
|
+
return true;
|
|
86
|
+
}));
|
|
87
|
+
};
|
|
88
|
+
module.exports = new FlowOwnerListCommand();
|
|
89
|
+
//# sourceMappingURL=owner-list.js.map
|
|
@@ -13,7 +13,7 @@ var __classPrivateFieldGet = (this && this.__classPrivateFieldGet) || function (
|
|
|
13
13
|
if (typeof state === "function" ? receiver !== state || !f : !state.has(receiver)) throw new TypeError("Cannot read private member from an object whose class did not declare it");
|
|
14
14
|
return kind === "m" ? f : kind === "a" ? f.call(receiver) : f ? f.value : state.get(receiver);
|
|
15
15
|
};
|
|
16
|
-
var _FlowRunCancelCommand_instances, _FlowRunCancelCommand_initOptions, _FlowRunCancelCommand_initValidators;
|
|
16
|
+
var _FlowRunCancelCommand_instances, _FlowRunCancelCommand_initTelemetry, _FlowRunCancelCommand_initOptions, _FlowRunCancelCommand_initValidators;
|
|
17
17
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
18
18
|
const Cli_1 = require("../../../../cli/Cli");
|
|
19
19
|
const request_1 = require("../../../../request");
|
|
@@ -31,6 +31,7 @@ class FlowRunCancelCommand extends AzmgmtCommand_1.default {
|
|
|
31
31
|
constructor() {
|
|
32
32
|
super();
|
|
33
33
|
_FlowRunCancelCommand_instances.add(this);
|
|
34
|
+
__classPrivateFieldGet(this, _FlowRunCancelCommand_instances, "m", _FlowRunCancelCommand_initTelemetry).call(this);
|
|
34
35
|
__classPrivateFieldGet(this, _FlowRunCancelCommand_instances, "m", _FlowRunCancelCommand_initOptions).call(this);
|
|
35
36
|
__classPrivateFieldGet(this, _FlowRunCancelCommand_instances, "m", _FlowRunCancelCommand_initValidators).call(this);
|
|
36
37
|
}
|
|
@@ -71,7 +72,13 @@ class FlowRunCancelCommand extends AzmgmtCommand_1.default {
|
|
|
71
72
|
});
|
|
72
73
|
}
|
|
73
74
|
}
|
|
74
|
-
_FlowRunCancelCommand_instances = new WeakSet(),
|
|
75
|
+
_FlowRunCancelCommand_instances = new WeakSet(), _FlowRunCancelCommand_initTelemetry = function _FlowRunCancelCommand_initTelemetry() {
|
|
76
|
+
this.telemetry.push((args) => {
|
|
77
|
+
Object.assign(this.telemetryProperties, {
|
|
78
|
+
confirm: !!args.options.confirm
|
|
79
|
+
});
|
|
80
|
+
});
|
|
81
|
+
}, _FlowRunCancelCommand_initOptions = function _FlowRunCancelCommand_initOptions() {
|
|
75
82
|
this.options.unshift({
|
|
76
83
|
option: '-n, --name <name>'
|
|
77
84
|
}, {
|
|
@@ -15,9 +15,10 @@ var __classPrivateFieldGet = (this && this.__classPrivateFieldGet) || function (
|
|
|
15
15
|
};
|
|
16
16
|
var _PpEnvironmentGetCommand_instances, _PpEnvironmentGetCommand_initTelemetry, _PpEnvironmentGetCommand_initOptions;
|
|
17
17
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
18
|
-
const odata_1 = require("../../../../utils/odata");
|
|
19
18
|
const PowerPlatformCommand_1 = require("../../../base/PowerPlatformCommand");
|
|
20
19
|
const commands_1 = require("../../commands");
|
|
20
|
+
const request_1 = require("../../../../request");
|
|
21
|
+
const formatting_1 = require("../../../../utils/formatting");
|
|
21
22
|
class PpEnvironmentGetCommand extends PowerPlatformCommand_1.default {
|
|
22
23
|
get name() {
|
|
23
24
|
return commands_1.default.ENVIRONMENT_GET;
|
|
@@ -36,16 +37,24 @@ class PpEnvironmentGetCommand extends PowerPlatformCommand_1.default {
|
|
|
36
37
|
}
|
|
37
38
|
commandAction(logger, args) {
|
|
38
39
|
return __awaiter(this, void 0, void 0, function* () {
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
url = `${this.resource}/providers/Microsoft.BusinessAppPlatform/scopes/admin/environments`;
|
|
40
|
+
if (this.verbose) {
|
|
41
|
+
logger.logToStderr(`Retrieving environment: ${args.options.name || 'default'}`);
|
|
42
42
|
}
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
throw `The specified Power Platform environment does not exist`;
|
|
43
|
+
let url = `${this.resource}/providers/Microsoft.BusinessAppPlatform`;
|
|
44
|
+
if (args.options.asAdmin) {
|
|
45
|
+
url += '/scopes/admin';
|
|
47
46
|
}
|
|
48
|
-
|
|
47
|
+
const envName = args.options.name ? formatting_1.formatting.encodeQueryParameter(args.options.name) : '~Default';
|
|
48
|
+
url += `/environments/${envName}?api-version=2020-10-01`;
|
|
49
|
+
const requestOptions = {
|
|
50
|
+
url: url,
|
|
51
|
+
headers: {
|
|
52
|
+
accept: 'application/json;odata.metadata=none'
|
|
53
|
+
},
|
|
54
|
+
responseType: 'json'
|
|
55
|
+
};
|
|
56
|
+
const response = yield request_1.default.get(requestOptions);
|
|
57
|
+
logger.log(response);
|
|
49
58
|
});
|
|
50
59
|
}
|
|
51
60
|
}
|
|
@@ -82,7 +82,6 @@ class SpoFileMoveCommand extends SpoCommand_1.default {
|
|
|
82
82
|
responseType: 'json'
|
|
83
83
|
};
|
|
84
84
|
const jobInfo = yield request_1.default.post(requestOptions);
|
|
85
|
-
this.dots = '';
|
|
86
85
|
const copyJobInfo = jobInfo.value[0];
|
|
87
86
|
const progressPollInterval = 1800; // 30 * 60; //used previously implemented interval. The API does not provide guidance on what value should be used.
|
|
88
87
|
yield new Promise((resolve, reject) => {
|
|
@@ -94,7 +93,6 @@ class SpoFileMoveCommand extends SpoCommand_1.default {
|
|
|
94
93
|
resolve,
|
|
95
94
|
reject,
|
|
96
95
|
logger,
|
|
97
|
-
dots: this.dots,
|
|
98
96
|
debug: this.debug,
|
|
99
97
|
verbose: this.verbose
|
|
100
98
|
});
|
|
@@ -64,7 +64,6 @@ class SpoFolderCopyCommand extends SpoCommand_1.default {
|
|
|
64
64
|
};
|
|
65
65
|
try {
|
|
66
66
|
const jobInfo = yield request_1.default.post(requestOptions);
|
|
67
|
-
this.dots = '';
|
|
68
67
|
const copyJobInfo = jobInfo.value[0];
|
|
69
68
|
const progressPollInterval = 30 * 60; //used previously implemented interval. The API does not provide guidance on what value should be used.
|
|
70
69
|
yield new Promise((resolve, reject) => {
|
|
@@ -76,7 +75,6 @@ class SpoFolderCopyCommand extends SpoCommand_1.default {
|
|
|
76
75
|
resolve,
|
|
77
76
|
reject,
|
|
78
77
|
logger,
|
|
79
|
-
dots: this.dots,
|
|
80
78
|
debug: this.debug,
|
|
81
79
|
verbose: this.verbose
|
|
82
80
|
});
|
|
@@ -65,7 +65,6 @@ class SpoFolderMoveCommand extends SpoCommand_1.default {
|
|
|
65
65
|
};
|
|
66
66
|
try {
|
|
67
67
|
const jobInfo = yield request_1.default.post(requestOptions);
|
|
68
|
-
this.dots = '';
|
|
69
68
|
const copyJobInfo = jobInfo.value[0];
|
|
70
69
|
const progressPollInterval = 30 * 60; //used previously implemented interval. The API does not provide guidance on what value should be used.
|
|
71
70
|
yield new Promise((resolve, reject) => {
|
|
@@ -77,7 +76,6 @@ class SpoFolderMoveCommand extends SpoCommand_1.default {
|
|
|
77
76
|
resolve,
|
|
78
77
|
reject,
|
|
79
78
|
logger,
|
|
80
|
-
dots: this.dots,
|
|
81
79
|
debug: this.debug,
|
|
82
80
|
verbose: this.verbose
|
|
83
81
|
});
|
|
@@ -166,7 +166,6 @@ class SpoSiteAddCommand extends SpoCommand_1.default {
|
|
|
166
166
|
}
|
|
167
167
|
createClassicSite(logger, args) {
|
|
168
168
|
return __awaiter(this, void 0, void 0, function* () {
|
|
169
|
-
this.dots = '';
|
|
170
169
|
try {
|
|
171
170
|
this.spoAdminUrl = yield spo_1.spo.getSpoAdminUrl(logger, this.debug);
|
|
172
171
|
this.context = yield spo_1.spo.ensureFormDigest(this.spoAdminUrl, logger, this.context, this.debug);
|
|
@@ -228,7 +227,6 @@ class SpoSiteAddCommand extends SpoCommand_1.default {
|
|
|
228
227
|
reject,
|
|
229
228
|
logger,
|
|
230
229
|
currentContext: this.context,
|
|
231
|
-
dots: this.dots,
|
|
232
230
|
verbose: this.verbose,
|
|
233
231
|
debug: this.debug
|
|
234
232
|
});
|
|
@@ -362,7 +360,6 @@ class SpoSiteAddCommand extends SpoCommand_1.default {
|
|
|
362
360
|
reject,
|
|
363
361
|
logger,
|
|
364
362
|
currentContext: this.context,
|
|
365
|
-
dots: this.dots,
|
|
366
363
|
verbose: this.verbose,
|
|
367
364
|
debug: this.debug
|
|
368
365
|
});
|
|
@@ -43,7 +43,6 @@ class SpoSiteRemoveCommand extends SpoCommand_1.default {
|
|
|
43
43
|
return __awaiter(this, void 0, void 0, function* () {
|
|
44
44
|
const removeSite = () => __awaiter(this, void 0, void 0, function* () {
|
|
45
45
|
try {
|
|
46
|
-
this.dots = '';
|
|
47
46
|
if (args.options.fromRecycleBin) {
|
|
48
47
|
yield this.deleteSiteWithoutGroup(logger, args);
|
|
49
48
|
}
|
|
@@ -203,7 +202,6 @@ class SpoSiteRemoveCommand extends SpoCommand_1.default {
|
|
|
203
202
|
reject,
|
|
204
203
|
logger,
|
|
205
204
|
currentContext: this.context,
|
|
206
|
-
dots: this.dots,
|
|
207
205
|
debug: this.debug,
|
|
208
206
|
verbose: this.verbose
|
|
209
207
|
});
|
|
@@ -248,7 +246,6 @@ class SpoSiteRemoveCommand extends SpoCommand_1.default {
|
|
|
248
246
|
reject,
|
|
249
247
|
logger,
|
|
250
248
|
currentContext: this.context,
|
|
251
|
-
dots: this.dots,
|
|
252
249
|
debug: this.debug,
|
|
253
250
|
verbose: this.verbose
|
|
254
251
|
});
|
|
@@ -46,7 +46,6 @@ class SpoSiteSetCommand extends SpoCommand_1.default {
|
|
|
46
46
|
commandAction(logger, args) {
|
|
47
47
|
return __awaiter(this, void 0, void 0, function* () {
|
|
48
48
|
try {
|
|
49
|
-
this.dots = '';
|
|
50
49
|
this.tenantId = yield spo_1.spo.getTenantId(logger, this.debug);
|
|
51
50
|
this.spoAdminUrl = yield spo_1.spo.getSpoAdminUrl(logger, this.debug);
|
|
52
51
|
this.context = yield spo_1.spo.ensureFormDigest(this.spoAdminUrl, logger, this.context, this.debug);
|
|
@@ -128,7 +127,6 @@ class SpoSiteSetCommand extends SpoCommand_1.default {
|
|
|
128
127
|
reject,
|
|
129
128
|
logger,
|
|
130
129
|
currentContext: this.context,
|
|
131
|
-
dots: this.dots,
|
|
132
130
|
debug: this.debug,
|
|
133
131
|
verbose: this.verbose
|
|
134
132
|
});
|
|
@@ -44,7 +44,6 @@ class TeamsTeamAddCommand extends GraphCommand_1.default {
|
|
|
44
44
|
}
|
|
45
45
|
commandAction(logger, args) {
|
|
46
46
|
return __awaiter(this, void 0, void 0, function* () {
|
|
47
|
-
this.dots = '';
|
|
48
47
|
let requestBody;
|
|
49
48
|
if (args.options.template) {
|
|
50
49
|
if (this.verbose) {
|
|
@@ -95,7 +94,7 @@ class TeamsTeamAddCommand extends GraphCommand_1.default {
|
|
|
95
94
|
}
|
|
96
95
|
else {
|
|
97
96
|
setTimeout(() => {
|
|
98
|
-
this.waitUntilFinished(requestOptions, resolve, reject, logger
|
|
97
|
+
this.waitUntilFinished(requestOptions, resolve, reject, logger);
|
|
99
98
|
}, this.pollingInterval);
|
|
100
99
|
}
|
|
101
100
|
}));
|
|
@@ -113,11 +112,7 @@ class TeamsTeamAddCommand extends GraphCommand_1.default {
|
|
|
113
112
|
}
|
|
114
113
|
});
|
|
115
114
|
}
|
|
116
|
-
waitUntilFinished(requestOptions, resolve, reject, logger
|
|
117
|
-
if (!this.debug && this.verbose) {
|
|
118
|
-
dots += '.';
|
|
119
|
-
process.stdout.write(`\r${dots}`);
|
|
120
|
-
}
|
|
115
|
+
waitUntilFinished(requestOptions, resolve, reject, logger) {
|
|
121
116
|
request_1.default
|
|
122
117
|
.get(requestOptions)
|
|
123
118
|
.then((teamsAsyncOperation) => {
|
|
@@ -133,7 +128,7 @@ class TeamsTeamAddCommand extends GraphCommand_1.default {
|
|
|
133
128
|
return;
|
|
134
129
|
}
|
|
135
130
|
setTimeout(() => {
|
|
136
|
-
this.waitUntilFinished(requestOptions, resolve, reject, logger
|
|
131
|
+
this.waitUntilFinished(requestOptions, resolve, reject, logger);
|
|
137
132
|
}, this.pollingInterval);
|
|
138
133
|
}).catch(err => reject(err));
|
|
139
134
|
}
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.session = void 0;
|
|
4
|
+
const crypto = require("crypto");
|
|
5
|
+
const cache_1 = require("./cache");
|
|
6
|
+
exports.session = {
|
|
7
|
+
getId(pid) {
|
|
8
|
+
const key = `${pid.toString()}_session`;
|
|
9
|
+
let sessionId = cache_1.cache.getValue(key);
|
|
10
|
+
if (sessionId) {
|
|
11
|
+
return sessionId;
|
|
12
|
+
}
|
|
13
|
+
sessionId = crypto.randomBytes(24).toString('base64');
|
|
14
|
+
cache_1.cache.setValue(key, sessionId);
|
|
15
|
+
return sessionId;
|
|
16
|
+
}
|
|
17
|
+
};
|
|
18
|
+
//# sourceMappingURL=session.js.map
|
package/dist/utils/spo.js
CHANGED
|
@@ -56,7 +56,7 @@ exports.spo = {
|
|
|
56
56
|
});
|
|
57
57
|
});
|
|
58
58
|
},
|
|
59
|
-
waitUntilFinished({ operationId, siteUrl, resolve, reject, logger, currentContext,
|
|
59
|
+
waitUntilFinished({ operationId, siteUrl, resolve, reject, logger, currentContext, debug, verbose }) {
|
|
60
60
|
exports.spo
|
|
61
61
|
.ensureFormDigest(siteUrl, logger, currentContext, debug)
|
|
62
62
|
.then((res) => {
|
|
@@ -64,10 +64,6 @@ exports.spo = {
|
|
|
64
64
|
if (debug) {
|
|
65
65
|
logger.logToStderr(`Checking if operation ${operationId} completed...`);
|
|
66
66
|
}
|
|
67
|
-
if (!debug && verbose) {
|
|
68
|
-
dots += '.';
|
|
69
|
-
process.stdout.write(`\r${dots}`);
|
|
70
|
-
}
|
|
71
67
|
const requestOptions = {
|
|
72
68
|
url: `${siteUrl}/_vti_bin/client.svc/ProcessQuery`,
|
|
73
69
|
headers: {
|
|
@@ -101,7 +97,6 @@ exports.spo = {
|
|
|
101
97
|
reject,
|
|
102
98
|
logger,
|
|
103
99
|
currentContext,
|
|
104
|
-
dots,
|
|
105
100
|
debug,
|
|
106
101
|
verbose
|
|
107
102
|
});
|
|
@@ -109,7 +104,7 @@ exports.spo = {
|
|
|
109
104
|
}
|
|
110
105
|
});
|
|
111
106
|
},
|
|
112
|
-
waitUntilCopyJobFinished({ copyJobInfo, siteUrl, pollingInterval, resolve, reject, logger,
|
|
107
|
+
waitUntilCopyJobFinished({ copyJobInfo, siteUrl, pollingInterval, resolve, reject, logger, debug, verbose }) {
|
|
113
108
|
const requestUrl = `${siteUrl}/_api/site/GetCopyJobProgress`;
|
|
114
109
|
const requestOptions = {
|
|
115
110
|
url: requestUrl,
|
|
@@ -119,10 +114,6 @@ exports.spo = {
|
|
|
119
114
|
data: { "copyJobInfo": copyJobInfo },
|
|
120
115
|
responseType: 'json'
|
|
121
116
|
};
|
|
122
|
-
if (!debug && verbose) {
|
|
123
|
-
dots += '.';
|
|
124
|
-
process.stdout.write(`\r${dots}`);
|
|
125
|
-
}
|
|
126
117
|
request_1.default
|
|
127
118
|
.post(requestOptions)
|
|
128
119
|
.then((resp) => {
|
|
@@ -149,7 +140,7 @@ exports.spo = {
|
|
|
149
140
|
}
|
|
150
141
|
else {
|
|
151
142
|
setTimeout(() => {
|
|
152
|
-
exports.spo.waitUntilCopyJobFinished({ copyJobInfo, siteUrl, pollingInterval, resolve, reject, logger,
|
|
143
|
+
exports.spo.waitUntilCopyJobFinished({ copyJobInfo, siteUrl, pollingInterval, resolve, reject, logger, debug, verbose });
|
|
153
144
|
}, pollingInterval);
|
|
154
145
|
}
|
|
155
146
|
});
|
|
@@ -0,0 +1,87 @@
|
|
|
1
|
+
# aad license list
|
|
2
|
+
|
|
3
|
+
Lists commercial subscriptions that an organization has acquired
|
|
4
|
+
|
|
5
|
+
## Usage
|
|
6
|
+
|
|
7
|
+
```sh
|
|
8
|
+
m365 aad license list [options]
|
|
9
|
+
```
|
|
10
|
+
|
|
11
|
+
## Options
|
|
12
|
+
|
|
13
|
+
--8<-- "docs/cmd/_global.md"
|
|
14
|
+
|
|
15
|
+
## Examples
|
|
16
|
+
|
|
17
|
+
List all licenses within the tenant
|
|
18
|
+
|
|
19
|
+
```sh
|
|
20
|
+
m365 aad license list
|
|
21
|
+
```
|
|
22
|
+
|
|
23
|
+
## Response
|
|
24
|
+
|
|
25
|
+
=== "JSON"
|
|
26
|
+
|
|
27
|
+
```json
|
|
28
|
+
[
|
|
29
|
+
{
|
|
30
|
+
"capabilityStatus": "Enabled",
|
|
31
|
+
"consumedUnits": 1,
|
|
32
|
+
"id": "48a80680-7326-48cd-9935-b556b81d3a4e_c7df2760-2c81-4ef7-b578-5b5392b571df",
|
|
33
|
+
"skuId": "c7df2760-2c81-4ef7-b578-5b5392b571df",
|
|
34
|
+
"skuPartNumber": "ENTERPRISEPREMIUM",
|
|
35
|
+
"appliesTo": "User",
|
|
36
|
+
"prepaidUnits": {
|
|
37
|
+
"enabled": 10000,
|
|
38
|
+
"suspended": 0,
|
|
39
|
+
"warning": 0
|
|
40
|
+
},
|
|
41
|
+
"servicePlans": [
|
|
42
|
+
{
|
|
43
|
+
"servicePlanId": "8c098270-9dd4-4350-9b30-ba4703f3b36b",
|
|
44
|
+
"servicePlanName": "ADALLOM_S_O365",
|
|
45
|
+
"provisioningStatus": "Success",
|
|
46
|
+
"appliesTo": "User"
|
|
47
|
+
}
|
|
48
|
+
]
|
|
49
|
+
}
|
|
50
|
+
]
|
|
51
|
+
```
|
|
52
|
+
|
|
53
|
+
=== "Text"
|
|
54
|
+
|
|
55
|
+
```text
|
|
56
|
+
id skuId skuPartNumber
|
|
57
|
+
------------------------------------------------------------------------- ------------------------------------ ----------------------
|
|
58
|
+
48a80680-7326-48cd-9935-b556b81d3a4e_c7df2760-2c81-4ef7-b578-5b5392b571df c7df2760-2c81-4ef7-b578-5b5392b571df ENTERPRISEPREMIUM
|
|
59
|
+
```
|
|
60
|
+
|
|
61
|
+
=== "CSV"
|
|
62
|
+
|
|
63
|
+
```csv
|
|
64
|
+
id,skuId,skuPartNumber
|
|
65
|
+
48a80680-7326-48cd-9935-b556b81d3a4e_c7df2760-2c81-4ef7-b578-5b5392b571df,c7df2760-2c81-4ef7-b578-5b5392b571df,ENTERPRISEPREMIUM
|
|
66
|
+
```
|
|
67
|
+
|
|
68
|
+
=== "Markdown"
|
|
69
|
+
|
|
70
|
+
```md
|
|
71
|
+
# aad license list
|
|
72
|
+
|
|
73
|
+
Date: 14/2/2023
|
|
74
|
+
|
|
75
|
+
## 48a80680-7326-48cd-9935-b556b81d3a4e_c7df2760-2c81-4ef7-b578-5b5392b571df
|
|
76
|
+
|
|
77
|
+
Property | Value
|
|
78
|
+
---------|-------
|
|
79
|
+
capabilityStatus | Enabled
|
|
80
|
+
consumedUnits | 1
|
|
81
|
+
id | 48a80680-7326-48cd-9935-b556b81d3a4e_c7df2760-2c81-4ef7-b578-5b5392b571df
|
|
82
|
+
skuId | c7df2760-2c81-4ef7-b578-5b5392b571df
|
|
83
|
+
skuPartNumber | ENTERPRISEPREMIUM
|
|
84
|
+
appliesTo | User
|
|
85
|
+
prepaidUnits | {"enabled":10000,"suspended":0,"warning":0}
|
|
86
|
+
servicePlans | [{"servicePlanId":"8c098270-9dd4-4350-9b30-ba4703f3b36b","servicePlanName": "ADALLOM_S_O365","provisioningStatus": "Success","appliesTo": "User"}]
|
|
87
|
+
```
|