@pnp/cli-microsoft365 12.0.0-beta.10c5833 → 12.0.0-beta.235caf5

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 (311) hide show
  1. package/.devproxy/generate-openapi-spec.json +1 -1
  2. package/allCommands.json +1 -1
  3. package/allCommandsFull.json +1 -1
  4. package/dist/Auth.js +19 -2
  5. package/dist/cli/cli.js +3 -0
  6. package/dist/config.js +1 -0
  7. package/dist/googleAnalytics.js +96 -0
  8. package/dist/m365/cli/commands/cli-consent.js +9 -2
  9. package/dist/m365/entra/commands/agent/agent-blueprint-list.js +52 -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 +1 -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-permission-add.js +114 -0
  33. package/dist/m365/spe/commands/container/container-permission-remove.js +94 -0
  34. package/dist/m365/spe/commands/container/container-permission-set.js +90 -0
  35. package/dist/m365/spe/commands.js +3 -0
  36. package/dist/m365/spfx/commands/SpfxCompatibilityMatrix.js +15 -0
  37. package/dist/m365/spfx/commands/project/project-doctor/doctor-1.24.0.js +19 -0
  38. package/dist/m365/spfx/commands/project/project-doctor.js +2 -1
  39. package/dist/m365/spfx/commands/project/project-upgrade/rules/FN012021_TSC_excludeDirectories.js +43 -0
  40. package/dist/m365/spfx/commands/project/project-upgrade/rules/FN027002_OVERRIDES_qs.js +33 -0
  41. package/dist/m365/spfx/commands/project/project-upgrade/rules/FN027003_OVERRIDES_uuid.js +33 -0
  42. package/dist/m365/spfx/commands/project/project-upgrade/upgrade-1.24.0.js +77 -0
  43. package/dist/m365/spfx/commands/project/project-upgrade.js +2 -1
  44. package/dist/m365/spo/commands/app/app-add.js +35 -56
  45. package/dist/m365/spo/commands/app/app-deploy.js +41 -59
  46. package/dist/m365/spo/commands/app/app-get.js +40 -56
  47. package/dist/m365/spo/commands/app/app-install.js +20 -41
  48. package/dist/m365/spo/commands/app/app-instance-list.js +12 -24
  49. package/dist/m365/spo/commands/app/app-list.js +26 -44
  50. package/dist/m365/spo/commands/app/app-remove.js +32 -52
  51. package/dist/m365/spo/commands/app/app-retract.js +32 -51
  52. package/dist/m365/spo/commands/app/app-teamspackage-download.js +35 -54
  53. package/dist/m365/spo/commands/app/app-uninstall.js +21 -44
  54. package/dist/m365/spo/commands/app/app-upgrade.js +20 -41
  55. package/dist/m365/spo/commands/commandset/commandset-add.js +17 -59
  56. package/dist/m365/spo/commands/commandset/commandset-get.js +24 -62
  57. package/dist/m365/spo/commands/commandset/commandset-list.js +11 -34
  58. package/dist/m365/spo/commands/commandset/commandset-remove.js +21 -54
  59. package/dist/m365/spo/commands/commandset/commandset-set.js +30 -83
  60. package/dist/m365/spo/commands/contenttype/contenttype-add.js +22 -51
  61. package/dist/m365/spo/commands/contenttype/contenttype-field-list.js +38 -62
  62. package/dist/m365/spo/commands/contenttype/contenttype-field-remove.js +25 -54
  63. package/dist/m365/spo/commands/contenttype/contenttype-field-set.js +20 -43
  64. package/dist/m365/spo/commands/contenttype/contenttype-get.js +29 -54
  65. package/dist/m365/spo/commands/contenttype/contenttype-list.js +13 -30
  66. package/dist/m365/spo/commands/contenttype/contenttype-remove.js +24 -39
  67. package/dist/m365/spo/commands/contenttype/contenttype-set.js +42 -63
  68. package/dist/m365/spo/commands/contenttype/contenttype-sync.js +37 -59
  69. package/dist/m365/spo/commands/contenttypehub/contenttypehub-get.js +5 -0
  70. package/dist/m365/spo/commands/customaction/customaction-add.js +124 -145
  71. package/dist/m365/spo/commands/customaction/customaction-clear.js +12 -43
  72. package/dist/m365/spo/commands/customaction/customaction-get.js +28 -59
  73. package/dist/m365/spo/commands/customaction/customaction-list.js +12 -42
  74. package/dist/m365/spo/commands/customaction/customaction-remove.js +26 -54
  75. package/dist/m365/spo/commands/customaction/customaction-set.js +75 -132
  76. package/dist/m365/spo/commands/externaluser/externaluser-list.js +5 -14
  77. package/dist/m365/spo/commands/feature/feature-disable.js +20 -50
  78. package/dist/m365/spo/commands/feature/feature-enable.js +22 -50
  79. package/dist/m365/spo/commands/feature/feature-list.js +11 -36
  80. package/dist/m365/spo/commands/field/field-add.js +33 -62
  81. package/dist/m365/spo/commands/field/field-get.js +30 -57
  82. package/dist/m365/spo/commands/field/field-list.js +21 -46
  83. package/dist/m365/spo/commands/field/field-remove.js +32 -63
  84. package/dist/m365/spo/commands/field/field-set.js +34 -66
  85. package/dist/m365/spo/commands/file/file-get.js +4 -3
  86. package/dist/m365/spo/commands/folder/folder-unarchive.js +90 -0
  87. package/dist/m365/spo/commands/hubsite/hubsite-connect.js +38 -63
  88. package/dist/m365/spo/commands/hubsite/hubsite-data-get.js +11 -27
  89. package/dist/m365/spo/commands/hubsite/hubsite-disconnect.js +25 -47
  90. package/dist/m365/spo/commands/hubsite/hubsite-get.js +25 -37
  91. package/dist/m365/spo/commands/hubsite/hubsite-list.js +12 -24
  92. package/dist/m365/spo/commands/hubsite/hubsite-register.js +10 -18
  93. package/dist/m365/spo/commands/hubsite/hubsite-rights-grant.js +14 -32
  94. package/dist/m365/spo/commands/hubsite/hubsite-rights-revoke.js +12 -29
  95. package/dist/m365/spo/commands/hubsite/hubsite-set.js +19 -46
  96. package/dist/m365/spo/commands/hubsite/hubsite-unregister.js +11 -27
  97. package/dist/m365/spo/commands/knowledgehub/knowledgehub-get.js +5 -0
  98. package/dist/m365/spo/commands/knowledgehub/knowledgehub-remove.js +8 -22
  99. package/dist/m365/spo/commands/knowledgehub/knowledgehub-set.js +10 -18
  100. package/dist/m365/spo/commands/listitem/listitem-add.js +27 -55
  101. package/dist/m365/spo/commands/listitem/listitem-attachment-add.js +30 -58
  102. package/dist/m365/spo/commands/listitem/listitem-attachment-get.js +27 -52
  103. package/dist/m365/spo/commands/listitem/listitem-attachment-list.js +26 -50
  104. package/dist/m365/spo/commands/listitem/listitem-attachment-remove.js +28 -55
  105. package/dist/m365/spo/commands/listitem/listitem-attachment-set.js +30 -57
  106. package/dist/m365/spo/commands/listitem/listitem-batch-add.js +36 -58
  107. package/dist/m365/spo/commands/listitem/listitem-batch-remove.js +68 -92
  108. package/dist/m365/spo/commands/listitem/listitem-batch-set.js +37 -57
  109. package/dist/m365/spo/commands/listitem/listitem-get.js +45 -79
  110. package/dist/m365/spo/commands/listitem/listitem-isrecord.js +31 -55
  111. package/dist/m365/spo/commands/listitem/listitem-list.js +47 -81
  112. package/dist/m365/spo/commands/listitem/listitem-record-declare.js +37 -60
  113. package/dist/m365/spo/commands/listitem/listitem-record-lock.js +30 -52
  114. package/dist/m365/spo/commands/listitem/listitem-record-undeclare.js +31 -52
  115. package/dist/m365/spo/commands/listitem/listitem-record-unlock.js +30 -52
  116. package/dist/m365/spo/commands/listitem/listitem-remove.js +33 -61
  117. package/dist/m365/spo/commands/listitem/listitem-retentionlabel-ensure.js +46 -67
  118. package/dist/m365/spo/commands/listitem/listitem-retentionlabel-remove.js +33 -56
  119. package/dist/m365/spo/commands/listitem/listitem-roleassignment-add.js +55 -98
  120. package/dist/m365/spo/commands/listitem/listitem-roleassignment-remove.js +48 -74
  121. package/dist/m365/spo/commands/listitem/listitem-roleinheritance-break.js +33 -56
  122. package/dist/m365/spo/commands/listitem/listitem-roleinheritance-reset.js +31 -53
  123. package/dist/m365/spo/commands/listitem/listitem-set.js +33 -58
  124. package/dist/m365/spo/commands/navigation/navigation-node-add.js +74 -120
  125. package/dist/m365/spo/commands/navigation/navigation-node-get.js +4 -13
  126. package/dist/m365/spo/commands/navigation/navigation-node-list.js +7 -5
  127. package/dist/m365/spo/commands/navigation/navigation-node-remove.js +13 -47
  128. package/dist/m365/spo/commands/navigation/navigation-node-set.js +53 -114
  129. package/dist/m365/spo/commands/orgassetslibrary/orgassetslibrary-list.js +1 -1
  130. package/dist/m365/spo/commands/page/page-column-list.js +7 -8
  131. package/dist/m365/spo/commands/page/page-section-list.js +15 -17
  132. package/dist/m365/spo/commands/page/page-unpublish.js +53 -0
  133. package/dist/m365/spo/commands/sitescript/sitescript-add.js +22 -37
  134. package/dist/m365/spo/commands/sitescript/sitescript-get.js +9 -26
  135. package/dist/m365/spo/commands/sitescript/sitescript-list.js +5 -0
  136. package/dist/m365/spo/commands/sitescript/sitescript-remove.js +9 -33
  137. package/dist/m365/spo/commands/sitescript/sitescript-set.js +29 -56
  138. package/dist/m365/spo/commands/spo-search.js +43 -116
  139. package/dist/m365/spo/commands/tenant/tenant-applicationcustomizer-add.js +8 -1
  140. package/dist/m365/spo/commands/tenant/tenant-commandset-add.js +8 -1
  141. package/dist/m365/spo/commands/term/term-group-list.js +7 -8
  142. package/dist/m365/spo/commands/term/term-set-list.js +6 -9
  143. package/dist/m365/spo/commands.js +3 -1
  144. package/dist/m365/spp/commands/contentcenter/contentcenter-list.js +5 -0
  145. package/dist/m365/spp/commands/model/model-get.js +25 -45
  146. package/dist/m365/spp/commands/model/model-list.js +12 -23
  147. package/dist/m365/spp/commands/model/model-remove.js +25 -45
  148. package/dist/m365/teams/commands/app/app-install.js +35 -44
  149. package/dist/m365/teams/commands/app/app-list.js +8 -33
  150. package/dist/m365/teams/commands/app/app-publish.js +21 -27
  151. package/dist/m365/teams/commands/app/app-remove.js +22 -39
  152. package/dist/m365/teams/commands/app/app-uninstall.js +12 -34
  153. package/dist/m365/teams/commands/app/app-update.js +35 -45
  154. package/dist/m365/teams/commands/channel/channel-add.js +46 -57
  155. package/dist/m365/teams/commands/channel/channel-get.js +41 -48
  156. package/dist/m365/teams/commands/channel/channel-list.js +28 -42
  157. package/dist/m365/teams/commands/channel/channel-member-add.js +53 -54
  158. package/dist/m365/teams/commands/channel/channel-member-list.js +47 -55
  159. package/dist/m365/teams/commands/channel/channel-member-remove.js +62 -62
  160. package/dist/m365/teams/commands/channel/channel-member-set.js +61 -65
  161. package/dist/m365/teams/commands/channel/channel-remove.js +47 -49
  162. package/dist/m365/teams/commands/channel/channel-set.js +47 -54
  163. package/dist/m365/teams/commands/chat/chat-get.js +30 -45
  164. package/dist/m365/teams/commands/chat/chat-list.js +22 -42
  165. package/dist/m365/teams/commands/chat/chat-member-add.js +43 -64
  166. package/dist/m365/teams/commands/chat/chat-member-list.js +10 -23
  167. package/dist/m365/teams/commands/chat/chat-member-remove.js +28 -50
  168. package/dist/m365/teams/commands/chat/chat-message-send.js +32 -55
  169. package/dist/m365/teams/commands/funsettings/funsettings-list.js +12 -23
  170. package/dist/m365/teams/commands/funsettings/funsettings-set.js +18 -54
  171. package/dist/m365/teams/commands/guestsettings/guestsettings-list.js +12 -23
  172. package/dist/m365/teams/commands/guestsettings/guestsettings-set.js +15 -40
  173. package/dist/m365/teams/commands/meeting/meeting-add.js +57 -68
  174. package/dist/m365/teams/commands/meeting/meeting-attendancereport-get.js +33 -58
  175. package/dist/m365/teams/commands/meeting/meeting-attendancereport-list.js +14 -38
  176. package/dist/m365/teams/commands/meeting/meeting-get.js +14 -38
  177. package/dist/m365/teams/commands/meeting/meeting-list.js +34 -59
  178. package/dist/m365/teams/commands/meeting/meeting-transcript-get.js +34 -58
  179. package/dist/m365/teams/commands/meeting/meeting-transcript-list.js +29 -50
  180. package/dist/m365/teams/commands/membersettings/membersettings-list.js +12 -23
  181. package/dist/m365/teams/commands/membersettings/membersettings-set.js +18 -49
  182. package/dist/m365/teams/commands/message/message-get.js +19 -30
  183. package/dist/m365/teams/commands/message/message-list.js +26 -43
  184. package/dist/m365/teams/commands/message/message-remove.js +43 -58
  185. package/dist/m365/teams/commands/message/message-reply-list.js +19 -30
  186. package/dist/m365/teams/commands/message/message-restore.js +40 -50
  187. package/dist/m365/teams/commands/message/message-send.js +19 -30
  188. package/dist/m365/teams/commands/messagingsettings/messagingsettings-list.js +12 -23
  189. package/dist/m365/teams/commands/messagingsettings/messagingsettings-set.js +18 -60
  190. package/dist/m365/teams/commands/report/report-deviceusagedistributionusercounts.js +10 -0
  191. package/dist/m365/teams/commands/report/report-deviceusageusercounts.js +10 -0
  192. package/dist/m365/teams/commands/report/report-deviceusageuserdetail.js +22 -0
  193. package/dist/m365/teams/commands/report/report-directroutingcalls.js +19 -39
  194. package/dist/m365/teams/commands/report/report-pstncalls.js +19 -39
  195. package/dist/m365/teams/commands/report/report-useractivitycounts.js +10 -0
  196. package/dist/m365/teams/commands/report/report-useractivityusercounts.js +10 -0
  197. package/dist/m365/teams/commands/report/report-useractivityuserdetail.js +22 -0
  198. package/dist/m365/teams/commands/tab/tab-add.js +23 -49
  199. package/dist/m365/teams/commands/tab/tab-get.js +55 -56
  200. package/dist/m365/teams/commands/tab/tab-list.js +17 -28
  201. package/dist/m365/teams/commands/tab/tab-remove.js +23 -42
  202. package/dist/m365/teams/commands/team/team-add.js +76 -114
  203. package/dist/m365/teams/commands/team/team-app-list.js +23 -36
  204. package/dist/m365/teams/commands/team/team-archive.js +24 -39
  205. package/dist/m365/teams/commands/team/team-clone.js +28 -62
  206. package/dist/m365/teams/commands/team/team-get.js +23 -36
  207. package/dist/m365/teams/commands/team/team-list.js +43 -57
  208. package/dist/m365/teams/commands/team/team-remove.js +24 -37
  209. package/dist/m365/teams/commands/team/team-set.js +23 -52
  210. package/dist/m365/teams/commands/team/team-unarchive.js +23 -28
  211. package/dist/m365/teams/commands/user/user-app-add.js +40 -49
  212. package/dist/m365/teams/commands/user/user-app-list.js +26 -39
  213. package/dist/m365/teams/commands/user/user-app-remove.js +37 -49
  214. package/dist/m365/teams/commands/user/user-app-upgrade.js +36 -52
  215. package/dist/m365/teams/commands/user/user-list.js +17 -39
  216. package/dist/m365/tenant/commands/report/report-activeusercounts.js +2 -1
  217. package/dist/m365/tenant/commands/report/report-activeuserdetail.js +2 -1
  218. package/dist/m365/tenant/commands/report/report-office365activationcounts.js +9 -0
  219. package/dist/m365/tenant/commands/report/report-office365activationsusercounts.js +9 -0
  220. package/dist/m365/tenant/commands/report/report-office365activationsuserdetail.js +9 -0
  221. package/dist/m365/tenant/commands/report/report-servicesusercounts.js +2 -1
  222. package/dist/m365/tenant/commands/report/report-settings-get.js +5 -0
  223. package/dist/m365/tenant/commands/serviceannouncement/serviceannouncement-health-get.js +9 -20
  224. package/dist/m365/tenant/commands/serviceannouncement/serviceannouncement-health-list.js +8 -20
  225. package/dist/m365/tenant/commands/serviceannouncement/serviceannouncement-healthissue-get.js +8 -15
  226. package/dist/m365/tenant/commands/serviceannouncement/serviceannouncement-healthissue-list.js +8 -15
  227. package/dist/m365/tenant/commands/serviceannouncement/serviceannouncement-message-get.js +12 -26
  228. package/dist/m365/tenant/commands/serviceannouncement/serviceannouncement-message-list.js +8 -22
  229. package/dist/m365/util/commands/accesstoken/accesstoken-get.js +10 -28
  230. package/dist/telemetry.js +7 -11
  231. package/dist/utils/calendar.js +1 -1
  232. package/dist/utils/formatting.js +16 -0
  233. package/dist/utils/pid.js +7 -16
  234. package/dist/utils/spe.js +1 -1
  235. package/dist/utils/spo.js +40 -3
  236. package/dist/utils/urlUtil.js +2 -2
  237. package/dist/utils/validation.js +24 -0
  238. package/dist/utils/zod.js +17 -7
  239. package/docs/docs/cmd/entra/agent/agent-blueprint-list.mdx +175 -0
  240. package/docs/docs/cmd/login.mdx +15 -2
  241. package/docs/docs/cmd/outlook/calendargroup/calendargroup-add.mdx +126 -0
  242. package/docs/docs/cmd/outlook/event/event-add.mdx +390 -0
  243. package/docs/docs/cmd/spe/container/container-add.mdx +0 -8
  244. package/docs/docs/cmd/spe/container/container-list.mdx +0 -8
  245. package/docs/docs/cmd/spe/container/container-permission-add.mdx +140 -0
  246. package/docs/docs/cmd/spe/container/container-permission-remove.mdx +78 -0
  247. package/docs/docs/cmd/spe/container/container-permission-set.mdx +78 -0
  248. package/docs/docs/cmd/spe/container/container-recyclebinitem-list.mdx +0 -8
  249. package/docs/docs/cmd/spe/container/container-recyclebinitem-restore.mdx +0 -8
  250. package/docs/docs/cmd/spe/container/container-remove.mdx +0 -8
  251. package/docs/docs/cmd/spe/containertype/containertype-add.mdx +1 -1
  252. package/docs/docs/cmd/spfx/project/project-upgrade.mdx +1 -1
  253. package/docs/docs/cmd/spo/externaluser/externaluser-list.mdx +17 -30
  254. package/docs/docs/cmd/spo/file/file-archive.mdx +1 -1
  255. package/docs/docs/cmd/spo/file/file-checkin.mdx +2 -2
  256. package/docs/docs/cmd/spo/file/file-checkout-undo.mdx +1 -1
  257. package/docs/docs/cmd/spo/file/file-checkout.mdx +2 -2
  258. package/docs/docs/cmd/spo/file/file-copy.mdx +2 -2
  259. package/docs/docs/cmd/spo/file/file-get.mdx +6 -6
  260. package/docs/docs/cmd/spo/file/file-retentionlabel-ensure.mdx +1 -1
  261. package/docs/docs/cmd/spo/file/file-retentionlabel-remove.mdx +1 -1
  262. package/docs/docs/cmd/spo/file/file-roleassignment-add.mdx +1 -1
  263. package/docs/docs/cmd/spo/file/file-roleassignment-remove.mdx +1 -1
  264. package/docs/docs/cmd/spo/file/file-roleinheritance-break.mdx +3 -3
  265. package/docs/docs/cmd/spo/file/file-roleinheritance-reset.mdx +2 -2
  266. package/docs/docs/cmd/spo/file/file-sharinginfo-get.mdx +2 -2
  267. package/docs/docs/cmd/spo/file/file-sharinglink-add.mdx +22 -1
  268. package/docs/docs/cmd/spo/file/file-sharinglink-clear.mdx +24 -1
  269. package/docs/docs/cmd/spo/file/file-sharinglink-get.mdx +22 -1
  270. package/docs/docs/cmd/spo/file/file-sharinglink-list.mdx +22 -1
  271. package/docs/docs/cmd/spo/file/file-sharinglink-remove.mdx +24 -1
  272. package/docs/docs/cmd/spo/file/file-sharinglink-set.mdx +22 -1
  273. package/docs/docs/cmd/spo/file/file-unarchive.mdx +1 -1
  274. package/docs/docs/cmd/spo/file/file-version-clear.mdx +1 -1
  275. package/docs/docs/cmd/spo/file/file-version-get.mdx +1 -1
  276. package/docs/docs/cmd/spo/file/file-version-keep.mdx +1 -1
  277. package/docs/docs/cmd/spo/file/file-version-list.mdx +1 -1
  278. package/docs/docs/cmd/spo/file/file-version-remove.mdx +1 -1
  279. package/docs/docs/cmd/spo/file/file-version-restore.mdx +1 -1
  280. package/docs/docs/cmd/spo/folder/folder-archive.mdx +1 -1
  281. package/docs/docs/cmd/spo/folder/folder-copy.mdx +1 -1
  282. package/docs/docs/cmd/spo/folder/folder-get.mdx +2 -2
  283. package/docs/docs/cmd/spo/folder/folder-retentionlabel-ensure.mdx +1 -1
  284. package/docs/docs/cmd/spo/folder/folder-retentionlabel-remove.mdx +1 -1
  285. package/docs/docs/cmd/spo/folder/folder-sharinglink-add.mdx +22 -1
  286. package/docs/docs/cmd/spo/folder/folder-sharinglink-clear.mdx +23 -0
  287. package/docs/docs/cmd/spo/folder/folder-sharinglink-get.mdx +21 -0
  288. package/docs/docs/cmd/spo/folder/folder-sharinglink-list.mdx +22 -1
  289. package/docs/docs/cmd/spo/folder/folder-sharinglink-remove.mdx +24 -1
  290. package/docs/docs/cmd/spo/folder/folder-sharinglink-set.mdx +21 -0
  291. package/docs/docs/cmd/spo/folder/folder-unarchive.mdx +76 -0
  292. package/docs/docs/cmd/spo/listitem/listitem-get.mdx +0 -6
  293. package/docs/docs/cmd/spo/navigation/navigation-node-add.mdx +45 -30
  294. package/docs/docs/cmd/spo/navigation/navigation-node-get.mdx +64 -42
  295. package/docs/docs/cmd/spo/navigation/navigation-node-list.mdx +37 -27
  296. package/docs/docs/cmd/spo/navigation/navigation-node-set.mdx +10 -8
  297. package/docs/docs/cmd/spo/orgassetslibrary/orgassetslibrary-list.mdx +0 -21
  298. package/docs/docs/cmd/spo/page/page-unpublish.mdx +63 -0
  299. package/docs/docs/cmd/spp/model/model-get.mdx +1 -1
  300. package/docs/docs/cmd/spp/model/model-remove.mdx +1 -1
  301. package/docs/docs/cmd/teams/tab/tab-add.mdx +19 -0
  302. package/docs/docs/cmd/teams/tab/tab-get.mdx +19 -0
  303. package/docs/docs/cmd/teams/tab/tab-list.mdx +19 -0
  304. package/docs/docs/cmd/teams/tab/tab-remove.mdx +21 -0
  305. package/docs/docs/cmd/viva/engage/engage-message-add.mdx +17 -0
  306. package/docs/docs/cmd/viva/engage/engage-message-get.mdx +17 -0
  307. package/docs/docs/cmd/viva/engage/engage-message-list.mdx +17 -0
  308. package/docs/docs/cmd/viva/engage/engage-message-remove.mdx +19 -0
  309. package/npm-shrinkwrap.json +702 -3230
  310. package/package.json +21 -38
  311. package/dist/appInsights.js +0 -43
