@pnp/cli-microsoft365 6.7.0-beta.f5f5666 → 6.8.0-beta.00c3a00

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 (285) hide show
  1. package/.eslintrc.js +2 -0
  2. package/.mocharc.json +1 -0
  3. package/README.md +15 -10
  4. package/dist/Command.js +62 -7
  5. package/dist/chili/chili.js +298 -0
  6. package/dist/chili/index.js +20 -0
  7. package/dist/cli/Cli.js +2 -2
  8. package/dist/m365/aad/commands/user/user-add.js +30 -21
  9. package/dist/m365/app/commands/permission/permission-add.js +279 -0
  10. package/dist/m365/app/commands.js +1 -0
  11. package/dist/m365/commands/commands.js +2 -0
  12. package/dist/m365/commands/docs.js +42 -0
  13. package/dist/m365/commands/login.js +1 -1
  14. package/dist/m365/commands/setup.js +180 -0
  15. package/dist/m365/commands/setupPresets.js +25 -0
  16. package/dist/m365/flow/commands/run/run-get.js +31 -1
  17. package/dist/m365/pa/commands/app/app-consent-set.js +101 -0
  18. package/dist/m365/pa/commands.js +1 -0
  19. package/dist/m365/planner/commands/roster/roster-plan-list.js +102 -0
  20. package/dist/m365/planner/commands.js +1 -0
  21. package/dist/m365/purview/commands/sensitivitylabel/sensitivitylabel-get.js +97 -0
  22. package/dist/m365/purview/commands/sensitivitylabel/sensitivitylabel-list.js +85 -0
  23. package/dist/m365/purview/commands/sensitivitylabel/sensitivitylabel-policysettings-list.js +89 -0
  24. package/dist/m365/purview/commands.js +3 -0
  25. package/dist/m365/spfx/commands/project/project-upgrade/upgrade-1.15.2.js +2 -0
  26. package/dist/m365/spfx/commands/spfx-doctor.js +14 -30
  27. package/dist/m365/spo/commands/applicationcustomizer/applicationcustomizer-remove.js +146 -0
  28. package/dist/m365/spo/commands/file/file-checkin.js +8 -3
  29. package/dist/m365/spo/commands/file/file-checkout.js +8 -3
  30. package/dist/m365/spo/commands/file/file-copy.js +4 -4
  31. package/dist/m365/spo/commands/file/file-get.js +3 -1
  32. package/dist/m365/spo/commands/file/file-list.js +121 -34
  33. package/dist/m365/spo/commands/file/file-move.js +6 -7
  34. package/dist/m365/spo/commands/file/file-remove.js +6 -12
  35. package/dist/m365/spo/commands/file/file-rename.js +3 -3
  36. package/dist/m365/spo/commands/file/file-roleassignment-add.js +2 -1
  37. package/dist/m365/spo/commands/file/file-roleassignment-remove.js +3 -3
  38. package/dist/m365/spo/commands/file/file-roleinheritance-break.js +2 -1
  39. package/dist/m365/spo/commands/file/file-roleinheritance-reset.js +2 -1
  40. package/dist/m365/spo/commands/file/file-sharinginfo-get.js +4 -2
  41. package/dist/m365/spo/commands/file/file-version-clear.js +3 -1
  42. package/dist/m365/spo/commands/file/file-version-get.js +3 -1
  43. package/dist/m365/spo/commands/file/file-version-remove.js +3 -1
  44. package/dist/m365/spo/commands/file/file-version-restore.js +3 -1
  45. package/dist/m365/spo/commands/folder/folder-copy.js +4 -4
  46. package/dist/m365/spo/commands/folder/folder-get.js +5 -2
  47. package/dist/m365/spo/commands/folder/folder-list.js +73 -16
  48. package/dist/m365/spo/commands/folder/folder-move.js +3 -2
  49. package/dist/m365/spo/commands/folder/folder-rename.js +5 -2
  50. package/dist/m365/spo/commands/list/list-get.js +30 -3
  51. package/dist/m365/spo/commands/list/list-list.js +39 -2
  52. package/dist/m365/spo/commands/listitem/listitem-batch-set.js +308 -0
  53. package/dist/m365/spo/commands/page/page-section-add.js +2 -3
  54. package/dist/m365/spo/commands/serviceprincipal/serviceprincipal-permissionrequest-list.js +46 -1
  55. package/dist/m365/spo/commands/site/site-recyclebinitem-move.js +119 -0
  56. package/dist/m365/spo/commands/site/site-recyclebinitem-remove.js +106 -0
  57. package/dist/m365/spo/commands/tenant/tenant-applicationcustomizer-get.js +30 -39
  58. package/dist/m365/spo/commands/tenant/tenant-applicationcustomizer-list.js +47 -0
  59. package/dist/m365/spo/commands/tenant/tenant-applicationcustomizer-remove.js +151 -0
  60. package/dist/m365/spo/commands/tenant/tenant-commandset-remove.js +152 -0
  61. package/dist/m365/spo/commands/tenant/tenant-commandset-set.js +203 -0
  62. package/dist/m365/spo/commands/tenant/tenant-settings-set.js +4 -0
  63. package/dist/m365/spo/commands/term/term-add.js +13 -4
  64. package/dist/m365/spo/commands/term/term-get.js +14 -5
  65. package/dist/m365/spo/commands/term/term-group-get.js +12 -3
  66. package/dist/m365/spo/commands/term/term-group-list.js +39 -4
  67. package/dist/m365/spo/commands/term/term-list.js +18 -9
  68. package/dist/m365/spo/commands/term/term-set-add.js +13 -4
  69. package/dist/m365/spo/commands/term/term-set-get.js +12 -3
  70. package/dist/m365/spo/commands/term/term-set-list.js +12 -3
  71. package/dist/m365/spo/commands.js +9 -0
  72. package/dist/m365/teams/commands/chat/chat-member-remove.js +137 -0
  73. package/dist/m365/teams/commands/meeting/meeting-transcript-list.js +124 -0
  74. package/dist/m365/teams/commands.js +2 -0
  75. package/dist/utils/formatting.js +35 -11
  76. package/dist/utils/pid.js +5 -0
  77. package/dist/utils/spo.js +1 -1
  78. package/docs/docs/cmd/aad/o365group/o365group-get.md +0 -12
  79. package/docs/docs/cmd/aad/user/user-add.md +4 -0
  80. package/docs/docs/cmd/aad/user/user-set.md +2 -2
  81. package/docs/docs/cmd/app/permission/permission-add.md +53 -0
  82. package/docs/docs/cmd/cli/cli-consent.md +6 -0
  83. package/docs/docs/cmd/cli/cli-doctor.md +17 -0
  84. package/docs/docs/cmd/cli/cli-issue.md +6 -0
  85. package/docs/docs/cmd/cli/cli-reconsent.md +6 -0
  86. package/docs/docs/cmd/cli/completion/completion-sh-setup.md +6 -0
  87. package/docs/docs/cmd/cli/config/config-get.md +6 -0
  88. package/docs/docs/cmd/docs.md +51 -0
  89. package/docs/docs/cmd/flow/environment/environment-list.md +18 -0
  90. package/docs/docs/cmd/flow/flow-get.md +20 -0
  91. package/docs/docs/cmd/flow/flow-list.md +17 -0
  92. package/docs/docs/cmd/flow/run/run-get.md +110 -9
  93. package/docs/docs/cmd/graph/changelog/changelog-list.md +52 -0
  94. package/docs/docs/cmd/graph/schemaextension/schemaextension-add.md +61 -0
  95. package/docs/docs/cmd/graph/schemaextension/schemaextension-get.md +61 -0
  96. package/docs/docs/cmd/graph/schemaextension/schemaextension-list.md +61 -0
  97. package/docs/docs/cmd/graph/schemaextension/schemaextension-remove.md +4 -0
  98. package/docs/docs/cmd/graph/schemaextension/schemaextension-set.md +4 -0
  99. package/docs/docs/cmd/graph/subscription/subscription-add.md +73 -0
  100. package/docs/docs/cmd/login.md +1 -1
  101. package/docs/docs/cmd/onedrive/onedrive-list.md +225 -0
  102. package/docs/docs/cmd/onedrive/report/report-activityfilecounts.md +39 -0
  103. package/docs/docs/cmd/onedrive/report/report-activityusercounts.md +39 -0
  104. package/docs/docs/cmd/onedrive/report/report-activityuserdetail.md +43 -0
  105. package/docs/docs/cmd/onedrive/report/report-usageaccountcounts.md +38 -0
  106. package/docs/docs/cmd/onedrive/report/report-usageaccountdetail.md +43 -0
  107. package/docs/docs/cmd/onedrive/report/report-usagefilecounts.md +38 -0
  108. package/docs/docs/cmd/onedrive/report/report-usagestorage.md +37 -0
  109. package/docs/docs/cmd/onenote/notebook/notebook-list.md +79 -0
  110. package/docs/docs/cmd/pa/app/app-consent-set.md +47 -0
  111. package/docs/docs/cmd/planner/plan/plan-get.md +1 -1
  112. package/docs/docs/cmd/planner/plan/plan-list.md +1 -1
  113. package/docs/docs/cmd/planner/roster/roster-add.md +2 -1
  114. package/docs/docs/cmd/planner/roster/roster-get.md +1 -1
  115. package/docs/docs/cmd/planner/roster/roster-plan-list.md +109 -0
  116. package/docs/docs/cmd/planner/roster/roster-remove.md +2 -1
  117. package/docs/docs/cmd/planner/task/task-add.md +3 -1
  118. package/docs/docs/cmd/planner/task/task-get.md +0 -6
  119. package/docs/docs/cmd/planner/task/task-set.md +7 -5
  120. package/docs/docs/cmd/purview/retentionevent/retentionevent-add.md +6 -7
  121. package/docs/docs/cmd/purview/retentionevent/retentionevent-get.md +6 -7
  122. package/docs/docs/cmd/purview/retentionevent/retentionevent-list.md +4 -4
  123. package/docs/docs/cmd/purview/retentionevent/retentionevent-remove.md +4 -4
  124. package/docs/docs/cmd/purview/retentioneventtype/retentioneventtype-add.md +10 -10
  125. package/docs/docs/cmd/purview/retentioneventtype/retentioneventtype-get.md +11 -11
  126. package/docs/docs/cmd/purview/retentioneventtype/retentioneventtype-list.md +10 -10
  127. package/docs/docs/cmd/purview/retentioneventtype/retentioneventtype-remove.md +10 -10
  128. package/docs/docs/cmd/purview/retentioneventtype/retentioneventtype-set.md +10 -10
  129. package/docs/docs/cmd/purview/retentionlabel/retentionlabel-add.md +12 -12
  130. package/docs/docs/cmd/purview/retentionlabel/retentionlabel-get.md +8 -9
  131. package/docs/docs/cmd/purview/retentionlabel/retentionlabel-list.md +8 -9
  132. package/docs/docs/cmd/purview/retentionlabel/retentionlabel-remove.md +8 -8
  133. package/docs/docs/cmd/purview/retentionlabel/retentionlabel-set.md +8 -8
  134. package/docs/docs/cmd/purview/sensitivitylabel/sensitivitylabel-get.md +118 -0
  135. package/docs/docs/cmd/purview/sensitivitylabel/sensitivitylabel-list.md +111 -0
  136. package/docs/docs/cmd/purview/sensitivitylabel/sensitivitylabel-policysettings-list.md +97 -0
  137. package/docs/docs/cmd/search/externalconnection/externalconnection-get.md +17 -0
  138. package/docs/docs/cmd/search/externalconnection/externalconnection-list.md +17 -0
  139. package/docs/docs/cmd/setup.md +86 -0
  140. package/docs/docs/cmd/spo/applicationcustomizer/applicationcustomizer-add.md +1 -1
  141. package/docs/docs/cmd/spo/applicationcustomizer/applicationcustomizer-remove.md +77 -0
  142. package/docs/docs/cmd/spo/commandset/commandset-set.md +1 -1
  143. package/docs/docs/cmd/spo/contenttype/contenttype-set.md +2 -2
  144. package/docs/docs/cmd/spo/customaction/customaction-add.md +1 -1
  145. package/docs/docs/cmd/spo/customaction/customaction-set.md +1 -1
  146. package/docs/docs/cmd/spo/feature/feature-enable.md +2 -2
  147. package/docs/docs/cmd/spo/file/file-add.md +1 -1
  148. package/docs/docs/cmd/spo/file/file-checkin.md +1 -1
  149. package/docs/docs/cmd/spo/file/file-checkout.md +1 -1
  150. package/docs/docs/cmd/spo/file/file-copy.md +1 -1
  151. package/docs/docs/cmd/spo/file/file-get.md +1 -1
  152. package/docs/docs/cmd/spo/file/file-list.md +93 -5
  153. package/docs/docs/cmd/spo/file/file-move.md +3 -3
  154. package/docs/docs/cmd/spo/file/file-remove.md +12 -0
  155. package/docs/docs/cmd/spo/file/file-rename.md +1 -1
  156. package/docs/docs/cmd/spo/file/file-retentionlabel-ensure.md +3 -3
  157. package/docs/docs/cmd/spo/file/file-retentionlabel-remove.md +2 -2
  158. package/docs/docs/cmd/spo/file/file-roleassignment-add.md +1 -1
  159. package/docs/docs/cmd/spo/file/file-roleassignment-remove.md +1 -1
  160. package/docs/docs/cmd/spo/file/file-roleinheritance-break.md +1 -1
  161. package/docs/docs/cmd/spo/file/file-roleinheritance-reset.md +1 -1
  162. package/docs/docs/cmd/spo/file/file-sharinginfo-get.md +1 -1
  163. package/docs/docs/cmd/spo/file/file-sharinglink-add.md +1 -1
  164. package/docs/docs/cmd/spo/file/file-sharinglink-clear.md +1 -1
  165. package/docs/docs/cmd/spo/file/file-sharinglink-get.md +1 -1
  166. package/docs/docs/cmd/spo/file/file-sharinglink-list.md +1 -1
  167. package/docs/docs/cmd/spo/file/file-sharinglink-remove.md +1 -1
  168. package/docs/docs/cmd/spo/file/file-sharinglink-set.md +1 -1
  169. package/docs/docs/cmd/spo/file/file-version-clear.md +2 -2
  170. package/docs/docs/cmd/spo/file/file-version-get.md +1 -1
  171. package/docs/docs/cmd/spo/file/file-version-list.md +1 -1
  172. package/docs/docs/cmd/spo/file/file-version-remove.md +1 -1
  173. package/docs/docs/cmd/spo/file/file-version-restore.md +1 -1
  174. package/docs/docs/cmd/spo/folder/folder-add.md +9 -3
  175. package/docs/docs/cmd/spo/folder/folder-copy.md +2 -2
  176. package/docs/docs/cmd/spo/folder/folder-get.md +7 -7
  177. package/docs/docs/cmd/spo/folder/folder-list.md +45 -10
  178. package/docs/docs/cmd/spo/folder/folder-move.md +1 -1
  179. package/docs/docs/cmd/spo/folder/folder-remove.md +7 -7
  180. package/docs/docs/cmd/spo/folder/folder-rename.md +11 -5
  181. package/docs/docs/cmd/spo/folder/folder-retentionlabel-ensure.md +3 -3
  182. package/docs/docs/cmd/spo/folder/folder-retentionlabel-remove.md +1 -1
  183. package/docs/docs/cmd/spo/folder/folder-roleinheritance-break.md +1 -1
  184. package/docs/docs/cmd/spo/folder/folder-roleinheritance-reset.md +4 -4
  185. package/docs/docs/cmd/spo/list/list-get.md +10 -0
  186. package/docs/docs/cmd/spo/list/list-list.md +28 -0
  187. package/docs/docs/cmd/spo/listitem/listitem-batch-set.md +67 -0
  188. package/docs/docs/cmd/spo/orgassetslibrary/orgassetslibrary-list.md +19 -0
  189. package/docs/docs/cmd/spo/orgassetslibrary/orgassetslibrary-remove.md +12 -0
  190. package/docs/docs/cmd/spo/orgnewssite/orgnewssite-list.md +6 -0
  191. package/docs/docs/cmd/spo/page/page-column-get.md +15 -0
  192. package/docs/docs/cmd/spo/page/page-column-list.md +16 -0
  193. package/docs/docs/cmd/spo/page/page-control-get.md +18 -0
  194. package/docs/docs/cmd/spo/page/page-control-list.md +18 -0
  195. package/docs/docs/cmd/spo/page/page-copy.md +35 -0
  196. package/docs/docs/cmd/spo/page/page-get.md +39 -0
  197. package/docs/docs/cmd/spo/page/page-list.md +53 -0
  198. package/docs/docs/cmd/spo/page/page-section-get.md +12 -0
  199. package/docs/docs/cmd/spo/page/page-section-list.md +13 -0
  200. package/docs/docs/cmd/spo/page/page-template-list.md +31 -0
  201. package/docs/docs/cmd/spo/propertybag/propertybag-get.md +6 -0
  202. package/docs/docs/cmd/spo/propertybag/propertybag-list.md +13 -0
  203. package/docs/docs/cmd/spo/report/report-activityfilecounts.md +7 -0
  204. package/docs/docs/cmd/spo/report/report-activitypages.md +7 -0
  205. package/docs/docs/cmd/spo/report/report-activityusercounts.md +7 -0
  206. package/docs/docs/cmd/spo/report/report-activityuserdetail.md +7 -0
  207. package/docs/docs/cmd/spo/report/report-siteusagedetail.md +7 -0
  208. package/docs/docs/cmd/spo/report/report-siteusagefilecounts.md +7 -0
  209. package/docs/docs/cmd/spo/report/report-siteusagepages.md +7 -0
  210. package/docs/docs/cmd/spo/report/report-siteusagesitecounts.md +7 -0
  211. package/docs/docs/cmd/spo/report/report-siteusagestorage.md +7 -0
  212. package/docs/docs/cmd/spo/roledefinition/roledefinition-get.md +20 -0
  213. package/docs/docs/cmd/spo/roledefinition/roledefinition-list.md +20 -0
  214. package/docs/docs/cmd/spo/serviceprincipal/serviceprincipal-grant-add.md +20 -0
  215. package/docs/docs/cmd/spo/serviceprincipal/serviceprincipal-grant-list.md +18 -0
  216. package/docs/docs/cmd/spo/serviceprincipal/serviceprincipal-permissionrequest-approve.md +20 -0
  217. package/docs/docs/cmd/spo/serviceprincipal/serviceprincipal-permissionrequest-list.md +17 -0
  218. package/docs/docs/cmd/spo/serviceprincipal/serviceprincipal-set.md +13 -0
  219. package/docs/docs/cmd/spo/site/site-recyclebinitem-move.md +43 -0
  220. package/docs/docs/cmd/spo/site/site-recyclebinitem-remove.md +45 -0
  221. package/docs/docs/cmd/spo/spo-get.md +12 -0
  222. package/docs/docs/cmd/spo/spo-search.md +16 -3
  223. package/docs/docs/cmd/spo/tenant/tenant-applicationcustomizer-add.md +1 -1
  224. package/docs/docs/cmd/spo/tenant/tenant-applicationcustomizer-list.md +103 -0
  225. package/docs/docs/cmd/spo/tenant/tenant-applicationcustomizer-remove.md +49 -0
  226. package/docs/docs/cmd/spo/tenant/tenant-commandset-remove.md +49 -0
  227. package/docs/docs/cmd/spo/tenant/tenant-commandset-set.md +57 -0
  228. package/docs/docs/cmd/spo/tenant/tenant-settings-set.md +57 -54
  229. package/docs/docs/cmd/spo/term/term-add.md +107 -6
  230. package/docs/docs/cmd/spo/term/term-get.md +111 -10
  231. package/docs/docs/cmd/spo/term/term-group-get.md +71 -5
  232. package/docs/docs/cmd/spo/term/term-group-list.md +70 -2
  233. package/docs/docs/cmd/spo/term/term-list.md +80 -8
  234. package/docs/docs/cmd/spo/term/term-set-add.md +95 -11
  235. package/docs/docs/cmd/spo/term/term-set-get.md +92 -8
  236. package/docs/docs/cmd/spo/term/term-set-list.md +85 -5
  237. package/docs/docs/cmd/spo/user/user-ensure.md +1 -2
  238. package/docs/docs/cmd/spo/user/user-get.md +24 -0
  239. package/docs/docs/cmd/spo/user/user-list.md +27 -3
  240. package/docs/docs/cmd/spo/userprofile/userprofile-get.md +21 -0
  241. package/docs/docs/cmd/spo/web/web-add.md +24 -0
  242. package/docs/docs/cmd/spo/web/web-clientsidewebpart-list.md +16 -0
  243. package/docs/docs/cmd/spo/web/web-get.md +124 -0
  244. package/docs/docs/cmd/spo/web/web-installedlanguage-list.md +16 -0
  245. package/docs/docs/cmd/spo/web/web-list.md +16 -0
  246. package/docs/docs/cmd/spo/web/web-retentionlabel-list.md +29 -2
  247. package/docs/docs/cmd/teams/app/app-list.md +17 -0
  248. package/docs/docs/cmd/teams/app/app-publish.md +18 -1
  249. package/docs/docs/cmd/teams/channel/channel-add.md +20 -0
  250. package/docs/docs/cmd/teams/channel/channel-get.md +21 -0
  251. package/docs/docs/cmd/teams/channel/channel-list.md +21 -0
  252. package/docs/docs/cmd/teams/channel/channel-member-list.md +20 -0
  253. package/docs/docs/cmd/teams/channel/channel-member-set.md +21 -0
  254. package/docs/docs/cmd/teams/chat/chat-get.md +22 -0
  255. package/docs/docs/cmd/teams/chat/chat-list.md +22 -0
  256. package/docs/docs/cmd/teams/chat/chat-member-list.md +20 -0
  257. package/docs/docs/cmd/teams/chat/chat-member-remove.md +52 -0
  258. package/docs/docs/cmd/teams/chat/chat-message-list.md +23 -0
  259. package/docs/docs/cmd/teams/funsettings/funsettings-list.md +15 -0
  260. package/docs/docs/cmd/teams/guestsettings/guestsettings-list.md +13 -0
  261. package/docs/docs/cmd/teams/meeting/meeting-transcript-list.md +96 -0
  262. package/docs/docs/cmd/teams/membersettings/membersettings-list.md +17 -0
  263. package/docs/docs/cmd/teams/tab/tab-remove.md +1 -1
  264. package/docs/docs/cmd/version.md +1 -1
  265. package/docs/docs/cmd/yammer/group/group-list.md +42 -0
  266. package/docs/docs/cmd/yammer/message/message-add.md +32 -0
  267. package/docs/docs/cmd/yammer/message/message-get.md +32 -0
  268. package/docs/docs/cmd/yammer/message/message-list.md +34 -0
  269. package/docs/docs/cmd/yammer/network/network-list.md +70 -0
  270. package/docs/docs/cmd/yammer/report/report-activitycounts.md +7 -0
  271. package/docs/docs/cmd/yammer/report/report-activityusercounts.md +7 -0
  272. package/docs/docs/cmd/yammer/report/report-activityuserdetail.md +7 -0
  273. package/docs/docs/cmd/yammer/report/report-deviceusagedistributionusercounts.md +7 -0
  274. package/docs/docs/cmd/yammer/report/report-deviceusageusercounts.md +7 -0
  275. package/docs/docs/cmd/yammer/report/report-deviceusageuserdetail.md +7 -0
  276. package/docs/docs/cmd/yammer/report/report-groupsactivitycounts.md +7 -0
  277. package/docs/docs/cmd/yammer/report/report-groupsactivitydetail.md +7 -0
  278. package/docs/docs/cmd/yammer/report/report-groupsactivitygroupcounts.md +7 -0
  279. package/docs/docs/cmd/yammer/user/user-get.md +55 -0
  280. package/docs/docs/cmd/yammer/user/user-list.md +55 -0
  281. package/docs/docs/cmd/yammer/yammer-search.md +15 -3
  282. package/npm-shrinkwrap.json +269 -336
  283. package/package.json +15 -12
  284. package/dist/m365/spo/commands/file/FilePropertiesCollection.js +0 -3
  285. package/dist/m365/spo/commands/folder/FileFolderCollection.js +0 -3
