@pnp/cli-microsoft365 12.0.0-beta.feb621e → 12.1.0-beta.79db3d9

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 (309) hide show
  1. package/allCommands.json +1 -1
  2. package/allCommandsFull.json +1 -1
  3. package/dist/Auth.js +19 -2
  4. package/dist/Command.js +11 -8
  5. package/dist/cli/cli.js +34 -18
  6. package/dist/config.js +2 -0
  7. package/dist/m365/cli/commands/cli-consent.js +9 -2
  8. package/dist/m365/entra/commands/agent/agent-blueprint-list.js +52 -0
  9. package/dist/m365/entra/commands/agent/agent-blueprintprincipal-list.js +56 -0
  10. package/dist/m365/entra/commands/m365group/m365group-add.js +52 -97
  11. package/dist/m365/entra/commands/m365group/m365group-conversation-list.js +20 -33
  12. package/dist/m365/entra/commands/m365group/m365group-conversation-post-list.js +20 -39
  13. package/dist/m365/entra/commands/m365group/m365group-get.js +20 -41
  14. package/dist/m365/entra/commands/m365group/m365group-list.js +11 -31
  15. package/dist/m365/entra/commands/m365group/m365group-recyclebinitem-clear.js +8 -22
  16. package/dist/m365/entra/commands/m365group/m365group-recyclebinitem-list.js +9 -25
  17. package/dist/m365/entra/commands/m365group/m365group-recyclebinitem-remove.js +21 -43
  18. package/dist/m365/entra/commands/m365group/m365group-recyclebinitem-restore.js +21 -41
  19. package/dist/m365/entra/commands/m365group/m365group-remove.js +25 -46
  20. package/dist/m365/entra/commands/m365group/m365group-renew.js +19 -32
  21. package/dist/m365/entra/commands/m365group/m365group-set.js +86 -141
  22. package/dist/m365/entra/commands/m365group/m365group-teamify.js +20 -43
  23. package/dist/m365/entra/commands/m365group/m365group-user-add.js +44 -77
  24. package/dist/m365/entra/commands/m365group/m365group-user-list.js +28 -55
  25. package/dist/m365/entra/commands/m365group/m365group-user-remove.js +37 -74
  26. package/dist/m365/entra/commands/m365group/m365group-user-set.js +45 -77
  27. package/dist/m365/entra/commands.js +2 -0
  28. package/dist/m365/graph/commands/schemaextension/schemaextension-list.js +14 -16
  29. package/dist/m365/outlook/commands/calendargroup/calendargroup-add.js +97 -0
  30. package/dist/m365/outlook/commands/event/event-add.js +324 -0
  31. package/dist/m365/outlook/commands.js +2 -0
  32. package/dist/m365/spe/commands/container/container-activate.js +8 -16
  33. package/dist/m365/spe/commands/container/container-list.js +21 -42
  34. package/dist/m365/spe/commands/container/container-permission-add.js +114 -0
  35. package/dist/m365/spe/commands/container/container-permission-remove.js +94 -0
  36. package/dist/m365/spe/commands/container/container-permission-set.js +90 -0
  37. package/dist/m365/spe/commands/containertype/containertype-list.js +5 -0
  38. package/dist/m365/spe/commands.js +3 -0
  39. package/dist/m365/spfx/commands/SpfxCompatibilityMatrix.js +16 -1
  40. package/dist/m365/spfx/commands/project/project-doctor/{doctor-1.24.0-rc.0.js → doctor-1.24.0.js} +1 -1
  41. package/dist/m365/spfx/commands/project/project-doctor/doctor-1.24.1.js +19 -0
  42. package/dist/m365/spfx/commands/project/project-doctor.js +2 -1
  43. package/dist/m365/spfx/commands/project/project-upgrade/rules/FN027004_OVERRIDES_serialize_javascript.js +34 -0
  44. package/dist/m365/spfx/commands/project/project-upgrade/{upgrade-1.24.0-rc.0.js → upgrade-1.24.0.js} +27 -27
  45. package/dist/m365/spfx/commands/project/project-upgrade/upgrade-1.24.1.js +57 -0
  46. package/dist/m365/spfx/commands/project/project-upgrade.js +12 -11
  47. package/dist/m365/spo/commands/applicationcustomizer/applicationcustomizer-add.js +38 -71
  48. package/dist/m365/spo/commands/applicationcustomizer/applicationcustomizer-get.js +25 -59
  49. package/dist/m365/spo/commands/applicationcustomizer/applicationcustomizer-list.js +11 -34
  50. package/dist/m365/spo/commands/applicationcustomizer/applicationcustomizer-remove.js +25 -54
  51. package/dist/m365/spo/commands/applicationcustomizer/applicationcustomizer-set.js +52 -83
  52. package/dist/m365/spo/commands/apppage/apppage-add.js +21 -39
  53. package/dist/m365/spo/commands/apppage/apppage-set.js +20 -30
  54. package/dist/m365/spo/commands/commandset/commandset-add.js +17 -59
  55. package/dist/m365/spo/commands/commandset/commandset-get.js +24 -62
  56. package/dist/m365/spo/commands/commandset/commandset-list.js +11 -34
  57. package/dist/m365/spo/commands/commandset/commandset-remove.js +21 -54
  58. package/dist/m365/spo/commands/commandset/commandset-set.js +30 -83
  59. package/dist/m365/spo/commands/contenttype/contenttype-add.js +22 -51
  60. package/dist/m365/spo/commands/contenttype/contenttype-field-list.js +38 -62
  61. package/dist/m365/spo/commands/contenttype/contenttype-field-remove.js +25 -54
  62. package/dist/m365/spo/commands/contenttype/contenttype-field-set.js +20 -43
  63. package/dist/m365/spo/commands/contenttype/contenttype-get.js +29 -54
  64. package/dist/m365/spo/commands/contenttype/contenttype-list.js +13 -30
  65. package/dist/m365/spo/commands/contenttype/contenttype-remove.js +24 -39
  66. package/dist/m365/spo/commands/contenttype/contenttype-set.js +42 -63
  67. package/dist/m365/spo/commands/contenttype/contenttype-sync.js +37 -59
  68. package/dist/m365/spo/commands/contenttypehub/contenttypehub-get.js +5 -0
  69. package/dist/m365/spo/commands/customaction/customaction-add.js +124 -145
  70. package/dist/m365/spo/commands/customaction/customaction-clear.js +12 -43
  71. package/dist/m365/spo/commands/customaction/customaction-get.js +28 -59
  72. package/dist/m365/spo/commands/customaction/customaction-list.js +12 -42
  73. package/dist/m365/spo/commands/customaction/customaction-remove.js +26 -54
  74. package/dist/m365/spo/commands/customaction/customaction-set.js +75 -132
  75. package/dist/m365/spo/commands/eventreceiver/eventreceiver-get.js +39 -65
  76. package/dist/m365/spo/commands/eventreceiver/eventreceiver-list.js +28 -56
  77. package/dist/m365/spo/commands/eventreceiver/eventreceiver-remove.js +40 -68
  78. package/dist/m365/spo/commands/externaluser/externaluser-list.js +29 -80
  79. package/dist/m365/spo/commands/group/group-add.js +19 -60
  80. package/dist/m365/spo/commands/group/group-get.js +32 -45
  81. package/dist/m365/spo/commands/group/group-list.js +13 -27
  82. package/dist/m365/spo/commands/group/group-member-add.js +52 -84
  83. package/dist/m365/spo/commands/group/group-member-list.js +24 -38
  84. package/dist/m365/spo/commands/group/group-member-remove.js +49 -68
  85. package/dist/m365/spo/commands/group/group-remove.js +25 -45
  86. package/dist/m365/spo/commands/group/group-set.js +36 -79
  87. package/dist/m365/spo/commands/knowledgehub/knowledgehub-get.js +5 -0
  88. package/dist/m365/spo/commands/knowledgehub/knowledgehub-remove.js +8 -22
  89. package/dist/m365/spo/commands/knowledgehub/knowledgehub-set.js +10 -18
  90. package/dist/m365/spo/commands/listitem/listitem-add.js +27 -55
  91. package/dist/m365/spo/commands/listitem/listitem-attachment-add.js +30 -58
  92. package/dist/m365/spo/commands/listitem/listitem-attachment-get.js +27 -52
  93. package/dist/m365/spo/commands/listitem/listitem-attachment-list.js +26 -50
  94. package/dist/m365/spo/commands/listitem/listitem-attachment-remove.js +28 -55
  95. package/dist/m365/spo/commands/listitem/listitem-attachment-set.js +30 -57
  96. package/dist/m365/spo/commands/listitem/listitem-batch-add.js +36 -58
  97. package/dist/m365/spo/commands/listitem/listitem-batch-remove.js +68 -92
  98. package/dist/m365/spo/commands/listitem/listitem-batch-set.js +37 -57
  99. package/dist/m365/spo/commands/listitem/listitem-get.js +45 -68
  100. package/dist/m365/spo/commands/listitem/listitem-isrecord.js +31 -55
  101. package/dist/m365/spo/commands/listitem/listitem-list.js +47 -81
  102. package/dist/m365/spo/commands/listitem/listitem-record-declare.js +37 -60
  103. package/dist/m365/spo/commands/listitem/listitem-record-lock.js +30 -52
  104. package/dist/m365/spo/commands/listitem/listitem-record-undeclare.js +31 -52
  105. package/dist/m365/spo/commands/listitem/listitem-record-unlock.js +30 -52
  106. package/dist/m365/spo/commands/listitem/listitem-remove.js +33 -61
  107. package/dist/m365/spo/commands/listitem/listitem-retentionlabel-ensure.js +46 -67
  108. package/dist/m365/spo/commands/listitem/listitem-retentionlabel-remove.js +33 -56
  109. package/dist/m365/spo/commands/listitem/listitem-roleassignment-add.js +55 -98
  110. package/dist/m365/spo/commands/listitem/listitem-roleassignment-remove.js +48 -74
  111. package/dist/m365/spo/commands/listitem/listitem-roleinheritance-break.js +33 -56
  112. package/dist/m365/spo/commands/listitem/listitem-roleinheritance-reset.js +31 -53
  113. package/dist/m365/spo/commands/listitem/listitem-set.js +33 -58
  114. package/dist/m365/spo/commands/navigation/navigation-node-add.js +74 -120
  115. package/dist/m365/spo/commands/navigation/navigation-node-get.js +4 -13
  116. package/dist/m365/spo/commands/navigation/navigation-node-list.js +1 -1
  117. package/dist/m365/spo/commands/navigation/navigation-node-remove.js +13 -47
  118. package/dist/m365/spo/commands/navigation/navigation-node-set.js +53 -114
  119. package/dist/m365/spo/commands/orgassetslibrary/orgassetslibrary-add.js +15 -49
  120. package/dist/m365/spo/commands/orgassetslibrary/orgassetslibrary-list.js +6 -1
  121. package/dist/m365/spo/commands/orgassetslibrary/orgassetslibrary-remove.js +9 -17
  122. package/dist/m365/spo/commands/orgnewssite/orgnewssite-list.js +5 -0
  123. package/dist/m365/spo/commands/orgnewssite/orgnewssite-remove.js +11 -27
  124. package/dist/m365/spo/commands/orgnewssite/orgnewssite-set.js +10 -18
  125. package/dist/m365/spo/commands/page/page-column-list.js +7 -8
  126. package/dist/m365/spo/commands/page/page-section-list.js +15 -17
  127. package/dist/m365/spo/commands/page/page-unpublish.js +53 -0
  128. package/dist/m365/spo/commands/propertybag/propertybag-get.js +14 -29
  129. package/dist/m365/spo/commands/propertybag/propertybag-list.js +13 -27
  130. package/dist/m365/spo/commands/propertybag/propertybag-remove.js +15 -32
  131. package/dist/m365/spo/commands/propertybag/propertybag-set.js +15 -31
  132. package/dist/m365/spo/commands/roledefinition/roledefinition-add.js +45 -44
  133. package/dist/m365/spo/commands/roledefinition/roledefinition-get.js +14 -25
  134. package/dist/m365/spo/commands/roledefinition/roledefinition-list.js +12 -18
  135. package/dist/m365/spo/commands/roledefinition/roledefinition-remove.js +15 -35
  136. package/dist/m365/spo/commands/serviceprincipal/serviceprincipal-grant-add.js +9 -17
  137. package/dist/m365/spo/commands/serviceprincipal/serviceprincipal-grant-list.js +5 -0
  138. package/dist/m365/spo/commands/serviceprincipal/serviceprincipal-grant-revoke.js +9 -17
  139. package/dist/m365/spo/commands/serviceprincipal/serviceprincipal-permissionrequest-approve.js +29 -39
  140. package/dist/m365/spo/commands/serviceprincipal/serviceprincipal-permissionrequest-deny.js +10 -23
  141. package/dist/m365/spo/commands/serviceprincipal/serviceprincipal-permissionrequest-list.js +5 -0
  142. package/dist/m365/spo/commands/serviceprincipal/serviceprincipal-set.js +19 -28
  143. package/dist/m365/spo/commands/sitedesign/sitedesign-add.js +24 -59
  144. package/dist/m365/spo/commands/sitedesign/sitedesign-apply.js +10 -34
  145. package/dist/m365/spo/commands/sitedesign/sitedesign-get.js +19 -36
  146. package/dist/m365/spo/commands/sitedesign/sitedesign-list.js +8 -0
  147. package/dist/m365/spo/commands/sitedesign/sitedesign-remove.js +9 -32
  148. package/dist/m365/spo/commands/sitedesign/sitedesign-rights-grant.js +10 -31
  149. package/dist/m365/spo/commands/sitedesign/sitedesign-rights-list.js +8 -23
  150. package/dist/m365/spo/commands/sitedesign/sitedesign-rights-revoke.js +10 -34
  151. package/dist/m365/spo/commands/sitedesign/sitedesign-run-list.js +9 -38
  152. package/dist/m365/spo/commands/sitedesign/sitedesign-run-status-get.js +9 -29
  153. package/dist/m365/spo/commands/sitedesign/sitedesign-set.js +27 -80
  154. package/dist/m365/spo/commands/sitedesign/sitedesign-task-get.js +8 -23
  155. package/dist/m365/spo/commands/sitedesign/sitedesign-task-list.js +8 -18
  156. package/dist/m365/spo/commands/sitedesign/sitedesign-task-remove.js +9 -32
  157. package/dist/m365/spo/commands/sitescript/sitescript-add.js +22 -37
  158. package/dist/m365/spo/commands/sitescript/sitescript-get.js +9 -26
  159. package/dist/m365/spo/commands/sitescript/sitescript-list.js +5 -0
  160. package/dist/m365/spo/commands/sitescript/sitescript-remove.js +9 -33
  161. package/dist/m365/spo/commands/sitescript/sitescript-set.js +29 -56
  162. package/dist/m365/spo/commands/spo-search.js +43 -116
  163. package/dist/m365/spo/commands/tenant/tenant-appcatalog-add.js +15 -46
  164. package/dist/m365/spo/commands/tenant/tenant-appcatalogurl-get.js +5 -0
  165. package/dist/m365/spo/commands/tenant/tenant-applicationcustomizer-add.js +20 -57
  166. package/dist/m365/spo/commands/tenant/tenant-applicationcustomizer-get.js +25 -49
  167. package/dist/m365/spo/commands/tenant/tenant-applicationcustomizer-list.js +5 -1
  168. package/dist/m365/spo/commands/tenant/tenant-applicationcustomizer-remove.js +25 -49
  169. package/dist/m365/spo/commands/tenant/tenant-applicationcustomizer-set.js +47 -79
  170. package/dist/m365/spo/commands/tenant/tenant-commandset-add.js +23 -54
  171. package/dist/m365/spo/commands/tenant/tenant-commandset-get.js +25 -50
  172. package/dist/m365/spo/commands/tenant/tenant-commandset-list.js +5 -1
  173. package/dist/m365/spo/commands/tenant/tenant-commandset-remove.js +25 -49
  174. package/dist/m365/spo/commands/tenant/tenant-commandset-set.js +41 -65
  175. package/dist/m365/spo/commands/tenant/tenant-recyclebinitem-list.js +5 -0
  176. package/dist/m365/spo/commands/tenant/tenant-recyclebinitem-remove.js +10 -30
  177. package/dist/m365/spo/commands/tenant/tenant-recyclebinitem-restore.js +8 -21
  178. package/dist/m365/spo/commands/tenant/tenant-settings-list.js +5 -0
  179. package/dist/m365/spo/commands/tenant/tenant-settings-set.js +104 -386
  180. package/dist/m365/spo/commands/term/term-add.js +95 -110
  181. package/dist/m365/spo/commands/term/term-get.js +63 -75
  182. package/dist/m365/spo/commands/term/term-group-add.js +11 -41
  183. package/dist/m365/spo/commands/term/term-group-get.js +16 -47
  184. package/dist/m365/spo/commands/term/term-group-list.js +16 -42
  185. package/dist/m365/spo/commands/term/term-list.js +42 -57
  186. package/dist/m365/spo/commands/term/term-set-add.js +50 -71
  187. package/dist/m365/spo/commands/term/term-set-get.js +41 -58
  188. package/dist/m365/spo/commands/term/term-set-list.js +22 -56
  189. package/dist/m365/spo/commands/theme/theme-apply.js +27 -43
  190. package/dist/m365/spo/commands/theme/theme-get.js +8 -15
  191. package/dist/m365/spo/commands/theme/theme-list.js +5 -0
  192. package/dist/m365/spo/commands/theme/theme-remove.js +9 -24
  193. package/dist/m365/spo/commands/theme/theme-set.js +12 -34
  194. package/dist/m365/spo/commands.js +1 -0
  195. package/dist/m365/spp/commands/contentcenter/contentcenter-list.js +5 -0
  196. package/dist/m365/spp/commands/model/model-get.js +25 -45
  197. package/dist/m365/spp/commands/model/model-list.js +12 -23
  198. package/dist/m365/spp/commands/model/model-remove.js +25 -45
  199. package/dist/m365/teams/commands/app/app-install.js +35 -44
  200. package/dist/m365/teams/commands/app/app-list.js +8 -33
  201. package/dist/m365/teams/commands/app/app-publish.js +21 -27
  202. package/dist/m365/teams/commands/app/app-remove.js +22 -39
  203. package/dist/m365/teams/commands/app/app-uninstall.js +12 -34
  204. package/dist/m365/teams/commands/app/app-update.js +35 -45
  205. package/dist/m365/teams/commands/funsettings/funsettings-list.js +12 -23
  206. package/dist/m365/teams/commands/funsettings/funsettings-set.js +18 -54
  207. package/dist/m365/teams/commands/guestsettings/guestsettings-list.js +12 -23
  208. package/dist/m365/teams/commands/guestsettings/guestsettings-set.js +15 -40
  209. package/dist/m365/teams/commands/meeting/meeting-add.js +57 -68
  210. package/dist/m365/teams/commands/meeting/meeting-attendancereport-get.js +33 -58
  211. package/dist/m365/teams/commands/meeting/meeting-attendancereport-list.js +14 -38
  212. package/dist/m365/teams/commands/meeting/meeting-get.js +14 -38
  213. package/dist/m365/teams/commands/meeting/meeting-list.js +34 -59
  214. package/dist/m365/teams/commands/meeting/meeting-transcript-get.js +34 -58
  215. package/dist/m365/teams/commands/meeting/meeting-transcript-list.js +29 -50
  216. package/dist/m365/teams/commands/membersettings/membersettings-list.js +12 -23
  217. package/dist/m365/teams/commands/membersettings/membersettings-set.js +18 -49
  218. package/dist/m365/teams/commands/message/message-get.js +19 -30
  219. package/dist/m365/teams/commands/message/message-list.js +26 -43
  220. package/dist/m365/teams/commands/message/message-remove.js +43 -58
  221. package/dist/m365/teams/commands/message/message-reply-list.js +19 -30
  222. package/dist/m365/teams/commands/message/message-restore.js +40 -50
  223. package/dist/m365/teams/commands/message/message-send.js +19 -30
  224. package/dist/m365/teams/commands/messagingsettings/messagingsettings-list.js +12 -23
  225. package/dist/m365/teams/commands/messagingsettings/messagingsettings-set.js +18 -60
  226. package/dist/m365/teams/commands/report/report-deviceusagedistributionusercounts.js +10 -0
  227. package/dist/m365/teams/commands/report/report-deviceusageusercounts.js +10 -0
  228. package/dist/m365/teams/commands/report/report-deviceusageuserdetail.js +22 -0
  229. package/dist/m365/teams/commands/report/report-directroutingcalls.js +19 -39
  230. package/dist/m365/teams/commands/report/report-pstncalls.js +19 -39
  231. package/dist/m365/teams/commands/report/report-useractivitycounts.js +10 -0
  232. package/dist/m365/teams/commands/report/report-useractivityusercounts.js +10 -0
  233. package/dist/m365/teams/commands/report/report-useractivityuserdetail.js +22 -0
  234. package/dist/m365/teams/commands/tab/tab-add.js +23 -49
  235. package/dist/m365/teams/commands/tab/tab-get.js +55 -56
  236. package/dist/m365/teams/commands/tab/tab-list.js +17 -28
  237. package/dist/m365/teams/commands/tab/tab-remove.js +23 -42
  238. package/dist/m365/teams/commands/team/team-add.js +76 -114
  239. package/dist/m365/teams/commands/team/team-app-list.js +23 -36
  240. package/dist/m365/teams/commands/team/team-archive.js +24 -39
  241. package/dist/m365/teams/commands/team/team-clone.js +28 -62
  242. package/dist/m365/teams/commands/team/team-get.js +23 -36
  243. package/dist/m365/teams/commands/team/team-list.js +43 -57
  244. package/dist/m365/teams/commands/team/team-remove.js +24 -37
  245. package/dist/m365/teams/commands/team/team-set.js +23 -52
  246. package/dist/m365/teams/commands/team/team-unarchive.js +23 -28
  247. package/dist/m365/teams/commands/user/user-app-add.js +40 -49
  248. package/dist/m365/teams/commands/user/user-app-list.js +26 -39
  249. package/dist/m365/teams/commands/user/user-app-remove.js +37 -49
  250. package/dist/m365/teams/commands/user/user-app-upgrade.js +36 -52
  251. package/dist/m365/teams/commands/user/user-list.js +17 -39
  252. package/dist/m365/tenant/commands/id/id-get.js +8 -22
  253. package/dist/m365/tenant/commands/info/info-get.js +23 -36
  254. package/dist/m365/tenant/commands/people/people-profilecardproperty-add.js +67 -55
  255. package/dist/m365/tenant/commands/people/people-profilecardproperty-get.js +11 -24
  256. package/dist/m365/tenant/commands/people/people-profilecardproperty-list.js +5 -0
  257. package/dist/m365/tenant/commands/people/people-profilecardproperty-remove.js +12 -33
  258. package/dist/m365/tenant/commands/people/people-profilecardproperty-set.js +31 -51
  259. package/dist/m365/tenant/commands/people/people-pronouns-get.js +5 -0
  260. package/dist/m365/tenant/commands/people/profileCardProperties.js +10 -7
  261. package/dist/m365/tenant/commands/report/report-activeusercounts.js +2 -1
  262. package/dist/m365/tenant/commands/report/report-activeuserdetail.js +2 -1
  263. package/dist/m365/tenant/commands/report/report-office365activationcounts.js +9 -0
  264. package/dist/m365/tenant/commands/report/report-office365activationsusercounts.js +9 -0
  265. package/dist/m365/tenant/commands/report/report-office365activationsuserdetail.js +9 -0
  266. package/dist/m365/tenant/commands/report/report-servicesusercounts.js +2 -1
  267. package/dist/m365/tenant/commands/report/report-settings-get.js +5 -0
  268. package/dist/m365/tenant/commands/security/security-alerts-list.js +8 -20
  269. package/dist/m365/tenant/commands/serviceannouncement/serviceannouncement-health-get.js +9 -20
  270. package/dist/m365/tenant/commands/serviceannouncement/serviceannouncement-health-list.js +8 -20
  271. package/dist/m365/tenant/commands/serviceannouncement/serviceannouncement-healthissue-get.js +8 -15
  272. package/dist/m365/tenant/commands/serviceannouncement/serviceannouncement-healthissue-list.js +8 -15
  273. package/dist/m365/tenant/commands/serviceannouncement/serviceannouncement-message-get.js +12 -26
  274. package/dist/m365/tenant/commands/serviceannouncement/serviceannouncement-message-list.js +8 -22
  275. package/dist/utils/calendar.js +1 -1
  276. package/dist/utils/formatting.js +16 -0
  277. package/dist/utils/pid.js +7 -16
  278. package/dist/utils/spe.js +1 -1
  279. package/dist/utils/spo.js +39 -0
  280. package/dist/utils/validation.js +36 -0
  281. package/dist/utils/zod.js +18 -7
  282. package/docs/docs/cmd/entra/agent/agent-blueprint-list.mdx +175 -0
  283. package/docs/docs/cmd/entra/agent/agent-blueprintprincipal-list.mdx +156 -0
  284. package/docs/docs/cmd/login.mdx +15 -2
  285. package/docs/docs/cmd/outlook/calendargroup/calendargroup-add.mdx +126 -0
  286. package/docs/docs/cmd/outlook/event/event-add.mdx +390 -0
  287. package/docs/docs/cmd/spe/container/container-add.mdx +0 -8
  288. package/docs/docs/cmd/spe/container/container-list.mdx +0 -8
  289. package/docs/docs/cmd/spe/container/container-permission-add.mdx +140 -0
  290. package/docs/docs/cmd/spe/container/container-permission-remove.mdx +78 -0
  291. package/docs/docs/cmd/spe/container/container-permission-set.mdx +78 -0
  292. package/docs/docs/cmd/spe/container/container-recyclebinitem-list.mdx +0 -8
  293. package/docs/docs/cmd/spe/container/container-recyclebinitem-restore.mdx +0 -8
  294. package/docs/docs/cmd/spe/container/container-remove.mdx +0 -8
  295. package/docs/docs/cmd/spe/containertype/containertype-add.mdx +1 -1
  296. package/docs/docs/cmd/spfx/project/project-upgrade.mdx +1 -1
  297. package/docs/docs/cmd/spo/applicationcustomizer/applicationcustomizer-set.mdx +1 -1
  298. package/docs/docs/cmd/spo/externaluser/externaluser-list.mdx +17 -30
  299. package/docs/docs/cmd/spo/navigation/navigation-node-add.mdx +45 -30
  300. package/docs/docs/cmd/spo/navigation/navigation-node-get.mdx +64 -42
  301. package/docs/docs/cmd/spo/navigation/navigation-node-set.mdx +10 -8
  302. package/docs/docs/cmd/spo/orgassetslibrary/orgassetslibrary-list.mdx +0 -21
  303. package/docs/docs/cmd/spo/page/page-unpublish.mdx +63 -0
  304. package/docs/docs/cmd/teams/tab/tab-add.mdx +19 -0
  305. package/docs/docs/cmd/teams/tab/tab-get.mdx +19 -0
  306. package/docs/docs/cmd/teams/tab/tab-list.mdx +19 -0
  307. package/docs/docs/cmd/teams/tab/tab-remove.mdx +21 -0
  308. package/npm-shrinkwrap.json +2 -2
  309. package/package.json +3 -1
