@pnp/cli-microsoft365 6.5.0-beta.b69bf55 → 6.5.0-beta.f8b8018

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.
package/README.md CHANGED
@@ -15,8 +15,8 @@
15
15
  alt="GitHub" />
16
16
  </a>
17
17
 
18
- <a href="https://discord.gg/35HTFJ544b">
19
- <img src="https://img.shields.io/badge/Discord-Join-7289da?style=flat-square"
18
+ <a href="https://aka.ms/cli-m365/discord">
19
+ <img src="https://img.shields.io/badge/Discord-aka.ms/cli--m365/discord-7289da?style=flat-square"
20
20
  alt="Discord" />
21
21
  </a>
22
22
 
@@ -219,7 +219,7 @@ Checkout our [Wiki](https://github.com/pnp/cli-microsoft365/wiki) for guides on
219
219
  Join our community
220
220
  </h4>
221
221
  <p align="center">
222
- <a href="https://discord.gg/35HTFJ544b">
222
+ <a href="https://aka.ms/cli-m365/discord">
223
223
  <img alt="Discord" src="./docs/docs/images/discord-logo.png" width="100"/>
224
224
  </a>
225
225
  </p>
@@ -20,9 +20,9 @@ const path = require("path");
20
20
  const request_1 = require("../../../request");
21
21
  const formatting_1 = require("../../../utils/formatting");
22
22
  const validation_1 = require("../../../utils/validation");
23
- const AzmgmtCommand_1 = require("../../base/AzmgmtCommand");
23
+ const PowerPlatformCommand_1 = require("../../base/PowerPlatformCommand");
24
24
  const commands_1 = require("../commands");
25
- class FlowExportCommand extends AzmgmtCommand_1.default {
25
+ class FlowExportCommand extends PowerPlatformCommand_1.default {
26
26
  get name() {
27
27
  return commands_1.default.EXPORT;
28
28
  }
@@ -52,7 +52,7 @@ class FlowExportCommand extends AzmgmtCommand_1.default {
52
52
  }
53
53
  else {
54
54
  const requestOptions = {
55
- url: `https://api.bap.microsoft.com/providers/Microsoft.BusinessAppPlatform/environments/${formatting_1.formatting.encodeQueryParameter(args.options.environmentName)}/listPackageResources?api-version=2016-11-01`,
55
+ url: `${this.resource}/providers/Microsoft.BusinessAppPlatform/environments/${formatting_1.formatting.encodeQueryParameter(args.options.environmentName)}/listPackageResources?api-version=2016-11-01`,
56
56
  headers: {
57
57
  accept: 'application/json'
58
58
  },
@@ -73,8 +73,8 @@ class FlowExportCommand extends AzmgmtCommand_1.default {
73
73
  }
74
74
  let requestOptions = {
75
75
  url: formatArgument === 'json' ?
76
- `${this.resource}providers/Microsoft.ProcessSimple/environments/${formatting_1.formatting.encodeQueryParameter(args.options.environmentName)}/flows/${formatting_1.formatting.encodeQueryParameter(args.options.id)}?api-version=2016-11-01`
77
- : `https://api.bap.microsoft.com/providers/Microsoft.BusinessAppPlatform/environments/${formatting_1.formatting.encodeQueryParameter(args.options.environmentName)}/exportPackage?api-version=2016-11-01`,
76
+ `https://management.azure.com/providers/Microsoft.ProcessSimple/environments/${formatting_1.formatting.encodeQueryParameter(args.options.environmentName)}/flows/${formatting_1.formatting.encodeQueryParameter(args.options.id)}?api-version=2016-11-01`
77
+ : `${this.resource}/providers/Microsoft.BusinessAppPlatform/environments/${formatting_1.formatting.encodeQueryParameter(args.options.environmentName)}/exportPackage?api-version=2016-11-01`,
78
78
  headers: {
79
79
  accept: 'application/json'
80
80
  },
@@ -117,7 +117,7 @@ class FlowExportCommand extends AzmgmtCommand_1.default {
117
117
  }
118
118
  requestOptions = {
119
119
  url: formatArgument === 'json' ?
120
- `${this.resource}providers/Microsoft.ProcessSimple/environments/${formatting_1.formatting.encodeQueryParameter(args.options.environmentName)}/flows/${formatting_1.formatting.encodeQueryParameter(args.options.id)}/exportToARMTemplate?api-version=2016-11-01`
120
+ `https://management.azure.com/providers/Microsoft.ProcessSimple/environments/${formatting_1.formatting.encodeQueryParameter(args.options.environmentName)}/flows/${formatting_1.formatting.encodeQueryParameter(args.options.id)}/exportToARMTemplate?api-version=2016-11-01`
121
121
  : downloadFileUrl,
122
122
  // Set responseType to arraybuffer, otherwise binary data will be encoded
123
123
  // to utf8 and binary data is corrupt
@@ -32,36 +32,36 @@ const FN010010_YORC_sdkVersions_teams_js_1 = require("./rules/FN010010_YORC_sdkV
32
32
  const FN014008_CODE_launch_hostedWorkbench_type_1 = require("./rules/FN014008_CODE_launch_hostedWorkbench_type");
33
33
  const FN014009_CODE_launch_hostedWorkbench_url_1 = require("./rules/FN014009_CODE_launch_hostedWorkbench_url");
34
34
  module.exports = [
35
- new FN001001_DEP_microsoft_sp_core_library_1.FN001001_DEP_microsoft_sp_core_library('1.17.0-beta.3'),
36
- new FN001002_DEP_microsoft_sp_lodash_subset_1.FN001002_DEP_microsoft_sp_lodash_subset('1.17.0-beta.3'),
37
- new FN001003_DEP_microsoft_sp_office_ui_fabric_core_1.FN001003_DEP_microsoft_sp_office_ui_fabric_core('1.17.0-beta.3'),
38
- new FN001004_DEP_microsoft_sp_webpart_base_1.FN001004_DEP_microsoft_sp_webpart_base('1.17.0-beta.3'),
39
- new FN001011_DEP_microsoft_sp_dialog_1.FN001011_DEP_microsoft_sp_dialog('1.17.0-beta.3'),
40
- new FN001012_DEP_microsoft_sp_application_base_1.FN001012_DEP_microsoft_sp_application_base('1.17.0-beta.3'),
41
- new FN001014_DEP_microsoft_sp_listview_extensibility_1.FN001014_DEP_microsoft_sp_listview_extensibility('1.17.0-beta.3'),
42
- new FN001021_DEP_microsoft_sp_property_pane_1.FN001021_DEP_microsoft_sp_property_pane('1.17.0-beta.3'),
43
- new FN001023_DEP_microsoft_sp_component_base_1.FN001023_DEP_microsoft_sp_component_base('1.17.0-beta.3'),
44
- new FN001024_DEP_microsoft_sp_diagnostics_1.FN001024_DEP_microsoft_sp_diagnostics('1.17.0-beta.3'),
45
- new FN001025_DEP_microsoft_sp_dynamic_data_1.FN001025_DEP_microsoft_sp_dynamic_data('1.17.0-beta.3'),
46
- new FN001026_DEP_microsoft_sp_extension_base_1.FN001026_DEP_microsoft_sp_extension_base('1.17.0-beta.3'),
47
- new FN001027_DEP_microsoft_sp_http_1.FN001027_DEP_microsoft_sp_http('1.17.0-beta.3'),
48
- new FN001028_DEP_microsoft_sp_list_subscription_1.FN001028_DEP_microsoft_sp_list_subscription('1.17.0-beta.3'),
49
- new FN001029_DEP_microsoft_sp_loader_1.FN001029_DEP_microsoft_sp_loader('1.17.0-beta.3'),
50
- new FN001030_DEP_microsoft_sp_module_interfaces_1.FN001030_DEP_microsoft_sp_module_interfaces('1.17.0-beta.3'),
51
- new FN001031_DEP_microsoft_sp_odata_types_1.FN001031_DEP_microsoft_sp_odata_types('1.17.0-beta.3'),
52
- new FN001032_DEP_microsoft_sp_page_context_1.FN001032_DEP_microsoft_sp_page_context('1.17.0-beta.3'),
53
- new FN001013_DEP_microsoft_decorators_1.FN001013_DEP_microsoft_decorators('1.17.0-beta.3'),
54
- new FN001034_DEP_microsoft_sp_adaptive_card_extension_base_1.FN001034_DEP_microsoft_sp_adaptive_card_extension_base('1.17.0-beta.3'),
55
- new FN002022_DEVDEP_microsoft_eslint_plugin_spfx_1.FN002022_DEVDEP_microsoft_eslint_plugin_spfx('1.17.0-beta.3'),
56
- new FN002023_DEVDEP_microsoft_eslint_config_spfx_1.FN002023_DEVDEP_microsoft_eslint_config_spfx('1.17.0-beta.3'),
57
- new FN002001_DEVDEP_microsoft_sp_build_web_1.FN002001_DEVDEP_microsoft_sp_build_web('1.17.0-beta.3'),
58
- new FN002002_DEVDEP_microsoft_sp_module_interfaces_1.FN002002_DEVDEP_microsoft_sp_module_interfaces('1.17.0-beta.3'),
35
+ new FN001001_DEP_microsoft_sp_core_library_1.FN001001_DEP_microsoft_sp_core_library('1.17.0-rc.1'),
36
+ new FN001002_DEP_microsoft_sp_lodash_subset_1.FN001002_DEP_microsoft_sp_lodash_subset('1.17.0-rc.1'),
37
+ new FN001003_DEP_microsoft_sp_office_ui_fabric_core_1.FN001003_DEP_microsoft_sp_office_ui_fabric_core('1.17.0-rc.1'),
38
+ new FN001004_DEP_microsoft_sp_webpart_base_1.FN001004_DEP_microsoft_sp_webpart_base('1.17.0-rc.1'),
39
+ new FN001011_DEP_microsoft_sp_dialog_1.FN001011_DEP_microsoft_sp_dialog('1.17.0-rc.1'),
40
+ new FN001012_DEP_microsoft_sp_application_base_1.FN001012_DEP_microsoft_sp_application_base('1.17.0-rc.1'),
41
+ new FN001014_DEP_microsoft_sp_listview_extensibility_1.FN001014_DEP_microsoft_sp_listview_extensibility('1.17.0-rc.1'),
42
+ new FN001021_DEP_microsoft_sp_property_pane_1.FN001021_DEP_microsoft_sp_property_pane('1.17.0-rc.1'),
43
+ new FN001023_DEP_microsoft_sp_component_base_1.FN001023_DEP_microsoft_sp_component_base('1.17.0-rc.1'),
44
+ new FN001024_DEP_microsoft_sp_diagnostics_1.FN001024_DEP_microsoft_sp_diagnostics('1.17.0-rc.1'),
45
+ new FN001025_DEP_microsoft_sp_dynamic_data_1.FN001025_DEP_microsoft_sp_dynamic_data('1.17.0-rc.1'),
46
+ new FN001026_DEP_microsoft_sp_extension_base_1.FN001026_DEP_microsoft_sp_extension_base('1.17.0-rc.1'),
47
+ new FN001027_DEP_microsoft_sp_http_1.FN001027_DEP_microsoft_sp_http('1.17.0-rc.1'),
48
+ new FN001028_DEP_microsoft_sp_list_subscription_1.FN001028_DEP_microsoft_sp_list_subscription('1.17.0-rc.1'),
49
+ new FN001029_DEP_microsoft_sp_loader_1.FN001029_DEP_microsoft_sp_loader('1.17.0-rc.1'),
50
+ new FN001030_DEP_microsoft_sp_module_interfaces_1.FN001030_DEP_microsoft_sp_module_interfaces('1.17.0-rc.1'),
51
+ new FN001031_DEP_microsoft_sp_odata_types_1.FN001031_DEP_microsoft_sp_odata_types('1.17.0-rc.1'),
52
+ new FN001032_DEP_microsoft_sp_page_context_1.FN001032_DEP_microsoft_sp_page_context('1.17.0-rc.1'),
53
+ new FN001013_DEP_microsoft_decorators_1.FN001013_DEP_microsoft_decorators('1.17.0-rc.1'),
54
+ new FN001034_DEP_microsoft_sp_adaptive_card_extension_base_1.FN001034_DEP_microsoft_sp_adaptive_card_extension_base('1.17.0-rc.1'),
55
+ new FN002022_DEVDEP_microsoft_eslint_plugin_spfx_1.FN002022_DEVDEP_microsoft_eslint_plugin_spfx('1.17.0-rc.1'),
56
+ new FN002023_DEVDEP_microsoft_eslint_config_spfx_1.FN002023_DEVDEP_microsoft_eslint_config_spfx('1.17.0-rc.1'),
57
+ new FN002001_DEVDEP_microsoft_sp_build_web_1.FN002001_DEVDEP_microsoft_sp_build_web('1.17.0-rc.1'),
58
+ new FN002002_DEVDEP_microsoft_sp_module_interfaces_1.FN002002_DEVDEP_microsoft_sp_module_interfaces('1.17.0-rc.1'),
59
59
  new FN002020_DEVDEP_microsoft_rush_stack_compiler_4_5_1.FN002020_DEVDEP_microsoft_rush_stack_compiler_4_5('0.4.0'),
60
60
  new FN002024_DEVDEP_eslint_1.FN002024_DEVDEP_eslint('8.7.0'),
61
61
  new FN007002_CFG_S_initialPage_1.FN007002_CFG_S_initialPage('https://{tenantDomain}/_layouts/workbench.aspx'),
62
- new FN010001_YORC_version_1.FN010001_YORC_version('1.17.0-beta.3'),
62
+ new FN010001_YORC_version_1.FN010001_YORC_version('1.17.0-rc.1'),
63
63
  new FN010010_YORC_sdkVersions_teams_js_1.FN010010_YORC_sdkVersions_teams_js('2.9.1'),
64
64
  new FN014008_CODE_launch_hostedWorkbench_type_1.FN014008_CODE_launch_hostedWorkbench_type('edge'),
65
65
  new FN014009_CODE_launch_hostedWorkbench_url_1.FN014009_CODE_launch_hostedWorkbench_url('https://{tenantDomain}/_layouts/workbench.aspx')
66
66
  ];
67
- //# sourceMappingURL=upgrade-1.17.0-beta.3.js.map
67
+ //# sourceMappingURL=upgrade-1.17.0-rc.1.js.map
@@ -77,7 +77,7 @@ class SpfxProjectUpgradeCommand extends base_project_command_1.BaseProjectComman
77
77
  '1.15.2',
78
78
  '1.16.0',
79
79
  '1.16.1',
80
- '1.17.0-beta.3'
80
+ '1.17.0-rc.1'
81
81
  ];
82
82
  __classPrivateFieldGet(this, _SpfxProjectUpgradeCommand_instances, "m", _SpfxProjectUpgradeCommand_initTelemetry).call(this);
83
83
  __classPrivateFieldGet(this, _SpfxProjectUpgradeCommand_instances, "m", _SpfxProjectUpgradeCommand_initOptions).call(this);
@@ -15,11 +15,10 @@ var __classPrivateFieldGet = (this && this.__classPrivateFieldGet) || function (
15
15
  };
16
16
  var _SpoApplicationCustomizerAddCommand_instances, _SpoApplicationCustomizerAddCommand_initOptions, _SpoApplicationCustomizerAddCommand_initTelemetry, _SpoApplicationCustomizerAddCommand_initValidators;
17
17
  Object.defineProperty(exports, "__esModule", { value: true });
18
- const Cli_1 = require("../../../../cli/Cli");
18
+ const request_1 = require("../../../../request");
19
19
  const validation_1 = require("../../../../utils/validation");
20
20
  const SpoCommand_1 = require("../../../base/SpoCommand");
21
21
  const commands_1 = require("../../commands");
22
- const spoCustomActionAddCommand = require("../customaction/customaction-add");
23
22
  class SpoApplicationCustomizerAddCommand extends SpoCommand_1.default {
24
23
  get name() {
25
24
  return commands_1.default.APPLICATIONCUSTOMIZER_ADD;
@@ -39,17 +38,25 @@ class SpoApplicationCustomizerAddCommand extends SpoCommand_1.default {
39
38
  if (this.verbose) {
40
39
  logger.logToStderr(`Adding application customizer with title '${args.options.title}' and clientSideComponentId '${args.options.clientSideComponentId}' to the site`);
41
40
  }
42
- const options = {
43
- webUrl: args.options.webUrl,
44
- name: args.options.title,
45
- title: args.options.title,
46
- clientSideComponentId: args.options.clientSideComponentId,
47
- clientSideComponentProperties: args.options.clientSideComponentProperties || '',
48
- location: 'ClientSideExtension.ApplicationCustomizer',
49
- debug: this.debug,
50
- verbose: this.verbose
41
+ const requestBody = {
42
+ Title: args.options.title,
43
+ Name: args.options.title,
44
+ Location: 'ClientSideExtension.ApplicationCustomizer',
45
+ ClientSideComponentId: args.options.clientSideComponentId
51
46
  };
52
- yield Cli_1.Cli.executeCommand(spoCustomActionAddCommand, { options: Object.assign(Object.assign({}, options), { _: [] }) });
47
+ if (args.options.clientSideComponentProperties) {
48
+ requestBody.ClientSideComponentProperties = args.options.clientSideComponentProperties;
49
+ }
50
+ const scope = args.options.scope || 'Site';
51
+ const requestOptions = {
52
+ url: `${args.options.webUrl}/_api/${scope}/UserCustomActions`,
53
+ headers: {
54
+ accept: 'application/json;odata=nometadata'
55
+ },
56
+ data: requestBody,
57
+ responseType: 'json'
58
+ };
59
+ yield request_1.default.post(requestOptions);
53
60
  });
54
61
  }
55
62
  }
@@ -62,11 +69,14 @@ _SpoApplicationCustomizerAddCommand_instances = new WeakSet(), _SpoApplicationCu
62
69
  option: '-i, --clientSideComponentId <clientSideComponentId>'
63
70
  }, {
64
71
  option: '--clientSideComponentProperties [clientSideComponentProperties]'
72
+ }, {
73
+ option: '-s, --scope [scope]', autocomplete: SpoApplicationCustomizerAddCommand.scopes
65
74
  });
66
75
  }, _SpoApplicationCustomizerAddCommand_initTelemetry = function _SpoApplicationCustomizerAddCommand_initTelemetry() {
67
76
  this.telemetry.push((args) => {
68
77
  Object.assign(this.telemetryProperties, {
69
- clientSideComponentProperties: typeof args.options.clientSideComponentProperties !== 'undefined'
78
+ clientSideComponentProperties: typeof args.options.clientSideComponentProperties !== 'undefined',
79
+ scope: typeof args.options.scope !== 'undefined'
70
80
  });
71
81
  });
72
82
  }, _SpoApplicationCustomizerAddCommand_initValidators = function _SpoApplicationCustomizerAddCommand_initValidators() {
@@ -88,8 +98,12 @@ _SpoApplicationCustomizerAddCommand_instances = new WeakSet(), _SpoApplicationCu
88
98
  return `An error has occurred while parsing clientSideComponentProperties: ${e}`;
89
99
  }
90
100
  }
101
+ if (args.options.scope && SpoApplicationCustomizerAddCommand.scopes.indexOf(args.options.scope) < 0) {
102
+ return `${args.options.scope} is not a valid value for allowedMembers. Valid values are ${SpoApplicationCustomizerAddCommand.scopes.join(', ')}`;
103
+ }
91
104
  return true;
92
105
  }));
