@pnp/cli-microsoft365 5.7.0 → 5.8.0-beta.bc15f2b

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 (128) hide show
  1. package/dist/cli/Cli.js +1 -1
  2. package/dist/m365/aad/commands/app/app-get.js +4 -11
  3. package/dist/m365/aad/commands/app/app-remove.js +4 -11
  4. package/dist/m365/aad/commands/app/app-role-add.js +5 -10
  5. package/dist/m365/aad/commands/app/app-role-list.js +4 -24
  6. package/dist/m365/aad/commands/app/app-role-remove.js +4 -22
  7. package/dist/m365/aad/commands/app/app-set.js +4 -11
  8. package/dist/m365/aad/commands/approleassignment/approleassignment-add.js +4 -8
  9. package/dist/m365/aad/commands/approleassignment/approleassignment-list.js +4 -11
  10. package/dist/m365/aad/commands/approleassignment/approleassignment-remove.js +4 -8
  11. package/dist/m365/aad/commands/groupsettingtemplate/groupsettingtemplate-get.js +4 -7
  12. package/dist/m365/aad/commands/o365group/o365group-conversation-post-list.js +4 -8
  13. package/dist/m365/aad/commands/o365group/o365group-teamify.js +4 -7
  14. package/dist/m365/aad/commands/o365group/o365group-user-add.js +4 -7
  15. package/dist/m365/aad/commands/o365group/o365group-user-remove.js +4 -7
  16. package/dist/m365/aad/commands/o365group/o365group-user-set.js +4 -7
  17. package/dist/m365/aad/commands/sp/sp-add.js +4 -8
  18. package/dist/m365/aad/commands/sp/sp-get.js +4 -8
  19. package/dist/m365/aad/commands/user/user-get.js +4 -9
  20. package/dist/m365/aad/commands/user/user-list.js +13 -2
  21. package/dist/m365/aad/commands/user/user-set.js +4 -7
  22. package/dist/m365/onenote/commands/notebook/notebook-list.js +139 -0
  23. package/dist/m365/onenote/commands.js +7 -0
  24. package/dist/m365/outlook/commands/message/message-list.js +4 -23
  25. package/dist/m365/outlook/commands/message/message-move.js +4 -31
  26. package/dist/m365/pa/commands/app/app-get.js +4 -7
  27. package/dist/m365/planner/commands/bucket/bucket-add.js +4 -7
  28. package/dist/m365/planner/commands/bucket/bucket-list.js +4 -7
  29. package/dist/m365/planner/commands/plan/plan-add.js +4 -7
  30. package/dist/m365/planner/commands/plan/plan-list.js +4 -7
  31. package/dist/m365/planner/commands/task/task-add.js +4 -13
  32. package/dist/m365/planner/commands/task/task-get.js +7 -0
  33. package/dist/m365/pp/commands/managementapp/managementapp-add.js +4 -11
  34. package/dist/m365/spfx/commands/project/project-upgrade/rules/FN010008_YORC_nodeVersion.js +47 -0
  35. package/dist/m365/spfx/commands/project/project-upgrade/rules/FN021003_PKG_engines_node.js +48 -0
  36. package/dist/m365/spfx/commands/project/project-upgrade/upgrade-1.16.0-beta.1.js +61 -0
  37. package/dist/m365/spfx/commands/project/project-upgrade.js +16 -13
  38. package/dist/m365/spo/commands/app/app-deploy.js +4 -7
  39. package/dist/m365/spo/commands/app/app-get.js +4 -7
  40. package/dist/m365/spo/commands/contenttype/contenttype-get.js +4 -7
  41. package/dist/m365/spo/commands/contenttype/contenttype-remove.js +5 -14
  42. package/dist/m365/spo/commands/file/file-checkin.js +4 -7
  43. package/dist/m365/spo/commands/file/file-checkout.js +4 -7
  44. package/dist/m365/spo/commands/file/file-get.js +4 -7
  45. package/dist/m365/spo/commands/file/file-remove.js +4 -7
  46. package/dist/m365/spo/commands/file/file-sharinginfo-get.js +4 -7
  47. package/dist/m365/spo/commands/group/group-remove.js +4 -7
  48. package/dist/m365/spo/commands/group/group-user-add.js +4 -13
  49. package/dist/m365/spo/commands/group/group-user-list.js +4 -7
  50. package/dist/m365/spo/commands/group/group-user-remove.js +4 -7
  51. package/dist/m365/spo/commands/hubsite/hubsite-unregister.js +1 -1
  52. package/dist/m365/spo/commands/list/list-contenttype-add.js +4 -7
  53. package/dist/m365/spo/commands/list/list-contenttype-default-set.js +4 -7
  54. package/dist/m365/spo/commands/list/list-contenttype-list.js +4 -7
  55. package/dist/m365/spo/commands/list/list-contenttype-remove.js +4 -7
  56. package/dist/m365/spo/commands/list/list-get.js +4 -7
  57. package/dist/m365/spo/commands/list/list-label-get.js +4 -7
  58. package/dist/m365/spo/commands/list/list-label-set.js +4 -4
  59. package/dist/m365/spo/commands/list/list-remove.js +4 -7
  60. package/dist/m365/spo/commands/list/list-roleassignment-add.js +9 -0
  61. package/dist/m365/spo/commands/list/list-roleassignment-remove.js +57 -28
  62. package/dist/m365/spo/commands/list/list-sitescript-get.js +4 -7
  63. package/dist/m365/spo/commands/list/list-view-field-add.js +4 -19
  64. package/dist/m365/spo/commands/list/list-view-field-remove.js +4 -19
  65. package/dist/m365/spo/commands/list/list-view-field-set.js +4 -19
  66. package/dist/m365/spo/commands/list/list-view-get.js +4 -10
  67. package/dist/m365/spo/commands/list/list-view-list.js +4 -7
  68. package/dist/m365/spo/commands/list/list-view-remove.js +4 -13
  69. package/dist/m365/spo/commands/list/list-view-set.js +4 -13
  70. package/dist/m365/spo/commands/list/list-webhook-add.js +4 -7
  71. package/dist/m365/spo/commands/list/list-webhook-get.js +4 -7
  72. package/dist/m365/spo/commands/list/list-webhook-remove.js +4 -7
  73. package/dist/m365/spo/commands/list/list-webhook-set.js +4 -7
  74. package/dist/m365/spo/commands/listitem/listitem-add.js +4 -7
  75. package/dist/m365/spo/commands/listitem/listitem-attachment-list.js +4 -7
  76. package/dist/m365/spo/commands/listitem/listitem-get.js +4 -7
  77. package/dist/m365/spo/commands/listitem/listitem-isrecord.js +4 -7
  78. package/dist/m365/spo/commands/listitem/listitem-record-declare.js +4 -7
  79. package/dist/m365/spo/commands/listitem/listitem-record-undeclare.js +4 -7
  80. package/dist/m365/spo/commands/listitem/listitem-remove.js +4 -7
  81. package/dist/m365/spo/commands/listitem/listitem-roleassignment-remove.js +206 -0
  82. package/dist/m365/spo/commands/listitem/listitem-set.js +4 -7
  83. package/dist/m365/spo/commands/site/site-apppermission-add.js +4 -4
  84. package/dist/m365/spo/commands/site/site-apppermission-remove.js +4 -9
  85. package/dist/m365/spo/commands/site/site-apppermission-set.js +4 -4
  86. package/dist/m365/spo/commands/term/term-add.js +4 -7
  87. package/dist/m365/spo/commands/term/term-get.js +4 -7
  88. package/dist/m365/spo/commands/term/term-group-get.js +4 -7
  89. package/dist/m365/spo/commands/term/term-list.js +4 -13
  90. package/dist/m365/spo/commands/term/term-set-add.js +4 -7
  91. package/dist/m365/spo/commands/term/term-set-get.js +4 -13
  92. package/dist/m365/spo/commands/term/term-set-list.js +4 -7
  93. package/dist/m365/spo/commands/user/user-get.js +4 -9
  94. package/dist/m365/spo/commands/user/user-remove.js +4 -7
  95. package/dist/m365/spo/commands/web/web-roleassignment-add.js +187 -0
  96. package/dist/m365/spo/commands/web/web-roleassignment-remove.js +170 -0
  97. package/dist/m365/spo/commands.js +3 -0
  98. package/dist/m365/teams/commands/app/app-install.js +4 -11
  99. package/dist/m365/teams/commands/app/app-update.js +4 -7
  100. package/dist/m365/teams/commands/channel/channel-add.js +4 -7
  101. package/dist/m365/teams/commands/channel/channel-get.js +4 -22
  102. package/dist/m365/teams/commands/channel/channel-list.js +4 -7
  103. package/dist/m365/teams/commands/channel/channel-member-list.js +4 -13
  104. package/dist/m365/teams/commands/channel/channel-member-set.js +4 -21
  105. package/dist/m365/teams/commands/channel/channel-remove.js +4 -7
  106. package/dist/m365/teams/commands/chat/chat-get.js +4 -17
  107. package/dist/m365/teams/commands/chat/chat-message-send.js +4 -17
  108. package/dist/m365/teams/commands/tab/tab-get.js +4 -19
  109. package/dist/m365/teams/commands/team/team-get.js +4 -7
  110. package/dist/m365/teams/commands/user/user-app-list.js +4 -7
  111. package/dist/m365/todo/commands/list/list-remove.js +4 -21
  112. package/dist/m365/todo/commands/list/list-set.js +4 -21
  113. package/dist/m365/todo/commands/task/task-add.js +4 -21
  114. package/dist/m365/todo/commands/task/task-list.js +4 -21
  115. package/dist/m365/todo/commands/task/task-remove.js +4 -21
  116. package/dist/m365/todo/commands/task/task-set.js +4 -7
  117. package/docs/docs/cmd/adaptivecard/adaptivecard-send.md +0 -20
  118. package/docs/docs/cmd/onenote/notebook/notebook-list.md +70 -0
  119. package/docs/docs/cmd/spfx/project/project-upgrade.md +1 -1
  120. package/docs/docs/cmd/spo/hubsite/hubsite-unregister.md +2 -2
  121. package/docs/docs/cmd/spo/list/list-roleassignment-remove.md +3 -0
  122. package/docs/docs/cmd/spo/listitem/listitem-roleassignment-remove.md +67 -0
  123. package/docs/docs/cmd/spo/listitem/listitem-roleinheritance-break.md +6 -6
  124. package/docs/docs/cmd/spo/web/web-roleassignment-add.md +57 -0
  125. package/docs/docs/cmd/spo/web/web-roleassignment-remove.md +54 -0
  126. package/npm-shrinkwrap.json +2 -2
  127. package/package.json +2 -2
  128. package/scripts/Register-CLIM365Completion.ps1 +1 -1
