@pnp/cli-microsoft365 7.0.0-beta.c0afb7b → 7.0.0-beta.c2db9df

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 (158) hide show
  1. package/README.md +4 -4
  2. package/dist/cli/Cli.js +3 -3
  3. package/dist/m365/aad/commands/app/app-add.js +8 -8
  4. package/dist/m365/aad/commands/app/app-get.js +4 -1
  5. package/dist/m365/aad/commands/app/app-remove.js +3 -1
  6. package/dist/m365/aad/commands/app/app-role-add.js +9 -6
  7. package/dist/m365/aad/commands/app/app-role-list.js +4 -1
  8. package/dist/m365/aad/commands/app/app-role-remove.js +5 -2
  9. package/dist/m365/aad/commands/app/app-set.js +9 -6
  10. package/dist/m365/aad/commands/approleassignment/approleassignment-add.js +7 -2
  11. package/dist/m365/aad/commands/group/group-get.js +4 -4
  12. package/dist/m365/aad/commands/group/group-list.js +1 -23
  13. package/dist/m365/aad/commands/m365group/m365group-add.js +12 -9
  14. package/dist/m365/aad/commands/m365group/m365group-recyclebinitem-remove.js +3 -1
  15. package/dist/m365/aad/commands/m365group/m365group-recyclebinitem-restore.js +4 -1
  16. package/dist/m365/aad/commands/m365group/m365group-teamify.js +4 -1
  17. package/dist/m365/aad/commands/policy/policy-list.js +5 -5
  18. package/dist/m365/aad/commands/sp/sp-add.js +4 -1
  19. package/dist/m365/aad/commands/sp/sp-get.js +4 -1
  20. package/dist/m365/aad/commands/user/user-get.js +7 -2
  21. package/dist/m365/booking/commands/business/business-get.js +4 -1
  22. package/dist/m365/cli/commands/cli-issue.js +5 -5
  23. package/dist/m365/cli/commands/config/config-get.js +5 -5
  24. package/dist/m365/cli/commands/config/config-reset.js +5 -5
  25. package/dist/m365/cli/commands/config/config-set.js +5 -5
  26. package/dist/m365/commands/login.js +5 -5
  27. package/dist/m365/commands/request.js +1 -1
  28. package/dist/m365/flow/commands/owner/owner-ensure.js +5 -5
  29. package/dist/m365/outlook/commands/message/message-list.js +4 -2
  30. package/dist/m365/outlook/commands/message/message-move.js +4 -2
  31. package/dist/m365/pa/commands/app/app-export.js +7 -7
  32. package/dist/m365/pa/commands/app/app-owner-set.js +5 -5
  33. package/dist/m365/pa/commands/app/app-permission-ensure.js +5 -5
  34. package/dist/m365/planner/commands/bucket/bucket-get.js +5 -1
  35. package/dist/m365/planner/commands/bucket/bucket-remove.js +3 -1
  36. package/dist/m365/planner/commands/bucket/bucket-set.js +4 -1
  37. package/dist/m365/planner/commands/task/task-add.js +17 -11
  38. package/dist/m365/planner/commands/task/task-get.js +42 -27
  39. package/dist/m365/planner/commands/task/task-list.js +26 -19
  40. package/dist/m365/planner/commands/task/task-remove.js +45 -37
  41. package/dist/m365/planner/commands/task/task-set.js +35 -23
  42. package/dist/m365/pp/commands/aibuildermodel/aibuildermodel-get.js +4 -1
  43. package/dist/m365/pp/commands/card/card-get.js +3 -5
  44. package/dist/m365/pp/commands/chatbot/chatbot-get.js +3 -1
  45. package/dist/m365/pp/commands/managementapp/managementapp-add.js +4 -1
  46. package/dist/m365/purview/commands/retentionlabel/retentionlabel-add.js +14 -14
  47. package/dist/m365/search/commands/externalconnection/externalconnection-remove.js +3 -1
  48. package/dist/m365/spfx/commands/package/package-generate.js +15 -15
  49. package/dist/m365/spfx/commands/project/DeployWorkflow.js +55 -0
  50. package/dist/m365/spfx/commands/project/project-doctor/{doctor-1.18.0-beta.5.js → doctor-1.18.0-rc.1.js} +2 -2
  51. package/dist/m365/spfx/commands/project/project-doctor.js +9 -9
  52. package/dist/m365/spfx/commands/project/project-github-workflow-add.js +157 -0
  53. package/dist/m365/spfx/commands/project/project-github-workflow-model.js +2 -0
  54. package/dist/m365/spfx/commands/project/project-upgrade/rules/FN002028_DEVDEP_microsoft_rush_stack_compiler_4_7.js +13 -0
  55. package/dist/m365/spfx/commands/project/project-upgrade/{upgrade-1.18.0-beta.5.js → upgrade-1.18.0-rc.1.js} +35 -27
  56. package/dist/m365/spfx/commands/project/project-upgrade.js +14 -14
  57. package/dist/m365/spfx/commands/spfx-doctor.js +3 -3
  58. package/dist/m365/spfx/commands.js +1 -0
  59. package/dist/m365/spo/commands/applicationcustomizer/applicationcustomizer-add.js +5 -5
  60. package/dist/m365/spo/commands/applicationcustomizer/applicationcustomizer-get.js +5 -3
  61. package/dist/m365/spo/commands/applicationcustomizer/applicationcustomizer-list.js +5 -5
  62. package/dist/m365/spo/commands/applicationcustomizer/applicationcustomizer-remove.js +2 -2
  63. package/dist/m365/spo/commands/applicationcustomizer/applicationcustomizer-set.js +3 -2
  64. package/dist/m365/spo/commands/commandset/commandset-add.js +11 -11
  65. package/dist/m365/spo/commands/commandset/commandset-get.js +12 -10
  66. package/dist/m365/spo/commands/commandset/commandset-list.js +5 -5
  67. package/dist/m365/spo/commands/commandset/commandset-remove.js +7 -6
  68. package/dist/m365/spo/commands/commandset/commandset-set.js +14 -12
  69. package/dist/m365/spo/commands/customaction/customaction-get.js +5 -2
  70. package/dist/m365/spo/commands/customaction/customaction-remove.js +3 -1
  71. package/dist/m365/spo/commands/eventreceiver/eventreceiver-get.js +3 -1
  72. package/dist/m365/spo/commands/file/file-get.js +9 -6
  73. package/dist/m365/spo/commands/file/file-sharinglink-add.js +8 -8
  74. package/dist/m365/spo/commands/file/file-sharinglink-list.js +5 -5
  75. package/dist/m365/spo/commands/hubsite/hubsite-connect.js +7 -4
  76. package/dist/m365/spo/commands/hubsite/hubsite-disconnect.js +4 -1
  77. package/dist/m365/spo/commands/hubsite/hubsite-get.js +3 -1
  78. package/dist/m365/spo/commands/list/list-add.js +4 -4
  79. package/dist/m365/spo/commands/list/list-set.js +4 -4
  80. package/dist/m365/spo/commands/listitem/listitem-add.js +1 -0
  81. package/dist/m365/spo/commands/listitem/listitem-set.js +3 -2
  82. package/dist/m365/spo/commands/orgassetslibrary/orgassetslibrary-add.js +8 -8
  83. package/dist/m365/spo/commands/page/clientsidepages.js +18 -0
  84. package/dist/m365/spo/commands/page/page-get.js +1 -0
  85. package/dist/m365/spo/commands/page/page-list.js +4 -3
  86. package/dist/m365/spo/commands/page/page-section-add.js +56 -21
  87. package/dist/m365/spo/commands/serviceprincipal/serviceprincipal-set.js +30 -32
  88. package/dist/m365/spo/commands/site/site-add.js +114 -161
  89. package/dist/m365/spo/commands/site/site-apppermission-add.js +15 -18
  90. package/dist/m365/spo/commands/site/site-apppermission-remove.js +34 -38
  91. package/dist/m365/spo/commands/site/site-apppermission-set.js +11 -14
  92. package/dist/m365/spo/commands/site/site-ensure.js +13 -66
  93. package/dist/m365/spo/commands/site/site-list.js +5 -7
  94. package/dist/m365/spo/commands/site/site-recyclebinitem-list.js +6 -6
  95. package/dist/m365/spo/commands/site/site-remove.js +166 -210
  96. package/dist/m365/spo/commands/site/site-set.js +121 -153
  97. package/dist/m365/spo/commands/tenant/tenant-appcatalog-add.js +1 -1
  98. package/dist/m365/spo/commands/tenant/tenant-applicationcustomizer-get.js +8 -3
  99. package/dist/m365/spo/commands/tenant/tenant-applicationcustomizer-list.js +3 -2
  100. package/dist/m365/spo/commands/tenant/tenant-applicationcustomizer-remove.js +2 -1
  101. package/dist/m365/spo/commands/tenant/tenant-applicationcustomizer-set.js +3 -2
  102. package/dist/m365/spo/commands/tenant/tenant-commandset-add.js +8 -8
  103. package/dist/m365/spo/commands/tenant/tenant-commandset-get.js +8 -3
  104. package/dist/m365/spo/commands/tenant/tenant-commandset-list.js +3 -2
  105. package/dist/m365/spo/commands/tenant/tenant-commandset-remove.js +3 -1
  106. package/dist/m365/spo/commands/tenant/tenant-commandset-set.js +8 -8
  107. package/dist/m365/spo/commands/tenant/tenant-settings-set.js +4 -4
  108. package/dist/m365/spo/commands/term/term-get.js +6 -6
  109. package/dist/m365/spo/commands/web/web-roleinheritance-break.js +3 -3
  110. package/dist/m365/spo/commands/web/web-set.js +5 -5
  111. package/dist/m365/teams/commands/app/app-list.js +5 -5
  112. package/dist/m365/teams/commands/channel/channel-add.js +5 -1
  113. package/dist/m365/teams/commands/channel/channel-member-add.js +4 -2
  114. package/dist/m365/teams/commands/channel/channel-member-remove.js +3 -1
  115. package/dist/m365/teams/commands/channel/channel-member-set.js +4 -1
  116. package/dist/m365/teams/commands/chat/chat-get.js +7 -10
  117. package/dist/m365/teams/commands/chat/chat-member-add.js +5 -5
  118. package/dist/m365/teams/commands/chat/chat-message-send.js +8 -10
  119. package/dist/m365/teams/commands/funsettings/funsettings-set.js +4 -4
  120. package/dist/m365/teams/commands/guestsettings/guestsettings-set.js +4 -4
  121. package/dist/m365/teams/commands/membersettings/membersettings-set.js +4 -4
  122. package/dist/m365/teams/commands/messagingsettings/messagingsettings-set.js +5 -5
  123. package/dist/m365/teams/commands/team/team-clone.js +5 -10
  124. package/dist/m365/teams/commands/team/team-list.js +94 -30
  125. package/dist/m365/teams/commands/team/team-set.js +3 -3
  126. package/dist/m365/tenant/commands/info/info-get.js +83 -0
  127. package/dist/m365/tenant/commands.js +1 -0
  128. package/dist/m365/todo/commands/task/task-add.js +6 -6
  129. package/dist/m365/yammer/commands/message/message-list.js +5 -5
  130. package/dist/m365/yammer/commands/yammer-search.js +5 -5
  131. package/dist/utils/aadGroup.js +23 -3
  132. package/dist/utils/formatting.js +7 -0
  133. package/dist/utils/fsUtil.js +5 -0
  134. package/dist/utils/powerPlatform.js +1 -1
  135. package/dist/utils/spo.js +582 -0
  136. package/docs/docs/cmd/aad/group/group-get.mdx +5 -5
  137. package/docs/docs/cmd/aad/group/group-list.mdx +0 -11
  138. package/docs/docs/cmd/aad/policy/policy-list.mdx +5 -5
  139. package/docs/docs/cmd/cli/config/config-list.mdx +1 -1
  140. package/docs/docs/cmd/pa/app/app-export.mdx +5 -5
  141. package/docs/docs/cmd/planner/task/task-add.mdx +22 -7
  142. package/docs/docs/cmd/planner/task/task-get.mdx +13 -4
  143. package/docs/docs/cmd/planner/task/task-list.mdx +22 -7
  144. package/docs/docs/cmd/planner/task/task-remove.mdx +25 -8
  145. package/docs/docs/cmd/planner/task/task-set.mdx +22 -7
  146. package/docs/docs/cmd/spfx/project/project-github-workflow-add.mdx +94 -0
  147. package/docs/docs/cmd/spo/listitem/listitem-add.mdx +2 -5
  148. package/docs/docs/cmd/spo/listitem/listitem-set.mdx +2 -5
  149. package/docs/docs/cmd/spo/page/page-get.mdx +0 -1
  150. package/docs/docs/cmd/spo/page/page-list.mdx +0 -1
  151. package/docs/docs/cmd/spo/page/page-section-add.mdx +25 -1
  152. package/docs/docs/cmd/spo/tenant/tenant-applicationcustomizer-list.mdx +2 -4
  153. package/docs/docs/cmd/spo/tenant/tenant-commandset-list.mdx +2 -4
  154. package/docs/docs/cmd/teams/team/team-clone.mdx +3 -3
  155. package/docs/docs/cmd/teams/team/team-list.mdx +47 -22
  156. package/docs/docs/cmd/tenant/info/info-get.mdx +101 -0
  157. package/npm-shrinkwrap.json +196 -193
  158. package/package.json +8 -12
