@pnp/cli-microsoft365 7.3.0-beta.01256d2 → 7.3.0-beta.1c23854

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 (374) 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/autocomplete.js +4 -6
  7. package/dist/chili/chili.js +1 -2
  8. package/dist/cli/cli.js +880 -0
  9. package/dist/index.js +2 -2
  10. package/dist/m365/aad/commands/administrativeunit/administrativeunit-member-add.js +137 -0
  11. package/dist/m365/aad/commands/administrativeunit/administrativeunit-member-get.js +112 -0
  12. package/dist/m365/aad/commands/administrativeunit/administrativeunit-member-list.js +138 -0
  13. package/dist/m365/aad/commands/administrativeunit/administrativeunit-remove.js +2 -2
  14. package/dist/m365/aad/commands/app/app-get.js +2 -2
  15. package/dist/m365/aad/commands/app/app-permission-add.js +237 -0
  16. package/dist/m365/aad/commands/app/app-remove.js +3 -3
  17. package/dist/m365/aad/commands/app/app-role-add.js +2 -2
  18. package/dist/m365/aad/commands/app/app-role-list.js +2 -2
  19. package/dist/m365/aad/commands/app/app-role-remove.js +4 -4
  20. package/dist/m365/aad/commands/app/app-set.js +2 -2
  21. package/dist/m365/aad/commands/approleassignment/approleassignment-add.js +2 -2
  22. package/dist/m365/aad/commands/approleassignment/approleassignment-remove.js +2 -2
  23. package/dist/m365/aad/commands/group/group-list.js +2 -2
  24. package/dist/m365/aad/commands/group/group-remove.js +2 -2
  25. package/dist/m365/aad/commands/groupsetting/groupsetting-remove.js +2 -2
  26. package/dist/m365/aad/commands/m365group/m365group-recyclebinitem-clear.js +2 -2
  27. package/dist/m365/aad/commands/m365group/m365group-recyclebinitem-remove.js +3 -3
  28. package/dist/m365/aad/commands/m365group/m365group-recyclebinitem-restore.js +2 -2
  29. package/dist/m365/aad/commands/m365group/m365group-remove.js +2 -2
  30. package/dist/m365/aad/commands/m365group/m365group-teamify.js +2 -2
  31. package/dist/m365/aad/commands/m365group/m365group-user-remove.js +2 -2
  32. package/dist/m365/aad/commands/oauth2grant/oauth2grant-remove.js +2 -2
  33. package/dist/m365/aad/commands/siteclassification/siteclassification-disable.js +2 -2
  34. package/dist/m365/aad/commands/sp/sp-add.js +2 -2
  35. package/dist/m365/aad/commands/sp/sp-get.js +2 -2
  36. package/dist/m365/aad/commands/user/user-get.js +2 -2
  37. package/dist/m365/aad/commands/user/user-license-remove.js +2 -2
  38. package/dist/m365/aad/commands/user/user-recyclebinitem-clear.js +2 -2
  39. package/dist/m365/aad/commands/user/user-recyclebinitem-remove.js +2 -2
  40. package/dist/m365/aad/commands/user/user-remove.js +2 -2
  41. package/dist/m365/aad/commands.js +5 -1
  42. package/dist/m365/app/commands/app-get.js +2 -2
  43. package/dist/m365/app/commands/app-open.js +2 -2
  44. package/dist/m365/app/commands/permission/permission-list.js +2 -2
  45. package/dist/m365/base/AppCommand.js +2 -2
  46. package/dist/m365/booking/commands/business/business-get.js +2 -2
  47. package/dist/m365/cli/commands/cli-doctor.js +2 -2
  48. package/dist/m365/cli/commands/cli-reconsent.js +2 -2
  49. package/dist/m365/cli/commands/config/config-get.js +2 -2
  50. package/dist/m365/cli/commands/config/config-list.js +2 -2
  51. package/dist/m365/cli/commands/config/config-reset.js +3 -3
  52. package/dist/m365/cli/commands/config/config-set.js +4 -4
  53. package/dist/m365/commands/docs.js +2 -2
  54. package/dist/m365/commands/login.js +4 -4
  55. package/dist/m365/commands/setup.js +8 -8
  56. package/dist/m365/context/commands/context-remove.js +2 -2
  57. package/dist/m365/context/commands/option/option-remove.js +2 -2
  58. package/dist/m365/external/commands/connection/connection-doctor.js +1 -2
  59. package/dist/m365/external/commands/connection/connection-remove.js +3 -3
  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-attendancereport-list.js +2 -2
  236. package/dist/m365/teams/commands/tab/tab-remove.js +2 -2
  237. package/dist/m365/teams/commands/team/team-app-list.js +3 -3
  238. package/dist/m365/teams/commands/team/team-remove.js +2 -2
  239. package/dist/m365/teams/commands/user/user-app-add.js +23 -5
  240. package/dist/m365/teams/commands/user/user-app-list.js +2 -2
  241. package/dist/m365/teams/commands/user/user-app-remove.js +3 -3
  242. package/dist/m365/tenant/commands/people/people-profilecardproperty-remove.js +2 -2
  243. package/dist/m365/todo/commands/list/list-remove.js +2 -2
  244. package/dist/m365/todo/commands/task/task-get.js +2 -2
  245. package/dist/m365/todo/commands/task/task-list.js +2 -2
  246. package/dist/m365/todo/commands/task/task-remove.js +2 -2
  247. package/dist/m365/viva/commands/connections/connections-app-create.js +2 -2
  248. package/dist/m365/yammer/commands/group/group-user-remove.js +2 -2
  249. package/dist/m365/yammer/commands/message/message-like-set.js +2 -2
  250. package/dist/m365/yammer/commands/message/message-remove.js +2 -2
  251. package/dist/m365/yammer/commands/yammer-search.js +2 -2
  252. package/dist/telemetry.js +2 -2
  253. package/dist/utils/aadAdministrativeUnit.js +5 -5
  254. package/dist/utils/aadDevice.js +25 -0
  255. package/dist/utils/aadGroup.js +3 -3
  256. package/dist/utils/prompt.js +4 -7
  257. package/docs/docs/cmd/aad/administrativeunit/administrativeunit-member-add.mdx +93 -0
  258. package/docs/docs/cmd/aad/administrativeunit/administrativeunit-member-get.mdx +130 -0
  259. package/docs/docs/cmd/aad/administrativeunit/administrativeunit-member-list.mdx +312 -0
  260. package/docs/docs/cmd/aad/app/app-permission-add.mdx +62 -0
  261. package/docs/docs/cmd/aad/user/user-password-validate.mdx +2 -2
  262. package/docs/docs/cmd/adaptivecard/adaptivecard-send.mdx +1 -1
  263. package/docs/docs/cmd/external/connection/connection-doctor.mdx +3 -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/pa/app/app-get.mdx +1 -1
  279. package/docs/docs/cmd/pa/app/app-list.mdx +1 -1
  280. package/docs/docs/cmd/pa/connector/connector-export.mdx +1 -1
  281. package/docs/docs/cmd/pa/connector/connector-list.mdx +1 -1
  282. package/docs/docs/cmd/pa/environment/environment-get.mdx +1 -1
  283. package/docs/docs/cmd/pa/environment/environment-list.mdx +1 -1
  284. package/docs/docs/cmd/planner/bucket/bucket-add.mdx +1 -1
  285. package/docs/docs/cmd/planner/bucket/bucket-get.mdx +1 -1
  286. package/docs/docs/cmd/planner/bucket/bucket-list.mdx +1 -1
  287. package/docs/docs/cmd/planner/bucket/bucket-remove.mdx +1 -1
  288. package/docs/docs/cmd/planner/bucket/bucket-set.mdx +1 -1
  289. package/docs/docs/cmd/planner/plan/plan-get.mdx +1 -1
  290. package/docs/docs/cmd/planner/plan/plan-list.mdx +1 -1
  291. package/docs/docs/cmd/planner/plan/plan-set.mdx +1 -1
  292. package/docs/docs/cmd/planner/roster/roster-add.mdx +2 -2
  293. package/docs/docs/cmd/planner/roster/roster-get.mdx +1 -1
  294. package/docs/docs/cmd/planner/roster/roster-member-add.mdx +1 -1
  295. package/docs/docs/cmd/planner/roster/roster-member-get.mdx +1 -1
  296. package/docs/docs/cmd/planner/roster/roster-member-list.mdx +1 -1
  297. package/docs/docs/cmd/planner/roster/roster-member-remove.mdx +2 -2
  298. package/docs/docs/cmd/planner/roster/roster-plan-list.mdx +1 -1
  299. package/docs/docs/cmd/planner/roster/roster-remove.mdx +2 -2
  300. package/docs/docs/cmd/planner/task/task-add.mdx +1 -1
  301. package/docs/docs/cmd/planner/task/task-list.mdx +2 -2
  302. package/docs/docs/cmd/planner/task/task-remove.mdx +1 -1
  303. package/docs/docs/cmd/planner/task/task-set.mdx +1 -1
  304. package/docs/docs/cmd/pp/environment/environment-get.mdx +1 -1
  305. package/docs/docs/cmd/pp/environment/environment-list.mdx +1 -1
  306. package/docs/docs/cmd/pp/tenant/tenant-settings-list.mdx +1 -1
  307. package/docs/docs/cmd/pp/tenant/tenant-settings-set.mdx +1 -1
  308. package/docs/docs/cmd/purview/retentionevent/retentionevent-add.mdx +1 -1
  309. package/docs/docs/cmd/purview/retentionevent/retentionevent-get.mdx +1 -1
  310. package/docs/docs/cmd/purview/retentionevent/retentionevent-list.mdx +1 -1
  311. package/docs/docs/cmd/purview/retentionevent/retentionevent-remove.mdx +1 -1
  312. package/docs/docs/cmd/purview/retentioneventtype/retentioneventtype-add.mdx +1 -1
  313. package/docs/docs/cmd/purview/retentioneventtype/retentioneventtype-get.mdx +1 -1
  314. package/docs/docs/cmd/purview/retentioneventtype/retentioneventtype-list.mdx +1 -1
  315. package/docs/docs/cmd/purview/retentioneventtype/retentioneventtype-remove.mdx +1 -1
  316. package/docs/docs/cmd/purview/retentioneventtype/retentioneventtype-set.mdx +1 -1
  317. package/docs/docs/cmd/purview/retentionlabel/retentionlabel-add.mdx +1 -1
  318. package/docs/docs/cmd/purview/retentionlabel/retentionlabel-get.mdx +1 -1
  319. package/docs/docs/cmd/purview/retentionlabel/retentionlabel-list.mdx +1 -1
  320. package/docs/docs/cmd/purview/retentionlabel/retentionlabel-remove.mdx +1 -1
  321. package/docs/docs/cmd/purview/retentionlabel/retentionlabel-set.mdx +1 -1
  322. package/docs/docs/cmd/purview/sensitivitylabel/sensitivitylabel-get.mdx +2 -2
  323. package/docs/docs/cmd/purview/sensitivitylabel/sensitivitylabel-list.mdx +2 -2
  324. package/docs/docs/cmd/purview/sensitivitylabel/sensitivitylabel-policysettings-list.mdx +2 -2
  325. package/docs/docs/cmd/spfx/project/project-externalize.mdx +1 -1
  326. package/docs/docs/cmd/spo/applicationcustomizer/applicationcustomizer-add.mdx +1 -1
  327. package/docs/docs/cmd/spo/applicationcustomizer/applicationcustomizer-set.mdx +1 -1
  328. package/docs/docs/cmd/spo/commandset/commandset-add.mdx +1 -1
  329. package/docs/docs/cmd/spo/commandset/commandset-set.mdx +1 -1
  330. package/docs/docs/cmd/spo/contenttype/contenttype-set.mdx +1 -1
  331. package/docs/docs/cmd/spo/customaction/customaction-add.mdx +1 -1
  332. package/docs/docs/cmd/spo/customaction/customaction-set.mdx +1 -1
  333. package/docs/docs/cmd/spo/eventreceiver/eventreceiver-remove.mdx +1 -1
  334. package/docs/docs/cmd/spo/field/field-set.mdx +1 -1
  335. package/docs/docs/cmd/spo/list/list-sensitivitylabel-ensure.mdx +1 -1
  336. package/docs/docs/cmd/spo/list/list-view-set.mdx +1 -1
  337. package/docs/docs/cmd/spo/listitem/listitem-add.mdx +1 -1
  338. package/docs/docs/cmd/spo/listitem/listitem-batch-add.mdx +1 -1
  339. package/docs/docs/cmd/spo/listitem/listitem-set.mdx +1 -1
  340. package/docs/docs/cmd/spo/page/page-clientsidewebpart-add.mdx +1 -1
  341. package/docs/docs/cmd/spo/page/page-control-set.mdx +1 -1
  342. package/docs/docs/cmd/spo/page/page-set.mdx +1 -1
  343. package/docs/docs/cmd/spo/site/site-groupify.mdx +1 -1
  344. package/docs/docs/cmd/spo/site/site-recyclebinitem-clear.mdx +1 -1
  345. package/docs/docs/cmd/spo/site/site-recyclebinitem-remove.mdx +1 -1
  346. package/docs/docs/cmd/spo/tenant/tenant-applicationcustomizer-add.mdx +1 -1
  347. package/docs/docs/cmd/spo/tenant/tenant-applicationcustomizer-set.mdx +1 -1
  348. package/docs/docs/cmd/spo/tenant/tenant-commandset-add.mdx +1 -1
  349. package/docs/docs/cmd/spo/tenant/tenant-commandset-set.mdx +1 -1
  350. package/docs/docs/cmd/spo/term/term-add.mdx +1 -1
  351. package/docs/docs/cmd/spo/term/term-group-add.mdx +1 -1
  352. package/docs/docs/cmd/spo/term/term-set-add.mdx +1 -1
  353. package/docs/docs/cmd/teams/app/app-install.mdx +11 -2
  354. package/docs/docs/cmd/teams/meeting/meeting-transcript-list.mdx +2 -2
  355. package/docs/docs/cmd/teams/user/user-app-add.mdx +12 -3
  356. package/docs/docs/cmd/teams/user/user-app-remove.mdx +2 -2
  357. package/docs/docs/cmd/tenant/people/people-profilecardproperty-add.mdx +1 -1
  358. package/docs/docs/cmd/tenant/people/people-profilecardproperty-remove.mdx +1 -1
  359. package/docs/docs/cmd/tenant/people/people-profilecardproperty-set.mdx +1 -1
  360. package/docs/docs/cmd/yammer/group/group-list.mdx +1 -1
  361. package/docs/docs/cmd/yammer/group/group-user-add.mdx +1 -1
  362. package/docs/docs/cmd/yammer/group/group-user-remove.mdx +1 -1
  363. package/docs/docs/cmd/yammer/message/message-add.mdx +1 -1
  364. package/docs/docs/cmd/yammer/message/message-get.mdx +1 -1
  365. package/docs/docs/cmd/yammer/message/message-like-set.mdx +1 -1
  366. package/docs/docs/cmd/yammer/message/message-list.mdx +1 -1
  367. package/docs/docs/cmd/yammer/message/message-remove.mdx +1 -1
  368. package/docs/docs/cmd/yammer/network/network-list.mdx +1 -1
  369. package/docs/docs/cmd/yammer/user/user-get.mdx +1 -1
  370. package/docs/docs/cmd/yammer/user/user-list.mdx +1 -1
  371. package/docs/docs/cmd/yammer/yammer-search.mdx +1 -1
  372. package/npm-shrinkwrap.json +1008 -406
  373. package/package.json +24 -24
  374. package/dist/cli/Cli.js +0 -858
