@pnp/cli-microsoft365 5.7.0 → 5.8.0-beta.29e39ab
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/dist/cli/Cli.js +1 -1
- package/dist/m365/aad/commands/app/app-get.js +4 -11
- package/dist/m365/aad/commands/app/app-remove.js +4 -11
- package/dist/m365/aad/commands/app/app-role-add.js +5 -10
- package/dist/m365/aad/commands/app/app-role-list.js +4 -24
- package/dist/m365/aad/commands/app/app-role-remove.js +4 -22
- package/dist/m365/aad/commands/app/app-set.js +4 -11
- package/dist/m365/aad/commands/approleassignment/approleassignment-add.js +4 -8
- package/dist/m365/aad/commands/approleassignment/approleassignment-list.js +4 -11
- package/dist/m365/aad/commands/approleassignment/approleassignment-remove.js +4 -8
- package/dist/m365/aad/commands/groupsettingtemplate/groupsettingtemplate-get.js +4 -7
- package/dist/m365/aad/commands/o365group/o365group-conversation-post-list.js +4 -8
- package/dist/m365/aad/commands/o365group/o365group-teamify.js +4 -7
- package/dist/m365/aad/commands/o365group/o365group-user-add.js +4 -7
- package/dist/m365/aad/commands/o365group/o365group-user-remove.js +4 -7
- package/dist/m365/aad/commands/o365group/o365group-user-set.js +4 -7
- package/dist/m365/aad/commands/sp/sp-add.js +4 -8
- package/dist/m365/aad/commands/sp/sp-get.js +4 -8
- package/dist/m365/aad/commands/user/user-get.js +4 -9
- package/dist/m365/aad/commands/user/user-list.js +13 -2
- package/dist/m365/aad/commands/user/user-set.js +4 -7
- package/dist/m365/commands/commands.js +1 -0
- package/dist/m365/commands/request.js +153 -0
- package/dist/m365/graph/Changelog.js +3 -0
- package/dist/m365/graph/commands/changelog/changelog-list.js +160 -0
- package/dist/m365/graph/commands.js +1 -0
- package/dist/m365/onenote/commands/notebook/notebook-list.js +139 -0
- package/dist/m365/onenote/commands.js +7 -0
- package/dist/m365/outlook/commands/message/message-list.js +4 -23
- package/dist/m365/outlook/commands/message/message-move.js +4 -31
- package/dist/m365/pa/commands/app/app-get.js +4 -7
- package/dist/m365/planner/commands/bucket/bucket-add.js +4 -7
- package/dist/m365/planner/commands/bucket/bucket-list.js +4 -7
- package/dist/m365/planner/commands/plan/plan-add.js +4 -7
- package/dist/m365/planner/commands/plan/plan-list.js +4 -7
- package/dist/m365/planner/commands/task/task-add.js +4 -13
- package/dist/m365/planner/commands/task/task-get.js +7 -0
- package/dist/m365/pp/commands/environment/environment-list.js +1 -1
- package/dist/m365/pp/commands/managementapp/managementapp-add.js +4 -11
- package/dist/m365/spfx/commands/project/project-doctor/doctor-1.16.0-beta.1.js +23 -0
- package/dist/m365/spfx/commands/project/project-doctor.js +2 -1
- package/dist/m365/spfx/commands/project/project-upgrade/rules/FN010008_YORC_nodeVersion.js +47 -0
- package/dist/m365/spfx/commands/project/project-upgrade/rules/FN021003_PKG_engines_node.js +48 -0
- package/dist/m365/spfx/commands/project/project-upgrade/upgrade-1.16.0-beta.1.js +61 -0
- package/dist/m365/spfx/commands/project/project-upgrade.js +16 -13
- package/dist/m365/spfx/commands/spfx-doctor.js +90 -79
- package/dist/m365/spo/commands/app/app-deploy.js +4 -7
- package/dist/m365/spo/commands/app/app-get.js +4 -7
- package/dist/m365/spo/commands/contenttype/contenttype-get.js +4 -7
- package/dist/m365/spo/commands/contenttype/contenttype-remove.js +5 -14
- package/dist/m365/spo/commands/file/file-checkin.js +4 -7
- package/dist/m365/spo/commands/file/file-checkout.js +4 -7
- package/dist/m365/spo/commands/file/file-get.js +4 -7
- package/dist/m365/spo/commands/file/file-remove.js +4 -7
- package/dist/m365/spo/commands/file/file-sharinginfo-get.js +4 -7
- package/dist/m365/spo/commands/group/group-remove.js +4 -7
- package/dist/m365/spo/commands/group/group-user-add.js +4 -13
- package/dist/m365/spo/commands/group/group-user-list.js +4 -7
- package/dist/m365/spo/commands/group/group-user-remove.js +4 -7
- package/dist/m365/spo/commands/hubsite/hubsite-unregister.js +1 -1
- package/dist/m365/spo/commands/list/list-contenttype-add.js +4 -7
- package/dist/m365/spo/commands/list/list-contenttype-default-set.js +4 -7
- package/dist/m365/spo/commands/list/list-contenttype-list.js +4 -7
- package/dist/m365/spo/commands/list/list-contenttype-remove.js +4 -7
- package/dist/m365/spo/commands/list/list-get.js +4 -7
- package/dist/m365/spo/commands/list/list-label-get.js +4 -7
- package/dist/m365/spo/commands/list/list-label-set.js +4 -4
- package/dist/m365/spo/commands/list/list-remove.js +4 -7
- package/dist/m365/spo/commands/list/list-roleassignment-add.js +9 -0
- package/dist/m365/spo/commands/list/list-roleassignment-remove.js +57 -28
- package/dist/m365/spo/commands/list/list-sitescript-get.js +4 -7
- package/dist/m365/spo/commands/list/list-view-field-add.js +4 -19
- package/dist/m365/spo/commands/list/list-view-field-remove.js +4 -19
- package/dist/m365/spo/commands/list/list-view-field-set.js +4 -19
- package/dist/m365/spo/commands/list/list-view-get.js +4 -10
- package/dist/m365/spo/commands/list/list-view-list.js +4 -7
- package/dist/m365/spo/commands/list/list-view-remove.js +4 -13
- package/dist/m365/spo/commands/list/list-view-set.js +4 -13
- package/dist/m365/spo/commands/list/list-webhook-add.js +4 -7
- package/dist/m365/spo/commands/list/list-webhook-get.js +4 -7
- package/dist/m365/spo/commands/list/list-webhook-remove.js +4 -7
- package/dist/m365/spo/commands/list/list-webhook-set.js +4 -7
- package/dist/m365/spo/commands/listitem/listitem-add.js +4 -7
- package/dist/m365/spo/commands/listitem/listitem-attachment-list.js +4 -7
- package/dist/m365/spo/commands/listitem/listitem-get.js +4 -7
- package/dist/m365/spo/commands/listitem/listitem-isrecord.js +4 -7
- package/dist/m365/spo/commands/listitem/listitem-record-declare.js +4 -7
- package/dist/m365/spo/commands/listitem/listitem-record-undeclare.js +4 -7
- package/dist/m365/spo/commands/listitem/listitem-remove.js +4 -7
- package/dist/m365/spo/commands/listitem/listitem-roleassignment-remove.js +206 -0
- package/dist/m365/spo/commands/listitem/listitem-set.js +4 -7
- package/dist/m365/spo/commands/site/site-apppermission-add.js +4 -4
- package/dist/m365/spo/commands/site/site-apppermission-remove.js +4 -9
- package/dist/m365/spo/commands/site/site-apppermission-set.js +4 -4
- package/dist/m365/spo/commands/term/term-add.js +4 -7
- package/dist/m365/spo/commands/term/term-get.js +4 -7
- package/dist/m365/spo/commands/term/term-group-get.js +4 -7
- package/dist/m365/spo/commands/term/term-list.js +4 -13
- package/dist/m365/spo/commands/term/term-set-add.js +4 -7
- package/dist/m365/spo/commands/term/term-set-get.js +4 -13
- package/dist/m365/spo/commands/term/term-set-list.js +4 -7
- package/dist/m365/spo/commands/user/user-get.js +4 -9
- package/dist/m365/spo/commands/user/user-remove.js +4 -7
- package/dist/m365/spo/commands/web/web-roleassignment-add.js +187 -0
- package/dist/m365/spo/commands/web/web-roleassignment-remove.js +170 -0
- package/dist/m365/spo/commands.js +3 -0
- package/dist/m365/teams/commands/app/app-install.js +4 -11
- package/dist/m365/teams/commands/app/app-update.js +4 -7
- package/dist/m365/teams/commands/channel/channel-add.js +4 -7
- package/dist/m365/teams/commands/channel/channel-get.js +4 -22
- package/dist/m365/teams/commands/channel/channel-list.js +4 -7
- package/dist/m365/teams/commands/channel/channel-member-list.js +4 -13
- package/dist/m365/teams/commands/channel/channel-member-set.js +4 -21
- package/dist/m365/teams/commands/channel/channel-remove.js +4 -7
- package/dist/m365/teams/commands/chat/chat-get.js +4 -17
- package/dist/m365/teams/commands/chat/chat-message-send.js +4 -17
- package/dist/m365/teams/commands/tab/tab-get.js +4 -19
- package/dist/m365/teams/commands/team/team-get.js +4 -7
- package/dist/m365/teams/commands/user/user-app-list.js +4 -7
- package/dist/m365/todo/commands/list/list-remove.js +4 -21
- package/dist/m365/todo/commands/list/list-set.js +4 -21
- package/dist/m365/todo/commands/task/task-add.js +4 -21
- package/dist/m365/todo/commands/task/task-list.js +4 -21
- package/dist/m365/todo/commands/task/task-remove.js +4 -21
- package/dist/m365/todo/commands/task/task-set.js +4 -7
- package/dist/request.js +6 -2
- package/docs/docs/cmd/adaptivecard/adaptivecard-send.md +0 -20
- package/docs/docs/cmd/graph/changelog/changelog-list.md +53 -0
- package/docs/docs/cmd/onenote/notebook/notebook-list.md +70 -0
- package/docs/docs/cmd/pp/environment/environment-list.md +1 -1
- package/docs/docs/cmd/request.md +76 -0
- package/docs/docs/cmd/spfx/project/project-upgrade.md +1 -1
- package/docs/docs/cmd/spfx/spfx-doctor.md +3 -3
- package/docs/docs/cmd/spo/hubsite/hubsite-unregister.md +2 -2
- package/docs/docs/cmd/spo/list/list-roleassignment-add.md +2 -2
- package/docs/docs/cmd/spo/list/list-roleassignment-remove.md +5 -2
- package/docs/docs/cmd/spo/listitem/listitem-roleassignment-remove.md +67 -0
- package/docs/docs/cmd/spo/listitem/listitem-roleinheritance-break.md +6 -6
- package/docs/docs/cmd/spo/web/web-roleassignment-add.md +57 -0
- package/docs/docs/cmd/spo/web/web-roleassignment-remove.md +54 -0
- package/npm-shrinkwrap.json +2 -2
- package/package.json +3 -2
- package/scripts/Register-CLIM365Completion.ps1 +1 -1
|
@@ -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 _SpoListLabelGetCommand_instances, _SpoListLabelGetCommand_initTelemetry, _SpoListLabelGetCommand_initOptions, _SpoListLabelGetCommand_initValidators;
|
|
16
|
+
var _SpoListLabelGetCommand_instances, _SpoListLabelGetCommand_initTelemetry, _SpoListLabelGetCommand_initOptions, _SpoListLabelGetCommand_initValidators, _SpoListLabelGetCommand_initOptionSets;
|
|
17
17
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
18
18
|
const request_1 = require("../../../../request");
|
|
19
19
|
const utils_1 = require("../../../../utils");
|
|
@@ -26,6 +26,7 @@ class SpoListLabelGetCommand extends SpoCommand_1.default {
|
|
|
26
26
|
__classPrivateFieldGet(this, _SpoListLabelGetCommand_instances, "m", _SpoListLabelGetCommand_initTelemetry).call(this);
|
|
27
27
|
__classPrivateFieldGet(this, _SpoListLabelGetCommand_instances, "m", _SpoListLabelGetCommand_initOptions).call(this);
|
|
28
28
|
__classPrivateFieldGet(this, _SpoListLabelGetCommand_instances, "m", _SpoListLabelGetCommand_initValidators).call(this);
|
|
29
|
+
__classPrivateFieldGet(this, _SpoListLabelGetCommand_instances, "m", _SpoListLabelGetCommand_initOptionSets).call(this);
|
|
29
30
|
}
|
|
30
31
|
get name() {
|
|
31
32
|
return commands_1.default.LIST_LABEL_GET;
|
|
@@ -112,14 +113,10 @@ _SpoListLabelGetCommand_instances = new WeakSet(), _SpoListLabelGetCommand_initT
|
|
|
112
113
|
return `${args.options.listId} is not a valid GUID`;
|
|
113
114
|
}
|
|
114
115
|
}
|
|
115
|
-
if (args.options.listId && args.options.listTitle) {
|
|
116
|
-
return 'Specify listId or listTitle, but not both';
|
|
117
|
-
}
|
|
118
|
-
if (!args.options.listId && !args.options.listTitle) {
|
|
119
|
-
return 'Specify listId or listTitle, one is required';
|
|
120
|
-
}
|
|
121
116
|
return true;
|
|
122
117
|
}));
|
|
118
|
+
}, _SpoListLabelGetCommand_initOptionSets = function _SpoListLabelGetCommand_initOptionSets() {
|
|
119
|
+
this.optionSets.push(['listId', 'listTitle']);
|
|
123
120
|
};
|
|
124
121
|
module.exports = new SpoListLabelGetCommand();
|
|
125
122
|
//# sourceMappingURL=list-label-get.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 _SpoListLabelSetCommand_instances, _SpoListLabelSetCommand_initTelemetry, _SpoListLabelSetCommand_initOptions, _SpoListLabelSetCommand_initValidators;
|
|
16
|
+
var _SpoListLabelSetCommand_instances, _SpoListLabelSetCommand_initTelemetry, _SpoListLabelSetCommand_initOptions, _SpoListLabelSetCommand_initValidators, _SpoListLabelSetCommand_initOptionSets;
|
|
17
17
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
18
18
|
const request_1 = require("../../../../request");
|
|
19
19
|
const utils_1 = require("../../../../utils");
|
|
@@ -26,6 +26,7 @@ class SpoListLabelSetCommand extends SpoCommand_1.default {
|
|
|
26
26
|
__classPrivateFieldGet(this, _SpoListLabelSetCommand_instances, "m", _SpoListLabelSetCommand_initTelemetry).call(this);
|
|
27
27
|
__classPrivateFieldGet(this, _SpoListLabelSetCommand_instances, "m", _SpoListLabelSetCommand_initOptions).call(this);
|
|
28
28
|
__classPrivateFieldGet(this, _SpoListLabelSetCommand_instances, "m", _SpoListLabelSetCommand_initValidators).call(this);
|
|
29
|
+
__classPrivateFieldGet(this, _SpoListLabelSetCommand_instances, "m", _SpoListLabelSetCommand_initOptionSets).call(this);
|
|
29
30
|
}
|
|
30
31
|
get name() {
|
|
31
32
|
return commands_1.default.LIST_LABEL_SET;
|
|
@@ -112,14 +113,13 @@ _SpoListLabelSetCommand_instances = new WeakSet(), _SpoListLabelSetCommand_initT
|
|
|
112
113
|
});
|
|
113
114
|
}, _SpoListLabelSetCommand_initValidators = function _SpoListLabelSetCommand_initValidators() {
|
|
114
115
|
this.validators.push((args) => __awaiter(this, void 0, void 0, function* () {
|
|
115
|
-
if (!args.options.listId && !args.options.listTitle && !args.options.listUrl) {
|
|
116
|
-
return `Specify listId or listTitle or listUrl.`;
|
|
117
|
-
}
|
|
118
116
|
if (args.options.listId && !utils_1.validation.isValidGuid(args.options.listId)) {
|
|
119
117
|
return `${args.options.listId} is not a valid GUID`;
|
|
120
118
|
}
|
|
121
119
|
return utils_1.validation.isValidSharePointUrl(args.options.webUrl);
|
|
122
120
|
}));
|
|
121
|
+
}, _SpoListLabelSetCommand_initOptionSets = function _SpoListLabelSetCommand_initOptionSets() {
|
|
122
|
+
this.optionSets.push(['listId', 'listTitle', 'listUrl']);
|
|
123
123
|
};
|
|
124
124
|
module.exports = new SpoListLabelSetCommand();
|
|
125
125
|
//# sourceMappingURL=list-label-set.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 _SpoListRemoveCommand_instances, _SpoListRemoveCommand_initTelemetry, _SpoListRemoveCommand_initOptions, _SpoListRemoveCommand_initValidators;
|
|
16
|
+
var _SpoListRemoveCommand_instances, _SpoListRemoveCommand_initTelemetry, _SpoListRemoveCommand_initOptions, _SpoListRemoveCommand_initValidators, _SpoListRemoveCommand_initOptionSets;
|
|
17
17
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
18
18
|
const cli_1 = require("../../../../cli");
|
|
19
19
|
const request_1 = require("../../../../request");
|
|
@@ -27,6 +27,7 @@ class SpoListRemoveCommand extends SpoCommand_1.default {
|
|
|
27
27
|
__classPrivateFieldGet(this, _SpoListRemoveCommand_instances, "m", _SpoListRemoveCommand_initTelemetry).call(this);
|
|
28
28
|
__classPrivateFieldGet(this, _SpoListRemoveCommand_instances, "m", _SpoListRemoveCommand_initOptions).call(this);
|
|
29
29
|
__classPrivateFieldGet(this, _SpoListRemoveCommand_instances, "m", _SpoListRemoveCommand_initValidators).call(this);
|
|
30
|
+
__classPrivateFieldGet(this, _SpoListRemoveCommand_instances, "m", _SpoListRemoveCommand_initOptionSets).call(this);
|
|
30
31
|
}
|
|
31
32
|
get name() {
|
|
32
33
|
return commands_1.default.LIST_REMOVE;
|
|
@@ -111,14 +112,10 @@ _SpoListRemoveCommand_instances = new WeakSet(), _SpoListRemoveCommand_initTelem
|
|
|
111
112
|
!utils_1.validation.isValidGuid(args.options.id)) {
|
|
112
113
|
return `${args.options.id} is not a valid GUID`;
|
|
113
114
|
}
|
|
114
|
-
if (args.options.id && args.options.title) {
|
|
115
|
-
return 'Specify id or title, but not both';
|
|
116
|
-
}
|
|
117
|
-
if (!args.options.id && !args.options.title) {
|
|
118
|
-
return 'Specify id or title';
|
|
119
|
-
}
|
|
120
115
|
return true;
|
|
121
116
|
}));
|
|
117
|
+
}, _SpoListRemoveCommand_initOptionSets = function _SpoListRemoveCommand_initOptionSets() {
|
|
118
|
+
this.optionSets.push(['id', 'title']);
|
|
122
119
|
};
|
|
123
120
|
module.exports = new SpoListRemoveCommand();
|
|
124
121
|
//# sourceMappingURL=list-remove.js.map
|
|
@@ -193,14 +193,23 @@ _SpoListRoleAssignmentAddCommand_instances = new WeakSet(), _SpoListRoleAssignme
|
|
|
193
193
|
if (listOptions.some(item => item !== undefined) && listOptions.filter(item => item !== undefined).length > 1) {
|
|
194
194
|
return `Specify either list id or title or list url`;
|
|
195
195
|
}
|
|
196
|
+
if (listOptions.filter(item => item !== undefined).length === 0) {
|
|
197
|
+
return `Specify at least list id or title or list url`;
|
|
198
|
+
}
|
|
196
199
|
const principalOptions = [args.options.principalId, args.options.upn, args.options.groupName];
|
|
197
200
|
if (principalOptions.some(item => item !== undefined) && principalOptions.filter(item => item !== undefined).length > 1) {
|
|
198
201
|
return `Specify either principalId id or upn or groupName`;
|
|
199
202
|
}
|
|
203
|
+
if (principalOptions.filter(item => item !== undefined).length === 0) {
|
|
204
|
+
return `Specify at least principalId id or upn or groupName`;
|
|
205
|
+
}
|
|
200
206
|
const roleDefinitionOptions = [args.options.roleDefinitionId, args.options.roleDefinitionName];
|
|
201
207
|
if (roleDefinitionOptions.some(item => item !== undefined) && roleDefinitionOptions.filter(item => item !== undefined).length > 1) {
|
|
202
208
|
return `Specify either roleDefinitionId id or roleDefinitionName`;
|
|
203
209
|
}
|
|
210
|
+
if (roleDefinitionOptions.filter(item => item !== undefined).length === 0) {
|
|
211
|
+
return `Specify at least roleDefinitionId id or roleDefinitionName`;
|
|
212
|
+
}
|
|
204
213
|
return true;
|
|
205
214
|
}));
|
|
206
215
|
};
|
|
@@ -37,36 +37,56 @@ class SpoListRoleAssignmentRemoveCommand extends SpoCommand_1.default {
|
|
|
37
37
|
return 'Removes a role assignment from list permissions';
|
|
38
38
|
}
|
|
39
39
|
commandAction(logger, args, cb) {
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
.
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
.
|
|
64
|
-
|
|
40
|
+
const removeRoleAssignment = () => {
|
|
41
|
+
if (this.verbose) {
|
|
42
|
+
logger.logToStderr(`Removing role assignment from list in site at ${args.options.webUrl}...`);
|
|
43
|
+
}
|
|
44
|
+
let requestUrl = `${args.options.webUrl}/_api/web/`;
|
|
45
|
+
if (args.options.listId) {
|
|
46
|
+
requestUrl += `lists(guid'${utils_1.formatting.encodeQueryParameter(args.options.listId)}')/`;
|
|
47
|
+
}
|
|
48
|
+
else if (args.options.listTitle) {
|
|
49
|
+
requestUrl += `lists/getByTitle('${utils_1.formatting.encodeQueryParameter(args.options.listTitle)}')/`;
|
|
50
|
+
}
|
|
51
|
+
else if (args.options.listUrl) {
|
|
52
|
+
const listServerRelativeUrl = utils_1.urlUtil.getServerRelativePath(args.options.webUrl, args.options.listUrl);
|
|
53
|
+
requestUrl += `GetList('${utils_1.formatting.encodeQueryParameter(listServerRelativeUrl)}')/`;
|
|
54
|
+
}
|
|
55
|
+
if (args.options.upn) {
|
|
56
|
+
this.GetUserPrincipalId(args.options)
|
|
57
|
+
.then((userPrincipalId) => {
|
|
58
|
+
args.options.principalId = userPrincipalId;
|
|
59
|
+
this.RemoveRoleAssignment(requestUrl, logger, args.options, cb);
|
|
60
|
+
}, (err) => this.handleRejectedODataJsonPromise(err, logger, cb));
|
|
61
|
+
}
|
|
62
|
+
else if (args.options.groupName) {
|
|
63
|
+
this.GetGroupPrincipalId(args.options)
|
|
64
|
+
.then((groupPrincipalId) => {
|
|
65
|
+
args.options.principalId = groupPrincipalId;
|
|
66
|
+
this.RemoveRoleAssignment(requestUrl, logger, args.options, cb);
|
|
67
|
+
}, (err) => this.handleRejectedODataJsonPromise(err, logger, cb));
|
|
68
|
+
}
|
|
69
|
+
else {
|
|
65
70
|
this.RemoveRoleAssignment(requestUrl, logger, args.options, cb);
|
|
66
|
-
}
|
|
71
|
+
}
|
|
72
|
+
};
|
|
73
|
+
if (args.options.confirm) {
|
|
74
|
+
removeRoleAssignment();
|
|
67
75
|
}
|
|
68
76
|
else {
|
|
69
|
-
|
|
77
|
+
cli_1.Cli.prompt({
|
|
78
|
+
type: 'confirm',
|
|
79
|
+
name: 'continue',
|
|
80
|
+
default: false,
|
|
81
|
+
message: `Are you sure you want to remove role assignment from list ${args.options.listId || args.options.listTitle} from site ${args.options.webUrl}?`
|
|
82
|
+
}, (result) => {
|
|
83
|
+
if (!result.continue) {
|
|
84
|
+
cb();
|
|
85
|
+
}
|
|
86
|
+
else {
|
|
87
|
+
removeRoleAssignment();
|
|
88
|
+
}
|
|
89
|
+
});
|
|
70
90
|
}
|
|
71
91
|
}
|
|
72
92
|
RemoveRoleAssignment(requestUrl, logger, options, cb) {
|
|
@@ -125,7 +145,8 @@ _SpoListRoleAssignmentRemoveCommand_instances = new WeakSet(), _SpoListRoleAssig
|
|
|
125
145
|
listUrl: typeof args.options.listUrl !== 'undefined',
|
|
126
146
|
principalId: typeof args.options.principalId !== 'undefined',
|
|
127
147
|
upn: typeof args.options.upn !== 'undefined',
|
|
128
|
-
groupName: typeof args.options.groupName !== 'undefined'
|
|
148
|
+
groupName: typeof args.options.groupName !== 'undefined',
|
|
149
|
+
confirm: (!(!args.options.confirm)).toString()
|
|
129
150
|
});
|
|
130
151
|
});
|
|
131
152
|
}, _SpoListRoleAssignmentRemoveCommand_initOptions = function _SpoListRoleAssignmentRemoveCommand_initOptions() {
|
|
@@ -143,6 +164,8 @@ _SpoListRoleAssignmentRemoveCommand_instances = new WeakSet(), _SpoListRoleAssig
|
|
|
143
164
|
option: '--upn [upn]'
|
|
144
165
|
}, {
|
|
145
166
|
option: '--groupName [groupName]'
|
|
167
|
+
}, {
|
|
168
|
+
option: '--confirm'
|
|
146
169
|
});
|
|
147
170
|
}, _SpoListRoleAssignmentRemoveCommand_initValidators = function _SpoListRoleAssignmentRemoveCommand_initValidators() {
|
|
148
171
|
this.validators.push((args) => __awaiter(this, void 0, void 0, function* () {
|
|
@@ -160,10 +183,16 @@ _SpoListRoleAssignmentRemoveCommand_instances = new WeakSet(), _SpoListRoleAssig
|
|
|
160
183
|
if (listOptions.some(item => item !== undefined) && listOptions.filter(item => item !== undefined).length > 1) {
|
|
161
184
|
return `Specify either list id or title or list url`;
|
|
162
185
|
}
|
|
186
|
+
if (listOptions.filter(item => item !== undefined).length === 0) {
|
|
187
|
+
return `Specify at least list id or title or list url`;
|
|
188
|
+
}
|
|
163
189
|
const principalOptions = [args.options.principalId, args.options.upn, args.options.groupName];
|
|
164
190
|
if (principalOptions.some(item => item !== undefined) && principalOptions.filter(item => item !== undefined).length > 1) {
|
|
165
191
|
return `Specify either principalId id or upn or groupName`;
|
|
166
192
|
}
|
|
193
|
+
if (principalOptions.filter(item => item !== undefined).length === 0) {
|
|
194
|
+
return `Specify at least principalId id or upn or groupName`;
|
|
195
|
+
}
|
|
167
196
|
return true;
|
|
168
197
|
}));
|
|
169
198
|
};
|
|
@@ -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 _SpoListSiteScriptGetCommand_instances, _SpoListSiteScriptGetCommand_initTelemetry, _SpoListSiteScriptGetCommand_initOptions, _SpoListSiteScriptGetCommand_initValidators;
|
|
16
|
+
var _SpoListSiteScriptGetCommand_instances, _SpoListSiteScriptGetCommand_initTelemetry, _SpoListSiteScriptGetCommand_initOptions, _SpoListSiteScriptGetCommand_initValidators, _SpoListSiteScriptGetCommand_initOptionSets;
|
|
17
17
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
18
18
|
const Command_1 = require("../../../../Command");
|
|
19
19
|
const request_1 = require("../../../../request");
|
|
@@ -27,6 +27,7 @@ class SpoListSiteScriptGetCommand extends SpoCommand_1.default {
|
|
|
27
27
|
__classPrivateFieldGet(this, _SpoListSiteScriptGetCommand_instances, "m", _SpoListSiteScriptGetCommand_initTelemetry).call(this);
|
|
28
28
|
__classPrivateFieldGet(this, _SpoListSiteScriptGetCommand_instances, "m", _SpoListSiteScriptGetCommand_initOptions).call(this);
|
|
29
29
|
__classPrivateFieldGet(this, _SpoListSiteScriptGetCommand_instances, "m", _SpoListSiteScriptGetCommand_initValidators).call(this);
|
|
30
|
+
__classPrivateFieldGet(this, _SpoListSiteScriptGetCommand_instances, "m", _SpoListSiteScriptGetCommand_initOptionSets).call(this);
|
|
30
31
|
}
|
|
31
32
|
get name() {
|
|
32
33
|
return commands_1.default.LIST_SITESCRIPT_GET;
|
|
@@ -116,14 +117,10 @@ _SpoListSiteScriptGetCommand_instances = new WeakSet(), _SpoListSiteScriptGetCom
|
|
|
116
117
|
return `${args.options.listId} is not a valid GUID`;
|
|
117
118
|
}
|
|
118
119
|
}
|
|
119
|
-
if (args.options.listId && args.options.listTitle) {
|
|
120
|
-
return 'Specify listId or listTitle, but not both';
|
|
121
|
-
}
|
|
122
|
-
if (!args.options.listId && !args.options.listTitle) {
|
|
123
|
-
return 'Specify listId or listTitle, one is required';
|
|
124
|
-
}
|
|
125
120
|
return true;
|
|
126
121
|
}));
|
|
122
|
+
}, _SpoListSiteScriptGetCommand_initOptionSets = function _SpoListSiteScriptGetCommand_initOptionSets() {
|
|
123
|
+
this.optionSets.push(['listId', 'listTitle']);
|
|
127
124
|
};
|
|
128
125
|
module.exports = new SpoListSiteScriptGetCommand();
|
|
129
126
|
//# sourceMappingURL=list-sitescript-get.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 _SpoListViewFieldAddCommand_instances, _SpoListViewFieldAddCommand_initTelemetry, _SpoListViewFieldAddCommand_initOptions, _SpoListViewFieldAddCommand_initValidators;
|
|
16
|
+
var _SpoListViewFieldAddCommand_instances, _SpoListViewFieldAddCommand_initTelemetry, _SpoListViewFieldAddCommand_initOptions, _SpoListViewFieldAddCommand_initValidators, _SpoListViewFieldAddCommand_initOptionSets;
|
|
17
17
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
18
18
|
const request_1 = require("../../../../request");
|
|
19
19
|
const utils_1 = require("../../../../utils");
|
|
@@ -26,6 +26,7 @@ class SpoListViewFieldAddCommand extends SpoCommand_1.default {
|
|
|
26
26
|
__classPrivateFieldGet(this, _SpoListViewFieldAddCommand_instances, "m", _SpoListViewFieldAddCommand_initTelemetry).call(this);
|
|
27
27
|
__classPrivateFieldGet(this, _SpoListViewFieldAddCommand_instances, "m", _SpoListViewFieldAddCommand_initOptions).call(this);
|
|
28
28
|
__classPrivateFieldGet(this, _SpoListViewFieldAddCommand_instances, "m", _SpoListViewFieldAddCommand_initValidators).call(this);
|
|
29
|
+
__classPrivateFieldGet(this, _SpoListViewFieldAddCommand_instances, "m", _SpoListViewFieldAddCommand_initOptionSets).call(this);
|
|
29
30
|
}
|
|
30
31
|
get name() {
|
|
31
32
|
return commands_1.default.LIST_VIEW_FIELD_ADD;
|
|
@@ -158,26 +159,10 @@ _SpoListViewFieldAddCommand_instances = new WeakSet(), _SpoListViewFieldAddComma
|
|
|
158
159
|
return `${args.options.fieldPosition} is not a number`;
|
|
159
160
|
}
|
|
160
161
|
}
|
|
161
|
-
if (args.options.listId && args.options.listTitle) {
|
|
162
|
-
return 'Specify listId or listTitle, but not both';
|
|
163
|
-
}
|
|
164
|
-
if (!args.options.listId && !args.options.listTitle) {
|
|
165
|
-
return 'Specify listId or listTitle, one is required';
|
|
166
|
-
}
|
|
167
|
-
if (args.options.viewId && args.options.viewTitle) {
|
|
168
|
-
return 'Specify viewId or viewTitle, but not both';
|
|
169
|
-
}
|
|
170
|
-
if (!args.options.viewId && !args.options.viewTitle) {
|
|
171
|
-
return 'Specify viewId or viewTitle, one is required';
|
|
172
|
-
}
|
|
173
|
-
if (args.options.fieldId && args.options.fieldTitle) {
|
|
174
|
-
return 'Specify fieldId or fieldTitle, but not both';
|
|
175
|
-
}
|
|
176
|
-
if (!args.options.fieldId && !args.options.fieldTitle) {
|
|
177
|
-
return 'Specify fieldId or fieldTitle, one is required';
|
|
178
|
-
}
|
|
179
162
|
return true;
|
|
180
163
|
}));
|
|
164
|
+
}, _SpoListViewFieldAddCommand_initOptionSets = function _SpoListViewFieldAddCommand_initOptionSets() {
|
|
165
|
+
this.optionSets.push(['listId', 'listTitle'], ['viewId', 'viewTitle'], ['fieldId', 'fieldTitle']);
|
|
181
166
|
};
|
|
182
167
|
module.exports = new SpoListViewFieldAddCommand();
|
|
183
168
|
//# sourceMappingURL=list-view-field-add.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 _SpoListViewFieldRemoveCommand_instances, _SpoListViewFieldRemoveCommand_initTelemetry, _SpoListViewFieldRemoveCommand_initOptions, _SpoListViewFieldRemoveCommand_initValidators;
|
|
16
|
+
var _SpoListViewFieldRemoveCommand_instances, _SpoListViewFieldRemoveCommand_initTelemetry, _SpoListViewFieldRemoveCommand_initOptions, _SpoListViewFieldRemoveCommand_initValidators, _SpoListViewFieldRemoveCommand_initOptionSets;
|
|
17
17
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
18
18
|
const cli_1 = require("../../../../cli");
|
|
19
19
|
const request_1 = require("../../../../request");
|
|
@@ -27,6 +27,7 @@ class SpoListViewFieldRemoveCommand extends SpoCommand_1.default {
|
|
|
27
27
|
__classPrivateFieldGet(this, _SpoListViewFieldRemoveCommand_instances, "m", _SpoListViewFieldRemoveCommand_initTelemetry).call(this);
|
|
28
28
|
__classPrivateFieldGet(this, _SpoListViewFieldRemoveCommand_instances, "m", _SpoListViewFieldRemoveCommand_initOptions).call(this);
|
|
29
29
|
__classPrivateFieldGet(this, _SpoListViewFieldRemoveCommand_instances, "m", _SpoListViewFieldRemoveCommand_initValidators).call(this);
|
|
30
|
+
__classPrivateFieldGet(this, _SpoListViewFieldRemoveCommand_instances, "m", _SpoListViewFieldRemoveCommand_initOptionSets).call(this);
|
|
30
31
|
}
|
|
31
32
|
get name() {
|
|
32
33
|
return commands_1.default.LIST_VIEW_FIELD_REMOVE;
|
|
@@ -145,26 +146,10 @@ _SpoListViewFieldRemoveCommand_instances = new WeakSet(), _SpoListViewFieldRemov
|
|
|
145
146
|
return `${args.options.viewId} is not a valid GUID`;
|
|
146
147
|
}
|
|
147
148
|
}
|
|
148
|
-
if (args.options.listId && args.options.listTitle) {
|
|
149
|
-
return 'Specify listId or listTitle, but not both';
|
|
150
|
-
}
|
|
151
|
-
if (!args.options.listId && !args.options.listTitle) {
|
|
152
|
-
return 'Specify listId or listTitle, one is required';
|
|
153
|
-
}
|
|
154
|
-
if (args.options.viewId && args.options.viewTitle) {
|
|
155
|
-
return 'Specify viewId or viewTitle, but not both';
|
|
156
|
-
}
|
|
157
|
-
if (!args.options.viewId && !args.options.viewTitle) {
|
|
158
|
-
return 'Specify viewId or viewTitle, one is required';
|
|
159
|
-
}
|
|
160
|
-
if (args.options.fieldId && args.options.fieldTitle) {
|
|
161
|
-
return 'Specify fieldId or fieldTitle, but not both';
|
|
162
|
-
}
|
|
163
|
-
if (!args.options.fieldId && !args.options.fieldTitle) {
|
|
164
|
-
return 'Specify fieldId or fieldTitle, one is required';
|
|
165
|
-
}
|
|
166
149
|
return true;
|
|
167
150
|
}));
|
|
151
|
+
}, _SpoListViewFieldRemoveCommand_initOptionSets = function _SpoListViewFieldRemoveCommand_initOptionSets() {
|
|
152
|
+
this.optionSets.push(['listId', 'listTitle'], ['viewId', 'viewTitle'], ['fieldId', 'fieldTitle']);
|
|
168
153
|
};
|
|
169
154
|
module.exports = new SpoListViewFieldRemoveCommand();
|
|
170
155
|
//# sourceMappingURL=list-view-field-remove.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 _SpoListViewFieldSetCommand_instances, _SpoListViewFieldSetCommand_initTelemetry, _SpoListViewFieldSetCommand_initOptions, _SpoListViewFieldSetCommand_initValidators;
|
|
16
|
+
var _SpoListViewFieldSetCommand_instances, _SpoListViewFieldSetCommand_initTelemetry, _SpoListViewFieldSetCommand_initOptions, _SpoListViewFieldSetCommand_initValidators, _SpoListViewFieldSetCommand_initOptionSets;
|
|
17
17
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
18
18
|
const request_1 = require("../../../../request");
|
|
19
19
|
const utils_1 = require("../../../../utils");
|
|
@@ -26,6 +26,7 @@ class SpoListViewFieldSetCommand extends SpoCommand_1.default {
|
|
|
26
26
|
__classPrivateFieldGet(this, _SpoListViewFieldSetCommand_instances, "m", _SpoListViewFieldSetCommand_initTelemetry).call(this);
|
|
27
27
|
__classPrivateFieldGet(this, _SpoListViewFieldSetCommand_instances, "m", _SpoListViewFieldSetCommand_initOptions).call(this);
|
|
28
28
|
__classPrivateFieldGet(this, _SpoListViewFieldSetCommand_instances, "m", _SpoListViewFieldSetCommand_initValidators).call(this);
|
|
29
|
+
__classPrivateFieldGet(this, _SpoListViewFieldSetCommand_instances, "m", _SpoListViewFieldSetCommand_initOptionSets).call(this);
|
|
29
30
|
}
|
|
30
31
|
get name() {
|
|
31
32
|
return commands_1.default.LIST_VIEW_FIELD_SET;
|
|
@@ -128,26 +129,10 @@ _SpoListViewFieldSetCommand_instances = new WeakSet(), _SpoListViewFieldSetComma
|
|
|
128
129
|
if (isNaN(position)) {
|
|
129
130
|
return `${args.options.fieldPosition} is not a number`;
|
|
130
131
|
}
|
|
131
|
-
if (args.options.listId && args.options.listTitle) {
|
|
132
|
-
return 'Specify listId or listTitle, but not both';
|
|
133
|
-
}
|
|
134
|
-
if (!args.options.listId && !args.options.listTitle) {
|
|
135
|
-
return 'Specify listId or listTitle, one is required';
|
|
136
|
-
}
|
|
137
|
-
if (args.options.viewId && args.options.viewTitle) {
|
|
138
|
-
return 'Specify viewId or viewTitle, but not both';
|
|
139
|
-
}
|
|
140
|
-
if (!args.options.viewId && !args.options.viewTitle) {
|
|
141
|
-
return 'Specify viewId or viewTitle, one is required';
|
|
142
|
-
}
|
|
143
|
-
if (args.options.fieldId && args.options.fieldTitle) {
|
|
144
|
-
return 'Specify fieldId or fieldTitle, but not both';
|
|
145
|
-
}
|
|
146
|
-
if (!args.options.fieldId && !args.options.fieldTitle) {
|
|
147
|
-
return 'Specify fieldId or fieldTitle, one is required';
|
|
148
|
-
}
|
|
149
132
|
return true;
|
|
150
133
|
}));
|
|
134
|
+
}, _SpoListViewFieldSetCommand_initOptionSets = function _SpoListViewFieldSetCommand_initOptionSets() {
|
|
135
|
+
this.optionSets.push(['listId', 'listTitle'], ['viewId', 'viewTitle'], ['fieldId', 'fieldTitle']);
|
|
151
136
|
};
|
|
152
137
|
module.exports = new SpoListViewFieldSetCommand();
|
|
153
138
|
//# sourceMappingURL=list-view-field-set.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 _SpoListViewGetCommand_instances, _SpoListViewGetCommand_initTelemetry, _SpoListViewGetCommand_initOptions, _SpoListViewGetCommand_initValidators;
|
|
16
|
+
var _SpoListViewGetCommand_instances, _SpoListViewGetCommand_initTelemetry, _SpoListViewGetCommand_initOptions, _SpoListViewGetCommand_initValidators, _SpoListViewGetCommand_initOptionSets;
|
|
17
17
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
18
18
|
const request_1 = require("../../../../request");
|
|
19
19
|
const utils_1 = require("../../../../utils");
|
|
@@ -26,6 +26,7 @@ class SpoListViewGetCommand extends SpoCommand_1.default {
|
|
|
26
26
|
__classPrivateFieldGet(this, _SpoListViewGetCommand_instances, "m", _SpoListViewGetCommand_initTelemetry).call(this);
|
|
27
27
|
__classPrivateFieldGet(this, _SpoListViewGetCommand_instances, "m", _SpoListViewGetCommand_initOptions).call(this);
|
|
28
28
|
__classPrivateFieldGet(this, _SpoListViewGetCommand_instances, "m", _SpoListViewGetCommand_initValidators).call(this);
|
|
29
|
+
__classPrivateFieldGet(this, _SpoListViewGetCommand_instances, "m", _SpoListViewGetCommand_initOptionSets).call(this);
|
|
29
30
|
}
|
|
30
31
|
get name() {
|
|
31
32
|
return commands_1.default.LIST_VIEW_GET;
|
|
@@ -92,25 +93,18 @@ _SpoListViewGetCommand_instances = new WeakSet(), _SpoListViewGetCommand_initTel
|
|
|
92
93
|
if (isValidSharePointUrl !== true) {
|
|
93
94
|
return isValidSharePointUrl;
|
|
94
95
|
}
|
|
95
|
-
if (!args.options.listId && !args.options.listTitle && !args.options.listUrl) {
|
|
96
|
-
return `Specify listId, listTitle or listUrl`;
|
|
97
|
-
}
|
|
98
96
|
if (args.options.listId &&
|
|
99
97
|
!utils_1.validation.isValidGuid(args.options.listId)) {
|
|
100
98
|
return `${args.options.listId} in option listId is not a valid GUID`;
|
|
101
99
|
}
|
|
102
|
-
if (!args.options.viewId && !args.options.viewTitle) {
|
|
103
|
-
return `Specify viewId or viewTitle`;
|
|
104
|
-
}
|
|
105
|
-
if (args.options.viewId && args.options.viewTitle) {
|
|
106
|
-
return `Specify viewId or viewTitle but not both`;
|
|
107
|
-
}
|
|
108
100
|
if (args.options.viewId &&
|
|
109
101
|
!utils_1.validation.isValidGuid(args.options.viewId)) {
|
|
110
102
|
return `${args.options.viewId} in option viewId is not a valid GUID`;
|
|
111
103
|
}
|
|
112
104
|
return true;
|
|
113
105
|
}));
|
|
106
|
+
}, _SpoListViewGetCommand_initOptionSets = function _SpoListViewGetCommand_initOptionSets() {
|
|
107
|
+
this.optionSets.push(['listId', 'listTitle', 'listUrl'], ['viewId', 'viewTitle']);
|
|
114
108
|
};
|
|
115
109
|
module.exports = new SpoListViewGetCommand();
|
|
116
110
|
//# sourceMappingURL=list-view-get.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 _SpoListViewListCommand_instances, _SpoListViewListCommand_initTelemetry, _SpoListViewListCommand_initOptions, _SpoListViewListCommand_initValidators;
|
|
16
|
+
var _SpoListViewListCommand_instances, _SpoListViewListCommand_initTelemetry, _SpoListViewListCommand_initOptions, _SpoListViewListCommand_initValidators, _SpoListViewListCommand_initOptionSets;
|
|
17
17
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
18
18
|
const request_1 = require("../../../../request");
|
|
19
19
|
const utils_1 = require("../../../../utils");
|
|
@@ -26,6 +26,7 @@ class SpoListViewListCommand extends SpoCommand_1.default {
|
|
|
26
26
|
__classPrivateFieldGet(this, _SpoListViewListCommand_instances, "m", _SpoListViewListCommand_initTelemetry).call(this);
|
|
27
27
|
__classPrivateFieldGet(this, _SpoListViewListCommand_instances, "m", _SpoListViewListCommand_initOptions).call(this);
|
|
28
28
|
__classPrivateFieldGet(this, _SpoListViewListCommand_instances, "m", _SpoListViewListCommand_initValidators).call(this);
|
|
29
|
+
__classPrivateFieldGet(this, _SpoListViewListCommand_instances, "m", _SpoListViewListCommand_initOptionSets).call(this);
|
|
29
30
|
}
|
|
30
31
|
get name() {
|
|
31
32
|
return commands_1.default.LIST_VIEW_LIST;
|
|
@@ -89,14 +90,10 @@ _SpoListViewListCommand_instances = new WeakSet(), _SpoListViewListCommand_initT
|
|
|
89
90
|
return `${args.options.listId} is not a valid GUID`;
|
|
90
91
|
}
|
|
91
92
|
}
|
|
92
|
-
if (args.options.listId && args.options.listTitle) {
|
|
93
|
-
return 'Specify listId or listTitle, but not both';
|
|
94
|
-
}
|
|
95
|
-
if (!args.options.listId && !args.options.listTitle) {
|
|
96
|
-
return 'Specify listId or listTitle, one is required';
|
|
97
|
-
}
|
|
98
93
|
return true;
|
|
99
94
|
}));
|
|
95
|
+
}, _SpoListViewListCommand_initOptionSets = function _SpoListViewListCommand_initOptionSets() {
|
|
96
|
+
this.optionSets.push(['listId', 'listTitle']);
|
|
100
97
|
};
|
|
101
98
|
module.exports = new SpoListViewListCommand();
|
|
102
99
|
//# sourceMappingURL=list-view-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 _SpoListViewRemoveCommand_instances, _SpoListViewRemoveCommand_initTelemetry, _SpoListViewRemoveCommand_initOptions, _SpoListViewRemoveCommand_initValidators;
|
|
16
|
+
var _SpoListViewRemoveCommand_instances, _SpoListViewRemoveCommand_initTelemetry, _SpoListViewRemoveCommand_initOptions, _SpoListViewRemoveCommand_initValidators, _SpoListViewRemoveCommand_initOptionSets;
|
|
17
17
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
18
18
|
const cli_1 = require("../../../../cli");
|
|
19
19
|
const request_1 = require("../../../../request");
|
|
@@ -27,6 +27,7 @@ class SpoListViewRemoveCommand extends SpoCommand_1.default {
|
|
|
27
27
|
__classPrivateFieldGet(this, _SpoListViewRemoveCommand_instances, "m", _SpoListViewRemoveCommand_initTelemetry).call(this);
|
|
28
28
|
__classPrivateFieldGet(this, _SpoListViewRemoveCommand_instances, "m", _SpoListViewRemoveCommand_initOptions).call(this);
|
|
29
29
|
__classPrivateFieldGet(this, _SpoListViewRemoveCommand_instances, "m", _SpoListViewRemoveCommand_initValidators).call(this);
|
|
30
|
+
__classPrivateFieldGet(this, _SpoListViewRemoveCommand_instances, "m", _SpoListViewRemoveCommand_initOptionSets).call(this);
|
|
30
31
|
}
|
|
31
32
|
get name() {
|
|
32
33
|
return commands_1.default.LIST_VIEW_REMOVE;
|
|
@@ -120,20 +121,10 @@ _SpoListViewRemoveCommand_instances = new WeakSet(), _SpoListViewRemoveCommand_i
|
|
|
120
121
|
return `${args.options.viewId} is not a valid GUID`;
|
|
121
122
|
}
|
|
122
123
|
}
|
|
123
|
-
if (args.options.listId && args.options.listTitle) {
|
|
124
|
-
return 'Specify listId or listTitle, but not both';
|
|
125
|
-
}
|
|
126
|
-
if (!args.options.listId && !args.options.listTitle) {
|
|
127
|
-
return 'Specify listId or listTitle, one is required';
|
|
128
|
-
}
|
|
129
|
-
if (args.options.viewId && args.options.viewTitle) {
|
|
130
|
-
return 'Specify viewId or viewTitle, but not both';
|
|
131
|
-
}
|
|
132
|
-
if (!args.options.viewId && !args.options.viewTitle) {
|
|
133
|
-
return 'Specify viewId or viewTitle, one is required';
|
|
134
|
-
}
|
|
135
124
|
return true;
|
|
136
125
|
}));
|
|
126
|
+
}, _SpoListViewRemoveCommand_initOptionSets = function _SpoListViewRemoveCommand_initOptionSets() {
|
|
127
|
+
this.optionSets.push(['listId', 'listTitle'], ['viewId', 'viewTitle']);
|
|
137
128
|
};
|
|
138
129
|
module.exports = new SpoListViewRemoveCommand();
|
|
139
130
|
//# sourceMappingURL=list-view-remove.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 _SpoListViewSetCommand_instances, _SpoListViewSetCommand_initTelemetry, _SpoListViewSetCommand_initOptions, _SpoListViewSetCommand_initValidators;
|
|
16
|
+
var _SpoListViewSetCommand_instances, _SpoListViewSetCommand_initTelemetry, _SpoListViewSetCommand_initOptions, _SpoListViewSetCommand_initValidators, _SpoListViewSetCommand_initOptionSets;
|
|
17
17
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
18
18
|
const request_1 = require("../../../../request");
|
|
19
19
|
const utils_1 = require("../../../../utils");
|
|
@@ -26,6 +26,7 @@ class SpoListViewSetCommand extends SpoCommand_1.default {
|
|
|
26
26
|
__classPrivateFieldGet(this, _SpoListViewSetCommand_instances, "m", _SpoListViewSetCommand_initTelemetry).call(this);
|
|
27
27
|
__classPrivateFieldGet(this, _SpoListViewSetCommand_instances, "m", _SpoListViewSetCommand_initOptions).call(this);
|
|
28
28
|
__classPrivateFieldGet(this, _SpoListViewSetCommand_instances, "m", _SpoListViewSetCommand_initValidators).call(this);
|
|
29
|
+
__classPrivateFieldGet(this, _SpoListViewSetCommand_instances, "m", _SpoListViewSetCommand_initOptionSets).call(this);
|
|
29
30
|
}
|
|
30
31
|
allowUnknownOptions() {
|
|
31
32
|
return true;
|
|
@@ -106,28 +107,18 @@ _SpoListViewSetCommand_instances = new WeakSet(), _SpoListViewSetCommand_initTel
|
|
|
106
107
|
if (isValidSharePointUrl !== true) {
|
|
107
108
|
return isValidSharePointUrl;
|
|
108
109
|
}
|
|
109
|
-
if (!args.options.listId && !args.options.listTitle) {
|
|
110
|
-
return `Specify listId or listTitle`;
|
|
111
|
-
}
|
|
112
|
-
if (args.options.listId && args.options.listTitle) {
|
|
113
|
-
return `Specify listId or listTitle but not both`;
|
|
114
|
-
}
|
|
115
110
|
if (args.options.listId &&
|
|
116
111
|
!utils_1.validation.isValidGuid(args.options.listId)) {
|
|
117
112
|
return `${args.options.listId} in option listId is not a valid GUID`;
|
|
118
113
|
}
|
|
119
|
-
if (!args.options.viewId && !args.options.viewTitle) {
|
|
120
|
-
return `Specify viewId or viewTitle`;
|
|
121
|
-
}
|
|
122
|
-
if (args.options.viewId && args.options.viewTitle) {
|
|
123
|
-
return `Specify viewId or viewTitle but not both`;
|
|
124
|
-
}
|
|
125
114
|
if (args.options.viewId &&
|
|
126
115
|
!utils_1.validation.isValidGuid(args.options.viewId)) {
|
|
127
116
|
return `${args.options.viewId} in option viewId is not a valid GUID`;
|
|
128
117
|
}
|
|
129
118
|
return true;
|
|
130
119
|
}));
|
|
120
|
+
}, _SpoListViewSetCommand_initOptionSets = function _SpoListViewSetCommand_initOptionSets() {
|
|
121
|
+
this.optionSets.push(['listId', 'listTitle'], ['viewId', 'viewTitle']);
|
|
131
122
|
};
|
|
132
123
|
module.exports = new SpoListViewSetCommand();
|
|
133
124
|
//# sourceMappingURL=list-view-set.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 _SpoListWebhookAddCommand_instances, _SpoListWebhookAddCommand_initTelemetry, _SpoListWebhookAddCommand_initOptions, _SpoListWebhookAddCommand_initValidators;
|
|
16
|
+
var _SpoListWebhookAddCommand_instances, _SpoListWebhookAddCommand_initTelemetry, _SpoListWebhookAddCommand_initOptions, _SpoListWebhookAddCommand_initValidators, _SpoListWebhookAddCommand_initOptionSets;
|
|
17
17
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
18
18
|
const request_1 = require("../../../../request");
|
|
19
19
|
const utils_1 = require("../../../../utils");
|
|
@@ -30,6 +30,7 @@ class SpoListWebhookAddCommand extends SpoCommand_1.default {
|
|
|
30
30
|
__classPrivateFieldGet(this, _SpoListWebhookAddCommand_instances, "m", _SpoListWebhookAddCommand_initTelemetry).call(this);
|
|
31
31
|
__classPrivateFieldGet(this, _SpoListWebhookAddCommand_instances, "m", _SpoListWebhookAddCommand_initOptions).call(this);
|
|
32
32
|
__classPrivateFieldGet(this, _SpoListWebhookAddCommand_instances, "m", _SpoListWebhookAddCommand_initValidators).call(this);
|
|
33
|
+
__classPrivateFieldGet(this, _SpoListWebhookAddCommand_instances, "m", _SpoListWebhookAddCommand_initOptionSets).call(this);
|
|
33
34
|
}
|
|
34
35
|
get name() {
|
|
35
36
|
return commands_1.default.LIST_WEBHOOK_ADD;
|
|
@@ -112,12 +113,6 @@ _SpoListWebhookAddCommand_instances = new WeakSet(), _SpoListWebhookAddCommand_i
|
|
|
112
113
|
return `${args.options.listId} is not a valid GUID`;
|
|
113
114
|
}
|
|
114
115
|
}
|
|
115
|
-
if (args.options.listId && args.options.listTitle) {
|
|
116
|
-
return 'Specify listId or listTitle, but not both';
|
|
117
|
-
}
|
|
118
|
-
if (!args.options.listId && !args.options.listTitle) {
|
|
119
|
-
return 'Specify listId or listTitle, one is required';
|
|
120
|
-
}
|
|
121
116
|
const parsedDateTime = Date.parse(args.options.expirationDateTime);
|
|
122
117
|
if (args.options.expirationDateTime && !(!parsedDateTime) !== true) {
|
|
123
118
|
return `Provide the date in one of the following formats:
|
|
@@ -131,6 +126,8 @@ _SpoListWebhookAddCommand_instances = new WeakSet(), _SpoListWebhookAddCommand_i
|
|
|
131
126
|
}
|
|
132
127
|
return true;
|
|
133
128
|
}));
|
|
129
|
+
}, _SpoListWebhookAddCommand_initOptionSets = function _SpoListWebhookAddCommand_initOptionSets() {
|
|
130
|
+
this.optionSets.push(['listId', 'listTitle']);
|
|
134
131
|
};
|
|
135
132
|
module.exports = new SpoListWebhookAddCommand();
|
|
136
133
|
//# sourceMappingURL=list-webhook-add.js.map
|