@pnp/cli-microsoft365 9.1.0-beta.acd25f7 → 10.0.0-beta.04ac437
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/allCommands.json +1 -1
- package/allCommandsFull.json +1 -1
- package/dist/cli/cli.js +1 -1
- package/dist/m365/app/commands/permission/permission-add.js +9 -9
- package/dist/m365/cli/commands/cli-consent.js +3 -7
- package/dist/m365/cli/commands/config/config-set.js +0 -1
- package/dist/m365/commands/setupPresets.js +2 -4
- package/dist/m365/commands/status.js +2 -2
- package/dist/m365/entra/commands/enterpriseapp/enterpriseapp-add.js +13 -13
- package/dist/m365/entra/commands/enterpriseapp/enterpriseapp-get.js +18 -18
- package/dist/m365/entra/commands/enterpriseapp/enterpriseapp-list.js +1 -1
- package/dist/m365/entra/commands/group/group-user-list.js +4 -4
- package/dist/m365/entra/commands/m365group/m365group-conversation-post-list.js +4 -4
- package/dist/m365/entra/commands/m365group/m365group-recyclebinitem-list.js +3 -3
- package/dist/m365/entra/commands/m365group/m365group-user-list.js +6 -9
- package/dist/m365/outlook/commands/message/message-get.js +11 -11
- package/dist/m365/spfx/commands/project/DeployWorkflow.js +1 -1
- package/dist/m365/spfx/commands/project/project-github-workflow-add.js +1 -10
- package/dist/m365/spo/commands/applicationcustomizer/applicationcustomizer-get.js +0 -1
- package/dist/m365/spo/commands/contenttype/contenttype-field-remove.js +8 -8
- package/dist/m365/spo/commands/contenttype/contenttype-field-set.js +2 -2
- package/dist/m365/spo/commands/file/file-copy.js +59 -34
- package/dist/m365/spo/commands/file/file-move.js +55 -33
- package/dist/m365/spo/commands/folder/folder-set.js +0 -4
- package/dist/m365/spo/commands/list/list-list.js +1 -4
- package/dist/m365/spo/commands/site/site-appcatalog-remove.js +48 -24
- package/dist/m365/spo/commands/site/site-remove.js +1 -7
- package/dist/m365/spo/commands/sitescript/sitescript-get.js +3 -2
- package/dist/m365/spo/commands/tenant/tenant-recyclebinitem-restore.js +2 -22
- package/dist/m365/spo/commands.js +0 -1
- package/dist/m365/viva/commands/engage/engage-group-list.js +0 -5
- package/dist/m365/viva/commands/engage/engage-group-user-add.js +0 -5
- package/dist/m365/viva/commands/engage/engage-group-user-remove.js +0 -5
- package/dist/m365/viva/commands/engage/engage-message-add.js +0 -5
- package/dist/m365/viva/commands/engage/engage-message-get.js +0 -5
- package/dist/m365/viva/commands/engage/engage-message-like-set.js +0 -5
- package/dist/m365/viva/commands/engage/engage-message-list.js +0 -5
- package/dist/m365/viva/commands/engage/engage-message-remove.js +0 -5
- package/dist/m365/viva/commands/engage/engage-network-list.js +0 -5
- package/dist/m365/viva/commands/engage/engage-report-activitycounts.js +0 -8
- package/dist/m365/viva/commands/engage/engage-report-activityusercounts.js +0 -8
- package/dist/m365/viva/commands/engage/engage-report-activityuserdetail.js +0 -8
- package/dist/m365/viva/commands/engage/engage-report-deviceusagedistributionusercounts.js +0 -8
- package/dist/m365/viva/commands/engage/engage-report-deviceusageusercounts.js +0 -8
- package/dist/m365/viva/commands/engage/engage-report-deviceusageuserdetail.js +0 -8
- package/dist/m365/viva/commands/engage/engage-report-groupsactivitycounts.js +0 -8
- package/dist/m365/viva/commands/engage/engage-report-groupsactivitydetail.js +0 -8
- package/dist/m365/viva/commands/engage/engage-report-groupsactivitygroupcounts.js +0 -8
- package/dist/m365/viva/commands/engage/engage-search.js +0 -5
- package/dist/m365/viva/commands/engage/engage-user-get.js +0 -5
- package/dist/m365/viva/commands/engage/engage-user-list.js +0 -5
- package/dist/settingsNames.js +0 -1
- package/dist/utils/spo.js +76 -0
- package/docs/docs/_clisettings.mdx +0 -1
- package/docs/docs/cmd/app/permission/permission-add.mdx +5 -5
- package/docs/docs/cmd/cli/cli-consent.mdx +1 -1
- package/docs/docs/cmd/entra/enterpriseapp/enterpriseapp-add.mdx +12 -12
- package/docs/docs/cmd/entra/enterpriseapp/enterpriseapp-get.mdx +14 -14
- package/docs/docs/cmd/entra/enterpriseapp/enterpriseapp-list.mdx +5 -5
- package/docs/docs/cmd/entra/group/group-user-list.mdx +7 -7
- package/docs/docs/cmd/entra/m365group/m365group-conversation-post-list.mdx +5 -5
- package/docs/docs/cmd/entra/m365group/m365group-recyclebinitem-list.mdx +3 -3
- package/docs/docs/cmd/entra/m365group/m365group-user-list.mdx +1 -1
- package/docs/docs/cmd/outlook/message/message-get.mdx +5 -5
- package/docs/docs/cmd/setup.mdx +1 -3
- package/docs/docs/cmd/spfx/project/project-github-workflow-add.mdx +11 -12
- package/docs/docs/cmd/spo/applicationcustomizer/applicationcustomizer-get.mdx +6 -5
- package/docs/docs/cmd/spo/contenttype/contenttype-field-remove.mdx +7 -7
- package/docs/docs/cmd/spo/contenttype/contenttype-field-set.mdx +2 -2
- package/docs/docs/cmd/spo/file/file-copy.mdx +119 -12
- package/docs/docs/cmd/spo/file/file-move.mdx +116 -9
- package/docs/docs/cmd/spo/folder/folder-set.mdx +0 -6
- package/docs/docs/cmd/spo/list/list-list.mdx +5 -7
- package/docs/docs/cmd/spo/site/site-appcatalog-remove.mdx +11 -2
- package/docs/docs/cmd/spo/site/site-remove.mdx +0 -3
- package/docs/docs/cmd/spo/sitescript/sitescript-get.mdx +14 -1
- package/docs/docs/cmd/spo/tenant/tenant-recyclebinitem-restore.mdx +2 -49
- package/npm-shrinkwrap.json +2 -2
- package/package.json +1 -1
- package/dist/m365/viva/commands/engage/yammerCommands.js +0 -25
|
@@ -5,6 +5,7 @@ var __classPrivateFieldGet = (this && this.__classPrivateFieldGet) || function (
|
|
|
5
5
|
};
|
|
6
6
|
var _SpoFileCopyCommand_instances, _SpoFileCopyCommand_initTelemetry, _SpoFileCopyCommand_initOptions, _SpoFileCopyCommand_initValidators, _SpoFileCopyCommand_initOptionSets, _SpoFileCopyCommand_initTypes;
|
|
7
7
|
import request from '../../../../request.js';
|
|
8
|
+
import { CreateCopyJobsNameConflictBehavior, spo } from '../../../../utils/spo.js';
|
|
8
9
|
import { urlUtil } from '../../../../utils/urlUtil.js';
|
|
9
10
|
import { validation } from '../../../../utils/validation.js';
|
|
10
11
|
import SpoCommand from '../../../base/SpoCommand.js';
|
|
@@ -26,43 +27,51 @@ class SpoFileCopyCommand extends SpoCommand {
|
|
|
26
27
|
__classPrivateFieldGet(this, _SpoFileCopyCommand_instances, "m", _SpoFileCopyCommand_initOptionSets).call(this);
|
|
27
28
|
__classPrivateFieldGet(this, _SpoFileCopyCommand_instances, "m", _SpoFileCopyCommand_initTypes).call(this);
|
|
28
29
|
}
|
|
30
|
+
getExcludedOptionsWithUrls() {
|
|
31
|
+
return ['targetUrl', 'sourceUrl'];
|
|
32
|
+
}
|
|
29
33
|
async commandAction(logger, args) {
|
|
30
34
|
try {
|
|
31
35
|
const sourceServerRelativePath = await this.getSourcePath(logger, args.options);
|
|
32
36
|
const sourcePath = this.getAbsoluteUrl(args.options.webUrl, sourceServerRelativePath);
|
|
33
|
-
|
|
34
|
-
if (
|
|
35
|
-
|
|
37
|
+
const destinationPath = this.getAbsoluteUrl(args.options.webUrl, args.options.targetUrl);
|
|
38
|
+
if (this.verbose) {
|
|
39
|
+
await logger.logToStderr(`Copying file '${sourceServerRelativePath}' to '${args.options.targetUrl}'...`);
|
|
40
|
+
}
|
|
41
|
+
let newName = args.options.newName;
|
|
42
|
+
// Add original file extension if not provided
|
|
43
|
+
if (newName && !newName.includes('.')) {
|
|
44
|
+
newName += sourceServerRelativePath.substring(sourceServerRelativePath.lastIndexOf('.'));
|
|
36
45
|
}
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
46
|
+
const copyJobResponse = await spo.createCopyJob(args.options.webUrl, sourcePath, destinationPath, {
|
|
47
|
+
nameConflictBehavior: this.getNameConflictBehaviorValue(args.options.nameConflictBehavior),
|
|
48
|
+
bypassSharedLock: !!args.options.bypassSharedLock,
|
|
49
|
+
ignoreVersionHistory: !!args.options.ignoreVersionHistory,
|
|
50
|
+
newName: newName,
|
|
51
|
+
operation: 'copy'
|
|
52
|
+
});
|
|
53
|
+
if (args.options.skipWait) {
|
|
54
|
+
return;
|
|
55
|
+
}
|
|
56
|
+
if (this.verbose) {
|
|
57
|
+
await logger.logToStderr('Waiting for the copy job to complete...');
|
|
40
58
|
}
|
|
59
|
+
const copyJobResult = await spo.getCopyJobResult(args.options.webUrl, copyJobResponse);
|
|
41
60
|
if (this.verbose) {
|
|
42
|
-
await logger.logToStderr(
|
|
61
|
+
await logger.logToStderr('Getting information about the destination file...');
|
|
43
62
|
}
|
|
63
|
+
// Get destination file data
|
|
64
|
+
const siteRelativeDestinationFolder = '/' + copyJobResult.TargetObjectSiteRelativeUrl.substring(0, copyJobResult.TargetObjectSiteRelativeUrl.lastIndexOf('/'));
|
|
65
|
+
const absoluteWebUrl = destinationPath.substring(0, destinationPath.toLowerCase().lastIndexOf(siteRelativeDestinationFolder.toLowerCase()));
|
|
44
66
|
const requestOptions = {
|
|
45
|
-
url: `${
|
|
67
|
+
url: `${absoluteWebUrl}/_api/Web/GetFileById('${copyJobResult.TargetObjectUniqueId}')`,
|
|
46
68
|
headers: {
|
|
47
69
|
accept: 'application/json;odata=nometadata'
|
|
48
70
|
},
|
|
49
|
-
responseType: 'json'
|
|
50
|
-
data: {
|
|
51
|
-
srcPath: {
|
|
52
|
-
DecodedUrl: sourcePath
|
|
53
|
-
},
|
|
54
|
-
destPath: {
|
|
55
|
-
DecodedUrl: destinationPath
|
|
56
|
-
},
|
|
57
|
-
overwrite: args.options.nameConflictBehavior === 'replace',
|
|
58
|
-
options: {
|
|
59
|
-
KeepBoth: args.options.nameConflictBehavior === 'rename',
|
|
60
|
-
ResetAuthorAndCreatedOnCopy: !!args.options.resetAuthorAndCreated,
|
|
61
|
-
ShouldBypassSharedLocks: !!args.options.bypassSharedLock
|
|
62
|
-
}
|
|
63
|
-
}
|
|
71
|
+
responseType: 'json'
|
|
64
72
|
};
|
|
65
|
-
await request.
|
|
73
|
+
const destinationFile = await request.get(requestOptions);
|
|
74
|
+
await logger.log(destinationFile);
|
|
66
75
|
}
|
|
67
76
|
catch (err) {
|
|
68
77
|
this.handleRejectedODataJsonPromise(err);
|
|
@@ -76,17 +85,30 @@ class SpoFileCopyCommand extends SpoCommand {
|
|
|
76
85
|
await logger.logToStderr(`Retrieving server-relative path for file with ID '${options.sourceId}'...`);
|
|
77
86
|
}
|
|
78
87
|
const requestOptions = {
|
|
79
|
-
url: `${options.webUrl}/_api/Web/GetFileById('${options.sourceId}')
|
|
88
|
+
url: `${options.webUrl}/_api/Web/GetFileById('${options.sourceId}')/ServerRelativePath`,
|
|
80
89
|
headers: {
|
|
81
90
|
accept: 'application/json;odata=nometadata'
|
|
82
91
|
},
|
|
83
92
|
responseType: 'json'
|
|
84
93
|
};
|
|
85
94
|
const file = await request.get(requestOptions);
|
|
86
|
-
return file.
|
|
95
|
+
return file.DecodedUrl;
|
|
96
|
+
}
|
|
97
|
+
getNameConflictBehaviorValue(nameConflictBehavior) {
|
|
98
|
+
switch (nameConflictBehavior?.toLowerCase()) {
|
|
99
|
+
case 'fail':
|
|
100
|
+
return CreateCopyJobsNameConflictBehavior.Fail;
|
|
101
|
+
case 'replace':
|
|
102
|
+
return CreateCopyJobsNameConflictBehavior.Replace;
|
|
103
|
+
case 'rename':
|
|
104
|
+
return CreateCopyJobsNameConflictBehavior.Rename;
|
|
105
|
+
default:
|
|
106
|
+
return CreateCopyJobsNameConflictBehavior.Fail;
|
|
107
|
+
}
|
|
87
108
|
}
|
|
88
109
|
getAbsoluteUrl(webUrl, url) {
|
|
89
|
-
|
|
110
|
+
const result = url.startsWith('https://') ? url : urlUtil.getAbsoluteUrl(webUrl, url);
|
|
111
|
+
return urlUtil.removeTrailingSlashes(result);
|
|
90
112
|
}
|
|
91
113
|
}
|
|
92
114
|
_SpoFileCopyCommand_instances = new WeakSet(), _SpoFileCopyCommand_initTelemetry = function _SpoFileCopyCommand_initTelemetry() {
|
|
@@ -95,9 +117,10 @@ _SpoFileCopyCommand_instances = new WeakSet(), _SpoFileCopyCommand_initTelemetry
|
|
|
95
117
|
sourceUrl: typeof args.options.sourceUrl !== 'undefined',
|
|
96
118
|
sourceId: typeof args.options.sourceId !== 'undefined',
|
|
97
119
|
newName: typeof args.options.newName !== 'undefined',
|
|
98
|
-
nameConflictBehavior: args.options.nameConflictBehavior
|
|
99
|
-
|
|
100
|
-
bypassSharedLock: !!args.options.bypassSharedLock
|
|
120
|
+
nameConflictBehavior: typeof args.options.nameConflictBehavior !== 'undefined',
|
|
121
|
+
ignoreVersionHistory: !!args.options.ignoreVersionHistory,
|
|
122
|
+
bypassSharedLock: !!args.options.bypassSharedLock,
|
|
123
|
+
skipWait: !!args.options.skipWait
|
|
101
124
|
});
|
|
102
125
|
});
|
|
103
126
|
}, _SpoFileCopyCommand_initOptions = function _SpoFileCopyCommand_initOptions() {
|
|
@@ -114,10 +137,12 @@ _SpoFileCopyCommand_instances = new WeakSet(), _SpoFileCopyCommand_initTelemetry
|
|
|
114
137
|
}, {
|
|
115
138
|
option: '--nameConflictBehavior [nameConflictBehavior]',
|
|
116
139
|
autocomplete: this.nameConflictBehaviorOptions
|
|
117
|
-
}, {
|
|
118
|
-
option: '--resetAuthorAndCreated'
|
|
119
140
|
}, {
|
|
120
141
|
option: '--bypassSharedLock'
|
|
142
|
+
}, {
|
|
143
|
+
option: '--ignoreVersionHistory'
|
|
144
|
+
}, {
|
|
145
|
+
option: '--skipWait'
|
|
121
146
|
});
|
|
122
147
|
}, _SpoFileCopyCommand_initValidators = function _SpoFileCopyCommand_initValidators() {
|
|
123
148
|
this.validators.push(async (args) => {
|
|
@@ -128,7 +153,7 @@ _SpoFileCopyCommand_instances = new WeakSet(), _SpoFileCopyCommand_initTelemetry
|
|
|
128
153
|
if (args.options.sourceId && !validation.isValidGuid(args.options.sourceId)) {
|
|
129
154
|
return `${args.options.sourceId} is not a valid GUID for sourceId.`;
|
|
130
155
|
}
|
|
131
|
-
if (args.options.nameConflictBehavior && this.nameConflictBehaviorOptions.
|
|
156
|
+
if (args.options.nameConflictBehavior && !this.nameConflictBehaviorOptions.includes(args.options.nameConflictBehavior.toLowerCase())) {
|
|
132
157
|
return `${args.options.nameConflictBehavior} is not a valid nameConflictBehavior value. Allowed values: ${this.nameConflictBehaviorOptions.join(', ')}.`;
|
|
133
158
|
}
|
|
134
159
|
return true;
|
|
@@ -137,7 +162,7 @@ _SpoFileCopyCommand_instances = new WeakSet(), _SpoFileCopyCommand_initTelemetry
|
|
|
137
162
|
this.optionSets.push({ options: ['sourceUrl', 'sourceId'] });
|
|
138
163
|
}, _SpoFileCopyCommand_initTypes = function _SpoFileCopyCommand_initTypes() {
|
|
139
164
|
this.types.string.push('webUrl', 'sourceUrl', 'sourceId', 'targetUrl', 'newName', 'nameConflictBehavior');
|
|
140
|
-
this.types.boolean.push('
|
|
165
|
+
this.types.boolean.push('bypassSharedLock', 'ignoreVersionHistory', 'skipWait');
|
|
141
166
|
};
|
|
142
167
|
export default new SpoFileCopyCommand();
|
|
143
168
|
//# sourceMappingURL=file-copy.js.map
|
|
@@ -5,6 +5,7 @@ var __classPrivateFieldGet = (this && this.__classPrivateFieldGet) || function (
|
|
|
5
5
|
};
|
|
6
6
|
var _SpoFileMoveCommand_instances, _SpoFileMoveCommand_initTelemetry, _SpoFileMoveCommand_initOptions, _SpoFileMoveCommand_initValidators, _SpoFileMoveCommand_initOptionSets, _SpoFileMoveCommand_initTypes;
|
|
7
7
|
import request from '../../../../request.js';
|
|
8
|
+
import { CreateCopyJobsNameConflictBehavior, spo } from '../../../../utils/spo.js';
|
|
8
9
|
import { urlUtil } from '../../../../utils/urlUtil.js';
|
|
9
10
|
import { validation } from '../../../../utils/validation.js';
|
|
10
11
|
import SpoCommand from '../../../base/SpoCommand.js';
|
|
@@ -31,41 +32,46 @@ class SpoFileMoveCommand extends SpoCommand {
|
|
|
31
32
|
}
|
|
32
33
|
async commandAction(logger, args) {
|
|
33
34
|
try {
|
|
34
|
-
const
|
|
35
|
+
const sourceServerRelativePath = await this.getSourcePath(logger, args.options);
|
|
36
|
+
const sourcePath = this.getAbsoluteUrl(args.options.webUrl, sourceServerRelativePath);
|
|
37
|
+
const destinationPath = this.getAbsoluteUrl(args.options.webUrl, args.options.targetUrl);
|
|
35
38
|
if (this.verbose) {
|
|
36
|
-
await logger.logToStderr(`Moving file ${
|
|
39
|
+
await logger.logToStderr(`Moving file '${sourceServerRelativePath}' to '${args.options.targetUrl}'...`);
|
|
37
40
|
}
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
if (
|
|
41
|
-
|
|
41
|
+
let newName = args.options.newName;
|
|
42
|
+
// Add original file extension if not provided
|
|
43
|
+
if (newName && !newName.includes('.')) {
|
|
44
|
+
newName += sourceServerRelativePath.substring(sourceServerRelativePath.lastIndexOf('.'));
|
|
42
45
|
}
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
+
const copyJobResponse = await spo.createCopyJob(args.options.webUrl, sourcePath, destinationPath, {
|
|
47
|
+
nameConflictBehavior: this.getNameConflictBehaviorValue(args.options.nameConflictBehavior),
|
|
48
|
+
bypassSharedLock: !!args.options.bypassSharedLock,
|
|
49
|
+
includeItemPermissions: !!args.options.includeItemPermissions,
|
|
50
|
+
newName: newName,
|
|
51
|
+
operation: 'move'
|
|
52
|
+
});
|
|
53
|
+
if (args.options.skipWait) {
|
|
54
|
+
return;
|
|
46
55
|
}
|
|
56
|
+
if (this.verbose) {
|
|
57
|
+
await logger.logToStderr('Waiting for the move job to complete...');
|
|
58
|
+
}
|
|
59
|
+
const copyJobResult = await spo.getCopyJobResult(args.options.webUrl, copyJobResponse);
|
|
60
|
+
if (this.verbose) {
|
|
61
|
+
await logger.logToStderr('Getting information about the destination file...');
|
|
62
|
+
}
|
|
63
|
+
// Get destination file data
|
|
64
|
+
const siteRelativeDestinationFolder = '/' + copyJobResult.TargetObjectSiteRelativeUrl.substring(0, copyJobResult.TargetObjectSiteRelativeUrl.lastIndexOf('/'));
|
|
65
|
+
const absoluteWebUrl = destinationPath.substring(0, destinationPath.toLowerCase().lastIndexOf(siteRelativeDestinationFolder.toLowerCase()));
|
|
47
66
|
const requestOptions = {
|
|
48
|
-
url: `${
|
|
67
|
+
url: `${absoluteWebUrl}/_api/Web/GetFileById('${copyJobResult.TargetObjectUniqueId}')`,
|
|
49
68
|
headers: {
|
|
50
69
|
accept: 'application/json;odata=nometadata'
|
|
51
70
|
},
|
|
52
|
-
responseType: 'json'
|
|
53
|
-
data: {
|
|
54
|
-
srcPath: {
|
|
55
|
-
DecodedUrl: absoluteSourcePath
|
|
56
|
-
},
|
|
57
|
-
destPath: {
|
|
58
|
-
DecodedUrl: absoluteTargetPath
|
|
59
|
-
},
|
|
60
|
-
overwrite: args.options.nameConflictBehavior === 'replace',
|
|
61
|
-
options: {
|
|
62
|
-
KeepBoth: args.options.nameConflictBehavior === 'rename',
|
|
63
|
-
ShouldBypassSharedLocks: !!args.options.bypassSharedLock,
|
|
64
|
-
RetainEditorAndModifiedOnMove: !!args.options.retainEditorAndModified
|
|
65
|
-
}
|
|
66
|
-
}
|
|
71
|
+
responseType: 'json'
|
|
67
72
|
};
|
|
68
|
-
await request.
|
|
73
|
+
const destinationFile = await request.get(requestOptions);
|
|
74
|
+
await logger.log(destinationFile);
|
|
69
75
|
}
|
|
70
76
|
catch (err) {
|
|
71
77
|
this.handleRejectedODataJsonPromise(err);
|
|
@@ -79,17 +85,30 @@ class SpoFileMoveCommand extends SpoCommand {
|
|
|
79
85
|
await logger.logToStderr(`Retrieving server-relative path for file with ID '${options.sourceId}'...`);
|
|
80
86
|
}
|
|
81
87
|
const requestOptions = {
|
|
82
|
-
url: `${options.webUrl}/_api/Web/GetFileById('${options.sourceId}')
|
|
88
|
+
url: `${options.webUrl}/_api/Web/GetFileById('${options.sourceId}')/ServerRelativePath`,
|
|
83
89
|
headers: {
|
|
84
90
|
accept: 'application/json;odata=nometadata'
|
|
85
91
|
},
|
|
86
92
|
responseType: 'json'
|
|
87
93
|
};
|
|
88
94
|
const file = await request.get(requestOptions);
|
|
89
|
-
return file.
|
|
95
|
+
return file.DecodedUrl;
|
|
96
|
+
}
|
|
97
|
+
getNameConflictBehaviorValue(nameConflictBehavior) {
|
|
98
|
+
switch (nameConflictBehavior?.toLowerCase()) {
|
|
99
|
+
case 'fail':
|
|
100
|
+
return CreateCopyJobsNameConflictBehavior.Fail;
|
|
101
|
+
case 'replace':
|
|
102
|
+
return CreateCopyJobsNameConflictBehavior.Replace;
|
|
103
|
+
case 'rename':
|
|
104
|
+
return CreateCopyJobsNameConflictBehavior.Rename;
|
|
105
|
+
default:
|
|
106
|
+
return CreateCopyJobsNameConflictBehavior.Fail;
|
|
107
|
+
}
|
|
90
108
|
}
|
|
91
109
|
getAbsoluteUrl(webUrl, url) {
|
|
92
|
-
|
|
110
|
+
const result = url.startsWith('https://') ? url : urlUtil.getAbsoluteUrl(webUrl, url);
|
|
111
|
+
return urlUtil.removeTrailingSlashes(result);
|
|
93
112
|
}
|
|
94
113
|
}
|
|
95
114
|
_SpoFileMoveCommand_instances = new WeakSet(), _SpoFileMoveCommand_initTelemetry = function _SpoFileMoveCommand_initTelemetry() {
|
|
@@ -99,8 +118,9 @@ _SpoFileMoveCommand_instances = new WeakSet(), _SpoFileMoveCommand_initTelemetry
|
|
|
99
118
|
sourceId: typeof args.options.sourceId !== 'undefined',
|
|
100
119
|
newName: typeof args.options.newName !== 'undefined',
|
|
101
120
|
nameConflictBehavior: typeof args.options.nameConflictBehavior !== 'undefined',
|
|
102
|
-
|
|
103
|
-
bypassSharedLock: !!args.options.bypassSharedLock
|
|
121
|
+
includeItemPermissions: !!args.options.includeItemPermissions,
|
|
122
|
+
bypassSharedLock: !!args.options.bypassSharedLock,
|
|
123
|
+
skipWait: !!args.options.skipWait
|
|
104
124
|
});
|
|
105
125
|
});
|
|
106
126
|
}, _SpoFileMoveCommand_initOptions = function _SpoFileMoveCommand_initOptions() {
|
|
@@ -118,9 +138,11 @@ _SpoFileMoveCommand_instances = new WeakSet(), _SpoFileMoveCommand_initTelemetry
|
|
|
118
138
|
option: '--nameConflictBehavior [nameConflictBehavior]',
|
|
119
139
|
autocomplete: this.nameConflictBehaviorOptions
|
|
120
140
|
}, {
|
|
121
|
-
option: '--
|
|
141
|
+
option: '--includeItemPermissions'
|
|
122
142
|
}, {
|
|
123
143
|
option: '--bypassSharedLock'
|
|
144
|
+
}, {
|
|
145
|
+
option: '--skipWait'
|
|
124
146
|
});
|
|
125
147
|
}, _SpoFileMoveCommand_initValidators = function _SpoFileMoveCommand_initValidators() {
|
|
126
148
|
this.validators.push(async (args) => {
|
|
@@ -140,7 +162,7 @@ _SpoFileMoveCommand_instances = new WeakSet(), _SpoFileMoveCommand_initTelemetry
|
|
|
140
162
|
this.optionSets.push({ options: ['sourceUrl', 'sourceId'] });
|
|
141
163
|
}, _SpoFileMoveCommand_initTypes = function _SpoFileMoveCommand_initTypes() {
|
|
142
164
|
this.types.string.push('webUrl', 'sourceUrl', 'sourceId', 'targetUrl', 'newName', 'nameConflictBehavior');
|
|
143
|
-
this.types.boolean.push('
|
|
165
|
+
this.types.boolean.push('includeItemPermissions', 'bypassSharedLock', 'skipWait');
|
|
144
166
|
};
|
|
145
167
|
export default new SpoFileMoveCommand();
|
|
146
168
|
//# sourceMappingURL=file-move.js.map
|
|
@@ -18,9 +18,6 @@ class SpoFolderSetCommand extends SpoCommand {
|
|
|
18
18
|
get description() {
|
|
19
19
|
return 'Updates a folder';
|
|
20
20
|
}
|
|
21
|
-
alias() {
|
|
22
|
-
return [commands.FOLDER_RENAME];
|
|
23
|
-
}
|
|
24
21
|
constructor() {
|
|
25
22
|
super();
|
|
26
23
|
_SpoFolderSetCommand_instances.add(this);
|
|
@@ -34,7 +31,6 @@ class SpoFolderSetCommand extends SpoCommand {
|
|
|
34
31
|
}
|
|
35
32
|
async commandAction(logger, args) {
|
|
36
33
|
try {
|
|
37
|
-
await this.showDeprecationWarning(logger, this.alias()[0], this.name);
|
|
38
34
|
if (this.verbose) {
|
|
39
35
|
await logger.logToStderr(`Updating folder '${args.options.name}'...`);
|
|
40
36
|
}
|
|
@@ -16,7 +16,7 @@ class SpoListListCommand extends SpoCommand {
|
|
|
16
16
|
return 'Lists all available list in the specified site';
|
|
17
17
|
}
|
|
18
18
|
defaultProperties() {
|
|
19
|
-
return ['Title', '
|
|
19
|
+
return ['Title', 'Id'];
|
|
20
20
|
}
|
|
21
21
|
constructor() {
|
|
22
22
|
super();
|
|
@@ -36,9 +36,6 @@ class SpoListListCommand extends SpoCommand {
|
|
|
36
36
|
queryParams.push(`$filter=${args.options.filter}`);
|
|
37
37
|
}
|
|
38
38
|
const listInstances = await odata.getAllItems(`${args.options.webUrl}/_api/web/lists?${queryParams.join('&')}`);
|
|
39
|
-
listInstances.forEach(l => {
|
|
40
|
-
l.Url = l.RootFolder.ServerRelativeUrl;
|
|
41
|
-
});
|
|
42
39
|
await logger.log(listInstances);
|
|
43
40
|
}
|
|
44
41
|
catch (err) {
|
|
@@ -3,7 +3,8 @@ var __classPrivateFieldGet = (this && this.__classPrivateFieldGet) || function (
|
|
|
3
3
|
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");
|
|
4
4
|
return kind === "m" ? f : kind === "a" ? f.call(receiver) : f ? f.value : state.get(receiver);
|
|
5
5
|
};
|
|
6
|
-
var _SpoSiteAppCatalogRemoveCommand_instances, _SpoSiteAppCatalogRemoveCommand_initOptions, _SpoSiteAppCatalogRemoveCommand_initValidators;
|
|
6
|
+
var _SpoSiteAppCatalogRemoveCommand_instances, _SpoSiteAppCatalogRemoveCommand_initTelemetry, _SpoSiteAppCatalogRemoveCommand_initOptions, _SpoSiteAppCatalogRemoveCommand_initValidators, _SpoSiteAppCatalogRemoveCommand_initTypes;
|
|
7
|
+
import { cli } from '../../../../cli/cli.js';
|
|
7
8
|
import config from '../../../../config.js';
|
|
8
9
|
import request from '../../../../request.js';
|
|
9
10
|
import { formatting } from '../../../../utils/formatting.js';
|
|
@@ -21,47 +22,70 @@ class SpoSiteAppCatalogRemoveCommand extends SpoCommand {
|
|
|
21
22
|
constructor() {
|
|
22
23
|
super();
|
|
23
24
|
_SpoSiteAppCatalogRemoveCommand_instances.add(this);
|
|
25
|
+
__classPrivateFieldGet(this, _SpoSiteAppCatalogRemoveCommand_instances, "m", _SpoSiteAppCatalogRemoveCommand_initTelemetry).call(this);
|
|
24
26
|
__classPrivateFieldGet(this, _SpoSiteAppCatalogRemoveCommand_instances, "m", _SpoSiteAppCatalogRemoveCommand_initOptions).call(this);
|
|
25
27
|
__classPrivateFieldGet(this, _SpoSiteAppCatalogRemoveCommand_instances, "m", _SpoSiteAppCatalogRemoveCommand_initValidators).call(this);
|
|
28
|
+
__classPrivateFieldGet(this, _SpoSiteAppCatalogRemoveCommand_instances, "m", _SpoSiteAppCatalogRemoveCommand_initTypes).call(this);
|
|
26
29
|
}
|
|
27
30
|
async commandAction(logger, args) {
|
|
28
|
-
const
|
|
29
|
-
|
|
30
|
-
const spoAdminUrl = await spo.getSpoAdminUrl(logger, this.debug);
|
|
31
|
-
const requestDigest = await spo.getRequestDigest(spoAdminUrl);
|
|
31
|
+
const removeSiteAppcatalog = async () => {
|
|
32
|
+
const url = args.options.siteUrl;
|
|
32
33
|
if (this.verbose) {
|
|
33
34
|
await logger.logToStderr(`Disabling site collection app catalog...`);
|
|
34
35
|
}
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
36
|
+
try {
|
|
37
|
+
const spoAdminUrl = await spo.getSpoAdminUrl(logger, this.debug);
|
|
38
|
+
const requestDigest = await spo.getRequestDigest(spoAdminUrl);
|
|
39
|
+
const requestOptions = {
|
|
40
|
+
url: `${spoAdminUrl}/_vti_bin/client.svc/ProcessQuery`,
|
|
41
|
+
headers: {
|
|
42
|
+
'X-RequestDigest': requestDigest.FormDigestValue
|
|
43
|
+
},
|
|
44
|
+
data: `<Request AddExpandoFieldTypeSuffix="true" SchemaVersion="15.0.0.0" LibraryVersion="16.0.0.0" ApplicationName="${config.applicationName}" xmlns="http://schemas.microsoft.com/sharepoint/clientquery/2009"><Actions><ObjectPath Id="50" ObjectPathId="49" /><ObjectPath Id="52" ObjectPathId="51" /><ObjectPath Id="54" ObjectPathId="53" /><ObjectPath Id="56" ObjectPathId="55" /><ObjectPath Id="58" ObjectPathId="57" /><Method Name="Remove" Id="59" ObjectPathId="57"><Parameters><Parameter Type="String">${formatting.escapeXml(url)}</Parameter></Parameters></Method></Actions><ObjectPaths><Constructor Id="49" TypeId="{268004ae-ef6b-4e9b-8425-127220d84719}" /><Method Id="51" ParentId="49" Name="GetSiteByUrl"><Parameters><Parameter Type="String">${formatting.escapeXml(url)}</Parameter></Parameters></Method><Property Id="53" ParentId="51" Name="RootWeb" /><Property Id="55" ParentId="53" Name="TenantAppCatalog" /><Property Id="57" ParentId="55" Name="SiteCollectionAppCatalogsSites" /></ObjectPaths></Request>`
|
|
45
|
+
};
|
|
46
|
+
const res = await request.post(requestOptions);
|
|
47
|
+
const json = JSON.parse(res);
|
|
48
|
+
const response = json[0];
|
|
49
|
+
if (response.ErrorInfo) {
|
|
50
|
+
throw response.ErrorInfo.ErrorMessage;
|
|
51
|
+
}
|
|
52
|
+
else {
|
|
53
|
+
if (this.verbose) {
|
|
54
|
+
await logger.logToStderr('Site collection app catalog disabled');
|
|
55
|
+
}
|
|
51
56
|
}
|
|
52
57
|
}
|
|
58
|
+
catch (err) {
|
|
59
|
+
this.handleRejectedPromise(err);
|
|
60
|
+
}
|
|
61
|
+
};
|
|
62
|
+
if (args.options.force) {
|
|
63
|
+
await removeSiteAppcatalog();
|
|
53
64
|
}
|
|
54
|
-
|
|
55
|
-
|
|
65
|
+
else {
|
|
66
|
+
const result = await cli.promptForConfirmation({ message: `Are you sure you want to remove the app catalog from ${args.options.siteUrl}?` });
|
|
67
|
+
if (result) {
|
|
68
|
+
await removeSiteAppcatalog();
|
|
69
|
+
}
|
|
56
70
|
}
|
|
57
71
|
}
|
|
58
72
|
}
|
|
59
|
-
_SpoSiteAppCatalogRemoveCommand_instances = new WeakSet(),
|
|
73
|
+
_SpoSiteAppCatalogRemoveCommand_instances = new WeakSet(), _SpoSiteAppCatalogRemoveCommand_initTelemetry = function _SpoSiteAppCatalogRemoveCommand_initTelemetry() {
|
|
74
|
+
this.telemetry.push((args) => {
|
|
75
|
+
Object.assign(this.telemetryProperties, {
|
|
76
|
+
force: !!args.options.force
|
|
77
|
+
});
|
|
78
|
+
});
|
|
79
|
+
}, _SpoSiteAppCatalogRemoveCommand_initOptions = function _SpoSiteAppCatalogRemoveCommand_initOptions() {
|
|
60
80
|
this.options.unshift({
|
|
61
81
|
option: '-u, --siteUrl <siteUrl>'
|
|
82
|
+
}, {
|
|
83
|
+
option: '-f, --force'
|
|
62
84
|
});
|
|
63
85
|
}, _SpoSiteAppCatalogRemoveCommand_initValidators = function _SpoSiteAppCatalogRemoveCommand_initValidators() {
|
|
64
86
|
this.validators.push(async (args) => validation.isValidSharePointUrl(args.options.siteUrl));
|
|
87
|
+
}, _SpoSiteAppCatalogRemoveCommand_initTypes = function _SpoSiteAppCatalogRemoveCommand_initTypes() {
|
|
88
|
+
this.types.string.push('siteUrl');
|
|
65
89
|
};
|
|
66
90
|
export default new SpoSiteAppCatalogRemoveCommand();
|
|
67
91
|
//# sourceMappingURL=site-appcatalog-remove.js.map
|
|
@@ -31,9 +31,6 @@ class SpoSiteRemoveCommand extends SpoCommand {
|
|
|
31
31
|
__classPrivateFieldGet(this, _SpoSiteRemoveCommand_instances, "m", _SpoSiteRemoveCommand_initTypes).call(this);
|
|
32
32
|
}
|
|
33
33
|
async commandAction(logger, args) {
|
|
34
|
-
if (args.options.wait) {
|
|
35
|
-
await this.warn(logger, `Option 'wait' is deprecated and will be removed in the next major release.`);
|
|
36
|
-
}
|
|
37
34
|
if (args.options.force) {
|
|
38
35
|
await this.removeSite(logger, args.options);
|
|
39
36
|
}
|
|
@@ -196,7 +193,6 @@ _SpoSiteRemoveCommand_instances = new WeakSet(), _SpoSiteRemoveCommand_initTelem
|
|
|
196
193
|
Object.assign(this.telemetryProperties, {
|
|
197
194
|
skipRecycleBin: !!args.options.skipRecycleBin,
|
|
198
195
|
fromRecycleBin: !!args.options.fromRecycleBin,
|
|
199
|
-
wait: !!args.options.wait,
|
|
200
196
|
force: !!args.options.force
|
|
201
197
|
});
|
|
202
198
|
});
|
|
@@ -207,8 +203,6 @@ _SpoSiteRemoveCommand_instances = new WeakSet(), _SpoSiteRemoveCommand_initTelem
|
|
|
207
203
|
option: '--skipRecycleBin'
|
|
208
204
|
}, {
|
|
209
205
|
option: '--fromRecycleBin'
|
|
210
|
-
}, {
|
|
211
|
-
option: '--wait'
|
|
212
206
|
}, {
|
|
213
207
|
option: '-f, --force'
|
|
214
208
|
});
|
|
@@ -230,7 +224,7 @@ _SpoSiteRemoveCommand_instances = new WeakSet(), _SpoSiteRemoveCommand_initTelem
|
|
|
230
224
|
});
|
|
231
225
|
}, _SpoSiteRemoveCommand_initTypes = function _SpoSiteRemoveCommand_initTypes() {
|
|
232
226
|
this.types.string.push('url');
|
|
233
|
-
this.types.boolean.push('skipRecycleBin', 'fromRecycleBin', '
|
|
227
|
+
this.types.boolean.push('skipRecycleBin', 'fromRecycleBin', 'force');
|
|
234
228
|
};
|
|
235
229
|
export default new SpoSiteRemoveCommand();
|
|
236
230
|
//# sourceMappingURL=site-remove.js.map
|
|
@@ -37,8 +37,9 @@ class SpoSiteScriptGetCommand extends SpoCommand {
|
|
|
37
37
|
responseType: 'json'
|
|
38
38
|
};
|
|
39
39
|
const response = await request.post(requestOptions);
|
|
40
|
-
|
|
41
|
-
|
|
40
|
+
response.Content = JSON.parse(response.Content);
|
|
41
|
+
if (args.options.content) {
|
|
42
|
+
await logger.log(response.Content);
|
|
42
43
|
return;
|
|
43
44
|
}
|
|
44
45
|
await logger.log(response);
|
|
@@ -3,7 +3,7 @@ var __classPrivateFieldGet = (this && this.__classPrivateFieldGet) || function (
|
|
|
3
3
|
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");
|
|
4
4
|
return kind === "m" ? f : kind === "a" ? f.call(receiver) : f ? f.value : state.get(receiver);
|
|
5
5
|
};
|
|
6
|
-
var _SpoTenantRecycleBinItemRestoreCommand_instances,
|
|
6
|
+
var _SpoTenantRecycleBinItemRestoreCommand_instances, _SpoTenantRecycleBinItemRestoreCommand_initOptions, _SpoTenantRecycleBinItemRestoreCommand_initValidators, _SpoTenantRecycleBinItemRestoreCommand_initTypes;
|
|
7
7
|
import request from '../../../../request.js';
|
|
8
8
|
import { formatting } from '../../../../utils/formatting.js';
|
|
9
9
|
import { odata } from '../../../../utils/odata.js';
|
|
@@ -22,15 +22,11 @@ class SpoTenantRecycleBinItemRestoreCommand extends SpoCommand {
|
|
|
22
22
|
constructor() {
|
|
23
23
|
super();
|
|
24
24
|
_SpoTenantRecycleBinItemRestoreCommand_instances.add(this);
|
|
25
|
-
__classPrivateFieldGet(this, _SpoTenantRecycleBinItemRestoreCommand_instances, "m", _SpoTenantRecycleBinItemRestoreCommand_initTelemetry).call(this);
|
|
26
25
|
__classPrivateFieldGet(this, _SpoTenantRecycleBinItemRestoreCommand_instances, "m", _SpoTenantRecycleBinItemRestoreCommand_initOptions).call(this);
|
|
27
26
|
__classPrivateFieldGet(this, _SpoTenantRecycleBinItemRestoreCommand_instances, "m", _SpoTenantRecycleBinItemRestoreCommand_initValidators).call(this);
|
|
28
27
|
__classPrivateFieldGet(this, _SpoTenantRecycleBinItemRestoreCommand_instances, "m", _SpoTenantRecycleBinItemRestoreCommand_initTypes).call(this);
|
|
29
28
|
}
|
|
30
29
|
async commandAction(logger, args) {
|
|
31
|
-
if (args.options.wait) {
|
|
32
|
-
await this.warn(logger, `Option 'wait' is deprecated and will be removed in the next major release.`);
|
|
33
|
-
}
|
|
34
30
|
try {
|
|
35
31
|
if (this.verbose) {
|
|
36
32
|
await logger.logToStderr(`Restoring site collection '${args.options.siteUrl}' from recycle bin.`);
|
|
@@ -62,13 +58,6 @@ class SpoTenantRecycleBinItemRestoreCommand extends SpoCommand {
|
|
|
62
58
|
};
|
|
63
59
|
await request.post(restoreOptions);
|
|
64
60
|
}
|
|
65
|
-
// Here, we return a fixed response because this new API endpoint doesn't return a response while the previous API did.
|
|
66
|
-
// This has to be removed in the next major release.
|
|
67
|
-
await logger.log({
|
|
68
|
-
HasTimedout: false,
|
|
69
|
-
IsComplete: !!args.options.wait,
|
|
70
|
-
PollingInterval: 15000
|
|
71
|
-
});
|
|
72
61
|
}
|
|
73
62
|
catch (err) {
|
|
74
63
|
this.handleRejectedODataJsonPromise(err);
|
|
@@ -79,23 +68,14 @@ class SpoTenantRecycleBinItemRestoreCommand extends SpoCommand {
|
|
|
79
68
|
return sites[0].GroupId;
|
|
80
69
|
}
|
|
81
70
|
}
|
|
82
|
-
_SpoTenantRecycleBinItemRestoreCommand_instances = new WeakSet(),
|
|
83
|
-
this.telemetry.push((args) => {
|
|
84
|
-
Object.assign(this.telemetryProperties, {
|
|
85
|
-
wait: !!args.options.wait
|
|
86
|
-
});
|
|
87
|
-
});
|
|
88
|
-
}, _SpoTenantRecycleBinItemRestoreCommand_initOptions = function _SpoTenantRecycleBinItemRestoreCommand_initOptions() {
|
|
71
|
+
_SpoTenantRecycleBinItemRestoreCommand_instances = new WeakSet(), _SpoTenantRecycleBinItemRestoreCommand_initOptions = function _SpoTenantRecycleBinItemRestoreCommand_initOptions() {
|
|
89
72
|
this.options.unshift({
|
|
90
73
|
option: '-u, --siteUrl <siteUrl>'
|
|
91
|
-
}, {
|
|
92
|
-
option: '--wait'
|
|
93
74
|
});
|
|
94
75
|
}, _SpoTenantRecycleBinItemRestoreCommand_initValidators = function _SpoTenantRecycleBinItemRestoreCommand_initValidators() {
|
|
95
76
|
this.validators.push(async (args) => validation.isValidSharePointUrl(args.options.siteUrl));
|
|
96
77
|
}, _SpoTenantRecycleBinItemRestoreCommand_initTypes = function _SpoTenantRecycleBinItemRestoreCommand_initTypes() {
|
|
97
78
|
this.types.string.push('siteUrl');
|
|
98
|
-
this.types.boolean.push('wait');
|
|
99
79
|
};
|
|
100
80
|
export default new SpoTenantRecycleBinItemRestoreCommand();
|
|
101
81
|
//# sourceMappingURL=tenant-recyclebinitem-restore.js.map
|
|
@@ -92,7 +92,6 @@ export default {
|
|
|
92
92
|
FOLDER_LIST: `${prefix} folder list`,
|
|
93
93
|
FOLDER_MOVE: `${prefix} folder move`,
|
|
94
94
|
FOLDER_REMOVE: `${prefix} folder remove`,
|
|
95
|
-
FOLDER_RENAME: `${prefix} folder rename`,
|
|
96
95
|
FOLDER_SET: `${prefix} folder set`,
|
|
97
96
|
FOLDER_RETENTIONLABEL_ENSURE: `${prefix} folder retentionlabel ensure`,
|
|
98
97
|
FOLDER_RETENTIONLABEL_REMOVE: `${prefix} folder retentionlabel remove`,
|
|
@@ -7,7 +7,6 @@ var _VivaEngageGroupListCommand_instances, _VivaEngageGroupListCommand_initTelem
|
|
|
7
7
|
import request from '../../../../request.js';
|
|
8
8
|
import VivaEngageCommand from '../../../base/VivaEngageCommand.js';
|
|
9
9
|
import commands from '../../commands.js';
|
|
10
|
-
import yammerCommands from './yammerCommands.js';
|
|
11
10
|
class VivaEngageGroupListCommand extends VivaEngageCommand {
|
|
12
11
|
get name() {
|
|
13
12
|
return commands.ENGAGE_GROUP_LIST;
|
|
@@ -15,9 +14,6 @@ class VivaEngageGroupListCommand extends VivaEngageCommand {
|
|
|
15
14
|
get description() {
|
|
16
15
|
return 'Returns the list of groups in a Viva Engage network or the groups for a specific user';
|
|
17
16
|
}
|
|
18
|
-
alias() {
|
|
19
|
-
return [yammerCommands.GROUP_LIST];
|
|
20
|
-
}
|
|
21
17
|
constructor() {
|
|
22
18
|
super();
|
|
23
19
|
_VivaEngageGroupListCommand_instances.add(this);
|
|
@@ -59,7 +55,6 @@ class VivaEngageGroupListCommand extends VivaEngageCommand {
|
|
|
59
55
|
}
|
|
60
56
|
}
|
|
61
57
|
async commandAction(logger, args) {
|
|
62
|
-
await this.showDeprecationWarning(logger, this.alias()[0], this.name);
|
|
63
58
|
this.items = []; // this will reset the items array in interactive mode
|
|
64
59
|
try {
|
|
65
60
|
await this.getAllItems(logger, args, 1);
|
|
@@ -7,7 +7,6 @@ var _VivaEngageGroupUserAddCommand_instances, _VivaEngageGroupUserAddCommand_ini
|
|
|
7
7
|
import request from '../../../../request.js';
|
|
8
8
|
import VivaEngageCommand from '../../../base/VivaEngageCommand.js';
|
|
9
9
|
import commands from '../../commands.js';
|
|
10
|
-
import yammerCommands from './yammerCommands.js';
|
|
11
10
|
class VivaEngageGroupUserAddCommand extends VivaEngageCommand {
|
|
12
11
|
get name() {
|
|
13
12
|
return commands.ENGAGE_GROUP_USER_ADD;
|
|
@@ -15,9 +14,6 @@ class VivaEngageGroupUserAddCommand extends VivaEngageCommand {
|
|
|
15
14
|
get description() {
|
|
16
15
|
return 'Adds a user to a Viva Engage Group';
|
|
17
16
|
}
|
|
18
|
-
alias() {
|
|
19
|
-
return [yammerCommands.GROUP_USER_ADD];
|
|
20
|
-
}
|
|
21
17
|
constructor() {
|
|
22
18
|
super();
|
|
23
19
|
_VivaEngageGroupUserAddCommand_instances.add(this);
|
|
@@ -26,7 +22,6 @@ class VivaEngageGroupUserAddCommand extends VivaEngageCommand {
|
|
|
26
22
|
__classPrivateFieldGet(this, _VivaEngageGroupUserAddCommand_instances, "m", _VivaEngageGroupUserAddCommand_initValidators).call(this);
|
|
27
23
|
}
|
|
28
24
|
async commandAction(logger, args) {
|
|
29
|
-
await this.showDeprecationWarning(logger, this.alias()[0], this.name);
|
|
30
25
|
const requestOptions = {
|
|
31
26
|
url: `${this.resource}/v1/group_memberships.json`,
|
|
32
27
|
headers: {
|