@pnp/cli-microsoft365 12.0.0-beta.1752794 → 12.0.0-beta.235caf5
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/Auth.js +19 -2
- package/dist/cli/cli.js +3 -0
- package/dist/config.js +1 -0
- package/dist/m365/cli/commands/cli-consent.js +9 -2
- package/dist/m365/entra/commands/agent/agent-blueprint-list.js +52 -0
- package/dist/m365/entra/commands/m365group/m365group-add.js +52 -97
- package/dist/m365/entra/commands/m365group/m365group-conversation-list.js +20 -33
- package/dist/m365/entra/commands/m365group/m365group-conversation-post-list.js +20 -39
- package/dist/m365/entra/commands/m365group/m365group-get.js +20 -41
- package/dist/m365/entra/commands/m365group/m365group-list.js +11 -31
- package/dist/m365/entra/commands/m365group/m365group-recyclebinitem-clear.js +8 -22
- package/dist/m365/entra/commands/m365group/m365group-recyclebinitem-list.js +9 -25
- package/dist/m365/entra/commands/m365group/m365group-recyclebinitem-remove.js +21 -43
- package/dist/m365/entra/commands/m365group/m365group-recyclebinitem-restore.js +21 -41
- package/dist/m365/entra/commands/m365group/m365group-remove.js +25 -46
- package/dist/m365/entra/commands/m365group/m365group-renew.js +19 -32
- package/dist/m365/entra/commands/m365group/m365group-set.js +86 -141
- package/dist/m365/entra/commands/m365group/m365group-teamify.js +20 -43
- package/dist/m365/entra/commands/m365group/m365group-user-add.js +44 -77
- package/dist/m365/entra/commands/m365group/m365group-user-list.js +28 -55
- package/dist/m365/entra/commands/m365group/m365group-user-remove.js +37 -74
- package/dist/m365/entra/commands/m365group/m365group-user-set.js +45 -77
- package/dist/m365/entra/commands.js +1 -0
- package/dist/m365/graph/commands/schemaextension/schemaextension-list.js +14 -16
- package/dist/m365/outlook/commands/calendargroup/calendargroup-add.js +97 -0
- package/dist/m365/outlook/commands/event/event-add.js +324 -0
- package/dist/m365/outlook/commands.js +2 -0
- package/dist/m365/spe/commands/container/container-permission-add.js +114 -0
- package/dist/m365/spe/commands/container/container-permission-remove.js +94 -0
- package/dist/m365/spe/commands/container/container-permission-set.js +90 -0
- package/dist/m365/spe/commands.js +3 -0
- package/dist/m365/spfx/commands/SpfxCompatibilityMatrix.js +15 -0
- package/dist/m365/spfx/commands/project/project-doctor/doctor-1.24.0.js +19 -0
- package/dist/m365/spfx/commands/project/project-doctor.js +2 -1
- package/dist/m365/spfx/commands/project/project-upgrade/rules/FN012021_TSC_excludeDirectories.js +43 -0
- package/dist/m365/spfx/commands/project/project-upgrade/rules/FN027002_OVERRIDES_qs.js +33 -0
- package/dist/m365/spfx/commands/project/project-upgrade/rules/FN027003_OVERRIDES_uuid.js +33 -0
- package/dist/m365/spfx/commands/project/project-upgrade/upgrade-1.24.0.js +77 -0
- package/dist/m365/spfx/commands/project/project-upgrade.js +2 -1
- package/dist/m365/spo/commands/commandset/commandset-add.js +17 -59
- package/dist/m365/spo/commands/commandset/commandset-get.js +24 -62
- package/dist/m365/spo/commands/commandset/commandset-list.js +11 -34
- package/dist/m365/spo/commands/commandset/commandset-remove.js +21 -54
- package/dist/m365/spo/commands/commandset/commandset-set.js +30 -83
- package/dist/m365/spo/commands/contenttype/contenttype-add.js +22 -51
- package/dist/m365/spo/commands/contenttype/contenttype-field-list.js +38 -62
- package/dist/m365/spo/commands/contenttype/contenttype-field-remove.js +25 -54
- package/dist/m365/spo/commands/contenttype/contenttype-field-set.js +20 -43
- package/dist/m365/spo/commands/contenttype/contenttype-get.js +29 -54
- package/dist/m365/spo/commands/contenttype/contenttype-list.js +13 -30
- package/dist/m365/spo/commands/contenttype/contenttype-remove.js +24 -39
- package/dist/m365/spo/commands/contenttype/contenttype-set.js +42 -63
- package/dist/m365/spo/commands/contenttype/contenttype-sync.js +37 -59
- package/dist/m365/spo/commands/contenttypehub/contenttypehub-get.js +5 -0
- package/dist/m365/spo/commands/customaction/customaction-add.js +124 -145
- package/dist/m365/spo/commands/customaction/customaction-clear.js +12 -43
- package/dist/m365/spo/commands/customaction/customaction-get.js +28 -59
- package/dist/m365/spo/commands/customaction/customaction-list.js +12 -42
- package/dist/m365/spo/commands/customaction/customaction-remove.js +26 -54
- package/dist/m365/spo/commands/customaction/customaction-set.js +75 -132
- package/dist/m365/spo/commands/externaluser/externaluser-list.js +5 -14
- package/dist/m365/spo/commands/knowledgehub/knowledgehub-get.js +5 -0
- package/dist/m365/spo/commands/knowledgehub/knowledgehub-remove.js +8 -22
- package/dist/m365/spo/commands/knowledgehub/knowledgehub-set.js +10 -18
- package/dist/m365/spo/commands/listitem/listitem-add.js +27 -55
- package/dist/m365/spo/commands/listitem/listitem-attachment-add.js +30 -58
- package/dist/m365/spo/commands/listitem/listitem-attachment-get.js +27 -52
- package/dist/m365/spo/commands/listitem/listitem-attachment-list.js +26 -50
- package/dist/m365/spo/commands/listitem/listitem-attachment-remove.js +28 -55
- package/dist/m365/spo/commands/listitem/listitem-attachment-set.js +30 -57
- package/dist/m365/spo/commands/listitem/listitem-batch-add.js +36 -58
- package/dist/m365/spo/commands/listitem/listitem-batch-remove.js +68 -92
- package/dist/m365/spo/commands/listitem/listitem-batch-set.js +37 -57
- package/dist/m365/spo/commands/listitem/listitem-get.js +45 -68
- package/dist/m365/spo/commands/listitem/listitem-isrecord.js +31 -55
- package/dist/m365/spo/commands/listitem/listitem-list.js +47 -81
- package/dist/m365/spo/commands/listitem/listitem-record-declare.js +37 -60
- package/dist/m365/spo/commands/listitem/listitem-record-lock.js +30 -52
- package/dist/m365/spo/commands/listitem/listitem-record-undeclare.js +31 -52
- package/dist/m365/spo/commands/listitem/listitem-record-unlock.js +30 -52
- package/dist/m365/spo/commands/listitem/listitem-remove.js +33 -61
- package/dist/m365/spo/commands/listitem/listitem-retentionlabel-ensure.js +46 -67
- package/dist/m365/spo/commands/listitem/listitem-retentionlabel-remove.js +33 -56
- package/dist/m365/spo/commands/listitem/listitem-roleassignment-add.js +55 -98
- package/dist/m365/spo/commands/listitem/listitem-roleassignment-remove.js +48 -74
- package/dist/m365/spo/commands/listitem/listitem-roleinheritance-break.js +33 -56
- package/dist/m365/spo/commands/listitem/listitem-roleinheritance-reset.js +31 -53
- package/dist/m365/spo/commands/listitem/listitem-set.js +33 -58
- package/dist/m365/spo/commands/navigation/navigation-node-add.js +74 -120
- package/dist/m365/spo/commands/navigation/navigation-node-get.js +4 -13
- package/dist/m365/spo/commands/navigation/navigation-node-list.js +1 -1
- package/dist/m365/spo/commands/navigation/navigation-node-remove.js +13 -47
- package/dist/m365/spo/commands/navigation/navigation-node-set.js +53 -114
- package/dist/m365/spo/commands/orgassetslibrary/orgassetslibrary-list.js +1 -1
- package/dist/m365/spo/commands/page/page-column-list.js +7 -8
- package/dist/m365/spo/commands/page/page-section-list.js +15 -17
- package/dist/m365/spo/commands/page/page-unpublish.js +53 -0
- package/dist/m365/spo/commands/sitescript/sitescript-add.js +22 -37
- package/dist/m365/spo/commands/sitescript/sitescript-get.js +9 -26
- package/dist/m365/spo/commands/sitescript/sitescript-list.js +5 -0
- package/dist/m365/spo/commands/sitescript/sitescript-remove.js +9 -33
- package/dist/m365/spo/commands/sitescript/sitescript-set.js +29 -56
- package/dist/m365/spo/commands/spo-search.js +43 -116
- package/dist/m365/spo/commands/tenant/tenant-applicationcustomizer-add.js +8 -1
- package/dist/m365/spo/commands/tenant/tenant-commandset-add.js +8 -1
- package/dist/m365/spo/commands/term/term-group-list.js +7 -8
- package/dist/m365/spo/commands/term/term-set-list.js +6 -9
- package/dist/m365/spo/commands.js +1 -0
- package/dist/m365/spp/commands/contentcenter/contentcenter-list.js +5 -0
- package/dist/m365/spp/commands/model/model-get.js +25 -45
- package/dist/m365/spp/commands/model/model-list.js +12 -23
- package/dist/m365/spp/commands/model/model-remove.js +25 -45
- package/dist/m365/teams/commands/app/app-install.js +35 -44
- package/dist/m365/teams/commands/app/app-list.js +8 -33
- package/dist/m365/teams/commands/app/app-publish.js +21 -27
- package/dist/m365/teams/commands/app/app-remove.js +22 -39
- package/dist/m365/teams/commands/app/app-uninstall.js +12 -34
- package/dist/m365/teams/commands/app/app-update.js +35 -45
- package/dist/m365/teams/commands/funsettings/funsettings-list.js +12 -23
- package/dist/m365/teams/commands/funsettings/funsettings-set.js +18 -54
- package/dist/m365/teams/commands/guestsettings/guestsettings-list.js +12 -23
- package/dist/m365/teams/commands/guestsettings/guestsettings-set.js +15 -40
- package/dist/m365/teams/commands/meeting/meeting-add.js +57 -68
- package/dist/m365/teams/commands/meeting/meeting-attendancereport-get.js +33 -58
- package/dist/m365/teams/commands/meeting/meeting-attendancereport-list.js +14 -38
- package/dist/m365/teams/commands/meeting/meeting-get.js +14 -38
- package/dist/m365/teams/commands/meeting/meeting-list.js +34 -59
- package/dist/m365/teams/commands/meeting/meeting-transcript-get.js +34 -58
- package/dist/m365/teams/commands/meeting/meeting-transcript-list.js +29 -50
- package/dist/m365/teams/commands/membersettings/membersettings-list.js +12 -23
- package/dist/m365/teams/commands/membersettings/membersettings-set.js +18 -49
- package/dist/m365/teams/commands/message/message-get.js +19 -30
- package/dist/m365/teams/commands/message/message-list.js +26 -43
- package/dist/m365/teams/commands/message/message-remove.js +43 -58
- package/dist/m365/teams/commands/message/message-reply-list.js +19 -30
- package/dist/m365/teams/commands/message/message-restore.js +40 -50
- package/dist/m365/teams/commands/message/message-send.js +19 -30
- package/dist/m365/teams/commands/messagingsettings/messagingsettings-list.js +12 -23
- package/dist/m365/teams/commands/messagingsettings/messagingsettings-set.js +18 -60
- package/dist/m365/teams/commands/report/report-deviceusagedistributionusercounts.js +10 -0
- package/dist/m365/teams/commands/report/report-deviceusageusercounts.js +10 -0
- package/dist/m365/teams/commands/report/report-deviceusageuserdetail.js +22 -0
- package/dist/m365/teams/commands/report/report-directroutingcalls.js +19 -39
- package/dist/m365/teams/commands/report/report-pstncalls.js +19 -39
- package/dist/m365/teams/commands/report/report-useractivitycounts.js +10 -0
- package/dist/m365/teams/commands/report/report-useractivityusercounts.js +10 -0
- package/dist/m365/teams/commands/report/report-useractivityuserdetail.js +22 -0
- package/dist/m365/teams/commands/tab/tab-add.js +23 -49
- package/dist/m365/teams/commands/tab/tab-get.js +55 -56
- package/dist/m365/teams/commands/tab/tab-list.js +17 -28
- package/dist/m365/teams/commands/tab/tab-remove.js +23 -42
- package/dist/m365/teams/commands/team/team-add.js +76 -114
- package/dist/m365/teams/commands/team/team-app-list.js +23 -36
- package/dist/m365/teams/commands/team/team-archive.js +24 -39
- package/dist/m365/teams/commands/team/team-clone.js +28 -62
- package/dist/m365/teams/commands/team/team-get.js +23 -36
- package/dist/m365/teams/commands/team/team-list.js +43 -57
- package/dist/m365/teams/commands/team/team-remove.js +24 -37
- package/dist/m365/teams/commands/team/team-set.js +23 -52
- package/dist/m365/teams/commands/team/team-unarchive.js +23 -28
- package/dist/m365/teams/commands/user/user-app-add.js +40 -49
- package/dist/m365/teams/commands/user/user-app-list.js +26 -39
- package/dist/m365/teams/commands/user/user-app-remove.js +37 -49
- package/dist/m365/teams/commands/user/user-app-upgrade.js +36 -52
- package/dist/m365/teams/commands/user/user-list.js +17 -39
- package/dist/m365/tenant/commands/report/report-activeusercounts.js +2 -1
- package/dist/m365/tenant/commands/report/report-activeuserdetail.js +2 -1
- package/dist/m365/tenant/commands/report/report-office365activationcounts.js +9 -0
- package/dist/m365/tenant/commands/report/report-office365activationsusercounts.js +9 -0
- package/dist/m365/tenant/commands/report/report-office365activationsuserdetail.js +9 -0
- package/dist/m365/tenant/commands/report/report-servicesusercounts.js +2 -1
- package/dist/m365/tenant/commands/report/report-settings-get.js +5 -0
- package/dist/m365/tenant/commands/serviceannouncement/serviceannouncement-health-get.js +9 -20
- package/dist/m365/tenant/commands/serviceannouncement/serviceannouncement-health-list.js +8 -20
- package/dist/m365/tenant/commands/serviceannouncement/serviceannouncement-healthissue-get.js +8 -15
- package/dist/m365/tenant/commands/serviceannouncement/serviceannouncement-healthissue-list.js +8 -15
- package/dist/m365/tenant/commands/serviceannouncement/serviceannouncement-message-get.js +12 -26
- package/dist/m365/tenant/commands/serviceannouncement/serviceannouncement-message-list.js +8 -22
- package/dist/utils/calendar.js +1 -1
- package/dist/utils/formatting.js +16 -0
- package/dist/utils/pid.js +7 -16
- package/dist/utils/spe.js +1 -1
- package/dist/utils/spo.js +39 -0
- package/dist/utils/validation.js +24 -0
- package/dist/utils/zod.js +17 -7
- package/docs/docs/cmd/entra/agent/agent-blueprint-list.mdx +175 -0
- package/docs/docs/cmd/login.mdx +15 -2
- package/docs/docs/cmd/outlook/calendargroup/calendargroup-add.mdx +126 -0
- package/docs/docs/cmd/outlook/event/event-add.mdx +390 -0
- package/docs/docs/cmd/spe/container/container-add.mdx +0 -8
- package/docs/docs/cmd/spe/container/container-list.mdx +0 -8
- package/docs/docs/cmd/spe/container/container-permission-add.mdx +140 -0
- package/docs/docs/cmd/spe/container/container-permission-remove.mdx +78 -0
- package/docs/docs/cmd/spe/container/container-permission-set.mdx +78 -0
- package/docs/docs/cmd/spe/container/container-recyclebinitem-list.mdx +0 -8
- package/docs/docs/cmd/spe/container/container-recyclebinitem-restore.mdx +0 -8
- package/docs/docs/cmd/spe/container/container-remove.mdx +0 -8
- package/docs/docs/cmd/spe/containertype/containertype-add.mdx +1 -1
- package/docs/docs/cmd/spfx/project/project-upgrade.mdx +1 -1
- package/docs/docs/cmd/spo/externaluser/externaluser-list.mdx +17 -30
- package/docs/docs/cmd/spo/navigation/navigation-node-add.mdx +45 -30
- package/docs/docs/cmd/spo/navigation/navigation-node-get.mdx +64 -42
- package/docs/docs/cmd/spo/navigation/navigation-node-set.mdx +10 -8
- package/docs/docs/cmd/spo/orgassetslibrary/orgassetslibrary-list.mdx +0 -21
- package/docs/docs/cmd/spo/page/page-unpublish.mdx +63 -0
- package/docs/docs/cmd/teams/tab/tab-add.mdx +19 -0
- package/docs/docs/cmd/teams/tab/tab-get.mdx +19 -0
- package/docs/docs/cmd/teams/tab/tab-list.mdx +19 -0
- package/docs/docs/cmd/teams/tab/tab-remove.mdx +21 -0
- package/docs/docs/cmd/viva/engage/engage-message-add.mdx +17 -0
- package/docs/docs/cmd/viva/engage/engage-message-get.mdx +17 -0
- package/docs/docs/cmd/viva/engage/engage-message-list.mdx +17 -0
- package/docs/docs/cmd/viva/engage/engage-message-remove.mdx +19 -0
- package/package.json +4 -6
|
@@ -1,14 +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 _SpoContentTypeListCommand_instances, _SpoContentTypeListCommand_initTelemetry, _SpoContentTypeListCommand_initOptions, _SpoContentTypeListCommand_initValidators, _SpoContentTypeListCommand_initTypes;
|
|
1
|
+
import { z } from 'zod';
|
|
2
|
+
import { globalOptionsZod } from '../../../../Command.js';
|
|
7
3
|
import { formatting } from '../../../../utils/formatting.js';
|
|
8
4
|
import { odata } from '../../../../utils/odata.js';
|
|
9
5
|
import { validation } from '../../../../utils/validation.js';
|
|
10
6
|
import SpoCommand from '../../../base/SpoCommand.js';
|
|
11
7
|
import commands from '../../commands.js';
|
|
8
|
+
export const options = z.strictObject({
|
|
9
|
+
...globalOptionsZod.shape,
|
|
10
|
+
webUrl: z.string()
|
|
11
|
+
.refine(url => validation.isValidSharePointUrl(url) === true, {
|
|
12
|
+
error: e => `'${e.input}' is not a valid SharePoint Online site URL.`
|
|
13
|
+
})
|
|
14
|
+
.alias('u'),
|
|
15
|
+
category: z.string().optional().alias('c')
|
|
16
|
+
});
|
|
12
17
|
class SpoContentTypeListCommand extends SpoCommand {
|
|
13
18
|
get name() {
|
|
14
19
|
return commands.CONTENTTYPE_LIST;
|
|
@@ -19,13 +24,8 @@ class SpoContentTypeListCommand extends SpoCommand {
|
|
|
19
24
|
defaultProperties() {
|
|
20
25
|
return ['StringId', 'Name', 'Hidden', 'ReadOnly', 'Sealed'];
|
|
21
26
|
}
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
_SpoContentTypeListCommand_instances.add(this);
|
|
25
|
-
__classPrivateFieldGet(this, _SpoContentTypeListCommand_instances, "m", _SpoContentTypeListCommand_initTelemetry).call(this);
|
|
26
|
-
__classPrivateFieldGet(this, _SpoContentTypeListCommand_instances, "m", _SpoContentTypeListCommand_initOptions).call(this);
|
|
27
|
-
__classPrivateFieldGet(this, _SpoContentTypeListCommand_instances, "m", _SpoContentTypeListCommand_initValidators).call(this);
|
|
28
|
-
__classPrivateFieldGet(this, _SpoContentTypeListCommand_instances, "m", _SpoContentTypeListCommand_initTypes).call(this);
|
|
27
|
+
get schema() {
|
|
28
|
+
return options;
|
|
29
29
|
}
|
|
30
30
|
async commandAction(logger, args) {
|
|
31
31
|
try {
|
|
@@ -41,22 +41,5 @@ class SpoContentTypeListCommand extends SpoCommand {
|
|
|
41
41
|
}
|
|
42
42
|
}
|
|
43
43
|
}
|
|
44
|
-
_SpoContentTypeListCommand_instances = new WeakSet(), _SpoContentTypeListCommand_initTelemetry = function _SpoContentTypeListCommand_initTelemetry() {
|
|
45
|
-
this.telemetry.push((args) => {
|
|
46
|
-
Object.assign(this.telemetryProperties, {
|
|
47
|
-
category: typeof args.options.category !== 'undefined'
|
|
48
|
-
});
|
|
49
|
-
});
|
|
50
|
-
}, _SpoContentTypeListCommand_initOptions = function _SpoContentTypeListCommand_initOptions() {
|
|
51
|
-
this.options.unshift({
|
|
52
|
-
option: '-u, --webUrl <webUrl>'
|
|
53
|
-
}, {
|
|
54
|
-
option: '-c, --category [category]'
|
|
55
|
-
});
|
|
56
|
-
}, _SpoContentTypeListCommand_initValidators = function _SpoContentTypeListCommand_initValidators() {
|
|
57
|
-
this.validators.push(async (args) => validation.isValidSharePointUrl(args.options.webUrl));
|
|
58
|
-
}, _SpoContentTypeListCommand_initTypes = function _SpoContentTypeListCommand_initTypes() {
|
|
59
|
-
this.types.string.push('webUrl', 'category');
|
|
60
|
-
};
|
|
61
44
|
export default new SpoContentTypeListCommand();
|
|
62
45
|
//# sourceMappingURL=contenttype-list.js.map
|
|
@@ -1,15 +1,22 @@
|
|
|
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 _SpoContentTypeRemoveCommand_instances, _SpoContentTypeRemoveCommand_initTelemetry, _SpoContentTypeRemoveCommand_initOptions, _SpoContentTypeRemoveCommand_initValidators, _SpoContentTypeRemoveCommand_initTypes, _SpoContentTypeRemoveCommand_initOptionSets;
|
|
1
|
+
import { z } from 'zod';
|
|
7
2
|
import { cli } from '../../../../cli/cli.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 { validation } from '../../../../utils/validation.js';
|
|
11
7
|
import SpoCommand from '../../../base/SpoCommand.js';
|
|
12
8
|
import commands from '../../commands.js';
|
|
9
|
+
export const options = z.strictObject({
|
|
10
|
+
...globalOptionsZod.shape,
|
|
11
|
+
webUrl: z.string()
|
|
12
|
+
.refine(url => validation.isValidSharePointUrl(url) === true, {
|
|
13
|
+
error: e => `'${e.input}' is not a valid SharePoint Online site URL.`
|
|
14
|
+
})
|
|
15
|
+
.alias('u'),
|
|
16
|
+
id: z.string().optional().alias('i'),
|
|
17
|
+
name: z.string().optional().alias('n'),
|
|
18
|
+
force: z.boolean().optional().alias('f')
|
|
19
|
+
});
|
|
13
20
|
class SpoContentTypeRemoveCommand extends SpoCommand {
|
|
14
21
|
get name() {
|
|
15
22
|
return commands.CONTENTTYPE_REMOVE;
|
|
@@ -17,14 +24,17 @@ class SpoContentTypeRemoveCommand extends SpoCommand {
|
|
|
17
24
|
get description() {
|
|
18
25
|
return 'Deletes site content type';
|
|
19
26
|
}
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
27
|
+
get schema() {
|
|
28
|
+
return options;
|
|
29
|
+
}
|
|
30
|
+
getRefinedSchema(schema) {
|
|
31
|
+
return schema.refine(opts => [opts.id, opts.name].filter(x => x !== undefined).length === 1, {
|
|
32
|
+
error: `Specify either 'id' or 'name', but not both.`,
|
|
33
|
+
params: {
|
|
34
|
+
customCode: 'optionSet',
|
|
35
|
+
options: ['id', 'name']
|
|
36
|
+
}
|
|
37
|
+
});
|
|
28
38
|
}
|
|
29
39
|
async commandAction(logger, args) {
|
|
30
40
|
let contentTypeId = '';
|
|
@@ -92,30 +102,5 @@ class SpoContentTypeRemoveCommand extends SpoCommand {
|
|
|
92
102
|
}
|
|
93
103
|
}
|
|
94
104
|
}
|
|
95
|
-
_SpoContentTypeRemoveCommand_instances = new WeakSet(), _SpoContentTypeRemoveCommand_initTelemetry = function _SpoContentTypeRemoveCommand_initTelemetry() {
|
|
96
|
-
this.telemetry.push((args) => {
|
|
97
|
-
Object.assign(this.telemetryProperties, {
|
|
98
|
-
id: typeof args.options.id !== 'undefined',
|
|
99
|
-
name: typeof args.options.name !== 'undefined',
|
|
100
|
-
force: (!(!args.options.force)).toString()
|
|
101
|
-
});
|
|
102
|
-
});
|
|
103
|
-
}, _SpoContentTypeRemoveCommand_initOptions = function _SpoContentTypeRemoveCommand_initOptions() {
|
|
104
|
-
this.options.unshift({
|
|
105
|
-
option: '-u, --webUrl <webUrl>'
|
|
106
|
-
}, {
|
|
107
|
-
option: '-i, --id [id]'
|
|
108
|
-
}, {
|
|
109
|
-
option: '-n, --name [name]'
|
|
110
|
-
}, {
|
|
111
|
-
option: '-f, --force'
|
|
112
|
-
});
|
|
113
|
-
}, _SpoContentTypeRemoveCommand_initValidators = function _SpoContentTypeRemoveCommand_initValidators() {
|
|
114
|
-
this.validators.push(async (args) => validation.isValidSharePointUrl(args.options.webUrl));
|
|
115
|
-
}, _SpoContentTypeRemoveCommand_initTypes = function _SpoContentTypeRemoveCommand_initTypes() {
|
|
116
|
-
this.types.string.push('id', 'i');
|
|
117
|
-
}, _SpoContentTypeRemoveCommand_initOptionSets = function _SpoContentTypeRemoveCommand_initOptionSets() {
|
|
118
|
-
this.optionSets.push({ options: ['id', 'name'] });
|
|
119
|
-
};
|
|
120
105
|
export default new SpoContentTypeRemoveCommand();
|
|
121
106
|
//# sourceMappingURL=contenttype-remove.js.map
|
|
@@ -1,9 +1,5 @@
|
|
|
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 _SpoContentTypeSetCommand_instances, _SpoContentTypeSetCommand_initTelemetry, _SpoContentTypeSetCommand_initOptions, _SpoContentTypeSetCommand_initValidators, _SpoContentTypeSetCommand_initTypes, _SpoContentTypeSetCommand_initOptionSets;
|
|
1
|
+
import { z } from 'zod';
|
|
2
|
+
import { globalOptionsZod } from '../../../../Command.js';
|
|
7
3
|
import config from '../../../../config.js';
|
|
8
4
|
import request from '../../../../request.js';
|
|
9
5
|
import { formatting } from '../../../../utils/formatting.js';
|
|
@@ -12,6 +8,23 @@ import { urlUtil } from '../../../../utils/urlUtil.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.object({
|
|
12
|
+
...globalOptionsZod.shape,
|
|
13
|
+
webUrl: z.string()
|
|
14
|
+
.refine(url => validation.isValidSharePointUrl(url) === true, {
|
|
15
|
+
error: e => `'${e.input}' is not a valid SharePoint Online site URL.`
|
|
16
|
+
})
|
|
17
|
+
.alias('u'),
|
|
18
|
+
id: z.string().optional().alias('i'),
|
|
19
|
+
name: z.string().optional().alias('n'),
|
|
20
|
+
listTitle: z.string().optional(),
|
|
21
|
+
listId: z.string()
|
|
22
|
+
.refine(id => validation.isValidGuid(id), {
|
|
23
|
+
error: e => `'${e.input}' is not a valid GUID.`
|
|
24
|
+
}).optional(),
|
|
25
|
+
listUrl: z.string().optional(),
|
|
26
|
+
updateChildren: z.boolean().optional()
|
|
27
|
+
}).catchall(z.unknown());
|
|
15
28
|
class SpoContentTypeSetCommand extends SpoCommand {
|
|
16
29
|
get name() {
|
|
17
30
|
return commands.CONTENTTYPE_SET;
|
|
@@ -19,14 +32,29 @@ class SpoContentTypeSetCommand extends SpoCommand {
|
|
|
19
32
|
get description() {
|
|
20
33
|
return 'Updates an existing content type';
|
|
21
34
|
}
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
35
|
+
get schema() {
|
|
36
|
+
return options;
|
|
37
|
+
}
|
|
38
|
+
getRefinedSchema(schema) {
|
|
39
|
+
return schema
|
|
40
|
+
.refine(opts => [opts.id, opts.name].filter(x => x !== undefined).length === 1, {
|
|
41
|
+
error: `Specify either 'id' or 'name', but not both.`,
|
|
42
|
+
params: {
|
|
43
|
+
customCode: 'optionSet',
|
|
44
|
+
options: ['id', 'name']
|
|
45
|
+
}
|
|
46
|
+
})
|
|
47
|
+
.refine(opts => [opts.listId, opts.listTitle, opts.listUrl].filter(x => x !== undefined).length <= 1, {
|
|
48
|
+
error: `Specify either listTitle, listId or listUrl.`,
|
|
49
|
+
params: {
|
|
50
|
+
customCode: 'optionSet',
|
|
51
|
+
options: ['listId', 'listTitle', 'listUrl']
|
|
52
|
+
}
|
|
53
|
+
})
|
|
54
|
+
.refine(opts => !(opts.listId || opts.listTitle || opts.listUrl) || !opts.updateChildren, {
|
|
55
|
+
error: 'It is impossible to pass updateChildren when trying to update a list content type.',
|
|
56
|
+
path: ['updateChildren']
|
|
57
|
+
});
|
|
30
58
|
}
|
|
31
59
|
allowUnknownOptions() {
|
|
32
60
|
return true;
|
|
@@ -134,54 +162,5 @@ class SpoContentTypeSetCommand extends SpoCommand {
|
|
|
134
162
|
return baseString + await spo.getListId(options.webUrl, options.listTitle, options.listUrl, logger, this.verbose);
|
|
135
163
|
}
|
|
136
164
|
}
|
|
137
|
-
_SpoContentTypeSetCommand_instances = new WeakSet(), _SpoContentTypeSetCommand_initTelemetry = function _SpoContentTypeSetCommand_initTelemetry() {
|
|
138
|
-
this.telemetry.push((args) => {
|
|
139
|
-
Object.assign(this.telemetryProperties, {
|
|
140
|
-
id: typeof args.options.id !== 'undefined',
|
|
141
|
-
name: typeof args.options.name !== 'undefined',
|
|
142
|
-
listTitle: typeof args.options.listTitle !== 'undefined',
|
|
143
|
-
listId: typeof args.options.listId !== 'undefined',
|
|
144
|
-
listUrl: typeof args.options.listUrl !== 'undefined',
|
|
145
|
-
updateChildren: args.options.updateChildren
|
|
146
|
-
});
|
|
147
|
-
});
|
|
148
|
-
}, _SpoContentTypeSetCommand_initOptions = function _SpoContentTypeSetCommand_initOptions() {
|
|
149
|
-
this.options.unshift({
|
|
150
|
-
option: '-u, --webUrl <webUrl>'
|
|
151
|
-
}, {
|
|
152
|
-
option: '-i, --id [id]'
|
|
153
|
-
}, {
|
|
154
|
-
option: '-n, --name [name]'
|
|
155
|
-
}, {
|
|
156
|
-
option: '--listTitle [listTitle]'
|
|
157
|
-
}, {
|
|
158
|
-
option: '--listId [listId]'
|
|
159
|
-
}, {
|
|
160
|
-
option: '--listUrl [listUrl]'
|
|
161
|
-
}, {
|
|
162
|
-
option: '--updateChildren'
|
|
163
|
-
});
|
|
164
|
-
}, _SpoContentTypeSetCommand_initValidators = function _SpoContentTypeSetCommand_initValidators() {
|
|
165
|
-
this.validators.push(async (args) => {
|
|
166
|
-
const isValidSharePointUrl = validation.isValidSharePointUrl(args.options.webUrl);
|
|
167
|
-
if (isValidSharePointUrl !== true) {
|
|
168
|
-
return isValidSharePointUrl;
|
|
169
|
-
}
|
|
170
|
-
if (args.options.listId && !validation.isValidGuid(args.options.listId)) {
|
|
171
|
-
return `'${args.options.listId}' is not a valid GUID.`;
|
|
172
|
-
}
|
|
173
|
-
if ((args.options.listId && (args.options.listTitle || args.options.listUrl)) || (args.options.listTitle && args.options.listUrl)) {
|
|
174
|
-
return `Specify either listTitle, listId or listUrl.`;
|
|
175
|
-
}
|
|
176
|
-
if ((args.options.listId || args.options.listTitle || args.options.listUrl) && args.options.updateChildren) {
|
|
177
|
-
return 'It is impossible to pass updateChildren when trying to update a list content type.';
|
|
178
|
-
}
|
|
179
|
-
return true;
|
|
180
|
-
});
|
|
181
|
-
}, _SpoContentTypeSetCommand_initTypes = function _SpoContentTypeSetCommand_initTypes() {
|
|
182
|
-
this.types.string.push('id', 'i');
|
|
183
|
-
}, _SpoContentTypeSetCommand_initOptionSets = function _SpoContentTypeSetCommand_initOptionSets() {
|
|
184
|
-
this.optionSets.push({ options: ['id', 'name'] });
|
|
185
|
-
};
|
|
186
165
|
export default new SpoContentTypeSetCommand();
|
|
187
166
|
//# sourceMappingURL=contenttype-set.js.map
|
|
@@ -1,9 +1,5 @@
|
|
|
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 _SpoContentTypeSyncCommand_instances, _SpoContentTypeSyncCommand_initTelemetry, _SpoContentTypeSyncCommand_initOptions, _SpoContentTypeSyncCommand_initValidators, _SpoContentTypeSyncCommand_initTypes, _SpoContentTypeSyncCommand_initOptionSets;
|
|
1
|
+
import { z } from 'zod';
|
|
2
|
+
import { globalOptionsZod } from '../../../../Command.js';
|
|
7
3
|
import { formatting } from '../../../../utils/formatting.js';
|
|
8
4
|
import request from '../../../../request.js';
|
|
9
5
|
import { validation } from '../../../../utils/validation.js';
|
|
@@ -11,6 +7,22 @@ import SpoCommand from '../../../base/SpoCommand.js';
|
|
|
11
7
|
import commands from '../../commands.js';
|
|
12
8
|
import { odata } from '../../../../utils/odata.js';
|
|
13
9
|
import { spo } from '../../../../utils/spo.js';
|
|
10
|
+
export const options = z.strictObject({
|
|
11
|
+
...globalOptionsZod.shape,
|
|
12
|
+
webUrl: z.string()
|
|
13
|
+
.refine(url => validation.isValidSharePointUrl(url) === true, {
|
|
14
|
+
error: e => `'${e.input}' is not a valid SharePoint Online site URL.`
|
|
15
|
+
})
|
|
16
|
+
.alias('u'),
|
|
17
|
+
id: z.string().optional().alias('i'),
|
|
18
|
+
name: z.string().optional().alias('n'),
|
|
19
|
+
listTitle: z.string().optional(),
|
|
20
|
+
listId: z.string()
|
|
21
|
+
.refine(id => validation.isValidGuid(id), {
|
|
22
|
+
error: e => `${e.input} is not a valid GUID`
|
|
23
|
+
}).optional(),
|
|
24
|
+
listUrl: z.string().optional()
|
|
25
|
+
});
|
|
14
26
|
class SpoContentTypeSyncCommand extends SpoCommand {
|
|
15
27
|
get name() {
|
|
16
28
|
return commands.CONTENTTYPE_SYNC;
|
|
@@ -18,14 +30,25 @@ class SpoContentTypeSyncCommand extends SpoCommand {
|
|
|
18
30
|
get description() {
|
|
19
31
|
return 'Adds a published content type from the content type hub to a site or syncs its latest changes';
|
|
20
32
|
}
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
33
|
+
get schema() {
|
|
34
|
+
return options;
|
|
35
|
+
}
|
|
36
|
+
getRefinedSchema(schema) {
|
|
37
|
+
return schema
|
|
38
|
+
.refine(opts => [opts.id, opts.name].filter(x => x !== undefined).length === 1, {
|
|
39
|
+
error: `Specify either 'id' or 'name', but not both.`,
|
|
40
|
+
params: {
|
|
41
|
+
customCode: 'optionSet',
|
|
42
|
+
options: ['id', 'name']
|
|
43
|
+
}
|
|
44
|
+
})
|
|
45
|
+
.refine(opts => [opts.listId, opts.listTitle, opts.listUrl].filter(x => x !== undefined).length <= 1, {
|
|
46
|
+
error: `Specify either 'listId', 'listTitle' or 'listUrl'.`,
|
|
47
|
+
params: {
|
|
48
|
+
customCode: 'optionSet',
|
|
49
|
+
options: ['listId', 'listTitle', 'listUrl']
|
|
50
|
+
}
|
|
51
|
+
});
|
|
29
52
|
}
|
|
30
53
|
async commandAction(logger, args) {
|
|
31
54
|
const { listId, listTitle, listUrl, webUrl } = args.options;
|
|
@@ -78,50 +101,5 @@ class SpoContentTypeSyncCommand extends SpoCommand {
|
|
|
78
101
|
return contentTypes[0].StringId;
|
|
79
102
|
}
|
|
80
103
|
}
|
|
81
|
-
_SpoContentTypeSyncCommand_instances = new WeakSet(), _SpoContentTypeSyncCommand_initTelemetry = function _SpoContentTypeSyncCommand_initTelemetry() {
|
|
82
|
-
this.telemetry.push((args) => {
|
|
83
|
-
Object.assign(this.telemetryProperties, {
|
|
84
|
-
id: typeof args.options.id !== 'undefined',
|
|
85
|
-
name: typeof args.options.name !== 'undefined',
|
|
86
|
-
listId: typeof args.options.listId !== 'undefined',
|
|
87
|
-
listTitle: typeof args.options.listTitle !== 'undefined',
|
|
88
|
-
listUrl: typeof args.options.listUrl !== 'undefined'
|
|
89
|
-
});
|
|
90
|
-
});
|
|
91
|
-
}, _SpoContentTypeSyncCommand_initOptions = function _SpoContentTypeSyncCommand_initOptions() {
|
|
92
|
-
this.options.unshift({
|
|
93
|
-
option: '-u, --webUrl <webUrl>'
|
|
94
|
-
}, {
|
|
95
|
-
option: '-i, --id [id]'
|
|
96
|
-
}, {
|
|
97
|
-
option: '-n, --name [name]'
|
|
98
|
-
}, {
|
|
99
|
-
option: '--listTitle [listTitle]'
|
|
100
|
-
}, {
|
|
101
|
-
option: '--listId [listId]'
|
|
102
|
-
}, {
|
|
103
|
-
option: '--listUrl [listUrl]'
|
|
104
|
-
});
|
|
105
|
-
}, _SpoContentTypeSyncCommand_initValidators = function _SpoContentTypeSyncCommand_initValidators() {
|
|
106
|
-
this.validators.push(async (args) => {
|
|
107
|
-
const isValidSharePointUrl = validation.isValidSharePointUrl(args.options.webUrl);
|
|
108
|
-
if (isValidSharePointUrl !== true) {
|
|
109
|
-
return isValidSharePointUrl;
|
|
110
|
-
}
|
|
111
|
-
if (args.options.listId && !validation.isValidGuid(args.options.listId)) {
|
|
112
|
-
return `${args.options.listId} is not a valid GUID`;
|
|
113
|
-
}
|
|
114
|
-
return true;
|
|
115
|
-
});
|
|
116
|
-
}, _SpoContentTypeSyncCommand_initTypes = function _SpoContentTypeSyncCommand_initTypes() {
|
|
117
|
-
this.types.string.push('webUrl', 'id', 'name', 'listTitle', 'listId', 'listUrl');
|
|
118
|
-
}, _SpoContentTypeSyncCommand_initOptionSets = function _SpoContentTypeSyncCommand_initOptionSets() {
|
|
119
|
-
this.optionSets.push({
|
|
120
|
-
options: ['id', 'name']
|
|
121
|
-
}, {
|
|
122
|
-
options: ['listId', 'listTitle', 'listUrl'],
|
|
123
|
-
runsWhen: (args) => args.options.listId || args.options.listTitle || args.options.listUrl
|
|
124
|
-
});
|
|
125
|
-
};
|
|
126
104
|
export default new SpoContentTypeSyncCommand();
|
|
127
105
|
//# sourceMappingURL=contenttype-sync.js.map
|
|
@@ -1,8 +1,10 @@
|
|
|
1
|
+
import { globalOptionsZod } from '../../../../Command.js';
|
|
1
2
|
import config from '../../../../config.js';
|
|
2
3
|
import request from '../../../../request.js';
|
|
3
4
|
import { spo } from '../../../../utils/spo.js';
|
|
4
5
|
import SpoCommand from '../../../base/SpoCommand.js';
|
|
5
6
|
import commands from '../../commands.js';
|
|
7
|
+
export const options = globalOptionsZod.strict();
|
|
6
8
|
class SpoContentTypeHubGetCommand extends SpoCommand {
|
|
7
9
|
get name() {
|
|
8
10
|
return commands.CONTENTTYPEHUB_GET;
|
|
@@ -10,6 +12,9 @@ class SpoContentTypeHubGetCommand extends SpoCommand {
|
|
|
10
12
|
get description() {
|
|
11
13
|
return 'Returns the URL of the SharePoint Content Type Hub of the Tenant';
|
|
12
14
|
}
|
|
15
|
+
get schema() {
|
|
16
|
+
return options;
|
|
17
|
+
}
|
|
13
18
|
async commandAction(logger) {
|
|
14
19
|
try {
|
|
15
20
|
const spoUrl = await spo.getSpoUrl(logger, this.debug);
|