@@ -3,7 +3,7 @@ var __classPrivateFieldGet = (this && this.__classPrivateFieldGet) || function (
3
3
  if (typeof state === "function" ? receiver !== state || !f : !state.has(receiver)) throw new TypeError("Cannot read private member from an object whose class did not declare it");
4
4
  return kind === "m" ? f : kind === "a" ? f.call(receiver) : f ? f.value : state.get(receiver);
5
5
  };
6
- var _SpoTenantSettingsSetCommand_instances, _SpoTenantSettingsSetCommand_initTelemetry, _SpoTenantSettingsSetCommand_initOptions, _SpoTenantSettingsSetCommand_initValidators, _SpoTenantSettingsSetCommand_initTypes;
6
+ var _SpoTenantSettingsSetCommand_instances, _a, _SpoTenantSettingsSetCommand_initTelemetry, _SpoTenantSettingsSetCommand_initOptions, _SpoTenantSettingsSetCommand_initValidators, _SpoTenantSettingsSetCommand_initTypes;
7
7
  import config from '../../../../config.js';
8
8
  import request from '../../../../request.js';
9
9
  import { formatting } from '../../../../utils/formatting.js';
@@ -132,7 +132,7 @@ class SpoTenantSettingsSetCommand extends SpoCommand {
132
132
  }
