@pnp/cli-microsoft365 5.7.0 → 5.8.0-beta.bc15f2b
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/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/managementapp/managementapp-add.js +4 -11
- 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/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/docs/docs/cmd/adaptivecard/adaptivecard-send.md +0 -20
- package/docs/docs/cmd/onenote/notebook/notebook-list.md +70 -0
- package/docs/docs/cmd/spfx/project/project-upgrade.md +1 -1
- package/docs/docs/cmd/spo/hubsite/hubsite-unregister.md +2 -2
- package/docs/docs/cmd/spo/list/list-roleassignment-remove.md +3 -0
- 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 +2 -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 _SpoListItemAddCommand_instances, _SpoListItemAddCommand_initTelemetry, _SpoListItemAddCommand_initOptions, _SpoListItemAddCommand_initValidators, _SpoListItemAddCommand_initTypes;
|
|
16
|
+
var _SpoListItemAddCommand_instances, _SpoListItemAddCommand_initTelemetry, _SpoListItemAddCommand_initOptions, _SpoListItemAddCommand_initValidators, _SpoListItemAddCommand_initTypes, _SpoListItemAddCommand_initOptionSets;
|
|
17
17
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
18
18
|
const request_1 = require("../../../../request");
|
|
19
19
|
const utils_1 = require("../../../../utils");
|
|
@@ -27,6 +27,7 @@ class SpoListItemAddCommand extends SpoCommand_1.default {
|
|
|
27
27
|
__classPrivateFieldGet(this, _SpoListItemAddCommand_instances, "m", _SpoListItemAddCommand_initOptions).call(this);
|
|
28
28
|
__classPrivateFieldGet(this, _SpoListItemAddCommand_instances, "m", _SpoListItemAddCommand_initValidators).call(this);
|
|
29
29
|
__classPrivateFieldGet(this, _SpoListItemAddCommand_instances, "m", _SpoListItemAddCommand_initTypes).call(this);
|
|
30
|
+
__classPrivateFieldGet(this, _SpoListItemAddCommand_instances, "m", _SpoListItemAddCommand_initOptionSets).call(this);
|
|
30
31
|
}
|
|
31
32
|
allowUnknownOptions() {
|
|
32
33
|
return true;
|
|
@@ -211,12 +212,6 @@ _SpoListItemAddCommand_instances = new WeakSet(), _SpoListItemAddCommand_initTel
|
|
|
211
212
|
if (isValidSharePointUrl !== true) {
|
|
212
213
|
return isValidSharePointUrl;
|
|
213
214
|
}
|
|
214
|
-
if (!args.options.listId && !args.options.listTitle) {
|
|
215
|
-
return `Specify listId or listTitle`;
|
|
216
|
-
}
|
|
217
|
-
if (args.options.listId && args.options.listTitle) {
|
|
218
|
-
return `Specify listId or listTitle but not both`;
|
|
219
|
-
}
|
|
220
215
|
if (args.options.listId &&
|
|
221
216
|
!utils_1.validation.isValidGuid(args.options.listId)) {
|
|
222
217
|
return `${args.options.listId} in option listId is not a valid GUID`;
|
|
@@ -225,6 +220,8 @@ _SpoListItemAddCommand_instances = new WeakSet(), _SpoListItemAddCommand_initTel
|
|
|
225
220
|
}));
|
|
226
221
|
}, _SpoListItemAddCommand_initTypes = function _SpoListItemAddCommand_initTypes() {
|
|
227
222
|
this.types.string.push('webUrl', 'listId', 'listTitle', 'contentType', 'folder');
|
|
223
|
+
}, _SpoListItemAddCommand_initOptionSets = function _SpoListItemAddCommand_initOptionSets() {
|
|
224
|
+
this.optionSets.push(['listId', 'listTitle']);
|
|
228
225
|
};
|
|
229
226
|
module.exports = new SpoListItemAddCommand();
|
|
230
227
|
//# sourceMappingURL=listitem-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 _SpoListItemAttachmentListCommand_instances, _SpoListItemAttachmentListCommand_initTelemetry, _SpoListItemAttachmentListCommand_initOptions, _SpoListItemAttachmentListCommand_initValidators;
|
|
16
|
+
var _SpoListItemAttachmentListCommand_instances, _SpoListItemAttachmentListCommand_initTelemetry, _SpoListItemAttachmentListCommand_initOptions, _SpoListItemAttachmentListCommand_initValidators, _SpoListItemAttachmentListCommand_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 SpoListItemAttachmentListCommand extends SpoCommand_1.default {
|
|
|
26
26
|
__classPrivateFieldGet(this, _SpoListItemAttachmentListCommand_instances, "m", _SpoListItemAttachmentListCommand_initTelemetry).call(this);
|
|
27
27
|
__classPrivateFieldGet(this, _SpoListItemAttachmentListCommand_instances, "m", _SpoListItemAttachmentListCommand_initOptions).call(this);
|
|
28
28
|
__classPrivateFieldGet(this, _SpoListItemAttachmentListCommand_instances, "m", _SpoListItemAttachmentListCommand_initValidators).call(this);
|
|
29
|
+
__classPrivateFieldGet(this, _SpoListItemAttachmentListCommand_instances, "m", _SpoListItemAttachmentListCommand_initOptionSets).call(this);
|
|
29
30
|
}
|
|
30
31
|
get name() {
|
|
31
32
|
return commands_1.default.LISTITEM_ATTACHMENT_LIST;
|
|
@@ -88,12 +89,6 @@ _SpoListItemAttachmentListCommand_instances = new WeakSet(), _SpoListItemAttachm
|
|
|
88
89
|
if (isValidSharePointUrl !== true) {
|
|
89
90
|
return isValidSharePointUrl;
|
|
90
91
|
}
|
|
91
|
-
if (!args.options.listId && !args.options.listTitle) {
|
|
92
|
-
return `Specify listId or listTitle`;
|
|
93
|
-
}
|
|
94
|
-
if (args.options.listId && args.options.listTitle) {
|
|
95
|
-
return `Specify listId or listTitle but not both`;
|
|
96
|
-
}
|
|
97
92
|
if (args.options.listId && !utils_1.validation.isValidGuid(args.options.listId)) {
|
|
98
93
|
return `${args.options.listId} in option listId is not a valid GUID`;
|
|
99
94
|
}
|
|
@@ -102,6 +97,8 @@ _SpoListItemAttachmentListCommand_instances = new WeakSet(), _SpoListItemAttachm
|
|
|
102
97
|
}
|
|
103
98
|
return true;
|
|
104
99
|
}));
|
|
100
|
+
}, _SpoListItemAttachmentListCommand_initOptionSets = function _SpoListItemAttachmentListCommand_initOptionSets() {
|
|
101
|
+
this.optionSets.push(['listId', 'listTitle']);
|
|
105
102
|
};
|
|
106
103
|
module.exports = new SpoListItemAttachmentListCommand();
|
|
107
104
|
//# sourceMappingURL=listitem-attachment-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 _SpoListItemGetCommand_instances, _SpoListItemGetCommand_initTelemetry, _SpoListItemGetCommand_initOptions, _SpoListItemGetCommand_initValidators, _SpoListItemGetCommand_initTypes;
|
|
16
|
+
var _SpoListItemGetCommand_instances, _SpoListItemGetCommand_initTelemetry, _SpoListItemGetCommand_initOptions, _SpoListItemGetCommand_initValidators, _SpoListItemGetCommand_initTypes, _SpoListItemGetCommand_initOptionSets;
|
|
17
17
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
18
18
|
const request_1 = require("../../../../request");
|
|
19
19
|
const utils_1 = require("../../../../utils");
|
|
@@ -27,6 +27,7 @@ class SpoListItemGetCommand extends SpoCommand_1.default {
|
|
|
27
27
|
__classPrivateFieldGet(this, _SpoListItemGetCommand_instances, "m", _SpoListItemGetCommand_initOptions).call(this);
|
|
28
28
|
__classPrivateFieldGet(this, _SpoListItemGetCommand_instances, "m", _SpoListItemGetCommand_initValidators).call(this);
|
|
29
29
|
__classPrivateFieldGet(this, _SpoListItemGetCommand_instances, "m", _SpoListItemGetCommand_initTypes).call(this);
|
|
30
|
+
__classPrivateFieldGet(this, _SpoListItemGetCommand_instances, "m", _SpoListItemGetCommand_initOptionSets).call(this);
|
|
30
31
|
}
|
|
31
32
|
allowUnknownOptions() {
|
|
32
33
|
return true;
|
|
@@ -89,12 +90,6 @@ _SpoListItemGetCommand_instances = new WeakSet(), _SpoListItemGetCommand_initTel
|
|
|
89
90
|
if (isValidSharePointUrl !== true) {
|
|
90
91
|
return isValidSharePointUrl;
|
|
91
92
|
}
|
|
92
|
-
if (!args.options.listId && !args.options.listTitle) {
|
|
93
|
-
return `Specify listId or listTitle`;
|
|
94
|
-
}
|
|
95
|
-
if (args.options.listId && args.options.listTitle) {
|
|
96
|
-
return `Specify listId or listTitle but not both`;
|
|
97
|
-
}
|
|
98
93
|
if (args.options.listId &&
|
|
99
94
|
!utils_1.validation.isValidGuid(args.options.listId)) {
|
|
100
95
|
return `${args.options.listId} in option listId is not a valid GUID`;
|
|
@@ -106,6 +101,8 @@ _SpoListItemGetCommand_instances = new WeakSet(), _SpoListItemGetCommand_initTel
|
|
|
106
101
|
}));
|
|
107
102
|
}, _SpoListItemGetCommand_initTypes = function _SpoListItemGetCommand_initTypes() {
|
|
108
103
|
this.types.string.push('webUrl', 'listId', 'listTitle', 'id', 'properties');
|
|
104
|
+
}, _SpoListItemGetCommand_initOptionSets = function _SpoListItemGetCommand_initOptionSets() {
|
|
105
|
+
this.optionSets.push(['listId', 'listTitle']);
|
|
109
106
|
};
|
|
110
107
|
module.exports = new SpoListItemGetCommand();
|
|
111
108
|
//# sourceMappingURL=listitem-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 _SpoListItemIsRecordCommand_instances, _SpoListItemIsRecordCommand_initTelemetry, _SpoListItemIsRecordCommand_initOptions, _SpoListItemIsRecordCommand_initValidators;
|
|
16
|
+
var _SpoListItemIsRecordCommand_instances, _SpoListItemIsRecordCommand_initTelemetry, _SpoListItemIsRecordCommand_initOptions, _SpoListItemIsRecordCommand_initValidators, _SpoListItemIsRecordCommand_initOptionSets;
|
|
17
17
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
18
18
|
const Auth_1 = require("../../../../Auth");
|
|
19
19
|
const Command_1 = require("../../../../Command");
|
|
@@ -29,6 +29,7 @@ class SpoListItemIsRecordCommand extends SpoCommand_1.default {
|
|
|
29
29
|
__classPrivateFieldGet(this, _SpoListItemIsRecordCommand_instances, "m", _SpoListItemIsRecordCommand_initTelemetry).call(this);
|
|
30
30
|
__classPrivateFieldGet(this, _SpoListItemIsRecordCommand_instances, "m", _SpoListItemIsRecordCommand_initOptions).call(this);
|
|
31
31
|
__classPrivateFieldGet(this, _SpoListItemIsRecordCommand_instances, "m", _SpoListItemIsRecordCommand_initValidators).call(this);
|
|
32
|
+
__classPrivateFieldGet(this, _SpoListItemIsRecordCommand_instances, "m", _SpoListItemIsRecordCommand_initOptionSets).call(this);
|
|
32
33
|
}
|
|
33
34
|
get name() {
|
|
34
35
|
return commands_1.default.LISTITEM_ISRECORD;
|
|
@@ -148,18 +149,14 @@ _SpoListItemIsRecordCommand_instances = new WeakSet(), _SpoListItemIsRecordComma
|
|
|
148
149
|
if (isValidSharePointUrl !== true) {
|
|
149
150
|
return isValidSharePointUrl;
|
|
150
151
|
}
|
|
151
|
-
if (!args.options.listId && !args.options.listTitle) {
|
|
152
|
-
return `Specify listId or listTitle`;
|
|
153
|
-
}
|
|
154
|
-
if (args.options.listId && args.options.listTitle) {
|
|
155
|
-
return `Specify listId or listTitle but not both`;
|
|
156
|
-
}
|
|
157
152
|
if (args.options.listId &&
|
|
158
153
|
!utils_1.validation.isValidGuid(args.options.listId)) {
|
|
159
154
|
return `${args.options.listId} in option listId is not a valid GUID`;
|
|
160
155
|
}
|
|
161
156
|
return true;
|
|
162
157
|
}));
|
|
158
|
+
}, _SpoListItemIsRecordCommand_initOptionSets = function _SpoListItemIsRecordCommand_initOptionSets() {
|
|
159
|
+
this.optionSets.push(['listId', 'listTitle']);
|
|
163
160
|
};
|
|
164
161
|
module.exports = new SpoListItemIsRecordCommand();
|
|
165
162
|
//# sourceMappingURL=listitem-isrecord.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 _SpoListItemRecordDeclareCommand_instances, _SpoListItemRecordDeclareCommand_initTelemetry, _SpoListItemRecordDeclareCommand_initOptions, _SpoListItemRecordDeclareCommand_initValidators;
|
|
16
|
+
var _SpoListItemRecordDeclareCommand_instances, _SpoListItemRecordDeclareCommand_initTelemetry, _SpoListItemRecordDeclareCommand_initOptions, _SpoListItemRecordDeclareCommand_initValidators, _SpoListItemRecordDeclareCommand_initOptionSets;
|
|
17
17
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
18
18
|
const Command_1 = require("../../../../Command");
|
|
19
19
|
const config_1 = require("../../../../config");
|
|
@@ -28,6 +28,7 @@ class SpoListItemRecordDeclareCommand extends SpoCommand_1.default {
|
|
|
28
28
|
__classPrivateFieldGet(this, _SpoListItemRecordDeclareCommand_instances, "m", _SpoListItemRecordDeclareCommand_initTelemetry).call(this);
|
|
29
29
|
__classPrivateFieldGet(this, _SpoListItemRecordDeclareCommand_instances, "m", _SpoListItemRecordDeclareCommand_initOptions).call(this);
|
|
30
30
|
__classPrivateFieldGet(this, _SpoListItemRecordDeclareCommand_instances, "m", _SpoListItemRecordDeclareCommand_initValidators).call(this);
|
|
31
|
+
__classPrivateFieldGet(this, _SpoListItemRecordDeclareCommand_instances, "m", _SpoListItemRecordDeclareCommand_initOptionSets).call(this);
|
|
31
32
|
}
|
|
32
33
|
get name() {
|
|
33
34
|
return commands_1.default.LISTITEM_RECORD_DECLARE;
|
|
@@ -125,12 +126,6 @@ _SpoListItemRecordDeclareCommand_instances = new WeakSet(), _SpoListItemRecordDe
|
|
|
125
126
|
if (isValidSharePointUrl !== true) {
|
|
126
127
|
return isValidSharePointUrl;
|
|
127
128
|
}
|
|
128
|
-
if (!args.options.listId && !args.options.listTitle) {
|
|
129
|
-
return `Specify listId or listTitle`;
|
|
130
|
-
}
|
|
131
|
-
if (args.options.listId && args.options.listTitle) {
|
|
132
|
-
return `Specify listId or listTitle but not both`;
|
|
133
|
-
}
|
|
134
129
|
if (args.options.listId && !utils_1.validation.isValidGuid(args.options.listId)) {
|
|
135
130
|
return `${args.options.listId} in option listId is not a valid GUID`;
|
|
136
131
|
}
|
|
@@ -146,6 +141,8 @@ _SpoListItemRecordDeclareCommand_instances = new WeakSet(), _SpoListItemRecordDe
|
|
|
146
141
|
}
|
|
147
142
|
return true;
|
|
148
143
|
}));
|
|
144
|
+
}, _SpoListItemRecordDeclareCommand_initOptionSets = function _SpoListItemRecordDeclareCommand_initOptionSets() {
|
|
145
|
+
this.optionSets.push(['listId', 'listTitle']);
|
|
149
146
|
};
|
|
150
147
|
module.exports = new SpoListItemRecordDeclareCommand();
|
|
151
148
|
//# sourceMappingURL=listitem-record-declare.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 _SpoListItemRecordUndeclareCommand_instances, _SpoListItemRecordUndeclareCommand_initTelemetry, _SpoListItemRecordUndeclareCommand_initOptions, _SpoListItemRecordUndeclareCommand_initValidators;
|
|
16
|
+
var _SpoListItemRecordUndeclareCommand_instances, _SpoListItemRecordUndeclareCommand_initTelemetry, _SpoListItemRecordUndeclareCommand_initOptions, _SpoListItemRecordUndeclareCommand_initValidators, _SpoListItemRecordUndeclareCommand_initOptionSets;
|
|
17
17
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
18
18
|
const config_1 = require("../../../../config");
|
|
19
19
|
const request_1 = require("../../../../request");
|
|
@@ -27,6 +27,7 @@ class SpoListItemRecordUndeclareCommand extends SpoCommand_1.default {
|
|
|
27
27
|
__classPrivateFieldGet(this, _SpoListItemRecordUndeclareCommand_instances, "m", _SpoListItemRecordUndeclareCommand_initTelemetry).call(this);
|
|
28
28
|
__classPrivateFieldGet(this, _SpoListItemRecordUndeclareCommand_instances, "m", _SpoListItemRecordUndeclareCommand_initOptions).call(this);
|
|
29
29
|
__classPrivateFieldGet(this, _SpoListItemRecordUndeclareCommand_instances, "m", _SpoListItemRecordUndeclareCommand_initValidators).call(this);
|
|
30
|
+
__classPrivateFieldGet(this, _SpoListItemRecordUndeclareCommand_instances, "m", _SpoListItemRecordUndeclareCommand_initOptionSets).call(this);
|
|
30
31
|
}
|
|
31
32
|
get name() {
|
|
32
33
|
return commands_1.default.LISTITEM_RECORD_UNDECLARE;
|
|
@@ -116,18 +117,14 @@ _SpoListItemRecordUndeclareCommand_instances = new WeakSet(), _SpoListItemRecord
|
|
|
116
117
|
if (isValidSharePointUrl !== true) {
|
|
117
118
|
return isValidSharePointUrl;
|
|
118
119
|
}
|
|
119
|
-
if (!args.options.listId && !args.options.listTitle) {
|
|
120
|
-
return `Specify listId or listTitle`;
|
|
121
|
-
}
|
|
122
|
-
if (args.options.listId && args.options.listTitle) {
|
|
123
|
-
return `Specify listId or listTitle but not both`;
|
|
124
|
-
}
|
|
125
120
|
if (args.options.listId &&
|
|
126
121
|
!utils_1.validation.isValidGuid(args.options.listId)) {
|
|
127
122
|
return `${args.options.listId} in option listId is not a valid GUID`;
|
|
128
123
|
}
|
|
129
124
|
return true;
|
|
130
125
|
}));
|
|
126
|
+
}, _SpoListItemRecordUndeclareCommand_initOptionSets = function _SpoListItemRecordUndeclareCommand_initOptionSets() {
|
|
127
|
+
this.optionSets.push(['listId', 'listTitle']);
|
|
131
128
|
};
|
|
132
129
|
module.exports = new SpoListItemRecordUndeclareCommand();
|
|
133
130
|
//# sourceMappingURL=listitem-record-undeclare.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 _SpoListItemRemoveCommand_instances, _SpoListItemRemoveCommand_initTelemetry, _SpoListItemRemoveCommand_initOptions, _SpoListItemRemoveCommand_initValidators;
|
|
16
|
+
var _SpoListItemRemoveCommand_instances, _SpoListItemRemoveCommand_initTelemetry, _SpoListItemRemoveCommand_initOptions, _SpoListItemRemoveCommand_initValidators, _SpoListItemRemoveCommand_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 SpoListItemRemoveCommand extends SpoCommand_1.default {
|
|
|
27
27
|
__classPrivateFieldGet(this, _SpoListItemRemoveCommand_instances, "m", _SpoListItemRemoveCommand_initTelemetry).call(this);
|
|
28
28
|
__classPrivateFieldGet(this, _SpoListItemRemoveCommand_instances, "m", _SpoListItemRemoveCommand_initOptions).call(this);
|
|
29
29
|
__classPrivateFieldGet(this, _SpoListItemRemoveCommand_instances, "m", _SpoListItemRemoveCommand_initValidators).call(this);
|
|
30
|
+
__classPrivateFieldGet(this, _SpoListItemRemoveCommand_instances, "m", _SpoListItemRemoveCommand_initOptionSets).call(this);
|
|
30
31
|
}
|
|
31
32
|
get name() {
|
|
32
33
|
return commands_1.default.LISTITEM_REMOVE;
|
|
@@ -124,14 +125,10 @@ _SpoListItemRemoveCommand_instances = new WeakSet(), _SpoListItemRemoveCommand_i
|
|
|
124
125
|
!utils_1.validation.isValidGuid(args.options.listId)) {
|
|
125
126
|
return `${args.options.listId} is not a valid GUID`;
|
|
126
127
|
}
|
|
127
|
-
if (args.options.listId && args.options.listTitle) {
|
|
128
|
-
return 'Specify id or title, but not both';
|
|
129
|
-
}
|
|
130
|
-
if (!args.options.listId && !args.options.listTitle) {
|
|
131
|
-
return 'Specify id or title';
|
|
132
|
-
}
|
|
133
128
|
return true;
|
|
134
129
|
}));
|
|
130
|
+
}, _SpoListItemRemoveCommand_initOptionSets = function _SpoListItemRemoveCommand_initOptionSets() {
|
|
131
|
+
this.optionSets.push(['listId', 'listTitle']);
|
|
135
132
|
};
|
|
136
133
|
module.exports = new SpoListItemRemoveCommand();
|
|
137
134
|
//# sourceMappingURL=listitem-remove.js.map
|
|
@@ -0,0 +1,206 @@
|
|
|
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 _SpoListItemRoleAssignmentRemoveCommand_instances, _SpoListItemRoleAssignmentRemoveCommand_initTelemetry, _SpoListItemRoleAssignmentRemoveCommand_initOptions, _SpoListItemRoleAssignmentRemoveCommand_initValidators;
|
|
17
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
18
|
+
const cli_1 = require("../../../../cli");
|
|
19
|
+
const request_1 = require("../../../../request");
|
|
20
|
+
const utils_1 = require("../../../../utils");
|
|
21
|
+
const SpoCommand_1 = require("../../../base/SpoCommand");
|
|
22
|
+
const commands_1 = require("../../commands");
|
|
23
|
+
const SpoUserGetCommand = require("../user/user-get");
|
|
24
|
+
const SpoGroupGetCommand = require("../group/group-get");
|
|
25
|
+
class SpoListItemRoleAssignmentRemoveCommand extends SpoCommand_1.default {
|
|
26
|
+
constructor() {
|
|
27
|
+
super();
|
|
28
|
+
_SpoListItemRoleAssignmentRemoveCommand_instances.add(this);
|
|
29
|
+
__classPrivateFieldGet(this, _SpoListItemRoleAssignmentRemoveCommand_instances, "m", _SpoListItemRoleAssignmentRemoveCommand_initTelemetry).call(this);
|
|
30
|
+
__classPrivateFieldGet(this, _SpoListItemRoleAssignmentRemoveCommand_instances, "m", _SpoListItemRoleAssignmentRemoveCommand_initOptions).call(this);
|
|
31
|
+
__classPrivateFieldGet(this, _SpoListItemRoleAssignmentRemoveCommand_instances, "m", _SpoListItemRoleAssignmentRemoveCommand_initValidators).call(this);
|
|
32
|
+
}
|
|
33
|
+
get name() {
|
|
34
|
+
return commands_1.default.LISTITEM_ROLEASSIGNMENT_REMOVE;
|
|
35
|
+
}
|
|
36
|
+
get description() {
|
|
37
|
+
return 'Removes a role assignment from list item permissions';
|
|
38
|
+
}
|
|
39
|
+
commandAction(logger, args, cb) {
|
|
40
|
+
const removeRoleAssignment = () => {
|
|
41
|
+
if (this.verbose) {
|
|
42
|
+
logger.logToStderr(`Removing role assignment from listitem 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
|
+
requestUrl += `items(${args.options.listItemId})/`;
|
|
56
|
+
if (args.options.upn) {
|
|
57
|
+
this.GetUserPrincipalId(args.options)
|
|
58
|
+
.then((userPrincipalId) => {
|
|
59
|
+
args.options.principalId = userPrincipalId;
|
|
60
|
+
this.RemoveRoleAssignment(requestUrl, logger, args.options, cb);
|
|
61
|
+
}, (err) => this.handleRejectedODataJsonPromise(err, logger, cb));
|
|
62
|
+
}
|
|
63
|
+
else if (args.options.groupName) {
|
|
64
|
+
this.GetGroupPrincipalId(args.options)
|
|
65
|
+
.then((groupPrincipalId) => {
|
|
66
|
+
args.options.principalId = groupPrincipalId;
|
|
67
|
+
this.RemoveRoleAssignment(requestUrl, logger, args.options, cb);
|
|
68
|
+
}, (err) => this.handleRejectedODataJsonPromise(err, logger, cb));
|
|
69
|
+
}
|
|
70
|
+
else {
|
|
71
|
+
this.RemoveRoleAssignment(requestUrl, logger, args.options, cb);
|
|
72
|
+
}
|
|
73
|
+
};
|
|
74
|
+
if (args.options.confirm) {
|
|
75
|
+
removeRoleAssignment();
|
|
76
|
+
}
|
|
77
|
+
else {
|
|
78
|
+
cli_1.Cli.prompt({
|
|
79
|
+
type: 'confirm',
|
|
80
|
+
name: 'continue',
|
|
81
|
+
default: false,
|
|
82
|
+
message: `Are you sure you want to remove role assignment from listitem ${args.options.listItemId} from list ${args.options.listId || args.options.listTitle} from site ${args.options.webUrl}?`
|
|
83
|
+
}, (result) => {
|
|
84
|
+
if (!result.continue) {
|
|
85
|
+
cb();
|
|
86
|
+
}
|
|
87
|
+
else {
|
|
88
|
+
removeRoleAssignment();
|
|
89
|
+
}
|
|
90
|
+
});
|
|
91
|
+
}
|
|
92
|
+
}
|
|
93
|
+
RemoveRoleAssignment(requestUrl, logger, options, cb) {
|
|
94
|
+
const requestOptions = {
|
|
95
|
+
url: `${requestUrl}roleassignments/removeroleassignment(principalid='${options.principalId}')`,
|
|
96
|
+
method: 'POST',
|
|
97
|
+
headers: {
|
|
98
|
+
'accept': 'application/json;odata=nometadata',
|
|
99
|
+
'content-type': 'application/json'
|
|
100
|
+
},
|
|
101
|
+
responseType: 'json'
|
|
102
|
+
};
|
|
103
|
+
request_1.default
|
|
104
|
+
.post(requestOptions)
|
|
105
|
+
.then(_ => cb(), (err) => this.handleRejectedODataJsonPromise(err, logger, cb));
|
|
106
|
+
}
|
|
107
|
+
GetGroupPrincipalId(options) {
|
|
108
|
+
const groupGetCommandOptions = {
|
|
109
|
+
webUrl: options.webUrl,
|
|
110
|
+
name: options.groupName,
|
|
111
|
+
output: 'json',
|
|
112
|
+
debug: this.debug,
|
|
113
|
+
verbose: this.verbose
|
|
114
|
+
};
|
|
115
|
+
return cli_1.Cli.executeCommandWithOutput(SpoGroupGetCommand, { options: Object.assign(Object.assign({}, groupGetCommandOptions), { _: [] }) })
|
|
116
|
+
.then((output) => {
|
|
117
|
+
const getGroupOutput = JSON.parse(output.stdout);
|
|
118
|
+
return Promise.resolve(getGroupOutput.Id);
|
|
119
|
+
}, (err) => {
|
|
120
|
+
return Promise.reject(err);
|
|
121
|
+
});
|
|
122
|
+
}
|
|
123
|
+
GetUserPrincipalId(options) {
|
|
124
|
+
const userGetCommandOptions = {
|
|
125
|
+
webUrl: options.webUrl,
|
|
126
|
+
email: options.upn,
|
|
127
|
+
id: undefined,
|
|
128
|
+
output: 'json',
|
|
129
|
+
debug: this.debug,
|
|
130
|
+
verbose: this.verbose
|
|
131
|
+
};
|
|
132
|
+
return cli_1.Cli.executeCommandWithOutput(SpoUserGetCommand, { options: Object.assign(Object.assign({}, userGetCommandOptions), { _: [] }) })
|
|
133
|
+
.then((output) => {
|
|
134
|
+
const getUserOutput = JSON.parse(output.stdout);
|
|
135
|
+
return Promise.resolve(getUserOutput.Id);
|
|
136
|
+
}, (err) => {
|
|
137
|
+
return Promise.reject(err);
|
|
138
|
+
});
|
|
139
|
+
}
|
|
140
|
+
}
|
|
141
|
+
_SpoListItemRoleAssignmentRemoveCommand_instances = new WeakSet(), _SpoListItemRoleAssignmentRemoveCommand_initTelemetry = function _SpoListItemRoleAssignmentRemoveCommand_initTelemetry() {
|
|
142
|
+
this.telemetry.push((args) => {
|
|
143
|
+
Object.assign(this.telemetryProperties, {
|
|
144
|
+
listId: typeof args.options.listId !== 'undefined',
|
|
145
|
+
listTitle: typeof args.options.listTitle !== 'undefined',
|
|
146
|
+
listUrl: typeof args.options.listUrl !== 'undefined',
|
|
147
|
+
principalId: typeof args.options.principalId !== 'undefined',
|
|
148
|
+
upn: typeof args.options.upn !== 'undefined',
|
|
149
|
+
groupName: typeof args.options.groupName !== 'undefined',
|
|
150
|
+
confirm: (!(!args.options.confirm)).toString()
|
|
151
|
+
});
|
|
152
|
+
});
|
|
153
|
+
}, _SpoListItemRoleAssignmentRemoveCommand_initOptions = function _SpoListItemRoleAssignmentRemoveCommand_initOptions() {
|
|
154
|
+
this.options.unshift({
|
|
155
|
+
option: '-u, --webUrl <webUrl>'
|
|
156
|
+
}, {
|
|
157
|
+
option: '-i, --listId [listId]'
|
|
158
|
+
}, {
|
|
159
|
+
option: '-t, --listTitle [listTitle]'
|
|
160
|
+
}, {
|
|
161
|
+
option: '--listUrl [listUrl]'
|
|
162
|
+
}, {
|
|
163
|
+
option: '--listItemId <listItemId>'
|
|
164
|
+
}, {
|
|
165
|
+
option: '--principalId [principalId]'
|
|
166
|
+
}, {
|
|
167
|
+
option: '--upn [upn]'
|
|
168
|
+
}, {
|
|
169
|
+
option: '--groupName [groupName]'
|
|
170
|
+
}, {
|
|
171
|
+
option: '--confirm'
|
|
172
|
+
});
|
|
173
|
+
}, _SpoListItemRoleAssignmentRemoveCommand_initValidators = function _SpoListItemRoleAssignmentRemoveCommand_initValidators() {
|
|
174
|
+
this.validators.push((args) => __awaiter(this, void 0, void 0, function* () {
|
|
175
|
+
const isValidSharePointUrl = utils_1.validation.isValidSharePointUrl(args.options.webUrl);
|
|
176
|
+
if (isValidSharePointUrl !== true) {
|
|
177
|
+
return isValidSharePointUrl;
|
|
178
|
+
}
|
|
179
|
+
if (args.options.listId && !utils_1.validation.isValidGuid(args.options.listId)) {
|
|
180
|
+
return `${args.options.listId} is not a valid GUID`;
|
|
181
|
+
}
|
|
182
|
+
if (args.options.listItemId && isNaN(args.options.listItemId)) {
|
|
183
|
+
return `Specified listItemId ${args.options.listItemId} is not a number`;
|
|
184
|
+
}
|
|
185
|
+
if (args.options.principalId && isNaN(args.options.principalId)) {
|
|
186
|
+
return `Specified principalId ${args.options.principalId} is not a number`;
|
|
187
|
+
}
|
|
188
|
+
const listOptions = [args.options.listId, args.options.listTitle, args.options.listUrl];
|
|
189
|
+
if (listOptions.some(item => item !== undefined) && listOptions.filter(item => item !== undefined).length > 1) {
|
|
190
|
+
return `Specify either list id or title or list url`;
|
|
191
|
+
}
|
|
192
|
+
if (listOptions.filter(item => item !== undefined).length === 0) {
|
|
193
|
+
return `Specify at least list id or title or list url`;
|
|
194
|
+
}
|
|
195
|
+
const principalOptions = [args.options.principalId, args.options.upn, args.options.groupName];
|
|
196
|
+
if (principalOptions.some(item => item !== undefined) && principalOptions.filter(item => item !== undefined).length > 1) {
|
|
197
|
+
return `Specify either principalId id or upn or groupName`;
|
|
198
|
+
}
|
|
199
|
+
if (principalOptions.filter(item => item !== undefined).length === 0) {
|
|
200
|
+
return `Specify at least principalId id or upn or groupName`;
|
|
201
|
+
}
|
|
202
|
+
return true;
|
|
203
|
+
}));
|
|
204
|
+
};
|
|
205
|
+
module.exports = new SpoListItemRoleAssignmentRemoveCommand();
|
|
206
|
+
//# sourceMappingURL=listitem-roleassignment-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 _SpoListItemSetCommand_instances, _SpoListItemSetCommand_initTelemetry, _SpoListItemSetCommand_initOptions, _SpoListItemSetCommand_initValidators, _SpoListItemSetCommand_initTypes;
|
|
16
|
+
var _SpoListItemSetCommand_instances, _SpoListItemSetCommand_initTelemetry, _SpoListItemSetCommand_initOptions, _SpoListItemSetCommand_initValidators, _SpoListItemSetCommand_initTypes, _SpoListItemSetCommand_initOptionSets;
|
|
17
17
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
18
18
|
const config_1 = require("../../../../config");
|
|
19
19
|
const request_1 = require("../../../../request");
|
|
@@ -28,6 +28,7 @@ class SpoListItemSetCommand extends SpoCommand_1.default {
|
|
|
28
28
|
__classPrivateFieldGet(this, _SpoListItemSetCommand_instances, "m", _SpoListItemSetCommand_initOptions).call(this);
|
|
29
29
|
__classPrivateFieldGet(this, _SpoListItemSetCommand_instances, "m", _SpoListItemSetCommand_initValidators).call(this);
|
|
30
30
|
__classPrivateFieldGet(this, _SpoListItemSetCommand_instances, "m", _SpoListItemSetCommand_initTypes).call(this);
|
|
31
|
+
__classPrivateFieldGet(this, _SpoListItemSetCommand_instances, "m", _SpoListItemSetCommand_initOptionSets).call(this);
|
|
31
32
|
}
|
|
32
33
|
allowUnknownOptions() {
|
|
33
34
|
return true;
|
|
@@ -320,12 +321,6 @@ _SpoListItemSetCommand_instances = new WeakSet(), _SpoListItemSetCommand_initTel
|
|
|
320
321
|
if (isValidSharePointUrl !== true) {
|
|
321
322
|
return isValidSharePointUrl;
|
|
322
323
|
}
|
|
323
|
-
if (!args.options.listId && !args.options.listTitle) {
|
|
324
|
-
return `Specify listId or listTitle`;
|
|
325
|
-
}
|
|
326
|
-
if (args.options.listId && args.options.listTitle) {
|
|
327
|
-
return `Specify listId or listTitle but not both`;
|
|
328
|
-
}
|
|
329
324
|
if (args.options.listId &&
|
|
330
325
|
!utils_1.validation.isValidGuid(args.options.listId)) {
|
|
331
326
|
return `${args.options.listId} in option listId is not a valid GUID`;
|
|
@@ -335,6 +330,8 @@ _SpoListItemSetCommand_instances = new WeakSet(), _SpoListItemSetCommand_initTel
|
|
|
335
330
|
}, _SpoListItemSetCommand_initTypes = function _SpoListItemSetCommand_initTypes() {
|
|
336
331
|
this.types.string.push('webUrl', 'listId', 'listTitle', 'id', 'contentType');
|
|
337
332
|
this.types.boolean.push('systemUpdate');
|
|
333
|
+
}, _SpoListItemSetCommand_initOptionSets = function _SpoListItemSetCommand_initOptionSets() {
|
|
334
|
+
this.optionSets.push(['listId', 'listTitle']);
|
|
338
335
|
};
|
|
339
336
|
module.exports = new SpoListItemSetCommand();
|
|
340
337
|
//# sourceMappingURL=listitem-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 _SpoSiteAppPermissionAddCommand_instances, _SpoSiteAppPermissionAddCommand_initTelemetry, _SpoSiteAppPermissionAddCommand_initOptions, _SpoSiteAppPermissionAddCommand_initValidators;
|
|
16
|
+
var _SpoSiteAppPermissionAddCommand_instances, _SpoSiteAppPermissionAddCommand_initTelemetry, _SpoSiteAppPermissionAddCommand_initOptions, _SpoSiteAppPermissionAddCommand_initValidators, _SpoSiteAppPermissionAddCommand_initOptionSets;
|
|
17
17
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
18
18
|
const request_1 = require("../../../../request");
|
|
19
19
|
const utils_1 = require("../../../../utils");
|
|
@@ -27,6 +27,7 @@ class SpoSiteAppPermissionAddCommand extends GraphCommand_1.default {
|
|
|
27
27
|
__classPrivateFieldGet(this, _SpoSiteAppPermissionAddCommand_instances, "m", _SpoSiteAppPermissionAddCommand_initTelemetry).call(this);
|
|
28
28
|
__classPrivateFieldGet(this, _SpoSiteAppPermissionAddCommand_instances, "m", _SpoSiteAppPermissionAddCommand_initOptions).call(this);
|
|
29
29
|
__classPrivateFieldGet(this, _SpoSiteAppPermissionAddCommand_instances, "m", _SpoSiteAppPermissionAddCommand_initValidators).call(this);
|
|
30
|
+
__classPrivateFieldGet(this, _SpoSiteAppPermissionAddCommand_instances, "m", _SpoSiteAppPermissionAddCommand_initOptionSets).call(this);
|
|
30
31
|
}
|
|
31
32
|
get name() {
|
|
32
33
|
return commands_1.default.SITE_APPPERMISSION_ADD;
|
|
@@ -137,9 +138,6 @@ _SpoSiteAppPermissionAddCommand_instances = new WeakSet(), _SpoSiteAppPermission
|
|
|
137
138
|
});
|
|
138
139
|
}, _SpoSiteAppPermissionAddCommand_initValidators = function _SpoSiteAppPermissionAddCommand_initValidators() {
|
|
139
140
|
this.validators.push((args) => __awaiter(this, void 0, void 0, function* () {
|
|
140
|
-
if (!args.options.appId && !args.options.appDisplayName) {
|
|
141
|
-
return `Specify appId or appDisplayName, one is required`;
|
|
142
|
-
}
|
|
143
141
|
if (args.options.appId && !utils_1.validation.isValidGuid(args.options.appId)) {
|
|
144
142
|
return `${args.options.appId} is not a valid GUID`;
|
|
145
143
|
}
|
|
@@ -148,6 +146,8 @@ _SpoSiteAppPermissionAddCommand_instances = new WeakSet(), _SpoSiteAppPermission
|
|
|
148
146
|
}
|
|
149
147
|
return utils_1.validation.isValidSharePointUrl(args.options.siteUrl);
|
|
150
148
|
}));
|
|
149
|
+
}, _SpoSiteAppPermissionAddCommand_initOptionSets = function _SpoSiteAppPermissionAddCommand_initOptionSets() {
|
|
150
|
+
this.optionSets.push(['appId', 'appDisplayName']);
|
|
151
151
|
};
|
|
152
152
|
module.exports = new SpoSiteAppPermissionAddCommand();
|
|
153
153
|
//# sourceMappingURL=site-apppermission-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 _SpoSiteAppPermissionRemoveCommand_instances, _SpoSiteAppPermissionRemoveCommand_initTelemetry, _SpoSiteAppPermissionRemoveCommand_initOptions, _SpoSiteAppPermissionRemoveCommand_initValidators;
|
|
16
|
+
var _SpoSiteAppPermissionRemoveCommand_instances, _SpoSiteAppPermissionRemoveCommand_initTelemetry, _SpoSiteAppPermissionRemoveCommand_initOptions, _SpoSiteAppPermissionRemoveCommand_initValidators, _SpoSiteAppPermissionRemoveCommand_initOptionSets;
|
|
17
17
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
18
18
|
const cli_1 = require("../../../../cli");
|
|
19
19
|
const request_1 = require("../../../../request");
|
|
@@ -28,6 +28,7 @@ class SpoSiteAppPermissionRemoveCommand extends GraphCommand_1.default {
|
|
|
28
28
|
__classPrivateFieldGet(this, _SpoSiteAppPermissionRemoveCommand_instances, "m", _SpoSiteAppPermissionRemoveCommand_initTelemetry).call(this);
|
|
29
29
|
__classPrivateFieldGet(this, _SpoSiteAppPermissionRemoveCommand_instances, "m", _SpoSiteAppPermissionRemoveCommand_initOptions).call(this);
|
|
30
30
|
__classPrivateFieldGet(this, _SpoSiteAppPermissionRemoveCommand_instances, "m", _SpoSiteAppPermissionRemoveCommand_initValidators).call(this);
|
|
31
|
+
__classPrivateFieldGet(this, _SpoSiteAppPermissionRemoveCommand_instances, "m", _SpoSiteAppPermissionRemoveCommand_initOptionSets).call(this);
|
|
31
32
|
}
|
|
32
33
|
get name() {
|
|
33
34
|
return commands_1.default.SITE_APPPERMISSION_REMOVE;
|
|
@@ -156,19 +157,13 @@ _SpoSiteAppPermissionRemoveCommand_instances = new WeakSet(), _SpoSiteAppPermiss
|
|
|
156
157
|
});
|
|
157
158
|
}, _SpoSiteAppPermissionRemoveCommand_initValidators = function _SpoSiteAppPermissionRemoveCommand_initValidators() {
|
|
158
159
|
this.validators.push((args) => __awaiter(this, void 0, void 0, function* () {
|
|
159
|
-
if (!args.options.appId && !args.options.appDisplayName && !args.options.permissionId) {
|
|
160
|
-
return `Specify appId, appDisplayName, or permissionId. One is required`;
|
|
161
|
-
}
|
|
162
|
-
if ((args.options.appId && args.options.appDisplayName) ||
|
|
163
|
-
(args.options.appId && args.options.permissionId) ||
|
|
164
|
-
(args.options.permissionId && args.options.appDisplayName)) {
|
|
165
|
-
return 'Use either appId, appDisplayName, or permissionId, but not multiple';
|
|
166
|
-
}
|
|
167
160
|
if (args.options.appId && !utils_1.validation.isValidGuid(args.options.appId)) {
|
|
168
161
|
return `${args.options.appId} is not a valid GUID`;
|
|
169
162
|
}
|
|
170
163
|
return utils_1.validation.isValidSharePointUrl(args.options.siteUrl);
|
|
171
164
|
}));
|
|
165
|
+
}, _SpoSiteAppPermissionRemoveCommand_initOptionSets = function _SpoSiteAppPermissionRemoveCommand_initOptionSets() {
|
|
166
|
+
this.optionSets.push(['appId', 'appDisplayName', 'permissionId']);
|
|
172
167
|
};
|
|
173
168
|
module.exports = new SpoSiteAppPermissionRemoveCommand();
|
|
174
169
|
//# sourceMappingURL=site-apppermission-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 _SpoSiteAppPermissionSetCommand_instances, _SpoSiteAppPermissionSetCommand_initTelemetry, _SpoSiteAppPermissionSetCommand_initOptions, _SpoSiteAppPermissionSetCommand_initValidators;
|
|
16
|
+
var _SpoSiteAppPermissionSetCommand_instances, _SpoSiteAppPermissionSetCommand_initTelemetry, _SpoSiteAppPermissionSetCommand_initOptions, _SpoSiteAppPermissionSetCommand_initValidators, _SpoSiteAppPermissionSetCommand_initOptionSets;
|
|
17
17
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
18
18
|
const request_1 = require("../../../../request");
|
|
19
19
|
const utils_1 = require("../../../../utils");
|
|
@@ -27,6 +27,7 @@ class SpoSiteAppPermissionSetCommand extends GraphCommand_1.default {
|
|
|
27
27
|
__classPrivateFieldGet(this, _SpoSiteAppPermissionSetCommand_instances, "m", _SpoSiteAppPermissionSetCommand_initTelemetry).call(this);
|
|
28
28
|
__classPrivateFieldGet(this, _SpoSiteAppPermissionSetCommand_instances, "m", _SpoSiteAppPermissionSetCommand_initOptions).call(this);
|
|
29
29
|
__classPrivateFieldGet(this, _SpoSiteAppPermissionSetCommand_instances, "m", _SpoSiteAppPermissionSetCommand_initValidators).call(this);
|
|
30
|
+
__classPrivateFieldGet(this, _SpoSiteAppPermissionSetCommand_instances, "m", _SpoSiteAppPermissionSetCommand_initOptionSets).call(this);
|
|
30
31
|
}
|
|
31
32
|
get name() {
|
|
32
33
|
return commands_1.default.SITE_APPPERMISSION_SET;
|
|
@@ -129,9 +130,6 @@ _SpoSiteAppPermissionSetCommand_instances = new WeakSet(), _SpoSiteAppPermission
|
|
|
129
130
|
});
|
|
130
131
|
}, _SpoSiteAppPermissionSetCommand_initValidators = function _SpoSiteAppPermissionSetCommand_initValidators() {
|
|
131
132
|
this.validators.push((args) => __awaiter(this, void 0, void 0, function* () {
|
|
132
|
-
if (!args.options.permissionId && !args.options.appId && !args.options.appDisplayName) {
|
|
133
|
-
return `Specify permissionId, appId or appDisplayName, one is required`;
|
|
134
|
-
}
|
|
135
133
|
if (args.options.appId && !utils_1.validation.isValidGuid(args.options.appId)) {
|
|
136
134
|
return `${args.options.appId} is not a valid GUID`;
|
|
137
135
|
}
|
|
@@ -140,6 +138,8 @@ _SpoSiteAppPermissionSetCommand_instances = new WeakSet(), _SpoSiteAppPermission
|
|
|
140
138
|
}
|
|
141
139
|
return utils_1.validation.isValidSharePointUrl(args.options.siteUrl);
|
|
142
140
|
}));
|
|
141
|
+
}, _SpoSiteAppPermissionSetCommand_initOptionSets = function _SpoSiteAppPermissionSetCommand_initOptionSets() {
|
|
142
|
+
this.optionSets.push(['permissionId', 'appId', 'appDisplayName']);
|
|
143
143
|
};
|
|
144
144
|
module.exports = new SpoSiteAppPermissionSetCommand();
|
|
145
145
|
//# sourceMappingURL=site-apppermission-set.js.map
|