@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.
Files changed (312) hide show
  1. package/.devcontainer/Dockerfile +0 -1
  2. package/.eslintrc.cjs +2 -0
  3. package/Dockerfile +0 -1
  4. package/allCommands.json +1 -0
  5. package/allCommandsFull.json +1 -0
  6. package/dist/Auth.js +1 -1
  7. package/dist/Command.js +18 -28
  8. package/dist/api.js +5 -7
  9. package/dist/appInsights.js +2 -1
  10. package/dist/chili/chili.js +40 -51
  11. package/dist/cli/Cli.js +121 -131
  12. package/dist/cli/timings.js +9 -0
  13. package/dist/index.js +1 -15
  14. package/dist/m365/aad/commands/administrativeunit/administrativeunit-add.js +3 -3
  15. package/dist/m365/aad/commands/administrativeunit/administrativeunit-get.js +2 -15
  16. package/dist/m365/aad/commands/administrativeunit/administrativeunit-remove.js +5 -22
  17. package/dist/m365/aad/commands/app/app-remove.js +2 -7
  18. package/dist/m365/aad/commands/app/app-role-remove.js +2 -7
  19. package/dist/m365/aad/commands/approleassignment/approleassignment-remove.js +2 -7
  20. package/dist/m365/aad/commands/group/group-remove.js +2 -7
  21. package/dist/m365/aad/commands/groupsetting/groupsetting-remove.js +2 -7
  22. package/dist/m365/aad/commands/m365group/m365group-recyclebinitem-clear.js +2 -7
  23. package/dist/m365/aad/commands/m365group/m365group-recyclebinitem-remove.js +2 -7
  24. package/dist/m365/aad/commands/m365group/m365group-remove.js +2 -7
  25. package/dist/m365/aad/commands/m365group/m365group-user-remove.js +2 -7
  26. package/dist/m365/aad/commands/oauth2grant/oauth2grant-remove.js +2 -7
  27. package/dist/m365/aad/commands/siteclassification/siteclassification-disable.js +2 -7
  28. package/dist/m365/aad/commands/user/user-license-remove.js +2 -7
  29. package/dist/m365/aad/commands/user/user-recyclebinitem-clear.js +2 -7
  30. package/dist/m365/aad/commands/user/user-recyclebinitem-remove.js +2 -7
  31. package/dist/m365/aad/commands/user/user-remove.js +2 -7
  32. package/dist/m365/cli/commands/config/config-set.js +13 -0
  33. package/dist/m365/commands/login.js +12 -8
  34. package/dist/m365/commands/setup.js +31 -37
  35. package/dist/m365/context/commands/context-remove.js +2 -7
  36. package/dist/m365/context/commands/option/option-remove.js +2 -7
  37. package/dist/m365/{search/commands/externalconnection/externalconnection-add.js → external/commands/connection/connection-add.js} +16 -13
  38. package/dist/m365/external/commands/connection/connection-doctor.js +424 -0
  39. package/dist/m365/{search/commands/externalconnection/externalconnection-get.js → external/commands/connection/connection-get.js} +16 -13
  40. package/dist/m365/{search/commands/externalconnection/externalconnection-list.js → external/commands/connection/connection-list.js} +7 -4
  41. package/dist/m365/{search/commands/externalconnection/externalconnection-remove.js → external/commands/connection/connection-remove.js} +19 -21
  42. package/dist/m365/{search/commands/externalconnection/externalconnection-schema-add.js → external/commands/connection/connection-schema-add.js} +14 -11
  43. package/dist/m365/external/commands/item/item-add.js +144 -0
  44. package/dist/m365/external/commands.js +17 -0
  45. package/dist/m365/flow/commands/environment/environment-list.js +6 -4
  46. package/dist/m365/flow/commands/flow-remove.js +2 -7
  47. package/dist/m365/flow/commands/owner/owner-remove.js +2 -7
  48. package/dist/m365/flow/commands/run/run-cancel.js +2 -7
  49. package/dist/m365/flow/commands/run/run-resubmit.js +2 -7
  50. package/dist/m365/graph/commands/schemaextension/schemaextension-remove.js +2 -7
  51. package/dist/m365/pa/commands/app/app-consent-set.js +2 -7
  52. package/dist/m365/pa/commands/app/app-permission-remove.js +2 -7
  53. package/dist/m365/pa/commands/app/app-remove.js +2 -7
  54. package/dist/m365/planner/commands/bucket/bucket-remove.js +2 -7
  55. package/dist/m365/planner/commands/plan/plan-remove.js +2 -7
  56. package/dist/m365/planner/commands/roster/roster-member-remove.js +4 -14
  57. package/dist/m365/planner/commands/roster/roster-remove.js +2 -7
  58. package/dist/m365/planner/commands/task/task-checklistitem-remove.js +2 -7
  59. package/dist/m365/planner/commands/task/task-reference-remove.js +2 -7
  60. package/dist/m365/planner/commands/task/task-remove.js +2 -7
  61. package/dist/m365/pp/commands/aibuildermodel/aibuildermodel-remove.js +2 -7
  62. package/dist/m365/pp/commands/card/card-remove.js +2 -7
  63. package/dist/m365/pp/commands/chatbot/chatbot-remove.js +2 -7
  64. package/dist/m365/pp/commands/dataverse/dataverse-table-remove.js +2 -7
  65. package/dist/m365/pp/commands/dataverse/dataverse-table-row-remove.js +2 -7
  66. package/dist/m365/pp/commands/solution/solution-publisher-remove.js +2 -7
  67. package/dist/m365/pp/commands/solution/solution-remove.js +2 -7
  68. package/dist/m365/purview/commands/retentionevent/retentionevent-remove.js +2 -7
  69. package/dist/m365/purview/commands/retentioneventtype/retentioneventtype-remove.js +2 -7
  70. package/dist/m365/purview/commands/retentionlabel/retentionlabel-remove.js +2 -7
  71. package/dist/m365/spfx/commands/project/DeployWorkflow.js +4 -4
  72. package/dist/m365/spfx/commands/project/project-doctor/{doctor-1.18.1-rc.0.js → doctor-1.18.1.js} +1 -1
  73. package/dist/m365/spfx/commands/project/project-doctor/doctor-1.18.2.js +21 -0
  74. package/dist/m365/spfx/commands/project/project-doctor.js +6 -3
  75. package/dist/m365/spfx/commands/project/project-github-workflow-add.js +17 -0
  76. package/dist/m365/spfx/commands/project/project-upgrade/{upgrade-1.18.1-rc.0.js → upgrade-1.18.1.js} +26 -26
  77. package/dist/m365/spfx/commands/project/project-upgrade/upgrade-1.18.2.js +53 -0
  78. package/dist/m365/spfx/commands/project/project-upgrade.js +18 -17
  79. package/dist/m365/spfx/commands/spfx-doctor.js +16 -1
  80. package/dist/m365/spo/commands/app/app-remove.js +2 -7
  81. package/dist/m365/spo/commands/app/app-retract.js +2 -7
  82. package/dist/m365/spo/commands/app/app-uninstall.js +2 -7
  83. package/dist/m365/spo/commands/applicationcustomizer/applicationcustomizer-remove.js +2 -7
  84. package/dist/m365/spo/commands/cdn/cdn-origin-remove.js +2 -7
  85. package/dist/m365/spo/commands/commandset/commandset-remove.js +2 -7
  86. package/dist/m365/spo/commands/contenttype/contenttype-field-remove.js +2 -7
  87. package/dist/m365/spo/commands/contenttype/contenttype-remove.js +2 -2
  88. package/dist/m365/spo/commands/customaction/customaction-clear.js +2 -7
  89. package/dist/m365/spo/commands/customaction/customaction-remove.js +2 -7
  90. package/dist/m365/spo/commands/eventreceiver/eventreceiver-remove.js +2 -7
  91. package/dist/m365/spo/commands/field/field-remove.js +2 -7
  92. package/dist/m365/spo/commands/file/file-checkout-undo.js +2 -7
  93. package/dist/m365/spo/commands/file/file-remove.js +2 -7
  94. package/dist/m365/spo/commands/file/file-retentionlabel-ensure.js +14 -23
  95. package/dist/m365/spo/commands/file/file-retentionlabel-remove.js +21 -34
  96. package/dist/m365/spo/commands/file/file-roleassignment-remove.js +2 -7
  97. package/dist/m365/spo/commands/file/file-roleinheritance-break.js +2 -7
  98. package/dist/m365/spo/commands/file/file-roleinheritance-reset.js +2 -7
  99. package/dist/m365/spo/commands/file/file-sharinglink-clear.js +2 -7
  100. package/dist/m365/spo/commands/file/file-sharinglink-remove.js +2 -7
  101. package/dist/m365/spo/commands/file/file-version-clear.js +2 -7
  102. package/dist/m365/spo/commands/file/file-version-remove.js +2 -7
  103. package/dist/m365/spo/commands/file/file-version-restore.js +2 -7
  104. package/dist/m365/spo/commands/folder/folder-remove.js +2 -7
  105. package/dist/m365/spo/commands/folder/folder-retentionlabel-ensure.js +9 -29
  106. package/dist/m365/spo/commands/folder/folder-retentionlabel-remove.js +11 -35
  107. package/dist/m365/spo/commands/folder/folder-roleassignment-remove.js +2 -7
  108. package/dist/m365/spo/commands/folder/folder-roleinheritance-break.js +2 -7
  109. package/dist/m365/spo/commands/folder/folder-roleinheritance-reset.js +2 -7
  110. package/dist/m365/spo/commands/group/group-member-remove.js +2 -7
  111. package/dist/m365/spo/commands/group/group-remove.js +2 -7
  112. package/dist/m365/spo/commands/homesite/homesite-remove.js +2 -7
  113. package/dist/m365/spo/commands/hubsite/hubsite-disconnect.js +2 -7
  114. package/dist/m365/spo/commands/hubsite/hubsite-rights-revoke.js +2 -7
  115. package/dist/m365/spo/commands/hubsite/hubsite-unregister.js +2 -7
  116. package/dist/m365/spo/commands/knowledgehub/knowledgehub-remove.js +2 -7
  117. package/dist/m365/spo/commands/list/list-contenttype-remove.js +2 -7
  118. package/dist/m365/spo/commands/list/list-remove.js +2 -7
  119. package/dist/m365/spo/commands/list/list-retentionlabel-ensure.js +27 -37
  120. package/dist/m365/spo/commands/list/list-retentionlabel-remove.js +8 -26
  121. package/dist/m365/spo/commands/list/list-roleassignment-remove.js +2 -7
  122. package/dist/m365/spo/commands/list/list-roleinheritance-break.js +2 -7
  123. package/dist/m365/spo/commands/list/list-roleinheritance-reset.js +2 -7
  124. package/dist/m365/spo/commands/list/list-view-field-remove.js +2 -7
  125. package/dist/m365/spo/commands/list/list-view-remove.js +2 -7
  126. package/dist/m365/spo/commands/list/list-webhook-remove.js +2 -7
  127. package/dist/m365/spo/commands/listitem/listitem-attachment-remove.js +2 -7
  128. package/dist/m365/spo/commands/listitem/listitem-batch-add.js +5 -0
  129. package/dist/m365/spo/commands/listitem/listitem-remove.js +2 -7
  130. package/dist/m365/spo/commands/listitem/listitem-retentionlabel-ensure.js +36 -37
  131. package/dist/m365/spo/commands/listitem/listitem-retentionlabel-remove.js +38 -39
  132. package/dist/m365/spo/commands/listitem/listitem-roleassignment-remove.js +2 -7
  133. package/dist/m365/spo/commands/listitem/listitem-roleinheritance-break.js +2 -7
  134. package/dist/m365/spo/commands/listitem/listitem-roleinheritance-reset.js +2 -7
  135. package/dist/m365/spo/commands/navigation/navigation-node-remove.js +2 -7
  136. package/dist/m365/spo/commands/orgassetslibrary/orgassetslibrary-remove.js +2 -7
  137. package/dist/m365/spo/commands/orgnewssite/orgnewssite-remove.js +2 -7
  138. package/dist/m365/spo/commands/page/page-remove.js +2 -7
  139. package/dist/m365/spo/commands/propertybag/propertybag-remove.js +2 -7
  140. package/dist/m365/spo/commands/roledefinition/roledefinition-remove.js +2 -7
  141. package/dist/m365/spo/commands/serviceprincipal/serviceprincipal-grant-revoke.js +49 -12
  142. package/dist/m365/spo/commands/serviceprincipal/serviceprincipal-set.js +2 -7
  143. package/dist/m365/spo/commands/site/site-add.js +45 -12
  144. package/dist/m365/spo/commands/site/site-apppermission-remove.js +2 -7
  145. package/dist/m365/spo/commands/site/site-hubsite-disconnect.js +2 -7
  146. package/dist/m365/spo/commands/site/site-recyclebinitem-clear.js +2 -7
  147. package/dist/m365/spo/commands/site/site-recyclebinitem-move.js +2 -7
  148. package/dist/m365/spo/commands/site/site-recyclebinitem-remove.js +2 -7
  149. package/dist/m365/spo/commands/site/site-remove.js +2 -7
  150. package/dist/m365/spo/commands/site/site-set.js +33 -1
  151. package/dist/m365/spo/commands/sitedesign/sitedesign-remove.js +2 -7
  152. package/dist/m365/spo/commands/sitedesign/sitedesign-rights-revoke.js +2 -7
  153. package/dist/m365/spo/commands/sitedesign/sitedesign-task-remove.js +2 -7
  154. package/dist/m365/spo/commands/sitescript/sitescript-get.js +8 -2
  155. package/dist/m365/spo/commands/sitescript/sitescript-remove.js +2 -7
  156. package/dist/m365/spo/commands/storageentity/storageentity-remove.js +2 -7
  157. package/dist/m365/spo/commands/tenant/tenant-applicationcustomizer-remove.js +2 -7
  158. package/dist/m365/spo/commands/tenant/tenant-commandset-remove.js +2 -7
  159. package/dist/m365/spo/commands/tenant/tenant-recyclebinitem-remove.js +2 -7
  160. package/dist/m365/spo/commands/tenant/tenant-recyclebinitem-restore.js +19 -2
  161. package/dist/m365/spo/commands/theme/theme-remove.js +2 -7
  162. package/dist/m365/spo/commands/user/user-remove.js +2 -7
  163. package/dist/m365/spo/commands/web/web-remove.js +2 -7
  164. package/dist/m365/spo/commands/web/web-roleassignment-remove.js +2 -7
  165. package/dist/m365/spo/commands/web/web-roleinheritance-break.js +2 -7
  166. package/dist/m365/spo/commands/web/web-roleinheritance-reset.js +2 -7
  167. package/dist/m365/teams/commands/app/app-remove.js +2 -7
  168. package/dist/m365/teams/commands/app/app-uninstall.js +2 -7
  169. package/dist/m365/teams/commands/cache/cache-remove.js +2 -7
  170. package/dist/m365/teams/commands/channel/channel-member-remove.js +2 -7
  171. package/dist/m365/teams/commands/channel/channel-remove.js +2 -7
  172. package/dist/m365/teams/commands/chat/chat-member-remove.js +2 -7
  173. package/dist/m365/teams/commands/tab/tab-remove.js +2 -7
  174. package/dist/m365/teams/commands/team/team-remove.js +2 -7
  175. package/dist/m365/teams/commands/user/user-app-remove.js +51 -12
  176. package/dist/m365/tenant/commands/people/people-profilecardproperty-add.js +131 -0
  177. package/dist/m365/tenant/commands/people/people-profilecardproperty-get.js +75 -0
  178. package/dist/m365/tenant/commands/people/people-profilecardproperty-list.js +53 -0
  179. package/dist/m365/tenant/commands/people/people-profilecardproperty-remove.js +79 -0
  180. package/dist/m365/tenant/commands/people/people-profilecardproperty-set.js +118 -0
  181. package/dist/m365/tenant/commands/people/profileCardProperties.js +24 -0
  182. package/dist/m365/tenant/commands.js +5 -0
  183. package/dist/m365/todo/commands/list/list-remove.js +2 -7
  184. package/dist/m365/todo/commands/task/task-remove.js +2 -7
  185. package/dist/m365/yammer/commands/group/group-user-remove.js +2 -7
  186. package/dist/m365/yammer/commands/message/message-like-set.js +3 -8
  187. package/dist/m365/yammer/commands/message/message-remove.js +2 -7
  188. package/dist/request.js +6 -0
  189. package/dist/settingsNames.js +2 -0
  190. package/dist/telemetry.js +0 -8
  191. package/dist/utils/aadAdministrativeUnit.js +25 -0
  192. package/dist/utils/prompt.js +30 -7
  193. package/dist/utils/spo.js +109 -0
  194. package/docs/docs/_clisettings.mdx +2 -0
  195. package/docs/docs/cmd/aad/administrativeunit/administrativeunit-add.mdx +6 -2
  196. package/docs/docs/cmd/aad/administrativeunit/administrativeunit-get.mdx +5 -1
  197. package/docs/docs/cmd/aad/administrativeunit/administrativeunit-list.mdx +5 -1
  198. package/docs/docs/cmd/aad/administrativeunit/administrativeunit-remove.mdx +6 -2
  199. package/docs/docs/cmd/aad/approleassignment/approleassignment-add.mdx +1 -1
  200. package/docs/docs/cmd/aad/approleassignment/approleassignment-list.mdx +2 -2
  201. package/docs/docs/cmd/aad/approleassignment/approleassignment-remove.mdx +1 -1
  202. package/docs/docs/cmd/aad/oauth2grant/oauth2grant-add.mdx +1 -1
  203. package/docs/docs/cmd/aad/oauth2grant/oauth2grant-list.mdx +2 -2
  204. package/docs/docs/cmd/aad/oauth2grant/oauth2grant-remove.mdx +2 -2
  205. package/docs/docs/cmd/aad/oauth2grant/oauth2grant-set.mdx +2 -2
  206. package/docs/docs/cmd/aad/policy/policy-list.mdx +1 -1
  207. package/docs/docs/cmd/aad/siteclassification/siteclassification-disable.mdx +1 -1
  208. package/docs/docs/cmd/aad/siteclassification/siteclassification-enable.mdx +1 -1
  209. package/docs/docs/cmd/aad/siteclassification/siteclassification-get.mdx +1 -1
  210. package/docs/docs/cmd/aad/siteclassification/siteclassification-set.mdx +1 -1
  211. package/docs/docs/cmd/aad/sp/sp-add.mdx +2 -2
  212. package/docs/docs/cmd/aad/sp/sp-get.mdx +2 -2
  213. package/docs/docs/cmd/aad/user/user-add.mdx +3 -3
  214. package/docs/docs/cmd/aad/user/user-guest-add.mdx +1 -1
  215. package/docs/docs/cmd/aad/user/user-set.mdx +3 -3
  216. package/docs/docs/cmd/{search/externalconnection/externalconnection-add.mdx → external/connection/connection-add.mdx} +16 -10
  217. package/docs/docs/cmd/external/connection/connection-doctor.mdx +179 -0
  218. package/docs/docs/cmd/{search/externalconnection/externalconnection-get.mdx → external/connection/connection-get.mdx} +16 -11
  219. package/docs/docs/cmd/{search/externalconnection/externalconnection-list.mdx → external/connection/connection-list.mdx} +12 -7
  220. package/docs/docs/cmd/external/connection/connection-remove.mdx +54 -0
  221. package/docs/docs/cmd/external/connection/connection-schema-add.mdx +41 -0
  222. package/docs/docs/cmd/external/item/item-add.mdx +145 -0
  223. package/docs/docs/cmd/flow/run/run-cancel.mdx +3 -0
  224. package/docs/docs/cmd/graph/changelog/changelog-list.mdx +5 -5
  225. package/docs/docs/cmd/login.mdx +1 -1
  226. package/docs/docs/cmd/onenote/notebook/notebook-list.mdx +1 -1
  227. package/docs/docs/cmd/outlook/message/message-list.mdx +1 -1
  228. package/docs/docs/cmd/outlook/message/message-move.mdx +1 -1
  229. package/docs/docs/cmd/planner/bucket/bucket-add.mdx +1 -1
  230. package/docs/docs/cmd/planner/bucket/bucket-set.mdx +1 -1
  231. package/docs/docs/cmd/planner/plan/plan-set.mdx +3 -3
  232. package/docs/docs/cmd/planner/task/task-set.mdx +1 -1
  233. package/docs/docs/cmd/purview/auditlog/auditlog-list.mdx +3 -3
  234. package/docs/docs/cmd/purview/retentionevent/retentionevent-add.mdx +1 -1
  235. package/docs/docs/cmd/purview/retentionevent/retentionevent-get.mdx +1 -1
  236. package/docs/docs/cmd/purview/retentioneventtype/retentioneventtype-add.mdx +1 -1
  237. package/docs/docs/cmd/purview/retentioneventtype/retentioneventtype-get.mdx +1 -1
  238. package/docs/docs/cmd/purview/retentioneventtype/retentioneventtype-remove.mdx +1 -1
  239. package/docs/docs/cmd/purview/retentioneventtype/retentioneventtype-set.mdx +1 -1
  240. package/docs/docs/cmd/purview/retentionlabel/retentionlabel-add.mdx +1 -1
  241. package/docs/docs/cmd/purview/sensitivitylabel/sensitivitylabel-policysettings-list.mdx +4 -4
  242. package/docs/docs/cmd/spfx/project/project-upgrade.mdx +1 -1
  243. package/docs/docs/cmd/spo/app/app-add.mdx +1 -1
  244. package/docs/docs/cmd/spo/app/app-deploy.mdx +1 -1
  245. package/docs/docs/cmd/spo/app/app-get.mdx +1 -1
  246. package/docs/docs/cmd/spo/app/app-install.mdx +1 -1
  247. package/docs/docs/cmd/spo/app/app-list.mdx +1 -1
  248. package/docs/docs/cmd/spo/app/app-remove.mdx +1 -1
  249. package/docs/docs/cmd/spo/app/app-retract.mdx +1 -1
  250. package/docs/docs/cmd/spo/app/app-uninstall.mdx +1 -1
  251. package/docs/docs/cmd/spo/app/app-upgrade.mdx +1 -1
  252. package/docs/docs/cmd/spo/contenttype/contenttype-add.mdx +1 -1
  253. package/docs/docs/cmd/spo/contenttype/contenttype-set.mdx +1 -1
  254. package/docs/docs/cmd/spo/file/file-rename.mdx +2 -0
  255. package/docs/docs/cmd/spo/hidedefaultthemes/hidedefaultthemes-get.mdx +1 -1
  256. package/docs/docs/cmd/spo/hidedefaultthemes/hidedefaultthemes-set.mdx +1 -1
  257. package/docs/docs/cmd/spo/serviceprincipal/serviceprincipal-grant-revoke.mdx +10 -1
  258. package/docs/docs/cmd/spo/site/site-add.mdx +25 -4
  259. package/docs/docs/cmd/spo/site/site-appcatalog-add.mdx +1 -1
  260. package/docs/docs/cmd/spo/site/site-appcatalog-remove.mdx +1 -1
  261. package/docs/docs/cmd/spo/site/site-groupify.mdx +1 -1
  262. package/docs/docs/cmd/spo/site/site-set.mdx +15 -0
  263. package/docs/docs/cmd/spo/sitedesign/sitedesign-add.mdx +3 -3
  264. package/docs/docs/cmd/spo/sitedesign/sitedesign-apply.mdx +1 -1
  265. package/docs/docs/cmd/spo/sitedesign/sitedesign-get.mdx +1 -1
  266. package/docs/docs/cmd/spo/sitedesign/sitedesign-list.mdx +1 -1
  267. package/docs/docs/cmd/spo/sitedesign/sitedesign-remove.mdx +1 -1
  268. package/docs/docs/cmd/spo/sitedesign/sitedesign-rights-grant.mdx +1 -1
  269. package/docs/docs/cmd/spo/sitedesign/sitedesign-rights-list.mdx +1 -1
  270. package/docs/docs/cmd/spo/sitedesign/sitedesign-rights-revoke.mdx +1 -1
  271. package/docs/docs/cmd/spo/sitedesign/sitedesign-run-list.mdx +1 -1
  272. package/docs/docs/cmd/spo/sitedesign/sitedesign-run-status-get.mdx +1 -1
  273. package/docs/docs/cmd/spo/sitedesign/sitedesign-set.mdx +3 -3
  274. package/docs/docs/cmd/spo/sitedesign/sitedesign-task-get.mdx +1 -1
  275. package/docs/docs/cmd/spo/sitedesign/sitedesign-task-list.mdx +1 -1
  276. package/docs/docs/cmd/spo/sitedesign/sitedesign-task-remove.mdx +1 -1
  277. package/docs/docs/cmd/spo/sitescript/sitescript-add.mdx +1 -1
  278. package/docs/docs/cmd/spo/sitescript/sitescript-get.mdx +73 -3
  279. package/docs/docs/cmd/spo/sitescript/sitescript-list.mdx +1 -1
  280. package/docs/docs/cmd/spo/sitescript/sitescript-remove.mdx +1 -1
  281. package/docs/docs/cmd/spo/sitescript/sitescript-set.mdx +1 -1
  282. package/docs/docs/cmd/spo/storageentity/storageentity-get.mdx +1 -1
  283. package/docs/docs/cmd/spo/storageentity/storageentity-list.mdx +1 -1
  284. package/docs/docs/cmd/spo/storageentity/storageentity-remove.mdx +1 -1
  285. package/docs/docs/cmd/spo/storageentity/storageentity-set.mdx +1 -1
  286. package/docs/docs/cmd/spo/theme/theme-apply.mdx +1 -1
  287. package/docs/docs/cmd/spo/theme/theme-get.mdx +1 -1
  288. package/docs/docs/cmd/spo/theme/theme-list.mdx +1 -1
  289. package/docs/docs/cmd/spo/theme/theme-remove.mdx +1 -1
  290. package/docs/docs/cmd/spo/user/user-remove.mdx +1 -1
  291. package/docs/docs/cmd/spo/web/web-set.mdx +1 -1
  292. package/docs/docs/cmd/teams/channel/channel-remove.mdx +1 -1
  293. package/docs/docs/cmd/teams/meeting/meeting-get.mdx +1 -1
  294. package/docs/docs/cmd/teams/meeting/meeting-transcript-list.mdx +1 -1
  295. package/docs/docs/cmd/teams/report/report-pstncalls.mdx +1 -1
  296. package/docs/docs/cmd/teams/tab/tab-remove.mdx +1 -1
  297. package/docs/docs/cmd/teams/team/team-remove.mdx +1 -1
  298. package/docs/docs/cmd/teams/user/user-app-remove.mdx +23 -5
  299. package/docs/docs/cmd/tenant/people/people-profilecardproperty-add.mdx +126 -0
  300. package/docs/docs/cmd/tenant/people/people-profilecardproperty-get.mdx +101 -0
  301. package/docs/docs/cmd/tenant/people/people-profilecardproperty-list.mdx +98 -0
  302. package/docs/docs/cmd/tenant/people/people-profilecardproperty-remove.mdx +61 -0
  303. package/docs/docs/cmd/tenant/people/people-profilecardproperty-set.mdx +120 -0
  304. package/docs/docs/cmd/tenant/serviceannouncement/serviceannouncement-healthissue-list.mdx +1 -1
  305. package/docs/docs/cmd/tenant/serviceannouncement/serviceannouncement-message-get.mdx +1 -1
  306. package/docs/docs/cmd/tenant/serviceannouncement/serviceannouncement-message-list.mdx +1 -1
  307. package/docs/docs/cmd/todo/task/task-set.mdx +1 -1
  308. package/npm-shrinkwrap.json +609 -569
  309. package/package.json +36 -37
  310. package/dist/m365/search/commands.js +0 -9
  311. package/docs/docs/cmd/search/externalconnection/externalconnection-remove.mdx +0 -48
  312. 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 _SearchExternalConnectionGetCommand_instances, _SearchExternalConnectionGetCommand_initTelemetry, _SearchExternalConnectionGetCommand_initOptions, _SearchExternalConnectionGetCommand_initOptionSets;
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 SearchExternalConnectionGetCommand extends GraphCommand {
11
+ class ExternalConnectionGetCommand extends GraphCommand {
12
12
  get name() {
13
- return commands.EXTERNALCONNECTION_GET;
13
+ return commands.CONNECTION_GET;
14
14
  }
15
15
  get description() {
16
- return 'Get a specific external connection for use in Microsoft Search';
16
+ return 'Get a specific external connection';
17
+ }
18
+ alias() {
19
+ return [commands.EXTERNALCONNECTION_GET];
17
20
  }
18
21
  constructor() {
19
22
  super();
20
- _SearchExternalConnectionGetCommand_instances.add(this);
21
- __classPrivateFieldGet(this, _SearchExternalConnectionGetCommand_instances, "m", _SearchExternalConnectionGetCommand_initTelemetry).call(this);
22
- __classPrivateFieldGet(this, _SearchExternalConnectionGetCommand_instances, "m", _SearchExternalConnectionGetCommand_initOptions).call(this);
23
- __classPrivateFieldGet(this, _SearchExternalConnectionGetCommand_instances, "m", _SearchExternalConnectionGetCommand_initOptionSets).call(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
- _SearchExternalConnectionGetCommand_instances = new WeakSet(), _SearchExternalConnectionGetCommand_initTelemetry = function _SearchExternalConnectionGetCommand_initTelemetry() {
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
- }, _SearchExternalConnectionGetCommand_initOptions = function _SearchExternalConnectionGetCommand_initOptions() {
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
- }, _SearchExternalConnectionGetCommand_initOptionSets = function _SearchExternalConnectionGetCommand_initOptionSets() {
71
+ }, _ExternalConnectionGetCommand_initOptionSets = function _ExternalConnectionGetCommand_initOptionSets() {
69
72
  this.optionSets.push({ options: ['id', 'name'] });
70
73
  };
71
- export default new SearchExternalConnectionGetCommand();
72
- //# sourceMappingURL=externalconnection-get.js.map
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 SearchExternalConnectionListCommand extends GraphCommand {
4
+ class ExternalConnectionListCommand extends GraphCommand {
5
5
  get name() {
6
- return commands.EXTERNALCONNECTION_LIST;
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 SearchExternalConnectionListCommand();
25
- //# sourceMappingURL=externalconnection-list.js.map
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 _SearchExternalConnectionRemoveCommand_instances, _SearchExternalConnectionRemoveCommand_initTelemetry, _SearchExternalConnectionRemoveCommand_initOptions, _SearchExternalConnectionRemoveCommand_initOptionSets;
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 SearchExternalConnectionRemoveCommand extends GraphCommand {
12
+ class ExternalConnectionRemoveCommand extends GraphCommand {
13
13
  get name() {
14
- return commands.EXTERNALCONNECTION_REMOVE;
14
+ return commands.CONNECTION_REMOVE;
15
15
  }
16
16
  get description() {
17
- return 'Removes a specific External Connection from Microsoft Search';
17
+ return 'Removes a specific external connection';
18
+ }
19
+ alias() {
20
+ return [commands.EXTERNALCONNECTION_REMOVE];
18
21
  }
19
22
  constructor() {
20
23
  super();
21
- _SearchExternalConnectionRemoveCommand_instances.add(this);
22
- __classPrivateFieldGet(this, _SearchExternalConnectionRemoveCommand_instances, "m", _SearchExternalConnectionRemoveCommand_initTelemetry).call(this);
23
- __classPrivateFieldGet(this, _SearchExternalConnectionRemoveCommand_instances, "m", _SearchExternalConnectionRemoveCommand_initOptions).call(this);
24
- __classPrivateFieldGet(this, _SearchExternalConnectionRemoveCommand_instances, "m", _SearchExternalConnectionRemoveCommand_initOptionSets).call(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 in Microsoft Search`;
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.prompt({
54
- type: 'confirm',
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
- _SearchExternalConnectionRemoveCommand_instances = new WeakSet(), _SearchExternalConnectionRemoveCommand_initTelemetry = function _SearchExternalConnectionRemoveCommand_initTelemetry() {
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
- }, _SearchExternalConnectionRemoveCommand_initOptions = function _SearchExternalConnectionRemoveCommand_initOptions() {
87
+ }, _ExternalConnectionRemoveCommand_initOptions = function _ExternalConnectionRemoveCommand_initOptions() {
90
88
  this.options.unshift({ option: '--id [id]' }, { option: '--name [name]' }, { option: '-f, --force' });
91
- }, _SearchExternalConnectionRemoveCommand_initOptionSets = function _SearchExternalConnectionRemoveCommand_initOptionSets() {
89
+ }, _ExternalConnectionRemoveCommand_initOptionSets = function _ExternalConnectionRemoveCommand_initOptionSets() {
92
90
  this.optionSets.push({ options: ['id', 'name'] });
93
91
  };
94
- export default new SearchExternalConnectionRemoveCommand();
95
- //# sourceMappingURL=externalconnection-remove.js.map
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 _SearchExternalConnectionSchemaAddCommand_instances, _SearchExternalConnectionSchemaAddCommand_initOptions, _SearchExternalConnectionSchemaAddCommand_initValidators;
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 SearchExternalConnectionSchemaAddCommand extends GraphCommand {
10
+ class ExternalConnectionSchemaAddCommand extends GraphCommand {
11
11
  get name() {
12
- return commands.EXTERNALCONNECTION_SCHEMA_ADD;
12
+ return commands.CONNECTION_SCHEMA_ADD;
13
13
  }
14
14
  get description() {
15
- return 'This command allows the administrator to add a schema to a specific external connection for use in Microsoft Search.';
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
- _SearchExternalConnectionSchemaAddCommand_instances.add(this);
20
- __classPrivateFieldGet(this, _SearchExternalConnectionSchemaAddCommand_instances, "m", _SearchExternalConnectionSchemaAddCommand_initOptions).call(this);
21
- __classPrivateFieldGet(this, _SearchExternalConnectionSchemaAddCommand_instances, "m", _SearchExternalConnectionSchemaAddCommand_initValidators).call(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
- _SearchExternalConnectionSchemaAddCommand_instances = new WeakSet(), _SearchExternalConnectionSchemaAddCommand_initOptions = function _SearchExternalConnectionSchemaAddCommand_initOptions() {
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
- }, _SearchExternalConnectionSchemaAddCommand_initValidators = function _SearchExternalConnectionSchemaAddCommand_initValidators() {
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 SearchExternalConnectionSchemaAddCommand();
73
- //# sourceMappingURL=externalconnection-schema-add.js.map
75
+ export default new ExternalConnectionSchemaAddCommand();
76
+ //# sourceMappingURL=connection-schema-add.js.map