@pnp/cli-microsoft365 7.3.0-beta.a98760b → 7.3.0-beta.d293309

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 (422) hide show
  1. package/allCommands.json +1 -1
  2. package/allCommandsFull.json +1 -1
  3. package/dist/Auth.js +4 -5
  4. package/dist/Command.js +10 -13
  5. package/dist/api.js +2 -3
  6. package/dist/appInsights.js +2 -1
  7. package/dist/autocomplete.js +4 -6
  8. package/dist/chili/chili.js +1 -2
  9. package/dist/cli/cli.js +880 -0
  10. package/dist/index.js +2 -10
  11. package/dist/m365/aad/commands/administrativeunit/administrativeunit-member-list.js +138 -0
  12. package/dist/m365/aad/commands/administrativeunit/administrativeunit-remove.js +2 -2
  13. package/dist/m365/aad/commands/app/app-get.js +2 -2
  14. package/dist/m365/aad/commands/app/app-remove.js +3 -3
  15. package/dist/m365/aad/commands/app/app-role-add.js +2 -2
  16. package/dist/m365/aad/commands/app/app-role-list.js +2 -2
  17. package/dist/m365/aad/commands/app/app-role-remove.js +4 -4
  18. package/dist/m365/aad/commands/app/app-set.js +2 -2
  19. package/dist/m365/aad/commands/approleassignment/approleassignment-add.js +2 -2
  20. package/dist/m365/aad/commands/approleassignment/approleassignment-remove.js +2 -2
  21. package/dist/m365/aad/commands/group/group-list.js +71 -3
  22. package/dist/m365/aad/commands/group/group-remove.js +2 -2
  23. package/dist/m365/aad/commands/groupsetting/groupsetting-remove.js +2 -2
  24. package/dist/m365/aad/commands/m365group/m365group-recyclebinitem-clear.js +2 -2
  25. package/dist/m365/aad/commands/m365group/m365group-recyclebinitem-remove.js +3 -3
  26. package/dist/m365/aad/commands/m365group/m365group-recyclebinitem-restore.js +2 -2
  27. package/dist/m365/aad/commands/m365group/m365group-remove.js +2 -2
  28. package/dist/m365/aad/commands/m365group/m365group-teamify.js +2 -2
  29. package/dist/m365/aad/commands/m365group/m365group-user-remove.js +2 -2
  30. package/dist/m365/aad/commands/oauth2grant/oauth2grant-remove.js +2 -2
  31. package/dist/m365/aad/commands/siteclassification/siteclassification-disable.js +2 -2
  32. package/dist/m365/aad/commands/sp/sp-add.js +2 -2
  33. package/dist/m365/aad/commands/sp/sp-get.js +2 -2
  34. package/dist/m365/aad/commands/user/user-get.js +2 -2
  35. package/dist/m365/aad/commands/user/user-license-remove.js +2 -2
  36. package/dist/m365/aad/commands/user/user-recyclebinitem-clear.js +2 -2
  37. package/dist/m365/aad/commands/user/user-recyclebinitem-remove.js +2 -2
  38. package/dist/m365/aad/commands/user/user-remove.js +2 -2
  39. package/dist/m365/aad/commands.js +1 -0
  40. package/dist/m365/app/commands/app-get.js +2 -2
  41. package/dist/m365/app/commands/app-open.js +2 -2
  42. package/dist/m365/app/commands/permission/permission-list.js +2 -2
  43. package/dist/m365/base/AppCommand.js +2 -2
  44. package/dist/m365/booking/commands/business/business-get.js +2 -2
  45. package/dist/m365/cli/commands/cli-doctor.js +2 -2
  46. package/dist/m365/cli/commands/cli-reconsent.js +2 -2
  47. package/dist/m365/cli/commands/config/config-get.js +2 -2
  48. package/dist/m365/cli/commands/config/config-list.js +2 -2
  49. package/dist/m365/cli/commands/config/config-reset.js +3 -3
  50. package/dist/m365/cli/commands/config/config-set.js +4 -4
  51. package/dist/m365/commands/docs.js +2 -2
  52. package/dist/m365/commands/login.js +4 -4
  53. package/dist/m365/commands/setup.js +8 -8
  54. package/dist/m365/context/commands/context-remove.js +2 -2
  55. package/dist/m365/context/commands/option/option-remove.js +2 -2
  56. package/dist/m365/external/commands/connection/connection-doctor.js +423 -0
  57. package/dist/m365/external/commands/connection/connection-remove.js +3 -3
  58. package/dist/m365/external/commands/item/item-add.js +144 -0
  59. package/dist/m365/external/commands.js +3 -1
  60. package/dist/m365/flow/commands/flow-remove.js +2 -2
  61. package/dist/m365/flow/commands/owner/owner-list.js +2 -2
  62. package/dist/m365/flow/commands/owner/owner-remove.js +2 -2
  63. package/dist/m365/flow/commands/run/run-cancel.js +2 -2
  64. package/dist/m365/flow/commands/run/run-resubmit.js +2 -2
  65. package/dist/m365/graph/commands/changelog/changelog-list.js +3 -3
  66. package/dist/m365/graph/commands/schemaextension/schemaextension-remove.js +2 -2
  67. package/dist/m365/outlook/commands/message/message-list.js +2 -2
  68. package/dist/m365/outlook/commands/message/message-move.js +2 -2
  69. package/dist/m365/pa/commands/app/app-consent-set.js +2 -2
  70. package/dist/m365/pa/commands/app/app-get.js +2 -2
  71. package/dist/m365/pa/commands/app/app-permission-remove.js +2 -2
  72. package/dist/m365/pa/commands/app/app-remove.js +2 -2
  73. package/dist/m365/planner/commands/bucket/bucket-get.js +2 -2
  74. package/dist/m365/planner/commands/bucket/bucket-remove.js +3 -3
  75. package/dist/m365/planner/commands/bucket/bucket-set.js +2 -2
  76. package/dist/m365/planner/commands/plan/plan-remove.js +2 -2
  77. package/dist/m365/planner/commands/roster/roster-member-remove.js +3 -3
  78. package/dist/m365/planner/commands/roster/roster-remove.js +2 -2
  79. package/dist/m365/planner/commands/task/task-checklistitem-add.js +2 -2
  80. package/dist/m365/planner/commands/task/task-checklistitem-list.js +2 -2
  81. package/dist/m365/planner/commands/task/task-checklistitem-remove.js +2 -2
  82. package/dist/m365/planner/commands/task/task-get.js +3 -3
  83. package/dist/m365/planner/commands/task/task-reference-remove.js +2 -2
  84. package/dist/m365/planner/commands/task/task-remove.js +4 -4
  85. package/dist/m365/pp/commands/aibuildermodel/aibuildermodel-get.js +2 -2
  86. package/dist/m365/pp/commands/aibuildermodel/aibuildermodel-remove.js +3 -3
  87. package/dist/m365/pp/commands/card/card-clone.js +2 -2
  88. package/dist/m365/pp/commands/card/card-get.js +2 -2
  89. package/dist/m365/pp/commands/card/card-remove.js +3 -3
  90. package/dist/m365/pp/commands/chatbot/chatbot-get.js +2 -2
  91. package/dist/m365/pp/commands/chatbot/chatbot-remove.js +3 -3
  92. package/dist/m365/pp/commands/dataverse/dataverse-table-remove.js +2 -2
  93. package/dist/m365/pp/commands/dataverse/dataverse-table-row-remove.js +2 -2
  94. package/dist/m365/pp/commands/managementapp/managementapp-add.js +2 -2
  95. package/dist/m365/pp/commands/solution/solution-get.js +2 -2
  96. package/dist/m365/pp/commands/solution/solution-list.js +2 -2
  97. package/dist/m365/pp/commands/solution/solution-publish.js +2 -2
  98. package/dist/m365/pp/commands/solution/solution-publisher-remove.js +3 -3
  99. package/dist/m365/pp/commands/solution/solution-remove.js +3 -3
  100. package/dist/m365/purview/commands/retentionevent/retentionevent-remove.js +2 -2
  101. package/dist/m365/purview/commands/retentioneventtype/retentioneventtype-remove.js +2 -2
  102. package/dist/m365/purview/commands/retentionlabel/retentionlabel-remove.js +2 -2
  103. package/dist/m365/spfx/commands/project/project-permissions-grant.js +2 -2
  104. package/dist/m365/spo/commands/app/app-add.js +2 -2
  105. package/dist/m365/spo/commands/app/app-remove.js +2 -2
  106. package/dist/m365/spo/commands/app/app-retract.js +2 -2
  107. package/dist/m365/spo/commands/app/app-uninstall.js +2 -2
  108. package/dist/m365/spo/commands/applicationcustomizer/applicationcustomizer-get.js +2 -2
  109. package/dist/m365/spo/commands/applicationcustomizer/applicationcustomizer-remove.js +3 -3
  110. package/dist/m365/spo/commands/applicationcustomizer/applicationcustomizer-set.js +2 -2
  111. package/dist/m365/spo/commands/cdn/cdn-origin-remove.js +2 -2
  112. package/dist/m365/spo/commands/commandset/commandset-get.js +2 -2
  113. package/dist/m365/spo/commands/commandset/commandset-remove.js +3 -3
  114. package/dist/m365/spo/commands/commandset/commandset-set.js +2 -2
  115. package/dist/m365/spo/commands/contenttype/contenttype-add.js +2 -2
  116. package/dist/m365/spo/commands/contenttype/contenttype-field-remove.js +2 -2
  117. package/dist/m365/spo/commands/contenttype/contenttype-remove.js +2 -2
  118. package/dist/m365/spo/commands/customaction/customaction-add.js +1 -1
  119. package/dist/m365/spo/commands/customaction/customaction-clear.js +2 -2
  120. package/dist/m365/spo/commands/customaction/customaction-get.js +3 -3
  121. package/dist/m365/spo/commands/customaction/customaction-remove.js +3 -3
  122. package/dist/m365/spo/commands/eventreceiver/eventreceiver-get.js +2 -2
  123. package/dist/m365/spo/commands/eventreceiver/eventreceiver-remove.js +3 -3
  124. package/dist/m365/spo/commands/field/field-remove.js +2 -2
  125. package/dist/m365/spo/commands/file/file-add.js +1 -1
  126. package/dist/m365/spo/commands/file/file-checkout-undo.js +2 -2
  127. package/dist/m365/spo/commands/file/file-remove.js +2 -2
  128. package/dist/m365/spo/commands/file/file-rename.js +2 -2
  129. package/dist/m365/spo/commands/file/file-retentionlabel-remove.js +2 -2
  130. package/dist/m365/spo/commands/file/file-roleassignment-add.js +5 -5
  131. package/dist/m365/spo/commands/file/file-roleassignment-remove.js +5 -5
  132. package/dist/m365/spo/commands/file/file-roleinheritance-break.js +3 -3
  133. package/dist/m365/spo/commands/file/file-roleinheritance-reset.js +3 -3
  134. package/dist/m365/spo/commands/file/file-sharinginfo-get.js +2 -2
  135. package/dist/m365/spo/commands/file/file-sharinglink-clear.js +3 -3
  136. package/dist/m365/spo/commands/file/file-sharinglink-list.js +2 -2
  137. package/dist/m365/spo/commands/file/file-sharinglink-remove.js +2 -2
  138. package/dist/m365/spo/commands/file/file-version-clear.js +2 -2
  139. package/dist/m365/spo/commands/file/file-version-remove.js +2 -2
  140. package/dist/m365/spo/commands/file/file-version-restore.js +2 -2
  141. package/dist/m365/spo/commands/folder/folder-remove.js +2 -2
  142. package/dist/m365/spo/commands/folder/folder-retentionlabel-remove.js +2 -2
  143. package/dist/m365/spo/commands/folder/folder-roleassignment-add.js +4 -4
  144. package/dist/m365/spo/commands/folder/folder-roleassignment-remove.js +4 -4
  145. package/dist/m365/spo/commands/folder/folder-roleinheritance-break.js +2 -2
  146. package/dist/m365/spo/commands/folder/folder-roleinheritance-reset.js +2 -2
  147. package/dist/m365/spo/commands/group/group-list.js +2 -2
  148. package/dist/m365/spo/commands/group/group-member-remove.js +9 -9
  149. package/dist/m365/spo/commands/group/group-remove.js +2 -2
  150. package/dist/m365/spo/commands/group/group-set.js +2 -2
  151. package/dist/m365/spo/commands/homesite/homesite-remove.js +2 -2
  152. package/dist/m365/spo/commands/hubsite/hubsite-connect.js +2 -2
  153. package/dist/m365/spo/commands/hubsite/hubsite-disconnect.js +3 -3
  154. package/dist/m365/spo/commands/hubsite/hubsite-get.js +4 -4
  155. package/dist/m365/spo/commands/hubsite/hubsite-rights-revoke.js +2 -2
  156. package/dist/m365/spo/commands/hubsite/hubsite-unregister.js +2 -2
  157. package/dist/m365/spo/commands/knowledgehub/knowledgehub-remove.js +2 -2
  158. package/dist/m365/spo/commands/list/list-contenttype-remove.js +2 -2
  159. package/dist/m365/spo/commands/list/list-remove.js +2 -2
  160. package/dist/m365/spo/commands/list/list-retentionlabel-remove.js +2 -2
  161. package/dist/m365/spo/commands/list/list-roleassignment-remove.js +4 -4
  162. package/dist/m365/spo/commands/list/list-roleinheritance-break.js +2 -2
  163. package/dist/m365/spo/commands/list/list-roleinheritance-reset.js +2 -2
  164. package/dist/m365/spo/commands/list/list-view-field-remove.js +2 -2
  165. package/dist/m365/spo/commands/list/list-view-remove.js +2 -2
  166. package/dist/m365/spo/commands/list/list-webhook-remove.js +2 -2
  167. package/dist/m365/spo/commands/listitem/listitem-attachment-remove.js +2 -2
  168. package/dist/m365/spo/commands/listitem/listitem-list.js +2 -2
  169. package/dist/m365/spo/commands/listitem/listitem-remove.js +2 -2
  170. package/dist/m365/spo/commands/listitem/listitem-retentionlabel-remove.js +2 -2
  171. package/dist/m365/spo/commands/listitem/listitem-roleassignment-add.js +4 -4
  172. package/dist/m365/spo/commands/listitem/listitem-roleassignment-remove.js +4 -4
  173. package/dist/m365/spo/commands/listitem/listitem-roleinheritance-break.js +2 -2
  174. package/dist/m365/spo/commands/listitem/listitem-roleinheritance-reset.js +2 -2
  175. package/dist/m365/spo/commands/navigation/navigation-node-remove.js +2 -2
  176. package/dist/m365/spo/commands/orgassetslibrary/orgassetslibrary-remove.js +2 -2
  177. package/dist/m365/spo/commands/orgnewssite/orgnewssite-remove.js +2 -2
  178. package/dist/m365/spo/commands/page/page-add.js +4 -4
  179. package/dist/m365/spo/commands/page/page-column-get.js +2 -2
  180. package/dist/m365/spo/commands/page/page-column-list.js +2 -2
  181. package/dist/m365/spo/commands/page/page-remove.js +2 -2
  182. package/dist/m365/spo/commands/page/page-section-get.js +2 -2
  183. package/dist/m365/spo/commands/page/page-section-list.js +2 -2
  184. package/dist/m365/spo/commands/page/page-set.js +5 -5
  185. package/dist/m365/spo/commands/propertybag/propertybag-remove.js +2 -2
  186. package/dist/m365/spo/commands/roledefinition/roledefinition-remove.js +2 -2
  187. package/dist/m365/spo/commands/serviceprincipal/serviceprincipal-permissionrequest-approve.js +2 -2
  188. package/dist/m365/spo/commands/serviceprincipal/serviceprincipal-set.js +2 -2
  189. package/dist/m365/spo/commands/site/site-apppermission-remove.js +2 -2
  190. package/dist/m365/spo/commands/site/site-hubsite-disconnect.js +2 -2
  191. package/dist/m365/spo/commands/site/site-recyclebinitem-clear.js +2 -2
  192. package/dist/m365/spo/commands/site/site-recyclebinitem-move.js +2 -2
  193. package/dist/m365/spo/commands/site/site-recyclebinitem-remove.js +2 -2
  194. package/dist/m365/spo/commands/site/site-remove.js +2 -2
  195. package/dist/m365/spo/commands/site/site-set.js +3 -3
  196. package/dist/m365/spo/commands/sitedesign/sitedesign-get.js +2 -2
  197. package/dist/m365/spo/commands/sitedesign/sitedesign-remove.js +2 -2
  198. package/dist/m365/spo/commands/sitedesign/sitedesign-rights-revoke.js +2 -2
  199. package/dist/m365/spo/commands/sitedesign/sitedesign-task-remove.js +2 -2
  200. package/dist/m365/spo/commands/sitescript/sitescript-remove.js +2 -2
  201. package/dist/m365/spo/commands/spo-search.js +2 -2
  202. package/dist/m365/spo/commands/storageentity/storageentity-remove.js +2 -2
  203. package/dist/m365/spo/commands/tenant/tenant-appcatalog-add.js +5 -5
  204. package/dist/m365/spo/commands/tenant/tenant-applicationcustomizer-add.js +5 -5
  205. package/dist/m365/spo/commands/tenant/tenant-applicationcustomizer-get.js +2 -2
  206. package/dist/m365/spo/commands/tenant/tenant-applicationcustomizer-remove.js +3 -3
  207. package/dist/m365/spo/commands/tenant/tenant-applicationcustomizer-set.js +4 -4
  208. package/dist/m365/spo/commands/tenant/tenant-commandset-add.js +5 -5
  209. package/dist/m365/spo/commands/tenant/tenant-commandset-get.js +2 -2
  210. package/dist/m365/spo/commands/tenant/tenant-commandset-remove.js +3 -3
  211. package/dist/m365/spo/commands/tenant/tenant-recyclebinitem-remove.js +2 -2
  212. package/dist/m365/spo/commands/term/term-get.js +2 -2
  213. package/dist/m365/spo/commands/term/term-list.js +2 -2
  214. package/dist/m365/spo/commands/theme/theme-remove.js +2 -2
  215. package/dist/m365/spo/commands/user/user-remove.js +2 -2
  216. package/dist/m365/spo/commands/userprofile/userprofile-get.js +2 -2
  217. package/dist/m365/spo/commands/web/web-remove.js +2 -2
  218. package/dist/m365/spo/commands/web/web-roleassignment-add.js +4 -4
  219. package/dist/m365/spo/commands/web/web-roleassignment-remove.js +4 -4
  220. package/dist/m365/spo/commands/web/web-roleinheritance-break.js +2 -2
  221. package/dist/m365/spo/commands/web/web-roleinheritance-reset.js +2 -2
  222. package/dist/m365/teams/commands/app/app-install.js +32 -5
  223. package/dist/m365/teams/commands/app/app-remove.js +3 -3
  224. package/dist/m365/teams/commands/app/app-uninstall.js +2 -2
  225. package/dist/m365/teams/commands/app/app-update.js +2 -2
  226. package/dist/m365/teams/commands/cache/cache-remove.js +2 -2
  227. package/dist/m365/teams/commands/channel/channel-add.js +2 -2
  228. package/dist/m365/teams/commands/channel/channel-member-add.js +2 -2
  229. package/dist/m365/teams/commands/channel/channel-member-remove.js +3 -3
  230. package/dist/m365/teams/commands/channel/channel-member-set.js +2 -2
  231. package/dist/m365/teams/commands/channel/channel-remove.js +2 -2
  232. package/dist/m365/teams/commands/chat/chat-get.js +3 -3
  233. package/dist/m365/teams/commands/chat/chat-member-remove.js +2 -2
  234. package/dist/m365/teams/commands/chat/chat-message-send.js +3 -3
  235. package/dist/m365/teams/commands/meeting/meeting-add.js +151 -0
  236. package/dist/m365/teams/commands/meeting/meeting-attendancereport-list.js +2 -2
  237. package/dist/m365/teams/commands/tab/tab-remove.js +2 -2
  238. package/dist/m365/teams/commands/team/team-app-list.js +3 -3
  239. package/dist/m365/teams/commands/team/team-remove.js +2 -2
  240. package/dist/m365/teams/commands/user/user-app-list.js +2 -2
  241. package/dist/m365/teams/commands/user/user-app-remove.js +35 -4
  242. package/dist/m365/teams/commands.js +2 -1
  243. package/dist/m365/tenant/commands/people/people-profilecardproperty-remove.js +2 -2
  244. package/dist/m365/todo/commands/list/list-remove.js +2 -2
  245. package/dist/m365/todo/commands/task/task-get.js +2 -2
  246. package/dist/m365/todo/commands/task/task-list.js +2 -2
  247. package/dist/m365/todo/commands/task/task-remove.js +2 -2
  248. package/dist/m365/viva/commands/connections/connections-app-create.js +2 -2
  249. package/dist/m365/yammer/commands/group/group-user-remove.js +2 -2
  250. package/dist/m365/yammer/commands/message/message-like-set.js +2 -2
  251. package/dist/m365/yammer/commands/message/message-remove.js +2 -2
  252. package/dist/m365/yammer/commands/yammer-search.js +2 -2
  253. package/dist/telemetry.js +2 -10
  254. package/dist/utils/aadAdministrativeUnit.js +2 -2
  255. package/dist/utils/aadGroup.js +3 -3
  256. package/dist/utils/prompt.js +4 -7
  257. package/dist/utils/validation.js +5 -2
  258. package/docs/docs/cmd/aad/administrativeunit/administrativeunit-member-list.mdx +312 -0
  259. package/docs/docs/cmd/aad/group/group-list.mdx +11 -0
  260. package/docs/docs/cmd/aad/user/user-password-validate.mdx +2 -2
  261. package/docs/docs/cmd/adaptivecard/adaptivecard-send.mdx +1 -1
  262. package/docs/docs/cmd/external/connection/connection-doctor.mdx +182 -0
  263. package/docs/docs/cmd/external/item/item-add.mdx +145 -0
  264. package/docs/docs/cmd/flow/environment/environment-get.mdx +1 -1
  265. package/docs/docs/cmd/flow/environment/environment-list.mdx +1 -1
  266. package/docs/docs/cmd/flow/flow-disable.mdx +1 -1
  267. package/docs/docs/cmd/flow/flow-enable.mdx +1 -1
  268. package/docs/docs/cmd/flow/flow-export.mdx +1 -1
  269. package/docs/docs/cmd/flow/flow-get.mdx +1 -1
  270. package/docs/docs/cmd/flow/flow-list.mdx +1 -1
  271. package/docs/docs/cmd/flow/run/run-cancel.mdx +1 -1
  272. package/docs/docs/cmd/flow/run/run-get.mdx +1 -1
  273. package/docs/docs/cmd/flow/run/run-list.mdx +1 -1
  274. package/docs/docs/cmd/flow/run/run-resubmit.mdx +1 -1
  275. package/docs/docs/cmd/graph/changelog/changelog-list.mdx +1 -1
  276. package/docs/docs/cmd/graph/schemaextension/schemaextension-add.mdx +1 -1
  277. package/docs/docs/cmd/graph/schemaextension/schemaextension-set.mdx +1 -1
  278. package/docs/docs/cmd/onedrive/report/report-activityfilecounts.mdx +0 -3
  279. package/docs/docs/cmd/onedrive/report/report-activityusercounts.mdx +0 -3
  280. package/docs/docs/cmd/onedrive/report/report-activityuserdetail.mdx +0 -3
  281. package/docs/docs/cmd/onedrive/report/report-usageaccountcounts.mdx +0 -3
  282. package/docs/docs/cmd/onedrive/report/report-usageaccountdetail.mdx +0 -3
  283. package/docs/docs/cmd/onedrive/report/report-usagefilecounts.mdx +0 -3
  284. package/docs/docs/cmd/onedrive/report/report-usagestorage.mdx +0 -3
  285. package/docs/docs/cmd/outlook/report/report-mailactivitycounts.mdx +0 -3
  286. package/docs/docs/cmd/outlook/report/report-mailactivityusercounts.mdx +0 -3
  287. package/docs/docs/cmd/outlook/report/report-mailactivityuserdetail.mdx +0 -3
  288. package/docs/docs/cmd/outlook/report/report-mailappusageappsusercounts.mdx +0 -3
  289. package/docs/docs/cmd/outlook/report/report-mailappusageusercounts.mdx +0 -3
  290. package/docs/docs/cmd/outlook/report/report-mailappusageuserdetail.mdx +0 -3
  291. package/docs/docs/cmd/outlook/report/report-mailappusageversionsusercounts.mdx +0 -3
  292. package/docs/docs/cmd/outlook/report/report-mailboxusagedetail.mdx +0 -3
  293. package/docs/docs/cmd/outlook/report/report-mailboxusagemailboxcount.mdx +0 -3
  294. package/docs/docs/cmd/outlook/report/report-mailboxusagequotastatusmailboxcounts.mdx +0 -3
  295. package/docs/docs/cmd/outlook/report/report-mailboxusagestorage.mdx +0 -3
  296. package/docs/docs/cmd/pa/app/app-get.mdx +1 -1
  297. package/docs/docs/cmd/pa/app/app-list.mdx +1 -1
  298. package/docs/docs/cmd/pa/connector/connector-export.mdx +1 -1
  299. package/docs/docs/cmd/pa/connector/connector-list.mdx +1 -1
  300. package/docs/docs/cmd/pa/environment/environment-get.mdx +1 -1
  301. package/docs/docs/cmd/pa/environment/environment-list.mdx +1 -1
  302. package/docs/docs/cmd/planner/bucket/bucket-add.mdx +1 -1
  303. package/docs/docs/cmd/planner/bucket/bucket-get.mdx +1 -1
  304. package/docs/docs/cmd/planner/bucket/bucket-list.mdx +1 -1
  305. package/docs/docs/cmd/planner/bucket/bucket-remove.mdx +1 -1
  306. package/docs/docs/cmd/planner/bucket/bucket-set.mdx +1 -1
  307. package/docs/docs/cmd/planner/plan/plan-get.mdx +1 -1
  308. package/docs/docs/cmd/planner/plan/plan-list.mdx +1 -1
  309. package/docs/docs/cmd/planner/plan/plan-set.mdx +1 -1
  310. package/docs/docs/cmd/planner/roster/roster-add.mdx +2 -2
  311. package/docs/docs/cmd/planner/roster/roster-get.mdx +1 -1
  312. package/docs/docs/cmd/planner/roster/roster-member-add.mdx +1 -1
  313. package/docs/docs/cmd/planner/roster/roster-member-get.mdx +1 -1
  314. package/docs/docs/cmd/planner/roster/roster-member-list.mdx +1 -1
  315. package/docs/docs/cmd/planner/roster/roster-member-remove.mdx +2 -2
  316. package/docs/docs/cmd/planner/roster/roster-plan-list.mdx +1 -1
  317. package/docs/docs/cmd/planner/roster/roster-remove.mdx +2 -2
  318. package/docs/docs/cmd/planner/task/task-add.mdx +1 -1
  319. package/docs/docs/cmd/planner/task/task-list.mdx +2 -2
  320. package/docs/docs/cmd/planner/task/task-remove.mdx +1 -1
  321. package/docs/docs/cmd/planner/task/task-set.mdx +1 -1
  322. package/docs/docs/cmd/pp/environment/environment-get.mdx +1 -1
  323. package/docs/docs/cmd/pp/environment/environment-list.mdx +1 -1
  324. package/docs/docs/cmd/pp/tenant/tenant-settings-list.mdx +1 -1
  325. package/docs/docs/cmd/pp/tenant/tenant-settings-set.mdx +1 -1
  326. package/docs/docs/cmd/purview/retentionevent/retentionevent-add.mdx +1 -1
  327. package/docs/docs/cmd/purview/retentionevent/retentionevent-get.mdx +1 -1
  328. package/docs/docs/cmd/purview/retentionevent/retentionevent-list.mdx +1 -1
  329. package/docs/docs/cmd/purview/retentionevent/retentionevent-remove.mdx +1 -1
  330. package/docs/docs/cmd/purview/retentioneventtype/retentioneventtype-add.mdx +1 -1
  331. package/docs/docs/cmd/purview/retentioneventtype/retentioneventtype-get.mdx +1 -1
  332. package/docs/docs/cmd/purview/retentioneventtype/retentioneventtype-list.mdx +1 -1
  333. package/docs/docs/cmd/purview/retentioneventtype/retentioneventtype-remove.mdx +1 -1
  334. package/docs/docs/cmd/purview/retentioneventtype/retentioneventtype-set.mdx +1 -1
  335. package/docs/docs/cmd/purview/retentionlabel/retentionlabel-add.mdx +1 -1
  336. package/docs/docs/cmd/purview/retentionlabel/retentionlabel-get.mdx +1 -1
  337. package/docs/docs/cmd/purview/retentionlabel/retentionlabel-list.mdx +1 -1
  338. package/docs/docs/cmd/purview/retentionlabel/retentionlabel-remove.mdx +1 -1
  339. package/docs/docs/cmd/purview/retentionlabel/retentionlabel-set.mdx +1 -1
  340. package/docs/docs/cmd/purview/sensitivitylabel/sensitivitylabel-get.mdx +2 -2
  341. package/docs/docs/cmd/purview/sensitivitylabel/sensitivitylabel-list.mdx +2 -2
  342. package/docs/docs/cmd/purview/sensitivitylabel/sensitivitylabel-policysettings-list.mdx +2 -2
  343. package/docs/docs/cmd/skype/report/report-activitycounts.mdx +0 -2
  344. package/docs/docs/cmd/skype/report/report-activityusercounts.mdx +0 -3
  345. package/docs/docs/cmd/skype/report/report-activityuserdetail.mdx +0 -3
  346. package/docs/docs/cmd/spfx/project/project-externalize.mdx +1 -1
  347. package/docs/docs/cmd/spo/applicationcustomizer/applicationcustomizer-add.mdx +1 -1
  348. package/docs/docs/cmd/spo/applicationcustomizer/applicationcustomizer-set.mdx +1 -1
  349. package/docs/docs/cmd/spo/commandset/commandset-add.mdx +1 -1
  350. package/docs/docs/cmd/spo/commandset/commandset-set.mdx +1 -1
  351. package/docs/docs/cmd/spo/contenttype/contenttype-set.mdx +1 -1
  352. package/docs/docs/cmd/spo/customaction/customaction-add.mdx +1 -1
  353. package/docs/docs/cmd/spo/customaction/customaction-set.mdx +1 -1
  354. package/docs/docs/cmd/spo/eventreceiver/eventreceiver-remove.mdx +1 -1
  355. package/docs/docs/cmd/spo/field/field-set.mdx +1 -1
  356. package/docs/docs/cmd/spo/list/list-sensitivitylabel-ensure.mdx +1 -1
  357. package/docs/docs/cmd/spo/list/list-view-set.mdx +1 -1
  358. package/docs/docs/cmd/spo/listitem/listitem-add.mdx +1 -1
  359. package/docs/docs/cmd/spo/listitem/listitem-batch-add.mdx +1 -1
  360. package/docs/docs/cmd/spo/listitem/listitem-set.mdx +1 -1
  361. package/docs/docs/cmd/spo/page/page-clientsidewebpart-add.mdx +1 -1
  362. package/docs/docs/cmd/spo/page/page-control-set.mdx +1 -1
  363. package/docs/docs/cmd/spo/page/page-set.mdx +1 -1
  364. package/docs/docs/cmd/spo/report/report-activityfilecounts.mdx +0 -3
  365. package/docs/docs/cmd/spo/report/report-activitypages.mdx +0 -3
  366. package/docs/docs/cmd/spo/report/report-activityusercounts.mdx +0 -3
  367. package/docs/docs/cmd/spo/report/report-activityuserdetail.mdx +0 -3
  368. package/docs/docs/cmd/spo/report/report-siteusagedetail.mdx +0 -3
  369. package/docs/docs/cmd/spo/report/report-siteusagefilecounts.mdx +0 -3
  370. package/docs/docs/cmd/spo/report/report-siteusagepages.mdx +0 -3
  371. package/docs/docs/cmd/spo/report/report-siteusagesitecounts.mdx +0 -3
  372. package/docs/docs/cmd/spo/report/report-siteusagestorage.mdx +0 -3
  373. package/docs/docs/cmd/spo/site/site-groupify.mdx +1 -1
  374. package/docs/docs/cmd/spo/site/site-recyclebinitem-clear.mdx +1 -1
  375. package/docs/docs/cmd/spo/site/site-recyclebinitem-remove.mdx +1 -1
  376. package/docs/docs/cmd/spo/tenant/tenant-applicationcustomizer-add.mdx +1 -1
  377. package/docs/docs/cmd/spo/tenant/tenant-applicationcustomizer-set.mdx +1 -1
  378. package/docs/docs/cmd/spo/tenant/tenant-commandset-add.mdx +1 -1
  379. package/docs/docs/cmd/spo/tenant/tenant-commandset-set.mdx +1 -1
  380. package/docs/docs/cmd/spo/term/term-add.mdx +1 -1
  381. package/docs/docs/cmd/spo/term/term-group-add.mdx +1 -1
  382. package/docs/docs/cmd/spo/term/term-set-add.mdx +1 -1
  383. package/docs/docs/cmd/teams/app/app-install.mdx +11 -2
  384. package/docs/docs/cmd/teams/meeting/meeting-add.mdx +283 -0
  385. package/docs/docs/cmd/teams/meeting/meeting-transcript-list.mdx +2 -2
  386. package/docs/docs/cmd/teams/report/report-deviceusagedistributionusercounts.mdx +0 -3
  387. package/docs/docs/cmd/teams/report/report-deviceusageusercounts.mdx +0 -3
  388. package/docs/docs/cmd/teams/report/report-deviceusageuserdetail.mdx +0 -3
  389. package/docs/docs/cmd/teams/report/report-useractivitycounts.mdx +0 -3
  390. package/docs/docs/cmd/teams/report/report-useractivityusercounts.mdx +0 -3
  391. package/docs/docs/cmd/teams/report/report-useractivityuserdetail.mdx +0 -3
  392. package/docs/docs/cmd/teams/user/user-app-remove.mdx +13 -4
  393. package/docs/docs/cmd/tenant/people/people-profilecardproperty-add.mdx +1 -1
  394. package/docs/docs/cmd/tenant/people/people-profilecardproperty-remove.mdx +1 -1
  395. package/docs/docs/cmd/tenant/people/people-profilecardproperty-set.mdx +1 -1
  396. package/docs/docs/cmd/tenant/report/report-activeusercounts.mdx +0 -3
  397. package/docs/docs/cmd/tenant/report/report-activeuserdetail.mdx +0 -3
  398. package/docs/docs/cmd/tenant/report/report-servicesusercounts.mdx +0 -3
  399. package/docs/docs/cmd/yammer/group/group-list.mdx +1 -1
  400. package/docs/docs/cmd/yammer/group/group-user-add.mdx +1 -1
  401. package/docs/docs/cmd/yammer/group/group-user-remove.mdx +1 -1
  402. package/docs/docs/cmd/yammer/message/message-add.mdx +1 -1
  403. package/docs/docs/cmd/yammer/message/message-get.mdx +1 -1
  404. package/docs/docs/cmd/yammer/message/message-like-set.mdx +1 -1
  405. package/docs/docs/cmd/yammer/message/message-list.mdx +1 -1
  406. package/docs/docs/cmd/yammer/message/message-remove.mdx +1 -1
  407. package/docs/docs/cmd/yammer/network/network-list.mdx +1 -1
  408. package/docs/docs/cmd/yammer/report/report-activitycounts.mdx +0 -3
  409. package/docs/docs/cmd/yammer/report/report-activityusercounts.mdx +0 -3
  410. package/docs/docs/cmd/yammer/report/report-activityuserdetail.mdx +0 -3
  411. package/docs/docs/cmd/yammer/report/report-deviceusagedistributionusercounts.mdx +0 -3
  412. package/docs/docs/cmd/yammer/report/report-deviceusageusercounts.mdx +0 -3
  413. package/docs/docs/cmd/yammer/report/report-deviceusageuserdetail.mdx +0 -3
  414. package/docs/docs/cmd/yammer/report/report-groupsactivitycounts.mdx +0 -3
  415. package/docs/docs/cmd/yammer/report/report-groupsactivitydetail.mdx +0 -3
  416. package/docs/docs/cmd/yammer/report/report-groupsactivitygroupcounts.mdx +0 -3
  417. package/docs/docs/cmd/yammer/user/user-get.mdx +1 -1
  418. package/docs/docs/cmd/yammer/user/user-list.mdx +1 -1
  419. package/docs/docs/cmd/yammer/yammer-search.mdx +1 -1
  420. package/npm-shrinkwrap.json +1012 -410
  421. package/package.json +26 -25
  422. package/dist/cli/Cli.js +0 -857
