@pnp/cli-microsoft365 11.12.0-beta.8589b73 → 12.0.0-beta.e4f7675
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/m365/spfx/commands/project/DeployWorkflow.js +7 -15
- package/dist/m365/spfx/commands/project/project-azuredevops-pipeline-add.js +30 -2
- package/dist/m365/spfx/commands/project/project-github-workflow-add.js +12 -2
- package/dist/m365/spo/commands/cdn/cdn-get.js +8 -35
- package/dist/m365/spo/commands/cdn/cdn-origin-add.js +9 -36
- package/dist/m365/spo/commands/cdn/cdn-origin-list.js +8 -34
- package/dist/m365/spo/commands/cdn/cdn-origin-remove.js +10 -39
- package/dist/m365/spo/commands/cdn/cdn-policy-list.js +8 -34
- package/dist/m365/spo/commands/cdn/cdn-policy-set.js +10 -45
- package/dist/m365/spo/commands/cdn/cdn-set.js +10 -46
- package/dist/m365/spo/commands/contenttype/contenttype-sync.js +12 -24
- package/dist/m365/spo/commands/file/file-add.js +2 -6
- package/dist/m365/spo/commands/listitem/listitem-get.js +15 -7
- package/dist/m365/spo/commands/page/page-header-set.js +123 -64
- package/dist/m365/spo/commands/site/site-list.js +60 -49
- package/dist/m365/spo/commands/storageentity/storageentity-get.js +23 -17
- package/dist/m365/spo/commands/storageentity/storageentity-list.js +39 -36
- package/dist/m365/spo/commands/storageentity/storageentity-remove.js +26 -33
- package/dist/m365/spo/commands/storageentity/storageentity-set.js +26 -36
- package/dist/m365/teams/commands/channel/channel-list.js +2 -6
- package/dist/m365/teams/commands/channel/channel-member-add.js +2 -6
- package/dist/m365/teams/commands/channel/channel-member-list.js +2 -6
- package/dist/m365/teams/commands/channel/channel-member-remove.js +2 -6
- package/dist/m365/teams/commands/channel/channel-member-set.js +2 -6
- package/dist/m365/teams/commands/channel/channel-remove.js +2 -8
- package/dist/m365/teams/commands/channel/channel-set.js +2 -8
- package/dist/m365/teams/commands/tab/tab-get.js +2 -6
- package/dist/m365/teams/commands/team/team-archive.js +2 -6
- package/dist/m365/teams/commands/team/team-remove.js +2 -6
- package/dist/m365/teams/commands/team/team-unarchive.js +2 -6
- package/docs/docs/cmd/spo/contenttype/contenttype-sync.mdx +4 -4
- package/docs/docs/cmd/spo/file/file-add.mdx +2 -2
- package/docs/docs/cmd/spo/file/file-checkin.mdx +21 -0
- package/docs/docs/cmd/spo/file/file-checkout.mdx +21 -0
- package/docs/docs/cmd/spo/file/file-copy.mdx +19 -0
- package/docs/docs/cmd/spo/file/file-get.mdx +19 -0
- package/docs/docs/cmd/spo/file/file-list.mdx +19 -0
- package/docs/docs/cmd/spo/file/file-move.mdx +19 -0
- package/docs/docs/cmd/spo/file/file-remove.mdx +21 -0
- package/docs/docs/cmd/spo/file/file-rename.mdx +19 -0
- package/docs/docs/cmd/spo/folder/folder-retentionlabel-ensure.mdx +21 -0
- package/docs/docs/cmd/spo/folder/folder-retentionlabel-remove.mdx +21 -0
- package/docs/docs/cmd/spo/folder/folder-roleassignment-add.mdx +21 -0
- package/docs/docs/cmd/spo/folder/folder-roleassignment-remove.mdx +21 -0
- package/docs/docs/cmd/spo/folder/folder-roleinheritance-break.mdx +21 -0
- package/docs/docs/cmd/spo/folder/folder-roleinheritance-reset.mdx +21 -0
- package/docs/docs/cmd/spo/list/list-add.mdx +19 -0
- package/docs/docs/cmd/spo/list/list-contenttype-add.mdx +19 -0
- package/docs/docs/cmd/spo/list/list-contenttype-default-set.mdx +21 -0
- package/docs/docs/cmd/spo/list/list-contenttype-list.mdx +19 -0
- package/docs/docs/cmd/spo/list/list-contenttype-remove.mdx +21 -0
- package/docs/docs/cmd/spo/list/list-defaultvalue-clear.mdx +21 -0
- package/docs/docs/cmd/spo/list/list-defaultvalue-list.mdx +19 -0
- package/docs/docs/cmd/spo/list/list-defaultvalue-remove.mdx +21 -0
- package/docs/docs/cmd/spo/list/list-defaultvalue-set.mdx +21 -0
- package/docs/docs/cmd/spo/list/list-get.mdx +19 -0
- package/docs/docs/cmd/spo/list/list-list.mdx +19 -0
- package/docs/docs/cmd/spo/list/list-remove.mdx +21 -0
- package/docs/docs/cmd/spo/list/list-retentionlabel-ensure.mdx +21 -0
- package/docs/docs/cmd/spo/list/list-retentionlabel-get.mdx +19 -0
- package/docs/docs/cmd/spo/list/list-retentionlabel-remove.mdx +21 -0
- package/docs/docs/cmd/spo/list/list-roleassignment-add.mdx +21 -0
- package/docs/docs/cmd/spo/list/list-roleassignment-remove.mdx +21 -0
- package/docs/docs/cmd/spo/list/list-roleinheritance-break.mdx +21 -0
- package/docs/docs/cmd/spo/list/list-roleinheritance-reset.mdx +21 -0
- package/docs/docs/cmd/spo/list/list-sensitivitylabel-ensure.mdx +23 -0
- package/docs/docs/cmd/spo/list/list-set.mdx +21 -0
- package/docs/docs/cmd/spo/list/list-sitescript-get.mdx +19 -0
- package/docs/docs/cmd/spo/list/list-view-add.mdx +19 -0
- package/docs/docs/cmd/spo/list/list-view-field-add.mdx +21 -0
- package/docs/docs/cmd/spo/list/list-view-field-remove.mdx +21 -0
- package/docs/docs/cmd/spo/list/list-view-field-set.mdx +21 -0
- package/docs/docs/cmd/spo/list/list-view-get.mdx +19 -0
- package/docs/docs/cmd/spo/list/list-view-list.mdx +19 -0
- package/docs/docs/cmd/spo/list/list-view-remove.mdx +21 -0
- package/docs/docs/cmd/spo/list/list-view-set.mdx +19 -0
- package/docs/docs/cmd/spo/list/list-webhook-add.mdx +19 -0
- package/docs/docs/cmd/spo/list/list-webhook-get.mdx +19 -0
- package/docs/docs/cmd/spo/list/list-webhook-list.mdx +19 -0
- package/docs/docs/cmd/spo/list/list-webhook-remove.mdx +21 -0
- package/docs/docs/cmd/spo/list/list-webhook-set.mdx +21 -0
- package/docs/docs/cmd/spo/listitem/listitem-attachment-add.mdx +19 -0
- package/docs/docs/cmd/spo/listitem/listitem-attachment-get.mdx +19 -0
- package/docs/docs/cmd/spo/listitem/listitem-attachment-list.mdx +19 -0
- package/docs/docs/cmd/spo/listitem/listitem-attachment-remove.mdx +19 -0
- package/docs/docs/cmd/spo/listitem/listitem-attachment-set.mdx +19 -0
- package/docs/docs/cmd/spo/listitem/listitem-get.mdx +13 -7
- package/docs/docs/cmd/spo/page/page-header-set.mdx +9 -9
- package/docs/docs/cmd/spo/site/site-list.mdx +22 -1
- package/docs/docs/cmd/spo/storageentity/storageentity-get.mdx +11 -2
- package/docs/docs/cmd/spo/storageentity/storageentity-list.mdx +9 -3
- package/docs/docs/cmd/spo/storageentity/storageentity-remove.mdx +6 -6
- package/docs/docs/cmd/spo/storageentity/storageentity-set.mdx +10 -4
- package/docs/docs/cmd/tenant/id/id-get.mdx +15 -0
- package/docs/docs/cmd/tenant/info/info-get.mdx +19 -0
- package/docs/docs/cmd/tenant/people/people-pronouns-get.mdx +19 -0
- package/docs/docs/cmd/tenant/people/people-pronouns-set.mdx +19 -0
- package/docs/docs/cmd/tenant/report/report-settings-get.mdx +19 -0
- package/docs/docs/cmd/tenant/report/report-settings-set.mdx +21 -0
- package/docs/docs/cmd/tenant/security/security-alerts-list.mdx +19 -0
- package/npm-shrinkwrap.json +1103 -1157
- package/package.json +17 -17
|
@@ -1,13 +1,19 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
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
|
-
return kind === "m" ? f : kind === "a" ? f.call(receiver) : f ? f.value : state.get(receiver);
|
|
5
|
-
};
|
|
6
|
-
var _SpoStorageEntityListCommand_instances, _SpoStorageEntityListCommand_initOptions, _SpoStorageEntityListCommand_initValidators;
|
|
1
|
+
import { z } from 'zod';
|
|
2
|
+
import { globalOptionsZod } from '../../../../Command.js';
|
|
7
3
|
import request from '../../../../request.js';
|
|
4
|
+
import { spo } from '../../../../utils/spo.js';
|
|
8
5
|
import { validation } from '../../../../utils/validation.js';
|
|
9
6
|
import SpoCommand from '../../../base/SpoCommand.js';
|
|
10
7
|
import commands from '../../commands.js';
|
|
8
|
+
export const options = z.strictObject({
|
|
9
|
+
...globalOptionsZod.shape,
|
|
10
|
+
appCatalogUrl: z.string()
|
|
11
|
+
.refine(url => validation.isValidSharePointUrl(url) === true, {
|
|
12
|
+
error: e => `'${e.input}' is not a valid SharePoint Online site URL.`
|
|
13
|
+
})
|
|
14
|
+
.optional()
|
|
15
|
+
.alias('u')
|
|
16
|
+
});
|
|
11
17
|
class SpoStorageEntityListCommand extends SpoCommand {
|
|
12
18
|
get name() {
|
|
13
19
|
return commands.STORAGEENTITY_LIST;
|
|
@@ -15,30 +21,35 @@ class SpoStorageEntityListCommand extends SpoCommand {
|
|
|
15
21
|
get description() {
|
|
16
22
|
return 'Lists tenant properties stored on the specified SharePoint Online app catalog';
|
|
17
23
|
}
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
_SpoStorageEntityListCommand_instances.add(this);
|
|
21
|
-
__classPrivateFieldGet(this, _SpoStorageEntityListCommand_instances, "m", _SpoStorageEntityListCommand_initOptions).call(this);
|
|
22
|
-
__classPrivateFieldGet(this, _SpoStorageEntityListCommand_instances, "m", _SpoStorageEntityListCommand_initValidators).call(this);
|
|
24
|
+
get schema() {
|
|
25
|
+
return options;
|
|
23
26
|
}
|
|
24
27
|
async commandAction(logger, args) {
|
|
25
|
-
if (this.verbose) {
|
|
26
|
-
await logger.logToStderr(`Retrieving details for all tenant properties in ${args.options.appCatalogUrl}...`);
|
|
27
|
-
}
|
|
28
|
-
const requestOptions = {
|
|
29
|
-
url: `${args.options.appCatalogUrl}/_api/web/AllProperties?$select=storageentitiesindex`,
|
|
30
|
-
headers: {
|
|
31
|
-
accept: 'application/json;odata=nometadata'
|
|
32
|
-
},
|
|
33
|
-
responseType: 'json'
|
|
34
|
-
};
|
|
35
28
|
try {
|
|
29
|
+
let appCatalogUrl = args.options.appCatalogUrl;
|
|
30
|
+
if (!appCatalogUrl) {
|
|
31
|
+
appCatalogUrl = await spo.getTenantAppCatalogUrl(logger, this.debug);
|
|
32
|
+
if (!appCatalogUrl) {
|
|
33
|
+
throw 'Tenant app catalog URL not found. Specify the URL of the app catalog site using the appCatalogUrl option.';
|
|
34
|
+
}
|
|
35
|
+
}
|
|
36
|
+
if (this.verbose) {
|
|
37
|
+
await logger.logToStderr(`Retrieving details for all tenant properties in ${appCatalogUrl}...`);
|
|
38
|
+
}
|
|
39
|
+
const requestOptions = {
|
|
40
|
+
url: `${appCatalogUrl}/_api/web/AllProperties?$select=storageentitiesindex`,
|
|
41
|
+
headers: {
|
|
42
|
+
accept: 'application/json;odata=nometadata'
|
|
43
|
+
},
|
|
44
|
+
responseType: 'json'
|
|
45
|
+
};
|
|
36
46
|
const web = await request.get(requestOptions);
|
|
37
47
|
if (!web.storageentitiesindex ||
|
|
38
48
|
web.storageentitiesindex.trim().length === 0) {
|
|
39
49
|
if (this.verbose) {
|
|
40
50
|
await logger.logToStderr('No tenant properties found');
|
|
41
51
|
}
|
|
52
|
+
await logger.log([]);
|
|
42
53
|
}
|
|
43
54
|
else {
|
|
44
55
|
const properties = JSON.parse(web.storageentitiesindex);
|
|
@@ -47,17 +58,16 @@ class SpoStorageEntityListCommand extends SpoCommand {
|
|
|
47
58
|
if (this.verbose) {
|
|
48
59
|
await logger.logToStderr('No tenant properties found');
|
|
49
60
|
}
|
|
61
|
+
await logger.log([]);
|
|
50
62
|
}
|
|
51
63
|
else {
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
Description: property.Description,
|
|
58
|
-
Comment: property.Comment
|
|
59
|
-
};
|
|
64
|
+
const result = keys.map(key => ({
|
|
65
|
+
Key: key,
|
|
66
|
+
Value: properties[key].Value,
|
|
67
|
+
Description: properties[key].Description,
|
|
68
|
+
Comment: properties[key].Comment
|
|
60
69
|
}));
|
|
70
|
+
await logger.log(result);
|
|
61
71
|
}
|
|
62
72
|
}
|
|
63
73
|
}
|
|
@@ -66,12 +76,5 @@ class SpoStorageEntityListCommand extends SpoCommand {
|
|
|
66
76
|
}
|
|
67
77
|
}
|
|
68
78
|
}
|
|
69
|
-
_SpoStorageEntityListCommand_instances = new WeakSet(), _SpoStorageEntityListCommand_initOptions = function _SpoStorageEntityListCommand_initOptions() {
|
|
70
|
-
this.options.unshift({
|
|
71
|
-
option: '-u, --appCatalogUrl <appCatalogUrl>'
|
|
72
|
-
});
|
|
73
|
-
}, _SpoStorageEntityListCommand_initValidators = function _SpoStorageEntityListCommand_initValidators() {
|
|
74
|
-
this.validators.push(async (args) => validation.isValidSharePointUrl(args.options.appCatalogUrl));
|
|
75
|
-
};
|
|
76
79
|
export default new SpoStorageEntityListCommand();
|
|
77
80
|
//# sourceMappingURL=storageentity-list.js.map
|
|
@@ -1,17 +1,24 @@
|
|
|
1
|
-
|
|
2
|
-
if (kind === "a" && !f) throw new TypeError("Private accessor was defined without a getter");
|
|
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
|
-
return kind === "m" ? f : kind === "a" ? f.call(receiver) : f ? f.value : state.get(receiver);
|
|
5
|
-
};
|
|
6
|
-
var _SpoStorageEntityRemoveCommand_instances, _SpoStorageEntityRemoveCommand_initTelemetry, _SpoStorageEntityRemoveCommand_initOptions, _SpoStorageEntityRemoveCommand_initValidators;
|
|
1
|
+
import { z } from 'zod';
|
|
7
2
|
import { cli } from '../../../../cli/cli.js';
|
|
8
3
|
import config from '../../../../config.js';
|
|
4
|
+
import { globalOptionsZod } from '../../../../Command.js';
|
|
9
5
|
import request from '../../../../request.js';
|
|
10
6
|
import { formatting } from '../../../../utils/formatting.js';
|
|
11
7
|
import { spo } from '../../../../utils/spo.js';
|
|
12
8
|
import { validation } from '../../../../utils/validation.js';
|
|
13
9
|
import SpoCommand from '../../../base/SpoCommand.js';
|
|
14
10
|
import commands from '../../commands.js';
|
|
11
|
+
export const options = z.strictObject({
|
|
12
|
+
...globalOptionsZod.shape,
|
|
13
|
+
appCatalogUrl: z.string()
|
|
14
|
+
.refine(url => validation.isValidSharePointUrl(url) === true, {
|
|
15
|
+
error: e => `'${e.input}' is not a valid SharePoint Online site URL.`
|
|
16
|
+
})
|
|
17
|
+
.optional()
|
|
18
|
+
.alias('u'),
|
|
19
|
+
key: z.string().alias('k'),
|
|
20
|
+
force: z.boolean().optional().alias('f')
|
|
21
|
+
});
|
|
15
22
|
class SpoStorageEntityRemoveCommand extends SpoCommand {
|
|
16
23
|
get name() {
|
|
17
24
|
return commands.STORAGEENTITY_REMOVE;
|
|
@@ -19,12 +26,8 @@ class SpoStorageEntityRemoveCommand extends SpoCommand {
|
|
|
19
26
|
get description() {
|
|
20
27
|
return 'Removes tenant property stored on the specified SharePoint Online app catalog';
|
|
21
28
|
}
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
_SpoStorageEntityRemoveCommand_instances.add(this);
|
|
25
|
-
__classPrivateFieldGet(this, _SpoStorageEntityRemoveCommand_instances, "m", _SpoStorageEntityRemoveCommand_initTelemetry).call(this);
|
|
26
|
-
__classPrivateFieldGet(this, _SpoStorageEntityRemoveCommand_instances, "m", _SpoStorageEntityRemoveCommand_initOptions).call(this);
|
|
27
|
-
__classPrivateFieldGet(this, _SpoStorageEntityRemoveCommand_instances, "m", _SpoStorageEntityRemoveCommand_initValidators).call(this);
|
|
29
|
+
get schema() {
|
|
30
|
+
return options;
|
|
28
31
|
}
|
|
29
32
|
async commandAction(logger, args) {
|
|
30
33
|
if (args.options.force) {
|
|
@@ -38,10 +41,17 @@ class SpoStorageEntityRemoveCommand extends SpoCommand {
|
|
|
38
41
|
}
|
|
39
42
|
}
|
|
40
43
|
async removeTenantProperty(logger, args) {
|
|
41
|
-
if (this.verbose) {
|
|
42
|
-
await logger.logToStderr(`Removing tenant property ${args.options.key} from ${args.options.appCatalogUrl}...`);
|
|
43
|
-
}
|
|
44
44
|
try {
|
|
45
|
+
let appCatalogUrl = args.options.appCatalogUrl;
|
|
46
|
+
if (!appCatalogUrl) {
|
|
47
|
+
appCatalogUrl = await spo.getTenantAppCatalogUrl(logger, this.debug);
|
|
48
|
+
if (!appCatalogUrl) {
|
|
49
|
+
throw 'Tenant app catalog URL not found. Specify the URL of the app catalog site using the appCatalogUrl option.';
|
|
50
|
+
}
|
|
51
|
+
}
|
|
52
|
+
if (this.verbose) {
|
|
53
|
+
await logger.logToStderr(`Removing tenant property ${args.options.key} from ${appCatalogUrl}...`);
|
|
54
|
+
}
|
|
45
55
|
const spoAdminUrl = await spo.getSpoAdminUrl(logger, this.debug);
|
|
46
56
|
const digestInfo = await spo.getRequestDigest(spoAdminUrl);
|
|
47
57
|
const requestOptions = {
|
|
@@ -49,7 +59,7 @@ class SpoStorageEntityRemoveCommand extends SpoCommand {
|
|
|
49
59
|
headers: {
|
|
50
60
|
'X-RequestDigest': digestInfo.FormDigestValue
|
|
51
61
|
},
|
|
52
|
-
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="31" ObjectPathId="30" /><ObjectPath Id="33" ObjectPathId="32" /><ObjectPath Id="35" ObjectPathId="34" /><Method Name="RemoveStorageEntity" Id="36" ObjectPathId="34"><Parameters><Parameter Type="String">${formatting.escapeXml(args.options.key)}</Parameter></Parameters></Method></Actions><ObjectPaths><Constructor Id="30" TypeId="{268004ae-ef6b-4e9b-8425-127220d84719}" /><Method Id="32" ParentId="30" Name="GetSiteByUrl"><Parameters><Parameter Type="String">${formatting.escapeXml(
|
|
62
|
+
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="31" ObjectPathId="30" /><ObjectPath Id="33" ObjectPathId="32" /><ObjectPath Id="35" ObjectPathId="34" /><Method Name="RemoveStorageEntity" Id="36" ObjectPathId="34"><Parameters><Parameter Type="String">${formatting.escapeXml(args.options.key)}</Parameter></Parameters></Method></Actions><ObjectPaths><Constructor Id="30" TypeId="{268004ae-ef6b-4e9b-8425-127220d84719}" /><Method Id="32" ParentId="30" Name="GetSiteByUrl"><Parameters><Parameter Type="String">${formatting.escapeXml(appCatalogUrl)}</Parameter></Parameters></Method><Property Id="34" ParentId="32" Name="RootWeb" /></ObjectPaths></Request>`
|
|
53
63
|
};
|
|
54
64
|
const processQuery = await request.post(requestOptions);
|
|
55
65
|
const json = JSON.parse(processQuery);
|
|
@@ -63,22 +73,5 @@ class SpoStorageEntityRemoveCommand extends SpoCommand {
|
|
|
63
73
|
}
|
|
64
74
|
}
|
|
65
75
|
}
|
|
66
|
-
_SpoStorageEntityRemoveCommand_instances = new WeakSet(), _SpoStorageEntityRemoveCommand_initTelemetry = function _SpoStorageEntityRemoveCommand_initTelemetry() {
|
|
67
|
-
this.telemetry.push((args) => {
|
|
68
|
-
Object.assign(this.telemetryProperties, {
|
|
69
|
-
force: (!(!args.options.force)).toString()
|
|
70
|
-
});
|
|
71
|
-
});
|
|
72
|
-
}, _SpoStorageEntityRemoveCommand_initOptions = function _SpoStorageEntityRemoveCommand_initOptions() {
|
|
73
|
-
this.options.unshift({
|
|
74
|
-
option: '-u, --appCatalogUrl <appCatalogUrl>'
|
|
75
|
-
}, {
|
|
76
|
-
option: '-k, --key <key>'
|
|
77
|
-
}, {
|
|
78
|
-
option: '-f, --force'
|
|
79
|
-
});
|
|
80
|
-
}, _SpoStorageEntityRemoveCommand_initValidators = function _SpoStorageEntityRemoveCommand_initValidators() {
|
|
81
|
-
this.validators.push(async (args) => validation.isValidSharePointUrl(args.options.appCatalogUrl));
|
|
82
|
-
};
|
|
83
76
|
export default new SpoStorageEntityRemoveCommand();
|
|
84
77
|
//# sourceMappingURL=storageentity-remove.js.map
|
|
@@ -1,16 +1,25 @@
|
|
|
1
|
-
|
|
2
|
-
if (kind === "a" && !f) throw new TypeError("Private accessor was defined without a getter");
|
|
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
|
-
return kind === "m" ? f : kind === "a" ? f.call(receiver) : f ? f.value : state.get(receiver);
|
|
5
|
-
};
|
|
6
|
-
var _SpoStorageEntitySetCommand_instances, _SpoStorageEntitySetCommand_initTelemetry, _SpoStorageEntitySetCommand_initOptions, _SpoStorageEntitySetCommand_initValidators;
|
|
1
|
+
import { z } from 'zod';
|
|
7
2
|
import config from '../../../../config.js';
|
|
3
|
+
import { globalOptionsZod } from '../../../../Command.js';
|
|
8
4
|
import request from '../../../../request.js';
|
|
9
5
|
import { formatting } from '../../../../utils/formatting.js';
|
|
10
6
|
import { spo } from '../../../../utils/spo.js';
|
|
11
7
|
import { validation } from '../../../../utils/validation.js';
|
|
12
8
|
import SpoCommand from '../../../base/SpoCommand.js';
|
|
13
9
|
import commands from '../../commands.js';
|
|
10
|
+
export const options = z.strictObject({
|
|
11
|
+
...globalOptionsZod.shape,
|
|
12
|
+
appCatalogUrl: z.string()
|
|
13
|
+
.refine(url => validation.isValidSharePointUrl(url) === true, {
|
|
14
|
+
error: e => `'${e.input}' is not a valid SharePoint Online site URL.`
|
|
15
|
+
})
|
|
16
|
+
.optional()
|
|
17
|
+
.alias('u'),
|
|
18
|
+
key: z.string().alias('k'),
|
|
19
|
+
value: z.string().alias('v'),
|
|
20
|
+
description: z.string().optional().alias('d'),
|
|
21
|
+
comment: z.string().optional().alias('c')
|
|
22
|
+
});
|
|
14
23
|
class SpoStorageEntitySetCommand extends SpoCommand {
|
|
15
24
|
get name() {
|
|
16
25
|
return commands.STORAGEENTITY_SET;
|
|
@@ -18,26 +27,29 @@ class SpoStorageEntitySetCommand extends SpoCommand {
|
|
|
18
27
|
get description() {
|
|
19
28
|
return 'Sets tenant property on the specified SharePoint Online app catalog';
|
|
20
29
|
}
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
_SpoStorageEntitySetCommand_instances.add(this);
|
|
24
|
-
__classPrivateFieldGet(this, _SpoStorageEntitySetCommand_instances, "m", _SpoStorageEntitySetCommand_initTelemetry).call(this);
|
|
25
|
-
__classPrivateFieldGet(this, _SpoStorageEntitySetCommand_instances, "m", _SpoStorageEntitySetCommand_initOptions).call(this);
|
|
26
|
-
__classPrivateFieldGet(this, _SpoStorageEntitySetCommand_instances, "m", _SpoStorageEntitySetCommand_initValidators).call(this);
|
|
30
|
+
get schema() {
|
|
31
|
+
return options;
|
|
27
32
|
}
|
|
28
33
|
async commandAction(logger, args) {
|
|
29
34
|
try {
|
|
35
|
+
let appCatalogUrl = args.options.appCatalogUrl;
|
|
36
|
+
if (!appCatalogUrl) {
|
|
37
|
+
appCatalogUrl = await spo.getTenantAppCatalogUrl(logger, this.debug);
|
|
38
|
+
if (!appCatalogUrl) {
|
|
39
|
+
throw 'Tenant app catalog URL not found. Specify the URL of the app catalog site using the appCatalogUrl option.';
|
|
40
|
+
}
|
|
41
|
+
}
|
|
30
42
|
const spoAdminUrl = await spo.getSpoAdminUrl(logger, this.debug);
|
|
31
43
|
const res = await spo.getRequestDigest(spoAdminUrl);
|
|
32
44
|
if (this.verbose) {
|
|
33
|
-
await logger.logToStderr(`Setting tenant property ${args.options.key} in ${
|
|
45
|
+
await logger.logToStderr(`Setting tenant property ${args.options.key} in ${appCatalogUrl}...`);
|
|
34
46
|
}
|
|
35
47
|
const requestOptions = {
|
|
36
48
|
url: `${spoAdminUrl}/_vti_bin/client.svc/ProcessQuery`,
|
|
37
49
|
headers: {
|
|
38
50
|
'X-RequestDigest': res.FormDigestValue
|
|
39
51
|
},
|
|
40
|
-
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="24" ObjectPathId="23" /><ObjectPath Id="26" ObjectPathId="25" /><ObjectPath Id="28" ObjectPathId="27" /><Method Name="SetStorageEntity" Id="29" ObjectPathId="27"><Parameters><Parameter Type="String">${formatting.escapeXml(args.options.key)}</Parameter><Parameter Type="String">${formatting.escapeXml(args.options.value)}</Parameter><Parameter Type="String">${formatting.escapeXml(args.options.description || '')}</Parameter><Parameter Type="String">${formatting.escapeXml(args.options.comment || '')}</Parameter></Parameters></Method></Actions><ObjectPaths><Constructor Id="23" TypeId="{268004ae-ef6b-4e9b-8425-127220d84719}" /><Method Id="25" ParentId="23" Name="GetSiteByUrl"><Parameters><Parameter Type="String">${formatting.escapeXml(
|
|
52
|
+
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="24" ObjectPathId="23" /><ObjectPath Id="26" ObjectPathId="25" /><ObjectPath Id="28" ObjectPathId="27" /><Method Name="SetStorageEntity" Id="29" ObjectPathId="27"><Parameters><Parameter Type="String">${formatting.escapeXml(args.options.key)}</Parameter><Parameter Type="String">${formatting.escapeXml(args.options.value)}</Parameter><Parameter Type="String">${formatting.escapeXml(args.options.description || '')}</Parameter><Parameter Type="String">${formatting.escapeXml(args.options.comment || '')}</Parameter></Parameters></Method></Actions><ObjectPaths><Constructor Id="23" TypeId="{268004ae-ef6b-4e9b-8425-127220d84719}" /><Method Id="25" ParentId="23" Name="GetSiteByUrl"><Parameters><Parameter Type="String">${formatting.escapeXml(appCatalogUrl)}</Parameter></Parameters></Method><Property Id="27" ParentId="25" Name="RootWeb" /></ObjectPaths></Request>`
|
|
41
53
|
};
|
|
42
54
|
const processQuery = await request.post(requestOptions);
|
|
43
55
|
const json = JSON.parse(processQuery);
|
|
@@ -56,27 +68,5 @@ class SpoStorageEntitySetCommand extends SpoCommand {
|
|
|
56
68
|
}
|
|
57
69
|
}
|
|
58
70
|
}
|
|
59
|
-
_SpoStorageEntitySetCommand_instances = new WeakSet(), _SpoStorageEntitySetCommand_initTelemetry = function _SpoStorageEntitySetCommand_initTelemetry() {
|
|
60
|
-
this.telemetry.push((args) => {
|
|
61
|
-
Object.assign(this.telemetryProperties, {
|
|
62
|
-
description: (!(!args.options.description)).toString(),
|
|
63
|
-
comment: (!(!args.options.comment)).toString()
|
|
64
|
-
});
|
|
65
|
-
});
|
|
66
|
-
}, _SpoStorageEntitySetCommand_initOptions = function _SpoStorageEntitySetCommand_initOptions() {
|
|
67
|
-
this.options.unshift({
|
|
68
|
-
option: '-u, --appCatalogUrl <appCatalogUrl>'
|
|
69
|
-
}, {
|
|
70
|
-
option: '-k, --key <key>'
|
|
71
|
-
}, {
|
|
72
|
-
option: '-v, --value <value>'
|
|
73
|
-
}, {
|
|
74
|
-
option: '-d, --description [description]'
|
|
75
|
-
}, {
|
|
76
|
-
option: '-c, --comment [comment]'
|
|
77
|
-
});
|
|
78
|
-
}, _SpoStorageEntitySetCommand_initValidators = function _SpoStorageEntitySetCommand_initValidators() {
|
|
79
|
-
this.validators.push(async (args) => validation.isValidSharePointUrl(args.options.appCatalogUrl));
|
|
80
|
-
};
|
|
81
71
|
export default new SpoStorageEntitySetCommand();
|
|
82
72
|
//# sourceMappingURL=storageentity-set.js.map
|
|
@@ -4,8 +4,8 @@ var __classPrivateFieldGet = (this && this.__classPrivateFieldGet) || function (
|
|
|
4
4
|
return kind === "m" ? f : kind === "a" ? f.call(receiver) : f ? f.value : state.get(receiver);
|
|
5
5
|
};
|
|
6
6
|
var _TeamsChannelListCommand_instances, _TeamsChannelListCommand_initTelemetry, _TeamsChannelListCommand_initOptions, _TeamsChannelListCommand_initValidators, _TeamsChannelListCommand_initOptionSets;
|
|
7
|
-
import { entraGroup } from '../../../../utils/entraGroup.js';
|
|
8
7
|
import { odata } from '../../../../utils/odata.js';
|
|
8
|
+
import { teams } from '../../../../utils/teams.js';
|
|
9
9
|
import { validation } from '../../../../utils/validation.js';
|
|
10
10
|
import GraphCommand from '../../../base/GraphCommand.js';
|
|
11
11
|
import commands from '../../commands.js';
|
|
@@ -31,11 +31,7 @@ class TeamsChannelListCommand extends GraphCommand {
|
|
|
31
31
|
if (args.options.teamId) {
|
|
32
32
|
return args.options.teamId;
|
|
33
33
|
}
|
|
34
|
-
|
|
35
|
-
if (group.resourceProvisioningOptions.indexOf('Team') === -1) {
|
|
36
|
-
throw 'The specified team does not exist in the Microsoft Teams';
|
|
37
|
-
}
|
|
38
|
-
return group.id;
|
|
34
|
+
return teams.getTeamIdByDisplayName(args.options.teamName);
|
|
39
35
|
}
|
|
40
36
|
async commandAction(logger, args) {
|
|
41
37
|
try {
|
|
@@ -5,8 +5,8 @@ var __classPrivateFieldGet = (this && this.__classPrivateFieldGet) || function (
|
|
|
5
5
|
};
|
|
6
6
|
var _TeamsChannelMemberAddCommand_instances, _TeamsChannelMemberAddCommand_initTelemetry, _TeamsChannelMemberAddCommand_initOptions, _TeamsChannelMemberAddCommand_initValidators, _TeamsChannelMemberAddCommand_initOptionSets;
|
|
7
7
|
import request from '../../../../request.js';
|
|
8
|
-
import { entraGroup } from '../../../../utils/entraGroup.js';
|
|
9
8
|
import { formatting } from '../../../../utils/formatting.js';
|
|
9
|
+
import { teams } from '../../../../utils/teams.js';
|
|
10
10
|
import { validation } from '../../../../utils/validation.js';
|
|
11
11
|
import GraphCommand from '../../../base/GraphCommand.js';
|
|
12
12
|
import commands from '../../commands.js';
|
|
@@ -63,11 +63,7 @@ class TeamsChannelMemberAddCommand extends GraphCommand {
|
|
|
63
63
|
if (args.options.teamId) {
|
|
64
64
|
return args.options.teamId;
|
|
65
65
|
}
|
|
66
|
-
|
|
67
|
-
if (group.resourceProvisioningOptions.indexOf('Team') === -1) {
|
|
68
|
-
throw 'The specified team does not exist in the Microsoft Teams';
|
|
69
|
-
}
|
|
70
|
-
return group.id;
|
|
66
|
+
return teams.getTeamIdByDisplayName(args.options.teamName);
|
|
71
67
|
}
|
|
72
68
|
async getChannelId(teamId, args) {
|
|
73
69
|
if (args.options.channelId) {
|
|
@@ -5,9 +5,9 @@ var __classPrivateFieldGet = (this && this.__classPrivateFieldGet) || function (
|
|
|
5
5
|
};
|
|
6
6
|
var _TeamsChannelMemberListCommand_instances, _TeamsChannelMemberListCommand_initTelemetry, _TeamsChannelMemberListCommand_initOptions, _TeamsChannelMemberListCommand_initValidators, _TeamsChannelMemberListCommand_initOptionSets;
|
|
7
7
|
import request from '../../../../request.js';
|
|
8
|
-
import { entraGroup } from '../../../../utils/entraGroup.js';
|
|
9
8
|
import { formatting } from '../../../../utils/formatting.js';
|
|
10
9
|
import { odata } from '../../../../utils/odata.js';
|
|
10
|
+
import { teams } from '../../../../utils/teams.js';
|
|
11
11
|
import { validation } from '../../../../utils/validation.js';
|
|
12
12
|
import GraphCommand from '../../../base/GraphCommand.js';
|
|
13
13
|
import commands from '../../commands.js';
|
|
@@ -55,11 +55,7 @@ class TeamsChannelMemberListCommand extends GraphCommand {
|
|
|
55
55
|
if (args.options.teamId) {
|
|
56
56
|
return args.options.teamId;
|
|
57
57
|
}
|
|
58
|
-
|
|
59
|
-
if (group.resourceProvisioningOptions.indexOf('Team') === -1) {
|
|
60
|
-
throw 'The specified team does not exist in the Microsoft Teams';
|
|
61
|
-
}
|
|
62
|
-
return group.id;
|
|
58
|
+
return teams.getTeamIdByDisplayName(args.options.teamName);
|
|
63
59
|
}
|
|
64
60
|
async getChannelId(args) {
|
|
65
61
|
if (args.options.channelId) {
|
|
@@ -6,8 +6,8 @@ var __classPrivateFieldGet = (this && this.__classPrivateFieldGet) || function (
|
|
|
6
6
|
var _TeamsChannelMemberRemoveCommand_instances, _TeamsChannelMemberRemoveCommand_initTelemetry, _TeamsChannelMemberRemoveCommand_initOptions, _TeamsChannelMemberRemoveCommand_initValidators, _TeamsChannelMemberRemoveCommand_initOptionSets;
|
|
7
7
|
import { cli } from '../../../../cli/cli.js';
|
|
8
8
|
import request from '../../../../request.js';
|
|
9
|
-
import { entraGroup } from '../../../../utils/entraGroup.js';
|
|
10
9
|
import { formatting } from '../../../../utils/formatting.js';
|
|
10
|
+
import { teams } from '../../../../utils/teams.js';
|
|
11
11
|
import { validation } from '../../../../utils/validation.js';
|
|
12
12
|
import GraphCommand from '../../../base/GraphCommand.js';
|
|
13
13
|
import commands from '../../commands.js';
|
|
@@ -72,11 +72,7 @@ class TeamsChannelMemberRemoveCommand extends GraphCommand {
|
|
|
72
72
|
if (args.options.teamId) {
|
|
73
73
|
return args.options.teamId;
|
|
74
74
|
}
|
|
75
|
-
|
|
76
|
-
if (group.resourceProvisioningOptions.indexOf('Team') === -1) {
|
|
77
|
-
throw 'The specified team does not exist in the Microsoft Teams';
|
|
78
|
-
}
|
|
79
|
-
return group.id;
|
|
75
|
+
return teams.getTeamIdByDisplayName(args.options.teamName);
|
|
80
76
|
}
|
|
81
77
|
async getChannelId(args) {
|
|
82
78
|
if (args.options.channelId) {
|
|
@@ -5,8 +5,8 @@ var __classPrivateFieldGet = (this && this.__classPrivateFieldGet) || function (
|
|
|
5
5
|
};
|
|
6
6
|
var _TeamsChannelMemberSetCommand_instances, _TeamsChannelMemberSetCommand_initTelemetry, _TeamsChannelMemberSetCommand_initOptions, _TeamsChannelMemberSetCommand_initValidators, _TeamsChannelMemberSetCommand_initOptionSets;
|
|
7
7
|
import request from '../../../../request.js';
|
|
8
|
-
import { entraGroup } from '../../../../utils/entraGroup.js';
|
|
9
8
|
import { formatting } from '../../../../utils/formatting.js';
|
|
9
|
+
import { teams } from '../../../../utils/teams.js';
|
|
10
10
|
import { validation } from '../../../../utils/validation.js';
|
|
11
11
|
import GraphCommand from '../../../base/GraphCommand.js';
|
|
12
12
|
import commands from '../../commands.js';
|
|
@@ -56,11 +56,7 @@ class TeamsChannelMemberSetCommand extends GraphCommand {
|
|
|
56
56
|
if (args.options.teamId) {
|
|
57
57
|
return args.options.teamId;
|
|
58
58
|
}
|
|
59
|
-
|
|
60
|
-
if (group.resourceProvisioningOptions.indexOf('Team') === -1) {
|
|
61
|
-
throw `The specified team does not exist in the Microsoft Teams`;
|
|
62
|
-
}
|
|
63
|
-
return group.id;
|
|
59
|
+
return teams.getTeamIdByDisplayName(args.options.teamName);
|
|
64
60
|
}
|
|
65
61
|
async getChannelId(args) {
|
|
66
62
|
if (args.options.channelId) {
|
|
@@ -6,8 +6,8 @@ var __classPrivateFieldGet = (this && this.__classPrivateFieldGet) || function (
|
|
|
6
6
|
var _TeamsChannelRemoveCommand_instances, _TeamsChannelRemoveCommand_initTelemetry, _TeamsChannelRemoveCommand_initOptions, _TeamsChannelRemoveCommand_initValidators, _TeamsChannelRemoveCommand_initOptionSets;
|
|
7
7
|
import { cli } from '../../../../cli/cli.js';
|
|
8
8
|
import request from '../../../../request.js';
|
|
9
|
-
import { entraGroup } from '../../../../utils/entraGroup.js';
|
|
10
9
|
import { formatting } from '../../../../utils/formatting.js';
|
|
10
|
+
import { teams } from '../../../../utils/teams.js';
|
|
11
11
|
import { validation } from '../../../../utils/validation.js';
|
|
12
12
|
import GraphCommand from '../../../base/GraphCommand.js';
|
|
13
13
|
import commands from '../../commands.js';
|
|
@@ -63,13 +63,7 @@ class TeamsChannelRemoveCommand extends GraphCommand {
|
|
|
63
63
|
if (args.options.teamId) {
|
|
64
64
|
return args.options.teamId;
|
|
65
65
|
}
|
|
66
|
-
|
|
67
|
-
if (group.resourceProvisioningOptions.indexOf('Team') === -1) {
|
|
68
|
-
throw 'The specified team does not exist';
|
|
69
|
-
}
|
|
70
|
-
else {
|
|
71
|
-
return group.id;
|
|
72
|
-
}
|
|
66
|
+
return teams.getTeamIdByDisplayName(args.options.teamName);
|
|
73
67
|
}
|
|
74
68
|
async getChannelId(args) {
|
|
75
69
|
if (args.options.id) {
|
|
@@ -5,8 +5,8 @@ var __classPrivateFieldGet = (this && this.__classPrivateFieldGet) || function (
|
|
|
5
5
|
};
|
|
6
6
|
var _TeamsChannelSetCommand_instances, _TeamsChannelSetCommand_initTelemetry, _TeamsChannelSetCommand_initOptions, _TeamsChannelSetCommand_initValidators, _TeamsChannelSetCommand_initOptionSets;
|
|
7
7
|
import request from '../../../../request.js';
|
|
8
|
-
import { entraGroup } from '../../../../utils/entraGroup.js';
|
|
9
8
|
import { formatting } from '../../../../utils/formatting.js';
|
|
9
|
+
import { teams } from '../../../../utils/teams.js';
|
|
10
10
|
import { validation } from '../../../../utils/validation.js';
|
|
11
11
|
import GraphCommand from '../../../base/GraphCommand.js';
|
|
12
12
|
import commands from '../../commands.js';
|
|
@@ -58,13 +58,7 @@ class TeamsChannelSetCommand extends GraphCommand {
|
|
|
58
58
|
if (args.options.teamId) {
|
|
59
59
|
return args.options.teamId;
|
|
60
60
|
}
|
|
61
|
-
|
|
62
|
-
if (group.resourceProvisioningOptions.indexOf('Team') === -1) {
|
|
63
|
-
throw 'The specified team does not exist';
|
|
64
|
-
}
|
|
65
|
-
else {
|
|
66
|
-
return group.id;
|
|
67
|
-
}
|
|
61
|
+
return teams.getTeamIdByDisplayName(args.options.teamName);
|
|
68
62
|
}
|
|
69
63
|
async getChannelId(teamId, args) {
|
|
70
64
|
if (args.options.id) {
|
|
@@ -5,8 +5,8 @@ var __classPrivateFieldGet = (this && this.__classPrivateFieldGet) || function (
|
|
|
5
5
|
};
|
|
6
6
|
var _TeamsTabGetCommand_instances, _TeamsTabGetCommand_initTelemetry, _TeamsTabGetCommand_initOptions, _TeamsTabGetCommand_initValidators, _TeamsTabGetCommand_initOptionSets;
|
|
7
7
|
import request from '../../../../request.js';
|
|
8
|
-
import { entraGroup } from '../../../../utils/entraGroup.js';
|
|
9
8
|
import { formatting } from '../../../../utils/formatting.js';
|
|
9
|
+
import { teams } from '../../../../utils/teams.js';
|
|
10
10
|
import { validation } from '../../../../utils/validation.js';
|
|
11
11
|
import GraphCommand from '../../../base/GraphCommand.js';
|
|
12
12
|
import commands from '../../commands.js';
|
|
@@ -31,11 +31,7 @@ class TeamsTabGetCommand extends GraphCommand {
|
|
|
31
31
|
if (args.options.teamId) {
|
|
32
32
|
return args.options.teamId;
|
|
33
33
|
}
|
|
34
|
-
|
|
35
|
-
if (group.resourceProvisioningOptions.indexOf('Team') === -1) {
|
|
36
|
-
throw 'The specified team does not exist in the Microsoft Teams';
|
|
37
|
-
}
|
|
38
|
-
return group.id;
|
|
34
|
+
return teams.getTeamIdByDisplayName(args.options.teamName);
|
|
39
35
|
}
|
|
40
36
|
async getChannelId(args) {
|
|
41
37
|
if (args.options.channelId) {
|
|
@@ -5,8 +5,8 @@ var __classPrivateFieldGet = (this && this.__classPrivateFieldGet) || function (
|
|
|
5
5
|
};
|
|
6
6
|
var _TeamsTeamArchiveCommand_instances, _TeamsTeamArchiveCommand_initTelemetry, _TeamsTeamArchiveCommand_initOptions, _TeamsTeamArchiveCommand_initValidators, _TeamsTeamArchiveCommand_initOptionSets;
|
|
7
7
|
import request from '../../../../request.js';
|
|
8
|
-
import { entraGroup } from '../../../../utils/entraGroup.js';
|
|
9
8
|
import { formatting } from '../../../../utils/formatting.js';
|
|
9
|
+
import { teams } from '../../../../utils/teams.js';
|
|
10
10
|
import { validation } from '../../../../utils/validation.js';
|
|
11
11
|
import GraphCommand from '../../../base/GraphCommand.js';
|
|
12
12
|
import commands from '../../commands.js';
|
|
@@ -29,11 +29,7 @@ class TeamsTeamArchiveCommand extends GraphCommand {
|
|
|
29
29
|
if (args.options.id) {
|
|
30
30
|
return args.options.id;
|
|
31
31
|
}
|
|
32
|
-
|
|
33
|
-
if (group.resourceProvisioningOptions.indexOf('Team') === -1) {
|
|
34
|
-
throw 'The specified team does not exist in the Microsoft Teams';
|
|
35
|
-
}
|
|
36
|
-
return group.id;
|
|
32
|
+
return teams.getTeamIdByDisplayName(args.options.name);
|
|
37
33
|
}
|
|
38
34
|
async commandAction(logger, args) {
|
|
39
35
|
const siteReadOnlyForMembers = args.options.shouldSetSpoSiteReadOnlyForMembers === true;
|
|
@@ -6,8 +6,8 @@ var __classPrivateFieldGet = (this && this.__classPrivateFieldGet) || function (
|
|
|
6
6
|
var _TeamsTeamRemoveCommand_instances, _TeamsTeamRemoveCommand_initTelemetry, _TeamsTeamRemoveCommand_initOptions, _TeamsTeamRemoveCommand_initValidators, _TeamsTeamRemoveCommand_initOptionSets;
|
|
7
7
|
import { cli } from '../../../../cli/cli.js';
|
|
8
8
|
import request from '../../../../request.js';
|
|
9
|
-
import { entraGroup } from '../../../../utils/entraGroup.js';
|
|
10
9
|
import { formatting } from '../../../../utils/formatting.js';
|
|
10
|
+
import { teams } from '../../../../utils/teams.js';
|
|
11
11
|
import { validation } from '../../../../utils/validation.js';
|
|
12
12
|
import GraphCommand from '../../../base/GraphCommand.js';
|
|
13
13
|
import commands from '../../commands.js';
|
|
@@ -30,11 +30,7 @@ class TeamsTeamRemoveCommand extends GraphCommand {
|
|
|
30
30
|
if (args.options.id) {
|
|
31
31
|
return args.options.id;
|
|
32
32
|
}
|
|
33
|
-
|
|
34
|
-
if (group.resourceProvisioningOptions.indexOf('Team') === -1) {
|
|
35
|
-
throw `The specified team does not exist in the Microsoft Teams`;
|
|
36
|
-
}
|
|
37
|
-
return group.id;
|
|
33
|
+
return teams.getTeamIdByDisplayName(args.options.name);
|
|
38
34
|
}
|
|
39
35
|
async commandAction(logger, args) {
|
|
40
36
|
const removeTeam = async () => {
|
|
@@ -5,8 +5,8 @@ var __classPrivateFieldGet = (this && this.__classPrivateFieldGet) || function (
|
|
|
5
5
|
};
|
|
6
6
|
var _TeamsTeamUnarchiveCommand_instances, _TeamsTeamUnarchiveCommand_initOptions, _TeamsTeamUnarchiveCommand_initValidators, _TeamsTeamUnarchiveCommand_initOptionSets;
|
|
7
7
|
import request from '../../../../request.js';
|
|
8
|
-
import { entraGroup } from '../../../../utils/entraGroup.js';
|
|
9
8
|
import { formatting } from '../../../../utils/formatting.js';
|
|
9
|
+
import { teams } from '../../../../utils/teams.js';
|
|
10
10
|
import { validation } from '../../../../utils/validation.js';
|
|
11
11
|
import GraphCommand from '../../../base/GraphCommand.js';
|
|
12
12
|
import commands from '../../commands.js';
|
|
@@ -28,11 +28,7 @@ class TeamsTeamUnarchiveCommand extends GraphCommand {
|
|
|
28
28
|
if (args.options.id) {
|
|
29
29
|
return args.options.id;
|
|
30
30
|
}
|
|
31
|
-
|
|
32
|
-
if (group.resourceProvisioningOptions.indexOf('Team') === -1) {
|
|
33
|
-
throw 'The specified team does not exist in the Microsoft Teams';
|
|
34
|
-
}
|
|
35
|
-
return group.id;
|
|
31
|
+
return teams.getTeamIdByDisplayName(args.options.name);
|
|
36
32
|
}
|
|
37
33
|
async commandAction(logger, args) {
|
|
38
34
|
const endpoint = `${this.resource}/v1.0`;
|
|
@@ -82,7 +82,7 @@ This command will only return a response if the content type is added to the sit
|
|
|
82
82
|
|
|
83
83
|
```json
|
|
84
84
|
{
|
|
85
|
-
"@odata.context": "https://
|
|
85
|
+
"@odata.context": "https://contoso.sharepoint.com/_api/v2.0/$metadata#contentType",
|
|
86
86
|
"@odata.type": "#microsoft.graph.contentType",
|
|
87
87
|
"@odata.etag": "\"2\"",
|
|
88
88
|
"id": "0x0101003D510887202C894AB7CD88CCE011519D",
|
|
@@ -110,7 +110,7 @@ This command will only return a response if the content type is added to the sit
|
|
|
110
110
|
<TabItem value="Text">
|
|
111
111
|
|
|
112
112
|
```text
|
|
113
|
-
@odata.context: https://
|
|
113
|
+
@odata.context: https://contoso.sharepoint.com/_api/v2.0/$metadata#contentType
|
|
114
114
|
@odata.etag : "2"
|
|
115
115
|
@odata.type : #microsoft.graph.contentType
|
|
116
116
|
base : {"id":"0x0101","description":"Create a new document.","group":"Document Content Types","hidden":false,"name":"Document","readOnly":false,"sealed":false}
|
|
@@ -130,7 +130,7 @@ This command will only return a response if the content type is added to the sit
|
|
|
130
130
|
|
|
131
131
|
```csv
|
|
132
132
|
@odata.context,@odata.type,@odata.etag,id,isBuiltIn,description,group,hidden,name,parentId,readOnly,sealed
|
|
133
|
-
https://
|
|
133
|
+
https://contoso.sharepoint.com/_api/v2.0/$metadata#contentType,#microsoft.graph.contentType,"""2""",0x010100F4ACBE99F2DBDE42B0487A561A40F9EE,,,Custom Content Types,,Dummy,0x0101,1,
|
|
134
134
|
```
|
|
135
135
|
|
|
136
136
|
</TabItem>
|
|
@@ -145,7 +145,7 @@ This command will only return a response if the content type is added to the sit
|
|
|
145
145
|
|
|
146
146
|
Property | Value
|
|
147
147
|
---------|-------
|
|
148
|
-
@odata.context | https://
|
|
148
|
+
@odata.context | https://contoso.sharepoint.com/_api/v2.0/$metadata#contentType
|
|
149
149
|
@odata.type | #microsoft.graph.contentType
|
|
150
150
|
@odata.etag | "2"
|
|
151
151
|
id | 0x010100F4ACBE99F2DBDE42B0487A561A40F9EE
|
|
@@ -30,8 +30,8 @@ m365 spo file add [options]
|
|
|
30
30
|
`--checkOut [checkOut]`
|
|
31
31
|
: If versioning is enabled, this will check out the file first if it exists, upload the file, then check it in again.
|
|
32
32
|
|
|
33
|
-
`--overwrite
|
|
34
|
-
: Overwrite the file if it already exists in the target folder.
|
|
33
|
+
`--overwrite`
|
|
34
|
+
: Overwrite the file if it already exists in the target folder.
|
|
35
35
|
|
|
36
36
|
`--fileName [fileName]`
|
|
37
37
|
: The name of the file in SharePoint after upload. If not specified, the name of the uploaded file will be used.
|