@@ -37,36 +37,56 @@ class SpoListRoleAssignmentRemoveCommand extends SpoCommand_1.default {
37
37
  return 'Removes a role assignment from list permissions';
38
38
  }
39
39
  commandAction(logger, args, cb) {
40
- if (this.verbose) {
41
- logger.logToStderr(`Removing role assignment frm list in site at ${args.options.webUrl}...`);
42
- }
43
- let requestUrl = `${args.options.webUrl}/_api/web/`;
44
- if (args.options.listId) {
45
- requestUrl += `lists(guid'${utils_1.formatting.encodeQueryParameter(args.options.listId)}')/`;
46
- }
47
- else if (args.options.listTitle) {
48
- requestUrl += `lists/getByTitle('${utils_1.formatting.encodeQueryParameter(args.options.listTitle)}')/`;
49
- }
50
- else if (args.options.listUrl) {
51
- const listServerRelativeUrl = utils_1.urlUtil.getServerRelativePath(args.options.webUrl, args.options.listUrl);
52
- requestUrl += `GetList('${utils_1.formatting.encodeQueryParameter(listServerRelativeUrl)}')/`;
53
- }
54
- if (args.options.upn) {
55
- this.GetUserPrincipalId(args.options)
56
- .then((userPrincipalId) => {
57
- args.options.principalId = userPrincipalId;
58
- this.RemoveRoleAssignment(requestUrl, logger, args.options, cb);
59
- }, (err) => this.handleRejectedODataJsonPromise(err, logger, cb));
60
- }
61
- else if (args.options.groupName) {
62
- this.GetGroupPrincipalId(args.options)
63
- .then((groupPrincipalId) => {
64
- args.options.principalId = groupPrincipalId;
40
+ const removeRoleAssignment = () => {
41
+ if (this.verbose) {
42
+ logger.logToStderr(`Removing role assignment from list in site at ${args.options.webUrl}...`);
43
+ }
44
+ let requestUrl = `${args.options.webUrl}/_api/web/`;
45
+ if (args.options.listId) {
46
+ requestUrl += `lists(guid'${utils_1.formatting.encodeQueryParameter(args.options.listId)}')/`;
47
+ }
48
+ else if (args.options.listTitle) {
49
+ requestUrl += `lists/getByTitle('${utils_1.formatting.encodeQueryParameter(args.options.listTitle)}')/`;
50
+ }
51
+ else if (args.options.listUrl) {
52
+ const listServerRelativeUrl = utils_1.urlUtil.getServerRelativePath(args.options.webUrl, args.options.listUrl);
53
+ requestUrl += `GetList('${utils_1.formatting.encodeQueryParameter(listServerRelativeUrl)}')/`;
54
+ }
55
+ if (args.options.upn) {
56
+ this.GetUserPrincipalId(args.options)
57
+ .then((userPrincipalId) => {
58
+ args.options.principalId = userPrincipalId;
59
+ this.RemoveRoleAssignment(requestUrl, logger, args.options, cb);
60
+ }, (err) => this.handleRejectedODataJsonPromise(err, logger, cb));
61
+ }
62
+ else if (args.options.groupName) {
63
+ this.GetGroupPrincipalId(args.options)
64
+ .then((groupPrincipalId) => {
65
+ args.options.principalId = groupPrincipalId;
66
+ this.RemoveRoleAssignment(requestUrl, logger, args.options, cb);
67
+ }, (err) => this.handleRejectedODataJsonPromise(err, logger, cb));
68
+ }
69
+ else {
65
70
  this.RemoveRoleAssignment(requestUrl, logger, args.options, cb);
66
- }, (err) => this.handleRejectedODataJsonPromise(err, logger, cb));
71
+ }
72
+ };
73
+ if (args.options.confirm) {
74
+ removeRoleAssignment();
67
75
  }
68
76
  else {
69
- this.RemoveRoleAssignment(requestUrl, logger, args.options, cb);
77
+ cli_1.Cli.prompt({
78
+ type: 'confirm',
79
+ name: 'continue',
80
+ default: false,
81
+ message: `Are you sure you want to remove role assignment from list ${args.options.listId || args.options.listTitle} from site ${args.options.webUrl}?`
82
+ }, (result) => {
83
+ if (!result.continue) {
84
+ cb();
85
+ }
86
+ else {
87
+ removeRoleAssignment();
88
+ }
89
+ });
70
90
  }
71
91
  }
72
92
  RemoveRoleAssignment(requestUrl, logger, options, cb) {
@@ -125,7 +145,8 @@ _SpoListRoleAssignmentRemoveCommand_instances = new WeakSet(), _SpoListRoleAssig
125
145
  listUrl: typeof args.options.listUrl !== 'undefined',
126
146
  principalId: typeof args.options.principalId !== 'undefined',
127
147
  upn: typeof args.options.upn !== 'undefined',
128
- groupName: typeof args.options.groupName !== 'undefined'
148
+ groupName: typeof args.options.groupName !== 'undefined',
149
+ confirm: (!(!args.options.confirm)).toString()
129
150
  });
