@pnp/cli-microsoft365 11.6.0-beta.358a4f1 → 11.6.0-beta.bc374af
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/.devproxy/api-specs/sharepoint-admin.yaml +40 -0
- package/.devproxy/api-specs/sharepoint.yaml +48 -0
- package/allCommands.json +1 -1
- package/allCommandsFull.json +1 -1
- package/dist/m365/entra/commands/user/user-recyclebinitem-list.js +5 -0
- package/dist/m365/outlook/commands/calendargroup/calendargroup-list.js +87 -0
- package/dist/m365/outlook/commands.js +1 -0
- package/dist/m365/spo/commands/agent/agent-add.js +172 -0
- package/dist/m365/spo/commands/list/list-set.js +186 -378
- package/dist/m365/spo/commands/navigation/navigation-node-get.js +18 -28
- package/dist/m365/spo/commands/navigation/navigation-node-list.js +14 -39
- package/dist/m365/spo/commands/site/site-accessrequest-setting-set.js +102 -0
- package/dist/m365/spo/commands/site/site-add.js +38 -8
- package/dist/m365/spo/commands/tenant/tenant-site-get.js +112 -0
- package/dist/m365/spo/commands.js +3 -0
- package/dist/utils/accessToken.js +21 -0
- package/dist/utils/brandCenter.js +29 -0
- package/docs/docs/cmd/entra/app/app-role-add.mdx +21 -0
- package/docs/docs/cmd/entra/app/app-role-list.mdx +20 -1
- package/docs/docs/cmd/entra/app/app-role-remove.mdx +22 -1
- package/docs/docs/cmd/entra/policy/policy-list.mdx +19 -0
- package/docs/docs/cmd/entra/resourcenamespace/resourcenamespace-list.mdx +19 -0
- package/docs/docs/cmd/outlook/calendargroup/calendargroup-list.mdx +120 -0
- package/docs/docs/cmd/spo/agent/agent-add.mdx +190 -0
- package/docs/docs/cmd/spo/list/list-set.mdx +19 -1
- package/docs/docs/cmd/spo/navigation/navigation-node-get.mdx +43 -10
- package/docs/docs/cmd/spo/navigation/navigation-node-list.mdx +36 -3
- package/docs/docs/cmd/spo/site/site-accessrequest-setting-set.mdx +77 -0
- package/docs/docs/cmd/spo/site/site-add.mdx +14 -5
- package/docs/docs/cmd/spo/tenant/tenant-site-get.mdx +479 -0
- package/package.json +1 -1
|
@@ -1,17 +1,105 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
return kind === "m" ? f : kind === "a" ? f.call(receiver) : f ? f.value : state.get(receiver);
|
|
5
|
-
};
|
|
6
|
-
var _SpoListSetCommand_instances, _a, _SpoListSetCommand_initTelemetry, _SpoListSetCommand_initOptions, _SpoListSetCommand_initValidators, _SpoListSetCommand_initTypes, _SpoListSetCommand_initOptionSets;
|
|
1
|
+
import { z } from 'zod';
|
|
2
|
+
import { globalOptionsZod } from '../../../../Command.js';
|
|
3
|
+
import config from '../../../../config.js';
|
|
7
4
|
import request from '../../../../request.js';
|
|
8
5
|
import { formatting } from '../../../../utils/formatting.js';
|
|
6
|
+
import { spo } from '../../../../utils/spo.js';
|
|
9
7
|
import { urlUtil } from '../../../../utils/urlUtil.js';
|
|
10
8
|
import { validation } from '../../../../utils/validation.js';
|
|
11
9
|
import SpoCommand from '../../../base/SpoCommand.js';
|
|
12
10
|
import commands from '../../commands.js';
|
|
13
11
|
import { DraftVisibilityType } from './DraftVisibilityType.js';
|
|
14
12
|
import { ListExperience } from './ListExperience.js';
|
|
13
|
+
export const options = z.strictObject({
|
|
14
|
+
...globalOptionsZod.shape,
|
|
15
|
+
webUrl: z.string()
|
|
16
|
+
.refine(url => validation.isValidSharePointUrl(url) === true, {
|
|
17
|
+
error: e => `${e.input} is not a valid SharePoint Online site URL.`
|
|
18
|
+
})
|
|
19
|
+
.alias('u'),
|
|
20
|
+
id: z.string()
|
|
21
|
+
.refine(id => validation.isValidGuid(id), {
|
|
22
|
+
error: e => `${e.input} is not a valid GUID`
|
|
23
|
+
})
|
|
24
|
+
.optional(),
|
|
25
|
+
title: z.string().optional(),
|
|
26
|
+
url: z.string().optional(),
|
|
27
|
+
newTitle: z.string().optional(),
|
|
28
|
+
allowDeletion: z.boolean().optional(),
|
|
29
|
+
allowEveryoneViewItems: z.boolean().optional(),
|
|
30
|
+
allowMultiResponses: z.boolean().optional(),
|
|
31
|
+
contentTypesEnabled: z.boolean().optional(),
|
|
32
|
+
crawlNonDefaultViews: z.boolean().optional(),
|
|
33
|
+
defaultContentApprovalWorkflowId: z.string()
|
|
34
|
+
.refine(id => validation.isValidGuid(id), {
|
|
35
|
+
error: e => `${e.input} in option defaultContentApprovalWorkflowId is not a valid GUID`
|
|
36
|
+
})
|
|
37
|
+
.optional(),
|
|
38
|
+
defaultDisplayFormUrl: z.string().optional(),
|
|
39
|
+
defaultEditFormUrl: z.string().optional(),
|
|
40
|
+
description: z.string().optional(),
|
|
41
|
+
direction: z.enum(['NONE', 'LTR', 'RTL']).optional(),
|
|
42
|
+
disableCommenting: z.boolean().optional(),
|
|
43
|
+
disableGridEditing: z.boolean().optional(),
|
|
44
|
+
draftVersionVisibility: z.enum(['Reader', 'Author', 'Approver']).optional(),
|
|
45
|
+
emailAlias: z.string().optional(),
|
|
46
|
+
enableAssignToEmail: z.boolean().optional(),
|
|
47
|
+
enableAttachments: z.boolean().optional(),
|
|
48
|
+
enableDeployWithDependentList: z.boolean().optional(),
|
|
49
|
+
enableFolderCreation: z.boolean().optional(),
|
|
50
|
+
enableMinorVersions: z.boolean().optional(),
|
|
51
|
+
enableModeration: z.boolean().optional(),
|
|
52
|
+
enablePeopleSelector: z.boolean().optional(),
|
|
53
|
+
enableResourceSelector: z.boolean().optional(),
|
|
54
|
+
enableSchemaCaching: z.boolean().optional(),
|
|
55
|
+
enableSyndication: z.boolean().optional(),
|
|
56
|
+
enableThrottling: z.boolean().optional(),
|
|
57
|
+
enableVersioning: z.boolean().optional(),
|
|
58
|
+
enforceDataValidation: z.boolean().optional(),
|
|
59
|
+
excludeFromOfflineClient: z.boolean().optional(),
|
|
60
|
+
fetchPropertyBagForListView: z.boolean().optional(),
|
|
61
|
+
followable: z.boolean().optional(),
|
|
62
|
+
forceCheckout: z.boolean().optional(),
|
|
63
|
+
forceDefaultContentType: z.boolean().optional(),
|
|
64
|
+
hidden: z.boolean().optional(),
|
|
65
|
+
includedInMyFilesScope: z.boolean().optional(),
|
|
66
|
+
irmEnabled: z.boolean().optional(),
|
|
67
|
+
irmExpire: z.boolean().optional(),
|
|
68
|
+
irmReject: z.boolean().optional(),
|
|
69
|
+
isApplicationList: z.boolean().optional(),
|
|
70
|
+
listExperienceOptions: z.enum(['Auto', 'NewExperience', 'ClassicExperience']).optional(),
|
|
71
|
+
majorVersionLimit: z.number().int().positive().optional(),
|
|
72
|
+
majorWithMinorVersionsLimit: z.number().int().positive().optional(),
|
|
73
|
+
multipleDataList: z.boolean().optional(),
|
|
74
|
+
navigateForFormsPages: z.boolean().optional(),
|
|
75
|
+
needUpdateSiteClientTag: z.boolean().optional(),
|
|
76
|
+
noCrawl: z.boolean().optional(),
|
|
77
|
+
onQuickLaunch: z.boolean().optional(),
|
|
78
|
+
ordered: z.boolean().optional(),
|
|
79
|
+
parserDisabled: z.boolean().optional(),
|
|
80
|
+
readOnlyUI: z.boolean().optional(),
|
|
81
|
+
readSecurity: z.number().refine(v => v === 1 || v === 2, {
|
|
82
|
+
error: e => `${e.input} is not a valid readSecurity value. Allowed values are 1|2`
|
|
83
|
+
}).optional(),
|
|
84
|
+
requestAccessEnabled: z.boolean().optional(),
|
|
85
|
+
restrictUserUpdates: z.boolean().optional(),
|
|
86
|
+
sendToLocationName: z.string().optional(),
|
|
87
|
+
sendToLocationUrl: z.string().optional(),
|
|
88
|
+
showUser: z.boolean().optional(),
|
|
89
|
+
templateFeatureId: z.string()
|
|
90
|
+
.refine(id => validation.isValidGuid(id), {
|
|
91
|
+
error: e => `${e.input} in option templateFeatureId is not a valid GUID`
|
|
92
|
+
})
|
|
93
|
+
.optional(),
|
|
94
|
+
useFormsForDisplay: z.boolean().optional(),
|
|
95
|
+
validationFormula: z.string().optional(),
|
|
96
|
+
validationMessage: z.string().optional(),
|
|
97
|
+
versionAutoExpireTrim: z.boolean().optional(),
|
|
98
|
+
versionExpireAfterDays: z.number().int().positive().optional(),
|
|
99
|
+
writeSecurity: z.number().refine(v => v === 1 || v === 2 || v === 4, {
|
|
100
|
+
error: e => `${e.input} is not a valid writeSecurity value. Allowed values are 1|2|4`
|
|
101
|
+
}).optional()
|
|
102
|
+
});
|
|
15
103
|
class SpoListSetCommand extends SpoCommand {
|
|
16
104
|
get name() {
|
|
17
105
|
return commands.LIST_SET;
|
|
@@ -19,40 +107,29 @@ class SpoListSetCommand extends SpoCommand {
|
|
|
19
107
|
get description() {
|
|
20
108
|
return 'Updates the settings of the specified list';
|
|
21
109
|
}
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
* more easily be used in validation or descriptions.
|
|
25
|
-
*/
|
|
26
|
-
get draftVisibilityTypeMap() {
|
|
27
|
-
const result = [];
|
|
28
|
-
for (const draftType in DraftVisibilityType) {
|
|
29
|
-
if (typeof DraftVisibilityType[draftType] === 'number') {
|
|
30
|
-
result.push(draftType);
|
|
31
|
-
}
|
|
32
|
-
}
|
|
33
|
-
return result;
|
|
110
|
+
get schema() {
|
|
111
|
+
return options;
|
|
34
112
|
}
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
}
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
__classPrivateFieldGet(this, _SpoListSetCommand_instances, "m", _SpoListSetCommand_initOptionSets).call(this);
|
|
113
|
+
getRefinedSchema(schema) {
|
|
114
|
+
return schema
|
|
115
|
+
.refine((opts) => [opts.id, opts.title, opts.url].filter(o => o !== undefined).length === 1, {
|
|
116
|
+
error: 'Use one of the following options: id, title, or url.'
|
|
117
|
+
})
|
|
118
|
+
.refine((opts) => !opts.emailAlias || opts.enableAssignToEmail === true, {
|
|
119
|
+
error: 'emailAlias could not be set if enableAssignToEmail is not set to true. Please set enableAssignToEmail.'
|
|
120
|
+
})
|
|
121
|
+
.refine((opts) => opts.majorWithMinorVersionsLimit === undefined || opts.enableMinorVersions === true || opts.enableModeration === true, {
|
|
122
|
+
error: 'majorWithMinorVersionsLimit option is only valid in combination with enableMinorVersions or enableModeration.'
|
|
123
|
+
})
|
|
124
|
+
.refine((opts) => opts.versionExpireAfterDays === undefined || opts.versionAutoExpireTrim !== true, {
|
|
125
|
+
error: 'versionExpireAfterDays cannot be used together with versionAutoExpireTrim set to true.'
|
|
126
|
+
})
|
|
127
|
+
.refine((opts) => {
|
|
128
|
+
const identifierAndGlobalKeys = new Set(['webUrl', 'id', 'title', 'url', 'output', 'query', 'debug', 'verbose']);
|
|
129
|
+
return Object.entries(opts).some(([key, value]) => !identifierAndGlobalKeys.has(key) && value !== undefined);
|
|
130
|
+
}, {
|
|
131
|
+
error: 'Specify at least one option to update.'
|
|
132
|
+
});
|
|
56
133
|
}
|
|
57
134
|
async commandAction(logger, args) {
|
|
58
135
|
if (this.verbose) {
|
|
@@ -82,13 +159,78 @@ class SpoListSetCommand extends SpoCommand {
|
|
|
82
159
|
responseType: 'json'
|
|
83
160
|
};
|
|
84
161
|
try {
|
|
85
|
-
|
|
86
|
-
|
|
162
|
+
if (Object.keys(requestBody).length > 0) {
|
|
163
|
+
await request.post(requestOptions);
|
|
164
|
+
}
|
|
165
|
+
if (args.options.versionExpireAfterDays !== undefined || args.options.versionAutoExpireTrim !== undefined) {
|
|
166
|
+
await this.setVersionPolicies(args.options);
|
|
167
|
+
}
|
|
87
168
|
}
|
|
88
169
|
catch (err) {
|
|
89
170
|
this.handleRejectedODataJsonPromise(err);
|
|
90
171
|
}
|
|
91
172
|
}
|
|
173
|
+
async setVersionPolicies(options) {
|
|
174
|
+
const digest = await spo.getRequestDigest(options.webUrl);
|
|
175
|
+
let objectPaths = '';
|
|
176
|
+
let actions = '';
|
|
177
|
+
// SPContext.Current
|
|
178
|
+
objectPaths += `<StaticProperty Id="0" TypeId="{3747adcd-a3c3-41b9-bfab-4a64dd2f1e0a}" Name="Current" />`;
|
|
179
|
+
actions += `<ObjectPath Id="1" ObjectPathId="0" />`;
|
|
180
|
+
// Web
|
|
181
|
+
objectPaths += `<Property Id="2" ParentId="0" Name="Web" />`;
|
|
182
|
+
actions += `<ObjectPath Id="3" ObjectPathId="2" />`;
|
|
183
|
+
let listObjectPathId;
|
|
184
|
+
if (options.url) {
|
|
185
|
+
const listServerRelativeUrl = urlUtil.getServerRelativePath(options.webUrl, options.url);
|
|
186
|
+
objectPaths += `<Method Id="4" ParentId="2" Name="GetList"><Parameters><Parameter Type="String">${formatting.escapeXml(listServerRelativeUrl)}</Parameter></Parameters></Method>`;
|
|
187
|
+
listObjectPathId = 4;
|
|
188
|
+
actions += `<ObjectPath Id="5" ObjectPathId="4" />`;
|
|
189
|
+
}
|
|
190
|
+
else if (options.id) {
|
|
191
|
+
objectPaths += `<Property Id="4" ParentId="2" Name="Lists" />`;
|
|
192
|
+
actions += `<ObjectPath Id="5" ObjectPathId="4" />`;
|
|
193
|
+
objectPaths += `<Method Id="6" ParentId="4" Name="GetById"><Parameters><Parameter Type="Guid">{${formatting.escapeXml(options.id)}}</Parameter></Parameters></Method>`;
|
|
194
|
+
listObjectPathId = 6;
|
|
195
|
+
actions += `<ObjectPath Id="7" ObjectPathId="6" />`;
|
|
196
|
+
}
|
|
197
|
+
else {
|
|
198
|
+
const titleForLookup = options.newTitle ?? options.title;
|
|
199
|
+
objectPaths += `<Property Id="4" ParentId="2" Name="Lists" />`;
|
|
200
|
+
actions += `<ObjectPath Id="5" ObjectPathId="4" />`;
|
|
201
|
+
objectPaths += `<Method Id="6" ParentId="4" Name="GetByTitle"><Parameters><Parameter Type="String">${formatting.escapeXml(titleForLookup)}</Parameter></Parameters></Method>`;
|
|
202
|
+
listObjectPathId = 6;
|
|
203
|
+
actions += `<ObjectPath Id="7" ObjectPathId="6" />`;
|
|
204
|
+
}
|
|
205
|
+
const versionPoliciesId = listObjectPathId + 10;
|
|
206
|
+
objectPaths += `<Property Id="${versionPoliciesId}" ParentId="${listObjectPathId}" Name="VersionPolicies" />`;
|
|
207
|
+
actions += `<ObjectPath Id="${versionPoliciesId + 1}" ObjectPathId="${versionPoliciesId}" />`;
|
|
208
|
+
let nextActionId = versionPoliciesId + 2;
|
|
209
|
+
if (options.versionExpireAfterDays !== undefined) {
|
|
210
|
+
actions += `<SetProperty Id="${nextActionId++}" ObjectPathId="${versionPoliciesId}" Name="DefaultTrimMode"><Parameter Type="Int32">1</Parameter></SetProperty>`;
|
|
211
|
+
actions += `<SetProperty Id="${nextActionId++}" ObjectPathId="${versionPoliciesId}" Name="DefaultExpireAfterDays"><Parameter Type="Int32">${options.versionExpireAfterDays}</Parameter></SetProperty>`;
|
|
212
|
+
}
|
|
213
|
+
else if (options.versionAutoExpireTrim === true) {
|
|
214
|
+
actions += `<SetProperty Id="${nextActionId++}" ObjectPathId="${versionPoliciesId}" Name="DefaultTrimMode"><Parameter Type="Int32">2</Parameter></SetProperty>`;
|
|
215
|
+
}
|
|
216
|
+
else if (options.versionAutoExpireTrim === false) {
|
|
217
|
+
actions += `<SetProperty Id="${nextActionId++}" ObjectPathId="${versionPoliciesId}" Name="DefaultTrimMode"><Parameter Type="Int32">0</Parameter></SetProperty>`;
|
|
218
|
+
}
|
|
219
|
+
actions += `<Method Name="Update" Id="${nextActionId}" ObjectPathId="${listObjectPathId}" />`;
|
|
220
|
+
const csomRequestOptions = {
|
|
221
|
+
url: `${options.webUrl}/_vti_bin/client.svc/ProcessQuery`,
|
|
222
|
+
headers: {
|
|
223
|
+
'X-RequestDigest': digest.FormDigestValue
|
|
224
|
+
},
|
|
225
|
+
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>${actions}</Actions><ObjectPaths>${objectPaths}</ObjectPaths></Request>`
|
|
226
|
+
};
|
|
227
|
+
const res = await request.post(csomRequestOptions);
|
|
228
|
+
const json = JSON.parse(res);
|
|
229
|
+
const response = json[0];
|
|
230
|
+
if (response.ErrorInfo) {
|
|
231
|
+
throw response.ErrorInfo.ErrorMessage;
|
|
232
|
+
}
|
|
233
|
+
}
|
|
92
234
|
mapRequestBody(options) {
|
|
93
235
|
const requestBody = {};
|
|
94
236
|
if (options.newTitle) {
|
|
@@ -216,6 +358,9 @@ class SpoListSetCommand extends SpoCommand {
|
|
|
216
358
|
}
|
|
217
359
|
if (options.majorVersionLimit) {
|
|
218
360
|
requestBody.MajorVersionLimit = options.majorVersionLimit;
|
|
361
|
+
if (options.enableVersioning === undefined) {
|
|
362
|
+
requestBody.EnableVersioning = true;
|
|
363
|
+
}
|
|
219
364
|
}
|
|
220
365
|
if (options.majorWithMinorVersionsLimit) {
|
|
221
366
|
requestBody.MajorWithMinorVersionsLimit = options.majorWithMinorVersionsLimit;
|
|
@@ -277,342 +422,5 @@ class SpoListSetCommand extends SpoCommand {
|
|
|
277
422
|
return requestBody;
|
|
278
423
|
}
|
|
279
424
|
}
|
|
280
|
-
_a = SpoListSetCommand, _SpoListSetCommand_instances = new WeakSet(), _SpoListSetCommand_initTelemetry = function _SpoListSetCommand_initTelemetry() {
|
|
281
|
-
this.telemetry.push((args) => {
|
|
282
|
-
const telemetryProps = {};
|
|
283
|
-
// add properties with identifiable data
|
|
284
|
-
[
|
|
285
|
-
'id',
|
|
286
|
-
'title',
|
|
287
|
-
'url',
|
|
288
|
-
'newTitle',
|
|
289
|
-
'description',
|
|
290
|
-
'templateFeatureId',
|
|
291
|
-
'defaultContentApprovalWorkflowId',
|
|
292
|
-
'defaultDisplayFormUrl',
|
|
293
|
-
'defaultEditFormUrl',
|
|
294
|
-
'emailAlias',
|
|
295
|
-
'sendToLocationName',
|
|
296
|
-
'sendToLocationUrl',
|
|
297
|
-
'validationFormula',
|
|
298
|
-
'validationMessage'
|
|
299
|
-
].forEach(o => {
|
|
300
|
-
const value = args.options[o];
|
|
301
|
-
if (value) {
|
|
302
|
-
telemetryProps[o] = (typeof value !== 'undefined').toString();
|
|
303
|
-
}
|
|
304
|
-
});
|
|
305
|
-
// add boolean values
|
|
306
|
-
_a.booleanOptions.forEach(o => {
|
|
307
|
-
const value = args.options[o];
|
|
308
|
-
if (value !== undefined) {
|
|
309
|
-
telemetryProps[o] = value;
|
|
310
|
-
}
|
|
311
|
-
});
|
|
312
|
-
// add properties with non-identifiable data
|
|
313
|
-
[
|
|
314
|
-
'direction',
|
|
315
|
-
'draftVersionVisibility',
|
|
316
|
-
'listExperienceOptions',
|
|
317
|
-
'majorVersionLimit',
|
|
318
|
-
'majorWithMinorVersionsLimit',
|
|
319
|
-
'readSecurity',
|
|
320
|
-
'writeSecurity'
|
|
321
|
-
].forEach(o => {
|
|
322
|
-
const value = args.options[o];
|
|
323
|
-
if (value) {
|
|
324
|
-
telemetryProps[o] = value.toString();
|
|
325
|
-
}
|
|
326
|
-
});
|
|
327
|
-
Object.assign(this.telemetryProperties, telemetryProps);
|
|
328
|
-
});
|
|
329
|
-
}, _SpoListSetCommand_initOptions = function _SpoListSetCommand_initOptions() {
|
|
330
|
-
this.options.unshift({
|
|
331
|
-
option: '-u, --webUrl <webUrl>'
|
|
332
|
-
}, {
|
|
333
|
-
option: '--id [id]'
|
|
334
|
-
}, {
|
|
335
|
-
option: '--url [url]'
|
|
336
|
-
}, {
|
|
337
|
-
option: '--title [title]'
|
|
338
|
-
}, {
|
|
339
|
-
option: '--newTitle [newTitle]'
|
|
340
|
-
}, {
|
|
341
|
-
option: '--allowDeletion [allowDeletion]',
|
|
342
|
-
autocomplete: ['true', 'false']
|
|
343
|
-
}, {
|
|
344
|
-
option: '--allowEveryoneViewItems [allowEveryoneViewItems]',
|
|
345
|
-
autocomplete: ['true', 'false']
|
|
346
|
-
}, {
|
|
347
|
-
option: '--allowMultiResponses [allowMultiResponses]',
|
|
348
|
-
autocomplete: ['true', 'false']
|
|
349
|
-
}, {
|
|
350
|
-
option: '--contentTypesEnabled [contentTypesEnabled]',
|
|
351
|
-
autocomplete: ['true', 'false']
|
|
352
|
-
}, {
|
|
353
|
-
option: '--crawlNonDefaultViews [crawlNonDefaultViews]',
|
|
354
|
-
autocomplete: ['true', 'false']
|
|
355
|
-
}, {
|
|
356
|
-
option: '--defaultContentApprovalWorkflowId [defaultContentApprovalWorkflowId]'
|
|
357
|
-
}, {
|
|
358
|
-
option: '--defaultDisplayFormUrl [defaultDisplayFormUrl]'
|
|
359
|
-
}, {
|
|
360
|
-
option: '--defaultEditFormUrl [defaultEditFormUrl]'
|
|
361
|
-
}, {
|
|
362
|
-
option: '--description [description]'
|
|
363
|
-
}, {
|
|
364
|
-
option: '--direction [direction]',
|
|
365
|
-
autocomplete: ['NONE', 'LTR', 'RTL']
|
|
366
|
-
}, {
|
|
367
|
-
option: '--disableCommenting [disableCommenting]',
|
|
368
|
-
autocomplete: ['true', 'false']
|
|
369
|
-
}, {
|
|
370
|
-
option: '--disableGridEditing [disableGridEditing]',
|
|
371
|
-
autocomplete: ['true', 'false']
|
|
372
|
-
}, {
|
|
373
|
-
option: '--draftVersionVisibility [draftVersionVisibility]',
|
|
374
|
-
autocomplete: this.draftVisibilityTypeMap
|
|
375
|
-
}, {
|
|
376
|
-
option: '--emailAlias [emailAlias]'
|
|
377
|
-
}, {
|
|
378
|
-
option: '--enableAssignToEmail [enableAssignToEmail]',
|
|
379
|
-
autocomplete: ['true', 'false']
|
|
380
|
-
}, {
|
|
381
|
-
option: '--enableAttachments [enableAttachments]',
|
|
382
|
-
autocomplete: ['true', 'false']
|
|
383
|
-
}, {
|
|
384
|
-
option: '--enableDeployWithDependentList [enableDeployWithDependentList]',
|
|
385
|
-
autocomplete: ['true', 'false']
|
|
386
|
-
}, {
|
|
387
|
-
option: '--enableFolderCreation [enableFolderCreation]',
|
|
388
|
-
autocomplete: ['true', 'false']
|
|
389
|
-
}, {
|
|
390
|
-
option: '--enableMinorVersions [enableMinorVersions]',
|
|
391
|
-
autocomplete: ['true', 'false']
|
|
392
|
-
}, {
|
|
393
|
-
option: '--enableModeration [enableModeration]',
|
|
394
|
-
autocomplete: ['true', 'false']
|
|
395
|
-
}, {
|
|
396
|
-
option: '--enablePeopleSelector [enablePeopleSelector]',
|
|
397
|
-
autocomplete: ['true', 'false']
|
|
398
|
-
}, {
|
|
399
|
-
option: '--enableResourceSelector [enableResourceSelector]',
|
|
400
|
-
autocomplete: ['true', 'false']
|
|
401
|
-
}, {
|
|
402
|
-
option: '--enableSchemaCaching [enableSchemaCaching]',
|
|
403
|
-
autocomplete: ['true', 'false']
|
|
404
|
-
}, {
|
|
405
|
-
option: '--enableSyndication [enableSyndication]',
|
|
406
|
-
autocomplete: ['true', 'false']
|
|
407
|
-
}, {
|
|
408
|
-
option: '--enableThrottling [enableThrottling]',
|
|
409
|
-
autocomplete: ['true', 'false']
|
|
410
|
-
}, {
|
|
411
|
-
option: '--enableVersioning [enableVersioning]',
|
|
412
|
-
autocomplete: ['true', 'false']
|
|
413
|
-
}, {
|
|
414
|
-
option: '--enforceDataValidation [enforceDataValidation]',
|
|
415
|
-
autocomplete: ['true', 'false']
|
|
416
|
-
}, {
|
|
417
|
-
option: '--excludeFromOfflineClient [excludeFromOfflineClient]',
|
|
418
|
-
autocomplete: ['true', 'false']
|
|
419
|
-
}, {
|
|
420
|
-
option: '--fetchPropertyBagForListView [fetchPropertyBagForListView]',
|
|
421
|
-
autocomplete: ['true', 'false']
|
|
422
|
-
}, {
|
|
423
|
-
option: '--followable [followable]',
|
|
424
|
-
autocomplete: ['true', 'false']
|
|
425
|
-
}, {
|
|
426
|
-
option: '--forceCheckout [forceCheckout]',
|
|
427
|
-
autocomplete: ['true', 'false']
|
|
428
|
-
}, {
|
|
429
|
-
option: '--forceDefaultContentType [forceDefaultContentType]',
|
|
430
|
-
autocomplete: ['true', 'false']
|
|
431
|
-
}, {
|
|
432
|
-
option: '--hidden [hidden]',
|
|
433
|
-
autocomplete: ['true', 'false']
|
|
434
|
-
}, {
|
|
435
|
-
option: '--includedInMyFilesScope [includedInMyFilesScope]',
|
|
436
|
-
autocomplete: ['true', 'false']
|
|
437
|
-
}, {
|
|
438
|
-
option: '--irmEnabled [irmEnabled]',
|
|
439
|
-
autocomplete: ['true', 'false']
|
|
440
|
-
}, {
|
|
441
|
-
option: '--irmExpire [irmExpire]',
|
|
442
|
-
autocomplete: ['true', 'false']
|
|
443
|
-
}, {
|
|
444
|
-
option: '--irmReject [irmReject]',
|
|
445
|
-
autocomplete: ['true', 'false']
|
|
446
|
-
}, {
|
|
447
|
-
option: '--isApplicationList [isApplicationList]',
|
|
448
|
-
autocomplete: ['true', 'false']
|
|
449
|
-
}, {
|
|
450
|
-
option: '--listExperienceOptions [listExperienceOptions]',
|
|
451
|
-
autocomplete: this.listExperienceMap
|
|
452
|
-
}, {
|
|
453
|
-
option: '--majorVersionLimit [majorVersionLimit]'
|
|
454
|
-
}, {
|
|
455
|
-
option: '--majorWithMinorVersionsLimit [majorWithMinorVersionsLimit]'
|
|
456
|
-
}, {
|
|
457
|
-
option: '--multipleDataList [multipleDataList]',
|
|
458
|
-
autocomplete: ['true', 'false']
|
|
459
|
-
}, {
|
|
460
|
-
option: '--navigateForFormsPages [navigateForFormsPages]',
|
|
461
|
-
autocomplete: ['true', 'false']
|
|
462
|
-
}, {
|
|
463
|
-
option: '--needUpdateSiteClientTag [needUpdateSiteClientTag]',
|
|
464
|
-
autocomplete: ['true', 'false']
|
|
465
|
-
}, {
|
|
466
|
-
option: '--noCrawl [noCrawl]',
|
|
467
|
-
autocomplete: ['true', 'false']
|
|
468
|
-
}, {
|
|
469
|
-
option: '--onQuickLaunch [onQuickLaunch]',
|
|
470
|
-
autocomplete: ['true', 'false']
|
|
471
|
-
}, {
|
|
472
|
-
option: '--ordered [ordered]',
|
|
473
|
-
autocomplete: ['true', 'false']
|
|
474
|
-
}, {
|
|
475
|
-
option: '-parserDisabled [parserDisabled]',
|
|
476
|
-
autocomplete: ['true', 'false']
|
|
477
|
-
}, {
|
|
478
|
-
option: '--readOnlyUI [readOnlyUI]',
|
|
479
|
-
autocomplete: ['true', 'false']
|
|
480
|
-
}, {
|
|
481
|
-
option: '--readSecurity [readSecurity]',
|
|
482
|
-
autocomplete: ['1', '2']
|
|
483
|
-
}, {
|
|
484
|
-
option: '--requestAccessEnabled [requestAccessEnabled]',
|
|
485
|
-
autocomplete: ['true', 'false']
|
|
486
|
-
}, {
|
|
487
|
-
option: '--restrictUserUpdates [restrictUserUpdates]',
|
|
488
|
-
autocomplete: ['true', 'false']
|
|
489
|
-
}, {
|
|
490
|
-
option: '--sendToLocationName [sendToLocationName]'
|
|
491
|
-
}, {
|
|
492
|
-
option: '--sendToLocationUrl [sendToLocationUrl]'
|
|
493
|
-
}, {
|
|
494
|
-
option: '--showUser [showUser]',
|
|
495
|
-
autocomplete: ['true', 'false']
|
|
496
|
-
}, {
|
|
497
|
-
option: '--templateFeatureId [templateFeatureId]'
|
|
498
|
-
}, {
|
|
499
|
-
option: '--useFormsForDisplay [useFormsForDisplay]',
|
|
500
|
-
autocomplete: ['true', 'false']
|
|
501
|
-
}, {
|
|
502
|
-
option: '--validationFormula [validationFormula]'
|
|
503
|
-
}, {
|
|
504
|
-
option: '--validationMessage [validationMessage]'
|
|
505
|
-
}, {
|
|
506
|
-
option: '--writeSecurity [writeSecurity]',
|
|
507
|
-
autocomplete: ['1', '2', '4']
|
|
508
|
-
});
|
|
509
|
-
}, _SpoListSetCommand_initValidators = function _SpoListSetCommand_initValidators() {
|
|
510
|
-
this.validators.push(async (args) => {
|
|
511
|
-
const isValidSharePointUrl = validation.isValidSharePointUrl(args.options.webUrl);
|
|
512
|
-
if (isValidSharePointUrl !== true) {
|
|
513
|
-
return isValidSharePointUrl;
|
|
514
|
-
}
|
|
515
|
-
if (args.options.id && !validation.isValidGuid(args.options.id)) {
|
|
516
|
-
return `${args.options.id} is not a valid GUID`;
|
|
517
|
-
}
|
|
518
|
-
if (args.options.templateFeatureId &&
|
|
519
|
-
!validation.isValidGuid(args.options.templateFeatureId)) {
|
|
520
|
-
return `${args.options.templateFeatureId} in option templateFeatureId is not a valid GUID`;
|
|
521
|
-
}
|
|
522
|
-
if (args.options.defaultContentApprovalWorkflowId &&
|
|
523
|
-
!validation.isValidGuid(args.options.defaultContentApprovalWorkflowId)) {
|
|
524
|
-
return `${args.options.defaultContentApprovalWorkflowId} in option defaultContentApprovalWorkflowId is not a valid GUID`;
|
|
525
|
-
}
|
|
526
|
-
if (args.options.direction &&
|
|
527
|
-
['NONE', 'LTR', 'RTL'].indexOf(args.options.direction) === -1) {
|
|
528
|
-
return `${args.options.direction} is not a valid direction value. Allowed values are NONE|LTR|RTL`;
|
|
529
|
-
}
|
|
530
|
-
if (args.options.draftVersionVisibility) {
|
|
531
|
-
const draftType = DraftVisibilityType[args.options.draftVersionVisibility.trim()];
|
|
532
|
-
if (draftType === undefined) {
|
|
533
|
-
return `${args.options.draftVersionVisibility} is not a valid draftVisibilityType value`;
|
|
534
|
-
}
|
|
535
|
-
}
|
|
536
|
-
if (args.options.emailAlias && args.options.enableAssignToEmail !== true) {
|
|
537
|
-
return `emailAlias could not be set if enableAssignToEmail is not set to true. Please set enableAssignToEmail.`;
|
|
538
|
-
}
|
|
539
|
-
if (args.options.listExperienceOptions) {
|
|
540
|
-
const experience = ListExperience[args.options.listExperienceOptions.trim()];
|
|
541
|
-
if (!experience) {
|
|
542
|
-
return `${args.options.listExperienceOptions} is not a valid listExperienceOptions value`;
|
|
543
|
-
}
|
|
544
|
-
}
|
|
545
|
-
if (args.options.majorVersionLimit && args.options.enableVersioning !== true) {
|
|
546
|
-
return `majorVersionLimit option is only valid in combination with enableVersioning.`;
|
|
547
|
-
}
|
|
548
|
-
if (args.options.majorWithMinorVersionsLimit &&
|
|
549
|
-
args.options.enableMinorVersions !== true &&
|
|
550
|
-
args.options.enableModeration !== true) {
|
|
551
|
-
return `majorWithMinorVersionsLimit option is only valid in combination with enableMinorVersions or enableModeration.`;
|
|
552
|
-
}
|
|
553
|
-
if (args.options.readSecurity &&
|
|
554
|
-
args.options.readSecurity !== 1 &&
|
|
555
|
-
args.options.readSecurity !== 2) {
|
|
556
|
-
return `${args.options.readSecurity} is not a valid readSecurity value. Allowed values are 1|2`;
|
|
557
|
-
}
|
|
558
|
-
if (args.options.writeSecurity &&
|
|
559
|
-
args.options.writeSecurity !== 1 &&
|
|
560
|
-
args.options.writeSecurity !== 2 &&
|
|
561
|
-
args.options.writeSecurity !== 4) {
|
|
562
|
-
return `${args.options.writeSecurity} is not a valid writeSecurity value. Allowed values are 1|2|4`;
|
|
563
|
-
}
|
|
564
|
-
return true;
|
|
565
|
-
});
|
|
566
|
-
}, _SpoListSetCommand_initTypes = function _SpoListSetCommand_initTypes() {
|
|
567
|
-
this.types.string.push('webUrl', 'templateFeatureId', 'defaultContentApprovalWorkflowId', 'draftVersionVisibility', 'listExperienceOptions');
|
|
568
|
-
this.types.boolean.push(..._a.booleanOptions);
|
|
569
|
-
}, _SpoListSetCommand_initOptionSets = function _SpoListSetCommand_initOptionSets() {
|
|
570
|
-
this.optionSets.push({ options: ['id', 'title', 'url'] });
|
|
571
|
-
};
|
|
572
|
-
SpoListSetCommand.booleanOptions = [
|
|
573
|
-
'allowDeletion',
|
|
574
|
-
'allowEveryoneViewItems',
|
|
575
|
-
'allowMultiResponses',
|
|
576
|
-
'contentTypesEnabled',
|
|
577
|
-
'crawlNonDefaultViews',
|
|
578
|
-
'disableCommenting',
|
|
579
|
-
'disableGridEditing',
|
|
580
|
-
'enableAssignToEmail',
|
|
581
|
-
'enableAttachments',
|
|
582
|
-
'enableDeployWithDependentList',
|
|
583
|
-
'enableFolderCreation',
|
|
584
|
-
'enableMinorVersions',
|
|
585
|
-
'enableModeration',
|
|
586
|
-
'enablePeopleSelector',
|
|
587
|
-
'enableResourceSelector',
|
|
588
|
-
'enableSchemaCaching',
|
|
589
|
-
'enableSyndication',
|
|
590
|
-
'enableThrottling',
|
|
591
|
-
'enableVersioning',
|
|
592
|
-
'enforceDataValidation',
|
|
593
|
-
'excludeFromOfflineClient',
|
|
594
|
-
'fetchPropertyBagForListView',
|
|
595
|
-
'followable',
|
|
596
|
-
'forceCheckout',
|
|
597
|
-
'forceDefaultContentType',
|
|
598
|
-
'hidden',
|
|
599
|
-
'includedInMyFilesScope',
|
|
600
|
-
'irmEnabled',
|
|
601
|
-
'irmExpire',
|
|
602
|
-
'irmReject',
|
|
603
|
-
'isApplicationList',
|
|
604
|
-
'multipleDataList',
|
|
605
|
-
'navigateForFormsPages',
|
|
606
|
-
'needUpdateSiteClientTag',
|
|
607
|
-
'noCrawl',
|
|
608
|
-
'onQuickLaunch',
|
|
609
|
-
'ordered',
|
|
610
|
-
'parserDisabled',
|
|
611
|
-
'readOnlyUI',
|
|
612
|
-
'requestAccessEnabled',
|
|
613
|
-
'restrictUserUpdates',
|
|
614
|
-
'showUser',
|
|
615
|
-
'useFormsForDisplay'
|
|
616
|
-
];
|
|
617
425
|
export default new SpoListSetCommand();
|
|
618
426
|
//# sourceMappingURL=list-set.js.map
|