@pnp/cli-microsoft365 12.0.0-beta.1752794 → 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 (216) hide show
  1. package/allCommands.json +1 -1
  2. package/allCommandsFull.json +1 -1
  3. package/dist/Auth.js +19 -2
  4. package/dist/cli/cli.js +3 -0
  5. package/dist/config.js +1 -0
  6. package/dist/m365/cli/commands/cli-consent.js +9 -2
  7. package/dist/m365/entra/commands/agent/agent-blueprint-list.js +52 -0
  8. package/dist/m365/entra/commands/m365group/m365group-add.js +52 -97
  9. package/dist/m365/entra/commands/m365group/m365group-conversation-list.js +20 -33
  10. package/dist/m365/entra/commands/m365group/m365group-conversation-post-list.js +20 -39
  11. package/dist/m365/entra/commands/m365group/m365group-get.js +20 -41
  12. package/dist/m365/entra/commands/m365group/m365group-list.js +11 -31
  13. package/dist/m365/entra/commands/m365group/m365group-recyclebinitem-clear.js +8 -22
  14. package/dist/m365/entra/commands/m365group/m365group-recyclebinitem-list.js +9 -25
  15. package/dist/m365/entra/commands/m365group/m365group-recyclebinitem-remove.js +21 -43
  16. package/dist/m365/entra/commands/m365group/m365group-recyclebinitem-restore.js +21 -41
  17. package/dist/m365/entra/commands/m365group/m365group-remove.js +25 -46
  18. package/dist/m365/entra/commands/m365group/m365group-renew.js +19 -32
  19. package/dist/m365/entra/commands/m365group/m365group-set.js +86 -141
  20. package/dist/m365/entra/commands/m365group/m365group-teamify.js +20 -43
  21. package/dist/m365/entra/commands/m365group/m365group-user-add.js +44 -77
  22. package/dist/m365/entra/commands/m365group/m365group-user-list.js +28 -55
  23. package/dist/m365/entra/commands/m365group/m365group-user-remove.js +37 -74
  24. package/dist/m365/entra/commands/m365group/m365group-user-set.js +45 -77
  25. package/dist/m365/entra/commands.js +1 -0
  26. package/dist/m365/graph/commands/schemaextension/schemaextension-list.js +14 -16
  27. package/dist/m365/outlook/commands/calendargroup/calendargroup-add.js +97 -0
  28. package/dist/m365/outlook/commands/event/event-add.js +324 -0
  29. package/dist/m365/outlook/commands.js +2 -0
  30. package/dist/m365/spe/commands/container/container-permission-add.js +114 -0
  31. package/dist/m365/spe/commands/container/container-permission-remove.js +94 -0
  32. package/dist/m365/spe/commands/container/container-permission-set.js +90 -0
  33. package/dist/m365/spe/commands.js +3 -0
  34. package/dist/m365/spfx/commands/SpfxCompatibilityMatrix.js +15 -0
  35. package/dist/m365/spfx/commands/project/project-doctor/doctor-1.24.0.js +19 -0
  36. package/dist/m365/spfx/commands/project/project-doctor.js +2 -1
  37. package/dist/m365/spfx/commands/project/project-upgrade/rules/FN012021_TSC_excludeDirectories.js +43 -0
  38. package/dist/m365/spfx/commands/project/project-upgrade/rules/FN027002_OVERRIDES_qs.js +33 -0
  39. package/dist/m365/spfx/commands/project/project-upgrade/rules/FN027003_OVERRIDES_uuid.js +33 -0
  40. package/dist/m365/spfx/commands/project/project-upgrade/upgrade-1.24.0.js +77 -0
  41. package/dist/m365/spfx/commands/project/project-upgrade.js +2 -1
  42. package/dist/m365/spo/commands/commandset/commandset-add.js +17 -59
  43. package/dist/m365/spo/commands/commandset/commandset-get.js +24 -62
  44. package/dist/m365/spo/commands/commandset/commandset-list.js +11 -34
  45. package/dist/m365/spo/commands/commandset/commandset-remove.js +21 -54
  46. package/dist/m365/spo/commands/commandset/commandset-set.js +30 -83
  47. package/dist/m365/spo/commands/contenttype/contenttype-add.js +22 -51
  48. package/dist/m365/spo/commands/contenttype/contenttype-field-list.js +38 -62
  49. package/dist/m365/spo/commands/contenttype/contenttype-field-remove.js +25 -54
  50. package/dist/m365/spo/commands/contenttype/contenttype-field-set.js +20 -43
  51. package/dist/m365/spo/commands/contenttype/contenttype-get.js +29 -54
  52. package/dist/m365/spo/commands/contenttype/contenttype-list.js +13 -30
  53. package/dist/m365/spo/commands/contenttype/contenttype-remove.js +24 -39
  54. package/dist/m365/spo/commands/contenttype/contenttype-set.js +42 -63
  55. package/dist/m365/spo/commands/contenttype/contenttype-sync.js +37 -59
  56. package/dist/m365/spo/commands/contenttypehub/contenttypehub-get.js +5 -0
  57. package/dist/m365/spo/commands/customaction/customaction-add.js +124 -145
  58. package/dist/m365/spo/commands/customaction/customaction-clear.js +12 -43
  59. package/dist/m365/spo/commands/customaction/customaction-get.js +28 -59
  60. package/dist/m365/spo/commands/customaction/customaction-list.js +12 -42
  61. package/dist/m365/spo/commands/customaction/customaction-remove.js +26 -54
  62. package/dist/m365/spo/commands/customaction/customaction-set.js +75 -132
  63. package/dist/m365/spo/commands/externaluser/externaluser-list.js +5 -14
  64. package/dist/m365/spo/commands/knowledgehub/knowledgehub-get.js +5 -0
  65. package/dist/m365/spo/commands/knowledgehub/knowledgehub-remove.js +8 -22
  66. package/dist/m365/spo/commands/knowledgehub/knowledgehub-set.js +10 -18
  67. package/dist/m365/spo/commands/listitem/listitem-add.js +27 -55
  68. package/dist/m365/spo/commands/listitem/listitem-attachment-add.js +30 -58
  69. package/dist/m365/spo/commands/listitem/listitem-attachment-get.js +27 -52
  70. package/dist/m365/spo/commands/listitem/listitem-attachment-list.js +26 -50
  71. package/dist/m365/spo/commands/listitem/listitem-attachment-remove.js +28 -55
  72. package/dist/m365/spo/commands/listitem/listitem-attachment-set.js +30 -57
  73. package/dist/m365/spo/commands/listitem/listitem-batch-add.js +36 -58
  74. package/dist/m365/spo/commands/listitem/listitem-batch-remove.js +68 -92
  75. package/dist/m365/spo/commands/listitem/listitem-batch-set.js +37 -57
  76. package/dist/m365/spo/commands/listitem/listitem-get.js +45 -68
  77. package/dist/m365/spo/commands/listitem/listitem-isrecord.js +31 -55
  78. package/dist/m365/spo/commands/listitem/listitem-list.js +47 -81
  79. package/dist/m365/spo/commands/listitem/listitem-record-declare.js +37 -60
  80. package/dist/m365/spo/commands/listitem/listitem-record-lock.js +30 -52
  81. package/dist/m365/spo/commands/listitem/listitem-record-undeclare.js +31 -52
  82. package/dist/m365/spo/commands/listitem/listitem-record-unlock.js +30 -52
  83. package/dist/m365/spo/commands/listitem/listitem-remove.js +33 -61
  84. package/dist/m365/spo/commands/listitem/listitem-retentionlabel-ensure.js +46 -67
  85. package/dist/m365/spo/commands/listitem/listitem-retentionlabel-remove.js +33 -56
  86. package/dist/m365/spo/commands/listitem/listitem-roleassignment-add.js +55 -98
  87. package/dist/m365/spo/commands/listitem/listitem-roleassignment-remove.js +48 -74
  88. package/dist/m365/spo/commands/listitem/listitem-roleinheritance-break.js +33 -56
  89. package/dist/m365/spo/commands/listitem/listitem-roleinheritance-reset.js +31 -53
  90. package/dist/m365/spo/commands/listitem/listitem-set.js +33 -58
  91. package/dist/m365/spo/commands/navigation/navigation-node-add.js +74 -120
  92. package/dist/m365/spo/commands/navigation/navigation-node-get.js +4 -13
  93. package/dist/m365/spo/commands/navigation/navigation-node-list.js +1 -1
  94. package/dist/m365/spo/commands/navigation/navigation-node-remove.js +13 -47
  95. package/dist/m365/spo/commands/navigation/navigation-node-set.js +53 -114
  96. package/dist/m365/spo/commands/orgassetslibrary/orgassetslibrary-list.js +1 -1
  97. package/dist/m365/spo/commands/page/page-column-list.js +7 -8
  98. package/dist/m365/spo/commands/page/page-section-list.js +15 -17
  99. package/dist/m365/spo/commands/page/page-unpublish.js +53 -0
  100. package/dist/m365/spo/commands/sitescript/sitescript-add.js +22 -37
  101. package/dist/m365/spo/commands/sitescript/sitescript-get.js +9 -26
  102. package/dist/m365/spo/commands/sitescript/sitescript-list.js +5 -0
  103. package/dist/m365/spo/commands/sitescript/sitescript-remove.js +9 -33
  104. package/dist/m365/spo/commands/sitescript/sitescript-set.js +29 -56
  105. package/dist/m365/spo/commands/spo-search.js +43 -116
  106. package/dist/m365/spo/commands/tenant/tenant-applicationcustomizer-add.js +8 -1
  107. package/dist/m365/spo/commands/tenant/tenant-commandset-add.js +8 -1
  108. package/dist/m365/spo/commands/term/term-group-list.js +7 -8
  109. package/dist/m365/spo/commands/term/term-set-list.js +6 -9
  110. package/dist/m365/spo/commands.js +1 -0
  111. package/dist/m365/spp/commands/contentcenter/contentcenter-list.js +5 -0
  112. package/dist/m365/spp/commands/model/model-get.js +25 -45
  113. package/dist/m365/spp/commands/model/model-list.js +12 -23
  114. package/dist/m365/spp/commands/model/model-remove.js +25 -45
  115. package/dist/m365/teams/commands/app/app-install.js +35 -44
  116. package/dist/m365/teams/commands/app/app-list.js +8 -33
  117. package/dist/m365/teams/commands/app/app-publish.js +21 -27
  118. package/dist/m365/teams/commands/app/app-remove.js +22 -39
  119. package/dist/m365/teams/commands/app/app-uninstall.js +12 -34
  120. package/dist/m365/teams/commands/app/app-update.js +35 -45
  121. package/dist/m365/teams/commands/funsettings/funsettings-list.js +12 -23
  122. package/dist/m365/teams/commands/funsettings/funsettings-set.js +18 -54
  123. package/dist/m365/teams/commands/guestsettings/guestsettings-list.js +12 -23
  124. package/dist/m365/teams/commands/guestsettings/guestsettings-set.js +15 -40
  125. package/dist/m365/teams/commands/meeting/meeting-add.js +57 -68
  126. package/dist/m365/teams/commands/meeting/meeting-attendancereport-get.js +33 -58
  127. package/dist/m365/teams/commands/meeting/meeting-attendancereport-list.js +14 -38
  128. package/dist/m365/teams/commands/meeting/meeting-get.js +14 -38
  129. package/dist/m365/teams/commands/meeting/meeting-list.js +34 -59
  130. package/dist/m365/teams/commands/meeting/meeting-transcript-get.js +34 -58
  131. package/dist/m365/teams/commands/meeting/meeting-transcript-list.js +29 -50
  132. package/dist/m365/teams/commands/membersettings/membersettings-list.js +12 -23
  133. package/dist/m365/teams/commands/membersettings/membersettings-set.js +18 -49
  134. package/dist/m365/teams/commands/message/message-get.js +19 -30
  135. package/dist/m365/teams/commands/message/message-list.js +26 -43
  136. package/dist/m365/teams/commands/message/message-remove.js +43 -58
  137. package/dist/m365/teams/commands/message/message-reply-list.js +19 -30
  138. package/dist/m365/teams/commands/message/message-restore.js +40 -50
  139. package/dist/m365/teams/commands/message/message-send.js +19 -30
  140. package/dist/m365/teams/commands/messagingsettings/messagingsettings-list.js +12 -23
  141. package/dist/m365/teams/commands/messagingsettings/messagingsettings-set.js +18 -60
  142. package/dist/m365/teams/commands/report/report-deviceusagedistributionusercounts.js +10 -0
  143. package/dist/m365/teams/commands/report/report-deviceusageusercounts.js +10 -0
  144. package/dist/m365/teams/commands/report/report-deviceusageuserdetail.js +22 -0
  145. package/dist/m365/teams/commands/report/report-directroutingcalls.js +19 -39
  146. package/dist/m365/teams/commands/report/report-pstncalls.js +19 -39
  147. package/dist/m365/teams/commands/report/report-useractivitycounts.js +10 -0
  148. package/dist/m365/teams/commands/report/report-useractivityusercounts.js +10 -0
  149. package/dist/m365/teams/commands/report/report-useractivityuserdetail.js +22 -0
  150. package/dist/m365/teams/commands/tab/tab-add.js +23 -49
  151. package/dist/m365/teams/commands/tab/tab-get.js +55 -56
  152. package/dist/m365/teams/commands/tab/tab-list.js +17 -28
  153. package/dist/m365/teams/commands/tab/tab-remove.js +23 -42
  154. package/dist/m365/teams/commands/team/team-add.js +76 -114
  155. package/dist/m365/teams/commands/team/team-app-list.js +23 -36
  156. package/dist/m365/teams/commands/team/team-archive.js +24 -39
  157. package/dist/m365/teams/commands/team/team-clone.js +28 -62
  158. package/dist/m365/teams/commands/team/team-get.js +23 -36
  159. package/dist/m365/teams/commands/team/team-list.js +43 -57
  160. package/dist/m365/teams/commands/team/team-remove.js +24 -37
  161. package/dist/m365/teams/commands/team/team-set.js +23 -52
  162. package/dist/m365/teams/commands/team/team-unarchive.js +23 -28
  163. package/dist/m365/teams/commands/user/user-app-add.js +40 -49
  164. package/dist/m365/teams/commands/user/user-app-list.js +26 -39
  165. package/dist/m365/teams/commands/user/user-app-remove.js +37 -49
  166. package/dist/m365/teams/commands/user/user-app-upgrade.js +36 -52
  167. package/dist/m365/teams/commands/user/user-list.js +17 -39
  168. package/dist/m365/tenant/commands/report/report-activeusercounts.js +2 -1
  169. package/dist/m365/tenant/commands/report/report-activeuserdetail.js +2 -1
  170. package/dist/m365/tenant/commands/report/report-office365activationcounts.js +9 -0
  171. package/dist/m365/tenant/commands/report/report-office365activationsusercounts.js +9 -0
  172. package/dist/m365/tenant/commands/report/report-office365activationsuserdetail.js +9 -0
  173. package/dist/m365/tenant/commands/report/report-servicesusercounts.js +2 -1
  174. package/dist/m365/tenant/commands/report/report-settings-get.js +5 -0
  175. package/dist/m365/tenant/commands/serviceannouncement/serviceannouncement-health-get.js +9 -20
  176. package/dist/m365/tenant/commands/serviceannouncement/serviceannouncement-health-list.js +8 -20
  177. package/dist/m365/tenant/commands/serviceannouncement/serviceannouncement-healthissue-get.js +8 -15
  178. package/dist/m365/tenant/commands/serviceannouncement/serviceannouncement-healthissue-list.js +8 -15
  179. package/dist/m365/tenant/commands/serviceannouncement/serviceannouncement-message-get.js +12 -26
  180. package/dist/m365/tenant/commands/serviceannouncement/serviceannouncement-message-list.js +8 -22
  181. package/dist/utils/calendar.js +1 -1
  182. package/dist/utils/formatting.js +16 -0
  183. package/dist/utils/pid.js +7 -16
  184. package/dist/utils/spe.js +1 -1
  185. package/dist/utils/spo.js +39 -0
  186. package/dist/utils/validation.js +24 -0
  187. package/dist/utils/zod.js +17 -7
  188. package/docs/docs/cmd/entra/agent/agent-blueprint-list.mdx +175 -0
  189. package/docs/docs/cmd/login.mdx +15 -2
  190. package/docs/docs/cmd/outlook/calendargroup/calendargroup-add.mdx +126 -0
  191. package/docs/docs/cmd/outlook/event/event-add.mdx +390 -0
  192. package/docs/docs/cmd/spe/container/container-add.mdx +0 -8
  193. package/docs/docs/cmd/spe/container/container-list.mdx +0 -8
  194. package/docs/docs/cmd/spe/container/container-permission-add.mdx +140 -0
  195. package/docs/docs/cmd/spe/container/container-permission-remove.mdx +78 -0
  196. package/docs/docs/cmd/spe/container/container-permission-set.mdx +78 -0
  197. package/docs/docs/cmd/spe/container/container-recyclebinitem-list.mdx +0 -8
  198. package/docs/docs/cmd/spe/container/container-recyclebinitem-restore.mdx +0 -8
  199. package/docs/docs/cmd/spe/container/container-remove.mdx +0 -8
  200. package/docs/docs/cmd/spe/containertype/containertype-add.mdx +1 -1
  201. package/docs/docs/cmd/spfx/project/project-upgrade.mdx +1 -1
  202. package/docs/docs/cmd/spo/externaluser/externaluser-list.mdx +17 -30
  203. package/docs/docs/cmd/spo/navigation/navigation-node-add.mdx +45 -30
  204. package/docs/docs/cmd/spo/navigation/navigation-node-get.mdx +64 -42
  205. package/docs/docs/cmd/spo/navigation/navigation-node-set.mdx +10 -8
  206. package/docs/docs/cmd/spo/orgassetslibrary/orgassetslibrary-list.mdx +0 -21
  207. package/docs/docs/cmd/spo/page/page-unpublish.mdx +63 -0
  208. package/docs/docs/cmd/teams/tab/tab-add.mdx +19 -0
  209. package/docs/docs/cmd/teams/tab/tab-get.mdx +19 -0
  210. package/docs/docs/cmd/teams/tab/tab-list.mdx +19 -0
  211. package/docs/docs/cmd/teams/tab/tab-remove.mdx +21 -0
  212. package/docs/docs/cmd/viva/engage/engage-message-add.mdx +17 -0
  213. package/docs/docs/cmd/viva/engage/engage-message-get.mdx +17 -0
  214. package/docs/docs/cmd/viva/engage/engage-message-list.mdx +17 -0
  215. package/docs/docs/cmd/viva/engage/engage-message-remove.mdx +19 -0
  216. package/package.json +4 -6