130
151
  });
131
152
  }, _SpoListRoleAssignmentRemoveCommand_initOptions = function _SpoListRoleAssignmentRemoveCommand_initOptions() {
@@ -143,6 +164,8 @@ _SpoListRoleAssignmentRemoveCommand_instances = new WeakSet(), _SpoListRoleAssig
143
164
  option: '--upn [upn]'
144
165
  }, {
145
166
  option: '--groupName [groupName]'
167
+ }, {
168
+ option: '--confirm'
146
169
  });
147
170
  }, _SpoListRoleAssignmentRemoveCommand_initValidators = function _SpoListRoleAssignmentRemoveCommand_initValidators() {
148
171
  this.validators.push((args) => __awaiter(this, void 0, void 0, function* () {
@@ -160,10 +183,16 @@ _SpoListRoleAssignmentRemoveCommand_instances = new WeakSet(), _SpoListRoleAssig
160
183
  if (listOptions.some(item => item !== undefined) && listOptions.filter(item => item !== undefined).length > 1) {
161
184
  return `Specify either list id or title or list url`;
162
185
  }
186
+ if (listOptions.filter(item => item !== undefined).length === 0) {
187
+ return `Specify at least list id or title or list url`;
188
+ }
163
189
  const principalOptions = [args.options.principalId, args.options.upn, args.options.groupName];
164
190
  if (principalOptions.some(item => item !== undefined) && principalOptions.filter(item => item !== undefined).length > 1) {
165
191
  return `Specify either principalId id or upn or groupName`;
166
192
  }
193
+ if (principalOptions.filter(item => item !== undefined).length === 0) {
194
+ return `Specify at least principalId id or upn or groupName`;
195
+ }
167
196
  return true;
168
197
  }));
169
198
  };
@@ -13,7 +13,7 @@ var __classPrivateFieldGet = (this && this.__classPrivateFieldGet) || function (
13
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
14
  return kind === "m" ? f : kind === "a" ? f.call(receiver) : f ? f.value : state.get(receiver);
15
15
  };
16
- var _SpoListSiteScriptGetCommand_instances, _SpoListSiteScriptGetCommand_initTelemetry, _SpoListSiteScriptGetCommand_initOptions, _SpoListSiteScriptGetCommand_initValidators;
16
+ var _SpoListSiteScriptGetCommand_instances, _SpoListSiteScriptGetCommand_initTelemetry, _SpoListSiteScriptGetCommand_initOptions, _SpoListSiteScriptGetCommand_initValidators, _SpoListSiteScriptGetCommand_initOptionSets;
17
17
  Object.defineProperty(exports, "__esModule", { value: true });
18
18
  const Command_1 = require("../../../../Command");
19
19
  const request_1 = require("../../../../request");
@@ -27,6 +27,7 @@ class SpoListSiteScriptGetCommand extends SpoCommand_1.default {
27
27
  __classPrivateFieldGet(this, _SpoListSiteScriptGetCommand_instances, "m", _SpoListSiteScriptGetCommand_initTelemetry).call(this);
28
28
  __classPrivateFieldGet(this, _SpoListSiteScriptGetCommand_instances, "m", _SpoListSiteScriptGetCommand_initOptions).call(this);
29
29
  __classPrivateFieldGet(this, _SpoListSiteScriptGetCommand_instances, "m", _SpoListSiteScriptGetCommand_initValidators).call(this);
30
+ __classPrivateFieldGet(this, _SpoListSiteScriptGetCommand_instances, "m", _SpoListSiteScriptGetCommand_initOptionSets).call(this);
30
31
  }
31
32
  get name() {
32
33
  return commands_1.default.LIST_SITESCRIPT_GET;
@@ -116,14 +117,10 @@ _SpoListSiteScriptGetCommand_instances = new WeakSet(), _SpoListSiteScriptGetCom
116
117
  return `${args.options.listId} is not a valid GUID`;
117
118
  }
118
119
  }
119
- if (args.options.listId && args.options.listTitle) {
120
- return 'Specify listId or listTitle, but not both';
121
- }
122
- if (!args.options.listId && !args.options.listTitle) {
123
- return 'Specify listId or listTitle, one is required';
124
- }
125
120
  return true;
126
121
  }));
122
+ }, _SpoListSiteScriptGetCommand_initOptionSets = function _SpoListSiteScriptGetCommand_initOptionSets() {
123
+ this.optionSets.push(['listId', 'listTitle']);
127
124
  };
128
125
  module.exports = new SpoListSiteScriptGetCommand();
129
126
  //# sourceMappingURL=list-sitescript-get.js.map