@@ -0,0 +1,423 @@
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 showSpinner = cli.getSettingWithDefaultValue(settingsNames.showSpinner, true) &&
32
+ output === 'text' &&
33
+ typeof global.it === 'undefined';
34
+ let checks = [
35
+ {
36
+ id: 'loadExternalConnection',
37
+ text: 'Load connection',
38
+ fn: this.loadConnection,
39
+ type: 'required'
40
+ },
41
+ {
42
+ id: 'loadSchema',
43
+ text: 'Load schema',
44
+ fn: this.loadSchema,
45
+ type: 'required'
46
+ }
47
+ ];
48
+ if (ux === 'copilot' || ux === 'all') {
49
+ checks.push({
50
+ id: 'copilotRequiredSemanticLabels',
51
+ text: 'Required semantic labels',
52
+ fn: this.checkCopilotRequiredSemanticLabels,
53
+ type: 'required'
54
+ }, {
55
+ id: 'searchableProperties',
56
+ text: 'Searchable properties',
57
+ fn: this.checkSearchableProperties,
58
+ type: 'required'
59
+ }, {
60
+ id: 'contentIngested',
61
+ text: 'Items have content ingested',
62
+ fn: this.checkContentIngested,
63
+ type: 'required'
64
+ }, {
65
+ id: 'enabledForInlineResults',
66
+ text: 'Connection configured for inline results',
67
+ type: 'required'
68
+ }, {
69
+ id: 'itemsHaveActivities',
70
+ text: 'Items have activities recorded',
71
+ type: 'recommended'
72
+ }, {
73
+ id: 'meaningfulNameAndDescription',
74
+ text: 'Meaningful connection name and description',
75
+ type: 'required'
76
+ });
77
+ }
78
+ if (ux === 'search' || ux === 'all') {
79
+ checks.push({
80
+ id: 'semanticLabels',
81
+ text: 'Semantic labels',
82
+ fn: this.checkSemanticLabels,
83
+ type: 'recommended'
84
+ }, {
85
+ id: 'searchableProperties',
86
+ text: 'Searchable properties',
87
+ fn: this.checkSearchableProperties,
88
+ type: 'recommended'
89
+ }, {
90
+ id: 'resultType',
91
+ text: 'Result type',
92
+ fn: this.checkResultType,
93
+ type: 'recommended'
94
+ }, {
95
+ id: 'contentIngested',
96
+ text: 'Items have content ingested',
97
+ fn: this.checkContentIngested,
98
+ type: 'recommended'
99
+ }, {
100
+ id: 'itemsHaveActivities',
101
+ text: 'Items have activities recorded',
102
+ type: 'recommended'
103
+ });
104
+ }
105
+ checks.push({
106
+ id: 'urlToItemResolver',
107
+ text: 'urlToItemResolver configured',
108
+ fn: this.checkUrlToItemResolverConfigured,
109
+ type: 'recommended'
110
+ });
111
+ // filter out duplicate checks based on their IDs
112
+ checks = checks.filter((check, index, self) => self.findIndex(c => c.id === check.id) === index);
113
+ for (const check of checks) {
114
+ if (this.debug) {
115
+ logger.logToStderr(`Running check ${check.id}...`);
116
+ }
117
+ // don't show spinner if running tests
118
+ /* c8 ignore next 3 */
119
+ if (showSpinner) {
120
+ cli.spinner.start(check.text);
121
+ }
122
+ // only automated checks have functions
123
+ if (!check.fn) {
124
+ // don't show spinner if running tests
125
+ /* c8 ignore next 3 */
126
+ if (showSpinner) {
127
+ cli.spinner.info(`${check.text} (manual)`);
128
+ }
129
+ this.checksStatus.push({
130
+ ...check,
131
+ status: 'manual'
132
+ });
133
+ continue;
134
+ }
135
+ const result = await check.fn.bind(this)(check.id, args);
136
+ this.checksStatus.push({ ...check, ...result });
137
+ if (result.status === 'passed') {
138
+ // don't show spinner if running tests
139
+ /* c8 ignore next 3 */
140
+ if (showSpinner) {
141
+ cli.spinner.succeed();
142
+ }
143
+ continue;
144
+ }
145
+ if (result.status === 'failed') {
146
+ // don't show spinner if running tests
147
+ /* c8 ignore next 9 */
148
+ if (showSpinner) {
149
+ const message = `${check.text}: ${result.errorMessage}`;
150
+ if (check.type === 'required') {
151
+ cli.spinner.fail(message);
152
+ }
153
+ else {
154
+ cli.spinner.warn(message);
155
+ }
156
+ }
157
+ if (result.shouldStop) {
158
+ break;
159
+ }
160
+ }
161
+ }
162
+ if (output === 'text' || output === 'none') {
163
+ return;
164
+ }
165
+ this.checksStatus.forEach(s => {
166
+ delete s.data;
167
+ delete s.fn;
168
+ delete s.shouldStop;
169
+ });
170
+ if (output === 'json' || output === 'md') {
171
+ await logger.log(this.checksStatus);
172
+ return;
173
+ }
174
+ if (output === 'csv') {
175
+ this.checksStatus.forEach(r => {
176
+ // we need to set errorMessage to empty string so that it's not
177
+ // removed from the CSV output
178
+ r.errorMessage = r.errorMessage ?? '';
179
+ });
180
+ await logger.log(this.checksStatus);
181
+ }
182
+ }
183
+ getMdOutput(logStatement, command, options) {
184
+ const output = [
185
+ `# ${command.getCommandName()} ${Object.keys(options).filter(o => o !== 'output').map(k => `--${k} "${options[k]}"`).join(' ')}`, os.EOL,
186
+ os.EOL,
187
+ `Date: ${(new Date().toLocaleDateString())}`, os.EOL,
188
+ os.EOL
189
+ ];
190
+ if (logStatement && logStatement.length > 0) {
191
+ const properties = ['text', 'type', 'status', 'errorMessage'];
192
+ output.push('Check|Type|Status|Error message', os.EOL);
193
+ output.push(':----|:--:|:----:|:------------', os.EOL);
194
+ logStatement.forEach(r => {
195
+ output.push(properties.map(p => r[p] ?? '').join('|'), os.EOL);
196
+ });
197
+ logStatement.push(os.EOL);
198
+ }
199
+ return output.join('').trimEnd();
200
+ }
201
+ async loadConnection(id, args) {
202
+ const requestOptions = {
203
+ url: `${this.resource}/v1.0/external/connections/${args.options.id}`,
204
+ headers: {
205
+ accept: 'application/json;odata.metadata=none'
206
+ },
207
+ responseType: 'json'
208
+ };
209
+ try {
210
+ const externalConnection = await request.get(requestOptions);
211
+ return {
212
+ id,
213
+ data: externalConnection,
214
+ status: 'passed'
215
+ };
216
+ }
217
+ catch (ex) {
218
+ return {
219
+ id,
220
+ error: ex?.response?.data?.error?.innerError?.message,
221
+ errorMessage: 'Connection not found',
222
+ shouldStop: true,
223
+ status: 'failed'
224
+ };
225
+ }
226
+ }
227
+ async loadSchema(id, args) {
228
+ const requestOptions = {
229
+ url: `${this.resource}/v1.0/external/connections/${args.options.id}/schema`,
230
+ headers: {
231
+ accept: 'application/json;odata.metadata=none'
232
+ },
233
+ responseType: 'json'
234
+ };
235
+ try {
236
+ const schema = await request.get(requestOptions);
237
+ return {
238
+ id,
239
+ data: schema,
240
+ status: 'passed'
241
+ };
242
+ }
243
+ catch (ex) {
244
+ return {
245
+ id,
246
+ errorMessage: 'Schema not found',
247
+ error: ex?.response?.data?.error?.innerError?.message,
248
+ shouldStop: true,
249
+ status: 'failed'
250
+ };
251
+ }
252
+ }
253
+ async checkCopilotRequiredSemanticLabels(id) {
254
+ const schema = this.checksStatus.find(r => r.id === 'loadSchema').data;
255
+ const requiredLabels = ['title', 'url', 'iconUrl'];
256
+ for (const label of requiredLabels) {
257
+ if (!schema.properties?.find(p => p.labels?.find(l => l.toString() === label))) {
258
+ return {
259
+ id,
260
+ errorMessage: `Missing label ${label}`,
261
+ status: 'failed'
262
+ };
263
+ }
264
+ }
265
+ return {
266
+ id,
267
+ status: 'passed'
268
+ };
269
+ }
270
+ async checkSearchableProperties(id) {
271
+ const schema = this.checksStatus.find(r => r.id === 'loadSchema').data;
272
+ if (!schema.properties?.some(p => p.isSearchable)) {
273
+ return {
274
+ id,
275
+ errorMessage: 'Schema does not have any searchable properties',
276
+ status: 'failed'
277
+ };
278
+ }
279
+ return {
280
+ id,
281
+ status: 'passed'
282
+ };
283
+ }
284
+ async checkContentIngested(id, args) {
285
+ try {
286
+ // find items that belong to the connection
287
+ const searchRequestOptions = {
288
+ url: `${this.resource}/v1.0/search/query`,
289
+ headers: {
290
+ accept: 'application/json;odata.metadata=none'
291
+ },
292
+ responseType: 'json',
293
+ data: {
294
+ requests: [
295
+ {
296
+ entityTypes: [
297
+ 'externalItem'
298
+ ],
299
+ contentSources: [
300
+ `/external/connections/${args.options.id}`
301
+ ],
302
+ query: {
303
+ queryString: '*'
304
+ },
305
+ from: 0,
306
+ size: 1
307
+ }
308
+ ]
309
+ }
310
+ };
311
+ const result = await request.post(searchRequestOptions);
312
+ const hit = result.value?.[0].hitsContainers?.[0]?.hits?.[0];
313
+ if (!hit) {
314
+ return {
315
+ id,
316
+ errorMessage: 'No items found that belong to the connection',
317
+ status: 'failed'
318
+ };
319
+ }
320
+ // something@tenant,itemId
321
+ const itemId = hit.resource?.properties?.substrateContentDomainId?.split(',')?.[1];
322
+ if (!itemId) {
323
+ return {
324
+ id,
325
+ errorMessage: 'Item does not have substrateContentDomainId property or the property is invalid',
326
+ status: 'failed'
327
+ };
328
+ }
329
+ const externalItemRequestOptions = {
330
+ url: `${this.resource}/v1.0/external/connections/${args.options.id}/items/${itemId}`,
331
+ headers: {
332
+ accept: 'application/json;odata.metadata=none'
333
+ },
334
+ responseType: 'json'
335
+ };
336
+ const externalItem = await request.get(externalItemRequestOptions);
337
+ if (!externalItem.content?.value) {
338
+ return {
339
+ id,
340
+ data: externalItem,
341
+ errorMessage: 'Item does not have content or content is empty',
342
+ status: 'failed'
343
+ };
344
+ }
345
+ return {
346
+ id,
347
+ data: externalItem,
348
+ status: 'passed'
349
+ };
350
+ }
351
+ catch (ex) {
352
+ return {
353
+ id,
354
+ error: ex?.response?.data?.error?.innerError?.message,
355
+ errorMessage: 'Error while checking if content is ingested',
356
+ status: 'failed'
357
+ };
358
+ }
359
+ }
360
+ async checkUrlToItemResolverConfigured(id) {
361
+ const externalConnection = this.checksStatus.find(r => r.id === 'loadExternalConnection').data;
362
+ if (!externalConnection.activitySettings?.urlToItemResolvers?.some(r => r)) {
363
+ return {
364
+ id,
365
+ errorMessage: 'urlToItemResolver is not configured',
366
+ status: 'failed'
367
+ };
368
+ }
369
+ return {
370
+ id,
371
+ status: 'passed'
372
+ };
373
+ }
374
+ async checkSemanticLabels(id) {
375
+ const schema = this.checksStatus.find(r => r.id === 'loadSchema').data;
376
+ const hasLabels = schema.properties?.some(p => p.labels?.some(l => l));
377
+ if (!hasLabels) {
378
+ return {
379
+ id,
380
+ errorMessage: `Schema does not have semantic labels`,
381
+ status: 'failed'
382
+ };
383
+ }
384
+ return {
385
+ id,
386
+ status: 'passed'
387
+ };
388
+ }
389
+ async checkResultType(id) {
390
+ const externalConnection = this.checksStatus.find(r => r.id === 'loadExternalConnection').data;
391
+ if (!externalConnection.searchSettings?.searchResultTemplates?.some(t => t)) {
392
+ return {
393
+ id,
394
+ errorMessage: `Connection has no result types`,
395
+ status: 'failed'
396
+ };
397
+ }
398
+ return {
399
+ id,
400
+ status: 'passed'
401
+ };
402
+ }
403
+ }
404
+ _a = ExternalConnectionDoctorCommand, _ExternalConnectionDoctorCommand_instances = new WeakSet(), _ExternalConnectionDoctorCommand_initOptions = function _ExternalConnectionDoctorCommand_initOptions() {
405
+ this.options.unshift({
406
+ option: '-i, --id <id>'
407
+ }, {
408
+ option: '--ux [ux]',
409
+ autocomplete: _a.supportedUx
410
+ });
411
+ }, _ExternalConnectionDoctorCommand_initValidators = function _ExternalConnectionDoctorCommand_initValidators() {
412
+ this.validators.push(async (args) => {
413
+ if (args.options.ux) {
414
+ if (!_a.supportedUx.find(u => u === args.options.ux)) {
415
+ return `${args.options.ux} is not a valid UX. Allowed values are ${_a.supportedUx.join(', ')}`;
416
+ }
417
+ }
418
+ return true;
419
+ });
420
+ };
421
+ ExternalConnectionDoctorCommand.supportedUx = ['copilot', 'search', 'all'];
422
+ export default new ExternalConnectionDoctorCommand();
423
+ //# sourceMappingURL=connection-doctor.js.map
@@ -4,7 +4,7 @@ var __classPrivateFieldGet = (this && this.__classPrivateFieldGet) || function (
4
4
  return kind === "m" ? f : kind === "a" ? f.call(receiver) : f ? f.value : state.get(receiver);
5
5
  };