@@ -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 _TeamsAppUninstallCommand_instances, _TeamsAppUninstallCommand_initTelemetry, _TeamsAppUninstallCommand_initOptions, _TeamsAppUninstallCommand_initValidators;
7
1
  import { cli } from '../../../../cli/cli.js';
8
2
  import request from '../../../../request.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
+ id: z.string(),
11
+ teamId: z.string().refine(val => validation.isValidGuid(val), {
12
+ message: 'The value must be a valid GUID.'
13
+ }),
14
+ force: z.boolean().optional().alias('f')
15
+ });
12
16
  class TeamsAppUninstallCommand extends GraphCommand {
13
17
  get name() {
14
18
  return commands.APP_UNINSTALL;
@@ -16,12 +20,8 @@ class TeamsAppUninstallCommand extends GraphCommand {
16
20
  get description() {
17
21
  return 'Uninstalls an app from a Microsoft Team team';
18
22
  }
19
- constructor() {
20
- super();
21
- _TeamsAppUninstallCommand_instances.add(this);
22
- __classPrivateFieldGet(this, _TeamsAppUninstallCommand_instances, "m", _TeamsAppUninstallCommand_initTelemetry).call(this);
23
- __classPrivateFieldGet(this, _TeamsAppUninstallCommand_instances, "m", _TeamsAppUninstallCommand_initOptions).call(this);
24
- __classPrivateFieldGet(this, _TeamsAppUninstallCommand_instances, "m", _TeamsAppUninstallCommand_initValidators).call(this);
23
+ get schema() {
24
+ return options;
25
25
  }
26
26
  async commandAction(logger, args) {
27
27
  const uninstallApp = async () => {
@@ -52,27 +52,5 @@ class TeamsAppUninstallCommand extends GraphCommand {
52
52
  }
53
53
  }
54
54
  }
55
- _TeamsAppUninstallCommand_instances = new WeakSet(), _TeamsAppUninstallCommand_initTelemetry = function _TeamsAppUninstallCommand_initTelemetry() {
56
- this.telemetry.push((args) => {
57
- Object.assign(this.telemetryProperties, {
58
- force: args.options.force || false
59
- });
60
- });
61
- }, _TeamsAppUninstallCommand_initOptions = function _TeamsAppUninstallCommand_initOptions() {
62
- this.options.unshift({
63
- option: '--id <id>'
64
- }, {
65
- option: '--teamId <teamId>'
66
- }, {
67
- option: '-f, --force'
68
- });
69
- }, _TeamsAppUninstallCommand_initValidators = function _TeamsAppUninstallCommand_initValidators() {
70
- this.validators.push(async (args) => {
71
- if (!validation.isValidGuid(args.options.teamId)) {
72
- return `${args.options.teamId} is not a valid GUID`;
73
- }
74
- return true;
75
- });
76
- };
77
55
  export default new TeamsAppUninstallCommand();
78
56
  //# sourceMappingURL=app-uninstall.js.map
@@ -1,9 +1,3 @@
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 _TeamsAppUpdateCommand_instances, _TeamsAppUpdateCommand_initTelemetry, _TeamsAppUpdateCommand_initOptions, _TeamsAppUpdateCommand_initValidators, _TeamsAppUpdateCommand_initOptionSets;
7
1
  import fs from 'fs';
8
2
  import path from 'path';
9
3
  import request from '../../../../request.js';
@@ -12,6 +6,29 @@ import { validation } from '../../../../utils/validation.js';
12
6
  import GraphCommand from '../../../base/GraphCommand.js';
13
7
  import commands from '../../commands.js';
14
8
  import { cli } from '../../../../cli/cli.js';
9
+ import { globalOptionsZod } from '../../../../Command.js';
10
+ import { z } from 'zod';
11
+ export const options = z.strictObject({
12
+ ...globalOptionsZod.shape,
13
+ id: z.string().refine(val => validation.isValidGuid(val), {
14
+ message: 'The value must be a valid GUID.'
15
+ }).optional().alias('i'),
16
+ name: z.string().optional().alias('n'),
17
+ filePath: z.string()
18
+ .refine(val => {
19
+ const fullPath = path.resolve(val);
20
+ if (!fs.existsSync(fullPath)) {
21
+ return false;
22
+ }
23
+ if (fs.lstatSync(fullPath).isDirectory()) {
24
+ return false;
25
+ }
26
+ return true;
27
+ }, {
28
+ message: 'Specified file does not exist or points to a directory.'
29
+ })
30
+ .alias('p')
31
+ });
15
32
  class TeamsAppUpdateCommand extends GraphCommand {
16
33
  get name() {
17
34
  return commands.APP_UPDATE;
@@ -19,13 +36,18 @@ class TeamsAppUpdateCommand extends GraphCommand {
19
36
  get description() {
20
37
  return 'Updates Teams app in the organization\'s app catalog';
21
38
  }
22
- constructor() {
23
- super();
24
- _TeamsAppUpdateCommand_instances.add(this);
25
- __classPrivateFieldGet(this, _TeamsAppUpdateCommand_instances, "m", _TeamsAppUpdateCommand_initTelemetry).call(this);
26
- __classPrivateFieldGet(this, _TeamsAppUpdateCommand_instances, "m", _TeamsAppUpdateCommand_initOptions).call(this);
27
- __classPrivateFieldGet(this, _TeamsAppUpdateCommand_instances, "m", _TeamsAppUpdateCommand_initValidators).call(this);
28
- __classPrivateFieldGet(this, _TeamsAppUpdateCommand_instances, "m", _TeamsAppUpdateCommand_initOptionSets).call(this);
39
+ get schema() {
40
+ return options;
41
+ }
42
+ getRefinedSchema(schema) {
43
+ return schema
44
+ .refine(opts => [opts.id, opts.name].filter(x => x !== undefined).length === 1, {
45
+ message: 'Specify either id or name, but not both.',
46
+ params: {
47
+ customCode: 'optionSet',
48
+ options: ['id', 'name']
49
+ }
50
+ });
29
51
  }
30
52
  async commandAction(logger, args) {
31
53
  const { filePath } = args.options;
@@ -72,37 +94,5 @@ class TeamsAppUpdateCommand extends GraphCommand {
72
94
  return app.id;
73
95
  }
74
96
  }
75
- _TeamsAppUpdateCommand_instances = new WeakSet(), _TeamsAppUpdateCommand_initTelemetry = function _TeamsAppUpdateCommand_initTelemetry() {
76
- this.telemetry.push((args) => {
77
- Object.assign(this.telemetryProperties, {
78
- id: typeof args.options.id !== 'undefined',
79
- name: typeof args.options.name !== 'undefined'
80
- });
81
- });
82
- }, _TeamsAppUpdateCommand_initOptions = function _TeamsAppUpdateCommand_initOptions() {
83
- this.options.unshift({
84
- option: '-i, --id [id]'
85
- }, {
86
- option: '-n, --name [name]'
87
- }, {
88
- option: '-p, --filePath <filePath>'
89
- });
90
- }, _TeamsAppUpdateCommand_initValidators = function _TeamsAppUpdateCommand_initValidators() {
91
- this.validators.push(async (args) => {
92
- if (args.options.id && !validation.isValidGuid(args.options.id)) {
93
- return `${args.options.id} is not a valid GUID`;
94
- }
95
- const fullPath = path.resolve(args.options.filePath);
96
- if (!fs.existsSync(fullPath)) {
97
- return `File '${fullPath}' not found`;
98
- }
99
- if (fs.lstatSync(fullPath).isDirectory()) {
100
- return `Path '${fullPath}' points to a directory`;
101
- }
102
- return true;
103
- });
104
- }, _TeamsAppUpdateCommand_initOptionSets = function _TeamsAppUpdateCommand_initOptionSets() {
105
- this.optionSets.push({ options: ['id', 'name'] });
106
- };
107
97
  export default new TeamsAppUpdateCommand();
108
98
  //# sourceMappingURL=app-update.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 _TeamsFunSettingsListCommand_instances, _TeamsFunSettingsListCommand_initOptions, _TeamsFunSettingsListCommand_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 TeamsFunSettingsListCommand extends GraphCommand {
13
17
  get name() {
14
18
  return commands.FUNSETTINGS_LIST;
@@ -16,11 +20,8 @@ class TeamsFunSettingsListCommand extends GraphCommand {
16
20
  get description() {
17
21
  return 'Lists fun settings for the specified Microsoft Teams team';
18
22
  }
19
- constructor() {
20
- super();
21
- _TeamsFunSettingsListCommand_instances.add(this);
22
- __classPrivateFieldGet(this, _TeamsFunSettingsListCommand_instances, "m", _TeamsFunSettingsListCommand_initOptions).call(this);
23
- __classPrivateFieldGet(this, _TeamsFunSettingsListCommand_instances, "m", _TeamsFunSettingsListCommand_initValidators).call(this);
23
+ get schema() {
24
+ return options;
24
25
  }
25
26
  async commandAction(logger, args) {
26
27
  if (this.verbose) {
@@ -42,17 +43,5 @@ class TeamsFunSettingsListCommand extends GraphCommand {
42
43
  }
43
44
  }
44
45
  }
45
- _TeamsFunSettingsListCommand_instances = new WeakSet(), _TeamsFunSettingsListCommand_initOptions = function _TeamsFunSettingsListCommand_initOptions() {
46
- this.options.unshift({
47
- option: '-i, --teamId <teamId>'
48
- });
49
- }, _TeamsFunSettingsListCommand_initValidators = function _TeamsFunSettingsListCommand_initValidators() {
50
- this.validators.push(async (args) => {
51
- if (!validation.isValidGuid(args.options.teamId)) {
52
- return `${args.options.teamId} is not a valid GUID`;
53
- }
54
- return true;
55
- });
56
- };
57
46
  export default new TeamsFunSettingsListCommand();
58
47
  //# sourceMappingURL=funsettings-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 _TeamsFunSettingsSetCommand_instances, _a, _TeamsFunSettingsSetCommand_initTelemetry, _TeamsFunSettingsSetCommand_initOptions, _TeamsFunSettingsSetCommand_initTypes, _TeamsFunSettingsSetCommand_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
+ import { zod } from '../../../../utils/zod.js';
9
+ export const options = z.strictObject({
10
+ ...globalOptionsZod.shape,
11
+ teamId: z.string()
12
+ .refine(val => validation.isValidGuid(val), {
13
+ message: 'teamId must be a valid GUID'
14
+ })
15
+ .alias('i'),
16
+ allowGiphy: z.boolean().optional(),
17
+ giphyContentRating: zod.coercedEnum({ Strict: 'strict', Moderate: 'moderate' }).optional(),
18
+ allowStickersAndMemes: z.boolean().optional(),
19
+ allowCustomMemes: z.boolean().optional()
20
+ });
12
21
  class TeamsFunSettingsSetCommand extends GraphCommand {
13
22
  get name() {
14
23
  return commands.FUNSETTINGS_SET;
@@ -16,13 +25,8 @@ class TeamsFunSettingsSetCommand extends GraphCommand {
16
25
  get description() {
17
26
  return 'Updates fun settings of a Microsoft Teams team';
18
27
  }
19
- constructor() {
20
- super();
21
- _TeamsFunSettingsSetCommand_instances.add(this);
22
- __classPrivateFieldGet(this, _TeamsFunSettingsSetCommand_instances, "m", _TeamsFunSettingsSetCommand_initTelemetry).call(this);
23
- __classPrivateFieldGet(this, _TeamsFunSettingsSetCommand_instances, "m", _TeamsFunSettingsSetCommand_initOptions).call(this);
24
- __classPrivateFieldGet(this, _TeamsFunSettingsSetCommand_instances, "m", _TeamsFunSettingsSetCommand_initTypes).call(this);
25
- __classPrivateFieldGet(this, _TeamsFunSettingsSetCommand_instances, "m", _TeamsFunSettingsSetCommand_initValidators).call(this);
28
+ get schema() {
29
+ return options;
26
30
  }
27
31
  async commandAction(logger, args) {
28
32
  try {
@@ -32,7 +36,7 @@ class TeamsFunSettingsSetCommand extends GraphCommand {
32
36
  const data = {
33
37
  funSettings: {}
34
38
  };
35
- _a.booleanProps.forEach(p => {
39
+ TeamsFunSettingsSetCommand.booleanProps.forEach(p => {
36
40
  if (typeof args.options[p] !== 'undefined') {
37
41
  data.funSettings[p] = args.options[p];
38
42
  }
@@ -55,46 +59,6 @@ class TeamsFunSettingsSetCommand extends GraphCommand {
55
59
  }
56
60
  }
57
61
  }
58
- _a = TeamsFunSettingsSetCommand, _TeamsFunSettingsSetCommand_instances = new WeakSet(), _TeamsFunSettingsSetCommand_initTelemetry = function _TeamsFunSettingsSetCommand_initTelemetry() {
59
- this.telemetry.push((args) => {
60
- Object.assign(this.telemetryProperties, {
61
- giphyContentRating: args.options.giphyContentRating
62
- });
63
- _a.booleanProps.forEach(p => {
64
- this.telemetryProperties[p] = args.options[p];
65
- });
66
- });
67
- }, _TeamsFunSettingsSetCommand_initOptions = function _TeamsFunSettingsSetCommand_initOptions() {
68
- this.options.unshift({
69
- option: '-i, --teamId <teamId>'
70
- }, {
71
- option: '--allowGiphy [allowGiphy]',
72
- autocomplete: ['true', 'false']
73
- }, {
74
- option: '--giphyContentRating [giphyContentRating]'
75
- }, {
76
- option: '--allowStickersAndMemes [allowStickersAndMemes]',
77
- autocomplete: ['true', 'false']
78
- }, {
79
- option: '--allowCustomMemes [allowCustomMemes]',
80
- autocomplete: ['true', 'false']
81
- });
82
- }, _TeamsFunSettingsSetCommand_initTypes = function _TeamsFunSettingsSetCommand_initTypes() {
83
- this.types.boolean.push('allowGiphy', 'allowStickersAndMemes', 'allowCustomMemes');
84
- }, _TeamsFunSettingsSetCommand_initValidators = function _TeamsFunSettingsSetCommand_initValidators() {
85
- this.validators.push(async (args) => {
86
- if (!validation.isValidGuid(args.options.teamId)) {
87
- return `${args.options.teamId} is not a valid GUID`;
88
- }
89
- if (args.options.giphyContentRating) {
90
- const giphyContentRating = args.options.giphyContentRating.toLowerCase();
91
- if (giphyContentRating !== 'strict' && giphyContentRating !== 'moderate') {
92
- return `giphyContentRating value ${args.options.giphyContentRating} is not valid. Please specify Strict or Moderate.`;
93
- }
94
- }
95
- return true;
96
- });
97
- };
98
62
  TeamsFunSettingsSetCommand.booleanProps = [
99
63
  'allowGiphy',
100
64
  'allowStickersAndMemes',
@@ -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 _TeamsGuestSettingsListCommand_instances, _TeamsGuestSettingsListCommand_initOptions, _TeamsGuestSettingsListCommand_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 TeamsGuestSettingsListCommand extends GraphCommand {
13
17
  get name() {
14
18
  return commands.GUESTSETTINGS_LIST;
@@ -16,11 +20,8 @@ class TeamsGuestSettingsListCommand extends GraphCommand {
16
20
  get description() {
17
21
  return 'Lists guest settings for a Microsoft Teams team';
18
22
  }
19
- constructor() {
20
- super();
21
- _TeamsGuestSettingsListCommand_instances.add(this);
22
- __classPrivateFieldGet(this, _TeamsGuestSettingsListCommand_instances, "m", _TeamsGuestSettingsListCommand_initOptions).call(this);
23
- __classPrivateFieldGet(this, _TeamsGuestSettingsListCommand_instances, "m", _TeamsGuestSettingsListCommand_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 TeamsGuestSettingsListCommand extends GraphCommand {
39
40
  }
40
41
  }
41
42
  }
42
- _TeamsGuestSettingsListCommand_instances = new WeakSet(), _TeamsGuestSettingsListCommand_initOptions = function _TeamsGuestSettingsListCommand_initOptions() {
43
- this.options.unshift({
44
- option: '-i, --teamId <teamId>'
45
- });
46
- }, _TeamsGuestSettingsListCommand_initValidators = function _TeamsGuestSettingsListCommand_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 TeamsGuestSettingsListCommand();
55
44
  //# sourceMappingURL=guestsettings-list.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 _TeamsGuestSettingsSetCommand_instances, _a, _TeamsGuestSettingsSetCommand_initTelemetry, _TeamsGuestSettingsSetCommand_initOptions, _TeamsGuestSettingsSetCommand_initTypes, _TeamsGuestSettingsSetCommand_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
+ allowCreateUpdateChannels: z.boolean().optional(),
16
+ allowDeleteChannels: z.boolean().optional()
17
+ });
12
18
  class TeamsGuestSettingsSetCommand extends GraphCommand {
13
19
  get name() {
14
20
  return commands.GUESTSETTINGS_SET;
@@ -16,19 +22,14 @@ class TeamsGuestSettingsSetCommand extends GraphCommand {
16
22
  get description() {
17
23
  return 'Updates guest settings of a Microsoft Teams team';
18
24
  }
19
- constructor() {
20
- super();
21
- _TeamsGuestSettingsSetCommand_instances.add(this);
22
- __classPrivateFieldGet(this, _TeamsGuestSettingsSetCommand_instances, "m", _TeamsGuestSettingsSetCommand_initTelemetry).call(this);
23
- __classPrivateFieldGet(this, _TeamsGuestSettingsSetCommand_instances, "m", _TeamsGuestSettingsSetCommand_initOptions).call(this);
24
- __classPrivateFieldGet(this, _TeamsGuestSettingsSetCommand_instances, "m", _TeamsGuestSettingsSetCommand_initTypes).call(this);
25
- __classPrivateFieldGet(this, _TeamsGuestSettingsSetCommand_instances, "m", _TeamsGuestSettingsSetCommand_initValidators).call(this);
25
+ get schema() {
26
+ return options;
26
27
  }
27
28
  async commandAction(logger, args) {
28
29
  const data = {
29
30
  guestSettings: {}
30
31
  };
31
- _a.booleanProps.forEach(p => {
32
+ TeamsGuestSettingsSetCommand.booleanProps.forEach(p => {
32
33
  if (typeof args.options[p] !== 'undefined') {
33
34
  data.guestSettings[p] = args.options[p];
34
35
  }
@@ -49,32 +50,6 @@ class TeamsGuestSettingsSetCommand extends GraphCommand {
49
50
  }
50
51
  }
51
52
  }
52
- _a = TeamsGuestSettingsSetCommand, _TeamsGuestSettingsSetCommand_instances = new WeakSet(), _TeamsGuestSettingsSetCommand_initTelemetry = function _TeamsGuestSettingsSetCommand_initTelemetry() {
53
- this.telemetry.push((args) => {
54
- _a.booleanProps.forEach(p => {
55
- this.telemetryProperties[p] = args.options[p];
56
- });
57
- });
58
- }, _TeamsGuestSettingsSetCommand_initOptions = function _TeamsGuestSettingsSetCommand_initOptions() {
59
- this.options.unshift({
60
- option: '-i, --teamId <teamId>'
61
- }, {
62
- option: '--allowCreateUpdateChannels [allowCreateUpdateChannels]',
63
- autocomplete: ['true', 'false']
64
- }, {
65
- option: '--allowDeleteChannels [allowDeleteChannels]',
66
- autocomplete: ['true', 'false']
67
- });
68
- }, _TeamsGuestSettingsSetCommand_initTypes = function _TeamsGuestSettingsSetCommand_initTypes() {
69
- this.types.boolean.push('allowCreateUpdateChannels', 'allowDeleteChannels');
70
- }, _TeamsGuestSettingsSetCommand_initValidators = function _TeamsGuestSettingsSetCommand_initValidators() {
71
- this.validators.push(async (args) => {
72
- if (!validation.isValidGuid(args.options.teamId)) {
73
- return `${args.options.teamId} is not a valid GUID`;
74
- }
75
- return true;
76
- });
77
- };
78
53
  TeamsGuestSettingsSetCommand.booleanProps = [
79
54
  'allowCreateUpdateChannels',
80
55
  'allowDeleteChannels'
@@ -1,16 +1,54 @@
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 _TeamsMeetingAddCommand_instances, _TeamsMeetingAddCommand_initTelemetry, _TeamsMeetingAddCommand_initOptions, _TeamsMeetingAddCommand_initValidators;
7
1
  import auth from '../../../../Auth.js';
2
+ import { globalOptionsZod } from '../../../../Command.js';
3
+ import { z } from 'zod';
8
4
  import { entraUser } from '../../../../utils/entraUser.js';
9
5
  import { accessToken } from '../../../../utils/accessToken.js';
10
6
  import { validation } from '../../../../utils/validation.js';
11
7
  import GraphCommand from "../../../base/GraphCommand.js";
12
8
  import commands from '../../commands.js';
13
9
  import request from '../../../../request.js';
10
+ export const options = z.strictObject({
11
+ ...globalOptionsZod.shape,
12
+ startTime: z.string()
13
+ .refine(value => validation.isValidISODateTime(value), {
14
+ message: 'The startTime value must be a valid ISO date string.'
15
+ })
16
+ .refine(value => new Date(value) > new Date(), {
17
+ message: 'The startTime value must be in the future.'
18
+ }).optional().alias('s'),
19
+ endTime: z.string()
20
+ .refine(value => validation.isValidISODateTime(value), {
21
+ message: 'The endTime value must be a valid ISO date string.'
22
+ })
23
+ .refine(value => new Date(value) > new Date(), {
24
+ message: 'The endTime value must be in the future.'
25
+ }).optional().alias('e'),
26
+ subject: z.string().optional(),
27
+ participantUserNames: z.string()
28
+ .superRefine((value, ctx) => {
29
+ const invalidUserNames = validation.isValidUserPrincipalNameArray(value);
30
+ if (invalidUserNames !== true) {
31
+ ctx.addIssue({
32
+ code: 'custom',
33
+ message: `The following user principal names are invalid for the option 'participantUserNames': ${invalidUserNames}.`
34
+ });
35
+ }
36
+ })
37
+ .transform(value => {
38
+ const userNames = value.trim().toLowerCase();
39
+ // Command.action resolves standalone runtime tokens while they are strings.
40
+ if (userNames === '@meusername') {
41
+ return userNames;
42
+ }
43
+ return userNames.split(',').map(userName => userName.trim());
44
+ })
45
+ .optional().alias('p'),
46
+ organizerEmail: z.string()
47
+ .refine(value => validation.isValidUserPrincipalName(value), {
48
+ message: 'The organizerEmail value must be a valid email.'
49
+ }).optional(),
50
+ recordAutomatically: z.boolean().optional().alias('r')
51
+ });
14
52
  class TeamsMeetingAddCommand extends GraphCommand {
15
53
  get name() {
16
54
  return commands.MEETING_ADD;
@@ -18,12 +56,14 @@ class TeamsMeetingAddCommand extends GraphCommand {
18
56
  get description() {
19
57
  return 'Creates a new online meeting';
20
58
  }
21
- constructor() {
22
- super();
23
- _TeamsMeetingAddCommand_instances.add(this);
24
- __classPrivateFieldGet(this, _TeamsMeetingAddCommand_instances, "m", _TeamsMeetingAddCommand_initTelemetry).call(this);
25
- __classPrivateFieldGet(this, _TeamsMeetingAddCommand_instances, "m", _TeamsMeetingAddCommand_initOptions).call(this);
26
- __classPrivateFieldGet(this, _TeamsMeetingAddCommand_instances, "m", _TeamsMeetingAddCommand_initValidators).call(this);
59
+ get schema() {
60
+ return options;
61
+ }
62
+ getRefinedSchema(schema) {
63
+ return schema.refine(options => !options.startTime || !options.endTime || new Date(options.startTime) < new Date(options.endTime), {
64
+ message: 'The startTime value must be before endTime.',
65
+ path: ['startTime']
66
+ });
27
67
  }
28
68
  async commandAction(logger, args) {
29
69
  try {
@@ -61,8 +101,11 @@ class TeamsMeetingAddCommand extends GraphCommand {
61
101
  }
62
102
  const requestData = {};
63
103
  if (options.participantUserNames) {
64
- const attendees = options.participantUserNames.trim().toLowerCase().split(',').map(p => ({
65
- upn: p.trim()
104
+ const userNames = typeof options.participantUserNames === 'string'
105
+ ? [options.participantUserNames.trim().toLowerCase()]
106
+ : options.participantUserNames;
107
+ const attendees = userNames.map(upn => ({
108
+ upn
66
109
  }));
67
110
  requestData.participants = { attendees };
68
111
  }
@@ -93,59 +136,5 @@ class TeamsMeetingAddCommand extends GraphCommand {
93
136
  return request.post(requestOptions);
94
137
  }
95
138
  }
96
- _TeamsMeetingAddCommand_instances = new WeakSet(), _TeamsMeetingAddCommand_initTelemetry = function _TeamsMeetingAddCommand_initTelemetry() {
97
- this.telemetry.push((args) => {
98
- Object.assign(this.telemetryProperties, {
99
- startTime: typeof args.options.startTime !== 'undefined',
100
- endTime: typeof args.options.endTime !== 'undefined',
101
- subject: typeof args.options.subject !== 'undefined',
102
- participantUserNames: typeof args.options.participantUserNames !== 'undefined',
103
- organizerEmail: typeof args.options.organizerEmail !== 'undefined',
104
- recordAutomatically: !!args.options.recordAutomatically
105
- });
106
- });
107
- }, _TeamsMeetingAddCommand_initOptions = function _TeamsMeetingAddCommand_initOptions() {
108
- this.options.unshift({
109
- option: '-s, --startTime [startTime]'
110
- }, {
111
- option: '-e, --endTime [endTime]'
112
- }, {
113
- option: '--subject [subject]'
114
- }, {
115
- option: '-p, --participantUserNames [participantUserNames]'
116
- }, {
117
- option: '--organizerEmail [organizerEmail]'
118
- }, {
119
- option: '-r, --recordAutomatically'
120
- });
121
- }, _TeamsMeetingAddCommand_initValidators = function _TeamsMeetingAddCommand_initValidators() {
122
- this.validators.push(async (args) => {
123
- if (args.options.startTime && !validation.isValidISODateTime(args.options.startTime)) {
124
- return `'${args.options.startTime}' is not a valid ISO date string for startTime.`;
125
- }
126
- if (args.options.endTime && !validation.isValidISODateTime(args.options.endTime)) {
127
- return `'${args.options.endTime}' is not a valid ISO date string for endTime.`;
128
- }
129
- if (args.options.startTime && args.options.endTime && new Date(args.options.startTime) >= new Date(args.options.endTime)) {
130
- return 'The startTime value must be before endTime.';
131
- }
132
- if (args.options.startTime && new Date() >= new Date(args.options.startTime)) {
133
- return 'The startTime value must be in the future.';
134
- }
135
- if (args.options.endTime && new Date() >= new Date(args.options.endTime)) {
136
- return 'The endTime value must be in the future.';
137
- }
138
- if (args.options.participantUserNames) {
139
- const isValidUPNArrayResult = validation.isValidUserPrincipalNameArray(args.options.participantUserNames);
140
- if (isValidUPNArrayResult !== true) {
141
- return `The following user principal names are invalid for the option 'participantUserNames': ${isValidUPNArrayResult}.`;
142
- }
143
- }
144
- if (args.options.organizerEmail && !validation.isValidUserPrincipalName(args.options.organizerEmail)) {
145
- return `'${args.options.organizerEmail}' is not a valid email for organizerEmail.`;
146
- }
147
- return true;
148
- });
149
- };
150
139
  export default new TeamsMeetingAddCommand();
151
140
  //# sourceMappingURL=meeting-add.js.map