@@ -13,7 +13,7 @@ var __classPrivateFieldGet = (this && this.__classPrivateFieldGet) || function (
13
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
14
  return kind === "m" ? f : kind === "a" ? f.call(receiver) : f ? f.value : state.get(receiver);
15
15
  };
16
- var _SpoListViewFieldAddCommand_instances, _SpoListViewFieldAddCommand_initTelemetry, _SpoListViewFieldAddCommand_initOptions, _SpoListViewFieldAddCommand_initValidators;
16
+ var _SpoListViewFieldAddCommand_instances, _SpoListViewFieldAddCommand_initTelemetry, _SpoListViewFieldAddCommand_initOptions, _SpoListViewFieldAddCommand_initValidators, _SpoListViewFieldAddCommand_initOptionSets;
17
17
  Object.defineProperty(exports, "__esModule", { value: true });
18
18
  const request_1 = require("../../../../request");
19
19
  const utils_1 = require("../../../../utils");
@@ -26,6 +26,7 @@ class SpoListViewFieldAddCommand extends SpoCommand_1.default {
26
26
  __classPrivateFieldGet(this, _SpoListViewFieldAddCommand_instances, "m", _SpoListViewFieldAddCommand_initTelemetry).call(this);
27
27
  __classPrivateFieldGet(this, _SpoListViewFieldAddCommand_instances, "m", _SpoListViewFieldAddCommand_initOptions).call(this);
28
28
  __classPrivateFieldGet(this, _SpoListViewFieldAddCommand_instances, "m", _SpoListViewFieldAddCommand_initValidators).call(this);
29
+ __classPrivateFieldGet(this, _SpoListViewFieldAddCommand_instances, "m", _SpoListViewFieldAddCommand_initOptionSets).call(this);
29
30
  }
30
31
  get name() {
31
32
  return commands_1.default.LIST_VIEW_FIELD_ADD;
@@ -158,26 +159,10 @@ _SpoListViewFieldAddCommand_instances = new WeakSet(), _SpoListViewFieldAddComma
158
159
  return `${args.options.fieldPosition} is not a number`;
159
160
  }
160
161
  }
161
- if (args.options.listId && args.options.listTitle) {
162
- return 'Specify listId or listTitle, but not both';
163
- }
164
- if (!args.options.listId && !args.options.listTitle) {
165
- return 'Specify listId or listTitle, one is required';
166
- }
167
- if (args.options.viewId && args.options.viewTitle) {
168
- return 'Specify viewId or viewTitle, but not both';
169
- }
170
- if (!args.options.viewId && !args.options.viewTitle) {
171
- return 'Specify viewId or viewTitle, one is required';
172
- }
173
- if (args.options.fieldId && args.options.fieldTitle) {
174
- return 'Specify fieldId or fieldTitle, but not both';
175
- }
176
- if (!args.options.fieldId && !args.options.fieldTitle) {
177
- return 'Specify fieldId or fieldTitle, one is required';
178
- }
179
162
  return true;
180
163
  }));
164
+ }, _SpoListViewFieldAddCommand_initOptionSets = function _SpoListViewFieldAddCommand_initOptionSets() {
165
+ this.optionSets.push(['listId', 'listTitle'], ['viewId', 'viewTitle'], ['fieldId', 'fieldTitle']);
181
166
  };
182
167
  module.exports = new SpoListViewFieldAddCommand();
183
168
  //# sourceMappingURL=list-view-field-add.js.map
@@ -13,7 +13,7 @@ var __classPrivateFieldGet = (this && this.__classPrivateFieldGet) || function (
13
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
14
  return kind === "m" ? f : kind === "a" ? f.call(receiver) : f ? f.value : state.get(receiver);
15
15
  };
16
- var _SpoListViewFieldRemoveCommand_instances, _SpoListViewFieldRemoveCommand_initTelemetry, _SpoListViewFieldRemoveCommand_initOptions, _SpoListViewFieldRemoveCommand_initValidators;
16
+ var _SpoListViewFieldRemoveCommand_instances, _SpoListViewFieldRemoveCommand_initTelemetry, _SpoListViewFieldRemoveCommand_initOptions, _SpoListViewFieldRemoveCommand_initValidators, _SpoListViewFieldRemoveCommand_initOptionSets;
17
17
  Object.defineProperty(exports, "__esModule", { value: true });
18
18
  const cli_1 = require("../../../../cli");
19
19
  const request_1 = require("../../../../request");
@@ -27,6 +27,7 @@ class SpoListViewFieldRemoveCommand extends SpoCommand_1.default {
27
27
  __classPrivateFieldGet(this, _SpoListViewFieldRemoveCommand_instances, "m", _SpoListViewFieldRemoveCommand_initTelemetry).call(this);
28
28
  __classPrivateFieldGet(this, _SpoListViewFieldRemoveCommand_instances, "m", _SpoListViewFieldRemoveCommand_initOptions).call(this);
29
29
  __classPrivateFieldGet(this, _SpoListViewFieldRemoveCommand_instances, "m", _SpoListViewFieldRemoveCommand_initValidators).call(this);
30
+ __classPrivateFieldGet(this, _SpoListViewFieldRemoveCommand_instances, "m", _SpoListViewFieldRemoveCommand_initOptionSets).call(this);
30
31
  }
31
32
  get name() {
32
33
  return commands_1.default.LIST_VIEW_FIELD_REMOVE;
@@ -145,26 +146,10 @@ _SpoListViewFieldRemoveCommand_instances = new WeakSet(), _SpoListViewFieldRemov
145
146
  return `${args.options.viewId} is not a valid GUID`;
146
147
  }
147
148
  }
148
- if (args.options.listId && args.options.listTitle) {
149
- return 'Specify listId or listTitle, but not both';
150
- }
151
- if (!args.options.listId && !args.options.listTitle) {
152
- return 'Specify listId or listTitle, one is required';
153
- }
154
- if (args.options.viewId && args.options.viewTitle) {
155
- return 'Specify viewId or viewTitle, but not both';
156
- }
157
- if (!args.options.viewId && !args.options.viewTitle) {
158
- return 'Specify viewId or viewTitle, one is required';
159
- }
160
- if (args.options.fieldId && args.options.fieldTitle) {
161
- return 'Specify fieldId or fieldTitle, but not both';
162
- }
163
- if (!args.options.fieldId && !args.options.fieldTitle) {
164
- return 'Specify fieldId or fieldTitle, one is required';
165
- }
166
149
  return true;
167
150
  }));
151
+ }, _SpoListViewFieldRemoveCommand_initOptionSets = function _SpoListViewFieldRemoveCommand_initOptionSets() {
152
+ this.optionSets.push(['listId', 'listTitle'], ['viewId', 'viewTitle'], ['fieldId', 'fieldTitle']);
168
153
  };