93
106
  };
107
+ SpoApplicationCustomizerAddCommand.scopes = ['Site', 'Web'];
94
108
  module.exports = new SpoApplicationCustomizerAddCommand();
95
109
  //# sourceMappingURL=applicationcustomizer-add.js.map
@@ -0,0 +1,72 @@
1
+ "use strict";
2
+ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
3
+ function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
4
+ return new (P || (P = Promise))(function (resolve, reject) {
5
+ function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
6
+ function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
7
+ function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
8
+ step((generator = generator.apply(thisArg, _arguments || [])).next());
9
+ });
10
+ };
11
+ var __classPrivateFieldGet = (this && this.__classPrivateFieldGet) || function (receiver, state, kind, f) {
12
+ if (kind === "a" && !f) throw new TypeError("Private accessor was defined without a getter");
13
+ 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");
14
+ return kind === "m" ? f : kind === "a" ? f.call(receiver) : f ? f.value : state.get(receiver);
15
+ };
16
+ var _SpoApplicationCustomizerListCommand_instances, _SpoApplicationCustomizerListCommand_initOptions, _SpoApplicationCustomizerListCommand_initTelemetry, _SpoApplicationCustomizerListCommand_initValidators;
17
+ Object.defineProperty(exports, "__esModule", { value: true });
18
+ const spo_1 = require("../../../../utils/spo");
19
+ const validation_1 = require("../../../../utils/validation");
20
+ const SpoCommand_1 = require("../../../base/SpoCommand");
21
+ const commands_1 = require("../../commands");
22
+ class SpoApplicationCustomizerListCommand extends SpoCommand_1.default {
23
+ get name() {
24
+ return commands_1.default.APPLICATIONCUSTOMIZER_LIST;
25
+ }
26
+ get description() {
27
+ return 'Get a list of application customizers that are added to a site.';
28
+ }
29
+ defaultProperties() {
30
+ return ['Name', 'Location', 'Scope', 'Id'];
31
+ }
32
+ constructor() {
33
+ super();
34
+ _SpoApplicationCustomizerListCommand_instances.add(this);
35
+ __classPrivateFieldGet(this, _SpoApplicationCustomizerListCommand_instances, "m", _SpoApplicationCustomizerListCommand_initTelemetry).call(this);
36
+ __classPrivateFieldGet(this, _SpoApplicationCustomizerListCommand_instances, "m", _SpoApplicationCustomizerListCommand_initOptions).call(this);
37
+ __classPrivateFieldGet(this, _SpoApplicationCustomizerListCommand_instances, "m", _SpoApplicationCustomizerListCommand_initValidators).call(this);
38
+ }
39
+ commandAction(logger, args) {
40
+ return __awaiter(this, void 0, void 0, function* () {
41
+ if (this.verbose) {
42
+ logger.logToStderr(`Retrieving application customizers...`);
43
+ }
44
+ const applicationCustomizers = yield spo_1.spo.getCustomActions(args.options.webUrl, args.options.scope, `Location eq 'ClientSideExtension.ApplicationCustomizer'`);
45
+ logger.log(applicationCustomizers);
46
+ });
47
+ }
48
+ }
49
+ _SpoApplicationCustomizerListCommand_instances = new WeakSet(), _SpoApplicationCustomizerListCommand_initOptions = function _SpoApplicationCustomizerListCommand_initOptions() {
50
+ this.options.unshift({
51
+ option: '-u, --webUrl <webUrl>'
52
+ }, {
53
+ option: '-s, --scope [scope]',
54
+ autocomplete: SpoApplicationCustomizerListCommand.scopes
55
+ });
56
+ }, _SpoApplicationCustomizerListCommand_initTelemetry = function _SpoApplicationCustomizerListCommand_initTelemetry() {
57
+ this.telemetry.push((args) => {
58
+ Object.assign(this.telemetryProperties, {
59
+ scope: typeof args.options.scope !== 'undefined'
60
+ });
61
+ });
62
+ }, _SpoApplicationCustomizerListCommand_initValidators = function _SpoApplicationCustomizerListCommand_initValidators() {
63
+ this.validators.push((args) => __awaiter(this, void 0, void 0, function* () {
64
+ if (args.options.scope && SpoApplicationCustomizerListCommand.scopes.indexOf(args.options.scope) < 0) {
65
+ return `${args.options.scope} is not a valid scope. Allowed values are ${SpoApplicationCustomizerListCommand.scopes.join(', ')}`;
66
+ }
67
+ return validation_1.validation.isValidSharePointUrl(args.options.webUrl);
68
+ }));
69
+ };
70
+ SpoApplicationCustomizerListCommand.scopes = ['All', 'Site', 'Web'];
71
+ module.exports = new SpoApplicationCustomizerListCommand();
72
+ //# sourceMappingURL=applicationcustomizer-list.js.map
@@ -48,7 +48,8 @@ class SpoCommandSetAddCommand extends SpoCommand_1.default {
48
48
  Title: args.options.title,
49
49
  Location: location,
50
50
  ClientSideComponentId: args.options.clientSideComponentId,
51
- RegistrationId: listType
51
+ RegistrationId: listType,
52
+ RegistrationType: 1
52
53
  };