@@ -1,14 +1,29 @@
1
- var __classPrivateFieldGet = (this && this.__classPrivateFieldGet) || function (receiver, state, kind, f) {
2
- if (kind === "a" && !f) throw new TypeError("Private accessor was defined without a getter");
3
- if (typeof state === "function" ? receiver !== state || !f : !state.has(receiver)) throw new TypeError("Cannot read private member from an object whose class did not declare it");
4
- return kind === "m" ? f : kind === "a" ? f.call(receiver) : f ? f.value : state.get(receiver);
5
- };
6
- var _TeamsMessageRestoreCommand_instances, _TeamsMessageRestoreCommand_initTelemetry, _TeamsMessageRestoreCommand_initOptions, _TeamsMessageRestoreCommand_initValidators, _TeamsMessageRestoreCommand_initOptionSets, _TeamsMessageRestoreCommand_initTypes;
1
+ import { z } from 'zod';
2
+ import { globalOptionsZod } from '../../../../Command.js';
7
3
  import request from '../../../../request.js';
8
4
  import { validation } from '../../../../utils/validation.js';
9
5
  import commands from '../../commands.js';
10
6
  import GraphDelegatedCommand from '../../../base/GraphDelegatedCommand.js';
11
7
  import { teams } from '../../../../utils/teams.js';