169
154
  module.exports = new SpoListViewFieldRemoveCommand();
170
155
  //# sourceMappingURL=list-view-field-remove.js.map
@@ -13,7 +13,7 @@ var __classPrivateFieldGet = (this && this.__classPrivateFieldGet) || function (
13
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
14
  return kind === "m" ? f : kind === "a" ? f.call(receiver) : f ? f.value : state.get(receiver);
15
15
  };
16
- var _SpoListViewFieldSetCommand_instances, _SpoListViewFieldSetCommand_initTelemetry, _SpoListViewFieldSetCommand_initOptions, _SpoListViewFieldSetCommand_initValidators;
16
+ var _SpoListViewFieldSetCommand_instances, _SpoListViewFieldSetCommand_initTelemetry, _SpoListViewFieldSetCommand_initOptions, _SpoListViewFieldSetCommand_initValidators, _SpoListViewFieldSetCommand_initOptionSets;
17
17
  Object.defineProperty(exports, "__esModule", { value: true });
18
18
  const request_1 = require("../../../../request");
19
19
  const utils_1 = require("../../../../utils");
@@ -26,6 +26,7 @@ class SpoListViewFieldSetCommand extends SpoCommand_1.default {
26
26
  __classPrivateFieldGet(this, _SpoListViewFieldSetCommand_instances, "m", _SpoListViewFieldSetCommand_initTelemetry).call(this);
27
27
  __classPrivateFieldGet(this, _SpoListViewFieldSetCommand_instances, "m", _SpoListViewFieldSetCommand_initOptions).call(this);
28
28
  __classPrivateFieldGet(this, _SpoListViewFieldSetCommand_instances, "m", _SpoListViewFieldSetCommand_initValidators).call(this);
29
+ __classPrivateFieldGet(this, _SpoListViewFieldSetCommand_instances, "m", _SpoListViewFieldSetCommand_initOptionSets).call(this);
29
30
  }
30
31
  get name() {
31
32
  return commands_1.default.LIST_VIEW_FIELD_SET;
@@ -128,26 +129,10 @@ _SpoListViewFieldSetCommand_instances = new WeakSet(), _SpoListViewFieldSetComma
128
129
  if (isNaN(position)) {
129
130
  return `${args.options.fieldPosition} is not a number`;
130
131
  }
131
- if (args.options.listId && args.options.listTitle) {
132
- return 'Specify listId or listTitle, but not both';
133
- }
134
- if (!args.options.listId && !args.options.listTitle) {
135
- return 'Specify listId or listTitle, one is required';
136
- }
137
- if (args.options.viewId && args.options.viewTitle) {
138
- return 'Specify viewId or viewTitle, but not both';
139
- }
140
- if (!args.options.viewId && !args.options.viewTitle) {
141
- return 'Specify viewId or viewTitle, one is required';
142
- }
143
- if (args.options.fieldId && args.options.fieldTitle) {
144
- return 'Specify fieldId or fieldTitle, but not both';
145
- }
146
- if (!args.options.fieldId && !args.options.fieldTitle) {
147
- return 'Specify fieldId or fieldTitle, one is required';
148
- }
149
132
  return true;
150
133
  }));
134
+ }, _SpoListViewFieldSetCommand_initOptionSets = function _SpoListViewFieldSetCommand_initOptionSets() {
135
+ this.optionSets.push(['listId', 'listTitle'], ['viewId', 'viewTitle'], ['fieldId', 'fieldTitle']);
151
136
  };
152
137
  module.exports = new SpoListViewFieldSetCommand();
153
138
  //# sourceMappingURL=list-view-field-set.js.map
@@ -13,7 +13,7 @@ var __classPrivateFieldGet = (this && this.__classPrivateFieldGet) || function (
13
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
14
  return kind === "m" ? f : kind === "a" ? f.call(receiver) : f ? f.value : state.get(receiver);
15
15
  };
16
- var _SpoListViewGetCommand_instances, _SpoListViewGetCommand_initTelemetry, _SpoListViewGetCommand_initOptions, _SpoListViewGetCommand_initValidators;
16
+ var _SpoListViewGetCommand_instances, _SpoListViewGetCommand_initTelemetry, _SpoListViewGetCommand_initOptions, _SpoListViewGetCommand_initValidators, _SpoListViewGetCommand_initOptionSets;
17
17
  Object.defineProperty(exports, "__esModule", { value: true });
18
18
  const request_1 = require("../../../../request");
19
19
  const utils_1 = require("../../../../utils");
@@ -26,6 +26,7 @@ class SpoListViewGetCommand extends SpoCommand_1.default {
26
26
  __classPrivateFieldGet(this, _SpoListViewGetCommand_instances, "m", _SpoListViewGetCommand_initTelemetry).call(this);
27
27
  __classPrivateFieldGet(this, _SpoListViewGetCommand_instances, "m", _SpoListViewGetCommand_initOptions).call(this);
28
28
  __classPrivateFieldGet(this, _SpoListViewGetCommand_instances, "m", _SpoListViewGetCommand_initValidators).call(this);
29
+ __classPrivateFieldGet(this, _SpoListViewGetCommand_instances, "m", _SpoListViewGetCommand_initOptionSets).call(this);
29
30
  }
30
31
  get name() {
31
32
  return commands_1.default.LIST_VIEW_GET;
@@ -92,25 +93,18 @@ _SpoListViewGetCommand_instances = new WeakSet(), _SpoListViewGetCommand_initTel
92
93
  if (isValidSharePointUrl !== true) {
93
94
  return isValidSharePointUrl;
94
95
  }
95
- if (!args.options.listId && !args.options.listTitle && !args.options.listUrl) {
96
- return `Specify listId, listTitle or listUrl`;
97
- }
98
96
  if (args.options.listId &&
99
97
  !utils_1.validation.isValidGuid(args.options.listId)) {
100
98
  return `${args.options.listId} in option listId is not a valid GUID`;
101
99
  }
102
- if (!args.options.viewId && !args.options.viewTitle) {
103
- return `Specify viewId or viewTitle`;
104
- }
105
- if (args.options.viewId && args.options.viewTitle) {
106
- return `Specify viewId or viewTitle but not both`;
107
- }
108
100
  if (args.options.viewId &&
109
101
  !utils_1.validation.isValidGuid(args.options.viewId)) {
110
102
  return `${args.options.viewId} in option viewId is not a valid GUID`;
111
103
  }
112
104
  return true;
113
105
  }));
106
+ }, _SpoListViewGetCommand_initOptionSets = function _SpoListViewGetCommand_initOptionSets() {
107
+ this.optionSets.push(['listId', 'listTitle', 'listUrl'], ['viewId', 'viewTitle']);
114
108
  };
115
109
  module.exports = new SpoListViewGetCommand();
116
110
  //# sourceMappingURL=list-view-get.js.map
