@pnp/cli-microsoft365 5.9.0-beta.fd6d022 → 5.9.0

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 (177) hide show
  1. package/.eslintrc.js +17 -2
  2. package/README.md +5 -0
  3. package/dist/Command.js +16 -2
  4. package/dist/appInsights.js +2 -0
  5. package/dist/m365/aad/commands/app/app-add.js +37 -13
  6. package/dist/m365/commands/status.js +6 -1
  7. package/dist/m365/outlook/commands/mail/mail-send.js +55 -31
  8. package/dist/m365/planner/commands/bucket/bucket-get.js +1 -1
  9. package/dist/m365/pp/commands/Environment.js +3 -0
  10. package/dist/m365/pp/commands/card/card-get.js +110 -0
  11. package/dist/m365/pp/commands/card/card-list.js +68 -0
  12. package/dist/m365/pp/commands/dataverse/dataverse-table-list.js +69 -0
  13. package/dist/m365/pp/commands/environment/environment-get.js +75 -0
  14. package/dist/m365/pp/commands/gateway/gateway-get.js +70 -0
  15. package/dist/m365/pp/commands/solution/Solution.js +3 -0
  16. package/dist/m365/pp/commands/solution/solution-get.js +117 -0
  17. package/dist/m365/pp/commands/solution/solution-list.js +87 -0
  18. package/dist/m365/pp/commands/tenant/tenant-settings-list.js +45 -0
  19. package/dist/m365/pp/commands.js +9 -1
  20. package/dist/m365/spfx/commands/project/project-doctor.js +4 -1
  21. package/dist/m365/spfx/commands/project/project-externalize.js +4 -1
  22. package/dist/m365/spfx/commands/project/project-upgrade/rules/FN010001_YORC_version.js +2 -1
  23. package/dist/m365/spfx/commands/project/project-upgrade/rules/FN010002_YORC_isCreatingSolution.js +2 -1
  24. package/dist/m365/spfx/commands/project/project-upgrade/rules/FN010003_YORC_packageManager.js +2 -1
  25. package/dist/m365/spfx/commands/project/project-upgrade/rules/FN010004_YORC_componentType.js +2 -1
  26. package/dist/m365/spfx/commands/project/project-upgrade/rules/FN010005_YORC_environment.js +2 -1
  27. package/dist/m365/spfx/commands/project/project-upgrade/rules/FN010006_YORC_framework.js +3 -2
  28. package/dist/m365/spfx/commands/project/project-upgrade/rules/FN010007_YORC_isDomainIsolated.js +2 -1
  29. package/dist/m365/spfx/commands/project/project-upgrade/rules/FN010008_YORC_nodeVersion.js +2 -1
  30. package/dist/m365/spfx/commands/project/project-upgrade/rules/FN010009_YORC_sdkVersions_microsoft_graph_client.js +56 -0
  31. package/dist/m365/spfx/commands/project/project-upgrade/rules/FN010010_YORC_sdkVersions_teams_js.js +56 -0
  32. package/dist/m365/spfx/commands/project/project-upgrade/upgrade-1.14.0.js +0 -2
  33. package/dist/m365/spfx/commands/project/project-upgrade/{upgrade-1.16.0-beta.1.js → upgrade-1.16.0-beta.2.js} +44 -28
  34. package/dist/m365/spfx/commands/project/project-upgrade.js +1 -1
  35. package/dist/m365/spfx/commands/spfx-doctor.js +54 -9
  36. package/dist/m365/spo/commands/contenttype/contenttype-add.js +82 -43
  37. package/dist/m365/spo/commands/contenttype/contenttype-field-remove.js +53 -21
  38. package/dist/m365/spo/commands/contenttype/contenttype-get.js +35 -14
  39. package/dist/m365/spo/commands/eventreceiver/EventReceiver.js +3 -0
  40. package/dist/m365/spo/commands/eventreceiver/eventreceiver-remove.js +182 -0
  41. package/dist/m365/spo/commands/field/field-add.js +26 -1
  42. package/dist/m365/spo/commands/field/field-set.js +23 -13
  43. package/dist/m365/spo/commands/file/file-copy.js +25 -39
  44. package/dist/m365/spo/commands/file/file-move.js +24 -37
  45. package/dist/m365/spo/commands/file/file-rename.js +19 -16
  46. package/dist/m365/spo/commands/file/file-roleassignment-add.js +231 -0
  47. package/dist/m365/spo/commands/file/file-roleassignment-remove.js +180 -0
  48. package/dist/m365/spo/commands/file/file-roleinheritance-break.js +129 -0
  49. package/dist/m365/spo/commands/file/file-roleinheritance-reset.js +1 -1
  50. package/dist/m365/spo/commands/folder/folder-roleassignment-remove.js +168 -0
  51. package/dist/m365/spo/commands/folder/folder-roleinheritance-break.js +94 -0
  52. package/dist/m365/spo/commands/folder/folder-roleinheritance-reset.js +1 -1
  53. package/dist/m365/spo/commands/group/AssociatedGroupPropertiesCollection.js +3 -0
  54. package/dist/m365/spo/commands/group/group-list.js +49 -10
  55. package/dist/m365/spo/commands/list/list-contenttype-add.js +21 -18
  56. package/dist/m365/spo/commands/list/list-contenttype-default-set.js +59 -47
  57. package/dist/m365/spo/commands/list/list-contenttype-list.js +16 -8
  58. package/dist/m365/spo/commands/list/list-contenttype-remove.js +16 -8
  59. package/dist/m365/spo/commands/list/list-roleassignment-add.js +10 -10
  60. package/dist/m365/spo/commands/list/list-roleassignment-remove.js +8 -8
  61. package/dist/m365/spo/commands/list/list-roleinheritance-break.js +14 -6
  62. package/dist/m365/spo/commands/list/list-roleinheritance-reset.js +15 -7
  63. package/dist/m365/spo/commands/list/list-webhook-add.js +19 -11
  64. package/dist/m365/spo/commands/list/list-webhook-get.js +17 -10
  65. package/dist/m365/spo/commands/list/list-webhook-list.js +23 -24
  66. package/dist/m365/spo/commands/list/list-webhook-remove.js +19 -11
  67. package/dist/m365/spo/commands/list/list-webhook-set.js +18 -10
  68. package/dist/m365/spo/commands/listitem/listitem-add.js +24 -14
  69. package/dist/m365/spo/commands/listitem/listitem-attachment-list.js +18 -8
  70. package/dist/m365/spo/commands/listitem/listitem-get.js +18 -8
  71. package/dist/m365/spo/commands/listitem/listitem-isrecord.js +20 -10
  72. package/dist/m365/spo/commands/listitem/listitem-list.js +27 -11
  73. package/dist/m365/spo/commands/listitem/listitem-record-declare.js +19 -12
  74. package/dist/m365/spo/commands/listitem/listitem-record-undeclare.js +24 -21
  75. package/dist/m365/spo/commands/listitem/listitem-remove.js +19 -11
  76. package/dist/m365/spo/commands/listitem/listitem-roleassignment-add.js +239 -0
  77. package/dist/m365/spo/commands/listitem/listitem-roleassignment-remove.js +8 -8
  78. package/dist/m365/spo/commands/listitem/listitem-roleinheritance-break.js +13 -5
  79. package/dist/m365/spo/commands/listitem/listitem-roleinheritance-reset.js +14 -6
  80. package/dist/m365/spo/commands/listitem/listitem-set.js +52 -44
  81. package/dist/m365/spo/commands/web/web-roleassignment-add.js +10 -10
  82. package/dist/m365/spo/commands/web/web-roleassignment-remove.js +8 -8
  83. package/dist/m365/spo/commands/web/web-roleinheritance-break.js +100 -0
  84. package/dist/m365/spo/commands.js +8 -0
  85. package/dist/m365/teams/commands/channel/channel-add.js +9 -9
  86. package/dist/m365/todo/commands/list/list-get.js +89 -0
  87. package/dist/m365/todo/commands/task/task-add.js +55 -3
  88. package/dist/m365/todo/commands/task/task-get.js +108 -0
  89. package/dist/m365/todo/commands/task/task-set.js +53 -1
  90. package/dist/m365/todo/commands.js +2 -0
  91. package/dist/utils/cache.js +81 -0
  92. package/dist/utils/pid.js +57 -0
  93. package/dist/utils/powerPlatform.js +42 -0
  94. package/docs/docs/_clisettings.md +19 -0
  95. package/docs/docs/cmd/outlook/mail/mail-send.md +13 -0
  96. package/docs/docs/cmd/planner/bucket/bucket-add.md +29 -0
  97. package/docs/docs/cmd/planner/bucket/bucket-get.md +29 -0
  98. package/docs/docs/cmd/planner/bucket/bucket-list.md +30 -0
  99. package/docs/docs/cmd/planner/bucket/bucket-remove.md +4 -0
  100. package/docs/docs/cmd/planner/bucket/bucket-set.md +4 -0
  101. package/docs/docs/cmd/planner/plan/plan-add.md +123 -0
  102. package/docs/docs/cmd/planner/plan/plan-get.md +75 -0
  103. package/docs/docs/cmd/planner/plan/plan-list.md +45 -0
  104. package/docs/docs/cmd/planner/plan/plan-remove.md +4 -0
  105. package/docs/docs/cmd/pp/card/card-get.md +51 -0
  106. package/docs/docs/cmd/pp/card/card-list.md +33 -0
  107. package/docs/docs/cmd/pp/dataverse/dataverse-table-list.md +33 -0
  108. package/docs/docs/cmd/pp/environment/environment-get.md +38 -0
  109. package/docs/docs/cmd/pp/environment/environment-list.md +1 -1
  110. package/docs/docs/cmd/pp/gateway/gateway-get.md +24 -0
  111. package/docs/docs/cmd/pp/solution/solution-get.md +51 -0
  112. package/docs/docs/cmd/pp/solution/solution-list.md +33 -0
  113. package/docs/docs/cmd/pp/tenant/tenant-settings-list.md +26 -0
  114. package/docs/docs/cmd/spfx/project/project-rename.md +1 -14
  115. package/docs/docs/cmd/spfx/project/project-upgrade.md +1 -1
  116. package/docs/docs/cmd/spfx/spfx-doctor.md +10 -1
  117. package/docs/docs/cmd/spo/contenttype/contenttype-add.md +20 -2
  118. package/docs/docs/cmd/spo/contenttype/contenttype-field-remove.md +22 -4
  119. package/docs/docs/cmd/spo/contenttype/contenttype-get.md +21 -3
  120. package/docs/docs/cmd/spo/eventreceiver/eventreceiver-get.md +2 -2
  121. package/docs/docs/cmd/spo/eventreceiver/eventreceiver-remove.md +69 -0
  122. package/docs/docs/cmd/spo/field/field-add.md +20 -2
  123. package/docs/docs/cmd/spo/field/field-set.md +11 -2
  124. package/docs/docs/cmd/spo/file/file-roleassignment-add.md +57 -0
  125. package/docs/docs/cmd/spo/file/file-roleassignment-remove.md +54 -0
  126. package/docs/docs/cmd/spo/file/file-roleinheritance-break.md +54 -0
  127. package/docs/docs/cmd/spo/folder/folder-roleassignment-remove.md +57 -0
  128. package/docs/docs/cmd/spo/folder/folder-roleinheritance-break.md +39 -0
  129. package/docs/docs/cmd/spo/folder/folder-roleinheritance-reset.md +2 -2
  130. package/docs/docs/cmd/spo/group/group-list.md +10 -1
  131. package/docs/docs/cmd/spo/hubsite/hubsite-disconnect.md +1 -1
  132. package/docs/docs/cmd/spo/hubsite/hubsite-get.md +3 -3
  133. package/docs/docs/cmd/spo/list/list-contenttype-add.md +16 -7
  134. package/docs/docs/cmd/spo/list/list-contenttype-default-set.md +16 -7
  135. package/docs/docs/cmd/spo/list/list-contenttype-list.md +15 -6
  136. package/docs/docs/cmd/spo/list/list-contenttype-remove.md +17 -8
  137. package/docs/docs/cmd/spo/list/list-roleinheritance-break.md +11 -8
  138. package/docs/docs/cmd/spo/list/list-roleinheritance-reset.md +14 -5
  139. package/docs/docs/cmd/spo/list/list-webhook-add.md +15 -16
  140. package/docs/docs/cmd/spo/list/list-webhook-get.md +16 -7
  141. package/docs/docs/cmd/spo/list/list-webhook-list.md +16 -7
  142. package/docs/docs/cmd/spo/list/list-webhook-remove.md +12 -10
  143. package/docs/docs/cmd/spo/list/list-webhook-set.md +14 -12
  144. package/docs/docs/cmd/spo/listitem/listitem-add.md +11 -2
  145. package/docs/docs/cmd/spo/listitem/listitem-attachment-list.md +11 -2
  146. package/docs/docs/cmd/spo/listitem/listitem-get.md +11 -2
  147. package/docs/docs/cmd/spo/listitem/listitem-isrecord.md +12 -2
  148. package/docs/docs/cmd/spo/listitem/listitem-list.md +12 -3
  149. package/docs/docs/cmd/spo/listitem/listitem-record-declare.md +7 -4
  150. package/docs/docs/cmd/spo/listitem/listitem-record-undeclare.md +11 -2
  151. package/docs/docs/cmd/spo/listitem/listitem-remove.md +11 -2
  152. package/docs/docs/cmd/spo/listitem/listitem-roleassignment-add.md +81 -0
  153. package/docs/docs/cmd/spo/listitem/listitem-roleinheritance-break.md +7 -4
  154. package/docs/docs/cmd/spo/listitem/listitem-roleinheritance-reset.md +11 -2
  155. package/docs/docs/cmd/spo/listitem/listitem-set.md +7 -4
  156. package/docs/docs/cmd/spo/web/web-roleinheritance-break.md +44 -0
  157. package/docs/docs/cmd/teams/channel/channel-add.md +4 -4
  158. package/docs/docs/cmd/tenant/id/id-get.md +20 -0
  159. package/docs/docs/cmd/tenant/report/report-activeusercounts.md +35 -0
  160. package/docs/docs/cmd/tenant/report/report-activeuserdetail.md +49 -0
  161. package/docs/docs/cmd/tenant/report/report-office365activationcounts.md +32 -0
  162. package/docs/docs/cmd/tenant/report/report-office365activationsusercounts.md +30 -0
  163. package/docs/docs/cmd/tenant/report/report-office365activationsuserdetail.md +36 -0
  164. package/docs/docs/cmd/tenant/report/report-servicesusercounts.md +41 -0
  165. package/docs/docs/cmd/tenant/security/security-alerts-list.md +105 -0
  166. package/docs/docs/cmd/tenant/serviceannouncement/serviceannouncement-health-get.md +87 -0
  167. package/docs/docs/cmd/tenant/serviceannouncement/serviceannouncement-health-list.md +91 -0
  168. package/docs/docs/cmd/tenant/serviceannouncement/serviceannouncement-healthissue-get.md +62 -0
  169. package/docs/docs/cmd/tenant/serviceannouncement/serviceannouncement-healthissue-list.md +51 -0
  170. package/docs/docs/cmd/tenant/serviceannouncement/serviceannouncement-message-get.md +64 -0
  171. package/docs/docs/cmd/tenant/serviceannouncement/serviceannouncement-message-list.md +52 -0
  172. package/docs/docs/cmd/todo/list/list-get.md +61 -0
  173. package/docs/docs/cmd/todo/task/task-add.md +32 -5
  174. package/docs/docs/cmd/todo/task/task-get.md +75 -0
  175. package/docs/docs/cmd/todo/task/task-set.md +29 -2
  176. package/package.json +13 -3
  177. package/dist/m365/spfx/commands/project/project-upgrade/rules/FN006006_CFG_PS_features.js +0 -60