@@ -1,10 +1,6 @@
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 _SpoContentTypeAddCommand_instances, _SpoContentTypeAddCommand_initTelemetry, _SpoContentTypeAddCommand_initOptions, _SpoContentTypeAddCommand_initValidators, _SpoContentTypeAddCommand_initTypes;
1
+ import { z } from 'zod';
7
2
  import { cli } from '../../../../cli/cli.js';
3
+ import { globalOptionsZod } from '../../../../Command.js';
8
4
  import config from '../../../../config.js';
9
5
  import request from '../../../../request.js';
10
6
  import { formatting } from '../../../../utils/formatting.js';
@@ -13,6 +9,24 @@ import { validation } from '../../../../utils/validation.js';
13
9
  import SpoCommand from '../../../base/SpoCommand.js';
14
10
  import commands from '../../commands.js';
15
11
  import spoContentTypeGetCommand from './contenttype-get.js';
12
+ export const options = z.strictObject({
13
+ ...globalOptionsZod.shape,
14
+ webUrl: z.string()
15
+ .refine(url => validation.isValidSharePointUrl(url) === true, {
16
+ error: e => `'${e.input}' is not a valid SharePoint Online site URL.`
17
+ })
18
+ .alias('u'),
19
+ listTitle: z.string().optional().alias('l'),
20
+ listId: z.string()
21
+ .refine(id => validation.isValidGuid(id), {
22
+ error: e => `${e.input} is not a valid GUID`
23
+ }).optional(),
24
+ listUrl: z.string().optional(),
25
+ id: z.string().alias('i'),
26
+ name: z.string().alias('n'),
27
+ description: z.string().optional().alias('d'),
28
+ group: z.string().optional().alias('g')
29
+ });
16
30
  class SpoContentTypeAddCommand extends SpoCommand {
17
31
  get name() {
18
32
  return commands.CONTENTTYPE_ADD;
@@ -20,13 +34,8 @@ class SpoContentTypeAddCommand extends SpoCommand {
20
34
  get description() {
21
35
  return 'Adds a new list or site content type';
22
36
  }
23
- constructor() {
24
- super();
25
- _SpoContentTypeAddCommand_instances.add(this);
26
- __classPrivateFieldGet(this, _SpoContentTypeAddCommand_instances, "m", _SpoContentTypeAddCommand_initTelemetry).call(this);
27
- __classPrivateFieldGet(this, _SpoContentTypeAddCommand_instances, "m", _SpoContentTypeAddCommand_initOptions).call(this);
28
- __classPrivateFieldGet(this, _SpoContentTypeAddCommand_instances, "m", _SpoContentTypeAddCommand_initValidators).call(this);
29
- __classPrivateFieldGet(this, _SpoContentTypeAddCommand_instances, "m", _SpoContentTypeAddCommand_initTypes).call(this);
37
+ get schema() {
38
+ return options;
30
39
  }
31
40
  async commandAction(logger, args) {
32
41
  try {
@@ -92,43 +101,5 @@ class SpoContentTypeAddCommand extends SpoCommand {
92
101
  return `<Identity Id="5" Name="1a48869e-c092-0000-1f61-81ec89809537|740c6a0b-85e2-48a0-a494-e0f1759d4aa7:site:${siteId}:web:${webId}:list:${listId}" />`;
93
102
  }
94
103
  }
95
- _SpoContentTypeAddCommand_instances = new WeakSet(), _SpoContentTypeAddCommand_initTelemetry = function _SpoContentTypeAddCommand_initTelemetry() {
96
- this.telemetry.push((args) => {
97
- Object.assign(this.telemetryProperties, {
98
- listTitle: typeof args.options.listTitle !== 'undefined',
99
- description: typeof args.options.description !== 'undefined',
100
- group: typeof args.options.group !== 'undefined'
101
- });
102
- });
103
- }, _SpoContentTypeAddCommand_initOptions = function _SpoContentTypeAddCommand_initOptions() {
104
- this.options.unshift({
105
- option: '-u, --webUrl <webUrl>'
106
- }, {
107
- option: '-l, --listTitle [listTitle]'
108
- }, {
109
- option: '--listId [listId]'
110
- }, {
111
- option: '--listUrl [listUrl]'
112
- }, {
113
- option: '-i, --id <id>'
114
- }, {
115
- option: '-n, --name <name>'
116
- }, {
117
- option: '-d, --description [description]'
118
- }, {
119
- option: '-g, --group [group]'
120
- });
121
- }, _SpoContentTypeAddCommand_initValidators = function _SpoContentTypeAddCommand_initValidators() {
122
- this.validators.push(async (args) => {
123
- if (args.options.listId) {
124
- if (!validation.isValidGuid(args.options.listId)) {
125
- return `${args.options.listId} is not a valid GUID`;
126
- }
127
- }
128
- return validation.isValidSharePointUrl(args.options.webUrl);
129
- });
130
- }, _SpoContentTypeAddCommand_initTypes = function _SpoContentTypeAddCommand_initTypes() {
131
- this.types.string.push('id', 'i');
132
- };
133
104
  export default new SpoContentTypeAddCommand();
134
105
  //# sourceMappingURL=contenttype-add.js.map
@@ -1,15 +1,28 @@
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 _SpoContentTypeFieldListCommand_instances, _SpoContentTypeFieldListCommand_initTelemetry, _SpoContentTypeFieldListCommand_initOptions, _SpoContentTypeFieldListCommand_initValidators, _SpoContentTypeFieldListCommand_initTypes, _SpoContentTypeFieldListCommand_initOptionSets;
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 { urlUtil } from '../../../../utils/urlUtil.js';
10
6
  import { validation } from '../../../../utils/validation.js';
11
7
  import SpoCommand from '../../../base/SpoCommand.js';
12
8
  import commands from '../../commands.js';
9
+ export const options = z.strictObject({
10
+ ...globalOptionsZod.shape,
11
+ webUrl: z.string()
12
+ .refine(url => validation.isValidSharePointUrl(url) === true, {
13
+ error: e => `'${e.input}' is not a valid SharePoint Online site URL.`
14
+ })
15
+ .alias('u'),
16
+ contentTypeId: z.string().optional().alias('i'),
17
+ contentTypeName: z.string().optional().alias('n'),
18
+ listTitle: z.string().optional().alias('l'),
19
+ listId: z.string()
20
+ .refine(id => validation.isValidGuid(id), {
21
+ error: e => `${e.input} is not a valid GUID for option 'listId'.`
22
+ }).optional(),
23
+ listUrl: z.string().optional(),
24
+ properties: z.string().optional().alias('p')
25
+ });
13
26
  class SpoContentTypeFieldListCommand extends SpoCommand {
14
27
  get name() {
15
28
  return commands.CONTENTTYPE_FIELD_LIST;
@@ -20,14 +33,25 @@ class SpoContentTypeFieldListCommand extends SpoCommand {
20
33
  defaultProperties() {
21
34
  return ['Id', 'Title', 'InternalName', 'Hidden'];
22
35
  }
23
- constructor() {
24
- super();
25
- _SpoContentTypeFieldListCommand_instances.add(this);
26
- __classPrivateFieldGet(this, _SpoContentTypeFieldListCommand_instances, "m", _SpoContentTypeFieldListCommand_initTelemetry).call(this);
27
- __classPrivateFieldGet(this, _SpoContentTypeFieldListCommand_instances, "m", _SpoContentTypeFieldListCommand_initOptions).call(this);
28
- __classPrivateFieldGet(this, _SpoContentTypeFieldListCommand_instances, "m", _SpoContentTypeFieldListCommand_initValidators).call(this);
29
- __classPrivateFieldGet(this, _SpoContentTypeFieldListCommand_instances, "m", _SpoContentTypeFieldListCommand_initTypes).call(this);
30
- __classPrivateFieldGet(this, _SpoContentTypeFieldListCommand_instances, "m", _SpoContentTypeFieldListCommand_initOptionSets).call(this);
36
+ get schema() {
37
+ return options;
38
+ }
39
+ getRefinedSchema(schema) {
40
+ return schema
41
+ .refine(opts => [opts.contentTypeId, opts.contentTypeName].filter(x => x !== undefined).length === 1, {
42
+ error: `Specify either 'contentTypeId' or 'contentTypeName', but not both.`,
43
+ params: {
44
+ customCode: 'optionSet',
45
+ options: ['contentTypeId', 'contentTypeName']
46
+ }
47
+ })
48
+ .refine(opts => [opts.listId, opts.listTitle, opts.listUrl].filter(x => x !== undefined).length <= 1, {
49
+ error: `Specify either 'listId', 'listTitle' or 'listUrl'.`,
50
+ params: {
51
+ customCode: 'optionSet',
52
+ options: ['listId', 'listTitle', 'listUrl']
53
+ }
54
+ });
31
55
  }
32
56
  async commandAction(logger, args) {
33
57
  try {
@@ -72,53 +96,5 @@ class SpoContentTypeFieldListCommand extends SpoCommand {
72
96
  return res[0].StringId;
73
97
  }
74
98
  }
75
- _SpoContentTypeFieldListCommand_instances = new WeakSet(), _SpoContentTypeFieldListCommand_initTelemetry = function _SpoContentTypeFieldListCommand_initTelemetry() {
76
- this.telemetry.push((args) => {
77
- Object.assign(this.telemetryProperties, {
78
- contentTypeId: typeof args.options.contentTypeId !== 'undefined',
79
- contentTypeName: typeof args.options.contentTypeName !== 'undefined',
80
- listId: typeof args.options.listId !== 'undefined',
81
- listTitle: typeof args.options.listTitle !== 'undefined',
82
- listUrl: typeof args.options.listUrl !== 'undefined',
83
- properties: typeof args.options.properties !== 'undefined'
84
- });
85
- });
86
- }, _SpoContentTypeFieldListCommand_initOptions = function _SpoContentTypeFieldListCommand_initOptions() {
87
- this.options.unshift({
88
- option: '-u, --webUrl <webUrl>'
89
- }, {
90
- option: '-i, --contentTypeId [contentTypeId]'
91
- }, {
92
- option: '-n, --contentTypeName [contentTypeName]'
93
- }, {
94
- option: '-l, --listTitle [listTitle]'
95
- }, {
96
- option: '--listId [listId]'
97
- }, {
98
- option: '--listUrl [listUrl]'
99
- }, {
100
- option: '-p, --properties [properties]'
101
- });
102
- }, _SpoContentTypeFieldListCommand_initValidators = function _SpoContentTypeFieldListCommand_initValidators() {
103
- this.validators.push(async (args) => {
104
- const isValidSharePointUrl = validation.isValidSharePointUrl(args.options.webUrl);
105
- if (isValidSharePointUrl !== true) {
106
- return isValidSharePointUrl;
107
- }
108
- if (args.options.listId && !validation.isValidGuid(args.options.listId)) {
109
- return `${args.options.listId} is not a valid GUID for option 'listId'.`;
110
- }
111
- return true;
112
- });
113
- }, _SpoContentTypeFieldListCommand_initTypes = function _SpoContentTypeFieldListCommand_initTypes() {
114
- this.types.string.push('webUrl', 'contentTypeId', 'contentTypeName', 'listTitle', 'listId', 'listUrl', 'properties');
115
- }, _SpoContentTypeFieldListCommand_initOptionSets = function _SpoContentTypeFieldListCommand_initOptionSets() {
116
- this.optionSets.push({
117
- options: ['contentTypeId', 'contentTypeName']
118
- }, {
119
- options: ['listId', 'listTitle', 'listUrl'],
120
- runsWhen: (args) => args.options.listId || args.options.listTitle || args.options.listUrl
121
- });
122
- };
123
99
  export default new SpoContentTypeFieldListCommand();
124
100
  //# sourceMappingURL=contenttype-field-list.js.map
@@ -1,16 +1,33 @@
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 _SpoContentTypeFieldRemoveCommand_instances, _SpoContentTypeFieldRemoveCommand_initTelemetry, _SpoContentTypeFieldRemoveCommand_initOptions, _SpoContentTypeFieldRemoveCommand_initValidators, _SpoContentTypeFieldRemoveCommand_initTypes;
1
+ import { z } from 'zod';
7
2
  import { cli } from '../../../../cli/cli.js';
3
+ import { globalOptionsZod } from '../../../../Command.js';
8
4
  import request from '../../../../request.js';
9
5
  import { formatting } from '../../../../utils/formatting.js';
10
6
  import { spo } from '../../../../utils/spo.js';
11
7
  import { validation } from '../../../../utils/validation.js';
12
8
  import SpoCommand from '../../../base/SpoCommand.js';
13
9
  import commands from '../../commands.js';
10
+ export const options = z.strictObject({
11
+ ...globalOptionsZod.shape,
12
+ contentTypeId: z.string(),
13
+ id: z.string()
14
+ .refine(id => validation.isValidGuid(id), {
15
+ error: e => `${e.input} is not a valid GUID`
16
+ }).alias('i'),
17
+ webUrl: z.string()
18
+ .refine(url => validation.isValidSharePointUrl(url) === true, {
19
+ error: e => `'${e.input}' is not a valid SharePoint Online site URL.`
20
+ })
21
+ .alias('u'),
22
+ listId: z.string()
23
+ .refine(id => validation.isValidGuid(id), {
24
+ error: e => `${e.input} is not a valid GUID`
25
+ }).optional(),
26
+ listTitle: z.string().optional().alias('l'),
27
+ listUrl: z.string().optional(),
28
+ updateChildContentTypes: z.boolean().optional().alias('c'),
29
+ force: z.boolean().optional().alias('f')
30
+ });
14
31
  class SpoContentTypeFieldRemoveCommand extends SpoCommand {
15
32
  get name() {
16
33
  return commands.CONTENTTYPE_FIELD_REMOVE;
@@ -18,13 +35,8 @@ class SpoContentTypeFieldRemoveCommand extends SpoCommand {
18
35
  get description() {
19
36
  return 'Removes a column from a site- or list content type';
20
37
  }
21
- constructor() {
22
- super();
23
- _SpoContentTypeFieldRemoveCommand_instances.add(this);
24
- __classPrivateFieldGet(this, _SpoContentTypeFieldRemoveCommand_instances, "m", _SpoContentTypeFieldRemoveCommand_initTelemetry).call(this);
25
- __classPrivateFieldGet(this, _SpoContentTypeFieldRemoveCommand_instances, "m", _SpoContentTypeFieldRemoveCommand_initOptions).call(this);
26
- __classPrivateFieldGet(this, _SpoContentTypeFieldRemoveCommand_instances, "m", _SpoContentTypeFieldRemoveCommand_initValidators).call(this);
27
- __classPrivateFieldGet(this, _SpoContentTypeFieldRemoveCommand_instances, "m", _SpoContentTypeFieldRemoveCommand_initTypes).call(this);
38
+ get schema() {
39
+ return options;
28
40
  }
29
41
  async commandAction(logger, args) {
30
42
  const removeFieldLink = async () => {
@@ -95,46 +107,5 @@ class SpoContentTypeFieldRemoveCommand extends SpoCommand {
95
107
  }
96
108
  }
97
109
  }
98
- _SpoContentTypeFieldRemoveCommand_instances = new WeakSet(), _SpoContentTypeFieldRemoveCommand_initTelemetry = function _SpoContentTypeFieldRemoveCommand_initTelemetry() {
99
- this.telemetry.push((args) => {
100
- Object.assign(this.telemetryProperties, {
101
- listTitle: typeof args.options.listTitle !== 'undefined',
102
- listId: typeof args.options.listId !== 'undefined',
103
- listUrl: typeof args.options.listUrl !== 'undefined',
104
- updateChildContentTypes: !!args.options.updateChildContentTypes,
105
- force: !!args.options.force
106
- });
107
- });
108
- }, _SpoContentTypeFieldRemoveCommand_initOptions = function _SpoContentTypeFieldRemoveCommand_initOptions() {
109
- this.options.unshift({
110
- option: '-u, --webUrl <webUrl>'
111
- }, {
112
- option: '-l, --listTitle [listTitle]'
113
- }, {
114
- option: '--listId [listId]'
115
- }, {
116
- option: '--listUrl [listUrl]'
117
- }, {
118
- option: '--contentTypeId <contentTypeId>'
119
- }, {
120
- option: '-i, --id <id>'
121
- }, {
122
- option: '-c, --updateChildContentTypes'
123
- }, {
124
- option: '-f, --force'
125
- });
126
- }, _SpoContentTypeFieldRemoveCommand_initValidators = function _SpoContentTypeFieldRemoveCommand_initValidators() {
127
- this.validators.push(async (args) => {
128
- if (!validation.isValidGuid(args.options.id)) {
129
- return `${args.options.id} is not a valid GUID`;
130
- }
131
- if (args.options.listId && !validation.isValidGuid(args.options.listId)) {
132
- return `${args.options.listId} is not a valid GUID`;
133
- }
134
- return validation.isValidSharePointUrl(args.options.webUrl);
135
- });
136
- }, _SpoContentTypeFieldRemoveCommand_initTypes = function _SpoContentTypeFieldRemoveCommand_initTypes() {
137
- this.types.string.push('i', 'contentTypeId');
138
- };
139
110
  export default new SpoContentTypeFieldRemoveCommand();
140
111
  //# sourceMappingURL=contenttype-field-remove.js.map
@@ -1,9 +1,5 @@
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 _SpoContentTypeFieldSetCommand_instances, _SpoContentTypeFieldSetCommand_initTelemetry, _SpoContentTypeFieldSetCommand_initOptions, _SpoContentTypeFieldSetCommand_initValidators, _SpoContentTypeFieldSetCommand_initTypes;
1
+ import { z } from 'zod';
2
+ import { globalOptionsZod } from '../../../../Command.js';
7
3
  import config from '../../../../config.js';
8
4
  import request from '../../../../request.js';
9
5
  import { formatting } from '../../../../utils/formatting.js';
@@ -11,6 +7,21 @@ import { spo } from '../../../../utils/spo.js';
11
7
  import { validation } from '../../../../utils/validation.js';
12
8
  import SpoCommand from '../../../base/SpoCommand.js';
13
9
  import commands from '../../commands.js';
10
+ export const options = z.strictObject({
11
+ ...globalOptionsZod.shape,
12
+ contentTypeId: z.string(),
13
+ id: z.string()
14
+ .refine(id => validation.isValidGuid(id), {
15
+ error: e => `${e.input} is not a valid GUID`
16
+ }).alias('i'),
17
+ hidden: z.boolean().optional(),
18
+ required: z.boolean().optional().alias('r'),
19
+ webUrl: z.string()
20
+ .refine(url => validation.isValidSharePointUrl(url) === true, {
21
+ error: e => `'${e.input}' is not a valid SharePoint Online site URL.`
22
+ })
23
+ .alias('u')
24
+ });
14
25
  class SpoContentTypeFieldSetCommand extends SpoCommand {
15
26
  get name() {
16
27
  return commands.CONTENTTYPE_FIELD_SET;
@@ -18,13 +29,11 @@ class SpoContentTypeFieldSetCommand extends SpoCommand {
18
29
  get description() {
19
30
  return 'Adds or updates a site column reference in a site content type';
20
31
  }
32
+ get schema() {
33
+ return options;
34
+ }
21
35
  constructor() {
22
36
  super();
23
- _SpoContentTypeFieldSetCommand_instances.add(this);
24
- __classPrivateFieldGet(this, _SpoContentTypeFieldSetCommand_instances, "m", _SpoContentTypeFieldSetCommand_initTelemetry).call(this);
25
- __classPrivateFieldGet(this, _SpoContentTypeFieldSetCommand_instances, "m", _SpoContentTypeFieldSetCommand_initOptions).call(this);
26
- __classPrivateFieldGet(this, _SpoContentTypeFieldSetCommand_instances, "m", _SpoContentTypeFieldSetCommand_initValidators).call(this);
27
- __classPrivateFieldGet(this, _SpoContentTypeFieldSetCommand_instances, "m", _SpoContentTypeFieldSetCommand_initTypes).call(this);
28
37
  this.requestDigest = '';
29
38
  this.siteId = '';
30
39
  this.webId = '';
@@ -207,37 +216,5 @@ class SpoContentTypeFieldSetCommand extends SpoCommand {
207
216
  this.requestDigest = res.FormDigestValue;
208
217
  }
209
218
  }
210
- _SpoContentTypeFieldSetCommand_instances = new WeakSet(), _SpoContentTypeFieldSetCommand_initTelemetry = function _SpoContentTypeFieldSetCommand_initTelemetry() {
211
- this.telemetry.push((args) => {
212
- Object.assign(this.telemetryProperties, {
213
- hidden: args.options.hidden,
214
- required: args.options.required
215
- });
216
- });
217
- }, _SpoContentTypeFieldSetCommand_initOptions = function _SpoContentTypeFieldSetCommand_initOptions() {
218
- this.options.unshift({
219
- option: '-u, --webUrl <webUrl>'
220
- }, {
221
- option: '--contentTypeId <contentTypeId>'
222
- }, {
223
- option: '-i, --id <id>'
224
- }, {
225
- option: '-r, --required [required]',
226
- autocomplete: ['true', 'false']
227
- }, {
228
- option: '--hidden [hidden]',
229
- autocomplete: ['true', 'false']
230
- });
231
- }, _SpoContentTypeFieldSetCommand_initValidators = function _SpoContentTypeFieldSetCommand_initValidators() {
232
- this.validators.push(async (args) => {
233
- if (!validation.isValidGuid(args.options.id)) {
234
- return `${args.options.id} is not a valid GUID`;
235
- }
236
- return validation.isValidSharePointUrl(args.options.webUrl);
237
- });
238
- }, _SpoContentTypeFieldSetCommand_initTypes = function _SpoContentTypeFieldSetCommand_initTypes() {
239
- this.types.string.push('contentTypeId', 'c');
240
- this.types.boolean.push('required', 'hidden');
241
- };
242
219
  export default new SpoContentTypeFieldSetCommand();
243
220
  //# sourceMappingURL=contenttype-field-set.js.map
@@ -1,15 +1,27 @@
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 _SpoContentTypeGetCommand_instances, _SpoContentTypeGetCommand_initTelemetry, _SpoContentTypeGetCommand_initOptions, _SpoContentTypeGetCommand_initValidators, _SpoContentTypeGetCommand_initTypes, _SpoContentTypeGetCommand_initOptionSets;
1
+ import { z } from 'zod';
2
+ import { globalOptionsZod } from '../../../../Command.js';
7
3
  import request from '../../../../request.js';
8
4
  import { formatting } from '../../../../utils/formatting.js';
9
5
  import { urlUtil } from '../../../../utils/urlUtil.js';
10
6
  import { validation } from '../../../../utils/validation.js';
11
7
  import SpoCommand from '../../../base/SpoCommand.js';
12
8
  import commands from '../../commands.js';
9
+ export const options = z.strictObject({
10
+ ...globalOptionsZod.shape,
11
+ webUrl: z.string()
12
+ .refine(url => validation.isValidSharePointUrl(url) === true, {
13
+ error: e => `'${e.input}' is not a valid SharePoint Online site URL.`
14
+ })
15
+ .alias('u'),
16
+ listTitle: z.string().optional().alias('l'),
17
+ listId: z.string()
18
+ .refine(id => validation.isValidGuid(id), {
19
+ error: e => `${e.input} is not a valid GUID`
20
+ }).optional(),
21
+ listUrl: z.string().optional(),
22
+ id: z.string().optional().alias('i'),
23
+ name: z.string().optional().alias('n')
24
+ });
13
25
  class SpoContentTypeGetCommand extends SpoCommand {
14
26
  get name() {
15
27
  return commands.CONTENTTYPE_GET;
@@ -17,14 +29,17 @@ class SpoContentTypeGetCommand extends SpoCommand {
17
29
  get description() {
18
30
  return 'Retrieves information about the specified list or site content type';
19
31
  }
20
- constructor() {
21
- super();
22
- _SpoContentTypeGetCommand_instances.add(this);
23
- __classPrivateFieldGet(this, _SpoContentTypeGetCommand_instances, "m", _SpoContentTypeGetCommand_initTelemetry).call(this);
24
- __classPrivateFieldGet(this, _SpoContentTypeGetCommand_instances, "m", _SpoContentTypeGetCommand_initOptions).call(this);
25
- __classPrivateFieldGet(this, _SpoContentTypeGetCommand_instances, "m", _SpoContentTypeGetCommand_initValidators).call(this);
26
- __classPrivateFieldGet(this, _SpoContentTypeGetCommand_instances, "m", _SpoContentTypeGetCommand_initTypes).call(this);
27
- __classPrivateFieldGet(this, _SpoContentTypeGetCommand_instances, "m", _SpoContentTypeGetCommand_initOptionSets).call(this);
32
+ get schema() {
33
+ return options;
34
+ }
35
+ getRefinedSchema(schema) {
36
+ return schema.refine(opts => [opts.id, opts.name].filter(x => x !== undefined).length === 1, {
37
+ error: `Specify either 'id' or 'name', but not both.`,
38
+ params: {
39
+ customCode: 'optionSet',
40
+ options: ['id', 'name']
41
+ }
42
+ });
28
43
  }
29
44
  async commandAction(logger, args) {
30
45
  let requestUrl = `${args.options.webUrl}/_api/web`;
@@ -76,45 +91,5 @@ class SpoContentTypeGetCommand extends SpoCommand {
76
91
  }
77
92
  }
78
93
  }
79
- _SpoContentTypeGetCommand_instances = new WeakSet(), _SpoContentTypeGetCommand_initTelemetry = function _SpoContentTypeGetCommand_initTelemetry() {
80
- this.telemetry.push((args) => {
81
- Object.assign(this.telemetryProperties, {
82
- listId: typeof args.options.listId !== 'undefined',
83
- listTitle: typeof args.options.listTitle !== 'undefined',
84
- listUrl: typeof args.options.listUrl !== 'undefined',
85
- id: typeof args.options.id !== 'undefined',
86
- name: typeof args.options.name !== 'undefined'
87
- });
88
- });
89
- }, _SpoContentTypeGetCommand_initOptions = function _SpoContentTypeGetCommand_initOptions() {
90
- this.options.unshift({
91
- option: '-u, --webUrl <webUrl>'
92
- }, {
93
- option: '-l, --listTitle [listTitle]'
94
- }, {
95
- option: '--listId [listId]'
96
- }, {
97
- option: '--listUrl [listUrl]'
98
- }, {
99
- option: '-i, --id [id]'
100
- }, {
101
- option: '-n, --name [name]'
102
- });
103
- }, _SpoContentTypeGetCommand_initValidators = function _SpoContentTypeGetCommand_initValidators() {
104
- this.validators.push(async (args) => {
105
- const isValidSharePointUrl = validation.isValidSharePointUrl(args.options.webUrl);
106
- if (isValidSharePointUrl !== true) {
107
- return isValidSharePointUrl;
108
- }
109
- if (args.options.listId && !validation.isValidGuid(args.options.listId)) {
110
- return `${args.options.listId} is not a valid GUID`;
111
- }
112
- return true;
113
- });
114
- }, _SpoContentTypeGetCommand_initTypes = function _SpoContentTypeGetCommand_initTypes() {
115
- this.types.string.push('id', 'i');
116
- }, _SpoContentTypeGetCommand_initOptionSets = function _SpoContentTypeGetCommand_initOptionSets() {
117
- this.optionSets.push({ options: ['id', 'name'] });
118
- };
119
94
  export default new SpoContentTypeGetCommand();
120
95
  //# sourceMappingURL=contenttype-get.js.map
@@ -1,14 +1,19 @@
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 _SpoContentTypeListCommand_instances, _SpoContentTypeListCommand_initTelemetry, _SpoContentTypeListCommand_initOptions, _SpoContentTypeListCommand_initValidators, _SpoContentTypeListCommand_initTypes;
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 SpoCommand from '../../../base/SpoCommand.js';
11
7
  import commands from '../../commands.js';
8
+ export const options = z.strictObject({
9
+ ...globalOptionsZod.shape,
10
+ webUrl: z.string()
11
+ .refine(url => validation.isValidSharePointUrl(url) === true, {
12
+ error: e => `'${e.input}' is not a valid SharePoint Online site URL.`
13
+ })
14
+ .alias('u'),
15
+ category: z.string().optional().alias('c')
16
+ });
12
17
  class SpoContentTypeListCommand extends SpoCommand {
13
18
  get name() {
14
19
  return commands.CONTENTTYPE_LIST;
@@ -19,13 +24,8 @@ class SpoContentTypeListCommand extends SpoCommand {
19
24
  defaultProperties() {
20
25
  return ['StringId', 'Name', 'Hidden', 'ReadOnly', 'Sealed'];
21
26
  }
22
- constructor() {
23
- super();
24
- _SpoContentTypeListCommand_instances.add(this);
25
- __classPrivateFieldGet(this, _SpoContentTypeListCommand_instances, "m", _SpoContentTypeListCommand_initTelemetry).call(this);
26
- __classPrivateFieldGet(this, _SpoContentTypeListCommand_instances, "m", _SpoContentTypeListCommand_initOptions).call(this);
27
- __classPrivateFieldGet(this, _SpoContentTypeListCommand_instances, "m", _SpoContentTypeListCommand_initValidators).call(this);
28
- __classPrivateFieldGet(this, _SpoContentTypeListCommand_instances, "m", _SpoContentTypeListCommand_initTypes).call(this);
27
+ get schema() {
28
+ return options;
29
29
  }
30
30
  async commandAction(logger, args) {
31
31
  try {
@@ -41,22 +41,5 @@ class SpoContentTypeListCommand extends SpoCommand {
41
41
  }
42
42
  }
43
43
  }
44
- _SpoContentTypeListCommand_instances = new WeakSet(), _SpoContentTypeListCommand_initTelemetry = function _SpoContentTypeListCommand_initTelemetry() {
45
- this.telemetry.push((args) => {
46
- Object.assign(this.telemetryProperties, {
47
- category: typeof args.options.category !== 'undefined'
48
- });
49
- });
50
- }, _SpoContentTypeListCommand_initOptions = function _SpoContentTypeListCommand_initOptions() {
51
- this.options.unshift({
52
- option: '-u, --webUrl <webUrl>'
53
- }, {
54
- option: '-c, --category [category]'
55
- });
56
- }, _SpoContentTypeListCommand_initValidators = function _SpoContentTypeListCommand_initValidators() {
57
- this.validators.push(async (args) => validation.isValidSharePointUrl(args.options.webUrl));
58
- }, _SpoContentTypeListCommand_initTypes = function _SpoContentTypeListCommand_initTypes() {
59
- this.types.string.push('webUrl', 'category');
60
- };
61
44
  export default new SpoContentTypeListCommand();
62
45
  //# sourceMappingURL=contenttype-list.js.map