@@ -13,7 +13,7 @@ var __classPrivateFieldGet = (this && this.__classPrivateFieldGet) || function (
13
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
14
  return kind === "m" ? f : kind === "a" ? f.call(receiver) : f ? f.value : state.get(receiver);
15
15
  };
16
- var _SpoListViewListCommand_instances, _SpoListViewListCommand_initTelemetry, _SpoListViewListCommand_initOptions, _SpoListViewListCommand_initValidators;
16
+ var _SpoListViewListCommand_instances, _SpoListViewListCommand_initTelemetry, _SpoListViewListCommand_initOptions, _SpoListViewListCommand_initValidators, _SpoListViewListCommand_initOptionSets;
17
17
  Object.defineProperty(exports, "__esModule", { value: true });
18
18
  const request_1 = require("../../../../request");
19
19
  const utils_1 = require("../../../../utils");
@@ -26,6 +26,7 @@ class SpoListViewListCommand extends SpoCommand_1.default {
26
26
  __classPrivateFieldGet(this, _SpoListViewListCommand_instances, "m", _SpoListViewListCommand_initTelemetry).call(this);
27
27
  __classPrivateFieldGet(this, _SpoListViewListCommand_instances, "m", _SpoListViewListCommand_initOptions).call(this);
28
28
  __classPrivateFieldGet(this, _SpoListViewListCommand_instances, "m", _SpoListViewListCommand_initValidators).call(this);
29
+ __classPrivateFieldGet(this, _SpoListViewListCommand_instances, "m", _SpoListViewListCommand_initOptionSets).call(this);
29
30
  }
30
31
  get name() {
31
32
  return commands_1.default.LIST_VIEW_LIST;
@@ -89,14 +90,10 @@ _SpoListViewListCommand_instances = new WeakSet(), _SpoListViewListCommand_initT
89
90
  return `${args.options.listId} is not a valid GUID`;
90
91
  }
91
92
  }
92
- if (args.options.listId && args.options.listTitle) {
93
- return 'Specify listId or listTitle, but not both';
94
- }
95
- if (!args.options.listId && !args.options.listTitle) {
96
- return 'Specify listId or listTitle, one is required';
97
- }
98
93
  return true;
99
94
  }));
95
+ }, _SpoListViewListCommand_initOptionSets = function _SpoListViewListCommand_initOptionSets() {
96
+ this.optionSets.push(['listId', 'listTitle']);
100
97
  };
101
98
  module.exports = new SpoListViewListCommand();
102
99
  //# sourceMappingURL=list-view-list.js.map
@@ -13,7 +13,7 @@ var __classPrivateFieldGet = (this && this.__classPrivateFieldGet) || function (
13
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
14
  return kind === "m" ? f : kind === "a" ? f.call(receiver) : f ? f.value : state.get(receiver);
15
15
  };
16
- var _SpoListViewRemoveCommand_instances, _SpoListViewRemoveCommand_initTelemetry, _SpoListViewRemoveCommand_initOptions, _SpoListViewRemoveCommand_initValidators;
16
+ var _SpoListViewRemoveCommand_instances, _SpoListViewRemoveCommand_initTelemetry, _SpoListViewRemoveCommand_initOptions, _SpoListViewRemoveCommand_initValidators, _SpoListViewRemoveCommand_initOptionSets;
17
17
  Object.defineProperty(exports, "__esModule", { value: true });
18
18
  const cli_1 = require("../../../../cli");
19
19
  const request_1 = require("../../../../request");
@@ -27,6 +27,7 @@ class SpoListViewRemoveCommand extends SpoCommand_1.default {
27
27
  __classPrivateFieldGet(this, _SpoListViewRemoveCommand_instances, "m", _SpoListViewRemoveCommand_initTelemetry).call(this);
28
28
  __classPrivateFieldGet(this, _SpoListViewRemoveCommand_instances, "m", _SpoListViewRemoveCommand_initOptions).call(this);
29
29
  __classPrivateFieldGet(this, _SpoListViewRemoveCommand_instances, "m", _SpoListViewRemoveCommand_initValidators).call(this);
30
+ __classPrivateFieldGet(this, _SpoListViewRemoveCommand_instances, "m", _SpoListViewRemoveCommand_initOptionSets).call(this);
30
31
  }
31
32
  get name() {
32
33
  return commands_1.default.LIST_VIEW_REMOVE;
@@ -120,20 +121,10 @@ _SpoListViewRemoveCommand_instances = new WeakSet(), _SpoListViewRemoveCommand_i
120
121
  return `${args.options.viewId} is not a valid GUID`;
121
122
  }
122
123
  }
123
- if (args.options.listId && args.options.listTitle) {
124
- return 'Specify listId or listTitle, but not both';
125
- }
126
- if (!args.options.listId && !args.options.listTitle) {
127
- return 'Specify listId or listTitle, one is required';
128
- }
129
- if (args.options.viewId && args.options.viewTitle) {
130
- return 'Specify viewId or viewTitle, but not both';
131
- }
132
- if (!args.options.viewId && !args.options.viewTitle) {
133
- return 'Specify viewId or viewTitle, one is required';
134
- }
135
124
  return true;
136
125
  }));
126
+ }, _SpoListViewRemoveCommand_initOptionSets = function _SpoListViewRemoveCommand_initOptionSets() {
127
+ this.optionSets.push(['listId', 'listTitle'], ['viewId', 'viewTitle']);
137
128
  };
138
129
  module.exports = new SpoListViewRemoveCommand();
139
130
  //# sourceMappingURL=list-view-remove.js.map
@@ -13,7 +13,7 @@ var __classPrivateFieldGet = (this && this.__classPrivateFieldGet) || function (
13
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
14
  return kind === "m" ? f : kind === "a" ? f.call(receiver) : f ? f.value : state.get(receiver);
15
15
  };
16
- var _SpoListViewSetCommand_instances, _SpoListViewSetCommand_initTelemetry, _SpoListViewSetCommand_initOptions, _SpoListViewSetCommand_initValidators;
16
+ var _SpoListViewSetCommand_instances, _SpoListViewSetCommand_initTelemetry, _SpoListViewSetCommand_initOptions, _SpoListViewSetCommand_initValidators, _SpoListViewSetCommand_initOptionSets;
17
17
  Object.defineProperty(exports, "__esModule", { value: true });
18
18
  const request_1 = require("../../../../request");
19
19
  const utils_1 = require("../../../../utils");
@@ -26,6 +26,7 @@ class SpoListViewSetCommand extends SpoCommand_1.default {
26
26
  __classPrivateFieldGet(this, _SpoListViewSetCommand_instances, "m", _SpoListViewSetCommand_initTelemetry).call(this);
27
27
  __classPrivateFieldGet(this, _SpoListViewSetCommand_instances, "m", _SpoListViewSetCommand_initOptions).call(this);
28
28
  __classPrivateFieldGet(this, _SpoListViewSetCommand_instances, "m", _SpoListViewSetCommand_initValidators).call(this);
29
+ __classPrivateFieldGet(this, _SpoListViewSetCommand_instances, "m", _SpoListViewSetCommand_initOptionSets).call(this);
29
30
  }