53
54
  if (args.options.clientSideComponentProperties) {
54
55
  requestBody.ClientSideComponentProperties = args.options.clientSideComponentProperties;
@@ -58,36 +58,39 @@ class SpoCommandSetRemoveCommand extends SpoCommand_1.default {
58
58
  }
59
59
  });
60
60
  }
61
- getCommandSetId(options) {
61
+ getCustomAction(options) {
62
62
  return __awaiter(this, void 0, void 0, function* () {
63
+ let commandSets = [];
63
64
  if (options.id) {
64
- return options.id;
65
+ const commandSet = yield spo_1.spo.getCustomActionById(options.webUrl, options.id, options.scope);
66
+ if (commandSet) {
67
+ commandSets.push(commandSet);
68
+ }
65
69
  }
66
- let commandSets = [];
67
- if (options.title) {
70
+ else if (options.title) {
68
71
  commandSets = yield spo_1.spo.getCustomActions(options.webUrl, options.scope, `(Title eq '${formatting_1.formatting.encodeQueryParameter(options.title)}') and (startswith(Location,'ClientSideExtension.ListViewCommandSet'))`);
69
72
  }
70
73
  else {
71
74
  commandSets = yield spo_1.spo.getCustomActions(options.webUrl, options.scope, `(ClientSideComponentId eq guid'${options.clientSideComponentId}') and (startswith(Location,'ClientSideExtension.ListViewCommandSet'))`);
72
75
  }
73
76
  if (commandSets.length === 0) {
74
- throw `No user commandsets with ${options.title ? `title '${options.title}'` : `ClientSideComponentId '${options.clientSideComponentId}'`} found`;
77
+ throw `No user commandsets with ${options.title && `title '${options.title}'` || options.clientSideComponentId && `ClientSideComponentId '${options.clientSideComponentId}'` || options.id && `id '${options.id}'`} found`;
75
78
  }
76
79
  if (commandSets.length > 1) {
77
80
  throw `Multiple user commandsets with ${options.title ? `title '${options.title}'` : `ClientSideComponentId '${options.clientSideComponentId}'`} found. Please disambiguate using IDs: ${commandSets.map((commandSet) => commandSet.Id).join(', ')}`;
78
81
  }
79
- return commandSets[0].Id;
82
+ return commandSets[0];
80
83
  });
81
84
  }
82
85
  deleteCommandset(args) {
83
86
  return __awaiter(this, void 0, void 0, function* () {
84
87
  if (!args.options.scope) {
85
- args.options.scope = 'Site';
88
+ args.options.scope = 'All';
86
89
  }
87
90
  try {
88
- const id = yield this.getCommandSetId(args.options);
91
+ const customAction = yield this.getCustomAction(args.options);
89
92
  const requestOptions = {
90
- url: `${args.options.webUrl}/_api/${args.options.scope}/UserCustomActions('${formatting_1.formatting.encodeQueryParameter(id)}')`,
93
+ url: `${args.options.webUrl}/_api/${customAction.Scope === 3 ? "Web" : "Site"}/UserCustomActions('${formatting_1.formatting.encodeQueryParameter(customAction.Id)}')`,
91
94
  headers: {
92
95
  accept: 'application/json;odata=nometadata'
93
96
  },
@@ -42,7 +42,7 @@ class SpoCommandSetSetCommand extends SpoCommand_1.default {
42
42
  logger.logToStderr(`Updating ListView Command Set ${args.options.clientSideComponentId} to site '${args.options.webUrl}'...`);
43
43
  }
44
44
  if (!args.options.scope) {
45
- args.options.scope = 'Site';
45
+ args.options.scope = 'All';
46
46
  }
47
47
  const location = this.getLocation(args.options.location ? args.options.location : '');
48
48
  try {
@@ -59,9 +59,9 @@ class SpoCommandSetSetCommand extends SpoCommand_1.default {
59
59
  if (args.options.clientSideComponentProperties) {
60
60
  requestBody.ClientSideComponentProperties = args.options.clientSideComponentProperties;
61
61
  }
62
- const id = yield this.getCommandSetId(args.options);
62
+ const customAction = yield this.getCustomAction(args.options);
63
63
  const requestOptions = {
64
- url: `${args.options.webUrl}/_api/${args.options.scope}/UserCustomActions('${formatting_1.formatting.encodeQueryParameter(id)}')`,
64
+ url: `${args.options.webUrl}/_api/${customAction.Scope === 3 ? "Web" : "Site"}/UserCustomActions('${formatting_1.formatting.encodeQueryParameter(customAction.Id)}')`,
65
65
  headers: {
66
66
  accept: 'application/json;odata=nometadata',
67
67
  'X-HTTP-Method': 'MERGE'
@@ -76,25 +76,28 @@ class SpoCommandSetSetCommand extends SpoCommand_1.default {
76
76
  }
77
77
  });
78
78
  }
79
- getCommandSetId(options) {
79
+ getCustomAction(options) {
80
80
  return __awaiter(this, void 0, void 0, function* () {
81
+ let commandSets = [];
81
82
  if (options.id) {
82
- return options.id;
83
+ const commandSet = yield spo_1.spo.getCustomActionById(options.webUrl, options.id, options.scope);
84
+ if (commandSet) {
85
+ commandSets.push(commandSet);
86
+ }
83
87
  }
84
- let commandSets = [];
85
- if (options.title) {
88
+ else if (options.title) {
86
89
  commandSets = yield spo_1.spo.getCustomActions(options.webUrl, options.scope, `(Title eq '${formatting_1.formatting.encodeQueryParameter(options.title)}') and (startswith(Location,'ClientSideExtension.ListViewCommandSet'))`);
87
90
  }
88
91
  else {
89
92
  commandSets = yield spo_1.spo.getCustomActions(options.webUrl, options.scope, `(ClientSideComponentId eq guid'${options.clientSideComponentId}') and (startswith(Location,'ClientSideExtension.ListViewCommandSet'))`);
90
93
  }
91
94
  if (commandSets.length === 0) {
92
- throw `No user commandsets with ${options.title ? `title '${options.title}'` : `ClientSideComponentId '${options.clientSideComponentId}'`} found`;
95
+ throw `No user commandsets with ${options.title && `title '${options.title}'` || options.clientSideComponentId && `ClientSideComponentId '${options.clientSideComponentId}'` || options.id && `id '${options.id}'`} found`;
93
96
  }
94
97
  if (commandSets.length > 1) {
95
98
  throw `Multiple user commandsets with ${options.title ? `title '${options.title}'` : `ClientSideComponentId '${options.clientSideComponentId}'`} found. Please disambiguate using IDs: ${commandSets.map((commandSet) => commandSet.Id).join(', ')}`;
96
99
  }
97
- return commandSets[0].Id;
100
+ return commandSets[0];
98
101
  });
99
102
  }
100
103
  getLocation(location) {
@@ -14,6 +14,7 @@ exports.default = {
14
14
  APP_UNINSTALL: `${prefix} app uninstall`,
15
15
  APP_UPGRADE: `${prefix} app upgrade`,
16
16
  APPLICATIONCUSTOMIZER_ADD: `${prefix} applicationcustomizer add`,
17
+ APPLICATIONCUSTOMIZER_LIST: `${prefix} applicationcustomizer list`,
17
18
  APPPAGE_ADD: `${prefix} apppage add`,
18
19
  APPPAGE_SET: `${prefix} apppage set`,
19
20
  CDN_GET: `${prefix} cdn get`,
@@ -26,6 +26,9 @@ class TeamsTeamListCommand extends GraphCommand_1.default {
26
26
  get description() {
27
27
  return 'Lists Microsoft Teams in the current tenant';
28
28
  }
29
+ defaultProperties() {
30
+ return ['id', 'displayName', 'isArchived', 'description'];
31
+ }
29
32
  constructor() {
30
33
  super();
31
34
  _TeamsTeamListCommand_instances.add(this);
@@ -67,12 +70,7 @@ class TeamsTeamListCommand extends GraphCommand_1.default {
67
70
  request_1.default
68
71
  .get(requestOptions)
69
72
  .then((res) => {
70
- resolve({
71
- id: group.id,
72
- displayName: group.displayName,
73
- isArchived: res.isArchived,
74
- description: group.description
75
- });
73
+ resolve(res);
76
74
  }, (err) => {
77
75
  // If the user is not member of the team he/she cannot access it
78
76
  if (err.statusCode === 403) {
@@ -108,6 +108,15 @@ class TodoTaskSetCommand extends GraphCommand_1.default {
108
108
  if (options.reminderDateTime) {
109
109
  requestBody.reminderDateTime = this.getDateTimeTimeZone(options.reminderDateTime);
110
110
  }
111
+ if (options.categories) {
112
+ requestBody.categories = options.categories.split(',');
113
+ }
114
+ if (options.completedDateTime) {
115
+ requestBody.completedDateTime = this.getDateTimeTimeZone(options.completedDateTime);
116
+ }
117
+ if (options.startDateTime) {
118
+ requestBody.startDateTime = this.getDateTimeTimeZone(options.startDateTime);
119
+ }
111
120
  return requestBody;
112
121
  }
113
122
  }
@@ -122,7 +131,10 @@ _TodoTaskSetCommand_instances = new WeakSet(), _TodoTaskSetCommand_initTelemetry
122
131
  bodyContentType: args.options.bodyContentType,
123
132
  dueDateTime: typeof args.options.dueDateTime !== 'undefined',
124
133
  importance: args.options.importance,
125
- reminderDateTime: typeof args.options.reminderDateTime !== 'undefined'
134
+ reminderDateTime: typeof args.options.reminderDateTime !== 'undefined',
135
+ categories: typeof args.options.categories !== 'undefined',
136
+ completedDateTime: typeof args.options.completedDateTime !== 'undefined',
137
+ startDateTime: typeof args.options.startDateTime !== 'undefined'
126
138
  });
127
139
  });
128
140
  }, _TodoTaskSetCommand_initOptions = function _TodoTaskSetCommand_initOptions() {
@@ -149,6 +161,12 @@ _TodoTaskSetCommand_instances = new WeakSet(), _TodoTaskSetCommand_initTelemetry
149
161
  autocomplete: ['low', 'normal', 'high']
150
162
  }, {
151
163
  option: '--reminderDateTime [reminderDateTime]'
164
+ }, {
165
+ option: '--categories [categories]'
166
+ }, {
167
+ option: '--completedDateTime [completedDateTime]'
168
+ }, {
169
+ option: '--startDateTime [startDateTime]'
152
170
  });
153
171
  }, _TodoTaskSetCommand_initValidators = function _TodoTaskSetCommand_initValidators() {
154
172
  this.validators.push((args) => __awaiter(this, void 0, void 0, function* () {
@@ -172,6 +190,12 @@ _TodoTaskSetCommand_instances = new WeakSet(), _TodoTaskSetCommand_initTelemetry
172
190
  if (args.options.reminderDateTime && !validation_1.validation.isValidISODateTime(args.options.reminderDateTime)) {
173
191
  return `'${args.options.reminderDateTime}' is not a valid ISO date string`;
174
192
  }
193
+ if (args.options.completedDateTime && !validation_1.validation.isValidISODateTime(args.options.completedDateTime)) {
194
+ return `'${args.options.completedDateTime}' is not a valid datetime.`;
195
+ }
196
+ if (args.options.startDateTime && !validation_1.validation.isValidISODateTime(args.options.startDateTime)) {
197
+ return `'${args.options.startDateTime}' is not a valid datetime.`;
198
+ }
175
199
  return true;
176
200
  }));
177
201
  }, _TodoTaskSetCommand_initOptionSets = function _TodoTaskSetCommand_initOptionSets() {
package/dist/utils/md.js CHANGED
@@ -1,17 +1,18 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.md = void 0;
4
+ const chalk = require("chalk");
4
5
  const fs = require("fs");
5
6
  const os_1 = require("os");
6
7
  const path = require("path");
7
8
  function convertTitle(md) {
8
9
  return md.replace(/^#\s+(.*)/gm, (match, title) => {
9
- return title.toLocaleUpperCase() + os_1.EOL + Array(title.length + 1).join('=');
10
+ return chalk.bold(title.toLocaleUpperCase()) + os_1.EOL + Array(title.length + 1).join('=');
10
11
  });
11
12
  }
12
13
  function convertHeadings(md) {
13
14
  return md.replace(/^(#+)\s+(.*)/gm, (match, level, content) => {
14
- return `${os_1.EOL}${content.toLocaleUpperCase()}`;
15
+ return `${os_1.EOL}${chalk.bold(content.toLocaleUpperCase())}`;
15
16
  });
16
17
  }
17
18
  function convertAdmonitions(md) {
@@ -31,7 +32,7 @@ function convertDd(md) {
31
32
  });
32
33
  }
33
34
  function convertHyperlinks(md) {
34
- return md.replace(/\[([^\]]+)\]\(([^\)]+)\)/gm, (match, label, url) => {
35
+ return md.replace(/(?!\[1m)(?!\[22m)\[([^\]]+)\]\(([^\)]+)\)/gm, (match, label, url) => {
35
36
  // if the link is the same as the content, return just the link
36
37
  if (label === url) {
37
38
  return url;
@@ -22,6 +22,9 @@ m365 spo applicationcustomizer add [options]
22
22
  `--clientSideComponentProperties [clientSideComponentProperties]`
23
23
  : JSON string with application customizer properties
24
24
 
25
+ `-s, --scope [scope]`
26
+ : Scope of the application customizer. Allowed values: `Site`, `Web`. Defaults to `Site`.
27
+
25
28
  --8<-- "docs/cmd/_global.md"
26
29
 
27
30
  ## Remarks
@@ -48,7 +51,7 @@ m365 spo applicationcustomizer add --title 'Some customizer' --clientSideCompone
48
51
  Adds an application customizer to the sales site with some properties.
49
52
 
50
53
  ```sh
51
- m365 spo applicationcustomizer add --title 'Some customizer' --clientSideComponentId 799883f5-7962-4384-a10a-105adaec6ffc --clientSideComponentProperties '{ "someProperty": "Some value" }' --webUrl https://contoso.sharepoint.com/sites/sales
54
+ m365 spo applicationcustomizer add --title 'Some customizer' --clientSideComponentId 799883f5-7962-4384-a10a-105adaec6ffc --clientSideComponentProperties '{ "someProperty": "Some value" }' --webUrl https://contoso.sharepoint.com/sites/sales --scope 'Site'
52
55
  ```
53
56
 
54
57
  ## Response
@@ -0,0 +1,109 @@
1
+ # spo applicationcustomizer list
2
+
3
+ Get a list of application customizers that are added to a site.
4
+
5
+ ## Usage
6
+
7
+ ```sh
8
+ m365 spo applicationcustomizer list [options]
9
+ ```
10
+
11
+ ## Options
12
+
13
+ `-u, --webUrl <webUrl>`
14
+ : The url of the site.
15
+
16
+ `-s, --scope [scope]`
17
+ : Scope of the application customizers. Allowed values `Site`, `Web`, `All`. Defaults to `All`
18
+
19
+ --8<-- "docs/cmd/_global.md"
20
+
21
+ ## Examples
22
+
23
+ Retrieves a list of application customizers.
24
+
25
+ ```sh
26
+ m365 spo applicationcustomizer list --webUrl https://contoso.sharepoint.com/sites/sales
27
+ ```
28
+
29
+ ## Response
30
+
31
+ === "JSON"
32
+
33
+ ```json
34
+ [
35
+ {
36
+ "ClientSideComponentId": "4358e70e-ec3c-4713-beb6-39c88f7621d1",
37
+ "ClientSideComponentProperties": "{\"listTitle\":\"News\",\"listViewTitle\":\"Published News\"}",
38
+ "CommandUIExtension": null,
39
+ "Description": null,
40
+ "Group": null,
41
+ "HostProperties": "",
42
+ "Id": "f405303c-6048-4636-9660-1b7b2cadaef9",
43
+ "ImageUrl": null,
44
+ "Location": "ClientSideExtension.ApplicationCustomizer",
45
+ "Name": "{f405303c-6048-4636-9660-1b7b2cadaef9}",
46
+ "RegistrationId": null,
47
+ "RegistrationType": 0,
48
+ "Rights": {
49
+ "High": 0,
50
+ "Low": 0
51
+ },
52
+ "Scope": 3,
53
+ "ScriptBlock": null,
54
+ "ScriptSrc": null,
55
+ "Sequence": 65536,
56
+ "Title": "NewsTicker",
57
+ "Url": null,
58
+ "VersionOfUserCustomAction": "1.0.1.0"
59
+ }
60
+ ]
61
+ ```
62
+
63
+ === "Text"
64
+
65
+ ```text
66
+ Name Location Scope Id
67
+ -------------------------------------- ----------------------------------------- ----- ------------------------------------
68
+ {f405303c-6048-4636-9660-1b7b2cadaef9} ClientSideExtension.ApplicationCustomizer 3 f405303c-6048-4636-9660-1b7b2cadaef9
69
+ ```
70
+
71
+ === "CSV"
72
+
73
+ ```csv
74
+ Name,Location,Scope,Id
75
+ {f405303c-6048-4636-9660-1b7b2cadaef9},ClientSideExtension.ApplicationCustomizer,3,f405303c-6048-4636-9660-1b7b2cadaef9
76
+ ```
77
+
78
+ === "Markdown"
79
+
80
+ ```md
81
+ # spo applicationcustomizer list --webUrl "https://contoso.sharepoint.com"
82
+
83
+ Date: 28/2/2023
84
+
85
+ ## NewsTicker (f405303c-6048-4636-9660-1b7b2cadaef9)
86
+
87
+ Property | Value
88
+ ---------|-------
89
+ ClientSideComponentId | 4358e70e-ec3c-4713-beb6-39c88f7621d1
90
+ ClientSideComponentProperties | {"listTitle":"News","listViewTitle":"Published News"}
91
+ CommandUIExtension | null
92
+ Description | null
93
+ Group | null
94
+ HostProperties |
95
+ Id | f405303c-6048-4636-9660-1b7b2cadaef9
96
+ ImageUrl | null
97
+ Location | ClientSideExtension.ApplicationCustomizer
98
+ Name | {f405303c-6048-4636-9660-1b7b2cadaef9}
99
+ RegistrationId | null
100
+ RegistrationType | 0
101
+ Rights | {"High":0,"Low":0}
102
+ Scope | 3
103
+ ScriptBlock | null
104
+ ScriptSrc | null
105
+ Sequence | 65536
106
+ Title | NewsTicker
107
+ Url | null
108
+ VersionOfUserCustomAction | 1.0.1.0
109
+ ```
@@ -56,7 +56,7 @@ m365 spo list view remove --webUrl https://contoso.sharepoint.com/sites/project-
56
56
  Remove view with title _MyView_ from a list with url _/sites/project-x/lists/Events_ located in site _https://contoso.sharepoint.com/sites/project-x_
57
57
 
58
58
  ```sh
59
- m365 spo list view remove --webUrl https://contoso.sharepoint.com/sites/project-x --listUrl '/sites/project-x/lists/Events' --viewTitle MyView
59
+ m365 spo list view remove --webUrl https://contoso.sharepoint.com/sites/project-x --listUrl '/sites/project-x/lists/Events' --title MyView
60
60
  ```
61
61
 
62
62
  Remove view with ID _cc27a922-8224-4296-90a5-ebbc54da2e81_ from a list with title _Documents_ located in site _https://contoso.sharepoint.com/sites/project-x_ without being asked for confirmation
@@ -58,13 +58,13 @@ Update view formatting of the specified list view
58
58
  === "PowerShell"
59
59
 
60
60
  ```sh
61
- m365 spo list view set --webUrl https://contoso.sharepoint.com/sites/project-x --listTitle 'My List' --viewTitle 'All items' --CustomFormatter '{\"schema\":\"https://developer.microsoft.com/json-schemas/sp/view-formatting.schema.json\",\"additionalRowClass\": \"=if([$DueDate] &lt;= @now, ''sp-field-severity--severeWarning'', '''')\"}'
61
+ m365 spo list view set --webUrl https://contoso.sharepoint.com/sites/project-x --listTitle 'My List' --title 'All items' --CustomFormatter '{\"schema\":\"https://developer.microsoft.com/json-schemas/sp/view-formatting.schema.json\",\"additionalRowClass\": \"=if([$DueDate] &lt;= @now, ''sp-field-severity--severeWarning'', '''')\"}'
62
62
  ```
63
63
 
64
64
  === "Bash"
65
65
 
66
66
  ```sh
67
- m365 spo list view set --webUrl https://contoso.sharepoint.com/sites/project-x --listTitle 'My List' --viewTitle 'All items' --CustomFormatter "{\"schema\":\"https://developer.microsoft.com/json-schemas/sp/view-formatting.schema.json\",\"additionalRowClass\": \"=if([$DueDate] &lt;= @now, 'sp-field-severity--severeWarning', '')\"}"
67
+ m365 spo list view set --webUrl https://contoso.sharepoint.com/sites/project-x --listTitle 'My List' --title 'All items' --CustomFormatter "{\"schema\":\"https://developer.microsoft.com/json-schemas/sp/view-formatting.schema.json\",\"additionalRowClass\": \"=if([$DueDate] &lt;= @now, 'sp-field-severity--severeWarning', '')\"}"
68
68
  ```
69
69
 
70
70
  ## Response
@@ -37,20 +37,60 @@ m365 teams team list --joined
37
37
 
38
38
  === "JSON"
39
39
 
40
- ``` json
40
+ ```json
41
41
  [
42
42
  {
43
43
  "id": "5dc7ba76-b9aa-4fdd-9e91-9fe7d0e8dca3",
44
+ "createdDateTime": "2022-12-08T09:17:55.039Z",
44
45
  "displayName": "Architecture",
46
+ "description": "Architecture Discussion",
47
+ "internalId": "19:pLknmKPPkvgeaG0FtegLfjoDINeY3gvmitMkNG9H3X41@thread.tacv2",
48
+ "classification": null,
49
+ "specialization": "none",
50
+ "visibility": "public",
51
+ "webUrl": "https://teams.microsoft.com/l/team/19:a5c6eccad3fb401997756a1501d561aa%40thread.skype/conversations?groupId=8090c93e-ba7c-433e-9f39-08c7ba07c0b3&tenantId=dcd219dd-bc68-4b9b-bf0b-4a33a796be35",
45
52
  "isArchived": false,
46
- "description": "Architecture Discussion"
53
+ "isMembershipLimitedToOwners": false,
54
+ "discoverySettings": {
55
+ "showInTeamsSearchAndSuggestions": true
56
+ },
57
+ "memberSettings": {
58
+ "allowCreateUpdateChannels": true,
59
+ "allowCreatePrivateChannels": true,
60
+ "allowDeleteChannels": true,
61
+ "allowAddRemoveApps": true,
62
+ "allowCreateUpdateRemoveTabs": true,
63
+ "allowCreateUpdateRemoveConnectors": true
64
+ },
65
+ "guestSettings": {
66
+ "allowCreateUpdateChannels": false,
67
+ "allowDeleteChannels": false
68
+ },
69
+ "messagingSettings": {
70
+ "allowUserEditMessages": false,
71
+ "allowUserDeleteMessages": false,
72
+ "allowOwnerDeleteMessages": false,
73
+ "allowTeamMentions": true,
74
+ "allowChannelMentions": true
75
+ },
76
+ "funSettings": {
77
+ "allowGiphy": true,
78
+ "giphyContentRating": "moderate",
79
+ "allowStickersAndMemes": true,
80
+ "allowCustomMemes": false
81
+ },
82
+ "summary": {
83
+ "ownersCount": 1,
84
+ "membersCount": 1,
85
+ "guestsCount": 0
86
+ }
47
87
  }
48
88
  ]
49
89
  ```
50
90
 
51
91
  === "Text"
52
92
 
53
- ``` text
93
+ ```text
54
94
  id displayName isArchived description
55
95
  ------------------------------------ ---------------- ---------- ---------------------------------------
56
96
  5dc7ba76-b9aa-4fdd-9e91-9fe7d0e8dca3 Architecture false Architecture Discussion
@@ -58,7 +98,7 @@ m365 teams team list --joined
58
98
 
59
99
  === "CSV"
60
100
 
61
- ``` text
101
+ ```csv
62
102
  id,displayName,isArchived,description
63
103
  5dc7ba76-b9aa-4fdd-9e91-9fe7d0e8dca3,Architecture,,Architecture Discussion
64
104
  ```
@@ -40,8 +40,21 @@ m365 todo task set [options]
40
40
  `--reminderDateTime [reminderDateTime]`
41
41
  : The date and time for a reminder alert of the task to occur. This should be defined as a valid ISO 8601 string in the UTC time zone.
42
42
 
43
+ `--categories [categories]`
44
+ : Comma-separated list of categories associated with the task.
45
+
46
+ `--completedDateTime [completedDateTime]`
47
+ : The date and time when the task was finished. This should be defined as a valid ISO 8601 string. `2021-12-16T18:28:48.6964197Z`
48
+
49
+ `--startDateTime [startDateTime]`
50
+ : The date and time when the task is scheduled to start. This should be defined as a valid ISO 8601 string. `2021-12-16T18:28:48.6964197Z`
51
+
43
52
  --8<-- "docs/cmd/_global.md"
44
53
 
54
+ ## Remarks
55
+
56
+ When you specify the values for `categories`, each category can correspond to the displayName property of an [outlookCategory](https://learn.microsoft.com/en-us/graph/api/resources/outlookcategory?view=graph-rest-1.0). It is permissible to use distinct names.
57
+
45
58
  ## Examples
46
59
 
47
60
  Update a task with title _New task_ to _Update doco_ in Microsoft To Do tasks list with a specific name
@@ -68,6 +81,18 @@ Update a task with due date in Microsoft To Do tasks list with list id
68
81
  m365 todo task set --id "AAMkADU3Y2E0OTMxLTllYTQtNGFlZS1hZGM0LWI1NjZjY2FhM2RhMABGAAAAAADhr7P77n9xS6PdtDemRwpHBwCin1tvQMXzRKN1hQDz2S3VAAAXXsleAACin1tvQMXzRKN1hQDz2S3VAAAXXzr9AAA=" --listId "AQMkADlhMTRkOGEzLWQ1M2QtNGVkNS04NjdmLWU0NzJhMjZmZWNmMwAuAAADKvwNgAMNPE_zFNRJXVrU1wEAhHKQZHItDEOVCn8U3xuA2AABmQeVPwAAAA==" --dueDateTime 2023-01-01
69
82
  ```
70
83
 
84
+ Update a task to Microsoft To Do with several categories
85
+
86
+ ```sh
87
+ m365 todo task set --title "New task" --listName "My task list" --categories "Red category,Important"
88
+ ```
89
+
90
+ Update a task to Microsoft To Do with a start date and set a reminder for the task
91
+
92
+ ```sh
93
+ m365 todo task set --title "New task" --listName "My task list" --startDateTime "2023-12-16T18:28:48.6964197Z" --isReminderOn true
94
+ ```
95
+
71
96
  ## Response
72
97
 
73
98
  === "JSON"
@@ -121,3 +146,28 @@ m365 todo task set --id "AAMkADU3Y2E0OTMxLTllYTQtNGFlZS1hZGM0LWI1NjZjY2FhM2RhMAB
121
146
  importance,isReminderOn,status,title,createdDateTime,lastModifiedDateTime,hasAttachments,categories,id,body,dueDateTime,reminderDateTime
122
147
  high,1,notStarted,Update doco,2022-10-29T11:03:20.9175176Z,2022-10-30T14:09:14.7687057Z,,[],AAMkAGYzNjMxYTU4LTJjZjYtNDlhMi1iMzQ2LWVmMTU3YmUzOGM5MABGAAAAAAAw3-tXgryDSr5p162KnUPKBwDEwEFouXWWT50CfwqSN9cpAAL3xdLTAADEwEFouXWWT50CfwqSN9cpAAL3xhtSAAA=,"{""content"":""I should not forget this"",""contentType"":""text""}","{""dateTime"":""2023-01-01T00:00:00.0000000"",""timeZone"":""UTC""}","{""dateTime"":""2023-01-01T12:00:00.0000000"",""timeZone"":""UTC""}"
123
148
  ```
149
+
150
+ === "Markdown"
151
+
152
+ ```md
153
+ # todo task set --id "AAMkAGYzNjMxYTU4LTJjZjYtNDlhMi1iMzQ2LWVmMTU3YmUzOGM5MABGAAAAAAAw3-tXgryDSr5p162KnUPKBwDEwEFouXWWT50CfwqSN9cpAAL3xdLTAADEwEFouXWWT50CfwqSN9cpAAL3xhtSAAA=" --title "Update doco" --listName "My task list" --status "notStarted"
154
+
155
+ Date: 4/3/2023
156
+
157
+ ## Update doco (AAMkAGYzNjMxYTU4LTJjZjYtNDlhMi1iMzQ2LWVmMTU3YmUzOGM5MABGAAAAAAAw3-tXgryDSr5p162KnUPKBwDEwEFouXWWT50CfwqSN9cpAAL3xdLTAADEwEFouXWWT50CfwqSN9cpAAL3xhtSAAA=)
158
+
159
+ Property | Value
160
+ ---------|-------
161
+ importance | high
162
+ isReminderOn | true
163
+ status | notStarted
164
+ title | Update doco
165
+ createdDateTime | 2022-10-29T11:03:20.9175176Z
166
+ lastModifiedDateTime | 2022-10-30T14:07:03.0718199Z
167
+ hasAttachments | false
168
+ categories | []
169
+ id | AAMkAGYzNjMxYTU4LTJjZjYtNDlhMi1iMzQ2LWVmMTU3YmUzOGM5MABGAAAAAAAw3-tXgryDSr5p162KnUPKBwDEwEFouXWWT50CfwqSN9cpAAL3xdLTAADEwEFouXWWT50CfwqSN9cpAAL3xhtSAAA=
170
+ body | {"content":"I should not forget this","contentType":"text"}
171
+ dueDateTime | {"dateTime": "2023-01-01T00:00:00.0000000","timeZone": "UTC"}
172
+ reminderDateTime | {"dateTime": "2023-01-01T12:00:00.0000000","timeZone": "UTC"}
173
+ ```
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@pnp/cli-microsoft365",
3
- "version": "6.5.0-beta.b69bf55",
3
+ "version": "6.5.0-beta.f8b8018",
4
4
  "description": "Manage Microsoft 365 and SharePoint Framework projects on any platform",
5
5
  "license": "MIT",
6
6
  "main": "./dist/api.js",
@@ -183,6 +183,7 @@
183
183
  "Romão, Douglas <douglas.romao@trentim.com>",
184
184
  "Rozinov, Roman <roman.rozinov@sogeti.com>",
185
185
  "Saatçi, Hüseyin <huseyins@comodo.net>",
186
+ "Sanap, Ganesh <ganeshsanap120694@gmail.com>",
186
187
  "Schaeflein, Paul <paul@schaeflein.net>",
187
188
  "Schot, Albert-Jan <appie@digiwijs.nl>",
188
189
  "Schouten, Robert <robert.schouten@wortell.nl>",