package/.eslintrc.js CHANGED
@@ -66,6 +66,7 @@ const dictionary = [
66
66
  'o365',
67
67
  'permission',
68
68
  'place',
69
+ 'policy',
69
70
  'property',
70
71
  'records',
71
72
  'recycle',
@@ -73,6 +74,7 @@ const dictionary = [
73
74
  'role',
74
75
  'room',
75
76
  'schema',
77
+ 'sensitivity',
76
78
  'service',
77
79
  'set',
78
80
  'setting',
package/.mocharc.json CHANGED
@@ -3,6 +3,7 @@
3
3
  "ts"
4
4
  ],
5
5
  "spec": "dist/**/*.spec.js",
6
+ "reporter": "min",
6
7
  "require": "source-map-support/register",
7
8
  "watch": "dist/**/*.js",
8
9
  "timeout": 10000,
package/README.md CHANGED
@@ -31,7 +31,7 @@
31
31
  <img src="https://img.shields.io/npm/v/@pnp/cli-microsoft365/latest?style=flat-square"
32
32
  alt="npm @pnp/cli-microsoft365@latest" />
33
33
  </a>
34
-
34
+
35
35
  <a href="https://www.npmjs.com/package/@pnp/cli-microsoft365">
36
36
  <img src="https://img.shields.io/npm/v/@pnp/cli-microsoft365/next?style=flat-square"
37
37
  alt="npm @pnp/cli-microsoft365@next" />
@@ -41,16 +41,16 @@
41
41
  <p align="center">CLI for Microsoft 365 helps you manage your Microsoft 365 tenant and SharePoint Framework projects.</p>
42
42
 
43
43
  <p align="center">
44
- <a href="https://pnp.github.io/cli-microsoft365">Website</a> |
44
+ <a href="https://pnp.github.io/cli-microsoft365">Website</a> |
45
45
  <a href="#features">Features</a> |
46
- <a href="#install">Install</a> |
47
- <a href="#usage">Usage</a> |
48
- <a href="#build">Build</a> |
46
+ <a href="#install">Install</a> |
47
+ <a href="#usage">Usage</a> |
48
+ <a href="#build">Build</a> |
49
49
  <a href="#contribute">Contribute</a>
50
50
  </p>
51
51
  <p align="center">
52
52
  <a href="#sharing-is-caring">Sharing is Caring</a> |
53
- <a href="#code-of-conduct">Code of Conduct</a> |
53
+ <a href="#code-of-conduct">Code of Conduct</a> |
54
54
  <a href="#disclaimer">Disclaimer</a>
55
55
  </p>
56
56
 
@@ -74,15 +74,20 @@
74
74
  - Access all your Microsoft 365 workloads
75
75
  - Supported workloads
76
76
  - Azure Active Directory
77
+ - Bookings
77
78
  - Microsoft Teams
78
79
  - Microsoft To Do
79
80
  - OneDrive
81
+ - OneNote
80
82
  - Outlook
81
83
  - Planner
82
84
  - Power Automate
83
85
  - Power Apps
86
+ - Power Platform
87
+ - Purview
84
88
  - Skype for Business
85
89
  - SharePoint Online
90
+ - To Do
86
91
  - Yammer
87
92
  - Supported authentication methods
88
93
  - Azure Managed Identity
@@ -91,21 +96,21 @@
91
96
  - Device Code
92
97
  - Username and Password
93
98
  - Manage your SharePoint Framework projects
94
- - Uprade your projects
99
+ - Upgrade your projects
95
100
  - Check your environment compatibility
96
101
 
97
102
  > Follow our [Twitter](https://twitter.com/climicrosoft365) account to keep yourself updated about new features, improvements, and bug fixes.
98
103
 
99
104
  ## Install
100
105
 
101
- To install this CLI, you will need [`node`](https://nodejs.org) `>= 8.0.0` installed.
106
+ To use the CLI for Microsoft 365 you need [`Node.js`](https://nodejs.org). The CLI has been tested with Node.js versions 18 and higher, but we recommend you to use the Node.js LTS version available at the moment.
102
107
 
103
108
  ```
104
109
  npm install -g @pnp/cli-microsoft365
105
110
  ```
106
111
 
107
112
  <details>
108
- <summary>Install beta version β</summary>
113
+ <summary>Install beta version β</summary>
109
114
 
110
115
  ```
111
116
  npm install -g @pnp/cli-microsoft365@next
@@ -140,7 +145,7 @@ npm install -g @pnp/cli-microsoft365
140
145
 
141
146
  ## Usage
142
147
 
143
- Use the `login` command to start the Device Code login flow to authenticate with your Microsoft 365 tenant.
148
+ Use the `login` command to start the Device Code login flow to authenticate with your Microsoft 365 tenant.
144
149
 
145
150
  ```sh
146
151
  m365 login
package/dist/Command.js CHANGED
@@ -127,21 +127,70 @@ class Command {
127
127
  if (!optionsSets || optionsSets.length === 0) {
128
128
  return true;
129
129
  }
130
+ let inquirer;
131
+ const shouldPrompt = Cli_1.Cli.getInstance().getSettingWithDefaultValue(settingsNames_1.settingsNames.prompt, false);
130
132
  const argsOptions = Object.keys(args.options);
131
- for (const optionSet of optionsSets) {
132
- if (optionSet.runsWhen === undefined || optionSet.runsWhen(args)) {
133
- const commonOptions = argsOptions.filter(opt => optionSet.options.includes(opt));
134
- if (commonOptions.length === 0) {
135
- return `Specify one of the following options: ${optionSet.options.map(opt => opt).join(', ')}.`;
133
+ for (const optionSet of optionsSets.sort(opt => opt.runsWhen ? 0 : 1)) {
134
+ if (optionSet.runsWhen && !optionSet.runsWhen(args)) {
135
+ continue;
136
+ }
137
+ const commonOptions = argsOptions.filter(opt => optionSet.options.includes(opt));
138
+ if (commonOptions.length === 0) {
139
+ if (!shouldPrompt) {
140
+ return `Specify one of the following options: ${optionSet.options.join(', ')}.`;
136
141
  }
137
- if (commonOptions.length > 1) {
138
- return `Specify one of the following options: ${optionSet.options.map(opt => opt).join(', ')}, but not multiple.`;
142
+ yield this.promptForOptionSetNameAndValue(args, optionSet, inquirer);
143
+ }
144
+ if (commonOptions.length > 1) {
145
+ if (!shouldPrompt) {
146
+ return `Specify one of the following options: ${optionSet.options.join(', ')}, but not multiple.`;
139
147
  }
148
+ yield this.promptForSpecificOption(args, commonOptions, inquirer);
140
149
  }
141
150
  }
142
151
  return true;
143
152
  });
144
153
  }
154
+ promptForOptionSetNameAndValue(args, optionSet, inquirer) {
155
+ return __awaiter(this, void 0, void 0, function* () {
156
+ if (!inquirer) {
157
+ inquirer = require('inquirer');
158
+ }
159
+ Cli_1.Cli.log(`Please specify one of the following options:`);
160
+ const resultOptionName = yield inquirer
161
+ .prompt({
162
+ type: 'list',
163
+ name: 'missingRequiredOptionName',
164
+ message: `Option to use:`,
165
+ choices: optionSet.options
166
+ });
167
+ const missingRequiredOptionName = resultOptionName.missingRequiredOptionName;
168
+ const resultOptionValue = yield inquirer
169
+ .prompt({
170
+ name: 'missingRequiredOptionValue',
171
+ message: `Value for '${missingRequiredOptionName}':`
172
+ });
173
+ args.options[missingRequiredOptionName] = resultOptionValue.missingRequiredOptionValue;
174
+ Cli_1.Cli.log();
175
+ });
176
+ }
177
+ promptForSpecificOption(args, commonOptions, inquirer) {
178
+ return __awaiter(this, void 0, void 0, function* () {
179
+ if (!inquirer) {
180
+ inquirer = require('inquirer');
181
+ }
182
+ Cli_1.Cli.log(`Multiple options for an option set specified. Please specify the correct option that you wish to use.`);
183
+ const requiredOptionNameResult = yield inquirer
184
+ .prompt({
185
+ type: 'list',
186
+ name: 'missingRequiredOptionName',
187
+ message: `Option to use:`,
188
+ choices: commonOptions
189
+ });
190
+ commonOptions.filter(y => y !== requiredOptionNameResult.missingRequiredOptionName).map(optionName => args.options[optionName] = undefined);
191
+ Cli_1.Cli.log();
192
+ });
193
+ }
145
194
  validateOutput(args) {
146
195
  return __awaiter(this, void 0, void 0, function* () {
147
196
  if (args.options.output &&
@@ -371,6 +420,12 @@ class Command {
371
420
  return;
372
421
  }
373
422
  const lowerCaseValue = value.toLowerCase().trim();
423
+ if (lowerCaseValue === '@meid' || lowerCaseValue === '@meusername') {
424
+ const isAppOnlyAccessToken = accessToken_1.accessToken.isAppOnlyAccessToken(Auth_1.default.service.accessTokens[Auth_1.default.defaultResource].accessToken);
425
+ if (isAppOnlyAccessToken) {
426
+ throw `It's not possible to use ${value} with application permissions`;
427
+ }
428
+ }
374
429
  if (lowerCaseValue === '@meid') {
375
430
  args.options[option] = accessToken_1.accessToken.getUserIdFromAccessToken(token);
376
431
  }
@@ -0,0 +1,298 @@
1
+ "use strict";
2
+ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
3
+ function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
4
+ return new (P || (P = Promise))(function (resolve, reject) {
5
+ function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
6
+ function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
7
+ function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
8
+ step((generator = generator.apply(thisArg, _arguments || [])).next());
9
+ });
10
+ };
11
+ Object.defineProperty(exports, "__esModule", { value: true });
12
+ exports.chili = void 0;
13
+ const fs = require("fs");
14
+ const inquirer = require("inquirer");
15
+ const ora = require("ora");
16
+ const path = require("path");
17
+ const Cli_1 = require("../cli/Cli");
18
+ const request_1 = require("../request");
19
+ const settingsNames_1 = require("../settingsNames");
20
+ const md_1 = require("../utils/md");
21
+ const mendableApiKey = 'd3313d54-6f8e-40e0-90d3-4095019d4be7';
22
+ let showHelp = false;
23
+ let debug = false;
24
+ let promptForRating = true;
25
+ let conversationId = 0;
26
+ let initialPrompt = '';
27
+ let history = [];
28
+ const cli = Cli_1.Cli.getInstance();
29
+ const showSpinner = cli.getSettingWithDefaultValue(settingsNames_1.settingsNames.showSpinner, true) && typeof global.it === 'undefined';
30
+ request_1.default.logger = {
31
+ /* c8 ignore next 3 */
32
+ log: (msg) => console.log(msg),
33
+ logRaw: (msg) => console.log(msg),
34
+ logToStderr: (msg) => console.error(msg)
35
+ };
36
+ request_1.default.debug = debug;
37
+ function getPromptFromArgs(args) {
38
+ showHelp = args.indexOf('--help') > -1 || args.indexOf('-h') > -1;
39
+ if (showHelp) {
40
+ const commandsFolder = path.join(__dirname, '..', 'm365');
41
+ const pathChunks = [commandsFolder, '..', '..', 'docs', 'docs', 'user-guide', 'chili.md'];
42
+ const helpFilePath = path.join(...pathChunks);
43
+ if (fs.existsSync(helpFilePath)) {
44
+ let helpContents = fs.readFileSync(helpFilePath, 'utf8');
45
+ helpContents = md_1.md.md2plain(helpContents, path.join(commandsFolder, '..', '..', 'docs'));
46
+ console.log(helpContents);
47
+ return '';
48
+ }
49
+ else {
50
+ console.error('Help file not found');
51
+ return '';
52
+ }
53
+ }
54
+ else {
55
+ // reset to default. needed for tests
56
+ showHelp = false;
57
+ }
58
+ const debugPos = args.indexOf('--debug');
59
+ if (debugPos > -1) {
60
+ debug = true;
61
+ request_1.default.debug = true;
62
+ args.splice(debugPos, 1);
63
+ }
64
+ else {
65
+ // reset to default. needed for tests
66
+ debug = false;
67
+ }
68
+ const noRatingPos = args.indexOf('--no-rating');
69
+ if (noRatingPos > -1) {
70
+ promptForRating = false;
71
+ args.splice(noRatingPos, 1);
72
+ }
73
+ else {
74
+ // reset to default. needed for tests
75
+ promptForRating = true;
76
+ }
77
+ return args.join(' ');
78
+ }
79
+ function startConversation(args) {
80
+ return __awaiter(this, void 0, void 0, function* () {
81
+ history = [];
82
+ initialPrompt = getPromptFromArgs(args);
83
+ if (showHelp) {
84
+ return;
85
+ }
86
+ conversationId = yield getConversationId();
87
+ if (!initialPrompt) {
88
+ initialPrompt = yield promptForPrompt();
89
+ }
90
+ yield runConversationTurn(conversationId, initialPrompt);
91
+ });
92
+ }
93
+ function promptForPrompt() {
94
+ return __awaiter(this, void 0, void 0, function* () {
95
+ const answer = yield inquirer.prompt([{
96
+ type: 'input',
97
+ name: 'prompt',
98
+ message: '🌶️ How can I help you?'
99
+ }]);
100
+ return answer.prompt;
101
+ });
102
+ }
103
+ function runConversationTurn(conversationId, question) {
104
+ return __awaiter(this, void 0, void 0, function* () {
105
+ console.log('');
106
+ const spinner = ora('Searching documentation...');
107
+ /* c8 ignore next 3 */
108
+ if (showSpinner) {
109
+ spinner.start();
110
+ }
111
+ const response = yield runMendableChat(conversationId, question);
112
+ history.push({
113
+ prompt: question,
114
+ response: response.answer.text
115
+ });
116
+ /* c8 ignore next 3 */
117
+ if (showSpinner) {
118
+ spinner.stop();
119
+ }
120
+ console.log(md_1.md.md2plain(response.answer.text, ''));
121
+ console.log('');
122
+ console.log('Source:');
123
+ // remove duplicates
124
+ const sources = response.sources.filter((src, index, self) => index === self.findIndex(s => s.link === src.link));
125
+ sources.forEach(src => console.log(`⬥ ${src.link}`));
126
+ console.log('');
127
+ if (promptForRating) {
128
+ try {
129
+ yield rateResponse(response.message_id);
130
+ }
131
+ catch (err) {
132
+ if (debug) {
133
+ console.error(`An error has occurred while rating the response: ${err}`);
134
+ }
135
+ }
136
+ console.log('');
137
+ }
138
+ const result = yield inquirer.prompt([{
139
+ type: 'list',
140
+ name: 'chat',
141
+ message: 'What would you like to do next?',
142
+ choices: [
143
+ {
144
+ name: '📝 I want to know more',
145
+ value: 'ask'
146
+ },
147
+ {
148
+ name: '👋 I know enough. Thanks!',
149
+ value: 'end'
150
+ },
151
+ {
152
+ name: '🔄 I want to ask about something else',
153
+ value: 'new'
154
+ }
155
+ ]
156
+ }]);
157
+ switch (result.chat) {
158
+ case 'ask':
159
+ const prompt = yield promptForPrompt();
160
+ return yield runConversationTurn(conversationId, prompt);
161
+ case 'end':
162
+ yield endConversation(conversationId);
163
+ console.log('');
164
+ console.log('🌶️ Bye!');
165
+ return;
166
+ case 'new':
167
+ initialPrompt = '';
168
+ return startConversation([]);
169
+ }
170
+ });
171
+ }
172
+ function rateResponse(messageId) {
173
+ return __awaiter(this, void 0, void 0, function* () {
174
+ const result = yield inquirer.prompt([{
175
+ type: 'list',
176
+ name: 'rating',
177
+ message: 'Was this helpful?',
178
+ choices: [
179
+ {
180
+ name: '👍 Yes',
181
+ value: 1
182
+ },
183
+ {
184
+ name: '👎 No',
185
+ value: -1
186
+ },
187
+ {
188
+ name: '🤔 Not sure/skip',
189
+ value: 0
190
+ }
191
+ ]
192
+ }]);
193
+ if (result.rating === 0) {
194
+ return;
195
+ }
196
+ console.log('Thanks for letting us know! 😊');
197
+ const requestOptions = {
198
+ url: 'https://api.mendable.ai/v0/rateMessage',
199
+ headers: {
200
+ 'content-type': 'application/json',
201
+ 'x-anonymous': true
202
+ },
203
+ responseType: 'json',
204
+ data: {
205
+ // eslint-disable-next-line camelcase
206
+ api_key: mendableApiKey,
207
+ // eslint-disable-next-line camelcase
208
+ conversation_id: conversationId,
209
+ // eslint-disable-next-line camelcase
210
+ message_id: messageId,
211
+ // eslint-disable-next-line camelcase
212
+ rating_value: result.rating
213
+ }
214
+ };
215
+ const spinner = ora('Sending rating...');
216
+ /* c8 ignore next 3 */
217
+ if (showSpinner) {
218
+ spinner.start();
219
+ }
220
+ yield request_1.default.post(requestOptions);
221
+ /* c8 ignore next 3 */
222
+ if (showSpinner) {
223
+ spinner.stop();
224
+ }
225
+ });
226
+ }
227
+ function endConversation(conversationId) {
228
+ return __awaiter(this, void 0, void 0, function* () {
229
+ const requestOptions = {
230
+ url: 'https://api.mendable.ai/v0/endConversation',
231
+ headers: {
232
+ 'content-type': 'application/json',
233
+ 'x-anonymous': true
234
+ },
235
+ responseType: 'json',
236
+ data: {
237
+ // eslint-disable-next-line camelcase
238
+ api_key: mendableApiKey,
239
+ // eslint-disable-next-line camelcase
240
+ conversation_id: conversationId
241
+ }
242
+ };
243
+ const spinner = ora('Ending conversation...');
244
+ /* c8 ignore next 3 */
245
+ if (showSpinner) {
246
+ spinner.start();
247
+ }
248
+ yield request_1.default.post(requestOptions);
249
+ /* c8 ignore next 3 */
250
+ if (showSpinner) {
251
+ spinner.stop();
252
+ }
253
+ });
254
+ }
255
+ function runMendableChat(conversationId, question) {
256
+ return __awaiter(this, void 0, void 0, function* () {
257
+ const requestOptions = {
258
+ url: 'https://api.mendable.ai/v0/mendableChat',
259
+ headers: {
260
+ 'content-type': 'application/json',
261
+ 'x-anonymous': true
262
+ },
263
+ responseType: 'json',
264
+ data: {
265
+ // eslint-disable-next-line camelcase
266
+ api_key: mendableApiKey,
267
+ // eslint-disable-next-line camelcase
268
+ conversation_id: conversationId,
269
+ question,
270
+ history,
271
+ shouldStream: false
272
+ }
273
+ };
274
+ return yield request_1.default.post(requestOptions);
275
+ });
276
+ }
277
+ function getConversationId() {
278
+ return __awaiter(this, void 0, void 0, function* () {
279
+ const requestOptions = {
280
+ url: 'https://api.mendable.ai/v0/newConversation',
281
+ headers: {
282
+ 'content-type': 'application/json',
283
+ 'x-anonymous': true
284
+ },
285
+ responseType: 'json',
286
+ data: {
287
+ // eslint-disable-next-line camelcase
288
+ api_key: mendableApiKey
289
+ }
290
+ };
291
+ const response = yield request_1.default.post(requestOptions);
292
+ return response.conversation_id;
293
+ });
294
+ }
295
+ exports.chili = {
296
+ startConversation
297
+ };
298
+ //# sourceMappingURL=chili.js.map
@@ -0,0 +1,20 @@
1
+ #!/usr/bin/env node
2
+ "use strict";
3
+ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
4
+ function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
5
+ return new (P || (P = Promise))(function (resolve, reject) {
6
+ function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
7
+ function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
8
+ function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
9
+ step((generator = generator.apply(thisArg, _arguments || [])).next());
10
+ });
11
+ };
12
+ Object.defineProperty(exports, "__esModule", { value: true });
13
+ const chili_1 = require("./chili");
14
+ try {
15
+ (() => __awaiter(void 0, void 0, void 0, function* () { return yield chili_1.chili.startConversation(process.argv.slice(2)); }))();
16
+ }
17
+ catch (err) {
18
+ console.error(`🛑 An error has occurred while searching documentation: ${err}`);
19
+ }
20
+ //# sourceMappingURL=index.js.map
package/dist/cli/Cli.js CHANGED
@@ -783,7 +783,7 @@ class Cli {
783
783
  console.error(message, ...optionalParams);
784
784
  }
785
785
  }
786
- static prompt(options) {
786
+ static prompt(options, answers) {
787
787
  return __awaiter(this, void 0, void 0, function* () {
788
788
  const inquirer = require('inquirer');
789
789
  const cli = Cli.getInstance();
@@ -792,7 +792,7 @@ class Cli {
792
792
  if (spinnerSpinning) {
793
793
  cli.spinner.stop();
794
794
  }
795
- const response = yield inquirer.prompt(options);
795
+ const response = yield inquirer.prompt(options, answers);
796
796
  // Restart the spinner if it was running before the prompt
797
797
  /* c8 ignore next 3 */
798
798
  if (spinnerSpinning) {
@@ -26,6 +26,9 @@ class AadUserAddCommand extends GraphCommand_1.default {
26
26
  get description() {
27
27
  return 'Creates a new user';
28
28
  }
29
+ allowUnknownOptions() {
30
+ return true;
31
+ }
29
32
  constructor() {
30
33
  super();
31
34
  _AadUserAddCommand_instances.add(this);
@@ -36,37 +39,19 @@ class AadUserAddCommand extends GraphCommand_1.default {
36
39
  __classPrivateFieldGet(this, _AadUserAddCommand_instances, "m", _AadUserAddCommand_initTypes).call(this);
37
40
  }
38
41
  commandAction(logger, args) {
39
- var _a, _b, _c;
40
42
  return __awaiter(this, void 0, void 0, function* () {
41
43
  if (this.verbose) {
42
44
  logger.logToStderr(`Adding user to AAD with displayName ${args.options.displayName} and userPrincipalName ${args.options.userName}`);
43
45
  }
44
46
  try {
47
+ const manifest = this.mapRequestBody(args.options);
45
48
  const requestOptions = {
46
49
  url: `${this.resource}/v1.0/users`,
47
50
  headers: {
48
51
  accept: 'application/json;odata.metadata=none'
49
52
  },
50
53
  responseType: 'json',
51
- data: {
52
- accountEnabled: (_a = args.options.accountEnabled) !== null && _a !== void 0 ? _a : true,
53
- displayName: args.options.displayName,
54
- userPrincipalName: args.options.userName,
55
- mailNickName: (_b = args.options.mailNickname) !== null && _b !== void 0 ? _b : args.options.userName.split('@')[0],
56
- passwordProfile: {
57
- forceChangePasswordNextSignIn: args.options.forceChangePasswordNextSignIn || false,
58
- forceChangePasswordNextSignInWithMfa: args.options.forceChangePasswordNextSignInWithMfa || false,
59
- password: (_c = args.options.password) !== null && _c !== void 0 ? _c : this.generatePassword()
60
- },
61
- givenName: args.options.firstName,
62
- surName: args.options.lastName,
63
- usageLocation: args.options.usageLocation,
64
- officeLocation: args.options.officeLocation,
65
- jobTitle: args.options.jobTitle,
66
- companyName: args.options.companyName,
67
- department: args.options.department,
68
- preferredLanguage: args.options.preferredLanguage
69
- }
54
+ data: manifest
70
55
  };
71
56
  const user = yield request_1.default.post(requestOptions);
72
57
  user.password = requestOptions.data.passwordProfile.password;
@@ -89,8 +74,32 @@ class AadUserAddCommand extends GraphCommand_1.default {
89
74
  }
90
75
  });
91
76
  }
77
+ mapRequestBody(options) {
78
+ var _a, _b, _c;
79
+ const requestBody = {
80
+ accountEnabled: (_a = options.accountEnabled) !== null && _a !== void 0 ? _a : true,
81
+ displayName: options.displayName,
82
+ userPrincipalName: options.userName,
83
+ mailNickName: (_b = options.mailNickname) !== null && _b !== void 0 ? _b : options.userName.split('@')[0],
84
+ passwordProfile: {
85
+ forceChangePasswordNextSignIn: options.forceChangePasswordNextSignIn || false,
86
+ forceChangePasswordNextSignInWithMfa: options.forceChangePasswordNextSignInWithMfa || false,
87
+ password: (_c = options.password) !== null && _c !== void 0 ? _c : this.generatePassword()
88
+ },
89
+ givenName: options.firstName,
90
+ surName: options.lastName,
91
+ usageLocation: options.usageLocation,
92
+ officeLocation: options.officeLocation,
93
+ jobTitle: options.jobTitle,
94
+ companyName: options.companyName,
95
+ department: options.department,
96
+ preferredLanguage: options.preferredLanguage
97
+ };
98
+ this.addUnknownOptionsToPayload(requestBody, options);
99
+ return requestBody;
100
+ }
92
101
  /**
93
- * Generate a password with at least: one digit, one lowercase chracter, one uppercase character and special character.
102
+ * Generate a password with at least: one digit, one lowercase character, one uppercase character, and a special character.
94
103
  */
95
104
  generatePassword() {
96
105
  const numberChars = '0123456789';