133
133
  }
134
134
  }
135
- _SpoTenantSettingsSetCommand_instances = new WeakSet(), _SpoTenantSettingsSetCommand_initTelemetry = function _SpoTenantSettingsSetCommand_initTelemetry() {
135
+ _a = SpoTenantSettingsSetCommand, _SpoTenantSettingsSetCommand_instances = new WeakSet(), _SpoTenantSettingsSetCommand_initTelemetry = function _SpoTenantSettingsSetCommand_initTelemetry() {
136
136
  this.telemetry.push((args) => {
137
137
  const telemetryProps = {
138
138
  MinCompatibilityLevel: (!(!args.options.MinCompatibilityLevel)).toString(),
@@ -167,7 +167,7 @@ _SpoTenantSettingsSetCommand_instances = new WeakSet(), _SpoTenantSettingsSetCom
167
167
  AllowedDomainListForSyncClient: (!(!args.options.AllowedDomainListForSyncClient)).toString()
168
168
  };
169
169
  // add boolean values
170
- SpoTenantSettingsSetCommand.booleanOptions.forEach(o => {
170
+ _a.booleanOptions.forEach(o => {
171
171
  const value = args.options[o];
172
172
  if (value !== undefined) {
173
173
  telemetryProps[o] = value;
@@ -439,7 +439,7 @@ _SpoTenantSettingsSetCommand_instances = new WeakSet(), _SpoTenantSettingsSetCom
439
439
  return true;
440
440
  });
441
441
  }, _SpoTenantSettingsSetCommand_initTypes = function _SpoTenantSettingsSetCommand_initTypes() {
442
- this.types.boolean.push(...SpoTenantSettingsSetCommand.booleanOptions);
442
+ this.types.boolean.push(..._a.booleanOptions);
443
443
  };
444
444
  SpoTenantSettingsSetCommand.booleanOptions = [
445
445
  'ExternalServicesEnabled',
@@ -4,7 +4,7 @@ var __classPrivateFieldGet = (this && this.__classPrivateFieldGet) || function (
4
4
  return kind === "m" ? f : kind === "a" ? f.call(receiver) : f ? f.value : state.get(receiver);
5
5
  };
6
6
  var _SpoTermGetCommand_instances, _SpoTermGetCommand_initTelemetry, _SpoTermGetCommand_initOptions, _SpoTermGetCommand_initValidators, _SpoTermGetCommand_initOptionSets;
7
- import os from 'os';
7
+ import { Cli } from '../../../../cli/Cli.js';
8
8
  import config from '../../../../config.js';
9
9
  import request from '../../../../request.js';
10
10
  import { formatting } from '../../../../utils/formatting.js';
@@ -52,12 +52,12 @@ class SpoTermGetCommand extends SpoCommand {
52
52
  throw `Term with name '${args.options.name}' could not be found.`;
53
53
  }
54
54
  if (terms._Child_Items_.length > 1) {
55
- const disambiguationText = terms._Child_Items_.map(c => {
56
- return `- ${this.getTermId(c.Id)} - ${c.PathOfTerm}`;
57
- }).join(os.EOL);
58
- throw new Error(`Multiple terms with the specific term name found. Please disambiguate:${os.EOL}${disambiguationText}`);
55
+ const resultAsKeyValuePair = formatting.convertArrayToHashTable('Id', terms._Child_Items_);
56
+ term = await Cli.handleMultipleResultsFound(`Multiple terms with the specific term name found.`, resultAsKeyValuePair);
57
+ }
58
+ else {
59
+ term = terms._Child_Items_[0];
59
60
  }
60
- term = terms._Child_Items_[0];
61
61
  }
62
62
  else {
63
63
  term = csomResponse;
@@ -28,7 +28,7 @@ class SpoWebRoleInheritanceBreakCommand extends SpoCommand {
28
28
  await logger.logToStderr(`Break role inheritance of subsite with URL ${args.options.webUrl}...`);
29
29
  }
30
30
  if (args.options.force) {
31
- await this.breakroleInheritance(args.options);
31
+ await this.breakRoleInheritance(args.options);
32
32
  }
33
33
  else {
34
34
  const result = await Cli.prompt({
@@ -38,11 +38,11 @@ class SpoWebRoleInheritanceBreakCommand extends SpoCommand {
38
38
  message: `Are you sure you want to break the role inheritance of subsite ${args.options.webUrl}`
39
39
  });
40
40
  if (result.continue) {
41
- await this.breakroleInheritance(args.options);
41
+ await this.breakRoleInheritance(args.options);
42
42
  }
43
43
  }
44
44
  }
45
- async breakroleInheritance(options) {
45
+ async breakRoleInheritance(options) {
46
46
  const requestOptions = {
47
47
  url: `${options.webUrl}/_api/web/breakroleinheritance(${!options.clearExistingPermissions})`,
48
48
  headers: {
@@ -3,7 +3,7 @@ var __classPrivateFieldGet = (this && this.__classPrivateFieldGet) || function (
3
3
  if (typeof state === "function" ? receiver !== state || !f : !state.has(receiver)) throw new TypeError("Cannot read private member from an object whose class did not declare it");
4
4
  return kind === "m" ? f : kind === "a" ? f.call(receiver) : f ? f.value : state.get(receiver);
5
5
  };
6
- var _SpoWebSetCommand_instances, _SpoWebSetCommand_initTelemetry, _SpoWebSetCommand_initOptions, _SpoWebSetCommand_initTypes, _SpoWebSetCommand_initValidators;
6
+ var _SpoWebSetCommand_instances, _a, _SpoWebSetCommand_initTelemetry, _SpoWebSetCommand_initOptions, _SpoWebSetCommand_initTypes, _SpoWebSetCommand_initValidators;
7
7
  import request from '../../../../request.js';
8
8
  import { validation } from '../../../../utils/validation.js';
9
9
  import SpoCommand from '../../../base/SpoCommand.js';
@@ -55,7 +55,7 @@ class SpoWebSetCommand extends SpoCommand {
55
55
  }
56
56
  if (typeof args.options.searchScope !== 'undefined') {
57
57
  const searchScope = args.options.searchScope.toLowerCase();
58
- payload.SearchScope = SpoWebSetCommand.searchScopeOptions.indexOf(searchScope);
58
+ payload.SearchScope = _a.searchScopeOptions.indexOf(searchScope);
59
59
  }
60
60
  try {
61
61
  const requestOptions = {
@@ -97,7 +97,7 @@ class SpoWebSetCommand extends SpoCommand {
97
97
  return true;
98
98
  }
99
99
  }
100
- _SpoWebSetCommand_instances = new WeakSet(), _SpoWebSetCommand_initTelemetry = function _SpoWebSetCommand_initTelemetry() {
100
+ _a = SpoWebSetCommand, _SpoWebSetCommand_instances = new WeakSet(), _SpoWebSetCommand_initTelemetry = function _SpoWebSetCommand_initTelemetry() {
101
101
  this.telemetry.push((args) => {
102
102
  Object.assign(this.telemetryProperties, {
103
103
  description: typeof args.options.description !== 'undefined',
@@ -143,7 +143,7 @@ _SpoWebSetCommand_instances = new WeakSet(), _SpoWebSetCommand_initTelemetry = f
143
143
  autocomplete: ['true', 'false']
144
144
  }, {
145
145
  option: '--searchScope [searchScope]',
146
- autocomplete: SpoWebSetCommand.searchScopeOptions
146
+ autocomplete: _a.searchScopeOptions
147
147
  }, {
148
148
  option: '--welcomePage [welcomePage]'
149
149
  });
@@ -170,7 +170,7 @@ _SpoWebSetCommand_instances = new WeakSet(), _SpoWebSetCommand_initTelemetry = f
170
170
  }
171
171
  if (typeof args.options.searchScope !== 'undefined') {
172
172
  const searchScope = args.options.searchScope.toString().toLowerCase();
173
- if (SpoWebSetCommand.searchScopeOptions.indexOf(searchScope) < 0) {
173
+ if (_a.searchScopeOptions.indexOf(searchScope) < 0) {
174
174
  return `${args.options.searchScope} is not a valid value for searchScope. Allowed values are DefaultScope|Tenant|Hub|Site`;
175
175
  }
176
176
  }
@@ -3,7 +3,7 @@ var __classPrivateFieldGet = (this && this.__classPrivateFieldGet) || function (
3
3
  if (typeof state === "function" ? receiver !== state || !f : !state.has(receiver)) throw new TypeError("Cannot read private member from an object whose class did not declare it");
4
4
  return kind === "m" ? f : kind === "a" ? f.call(receiver) : f ? f.value : state.get(receiver);
5
5
  };
6
- var _TeamsAppListCommand_instances, _TeamsAppListCommand_initTelemetry, _TeamsAppListCommand_initOptions, _TeamsAppListCommand_initValidators;
6
+ var _TeamsAppListCommand_instances, _a, _TeamsAppListCommand_initTelemetry, _TeamsAppListCommand_initOptions, _TeamsAppListCommand_initValidators;
7
7
  import { odata } from '../../../../utils/odata.js';
8
8
  import GraphCommand from '../../../base/GraphCommand.js';
9
9
  import commands from '../../commands.js';
@@ -38,7 +38,7 @@ class TeamsAppListCommand extends GraphCommand {
38
38
  }
39
39
  }
40
40
  }
41
- _TeamsAppListCommand_instances = new WeakSet(), _TeamsAppListCommand_initTelemetry = function _TeamsAppListCommand_initTelemetry() {
41
+ _a = TeamsAppListCommand, _TeamsAppListCommand_instances = new WeakSet(), _TeamsAppListCommand_initTelemetry = function _TeamsAppListCommand_initTelemetry() {
42
42
  this.telemetry.push((args) => {
43
43
  Object.assign(this.telemetryProperties, {
44
44
  distributionMethod: args.options.distributionMethod || false
@@ -47,13 +47,13 @@ _TeamsAppListCommand_instances = new WeakSet(), _TeamsAppListCommand_initTelemet
47
47
  }, _TeamsAppListCommand_initOptions = function _TeamsAppListCommand_initOptions() {
48
48
  this.options.unshift({
49
49
  option: '--distributionMethod [distributionMethod]',
50
- autocomplete: TeamsAppListCommand.allowedDistributionMethods
50
+ autocomplete: _a.allowedDistributionMethods
51
51
  });
52
52
  }, _TeamsAppListCommand_initValidators = function _TeamsAppListCommand_initValidators() {
53
53
  this.validators.push(async (args) => {
54
54
  if (args.options.distributionMethod &&
55
- TeamsAppListCommand.allowedDistributionMethods.indexOf(args.options.distributionMethod) < 0) {
56
- return `'${args.options.distributionMethod}' is not a valid distributionMethod. Allowed distribution methods are: ${TeamsAppListCommand.allowedDistributionMethods.join(', ')}`;
55
+ _a.allowedDistributionMethods.indexOf(args.options.distributionMethod) < 0) {
56
+ return `'${args.options.distributionMethod}' is not a valid distributionMethod. Allowed distribution methods are: ${_a.allowedDistributionMethods.join(', ')}`;
57
57
  }
58
58
  return true;
59
59
  });
@@ -8,6 +8,8 @@ import request from '../../../../request.js';
8
8
  import { validation } from '../../../../utils/validation.js';
9
9
  import GraphCommand from "../../../base/GraphCommand.js";
10
10
  import commands from '../../commands.js';
11
+ import { Cli } from '../../../../cli/Cli.js';
12
+ import { formatting } from '../../../../utils/formatting.js';
11
13
  class TeamsChannelAddCommand extends GraphCommand {
12
14
  get name() {
13
15
  return commands.CHANNEL_ADD;
@@ -42,7 +44,9 @@ class TeamsChannelAddCommand extends GraphCommand {
42
44
  throw `The specified team does not exist in the Microsoft Teams`;
43
45
  }
44
46
  if (matchingTeams.length > 1) {
45
- throw `Multiple Microsoft Teams teams with name ${args.options.teamName} found: ${matchingTeams.join(', ')}`;
47
+ const resultAsKeyValuePair = formatting.convertArrayToHashTable('id', response.value);
48
+ const result = await Cli.handleMultipleResultsFound(`Multiple Microsoft Teams teams with name ${args.options.teamName} found.`, resultAsKeyValuePair);
49
+ return result.id;
46
50
  }
47
51
  return matchingTeams[0];
48
52
  }
@@ -4,13 +4,13 @@ var __classPrivateFieldGet = (this && this.__classPrivateFieldGet) || function (
4
4
  return kind === "m" ? f : kind === "a" ? f.call(receiver) : f ? f.value : state.get(receiver);
5
5
  };
6
6
  var _TeamsChannelMemberAddCommand_instances, _TeamsChannelMemberAddCommand_initTelemetry, _TeamsChannelMemberAddCommand_initOptions, _TeamsChannelMemberAddCommand_initValidators, _TeamsChannelMemberAddCommand_initOptionSets;
7
- import os from 'os';
8
7
  import request from '../../../../request.js';
9
8
  import { aadGroup } from '../../../../utils/aadGroup.js';
10
9
  import { formatting } from '../../../../utils/formatting.js';
11
10
  import { validation } from '../../../../utils/validation.js';
12
11
  import GraphCommand from '../../../base/GraphCommand.js';
13
12
  import commands from '../../commands.js';
13
+ import { Cli } from '../../../../cli/Cli.js';
14
14
  class TeamsChannelMemberAddCommand extends GraphCommand {
15
15
  get name() {
16
16
  return commands.CHANNEL_MEMBER_ADD;
@@ -115,7 +115,9 @@ class TeamsChannelMemberAddCommand extends GraphCommand {
115
115
  throw `The specified user '${userDisplayName}' does not exist`;
116
116
  }
117
117
  if (response.value.length > 1) {
118
- throw `Multiple users with display name '${userDisplayName}' found. Please disambiguate:${os.EOL}${response.value.map(x => `- ${x.id}`).join(os.EOL)}`;
118
+ const resultAsKeyValuePair = formatting.convertArrayToHashTable('id', response.value);
119
+ const result = await Cli.handleMultipleResultsFound(`Multiple users with display name '${userDisplayName}' found.`, resultAsKeyValuePair);
120
+ return result.id;
119
121
  }
120
122
  return userItem.id;
121
123
  }
@@ -123,7 +123,9 @@ class TeamsChannelMemberRemoveCommand extends GraphCommand {
123
123
  throw 'The specified member does not exist in the Microsoft Teams channel';
124
124
  }
125
125
  if (conversationMembers.length > 1) {
126
- throw `Multiple Microsoft Teams channel members with name ${args.options.userName} found: ${response.value.map(x => x.userId)}`;
126
+ const resultAsKeyValuePair = formatting.convertArrayToHashTable('id', conversationMembers);
127
+ const result = await Cli.handleMultipleResultsFound(`Multiple Microsoft Teams channel members with name ${args.options.userName} found.`, resultAsKeyValuePair);
128
+ return result.id;
127
129
  }
128
130
  return conversationMember.id;
129
131
  }
@@ -10,6 +10,7 @@ import { formatting } from '../../../../utils/formatting.js';
10
10
  import { validation } from '../../../../utils/validation.js';
11
11
  import GraphCommand from '../../../base/GraphCommand.js';
12
12
  import commands from '../../commands.js';
13
+ import { Cli } from '../../../../cli/Cli.js';
13
14
  class TeamsChannelMemberSetCommand extends GraphCommand {
14
15
  get name() {
15
16
  return commands.CHANNEL_MEMBER_SET;
@@ -101,7 +102,9 @@ class TeamsChannelMemberSetCommand extends GraphCommand {
101
102
  throw 'The specified member does not exist in the Microsoft Teams channel';
102
103
  }
103
104
  if (conversationMembers.length > 1) {
104
- throw `Multiple Microsoft Teams channel members with name ${args.options.userName} found: ${response.value.map(x => x.userId)}`;
105
+ const resultAsKeyValuePair = formatting.convertArrayToHashTable('id', conversationMembers);
106
+ const result = await Cli.handleMultipleResultsFound(`Multiple Microsoft Teams channel members with name ${args.options.userName} found.`, resultAsKeyValuePair);
107
+ return result.id;
105
108
  }
106
109
  return conversationMember.id;
107
110
  }
@@ -4,7 +4,6 @@ var __classPrivateFieldGet = (this && this.__classPrivateFieldGet) || function (
4
4
  return kind === "m" ? f : kind === "a" ? f.call(receiver) : f ? f.value : state.get(receiver);
5
5
  };
6
6
  var _TeamsChatGetCommand_instances, _TeamsChatGetCommand_initTelemetry, _TeamsChatGetCommand_initOptions, _TeamsChatGetCommand_initValidators, _TeamsChatGetCommand_initOptionSets;
7
- import os from 'os';
8
7
  import auth from '../../../../Auth.js';
9
8
  import request from '../../../../request.js';
10
9
  import { accessToken } from '../../../../utils/accessToken.js';
@@ -13,6 +12,7 @@ import { validation } from '../../../../utils/validation.js';
13
12
  import GraphCommand from '../../../base/GraphCommand.js';
14
13
  import commands from '../../commands.js';
15
14
  import { chatUtil } from './chatUtil.js';
15
+ import { Cli } from '../../../../cli/Cli.js';
16
16
  class TeamsChatGetCommand extends GraphCommand {
17
17
  get name() {
18
18
  return commands.CHAT_GET;
@@ -66,10 +66,9 @@ class TeamsChatGetCommand extends GraphCommand {
66
66
  if (existingChats.length === 1) {
67
67
  return existingChats[0].id;
68
68
  }
69
- const disambiguationText = existingChats.map(c => {
70
- return `- ${c.id}${c.topic && ' - '}${c.topic} - ${c.createdDateTime && new Date(c.createdDateTime).toLocaleString()}`;
71
- }).join(os.EOL);
72
- throw `Multiple chat conversations with these participants found. Please disambiguate:${os.EOL}${disambiguationText}`;
69
+ const resultAsKeyValuePair = formatting.convertArrayToHashTable('id', existingChats);
70
+ const result = await Cli.handleMultipleResultsFound(`Multiple chat conversations with these participants found.`, resultAsKeyValuePair);
71
+ return result.id;
73
72
  }
74
73
  async getChatIdByName(name) {
75
74
  const existingChats = await chatUtil.findExistingGroupChatsByName(name);
@@ -79,11 +78,9 @@ class TeamsChatGetCommand extends GraphCommand {
79
78
  if (existingChats.length === 1) {
80
79
  return existingChats[0].id;
81
80
  }
82
- const disambiguationText = existingChats.map(c => {
83
- const memberstring = c.members.map(m => m.email).join(', ');
84
- return `- ${c.id} - ${c.createdDateTime && new Date(c.createdDateTime).toLocaleString()} - ${memberstring}`;
85
- }).join(os.EOL);
86
- throw `Multiple chat conversations with this name found. Please disambiguate:${os.EOL}${disambiguationText}`;
81
+ const resultAsKeyValuePair = formatting.convertArrayToHashTable('id', existingChats);
82
+ const result = await Cli.handleMultipleResultsFound(`Multiple chat conversations with this name found.`, resultAsKeyValuePair);
83
+ return result.id;
87
84
  }
88
85
  }
89
86
  _TeamsChatGetCommand_instances = new WeakSet(), _TeamsChatGetCommand_initTelemetry = function _TeamsChatGetCommand_initTelemetry() {
@@ -3,7 +3,7 @@ var __classPrivateFieldGet = (this && this.__classPrivateFieldGet) || function (
3
3
  if (typeof state === "function" ? receiver !== state || !f : !state.has(receiver)) throw new TypeError("Cannot read private member from an object whose class did not declare it");
4
4
  return kind === "m" ? f : kind === "a" ? f.call(receiver) : f ? f.value : state.get(receiver);
5
5
  };
6
- var _TeamsChatMemberAddCommand_instances, _TeamsChatMemberAddCommand_initTelemetry, _TeamsChatMemberAddCommand_initOptions, _TeamsChatMemberAddCommand_initValidators, _TeamsChatMemberAddCommand_initOptionSets;
6
+ var _TeamsChatMemberAddCommand_instances, _a, _TeamsChatMemberAddCommand_initTelemetry, _TeamsChatMemberAddCommand_initOptions, _TeamsChatMemberAddCommand_initValidators, _TeamsChatMemberAddCommand_initOptionSets;
7
7
  import request from '../../../../request.js';
8
8
  import { formatting } from '../../../../utils/formatting.js';
9
9
  import { validation } from '../../../../utils/validation.js';
@@ -49,7 +49,7 @@ class TeamsChatMemberAddCommand extends GraphCommand {
49
49
  }
50
50
  }
51
51
  }
52
- _TeamsChatMemberAddCommand_instances = new WeakSet(), _TeamsChatMemberAddCommand_initTelemetry = function _TeamsChatMemberAddCommand_initTelemetry() {
52
+ _a = TeamsChatMemberAddCommand, _TeamsChatMemberAddCommand_instances = new WeakSet(), _TeamsChatMemberAddCommand_initTelemetry = function _TeamsChatMemberAddCommand_initTelemetry() {
53
53
  this.telemetry.push((args) => {
54
54
  Object.assign(this.telemetryProperties, {
55
55
  userId: typeof args.options.userId !== 'undefined',
@@ -68,7 +68,7 @@ _TeamsChatMemberAddCommand_instances = new WeakSet(), _TeamsChatMemberAddCommand
68
68
  option: '--userName [userName]'
69
69
  }, {
70
70
  option: '--role [role]',
71
- autocomplete: TeamsChatMemberAddCommand.roles
71
+ autocomplete: _a.roles
72
72
  }, {
73
73
  option: '--visibleHistoryStartDateTime [visibleHistoryStartDateTime]'
74
74
  }, {
@@ -85,8 +85,8 @@ _TeamsChatMemberAddCommand_instances = new WeakSet(), _TeamsChatMemberAddCommand
85
85
  if (args.options.userName && !validation.isValidUserPrincipalName(args.options.userName)) {
86
86
  return `${args.options.userName} is not a valid userName.`;
87
87
  }
88
- if (args.options.role && TeamsChatMemberAddCommand.roles.indexOf(args.options.role) < 0) {
89
- return `${args.options.role} is not a valid role. Allowed values are ${TeamsChatMemberAddCommand.roles.join(', ')}`;
88
+ if (args.options.role && _a.roles.indexOf(args.options.role) < 0) {
89
+ return `${args.options.role} is not a valid role. Allowed values are ${_a.roles.join(', ')}`;
90
90
  }
91
91
  if (args.options.visibleHistoryStartDateTime && !validation.isValidISODateTime(args.options.visibleHistoryStartDateTime)) {
92
92
  return `'${args.options.visibleHistoryStartDateTime}' is not a valid visibleHistoryStartDateTime.`;
@@ -4,7 +4,6 @@ var __classPrivateFieldGet = (this && this.__classPrivateFieldGet) || function (
4
4
  return kind === "m" ? f : kind === "a" ? f.call(receiver) : f ? f.value : state.get(receiver);
5
5
  };
6
6
  var _TeamsChatMessageSendCommand_instances, _TeamsChatMessageSendCommand_initTelemetry, _TeamsChatMessageSendCommand_initOptions, _TeamsChatMessageSendCommand_initValidators, _TeamsChatMessageSendCommand_initOptionSets;
7
- import os from 'os';
8
7
  import auth from '../../../../Auth.js';
9
8
  import request from '../../../../request.js';
10
9
  import { accessToken } from '../../../../utils/accessToken.js';
@@ -12,6 +11,8 @@ import { validation } from '../../../../utils/validation.js';
12
11
  import GraphCommand from '../../../base/GraphCommand.js';
13
12
  import commands from '../../commands.js';
14
13
  import { chatUtil } from './chatUtil.js';
14
+ import { Cli } from '../../../../cli/Cli.js';
15
+ import { formatting } from '../../../../utils/formatting.js';
15
16
  class TeamsChatMessageSendCommand extends GraphCommand {
16
17
  get name() {
17
18
  return commands.CHAT_MESSAGE_SEND;
@@ -55,10 +56,9 @@ class TeamsChatMessageSendCommand extends GraphCommand {
55
56
  if (existingChats.length === 1) {
56
57
  return existingChats[0].id;
57
58
  }
58
- const disambiguationText = existingChats.map(c => {
59
- return `- ${c.id}${c.topic && ' - '}${c.topic} - ${c.createdDateTime && new Date(c.createdDateTime).toLocaleString()}`;
60
- }).join(os.EOL);
61
- throw `Multiple chat conversations with this name found. Please disambiguate:${os.EOL}${disambiguationText}`;
59
+ const resultAsKeyValuePair = formatting.convertArrayToHashTable('id', existingChats);
60
+ const result = await Cli.handleMultipleResultsFound(`Multiple chat conversations with this name found.`, resultAsKeyValuePair);
61
+ return result.id;
62
62
  }
63
63
  async getChatIdByName(chatName) {
64
64
  const existingChats = await chatUtil.findExistingGroupChatsByName(chatName);
@@ -68,11 +68,9 @@ class TeamsChatMessageSendCommand extends GraphCommand {
68
68
  if (existingChats.length === 1) {
69
69
  return existingChats[0].id;
70
70
  }
71
- const disambiguationText = existingChats.map(c => {
72
- const memberstring = c.members.map(m => m.email).join(', ');
73
- return `- ${c.id} - ${c.createdDateTime && new Date(c.createdDateTime).toLocaleString()} - ${memberstring}`;
74
- }).join(os.EOL);
75
- throw `Multiple chat conversations with this name found. Please disambiguate:${os.EOL}${disambiguationText}`;
71
+ const resultAsKeyValuePair = formatting.convertArrayToHashTable('id', existingChats);
72
+ const result = await Cli.handleMultipleResultsFound(`Multiple chat conversations with this name found.`, resultAsKeyValuePair);
73
+ return result.id;
76
74
  }
77
75
  // This Microsoft Graph API request throws an intermittent 404 exception, saying that it cannot find the principal.
78
76
  // The same behavior occurs when creating the conversation through the Graph Explorer.
@@ -3,7 +3,7 @@ var __classPrivateFieldGet = (this && this.__classPrivateFieldGet) || function (
3
3
  if (typeof state === "function" ? receiver !== state || !f : !state.has(receiver)) throw new TypeError("Cannot read private member from an object whose class did not declare it");
4
4
  return kind === "m" ? f : kind === "a" ? f.call(receiver) : f ? f.value : state.get(receiver);
5
5
  };
6
- var _TeamsFunSettingsSetCommand_instances, _TeamsFunSettingsSetCommand_initTelemetry, _TeamsFunSettingsSetCommand_initOptions, _TeamsFunSettingsSetCommand_initTypes, _TeamsFunSettingsSetCommand_initValidators;
6
+ var _TeamsFunSettingsSetCommand_instances, _a, _TeamsFunSettingsSetCommand_initTelemetry, _TeamsFunSettingsSetCommand_initOptions, _TeamsFunSettingsSetCommand_initTypes, _TeamsFunSettingsSetCommand_initValidators;
7
7
  import request from '../../../../request.js';
8
8
  import { formatting } from '../../../../utils/formatting.js';
9
9
  import { validation } from '../../../../utils/validation.js';
@@ -32,7 +32,7 @@ class TeamsFunSettingsSetCommand extends GraphCommand {
32
32
  const data = {
33
33
  funSettings: {}
34
34
  };
35
- TeamsFunSettingsSetCommand.booleanProps.forEach(p => {
35
+ _a.booleanProps.forEach(p => {
36
36
  if (typeof args.options[p] !== 'undefined') {
37
37
  data.funSettings[p] = args.options[p];
38
38
  }
@@ -55,12 +55,12 @@ class TeamsFunSettingsSetCommand extends GraphCommand {
55
55
  }
56
56
  }
57
57
  }
58
- _TeamsFunSettingsSetCommand_instances = new WeakSet(), _TeamsFunSettingsSetCommand_initTelemetry = function _TeamsFunSettingsSetCommand_initTelemetry() {
58
+ _a = TeamsFunSettingsSetCommand, _TeamsFunSettingsSetCommand_instances = new WeakSet(), _TeamsFunSettingsSetCommand_initTelemetry = function _TeamsFunSettingsSetCommand_initTelemetry() {
59
59
  this.telemetry.push((args) => {
60
60
  Object.assign(this.telemetryProperties, {
61
61
  giphyContentRating: args.options.giphyContentRating
62
62
  });
63
- TeamsFunSettingsSetCommand.booleanProps.forEach(p => {
63
+ _a.booleanProps.forEach(p => {
64
64
  this.telemetryProperties[p] = args.options[p];
65
65
  });
66
66
  });
@@ -3,7 +3,7 @@ var __classPrivateFieldGet = (this && this.__classPrivateFieldGet) || function (
3
3
  if (typeof state === "function" ? receiver !== state || !f : !state.has(receiver)) throw new TypeError("Cannot read private member from an object whose class did not declare it");
4
4
  return kind === "m" ? f : kind === "a" ? f.call(receiver) : f ? f.value : state.get(receiver);
5
5
  };
6
- var _TeamsGuestSettingsSetCommand_instances, _TeamsGuestSettingsSetCommand_initTelemetry, _TeamsGuestSettingsSetCommand_initOptions, _TeamsGuestSettingsSetCommand_initTypes, _TeamsGuestSettingsSetCommand_initValidators;
6
+ var _TeamsGuestSettingsSetCommand_instances, _a, _TeamsGuestSettingsSetCommand_initTelemetry, _TeamsGuestSettingsSetCommand_initOptions, _TeamsGuestSettingsSetCommand_initTypes, _TeamsGuestSettingsSetCommand_initValidators;
7
7
  import request from '../../../../request.js';
8
8
  import { formatting } from '../../../../utils/formatting.js';
9
9
  import { validation } from '../../../../utils/validation.js';
@@ -28,7 +28,7 @@ class TeamsGuestSettingsSetCommand extends GraphCommand {
28
28
  const data = {
29
29
  guestSettings: {}
30
30
  };
31
- TeamsGuestSettingsSetCommand.booleanProps.forEach(p => {
31
+ _a.booleanProps.forEach(p => {
32
32
  if (typeof args.options[p] !== 'undefined') {
33
33
  data.guestSettings[p] = args.options[p];
34
34
  }
@@ -49,9 +49,9 @@ class TeamsGuestSettingsSetCommand extends GraphCommand {
49
49
  }
50
50
  }
51
51
  }
52
- _TeamsGuestSettingsSetCommand_instances = new WeakSet(), _TeamsGuestSettingsSetCommand_initTelemetry = function _TeamsGuestSettingsSetCommand_initTelemetry() {
52
+ _a = TeamsGuestSettingsSetCommand, _TeamsGuestSettingsSetCommand_instances = new WeakSet(), _TeamsGuestSettingsSetCommand_initTelemetry = function _TeamsGuestSettingsSetCommand_initTelemetry() {
53
53
  this.telemetry.push((args) => {
54
- TeamsGuestSettingsSetCommand.booleanProps.forEach(p => {
54
+ _a.booleanProps.forEach(p => {
55
55
  this.telemetryProperties[p] = args.options[p];
56
56
  });
57
57
  });
@@ -3,7 +3,7 @@ var __classPrivateFieldGet = (this && this.__classPrivateFieldGet) || function (
3
3
  if (typeof state === "function" ? receiver !== state || !f : !state.has(receiver)) throw new TypeError("Cannot read private member from an object whose class did not declare it");
4
4
  return kind === "m" ? f : kind === "a" ? f.call(receiver) : f ? f.value : state.get(receiver);
5
5
  };
6
- var _TeamsMemberSettingsSetCommand_instances, _TeamsMemberSettingsSetCommand_initTelemetry, _TeamsMemberSettingsSetCommand_initOptions, _TeamsMemberSettingsSetCommand_initTypes, _TeamsMemberSettingsSetCommand_initValidators;
6
+ var _TeamsMemberSettingsSetCommand_instances, _a, _TeamsMemberSettingsSetCommand_initTelemetry, _TeamsMemberSettingsSetCommand_initOptions, _TeamsMemberSettingsSetCommand_initTypes, _TeamsMemberSettingsSetCommand_initValidators;
7
7
  import request from '../../../../request.js';
8
8
  import { formatting } from '../../../../utils/formatting.js';
9
9
  import { validation } from '../../../../utils/validation.js';
@@ -28,7 +28,7 @@ class TeamsMemberSettingsSetCommand extends GraphCommand {
28
28
  const data = {
29
29
  memberSettings: {}
30
30
  };
31
- TeamsMemberSettingsSetCommand.booleanProps.forEach(p => {
31
+ _a.booleanProps.forEach(p => {
32
32
  if (typeof args.options[p] !== 'undefined') {
33
33
  data.memberSettings[p] = args.options[p];
34
34
  }
@@ -49,9 +49,9 @@ class TeamsMemberSettingsSetCommand extends GraphCommand {
49
49
  }
50
50
  }
51
51
  }
52
- _TeamsMemberSettingsSetCommand_instances = new WeakSet(), _TeamsMemberSettingsSetCommand_initTelemetry = function _TeamsMemberSettingsSetCommand_initTelemetry() {
52
+ _a = TeamsMemberSettingsSetCommand, _TeamsMemberSettingsSetCommand_instances = new WeakSet(), _TeamsMemberSettingsSetCommand_initTelemetry = function _TeamsMemberSettingsSetCommand_initTelemetry() {
53
53
  this.telemetry.push((args) => {
54
- TeamsMemberSettingsSetCommand.booleanProps.forEach(p => {
54
+ _a.booleanProps.forEach(p => {
55
55
  this.telemetryProperties[p] = args.options[p];
56
56
  });
57
57
  });
@@ -3,7 +3,7 @@ var __classPrivateFieldGet = (this && this.__classPrivateFieldGet) || function (
3
3
  if (typeof state === "function" ? receiver !== state || !f : !state.has(receiver)) throw new TypeError("Cannot read private member from an object whose class did not declare it");
4
4
  return kind === "m" ? f : kind === "a" ? f.call(receiver) : f ? f.value : state.get(receiver);
5
5
  };
6
- var _TeamsMessagingSettingsSetCommand_instances, _TeamsMessagingSettingsSetCommand_initTelemetry, _TeamsMessagingSettingsSetCommand_initOptions, _TeamsMessagingSettingsSetCommand_initTypes, _TeamsMessagingSettingsSetCommand_initValidators;
6
+ var _TeamsMessagingSettingsSetCommand_instances, _a, _TeamsMessagingSettingsSetCommand_initTelemetry, _TeamsMessagingSettingsSetCommand_initOptions, _TeamsMessagingSettingsSetCommand_initTypes, _TeamsMessagingSettingsSetCommand_initValidators;
7
7
  import request from '../../../../request.js';
8
8
  import { formatting } from '../../../../utils/formatting.js';
9
9
  import { validation } from '../../../../utils/validation.js';
@@ -28,7 +28,7 @@ class TeamsMessagingSettingsSetCommand extends GraphCommand {
28
28
  const data = {
29
29
  messagingSettings: {}
30
30
  };
31
- TeamsMessagingSettingsSetCommand.booleanProps.forEach((p) => {
31
+ _a.booleanProps.forEach((p) => {
32
32
  if (typeof args.options[p] !== 'undefined') {
33
33
  data.messagingSettings[p] = args.options[p];
34
34
  }
@@ -49,9 +49,9 @@ class TeamsMessagingSettingsSetCommand extends GraphCommand {
49
49
  }
50
50
  }
51
51
  }
52
- _TeamsMessagingSettingsSetCommand_instances = new WeakSet(), _TeamsMessagingSettingsSetCommand_initTelemetry = function _TeamsMessagingSettingsSetCommand_initTelemetry() {
52
+ _a = TeamsMessagingSettingsSetCommand, _TeamsMessagingSettingsSetCommand_instances = new WeakSet(), _TeamsMessagingSettingsSetCommand_initTelemetry = function _TeamsMessagingSettingsSetCommand_initTelemetry() {
53
53
  this.telemetry.push((args) => {
54
- TeamsMessagingSettingsSetCommand.booleanProps.forEach((p) => {
54
+ _a.booleanProps.forEach((p) => {
55
55
  this.telemetryProperties[p] = args.options[p];
56
56
  });
57
57
  });
@@ -83,7 +83,7 @@ _TeamsMessagingSettingsSetCommand_instances = new WeakSet(), _TeamsMessagingSett
83
83
  }
84
84
  let hasDuplicate = false;
85
85
  let property = '';
86
- TeamsMessagingSettingsSetCommand.booleanProps.forEach((prop) => {
86
+ _a.booleanProps.forEach((prop) => {
87
87
  if (args.options[prop] instanceof Array) {
88
88
  property = prop;
89
89
  hasDuplicate = true;
@@ -3,7 +3,7 @@ var __classPrivateFieldGet = (this && this.__classPrivateFieldGet) || function (
3
3
  if (typeof state === "function" ? receiver !== state || !f : !state.has(receiver)) throw new TypeError("Cannot read private member from an object whose class did not declare it");
4
4
  return kind === "m" ? f : kind === "a" ? f.call(receiver) : f ? f.value : state.get(receiver);
5
5
  };
6
- var _TeamsTeamCloneCommand_instances, _TeamsTeamCloneCommand_initTelemetry, _TeamsTeamCloneCommand_initOptions, _TeamsTeamCloneCommand_initValidators, _TeamsTeamCloneCommand_initOptionSets;
6
+ var _TeamsTeamCloneCommand_instances, _TeamsTeamCloneCommand_initTelemetry, _TeamsTeamCloneCommand_initOptions, _TeamsTeamCloneCommand_initValidators;
7
7
  import request from '../../../../request.js';
8
8
  import { formatting } from '../../../../utils/formatting.js';
9
9
  import { validation } from '../../../../utils/validation.js';
@@ -22,7 +22,6 @@ class TeamsTeamCloneCommand extends GraphCommand {
22
22
  __classPrivateFieldGet(this, _TeamsTeamCloneCommand_instances, "m", _TeamsTeamCloneCommand_initTelemetry).call(this);
23
23
  __classPrivateFieldGet(this, _TeamsTeamCloneCommand_instances, "m", _TeamsTeamCloneCommand_initOptions).call(this);
24
24
  __classPrivateFieldGet(this, _TeamsTeamCloneCommand_instances, "m", _TeamsTeamCloneCommand_initValidators).call(this);
25
- __classPrivateFieldGet(this, _TeamsTeamCloneCommand_instances, "m", _TeamsTeamCloneCommand_initOptionSets).call(this);
26
25
  }
27
26
  async commandAction(logger, args) {
28
27
  const data = {
@@ -42,7 +41,7 @@ class TeamsTeamCloneCommand extends GraphCommand {
42
41
  const requestOptions = {
43
42
  url: `${this.resource}/v1.0/teams/${formatting.encodeQueryParameter(args.options.id)}/clone`,
44
43
  headers: {
45
- "content-type": "application/json",
44
+ 'content-type': 'application/json',
46
45
  accept: 'application/json;odata.metadata=none'
47
46
  },
48
47
  responseType: 'json',
@@ -75,16 +74,14 @@ _TeamsTeamCloneCommand_instances = new WeakSet(), _TeamsTeamCloneCommand_initTel
75
74
  Object.assign(this.telemetryProperties, {
76
75
  description: typeof args.options.description !== 'undefined',
77
76
  classification: typeof args.options.classification !== 'undefined',
78
- visibility: typeof args.options.visibility !== 'undefined',
79
- id: typeof args.options.id !== 'undefined',
80
- name: typeof args.options.name !== 'undefined'
77
+ visibility: typeof args.options.visibility !== 'undefined'
81
78
  });
82
79
  });
83
80
  }, _TeamsTeamCloneCommand_initOptions = function _TeamsTeamCloneCommand_initOptions() {
84
81
  this.options.unshift({
85
- option: '-i, --id [id]'
82
+ option: '-i, --id <id>'
86
83
  }, {
87
- option: '-n, --name [name]'
84
+ option: '-n, --name <name>'
88
85
  }, {
89
86
  option: '-p, --partsToClone <partsToClone>',
90
87
  autocomplete: ['apps', 'channels', 'members', 'settings', 'tabs']
@@ -121,8 +118,6 @@ _TeamsTeamCloneCommand_instances = new WeakSet(), _TeamsTeamCloneCommand_initTel
121
118
  }
122
119
  return true;
123
120
  });
124
- }, _TeamsTeamCloneCommand_initOptionSets = function _TeamsTeamCloneCommand_initOptionSets() {
125
- this.optionSets.push({ options: ['id', 'name'] });
126
121
  };
127
122
  export default new TeamsTeamCloneCommand();
128
123
  //# sourceMappingURL=team-clone.js.map