6
6
  var _ExternalConnectionRemoveCommand_instances, _ExternalConnectionRemoveCommand_initTelemetry, _ExternalConnectionRemoveCommand_initOptions, _ExternalConnectionRemoveCommand_initOptionSets;
7
- import { Cli } from '../../../../cli/Cli.js';
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';
@@ -45,7 +45,7 @@ class ExternalConnectionRemoveCommand extends GraphCommand {
45
45
  throw `The specified connection does not exist`;
46
46
  }
47
47
  const resultAsKeyValuePair = formatting.convertArrayToHashTable('id', res.value);
48
- const result = await Cli.handleMultipleResultsFound(`Multiple external connections with name ${args.options.name} found.`, resultAsKeyValuePair);
48
+ const result = await cli.handleMultipleResultsFound(`Multiple external connections with name ${args.options.name} found.`, resultAsKeyValuePair);
49
49
  return result.id;
50
50
  }
51
51
  async commandAction(logger, args) {
@@ -53,7 +53,7 @@ class ExternalConnectionRemoveCommand extends GraphCommand {
53
53
  await this.removeExternalConnection(args);
54
54
  }
55
55
  else {
56
- const result = await Cli.promptForConfirmation({ message: `Are you sure you want to remove the external connection '${args.options.id || args.options.name}'?` });
56
+ const result = await cli.promptForConfirmation({ message: `Are you sure you want to remove the external connection '${args.options.id || args.options.name}'?` });
57
57
  if (result) {
58
58
  await this.removeExternalConnection(args);
59
59
  }
@@ -0,0 +1,144 @@
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 _ExternalItemAddCommand_instances, _a, _ExternalItemAddCommand_initTelemetry, _ExternalItemAddCommand_initOptions, _ExternalItemAddCommand_initValidators;
7
+ import request from '../../../../request.js';
8
+ import GraphCommand from '../../../base/GraphCommand.js';
9
+ import commands from '../../commands.js';
10
+ class ExternalItemAddCommand extends GraphCommand {
11
+ get name() {
12
+ return commands.ITEM_ADD;
13
+ }
14
+ get description() {
15
+ return 'Creates external item';
16
+ }
17
+ constructor() {
18
+ super();
19
+ _ExternalItemAddCommand_instances.add(this);
20
+ __classPrivateFieldGet(this, _ExternalItemAddCommand_instances, "m", _ExternalItemAddCommand_initTelemetry).call(this);
21
+ __classPrivateFieldGet(this, _ExternalItemAddCommand_instances, "m", _ExternalItemAddCommand_initOptions).call(this);
22
+ __classPrivateFieldGet(this, _ExternalItemAddCommand_instances, "m", _ExternalItemAddCommand_initValidators).call(this);
23
+ }
24
+ allowUnknownOptions() {
25
+ return true;
26
+ }
27
+ async commandAction(logger, args) {
28
+ const acls = args.options.acls
29
+ .split(';')
30
+ .map(acl => {
31
+ const aclParts = acl.split(',');
32
+ return {
33
+ accessType: aclParts[0],
34
+ type: aclParts[1],
35
+ value: aclParts[2]
36
+ };
37
+ });
38
+ const requestBody = {
39
+ id: args.options.id,
40
+ content: {
41
+ value: args.options.content,
42
+ type: args.options.contentType ?? 'text'
43
+ },
44
+ acl: acls,
45
+ properties: {}
46
+ };
47
+ // we need to rewrite the @odata properties to the correct format
48
+ // because . in @odata.type is interpreted by minimist as a child property
49
+ // we also need to extract multiple values for collections into arrays
50
+ this.rewriteCollectionProperties(args.options);
51
+ this.addUnknownOptionsToPayload(requestBody.properties, args.options);
52
+ const requestOptions = {
53
+ url: `${this.resource}/v1.0/external/connections/${args.options.externalConnectionId}/items/${args.options.id}`,
54
+ headers: {
55
+ accept: 'application/json;odata.metadata=none',
56
+ 'content-type': 'application/json'
57
+ },
58
+ responseType: 'json',
59
+ data: requestBody
60
+ };
61
+ try {
62
+ const externalItem = await request.put(requestOptions);
63
+ if (args.options.output === 'csv' || args.options.output === 'md') {
64
+ // for CSV and md, we need to bring the properties to the main object
65
+ // and convert arrays to comma-separated strings or they will be dropped
66
+ // from the output
67
+ Object.getOwnPropertyNames(externalItem.properties).forEach(name => {
68
+ if (Array.isArray(externalItem.properties[name])) {
69
+ externalItem[name] = externalItem.properties[name].join(', ');
70
+ }
71
+ else {
72
+ externalItem[name] = externalItem.properties[name];
73
+ }
74
+ });
75
+ }
76
+ await logger.log(externalItem);
77
+ }
78
+ catch (err) {
79
+ this.handleRejectedODataJsonPromise(err);
80
+ }
81
+ }
82
+ rewriteCollectionProperties(options) {
83
+ Object.getOwnPropertyNames(options).forEach(name => {
84
+ if (!name.endsWith('@odata')) {
85
+ return;
86
+ }
87
+ options[`${name}.type`] = options[name].type;
88
+ delete options[name];
89
+ // convert the value of a collection to an array
90
+ const nameWithoutOData = name.substring(0, name.indexOf('@odata'));
91
+ if (options[nameWithoutOData]) {
92
+ options[nameWithoutOData] = options[nameWithoutOData].split(';#');
93
+ }
94
+ });
95
+ }
96
+ }
97
+ _a = ExternalItemAddCommand, _ExternalItemAddCommand_instances = new WeakSet(), _ExternalItemAddCommand_initTelemetry = function _ExternalItemAddCommand_initTelemetry() {
98
+ this.telemetry.push((args) => {
99
+ Object.assign(this.telemetryProperties, {
100
+ contentType: typeof args.options.contentType
101
+ });
102
+ });
103
+ }, _ExternalItemAddCommand_initOptions = function _ExternalItemAddCommand_initOptions() {
104
+ this.options.unshift({
105
+ option: '--id <id>'
106
+ }, {
107
+ option: '--externalConnectionId <externalConnectionId>'
108
+ }, {
109
+ option: '--content <content>'
110
+ }, {
111
+ option: '--contentType [contentType]',
112
+ autocomplete: _a.contentType
113
+ }, {
114
+ option: '--acls <acls>'
115
+ });
116
+ }, _ExternalItemAddCommand_initValidators = function _ExternalItemAddCommand_initValidators() {
117
+ this.validators.push(async (args) => {
118
+ if (args.options.contentType &&
119
+ _a.contentType.indexOf(args.options.contentType) < 0) {
120
+ return `${args.options.contentType} is not a valid value for contentType. Allowed values are ${_a.contentType.join(', ')}`;
121
+ }
122
+ // verify that each value for ACLs consists of three parts
123
+ // and that the values are correct
124
+ const acls = args.options.acls.split(';');
125
+ for (let i = 0; i < acls.length; i++) {
126
+ const acl = acls[i].split(',');
127
+ if (acl.length !== 3) {
128
+ return `The value ${acls[i]} for option acls is not in the correct format. The correct format is "accessType,type,value", eg. "grant,everyone,everyone"`;
129
+ }
130
+ const accessTypeValues = ['grant', 'deny'];
131
+ if (accessTypeValues.indexOf(acl[0]) < 0) {
132
+ return `The value ${acl[0]} for option acls is not valid. Allowed values are ${accessTypeValues.join(', ')}}`;
133
+ }
134
+ const aclTypeValues = ['user', 'group', 'everyone', 'everyoneExceptGuests', 'externalGroup'];
135
+ if (aclTypeValues.indexOf(acl[1]) < 0) {
136
+ return `The value ${acl[1]} for option acls is not valid. Allowed values are ${aclTypeValues.join(', ')}}`;
137
+ }
138
+ }
139
+ return true;
140
+ });
141
+ };
142
+ ExternalItemAddCommand.contentType = ['text', 'html'];
143
+ export default new ExternalItemAddCommand();
144
+ //# sourceMappingURL=item-add.js.map
@@ -2,6 +2,7 @@ const prefix = 'external';
2
2
  const searchPrefix = 'search';
3
3
  export default {
4
4
  CONNECTION_ADD: `${prefix} connection add`,
5
+ CONNECTION_DOCTOR: `${prefix} connection doctor`,
5
6
  CONNECTION_GET: `${prefix} connection get`,
6
7
  CONNECTION_LIST: `${prefix} connection list`,
7
8
  CONNECTION_REMOVE: `${prefix} connection remove`,
@@ -10,6 +11,7 @@ export default {
10
11
  EXTERNALCONNECTION_GET: `${searchPrefix} externalconnection get`,
11
12
  EXTERNALCONNECTION_LIST: `${searchPrefix} externalconnection list`,
12
13
  EXTERNALCONNECTION_REMOVE: `${searchPrefix} externalconnection remove`,
13
- EXTERNALCONNECTION_SCHEMA_ADD: `${searchPrefix} externalconnection schema add`
14
+ EXTERNALCONNECTION_SCHEMA_ADD: `${searchPrefix} externalconnection schema add`,
15
+ ITEM_ADD: `${prefix} item add`
14
16
  };
15
17
  //# sourceMappingURL=commands.js.map
@@ -4,7 +4,7 @@ var __classPrivateFieldGet = (this && this.__classPrivateFieldGet) || function (
4
4
  return kind === "m" ? f : kind === "a" ? f.call(receiver) : f ? f.value : state.get(receiver);
5
5
  };
6
6
  var _FlowRemoveCommand_instances, _FlowRemoveCommand_initTelemetry, _FlowRemoveCommand_initOptions, _FlowRemoveCommand_initValidators;
7
- import { Cli } from '../../../cli/Cli.js';
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 { validation } from '../../../utils/validation.js';
@@ -53,7 +53,7 @@ class FlowRemoveCommand extends AzmgmtCommand {
53
53
  await removeFlow();
54
54
  }
55
55
  else {
56
- const result = await Cli.promptForConfirmation({ message: `Are you sure you want to remove the Microsoft Flow ${args.options.name}?` });
56
+ const result = await cli.promptForConfirmation({ message: `Are you sure you want to remove the Microsoft Flow ${args.options.name}?` });
57
57
  if (result) {
58
58
  await removeFlow();
59
59
  }
@@ -4,7 +4,7 @@ var __classPrivateFieldGet = (this && this.__classPrivateFieldGet) || function (
4
4
  return kind === "m" ? f : kind === "a" ? f.call(receiver) : f ? f.value : state.get(receiver);
5
5
  };
6
6
  var _FlowOwnerListCommand_instances, _FlowOwnerListCommand_initTelemetry, _FlowOwnerListCommand_initOptions, _FlowOwnerListCommand_initValidators;
7
- import { Cli } from '../../../../cli/Cli.js';
7
+ import { cli } from '../../../../cli/cli.js';
8
8
  import { formatting } from '../../../../utils/formatting.js';
9
9
  import { odata } from '../../../../utils/odata.js';
10
10
  import { validation } from '../../../../utils/validation.js';
@@ -33,7 +33,7 @@ class FlowOwnerListCommand extends AzmgmtCommand {
33
33
  await logger.logToStderr(`Listing owners for flow ${args.options.flowName} in environment ${args.options.environmentName}`);
34
34
  }
35
35
  const response = await odata.getAllItems(`${this.resource}providers/Microsoft.ProcessSimple/${args.options.asAdmin ? 'scopes/admin/' : ''}environments/${formatting.encodeQueryParameter(args.options.environmentName)}/flows/${formatting.encodeQueryParameter(args.options.flowName)}/permissions?api-version=2016-11-01`);
36
- if (!Cli.shouldTrimOutput(args.options.output)) {
36
+ if (!cli.shouldTrimOutput(args.options.output)) {
37
37
  await logger.log(response);
38
38
  }
39
39
  else {
@@ -4,7 +4,7 @@ var __classPrivateFieldGet = (this && this.__classPrivateFieldGet) || function (
4
4
  return kind === "m" ? f : kind === "a" ? f.call(receiver) : f ? f.value : state.get(receiver);
5
5
  };
6
6
  var _FlowOwnerRemoveCommand_instances, _FlowOwnerRemoveCommand_initTelemetry, _FlowOwnerRemoveCommand_initOptions, _FlowOwnerRemoveCommand_initValidators, _FlowOwnerRemoveCommand_initOptionSets;
7
- import { Cli } from '../../../../cli/Cli.js';
7
+ import { cli } from '../../../../cli/cli.js';
8
8
  import request from '../../../../request.js';
9
9
  import { aadGroup } from '../../../../utils/aadGroup.js';
10
10
  import { aadUser } from '../../../../utils/aadUser.js';
@@ -66,7 +66,7 @@ class FlowOwnerRemoveCommand extends AzmgmtCommand {
66
66
  await removeFlowOwner();
67
67
  }
68
68
  else {
69
- const result = await Cli.promptForConfirmation({ message: `Are you sure you want to remove owner '${args.options.groupId || args.options.groupName || args.options.userId || args.options.userName}' from the specified flow?` });
69
+ const result = await cli.promptForConfirmation({ message: `Are you sure you want to remove owner '${args.options.groupId || args.options.groupName || args.options.userId || args.options.userName}' from the specified flow?` });
70
70
  if (result) {
71
71
  await removeFlowOwner();
72
72
  }