@pnp/cli-microsoft365 6.0.0-beta.1254da3 → 6.0.0-beta.1cd4e45
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 +7 -10
- package/dist/m365/aad/commands/app/app-get.js +3 -2
- package/dist/m365/aad/commands/app/app-remove.js +3 -2
- package/dist/m365/aad/commands/app/app-role-add.js +3 -2
- package/dist/m365/aad/commands/app/app-role-list.js +3 -2
- package/dist/m365/aad/commands/app/app-role-remove.js +3 -2
- package/dist/m365/aad/commands/app/app-set.js +3 -2
- package/dist/m365/aad/commands/approleassignment/approleassignment-add.js +5 -4
- package/dist/m365/aad/commands/approleassignment/approleassignment-list.js +3 -2
- package/dist/m365/aad/commands/approleassignment/approleassignment-remove.js +5 -4
- package/dist/m365/aad/commands/o365group/o365group-conversation-post-list.js +2 -1
- package/dist/m365/aad/commands/o365group/o365group-list.js +3 -2
- package/dist/m365/aad/commands/o365group/o365group-recyclebinitem-list.js +3 -2
- package/dist/m365/aad/commands/o365group/o365group-teamify.js +3 -2
- package/dist/m365/aad/commands/o365group/o365group-user-add.js +2 -1
- package/dist/m365/aad/commands/o365group/o365group-user-remove.js +2 -1
- package/dist/m365/aad/commands/oauth2grant/oauth2grant-list.js +2 -1
- package/dist/m365/aad/commands/oauth2grant/oauth2grant-remove.js +2 -1
- package/dist/m365/aad/commands/oauth2grant/oauth2grant-set.js +2 -1
- package/dist/m365/aad/commands/sp/sp-add.js +3 -2
- package/dist/m365/aad/commands/sp/sp-get.js +3 -2
- package/dist/m365/aad/commands/user/user-get.js +5 -4
- package/dist/m365/aad/commands/user/user-hibp.js +2 -1
- package/dist/m365/aad/commands/user/user-list.js +2 -1
- package/dist/m365/aad/commands/user/user-set.js +2 -1
- package/dist/m365/aad/commands/user/user-signin-list.js +5 -4
- package/dist/m365/base/DateAndPeriodBasedReport.js +3 -2
- package/dist/m365/base/PeriodBasedReport.js +2 -1
- package/dist/m365/booking/commands/business/business-get.js +2 -1
- package/dist/m365/cli/commands/config/config-set.js +1 -0
- package/dist/m365/file/commands/file-list.js +2 -1
- package/dist/m365/flow/commands/environment/environment-get.js +2 -1
- package/dist/m365/flow/commands/flow-disable.js +2 -1
- package/dist/m365/flow/commands/flow-enable.js +2 -1
- package/dist/m365/flow/commands/flow-export.js +5 -4
- package/dist/m365/flow/commands/flow-get.js +2 -1
- package/dist/m365/flow/commands/flow-list.js +2 -1
- package/dist/m365/flow/commands/flow-remove.js +2 -1
- package/dist/m365/flow/commands/run/run-cancel.js +2 -1
- package/dist/m365/flow/commands/run/run-get.js +2 -1
- package/dist/m365/flow/commands/run/run-list.js +2 -1
- package/dist/m365/flow/commands/run/run-resubmit.js +3 -2
- package/dist/m365/outlook/commands/mail/mail-send.js +2 -1
- package/dist/m365/outlook/commands/message/message-list.js +2 -1
- package/dist/m365/outlook/commands/message/message-move.js +2 -1
- package/dist/m365/pa/commands/app/app-get.js +2 -1
- package/dist/m365/pa/commands/app/app-list.js +2 -1
- package/dist/m365/pa/commands/app/app-remove.js +2 -1
- package/dist/m365/pa/commands/connector/connector-export.js +2 -1
- package/dist/m365/pa/commands/connector/connector-list.js +2 -1
- package/dist/m365/pa/commands/environment/environment-get.js +2 -1
- package/dist/m365/planner/commands/task/task-add.js +1 -1
- package/dist/m365/planner/commands/task/task-checklistitem-add.js +3 -2
- package/dist/m365/planner/commands/task/task-checklistitem-list.js +2 -1
- package/dist/m365/planner/commands/task/task-checklistitem-remove.js +2 -1
- package/dist/m365/planner/commands/task/task-get.js +2 -1
- package/dist/m365/planner/commands/task/task-list.js +4 -3
- package/dist/m365/planner/commands/task/task-reference-add.js +2 -2
- package/dist/m365/planner/commands/task/task-reference-list.js +2 -1
- package/dist/m365/planner/commands/task/task-reference-remove.js +1 -1
- package/dist/m365/planner/commands/task/task-set.js +2 -2
- package/dist/m365/pp/commands/gateway/gateway-get.js +2 -1
- package/dist/m365/pp/commands/managementapp/managementapp-add.js +3 -2
- package/dist/m365/pp/commands/solution/solution-list.js +5 -11
- package/dist/m365/search/commands/externalconnection/externalconnection-get.js +3 -2
- package/dist/m365/search/commands/externalconnection/externalconnection-remove.js +3 -2
- package/dist/m365/spo/commands/app/app-get.js +2 -1
- package/dist/m365/spo/commands/app/app-install.js +2 -1
- package/dist/m365/spo/commands/app/app-remove.js +2 -1
- package/dist/m365/spo/commands/app/app-retract.js +2 -1
- package/dist/m365/spo/commands/app/app-teamspackage-download.js +2 -1
- package/dist/m365/spo/commands/app/app-uninstall.js +2 -1
- package/dist/m365/spo/commands/app/app-upgrade.js +2 -1
- package/dist/m365/spo/commands/contenttype/contenttype-field-set.js +2 -2
- package/dist/m365/spo/commands/contenttype/contenttype-get.js +2 -2
- package/dist/m365/spo/commands/contenttype/contenttype-list.js +2 -1
- package/dist/m365/spo/commands/contenttype/contenttype-remove.js +3 -2
- package/dist/m365/spo/commands/customaction/customaction-get.js +3 -2
- package/dist/m365/spo/commands/customaction/customaction-remove.js +3 -2
- package/dist/m365/spo/commands/customaction/customaction-set.js +2 -1
- package/dist/m365/spo/commands/eventreceiver/eventreceiver-list.js +4 -3
- package/dist/m365/spo/commands/file/file-add.js +14 -13
- package/dist/m365/spo/commands/file/file-checkin.js +4 -3
- package/dist/m365/spo/commands/file/file-checkout.js +3 -2
- package/dist/m365/spo/commands/file/file-copy.js +2 -1
- package/dist/m365/spo/commands/file/file-get.js +3 -2
- package/dist/m365/spo/commands/file/file-move.js +2 -1
- package/dist/m365/spo/commands/file/file-remove.js +3 -2
- package/dist/m365/spo/commands/file/file-rename.js +3 -2
- package/dist/m365/spo/commands/file/file-sharinginfo-get.js +1 -1
- package/dist/m365/spo/commands/file/file-version-clear.js +114 -0
- package/dist/m365/spo/commands/file/file-version-get.js +104 -0
- package/dist/m365/spo/commands/file/file-version-list.js +1 -1
- package/dist/m365/spo/commands/file/file-version-remove.js +119 -0
- package/dist/m365/spo/commands/file/file-version-restore.js +119 -0
- package/dist/m365/spo/commands/folder/folder-get.js +3 -2
- package/dist/m365/spo/commands/folder/folder-remove.js +2 -1
- package/dist/m365/spo/commands/folder/folder-roleassignment-add.js +1 -1
- package/dist/m365/spo/commands/folder/folder-roleassignment-remove.js +2 -1
- package/dist/m365/spo/commands/folder/folder-roleinheritance-break.js +1 -1
- package/dist/m365/spo/commands/folder/folder-roleinheritance-reset.js +1 -1
- package/dist/m365/spo/commands/group/group-get.js +3 -2
- package/dist/m365/spo/commands/group/group-user-add.js +2 -1
- package/dist/m365/spo/commands/group/group-user-list.js +3 -2
- package/dist/m365/spo/commands/group/group-user-remove.js +3 -2
- package/dist/m365/spo/commands/list/list-contenttype-remove.js +1 -1
- package/dist/m365/spo/commands/list/list-get.js +1 -1
- package/dist/m365/spo/commands/list/list-view-field-add.js +1 -1
- package/dist/m365/spo/commands/list/list-view-field-remove.js +1 -1
- package/dist/m365/spo/commands/list/list-view-field-set.js +1 -1
- package/dist/m365/spo/commands/listitem/listitem-get.js +1 -1
- package/dist/m365/spo/commands/listitem/listitem-list.js +3 -3
- package/dist/m365/spo/commands/page/Page.js +3 -2
- package/dist/m365/spo/commands/page/page-add.js +2 -1
- package/dist/m365/spo/commands/page/page-clientsidewebpart-add.js +4 -3
- package/dist/m365/spo/commands/page/page-control-get.js +2 -1
- package/dist/m365/spo/commands/page/page-control-list.js +2 -1
- package/dist/m365/spo/commands/page/page-control-set.js +3 -2
- package/dist/m365/spo/commands/page/page-get.js +2 -1
- package/dist/m365/spo/commands/page/page-header-set.js +6 -5
- package/dist/m365/spo/commands/page/page-section-add.js +4 -3
- package/dist/m365/spo/commands/page/page-set.js +2 -1
- package/dist/m365/spo/commands/site/site-apppermission-add.js +3 -2
- package/dist/m365/spo/commands/site/site-hubsite-connect.js +2 -1
- package/dist/m365/spo/commands/site/site-rename.js +2 -1
- package/dist/m365/spo/commands/site/site-set.js +1 -1
- package/dist/m365/spo/commands/sitescript/sitescript-add.js +2 -1
- package/dist/m365/spo/commands/spo-search.js +3 -2
- package/dist/m365/spo/commands/storageentity/storageentity-get.js +2 -1
- package/dist/m365/spo/commands/user/user-get.js +4 -3
- package/dist/m365/spo/commands/user/user-remove.js +2 -1
- package/dist/m365/spo/commands/userprofile/userprofile-get.js +2 -1
- package/dist/m365/spo/commands/web/web-add.js +2 -1
- package/dist/m365/spo/commands.js +4 -0
- package/dist/m365/teams/commands/app/app-install.js +3 -2
- package/dist/m365/teams/commands/app/app-list.js +2 -1
- package/dist/m365/teams/commands/app/app-publish.js +14 -15
- package/dist/m365/teams/commands/app/app-update.js +2 -1
- package/dist/m365/teams/commands/channel/channel-get.js +4 -3
- package/dist/m365/teams/commands/channel/channel-member-add.js +4 -3
- package/dist/m365/teams/commands/channel/channel-member-list.js +2 -1
- package/dist/m365/teams/commands/channel/channel-member-remove.js +2 -1
- package/dist/m365/teams/commands/channel/channel-member-set.js +2 -1
- package/dist/m365/teams/commands/channel/channel-remove.js +3 -2
- package/dist/m365/teams/commands/channel/channel-set.js +3 -2
- package/dist/m365/teams/commands/chat/chat-get.js +2 -1
- package/dist/m365/teams/commands/chat/chatUtil.js +2 -1
- package/dist/m365/teams/commands/funsettings/funsettings-list.js +2 -1
- package/dist/m365/teams/commands/funsettings/funsettings-set.js +2 -1
- package/dist/m365/teams/commands/guestsettings/guestsettings-list.js +2 -1
- package/dist/m365/teams/commands/guestsettings/guestsettings-set.js +2 -1
- package/dist/m365/teams/commands/membersettings/membersettings-list.js +2 -1
- package/dist/m365/teams/commands/membersettings/membersettings-set.js +2 -1
- package/dist/m365/teams/commands/messagingsettings/messagingsettings-list.js +2 -1
- package/dist/m365/teams/commands/messagingsettings/messagingsettings-set.js +2 -1
- package/dist/m365/teams/commands/report/report-directroutingcalls.js +3 -2
- package/dist/m365/teams/commands/report/report-pstncalls.js +3 -2
- package/dist/m365/teams/commands/tab/tab-add.js +2 -1
- package/dist/m365/teams/commands/tab/tab-get.js +4 -3
- package/dist/m365/teams/commands/tab/tab-list.js +2 -1
- package/dist/m365/teams/commands/tab/tab-remove.js +2 -1
- package/dist/m365/teams/commands/team/team-archive.js +2 -1
- package/dist/m365/teams/commands/team/team-clone.js +2 -1
- package/dist/m365/teams/commands/team/team-get.js +2 -1
- package/dist/m365/teams/commands/team/team-remove.js +2 -1
- package/dist/m365/teams/commands/team/team-set.js +2 -1
- package/dist/m365/teams/commands/team/team-unarchive.js +2 -1
- package/dist/m365/teams/commands/user/user-app-list.js +3 -2
- package/dist/m365/tenant/commands/security/security-alerts-list.js +2 -1
- package/dist/m365/tenant/commands/serviceannouncement/serviceannouncement-healthissue-get.js +2 -1
- package/dist/m365/tenant/commands/serviceannouncement/serviceannouncement-healthissue-list.js +2 -1
- package/dist/m365/tenant/commands/serviceannouncement/serviceannouncement-message-list.js +2 -1
- package/dist/m365/todo/commands/task/task-set.js +2 -1
- package/dist/m365/yammer/commands/user/user-get.js +3 -2
- package/dist/m365/yammer/commands/yammer-search.js +2 -1
- package/dist/utils/aadGroup.js +2 -1
- package/dist/utils/powerPlatform.js +3 -2
- package/dist/utils/spo.js +3 -2
- package/docs/docs/cmd/spo/file/file-version-clear.md +55 -0
- package/docs/docs/cmd/spo/file/file-version-get.md +76 -0
- package/docs/docs/cmd/spo/file/file-version-remove.md +58 -0
- package/docs/docs/cmd/spo/file/file-version-restore.md +58 -0
- package/docs/docs/cmd/teams/app/app-publish.md +14 -4
- package/package.json +1 -1
|
@@ -16,6 +16,7 @@ var __classPrivateFieldGet = (this && this.__classPrivateFieldGet) || function (
|
|
|
16
16
|
var _TeamsReportDirectroutingcallsCommand_instances, _TeamsReportDirectroutingcallsCommand_initTelemetry, _TeamsReportDirectroutingcallsCommand_initOptions, _TeamsReportDirectroutingcallsCommand_initValidators;
|
|
17
17
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
18
18
|
const request_1 = require("../../../../request");
|
|
19
|
+
const formatting_1 = require("../../../../utils/formatting");
|
|
19
20
|
const validation_1 = require("../../../../utils/validation");
|
|
20
21
|
const GraphCommand_1 = require("../../../base/GraphCommand");
|
|
21
22
|
const commands_1 = require("../../commands");
|
|
@@ -38,9 +39,9 @@ class TeamsReportDirectroutingcallsCommand extends GraphCommand_1.default {
|
|
|
38
39
|
}
|
|
39
40
|
commandAction(logger, args) {
|
|
40
41
|
return __awaiter(this, void 0, void 0, function* () {
|
|
41
|
-
const toDateTimeParameter =
|
|
42
|
+
const toDateTimeParameter = formatting_1.formatting.encodeQueryParameter(args.options.toDateTime ? args.options.toDateTime : new Date().toISOString());
|
|
42
43
|
const requestOptions = {
|
|
43
|
-
url: `${this.resource}/v1.0/communications/callRecords/getDirectRoutingCalls(fromDateTime=${
|
|
44
|
+
url: `${this.resource}/v1.0/communications/callRecords/getDirectRoutingCalls(fromDateTime=${formatting_1.formatting.encodeQueryParameter(args.options.fromDateTime)},toDateTime=${toDateTimeParameter})`,
|
|
44
45
|
headers: {
|
|
45
46
|
accept: 'application/json;odata.metadata=none'
|
|
46
47
|
},
|
|
@@ -16,6 +16,7 @@ var __classPrivateFieldGet = (this && this.__classPrivateFieldGet) || function (
|
|
|
16
16
|
var _TeamsReportPstncallsCommand_instances, _TeamsReportPstncallsCommand_initTelemetry, _TeamsReportPstncallsCommand_initOptions, _TeamsReportPstncallsCommand_initValidators;
|
|
17
17
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
18
18
|
const request_1 = require("../../../../request");
|
|
19
|
+
const formatting_1 = require("../../../../utils/formatting");
|
|
19
20
|
const validation_1 = require("../../../../utils/validation");
|
|
20
21
|
const GraphCommand_1 = require("../../../base/GraphCommand");
|
|
21
22
|
const commands_1 = require("../../commands");
|
|
@@ -38,9 +39,9 @@ class TeamsReportPstncallsCommand extends GraphCommand_1.default {
|
|
|
38
39
|
}
|
|
39
40
|
commandAction(logger, args) {
|
|
40
41
|
return __awaiter(this, void 0, void 0, function* () {
|
|
41
|
-
const toDateTimeParameter =
|
|
42
|
+
const toDateTimeParameter = formatting_1.formatting.encodeQueryParameter(args.options.toDateTime ? args.options.toDateTime : new Date().toISOString());
|
|
42
43
|
const requestOptions = {
|
|
43
|
-
url: `${this.resource}/v1.0/communications/callRecords/getPstnCalls(fromDateTime=${
|
|
44
|
+
url: `${this.resource}/v1.0/communications/callRecords/getPstnCalls(fromDateTime=${formatting_1.formatting.encodeQueryParameter(args.options.fromDateTime)},toDateTime=${toDateTimeParameter})`,
|
|
44
45
|
headers: {
|
|
45
46
|
accept: 'application/json;odata.metadata=none'
|
|
46
47
|
},
|
|
@@ -16,6 +16,7 @@ var __classPrivateFieldGet = (this && this.__classPrivateFieldGet) || function (
|
|
|
16
16
|
var _TeamsTabAddCommand_instances, _TeamsTabAddCommand_initTelemetry, _TeamsTabAddCommand_initOptions, _TeamsTabAddCommand_initValidators;
|
|
17
17
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
18
18
|
const request_1 = require("../../../../request");
|
|
19
|
+
const formatting_1 = require("../../../../utils/formatting");
|
|
19
20
|
const validation_1 = require("../../../../utils/validation");
|
|
20
21
|
const GraphCommand_1 = require("../../../base/GraphCommand");
|
|
21
22
|
const commands_1 = require("../../commands");
|
|
@@ -40,7 +41,7 @@ class TeamsTabAddCommand extends GraphCommand_1.default {
|
|
|
40
41
|
return __awaiter(this, void 0, void 0, function* () {
|
|
41
42
|
const data = this.mapRequestBody(args.options);
|
|
42
43
|
const requestOptions = {
|
|
43
|
-
url: `${this.resource}/v1.0/teams/${
|
|
44
|
+
url: `${this.resource}/v1.0/teams/${formatting_1.formatting.encodeQueryParameter(args.options.teamId)}/channels/${args.options.channelId}/tabs`,
|
|
44
45
|
headers: {
|
|
45
46
|
accept: 'application/json;odata.metadata=none',
|
|
46
47
|
'content-type': 'application/json;odata=nometadata'
|
|
@@ -20,6 +20,7 @@ const validation_1 = require("../../../../utils/validation");
|
|
|
20
20
|
const aadGroup_1 = require("../../../../utils/aadGroup");
|
|
21
21
|
const GraphCommand_1 = require("../../../base/GraphCommand");
|
|
22
22
|
const commands_1 = require("../../commands");
|
|
23
|
+
const formatting_1 = require("../../../../utils/formatting");
|
|
23
24
|
class TeamsTabGetCommand extends GraphCommand_1.default {
|
|
24
25
|
constructor() {
|
|
25
26
|
super();
|
|
@@ -55,7 +56,7 @@ class TeamsTabGetCommand extends GraphCommand_1.default {
|
|
|
55
56
|
return Promise.resolve(args.options.channelId);
|
|
56
57
|
}
|
|
57
58
|
const channelRequestOptions = {
|
|
58
|
-
url: `${this.resource}/v1.0/teams/${
|
|
59
|
+
url: `${this.resource}/v1.0/teams/${formatting_1.formatting.encodeQueryParameter(this.teamId)}/channels?$filter=displayName eq '${formatting_1.formatting.encodeQueryParameter(args.options.channelName)}'`,
|
|
59
60
|
headers: {
|
|
60
61
|
accept: 'application/json;odata.metadata=none'
|
|
61
62
|
},
|
|
@@ -76,7 +77,7 @@ class TeamsTabGetCommand extends GraphCommand_1.default {
|
|
|
76
77
|
return Promise.resolve(args.options.id);
|
|
77
78
|
}
|
|
78
79
|
const tabRequestOptions = {
|
|
79
|
-
url: `${this.resource}/v1.0/teams/${
|
|
80
|
+
url: `${this.resource}/v1.0/teams/${formatting_1.formatting.encodeQueryParameter(this.teamId)}/channels/${formatting_1.formatting.encodeQueryParameter(this.channelId)}/tabs?$filter=displayName eq '${formatting_1.formatting.encodeQueryParameter(args.options.name)}'`,
|
|
80
81
|
headers: {
|
|
81
82
|
accept: 'application/json;odata.metadata=none'
|
|
82
83
|
},
|
|
@@ -98,7 +99,7 @@ class TeamsTabGetCommand extends GraphCommand_1.default {
|
|
|
98
99
|
this.teamId = yield this.getTeamId(args);
|
|
99
100
|
this.channelId = yield this.getChannelId(args);
|
|
100
101
|
const tabId = yield this.getTabId(args);
|
|
101
|
-
const endpoint = `${this.resource}/v1.0/teams/${
|
|
102
|
+
const endpoint = `${this.resource}/v1.0/teams/${formatting_1.formatting.encodeQueryParameter(this.teamId)}/channels/${formatting_1.formatting.encodeQueryParameter(this.channelId)}/tabs/${formatting_1.formatting.encodeQueryParameter(tabId)}`;
|
|
102
103
|
const requestOptions = {
|
|
103
104
|
url: endpoint,
|
|
104
105
|
headers: {
|
|
@@ -15,6 +15,7 @@ var __classPrivateFieldGet = (this && this.__classPrivateFieldGet) || function (
|
|
|
15
15
|
};
|
|
16
16
|
var _TeamsTabListCommand_instances, _TeamsTabListCommand_initOptions, _TeamsTabListCommand_initValidators;
|
|
17
17
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
18
|
+
const formatting_1 = require("../../../../utils/formatting");
|
|
18
19
|
const odata_1 = require("../../../../utils/odata");
|
|
19
20
|
const validation_1 = require("../../../../utils/validation");
|
|
20
21
|
const GraphCommand_1 = require("../../../base/GraphCommand");
|
|
@@ -37,7 +38,7 @@ class TeamsTabListCommand extends GraphCommand_1.default {
|
|
|
37
38
|
}
|
|
38
39
|
commandAction(logger, args) {
|
|
39
40
|
return __awaiter(this, void 0, void 0, function* () {
|
|
40
|
-
const endpoint = `${this.resource}/v1.0/teams/${args.options.teamId}/channels/${
|
|
41
|
+
const endpoint = `${this.resource}/v1.0/teams/${args.options.teamId}/channels/${formatting_1.formatting.encodeQueryParameter(args.options.channelId)}/tabs?$expand=teamsApp`;
|
|
41
42
|
try {
|
|
42
43
|
const items = yield odata_1.odata.getAllItems(endpoint);
|
|
43
44
|
items.forEach(i => {
|
|
@@ -17,6 +17,7 @@ var _TeamsTabRemoveCommand_instances, _TeamsTabRemoveCommand_initTelemetry, _Tea
|
|
|
17
17
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
18
18
|
const Cli_1 = require("../../../../cli/Cli");
|
|
19
19
|
const request_1 = require("../../../../request");
|
|
20
|
+
const formatting_1 = require("../../../../utils/formatting");
|
|
20
21
|
const validation_1 = require("../../../../utils/validation");
|
|
21
22
|
const GraphCommand_1 = require("../../../base/GraphCommand");
|
|
22
23
|
const commands_1 = require("../../commands");
|
|
@@ -38,7 +39,7 @@ class TeamsTabRemoveCommand extends GraphCommand_1.default {
|
|
|
38
39
|
return __awaiter(this, void 0, void 0, function* () {
|
|
39
40
|
const removeTab = () => __awaiter(this, void 0, void 0, function* () {
|
|
40
41
|
const requestOptions = {
|
|
41
|
-
url: `${this.resource}/v1.0/teams/${
|
|
42
|
+
url: `${this.resource}/v1.0/teams/${formatting_1.formatting.encodeQueryParameter(args.options.teamId)}/channels/${args.options.channelId}/tabs/${formatting_1.formatting.encodeQueryParameter(args.options.id)}`,
|
|
42
43
|
headers: {
|
|
43
44
|
accept: "application/json;odata.metadata=none"
|
|
44
45
|
},
|
|
@@ -20,6 +20,7 @@ const validation_1 = require("../../../../utils/validation");
|
|
|
20
20
|
const aadGroup_1 = require("../../../../utils/aadGroup");
|
|
21
21
|
const GraphCommand_1 = require("../../../base/GraphCommand");
|
|
22
22
|
const commands_1 = require("../../commands");
|
|
23
|
+
const formatting_1 = require("../../../../utils/formatting");
|
|
23
24
|
class TeamsTeamArchiveCommand extends GraphCommand_1.default {
|
|
24
25
|
constructor() {
|
|
25
26
|
super();
|
|
@@ -54,7 +55,7 @@ class TeamsTeamArchiveCommand extends GraphCommand_1.default {
|
|
|
54
55
|
try {
|
|
55
56
|
const teamId = yield this.getTeamId(args);
|
|
56
57
|
const requestOptions = {
|
|
57
|
-
url: `${this.resource}/v1.0/teams/${
|
|
58
|
+
url: `${this.resource}/v1.0/teams/${formatting_1.formatting.encodeQueryParameter(teamId)}/archive`,
|
|
58
59
|
headers: {
|
|
59
60
|
'content-type': 'application/json;odata=nometadata',
|
|
60
61
|
'accept': 'application/json;odata.metadata=none'
|
|
@@ -16,6 +16,7 @@ var __classPrivateFieldGet = (this && this.__classPrivateFieldGet) || function (
|
|
|
16
16
|
var _TeamsTeamCloneCommand_instances, _TeamsTeamCloneCommand_initTelemetry, _TeamsTeamCloneCommand_initOptions, _TeamsTeamCloneCommand_initValidators, _TeamsTeamCloneCommand_initOptionSets;
|
|
17
17
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
18
18
|
const request_1 = require("../../../../request");
|
|
19
|
+
const formatting_1 = require("../../../../utils/formatting");
|
|
19
20
|
const validation_1 = require("../../../../utils/validation");
|
|
20
21
|
const GraphCommand_1 = require("../../../base/GraphCommand");
|
|
21
22
|
const commands_1 = require("../../commands");
|
|
@@ -51,7 +52,7 @@ class TeamsTeamCloneCommand extends GraphCommand_1.default {
|
|
|
51
52
|
data.visibility = args.options.visibility;
|
|
52
53
|
}
|
|
53
54
|
const requestOptions = {
|
|
54
|
-
url: `${this.resource}/v1.0/teams/${
|
|
55
|
+
url: `${this.resource}/v1.0/teams/${formatting_1.formatting.encodeQueryParameter(args.options.id)}/clone`,
|
|
55
56
|
headers: {
|
|
56
57
|
"content-type": "application/json",
|
|
57
58
|
accept: 'application/json;odata.metadata=none'
|
|
@@ -20,6 +20,7 @@ const validation_1 = require("../../../../utils/validation");
|
|
|
20
20
|
const aadGroup_1 = require("../../../../utils/aadGroup");
|
|
21
21
|
const GraphCommand_1 = require("../../../base/GraphCommand");
|
|
22
22
|
const commands_1 = require("../../commands");
|
|
23
|
+
const formatting_1 = require("../../../../utils/formatting");
|
|
23
24
|
class TeamsTeamGetCommand extends GraphCommand_1.default {
|
|
24
25
|
constructor() {
|
|
25
26
|
super();
|
|
@@ -53,7 +54,7 @@ class TeamsTeamGetCommand extends GraphCommand_1.default {
|
|
|
53
54
|
try {
|
|
54
55
|
const teamId = yield this.getTeamId(args);
|
|
55
56
|
const requestOptions = {
|
|
56
|
-
url: `${this.resource}/v1.0/teams/${
|
|
57
|
+
url: `${this.resource}/v1.0/teams/${formatting_1.formatting.encodeQueryParameter(teamId)}`,
|
|
57
58
|
headers: {
|
|
58
59
|
accept: 'application/json;odata.metadata=none'
|
|
59
60
|
},
|
|
@@ -21,6 +21,7 @@ const validation_1 = require("../../../../utils/validation");
|
|
|
21
21
|
const aadGroup_1 = require("../../../../utils/aadGroup");
|
|
22
22
|
const GraphCommand_1 = require("../../../base/GraphCommand");
|
|
23
23
|
const commands_1 = require("../../commands");
|
|
24
|
+
const formatting_1 = require("../../../../utils/formatting");
|
|
24
25
|
class TeamsTeamRemoveCommand extends GraphCommand_1.default {
|
|
25
26
|
constructor() {
|
|
26
27
|
super();
|
|
@@ -55,7 +56,7 @@ class TeamsTeamRemoveCommand extends GraphCommand_1.default {
|
|
|
55
56
|
try {
|
|
56
57
|
const teamId = yield this.getTeamId(args);
|
|
57
58
|
const requestOptions = {
|
|
58
|
-
url: `${this.resource}/v1.0/groups/${
|
|
59
|
+
url: `${this.resource}/v1.0/groups/${formatting_1.formatting.encodeQueryParameter(teamId)}`,
|
|
59
60
|
headers: {
|
|
60
61
|
accept: 'application/json;odata.metadata=none'
|
|
61
62
|
},
|
|
@@ -16,6 +16,7 @@ var __classPrivateFieldGet = (this && this.__classPrivateFieldGet) || function (
|
|
|
16
16
|
var _TeamsTeamSetCommand_instances, _TeamsTeamSetCommand_initTelemetry, _TeamsTeamSetCommand_initOptions, _TeamsTeamSetCommand_initValidators;
|
|
17
17
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
18
18
|
const request_1 = require("../../../../request");
|
|
19
|
+
const formatting_1 = require("../../../../utils/formatting");
|
|
19
20
|
const validation_1 = require("../../../../utils/validation");
|
|
20
21
|
const GraphCommand_1 = require("../../../base/GraphCommand");
|
|
21
22
|
const commands_1 = require("../../commands");
|
|
@@ -56,7 +57,7 @@ class TeamsTeamSetCommand extends GraphCommand_1.default {
|
|
|
56
57
|
return __awaiter(this, void 0, void 0, function* () {
|
|
57
58
|
const data = this.mapRequestBody(args.options);
|
|
58
59
|
const requestOptions = {
|
|
59
|
-
url: `${this.resource}/v1.0/groups/${
|
|
60
|
+
url: `${this.resource}/v1.0/groups/${formatting_1.formatting.encodeQueryParameter(args.options.id)}`,
|
|
60
61
|
headers: {
|
|
61
62
|
accept: 'application/json;odata.metadata=none'
|
|
62
63
|
},
|
|
@@ -20,6 +20,7 @@ const validation_1 = require("../../../../utils/validation");
|
|
|
20
20
|
const aadGroup_1 = require("../../../../utils/aadGroup");
|
|
21
21
|
const GraphCommand_1 = require("../../../base/GraphCommand");
|
|
22
22
|
const commands_1 = require("../../commands");
|
|
23
|
+
const formatting_1 = require("../../../../utils/formatting");
|
|
23
24
|
class TeamsTeamUnarchiveCommand extends GraphCommand_1.default {
|
|
24
25
|
constructor() {
|
|
25
26
|
super();
|
|
@@ -53,7 +54,7 @@ class TeamsTeamUnarchiveCommand extends GraphCommand_1.default {
|
|
|
53
54
|
try {
|
|
54
55
|
const teamId = yield this.getTeamId(args);
|
|
55
56
|
const requestOptions = {
|
|
56
|
-
url: `${endpoint}/teams/${
|
|
57
|
+
url: `${endpoint}/teams/${formatting_1.formatting.encodeQueryParameter(teamId)}/unarchive`,
|
|
57
58
|
headers: {
|
|
58
59
|
'content-type': 'application/json;odata=nometadata',
|
|
59
60
|
'accept': 'application/json;odata.metadata=none'
|
|
@@ -16,6 +16,7 @@ var __classPrivateFieldGet = (this && this.__classPrivateFieldGet) || function (
|
|
|
16
16
|
var _TeamsUserAppListCommand_instances, _TeamsUserAppListCommand_initTelemetry, _TeamsUserAppListCommand_initOptions, _TeamsUserAppListCommand_initValidators, _TeamsUserAppListCommand_initOptionSets;
|
|
17
17
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
18
18
|
const request_1 = require("../../../../request");
|
|
19
|
+
const formatting_1 = require("../../../../utils/formatting");
|
|
19
20
|
const odata_1 = require("../../../../utils/odata");
|
|
20
21
|
const validation_1 = require("../../../../utils/validation");
|
|
21
22
|
const GraphCommand_1 = require("../../../base/GraphCommand");
|
|
@@ -39,7 +40,7 @@ class TeamsUserAppListCommand extends GraphCommand_1.default {
|
|
|
39
40
|
return __awaiter(this, void 0, void 0, function* () {
|
|
40
41
|
try {
|
|
41
42
|
const userId = (yield this.getUserId(args)).value;
|
|
42
|
-
const endpoint = `${this.resource}/v1.0/users/${
|
|
43
|
+
const endpoint = `${this.resource}/v1.0/users/${formatting_1.formatting.encodeQueryParameter(userId)}/teamwork/installedApps?$expand=teamsAppDefinition`;
|
|
43
44
|
const items = yield odata_1.odata.getAllItems(endpoint);
|
|
44
45
|
items.forEach(i => {
|
|
45
46
|
const userAppId = Buffer.from(i.id, 'base64').toString('ascii');
|
|
@@ -70,7 +71,7 @@ class TeamsUserAppListCommand extends GraphCommand_1.default {
|
|
|
70
71
|
return Promise.resolve({ value: args.options.userId });
|
|
71
72
|
}
|
|
72
73
|
const requestOptions = {
|
|
73
|
-
url: `${this.resource}/v1.0/users/${
|
|
74
|
+
url: `${this.resource}/v1.0/users/${formatting_1.formatting.encodeQueryParameter(args.options.userName)}/id`,
|
|
74
75
|
headers: {
|
|
75
76
|
accept: 'application/json;odata.metadata=none'
|
|
76
77
|
},
|
|
@@ -16,6 +16,7 @@ var __classPrivateFieldGet = (this && this.__classPrivateFieldGet) || function (
|
|
|
16
16
|
var _TenantSecurityAlertsListCommand_instances, _TenantSecurityAlertsListCommand_initTelemetry, _TenantSecurityAlertsListCommand_initOptions;
|
|
17
17
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
18
18
|
const request_1 = require("../../../../request");
|
|
19
|
+
const formatting_1 = require("../../../../utils/formatting");
|
|
19
20
|
const GraphCommand_1 = require("../../../base/GraphCommand");
|
|
20
21
|
const commands_1 = require("../../commands");
|
|
21
22
|
class TenantSecurityAlertsListCommand extends GraphCommand_1.default {
|
|
@@ -59,7 +60,7 @@ class TenantSecurityAlertsListCommand extends GraphCommand_1.default {
|
|
|
59
60
|
case 'azure active directory identity protection':
|
|
60
61
|
vendorName = 'IPC';
|
|
61
62
|
}
|
|
62
|
-
queryFilter = `?$filter=vendorInformation/provider eq '${
|
|
63
|
+
queryFilter = `?$filter=vendorInformation/provider eq '${formatting_1.formatting.encodeQueryParameter(vendorName)}'`;
|
|
63
64
|
}
|
|
64
65
|
const requestOptions = {
|
|
65
66
|
url: `${this.resource}/v1.0/security/alerts${queryFilter}`,
|
package/dist/m365/tenant/commands/serviceannouncement/serviceannouncement-healthissue-get.js
CHANGED
|
@@ -16,6 +16,7 @@ var __classPrivateFieldGet = (this && this.__classPrivateFieldGet) || function (
|
|
|
16
16
|
var _TenantServiceAnnouncementHealthIssueGetCommand_instances, _TenantServiceAnnouncementHealthIssueGetCommand_initOptions;
|
|
17
17
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
18
18
|
const request_1 = require("../../../../request");
|
|
19
|
+
const formatting_1 = require("../../../../utils/formatting");
|
|
19
20
|
const GraphCommand_1 = require("../../../base/GraphCommand");
|
|
20
21
|
const commands_1 = require("../../commands");
|
|
21
22
|
class TenantServiceAnnouncementHealthIssueGetCommand extends GraphCommand_1.default {
|
|
@@ -33,7 +34,7 @@ class TenantServiceAnnouncementHealthIssueGetCommand extends GraphCommand_1.defa
|
|
|
33
34
|
commandAction(logger, args) {
|
|
34
35
|
return __awaiter(this, void 0, void 0, function* () {
|
|
35
36
|
const requestOptions = {
|
|
36
|
-
url: `${this.resource}/v1.0/admin/serviceAnnouncement/issues/${
|
|
37
|
+
url: `${this.resource}/v1.0/admin/serviceAnnouncement/issues/${formatting_1.formatting.encodeQueryParameter(args.options.id)}`,
|
|
37
38
|
headers: {
|
|
38
39
|
accept: 'application/json;odata.metadata=none'
|
|
39
40
|
},
|
package/dist/m365/tenant/commands/serviceannouncement/serviceannouncement-healthissue-list.js
CHANGED
|
@@ -15,6 +15,7 @@ var __classPrivateFieldGet = (this && this.__classPrivateFieldGet) || function (
|
|
|
15
15
|
};
|
|
16
16
|
var _TenantServiceAnnouncementHealthIssueListCommand_instances, _TenantServiceAnnouncementHealthIssueListCommand_initOptions;
|
|
17
17
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
18
|
+
const formatting_1 = require("../../../../utils/formatting");
|
|
18
19
|
const odata_1 = require("../../../../utils/odata");
|
|
19
20
|
const GraphCommand_1 = require("../../../base/GraphCommand");
|
|
20
21
|
const commands_1 = require("../../commands");
|
|
@@ -37,7 +38,7 @@ class TenantServiceAnnouncementHealthIssueListCommand extends GraphCommand_1.def
|
|
|
37
38
|
return __awaiter(this, void 0, void 0, function* () {
|
|
38
39
|
let endpoint = `${this.resource}/v1.0/admin/serviceAnnouncement/issues`;
|
|
39
40
|
if (args.options.service) {
|
|
40
|
-
endpoint += `?$filter=service eq '${
|
|
41
|
+
endpoint += `?$filter=service eq '${formatting_1.formatting.encodeQueryParameter(args.options.service)}'`;
|
|
41
42
|
}
|
|
42
43
|
try {
|
|
43
44
|
const items = yield odata_1.odata.getAllItems(endpoint);
|
|
@@ -15,6 +15,7 @@ var __classPrivateFieldGet = (this && this.__classPrivateFieldGet) || function (
|
|
|
15
15
|
};
|
|
16
16
|
var _TenantServiceAnnouncementMessageListCommand_instances, _TenantServiceAnnouncementMessageListCommand_initTelemetry, _TenantServiceAnnouncementMessageListCommand_initOptions;
|
|
17
17
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
18
|
+
const formatting_1 = require("../../../../utils/formatting");
|
|
18
19
|
const odata_1 = require("../../../../utils/odata");
|
|
19
20
|
const GraphCommand_1 = require("../../../base/GraphCommand");
|
|
20
21
|
const commands_1 = require("../../commands");
|
|
@@ -38,7 +39,7 @@ class TenantServiceAnnouncementMessageListCommand extends GraphCommand_1.default
|
|
|
38
39
|
return __awaiter(this, void 0, void 0, function* () {
|
|
39
40
|
let endpoint = `${this.resource}/v1.0/admin/serviceAnnouncement/messages`;
|
|
40
41
|
if (args.options.service) {
|
|
41
|
-
endpoint += `?$filter=services/any(c:c+eq+'${
|
|
42
|
+
endpoint += `?$filter=services/any(c:c+eq+'${formatting_1.formatting.encodeQueryParameter(args.options.service)}')`;
|
|
42
43
|
}
|
|
43
44
|
try {
|
|
44
45
|
const items = yield odata_1.odata.getAllItems(endpoint);
|
|
@@ -16,6 +16,7 @@ var __classPrivateFieldGet = (this && this.__classPrivateFieldGet) || function (
|
|
|
16
16
|
var _TodoTaskSetCommand_instances, _TodoTaskSetCommand_initTelemetry, _TodoTaskSetCommand_initOptions, _TodoTaskSetCommand_initValidators, _TodoTaskSetCommand_initOptionSets;
|
|
17
17
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
18
18
|
const request_1 = require("../../../../request");
|
|
19
|
+
const formatting_1 = require("../../../../utils/formatting");
|
|
19
20
|
const validation_1 = require("../../../../utils/validation");
|
|
20
21
|
const GraphCommand_1 = require("../../../base/GraphCommand");
|
|
21
22
|
const commands_1 = require("../../commands");
|
|
@@ -41,7 +42,7 @@ class TodoTaskSetCommand extends GraphCommand_1.default {
|
|
|
41
42
|
try {
|
|
42
43
|
const listId = yield this.getTodoListId(args);
|
|
43
44
|
const requestOptions = {
|
|
44
|
-
url: `${endpoint}/me/todo/lists/${listId}/tasks/${
|
|
45
|
+
url: `${endpoint}/me/todo/lists/${listId}/tasks/${formatting_1.formatting.encodeQueryParameter(args.options.id)}`,
|
|
45
46
|
headers: {
|
|
46
47
|
accept: 'application/json;odata.metadata=none',
|
|
47
48
|
'Content-Type': 'application/json'
|
|
@@ -16,6 +16,7 @@ var __classPrivateFieldGet = (this && this.__classPrivateFieldGet) || function (
|
|
|
16
16
|
var _YammerUserGetCommand_instances, _YammerUserGetCommand_initTelemetry, _YammerUserGetCommand_initOptions, _YammerUserGetCommand_initValidators;
|
|
17
17
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
18
18
|
const request_1 = require("../../../../request");
|
|
19
|
+
const formatting_1 = require("../../../../utils/formatting");
|
|
19
20
|
const YammerCommand_1 = require("../../../base/YammerCommand");
|
|
20
21
|
const commands_1 = require("../../commands");
|
|
21
22
|
class YammerUserGetCommand extends YammerCommand_1.default {
|
|
@@ -39,10 +40,10 @@ class YammerUserGetCommand extends YammerCommand_1.default {
|
|
|
39
40
|
return __awaiter(this, void 0, void 0, function* () {
|
|
40
41
|
let endPoint = `${this.resource}/v1/users/current.json`;
|
|
41
42
|
if (args.options.id) {
|
|
42
|
-
endPoint = `${this.resource}/v1/users/${
|
|
43
|
+
endPoint = `${this.resource}/v1/users/${args.options.id}.json`;
|
|
43
44
|
}
|
|
44
45
|
else if (args.options.email) {
|
|
45
|
-
endPoint = `${this.resource}/v1/users/by_email.json?email=${
|
|
46
|
+
endPoint = `${this.resource}/v1/users/by_email.json?email=${formatting_1.formatting.encodeQueryParameter(args.options.email)}`;
|
|
46
47
|
}
|
|
47
48
|
const requestOptions = {
|
|
48
49
|
url: endPoint,
|
|
@@ -16,6 +16,7 @@ var __classPrivateFieldGet = (this && this.__classPrivateFieldGet) || function (
|
|
|
16
16
|
var _YammerSearchCommand_instances, _YammerSearchCommand_initTelemetry, _YammerSearchCommand_initOptions, _YammerSearchCommand_initValidators;
|
|
17
17
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
18
18
|
const request_1 = require("../../../request");
|
|
19
|
+
const formatting_1 = require("../../../utils/formatting");
|
|
19
20
|
const YammerCommand_1 = require("../../base/YammerCommand");
|
|
20
21
|
const commands_1 = require("../commands");
|
|
21
22
|
class YammerSearchCommand extends YammerCommand_1.default {
|
|
@@ -44,7 +45,7 @@ class YammerSearchCommand extends YammerCommand_1.default {
|
|
|
44
45
|
}
|
|
45
46
|
getAllItems(logger, args, page) {
|
|
46
47
|
return new Promise((resolve, reject) => {
|
|
47
|
-
const endpoint = `${this.resource}/v1/search.json?search=${
|
|
48
|
+
const endpoint = `${this.resource}/v1/search.json?search=${formatting_1.formatting.encodeQueryParameter(args.options.queryText)}&page=${page}`;
|
|
48
49
|
const requestOptions = {
|
|
49
50
|
url: endpoint,
|
|
50
51
|
responseType: 'json'
|
package/dist/utils/aadGroup.js
CHANGED
|
@@ -11,6 +11,7 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge
|
|
|
11
11
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
12
12
|
exports.aadGroup = void 0;
|
|
13
13
|
const request_1 = require("../request");
|
|
14
|
+
const formatting_1 = require("./formatting");
|
|
14
15
|
const odata_1 = require("./odata");
|
|
15
16
|
const graphResource = 'https://graph.microsoft.com';
|
|
16
17
|
exports.aadGroup = {
|
|
@@ -33,7 +34,7 @@ exports.aadGroup = {
|
|
|
33
34
|
* @param displayName Group display name.
|
|
34
35
|
*/
|
|
35
36
|
getGroupsByDisplayName(displayName) {
|
|
36
|
-
return odata_1.odata.getAllItems(`${graphResource}/v1.0/groups?$filter=displayName eq '${
|
|
37
|
+
return odata_1.odata.getAllItems(`${graphResource}/v1.0/groups?$filter=displayName eq '${formatting_1.formatting.encodeQueryParameter(displayName)}'`);
|
|
37
38
|
},
|
|
38
39
|
/**
|
|
39
40
|
* Get a single group by its display name.
|
|
@@ -11,16 +11,17 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge
|
|
|
11
11
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
12
12
|
exports.powerPlatform = void 0;
|
|
13
13
|
const request_1 = require("../request");
|
|
14
|
+
const formatting_1 = require("./formatting");
|
|
14
15
|
const powerPlatformResource = 'https://api.bap.microsoft.com';
|
|
15
16
|
exports.powerPlatform = {
|
|
16
17
|
getDynamicsInstanceApiUrl(environment, asAdmin) {
|
|
17
18
|
return __awaiter(this, void 0, void 0, function* () {
|
|
18
19
|
let url = '';
|
|
19
20
|
if (asAdmin) {
|
|
20
|
-
url = `${powerPlatformResource}/providers/Microsoft.BusinessAppPlatform/scopes/admin/environments/${
|
|
21
|
+
url = `${powerPlatformResource}/providers/Microsoft.BusinessAppPlatform/scopes/admin/environments/${formatting_1.formatting.encodeQueryParameter(environment)}`;
|
|
21
22
|
}
|
|
22
23
|
else {
|
|
23
|
-
url = `${powerPlatformResource}/providers/Microsoft.BusinessAppPlatform/environments/${
|
|
24
|
+
url = `${powerPlatformResource}/providers/Microsoft.BusinessAppPlatform/environments/${formatting_1.formatting.encodeQueryParameter(environment)}`;
|
|
24
25
|
}
|
|
25
26
|
const requestOptions = {
|
|
26
27
|
url: `${url}?api-version=2020-10-01&$select=properties.linkedEnvironmentMetadata.instanceApiUrl`,
|
package/dist/utils/spo.js
CHANGED
|
@@ -8,6 +8,7 @@ const Auth_1 = require("../Auth");
|
|
|
8
8
|
const config_1 = require("../config");
|
|
9
9
|
const base_permissions_1 = require("../m365/spo/base-permissions");
|
|
10
10
|
const request_1 = require("../request");
|
|
11
|
+
const formatting_1 = require("./formatting");
|
|
11
12
|
exports.spo = {
|
|
12
13
|
getRequestDigest(siteUrl) {
|
|
13
14
|
const requestOptions = {
|
|
@@ -285,7 +286,7 @@ exports.spo = {
|
|
|
285
286
|
nextFolder += `/${folders[folderIndex]}`;
|
|
286
287
|
const folderServerRelativeUrl = urlUtil_1.urlUtil.getServerRelativePath(webFullUrl, nextFolder);
|
|
287
288
|
const requestOptions = {
|
|
288
|
-
url: `${webFullUrl}/_api/web/GetFolderByServerRelativeUrl('${
|
|
289
|
+
url: `${webFullUrl}/_api/web/GetFolderByServerRelativeUrl('${formatting_1.formatting.encodeQueryParameter(folderServerRelativeUrl)}')`,
|
|
289
290
|
headers: {
|
|
290
291
|
'accept': 'application/json;odata=nometadata'
|
|
291
292
|
}
|
|
@@ -299,7 +300,7 @@ exports.spo = {
|
|
|
299
300
|
.catch(() => {
|
|
300
301
|
const prevFolderServerRelativeUrl = urlUtil_1.urlUtil.getServerRelativePath(webFullUrl, prevFolder);
|
|
301
302
|
const requestOptions = {
|
|
302
|
-
url: `${webFullUrl}/_api/web/GetFolderByServerRelativePath(DecodedUrl=@a1)/AddSubFolderUsingPath(DecodedUrl=@a2)?@a1=%27${
|
|
303
|
+
url: `${webFullUrl}/_api/web/GetFolderByServerRelativePath(DecodedUrl=@a1)/AddSubFolderUsingPath(DecodedUrl=@a2)?@a1=%27${formatting_1.formatting.encodeQueryParameter(prevFolderServerRelativeUrl)}%27&@a2=%27${formatting_1.formatting.encodeQueryParameter(folders[folderIndex])}%27`,
|
|
303
304
|
headers: {
|
|
304
305
|
'accept': 'application/json;odata=nometadata'
|
|
305
306
|
},
|
|
@@ -0,0 +1,55 @@
|
|
|
1
|
+
# spo file version clear
|
|
2
|
+
|
|
3
|
+
Removes all version history of a specified file
|
|
4
|
+
|
|
5
|
+
## Usage
|
|
6
|
+
|
|
7
|
+
```sh
|
|
8
|
+
m365 spo file version clear [options]
|
|
9
|
+
```
|
|
10
|
+
|
|
11
|
+
## Options
|
|
12
|
+
|
|
13
|
+
`-w, --webUrl <webUrl>`
|
|
14
|
+
: The URL of the site where the file is located
|
|
15
|
+
|
|
16
|
+
`-u, --fileUrl [fileUrl]`
|
|
17
|
+
: The server-relative URL of the file to retrieve. Specify either `fileUrl` or `fileId` but not both
|
|
18
|
+
|
|
19
|
+
`-i, --fileId [fileId]`
|
|
20
|
+
: The UniqueId (GUID) of the file to retrieve. Specify either `fileUrl` or `fileId` but not both
|
|
21
|
+
|
|
22
|
+
`--confirm [confirm]`
|
|
23
|
+
: Don't prompt for confirmation.
|
|
24
|
+
|
|
25
|
+
--8<-- "docs/cmd/_global.md"
|
|
26
|
+
|
|
27
|
+
## Examples
|
|
28
|
+
|
|
29
|
+
Removes all file version history in a specific site based on fileId and prompts for confirmation
|
|
30
|
+
|
|
31
|
+
```sh
|
|
32
|
+
m365 spo file version clear --webUrl https://contoso.sharepoint.com --fileId 'b2307a39-e878-458b-bc90-03bc578531d6'
|
|
33
|
+
```
|
|
34
|
+
|
|
35
|
+
Removes all file version history in a specific site based on fileUrl and prompts for confirmation
|
|
36
|
+
|
|
37
|
+
```sh
|
|
38
|
+
m365 spo file version clear --webUrl https://contoso.sharepoint.com --fileUrl '/Shared Documents/Document.docx'
|
|
39
|
+
```
|
|
40
|
+
|
|
41
|
+
Removes all file version history in a specific site based on fileId without prompting for confirmation
|
|
42
|
+
|
|
43
|
+
```sh
|
|
44
|
+
m365 spo file version clear --webUrl https://contoso.sharepoint.com --fileId 'b2307a39-e878-458b-bc90-03bc578531d6' --confirm
|
|
45
|
+
```
|
|
46
|
+
|
|
47
|
+
Removes all file version history in a specific site based on fileUrl without prompting for confirmation
|
|
48
|
+
|
|
49
|
+
```sh
|
|
50
|
+
m365 spo file version clear --webUrl https://contoso.sharepoint.com --fileUrl '/Shared Documents/Document.docx' --confirm
|
|
51
|
+
```
|
|
52
|
+
|
|
53
|
+
## Response
|
|
54
|
+
|
|
55
|
+
The command won't return a response on success.
|
|
@@ -0,0 +1,76 @@
|
|
|
1
|
+
# spo file version get
|
|
2
|
+
|
|
3
|
+
Gets information about a specific version of a specified file
|
|
4
|
+
|
|
5
|
+
## Usage
|
|
6
|
+
|
|
7
|
+
```sh
|
|
8
|
+
m365 spo file version get [options]
|
|
9
|
+
```
|
|
10
|
+
|
|
11
|
+
## Options
|
|
12
|
+
|
|
13
|
+
`-w, --webUrl <webUrl>`
|
|
14
|
+
: The URL of the site where the file is located
|
|
15
|
+
|
|
16
|
+
`--label <label>`
|
|
17
|
+
: Label of version which will be retrieved
|
|
18
|
+
|
|
19
|
+
`-u, --fileUrl [fileUrl]`
|
|
20
|
+
: The server-relative URL of the file to retrieve. Specify either `fileUrl` or `fileId` but not both
|
|
21
|
+
|
|
22
|
+
`-i, --fileId [fileId]`
|
|
23
|
+
: The UniqueId (GUID) of the file to retrieve. Specify either `fileUrl` or `fileId` but not both
|
|
24
|
+
|
|
25
|
+
--8<-- "docs/cmd/_global.md"
|
|
26
|
+
|
|
27
|
+
## Examples
|
|
28
|
+
|
|
29
|
+
Get file version in a specific site based on fileId
|
|
30
|
+
|
|
31
|
+
```sh
|
|
32
|
+
m365 spo file version get --webUrl https://contoso.sharepoint.com --label "1.0" --fileId 'b2307a39-e878-458b-bc90-03bc578531d6'
|
|
33
|
+
```
|
|
34
|
+
|
|
35
|
+
Get file in a specific site based on fileUrl
|
|
36
|
+
|
|
37
|
+
```sh
|
|
38
|
+
m365 spo file version get --webUrl https://contoso.sharepoint.com --label "1.0" --fileUrl '/Shared Documents/Document.docx'
|
|
39
|
+
```
|
|
40
|
+
|
|
41
|
+
## Response
|
|
42
|
+
|
|
43
|
+
=== "JSON"
|
|
44
|
+
|
|
45
|
+
```json
|
|
46
|
+
{
|
|
47
|
+
"CheckInComment": "",
|
|
48
|
+
"Created": "2022-10-30T12:03:06Z",
|
|
49
|
+
"ID": 512,
|
|
50
|
+
"IsCurrentVersion": false,
|
|
51
|
+
"Length": "18898",
|
|
52
|
+
"Size": 18898,
|
|
53
|
+
"Url": "_vti_history/512/Shared Documents/Document.docx",
|
|
54
|
+
"VersionLabel": "1.0"
|
|
55
|
+
}
|
|
56
|
+
```
|
|
57
|
+
|
|
58
|
+
=== "Text"
|
|
59
|
+
|
|
60
|
+
```text
|
|
61
|
+
CheckInComment :
|
|
62
|
+
Created : 2022-10-30T12:03:06Z
|
|
63
|
+
ID : 512
|
|
64
|
+
IsCurrentVersion: false
|
|
65
|
+
Length : 18898
|
|
66
|
+
Size : 18898
|
|
67
|
+
Url : _vti_history/512/Shared Documents/Document.docx
|
|
68
|
+
VersionLabel : 1.0
|
|
69
|
+
```
|
|
70
|
+
|
|
71
|
+
=== "CSV"
|
|
72
|
+
|
|
73
|
+
```csv
|
|
74
|
+
CheckInComment,Created,ID,IsCurrentVersion,Length,Size,Url,VersionLabel
|
|
75
|
+
,2022-10-30T12:03:06Z,512,,18898,18898,_vti_history/512/Shared Documents/Document.docx,1.0
|
|
76
|
+
```
|