30
31
  allowUnknownOptions() {
31
32
  return true;
@@ -106,28 +107,18 @@ _SpoListViewSetCommand_instances = new WeakSet(), _SpoListViewSetCommand_initTel
106
107
  if (isValidSharePointUrl !== true) {
107
108
  return isValidSharePointUrl;
108
109
  }
109
- if (!args.options.listId && !args.options.listTitle) {
110
- return `Specify listId or listTitle`;
111
- }
112
- if (args.options.listId && args.options.listTitle) {
113
- return `Specify listId or listTitle but not both`;
114
- }
115
110
  if (args.options.listId &&
116
111
  !utils_1.validation.isValidGuid(args.options.listId)) {
117
112
  return `${args.options.listId} in option listId is not a valid GUID`;
118
113
  }
119
- if (!args.options.viewId && !args.options.viewTitle) {
120
- return `Specify viewId or viewTitle`;
121
- }
122
- if (args.options.viewId && args.options.viewTitle) {
123
- return `Specify viewId or viewTitle but not both`;
124
- }
125
114
  if (args.options.viewId &&
126
115
  !utils_1.validation.isValidGuid(args.options.viewId)) {
127
116
  return `${args.options.viewId} in option viewId is not a valid GUID`;
128
117
  }
129
118
  return true;
130
119
  }));
120
+ }, _SpoListViewSetCommand_initOptionSets = function _SpoListViewSetCommand_initOptionSets() {
121
+ this.optionSets.push(['listId', 'listTitle'], ['viewId', 'viewTitle']);
131
122
  };
132
123
  module.exports = new SpoListViewSetCommand();
133
124
  //# sourceMappingURL=list-view-set.js.map
@@ -13,7 +13,7 @@ var __classPrivateFieldGet = (this && this.__classPrivateFieldGet) || function (
13
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
14
  return kind === "m" ? f : kind === "a" ? f.call(receiver) : f ? f.value : state.get(receiver);
15
15
  };
16
- var _SpoListWebhookAddCommand_instances, _SpoListWebhookAddCommand_initTelemetry, _SpoListWebhookAddCommand_initOptions, _SpoListWebhookAddCommand_initValidators;
16
+ var _SpoListWebhookAddCommand_instances, _SpoListWebhookAddCommand_initTelemetry, _SpoListWebhookAddCommand_initOptions, _SpoListWebhookAddCommand_initValidators, _SpoListWebhookAddCommand_initOptionSets;
17
17
  Object.defineProperty(exports, "__esModule", { value: true });
18
18
  const request_1 = require("../../../../request");
19
19
  const utils_1 = require("../../../../utils");
@@ -30,6 +30,7 @@ class SpoListWebhookAddCommand extends SpoCommand_1.default {
30
30
  __classPrivateFieldGet(this, _SpoListWebhookAddCommand_instances, "m", _SpoListWebhookAddCommand_initTelemetry).call(this);
31
31
  __classPrivateFieldGet(this, _SpoListWebhookAddCommand_instances, "m", _SpoListWebhookAddCommand_initOptions).call(this);
32
32
  __classPrivateFieldGet(this, _SpoListWebhookAddCommand_instances, "m", _SpoListWebhookAddCommand_initValidators).call(this);
33
+ __classPrivateFieldGet(this, _SpoListWebhookAddCommand_instances, "m", _SpoListWebhookAddCommand_initOptionSets).call(this);
33
34
  }
34
35
  get name() {
35
36
  return commands_1.default.LIST_WEBHOOK_ADD;
@@ -112,12 +113,6 @@ _SpoListWebhookAddCommand_instances = new WeakSet(), _SpoListWebhookAddCommand_i
112
113
  return `${args.options.listId} is not a valid GUID`;
113
114
  }
114
115
  }
115
- if (args.options.listId && args.options.listTitle) {
116
- return 'Specify listId or listTitle, but not both';
117
- }
118
- if (!args.options.listId && !args.options.listTitle) {
119
- return 'Specify listId or listTitle, one is required';
120
- }
121
116
  const parsedDateTime = Date.parse(args.options.expirationDateTime);