package/.eslintrc.js CHANGED
@@ -17,6 +17,7 @@ const dictionary = [
17
17
  'content',
18
18
  'conversation',
19
19
  'custom',
20
+ 'dataverse',
20
21
  'default',
21
22
  'external',
22
23
  'externalize',
@@ -61,6 +62,7 @@ const dictionary = [
61
62
  'site',
62
63
  'status',
63
64
  'storage',
65
+ 'table',
64
66
  'teams',
65
67
  'token',
66
68
  'type',
@@ -172,7 +174,19 @@ module.exports = {
172
174
  "eqeqeq": [
173
175
  "error",
174
176
  "always"
175
- ]
177
+ ],
178
+ "@typescript-eslint/naming-convention": [
179
+ "error",
180
+ {
181
+ "selector": [
182
+ "method"
183
+ ],
184
+ "format": [
185
+ "camelCase"
186
+ ]
187
+ }
188
+ ],
189
+ "@typescript-eslint/explicit-function-return-type": ["error", { "allowExpressions": true }]
176
190
  },
177
191
  "overrides": [
178
192
  {
@@ -183,7 +197,8 @@ module.exports = {
183
197
  "no-console": "error",
184
198
  "@typescript-eslint/no-empty-function": "off",
185
199
  "cli-microsoft365/correct-command-class-name": "off",
186
- "cli-microsoft365/correct-command-name": "off"
200
+ "cli-microsoft365/correct-command-name": "off",
201
+ "@typescript-eslint/explicit-function-return-type": "off"
187
202
  }
188
203
  },
189
204
  {
package/README.md CHANGED
@@ -15,6 +15,11 @@
15
15
  alt="GitHub" />
16
16
  </a>
17
17
 
18
+ <a href="https://discord.com/invite/7rfW4kg6B5">
19
+ <img src="https://img.shields.io/badge/Discord-Join-7289da?style=flat-square"
20
+ alt="Discord" />
21
+ </a>
22
+
18
23
  <a href="https://twitter.com/climicrosoft365">
19
24
  <img src="https://img.shields.io/badge/Twitter-%40climicrosoft365-blue?style=flat-square"
20
25
  alt="Twitter" />
package/dist/Command.js CHANGED
@@ -61,6 +61,9 @@ class Command {
61
61
  __classPrivateFieldGet(this, _Command_instances, "m", _Command_initOptions).call(this);
62
62
  __classPrivateFieldGet(this, _Command_instances, "m", _Command_initValidators).call(this);
63
63
  }
64
+ get allowedOutputs() {
65
+ return ['csv', 'json', 'text'];
66
+ }
64
67
  validateUnknownOptions(args, command) {
65
68
  return __awaiter(this, void 0, void 0, function* () {
66
69
  if (this.allowUnknownOptions()) {
@@ -135,6 +138,17 @@ class Command {
135
138
  return true;
136
139
  });
137
140
  }
141
+ validateOutput(args) {
142
+ return __awaiter(this, void 0, void 0, function* () {
143
+ if (args.options.output &&
144
+ this.allowedOutputs.indexOf(args.options.output) < 0) {
145
+ return `'${args.options.output}' is not a valid output type. Allowed output types are ${this.allowedOutputs.join(', ')}`;
146
+ }
147
+ else {
148
+ return true;
149
+ }
150
+ });
151
+ }
138
152
  alias() {
139
153
  return;
140
154
  }
@@ -417,9 +431,9 @@ _Command_instances = new WeakSet(), _Command_initTelemetry = function _Command_i
417
431
  }, _Command_initOptions = function _Command_initOptions() {
418
432
  this.options.unshift({ option: '--query [query]' }, {
419
433
  option: '-o, --output [output]',
420
- autocomplete: ['csv', 'json', 'text']
434
+ autocomplete: this.allowedOutputs
421
435
  }, { option: '--verbose' }, { option: '--debug' });
422
436
  }, _Command_initValidators = function _Command_initValidators() {
423
- this.validators.push((args, command) => this.validateUnknownOptions(args, command), (args, command) => this.validateRequiredOptions(args, command), (args, command) => this.validateOptionSets(args, command));
437
+ this.validators.push((args, command) => this.validateUnknownOptions(args, command), (args, command) => this.validateRequiredOptions(args, command), args => this.validateOutput(args), (args, command) => this.validateOptionSets(args, command));
424
438
  };
425
439
  //# sourceMappingURL=Command.js.map
@@ -10,6 +10,7 @@ const appInsights = require("applicationinsights");
10
10
  const crypto = require("crypto");
11
11
  const fs = require("fs");
12
12
  const path = require("path");
13
+ const pid_1 = require("./utils/pid");
13
14
  const config = appInsights.setup('6b908c80-d09f-4cf6-8274-e54349a0149a');
14
15
  config.setInternalLogging(false, false);
15
16
  // append -dev to the version number when ran locally
@@ -20,6 +21,7 @@ const env = process.env.CLIMICROSOFT365_ENV !== undefined ? process.env.CLIMICRO
20
21
  appInsights.defaultClient.commonProperties = {
21
22
  version: version,
22
23
  node: process.version,
24
+ shell: pid_1.pid.getProcessName(process.ppid) || '',
23
25
  env: env,
24
26
  ci: Boolean(process.env.CI).toString()
25
27
  };
@@ -209,8 +209,6 @@ class AadAppAddCommand extends GraphCommand_1.default {
209
209
  delete v2Manifest.appId;
210
210
  delete v2Manifest.publisherDomain;
211
211
  // extract secrets from the manifest. Store them in a separate variable
212
- // and remove them from the manifest because we need to create them
213
- // separately
214
212
  const secrets = this.getSecretsFromManifest(v2Manifest);
215
213
  // Azure Portal returns v2 manifest whereas the Graph API expects a v1.6
216
214
  if (args.options.apisApplication || args.options.apisDelegated) {
@@ -218,6 +216,33 @@ class AadAppAddCommand extends GraphCommand_1.default {
218
216
  // otherwise, they will be skipped in the app update
219
217
  v2Manifest.requiredResourceAccess = appInfo.requiredResourceAccess;
220
218
  }
219
+ if (args.options.redirectUris) {
220
+ // take submitted redirectUris/platform as options
221
+ // otherwise, they will be removed from the app
222
+ v2Manifest.replyUrlsWithType = args.options.redirectUris.split(',').map(u => {
223
+ return {
224
+ url: u.trim(),
225
+ type: this.translatePlatformToType(args.options.platform)
226
+ };
227
+ });
228
+ }
229
+ if (args.options.multitenant) {
230
+ // override manifest setting when using multitenant flag
231
+ v2Manifest.signInAudience = 'AzureADMultipleOrgs';
232
+ }
233
+ if (args.options.implicitFlow) {
234
+ // remove manifest settings when using implicitFlow flag
235
+ delete v2Manifest.oauth2AllowIdTokenImplicitFlow;
236
+ delete v2Manifest.oauth2AllowImplicitFlow;
237
+ }
238
+ if (args.options.scopeName) {
239
+ // override manifest setting when using options.
240
+ delete v2Manifest.oauth2Permissions;
241
+ }
242
+ if (args.options.certificateFile || args.options.certificateBase64Encoded) {
243
+ // override manifest setting when using options.
244
+ delete v2Manifest.keyCredentials;
245
+ }
221
246
  const graphManifest = this.transformManifest(v2Manifest);
222
247
  const updateAppRequestOptions = {
223
248
  url: `${this.resource}/v1.0/myorganization/applications/${appInfo.id}`,
@@ -428,7 +453,6 @@ class AadAppAddCommand extends GraphCommand_1.default {
428
453
  return odata_1.odata
429
454
  .getAllItems(`${this.resource}/v1.0/myorganization/servicePrincipals?$select=appId,appRoles,id,oauth2PermissionScopes,servicePrincipalNames`)
430
455
  .then(servicePrincipals => {
431
- var _a;
432
456
  let resolvedApis = [];
433
457
  try {
434
458
  if (args.options.apisDelegated || args.options.apisApplication) {
@@ -451,17 +475,10 @@ class AadAppAddCommand extends GraphCommand_1.default {
451
475
  }
452
476
  });
453
477
  }
454
- if (typeof ((_a = this.manifest) === null || _a === void 0 ? void 0 : _a.requiredResourceAccess) !== 'undefined' && this.manifest.requiredResourceAccess.length > 0) {
478
+ else {
455
479
  const manifestApis = this.manifest.requiredResourceAccess;
456
480
  manifestApis.forEach(manifestApi => {
457
- const requiredResource = resolvedApis.find(api => api.resourceAppId === manifestApi.resourceAppId);
458
- if (requiredResource) {
459
- // exclude if any duplicate required resources in both manifest and submitted options
460
- requiredResource.resourceAccess.push(...manifestApi.resourceAccess.filter(manRes => !requiredResource.resourceAccess.some(res => res.id === manRes.id)));
461
- }
462
- else {
463
- resolvedApis.push(manifestApi);
464
- }
481
+ resolvedApis.push(manifestApi);
465
482
  const app = servicePrincipals.find(servicePrincipals => servicePrincipals.appId === manifestApi.resourceAppId);
466
483
  if (app) {
467
484
  manifestApi.resourceAccess.forEach((res => {
@@ -550,7 +567,7 @@ class AadAppAddCommand extends GraphCommand_1.default {
550
567
  }
551
568
  }
552
569
  configureSecret(args, appInfo, logger) {
553
- if (!args.options.withSecret) {
570
+ if (!args.options.withSecret || (appInfo.secrets && appInfo.secrets.length > 0)) {
554
571
  return Promise.resolve(appInfo);
555
572
  }
556
573
  if (this.verbose) {
@@ -560,6 +577,7 @@ class AadAppAddCommand extends GraphCommand_1.default {
560
577
  .createSecret({ appObjectId: appInfo.id })
561
578
  .then(secret => {
562
579
  appInfo.secret = secret.value;
580
+ appInfo.secrets = [{ displayName: secret.displayName, value: secret.value }];
563
581
  return Promise.resolve(appInfo);
564
582
  });
565
583
  }
@@ -643,6 +661,12 @@ class AadAppAddCommand extends GraphCommand_1.default {
643
661
  }
644
662
  return Promise.resolve(appInfo);
645
663
  }
664
+ translatePlatformToType(platform) {
665
+ if (platform === 'publicClient') {
666
+ return 'InstalledClient';
667
+ }
668
+ return platform.charAt(0).toUpperCase() + platform.substring(1);
669
+ }
646
670
  }
647
671
  _AadAppAddCommand_instances = new WeakSet(), _AadAppAddCommand_initTelemetry = function _AadAppAddCommand_initTelemetry() {
648
672
  this.telemetry.push((args) => {
@@ -37,12 +37,17 @@ class StatusCommand extends Command_1.default {
37
37
  logger.logToStderr({
38
38
  connectedAs: accessToken_1.accessToken.getUserNameFromAccessToken(Auth_1.default.service.accessTokens[Auth_1.default.defaultResource].accessToken),
39
39
  authType: Auth_1.AuthType[Auth_1.default.service.authType],
40
+ appId: Auth_1.default.service.appId,
41
+ appTenant: Auth_1.default.service.tenant,
40
42
  accessTokens: JSON.stringify(Auth_1.default.service.accessTokens, null, 2)
41
43
  });
42
44
  }
43
45
  else {
44
46
  logger.log({
45
- connectedAs: accessToken_1.accessToken.getUserNameFromAccessToken(Auth_1.default.service.accessTokens[Auth_1.default.defaultResource].accessToken)
47
+ connectedAs: accessToken_1.accessToken.getUserNameFromAccessToken(Auth_1.default.service.accessTokens[Auth_1.default.defaultResource].accessToken),
48
+ authType: Auth_1.AuthType[Auth_1.default.service.authType],
49
+ appId: Auth_1.default.service.appId,
50
+ appTenant: Auth_1.default.service.tenant
46
51
  });
47
52
  }
48
53
  }
@@ -15,10 +15,13 @@ var __classPrivateFieldGet = (this && this.__classPrivateFieldGet) || function (
15
15
  };
16
16
  var _OutlookMailSendCommand_instances, _OutlookMailSendCommand_initTelemetry, _OutlookMailSendCommand_initOptions, _OutlookMailSendCommand_initValidators;
17
17
  Object.defineProperty(exports, "__esModule", { value: true });
18
+ const fs = require("fs");
19
+ const path = require("path");
18
20
  const Auth_1 = require("../../../../Auth");
19
21
  const request_1 = require("../../../../request");
20
22
  const GraphCommand_1 = require("../../../base/GraphCommand");
21
23
  const commands_1 = require("../../commands");
24
+ const validation_1 = require("../../../../utils/validation");
22
25
  class OutlookMailSendCommand extends GraphCommand_1.default {
23
26
  constructor() {
24
27
  super();
@@ -37,7 +40,6 @@ class OutlookMailSendCommand extends GraphCommand_1.default {
37
40
  return [commands_1.default.SENDMAIL];
38
41
  }
39
42
  commandAction(logger, args) {
40
- var _a, _b;
41
43
  return __awaiter(this, void 0, void 0, function* () {
42
44
  try {
43
45
  const isAppOnlyAuth = Auth_1.Auth.isAppOnlyAuth(Auth_1.default.service.accessTokens[this.resource].accessToken);
@@ -51,28 +53,8 @@ class OutlookMailSendCommand extends GraphCommand_1.default {
51
53
  'content-type': 'application/json'
52
54
  },
53
55
  responseType: 'json',
54
- data: {
55
- message: {
56
- subject: args.options.subject,
57
- body: {
58
- contentType: args.options.bodyContentType || 'Text',
59
- content: args.options.bodyContents
60
- },
61
- toRecipients: this.mapEmailAddressesToRecipients(args.options.to.split(',')),
62
- ccRecipients: this.mapEmailAddressesToRecipients((_a = args.options.cc) === null || _a === void 0 ? void 0 : _a.split(',')),
63
- bccRecipients: this.mapEmailAddressesToRecipients((_b = args.options.bcc) === null || _b === void 0 ? void 0 : _b.split(',')),
64
- importance: args.options.importance
65
- },
66
- saveToSentItems: args.options.saveToSentItems
67
- }
56
+ data: this.getRequestBody(args.options)
68
57
  };
69
- if (args.options.mailbox) {
70
- requestOptions.data.message.from = {
71
- emailAddress: {
72
- address: args.options.mailbox
73
- }
74
- };
75
- }
76
58
  yield request_1.default.post(requestOptions);
77
59
  }
78
60
  catch (err) {
@@ -80,15 +62,40 @@ class OutlookMailSendCommand extends GraphCommand_1.default {
80
62
  }
81
63
  });
82
64
  }
83
- mapEmailAddressesToRecipients(emailAddresses) {
84
- if (!emailAddresses) {
85
- return emailAddresses;
65
+ mapEmailAddressToRecipient(email) {
66
+ if (!email) {
67
+ return undefined;
86
68
  }
87
- return emailAddresses.map(email => ({
69
+ return {
88
70
  emailAddress: {
89
71
  address: email.trim()
90
72
  }
73
+ };
74
+ }
75
+ getRequestBody(options) {
76
+ var _a, _b;
77
+ const attachments = typeof options.attachment === 'string' ? [options.attachment] : options.attachment;
78
+ const attachmentContents = attachments === null || attachments === void 0 ? void 0 : attachments.map(a => ({
79
+ '@odata.type': '#microsoft.graph.fileAttachment',
80
+ name: path.basename(a),
81
+ contentBytes: fs.readFileSync(a, { encoding: 'base64' })
91
82
  }));
83
+ return ({
84
+ message: {
85
+ subject: options.subject,
86
+ body: {
87
+ contentType: options.bodyContentType || 'Text',
88
+ content: options.bodyContents
89
+ },
90
+ from: this.mapEmailAddressToRecipient(options.mailbox),
91
+ toRecipients: options.to.split(',').map(mail => this.mapEmailAddressToRecipient(mail)),
92
+ ccRecipients: (_a = options.cc) === null || _a === void 0 ? void 0 : _a.split(',').map(mail => this.mapEmailAddressToRecipient(mail)),
93
+ bccRecipients: (_b = options.bcc) === null || _b === void 0 ? void 0 : _b.split(',').map(mail => this.mapEmailAddressToRecipient(mail)),
94
+ importance: options.importance,
95
+ attachments: attachmentContents
96
+ },
97
+ saveToSentItems: options.saveToSentItems
98
+ });
92
99
  }
93
100
  }
94
101
  _OutlookMailSendCommand_instances = new WeakSet(), _OutlookMailSendCommand_initTelemetry = function _OutlookMailSendCommand_initTelemetry() {
@@ -100,7 +107,8 @@ _OutlookMailSendCommand_instances = new WeakSet(), _OutlookMailSendCommand_initT
100
107
  saveToSentItems: args.options.saveToSentItems,
101
108
  importance: args.options.importance,
102
109
  mailbox: typeof args.options.mailbox !== 'undefined',
103
- sender: typeof args.options.sender !== 'undefined'
110
+ sender: typeof args.options.sender !== 'undefined',
111
+ attachment: typeof args.options.attachment !== 'undefined'
104
112
  });
105
113
  });
106
114
  }, _OutlookMailSendCommand_initOptions = function _OutlookMailSendCommand_initOptions() {
@@ -124,6 +132,8 @@ _OutlookMailSendCommand_instances = new WeakSet(), _OutlookMailSendCommand_initT
124
132
  }, {
125
133
  option: '--importance [importance]',
126
134
  autocomplete: ['low', 'normal', 'high']
135
+ }, {
136
+ option: '--attachment [attachment]'
127
137
  }, {
128
138
  option: '--saveToSentItems [saveToSentItems]'
129
139
  });
@@ -132,16 +142,30 @@ _OutlookMailSendCommand_instances = new WeakSet(), _OutlookMailSendCommand_initT
132
142
  if (args.options.bodyContentType &&
133
143
  args.options.bodyContentType !== 'Text' &&
134
144
  args.options.bodyContentType !== 'HTML') {
135
- return `${args.options.bodyContents} is not a valid value for the bodyContents option. Allowed values are Text|HTML`;
145
+ return `${args.options.bodyContentType} is not a valid value for the bodyContentType option. Allowed values are Text|HTML`;
136
146
  }
137
- if (args.options.saveToSentItems &&
138
- args.options.saveToSentItems !== 'true' &&
139
- args.options.saveToSentItems !== 'false') {
147
+ if (args.options.saveToSentItems && !validation_1.validation.isValidBoolean(args.options.saveToSentItems)) {
140
148
  return `${args.options.saveToSentItems} is not a valid value for the saveToSentItems option. Allowed values are true|false`;
141
149
  }
142
150
  if (args.options.importance && ['low', 'normal', 'high'].indexOf(args.options.importance) === -1) {
143
151
  return `'${args.options.importance}' is not a valid value for the importance option. Allowed values are low|normal|high`;
144
152
  }
153
+ if (args.options.attachment) {
154
+ const attachments = typeof args.options.attachment === 'string' ? [args.options.attachment] : args.options.attachment;
155
+ for (const attachment of attachments) {
156
+ if (!fs.existsSync(attachment)) {
157
+ return `File with path '${attachment}' was not found.`;
158
+ }
159
+ if (!fs.lstatSync(attachment).isFile()) {
160
+ return `'${attachment}' is not a file.`;
161
+ }
162
+ }
163
+ const requestBody = this.getRequestBody(args.options);
164
+ // The max body size of the request is 4 194 304 chars before getting a 413 response
165
+ if (JSON.stringify(requestBody).length > 4194304) {
166
+ return 'Exceeded the max total size of attachments which is 3MB.';
167
+ }
168
+ }
145
169
  return true;
146
170
  }));
147
171
  };
@@ -100,7 +100,7 @@ class PlannerBucketGetCommand extends GraphCommand_1.default {
100
100
  const requestOptions = {
101
101
  url: `${this.resource}/v1.0/planner/buckets/${id}`,
102
102
  headers: {
103
- accept: 'application/json'
103
+ accept: 'application/json;odata.metadata=none'
104
104
  },
105
105
  responseType: 'json'
106
106
  };
@@ -0,0 +1,3 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ //# sourceMappingURL=Environment.js.map
@@ -0,0 +1,110 @@
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 _PpCardGetCommand_instances, _PpCardGetCommand_initTelemetry, _PpCardGetCommand_initOptions, _PpCardGetCommand_initOptionSets, _PpCardGetCommand_initValidators;
17
+ Object.defineProperty(exports, "__esModule", { value: true });
18
+ const powerPlatform_1 = require("../../../../utils/powerPlatform");
19
+ const PowerPlatformCommand_1 = require("../../../base/PowerPlatformCommand");
20
+ const commands_1 = require("../../commands");
21
+ const request_1 = require("../../../../request");
22
+ const validation_1 = require("../../../../utils/validation");
23
+ class PpCardGetCommand extends PowerPlatformCommand_1.default {
24
+ constructor() {
25
+ super();
26
+ _PpCardGetCommand_instances.add(this);
27
+ __classPrivateFieldGet(this, _PpCardGetCommand_instances, "m", _PpCardGetCommand_initTelemetry).call(this);
28
+ __classPrivateFieldGet(this, _PpCardGetCommand_instances, "m", _PpCardGetCommand_initOptions).call(this);
29
+ __classPrivateFieldGet(this, _PpCardGetCommand_instances, "m", _PpCardGetCommand_initValidators).call(this);
30
+ __classPrivateFieldGet(this, _PpCardGetCommand_instances, "m", _PpCardGetCommand_initOptionSets).call(this);
31
+ }
32
+ get name() {
33
+ return commands_1.default.CARD_GET;
34
+ }
35
+ get description() {
36
+ return 'Get specific Microsoft Power Platform card in the specified Power Platform environment.';
37
+ }
38
+ defaultProperties() {
39
+ return ['name', 'cardid', 'publishdate', 'createdon', 'modifiedon'];
40
+ }
41
+ commandAction(logger, args) {
42
+ return __awaiter(this, void 0, void 0, function* () {
43
+ if (this.verbose) {
44
+ logger.logToStderr(`Retrieving a card '${args.options.id || args.options.name}'...`);
45
+ }
46
+ try {
47
+ const dynamicsApiUrl = yield powerPlatform_1.powerPlatform.getDynamicsInstanceApiUrl(args.options.environment, args.options.asAdmin);
48
+ const res = yield this.getCard(dynamicsApiUrl, args.options);
49
+ logger.log(res);
50
+ }
51
+ catch (err) {
52
+ this.handleRejectedODataJsonPromise(err);
53
+ }
54
+ });
55
+ }
56
+ getCard(dynamicsApiUrl, options) {
57
+ return __awaiter(this, void 0, void 0, function* () {
58
+ const requestOptions = {
59
+ headers: {
60
+ accept: 'application/json;odata.metadata=none'
61
+ },
62
+ responseType: 'json'
63
+ };
64
+ if (options.id) {
65
+ requestOptions.url = `${dynamicsApiUrl}/api/data/v9.1/cards(${options.id})`;
66
+ const result = yield request_1.default.get(requestOptions);
67
+ return result;
68
+ }
69
+ requestOptions.url = `${dynamicsApiUrl}/api/data/v9.1/cards?$filter=name eq '${options.name}'`;
70
+ const result = yield request_1.default.get(requestOptions);
71
+ if (result.value.length === 0) {
72
+ throw `The specified card '${options.name}' does not exist.`;
73
+ }
74
+ if (result.value.length > 1) {
75
+ throw `Multiple cards with name '${options.name}' found: ${result.value.map(x => x.cardid).join(',')}`;
76
+ }
77
+ return result.value[0];
78
+ });
79
+ }
80
+ }
81
+ _PpCardGetCommand_instances = new WeakSet(), _PpCardGetCommand_initTelemetry = function _PpCardGetCommand_initTelemetry() {
82
+ this.telemetry.push((args) => {
83
+ Object.assign(this.telemetryProperties, {
84
+ id: typeof args.options.id !== 'undefined',
85
+ name: typeof args.options.name !== 'undefined',
86
+ asAdmin: !!args.options.asAdmin
87
+ });
88
+ });
89
+ }, _PpCardGetCommand_initOptions = function _PpCardGetCommand_initOptions() {
90
+ this.options.unshift({
91
+ option: '-e, --environment <environment>'
92
+ }, {
93
+ option: '-i, --id [id]'
94
+ }, {
95
+ option: '-n, --name [name]'
96
+ }, {
97
+ option: '-a, --asAdmin'
98
+ });
99
+ }, _PpCardGetCommand_initOptionSets = function _PpCardGetCommand_initOptionSets() {
100
+ this.optionSets.push(['id', 'name']);
101
+ }, _PpCardGetCommand_initValidators = function _PpCardGetCommand_initValidators() {
102
+ this.validators.push((args) => __awaiter(this, void 0, void 0, function* () {
103
+ if (args.options.id && !validation_1.validation.isValidGuid(args.options.id)) {
104
+ return `${args.options.id} is not a valid GUID`;
105
+ }
106
+ return true;
107
+ }));
108
+ };
109
+ module.exports = new PpCardGetCommand();
110
+ //# sourceMappingURL=card-get.js.map
@@ -0,0 +1,68 @@
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 _PpCardListCommand_instances, _PpCardListCommand_initTelemetry, _PpCardListCommand_initOptions;
17
+ Object.defineProperty(exports, "__esModule", { value: true });
18
+ const odata_1 = require("../../../../utils/odata");
19
+ const powerPlatform_1 = require("../../../../utils/powerPlatform");
20
+ const PowerPlatformCommand_1 = require("../../../base/PowerPlatformCommand");
21
+ const commands_1 = require("../../commands");
22
+ class PpCardListCommand extends PowerPlatformCommand_1.default {
23
+ constructor() {
24
+ super();
25
+ _PpCardListCommand_instances.add(this);
26
+ __classPrivateFieldGet(this, _PpCardListCommand_instances, "m", _PpCardListCommand_initTelemetry).call(this);
27
+ __classPrivateFieldGet(this, _PpCardListCommand_instances, "m", _PpCardListCommand_initOptions).call(this);
28
+ }
29
+ get name() {
30
+ return commands_1.default.CARD_LIST;
31
+ }
32
+ get description() {
33
+ return 'Lists Microsoft Power Platform cards in the specified Power Platform environment.';
34
+ }
35
+ defaultProperties() {
36
+ return ['name', 'cardid', 'publishdate', 'createdon', 'modifiedon'];
37
+ }
38
+ commandAction(logger, args) {
39
+ return __awaiter(this, void 0, void 0, function* () {
40
+ if (this.verbose) {
41
+ logger.logToStderr(`Retrieving list of cards`);
42
+ }
43
+ try {
44
+ const dynamicsApiUrl = yield powerPlatform_1.powerPlatform.getDynamicsInstanceApiUrl(args.options.environment, args.options.asAdmin);
45
+ const items = yield odata_1.odata.getAllItems(`${dynamicsApiUrl}/api/data/v9.1/cards?$expand=owninguser($select=azureactivedirectoryobjectid,fullname)`);
46
+ logger.log(items);
47
+ }
48
+ catch (err) {
49
+ this.handleRejectedODataJsonPromise(err);
50
+ }
51
+ });
52
+ }
53
+ }
54
+ _PpCardListCommand_instances = new WeakSet(), _PpCardListCommand_initTelemetry = function _PpCardListCommand_initTelemetry() {
55
+ this.telemetry.push((args) => {
56
+ Object.assign(this.telemetryProperties, {
57
+ asAdmin: !!args.options.asAdmin
58
+ });
59
+ });
60
+ }, _PpCardListCommand_initOptions = function _PpCardListCommand_initOptions() {
61
+ this.options.unshift({
62
+ option: '-e, --environment <environment>'
63
+ }, {
64
+ option: '-a, --asAdmin'
65
+ });
66
+ };
67
+ module.exports = new PpCardListCommand();
68
+ //# sourceMappingURL=card-list.js.map
@@ -0,0 +1,69 @@
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 _PpDataverseTableListCommand_instances, _PpDataverseTableListCommand_initTelemetry, _PpDataverseTableListCommand_initOptions;
17
+ Object.defineProperty(exports, "__esModule", { value: true });
18
+ const odata_1 = require("../../../../utils/odata");
19
+ const powerPlatform_1 = require("../../../../utils/powerPlatform");
20
+ const PowerPlatformCommand_1 = require("../../../base/PowerPlatformCommand");
21
+ const commands_1 = require("../../commands");
22
+ class PpDataverseTableListCommand extends PowerPlatformCommand_1.default {
23
+ constructor() {
24
+ super();
25
+ _PpDataverseTableListCommand_instances.add(this);
26
+ __classPrivateFieldGet(this, _PpDataverseTableListCommand_instances, "m", _PpDataverseTableListCommand_initTelemetry).call(this);
27
+ __classPrivateFieldGet(this, _PpDataverseTableListCommand_instances, "m", _PpDataverseTableListCommand_initOptions).call(this);
28
+ }
29
+ get name() {
30
+ return commands_1.default.DATAVERSE_TABLE_LIST;
31
+ }
32
+ get description() {
33
+ return 'Lists dataverse tables in a given environment';
34
+ }
35
+ defaultProperties() {
36
+ return ['SchemaName', 'EntitySetName', 'LogicalName', 'IsManaged'];
37
+ }
38
+ commandAction(logger, args) {
39
+ return __awaiter(this, void 0, void 0, function* () {
40
+ if (this.verbose) {
41
+ logger.logToStderr(`Retrieving list of tables for which the user is an admin...`);
42
+ }
43
+ try {
44
+ const dynamicsApiUrl = yield powerPlatform_1.powerPlatform.getDynamicsInstanceApiUrl(args.options.environment, args.options.asAdmin);
45
+ const endpoint = `${dynamicsApiUrl}/api/data/v9.0/EntityDefinitions?$select=MetadataId,IsCustomEntity,IsManaged,SchemaName,IconVectorName,LogicalName,EntitySetName,IsActivity,DataProviderId,IsRenameable,IsCustomizable,CanCreateForms,CanCreateViews,CanCreateCharts,CanCreateAttributes,CanChangeTrackingBeEnabled,CanModifyAdditionalSettings,CanChangeHierarchicalRelationship,CanEnableSyncToExternalSearchIndex&$filter=(IsIntersect eq false and IsLogicalEntity eq false and%0APrimaryNameAttribute ne null and PrimaryNameAttribute ne %27%27 and ObjectTypeCode gt 0 and%0AObjectTypeCode ne 4712 and ObjectTypeCode ne 4724 and ObjectTypeCode ne 9933 and ObjectTypeCode ne 9934 and%0AObjectTypeCode ne 9935 and ObjectTypeCode ne 9947 and ObjectTypeCode ne 9945 and ObjectTypeCode ne 9944 and%0AObjectTypeCode ne 9942 and ObjectTypeCode ne 9951 and ObjectTypeCode ne 2016 and ObjectTypeCode ne 9949 and%0AObjectTypeCode ne 9866 and ObjectTypeCode ne 9867 and ObjectTypeCode ne 9868) and (IsCustomizable/Value eq true or IsCustomEntity eq true or IsManaged eq false or IsMappable/Value eq true or IsRenameable/Value eq true)&api-version=9.1`;
46
+ const res = yield odata_1.odata.getAllItems(endpoint);
47
+ logger.log(res);
48
+ }
49
+ catch (err) {
50
+ this.handleRejectedODataJsonPromise(err);
51
+ }
52
+ });
53
+ }
54
+ }
55
+ _PpDataverseTableListCommand_instances = new WeakSet(), _PpDataverseTableListCommand_initTelemetry = function _PpDataverseTableListCommand_initTelemetry() {
56
+ this.telemetry.push((args) => {
57
+ Object.assign(this.telemetryProperties, {
58
+ asAdmin: !!args.options.asAdmin
59
+ });
60
+ });
61
+ }, _PpDataverseTableListCommand_initOptions = function _PpDataverseTableListCommand_initOptions() {
62
+ this.options.unshift({
63
+ option: '-e, --environment <environment>'
64
+ }, {
65
+ option: '-a, --asAdmin'
66
+ });
67
+ };
68
+ module.exports = new PpDataverseTableListCommand();
69
+ //# sourceMappingURL=dataverse-table-list.js.map