@pnp/cli-microsoft365 7.0.0-beta.99e75a7 → 7.0.0-beta.aa2d71e
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/.eslintrc.cjs +0 -2
- package/dist/GlobalOptions.js +1 -7
- package/dist/cli/Cli.js +19 -2
- package/dist/m365/aad/commands/app/app-add.js +8 -8
- package/dist/m365/aad/commands/app/app-role-add.js +5 -5
- package/dist/m365/aad/commands/app/app-set.js +5 -5
- package/dist/m365/aad/commands/policy/policy-list.js +5 -5
- package/dist/m365/cli/commands/cli-issue.js +5 -5
- package/dist/m365/cli/commands/config/config-get.js +5 -5
- package/dist/m365/cli/commands/config/config-reset.js +5 -5
- package/dist/m365/cli/commands/config/config-set.js +5 -5
- package/dist/m365/commands/login.js +5 -5
- package/dist/m365/commands/request.js +1 -1
- package/dist/m365/flow/commands/owner/owner-ensure.js +5 -5
- package/dist/m365/pa/commands/app/app-owner-set.js +5 -5
- package/dist/m365/pa/commands/app/app-permission-ensure.js +5 -5
- package/dist/m365/pa/commands.js +1 -4
- package/dist/m365/planner/commands/task/task-add.js +17 -11
- package/dist/m365/planner/commands/task/task-get.js +35 -25
- package/dist/m365/planner/commands/task/task-list.js +26 -19
- package/dist/m365/planner/commands/task/task-remove.js +39 -34
- package/dist/m365/planner/commands/task/task-set.js +35 -23
- package/dist/m365/purview/commands/retentionlabel/retentionlabel-add.js +14 -14
- package/dist/m365/spfx/commands/package/package-generate.js +15 -15
- package/dist/m365/spfx/commands/project/DeployWorkflow.js +55 -0
- package/dist/m365/spfx/commands/project/project-doctor/{doctor-1.18.0-beta.1.js → doctor-1.18.0-beta.5.js} +1 -1
- package/dist/m365/spfx/commands/project/project-doctor.js +9 -9
- package/dist/m365/spfx/commands/project/project-github-workflow-add.js +157 -0
- package/dist/m365/spfx/commands/project/project-github-workflow-model.js +2 -0
- package/dist/m365/spfx/commands/project/project-upgrade/upgrade-1.15.2.js +1 -1
- package/dist/m365/spfx/commands/project/project-upgrade/{upgrade-1.18.0-beta.1.js → upgrade-1.18.0-beta.5.js} +26 -26
- package/dist/m365/spfx/commands/project/project-upgrade.js +14 -14
- package/dist/m365/spfx/commands/spfx-doctor.js +3 -3
- package/dist/m365/spfx/commands.js +1 -0
- package/dist/m365/spo/commands/app/SpoAppBaseCommand.js +27 -26
- package/dist/m365/spo/commands/app/app-add.js +9 -9
- package/dist/m365/spo/commands/applicationcustomizer/applicationcustomizer-add.js +5 -5
- package/dist/m365/spo/commands/applicationcustomizer/applicationcustomizer-list.js +5 -5
- package/dist/m365/spo/commands/commandset/commandset-add.js +11 -11
- package/dist/m365/spo/commands/commandset/commandset-get.js +8 -8
- package/dist/m365/spo/commands/commandset/commandset-list.js +5 -5
- package/dist/m365/spo/commands/commandset/commandset-remove.js +5 -5
- package/dist/m365/spo/commands/commandset/commandset-set.js +11 -11
- package/dist/m365/spo/commands/file/file-move.js +73 -97
- package/dist/m365/spo/commands/file/file-sharinglink-add.js +8 -8
- package/dist/m365/spo/commands/file/file-sharinglink-list.js +5 -5
- package/dist/m365/spo/commands/folder/folder-copy.js +89 -45
- package/dist/m365/spo/commands/folder/folder-move.js +89 -47
- package/dist/m365/spo/commands/list/list-add.js +4 -4
- package/dist/m365/spo/commands/list/list-set.js +4 -4
- package/dist/m365/spo/commands/orgassetslibrary/orgassetslibrary-add.js +34 -5
- package/dist/m365/spo/commands/page/clientsidepages.js +1 -81
- package/dist/m365/spo/commands/propertybag/propertybag-base.js +63 -59
- package/dist/m365/spo/commands/propertybag/propertybag-remove.js +28 -31
- package/dist/m365/spo/commands/serviceprincipal/serviceprincipal-set.js +30 -32
- package/dist/m365/spo/commands/site/FlowsPolicy.js +7 -0
- package/dist/m365/spo/commands/site/site-add.js +114 -161
- package/dist/m365/spo/commands/site/site-apppermission-add.js +15 -18
- package/dist/m365/spo/commands/site/site-apppermission-remove.js +34 -38
- package/dist/m365/spo/commands/site/site-apppermission-set.js +11 -14
- package/dist/m365/spo/commands/site/site-ensure.js +14 -67
- package/dist/m365/spo/commands/site/site-hubsite-disconnect.js +22 -22
- package/dist/m365/spo/commands/site/site-list.js +27 -43
- package/dist/m365/spo/commands/site/site-recyclebinitem-list.js +6 -6
- package/dist/m365/spo/commands/site/site-remove.js +166 -210
- package/dist/m365/spo/commands/site/site-set.js +177 -198
- package/dist/m365/spo/commands/tenant/tenant-commandset-add.js +8 -8
- package/dist/m365/spo/commands/tenant/tenant-commandset-set.js +8 -8
- package/dist/m365/spo/commands/tenant/tenant-settings-set.js +4 -4
- package/dist/m365/spo/commands/theme/theme-remove.js +24 -24
- package/dist/m365/spo/commands/theme/theme-set.js +0 -1
- package/dist/m365/spo/commands/user/user-remove.js +27 -27
- package/dist/m365/spo/commands/web/web-reindex.js +35 -42
- package/dist/m365/spo/commands/web/web-remove.js +21 -21
- package/dist/m365/spo/commands/web/web-roleassignment-add.js +16 -31
- package/dist/m365/spo/commands/web/web-roleassignment-remove.js +33 -44
- package/dist/m365/spo/commands/web/web-roleinheritance-break.js +18 -18
- package/dist/m365/spo/commands/web/web-roleinheritance-reset.js +19 -19
- package/dist/m365/spo/commands/web/web-set.js +5 -5
- package/dist/m365/teams/commands/app/app-list.js +5 -5
- package/dist/m365/teams/commands/chat/chat-member-add.js +5 -5
- package/dist/m365/teams/commands/funsettings/funsettings-set.js +4 -4
- package/dist/m365/teams/commands/guestsettings/guestsettings-set.js +4 -4
- package/dist/m365/teams/commands/membersettings/membersettings-set.js +4 -4
- package/dist/m365/teams/commands/messagingsettings/messagingsettings-set.js +5 -5
- package/dist/m365/teams/commands/team/team-set.js +3 -3
- package/dist/m365/todo/commands/task/task-add.js +6 -6
- package/dist/m365/yammer/commands/message/message-like-set.js +27 -28
- package/dist/m365/yammer/commands/message/message-list.js +67 -86
- package/dist/m365/yammer/commands/message/message-remove.js +18 -18
- package/dist/m365/yammer/commands/yammer-search.js +58 -74
- package/dist/utils/aadGroup.js +18 -0
- package/dist/utils/fsUtil.js +5 -0
- package/dist/utils/spo.js +594 -53
- package/dist/utils/validation.js +0 -3
- package/docs/docs/cmd/planner/task/task-add.mdx +22 -7
- package/docs/docs/cmd/planner/task/task-get.mdx +13 -4
- package/docs/docs/cmd/planner/task/task-list.mdx +22 -7
- package/docs/docs/cmd/planner/task/task-remove.mdx +25 -8
- package/docs/docs/cmd/planner/task/task-set.mdx +22 -7
- package/docs/docs/cmd/spfx/project/project-github-workflow-add.mdx +94 -0
- package/docs/docs/cmd/spo/file/file-move.mdx +36 -18
- package/docs/docs/cmd/spo/folder/folder-copy.mdx +39 -12
- package/docs/docs/cmd/spo/folder/folder-move.mdx +40 -13
- package/docs/docs/cmd/spo/orgassetslibrary/orgassetslibrary-add.mdx +14 -1
- package/docs/docs/cmd/spo/site/site-ensure.mdx +1 -1
- package/docs/docs/cmd/spo/site/site-list.mdx +3 -78
- package/npm-shrinkwrap.json +240 -1417
- package/package.json +6 -7
- package/dist/m365/pa/cds-project-mutator.js +0 -91
- package/dist/m365/pa/commands/pcf/pcf-init/assets/control/dataset-template/generated/ManifestTypes.d.ts +0 -11
- package/dist/m365/pa/commands/pcf/pcf-init/assets/control/dataset-template/template_ControlManifest.Input.xml +0 -31
- package/dist/m365/pa/commands/pcf/pcf-init/assets/control/dataset-template/template_index.ts +0 -51
- package/dist/m365/pa/commands/pcf/pcf-init/assets/control/field-template/generated/ManifestTypes.d.ts +0 -12
- package/dist/m365/pa/commands/pcf/pcf-init/assets/control/field-template/template_ControlManifest.Input.xml +0 -37
- package/dist/m365/pa/commands/pcf/pcf-init/assets/control/field-template/template_index.ts +0 -48
- package/dist/m365/pa/commands/pcf/pcf-init/assets/control/index.ts +0 -0
- package/dist/m365/pa/commands/pcf/pcf-init/assets/control/virtual-dataset-template/template_ControlManifest.Input.xml +0 -31
- package/dist/m365/pa/commands/pcf/pcf-init/assets/control/virtual-dataset-template/template_index.tsx +0 -58
- package/dist/m365/pa/commands/pcf/pcf-init/assets/control/virtual-field-template/template_ControlManifest.Input.xml +0 -37
- package/dist/m365/pa/commands/pcf/pcf-init/assets/control/virtual-field-template/template_index.tsx +0 -55
- package/dist/m365/pa/commands/pcf/pcf-init/assets/package.json +0 -19
- package/dist/m365/pa/commands/pcf/pcf-init/assets/pcfconfig.json +0 -3
- package/dist/m365/pa/commands/pcf/pcf-init/assets/template_.gitignore +0 -14
- package/dist/m365/pa/commands/pcf/pcf-init/assets/template_pcfprojecttype.pcfproj +0 -45
- package/dist/m365/pa/commands/pcf/pcf-init/pcf-init-variables.js +0 -2
- package/dist/m365/pa/commands/pcf/pcf-init.js +0 -120
- package/dist/m365/pa/commands/solution/solution-init/assets/Other/Customizations.xml +0 -18
- package/dist/m365/pa/commands/solution/solution-init/assets/Other/Relationships.xml +0 -2
- package/dist/m365/pa/commands/solution/solution-init/assets/Other/template_Solution.xml +0 -94
- package/dist/m365/pa/commands/solution/solution-init/assets/template_.gitignore +0 -2
- package/dist/m365/pa/commands/solution/solution-init/assets/template_solutionprojecttype.cdsproj +0 -44
- package/dist/m365/pa/commands/solution/solution-init/solution-init-variables.js +0 -2
- package/dist/m365/pa/commands/solution/solution-init.js +0 -126
- package/dist/m365/pa/commands/solution/solution-reference-add.js +0 -88
- package/dist/m365/pa/template-instantiator.js +0 -57
- package/docs/docs/cmd/pa/pcf/pcf-init.mdx +0 -56
- package/docs/docs/cmd/pa/solution/solution-init.mdx +0 -46
- package/docs/docs/cmd/pa/solution/solution-reference-add.mdx +0 -42
|
@@ -17,6 +17,7 @@ import SpoCommand from '../../../base/SpoCommand.js';
|
|
|
17
17
|
import commands from '../../commands.js';
|
|
18
18
|
import { SharingCapabilities } from '../site/SharingCapabilities.js';
|
|
19
19
|
import spoSiteDesignApplyCommand from '../sitedesign/sitedesign-apply.js';
|
|
20
|
+
import { FlowsPolicy } from './FlowsPolicy.js';
|
|
20
21
|
class SpoSiteSetCommand extends SpoCommand {
|
|
21
22
|
get name() {
|
|
22
23
|
return commands.SITE_SET;
|
|
@@ -83,89 +84,69 @@ class SpoSiteSetCommand extends SpoCommand {
|
|
|
83
84
|
await logger.logToStderr('Site is not group connected');
|
|
84
85
|
}
|
|
85
86
|
if (typeof args.options.isPublic !== 'undefined') {
|
|
86
|
-
|
|
87
|
+
throw `The isPublic option can't be set on a site that is not groupified`;
|
|
87
88
|
}
|
|
88
|
-
|
|
89
|
-
|
|
89
|
+
await this.updateSiteDescription(logger, args);
|
|
90
|
+
await this.updateSiteOwners(logger, args);
|
|
90
91
|
}
|
|
91
|
-
waitForSiteUpdateCompletion(logger, args,
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
verbose: this.verbose
|
|
119
|
-
});
|
|
120
|
-
}, operation.PollingInterval);
|
|
121
|
-
}
|
|
92
|
+
async waitForSiteUpdateCompletion(logger, args, response) {
|
|
93
|
+
if (!response) {
|
|
94
|
+
return;
|
|
95
|
+
}
|
|
96
|
+
const json = JSON.parse(response);
|
|
97
|
+
const responseContent = json[0];
|
|
98
|
+
if (responseContent.ErrorInfo) {
|
|
99
|
+
throw responseContent.ErrorInfo.ErrorMessage;
|
|
100
|
+
}
|
|
101
|
+
const operation = json[json.length - 1];
|
|
102
|
+
const isComplete = operation.IsComplete;
|
|
103
|
+
if (!args.options.wait || isComplete) {
|
|
104
|
+
return;
|
|
105
|
+
}
|
|
106
|
+
await new Promise((resolve, reject) => {
|
|
107
|
+
setTimeout(() => {
|
|
108
|
+
spo.waitUntilFinished({
|
|
109
|
+
operationId: JSON.stringify(operation._ObjectIdentity_),
|
|
110
|
+
siteUrl: this.spoAdminUrl,
|
|
111
|
+
resolve,
|
|
112
|
+
reject,
|
|
113
|
+
logger,
|
|
114
|
+
currentContext: this.context,
|
|
115
|
+
debug: this.debug,
|
|
116
|
+
verbose: this.verbose
|
|
117
|
+
});
|
|
118
|
+
}, operation.PollingInterval);
|
|
122
119
|
});
|
|
123
120
|
}
|
|
124
121
|
async updateSiteOwners(logger, args) {
|
|
125
122
|
if (!args.options.owners) {
|
|
126
|
-
return
|
|
123
|
+
return;
|
|
127
124
|
}
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
}))
|
|
135
|
-
.then(() => {
|
|
136
|
-
resolve();
|
|
137
|
-
}, (err) => {
|
|
138
|
-
reject(err);
|
|
139
|
-
});
|
|
140
|
-
});
|
|
125
|
+
if (this.verbose) {
|
|
126
|
+
await logger.logToStderr(`Updating site owners ${args.options.url}...`);
|
|
127
|
+
}
|
|
128
|
+
await Promise.all(args.options.owners.split(',').map(o => {
|
|
129
|
+
return this.setAdmin(args.options.url, o.trim());
|
|
130
|
+
}));
|
|
141
131
|
}
|
|
142
|
-
setAdmin(siteUrl, principal) {
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
reject(response.ErrorInfo.ErrorMessage);
|
|
157
|
-
}
|
|
158
|
-
else {
|
|
159
|
-
resolve();
|
|
160
|
-
}
|
|
161
|
-
}, (err) => {
|
|
162
|
-
reject(err);
|
|
163
|
-
});
|
|
164
|
-
});
|
|
132
|
+
async setAdmin(siteUrl, principal) {
|
|
133
|
+
const requestOptions = {
|
|
134
|
+
url: `${this.spoAdminUrl}/_vti_bin/client.svc/ProcessQuery`,
|
|
135
|
+
headers: {
|
|
136
|
+
'X-RequestDigest': this.context.FormDigestValue
|
|
137
|
+
},
|
|
138
|
+
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="48" ObjectPathId="47" /></Actions><ObjectPaths><Method Id="47" ParentId="34" Name="SetSiteAdmin"><Parameters><Parameter Type="String">${formatting.escapeXml(siteUrl)}</Parameter><Parameter Type="String">${formatting.escapeXml(principal)}</Parameter><Parameter Type="Boolean">true</Parameter></Parameters></Method><Constructor Id="34" TypeId="{268004ae-ef6b-4e9b-8425-127220d84719}" /></ObjectPaths></Request>`
|
|
139
|
+
};
|
|
140
|
+
const response = await request.post(requestOptions);
|
|
141
|
+
const json = JSON.parse(response);
|
|
142
|
+
const responseContent = json[0];
|
|
143
|
+
if (responseContent.ErrorInfo) {
|
|
144
|
+
throw responseContent.ErrorInfo.ErrorMessage;
|
|
145
|
+
}
|
|
165
146
|
}
|
|
166
147
|
async updateSiteDescription(logger, args) {
|
|
167
148
|
if (!args.options.description) {
|
|
168
|
-
return
|
|
149
|
+
return;
|
|
169
150
|
}
|
|
170
151
|
if (this.verbose) {
|
|
171
152
|
await logger.logToStderr(`Setting site description ${args.options.url}...`);
|
|
@@ -184,11 +165,11 @@ class SpoSiteSetCommand extends SpoCommand {
|
|
|
184
165
|
},
|
|
185
166
|
json: true
|
|
186
167
|
};
|
|
187
|
-
|
|
168
|
+
await request.post(requestOptions);
|
|
188
169
|
}
|
|
189
170
|
async updateSiteLockState(logger, args) {
|
|
190
171
|
if (!args.options.lockState) {
|
|
191
|
-
return
|
|
172
|
+
return;
|
|
192
173
|
}
|
|
193
174
|
if (this.verbose) {
|
|
194
175
|
await logger.logToStderr(`Setting site lock state ${args.options.url}...`);
|
|
@@ -206,52 +187,44 @@ class SpoSiteSetCommand extends SpoCommand {
|
|
|
206
187
|
if (this.debug) {
|
|
207
188
|
await logger.logToStderr(`Site attached to group ${this.groupId}`);
|
|
208
189
|
}
|
|
209
|
-
|
|
210
|
-
|
|
211
|
-
|
|
212
|
-
|
|
213
|
-
|
|
214
|
-
|
|
215
|
-
|
|
216
|
-
|
|
217
|
-
|
|
218
|
-
|
|
219
|
-
|
|
220
|
-
|
|
221
|
-
|
|
222
|
-
|
|
223
|
-
|
|
224
|
-
|
|
225
|
-
|
|
226
|
-
|
|
227
|
-
|
|
228
|
-
|
|
229
|
-
|
|
230
|
-
|
|
231
|
-
|
|
232
|
-
|
|
233
|
-
|
|
234
|
-
|
|
235
|
-
|
|
236
|
-
|
|
237
|
-
|
|
238
|
-
|
|
239
|
-
|
|
240
|
-
|
|
241
|
-
|
|
242
|
-
|
|
243
|
-
|
|
244
|
-
|
|
245
|
-
|
|
246
|
-
|
|
247
|
-
Promise
|
|
248
|
-
.all(promises)
|
|
249
|
-
.then(() => {
|
|
250
|
-
resolve();
|
|
251
|
-
}, (error) => {
|
|
252
|
-
reject(error);
|
|
253
|
-
});
|
|
254
|
-
});
|
|
190
|
+
if (typeof args.options.title === 'undefined' &&
|
|
191
|
+
typeof args.options.description === 'undefined' &&
|
|
192
|
+
typeof args.options.isPublic === 'undefined' &&
|
|
193
|
+
typeof args.options.owners === 'undefined') {
|
|
194
|
+
return;
|
|
195
|
+
}
|
|
196
|
+
const promises = [];
|
|
197
|
+
if (typeof args.options.title !== 'undefined') {
|
|
198
|
+
const requestOptions = {
|
|
199
|
+
url: `${this.spoAdminUrl}/_api/SPOGroup/UpdateGroupPropertiesBySiteId`,
|
|
200
|
+
headers: {
|
|
201
|
+
accept: 'application/json;odata=nometadata',
|
|
202
|
+
'content-type': 'application/json;charset=utf-8',
|
|
203
|
+
'X-RequestDigest': this.context.FormDigestValue
|
|
204
|
+
},
|
|
205
|
+
data: {
|
|
206
|
+
groupId: this.groupId,
|
|
207
|
+
siteId: this.siteId,
|
|
208
|
+
displayName: args.options.title
|
|
209
|
+
},
|
|
210
|
+
responseType: 'json'
|
|
211
|
+
};
|
|
212
|
+
promises.push(request.post(requestOptions));
|
|
213
|
+
}
|
|
214
|
+
if (typeof args.options.isPublic !== 'undefined') {
|
|
215
|
+
const commandOptions = {
|
|
216
|
+
id: this.groupId,
|
|
217
|
+
isPrivate: (args.options.isPublic === false),
|
|
218
|
+
debug: this.debug,
|
|
219
|
+
verbose: this.verbose
|
|
220
|
+
};
|
|
221
|
+
promises.push(Cli.executeCommand(aadM365GroupSetCommand, { options: { ...commandOptions, _: [] } }));
|
|
222
|
+
}
|
|
223
|
+
if (args.options.description) {
|
|
224
|
+
promises.push(this.setGroupifiedSiteDescription(args.options.description));
|
|
225
|
+
}
|
|
226
|
+
promises.push(this.setGroupifiedSiteOwners(logger, args));
|
|
227
|
+
await Promise.all(promises);
|
|
255
228
|
}
|
|
256
229
|
setGroupifiedSiteDescription(description) {
|
|
257
230
|
const requestOptions = {
|
|
@@ -267,7 +240,7 @@ class SpoSiteSetCommand extends SpoCommand {
|
|
|
267
240
|
}
|
|
268
241
|
async setGroupifiedSiteOwners(logger, args) {
|
|
269
242
|
if (typeof args.options.owners === 'undefined') {
|
|
270
|
-
return
|
|
243
|
+
return;
|
|
271
244
|
}
|
|
272
245
|
const owners = args.options.owners.split(',').map(o => o.trim());
|
|
273
246
|
if (this.verbose) {
|
|
@@ -280,28 +253,25 @@ class SpoSiteSetCommand extends SpoCommand {
|
|
|
280
253
|
},
|
|
281
254
|
responseType: 'json'
|
|
282
255
|
};
|
|
283
|
-
|
|
284
|
-
|
|
285
|
-
|
|
286
|
-
|
|
287
|
-
|
|
288
|
-
|
|
289
|
-
|
|
290
|
-
|
|
291
|
-
|
|
292
|
-
|
|
293
|
-
|
|
294
|
-
|
|
295
|
-
|
|
296
|
-
}));
|
|
297
|
-
});
|
|
256
|
+
const response = await request.get(requestOptions);
|
|
257
|
+
if (response.value.length === 0) {
|
|
258
|
+
return;
|
|
259
|
+
}
|
|
260
|
+
await Promise.all(response.value.map(user => {
|
|
261
|
+
const requestOptions = {
|
|
262
|
+
url: `${this.spoAdminUrl}/_api/SP.Directory.DirectorySession/Group('${this.groupId}')/Owners/Add(objectId='${user.id}', principalName='')`,
|
|
263
|
+
headers: {
|
|
264
|
+
'content-type': 'application/json;odata=verbose'
|
|
265
|
+
}
|
|
266
|
+
};
|
|
267
|
+
return request.post(requestOptions);
|
|
268
|
+
}));
|
|
298
269
|
}
|
|
299
|
-
updateSiteProperties(logger, args) {
|
|
270
|
+
async updateSiteProperties(logger, args) {
|
|
300
271
|
const isGroupConnectedSite = this.isGroupConnectedSite();
|
|
301
272
|
const sharedProperties = ['classification', 'disableFlows', 'socialBarOnSitePagesDisabled', 'shareByEmailEnabled', 'sharingCapability', 'noScriptSite'];
|
|
302
273
|
const siteProperties = ['title', 'resourceQuota', 'resourceQuotaWarningLevel', 'storageQuota', 'storageQuotaWarningLevel', 'allowSelfServiceUpgrade'];
|
|
303
274
|
let properties = sharedProperties;
|
|
304
|
-
properties = properties;
|
|
305
275
|
if (!isGroupConnectedSite) {
|
|
306
276
|
properties = properties.concat(siteProperties);
|
|
307
277
|
}
|
|
@@ -313,71 +283,84 @@ class SpoSiteSetCommand extends SpoCommand {
|
|
|
313
283
|
}
|
|
314
284
|
}
|
|
315
285
|
if (!updatedProperties) {
|
|
316
|
-
return
|
|
317
|
-
}
|
|
318
|
-
|
|
319
|
-
|
|
320
|
-
.
|
|
321
|
-
|
|
322
|
-
|
|
323
|
-
|
|
324
|
-
|
|
325
|
-
|
|
326
|
-
|
|
327
|
-
|
|
328
|
-
if (args.options.title) {
|
|
329
|
-
payload.push(`<SetProperty Id="${propertyId++}" ObjectPathId="5" Name="Title"><Parameter Type="String">${formatting.escapeXml(args.options.title)}</Parameter></SetProperty>`);
|
|
330
|
-
}
|
|
331
|
-
if (args.options.resourceQuota) {
|
|
332
|
-
payload.push(`<SetProperty Id="${propertyId++}" ObjectPathId="5" Name="UserCodeMaximumLevel"><Parameter Type="Double">${args.options.resourceQuota}</Parameter></SetProperty>`);
|
|
333
|
-
}
|
|
334
|
-
if (args.options.resourceQuotaWarningLevel) {
|
|
335
|
-
payload.push(`<SetProperty Id="${propertyId++}" ObjectPathId="5" Name="UserCodeWarningLevel"><Parameter Type="Double">${args.options.resourceQuotaWarningLevel}</Parameter></SetProperty>`);
|
|
336
|
-
}
|
|
337
|
-
if (args.options.storageQuota) {
|
|
338
|
-
payload.push(`<SetProperty Id="${propertyId++}" ObjectPathId="5" Name="StorageMaximumLevel"><Parameter Type="Int64">${args.options.storageQuota}</Parameter></SetProperty>`);
|
|
339
|
-
}
|
|
340
|
-
if (args.options.storageQuotaWarningLevel) {
|
|
341
|
-
payload.push(`<SetProperty Id="${propertyId++}" ObjectPathId="5" Name="StorageWarningLevel"><Parameter Type="Int64">${args.options.storageQuotaWarningLevel}</Parameter></SetProperty>`);
|
|
342
|
-
}
|
|
343
|
-
if (typeof args.options.allowSelfServiceUpgrade !== 'undefined') {
|
|
344
|
-
payload.push(`<SetProperty Id="${propertyId++}" ObjectPathId="5" Name="AllowSelfServiceUpgrade"><Parameter Type="Boolean">${args.options.allowSelfServiceUpgrade}</Parameter></SetProperty>`);
|
|
345
|
-
}
|
|
346
|
-
}
|
|
347
|
-
if (typeof args.options.classification === 'string') {
|
|
348
|
-
payload.push(`<SetProperty Id="${propertyId++}" ObjectPathId="5" Name="Classification"><Parameter Type="String">${formatting.escapeXml(args.options.classification)}</Parameter></SetProperty>`);
|
|
286
|
+
return;
|
|
287
|
+
}
|
|
288
|
+
this.context = await spo.ensureFormDigest(this.spoAdminUrl, logger, this.context, this.debug);
|
|
289
|
+
if (this.verbose) {
|
|
290
|
+
await logger.logToStderr(`Updating site ${args.options.url} properties...`);
|
|
291
|
+
}
|
|
292
|
+
let propertyId = 27;
|
|
293
|
+
const payload = [];
|
|
294
|
+
const sitePropertiesPayload = [];
|
|
295
|
+
if (!isGroupConnectedSite) {
|
|
296
|
+
if (args.options.title) {
|
|
297
|
+
payload.push(`<SetProperty Id="${propertyId++}" ObjectPathId="5" Name="Title"><Parameter Type="String">${formatting.escapeXml(args.options.title)}</Parameter></SetProperty>`);
|
|
349
298
|
}
|
|
350
|
-
if (
|
|
351
|
-
payload.push(`<SetProperty Id="${propertyId++}" ObjectPathId="5" Name="
|
|
299
|
+
if (args.options.resourceQuota) {
|
|
300
|
+
payload.push(`<SetProperty Id="${propertyId++}" ObjectPathId="5" Name="UserCodeMaximumLevel"><Parameter Type="Double">${args.options.resourceQuota}</Parameter></SetProperty>`);
|
|
352
301
|
}
|
|
353
|
-
if (
|
|
354
|
-
payload.push(`<SetProperty Id="${propertyId++}" ObjectPathId="5" Name="
|
|
302
|
+
if (args.options.resourceQuotaWarningLevel) {
|
|
303
|
+
payload.push(`<SetProperty Id="${propertyId++}" ObjectPathId="5" Name="UserCodeWarningLevel"><Parameter Type="Double">${args.options.resourceQuotaWarningLevel}</Parameter></SetProperty>`);
|
|
355
304
|
}
|
|
356
|
-
if (
|
|
357
|
-
payload.push(`<SetProperty Id="${propertyId++}" ObjectPathId="5" Name="
|
|
305
|
+
if (args.options.storageQuota) {
|
|
306
|
+
payload.push(`<SetProperty Id="${propertyId++}" ObjectPathId="5" Name="StorageMaximumLevel"><Parameter Type="Int64">${args.options.storageQuota}</Parameter></SetProperty>`);
|
|
358
307
|
}
|
|
359
|
-
if (args.options.
|
|
360
|
-
|
|
361
|
-
payload.push(`<SetProperty Id="${propertyId++}" ObjectPathId="5" Name="SharingCapability"><Parameter Type="Enum">${sharingCapability}</Parameter></SetProperty>`);
|
|
308
|
+
if (args.options.storageQuotaWarningLevel) {
|
|
309
|
+
payload.push(`<SetProperty Id="${propertyId++}" ObjectPathId="5" Name="StorageWarningLevel"><Parameter Type="Int64">${args.options.storageQuotaWarningLevel}</Parameter></SetProperty>`);
|
|
362
310
|
}
|
|
363
|
-
if (
|
|
364
|
-
|
|
365
|
-
payload.push(`<SetProperty Id="${propertyId++}" ObjectPathId="5" Name="DenyAddAndCustomizePages"><Parameter Type="Enum">${noScriptSite}</Parameter></SetProperty>`);
|
|
311
|
+
if (args.options.allowSelfServiceUpgrade !== undefined) {
|
|
312
|
+
payload.push(`<SetProperty Id="${propertyId++}" ObjectPathId="5" Name="AllowSelfServiceUpgrade"><Parameter Type="Boolean">${args.options.allowSelfServiceUpgrade}</Parameter></SetProperty>`);
|
|
366
313
|
}
|
|
314
|
+
}
|
|
315
|
+
if (typeof args.options.classification === 'string') {
|
|
316
|
+
sitePropertiesPayload.push(`<SetProperty Id="${propertyId++}" ObjectPathId="5" Name="Classification"><Parameter Type="String">${formatting.escapeXml(args.options.classification)}</Parameter></SetProperty>`);
|
|
317
|
+
}
|
|
318
|
+
if (args.options.disableFlows !== undefined) {
|
|
319
|
+
const flowsPolicy = args.options.disableFlows ? FlowsPolicy.Disabled : FlowsPolicy.Enabled;
|
|
320
|
+
payload.push(`<SetProperty Id="${propertyId++}" ObjectPathId="5" Name="DisableFlows"><Parameter Type="Enum">${flowsPolicy}</Parameter></SetProperty>`);
|
|
321
|
+
}
|
|
322
|
+
if (typeof args.options.socialBarOnSitePagesDisabled !== 'undefined') {
|
|
323
|
+
payload.push(`<SetProperty Id="${propertyId++}" ObjectPathId="5" Name="SocialBarOnSitePagesDisabled"><Parameter Type="Boolean">${args.options.socialBarOnSitePagesDisabled}</Parameter></SetProperty>`);
|
|
324
|
+
}
|
|
325
|
+
if (args.options.shareByEmailEnabled !== undefined) {
|
|
326
|
+
sitePropertiesPayload.push(`<SetProperty Id="${propertyId++}" ObjectPathId="5" Name="ShareByEmailEnabled"><Parameter Type="Boolean">${args.options.shareByEmailEnabled}</Parameter></SetProperty>`);
|
|
327
|
+
}
|
|
328
|
+
if (args.options.sharingCapability) {
|
|
329
|
+
const sharingCapability = SharingCapabilities[args.options.sharingCapability];
|
|
330
|
+
payload.push(`<SetProperty Id="${propertyId++}" ObjectPathId="5" Name="SharingCapability"><Parameter Type="Enum">${sharingCapability}</Parameter></SetProperty>`);
|
|
331
|
+
}
|
|
332
|
+
if (args.options.noScriptSite !== undefined) {
|
|
333
|
+
const noScriptSite = args.options.noScriptSite ? 2 : 1;
|
|
334
|
+
payload.push(`<SetProperty Id="${propertyId++}" ObjectPathId="5" Name="DenyAddAndCustomizePages"><Parameter Type="Enum">${noScriptSite}</Parameter></SetProperty>`);
|
|
335
|
+
}
|
|
336
|
+
let response;
|
|
337
|
+
let sitePropertiesResponse;
|
|
338
|
+
if (sitePropertiesPayload.length > 0) {
|
|
339
|
+
const requestOptions = {
|
|
340
|
+
url: `${args.options.url}/_vti_bin/client.svc/ProcessQuery`,
|
|
341
|
+
headers: {
|
|
342
|
+
'X-RequestDigest': this.context.FormDigestValue
|
|
343
|
+
},
|
|
344
|
+
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>${sitePropertiesPayload.join('')}</Actions><ObjectPaths><StaticProperty Id="1" TypeId="{3747adcd-a3c3-41b9-bfab-4a64dd2f1e0a}" Name="Current" /><Property Id="5" ParentId="1" Name="Site" /></ObjectPaths></Request>`
|
|
345
|
+
};
|
|
346
|
+
sitePropertiesResponse = await request.post(requestOptions);
|
|
347
|
+
}
|
|
348
|
+
if (payload.length > 0) {
|
|
367
349
|
const pos = this.tenantId.indexOf('|') + 1;
|
|
368
350
|
const requestOptions = {
|
|
369
351
|
url: `${this.spoAdminUrl}/_vti_bin/client.svc/ProcessQuery`,
|
|
370
352
|
headers: {
|
|
371
|
-
'X-RequestDigest':
|
|
353
|
+
'X-RequestDigest': this.context.FormDigestValue
|
|
372
354
|
},
|
|
373
355
|
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>${payload.join('')}<ObjectPath Id="14" ObjectPathId="13" /><ObjectIdentityQuery Id="15" ObjectPathId="5" /><Query Id="16" ObjectPathId="13"><Query SelectAllProperties="false"><Properties><Property Name="IsComplete" ScalarProperty="true" /><Property Name="PollingInterval" ScalarProperty="true" /></Properties></Query></Query></Actions><ObjectPaths><Identity Id="5" Name="53d8499e-d0d2-5000-cb83-9ade5be42ca4|${this.tenantId.substr(pos, this.tenantId.indexOf('&') - pos)}
SiteProperties
${formatting.encodeQueryParameter(args.options.url)}" /><Method Id="13" ParentId="5" Name="Update" /></ObjectPaths></Request>`
|
|
374
356
|
};
|
|
375
|
-
|
|
376
|
-
}
|
|
357
|
+
response = await request.post(requestOptions);
|
|
358
|
+
}
|
|
359
|
+
return response || sitePropertiesResponse;
|
|
377
360
|
}
|
|
378
|
-
applySiteDesign(logger, args) {
|
|
361
|
+
async applySiteDesign(logger, args) {
|
|
379
362
|
if (typeof args.options.siteDesignId === 'undefined') {
|
|
380
|
-
return
|
|
363
|
+
return;
|
|
381
364
|
}
|
|
382
365
|
const options = {
|
|
383
366
|
webUrl: args.options.url,
|
|
@@ -399,16 +382,12 @@ class SpoSiteSetCommand extends SpoCommand {
|
|
|
399
382
|
},
|
|
400
383
|
responseType: 'json'
|
|
401
384
|
};
|
|
402
|
-
|
|
403
|
-
|
|
404
|
-
|
|
405
|
-
|
|
406
|
-
this.siteId
|
|
407
|
-
|
|
408
|
-
await logger.logToStderr(`Retrieved site IDs. siteId: ${this.siteId}, groupId: ${this.groupId}`);
|
|
409
|
-
}
|
|
410
|
-
return Promise.resolve();
|
|
411
|
-
});
|
|
385
|
+
const siteInfo = await request.get(requestOptions);
|
|
386
|
+
this.groupId = siteInfo.GroupId;
|
|
387
|
+
this.siteId = siteInfo.Id;
|
|
388
|
+
if (this.debug) {
|
|
389
|
+
await logger.logToStderr(`Retrieved site IDs. siteId: ${this.siteId}, groupId: ${this.groupId}`);
|
|
390
|
+
}
|
|
412
391
|
}
|
|
413
392
|
isGroupConnectedSite() {
|
|
414
393
|
return this.groupId !== '00000000-0000-0000-0000-000000000000';
|
|
@@ -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 _SpoTenantCommandSetAddCommand_instances, _SpoTenantCommandSetAddCommand_initTelemetry, _SpoTenantCommandSetAddCommand_initOptions, _SpoTenantCommandSetAddCommand_initValidators;
|
|
6
|
+
var _SpoTenantCommandSetAddCommand_instances, _a, _SpoTenantCommandSetAddCommand_initTelemetry, _SpoTenantCommandSetAddCommand_initOptions, _SpoTenantCommandSetAddCommand_initValidators;
|
|
7
7
|
import { Cli } from '../../../../cli/Cli.js';
|
|
8
8
|
import { urlUtil } from '../../../../utils/urlUtil.js';
|
|
9
9
|
import { validation } from '../../../../utils/validation.js';
|
|
@@ -149,7 +149,7 @@ class SpoTenantCommandSetAddCommand extends SpoCommand {
|
|
|
149
149
|
}
|
|
150
150
|
}
|
|
151
151
|
}
|
|
152
|
-
_SpoTenantCommandSetAddCommand_instances = new WeakSet(), _SpoTenantCommandSetAddCommand_initTelemetry = function _SpoTenantCommandSetAddCommand_initTelemetry() {
|
|
152
|
+
_a = SpoTenantCommandSetAddCommand, _SpoTenantCommandSetAddCommand_instances = new WeakSet(), _SpoTenantCommandSetAddCommand_initTelemetry = function _SpoTenantCommandSetAddCommand_initTelemetry() {
|
|
153
153
|
this.telemetry.push((args) => {
|
|
154
154
|
Object.assign(this.telemetryProperties, {
|
|
155
155
|
listType: args.options.listType,
|
|
@@ -163,7 +163,7 @@ _SpoTenantCommandSetAddCommand_instances = new WeakSet(), _SpoTenantCommandSetAd
|
|
|
163
163
|
option: '-t, --title <title>'
|
|
164
164
|
}, {
|
|
165
165
|
option: '-l, --listType <listType>',
|
|
166
|
-
autocomplete:
|
|
166
|
+
autocomplete: _a.listTypes
|
|
167
167
|
}, {
|
|
168
168
|
option: '-i, --clientSideComponentId <clientSideComponentId>'
|
|
169
169
|
}, {
|
|
@@ -172,18 +172,18 @@ _SpoTenantCommandSetAddCommand_instances = new WeakSet(), _SpoTenantCommandSetAd
|
|
|
172
172
|
option: '-w, --webTemplate [webTemplate]'
|
|
173
173
|
}, {
|
|
174
174
|
option: '--location [location]',
|
|
175
|
-
autocomplete:
|
|
175
|
+
autocomplete: _a.locations
|
|
176
176
|
});
|
|
177
177
|
}, _SpoTenantCommandSetAddCommand_initValidators = function _SpoTenantCommandSetAddCommand_initValidators() {
|
|
178
178
|
this.validators.push(async (args) => {
|
|
179
179
|
if (!validation.isValidGuid(args.options.clientSideComponentId)) {
|
|
180
180
|
return `${args.options.clientSideComponentId} is not a valid GUID`;
|
|
181
181
|
}
|
|
182
|
-
if (
|
|
183
|
-
return `${args.options.listType} is not a valid list type. Allowed values are ${
|
|
182
|
+
if (_a.listTypes.indexOf(args.options.listType) < 0) {
|
|
183
|
+
return `${args.options.listType} is not a valid list type. Allowed values are ${_a.listTypes.join(', ')}`;
|
|
184
184
|
}
|
|
185
|
-
if (args.options.location &&
|
|
186
|
-
return `${args.options.location} is not a valid location. Allowed values are ${
|
|
185
|
+
if (args.options.location && _a.locations.indexOf(args.options.location) < 0) {
|
|
186
|
+
return `${args.options.location} is not a valid location. Allowed values are ${_a.locations.join(', ')}`;
|
|
187
187
|
}
|
|
188
188
|
return true;
|
|
189
189
|
});
|
|
@@ -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 _SpoTenantCommandSetSetCommand_instances, _SpoTenantCommandSetSetCommand_initTelemetry, _SpoTenantCommandSetSetCommand_initOptions, _SpoTenantCommandSetSetCommand_initValidators;
|
|
6
|
+
var _SpoTenantCommandSetSetCommand_instances, _a, _SpoTenantCommandSetSetCommand_initTelemetry, _SpoTenantCommandSetSetCommand_initOptions, _SpoTenantCommandSetSetCommand_initValidators;
|
|
7
7
|
import request from '../../../../request.js';
|
|
8
8
|
import { formatting } from '../../../../utils/formatting.js';
|
|
9
9
|
import { spo } from '../../../../utils/spo.js';
|
|
@@ -129,7 +129,7 @@ class SpoTenantCommandSetSetCommand extends SpoCommand {
|
|
|
129
129
|
}
|
|
130
130
|
}
|
|
131
131
|
}
|
|
132
|
-
_SpoTenantCommandSetSetCommand_instances = new WeakSet(), _SpoTenantCommandSetSetCommand_initTelemetry = function _SpoTenantCommandSetSetCommand_initTelemetry() {
|
|
132
|
+
_a = SpoTenantCommandSetSetCommand, _SpoTenantCommandSetSetCommand_instances = new WeakSet(), _SpoTenantCommandSetSetCommand_initTelemetry = function _SpoTenantCommandSetSetCommand_initTelemetry() {
|
|
133
133
|
this.telemetry.push((args) => {
|
|
134
134
|
Object.assign(this.telemetryProperties, {
|
|
135
135
|
newTitle: typeof args.options.newTitle !== 'undefined',
|
|
@@ -147,7 +147,7 @@ _SpoTenantCommandSetSetCommand_instances = new WeakSet(), _SpoTenantCommandSetSe
|
|
|
147
147
|
option: '-t, --newTitle [newTitle]'
|
|
148
148
|
}, {
|
|
149
149
|
option: '-l, --listType [listType]',
|
|
150
|
-
autocomplete:
|
|
150
|
+
autocomplete: _a.listTypes
|
|
151
151
|
}, {
|
|
152
152
|
option: '-c, --clientSideComponentId [clientSideComponentId]'
|
|
153
153
|
}, {
|
|
@@ -156,7 +156,7 @@ _SpoTenantCommandSetSetCommand_instances = new WeakSet(), _SpoTenantCommandSetSe
|
|
|
156
156
|
option: '-w, --webTemplate [webTemplate]'
|
|
157
157
|
}, {
|
|
158
158
|
option: '--location [location]',
|
|
159
|
-
autocomplete:
|
|
159
|
+
autocomplete: _a.locations
|
|
160
160
|
});
|
|
161
161
|
}, _SpoTenantCommandSetSetCommand_initValidators = function _SpoTenantCommandSetSetCommand_initValidators() {
|
|
162
162
|
this.validators.push(async (args) => {
|
|
@@ -171,11 +171,11 @@ _SpoTenantCommandSetSetCommand_instances = new WeakSet(), _SpoTenantCommandSetSe
|
|
|
171
171
|
if (args.options.clientSideComponentId && !validation.isValidGuid(args.options.clientSideComponentId)) {
|
|
172
172
|
return `${args.options.clientSideComponentId} is not a valid GUID`;
|
|
173
173
|
}
|
|
174
|
-
if (args.options.listType &&
|
|
175
|
-
return `${args.options.listType} is not a valid list type. Allowed values are ${
|
|
174
|
+
if (args.options.listType && _a.listTypes.indexOf(args.options.listType) < 0) {
|
|
175
|
+
return `${args.options.listType} is not a valid list type. Allowed values are ${_a.listTypes.join(', ')}`;
|
|
176
176
|
}
|
|
177
|
-
if (args.options.location &&
|
|
178
|
-
return `${args.options.location} is not a valid location. Allowed values are ${
|
|
177
|
+
if (args.options.location && _a.locations.indexOf(args.options.location) < 0) {
|
|
178
|
+
return `${args.options.location} is not a valid location. Allowed values are ${_a.locations.join(', ')}`;
|
|
179
179
|
}
|
|
180
180
|
return true;
|
|
181
181
|
});
|
|
@@ -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 _SpoTenantSettingsSetCommand_instances, _SpoTenantSettingsSetCommand_initTelemetry, _SpoTenantSettingsSetCommand_initOptions, _SpoTenantSettingsSetCommand_initValidators, _SpoTenantSettingsSetCommand_initTypes;
|
|
6
|
+
var _SpoTenantSettingsSetCommand_instances, _a, _SpoTenantSettingsSetCommand_initTelemetry, _SpoTenantSettingsSetCommand_initOptions, _SpoTenantSettingsSetCommand_initValidators, _SpoTenantSettingsSetCommand_initTypes;
|
|
7
7
|
import config from '../../../../config.js';
|
|
8
8
|
import request from '../../../../request.js';
|
|
9
9
|
import { formatting } from '../../../../utils/formatting.js';
|
|
@@ -132,7 +132,7 @@ class SpoTenantSettingsSetCommand extends SpoCommand {
|
|
|
132
132
|
}
|
|
133
133
|
}
|
|
134
134
|
}
|
|
135
|
-
_SpoTenantSettingsSetCommand_instances = new WeakSet(), _SpoTenantSettingsSetCommand_initTelemetry = function _SpoTenantSettingsSetCommand_initTelemetry() {
|
|
135
|
+
_a = SpoTenantSettingsSetCommand, _SpoTenantSettingsSetCommand_instances = new WeakSet(), _SpoTenantSettingsSetCommand_initTelemetry = function _SpoTenantSettingsSetCommand_initTelemetry() {
|
|
136
136
|
this.telemetry.push((args) => {
|
|
137
137
|
const telemetryProps = {
|
|
138
138
|
MinCompatibilityLevel: (!(!args.options.MinCompatibilityLevel)).toString(),
|
|
@@ -167,7 +167,7 @@ _SpoTenantSettingsSetCommand_instances = new WeakSet(), _SpoTenantSettingsSetCom
|
|
|
167
167
|
AllowedDomainListForSyncClient: (!(!args.options.AllowedDomainListForSyncClient)).toString()
|
|
168
168
|
};
|
|
169
169
|
// add boolean values
|
|
170
|
-
|
|
170
|
+
_a.booleanOptions.forEach(o => {
|
|
171
171
|
const value = args.options[o];
|
|
172
172
|
if (value !== undefined) {
|
|
173
173
|
telemetryProps[o] = value;
|
|
@@ -439,7 +439,7 @@ _SpoTenantSettingsSetCommand_instances = new WeakSet(), _SpoTenantSettingsSetCom
|
|
|
439
439
|
return true;
|
|
440
440
|
});
|
|
441
441
|
}, _SpoTenantSettingsSetCommand_initTypes = function _SpoTenantSettingsSetCommand_initTypes() {
|
|
442
|
-
this.types.boolean.push(...
|
|
442
|
+
this.types.boolean.push(..._a.booleanOptions);
|
|
443
443
|
};
|
|
444
444
|
SpoTenantSettingsSetCommand.booleanOptions = [
|
|
445
445
|
'ExternalServicesEnabled',
|