8
+ export const options = z.strictObject({
9
+ ...globalOptionsZod.shape,
10
+ teamId: z.string()
11
+ .refine(val => !val || validation.isValidGuid(val), {
12
+ message: 'The value is not a valid GUID.'
13
+ })
14
+ .optional(),
15
+ teamName: z.string()
16
+ .optional(),
17
+ channelId: z.string()
18
+ .refine(val => !val || validation.isValidTeamsChannelId(val), {
19
+ message: 'The value is not a valid Teams ChannelId.'
20
+ })
21
+ .optional(),
22
+ channelName: z.string()
23
+ .optional(),
24
+ id: z.string()
25
+ .alias('i')
26
+ });
12
27
  class TeamsMessageRestoreCommand extends GraphDelegatedCommand {
13
28
  get name() {
14
29
  return commands.MESSAGE_RESTORE;
@@ -16,14 +31,25 @@ class TeamsMessageRestoreCommand extends GraphDelegatedCommand {
16
31
  get description() {
17
32
  return 'Restores a deleted message from a channel in a Microsoft Teams team';
18
33
  }
19
- constructor() {
20
- super();
21
- _TeamsMessageRestoreCommand_instances.add(this);
22
- __classPrivateFieldGet(this, _TeamsMessageRestoreCommand_instances, "m", _TeamsMessageRestoreCommand_initTelemetry).call(this);
23
- __classPrivateFieldGet(this, _TeamsMessageRestoreCommand_instances, "m", _TeamsMessageRestoreCommand_initOptions).call(this);
24
- __classPrivateFieldGet(this, _TeamsMessageRestoreCommand_instances, "m", _TeamsMessageRestoreCommand_initValidators).call(this);
25
- __classPrivateFieldGet(this, _TeamsMessageRestoreCommand_instances, "m", _TeamsMessageRestoreCommand_initOptionSets).call(this);
26
- __classPrivateFieldGet(this, _TeamsMessageRestoreCommand_instances, "m", _TeamsMessageRestoreCommand_initTypes).call(this);
34
+ get schema() {
35
+ return options;
36
+ }
37
+ getRefinedSchema(schema) {
38
+ return schema
39
+ .refine(opts => [opts.teamId, opts.teamName].filter(x => x !== undefined).length === 1, {
40
+ message: 'Specify either teamId or teamName, but not both.',
41
+ params: {
42
+ customCode: 'optionSet',
43
+ options: ['teamId', 'teamName']
44
+ }
45
+ })
46
+ .refine(opts => [opts.channelId, opts.channelName].filter(x => x !== undefined).length === 1, {
47
+ message: 'Specify either channelId or channelName, but not both.',
48
+ params: {
49
+ customCode: 'optionSet',
50
+ options: ['channelId', 'channelName']
51
+ }
52
+ });
27
53
  }
28
54
  async commandAction(logger, args) {
29
55
  try {
@@ -66,41 +92,5 @@ class TeamsMessageRestoreCommand extends GraphDelegatedCommand {
66
92
  return channelId;
67
93
  }
68
94
  }
69
- _TeamsMessageRestoreCommand_instances = new WeakSet(), _TeamsMessageRestoreCommand_initTelemetry = function _TeamsMessageRestoreCommand_initTelemetry() {
70
- this.telemetry.push((args) => {
71
- Object.assign(this.telemetryProperties, {
72
- teamId: typeof args.options.teamId !== 'undefined',
73
- teamName: typeof args.options.teamName !== 'undefined',
74
- channelId: typeof args.options.channelId !== 'undefined',
75
- channelName: typeof args.options.channelName !== 'undefined'
76
- });
77
- });
78
- }, _TeamsMessageRestoreCommand_initOptions = function _TeamsMessageRestoreCommand_initOptions() {
79
- this.options.unshift({
80
- option: '--teamId [teamId]'
81
- }, {
82
- option: '--teamName [teamName]'
83
- }, {
84
- option: '--channelId [channelId]'
85
- }, {
86
- option: '--channelName [channelName]'
87
- }, {
88
- option: '-i, --id <id>'
89
- });
90
- }, _TeamsMessageRestoreCommand_initValidators = function _TeamsMessageRestoreCommand_initValidators() {
91
- this.validators.push(async (args) => {
92
- if (args.options.teamId && !validation.isValidGuid(args.options.teamId)) {
93
- return `'${args.options.teamId}' is not a valid GUID for 'teamId'.`;
94
- }
95
- if (args.options.channelId && !validation.isValidTeamsChannelId(args.options.channelId)) {
96
- return `'${args.options.channelId}' is not a valid ID for 'channelId'.`;
97
- }
98
- return true;
99
- });
100
- }, _TeamsMessageRestoreCommand_initOptionSets = function _TeamsMessageRestoreCommand_initOptionSets() {
101
- this.optionSets.push({ options: ['teamId', 'teamName'] }, { options: ['channelId', 'channelName'] });
102
- }, _TeamsMessageRestoreCommand_initTypes = function _TeamsMessageRestoreCommand_initTypes() {
103
- this.types.string.push('teamId', 'teamName', 'channelId', 'channelName', 'id');
104
- };
105
95
  export default new TeamsMessageRestoreCommand();
106
96
  //# sourceMappingURL=message-restore.js.map
@@ -1,13 +1,24 @@
1
- var __classPrivateFieldGet = (this && this.__classPrivateFieldGet) || function (receiver, state, kind, f) {
2
- if (kind === "a" && !f) throw new TypeError("Private accessor was defined without a getter");
3
- if (typeof state === "function" ? receiver !== state || !f : !state.has(receiver)) throw new TypeError("Cannot read private member from an object whose class did not declare it");
4
- return kind === "m" ? f : kind === "a" ? f.call(receiver) : f ? f.value : state.get(receiver);
5
- };
6
- var _TeamsMessageSendCommand_instances, _TeamsMessageSendCommand_initOptions, _TeamsMessageSendCommand_initValidators;
1
+ import { z } from 'zod';
2
+ import { globalOptionsZod } from '../../../../Command.js';
7
3
  import request from '../../../../request.js';
8
4
  import { validation } from '../../../../utils/validation.js';
9
5
  import GraphCommand from '../../../base/GraphCommand.js';
10
6
  import commands from '../../commands.js';
7
+ export const options = z.strictObject({
8
+ ...globalOptionsZod.shape,
9
+ teamId: z.string()
10
+ .refine(val => validation.isValidGuid(val), {
11
+ message: 'The value is not a valid GUID.'
12
+ })
13
+ .alias('i'),
14
+ channelId: z.string()
15
+ .refine(val => validation.isValidTeamsChannelId(val), {
16
+ message: 'The value is not a valid Teams ChannelId.'
17
+ })
18
+ .alias('c'),
19
+ message: z.string()
20
+ .alias('m')
21
+ });
11
22
  class TeamsMessageSendCommand extends GraphCommand {
12
23
  get name() {
13
24
  return commands.MESSAGE_SEND;
@@ -15,11 +26,8 @@ class TeamsMessageSendCommand extends GraphCommand {
15
26
  get description() {
16
27
  return 'Sends a message to a channel in a Microsoft Teams team';
17
28
  }
18
- constructor() {
19
- super();
20
- _TeamsMessageSendCommand_instances.add(this);
21
- __classPrivateFieldGet(this, _TeamsMessageSendCommand_instances, "m", _TeamsMessageSendCommand_initOptions).call(this);
22
- __classPrivateFieldGet(this, _TeamsMessageSendCommand_instances, "m", _TeamsMessageSendCommand_initValidators).call(this);
29
+ get schema() {
30
+ return options;
23
31
  }
24
32
  async commandAction(logger, args) {
25
33
  try {
@@ -45,24 +53,5 @@ class TeamsMessageSendCommand extends GraphCommand {
45
53
  }
46
54
  }
47
55
  }
48
- _TeamsMessageSendCommand_instances = new WeakSet(), _TeamsMessageSendCommand_initOptions = function _TeamsMessageSendCommand_initOptions() {
49
- this.options.unshift({
50
- option: '-i, --teamId <teamId>'
51
- }, {
52
- option: '-c, --channelId <channelId>'
53
- }, {
54
- option: '-m, --message <message>'
55
- });
56
- }, _TeamsMessageSendCommand_initValidators = function _TeamsMessageSendCommand_initValidators() {
57
- this.validators.push(async (args) => {
58
- if (!validation.isValidGuid(args.options.teamId)) {
59
- return `${args.options.teamId} is not a valid GUID`;
60
- }
61
- if (!validation.isValidTeamsChannelId(args.options.channelId)) {
62
- return `${args.options.channelId} is not a valid Teams ChannelId`;
63
- }
64
- return true;
65
- });
66
- };
67
56
  export default new TeamsMessageSendCommand();
68
57
  //# sourceMappingURL=message-send.js.map
@@ -1,14 +1,18 @@
1
- var __classPrivateFieldGet = (this && this.__classPrivateFieldGet) || function (receiver, state, kind, f) {
2
- if (kind === "a" && !f) throw new TypeError("Private accessor was defined without a getter");
3
- if (typeof state === "function" ? receiver !== state || !f : !state.has(receiver)) throw new TypeError("Cannot read private member from an object whose class did not declare it");
4
- return kind === "m" ? f : kind === "a" ? f.call(receiver) : f ? f.value : state.get(receiver);
5
- };
6
- var _TeamsMessagingSettingsListCommand_instances, _TeamsMessagingSettingsListCommand_initOptions, _TeamsMessagingSettingsListCommand_initValidators;
7
1
  import request from '../../../../request.js';
8
2
  import { formatting } from '../../../../utils/formatting.js';
9
3
  import { validation } from '../../../../utils/validation.js';
10
4
  import GraphCommand from "../../../base/GraphCommand.js";
11
5
  import commands from '../../commands.js';
6
+ import { globalOptionsZod } from '../../../../Command.js';
7
+ import { z } from 'zod';
8
+ export const options = z.strictObject({
9
+ ...globalOptionsZod.shape,
10
+ teamId: z.string()
11
+ .refine(val => validation.isValidGuid(val), {
12
+ message: 'teamId must be a valid GUID'
13
+ })
14
+ .alias('i')
15
+ });
12
16
  class TeamsMessagingSettingsListCommand extends GraphCommand {
13
17
  get name() {
14
18
  return commands.MESSAGINGSETTINGS_LIST;
@@ -16,11 +20,8 @@ class TeamsMessagingSettingsListCommand extends GraphCommand {
16
20
  get description() {
17
21
  return 'Lists messaging settings for a Microsoft Teams team';
18
22
  }
19
- constructor() {
20
- super();
21
- _TeamsMessagingSettingsListCommand_instances.add(this);
22
- __classPrivateFieldGet(this, _TeamsMessagingSettingsListCommand_instances, "m", _TeamsMessagingSettingsListCommand_initOptions).call(this);
23
- __classPrivateFieldGet(this, _TeamsMessagingSettingsListCommand_instances, "m", _TeamsMessagingSettingsListCommand_initValidators).call(this);
23
+ get schema() {
24
+ return options;
24
25
  }
25
26
  async commandAction(logger, args) {
26
27
  const requestOptions = {
@@ -39,17 +40,5 @@ class TeamsMessagingSettingsListCommand extends GraphCommand {
39
40
  }
40
41
  }
41
42
  }
42
- _TeamsMessagingSettingsListCommand_instances = new WeakSet(), _TeamsMessagingSettingsListCommand_initOptions = function _TeamsMessagingSettingsListCommand_initOptions() {
43
- this.options.unshift({
44
- option: '-i, --teamId <teamId>'
45
- });
46
- }, _TeamsMessagingSettingsListCommand_initValidators = function _TeamsMessagingSettingsListCommand_initValidators() {
47
- this.validators.push(async (args) => {
48
- if (!validation.isValidGuid(args.options.teamId)) {
49
- return `${args.options.teamId} is not a valid GUID`;
50
- }
51
- return true;
52
- });
53
- };
54
43
  export default new TeamsMessagingSettingsListCommand();
55
44
  //# sourceMappingURL=messagingsettings-list.js.map
@@ -1,14 +1,23 @@
1
- var __classPrivateFieldGet = (this && this.__classPrivateFieldGet) || function (receiver, state, kind, f) {
2
- if (kind === "a" && !f) throw new TypeError("Private accessor was defined without a getter");
3
- if (typeof state === "function" ? receiver !== state || !f : !state.has(receiver)) throw new TypeError("Cannot read private member from an object whose class did not declare it");
4
- return kind === "m" ? f : kind === "a" ? f.call(receiver) : f ? f.value : state.get(receiver);
5
- };
6
- var _TeamsMessagingSettingsSetCommand_instances, _a, _TeamsMessagingSettingsSetCommand_initTelemetry, _TeamsMessagingSettingsSetCommand_initOptions, _TeamsMessagingSettingsSetCommand_initTypes, _TeamsMessagingSettingsSetCommand_initValidators;
7
1
  import request from '../../../../request.js';
8
2
  import { formatting } from '../../../../utils/formatting.js';
9
3
  import { validation } from '../../../../utils/validation.js';
10
4
  import GraphCommand from '../../../base/GraphCommand.js';
11
5
  import commands from '../../commands.js';
6
+ import { globalOptionsZod } from '../../../../Command.js';
7
+ import { z } from 'zod';
8
+ export const options = z.strictObject({
9
+ ...globalOptionsZod.shape,
10
+ teamId: z.string()
11
+ .refine(val => validation.isValidGuid(val), {
12
+ message: 'teamId must be a valid GUID'
13
+ })
14
+ .alias('i'),
15
+ allowUserEditMessages: z.boolean().optional(),
16
+ allowUserDeleteMessages: z.boolean().optional(),
17
+ allowOwnerDeleteMessages: z.boolean().optional(),
18
+ allowTeamMentions: z.boolean().optional(),
19
+ allowChannelMentions: z.boolean().optional()
20
+ });
12
21
  class TeamsMessagingSettingsSetCommand extends GraphCommand {
13
22
  get name() {
14
23
  return commands.MESSAGINGSETTINGS_SET;
@@ -16,19 +25,14 @@ class TeamsMessagingSettingsSetCommand extends GraphCommand {
16
25
  get description() {
17
26
  return 'Updates messaging settings of a Microsoft Teams team';
18
27
  }
19
- constructor() {
20
- super();
21
- _TeamsMessagingSettingsSetCommand_instances.add(this);
22
- __classPrivateFieldGet(this, _TeamsMessagingSettingsSetCommand_instances, "m", _TeamsMessagingSettingsSetCommand_initTelemetry).call(this);
23
- __classPrivateFieldGet(this, _TeamsMessagingSettingsSetCommand_instances, "m", _TeamsMessagingSettingsSetCommand_initOptions).call(this);
24
- __classPrivateFieldGet(this, _TeamsMessagingSettingsSetCommand_instances, "m", _TeamsMessagingSettingsSetCommand_initTypes).call(this);
25
- __classPrivateFieldGet(this, _TeamsMessagingSettingsSetCommand_instances, "m", _TeamsMessagingSettingsSetCommand_initValidators).call(this);
28
+ get schema() {
29
+ return options;
26
30
  }
27
31
  async commandAction(logger, args) {
28
32
  const data = {
29
33
  messagingSettings: {}
30
34
  };
31
- _a.booleanProps.forEach((p) => {
35
+ TeamsMessagingSettingsSetCommand.booleanProps.forEach((p) => {
32
36
  if (typeof args.options[p] !== 'undefined') {
33
37
  data.messagingSettings[p] = args.options[p];
34
38
  }
@@ -49,52 +53,6 @@ class TeamsMessagingSettingsSetCommand extends GraphCommand {
49
53
  }
50
54
  }
51
55
  }
52
- _a = TeamsMessagingSettingsSetCommand, _TeamsMessagingSettingsSetCommand_instances = new WeakSet(), _TeamsMessagingSettingsSetCommand_initTelemetry = function _TeamsMessagingSettingsSetCommand_initTelemetry() {
53
- this.telemetry.push((args) => {
54
- _a.booleanProps.forEach((p) => {
55
- this.telemetryProperties[p] = args.options[p];
56
- });
57
- });
58
- }, _TeamsMessagingSettingsSetCommand_initOptions = function _TeamsMessagingSettingsSetCommand_initOptions() {
59
- this.options.unshift({
60
- option: '-i, --teamId <teamId>'
61
- }, {
62
- option: '--allowUserEditMessages [allowUserEditMessages]',
63
- autocomplete: ['true', 'false']
64
- }, {
65
- option: '--allowUserDeleteMessages [allowUserDeleteMessages]',
66
- autocomplete: ['true', 'false']
67
- }, {
68
- option: '--allowOwnerDeleteMessages [allowOwnerDeleteMessages]',
69
- autocomplete: ['true', 'false']
70
- }, {
71
- option: '--allowTeamMentions [allowTeamMentions]',
72
- autocomplete: ['true', 'false']
73
- }, {
74
- option: '--allowChannelMentions [allowChannelMentions]',
75
- autocomplete: ['true', 'false']
76
- });
77
- }, _TeamsMessagingSettingsSetCommand_initTypes = function _TeamsMessagingSettingsSetCommand_initTypes() {
78
- this.types.boolean.push('allowUserEditMessages', 'allowUserDeleteMessages', 'allowOwnerDeleteMessages', 'allowTeamMentions', 'allowChannelMentions');
79
- }, _TeamsMessagingSettingsSetCommand_initValidators = function _TeamsMessagingSettingsSetCommand_initValidators() {
80
- this.validators.push(async (args) => {
81
- if (!validation.isValidGuid(args.options.teamId)) {
82
- return `${args.options.teamId} is not a valid GUID`;
83
- }
84
- let hasDuplicate = false;
85
- let property = '';
86
- _a.booleanProps.forEach((prop) => {
87
- if (args.options[prop] instanceof Array) {
88
- property = prop;
89
- hasDuplicate = true;
90
- }
91
- });
92
- if (hasDuplicate) {
93
- return `Duplicate option ${property} specified. Specify only one`;
94
- }
95
- return true;
96
- });
97
- };
98
56
  TeamsMessagingSettingsSetCommand.booleanProps = [
99
57
  'allowUserEditMessages',
100
58
  'allowUserDeleteMessages',
@@ -1,5 +1,12 @@
1
+ import { z } from 'zod';
2
+ import { globalOptionsZod } from '../../../../Command.js';
1
3
  import PeriodBasedReport from '../../../base/PeriodBasedReport.js';
2
4
  import commands from '../../commands.js';
5
+ export const options = z.strictObject({
6
+ ...globalOptionsZod.shape,
7
+ output: z.enum(['csv', 'json']).optional().alias('o'),
8
+ period: z.enum(['D7', 'D30', 'D90', 'D180']).alias('p')
9
+ });
3
10
  class TeamsReportDeviceUsageDistributionUserCountsCommand extends PeriodBasedReport {
4
11
  get name() {
5
12
  return commands.REPORT_DEVICEUSAGEDISTRIBUTIONUSERCOUNTS;
@@ -10,6 +17,9 @@ class TeamsReportDeviceUsageDistributionUserCountsCommand extends PeriodBasedRep
10
17
  get description() {
11
18
  return 'Gets the number of Microsoft Teams unique users by device type';
12
19
  }
20
+ get schema() {
21
+ return options;
22
+ }
13
23
  }
14
24
  export default new TeamsReportDeviceUsageDistributionUserCountsCommand();
15
25
  //# sourceMappingURL=report-deviceusagedistributionusercounts.js.map
@@ -1,5 +1,12 @@
1
+ import { z } from 'zod';
2
+ import { globalOptionsZod } from '../../../../Command.js';
1
3
  import PeriodBasedReport from '../../../base/PeriodBasedReport.js';
2
4
  import commands from '../../commands.js';
5
+ export const options = z.strictObject({
6
+ ...globalOptionsZod.shape,
7
+ output: z.enum(['csv', 'json']).optional().alias('o'),
8
+ period: z.enum(['D7', 'D30', 'D90', 'D180']).alias('p')
9
+ });
3
10
  class TeamsReportDeviceUsageUserCountsCommand extends PeriodBasedReport {
4
11
  get name() {
5
12
  return commands.REPORT_DEVICEUSAGEUSERCOUNTS;
@@ -10,6 +17,9 @@ class TeamsReportDeviceUsageUserCountsCommand extends PeriodBasedReport {
10
17
  get usageEndpoint() {
11
18
  return 'getTeamsDeviceUsageUserCounts';
12
19
  }
20
+ get schema() {
21
+ return options;
22
+ }
13
23
  }
14
24
  export default new TeamsReportDeviceUsageUserCountsCommand();
15
25
  //# sourceMappingURL=report-deviceusageusercounts.js.map
@@ -1,5 +1,13 @@
1
+ import { z } from 'zod';
2
+ import { globalOptionsZod } from '../../../../Command.js';
1
3
  import DateAndPeriodBasedReport from '../../../base/DateAndPeriodBasedReport.js';
2
4
  import commands from '../../commands.js';
5
+ export const options = z.strictObject({
6
+ ...globalOptionsZod.shape,
7
+ output: z.enum(['csv', 'json']).optional().alias('o'),
8
+ period: z.enum(['D7', 'D30', 'D90', 'D180']).optional().alias('p'),
9
+ date: z.string().regex(/^\d{4}-\d{2}-\d{2}$/, 'The supported date format is YYYY-MM-DD').optional().alias('d')
10
+ });
3
11
  class TeamsReportDeviceUsageUserDetailCommand extends DateAndPeriodBasedReport {
4
12
  get name() {
5
13
  return commands.REPORT_DEVICEUSAGEUSERDETAIL;
@@ -10,6 +18,20 @@ class TeamsReportDeviceUsageUserDetailCommand extends DateAndPeriodBasedReport {
10
18
  get usageEndpoint() {
11
19
  return 'getTeamsDeviceUsageUserDetail';
12
20
  }
21
+ get schema() {
22
+ return options;
23
+ }
24
+ getRefinedSchema(schema) {
25
+ return schema
26
+ .refine((opts) => opts.period !== undefined || opts.date !== undefined, {
27
+ message: 'Specify period or date, one is required.',
28
+ params: { customCode: 'optionSet', options: ['period', 'date'] }
29
+ })
30
+ .refine((opts) => !(opts.period !== undefined && opts.date !== undefined), {
31
+ message: 'Specify period or date but not both.',
32
+ params: { customCode: 'optionSet', options: ['period', 'date'] }
33
+ });
34
+ }
13
35
  }
14
36
  export default new TeamsReportDeviceUsageUserDetailCommand();
15
37
  //# sourceMappingURL=report-deviceusageuserdetail.js.map
@@ -1,14 +1,20 @@
1
- var __classPrivateFieldGet = (this && this.__classPrivateFieldGet) || function (receiver, state, kind, f) {
2
- if (kind === "a" && !f) throw new TypeError("Private accessor was defined without a getter");
3
- if (typeof state === "function" ? receiver !== state || !f : !state.has(receiver)) throw new TypeError("Cannot read private member from an object whose class did not declare it");
4
- return kind === "m" ? f : kind === "a" ? f.call(receiver) : f ? f.value : state.get(receiver);
5
- };
6
- var _TeamsReportDirectroutingcallsCommand_instances, _TeamsReportDirectroutingcallsCommand_initTelemetry, _TeamsReportDirectroutingcallsCommand_initOptions, _TeamsReportDirectroutingcallsCommand_initValidators;
1
+ import { z } from 'zod';
2
+ import { globalOptionsZod } from '../../../../Command.js';
7
3
  import { formatting } from '../../../../utils/formatting.js';
8
4
  import { odata } from '../../../../utils/odata.js';
9
5
  import { validation } from '../../../../utils/validation.js';
10
6
  import GraphApplicationCommand from '../../../base/GraphCommand.js';
11
7
  import commands from '../../commands.js';
8
+ export const options = z.strictObject({
9
+ ...globalOptionsZod.shape,
10
+ output: z.enum(['csv', 'json']).optional().alias('o'),
11
+ fromDateTime: z.string().refine(val => validation.isValidISODateDashOnly(val), {
12
+ message: 'The fromDateTime is not a valid ISO date string (YYYY-MM-DD)'
13
+ }),
14
+ toDateTime: z.string().refine(val => validation.isValidISODateDashOnly(val), {
15
+ message: 'The toDateTime is not a valid ISO date string (YYYY-MM-DD)'
16
+ }).optional()
17
+ });
12
18
  class TeamsReportDirectroutingcallsCommand extends GraphApplicationCommand {
13
19
  get allowedOutputs() {
14
20
  return ['json', 'csv'];
@@ -22,12 +28,13 @@ class TeamsReportDirectroutingcallsCommand extends GraphApplicationCommand {
22
28
  defaultProperties() {
23
29
  return ['id', 'calleeNumber', 'callerNumber', 'startDateTime'];
24
30
  }
25
- constructor() {
26
- super();
27
- _TeamsReportDirectroutingcallsCommand_instances.add(this);
28
- __classPrivateFieldGet(this, _TeamsReportDirectroutingcallsCommand_instances, "m", _TeamsReportDirectroutingcallsCommand_initTelemetry).call(this);
29
- __classPrivateFieldGet(this, _TeamsReportDirectroutingcallsCommand_instances, "m", _TeamsReportDirectroutingcallsCommand_initOptions).call(this);
30
- __classPrivateFieldGet(this, _TeamsReportDirectroutingcallsCommand_instances, "m", _TeamsReportDirectroutingcallsCommand_initValidators).call(this);
31
+ get schema() {
32
+ return options;
33
+ }
34
+ getRefinedSchema(schema) {
35
+ return schema.refine(opts => Math.ceil((new Date(opts.toDateTime || new Date().toISOString()).getTime() - new Date(opts.fromDateTime).getTime()) / (1000 * 3600 * 24)) <= 90, {
36
+ message: 'The maximum number of days between fromDateTime and toDateTime cannot exceed 90'
37
+ });
31
38
  }
32
39
  async commandAction(logger, args) {
33
40
  const toDateTimeParameter = formatting.encodeQueryParameter(args.options.toDateTime ? args.options.toDateTime : new Date().toISOString());
@@ -40,32 +47,5 @@ class TeamsReportDirectroutingcallsCommand extends GraphApplicationCommand {
40
47
  }
41
48
  }
42
49
  }
43
- _TeamsReportDirectroutingcallsCommand_instances = new WeakSet(), _TeamsReportDirectroutingcallsCommand_initTelemetry = function _TeamsReportDirectroutingcallsCommand_initTelemetry() {
44
- this.telemetry.push((args) => {
45
- Object.assign(this.telemetryProperties, {
46
- toDateTime: typeof args.options.toDateTime !== 'undefined'
47
- });
48
- });
49
- }, _TeamsReportDirectroutingcallsCommand_initOptions = function _TeamsReportDirectroutingcallsCommand_initOptions() {
50
- this.options.unshift({
51
- option: '--fromDateTime <fromDateTime>'
52
- }, {
53
- option: '--toDateTime [toDateTime]'
54
- });
55
- }, _TeamsReportDirectroutingcallsCommand_initValidators = function _TeamsReportDirectroutingcallsCommand_initValidators() {
56
- this.validators.push(async (args) => {
57
- if (!validation.isValidISODateDashOnly(args.options.fromDateTime)) {
58
- return 'The fromDateTime is not a valid ISO date string (YYYY-MM-DD)';
59
- }
60
- if (args.options.toDateTime &&
61
- !validation.isValidISODateDashOnly(args.options.toDateTime)) {
62
- return 'The toDateTime is not a valid ISO date string (YYYY-MM-DD)';
63
- }
64
- if (Math.ceil((new Date(args.options.toDateTime || new Date().toISOString()).getTime() - new Date(args.options.fromDateTime).getTime()) / (1000 * 3600 * 24)) > 90) {
65
- return 'The maximum number of days between fromDateTime and toDateTime cannot exceed 90';
66
- }
67
- return true;
68
- });
69
- };
70
50
  export default new TeamsReportDirectroutingcallsCommand();
71
51
  //# sourceMappingURL=report-directroutingcalls.js.map
@@ -1,14 +1,20 @@
1
- var __classPrivateFieldGet = (this && this.__classPrivateFieldGet) || function (receiver, state, kind, f) {
2
- if (kind === "a" && !f) throw new TypeError("Private accessor was defined without a getter");
3
- if (typeof state === "function" ? receiver !== state || !f : !state.has(receiver)) throw new TypeError("Cannot read private member from an object whose class did not declare it");
4
- return kind === "m" ? f : kind === "a" ? f.call(receiver) : f ? f.value : state.get(receiver);
5
- };
6
- var _TeamsReportPstncallsCommand_instances, _TeamsReportPstncallsCommand_initTelemetry, _TeamsReportPstncallsCommand_initOptions, _TeamsReportPstncallsCommand_initValidators;
1
+ import { z } from 'zod';
2
+ import { globalOptionsZod } from '../../../../Command.js';
7
3
  import { formatting } from '../../../../utils/formatting.js';
8
4
  import { odata } from '../../../../utils/odata.js';
9
5
  import { validation } from '../../../../utils/validation.js';
10
6
  import GraphApplicationCommand from '../../../base/GraphCommand.js';
11
7
  import commands from '../../commands.js';
8
+ export const options = z.strictObject({
9
+ ...globalOptionsZod.shape,
10
+ output: z.enum(['csv', 'json']).optional().alias('o'),
11
+ fromDateTime: z.string().refine(val => validation.isValidISODateDashOnly(val), {
12
+ message: 'The fromDateTime is not a valid ISO date string (YYYY-MM-DD)'
13
+ }),
14
+ toDateTime: z.string().refine(val => validation.isValidISODateDashOnly(val), {
15
+ message: 'The toDateTime is not a valid ISO date string (YYYY-MM-DD)'
16
+ }).optional()
17
+ });
12
18
  class TeamsReportPstncallsCommand extends GraphApplicationCommand {
13
19
  get allowedOutputs() {
14
20
  return ['json', 'csv'];
@@ -22,12 +28,13 @@ class TeamsReportPstncallsCommand extends GraphApplicationCommand {
22
28
  defaultProperties() {
23
29
  return ['id', 'calleeNumber', 'callerNumber', 'startDateTime'];
24
30
  }
25
- constructor() {
26
- super();
27
- _TeamsReportPstncallsCommand_instances.add(this);
28
- __classPrivateFieldGet(this, _TeamsReportPstncallsCommand_instances, "m", _TeamsReportPstncallsCommand_initTelemetry).call(this);
29
- __classPrivateFieldGet(this, _TeamsReportPstncallsCommand_instances, "m", _TeamsReportPstncallsCommand_initOptions).call(this);
30
- __classPrivateFieldGet(this, _TeamsReportPstncallsCommand_instances, "m", _TeamsReportPstncallsCommand_initValidators).call(this);
31
+ get schema() {
32
+ return options;
33
+ }
34
+ getRefinedSchema(schema) {
35
+ return schema.refine(opts => Math.ceil((new Date(opts.toDateTime || new Date().toISOString()).getTime() - new Date(opts.fromDateTime).getTime()) / (1000 * 3600 * 24)) <= 90, {
36
+ message: 'The maximum number of days between fromDateTime and toDateTime cannot exceed 90'
37
+ });
31
38
  }
32
39
  async commandAction(logger, args) {
33
40
  const toDateTimeParameter = formatting.encodeQueryParameter(args.options.toDateTime ? args.options.toDateTime : new Date().toISOString());
@@ -40,32 +47,5 @@ class TeamsReportPstncallsCommand extends GraphApplicationCommand {
40
47
  }
41
48
  }
42
49
  }
43
- _TeamsReportPstncallsCommand_instances = new WeakSet(), _TeamsReportPstncallsCommand_initTelemetry = function _TeamsReportPstncallsCommand_initTelemetry() {
44
- this.telemetry.push((args) => {
45
- Object.assign(this.telemetryProperties, {
46
- toDateTime: typeof args.options.toDateTime !== 'undefined'
47
- });
48
- });
49
- }, _TeamsReportPstncallsCommand_initOptions = function _TeamsReportPstncallsCommand_initOptions() {
50
- this.options.unshift({
51
- option: '--fromDateTime <fromDateTime>'
52
- }, {
53
- option: '--toDateTime [toDateTime]'
54
- });
55
- }, _TeamsReportPstncallsCommand_initValidators = function _TeamsReportPstncallsCommand_initValidators() {
56
- this.validators.push(async (args) => {
57
- if (!validation.isValidISODateDashOnly(args.options.fromDateTime)) {
58
- return 'The fromDateTime is not a valid ISO date string (YYYY-MM-DD)';
59
- }
60
- if (args.options.toDateTime &&
61
- !validation.isValidISODateDashOnly(args.options.toDateTime)) {
62
- return 'The toDateTime is not a valid ISO date string (YYYY-MM-DD)';
63
- }
64
- if (Math.ceil((new Date(args.options.toDateTime || new Date().toISOString()).getTime() - new Date(args.options.fromDateTime).getTime()) / (1000 * 3600 * 24)) > 90) {
65
- return 'The maximum number of days between fromDateTime and toDateTime cannot exceed 90';
66
- }
67
- return true;
68
- });
69
- };
70
50
  export default new TeamsReportPstncallsCommand();
71
51
  //# sourceMappingURL=report-pstncalls.js.map
@@ -1,5 +1,12 @@
1
+ import { z } from 'zod';
2
+ import { globalOptionsZod } from '../../../../Command.js';
1
3
  import PeriodBasedReport from '../../../base/PeriodBasedReport.js';
2
4
  import commands from '../../commands.js';
5
+ export const options = z.strictObject({
6
+ ...globalOptionsZod.shape,
7
+ output: z.enum(['csv', 'json']).optional().alias('o'),
8
+ period: z.enum(['D7', 'D30', 'D90', 'D180']).alias('p')
9
+ });
3
10
  class TeamsReportUserActivityCountsCommand extends PeriodBasedReport {
4
11
  get name() {
5
12
  return commands.REPORT_USERACTIVITYCOUNTS;
@@ -10,6 +17,9 @@ class TeamsReportUserActivityCountsCommand extends PeriodBasedReport {
10
17
  get usageEndpoint() {
11
18
  return 'getTeamsUserActivityCounts';
12
19
  }
20
+ get schema() {
21
+ return options;
22
+ }
13
23
  }
14
24
  export default new TeamsReportUserActivityCountsCommand();
15
25
  //# sourceMappingURL=report-useractivitycounts.js.map
@@ -1,5 +1,12 @@
1
+ import { z } from 'zod';
2
+ import { globalOptionsZod } from '../../../../Command.js';
1
3
  import PeriodBasedReport from '../../../base/PeriodBasedReport.js';
2
4
  import commands from '../../commands.js';
5
+ export const options = z.strictObject({
6
+ ...globalOptionsZod.shape,
7
+ output: z.enum(['csv', 'json']).optional().alias('o'),
8
+ period: z.enum(['D7', 'D30', 'D90', 'D180']).alias('p')
9
+ });
3
10
  class TeamsReportUserActivityUserCountsCommand extends PeriodBasedReport {
4
11
  get name() {
5
12
  return commands.REPORT_USERACTIVITYUSERCOUNTS;
@@ -10,6 +17,9 @@ class TeamsReportUserActivityUserCountsCommand extends PeriodBasedReport {
10
17
  get usageEndpoint() {
11
18
  return 'getTeamsUserActivityUserCounts';
12
19
  }
20
+ get schema() {
21
+ return options;
22
+ }
13
23
  }
14
24
  export default new TeamsReportUserActivityUserCountsCommand();
15
25
  //# sourceMappingURL=report-useractivityusercounts.js.map