@pnp/cli-microsoft365 12.0.0-beta.4ac11a7 → 12.0.0-beta.8769a5e
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 +4 -1
- package/dist/Command.js +11 -8
- package/dist/cli/cli.js +15 -0
- package/dist/config.js +2 -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/agent/agent-blueprintprincipal-list.js +56 -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 +2 -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-activate.js +8 -16
- package/dist/m365/spe/commands/container/container-list.js +21 -42
- 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/containertype/containertype-list.js +5 -0
- package/dist/m365/spe/commands.js +3 -0
- package/dist/m365/spfx/commands/SpfxCompatibilityMatrix.js +1 -1
- package/dist/m365/spfx/commands/project/project-doctor/{doctor-1.24.0-rc.0.js → doctor-1.24.0.js} +1 -1
- package/dist/m365/spfx/commands/project/project-doctor.js +1 -1
- package/dist/m365/spfx/commands/project/project-upgrade/{upgrade-1.24.0-rc.0.js → upgrade-1.24.0.js} +27 -27
- package/dist/m365/spfx/commands/project/project-upgrade.js +11 -11
- package/dist/m365/spo/commands/applicationcustomizer/applicationcustomizer-add.js +38 -71
- package/dist/m365/spo/commands/applicationcustomizer/applicationcustomizer-get.js +25 -59
- package/dist/m365/spo/commands/applicationcustomizer/applicationcustomizer-list.js +11 -34
- package/dist/m365/spo/commands/applicationcustomizer/applicationcustomizer-remove.js +25 -54
- package/dist/m365/spo/commands/applicationcustomizer/applicationcustomizer-set.js +52 -83
- package/dist/m365/spo/commands/apppage/apppage-add.js +21 -39
- package/dist/m365/spo/commands/apppage/apppage-set.js +20 -30
- 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 +1 -1
- package/dist/m365/spo/commands/navigation/navigation-node-get.js +1 -1
- 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 +2 -2
- package/dist/m365/spo/commands/orgassetslibrary/orgassetslibrary-add.js +15 -49
- package/dist/m365/spo/commands/orgassetslibrary/orgassetslibrary-list.js +6 -1
- package/dist/m365/spo/commands/orgassetslibrary/orgassetslibrary-remove.js +9 -17
- package/dist/m365/spo/commands/orgnewssite/orgnewssite-list.js +5 -0
- package/dist/m365/spo/commands/orgnewssite/orgnewssite-remove.js +11 -27
- package/dist/m365/spo/commands/orgnewssite/orgnewssite-set.js +10 -18
- 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/serviceprincipal/serviceprincipal-grant-add.js +9 -17
- package/dist/m365/spo/commands/serviceprincipal/serviceprincipal-grant-list.js +5 -0
- package/dist/m365/spo/commands/serviceprincipal/serviceprincipal-grant-revoke.js +9 -17
- package/dist/m365/spo/commands/serviceprincipal/serviceprincipal-permissionrequest-approve.js +29 -39
- package/dist/m365/spo/commands/serviceprincipal/serviceprincipal-permissionrequest-deny.js +10 -23
- package/dist/m365/spo/commands/serviceprincipal/serviceprincipal-permissionrequest-list.js +5 -0
- package/dist/m365/spo/commands/serviceprincipal/serviceprincipal-set.js +19 -28
- package/dist/m365/spo/commands/sitedesign/sitedesign-add.js +24 -59
- package/dist/m365/spo/commands/sitedesign/sitedesign-apply.js +10 -34
- package/dist/m365/spo/commands/sitedesign/sitedesign-get.js +19 -36
- package/dist/m365/spo/commands/sitedesign/sitedesign-list.js +8 -0
- package/dist/m365/spo/commands/sitedesign/sitedesign-remove.js +9 -32
- package/dist/m365/spo/commands/sitedesign/sitedesign-rights-grant.js +10 -31
- package/dist/m365/spo/commands/sitedesign/sitedesign-rights-list.js +8 -23
- package/dist/m365/spo/commands/sitedesign/sitedesign-rights-revoke.js +10 -34
- package/dist/m365/spo/commands/sitedesign/sitedesign-run-list.js +9 -38
- package/dist/m365/spo/commands/sitedesign/sitedesign-run-status-get.js +9 -29
- package/dist/m365/spo/commands/sitedesign/sitedesign-set.js +27 -80
- package/dist/m365/spo/commands/sitedesign/sitedesign-task-get.js +8 -23
- package/dist/m365/spo/commands/sitedesign/sitedesign-task-list.js +8 -18
- package/dist/m365/spo/commands/sitedesign/sitedesign-task-remove.js +9 -32
- package/dist/m365/spo/commands/spo-search.js +43 -116
- package/dist/m365/spo/commands/tenant/tenant-appcatalog-add.js +15 -46
- package/dist/m365/spo/commands/tenant/tenant-appcatalogurl-get.js +5 -0
- package/dist/m365/spo/commands/tenant/tenant-applicationcustomizer-add.js +20 -57
- package/dist/m365/spo/commands/tenant/tenant-applicationcustomizer-get.js +25 -49
- package/dist/m365/spo/commands/tenant/tenant-applicationcustomizer-list.js +5 -1
- package/dist/m365/spo/commands/tenant/tenant-applicationcustomizer-remove.js +25 -49
- package/dist/m365/spo/commands/tenant/tenant-applicationcustomizer-set.js +47 -79
- package/dist/m365/spo/commands/tenant/tenant-commandset-add.js +23 -54
- package/dist/m365/spo/commands/tenant/tenant-commandset-get.js +25 -50
- package/dist/m365/spo/commands/tenant/tenant-commandset-list.js +5 -1
- package/dist/m365/spo/commands/tenant/tenant-commandset-remove.js +25 -49
- package/dist/m365/spo/commands/tenant/tenant-commandset-set.js +41 -65
- package/dist/m365/spo/commands/tenant/tenant-recyclebinitem-list.js +5 -0
- package/dist/m365/spo/commands/tenant/tenant-recyclebinitem-remove.js +10 -30
- package/dist/m365/spo/commands/tenant/tenant-recyclebinitem-restore.js +8 -21
- package/dist/m365/spo/commands/tenant/tenant-settings-list.js +5 -0
- package/dist/m365/spo/commands/tenant/tenant-settings-set.js +104 -386
- package/dist/m365/spo/commands/term/term-add.js +95 -110
- package/dist/m365/spo/commands/term/term-get.js +63 -75
- package/dist/m365/spo/commands/term/term-group-add.js +11 -41
- package/dist/m365/spo/commands/term/term-group-get.js +16 -47
- package/dist/m365/spo/commands/term/term-group-list.js +16 -42
- package/dist/m365/spo/commands/term/term-list.js +42 -57
- package/dist/m365/spo/commands/term/term-set-add.js +50 -71
- package/dist/m365/spo/commands/term/term-set-get.js +41 -58
- package/dist/m365/spo/commands/term/term-set-list.js +22 -56
- package/dist/m365/spo/commands/theme/theme-apply.js +27 -43
- package/dist/m365/spo/commands/theme/theme-get.js +8 -15
- package/dist/m365/spo/commands/theme/theme-list.js +5 -0
- package/dist/m365/spo/commands/theme/theme-remove.js +9 -24
- package/dist/m365/spo/commands/theme/theme-set.js +12 -34
- 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/id/id-get.js +8 -22
- package/dist/m365/tenant/commands/info/info-get.js +23 -36
- package/dist/m365/tenant/commands/people/people-profilecardproperty-add.js +67 -55
- package/dist/m365/tenant/commands/people/people-profilecardproperty-get.js +11 -24
- package/dist/m365/tenant/commands/people/people-profilecardproperty-list.js +5 -0
- package/dist/m365/tenant/commands/people/people-profilecardproperty-remove.js +12 -33
- package/dist/m365/tenant/commands/people/people-profilecardproperty-set.js +31 -51
- package/dist/m365/tenant/commands/people/people-pronouns-get.js +5 -0
- package/dist/m365/tenant/commands/people/profileCardProperties.js +10 -7
- 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/security/security-alerts-list.js +8 -20
- 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/validation.js +36 -0
- package/dist/utils/zod.js +18 -7
- package/docs/docs/cmd/entra/agent/agent-blueprint-list.mdx +175 -0
- package/docs/docs/cmd/entra/agent/agent-blueprintprincipal-list.mdx +156 -0
- 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/applicationcustomizer/applicationcustomizer-set.mdx +1 -1
- package/docs/docs/cmd/spo/externaluser/externaluser-list.mdx +17 -30
- package/docs/docs/cmd/spo/orgassetslibrary/orgassetslibrary-list.mdx +0 -21
- package/package.json +1 -1
|
@@ -1,10 +1,6 @@
|
|
|
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 _SpoTermListCommand_instances, _SpoTermListCommand_initTelemetry, _SpoTermListCommand_initOptions, _SpoTermListCommand_initValidators, _SpoTermListCommand_initOptionSets;
|
|
1
|
+
import { z } from 'zod';
|
|
7
2
|
import { cli } from '../../../../cli/cli.js';
|
|
3
|
+
import { globalOptionsZod } from '../../../../Command.js';
|
|
8
4
|
import config from '../../../../config.js';
|
|
9
5
|
import request from '../../../../request.js';
|
|
10
6
|
import { formatting } from '../../../../utils/formatting.js';
|
|
@@ -12,6 +8,15 @@ 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
|
+
webUrl: z.string().optional().alias('u'),
|
|
14
|
+
termGroupId: z.string().optional(),
|
|
15
|
+
termGroupName: z.string().optional(),
|
|
16
|
+
termSetId: z.string().optional(),
|
|
17
|
+
termSetName: z.string().optional(),
|
|
18
|
+
withChildTerms: z.boolean().optional()
|
|
19
|
+
});
|
|
15
20
|
class SpoTermListCommand extends SpoCommand {
|
|
16
21
|
get name() {
|
|
17
22
|
return commands.TERM_LIST;
|
|
@@ -22,13 +27,37 @@ class SpoTermListCommand extends SpoCommand {
|
|
|
22
27
|
defaultProperties() {
|
|
23
28
|
return ['Id', 'Name', 'ParentTermId'];
|
|
24
29
|
}
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
30
|
+
get schema() {
|
|
31
|
+
return options;
|
|
32
|
+
}
|
|
33
|
+
getRefinedSchema(schema) {
|
|
34
|
+
return schema
|
|
35
|
+
.refine(opts => {
|
|
36
|
+
if (opts.webUrl) {
|
|
37
|
+
return validation.isValidSharePointUrl(opts.webUrl) === true;
|
|
38
|
+
}
|
|
39
|
+
return true;
|
|
40
|
+
}, { message: 'Invalid SharePoint URL' })
|
|
41
|
+
.refine(opts => {
|
|
42
|
+
if (opts.termGroupId && !validation.isValidGuid(opts.termGroupId)) {
|
|
43
|
+
return false;
|
|
44
|
+
}
|
|
45
|
+
return true;
|
|
46
|
+
}, { error: e => `${e.input.termGroupId} is not a valid GUID` })
|
|
47
|
+
.refine(opts => {
|
|
48
|
+
if (opts.termSetId && !validation.isValidGuid(opts.termSetId)) {
|
|
49
|
+
return false;
|
|
50
|
+
}
|
|
51
|
+
return true;
|
|
52
|
+
}, { error: e => `${e.input.termSetId} is not a valid GUID` })
|
|
53
|
+
.refine(opts => [opts.termGroupId, opts.termGroupName].filter(x => x !== undefined).length === 1, {
|
|
54
|
+
message: 'Specify either termGroupId or termGroupName, but not both.',
|
|
55
|
+
params: { customCode: 'optionSet', options: ['termGroupId', 'termGroupName'] }
|
|
56
|
+
})
|
|
57
|
+
.refine(opts => [opts.termSetId, opts.termSetName].filter(x => x !== undefined).length === 1, {
|
|
58
|
+
message: 'Specify either termSetId or termSetName, but not both.',
|
|
59
|
+
params: { customCode: 'optionSet', options: ['termSetId', 'termSetName'] }
|
|
60
|
+
});
|
|
32
61
|
}
|
|
33
62
|
async commandAction(logger, args) {
|
|
34
63
|
try {
|
|
@@ -135,49 +164,5 @@ class SpoTermListCommand extends SpoCommand {
|
|
|
135
164
|
return json[json.length - 1];
|
|
136
165
|
}
|
|
137
166
|
}
|
|
138
|
-
_SpoTermListCommand_instances = new WeakSet(), _SpoTermListCommand_initTelemetry = function _SpoTermListCommand_initTelemetry() {
|
|
139
|
-
this.telemetry.push((args) => {
|
|
140
|
-
Object.assign(this.telemetryProperties, {
|
|
141
|
-
webUrl: typeof args.options.webUrl !== 'undefined',
|
|
142
|
-
termGroupId: typeof args.options.termGroupId !== 'undefined',
|
|
143
|
-
termGroupName: typeof args.options.termGroupName !== 'undefined',
|
|
144
|
-
termSetId: typeof args.options.termSetId !== 'undefined',
|
|
145
|
-
termSetName: typeof args.options.termSetName !== 'undefined',
|
|
146
|
-
withChildTerms: !!args.options.withChildTerms
|
|
147
|
-
});
|
|
148
|
-
});
|
|
149
|
-
}, _SpoTermListCommand_initOptions = function _SpoTermListCommand_initOptions() {
|
|
150
|
-
this.options.unshift({
|
|
151
|
-
option: '-u, --webUrl [webUrl]'
|
|
152
|
-
}, {
|
|
153
|
-
option: '--termGroupId [termGroupId]'
|
|
154
|
-
}, {
|
|
155
|
-
option: '--termGroupName [termGroupName]'
|
|
156
|
-
}, {
|
|
157
|
-
option: '--termSetId [termSetId]'
|
|
158
|
-
}, {
|
|
159
|
-
option: '--termSetName [termSetName]'
|
|
160
|
-
}, {
|
|
161
|
-
option: '--withChildTerms'
|
|
162
|
-
});
|
|
163
|
-
}, _SpoTermListCommand_initValidators = function _SpoTermListCommand_initValidators() {
|
|
164
|
-
this.validators.push(async (args) => {
|
|
165
|
-
if (args.options.webUrl) {
|
|
166
|
-
const isValidSharePointUrl = validation.isValidSharePointUrl(args.options.webUrl);
|
|
167
|
-
if (isValidSharePointUrl !== true) {
|
|
168
|
-
return isValidSharePointUrl;
|
|
169
|
-
}
|
|
170
|
-
}
|
|
171
|
-
if (args.options.termGroupId && !validation.isValidGuid(args.options.termGroupId)) {
|
|
172
|
-
return `${args.options.termGroupId} is not a valid GUID`;
|
|
173
|
-
}
|
|
174
|
-
if (args.options.termSetId && !validation.isValidGuid(args.options.termSetId)) {
|
|
175
|
-
return `${args.options.termSetId} is not a valid GUID`;
|
|
176
|
-
}
|
|
177
|
-
return true;
|
|
178
|
-
});
|
|
179
|
-
}, _SpoTermListCommand_initOptionSets = function _SpoTermListCommand_initOptionSets() {
|
|
180
|
-
this.optionSets.push({ options: ['termGroupId', 'termGroupName'] }, { options: ['termSetId', 'termSetName'] });
|
|
181
|
-
};
|
|
182
167
|
export default new SpoTermListCommand();
|
|
183
168
|
//# sourceMappingURL=term-list.js.map
|
|
@@ -1,10 +1,6 @@
|
|
|
1
|
-
var __classPrivateFieldGet = (this && this.__classPrivateFieldGet) || function (receiver, state, kind, f) {
|
|
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 _SpoTermSetAddCommand_instances, _SpoTermSetAddCommand_initTelemetry, _SpoTermSetAddCommand_initOptions, _SpoTermSetAddCommand_initValidators, _SpoTermSetAddCommand_initOptionSets;
|
|
7
1
|
import { v4 } from 'uuid';
|
|
2
|
+
import { z } from 'zod';
|
|
3
|
+
import { globalOptionsZod } from '../../../../Command.js';
|
|
8
4
|
import config from '../../../../config.js';
|
|
9
5
|
import request from '../../../../request.js';
|
|
10
6
|
import { formatting } from '../../../../utils/formatting.js';
|
|
@@ -12,6 +8,16 @@ 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
|
+
name: z.string().alias('n'),
|
|
14
|
+
webUrl: z.string().optional().alias('u'),
|
|
15
|
+
termGroupId: z.string().optional(),
|
|
16
|
+
termGroupName: z.string().optional(),
|
|
17
|
+
id: z.string().optional().alias('i'),
|
|
18
|
+
description: z.string().optional().alias('d'),
|
|
19
|
+
customProperties: z.string().optional()
|
|
20
|
+
});
|
|
15
21
|
class SpoTermSetAddCommand extends SpoCommand {
|
|
16
22
|
get name() {
|
|
17
23
|
return commands.TERM_SET_ADD;
|
|
@@ -19,13 +25,44 @@ class SpoTermSetAddCommand extends SpoCommand {
|
|
|
19
25
|
get description() {
|
|
20
26
|
return 'Adds taxonomy term set';
|
|
21
27
|
}
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
28
|
+
get schema() {
|
|
29
|
+
return options;
|
|
30
|
+
}
|
|
31
|
+
getRefinedSchema(schema) {
|
|
32
|
+
return schema
|
|
33
|
+
.refine(opts => {
|
|
34
|
+
if (opts.webUrl) {
|
|
35
|
+
return validation.isValidSharePointUrl(opts.webUrl) === true;
|
|
36
|
+
}
|
|
37
|
+
return true;
|
|
38
|
+
}, { message: 'Invalid SharePoint URL' })
|
|
39
|
+
.refine(opts => {
|
|
40
|
+
if (opts.id && !validation.isValidGuid(opts.id)) {
|
|
41
|
+
return false;
|
|
42
|
+
}
|
|
43
|
+
return true;
|
|
44
|
+
}, { error: e => `${e.input.id} is not a valid GUID.` })
|
|
45
|
+
.refine(opts => {
|
|
46
|
+
if (opts.termGroupId && !validation.isValidGuid(opts.termGroupId)) {
|
|
47
|
+
return false;
|
|
48
|
+
}
|
|
49
|
+
return true;
|
|
50
|
+
}, { error: e => `${e.input.termGroupId} is not a valid GUID.` })
|
|
51
|
+
.refine(opts => {
|
|
52
|
+
if (opts.customProperties) {
|
|
53
|
+
try {
|
|
54
|
+
JSON.parse(opts.customProperties);
|
|
55
|
+
}
|
|
56
|
+
catch {
|
|
57
|
+
return false;
|
|
58
|
+
}
|
|
59
|
+
}
|
|
60
|
+
return true;
|
|
61
|
+
}, { message: 'customProperties is not valid JSON' })
|
|
62
|
+
.refine(opts => [opts.termGroupId, opts.termGroupName].filter(x => x !== undefined).length === 1, {
|
|
63
|
+
message: 'Specify either termGroupId or termGroupName, but not both.',
|
|
64
|
+
params: { customCode: 'optionSet', options: ['termGroupId', 'termGroupName'] }
|
|
65
|
+
});
|
|
29
66
|
}
|
|
30
67
|
async commandAction(logger, args) {
|
|
31
68
|
let termSet;
|
|
@@ -110,63 +147,5 @@ class SpoTermSetAddCommand extends SpoCommand {
|
|
|
110
147
|
}
|
|
111
148
|
}
|
|
112
149
|
}
|
|
113
|
-
_SpoTermSetAddCommand_instances = new WeakSet(), _SpoTermSetAddCommand_initTelemetry = function _SpoTermSetAddCommand_initTelemetry() {
|
|
114
|
-
this.telemetry.push((args) => {
|
|
115
|
-
Object.assign(this.telemetryProperties, {
|
|
116
|
-
webUrl: typeof args.options.webUrl !== 'undefined',
|
|
117
|
-
customProperties: typeof args.options.customProperties !== 'undefined',
|
|
118
|
-
description: typeof args.options.description !== 'undefined',
|
|
119
|
-
id: typeof args.options.id !== 'undefined',
|
|
120
|
-
termGroupId: typeof args.options.termGroupId !== 'undefined',
|
|
121
|
-
termGroupName: typeof args.options.termGroupName !== 'undefined'
|
|
122
|
-
});
|
|
123
|
-
});
|
|
124
|
-
}, _SpoTermSetAddCommand_initOptions = function _SpoTermSetAddCommand_initOptions() {
|
|
125
|
-
this.options.unshift({
|
|
126
|
-
option: '-n, --name <name>'
|
|
127
|
-
}, {
|
|
128
|
-
option: '-u, --webUrl [webUrl]'
|
|
129
|
-
}, {
|
|
130
|
-
option: '--termGroupId [termGroupId]'
|
|
131
|
-
}, {
|
|
132
|
-
option: '--termGroupName [termGroupName]'
|
|
133
|
-
}, {
|
|
134
|
-
option: '-i, --id [id]'
|
|
135
|
-
}, {
|
|
136
|
-
option: '-d, --description [description]'
|
|
137
|
-
}, {
|
|
138
|
-
option: '--customProperties [customProperties]'
|
|
139
|
-
});
|
|
140
|
-
}, _SpoTermSetAddCommand_initValidators = function _SpoTermSetAddCommand_initValidators() {
|
|
141
|
-
this.validators.push(async (args) => {
|
|
142
|
-
if (args.options.webUrl) {
|
|
143
|
-
const isValidSharePointUrl = validation.isValidSharePointUrl(args.options.webUrl);
|
|
144
|
-
if (isValidSharePointUrl !== true) {
|
|
145
|
-
return isValidSharePointUrl;
|
|
146
|
-
}
|
|
147
|
-
}
|
|
148
|
-
if (args.options.id) {
|
|
149
|
-
if (!validation.isValidGuid(args.options.id)) {
|
|
150
|
-
return `${args.options.id} is not a valid GUID`;
|
|
151
|
-
}
|
|
152
|
-
}
|
|
153
|
-
if (args.options.termGroupId) {
|
|
154
|
-
if (!validation.isValidGuid(args.options.termGroupId)) {
|
|
155
|
-
return `${args.options.termGroupId} is not a valid GUID`;
|
|
156
|
-
}
|
|
157
|
-
}
|
|
158
|
-
if (args.options.customProperties) {
|
|
159
|
-
try {
|
|
160
|
-
JSON.parse(args.options.customProperties);
|
|
161
|
-
}
|
|
162
|
-
catch (e) {
|
|
163
|
-
return `Error when parsing customProperties JSON: ${e}`;
|
|
164
|
-
}
|
|
165
|
-
}
|
|
166
|
-
return true;
|
|
167
|
-
});
|
|
168
|
-
}, _SpoTermSetAddCommand_initOptionSets = function _SpoTermSetAddCommand_initOptionSets() {
|
|
169
|
-
this.optionSets.push({ options: ['termGroupId', 'termGroupName'] });
|
|
170
|
-
};
|
|
171
150
|
export default new SpoTermSetAddCommand();
|
|
172
151
|
//# sourceMappingURL=term-set-add.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 _SpoTermSetGetCommand_instances, _SpoTermSetGetCommand_initTelemetry, _SpoTermSetGetCommand_initOptions, _SpoTermSetGetCommand_initValidators, _SpoTermSetGetCommand_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';
|
|
@@ -11,6 +7,14 @@ 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
|
+
webUrl: z.string().optional().alias('u'),
|
|
13
|
+
id: z.string().optional().alias('i'),
|
|
14
|
+
name: z.string().optional().alias('n'),
|
|
15
|
+
termGroupId: z.string().optional(),
|
|
16
|
+
termGroupName: z.string().optional()
|
|
17
|
+
});
|
|
14
18
|
class SpoTermSetGetCommand extends SpoCommand {
|
|
15
19
|
get name() {
|
|
16
20
|
return commands.TERM_SET_GET;
|
|
@@ -18,13 +22,37 @@ class SpoTermSetGetCommand extends SpoCommand {
|
|
|
18
22
|
get description() {
|
|
19
23
|
return 'Gets information about the specified taxonomy term set';
|
|
20
24
|
}
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
25
|
+
get schema() {
|
|
26
|
+
return options;
|
|
27
|
+
}
|
|
28
|
+
getRefinedSchema(schema) {
|
|
29
|
+
return schema
|
|
30
|
+
.refine(opts => {
|
|
31
|
+
if (opts.webUrl) {
|
|
32
|
+
return validation.isValidSharePointUrl(opts.webUrl) === true;
|
|
33
|
+
}
|
|
34
|
+
return true;
|
|
35
|
+
}, { message: 'Invalid SharePoint URL' })
|
|
36
|
+
.refine(opts => {
|
|
37
|
+
if (opts.id && !validation.isValidGuid(opts.id)) {
|
|
38
|
+
return false;
|
|
39
|
+
}
|
|
40
|
+
return true;
|
|
41
|
+
}, { error: e => `${e.input.id} is not a valid GUID.` })
|
|
42
|
+
.refine(opts => {
|
|
43
|
+
if (opts.termGroupId && !validation.isValidGuid(opts.termGroupId)) {
|
|
44
|
+
return false;
|
|
45
|
+
}
|
|
46
|
+
return true;
|
|
47
|
+
}, { error: e => `${e.input.termGroupId} is not a valid GUID.` })
|
|
48
|
+
.refine(opts => [opts.id, opts.name].filter(x => x !== undefined).length === 1, {
|
|
49
|
+
message: 'Specify either id or name, but not both.',
|
|
50
|
+
params: { customCode: 'optionSet', options: ['id', 'name'] }
|
|
51
|
+
})
|
|
52
|
+
.refine(opts => [opts.termGroupId, opts.termGroupName].filter(x => x !== undefined).length === 1, {
|
|
53
|
+
message: 'Specify either termGroupId or termGroupName, but not both.',
|
|
54
|
+
params: { customCode: 'optionSet', options: ['termGroupId', 'termGroupName'] }
|
|
55
|
+
});
|
|
28
56
|
}
|
|
29
57
|
async commandAction(logger, args) {
|
|
30
58
|
try {
|
|
@@ -61,50 +89,5 @@ class SpoTermSetGetCommand extends SpoCommand {
|
|
|
61
89
|
}
|
|
62
90
|
}
|
|
63
91
|
}
|
|
64
|
-
_SpoTermSetGetCommand_instances = new WeakSet(), _SpoTermSetGetCommand_initTelemetry = function _SpoTermSetGetCommand_initTelemetry() {
|
|
65
|
-
this.telemetry.push((args) => {
|
|
66
|
-
Object.assign(this.telemetryProperties, {
|
|
67
|
-
webUrl: typeof args.options.webUrl !== 'undefined',
|
|
68
|
-
id: typeof args.options.id !== 'undefined',
|
|
69
|
-
name: typeof args.options.name !== 'undefined',
|
|
70
|
-
termGroupId: typeof args.options.termGroupId !== 'undefined',
|
|
71
|
-
termGroupName: typeof args.options.termGroupName !== 'undefined'
|
|
72
|
-
});
|
|
73
|
-
});
|
|
74
|
-
}, _SpoTermSetGetCommand_initOptions = function _SpoTermSetGetCommand_initOptions() {
|
|
75
|
-
this.options.unshift({
|
|
76
|
-
option: '-u, --webUrl [webUrl]'
|
|
77
|
-
}, {
|
|
78
|
-
option: '-i, --id [id]'
|
|
79
|
-
}, {
|
|
80
|
-
option: '-n, --name [name]'
|
|
81
|
-
}, {
|
|
82
|
-
option: '--termGroupId [termGroupId]'
|
|
83
|
-
}, {
|
|
84
|
-
option: '--termGroupName [termGroupName]'
|
|
85
|
-
});
|
|
86
|
-
}, _SpoTermSetGetCommand_initValidators = function _SpoTermSetGetCommand_initValidators() {
|
|
87
|
-
this.validators.push(async (args) => {
|
|
88
|
-
if (args.options.webUrl) {
|
|
89
|
-
const isValidSharePointUrl = validation.isValidSharePointUrl(args.options.webUrl);
|
|
90
|
-
if (isValidSharePointUrl !== true) {
|
|
91
|
-
return isValidSharePointUrl;
|
|
92
|
-
}
|
|
93
|
-
}
|
|
94
|
-
if (args.options.id) {
|
|
95
|
-
if (!validation.isValidGuid(args.options.id)) {
|
|
96
|
-
return `${args.options.id} is not a valid GUID`;
|
|
97
|
-
}
|
|
98
|
-
}
|
|
99
|
-
if (args.options.termGroupId) {
|
|
100
|
-
if (!validation.isValidGuid(args.options.termGroupId)) {
|
|
101
|
-
return `${args.options.termGroupId} is not a valid GUID`;
|
|
102
|
-
}
|
|
103
|
-
}
|
|
104
|
-
return true;
|
|
105
|
-
});
|
|
106
|
-
}, _SpoTermSetGetCommand_initOptionSets = function _SpoTermSetGetCommand_initOptionSets() {
|
|
107
|
-
this.optionSets.push({ options: ['id', 'name'] }, { options: ['termGroupId', 'termGroupName'] });
|
|
108
|
-
};
|
|
109
92
|
export default new SpoTermSetGetCommand();
|
|
110
93
|
//# sourceMappingURL=term-set-get.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 _SpoTermSetListCommand_instances, _SpoTermSetListCommand_initTelemetry, _SpoTermSetListCommand_initOptions, _SpoTermSetListCommand_initValidators, _SpoTermSetListCommand_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';
|
|
@@ -11,6 +7,12 @@ 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
|
+
webUrl: z.string().optional().alias('u').refine(val => val === undefined || validation.isValidSharePointUrl(val) === true, { message: 'Invalid SharePoint URL' }),
|
|
13
|
+
termGroupId: z.string().optional().refine(val => val === undefined || validation.isValidGuid(val), { error: e => `${e.input} is not a valid GUID` }),
|
|
14
|
+
termGroupName: z.string().optional()
|
|
15
|
+
});
|
|
14
16
|
class SpoTermSetListCommand extends SpoCommand {
|
|
15
17
|
get name() {
|
|
16
18
|
return commands.TERM_SET_LIST;
|
|
@@ -18,13 +20,14 @@ class SpoTermSetListCommand extends SpoCommand {
|
|
|
18
20
|
get description() {
|
|
19
21
|
return 'Lists taxonomy term sets from the given term group';
|
|
20
22
|
}
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
23
|
+
get schema() {
|
|
24
|
+
return options;
|
|
25
|
+
}
|
|
26
|
+
getRefinedSchema(schema) {
|
|
27
|
+
return schema.refine(opts => [opts.termGroupId, opts.termGroupName].filter(x => x !== undefined).length === 1, {
|
|
28
|
+
message: 'Specify either termGroupId or termGroupName, but not both.',
|
|
29
|
+
params: { customCode: 'optionSet', options: ['termGroupId', 'termGroupName'] }
|
|
30
|
+
});
|
|
28
31
|
}
|
|
29
32
|
defaultProperties() {
|
|
30
33
|
return ['Id', 'Name'];
|
|
@@ -51,54 +54,17 @@ class SpoTermSetListCommand extends SpoCommand {
|
|
|
51
54
|
throw response.ErrorInfo.ErrorMessage;
|
|
52
55
|
}
|
|
53
56
|
const result = json[json.length - 1];
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
});
|
|
61
|
-
await logger.log(result._Child_Items_);
|
|
62
|
-
}
|
|
57
|
+
result._Child_Items_.forEach(t => {
|
|
58
|
+
t.CreatedDate = new Date(Number(t.CreatedDate.replace('/Date(', '').replace(')/', ''))).toISOString();
|
|
59
|
+
t.Id = formatting.extractCsomGuid(t.Id);
|
|
60
|
+
t.LastModifiedDate = new Date(Number(t.LastModifiedDate.replace('/Date(', '').replace(')/', ''))).toISOString();
|
|
61
|
+
});
|
|
62
|
+
await logger.log(result._Child_Items_);
|
|
63
63
|
}
|
|
64
64
|
catch (err) {
|
|
65
65
|
this.handleRejectedODataJsonPromise(err);
|
|
66
66
|
}
|
|
67
67
|
}
|
|
68
68
|
}
|
|
69
|
-
_SpoTermSetListCommand_instances = new WeakSet(), _SpoTermSetListCommand_initTelemetry = function _SpoTermSetListCommand_initTelemetry() {
|
|
70
|
-
this.telemetry.push((args) => {
|
|
71
|
-
Object.assign(this.telemetryProperties, {
|
|
72
|
-
webUrl: typeof args.options.webUrl !== 'undefined',
|
|
73
|
-
termGroupId: typeof args.options.termGroupId !== 'undefined',
|
|
74
|
-
termGroupName: typeof args.options.termGroupName !== 'undefined'
|
|
75
|
-
});
|
|
76
|
-
});
|
|
77
|
-
}, _SpoTermSetListCommand_initOptions = function _SpoTermSetListCommand_initOptions() {
|
|
78
|
-
this.options.unshift({
|
|
79
|
-
option: '-u, --webUrl [webUrl]'
|
|
80
|
-
}, {
|
|
81
|
-
option: '--termGroupId [termGroupId]'
|
|
82
|
-
}, {
|
|
83
|
-
option: '--termGroupName [termGroupName]'
|
|
84
|
-
});
|
|
85
|
-
}, _SpoTermSetListCommand_initValidators = function _SpoTermSetListCommand_initValidators() {
|
|
86
|
-
this.validators.push(async (args) => {
|
|
87
|
-
if (args.options.webUrl) {
|
|
88
|
-
const isValidSharePointUrl = validation.isValidSharePointUrl(args.options.webUrl);
|
|
89
|
-
if (isValidSharePointUrl !== true) {
|
|
90
|
-
return isValidSharePointUrl;
|
|
91
|
-
}
|
|
92
|
-
}
|
|
93
|
-
if (args.options.termGroupId) {
|
|
94
|
-
if (!validation.isValidGuid(args.options.termGroupId)) {
|
|
95
|
-
return `${args.options.termGroupId} is not a valid GUID`;
|
|
96
|
-
}
|
|
97
|
-
}
|
|
98
|
-
return true;
|
|
99
|
-
});
|
|
100
|
-
}, _SpoTermSetListCommand_initOptionSets = function _SpoTermSetListCommand_initOptionSets() {
|
|
101
|
-
this.optionSets.push({ options: ['termGroupId', 'termGroupName'] });
|
|
102
|
-
};
|
|
103
69
|
export default new SpoTermSetListCommand();
|
|
104
70
|
//# sourceMappingURL=term-set-list.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 _SpoThemeApplyCommand_instances, _SpoThemeApplyCommand_initOptions, _SpoThemeApplyCommand_initValidators;
|
|
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';
|
|
@@ -11,15 +7,23 @@ 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
|
+
name: z.string().alias('n'),
|
|
13
|
+
webUrl: z.string().refine(val => validation.isValidSharePointUrl(val) === true, {
|
|
14
|
+
message: 'The value of the webUrl is not a valid SharePoint URL.'
|
|
15
|
+
}).alias('u'),
|
|
16
|
+
sharePointTheme: z.boolean().optional()
|
|
17
|
+
});
|
|
14
18
|
const SharePointThemes = {
|
|
15
|
-
Blue:
|
|
16
|
-
Orange:
|
|
17
|
-
Red:
|
|
18
|
-
Purple:
|
|
19
|
-
Green:
|
|
20
|
-
Gray:
|
|
21
|
-
|
|
22
|
-
|
|
19
|
+
Blue: 'Blue',
|
|
20
|
+
Orange: 'Orange',
|
|
21
|
+
Red: 'Red',
|
|
22
|
+
Purple: 'Purple',
|
|
23
|
+
Green: 'Green',
|
|
24
|
+
Gray: 'Gray',
|
|
25
|
+
'Dark Yellow': 'Dark Yellow',
|
|
26
|
+
'Dark Blue': 'Dark Blue'
|
|
23
27
|
};
|
|
24
28
|
class SpoThemeApplyCommand extends SpoCommand {
|
|
25
29
|
get name() {
|
|
@@ -28,11 +32,14 @@ class SpoThemeApplyCommand extends SpoCommand {
|
|
|
28
32
|
get description() {
|
|
29
33
|
return 'Applies theme to the specified site';
|
|
30
34
|
}
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
35
|
+
get schema() {
|
|
36
|
+
return options;
|
|
37
|
+
}
|
|
38
|
+
getRefinedSchema(schema) {
|
|
39
|
+
return schema
|
|
40
|
+
.refine(opts => !opts.sharePointTheme || (Object.prototype.hasOwnProperty.call(SharePointThemes, opts.name)), {
|
|
41
|
+
message: 'Please check if the theme name is entered correctly.'
|
|
42
|
+
});
|
|
36
43
|
}
|
|
37
44
|
async commandAction(logger, args) {
|
|
38
45
|
const isSharePointTheme = args.options.sharePointTheme ? true : false;
|
|
@@ -93,7 +100,7 @@ class SpoThemeApplyCommand extends SpoCommand {
|
|
|
93
100
|
}
|
|
94
101
|
}
|
|
95
102
|
getSharePointTheme(themeName) {
|
|
96
|
-
let palette;
|
|
103
|
+
let palette = '';
|
|
97
104
|
switch (themeName) {
|
|
98
105
|
case SharePointThemes.Blue:
|
|
99
106
|
palette = "\"themePrimary\":{\"R\":0,\"G\":120,\"B\":212,\"A\":255},\"themeLighterAlt\":{\"R\":239,\"G\":246,\"B\":252,\"A\":255},\"themeLighter\":{\"R\":222,\"G\":236,\"B\":249,\"A\":255},\"themeLight\":{\"R\":199,\"G\":224,\"B\":244,\"A\":255},\"themeTertiary\":{\"R\":113,\"G\":175,\"B\":229,\"A\":255},\"themeSecondary\":{\"R\":43,\"G\":136,\"B\":216,\"A\":255},\"themeDarkAlt\":{\"R\":16,\"G\":110,\"B\":190,\"A\":255},\"themeDark\":{\"R\":0,\"G\":90,\"B\":158,\"A\":255},\"themeDarker\":{\"R\":0,\"G\":69,\"B\":120,\"A\":255},\"accent\":{\"R\":135,\"G\":100,\"B\":184,\"A\":255},\"neutralLighterAlt\":{\"R\":248,\"G\":248,\"B\":248,\"A\":255},\"neutralLighter\":{\"R\":244,\"G\":244,\"B\":244,\"A\":255},\"neutralLight\":{\"R\":234,\"G\":234,\"B\":234,\"A\":255},\"neutralQuaternaryAlt\":{\"R\":218,\"G\":218,\"B\":218,\"A\":255},\"neutralQuaternary\":{\"R\":208,\"G\":208,\"B\":208,\"A\":255},\"neutralTertiaryAlt\":{\"R\":200,\"G\":200,\"B\":200,\"A\":255},\"neutralTertiary\":{\"R\":166,\"G\":166,\"B\":166,\"A\":255},\"neutralSecondary\":{\"R\":102,\"G\":102,\"B\":102,\"A\":255},\"neutralPrimaryAlt\":{\"R\":60,\"G\":60,\"B\":60,\"A\":255},\"neutralPrimary\":{\"R\":51,\"G\":51,\"B\":51,\"A\":255},\"neutralDark\":{\"R\":33,\"G\":33,\"B\":33,\"A\":255},\"black\":{\"R\":0,\"G\":0,\"B\":0,\"A\":255},\"white\":{\"R\":255,\"G\":255,\"B\":255,\"A\":255},\"primaryBackground\":{\"R\":255,\"G\":255,\"B\":255,\"A\":255},\"primaryText\":{\"R\":51,\"G\":51,\"B\":51,\"A\":255}";
|
|
@@ -119,9 +126,6 @@ class SpoThemeApplyCommand extends SpoCommand {
|
|
|
119
126
|
case SharePointThemes["Dark Blue"]:
|
|
120
127
|
palette = "\"themePrimary\":{\"R\":58,\"G\":150,\"B\":221,\"A\":255},\"themeLighterAlt\":{\"R\":2,\"G\":6,\"B\":9,\"A\":255},\"themeLighter\":{\"R\":9,\"G\":24,\"B\":35,\"A\":255},\"themeLight\":{\"R\":17,\"G\":45,\"B\":67,\"A\":255},\"themeTertiary\":{\"R\":35,\"G\":90,\"B\":133,\"A\":255},\"themeSecondary\":{\"R\":51,\"G\":133,\"B\":195,\"A\":255},\"themeDarkAlt\":{\"R\":75,\"G\":160,\"B\":225,\"A\":255},\"themeDark\":{\"R\":101,\"G\":174,\"B\":230,\"A\":255},\"themeDarker\":{\"R\":138,\"G\":194,\"B\":236,\"A\":255},\"accent\":{\"R\":58,\"G\":150,\"B\":221,\"A\":255},\"neutralLighterAlt\":{\"R\":29,\"G\":43,\"B\":60,\"A\":255},\"neutralLighter\":{\"R\":34,\"G\":50,\"B\":68,\"A\":255},\"neutralLight\":{\"R\":43,\"G\":61,\"B\":81,\"A\":255},\"neutralQuaternaryAlt\":{\"R\":50,\"G\":68,\"B\":89,\"A\":255},\"neutralQuaternary\":{\"R\":55,\"G\":74,\"B\":95,\"A\":255},\"neutralTertiaryAlt\":{\"R\":79,\"G\":99,\"B\":122,\"A\":255},\"neutralTertiary\":{\"R\":200,\"G\":200,\"B\":200,\"A\":255},\"neutralSecondary\":{\"R\":208,\"G\":208,\"B\":208,\"A\":255},\"neutralPrimaryAlt\":{\"R\":218,\"G\":218,\"B\":218,\"A\":255},\"neutralPrimary\":{\"R\":255,\"G\":255,\"B\":255,\"A\":255},\"neutralDark\":{\"R\":244,\"G\":244,\"B\":244,\"A\":255},\"black\":{\"R\":248,\"G\":248,\"B\":248,\"A\":255},\"white\":{\"R\":24,\"G\":37,\"B\":52,\"A\":255},\"primaryBackground\":{\"R\":24,\"G\":37,\"B\":52,\"A\":255},\"primaryText\":{\"R\":255,\"G\":255,\"B\":255,\"A\":255}";
|
|
121
128
|
break;
|
|
122
|
-
default:
|
|
123
|
-
palette = "";
|
|
124
|
-
break;
|
|
125
129
|
}
|
|
126
130
|
return `{
|
|
127
131
|
'name': '${themeName}' ,
|
|
@@ -129,25 +133,5 @@ class SpoThemeApplyCommand extends SpoCommand {
|
|
|
129
133
|
}`;
|
|
130
134
|
}
|
|
131
135
|
}
|
|
132
|
-
_SpoThemeApplyCommand_instances = new WeakSet(), _SpoThemeApplyCommand_initOptions = function _SpoThemeApplyCommand_initOptions() {
|
|
133
|
-
this.options.unshift({
|
|
134
|
-
option: '-n, --name <name>'
|
|
135
|
-
}, {
|
|
136
|
-
option: '-u, --webUrl <webUrl>'
|
|
137
|
-
}, {
|
|
138
|
-
option: '--sharePointTheme'
|
|
139
|
-
});
|
|
140
|
-
}, _SpoThemeApplyCommand_initValidators = function _SpoThemeApplyCommand_initValidators() {
|
|
141
|
-
this.validators.push(async (args) => {
|
|
142
|
-
const isValidSharePointUrl = validation.isValidSharePointUrl(args.options.webUrl);
|
|
143
|
-
if (isValidSharePointUrl !== true) {
|
|
144
|
-
return isValidSharePointUrl;
|
|
145
|
-
}
|
|
146
|
-
if (args.options.sharePointTheme && !(args.options.name in SharePointThemes)) {
|
|
147
|
-
return 'Please check if the theme name is entered correctly.';
|
|
148
|
-
}
|
|
149
|
-
return true;
|
|
150
|
-
});
|
|
151
|
-
};
|
|
152
136
|
export default new SpoThemeApplyCommand();
|
|
153
137
|
//# sourceMappingURL=theme-apply.js.map
|