@pnp/cli-microsoft365 5.4.0-beta.d01ee78 → 5.4.0-beta.fdd7cb1
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/.devcontainer/Dockerfile +1 -1
- package/.eslintrc.js +1 -0
- package/dist/m365/aad/commands/o365group/o365group-conversation-post-list.js +4 -19
- package/dist/m365/aad/commands/o365group/o365group-get.js +3 -9
- package/dist/m365/base/PlannerCommand.js +10 -0
- package/dist/m365/flow/commands/flow-export.js +3 -3
- package/dist/m365/planner/commands/bucket/bucket-add.js +4 -16
- package/dist/m365/planner/commands/bucket/bucket-get.js +4 -18
- package/dist/m365/planner/commands/bucket/bucket-list.js +4 -17
- package/dist/m365/planner/commands/bucket/bucket-remove.js +4 -18
- package/dist/m365/planner/commands/bucket/bucket-set.js +4 -18
- package/dist/m365/planner/commands/plan/plan-add.js +4 -16
- package/dist/m365/planner/commands/plan/plan-details-get.js +4 -19
- package/dist/m365/planner/commands/plan/plan-get.js +4 -17
- package/dist/m365/planner/commands/plan/plan-list.js +4 -17
- package/dist/m365/planner/commands/task/task-add.js +4 -16
- package/dist/m365/planner/commands/task/task-checklistitem-add.js +89 -0
- package/dist/m365/planner/commands/task/task-get.js +40 -29
- package/dist/m365/planner/commands/task/task-list.js +4 -16
- package/dist/m365/planner/commands/task/task-remove.js +201 -0
- package/dist/m365/planner/commands/task/task-set.js +4 -16
- package/dist/m365/planner/commands/tenant/tenant-settings-list.js +33 -0
- package/dist/m365/planner/commands.js +5 -2
- package/dist/m365/spo/commands/contenttype/contenttype-add.js +1 -1
- package/dist/m365/spo/commands/contenttype/contenttype-field-remove.js +1 -1
- package/dist/m365/spo/commands/contenttype/contenttype-get.js +1 -1
- package/dist/m365/spo/commands/eventreceiver/eventreceiver-get.js +3 -3
- package/dist/m365/spo/commands/eventreceiver/eventreceiver-list.js +102 -0
- package/dist/m365/spo/commands/field/field-add.js +1 -1
- package/dist/m365/spo/commands/field/field-get.js +5 -5
- package/dist/m365/spo/commands/field/field-list.js +3 -3
- package/dist/m365/spo/commands/field/field-remove.js +5 -5
- package/dist/m365/spo/commands/file/file-sharinginfo-get.js +1 -1
- package/dist/m365/spo/commands/list/list-contenttype-add.js +3 -3
- package/dist/m365/spo/commands/list/list-contenttype-default-set.js +2 -2
- package/dist/m365/spo/commands/list/list-contenttype-list.js +3 -3
- package/dist/m365/spo/commands/list/list-contenttype-remove.js +3 -3
- package/dist/m365/spo/commands/list/list-get.js +2 -2
- package/dist/m365/spo/commands/list/list-label-get.js +3 -3
- package/dist/m365/spo/commands/list/list-label-set.js +2 -2
- package/dist/m365/spo/commands/list/list-remove.js +2 -2
- package/dist/m365/spo/commands/list/list-roleinheritance-break.js +2 -2
- package/dist/m365/spo/commands/list/list-roleinheritance-reset.js +2 -2
- package/dist/m365/spo/commands/list/list-sitescript-get.js +3 -3
- package/dist/m365/spo/commands/list/list-view-add.js +3 -3
- package/dist/m365/spo/commands/list/list-view-field-add.js +2 -2
- package/dist/m365/spo/commands/list/list-view-field-remove.js +2 -2
- package/dist/m365/spo/commands/list/list-view-field-set.js +2 -2
- package/dist/m365/spo/commands/list/list-view-get.js +4 -4
- package/dist/m365/spo/commands/list/list-view-list.js +3 -3
- package/dist/m365/spo/commands/list/list-view-remove.js +3 -3
- package/dist/m365/spo/commands/list/list-view-set.js +3 -3
- package/dist/m365/spo/commands/list/list-webhook-add.js +3 -3
- package/dist/m365/spo/commands/list/list-webhook-get.js +3 -3
- package/dist/m365/spo/commands/list/list-webhook-list.js +5 -5
- package/dist/m365/spo/commands/list/list-webhook-remove.js +4 -4
- package/dist/m365/spo/commands/list/list-webhook-set.js +3 -3
- package/dist/m365/spo/commands/listitem/listitem-add.js +2 -2
- package/dist/m365/spo/commands/listitem/listitem-attachment-list.js +2 -2
- package/dist/m365/spo/commands/listitem/listitem-get.js +2 -2
- package/dist/m365/spo/commands/listitem/listitem-isrecord.js +2 -2
- package/dist/m365/spo/commands/listitem/listitem-list.js +31 -11
- package/dist/m365/spo/commands/listitem/listitem-record-declare.js +2 -2
- package/dist/m365/spo/commands/listitem/listitem-record-undeclare.js +2 -2
- package/dist/m365/spo/commands/listitem/listitem-remove.js +2 -2
- package/dist/m365/spo/commands/listitem/listitem-roleinheritance-break.js +2 -2
- package/dist/m365/spo/commands/listitem/listitem-roleinheritance-reset.js +2 -2
- package/dist/m365/spo/commands/listitem/listitem-set.js +2 -2
- package/dist/m365/spo/commands/roledefinition/roledefinition-remove.js +82 -0
- package/dist/m365/spo/commands/site/site-remove.js +23 -37
- package/dist/m365/spo/commands.js +2 -0
- package/dist/m365/teams/commands/app/app-list.js +6 -20
- package/dist/m365/teams/commands/channel/channel-get.js +6 -19
- package/dist/m365/teams/commands/channel/channel-list.js +6 -18
- package/dist/m365/teams/commands/channel/channel-member-add.js +7 -18
- package/dist/m365/teams/commands/channel/channel-member-list.js +6 -19
- package/dist/m365/teams/commands/channel/channel-member-remove.js +6 -19
- package/dist/m365/teams/commands/channel/channel-member-set.js +6 -19
- package/dist/m365/teams/commands/tab/tab-get.js +6 -19
- package/dist/m365/teams/commands/team/team-add.js +2 -7
- package/dist/m365/teams/commands/team/team-get.js +6 -19
- package/dist/utils/aadGroup.js +57 -0
- package/dist/utils/index.js +2 -0
- package/dist/utils/validation.js +12 -2
- package/docs/docs/cmd/file/file-list.md +4 -4
- package/docs/docs/cmd/planner/bucket/bucket-set.md +4 -4
- package/docs/docs/cmd/planner/plan/plan-details-get.md +2 -2
- package/docs/docs/cmd/planner/plan/plan-get.md +4 -4
- package/docs/docs/cmd/planner/task/task-checklistitem-add.md +36 -0
- package/docs/docs/cmd/planner/task/task-get.md +3 -0
- package/docs/docs/cmd/planner/task/task-remove.md +78 -0
- package/docs/docs/cmd/planner/task/task-set.md +2 -2
- package/docs/docs/cmd/planner/tenant/tenant-settings-list.md +28 -0
- package/docs/docs/cmd/spo/eventreceiver/eventreceiver-list.md +64 -0
- package/docs/docs/cmd/spo/file/file-checkout.md +1 -1
- package/docs/docs/cmd/spo/listitem/listitem-list.md +16 -10
- package/docs/docs/cmd/spo/roledefinition/roledefinition-remove.md +36 -0
- package/package.json +12 -7
- package/dist/m365/planner/commands/task/task-details-get.js +0 -45
- package/docs/docs/cmd/planner/task/task-details-get.md +0 -24
|
@@ -37,10 +37,10 @@ class SpoFieldRemoveCommand extends SpoCommand_1.default {
|
|
|
37
37
|
}
|
|
38
38
|
let fieldRestUrl = '';
|
|
39
39
|
if (fieldId) {
|
|
40
|
-
fieldRestUrl = `/getbyid('${
|
|
40
|
+
fieldRestUrl = `/getbyid('${utils_1.formatting.encodeQueryParameter(fieldId)}')`;
|
|
41
41
|
}
|
|
42
42
|
else {
|
|
43
|
-
fieldRestUrl = `/getbyinternalnameortitle('${
|
|
43
|
+
fieldRestUrl = `/getbyinternalnameortitle('${utils_1.formatting.encodeQueryParameter(fieldTitle)}')`;
|
|
44
44
|
}
|
|
45
45
|
const requestOptions = {
|
|
46
46
|
url: `${args.options.webUrl}/_api/web/${listRestUrl}fields${fieldRestUrl}`,
|
|
@@ -57,14 +57,14 @@ class SpoFieldRemoveCommand extends SpoCommand_1.default {
|
|
|
57
57
|
const prepareRemoval = () => {
|
|
58
58
|
let listRestUrl = '';
|
|
59
59
|
if (args.options.listId) {
|
|
60
|
-
listRestUrl = `lists(guid'${
|
|
60
|
+
listRestUrl = `lists(guid'${utils_1.formatting.encodeQueryParameter(args.options.listId)}')/`;
|
|
61
61
|
}
|
|
62
62
|
else if (args.options.listTitle) {
|
|
63
|
-
listRestUrl = `lists/getByTitle('${
|
|
63
|
+
listRestUrl = `lists/getByTitle('${utils_1.formatting.encodeQueryParameter(args.options.listTitle)}')/`;
|
|
64
64
|
}
|
|
65
65
|
else if (args.options.listUrl) {
|
|
66
66
|
const listServerRelativeUrl = utils_1.urlUtil.getServerRelativePath(args.options.webUrl, args.options.listUrl);
|
|
67
|
-
listRestUrl = `GetList('${
|
|
67
|
+
listRestUrl = `GetList('${utils_1.formatting.encodeQueryParameter(listServerRelativeUrl)}')/`;
|
|
68
68
|
}
|
|
69
69
|
if (args.options.group) {
|
|
70
70
|
if (this.verbose) {
|
|
@@ -32,7 +32,7 @@ class SpoFileSharinginfoGetCommand extends SpoCommand_1.default {
|
|
|
32
32
|
logger.logToStderr(`Retrieving sharing information report for the file with item Id ${fileInformation.fileItemId}`);
|
|
33
33
|
}
|
|
34
34
|
const requestOptions = {
|
|
35
|
-
url: `${args.options.webUrl}/_api/web/lists/getbytitle('${fileInformation.libraryName}')/items(${fileInformation.fileItemId})/GetSharingInformation?$select=permissionsInformation&$Expand=permissionsInformation`,
|
|
35
|
+
url: `${args.options.webUrl}/_api/web/lists/getbytitle('${utils_1.formatting.encodeQueryParameter(fileInformation.libraryName)}')/items(${fileInformation.fileItemId})/GetSharingInformation?$select=permissionsInformation&$Expand=permissionsInformation`,
|
|
36
36
|
headers: {
|
|
37
37
|
'accept': 'application/json;odata=nometadata'
|
|
38
38
|
},
|
|
@@ -24,15 +24,15 @@ class SpoListContentTypeAddCommand extends SpoCommand_1.default {
|
|
|
24
24
|
}
|
|
25
25
|
commandAction(logger, args, cb) {
|
|
26
26
|
if (this.verbose) {
|
|
27
|
-
const list = args.options.listId ?
|
|
27
|
+
const list = (args.options.listId ? args.options.listId : args.options.listTitle);
|
|
28
28
|
logger.logToStderr(`Adding content type ${args.options.contentTypeId} to list ${list} in site at ${args.options.webUrl}...`);
|
|
29
29
|
}
|
|
30
30
|
let requestUrl = '';
|
|
31
31
|
if (args.options.listId) {
|
|
32
|
-
requestUrl = `${args.options.webUrl}/_api/web/lists(guid'${
|
|
32
|
+
requestUrl = `${args.options.webUrl}/_api/web/lists(guid'${utils_1.formatting.encodeQueryParameter(args.options.listId)}')/ContentTypes/AddAvailableContentType`;
|
|
33
33
|
}
|
|
34
34
|
else {
|
|
35
|
-
requestUrl = `${args.options.webUrl}/_api/web/lists/GetByTitle('${
|
|
35
|
+
requestUrl = `${args.options.webUrl}/_api/web/lists/GetByTitle('${utils_1.formatting.encodeQueryParameter(args.options.listTitle)}')/ContentTypes/AddAvailableContentType`;
|
|
36
36
|
}
|
|
37
37
|
const requestBody = this.mapRequestBody(args.options);
|
|
38
38
|
const requestOptions = {
|
|
@@ -24,8 +24,8 @@ class SpoListContentTypeDefaultSetCommand extends SpoCommand_1.default {
|
|
|
24
24
|
}
|
|
25
25
|
commandAction(logger, args, cb) {
|
|
26
26
|
const baseUrl = args.options.listId ?
|
|
27
|
-
`${args.options.webUrl}/_api/web/lists(guid'${
|
|
28
|
-
`${args.options.webUrl}/_api/web/lists/GetByTitle('${
|
|
27
|
+
`${args.options.webUrl}/_api/web/lists(guid'${utils_1.formatting.encodeQueryParameter(args.options.listId)}')` :
|
|
28
|
+
`${args.options.webUrl}/_api/web/lists/GetByTitle('${utils_1.formatting.encodeQueryParameter(args.options.listTitle)}')`;
|
|
29
29
|
if (this.verbose) {
|
|
30
30
|
logger.logToStderr('Retrieving content type order...');
|
|
31
31
|
}
|
|
@@ -22,15 +22,15 @@ class SpoListContentTypeListCommand extends SpoCommand_1.default {
|
|
|
22
22
|
}
|
|
23
23
|
commandAction(logger, args, cb) {
|
|
24
24
|
if (this.verbose) {
|
|
25
|
-
const list = args.options.listId ?
|
|
25
|
+
const list = (args.options.listId ? args.options.listId : args.options.listTitle);
|
|
26
26
|
logger.logToStderr(`Retrieving content types information for list ${list} in site at ${args.options.webUrl}...`);
|
|
27
27
|
}
|
|
28
28
|
let requestUrl = '';
|
|
29
29
|
if (args.options.listId) {
|
|
30
|
-
requestUrl = `${args.options.webUrl}/_api/web/lists(guid'${
|
|
30
|
+
requestUrl = `${args.options.webUrl}/_api/web/lists(guid'${utils_1.formatting.encodeQueryParameter(args.options.listId)}')/ContentTypes`;
|
|
31
31
|
}
|
|
32
32
|
else {
|
|
33
|
-
requestUrl = `${args.options.webUrl}/_api/web/lists/GetByTitle('${
|
|
33
|
+
requestUrl = `${args.options.webUrl}/_api/web/lists/GetByTitle('${utils_1.formatting.encodeQueryParameter(args.options.listTitle)}')/ContentTypes`;
|
|
34
34
|
}
|
|
35
35
|
const requestOptions = {
|
|
36
36
|
url: requestUrl,
|
|
@@ -27,15 +27,15 @@ class SpoListContentTypeRemoveCommand extends SpoCommand_1.default {
|
|
|
27
27
|
commandAction(logger, args, cb) {
|
|
28
28
|
const removeContentTypeFromList = () => {
|
|
29
29
|
if (this.verbose) {
|
|
30
|
-
const list = args.options.listId ?
|
|
30
|
+
const list = (args.options.listId ? args.options.listId : args.options.listTitle);
|
|
31
31
|
logger.logToStderr(`Removing content type ${args.options.contentTypeId} from list ${list} in site at ${args.options.webUrl}...`);
|
|
32
32
|
}
|
|
33
33
|
let requestUrl = '';
|
|
34
34
|
if (args.options.listId) {
|
|
35
|
-
requestUrl = `${args.options.webUrl}/_api/web/lists(guid'${
|
|
35
|
+
requestUrl = `${args.options.webUrl}/_api/web/lists(guid'${utils_1.formatting.encodeQueryParameter(args.options.listId)}')/ContentTypes('${encodeURIComponent(args.options.contentTypeId)}')`;
|
|
36
36
|
}
|
|
37
37
|
else {
|
|
38
|
-
requestUrl = `${args.options.webUrl}/_api/web/lists/GetByTitle('${
|
|
38
|
+
requestUrl = `${args.options.webUrl}/_api/web/lists/GetByTitle('${utils_1.formatting.encodeQueryParameter(args.options.listTitle)}')/ContentTypes('${encodeURIComponent(args.options.contentTypeId)}')`;
|
|
39
39
|
}
|
|
40
40
|
const requestOptions = {
|
|
41
41
|
url: requestUrl,
|
|
@@ -25,10 +25,10 @@ class SpoListGetCommand extends SpoCommand_1.default {
|
|
|
25
25
|
}
|
|
26
26
|
let requestUrl = '';
|
|
27
27
|
if (args.options.id) {
|
|
28
|
-
requestUrl = `${args.options.webUrl}/_api/web/lists(guid'${
|
|
28
|
+
requestUrl = `${args.options.webUrl}/_api/web/lists(guid'${utils_1.formatting.encodeQueryParameter(args.options.id)}')`;
|
|
29
29
|
}
|
|
30
30
|
else {
|
|
31
|
-
requestUrl = `${args.options.webUrl}/_api/web/lists/GetByTitle('${
|
|
31
|
+
requestUrl = `${args.options.webUrl}/_api/web/lists/GetByTitle('${utils_1.formatting.encodeQueryParameter(args.options.title)}')`;
|
|
32
32
|
}
|
|
33
33
|
let propertiesSelect = args.options.properties ? `?$select=${encodeURIComponent(args.options.properties)}` : ``;
|
|
34
34
|
propertiesSelect += args.options.withPermissions ? `${args.options.properties ? '&' : '?'}$expand=HasUniqueRoleAssignments,RoleAssignments/Member,RoleAssignments/RoleDefinitionBindings` : ``;
|
|
@@ -19,7 +19,7 @@ class SpoListLabelGetCommand extends SpoCommand_1.default {
|
|
|
19
19
|
}
|
|
20
20
|
commandAction(logger, args, cb) {
|
|
21
21
|
if (this.verbose) {
|
|
22
|
-
const list = args.options.listId ?
|
|
22
|
+
const list = (args.options.listId ? args.options.listId : args.options.listTitle);
|
|
23
23
|
logger.logToStderr(`Getting label set on the list ${list} in site at ${args.options.webUrl}...`);
|
|
24
24
|
}
|
|
25
25
|
let requestUrl = '';
|
|
@@ -27,13 +27,13 @@ class SpoListLabelGetCommand extends SpoCommand_1.default {
|
|
|
27
27
|
if (this.debug) {
|
|
28
28
|
logger.logToStderr(`Retrieving List Url from Id '${args.options.listId}'...`);
|
|
29
29
|
}
|
|
30
|
-
requestUrl = `${args.options.webUrl}/_api/web/lists(guid'${
|
|
30
|
+
requestUrl = `${args.options.webUrl}/_api/web/lists(guid'${utils_1.formatting.encodeQueryParameter(args.options.listId)}')?$expand=RootFolder&$select=RootFolder`;
|
|
31
31
|
}
|
|
32
32
|
else {
|
|
33
33
|
if (this.debug) {
|
|
34
34
|
logger.logToStderr(`Retrieving List Url from Title '${args.options.listTitle}'...`);
|
|
35
35
|
}
|
|
36
|
-
requestUrl = `${args.options.webUrl}/_api/web/lists/GetByTitle('${
|
|
36
|
+
requestUrl = `${args.options.webUrl}/_api/web/lists/GetByTitle('${utils_1.formatting.encodeQueryParameter(args.options.listTitle)}')?$expand=RootFolder&$select=RootFolder`;
|
|
37
37
|
}
|
|
38
38
|
const requestOptions = {
|
|
39
39
|
url: requestUrl,
|
|
@@ -29,10 +29,10 @@ class SpoListLabelSetCommand extends SpoCommand_1.default {
|
|
|
29
29
|
return Promise.resolve(listServerRelativeUrl);
|
|
30
30
|
}
|
|
31
31
|
else if (args.options.listId) {
|
|
32
|
-
listRestUrl = `lists(guid'${
|
|
32
|
+
listRestUrl = `lists(guid'${utils_1.formatting.encodeQueryParameter(args.options.listId)}')/`;
|
|
33
33
|
}
|
|
34
34
|
else {
|
|
35
|
-
listRestUrl = `lists/getByTitle('${
|
|
35
|
+
listRestUrl = `lists/getByTitle('${utils_1.formatting.encodeQueryParameter(args.options.listTitle)}')/`;
|
|
36
36
|
}
|
|
37
37
|
const requestOptions = {
|
|
38
38
|
url: `${args.options.webUrl}/_api/web/${listRestUrl}?$expand=RootFolder&$select=RootFolder`,
|
|
@@ -26,10 +26,10 @@ class SpoListRemoveCommand extends SpoCommand_1.default {
|
|
|
26
26
|
}
|
|
27
27
|
let requestUrl = '';
|
|
28
28
|
if (args.options.id) {
|
|
29
|
-
requestUrl = `${args.options.webUrl}/_api/web/lists(guid'${
|
|
29
|
+
requestUrl = `${args.options.webUrl}/_api/web/lists(guid'${utils_1.formatting.encodeQueryParameter(args.options.id)}')`;
|
|
30
30
|
}
|
|
31
31
|
else {
|
|
32
|
-
requestUrl = `${args.options.webUrl}/_api/web/lists/GetByTitle('${
|
|
32
|
+
requestUrl = `${args.options.webUrl}/_api/web/lists/GetByTitle('${utils_1.formatting.encodeQueryParameter(args.options.title)}')`;
|
|
33
33
|
}
|
|
34
34
|
const requestOptions = {
|
|
35
35
|
url: requestUrl,
|
|
@@ -29,10 +29,10 @@ class SpoListRoleInheritanceBreakCommand extends SpoCommand_1.default {
|
|
|
29
29
|
}
|
|
30
30
|
let requestUrl = `${args.options.webUrl}/_api/web/lists`;
|
|
31
31
|
if (args.options.listId) {
|
|
32
|
-
requestUrl += `(guid'${
|
|
32
|
+
requestUrl += `(guid'${utils_1.formatting.encodeQueryParameter(args.options.listId)}')`;
|
|
33
33
|
}
|
|
34
34
|
else {
|
|
35
|
-
requestUrl += `/getbytitle('${
|
|
35
|
+
requestUrl += `/getbytitle('${utils_1.formatting.encodeQueryParameter(args.options.listTitle)}')`;
|
|
36
36
|
}
|
|
37
37
|
let keepExistingPermissions = true;
|
|
38
38
|
if (args.options.clearExistingPermissions) {
|
|
@@ -28,10 +28,10 @@ class SpoListRoleInheritanceResetCommand extends SpoCommand_1.default {
|
|
|
28
28
|
}
|
|
29
29
|
let requestUrl = `${args.options.webUrl}/_api/web/lists`;
|
|
30
30
|
if (args.options.listId) {
|
|
31
|
-
requestUrl += `(guid'${
|
|
31
|
+
requestUrl += `(guid'${utils_1.formatting.encodeQueryParameter(args.options.listId)}')`;
|
|
32
32
|
}
|
|
33
33
|
else {
|
|
34
|
-
requestUrl += `/getbytitle('${
|
|
34
|
+
requestUrl += `/getbytitle('${utils_1.formatting.encodeQueryParameter(args.options.listTitle)}')`;
|
|
35
35
|
}
|
|
36
36
|
const requestOptions = {
|
|
37
37
|
url: `${requestUrl}/resetroleinheritance`,
|
|
@@ -20,7 +20,7 @@ class SpoListSiteScriptGetCommand extends SpoCommand_1.default {
|
|
|
20
20
|
}
|
|
21
21
|
commandAction(logger, args, cb) {
|
|
22
22
|
if (this.verbose) {
|
|
23
|
-
const list = args.options.listId ?
|
|
23
|
+
const list = (args.options.listId ? args.options.listId : args.options.listTitle);
|
|
24
24
|
logger.logToStderr(`Extracting Site Script from list ${list} in site at ${args.options.webUrl}...`);
|
|
25
25
|
}
|
|
26
26
|
let requestUrl = '';
|
|
@@ -28,13 +28,13 @@ class SpoListSiteScriptGetCommand extends SpoCommand_1.default {
|
|
|
28
28
|
if (this.debug) {
|
|
29
29
|
logger.logToStderr(`Retrieving List Url from Id '${args.options.listId}'...`);
|
|
30
30
|
}
|
|
31
|
-
requestUrl = `${args.options.webUrl}/_api/web/lists(guid'${
|
|
31
|
+
requestUrl = `${args.options.webUrl}/_api/web/lists(guid'${utils_1.formatting.encodeQueryParameter(args.options.listId)}')?$expand=RootFolder`;
|
|
32
32
|
}
|
|
33
33
|
else {
|
|
34
34
|
if (this.debug) {
|
|
35
35
|
logger.logToStderr(`Retrieving List Url from Title '${args.options.listTitle}'...`);
|
|
36
36
|
}
|
|
37
|
-
requestUrl = `${args.options.webUrl}/_api/web/lists/GetByTitle('${
|
|
37
|
+
requestUrl = `${args.options.webUrl}/_api/web/lists/GetByTitle('${utils_1.formatting.encodeQueryParameter(args.options.listTitle)}')?$expand=RootFolder`;
|
|
38
38
|
}
|
|
39
39
|
const requestOptions = {
|
|
40
40
|
url: requestUrl,
|
|
@@ -57,13 +57,13 @@ class SpoListViewAddCommand extends SpoCommand_1.default {
|
|
|
57
57
|
getRestUrl(options) {
|
|
58
58
|
let result = `${options.webUrl}/_api/web/`;
|
|
59
59
|
if (options.listId) {
|
|
60
|
-
result += `lists(guid'${
|
|
60
|
+
result += `lists(guid'${utils_1.formatting.encodeQueryParameter(options.listId)}')`;
|
|
61
61
|
}
|
|
62
62
|
else if (options.listTitle) {
|
|
63
|
-
result += `lists/getByTitle('${
|
|
63
|
+
result += `lists/getByTitle('${utils_1.formatting.encodeQueryParameter(options.listTitle)}')`;
|
|
64
64
|
}
|
|
65
65
|
else if (options.listUrl) {
|
|
66
|
-
result += `GetList('${
|
|
66
|
+
result += `GetList('${utils_1.formatting.encodeQueryParameter(utils_1.urlUtil.getServerRelativePath(options.webUrl, options.listUrl))}')`;
|
|
67
67
|
}
|
|
68
68
|
result += '/views/add';
|
|
69
69
|
return result;
|
|
@@ -23,7 +23,7 @@ class SpoListViewFieldAddCommand extends SpoCommand_1.default {
|
|
|
23
23
|
return telemetryProps;
|
|
24
24
|
}
|
|
25
25
|
commandAction(logger, args, cb) {
|
|
26
|
-
const listSelector = args.options.listId ? `(guid'${
|
|
26
|
+
const listSelector = args.options.listId ? `(guid'${utils_1.formatting.encodeQueryParameter(args.options.listId)}')` : `/GetByTitle('${utils_1.formatting.encodeQueryParameter(args.options.listTitle)}')`;
|
|
27
27
|
let viewSelector = '';
|
|
28
28
|
let currentField;
|
|
29
29
|
if (this.verbose) {
|
|
@@ -36,7 +36,7 @@ class SpoListViewFieldAddCommand extends SpoCommand_1.default {
|
|
|
36
36
|
logger.logToStderr(`Adding the field ${args.options.fieldId || args.options.fieldTitle} to the view ${args.options.viewId || args.options.viewTitle}...`);
|
|
37
37
|
}
|
|
38
38
|
currentField = field;
|
|
39
|
-
viewSelector = args.options.viewId ? `('${
|
|
39
|
+
viewSelector = args.options.viewId ? `('${utils_1.formatting.encodeQueryParameter(args.options.viewId)}')` : `/GetByTitle('${utils_1.formatting.encodeQueryParameter(args.options.viewTitle)}')`;
|
|
40
40
|
const postRequestUrl = `${args.options.webUrl}/_api/web/lists${listSelector}/views${viewSelector}/viewfields/addviewfield('${field.InternalName}')`;
|
|
41
41
|
const postRequestOptions = {
|
|
42
42
|
url: postRequestUrl,
|
|
@@ -24,7 +24,7 @@ class SpoListViewFieldRemoveCommand extends SpoCommand_1.default {
|
|
|
24
24
|
return telemetryProps;
|
|
25
25
|
}
|
|
26
26
|
commandAction(logger, args, cb) {
|
|
27
|
-
const listSelector = args.options.listId ? `(guid'${
|
|
27
|
+
const listSelector = args.options.listId ? `(guid'${utils_1.formatting.encodeQueryParameter(args.options.listId)}')` : `/GetByTitle('${utils_1.formatting.encodeQueryParameter(args.options.listTitle)}')`;
|
|
28
28
|
const removeFieldFromView = () => {
|
|
29
29
|
if (this.verbose) {
|
|
30
30
|
logger.logToStderr(`Getting field ${args.options.fieldId || args.options.fieldTitle}...`);
|
|
@@ -35,7 +35,7 @@ class SpoListViewFieldRemoveCommand extends SpoCommand_1.default {
|
|
|
35
35
|
if (this.verbose) {
|
|
36
36
|
logger.logToStderr(`Removing field ${args.options.fieldId || args.options.fieldTitle} from view ${args.options.viewId || args.options.viewTitle}...`);
|
|
37
37
|
}
|
|
38
|
-
const viewSelector = args.options.viewId ? `('${
|
|
38
|
+
const viewSelector = args.options.viewId ? `('${utils_1.formatting.encodeQueryParameter(args.options.viewId)}')` : `/GetByTitle('${utils_1.formatting.encodeQueryParameter(args.options.viewTitle)}')`;
|
|
39
39
|
const postRequestUrl = `${args.options.webUrl}/_api/web/lists${listSelector}/views${viewSelector}/viewfields/removeviewfield('${field.InternalName}')`;
|
|
40
40
|
const postRequestOptions = {
|
|
41
41
|
url: postRequestUrl,
|
|
@@ -22,8 +22,8 @@ class SpoListViewFieldSetCommand extends SpoCommand_1.default {
|
|
|
22
22
|
return telemetryProps;
|
|
23
23
|
}
|
|
24
24
|
commandAction(logger, args, cb) {
|
|
25
|
-
const listSelector = args.options.listId ? `(guid'${
|
|
26
|
-
const viewSelector = args.options.viewId ? `('${
|
|
25
|
+
const listSelector = args.options.listId ? `(guid'${utils_1.formatting.encodeQueryParameter(args.options.listId)}')` : `/GetByTitle('${utils_1.formatting.encodeQueryParameter(args.options.listTitle)}')`;
|
|
26
|
+
const viewSelector = args.options.viewId ? `('${utils_1.formatting.encodeQueryParameter(args.options.viewId)}')` : `/GetByTitle('${utils_1.formatting.encodeQueryParameter(args.options.viewTitle)}')`;
|
|
27
27
|
if (this.verbose) {
|
|
28
28
|
logger.logToStderr(`Getting field ${args.options.fieldId || args.options.fieldTitle}...`);
|
|
29
29
|
}
|
|
@@ -24,16 +24,16 @@ class SpoListViewGetCommand extends SpoCommand_1.default {
|
|
|
24
24
|
const baseRestUrl = `${args.options.webUrl}/_api/web`;
|
|
25
25
|
let listRestUrl = '';
|
|
26
26
|
if (args.options.listId) {
|
|
27
|
-
listRestUrl = `/lists(guid'${
|
|
27
|
+
listRestUrl = `/lists(guid'${utils_1.formatting.encodeQueryParameter(args.options.listId)}')`;
|
|
28
28
|
}
|
|
29
29
|
else if (args.options.listTitle) {
|
|
30
|
-
listRestUrl = `/lists/getByTitle('${
|
|
30
|
+
listRestUrl = `/lists/getByTitle('${utils_1.formatting.encodeQueryParameter(args.options.listTitle)}')`;
|
|
31
31
|
}
|
|
32
32
|
else if (args.options.listUrl) {
|
|
33
33
|
const listServerRelativeUrl = utils_1.urlUtil.getServerRelativePath(args.options.webUrl, args.options.listUrl);
|
|
34
|
-
listRestUrl = `/GetList('${
|
|
34
|
+
listRestUrl = `/GetList('${utils_1.formatting.encodeQueryParameter(listServerRelativeUrl)}')`;
|
|
35
35
|
}
|
|
36
|
-
const viewRestUrl = `/views/${(args.options.viewId ? `getById('${
|
|
36
|
+
const viewRestUrl = `/views/${(args.options.viewId ? `getById('${utils_1.formatting.encodeQueryParameter(args.options.viewId)}')` : `getByTitle('${utils_1.formatting.encodeQueryParameter(args.options.viewTitle)}')`)}`;
|
|
37
37
|
const requestOptions = {
|
|
38
38
|
url: `${baseRestUrl}${listRestUrl}${viewRestUrl}`,
|
|
39
39
|
headers: {
|
|
@@ -22,15 +22,15 @@ class SpoListViewListCommand extends SpoCommand_1.default {
|
|
|
22
22
|
}
|
|
23
23
|
commandAction(logger, args, cb) {
|
|
24
24
|
if (this.verbose) {
|
|
25
|
-
const list = args.options.listId ?
|
|
25
|
+
const list = (args.options.listId ? args.options.listId : args.options.listTitle);
|
|
26
26
|
logger.logToStderr(`Retrieving views information for list ${list} in site at ${args.options.webUrl}...`);
|
|
27
27
|
}
|
|
28
28
|
let requestUrl = '';
|
|
29
29
|
if (args.options.listId) {
|
|
30
|
-
requestUrl = `${args.options.webUrl}/_api/web/lists(guid'${
|
|
30
|
+
requestUrl = `${args.options.webUrl}/_api/web/lists(guid'${utils_1.formatting.encodeQueryParameter(args.options.listId)}')/views`;
|
|
31
31
|
}
|
|
32
32
|
else {
|
|
33
|
-
requestUrl = `${args.options.webUrl}/_api/web/lists/GetByTitle('${
|
|
33
|
+
requestUrl = `${args.options.webUrl}/_api/web/lists/GetByTitle('${utils_1.formatting.encodeQueryParameter(args.options.listTitle)}')/views`;
|
|
34
34
|
}
|
|
35
35
|
const requestOptions = {
|
|
36
36
|
url: requestUrl,
|
|
@@ -24,12 +24,12 @@ class SpoListViewRemoveCommand extends SpoCommand_1.default {
|
|
|
24
24
|
commandAction(logger, args, cb) {
|
|
25
25
|
const removeViewFromList = () => {
|
|
26
26
|
if (this.verbose) {
|
|
27
|
-
const list = args.options.listId ?
|
|
27
|
+
const list = (args.options.listId ? args.options.listId : args.options.listTitle);
|
|
28
28
|
logger.logToStderr(`Removing view ${args.options.viewId || args.options.viewTitle} from list ${list} in site at ${args.options.webUrl}...`);
|
|
29
29
|
}
|
|
30
30
|
let requestUrl = '';
|
|
31
|
-
const listSelector = args.options.listId ? `(guid'${
|
|
32
|
-
const viewSelector = args.options.viewId ? `(guid'${
|
|
31
|
+
const listSelector = args.options.listId ? `(guid'${utils_1.formatting.encodeQueryParameter(args.options.listId)}')` : `/GetByTitle('${utils_1.formatting.encodeQueryParameter(args.options.listTitle)}')`;
|
|
32
|
+
const viewSelector = args.options.viewId ? `(guid'${utils_1.formatting.encodeQueryParameter(args.options.viewId)}')` : `/GetByTitle('${utils_1.formatting.encodeQueryParameter(args.options.viewTitle)}')`;
|
|
33
33
|
requestUrl = `${args.options.webUrl}/_api/web/lists${listSelector}/views${viewSelector}`;
|
|
34
34
|
const requestOptions = {
|
|
35
35
|
url: requestUrl,
|
|
@@ -25,9 +25,9 @@ class SpoListViewSetCommand extends SpoCommand_1.default {
|
|
|
25
25
|
commandAction(logger, args, cb) {
|
|
26
26
|
const baseRestUrl = `${args.options.webUrl}/_api/web/lists`;
|
|
27
27
|
const listRestUrl = args.options.listId ?
|
|
28
|
-
`(guid'${
|
|
29
|
-
: `/getByTitle('${
|
|
30
|
-
const viewRestUrl = `/views/${(args.options.viewId ? `getById('${
|
|
28
|
+
`(guid'${utils_1.formatting.encodeQueryParameter(args.options.listId)}')`
|
|
29
|
+
: `/getByTitle('${utils_1.formatting.encodeQueryParameter(args.options.listTitle)}')`;
|
|
30
|
+
const viewRestUrl = `/views/${(args.options.viewId ? `getById('${utils_1.formatting.encodeQueryParameter(args.options.viewId)}')` : `getByTitle('${utils_1.formatting.encodeQueryParameter(args.options.viewTitle)}')`)}`;
|
|
31
31
|
utils_1.spo
|
|
32
32
|
.getRequestDigest(args.options.webUrl)
|
|
33
33
|
.then((res) => {
|
|
@@ -25,14 +25,14 @@ class SpoListWebhookAddCommand extends SpoCommand_1.default {
|
|
|
25
25
|
}
|
|
26
26
|
commandAction(logger, args, cb) {
|
|
27
27
|
if (this.verbose) {
|
|
28
|
-
logger.logToStderr(`Adding webhook to list ${args.options.listId ?
|
|
28
|
+
logger.logToStderr(`Adding webhook to list ${args.options.listId ? args.options.listId : args.options.listTitle} located at site ${args.options.webUrl}...`);
|
|
29
29
|
}
|
|
30
30
|
let requestUrl = '';
|
|
31
31
|
if (args.options.listId) {
|
|
32
|
-
requestUrl = `${args.options.webUrl}/_api/web/lists(guid'${
|
|
32
|
+
requestUrl = `${args.options.webUrl}/_api/web/lists(guid'${utils_1.formatting.encodeQueryParameter(args.options.listId)}')/Subscriptions')`;
|
|
33
33
|
}
|
|
34
34
|
else {
|
|
35
|
-
requestUrl = `${args.options.webUrl}/_api/web/lists/GetByTitle('${
|
|
35
|
+
requestUrl = `${args.options.webUrl}/_api/web/lists/GetByTitle('${utils_1.formatting.encodeQueryParameter(args.options.listTitle)}')/Subscriptions')`;
|
|
36
36
|
}
|
|
37
37
|
const requestBody = {};
|
|
38
38
|
requestBody.resource = args.options.listId ? args.options.listId : args.options.listTitle;
|
|
@@ -20,15 +20,15 @@ class SpoListWebhookGetCommand extends SpoCommand_1.default {
|
|
|
20
20
|
}
|
|
21
21
|
commandAction(logger, args, cb) {
|
|
22
22
|
if (this.verbose) {
|
|
23
|
-
const list = args.options.listId ?
|
|
23
|
+
const list = (args.options.listId ? args.options.listId : args.options.listTitle);
|
|
24
24
|
logger.logToStderr(`Retrieving information for webhook ${args.options.id} belonging to list ${list} in site at ${args.options.webUrl}...`);
|
|
25
25
|
}
|
|
26
26
|
let requestUrl = '';
|
|
27
27
|
if (args.options.listId) {
|
|
28
|
-
requestUrl = `${args.options.webUrl}/_api/web/lists(guid'${
|
|
28
|
+
requestUrl = `${args.options.webUrl}/_api/web/lists(guid'${utils_1.formatting.encodeQueryParameter(args.options.listId)}')/Subscriptions('${utils_1.formatting.encodeQueryParameter(args.options.id)}')`;
|
|
29
29
|
}
|
|
30
30
|
else {
|
|
31
|
-
requestUrl = `${args.options.webUrl}/_api/web/lists/GetByTitle('${
|
|
31
|
+
requestUrl = `${args.options.webUrl}/_api/web/lists/GetByTitle('${utils_1.formatting.encodeQueryParameter(args.options.listTitle)}')/Subscriptions('${utils_1.formatting.encodeQueryParameter(args.options.id)}')`;
|
|
32
32
|
}
|
|
33
33
|
const requestOptions = {
|
|
34
34
|
url: requestUrl,
|
|
@@ -31,21 +31,21 @@ class SpoListWebhookListCommand extends SpoCommand_1.default {
|
|
|
31
31
|
logger.logToStderr(chalk.yellow(`Option 'id' is deprecated. Please use 'listId' instead`));
|
|
32
32
|
}
|
|
33
33
|
if (this.verbose) {
|
|
34
|
-
const list = args.options.id ?
|
|
34
|
+
const list = args.options.id ? utils_1.formatting.encodeQueryParameter(args.options.id) : (args.options.listId ? utils_1.formatting.encodeQueryParameter(args.options.listId) : (args.options.title ? utils_1.formatting.encodeQueryParameter(args.options.title) : utils_1.formatting.encodeQueryParameter(args.options.listTitle)));
|
|
35
35
|
logger.logToStderr(`Retrieving webhook information for list ${list} in site at ${args.options.webUrl}...`);
|
|
36
36
|
}
|
|
37
37
|
let requestUrl = '';
|
|
38
38
|
if (args.options.id) {
|
|
39
|
-
requestUrl = `${args.options.webUrl}/_api/web/lists(guid'${
|
|
39
|
+
requestUrl = `${args.options.webUrl}/_api/web/lists(guid'${utils_1.formatting.encodeQueryParameter(args.options.id)}')/Subscriptions`;
|
|
40
40
|
}
|
|
41
41
|
else if (args.options.listId) {
|
|
42
|
-
requestUrl = `${args.options.webUrl}/_api/web/lists(guid'${
|
|
42
|
+
requestUrl = `${args.options.webUrl}/_api/web/lists(guid'${utils_1.formatting.encodeQueryParameter(args.options.listId)}')/Subscriptions`;
|
|
43
43
|
}
|
|
44
44
|
else if (args.options.listTitle) {
|
|
45
|
-
requestUrl = `${args.options.webUrl}/_api/web/lists/GetByTitle('${
|
|
45
|
+
requestUrl = `${args.options.webUrl}/_api/web/lists/GetByTitle('${utils_1.formatting.encodeQueryParameter(args.options.listTitle)}')/Subscriptions`;
|
|
46
46
|
}
|
|
47
47
|
else {
|
|
48
|
-
requestUrl = `${args.options.webUrl}/_api/web/lists/GetByTitle('${
|
|
48
|
+
requestUrl = `${args.options.webUrl}/_api/web/lists/GetByTitle('${utils_1.formatting.encodeQueryParameter(args.options.title)}')/Subscriptions`;
|
|
49
49
|
}
|
|
50
50
|
const requestOptions = {
|
|
51
51
|
url: requestUrl,
|
|
@@ -21,17 +21,17 @@ class SpoListWebhookRemoveCommand extends SpoCommand_1.default {
|
|
|
21
21
|
return telemetryProps;
|
|
22
22
|
}
|
|
23
23
|
commandAction(logger, args, cb) {
|
|
24
|
-
const list = args.options.listId ? encodeURIComponent(args.options.listId) : encodeURIComponent(args.options.listTitle);
|
|
25
24
|
const removeWebhook = () => {
|
|
26
25
|
if (this.verbose) {
|
|
26
|
+
const list = (args.options.listId ? args.options.listId : args.options.listTitle);
|
|
27
27
|
logger.logToStderr(`Webhook ${args.options.id} is about to be removed from list ${list} located at site ${args.options.webUrl}...`);
|
|
28
28
|
}
|
|
29
29
|
let requestUrl = '';
|
|
30
30
|
if (args.options.listId) {
|
|
31
|
-
requestUrl = `${args.options.webUrl}/_api/web/lists(guid'${
|
|
31
|
+
requestUrl = `${args.options.webUrl}/_api/web/lists(guid'${utils_1.formatting.encodeQueryParameter(args.options.listId)}')/Subscriptions('${utils_1.formatting.encodeQueryParameter(args.options.id)}')`;
|
|
32
32
|
}
|
|
33
33
|
else {
|
|
34
|
-
requestUrl = `${args.options.webUrl}/_api/web/lists/GetByTitle('${
|
|
34
|
+
requestUrl = `${args.options.webUrl}/_api/web/lists/GetByTitle('${utils_1.formatting.encodeQueryParameter(args.options.listTitle)}')/Subscriptions('${utils_1.formatting.encodeQueryParameter(args.options.id)}')`;
|
|
35
35
|
}
|
|
36
36
|
const requestOptions = {
|
|
37
37
|
url: requestUrl,
|
|
@@ -58,7 +58,7 @@ class SpoListWebhookRemoveCommand extends SpoCommand_1.default {
|
|
|
58
58
|
type: 'confirm',
|
|
59
59
|
name: 'continue',
|
|
60
60
|
default: false,
|
|
61
|
-
message: `Are you sure you want to remove webhook ${args.options.id} from list ${
|
|
61
|
+
message: `Are you sure you want to remove webhook ${args.options.id} from list ${args.options.listTitle || args.options.listId} located at site ${args.options.webUrl}?`
|
|
62
62
|
}, (result) => {
|
|
63
63
|
if (!result.continue) {
|
|
64
64
|
cb();
|
|
@@ -22,14 +22,14 @@ class SpoListWebhookSetCommand extends SpoCommand_1.default {
|
|
|
22
22
|
}
|
|
23
23
|
commandAction(logger, args, cb) {
|
|
24
24
|
if (this.verbose) {
|
|
25
|
-
logger.logToStderr(`Updating webhook ${args.options.id} belonging to list ${args.options.listId ?
|
|
25
|
+
logger.logToStderr(`Updating webhook ${args.options.id} belonging to list ${args.options.listId ? args.options.listId : args.options.listTitle} located at site ${args.options.webUrl}...`);
|
|
26
26
|
}
|
|
27
27
|
let requestUrl = '';
|
|
28
28
|
if (args.options.listId) {
|
|
29
|
-
requestUrl = `${args.options.webUrl}/_api/web/lists(guid'${
|
|
29
|
+
requestUrl = `${args.options.webUrl}/_api/web/lists(guid'${utils_1.formatting.encodeQueryParameter(args.options.listId)}')/Subscriptions('${utils_1.formatting.encodeQueryParameter(args.options.id)}')`;
|
|
30
30
|
}
|
|
31
31
|
else {
|
|
32
|
-
requestUrl = `${args.options.webUrl}/_api/web/lists/GetByTitle('${
|
|
32
|
+
requestUrl = `${args.options.webUrl}/_api/web/lists/GetByTitle('${utils_1.formatting.encodeQueryParameter(args.options.listTitle)}')/Subscriptions('${utils_1.formatting.encodeQueryParameter(args.options.id)}')`;
|
|
33
33
|
}
|
|
34
34
|
const requestBody = {};
|
|
35
35
|
if (args.options.notificationUrl) {
|
|
@@ -26,8 +26,8 @@ class SpoListItemAddCommand extends SpoCommand_1.default {
|
|
|
26
26
|
const listIdArgument = args.options.listId || '';
|
|
27
27
|
const listTitleArgument = args.options.listTitle || '';
|
|
28
28
|
const listRestUrl = (args.options.listId ?
|
|
29
|
-
`${args.options.webUrl}/_api/web/lists(guid'${
|
|
30
|
-
: `${args.options.webUrl}/_api/web/lists/getByTitle('${
|
|
29
|
+
`${args.options.webUrl}/_api/web/lists(guid'${utils_1.formatting.encodeQueryParameter(listIdArgument)}')`
|
|
30
|
+
: `${args.options.webUrl}/_api/web/lists/getByTitle('${utils_1.formatting.encodeQueryParameter(listTitleArgument)}')`);
|
|
31
31
|
let contentTypeName = '';
|
|
32
32
|
let targetFolderServerRelativeUrl = '';
|
|
33
33
|
if (this.verbose) {
|
|
@@ -24,8 +24,8 @@ class SpoListItemAttachmentListCommand extends SpoCommand_1.default {
|
|
|
24
24
|
const listIdArgument = args.options.listId || '';
|
|
25
25
|
const listTitleArgument = args.options.listTitle || '';
|
|
26
26
|
const listRestUrl = (args.options.listId ?
|
|
27
|
-
`${args.options.webUrl}/_api/web/lists(guid'${
|
|
28
|
-
: `${args.options.webUrl}/_api/web/lists/getByTitle('${
|
|
27
|
+
`${args.options.webUrl}/_api/web/lists(guid'${utils_1.formatting.encodeQueryParameter(listIdArgument)}')`
|
|
28
|
+
: `${args.options.webUrl}/_api/web/lists/getByTitle('${utils_1.formatting.encodeQueryParameter(listTitleArgument)}')`);
|
|
29
29
|
const requestOptions = {
|
|
30
30
|
url: `${listRestUrl}/items(${args.options.itemId})?$select=AttachmentFiles&$expand=AttachmentFiles`,
|
|
31
31
|
method: 'GET',
|
|
@@ -24,8 +24,8 @@ class SpoListItemGetCommand extends SpoCommand_1.default {
|
|
|
24
24
|
const listIdArgument = args.options.listId || '';
|
|
25
25
|
const listTitleArgument = args.options.listTitle || '';
|
|
26
26
|
const listRestUrl = (args.options.listId ?
|
|
27
|
-
`${args.options.webUrl}/_api/web/lists(guid'${
|
|
28
|
-
: `${args.options.webUrl}/_api/web/lists/getByTitle('${
|
|
27
|
+
`${args.options.webUrl}/_api/web/lists(guid'${utils_1.formatting.encodeQueryParameter(listIdArgument)}')`
|
|
28
|
+
: `${args.options.webUrl}/_api/web/lists/getByTitle('${utils_1.formatting.encodeQueryParameter(listTitleArgument)}')`);
|
|
29
29
|
const propertiesSelect = args.options.properties ?
|
|
30
30
|
`?$select=${encodeURIComponent(args.options.properties)}` :
|
|
31
31
|
((!args.options.output || args.options.output === 'text') ?
|
|
@@ -25,8 +25,8 @@ class SpoListItemIsRecordCommand extends SpoCommand_1.default {
|
|
|
25
25
|
const listIdArgument = args.options.listId || '';
|
|
26
26
|
const listTitleArgument = args.options.listTitle || '';
|
|
27
27
|
const listRestUrl = (args.options.listId ?
|
|
28
|
-
`${args.options.webUrl}/_api/web/lists(guid'${
|
|
29
|
-
: `${args.options.webUrl}/_api/web/lists/getByTitle('${
|
|
28
|
+
`${args.options.webUrl}/_api/web/lists(guid'${utils_1.formatting.encodeQueryParameter(listIdArgument)}')`
|
|
29
|
+
: `${args.options.webUrl}/_api/web/lists/getByTitle('${utils_1.formatting.encodeQueryParameter(listTitleArgument)}')`);
|
|
30
30
|
let formDigestValue = '';
|
|
31
31
|
let listId = '';
|
|
32
32
|
if (this.debug) {
|