@pnp/cli-microsoft365 7.2.0-beta.f440e15 → 7.3.0-beta.16c6462
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/.devcontainer/Dockerfile +0 -1
- package/.eslintrc.cjs +2 -0
- package/Dockerfile +0 -1
- package/allCommands.json +1 -0
- package/allCommandsFull.json +1 -0
- package/dist/Auth.js +1 -1
- package/dist/Command.js +18 -28
- package/dist/api.js +5 -7
- package/dist/appInsights.js +2 -1
- package/dist/chili/chili.js +40 -51
- package/dist/cli/Cli.js +121 -131
- package/dist/cli/timings.js +9 -0
- package/dist/index.js +1 -15
- package/dist/m365/aad/commands/administrativeunit/administrativeunit-add.js +3 -3
- package/dist/m365/aad/commands/administrativeunit/administrativeunit-get.js +2 -15
- package/dist/m365/aad/commands/administrativeunit/administrativeunit-remove.js +5 -22
- package/dist/m365/aad/commands/app/app-remove.js +2 -7
- package/dist/m365/aad/commands/app/app-role-remove.js +2 -7
- package/dist/m365/aad/commands/approleassignment/approleassignment-remove.js +2 -7
- package/dist/m365/aad/commands/group/group-remove.js +2 -7
- package/dist/m365/aad/commands/groupsetting/groupsetting-remove.js +2 -7
- package/dist/m365/aad/commands/m365group/m365group-recyclebinitem-clear.js +2 -7
- package/dist/m365/aad/commands/m365group/m365group-recyclebinitem-remove.js +2 -7
- package/dist/m365/aad/commands/m365group/m365group-remove.js +2 -7
- package/dist/m365/aad/commands/m365group/m365group-user-remove.js +2 -7
- package/dist/m365/aad/commands/oauth2grant/oauth2grant-remove.js +2 -7
- package/dist/m365/aad/commands/siteclassification/siteclassification-disable.js +2 -7
- package/dist/m365/aad/commands/user/user-license-remove.js +2 -7
- package/dist/m365/aad/commands/user/user-recyclebinitem-clear.js +2 -7
- package/dist/m365/aad/commands/user/user-recyclebinitem-remove.js +2 -7
- package/dist/m365/aad/commands/user/user-remove.js +2 -7
- package/dist/m365/cli/commands/config/config-set.js +13 -0
- package/dist/m365/commands/login.js +12 -8
- package/dist/m365/commands/setup.js +31 -37
- package/dist/m365/context/commands/context-remove.js +2 -7
- package/dist/m365/context/commands/option/option-remove.js +2 -7
- package/dist/m365/{search/commands/externalconnection/externalconnection-add.js → external/commands/connection/connection-add.js} +16 -13
- package/dist/m365/external/commands/connection/connection-doctor.js +424 -0
- package/dist/m365/{search/commands/externalconnection/externalconnection-get.js → external/commands/connection/connection-get.js} +16 -13
- package/dist/m365/{search/commands/externalconnection/externalconnection-list.js → external/commands/connection/connection-list.js} +7 -4
- package/dist/m365/{search/commands/externalconnection/externalconnection-remove.js → external/commands/connection/connection-remove.js} +19 -21
- package/dist/m365/{search/commands/externalconnection/externalconnection-schema-add.js → external/commands/connection/connection-schema-add.js} +14 -11
- package/dist/m365/external/commands/item/item-add.js +144 -0
- package/dist/m365/external/commands.js +17 -0
- package/dist/m365/flow/commands/environment/environment-list.js +6 -4
- package/dist/m365/flow/commands/flow-remove.js +2 -7
- package/dist/m365/flow/commands/owner/owner-remove.js +2 -7
- package/dist/m365/flow/commands/run/run-cancel.js +2 -7
- package/dist/m365/flow/commands/run/run-resubmit.js +2 -7
- package/dist/m365/graph/commands/schemaextension/schemaextension-remove.js +2 -7
- package/dist/m365/pa/commands/app/app-consent-set.js +2 -7
- package/dist/m365/pa/commands/app/app-permission-remove.js +2 -7
- package/dist/m365/pa/commands/app/app-remove.js +2 -7
- package/dist/m365/planner/commands/bucket/bucket-remove.js +2 -7
- package/dist/m365/planner/commands/plan/plan-remove.js +2 -7
- package/dist/m365/planner/commands/roster/roster-member-remove.js +4 -14
- package/dist/m365/planner/commands/roster/roster-remove.js +2 -7
- package/dist/m365/planner/commands/task/task-checklistitem-remove.js +2 -7
- package/dist/m365/planner/commands/task/task-reference-remove.js +2 -7
- package/dist/m365/planner/commands/task/task-remove.js +2 -7
- package/dist/m365/pp/commands/aibuildermodel/aibuildermodel-remove.js +2 -7
- package/dist/m365/pp/commands/card/card-remove.js +2 -7
- package/dist/m365/pp/commands/chatbot/chatbot-remove.js +2 -7
- package/dist/m365/pp/commands/dataverse/dataverse-table-remove.js +2 -7
- package/dist/m365/pp/commands/dataverse/dataverse-table-row-remove.js +2 -7
- package/dist/m365/pp/commands/solution/solution-publisher-remove.js +2 -7
- package/dist/m365/pp/commands/solution/solution-remove.js +2 -7
- package/dist/m365/purview/commands/retentionevent/retentionevent-remove.js +2 -7
- package/dist/m365/purview/commands/retentioneventtype/retentioneventtype-remove.js +2 -7
- package/dist/m365/purview/commands/retentionlabel/retentionlabel-remove.js +2 -7
- package/dist/m365/spfx/commands/project/DeployWorkflow.js +4 -4
- package/dist/m365/spfx/commands/project/project-doctor/{doctor-1.18.1-rc.0.js → doctor-1.18.1.js} +1 -1
- package/dist/m365/spfx/commands/project/project-doctor/doctor-1.18.2.js +21 -0
- package/dist/m365/spfx/commands/project/project-doctor.js +6 -3
- package/dist/m365/spfx/commands/project/project-github-workflow-add.js +17 -0
- package/dist/m365/spfx/commands/project/project-upgrade/{upgrade-1.18.1-rc.0.js → upgrade-1.18.1.js} +26 -26
- package/dist/m365/spfx/commands/project/project-upgrade/upgrade-1.18.2.js +53 -0
- package/dist/m365/spfx/commands/project/project-upgrade.js +18 -17
- package/dist/m365/spfx/commands/spfx-doctor.js +16 -1
- package/dist/m365/spo/commands/app/app-remove.js +2 -7
- package/dist/m365/spo/commands/app/app-retract.js +2 -7
- package/dist/m365/spo/commands/app/app-uninstall.js +2 -7
- package/dist/m365/spo/commands/applicationcustomizer/applicationcustomizer-remove.js +2 -7
- package/dist/m365/spo/commands/cdn/cdn-origin-remove.js +2 -7
- package/dist/m365/spo/commands/commandset/commandset-remove.js +2 -7
- package/dist/m365/spo/commands/contenttype/contenttype-field-remove.js +2 -7
- package/dist/m365/spo/commands/contenttype/contenttype-remove.js +2 -2
- package/dist/m365/spo/commands/customaction/customaction-clear.js +2 -7
- package/dist/m365/spo/commands/customaction/customaction-remove.js +2 -7
- package/dist/m365/spo/commands/eventreceiver/eventreceiver-remove.js +2 -7
- package/dist/m365/spo/commands/field/field-remove.js +2 -7
- package/dist/m365/spo/commands/file/file-checkout-undo.js +2 -7
- package/dist/m365/spo/commands/file/file-remove.js +2 -7
- package/dist/m365/spo/commands/file/file-retentionlabel-ensure.js +14 -23
- package/dist/m365/spo/commands/file/file-retentionlabel-remove.js +21 -34
- package/dist/m365/spo/commands/file/file-roleassignment-remove.js +2 -7
- package/dist/m365/spo/commands/file/file-roleinheritance-break.js +2 -7
- package/dist/m365/spo/commands/file/file-roleinheritance-reset.js +2 -7
- package/dist/m365/spo/commands/file/file-sharinglink-clear.js +2 -7
- package/dist/m365/spo/commands/file/file-sharinglink-remove.js +2 -7
- package/dist/m365/spo/commands/file/file-version-clear.js +2 -7
- package/dist/m365/spo/commands/file/file-version-remove.js +2 -7
- package/dist/m365/spo/commands/file/file-version-restore.js +2 -7
- package/dist/m365/spo/commands/folder/folder-remove.js +2 -7
- package/dist/m365/spo/commands/folder/folder-retentionlabel-ensure.js +9 -29
- package/dist/m365/spo/commands/folder/folder-retentionlabel-remove.js +11 -35
- package/dist/m365/spo/commands/folder/folder-roleassignment-remove.js +2 -7
- package/dist/m365/spo/commands/folder/folder-roleinheritance-break.js +2 -7
- package/dist/m365/spo/commands/folder/folder-roleinheritance-reset.js +2 -7
- package/dist/m365/spo/commands/group/group-member-remove.js +2 -7
- package/dist/m365/spo/commands/group/group-remove.js +2 -7
- package/dist/m365/spo/commands/homesite/homesite-remove.js +2 -7
- package/dist/m365/spo/commands/hubsite/hubsite-disconnect.js +2 -7
- package/dist/m365/spo/commands/hubsite/hubsite-rights-revoke.js +2 -7
- package/dist/m365/spo/commands/hubsite/hubsite-unregister.js +2 -7
- package/dist/m365/spo/commands/knowledgehub/knowledgehub-remove.js +2 -7
- package/dist/m365/spo/commands/list/list-contenttype-remove.js +2 -7
- package/dist/m365/spo/commands/list/list-remove.js +2 -7
- package/dist/m365/spo/commands/list/list-retentionlabel-ensure.js +27 -37
- package/dist/m365/spo/commands/list/list-retentionlabel-remove.js +8 -26
- package/dist/m365/spo/commands/list/list-roleassignment-remove.js +2 -7
- package/dist/m365/spo/commands/list/list-roleinheritance-break.js +2 -7
- package/dist/m365/spo/commands/list/list-roleinheritance-reset.js +2 -7
- package/dist/m365/spo/commands/list/list-view-field-remove.js +2 -7
- package/dist/m365/spo/commands/list/list-view-remove.js +2 -7
- package/dist/m365/spo/commands/list/list-webhook-remove.js +2 -7
- package/dist/m365/spo/commands/listitem/listitem-attachment-remove.js +2 -7
- package/dist/m365/spo/commands/listitem/listitem-batch-add.js +5 -0
- package/dist/m365/spo/commands/listitem/listitem-remove.js +2 -7
- package/dist/m365/spo/commands/listitem/listitem-retentionlabel-ensure.js +36 -37
- package/dist/m365/spo/commands/listitem/listitem-retentionlabel-remove.js +38 -39
- package/dist/m365/spo/commands/listitem/listitem-roleassignment-remove.js +2 -7
- package/dist/m365/spo/commands/listitem/listitem-roleinheritance-break.js +2 -7
- package/dist/m365/spo/commands/listitem/listitem-roleinheritance-reset.js +2 -7
- package/dist/m365/spo/commands/navigation/navigation-node-remove.js +2 -7
- package/dist/m365/spo/commands/orgassetslibrary/orgassetslibrary-remove.js +2 -7
- package/dist/m365/spo/commands/orgnewssite/orgnewssite-remove.js +2 -7
- package/dist/m365/spo/commands/page/page-remove.js +2 -7
- package/dist/m365/spo/commands/propertybag/propertybag-remove.js +2 -7
- package/dist/m365/spo/commands/roledefinition/roledefinition-remove.js +2 -7
- package/dist/m365/spo/commands/serviceprincipal/serviceprincipal-grant-revoke.js +49 -12
- package/dist/m365/spo/commands/serviceprincipal/serviceprincipal-set.js +2 -7
- package/dist/m365/spo/commands/site/site-add.js +45 -12
- package/dist/m365/spo/commands/site/site-apppermission-remove.js +2 -7
- package/dist/m365/spo/commands/site/site-hubsite-disconnect.js +2 -7
- package/dist/m365/spo/commands/site/site-recyclebinitem-clear.js +2 -7
- package/dist/m365/spo/commands/site/site-recyclebinitem-move.js +2 -7
- package/dist/m365/spo/commands/site/site-recyclebinitem-remove.js +2 -7
- package/dist/m365/spo/commands/site/site-remove.js +2 -7
- package/dist/m365/spo/commands/site/site-set.js +33 -1
- package/dist/m365/spo/commands/sitedesign/sitedesign-remove.js +2 -7
- package/dist/m365/spo/commands/sitedesign/sitedesign-rights-revoke.js +2 -7
- package/dist/m365/spo/commands/sitedesign/sitedesign-task-remove.js +2 -7
- package/dist/m365/spo/commands/sitescript/sitescript-get.js +8 -2
- package/dist/m365/spo/commands/sitescript/sitescript-remove.js +2 -7
- package/dist/m365/spo/commands/storageentity/storageentity-remove.js +2 -7
- package/dist/m365/spo/commands/tenant/tenant-applicationcustomizer-remove.js +2 -7
- package/dist/m365/spo/commands/tenant/tenant-commandset-remove.js +2 -7
- package/dist/m365/spo/commands/tenant/tenant-recyclebinitem-remove.js +2 -7
- package/dist/m365/spo/commands/tenant/tenant-recyclebinitem-restore.js +19 -2
- package/dist/m365/spo/commands/theme/theme-remove.js +2 -7
- package/dist/m365/spo/commands/user/user-remove.js +2 -7
- package/dist/m365/spo/commands/web/web-remove.js +2 -7
- package/dist/m365/spo/commands/web/web-roleassignment-remove.js +2 -7
- package/dist/m365/spo/commands/web/web-roleinheritance-break.js +2 -7
- package/dist/m365/spo/commands/web/web-roleinheritance-reset.js +2 -7
- package/dist/m365/teams/commands/app/app-remove.js +2 -7
- package/dist/m365/teams/commands/app/app-uninstall.js +2 -7
- package/dist/m365/teams/commands/cache/cache-remove.js +2 -7
- package/dist/m365/teams/commands/channel/channel-member-remove.js +2 -7
- package/dist/m365/teams/commands/channel/channel-remove.js +2 -7
- package/dist/m365/teams/commands/chat/chat-member-remove.js +2 -7
- package/dist/m365/teams/commands/tab/tab-remove.js +2 -7
- package/dist/m365/teams/commands/team/team-remove.js +2 -7
- package/dist/m365/teams/commands/user/user-app-remove.js +51 -12
- package/dist/m365/tenant/commands/people/people-profilecardproperty-add.js +131 -0
- package/dist/m365/tenant/commands/people/people-profilecardproperty-get.js +75 -0
- package/dist/m365/tenant/commands/people/people-profilecardproperty-list.js +53 -0
- package/dist/m365/tenant/commands/people/people-profilecardproperty-remove.js +79 -0
- package/dist/m365/tenant/commands/people/people-profilecardproperty-set.js +118 -0
- package/dist/m365/tenant/commands/people/profileCardProperties.js +24 -0
- package/dist/m365/tenant/commands.js +5 -0
- package/dist/m365/todo/commands/list/list-remove.js +2 -7
- package/dist/m365/todo/commands/task/task-remove.js +2 -7
- package/dist/m365/yammer/commands/group/group-user-remove.js +2 -7
- package/dist/m365/yammer/commands/message/message-like-set.js +3 -8
- package/dist/m365/yammer/commands/message/message-remove.js +2 -7
- package/dist/request.js +6 -0
- package/dist/settingsNames.js +2 -0
- package/dist/telemetry.js +0 -8
- package/dist/utils/aadAdministrativeUnit.js +25 -0
- package/dist/utils/prompt.js +30 -7
- package/dist/utils/spo.js +109 -0
- package/docs/docs/_clisettings.mdx +2 -0
- package/docs/docs/cmd/aad/administrativeunit/administrativeunit-add.mdx +6 -2
- package/docs/docs/cmd/aad/administrativeunit/administrativeunit-get.mdx +5 -1
- package/docs/docs/cmd/aad/administrativeunit/administrativeunit-list.mdx +5 -1
- package/docs/docs/cmd/aad/administrativeunit/administrativeunit-remove.mdx +6 -2
- package/docs/docs/cmd/aad/approleassignment/approleassignment-add.mdx +1 -1
- package/docs/docs/cmd/aad/approleassignment/approleassignment-list.mdx +2 -2
- package/docs/docs/cmd/aad/approleassignment/approleassignment-remove.mdx +1 -1
- package/docs/docs/cmd/aad/oauth2grant/oauth2grant-add.mdx +1 -1
- package/docs/docs/cmd/aad/oauth2grant/oauth2grant-list.mdx +2 -2
- package/docs/docs/cmd/aad/oauth2grant/oauth2grant-remove.mdx +2 -2
- package/docs/docs/cmd/aad/oauth2grant/oauth2grant-set.mdx +2 -2
- package/docs/docs/cmd/aad/policy/policy-list.mdx +1 -1
- package/docs/docs/cmd/aad/siteclassification/siteclassification-disable.mdx +1 -1
- package/docs/docs/cmd/aad/siteclassification/siteclassification-enable.mdx +1 -1
- package/docs/docs/cmd/aad/siteclassification/siteclassification-get.mdx +1 -1
- package/docs/docs/cmd/aad/siteclassification/siteclassification-set.mdx +1 -1
- package/docs/docs/cmd/aad/sp/sp-add.mdx +2 -2
- package/docs/docs/cmd/aad/sp/sp-get.mdx +2 -2
- package/docs/docs/cmd/aad/user/user-add.mdx +3 -3
- package/docs/docs/cmd/aad/user/user-guest-add.mdx +1 -1
- package/docs/docs/cmd/aad/user/user-set.mdx +3 -3
- package/docs/docs/cmd/{search/externalconnection/externalconnection-add.mdx → external/connection/connection-add.mdx} +16 -10
- package/docs/docs/cmd/external/connection/connection-doctor.mdx +179 -0
- package/docs/docs/cmd/{search/externalconnection/externalconnection-get.mdx → external/connection/connection-get.mdx} +16 -11
- package/docs/docs/cmd/{search/externalconnection/externalconnection-list.mdx → external/connection/connection-list.mdx} +12 -7
- package/docs/docs/cmd/external/connection/connection-remove.mdx +54 -0
- package/docs/docs/cmd/external/connection/connection-schema-add.mdx +41 -0
- package/docs/docs/cmd/external/item/item-add.mdx +145 -0
- package/docs/docs/cmd/flow/run/run-cancel.mdx +3 -0
- package/docs/docs/cmd/graph/changelog/changelog-list.mdx +5 -5
- package/docs/docs/cmd/login.mdx +1 -1
- package/docs/docs/cmd/onenote/notebook/notebook-list.mdx +1 -1
- package/docs/docs/cmd/outlook/message/message-list.mdx +1 -1
- package/docs/docs/cmd/outlook/message/message-move.mdx +1 -1
- package/docs/docs/cmd/planner/bucket/bucket-add.mdx +1 -1
- package/docs/docs/cmd/planner/bucket/bucket-set.mdx +1 -1
- package/docs/docs/cmd/planner/plan/plan-set.mdx +3 -3
- package/docs/docs/cmd/planner/task/task-set.mdx +1 -1
- package/docs/docs/cmd/purview/auditlog/auditlog-list.mdx +3 -3
- package/docs/docs/cmd/purview/retentionevent/retentionevent-add.mdx +1 -1
- package/docs/docs/cmd/purview/retentionevent/retentionevent-get.mdx +1 -1
- package/docs/docs/cmd/purview/retentioneventtype/retentioneventtype-add.mdx +1 -1
- package/docs/docs/cmd/purview/retentioneventtype/retentioneventtype-get.mdx +1 -1
- package/docs/docs/cmd/purview/retentioneventtype/retentioneventtype-remove.mdx +1 -1
- package/docs/docs/cmd/purview/retentioneventtype/retentioneventtype-set.mdx +1 -1
- package/docs/docs/cmd/purview/retentionlabel/retentionlabel-add.mdx +1 -1
- package/docs/docs/cmd/purview/sensitivitylabel/sensitivitylabel-policysettings-list.mdx +4 -4
- package/docs/docs/cmd/spfx/project/project-upgrade.mdx +1 -1
- package/docs/docs/cmd/spo/app/app-add.mdx +1 -1
- package/docs/docs/cmd/spo/app/app-deploy.mdx +1 -1
- package/docs/docs/cmd/spo/app/app-get.mdx +1 -1
- package/docs/docs/cmd/spo/app/app-install.mdx +1 -1
- package/docs/docs/cmd/spo/app/app-list.mdx +1 -1
- package/docs/docs/cmd/spo/app/app-remove.mdx +1 -1
- package/docs/docs/cmd/spo/app/app-retract.mdx +1 -1
- package/docs/docs/cmd/spo/app/app-uninstall.mdx +1 -1
- package/docs/docs/cmd/spo/app/app-upgrade.mdx +1 -1
- package/docs/docs/cmd/spo/contenttype/contenttype-add.mdx +1 -1
- package/docs/docs/cmd/spo/contenttype/contenttype-set.mdx +1 -1
- package/docs/docs/cmd/spo/file/file-rename.mdx +2 -0
- package/docs/docs/cmd/spo/hidedefaultthemes/hidedefaultthemes-get.mdx +1 -1
- package/docs/docs/cmd/spo/hidedefaultthemes/hidedefaultthemes-set.mdx +1 -1
- package/docs/docs/cmd/spo/serviceprincipal/serviceprincipal-grant-revoke.mdx +10 -1
- package/docs/docs/cmd/spo/site/site-add.mdx +25 -4
- package/docs/docs/cmd/spo/site/site-appcatalog-add.mdx +1 -1
- package/docs/docs/cmd/spo/site/site-appcatalog-remove.mdx +1 -1
- package/docs/docs/cmd/spo/site/site-groupify.mdx +1 -1
- package/docs/docs/cmd/spo/site/site-set.mdx +15 -0
- package/docs/docs/cmd/spo/sitedesign/sitedesign-add.mdx +3 -3
- package/docs/docs/cmd/spo/sitedesign/sitedesign-apply.mdx +1 -1
- package/docs/docs/cmd/spo/sitedesign/sitedesign-get.mdx +1 -1
- package/docs/docs/cmd/spo/sitedesign/sitedesign-list.mdx +1 -1
- package/docs/docs/cmd/spo/sitedesign/sitedesign-remove.mdx +1 -1
- package/docs/docs/cmd/spo/sitedesign/sitedesign-rights-grant.mdx +1 -1
- package/docs/docs/cmd/spo/sitedesign/sitedesign-rights-list.mdx +1 -1
- package/docs/docs/cmd/spo/sitedesign/sitedesign-rights-revoke.mdx +1 -1
- package/docs/docs/cmd/spo/sitedesign/sitedesign-run-list.mdx +1 -1
- package/docs/docs/cmd/spo/sitedesign/sitedesign-run-status-get.mdx +1 -1
- package/docs/docs/cmd/spo/sitedesign/sitedesign-set.mdx +3 -3
- package/docs/docs/cmd/spo/sitedesign/sitedesign-task-get.mdx +1 -1
- package/docs/docs/cmd/spo/sitedesign/sitedesign-task-list.mdx +1 -1
- package/docs/docs/cmd/spo/sitedesign/sitedesign-task-remove.mdx +1 -1
- package/docs/docs/cmd/spo/sitescript/sitescript-add.mdx +1 -1
- package/docs/docs/cmd/spo/sitescript/sitescript-get.mdx +73 -3
- package/docs/docs/cmd/spo/sitescript/sitescript-list.mdx +1 -1
- package/docs/docs/cmd/spo/sitescript/sitescript-remove.mdx +1 -1
- package/docs/docs/cmd/spo/sitescript/sitescript-set.mdx +1 -1
- package/docs/docs/cmd/spo/storageentity/storageentity-get.mdx +1 -1
- package/docs/docs/cmd/spo/storageentity/storageentity-list.mdx +1 -1
- package/docs/docs/cmd/spo/storageentity/storageentity-remove.mdx +1 -1
- package/docs/docs/cmd/spo/storageentity/storageentity-set.mdx +1 -1
- package/docs/docs/cmd/spo/theme/theme-apply.mdx +1 -1
- package/docs/docs/cmd/spo/theme/theme-get.mdx +1 -1
- package/docs/docs/cmd/spo/theme/theme-list.mdx +1 -1
- package/docs/docs/cmd/spo/theme/theme-remove.mdx +1 -1
- package/docs/docs/cmd/spo/user/user-remove.mdx +1 -1
- package/docs/docs/cmd/spo/web/web-set.mdx +1 -1
- package/docs/docs/cmd/teams/channel/channel-remove.mdx +1 -1
- package/docs/docs/cmd/teams/meeting/meeting-get.mdx +1 -1
- package/docs/docs/cmd/teams/meeting/meeting-transcript-list.mdx +1 -1
- package/docs/docs/cmd/teams/report/report-pstncalls.mdx +1 -1
- package/docs/docs/cmd/teams/tab/tab-remove.mdx +1 -1
- package/docs/docs/cmd/teams/team/team-remove.mdx +1 -1
- package/docs/docs/cmd/teams/user/user-app-remove.mdx +23 -5
- package/docs/docs/cmd/tenant/people/people-profilecardproperty-add.mdx +126 -0
- package/docs/docs/cmd/tenant/people/people-profilecardproperty-get.mdx +101 -0
- package/docs/docs/cmd/tenant/people/people-profilecardproperty-list.mdx +98 -0
- package/docs/docs/cmd/tenant/people/people-profilecardproperty-remove.mdx +61 -0
- package/docs/docs/cmd/tenant/people/people-profilecardproperty-set.mdx +120 -0
- package/docs/docs/cmd/tenant/serviceannouncement/serviceannouncement-healthissue-list.mdx +1 -1
- package/docs/docs/cmd/tenant/serviceannouncement/serviceannouncement-message-get.mdx +1 -1
- package/docs/docs/cmd/tenant/serviceannouncement/serviceannouncement-message-list.mdx +1 -1
- package/docs/docs/cmd/todo/task/task-set.mdx +1 -1
- package/npm-shrinkwrap.json +609 -569
- package/package.json +36 -37
- package/dist/m365/search/commands.js +0 -9
- package/docs/docs/cmd/search/externalconnection/externalconnection-remove.mdx +0 -48
- package/docs/docs/cmd/search/externalconnection/externalconnection-schema-add.mdx +0 -35
|
@@ -0,0 +1,424 @@
|
|
|
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 _ExternalConnectionDoctorCommand_instances, _a, _ExternalConnectionDoctorCommand_initOptions, _ExternalConnectionDoctorCommand_initValidators;
|
|
7
|
+
import os from 'os';
|
|
8
|
+
import { Cli } from '../../../../cli/Cli.js';
|
|
9
|
+
import request from '../../../../request.js';
|
|
10
|
+
import { settingsNames } from '../../../../settingsNames.js';
|
|
11
|
+
import GraphCommand from '../../../base/GraphCommand.js';
|
|
12
|
+
import commands from '../../commands.js';
|
|
13
|
+
class ExternalConnectionDoctorCommand extends GraphCommand {
|
|
14
|
+
get name() {
|
|
15
|
+
return commands.CONNECTION_DOCTOR;
|
|
16
|
+
}
|
|
17
|
+
get description() {
|
|
18
|
+
return 'Checks if the external connection is correctly configured for use with the specified Microsoft 365 experience';
|
|
19
|
+
}
|
|
20
|
+
constructor() {
|
|
21
|
+
super();
|
|
22
|
+
_ExternalConnectionDoctorCommand_instances.add(this);
|
|
23
|
+
this.checksStatus = [];
|
|
24
|
+
__classPrivateFieldGet(this, _ExternalConnectionDoctorCommand_instances, "m", _ExternalConnectionDoctorCommand_initOptions).call(this);
|
|
25
|
+
__classPrivateFieldGet(this, _ExternalConnectionDoctorCommand_instances, "m", _ExternalConnectionDoctorCommand_initValidators).call(this);
|
|
26
|
+
}
|
|
27
|
+
async commandAction(logger, args) {
|
|
28
|
+
const ux = args.options.ux ?? 'all';
|
|
29
|
+
const output = args.options.output;
|
|
30
|
+
this.checksStatus = [];
|
|
31
|
+
const cli = Cli.getInstance();
|
|
32
|
+
const showSpinner = cli.getSettingWithDefaultValue(settingsNames.showSpinner, true) &&
|
|
33
|
+
output === 'text' &&
|
|
34
|
+
typeof global.it === 'undefined';
|
|
35
|
+
let checks = [
|
|
36
|
+
{
|
|
37
|
+
id: 'loadExternalConnection',
|
|
38
|
+
text: 'Load connection',
|
|
39
|
+
fn: this.loadConnection,
|
|
40
|
+
type: 'required'
|
|
41
|
+
},
|
|
42
|
+
{
|
|
43
|
+
id: 'loadSchema',
|
|
44
|
+
text: 'Load schema',
|
|
45
|
+
fn: this.loadSchema,
|
|
46
|
+
type: 'required'
|
|
47
|
+
}
|
|
48
|
+
];
|
|
49
|
+
if (ux === 'copilot' || ux === 'all') {
|
|
50
|
+
checks.push({
|
|
51
|
+
id: 'copilotRequiredSemanticLabels',
|
|
52
|
+
text: 'Required semantic labels',
|
|
53
|
+
fn: this.checkCopilotRequiredSemanticLabels,
|
|
54
|
+
type: 'required'
|
|
55
|
+
}, {
|
|
56
|
+
id: 'searchableProperties',
|
|
57
|
+
text: 'Searchable properties',
|
|
58
|
+
fn: this.checkSearchableProperties,
|
|
59
|
+
type: 'required'
|
|
60
|
+
}, {
|
|
61
|
+
id: 'contentIngested',
|
|
62
|
+
text: 'Items have content ingested',
|
|
63
|
+
fn: this.checkContentIngested,
|
|
64
|
+
type: 'required'
|
|
65
|
+
}, {
|
|
66
|
+
id: 'enabledForInlineResults',
|
|
67
|
+
text: 'Connection configured for inline results',
|
|
68
|
+
type: 'required'
|
|
69
|
+
}, {
|
|
70
|
+
id: 'itemsHaveActivities',
|
|
71
|
+
text: 'Items have activities recorded',
|
|
72
|
+
type: 'recommended'
|
|
73
|
+
}, {
|
|
74
|
+
id: 'meaningfulNameAndDescription',
|
|
75
|
+
text: 'Meaningful connection name and description',
|
|
76
|
+
type: 'required'
|
|
77
|
+
});
|
|
78
|
+
}
|
|
79
|
+
if (ux === 'search' || ux === 'all') {
|
|
80
|
+
checks.push({
|
|
81
|
+
id: 'semanticLabels',
|
|
82
|
+
text: 'Semantic labels',
|
|
83
|
+
fn: this.checkSemanticLabels,
|
|
84
|
+
type: 'recommended'
|
|
85
|
+
}, {
|
|
86
|
+
id: 'searchableProperties',
|
|
87
|
+
text: 'Searchable properties',
|
|
88
|
+
fn: this.checkSearchableProperties,
|
|
89
|
+
type: 'recommended'
|
|
90
|
+
}, {
|
|
91
|
+
id: 'resultType',
|
|
92
|
+
text: 'Result type',
|
|
93
|
+
fn: this.checkResultType,
|
|
94
|
+
type: 'recommended'
|
|
95
|
+
}, {
|
|
96
|
+
id: 'contentIngested',
|
|
97
|
+
text: 'Items have content ingested',
|
|
98
|
+
fn: this.checkContentIngested,
|
|
99
|
+
type: 'recommended'
|
|
100
|
+
}, {
|
|
101
|
+
id: 'itemsHaveActivities',
|
|
102
|
+
text: 'Items have activities recorded',
|
|
103
|
+
type: 'recommended'
|
|
104
|
+
});
|
|
105
|
+
}
|
|
106
|
+
checks.push({
|
|
107
|
+
id: 'urlToItemResolver',
|
|
108
|
+
text: 'urlToItemResolver configured',
|
|
109
|
+
fn: this.checkUrlToItemResolverConfigured,
|
|
110
|
+
type: 'recommended'
|
|
111
|
+
});
|
|
112
|
+
// filter out duplicate checks based on their IDs
|
|
113
|
+
checks = checks.filter((check, index, self) => self.findIndex(c => c.id === check.id) === index);
|
|
114
|
+
for (const check of checks) {
|
|
115
|
+
if (this.debug) {
|
|
116
|
+
logger.logToStderr(`Running check ${check.id}...`);
|
|
117
|
+
}
|
|
118
|
+
// don't show spinner if running tests
|
|
119
|
+
/* c8 ignore next 3 */
|
|
120
|
+
if (showSpinner) {
|
|
121
|
+
cli.spinner.start(check.text);
|
|
122
|
+
}
|
|
123
|
+
// only automated checks have functions
|
|
124
|
+
if (!check.fn) {
|
|
125
|
+
// don't show spinner if running tests
|
|
126
|
+
/* c8 ignore next 3 */
|
|
127
|
+
if (showSpinner) {
|
|
128
|
+
cli.spinner.info(`${check.text} (manual)`);
|
|
129
|
+
}
|
|
130
|
+
this.checksStatus.push({
|
|
131
|
+
...check,
|
|
132
|
+
status: 'manual'
|
|
133
|
+
});
|
|
134
|
+
continue;
|
|
135
|
+
}
|
|
136
|
+
const result = await check.fn.bind(this)(check.id, args);
|
|
137
|
+
this.checksStatus.push({ ...check, ...result });
|
|
138
|
+
if (result.status === 'passed') {
|
|
139
|
+
// don't show spinner if running tests
|
|
140
|
+
/* c8 ignore next 3 */
|
|
141
|
+
if (showSpinner) {
|
|
142
|
+
cli.spinner.succeed();
|
|
143
|
+
}
|
|
144
|
+
continue;
|
|
145
|
+
}
|
|
146
|
+
if (result.status === 'failed') {
|
|
147
|
+
// don't show spinner if running tests
|
|
148
|
+
/* c8 ignore next 9 */
|
|
149
|
+
if (showSpinner) {
|
|
150
|
+
const message = `${check.text}: ${result.errorMessage}`;
|
|
151
|
+
if (check.type === 'required') {
|
|
152
|
+
cli.spinner.fail(message);
|
|
153
|
+
}
|
|
154
|
+
else {
|
|
155
|
+
cli.spinner.warn(message);
|
|
156
|
+
}
|
|
157
|
+
}
|
|
158
|
+
if (result.shouldStop) {
|
|
159
|
+
break;
|
|
160
|
+
}
|
|
161
|
+
}
|
|
162
|
+
}
|
|
163
|
+
if (output === 'text' || output === 'none') {
|
|
164
|
+
return;
|
|
165
|
+
}
|
|
166
|
+
this.checksStatus.forEach(s => {
|
|
167
|
+
delete s.data;
|
|
168
|
+
delete s.fn;
|
|
169
|
+
delete s.shouldStop;
|
|
170
|
+
});
|
|
171
|
+
if (output === 'json' || output === 'md') {
|
|
172
|
+
await logger.log(this.checksStatus);
|
|
173
|
+
return;
|
|
174
|
+
}
|
|
175
|
+
if (output === 'csv') {
|
|
176
|
+
this.checksStatus.forEach(r => {
|
|
177
|
+
// we need to set errorMessage to empty string so that it's not
|
|
178
|
+
// removed from the CSV output
|
|
179
|
+
r.errorMessage = r.errorMessage ?? '';
|
|
180
|
+
});
|
|
181
|
+
await logger.log(this.checksStatus);
|
|
182
|
+
}
|
|
183
|
+
}
|
|
184
|
+
getMdOutput(logStatement, command, options) {
|
|
185
|
+
const output = [
|
|
186
|
+
`# ${command.getCommandName()} ${Object.keys(options).filter(o => o !== 'output').map(k => `--${k} "${options[k]}"`).join(' ')}`, os.EOL,
|
|
187
|
+
os.EOL,
|
|
188
|
+
`Date: ${(new Date().toLocaleDateString())}`, os.EOL,
|
|
189
|
+
os.EOL
|
|
190
|
+
];
|
|
191
|
+
if (logStatement && logStatement.length > 0) {
|
|
192
|
+
const properties = ['text', 'type', 'status', 'errorMessage'];
|
|
193
|
+
output.push('Check|Type|Status|Error message', os.EOL);
|
|
194
|
+
output.push(':----|:--:|:----:|:------------', os.EOL);
|
|
195
|
+
logStatement.forEach(r => {
|
|
196
|
+
output.push(properties.map(p => r[p] ?? '').join('|'), os.EOL);
|
|
197
|
+
});
|
|
198
|
+
logStatement.push(os.EOL);
|
|
199
|
+
}
|
|
200
|
+
return output.join('').trimEnd();
|
|
201
|
+
}
|
|
202
|
+
async loadConnection(id, args) {
|
|
203
|
+
const requestOptions = {
|
|
204
|
+
url: `${this.resource}/v1.0/external/connections/${args.options.id}`,
|
|
205
|
+
headers: {
|
|
206
|
+
accept: 'application/json;odata.metadata=none'
|
|
207
|
+
},
|
|
208
|
+
responseType: 'json'
|
|
209
|
+
};
|
|
210
|
+
try {
|
|
211
|
+
const externalConnection = await request.get(requestOptions);
|
|
212
|
+
return {
|
|
213
|
+
id,
|
|
214
|
+
data: externalConnection,
|
|
215
|
+
status: 'passed'
|
|
216
|
+
};
|
|
217
|
+
}
|
|
218
|
+
catch (ex) {
|
|
219
|
+
return {
|
|
220
|
+
id,
|
|
221
|
+
error: ex?.response?.data?.error?.innerError?.message,
|
|
222
|
+
errorMessage: 'Connection not found',
|
|
223
|
+
shouldStop: true,
|
|
224
|
+
status: 'failed'
|
|
225
|
+
};
|
|
226
|
+
}
|
|
227
|
+
}
|
|
228
|
+
async loadSchema(id, args) {
|
|
229
|
+
const requestOptions = {
|
|
230
|
+
url: `${this.resource}/v1.0/external/connections/${args.options.id}/schema`,
|
|
231
|
+
headers: {
|
|
232
|
+
accept: 'application/json;odata.metadata=none'
|
|
233
|
+
},
|
|
234
|
+
responseType: 'json'
|
|
235
|
+
};
|
|
236
|
+
try {
|
|
237
|
+
const schema = await request.get(requestOptions);
|
|
238
|
+
return {
|
|
239
|
+
id,
|
|
240
|
+
data: schema,
|
|
241
|
+
status: 'passed'
|
|
242
|
+
};
|
|
243
|
+
}
|
|
244
|
+
catch (ex) {
|
|
245
|
+
return {
|
|
246
|
+
id,
|
|
247
|
+
errorMessage: 'Schema not found',
|
|
248
|
+
error: ex?.response?.data?.error?.innerError?.message,
|
|
249
|
+
shouldStop: true,
|
|
250
|
+
status: 'failed'
|
|
251
|
+
};
|
|
252
|
+
}
|
|
253
|
+
}
|
|
254
|
+
async checkCopilotRequiredSemanticLabels(id) {
|
|
255
|
+
const schema = this.checksStatus.find(r => r.id === 'loadSchema').data;
|
|
256
|
+
const requiredLabels = ['title', 'url', 'iconUrl'];
|
|
257
|
+
for (const label of requiredLabels) {
|
|
258
|
+
if (!schema.properties?.find(p => p.labels?.find(l => l.toString() === label))) {
|
|
259
|
+
return {
|
|
260
|
+
id,
|
|
261
|
+
errorMessage: `Missing label ${label}`,
|
|
262
|
+
status: 'failed'
|
|
263
|
+
};
|
|
264
|
+
}
|
|
265
|
+
}
|
|
266
|
+
return {
|
|
267
|
+
id,
|
|
268
|
+
status: 'passed'
|
|
269
|
+
};
|
|
270
|
+
}
|
|
271
|
+
async checkSearchableProperties(id) {
|
|
272
|
+
const schema = this.checksStatus.find(r => r.id === 'loadSchema').data;
|
|
273
|
+
if (!schema.properties?.some(p => p.isSearchable)) {
|
|
274
|
+
return {
|
|
275
|
+
id,
|
|
276
|
+
errorMessage: 'Schema does not have any searchable properties',
|
|
277
|
+
status: 'failed'
|
|
278
|
+
};
|
|
279
|
+
}
|
|
280
|
+
return {
|
|
281
|
+
id,
|
|
282
|
+
status: 'passed'
|
|
283
|
+
};
|
|
284
|
+
}
|
|
285
|
+
async checkContentIngested(id, args) {
|
|
286
|
+
try {
|
|
287
|
+
// find items that belong to the connection
|
|
288
|
+
const searchRequestOptions = {
|
|
289
|
+
url: `${this.resource}/v1.0/search/query`,
|
|
290
|
+
headers: {
|
|
291
|
+
accept: 'application/json;odata.metadata=none'
|
|
292
|
+
},
|
|
293
|
+
responseType: 'json',
|
|
294
|
+
data: {
|
|
295
|
+
requests: [
|
|
296
|
+
{
|
|
297
|
+
entityTypes: [
|
|
298
|
+
'externalItem'
|
|
299
|
+
],
|
|
300
|
+
contentSources: [
|
|
301
|
+
`/external/connections/${args.options.id}`
|
|
302
|
+
],
|
|
303
|
+
query: {
|
|
304
|
+
queryString: '*'
|
|
305
|
+
},
|
|
306
|
+
from: 0,
|
|
307
|
+
size: 1
|
|
308
|
+
}
|
|
309
|
+
]
|
|
310
|
+
}
|
|
311
|
+
};
|
|
312
|
+
const result = await request.post(searchRequestOptions);
|
|
313
|
+
const hit = result.value?.[0].hitsContainers?.[0]?.hits?.[0];
|
|
314
|
+
if (!hit) {
|
|
315
|
+
return {
|
|
316
|
+
id,
|
|
317
|
+
errorMessage: 'No items found that belong to the connection',
|
|
318
|
+
status: 'failed'
|
|
319
|
+
};
|
|
320
|
+
}
|
|
321
|
+
// something@tenant,itemId
|
|
322
|
+
const itemId = hit.resource?.properties?.substrateContentDomainId?.split(',')?.[1];
|
|
323
|
+
if (!itemId) {
|
|
324
|
+
return {
|
|
325
|
+
id,
|
|
326
|
+
errorMessage: 'Item does not have substrateContentDomainId property or the property is invalid',
|
|
327
|
+
status: 'failed'
|
|
328
|
+
};
|
|
329
|
+
}
|
|
330
|
+
const externalItemRequestOptions = {
|
|
331
|
+
url: `${this.resource}/v1.0/external/connections/${args.options.id}/items/${itemId}`,
|
|
332
|
+
headers: {
|
|
333
|
+
accept: 'application/json;odata.metadata=none'
|
|
334
|
+
},
|
|
335
|
+
responseType: 'json'
|
|
336
|
+
};
|
|
337
|
+
const externalItem = await request.get(externalItemRequestOptions);
|
|
338
|
+
if (!externalItem.content?.value) {
|
|
339
|
+
return {
|
|
340
|
+
id,
|
|
341
|
+
data: externalItem,
|
|
342
|
+
errorMessage: 'Item does not have content or content is empty',
|
|
343
|
+
status: 'failed'
|
|
344
|
+
};
|
|
345
|
+
}
|
|
346
|
+
return {
|
|
347
|
+
id,
|
|
348
|
+
data: externalItem,
|
|
349
|
+
status: 'passed'
|
|
350
|
+
};
|
|
351
|
+
}
|
|
352
|
+
catch (ex) {
|
|
353
|
+
return {
|
|
354
|
+
id,
|
|
355
|
+
error: ex?.response?.data?.error?.innerError?.message,
|
|
356
|
+
errorMessage: 'Error while checking if content is ingested',
|
|
357
|
+
status: 'failed'
|
|
358
|
+
};
|
|
359
|
+
}
|
|
360
|
+
}
|
|
361
|
+
async checkUrlToItemResolverConfigured(id) {
|
|
362
|
+
const externalConnection = this.checksStatus.find(r => r.id === 'loadExternalConnection').data;
|
|
363
|
+
if (!externalConnection.activitySettings?.urlToItemResolvers?.some(r => r)) {
|
|
364
|
+
return {
|
|
365
|
+
id,
|
|
366
|
+
errorMessage: 'urlToItemResolver is not configured',
|
|
367
|
+
status: 'failed'
|
|
368
|
+
};
|
|
369
|
+
}
|
|
370
|
+
return {
|
|
371
|
+
id,
|
|
372
|
+
status: 'passed'
|
|
373
|
+
};
|
|
374
|
+
}
|
|
375
|
+
async checkSemanticLabels(id) {
|
|
376
|
+
const schema = this.checksStatus.find(r => r.id === 'loadSchema').data;
|
|
377
|
+
const hasLabels = schema.properties?.some(p => p.labels?.some(l => l));
|
|
378
|
+
if (!hasLabels) {
|
|
379
|
+
return {
|
|
380
|
+
id,
|
|
381
|
+
errorMessage: `Schema does not have semantic labels`,
|
|
382
|
+
status: 'failed'
|
|
383
|
+
};
|
|
384
|
+
}
|
|
385
|
+
return {
|
|
386
|
+
id,
|
|
387
|
+
status: 'passed'
|
|
388
|
+
};
|
|
389
|
+
}
|
|
390
|
+
async checkResultType(id) {
|
|
391
|
+
const externalConnection = this.checksStatus.find(r => r.id === 'loadExternalConnection').data;
|
|
392
|
+
if (!externalConnection.searchSettings?.searchResultTemplates?.some(t => t)) {
|
|
393
|
+
return {
|
|
394
|
+
id,
|
|
395
|
+
errorMessage: `Connection has no result types`,
|
|
396
|
+
status: 'failed'
|
|
397
|
+
};
|
|
398
|
+
}
|
|
399
|
+
return {
|
|
400
|
+
id,
|
|
401
|
+
status: 'passed'
|
|
402
|
+
};
|
|
403
|
+
}
|
|
404
|
+
}
|
|
405
|
+
_a = ExternalConnectionDoctorCommand, _ExternalConnectionDoctorCommand_instances = new WeakSet(), _ExternalConnectionDoctorCommand_initOptions = function _ExternalConnectionDoctorCommand_initOptions() {
|
|
406
|
+
this.options.unshift({
|
|
407
|
+
option: '-i, --id <id>'
|
|
408
|
+
}, {
|
|
409
|
+
option: '--ux [ux]',
|
|
410
|
+
autocomplete: _a.supportedUx
|
|
411
|
+
});
|
|
412
|
+
}, _ExternalConnectionDoctorCommand_initValidators = function _ExternalConnectionDoctorCommand_initValidators() {
|
|
413
|
+
this.validators.push(async (args) => {
|
|
414
|
+
if (args.options.ux) {
|
|
415
|
+
if (!_a.supportedUx.find(u => u === args.options.ux)) {
|
|
416
|
+
return `${args.options.ux} is not a valid UX. Allowed values are ${_a.supportedUx.join(', ')}`;
|
|
417
|
+
}
|
|
418
|
+
}
|
|
419
|
+
return true;
|
|
420
|
+
});
|
|
421
|
+
};
|
|
422
|
+
ExternalConnectionDoctorCommand.supportedUx = ['copilot', 'search', 'all'];
|
|
423
|
+
export default new ExternalConnectionDoctorCommand();
|
|
424
|
+
//# sourceMappingURL=connection-doctor.js.map
|
|
@@ -3,24 +3,27 @@ var __classPrivateFieldGet = (this && this.__classPrivateFieldGet) || function (
|
|
|
3
3
|
if (typeof state === "function" ? receiver !== state || !f : !state.has(receiver)) throw new TypeError("Cannot read private member from an object whose class did not declare it");
|
|
4
4
|
return kind === "m" ? f : kind === "a" ? f.call(receiver) : f ? f.value : state.get(receiver);
|
|
5
5
|
};
|
|
6
|
-
var
|
|
6
|
+
var _ExternalConnectionGetCommand_instances, _ExternalConnectionGetCommand_initTelemetry, _ExternalConnectionGetCommand_initOptions, _ExternalConnectionGetCommand_initOptionSets;
|
|
7
7
|
import request from '../../../../request.js';
|
|
8
8
|
import { formatting } from '../../../../utils/formatting.js';
|
|
9
9
|
import GraphCommand from '../../../base/GraphCommand.js';
|
|
10
10
|
import commands from '../../commands.js';
|
|
11
|
-
class
|
|
11
|
+
class ExternalConnectionGetCommand extends GraphCommand {
|
|
12
12
|
get name() {
|
|
13
|
-
return commands.
|
|
13
|
+
return commands.CONNECTION_GET;
|
|
14
14
|
}
|
|
15
15
|
get description() {
|
|
16
|
-
return 'Get a specific external connection
|
|
16
|
+
return 'Get a specific external connection';
|
|
17
|
+
}
|
|
18
|
+
alias() {
|
|
19
|
+
return [commands.EXTERNALCONNECTION_GET];
|
|
17
20
|
}
|
|
18
21
|
constructor() {
|
|
19
22
|
super();
|
|
20
|
-
|
|
21
|
-
__classPrivateFieldGet(this,
|
|
22
|
-
__classPrivateFieldGet(this,
|
|
23
|
-
__classPrivateFieldGet(this,
|
|
23
|
+
_ExternalConnectionGetCommand_instances.add(this);
|
|
24
|
+
__classPrivateFieldGet(this, _ExternalConnectionGetCommand_instances, "m", _ExternalConnectionGetCommand_initTelemetry).call(this);
|
|
25
|
+
__classPrivateFieldGet(this, _ExternalConnectionGetCommand_instances, "m", _ExternalConnectionGetCommand_initOptions).call(this);
|
|
26
|
+
__classPrivateFieldGet(this, _ExternalConnectionGetCommand_instances, "m", _ExternalConnectionGetCommand_initOptionSets).call(this);
|
|
24
27
|
}
|
|
25
28
|
async commandAction(logger, args) {
|
|
26
29
|
let url = `${this.resource}/v1.0/external/connections`;
|
|
@@ -52,21 +55,21 @@ class SearchExternalConnectionGetCommand extends GraphCommand {
|
|
|
52
55
|
}
|
|
53
56
|
}
|
|
54
57
|
}
|
|
55
|
-
|
|
58
|
+
_ExternalConnectionGetCommand_instances = new WeakSet(), _ExternalConnectionGetCommand_initTelemetry = function _ExternalConnectionGetCommand_initTelemetry() {
|
|
56
59
|
this.telemetry.push((args) => {
|
|
57
60
|
Object.assign(this.telemetryProperties, {
|
|
58
61
|
id: typeof args.options.id !== 'undefined',
|
|
59
62
|
name: typeof args.options.name !== 'undefined'
|
|
60
63
|
});
|
|
61
64
|
});
|
|
62
|
-
},
|
|
65
|
+
}, _ExternalConnectionGetCommand_initOptions = function _ExternalConnectionGetCommand_initOptions() {
|
|
63
66
|
this.options.unshift({
|
|
64
67
|
option: '-i, --id [id]'
|
|
65
68
|
}, {
|
|
66
69
|
option: '-n, --name [name]'
|
|
67
70
|
});
|
|
68
|
-
},
|
|
71
|
+
}, _ExternalConnectionGetCommand_initOptionSets = function _ExternalConnectionGetCommand_initOptionSets() {
|
|
69
72
|
this.optionSets.push({ options: ['id', 'name'] });
|
|
70
73
|
};
|
|
71
|
-
export default new
|
|
72
|
-
//# sourceMappingURL=
|
|
74
|
+
export default new ExternalConnectionGetCommand();
|
|
75
|
+
//# sourceMappingURL=connection-get.js.map
|
|
@@ -1,13 +1,16 @@
|
|
|
1
1
|
import { odata } from '../../../../utils/odata.js';
|
|
2
2
|
import GraphCommand from '../../../base/GraphCommand.js';
|
|
3
3
|
import commands from '../../commands.js';
|
|
4
|
-
class
|
|
4
|
+
class ExternalConnectionListCommand extends GraphCommand {
|
|
5
5
|
get name() {
|
|
6
|
-
return commands.
|
|
6
|
+
return commands.CONNECTION_LIST;
|
|
7
7
|
}
|
|
8
8
|
get description() {
|
|
9
9
|
return 'Lists external connections defined in the Microsoft Search';
|
|
10
10
|
}
|
|
11
|
+
alias() {
|
|
12
|
+
return [commands.EXTERNALCONNECTION_LIST];
|
|
13
|
+
}
|
|
11
14
|
defaultProperties() {
|
|
12
15
|
return ['id', 'name', 'state'];
|
|
13
16
|
}
|
|
@@ -21,5 +24,5 @@ class SearchExternalConnectionListCommand extends GraphCommand {
|
|
|
21
24
|
}
|
|
22
25
|
}
|
|
23
26
|
}
|
|
24
|
-
export default new
|
|
25
|
-
//# sourceMappingURL=
|
|
27
|
+
export default new ExternalConnectionListCommand();
|
|
28
|
+
//# sourceMappingURL=connection-list.js.map
|
|
@@ -3,25 +3,28 @@ var __classPrivateFieldGet = (this && this.__classPrivateFieldGet) || function (
|
|
|
3
3
|
if (typeof state === "function" ? receiver !== state || !f : !state.has(receiver)) throw new TypeError("Cannot read private member from an object whose class did not declare it");
|
|
4
4
|
return kind === "m" ? f : kind === "a" ? f.call(receiver) : f ? f.value : state.get(receiver);
|
|
5
5
|
};
|
|
6
|
-
var
|
|
6
|
+
var _ExternalConnectionRemoveCommand_instances, _ExternalConnectionRemoveCommand_initTelemetry, _ExternalConnectionRemoveCommand_initOptions, _ExternalConnectionRemoveCommand_initOptionSets;
|
|
7
7
|
import { Cli } from '../../../../cli/Cli.js';
|
|
8
8
|
import request from '../../../../request.js';
|
|
9
9
|
import { formatting } from '../../../../utils/formatting.js';
|
|
10
10
|
import GraphCommand from '../../../base/GraphCommand.js';
|
|
11
11
|
import commands from '../../commands.js';
|
|
12
|
-
class
|
|
12
|
+
class ExternalConnectionRemoveCommand extends GraphCommand {
|
|
13
13
|
get name() {
|
|
14
|
-
return commands.
|
|
14
|
+
return commands.CONNECTION_REMOVE;
|
|
15
15
|
}
|
|
16
16
|
get description() {
|
|
17
|
-
return 'Removes a specific
|
|
17
|
+
return 'Removes a specific external connection';
|
|
18
|
+
}
|
|
19
|
+
alias() {
|
|
20
|
+
return [commands.EXTERNALCONNECTION_REMOVE];
|
|
18
21
|
}
|
|
19
22
|
constructor() {
|
|
20
23
|
super();
|
|
21
|
-
|
|
22
|
-
__classPrivateFieldGet(this,
|
|
23
|
-
__classPrivateFieldGet(this,
|
|
24
|
-
__classPrivateFieldGet(this,
|
|
24
|
+
_ExternalConnectionRemoveCommand_instances.add(this);
|
|
25
|
+
__classPrivateFieldGet(this, _ExternalConnectionRemoveCommand_instances, "m", _ExternalConnectionRemoveCommand_initTelemetry).call(this);
|
|
26
|
+
__classPrivateFieldGet(this, _ExternalConnectionRemoveCommand_instances, "m", _ExternalConnectionRemoveCommand_initOptions).call(this);
|
|
27
|
+
__classPrivateFieldGet(this, _ExternalConnectionRemoveCommand_instances, "m", _ExternalConnectionRemoveCommand_initOptionSets).call(this);
|
|
25
28
|
}
|
|
26
29
|
async getExternalConnectionId(args) {
|
|
27
30
|
if (args.options.id) {
|
|
@@ -39,7 +42,7 @@ class SearchExternalConnectionRemoveCommand extends GraphCommand {
|
|
|
39
42
|
return res.value[0].id;
|
|
40
43
|
}
|
|
41
44
|
if (res.value.length === 0) {
|
|
42
|
-
throw `The specified connection does not exist
|
|
45
|
+
throw `The specified connection does not exist`;
|
|
43
46
|
}
|
|
44
47
|
const resultAsKeyValuePair = formatting.convertArrayToHashTable('id', res.value);
|
|
45
48
|
const result = await Cli.handleMultipleResultsFound(`Multiple external connections with name ${args.options.name} found.`, resultAsKeyValuePair);
|
|
@@ -50,13 +53,8 @@ class SearchExternalConnectionRemoveCommand extends GraphCommand {
|
|
|
50
53
|
await this.removeExternalConnection(args);
|
|
51
54
|
}
|
|
52
55
|
else {
|
|
53
|
-
const result = await Cli.
|
|
54
|
-
|
|
55
|
-
name: 'continue',
|
|
56
|
-
default: false,
|
|
57
|
-
message: `Are you sure you want to remove the external connection '${args.options.id || args.options.name}'?`
|
|
58
|
-
});
|
|
59
|
-
if (result.continue) {
|
|
56
|
+
const result = await Cli.promptForConfirmation({ message: `Are you sure you want to remove the external connection '${args.options.id || args.options.name}'?` });
|
|
57
|
+
if (result) {
|
|
60
58
|
await this.removeExternalConnection(args);
|
|
61
59
|
}
|
|
62
60
|
}
|
|
@@ -78,7 +76,7 @@ class SearchExternalConnectionRemoveCommand extends GraphCommand {
|
|
|
78
76
|
}
|
|
79
77
|
}
|
|
80
78
|
}
|
|
81
|
-
|
|
79
|
+
_ExternalConnectionRemoveCommand_instances = new WeakSet(), _ExternalConnectionRemoveCommand_initTelemetry = function _ExternalConnectionRemoveCommand_initTelemetry() {
|
|
82
80
|
this.telemetry.push((args) => {
|
|
83
81
|
Object.assign(this.telemetryProperties, {
|
|
84
82
|
id: typeof args.options.id !== 'undefined',
|
|
@@ -86,10 +84,10 @@ _SearchExternalConnectionRemoveCommand_instances = new WeakSet(), _SearchExterna
|
|
|
86
84
|
force: (!(!args.options.force)).toString()
|
|
87
85
|
});
|
|
88
86
|
});
|
|
89
|
-
},
|
|
87
|
+
}, _ExternalConnectionRemoveCommand_initOptions = function _ExternalConnectionRemoveCommand_initOptions() {
|
|
90
88
|
this.options.unshift({ option: '--id [id]' }, { option: '--name [name]' }, { option: '-f, --force' });
|
|
91
|
-
},
|
|
89
|
+
}, _ExternalConnectionRemoveCommand_initOptionSets = function _ExternalConnectionRemoveCommand_initOptionSets() {
|
|
92
90
|
this.optionSets.push({ options: ['id', 'name'] });
|
|
93
91
|
};
|
|
94
|
-
export default new
|
|
95
|
-
//# sourceMappingURL=
|
|
92
|
+
export default new ExternalConnectionRemoveCommand();
|
|
93
|
+
//# sourceMappingURL=connection-remove.js.map
|
|
@@ -3,22 +3,25 @@ var __classPrivateFieldGet = (this && this.__classPrivateFieldGet) || function (
|
|
|
3
3
|
if (typeof state === "function" ? receiver !== state || !f : !state.has(receiver)) throw new TypeError("Cannot read private member from an object whose class did not declare it");
|
|
4
4
|
return kind === "m" ? f : kind === "a" ? f.call(receiver) : f ? f.value : state.get(receiver);
|
|
5
5
|
};
|
|
6
|
-
var
|
|
6
|
+
var _ExternalConnectionSchemaAddCommand_instances, _ExternalConnectionSchemaAddCommand_initOptions, _ExternalConnectionSchemaAddCommand_initValidators;
|
|
7
7
|
import request from '../../../../request.js';
|
|
8
8
|
import GraphCommand from '../../../base/GraphCommand.js';
|
|
9
9
|
import commands from '../../commands.js';
|
|
10
|
-
class
|
|
10
|
+
class ExternalConnectionSchemaAddCommand extends GraphCommand {
|
|
11
11
|
get name() {
|
|
12
|
-
return commands.
|
|
12
|
+
return commands.CONNECTION_SCHEMA_ADD;
|
|
13
13
|
}
|
|
14
14
|
get description() {
|
|
15
|
-
return '
|
|
15
|
+
return 'Allows the administrator to add a schema to a specific external connection';
|
|
16
|
+
}
|
|
17
|
+
alias() {
|
|
18
|
+
return [commands.EXTERNALCONNECTION_SCHEMA_ADD];
|
|
16
19
|
}
|
|
17
20
|
constructor() {
|
|
18
21
|
super();
|
|
19
|
-
|
|
20
|
-
__classPrivateFieldGet(this,
|
|
21
|
-
__classPrivateFieldGet(this,
|
|
22
|
+
_ExternalConnectionSchemaAddCommand_instances.add(this);
|
|
23
|
+
__classPrivateFieldGet(this, _ExternalConnectionSchemaAddCommand_instances, "m", _ExternalConnectionSchemaAddCommand_initOptions).call(this);
|
|
24
|
+
__classPrivateFieldGet(this, _ExternalConnectionSchemaAddCommand_instances, "m", _ExternalConnectionSchemaAddCommand_initValidators).call(this);
|
|
22
25
|
}
|
|
23
26
|
async commandAction(logger, args) {
|
|
24
27
|
if (this.verbose) {
|
|
@@ -40,13 +43,13 @@ class SearchExternalConnectionSchemaAddCommand extends GraphCommand {
|
|
|
40
43
|
}
|
|
41
44
|
}
|
|
42
45
|
}
|
|
43
|
-
|
|
46
|
+
_ExternalConnectionSchemaAddCommand_instances = new WeakSet(), _ExternalConnectionSchemaAddCommand_initOptions = function _ExternalConnectionSchemaAddCommand_initOptions() {
|
|
44
47
|
this.options.unshift({
|
|
45
48
|
option: '-i, --externalConnectionId <externalConnectionId>'
|
|
46
49
|
}, {
|
|
47
50
|
option: '-s, --schema <schema>'
|
|
48
51
|
});
|
|
49
|
-
},
|
|
52
|
+
}, _ExternalConnectionSchemaAddCommand_initValidators = function _ExternalConnectionSchemaAddCommand_initValidators() {
|
|
50
53
|
this.validators.push(async (args) => {
|
|
51
54
|
if (args.options.externalConnectionId.length < 3 || args.options.externalConnectionId.length > 32) {
|
|
52
55
|
return 'externalConnectionId must be between 3 and 32 characters in length.';
|
|
@@ -69,5 +72,5 @@ _SearchExternalConnectionSchemaAddCommand_instances = new WeakSet(), _SearchExte
|
|
|
69
72
|
return true;
|
|
70
73
|
});
|
|
71
74
|
};
|
|
72
|
-
export default new
|
|
73
|
-
//# sourceMappingURL=
|
|
75
|
+
export default new ExternalConnectionSchemaAddCommand();
|
|
76
|
+
//# sourceMappingURL=connection-schema-add.js.map
|