@@ -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 _TeamsAppInstallCommand_instances, _TeamsAppInstallCommand_initTelemetry, _TeamsAppInstallCommand_initOptions, _TeamsAppInstallCommand_initValidators, _TeamsAppInstallCommand_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 { validation } from '../../../../utils/validation.js';
@@ -29,6 +29,7 @@ class TeamsAppInstallCommand extends GraphCommand {
29
29
  async commandAction(logger, args) {
30
30
  try {
31
31
  await this.validateUser(args, logger);
32
+ const appId = await this.getAppId(args.options);
32
33
  let url = `${this.resource}/v1.0`;
33
34
  if (args.options.teamId) {
34
35
  url += `/teams/${formatting.encodeQueryParameter(args.options.teamId)}/installedApps`;
@@ -44,7 +45,7 @@ class TeamsAppInstallCommand extends GraphCommand {
44
45
  },
45
46
  responseType: 'json',
46
47
  data: {
47
- 'teamsApp@odata.bind': `${this.resource}/v1.0/appCatalogs/teamsApps/${args.options.id}`
48
+ 'teamsApp@odata.bind': `${this.resource}/v1.0/appCatalogs/teamsApps/${appId}`
48
49
  }
49
50
  };
50
51
  await request.post(requestOptions);
@@ -69,7 +70,7 @@ class TeamsAppInstallCommand extends GraphCommand {
69
70
  verbose: args.options.verbose
70
71
  };
71
72
  try {
72
- const res = await Cli.executeCommandWithOutput(aadUserGetCommand, { options: { ...options, _: [] } });
73
+ const res = await cli.executeCommandWithOutput(aadUserGetCommand, { options: { ...options, _: [] } });
73
74
  if (this.verbose) {
74
75
  await logger.logToStderr(res.stderr);
75
76
  }
@@ -82,20 +83,45 @@ class TeamsAppInstallCommand extends GraphCommand {
82
83
  throw `User with ID ${args.options.userId} not found. Original error: ${err.error.message}`;
83
84
  }
84
85
  }
86
+ async getAppId(options) {
87
+ if (options.id) {
88
+ return options.id;
89
+ }
90
+ const requestOptions = {
91
+ url: `${this.resource}/v1.0/appCatalogs/teamsApps?$filter=displayName eq '${formatting.encodeQueryParameter(options.name)}'`,
92
+ headers: {
93
+ accept: 'application/json;odata.metadata=none'
94
+ },
95
+ responseType: 'json'
96
+ };
97
+ const response = await request.get(requestOptions);
98
+ const app = response.value[0];
99
+ if (!app) {
100
+ throw `The specified Teams app does not exist`;
101
+ }
102
+ if (response.value.length > 1) {
103
+ const resultAsKeyValuePair = formatting.convertArrayToHashTable('id', response.value);
104
+ const result = await cli.handleMultipleResultsFound(`Multiple Teams apps with name ${options.name} found.`, resultAsKeyValuePair);
105
+ return result.id;
106
+ }
107
+ return app.id;
108
+ }
85
109
  }
86
110
  _TeamsAppInstallCommand_instances = new WeakSet(), _TeamsAppInstallCommand_initTelemetry = function _TeamsAppInstallCommand_initTelemetry() {
87
111
  this.telemetry.push((args) => {
88
112
  Object.assign(this.telemetryProperties, {
113
+ id: typeof args.options.id !== 'undefined',
114
+ name: typeof args.options.name !== 'undefined',
89
115
  teamId: typeof args.options.teamId !== 'undefined',
90
116
  userId: typeof args.options.userId !== 'undefined',
91
117
  userName: typeof args.options.userName !== 'undefined'
92
118
  });
93
119
  });
94
120
  }, _TeamsAppInstallCommand_initOptions = function _TeamsAppInstallCommand_initOptions() {
95
- this.options.unshift({ option: '--id <id>' }, { option: '--teamId [teamId]' }, { option: '--userId [userId]' }, { option: '--userName [userName]' });
121
+ this.options.unshift({ option: '-i, --id [id]' }, { option: '-n, --name [name]' }, { option: '--teamId [teamId]' }, { option: '--userId [userId]' }, { option: '--userName [userName]' });
96
122
  }, _TeamsAppInstallCommand_initValidators = function _TeamsAppInstallCommand_initValidators() {
97
123
  this.validators.push(async (args) => {
98
- if (!validation.isValidGuid(args.options.id)) {
124
+ if (args.options.id && !validation.isValidGuid(args.options.id)) {
99
125
  return `${args.options.id} is not a valid GUID`;
100
126
  }
101
127
  if (args.options.teamId &&
@@ -110,6 +136,7 @@ _TeamsAppInstallCommand_instances = new WeakSet(), _TeamsAppInstallCommand_initT
110
136
  });
111
137
  }, _TeamsAppInstallCommand_initOptionSets = function _TeamsAppInstallCommand_initOptionSets() {
112
138
  this.optionSets.push({ options: ['teamId', 'userId', 'userName'] });
139
+ this.optionSets.push({ options: ['id', 'name'] });
113
140
  };
114
141
  export default new TeamsAppInstallCommand();
115
142
  //# sourceMappingURL=app-install.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 _TeamsAppRemoveCommand_instances, _TeamsAppRemoveCommand_initTelemetry, _TeamsAppRemoveCommand_initOptions, _TeamsAppRemoveCommand_initValidators, _TeamsAppRemoveCommand_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 { validation } from '../../../../utils/validation.js';
@@ -48,7 +48,7 @@ class TeamsAppRemoveCommand extends GraphCommand {
48
48
  await removeApp();
49
49
  }
50
50
  else {
51
- const result = await Cli.promptForConfirmation({ message: `Are you sure you want to remove the Teams app ${args.options.id || args.options.name} from the app catalog?` });
51
+ const result = await cli.promptForConfirmation({ message: `Are you sure you want to remove the Teams app ${args.options.id || args.options.name} from the app catalog?` });
52
52
  if (result) {
53
53
  await removeApp();
54
54
  }
@@ -75,7 +75,7 @@ class TeamsAppRemoveCommand extends GraphCommand {
75
75
  }
76
76
  if (response.value.length > 1) {
77
77
  const resultAsKeyValuePair = formatting.convertArrayToHashTable('id', response.value);
78
- const result = await Cli.handleMultipleResultsFound(`Multiple Teams apps with name '${options.name}' found.`, resultAsKeyValuePair);
78
+ const result = await cli.handleMultipleResultsFound(`Multiple Teams apps with name '${options.name}' found.`, resultAsKeyValuePair);
79
79
  return result.id;
80
80
  }
81
81
  return app.id;
@@ -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 _TeamsAppUninstallCommand_instances, _TeamsAppUninstallCommand_initTelemetry, _TeamsAppUninstallCommand_initOptions, _TeamsAppUninstallCommand_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 { validation } from '../../../../utils/validation.js';
10
10
  import GraphCommand from '../../../base/GraphCommand.js';
@@ -45,7 +45,7 @@ class TeamsAppUninstallCommand extends GraphCommand {
45
45
  await uninstallApp();
46
46
  }
47
47
  else {
48
- const result = await Cli.promptForConfirmation({ message: `Are you sure you want to uninstall the app with id ${args.options.id} from the Microsoft Teams team ${args.options.teamId}?` });
48
+ const result = await cli.promptForConfirmation({ message: `Are you sure you want to uninstall the app with id ${args.options.id} from the Microsoft Teams team ${args.options.teamId}?` });
49
49
  if (result) {
50
50
  await uninstallApp();
51
51
  }
@@ -11,7 +11,7 @@ import { formatting } from '../../../../utils/formatting.js';
11
11
  import { validation } from '../../../../utils/validation.js';
12
12
  import GraphCommand from '../../../base/GraphCommand.js';
13
13
  import commands from '../../commands.js';
14
- import { Cli } from '../../../../cli/Cli.js';
14
+ import { cli } from '../../../../cli/cli.js';
15
15
  class TeamsAppUpdateCommand extends GraphCommand {
16
16
  get name() {
17
17
  return commands.APP_UPDATE;
@@ -66,7 +66,7 @@ class TeamsAppUpdateCommand extends GraphCommand {
66
66
  }
67
67
  if (response.value.length > 1) {
68
68
  const resultAsKeyValuePair = formatting.convertArrayToHashTable('id', response.value);
69
- const result = await Cli.handleMultipleResultsFound(`Multiple Teams apps with name ${options.name} found.`, resultAsKeyValuePair);
69
+ const result = await cli.handleMultipleResultsFound(`Multiple Teams apps with name ${options.name} found.`, resultAsKeyValuePair);
70
70
  return result.id;
71
71
  }
72
72
  return app.id;
@@ -8,7 +8,7 @@ import child_process from 'child_process';
8
8
  import fs from 'fs';
9
9
  import { homedir } from 'os';
10
10
  import util from 'util';
11
- import { Cli } from '../../../../cli/Cli.js';
11
+ import { cli } from '../../../../cli/cli.js';
12
12
  import { formatting } from '../../../../utils/formatting.js';
13
13
  import AnonymousCommand from '../../../base/AnonymousCommand.js';
14
14
  import commands from '../../commands.js';
@@ -36,7 +36,7 @@ class TeamsCacheRemoveCommand extends AnonymousCommand {
36
36
  await logger.logToStderr('This command will execute the following steps.');
37
37
  await logger.logToStderr('- Stop the Microsoft Teams client.');
38
38
  await logger.logToStderr('- Clear the Microsoft Teams cached files.');
39
- const result = await Cli.promptForConfirmation({ message: `Are you sure you want to clear your Microsoft Teams cache?` });
39
+ const result = await cli.promptForConfirmation({ message: `Are you sure you want to clear your Microsoft Teams cache?` });
40
40
  if (result) {
41
41
  await this.clearTeamsCache(logger);
42
42
  }
@@ -8,7 +8,7 @@ import request from '../../../../request.js';
8
8
  import { validation } from '../../../../utils/validation.js';
9
9
  import GraphCommand from "../../../base/GraphCommand.js";
10
10
  import commands from '../../commands.js';
11
- import { Cli } from '../../../../cli/Cli.js';
11
+ import { cli } from '../../../../cli/cli.js';
12
12
  import { formatting } from '../../../../utils/formatting.js';
13
13
  class TeamsChannelAddCommand extends GraphCommand {
14
14
  get name() {
@@ -45,7 +45,7 @@ class TeamsChannelAddCommand extends GraphCommand {
45
45
  }
46
46
  if (matchingTeams.length > 1) {
47
47
  const resultAsKeyValuePair = formatting.convertArrayToHashTable('id', response.value);
48
- const result = await Cli.handleMultipleResultsFound(`Multiple Microsoft Teams teams with name ${args.options.teamName} found.`, resultAsKeyValuePair);
48
+ const result = await cli.handleMultipleResultsFound(`Multiple Microsoft Teams teams with name ${args.options.teamName} found.`, resultAsKeyValuePair);
49
49
  return result.id;
50
50
  }
51
51
  return matchingTeams[0];
@@ -10,7 +10,7 @@ import { formatting } from '../../../../utils/formatting.js';
10
10
  import { validation } from '../../../../utils/validation.js';
11
11
  import GraphCommand from '../../../base/GraphCommand.js';
12
12
  import commands from '../../commands.js';
13
- import { Cli } from '../../../../cli/Cli.js';
13
+ import { cli } from '../../../../cli/cli.js';
14
14
  class TeamsChannelMemberAddCommand extends GraphCommand {
15
15
  get name() {
16
16
  return commands.CHANNEL_MEMBER_ADD;
@@ -116,7 +116,7 @@ class TeamsChannelMemberAddCommand extends GraphCommand {
116
116
  }
117
117
  if (response.value.length > 1) {
118
118
  const resultAsKeyValuePair = formatting.convertArrayToHashTable('id', response.value);
119
- const result = await Cli.handleMultipleResultsFound(`Multiple users with display name '${userDisplayName}' found.`, resultAsKeyValuePair);
119
+ const result = await cli.handleMultipleResultsFound(`Multiple users with display name '${userDisplayName}' found.`, resultAsKeyValuePair);
120
120
  return result.id;
121
121
  }
122
122
  return userItem.id;
@@ -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 _TeamsChannelMemberRemoveCommand_instances, _TeamsChannelMemberRemoveCommand_initTelemetry, _TeamsChannelMemberRemoveCommand_initOptions, _TeamsChannelMemberRemoveCommand_initValidators, _TeamsChannelMemberRemoveCommand_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 { formatting } from '../../../../utils/formatting.js';
@@ -47,7 +47,7 @@ class TeamsChannelMemberRemoveCommand extends GraphCommand {
47
47
  const userName = args.options.userName || args.options.userId || args.options.id;
48
48
  const teamName = args.options.teamName || args.options.teamId;
49
49
  const channelName = args.options.channelName || args.options.channelId;
50
- const result = await Cli.promptForConfirmation({ message: `Are you sure you want to remove the member ${userName} from the channel ${channelName} in team ${teamName}?` });
50
+ const result = await cli.promptForConfirmation({ message: `Are you sure you want to remove the member ${userName} from the channel ${channelName} in team ${teamName}?` });
51
51
  if (result) {
52
52
  await removeMember();
53
53
  }
@@ -119,7 +119,7 @@ class TeamsChannelMemberRemoveCommand extends GraphCommand {
119
119
  }
120
120
  if (conversationMembers.length > 1) {
121
121
  const resultAsKeyValuePair = formatting.convertArrayToHashTable('id', conversationMembers);
122
- const result = await Cli.handleMultipleResultsFound(`Multiple Microsoft Teams channel members with name ${args.options.userName} found.`, resultAsKeyValuePair);
122
+ const result = await cli.handleMultipleResultsFound(`Multiple Microsoft Teams channel members with name ${args.options.userName} found.`, resultAsKeyValuePair);
123
123
  return result.id;
124
124
  }
125
125
  return conversationMember.id;
@@ -10,7 +10,7 @@ import { formatting } from '../../../../utils/formatting.js';
10
10
  import { validation } from '../../../../utils/validation.js';
11
11
  import GraphCommand from '../../../base/GraphCommand.js';
12
12
  import commands from '../../commands.js';
13
- import { Cli } from '../../../../cli/Cli.js';
13
+ import { cli } from '../../../../cli/cli.js';
14
14
  class TeamsChannelMemberSetCommand extends GraphCommand {
15
15
  get name() {
16
16
  return commands.CHANNEL_MEMBER_SET;
@@ -103,7 +103,7 @@ class TeamsChannelMemberSetCommand extends GraphCommand {
103
103
  }
104
104
  if (conversationMembers.length > 1) {
105
105
  const resultAsKeyValuePair = formatting.convertArrayToHashTable('id', conversationMembers);
106
- const result = await Cli.handleMultipleResultsFound(`Multiple Microsoft Teams channel members with name ${args.options.userName} found.`, resultAsKeyValuePair);
106
+ const result = await cli.handleMultipleResultsFound(`Multiple Microsoft Teams channel members with name ${args.options.userName} found.`, resultAsKeyValuePair);
107
107
  return result.id;
108
108
  }
109
109
  return conversationMember.id;
@@ -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 _TeamsChannelRemoveCommand_instances, _TeamsChannelRemoveCommand_initTelemetry, _TeamsChannelRemoveCommand_initOptions, _TeamsChannelRemoveCommand_initValidators, _TeamsChannelRemoveCommand_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 { formatting } from '../../../../utils/formatting.js';
@@ -53,7 +53,7 @@ class TeamsChannelRemoveCommand extends GraphCommand {
53
53
  }
54
54
  else {
55
55
  const channel = args.options.name ? args.options.name : args.options.id;
56
- const result = await Cli.promptForConfirmation({ message: `Are you sure you want to remove the channel ${channel} from team ${args.options.teamId || args.options.teamName}?` });
56
+ const result = await cli.promptForConfirmation({ message: `Are you sure you want to remove the channel ${channel} from team ${args.options.teamId || args.options.teamName}?` });
57
57
  if (result) {
58
58
  await removeChannel();
59
59
  }
@@ -12,7 +12,7 @@ import { validation } from '../../../../utils/validation.js';
12
12
  import GraphCommand from '../../../base/GraphCommand.js';
13
13
  import commands from '../../commands.js';
14
14
  import { chatUtil } from './chatUtil.js';
15
- import { Cli } from '../../../../cli/Cli.js';
15
+ import { cli } from '../../../../cli/cli.js';
16
16
  class TeamsChatGetCommand extends GraphCommand {
17
17
  get name() {
18
18
  return commands.CHAT_GET;
@@ -67,7 +67,7 @@ class TeamsChatGetCommand extends GraphCommand {
67
67
  return existingChats[0].id;
68
68
  }
69
69
  const resultAsKeyValuePair = formatting.convertArrayToHashTable('id', existingChats);
70
- const result = await Cli.handleMultipleResultsFound(`Multiple chat conversations with these participants found.`, resultAsKeyValuePair);
70
+ const result = await cli.handleMultipleResultsFound(`Multiple chat conversations with these participants found.`, resultAsKeyValuePair);
71
71
  return result.id;
72
72
  }
73
73
  async getChatIdByName(name) {
@@ -79,7 +79,7 @@ class TeamsChatGetCommand extends GraphCommand {
79
79
  return existingChats[0].id;
80
80
  }
81
81
  const resultAsKeyValuePair = formatting.convertArrayToHashTable('id', existingChats);
82
- const result = await Cli.handleMultipleResultsFound(`Multiple chat conversations with this name found.`, resultAsKeyValuePair);
82
+ const result = await cli.handleMultipleResultsFound(`Multiple chat conversations with this name found.`, resultAsKeyValuePair);
83
83
  return result.id;
84
84
  }
85
85
  }
@@ -8,7 +8,7 @@ import { odata } from '../../../../utils/odata.js';
8
8
  import { validation } from '../../../../utils/validation.js';
9
9
  import GraphCommand from '../../../base/GraphCommand.js';
10
10
  import commands from '../../commands.js';
11
- import { Cli } from '../../../../cli/Cli.js';
11
+ import { cli } from '../../../../cli/cli.js';
12
12
  import request from '../../../../request.js';
13
13
  class TeamsChatMemberRemoveCommand extends GraphCommand {
14
14
  get name() {
@@ -48,7 +48,7 @@ class TeamsChatMemberRemoveCommand extends GraphCommand {
48
48
  await removeUserFromChat();
49
49
  }
50
50
  else {
51
- const result = await Cli.promptForConfirmation({ message: `Are you sure you want to remove member ${args.options.id || args.options.userId || args.options.userName} from chat with id ${args.options.chatId}?` });
51
+ const result = await cli.promptForConfirmation({ message: `Are you sure you want to remove member ${args.options.id || args.options.userId || args.options.userName} from chat with id ${args.options.chatId}?` });
52
52
  if (result) {
53
53
  await removeUserFromChat();
54
54
  }
@@ -11,7 +11,7 @@ import { validation } from '../../../../utils/validation.js';
11
11
  import GraphCommand from '../../../base/GraphCommand.js';
12
12
  import commands from '../../commands.js';
13
13
  import { chatUtil } from './chatUtil.js';
14
- import { Cli } from '../../../../cli/Cli.js';
14
+ import { cli } from '../../../../cli/cli.js';
15
15
  import { formatting } from '../../../../utils/formatting.js';
16
16
  class TeamsChatMessageSendCommand extends GraphCommand {
17
17
  get name() {
@@ -57,7 +57,7 @@ class TeamsChatMessageSendCommand extends GraphCommand {
57
57
  return existingChats[0].id;
58
58
  }
59
59
  const resultAsKeyValuePair = formatting.convertArrayToHashTable('id', existingChats);
60
- const result = await Cli.handleMultipleResultsFound(`Multiple chat conversations with this name found.`, resultAsKeyValuePair);
60
+ const result = await cli.handleMultipleResultsFound(`Multiple chat conversations with this name found.`, resultAsKeyValuePair);
61
61
  return result.id;
62
62
  }
63
63
  async getChatIdByName(chatName) {
@@ -69,7 +69,7 @@ class TeamsChatMessageSendCommand extends GraphCommand {
69
69
  return existingChats[0].id;
70
70
  }
71
71
  const resultAsKeyValuePair = formatting.convertArrayToHashTable('id', existingChats);
72
- const result = await Cli.handleMultipleResultsFound(`Multiple chat conversations with this name found.`, resultAsKeyValuePair);
72
+ const result = await cli.handleMultipleResultsFound(`Multiple chat conversations with this name found.`, resultAsKeyValuePair);
73
73
  return result.id;
74
74
  }
75
75
  // This Microsoft Graph API request throws an intermittent 404 exception, saying that it cannot find the principal.
@@ -5,7 +5,7 @@ var __classPrivateFieldGet = (this && this.__classPrivateFieldGet) || function (
5
5
  };
6
6
  var _TeamsMeetingAttendancereportListCommand_instances, _TeamsMeetingAttendancereportListCommand_initTelemetry, _TeamsMeetingAttendancereportListCommand_initOptions, _TeamsMeetingAttendancereportListCommand_initValidators;
7
7
  import auth from '../../../../Auth.js';
8
- import { Cli } from '../../../../cli/Cli.js';
8
+ import { cli } from '../../../../cli/cli.js';
9
9
  import { accessToken } from '../../../../utils/accessToken.js';
10
10
  import { odata } from '../../../../utils/odata.js';
11
11
  import { validation } from '../../../../utils/validation.js';
@@ -71,7 +71,7 @@ class TeamsMeetingAttendancereportListCommand extends GraphCommand {
71
71
  debug: this.debug,
72
72
  verbose: this.verbose
73
73
  };
74
- const output = await Cli.executeCommandWithOutput(aadUserGetCommand, { options: { ...options, _: [] } });
74
+ const output = await cli.executeCommandWithOutput(aadUserGetCommand, { options: { ...options, _: [] } });
75
75
  const getUserOutput = JSON.parse(output.stdout);
76
76
  return getUserOutput.id;
77
77
  }
@@ -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 _TeamsTabRemoveCommand_instances, _TeamsTabRemoveCommand_initTelemetry, _TeamsTabRemoveCommand_initOptions, _TeamsTabRemoveCommand_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';
@@ -44,7 +44,7 @@ class TeamsTabRemoveCommand extends GraphCommand {
44
44
  await removeTab();
45
45
  }
46
46
  else {
47
- const result = await Cli.promptForConfirmation({ message: `Are you sure you want to remove the tab with id ${args.options.id} from channel ${args.options.channelId} in team ${args.options.teamId}?` });
47
+ const result = await cli.promptForConfirmation({ message: `Are you sure you want to remove the tab with id ${args.options.id} from channel ${args.options.channelId} in team ${args.options.teamId}?` });
48
48
  if (result) {
49
49
  await removeTab();
50
50
  }
@@ -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 _TeamsTeamAppListCommand_instances, _TeamsTeamAppListCommand_initTelemetry, _TeamsTeamAppListCommand_initOptions, _TeamsTeamAppListCommand_initValidators, _TeamsTeamAppListCommand_initOptionSets;
7
- import { Cli } from '../../../../cli/Cli.js';
7
+ import { cli } from '../../../../cli/cli.js';
8
8
  import { odata } from '../../../../utils/odata.js';
9
9
  import { validation } from '../../../../utils/validation.js';
10
10
  import GraphCommand from '../../../base/GraphCommand.js';
@@ -35,7 +35,7 @@ class TeamsTeamAppListCommand extends GraphCommand {
35
35
  }
36
36
  const teamId = await this.getTeamId(args);
37
37
  const res = await odata.getAllItems(`${this.resource}/v1.0/teams/${teamId}/installedApps?$expand=teamsApp,teamsAppDefinition`);
38
- if (!Cli.shouldTrimOutput(args.options.output)) {
38
+ if (!cli.shouldTrimOutput(args.options.output)) {
39
39
  await logger.log(res);
40
40
  }
41
41
  else {
@@ -62,7 +62,7 @@ class TeamsTeamAppListCommand extends GraphCommand {
62
62
  debug: this.debug,
63
63
  verbose: this.verbose
64
64
  };
65
- const commandOutput = await Cli.executeCommandWithOutput(teamGetCommand, { options: { ...teamGetOptions, _: [] } });
65
+ const commandOutput = await cli.executeCommandWithOutput(teamGetCommand, { options: { ...teamGetOptions, _: [] } });
66
66
  const team = JSON.parse(commandOutput.stdout);
67
67
  return team.id;
68
68
  }
@@ -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 _TeamsTeamRemoveCommand_instances, _TeamsTeamRemoveCommand_initTelemetry, _TeamsTeamRemoveCommand_initOptions, _TeamsTeamRemoveCommand_initValidators, _TeamsTeamRemoveCommand_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 { formatting } from '../../../../utils/formatting.js';
@@ -57,7 +57,7 @@ class TeamsTeamRemoveCommand extends GraphCommand {
57
57
  await removeTeam();
58
58
  }
59
59
  else {
60
- const result = await Cli.promptForConfirmation({ message: `Are you sure you want to remove the team ${args.options.id ? args.options.id : args.options.name}?` });
60
+ const result = await cli.promptForConfirmation({ message: `Are you sure you want to remove the team ${args.options.id ? args.options.id : args.options.name}?` });
61
61
  if (result) {
62
62
  await removeTeam();
63
63
  }
@@ -3,8 +3,9 @@ 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 _TeamsUserAppAddCommand_instances, _TeamsUserAppAddCommand_initOptions, _TeamsUserAppAddCommand_initValidators;
6
+ var _TeamsUserAppAddCommand_instances, _TeamsUserAppAddCommand_initTelemetry, _TeamsUserAppAddCommand_initOptions, _TeamsUserAppAddCommand_initValidators, _TeamsUserAppAddCommand_initOptionSets;
7
7
  import request from '../../../../request.js';
8
+ import { formatting } from '../../../../utils/formatting.js';
8
9
  import { validation } from '../../../../utils/validation.js';
9
10
  import GraphCommand from '../../../base/GraphCommand.js';
10
11
  import commands from '../../commands.js';
@@ -18,13 +19,16 @@ class TeamsUserAppAddCommand extends GraphCommand {
18
19
  constructor() {
19
20
  super();
20
21
  _TeamsUserAppAddCommand_instances.add(this);
22
+ __classPrivateFieldGet(this, _TeamsUserAppAddCommand_instances, "m", _TeamsUserAppAddCommand_initTelemetry).call(this);
21
23
  __classPrivateFieldGet(this, _TeamsUserAppAddCommand_instances, "m", _TeamsUserAppAddCommand_initOptions).call(this);
22
24
  __classPrivateFieldGet(this, _TeamsUserAppAddCommand_instances, "m", _TeamsUserAppAddCommand_initValidators).call(this);
25
+ __classPrivateFieldGet(this, _TeamsUserAppAddCommand_instances, "m", _TeamsUserAppAddCommand_initOptionSets).call(this);
23
26
  }
24
27
  async commandAction(logger, args) {
28
+ const userId = (args.options.userId ?? args.options.userName);
25
29
  const endpoint = `${this.resource}/v1.0`;
26
30
  const requestOptions = {
27
- url: `${endpoint}/users/${args.options.userId}/teamwork/installedApps`,
31
+ url: `${endpoint}/users/${formatting.encodeQueryParameter(userId)}/teamwork/installedApps`,
28
32
  headers: {
29
33
  'content-type': 'application/json;odata=nometadata',
30
34
  'accept': 'application/json;odata.metadata=none'
@@ -42,22 +46,36 @@ class TeamsUserAppAddCommand extends GraphCommand {
42
46
  }
43
47
  }
44
48
  }
45
- _TeamsUserAppAddCommand_instances = new WeakSet(), _TeamsUserAppAddCommand_initOptions = function _TeamsUserAppAddCommand_initOptions() {
49
+ _TeamsUserAppAddCommand_instances = new WeakSet(), _TeamsUserAppAddCommand_initTelemetry = function _TeamsUserAppAddCommand_initTelemetry() {
50
+ this.telemetry.push((args) => {
51
+ Object.assign(this.telemetryProperties, {
52
+ userId: typeof args.options.userId !== 'undefined',
53
+ userName: typeof args.options.userName !== 'undefined'
54
+ });
55
+ });
56
+ }, _TeamsUserAppAddCommand_initOptions = function _TeamsUserAppAddCommand_initOptions() {
46
57
  this.options.unshift({
47
58
  option: '--id <id>'
48
59
  }, {
49
- option: '--userId <userId>'
60
+ option: '--userId [userId]'
61
+ }, {
62
+ option: '--userName [userName]'
50
63
  });
51
64
  }, _TeamsUserAppAddCommand_initValidators = function _TeamsUserAppAddCommand_initValidators() {
52
65
  this.validators.push(async (args) => {
53
66
  if (!validation.isValidGuid(args.options.id)) {
54
67
  return `${args.options.id} is not a valid GUID`;
55
68
  }
56
- if (!validation.isValidGuid(args.options.userId)) {
69
+ if (args.options.userId && !validation.isValidGuid(args.options.userId)) {
57
70
  return `${args.options.userId} is not a valid GUID`;
58
71
  }
72
+ if (args.options.userName && !validation.isValidUserPrincipalName(args.options.userName)) {
73
+ return `${args.options.userName} is not a valid userName`;
74
+ }
59
75
  return true;
60
76
  });
77
+ }, _TeamsUserAppAddCommand_initOptionSets = function _TeamsUserAppAddCommand_initOptionSets() {
78
+ this.optionSets.push({ options: ['userId', 'userName'] });
61
79
  };
62
80
  export default new TeamsUserAppAddCommand();
63
81
  //# sourceMappingURL=user-app-add.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 _TeamsUserAppListCommand_instances, _TeamsUserAppListCommand_initTelemetry, _TeamsUserAppListCommand_initOptions, _TeamsUserAppListCommand_initValidators, _TeamsUserAppListCommand_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 { odata } from '../../../../utils/odata.js';
@@ -36,7 +36,7 @@ class TeamsUserAppListCommand extends GraphCommand {
36
36
  const appId = userAppId.substr(userAppId.indexOf("##") + 2, userAppId.length - userId.length - 2);
37
37
  i.appId = appId;
38
38
  });
39
- if (!Cli.shouldTrimOutput(args.options.output)) {
39
+ if (!cli.shouldTrimOutput(args.options.output)) {
40
40
  await logger.log(items);
41
41
  }
42
42
  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 _TeamsUserAppRemoveCommand_instances, _TeamsUserAppRemoveCommand_initTelemetry, _TeamsUserAppRemoveCommand_initOptions, _TeamsUserAppRemoveCommand_initValidators, _TeamsUserAppRemoveCommand_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 { validation } from '../../../../utils/validation.js';
@@ -52,7 +52,7 @@ class TeamsUserAppRemoveCommand extends GraphCommand {
52
52
  await removeApp();
53
53
  }
54
54
  else {
55
- const result = await Cli.promptForConfirmation({ message: `Are you sure you want to remove the app with id ${args.options.id} for user ${args.options.userId ?? args.options.userName}?` });
55
+ const result = await cli.promptForConfirmation({ message: `Are you sure you want to remove the app with id ${args.options.id} for user ${args.options.userId ?? args.options.userName}?` });
56
56
  if (result) {
57
57
  await removeApp();
58
58
  }
@@ -77,7 +77,7 @@ class TeamsUserAppRemoveCommand extends GraphCommand {
77
77
  throw `The specified Teams app does not exist`;
78
78
  }
79
79
  const resultAsKeyValuePair = formatting.convertArrayToHashTable('id', response.value);
80
- const result = (await Cli.handleMultipleResultsFound(`Multiple Teams apps with name '${args.options.name}' found.`, resultAsKeyValuePair));
80
+ const result = (await cli.handleMultipleResultsFound(`Multiple Teams apps with name '${args.options.name}' found.`, resultAsKeyValuePair));
81
81
  return result.id;
82
82
  }
83
83
  }
@@ -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 _TenantPeopleProfileCardPropertyRemoveCommand_instances, _TenantPeopleProfileCardPropertyRemoveCommand_initTelemetry, _TenantPeopleProfileCardPropertyRemoveCommand_initOptions, _TenantPeopleProfileCardPropertyRemoveCommand_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 GraphCommand from '../../../base/GraphCommand.js';
10
10
  import commands from '../../commands.js';
@@ -47,7 +47,7 @@ class TenantPeopleProfileCardPropertyRemoveCommand extends GraphCommand {
47
47
  await removeProfileCardProperty();
48
48
  }
49
49
  else {
50
- const result = await Cli.promptForConfirmation({ message: `Are you sure you want to remove the profile card property '${directoryPropertyName}'?` });
50
+ const result = await cli.promptForConfirmation({ message: `Are you sure you want to remove the profile card property '${directoryPropertyName}'?` });
51
51
  if (result) {
52
52
  await removeProfileCardProperty();
53
53
  }
@@ -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 _TodoListRemoveCommand_instances, _TodoListRemoveCommand_initTelemetry, _TodoListRemoveCommand_initOptions, _TodoListRemoveCommand_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 GraphCommand from '../../../base/GraphCommand.js';
10
10
  import commands from '../../commands.js';
@@ -27,7 +27,7 @@ class TodoListRemoveCommand extends GraphCommand {
27
27
  await this.removeList(args);
28
28
  }
29
29
  else {
30
- const result = await Cli.promptForConfirmation({ message: `Are you sure you want to remove the task list ${args.options.id || args.options.name}?` });
30
+ const result = await cli.promptForConfirmation({ message: `Are you sure you want to remove the task list ${args.options.id || args.options.name}?` });
31
31
  if (result) {
32
32
  await this.removeList(args);
33
33
  }
@@ -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 _TodoTaskGetCommand_instances, _TodoTaskGetCommand_initTelemetry, _TodoTaskGetCommand_initOptions, _TodoTaskGetCommand_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 GraphCommand from '../../../base/GraphCommand.js';
10
10
  import commands from '../../commands.js';
@@ -54,7 +54,7 @@ class TodoTaskGetCommand extends GraphCommand {
54
54
  responseType: 'json'
55
55
  };
56
56
  const item = await request.get(requestOptions);
57
- if (!Cli.shouldTrimOutput(args.options.output)) {
57
+ if (!cli.shouldTrimOutput(args.options.output)) {
58
58
  await logger.log(item);
59
59
  }
60
60
  else {