122
117
  if (args.options.expirationDateTime && !(!parsedDateTime) !== true) {
123
118
  return `Provide the date in one of the following formats:
@@ -131,6 +126,8 @@ _SpoListWebhookAddCommand_instances = new WeakSet(), _SpoListWebhookAddCommand_i
131
126
  }
132
127
  return true;
133
128
  }));
129
+ }, _SpoListWebhookAddCommand_initOptionSets = function _SpoListWebhookAddCommand_initOptionSets() {
130
+ this.optionSets.push(['listId', 'listTitle']);
134
131
  };
135
132
  module.exports = new SpoListWebhookAddCommand();
136
133
  //# sourceMappingURL=list-webhook-add.js.map
@@ -13,7 +13,7 @@ var __classPrivateFieldGet = (this && this.__classPrivateFieldGet) || function (
13
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
14
  return kind === "m" ? f : kind === "a" ? f.call(receiver) : f ? f.value : state.get(receiver);
15
15
  };
16
- var _SpoListWebhookGetCommand_instances, _SpoListWebhookGetCommand_initTelemetry, _SpoListWebhookGetCommand_initOptions, _SpoListWebhookGetCommand_initValidators;
16
+ var _SpoListWebhookGetCommand_instances, _SpoListWebhookGetCommand_initTelemetry, _SpoListWebhookGetCommand_initOptions, _SpoListWebhookGetCommand_initValidators, _SpoListWebhookGetCommand_initOptionSets;
17
17
  Object.defineProperty(exports, "__esModule", { value: true });
18
18
  const request_1 = require("../../../../request");
19
19
  const utils_1 = require("../../../../utils");
@@ -26,6 +26,7 @@ class SpoListWebhookGetCommand extends SpoCommand_1.default {
26
26
  __classPrivateFieldGet(this, _SpoListWebhookGetCommand_instances, "m", _SpoListWebhookGetCommand_initTelemetry).call(this);
27
27
  __classPrivateFieldGet(this, _SpoListWebhookGetCommand_instances, "m", _SpoListWebhookGetCommand_initOptions).call(this);
28
28
  __classPrivateFieldGet(this, _SpoListWebhookGetCommand_instances, "m", _SpoListWebhookGetCommand_initValidators).call(this);
29
+ __classPrivateFieldGet(this, _SpoListWebhookGetCommand_instances, "m", _SpoListWebhookGetCommand_initOptionSets).call(this);
29
30
  }
30
31
  get name() {
31
32
  return commands_1.default.LIST_WEBHOOK_GET;
@@ -98,14 +99,10 @@ _SpoListWebhookGetCommand_instances = new WeakSet(), _SpoListWebhookGetCommand_i
98
99
  return `${args.options.listId} is not a valid GUID`;
99
100
  }
100
101
  }
101
- if (args.options.listId && args.options.listTitle) {
102
- return 'Specify listId or listTitle, but not both';
103
- }
104
- if (!args.options.listId && !args.options.listTitle) {
105
- return 'Specify listId or listTitle, one is required';
106
- }
107
102
  return true;
108
103
  }));
104
+ }, _SpoListWebhookGetCommand_initOptionSets = function _SpoListWebhookGetCommand_initOptionSets() {
105
+ this.optionSets.push(['listId', 'listTitle']);
109
106
  };
110
107
  module.exports = new SpoListWebhookGetCommand();
111
108
  //# sourceMappingURL=list-webhook-get.js.map
@@ -13,7 +13,7 @@ var __classPrivateFieldGet = (this && this.__classPrivateFieldGet) || function (
13
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
14
  return kind === "m" ? f : kind === "a" ? f.call(receiver) : f ? f.value : state.get(receiver);
15
15
  };
16
- var _SpoListWebhookRemoveCommand_instances, _SpoListWebhookRemoveCommand_initTelemetry, _SpoListWebhookRemoveCommand_initOptions, _SpoListWebhookRemoveCommand_initValidators;
16
+ var _SpoListWebhookRemoveCommand_instances, _SpoListWebhookRemoveCommand_initTelemetry, _SpoListWebhookRemoveCommand_initOptions, _SpoListWebhookRemoveCommand_initValidators, _SpoListWebhookRemoveCommand_initOptionSets;
17
17
  Object.defineProperty(exports, "__esModule", { value: true });
18
18
  const cli_1 = require("../../../../cli");
19
19
  const request_1 = require("../../../../request");
@@ -27,6 +27,7 @@ class SpoListWebhookRemoveCommand extends SpoCommand_1.default {
27
27
  __classPrivateFieldGet(this, _SpoListWebhookRemoveCommand_instances, "m", _SpoListWebhookRemoveCommand_initTelemetry).call(this);
28
28
  __classPrivateFieldGet(this, _SpoListWebhookRemoveCommand_instances, "m", _SpoListWebhookRemoveCommand_initOptions).call(this);
29
29
  __classPrivateFieldGet(this, _SpoListWebhookRemoveCommand_instances, "m", _SpoListWebhookRemoveCommand_initValidators).call(this);
30
+ __classPrivateFieldGet(this, _SpoListWebhookRemoveCommand_instances, "m", _SpoListWebhookRemoveCommand_initOptionSets).call(this);
30
31
  }
31
32
  get name() {
32
33
  return commands_1.default.LIST_WEBHOOK_REMOVE;
@@ -119,14 +120,10 @@ _SpoListWebhookRemoveCommand_instances = new WeakSet(), _SpoListWebhookRemoveCom
119
120
  return `${args.options.listId} is not a valid GUID`;
120
121
  }
121
122
  }
122
- if (args.options.listId && args.options.listTitle) {
123
- return 'Specify listId or listTitle, but not both';
124
- }
125
- if (!args.options.listId && !args.options.listTitle) {
126
- return 'Specify listId or listTitle, one is required';
127
- }
128
123
  return true;
129
124
  }));
125
+ }, _SpoListWebhookRemoveCommand_initOptionSets = function _SpoListWebhookRemoveCommand_initOptionSets() {
126
+ this.optionSets.push(['listId', 'listTitle']);
130
127
  };
131
128
  module.exports = new SpoListWebhookRemoveCommand();
132
129
  //# sourceMappingURL=list-webhook-remove.js.map
@@ -13,7 +13,7 @@ var __classPrivateFieldGet = (this && this.__classPrivateFieldGet) || function (
13
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
14
  return kind === "m" ? f : kind === "a" ? f.call(receiver) : f ? f.value : state.get(receiver);
15
15
  };
16
- var _SpoListWebhookSetCommand_instances, _SpoListWebhookSetCommand_initTelemetry, _SpoListWebhookSetCommand_initOptions, _SpoListWebhookSetCommand_initValidators;
16
+ var _SpoListWebhookSetCommand_instances, _SpoListWebhookSetCommand_initTelemetry, _SpoListWebhookSetCommand_initOptions, _SpoListWebhookSetCommand_initValidators, _SpoListWebhookSetCommand_initOptionSets;
17
17
  Object.defineProperty(exports, "__esModule", { value: true });
18
18
  const chalk = require("chalk");
19
19
  const request_1 = require("../../../../request");
@@ -27,6 +27,7 @@ class SpoListWebhookSetCommand extends SpoCommand_1.default {
27
27
  __classPrivateFieldGet(this, _SpoListWebhookSetCommand_instances, "m", _SpoListWebhookSetCommand_initTelemetry).call(this);
28
28
  __classPrivateFieldGet(this, _SpoListWebhookSetCommand_instances, "m", _SpoListWebhookSetCommand_initOptions).call(this);
29
29
  __classPrivateFieldGet(this, _SpoListWebhookSetCommand_instances, "m", _SpoListWebhookSetCommand_initValidators).call(this);
30
+ __classPrivateFieldGet(this, _SpoListWebhookSetCommand_instances, "m", _SpoListWebhookSetCommand_initOptionSets).call(this);
30
31
  }
31
32
  get name() {
32
33
  return commands_1.default.LIST_WEBHOOK_SET;
@@ -108,12 +109,6 @@ _SpoListWebhookSetCommand_instances = new WeakSet(), _SpoListWebhookSetCommand_i
108
109
  return `${args.options.listId} is not a valid GUID`;
109
110
  }
110
111
  }
111
- if (args.options.listId && args.options.listTitle) {
112
- return 'Specify listId or listTitle, but not both';
113
- }
114
- if (!args.options.listId && !args.options.listTitle) {
115
- return 'Specify listId or listTitle, one is required';
116
- }
117
112
  if (!args.options.notificationUrl && !args.options.expirationDateTime) {
118
113
  return 'Specify notificationUrl, expirationDateTime or both, at least one is required';
119
114
  }
@@ -127,6 +122,8 @@ _SpoListWebhookSetCommand_instances = new WeakSet(), _SpoListWebhookSetCommand_i
127
122
  }
128
123
  return true;
129
124
  }));
125
+ }, _SpoListWebhookSetCommand_initOptionSets = function _SpoListWebhookSetCommand_initOptionSets() {
126
+ this.optionSets.push(['listId', 'listTitle']);
130
127
  };
131
128
  module.exports = new SpoListWebhookSetCommand();
132
129
  //# sourceMappingURL=list-webhook-set.js.map