sfdx-hardis 5.10.2-beta202501031058.0 → 5.11.1-beta202501041352.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 (31) hide show
  1. package/CHANGELOG.md +5 -1
  2. package/lib/commands/hardis/doc/mkdocs-to-salesforce.d.ts +15 -0
  3. package/lib/commands/hardis/doc/mkdocs-to-salesforce.js +239 -0
  4. package/lib/commands/hardis/doc/mkdocs-to-salesforce.js.map +1 -0
  5. package/lib/commands/hardis/doc/project2markdown.js +1 -1
  6. package/lib/commands/hardis/org/monitor/backup.js +8 -1
  7. package/lib/commands/hardis/org/monitor/backup.js.map +1 -1
  8. package/lib/commands/hardis/org/user/activateinvalid.js +2 -2
  9. package/lib/commands/hardis/org/user/activateinvalid.js.map +1 -1
  10. package/lib/commands/hardis/org/user/freeze.js +1 -1
  11. package/lib/commands/hardis/org/user/freeze.js.map +1 -1
  12. package/lib/commands/hardis/org/user/unfreeze.js +1 -1
  13. package/lib/commands/hardis/org/user/unfreeze.js.map +1 -1
  14. package/lib/commands/hardis/project/deploy/smart.js +2 -1
  15. package/lib/commands/hardis/project/deploy/smart.js.map +1 -1
  16. package/lib/common/gitProvider/github.js +8 -8
  17. package/lib/common/gitProvider/github.js.map +1 -1
  18. package/lib/common/gitProvider/index.js +4 -1
  19. package/lib/common/gitProvider/index.js.map +1 -1
  20. package/lib/common/utils/flowVisualiser/flowParser.js +1 -1
  21. package/lib/common/utils/flowVisualiser/flowParser.js.map +1 -1
  22. package/lib/common/utils/mermaidUtils.d.ts +1 -0
  23. package/lib/common/utils/mermaidUtils.js +27 -3
  24. package/lib/common/utils/mermaidUtils.js.map +1 -1
  25. package/lib/common/utils/orgUtils.js +1 -1
  26. package/lib/common/utils/orgUtils.js.map +1 -1
  27. package/lib/hooks/init/check-local-sfdx-hardis-files.js +2 -1
  28. package/lib/hooks/init/check-local-sfdx-hardis-files.js.map +1 -1
  29. package/oclif.lock +102 -107
  30. package/oclif.manifest.json +680 -579
  31. package/package.json +5 -5
@@ -57,12 +57,12 @@
57
57
  "world:hello"
58
58
  ]
59
59
  },
60
- "hardis:cache:clear": {
60
+ "hardis:auth:login": {
61
61
  "aliases": [],
62
62
  "args": {},
63
- "description": "Clear cache generated by sfdx-hardis",
63
+ "description": "Login to salesforce org",
64
64
  "examples": [
65
- "$ sf hardis:cache:clear"
65
+ "$ sf hardis:auth:login"
66
66
  ],
67
67
  "flags": {
68
68
  "json": {
@@ -80,6 +80,28 @@
80
80
  "multiple": false,
81
81
  "type": "option"
82
82
  },
83
+ "instanceurl": {
84
+ "char": "r",
85
+ "description": "URL of org instance",
86
+ "name": "instanceurl",
87
+ "hasDynamicHelp": false,
88
+ "multiple": false,
89
+ "type": "option"
90
+ },
91
+ "devhub": {
92
+ "char": "h",
93
+ "description": "Also connect associated DevHub",
94
+ "name": "devhub",
95
+ "allowNo": false,
96
+ "type": "boolean"
97
+ },
98
+ "scratchorg": {
99
+ "char": "s",
100
+ "description": "Scratch org",
101
+ "name": "scratchorg",
102
+ "allowNo": false,
103
+ "type": "boolean"
104
+ },
83
105
  "debug": {
84
106
  "char": "d",
85
107
  "description": "Activate debug mode (more logs)",
@@ -103,38 +125,38 @@
103
125
  },
104
126
  "hasDynamicHelp": false,
105
127
  "hiddenAliases": [],
106
- "id": "hardis:cache:clear",
128
+ "id": "hardis:auth:login",
107
129
  "pluginAlias": "sfdx-hardis",
108
130
  "pluginName": "sfdx-hardis",
109
131
  "pluginType": "core",
110
132
  "strict": true,
111
133
  "enableJsonFlag": true,
112
- "title": "Clear sfdx-hardis cache",
134
+ "title": "Login",
113
135
  "requiresProject": false,
114
136
  "isESM": true,
115
137
  "relativePath": [
116
138
  "lib",
117
139
  "commands",
118
140
  "hardis",
119
- "cache",
120
- "clear.js"
141
+ "auth",
142
+ "login.js"
121
143
  ],
122
144
  "aliasPermutations": [],
123
145
  "permutations": [
124
- "hardis:cache:clear",
125
- "cache:hardis:clear",
126
- "cache:clear:hardis",
127
- "hardis:clear:cache",
128
- "clear:hardis:cache",
129
- "clear:cache:hardis"
146
+ "hardis:auth:login",
147
+ "auth:hardis:login",
148
+ "auth:login:hardis",
149
+ "hardis:login:auth",
150
+ "login:hardis:auth",
151
+ "login:auth:hardis"
130
152
  ]
131
153
  },
132
- "hardis:auth:login": {
154
+ "hardis:cache:clear": {
133
155
  "aliases": [],
134
156
  "args": {},
135
- "description": "Login to salesforce org",
157
+ "description": "Clear cache generated by sfdx-hardis",
136
158
  "examples": [
137
- "$ sf hardis:auth:login"
159
+ "$ sf hardis:cache:clear"
138
160
  ],
139
161
  "flags": {
140
162
  "json": {
@@ -152,28 +174,6 @@
152
174
  "multiple": false,
153
175
  "type": "option"
154
176
  },
155
- "instanceurl": {
156
- "char": "r",
157
- "description": "URL of org instance",
158
- "name": "instanceurl",
159
- "hasDynamicHelp": false,
160
- "multiple": false,
161
- "type": "option"
162
- },
163
- "devhub": {
164
- "char": "h",
165
- "description": "Also connect associated DevHub",
166
- "name": "devhub",
167
- "allowNo": false,
168
- "type": "boolean"
169
- },
170
- "scratchorg": {
171
- "char": "s",
172
- "description": "Scratch org",
173
- "name": "scratchorg",
174
- "allowNo": false,
175
- "type": "boolean"
176
- },
177
177
  "debug": {
178
178
  "char": "d",
179
179
  "description": "Activate debug mode (more logs)",
@@ -197,30 +197,30 @@
197
197
  },
198
198
  "hasDynamicHelp": false,
199
199
  "hiddenAliases": [],
200
- "id": "hardis:auth:login",
200
+ "id": "hardis:cache:clear",
201
201
  "pluginAlias": "sfdx-hardis",
202
202
  "pluginName": "sfdx-hardis",
203
203
  "pluginType": "core",
204
204
  "strict": true,
205
205
  "enableJsonFlag": true,
206
- "title": "Login",
206
+ "title": "Clear sfdx-hardis cache",
207
207
  "requiresProject": false,
208
208
  "isESM": true,
209
209
  "relativePath": [
210
210
  "lib",
211
211
  "commands",
212
212
  "hardis",
213
- "auth",
214
- "login.js"
213
+ "cache",
214
+ "clear.js"
215
215
  ],
216
216
  "aliasPermutations": [],
217
217
  "permutations": [
218
- "hardis:auth:login",
219
- "auth:hardis:login",
220
- "auth:login:hardis",
221
- "hardis:login:auth",
222
- "login:hardis:auth",
223
- "login:auth:hardis"
218
+ "hardis:cache:clear",
219
+ "cache:hardis:clear",
220
+ "cache:clear:hardis",
221
+ "hardis:clear:cache",
222
+ "clear:hardis:cache",
223
+ "clear:cache:hardis"
224
224
  ]
225
225
  },
226
226
  "hardis:config:get": {
@@ -404,6 +404,106 @@
404
404
  "flow2markdown:doc:hardis"
405
405
  ]
406
406
  },
407
+ "hardis:doc:mkdocs-to-salesforce": {
408
+ "aliases": [],
409
+ "args": {},
410
+ "description": "Generates MkDocs HTML pages and upload them to Salesforce as a static resource\n\nThis command performs the following operations:\n\n- Generates MkDocs HTML pages (using locally installed mkdocs-material, or using mkdocs docker image)\n- Creates a Static Resource, a VisualForce page and a Custom Tab metadata\n- Upload the metadatas to the default org\n- Opens the Custom Tab in the default browser (only if not in CI context)\n\nNote: the documentation must have been previously generated using \"sf hardis:doc:project2markdown --with-history\"\n\nYou can:\n\n- Specify the type of documentation to generate (CICD or Monitoring) using the --type flag. Default is CICD.\n- Override default styles by customizing mkdocs.yml\n\nMore info on [Documentation section](https://sfdx-hardis.cloudity.com/salesforce-project-documentation/)\n",
411
+ "examples": [
412
+ "$ sf hardis:doc:mkdocs-to-salesforce"
413
+ ],
414
+ "flags": {
415
+ "json": {
416
+ "description": "Format output as json.",
417
+ "helpGroup": "GLOBAL",
418
+ "name": "json",
419
+ "allowNo": false,
420
+ "type": "boolean"
421
+ },
422
+ "flags-dir": {
423
+ "helpGroup": "GLOBAL",
424
+ "name": "flags-dir",
425
+ "summary": "Import flag values from a directory.",
426
+ "hasDynamicHelp": false,
427
+ "multiple": false,
428
+ "type": "option"
429
+ },
430
+ "type": {
431
+ "char": "t",
432
+ "description": "Type of the documentation to generate. Default is \"all\"",
433
+ "name": "type",
434
+ "default": "CICD",
435
+ "hasDynamicHelp": false,
436
+ "multiple": false,
437
+ "options": [
438
+ "CICD",
439
+ "Monitoring"
440
+ ],
441
+ "type": "option"
442
+ },
443
+ "debug": {
444
+ "char": "d",
445
+ "description": "Activate debug mode (more logs)",
446
+ "name": "debug",
447
+ "allowNo": false,
448
+ "type": "boolean"
449
+ },
450
+ "websocket": {
451
+ "description": "Websocket host:port for VsCode SFDX Hardis UI integration",
452
+ "name": "websocket",
453
+ "hasDynamicHelp": false,
454
+ "multiple": false,
455
+ "type": "option"
456
+ },
457
+ "skipauth": {
458
+ "description": "Skip authentication check when a default username is required",
459
+ "name": "skipauth",
460
+ "allowNo": false,
461
+ "type": "boolean"
462
+ },
463
+ "target-org": {
464
+ "aliases": [
465
+ "targetusername",
466
+ "u"
467
+ ],
468
+ "char": "o",
469
+ "deprecateAliases": true,
470
+ "name": "target-org",
471
+ "noCacheDefault": true,
472
+ "required": true,
473
+ "summary": "Username or alias of the target org. Not required if the `target-org` configuration variable is already set.",
474
+ "hasDynamicHelp": true,
475
+ "multiple": false,
476
+ "type": "option"
477
+ }
478
+ },
479
+ "hasDynamicHelp": true,
480
+ "hiddenAliases": [],
481
+ "id": "hardis:doc:mkdocs-to-salesforce",
482
+ "pluginAlias": "sfdx-hardis",
483
+ "pluginName": "sfdx-hardis",
484
+ "pluginType": "core",
485
+ "strict": true,
486
+ "enableJsonFlag": true,
487
+ "title": "MkDocs to Salesforce",
488
+ "requiresProject": true,
489
+ "isESM": true,
490
+ "relativePath": [
491
+ "lib",
492
+ "commands",
493
+ "hardis",
494
+ "doc",
495
+ "mkdocs-to-salesforce.js"
496
+ ],
497
+ "aliasPermutations": [],
498
+ "permutations": [
499
+ "hardis:doc:mkdocs-to-salesforce",
500
+ "doc:hardis:mkdocs-to-salesforce",
501
+ "doc:mkdocs-to-salesforce:hardis",
502
+ "hardis:mkdocs-to-salesforce:doc",
503
+ "mkdocs-to-salesforce:hardis:doc",
504
+ "mkdocs-to-salesforce:doc:hardis"
505
+ ]
506
+ },
407
507
  "hardis:doc:packagexml2markdown": {
408
508
  "aliases": [],
409
509
  "args": {},
@@ -496,7 +596,7 @@
496
596
  "hardis:doc:project2markdown": {
497
597
  "aliases": [],
498
598
  "args": {},
499
- "description": "Generates a markdown documentation from a SFDX project\n\n- Package.xml files\n- Source Packages\n- sfdx-hardis configuration\n- Installed packages\n\nCan work on any sfdx project, no need for it to be a sfdx-hardis flavored one.\n\nGenerates markdown files will be written in **docs** folder (except README.md where a link to doc index is added)\n\nTo read Flow documentations if your markdown reader doesn't handle MermaidJS syntax, this command could require @mermaid-js/mermaid-cli\n\n- Run `npm install @mermaid-js/mermaid-cli --global` if puppeteer works in your environment\n- It can also be run as a docker image\n\nBoth modes will be tried by default, but you can also force one of them by defining environment variable `MERMAID_MODES=docker` or `MERMAID_MODES=cli`\n\n_sfdx-hardis docker image is alpine-based and does not succeed to run mermaid/puppeteer: if you can help, please submit a PR !_\n\nIf Flow history doc always display a single state, you probably need to update your workflow configuration:\n\n- on Gitlab: Env variable [`GIT_FETCH_EXTRA_FLAGS: --depth 10000`](https://github.com/hardisgroupcom/sfdx-hardis/blob/main/defaults/monitoring/.gitlab-ci.yml#L11)\n- on GitHub: [`fetch-depth: 0`](https://github.com/hardisgroupcom/sfdx-hardis/blob/main/defaults/monitoring/.github/workflows/org-monitoring.yml#L58)\n- on Azure: [`fetchDepth: \"0\"`](https://github.com/hardisgroupcom/sfdx-hardis/blob/main/defaults/monitoring/azure-pipelines.yml#L39)\n- on Bitbucket: [`step: clone: depth: full`](https://github.com/hardisgroupcom/sfdx-hardis/blob/main/defaults/monitoring/bitbucket-pipelines.yml#L18)\n\n![Screenshot flow doc](https://github.com/hardisgroupcom/sfdx-hardis/raw/main/docs/assets/images/screenshot-flow-doc.jpg)\n\n![Screenshot project documentation](https://github.com/hardisgroupcom/sfdx-hardis/raw/main/docs/assets/images/screenshot-project-doc.jpg)\n\n![Screenshot project documentation](https://github.com/hardisgroupcom/sfdx-hardis/raw/main/docs/assets/images/screenshot-project-doc-2.jpg)\n\n## Doc HTML Pages\n\nTo read the documentation as HTML pages, run the following code (you need python on your computer)\n\n```python\npip install mkdocs-material mdx_truly_sane_lists\nmkdocs serve\n```\n\nTo just generate HTML pages that you can host anywhere, run `mkdocs build`\n\n",
599
+ "description": "Generates a markdown documentation from a SFDX project\n\n- Package.xml files\n- Source Packages\n- sfdx-hardis configuration\n- Installed packages\n\nCan work on any sfdx project, no need for it to be a sfdx-hardis flavored one.\n\nGenerates markdown files will be written in **docs** folder (except README.md where a link to doc index is added)\n\nTo read Flow documentations if your markdown reader doesn't handle MermaidJS syntax, this command could require @mermaid-js/mermaid-cli\n\n- Run `npm install @mermaid-js/mermaid-cli --global` if puppeteer works in your environment\n- It can also be run as a docker image\n\nBoth modes will be tried by default, but you can also force one of them by defining environment variable `MERMAID_MODES=docker` or `MERMAID_MODES=cli`\n\n_sfdx-hardis docker image is alpine-based and does not succeed to run mermaid/puppeteer: if you can help, please submit a PR !_\n\nIf Flow history doc always display a single state, you probably need to update your workflow configuration:\n\n- on Gitlab: Env variable [`GIT_FETCH_EXTRA_FLAGS: --depth 10000`](https://github.com/hardisgroupcom/sfdx-hardis/blob/main/defaults/monitoring/.gitlab-ci.yml#L11)\n- on GitHub: [`fetch-depth: 0`](https://github.com/hardisgroupcom/sfdx-hardis/blob/main/defaults/monitoring/.github/workflows/org-monitoring.yml#L58)\n- on Azure: [`fetchDepth: \"0\"`](https://github.com/hardisgroupcom/sfdx-hardis/blob/main/defaults/monitoring/azure-pipelines.yml#L39)\n- on Bitbucket: [`step: clone: depth: full`](https://github.com/hardisgroupcom/sfdx-hardis/blob/main/defaults/monitoring/bitbucket-pipelines.yml#L18)\n\n![Screenshot flow doc](https://github.com/hardisgroupcom/sfdx-hardis/raw/main/docs/assets/images/screenshot-flow-doc.jpg)\n\n![Screenshot project documentation](https://github.com/hardisgroupcom/sfdx-hardis/raw/main/docs/assets/images/screenshot-project-doc.jpg)\n\n![Screenshot project documentation](https://github.com/hardisgroupcom/sfdx-hardis/raw/main/docs/assets/images/screenshot-project-doc-2.jpg)\n\n## Doc HTML Pages\n\nTo read the documentation as HTML pages, run the following code (you need [**Python**](https://www.python.org/downloads/) on your computer)\n\n```python\npip install mkdocs-material mdx_truly_sane_lists\nmkdocs serve\n```\n\nTo just generate HTML pages that you can host anywhere, run `mkdocs build`\n\n",
500
600
  "examples": [
501
601
  "$ sf hardis:doc:project2markdown",
502
602
  "$ sf hardis:doc:project2markdown --with-history"
@@ -559,7 +659,7 @@
559
659
  "strict": true,
560
660
  "enableJsonFlag": true,
561
661
  "title": "SFDX Project to Markdown",
562
- "htmlInstructions": "## Doc HTML Pages\n\nTo read the documentation as HTML pages, run the following code (you need python on your computer)\n\n```python\npip install mkdocs-material mdx_truly_sane_lists\nmkdocs serve\n```\n\nTo just generate HTML pages that you can host anywhere, run `mkdocs build`\n",
662
+ "htmlInstructions": "## Doc HTML Pages\n\nTo read the documentation as HTML pages, run the following code (you need [**Python**](https://www.python.org/downloads/) on your computer)\n\n```python\npip install mkdocs-material mdx_truly_sane_lists\nmkdocs serve\n```\n\nTo just generate HTML pages that you can host anywhere, run `mkdocs build`\n",
563
663
  "requiresProject": true,
564
664
  "isESM": true,
565
665
  "relativePath": [
@@ -4890,15 +4990,12 @@
4890
4990
  "import:data:org:hardis"
4891
4991
  ]
4892
4992
  },
4893
- "hardis:org:diagnose:audittrail": {
4993
+ "hardis:org:files:export": {
4894
4994
  "aliases": [],
4895
4995
  "args": {},
4896
- "description": "Export Audit trail into a CSV file with selected criteria, and highlight suspect actions\n\nRegular setup actions performed in major orgs are filtered.\n\n- \"\"\n - createScratchOrg\n - changedsenderemail\n - deleteScratchOrg\n - loginasgrantedtopartnerbt\n- Certificate and Key Management\n - insertCertificate\n- Custom App Licenses\n - addeduserpackagelicense\n - granteduserpackagelicense\n- Customer Portal\n - createdcustomersuccessuser\n- Currency\n - updateddatedexchrate\n- Data Management\n - queueMembership\n- Email Administration\n - dkimRotationPreparationSuccessful\n - dkimRotationSuccessful\n- Groups\n - groupMembership\n- Holidays\n - holiday_insert\n- Inbox mobile and legacy desktop apps\n - enableSIQUserNonEAC\n- Manage Users\n - activateduser\n - createduser\n - changedcommunitynickname\n - changedemail\n - changedfederationid\n - changedpassword\n - changedinteractionuseroffon\n - changedinteractionuseronoff\n - changedmarketinguseroffon\n - changedmarketinguseronoff\n - changedprofileforuser\n - changedprofileforusercusttostd\n - changedprofileforuserstdtocust\n - changedroleforusertonone\n - changedroleforuser\n - changedroleforuserfromnone\n - changedUserEmailVerifiedStatusUnverified\n - changedUserEmailVerifiedStatusVerified\n - changedUserPhoneNumber\n - changedUserPhoneVerifiedStatusUnverified\n - deactivateduser\n - deleteAuthenticatorPairing\n - deleteTwoFactorInfo2\n - deleteTwoFactorTempCode\n - frozeuser\n - insertAuthenticatorPairing\n - insertTwoFactorInfo2\n - insertTwoFactorTempCode\n - lightningloginenroll\n - PermSetAssign\n - PermSetGroupAssign\n - PermSetGroupUnassign\n - PermSetLicenseAssign\n - PermSetUnassign\n - PermSetLicenseUnassign\n - registeredUserPhoneNumber\n - resetpassword\n - suOrgAdminLogin\n - suOrgAdminLogout\n - unfrozeuser\n - useremailchangesent\n- Mobile Administration\n - assigneduserstomobileconfig\n- Reporting Snapshots\n - createdReportJob\n - deletedReportJob\n- Sandboxes\n - DeleteSandbox\n\nBy default, deployment user defined in .sfdx-hardis.yml targetUsername property will be excluded.\n\nYou can define additional users to exclude in .sfdx-hardis.yml **monitoringExcludeUsernames** property.\n\nYou can also add more sections / actions considered as not suspect using property **monitoringAllowedSectionsActions**\n\nExample:\n\n```yaml\nmonitoringExcludeUsernames:\n - deploymentuser@cloudity.com\n - marketingcloud@cloudity.com\n - integration-user@cloudity.com\n\nmonitoringAllowedSectionsActions:\n \"Some section\": [] // Will ignore all actions from such section\n \"Some other section\": [\"actionType1\",\"actionType2\",\"actionType3\"] // Will ignore only those 3 actions from section \"Some other section\". Other actions in the same section will be considered as suspect.\n```\n\nThis command is part of [sfdx-hardis Monitoring](https://sfdx-hardis.cloudity.com/salesforce-monitoring-suspect-audit-trail/) and can output Grafana, Slack and MsTeams Notifications.\n",
4996
+ "description": "Export file attachments from a Salesforce org\n\nSee article below\n\n[![How to mass download notes and attachments files from a Salesforce org](https://github.com/hardisgroupcom/sfdx-hardis/raw/main/docs/assets/images/article-mass-download.jpg)](https://nicolas.vuillamy.fr/how-to-mass-download-notes-and-attachments-files-from-a-salesforce-org-83a028824afd)\n",
4897
4997
  "examples": [
4898
- "$ sf hardis:org:diagnose:audittrail",
4899
- "$ sf hardis:org:diagnose:audittrail --excludeusers baptiste@titi.com",
4900
- "$ sf hardis:org:diagnose:audittrail --excludeusers baptiste@titi.com,bertrand@titi.com",
4901
- "$ sf hardis:org:diagnose:audittrail --lastndays 5"
4998
+ "$ sf hardis:org:files:export"
4902
4999
  ],
4903
5000
  "flags": {
4904
5001
  "json": {
@@ -4916,26 +5013,37 @@
4916
5013
  "multiple": false,
4917
5014
  "type": "option"
4918
5015
  },
4919
- "excludeusers": {
4920
- "char": "e",
4921
- "description": "Comma-separated list of usernames to exclude",
4922
- "name": "excludeusers",
5016
+ "path": {
5017
+ "char": "p",
5018
+ "description": "Path to the file export project",
5019
+ "name": "path",
4923
5020
  "hasDynamicHelp": false,
4924
5021
  "multiple": false,
4925
5022
  "type": "option"
4926
5023
  },
4927
- "lastndays": {
5024
+ "chunksize": {
5025
+ "char": "c",
5026
+ "description": "Number of records to add in a chunk before it is processed",
5027
+ "name": "chunksize",
5028
+ "default": 1000,
5029
+ "hasDynamicHelp": false,
5030
+ "multiple": false,
5031
+ "type": "option"
5032
+ },
5033
+ "polltimeout": {
4928
5034
  "char": "t",
4929
- "description": "Number of days to extract from today (included)",
4930
- "name": "lastndays",
5035
+ "description": "Timeout in MS for Bulk API calls",
5036
+ "name": "polltimeout",
5037
+ "default": 300000,
4931
5038
  "hasDynamicHelp": false,
4932
5039
  "multiple": false,
4933
5040
  "type": "option"
4934
5041
  },
4935
- "outputfile": {
4936
- "char": "f",
4937
- "description": "Force the path and name of output report file. Must end with .csv",
4938
- "name": "outputfile",
5042
+ "startchunknumber": {
5043
+ "char": "s",
5044
+ "description": "Chunk number to start from",
5045
+ "name": "startchunknumber",
5046
+ "default": 0,
4939
5047
  "hasDynamicHelp": false,
4940
5048
  "multiple": false,
4941
5049
  "type": "option"
@@ -4978,13 +5086,13 @@
4978
5086
  },
4979
5087
  "hasDynamicHelp": true,
4980
5088
  "hiddenAliases": [],
4981
- "id": "hardis:org:diagnose:audittrail",
5089
+ "id": "hardis:org:files:export",
4982
5090
  "pluginAlias": "sfdx-hardis",
4983
5091
  "pluginName": "sfdx-hardis",
4984
5092
  "pluginType": "core",
4985
5093
  "strict": true,
4986
5094
  "enableJsonFlag": true,
4987
- "title": "Diagnose content of Setup Audit Trail",
5095
+ "title": "Export files",
4988
5096
  "requiresProject": false,
4989
5097
  "isESM": true,
4990
5098
  "relativePath": [
@@ -4992,43 +5100,43 @@
4992
5100
  "commands",
4993
5101
  "hardis",
4994
5102
  "org",
4995
- "diagnose",
4996
- "audittrail.js"
5103
+ "files",
5104
+ "export.js"
4997
5105
  ],
4998
5106
  "aliasPermutations": [],
4999
5107
  "permutations": [
5000
- "hardis:org:diagnose:audittrail",
5001
- "org:hardis:diagnose:audittrail",
5002
- "org:diagnose:hardis:audittrail",
5003
- "org:diagnose:audittrail:hardis",
5004
- "hardis:diagnose:org:audittrail",
5005
- "diagnose:hardis:org:audittrail",
5006
- "diagnose:org:hardis:audittrail",
5007
- "diagnose:org:audittrail:hardis",
5008
- "hardis:diagnose:audittrail:org",
5009
- "diagnose:hardis:audittrail:org",
5010
- "diagnose:audittrail:hardis:org",
5011
- "diagnose:audittrail:org:hardis",
5012
- "hardis:org:audittrail:diagnose",
5013
- "org:hardis:audittrail:diagnose",
5014
- "org:audittrail:hardis:diagnose",
5015
- "org:audittrail:diagnose:hardis",
5016
- "hardis:audittrail:org:diagnose",
5017
- "audittrail:hardis:org:diagnose",
5018
- "audittrail:org:hardis:diagnose",
5019
- "audittrail:org:diagnose:hardis",
5020
- "hardis:audittrail:diagnose:org",
5021
- "audittrail:hardis:diagnose:org",
5022
- "audittrail:diagnose:hardis:org",
5023
- "audittrail:diagnose:org:hardis"
5024
- ]
5025
- },
5026
- "hardis:org:diagnose:instanceupgrade": {
5108
+ "hardis:org:files:export",
5109
+ "org:hardis:files:export",
5110
+ "org:files:hardis:export",
5111
+ "org:files:export:hardis",
5112
+ "hardis:files:org:export",
5113
+ "files:hardis:org:export",
5114
+ "files:org:hardis:export",
5115
+ "files:org:export:hardis",
5116
+ "hardis:files:export:org",
5117
+ "files:hardis:export:org",
5118
+ "files:export:hardis:org",
5119
+ "files:export:org:hardis",
5120
+ "hardis:org:export:files",
5121
+ "org:hardis:export:files",
5122
+ "org:export:hardis:files",
5123
+ "org:export:files:hardis",
5124
+ "hardis:export:org:files",
5125
+ "export:hardis:org:files",
5126
+ "export:org:hardis:files",
5127
+ "export:org:files:hardis",
5128
+ "hardis:export:files:org",
5129
+ "export:hardis:files:org",
5130
+ "export:files:hardis:org",
5131
+ "export:files:org:hardis"
5132
+ ]
5133
+ },
5134
+ "hardis:org:files:import": {
5027
5135
  "aliases": [],
5028
5136
  "args": {},
5029
- "description": "Get the date when the org instance will be upgraded (to Spring, Summer or Winter)\n ",
5137
+ "description": "Import file attachments into a Salesforce org\n\nSee article below to see how to Export them.\n\n[![How to mass download notes and attachments files from a Salesforce org](https://github.com/hardisgroupcom/sfdx-hardis/raw/main/docs/assets/images/article-mass-download.jpg)](https://nicolas.vuillamy.fr/how-to-mass-download-notes-and-attachments-files-from-a-salesforce-org-83a028824afd)\n",
5030
5138
  "examples": [
5031
- "$ sf hardis:org:diagnose:instanceupgrade"
5139
+ "$ sf hardis:org:files:import"
5032
5140
  ],
5033
5141
  "flags": {
5034
5142
  "json": {
@@ -5046,6 +5154,21 @@
5046
5154
  "multiple": false,
5047
5155
  "type": "option"
5048
5156
  },
5157
+ "path": {
5158
+ "char": "p",
5159
+ "description": "Path to the file export project",
5160
+ "name": "path",
5161
+ "hasDynamicHelp": false,
5162
+ "multiple": false,
5163
+ "type": "option"
5164
+ },
5165
+ "overwrite": {
5166
+ "char": "f",
5167
+ "description": "Override existing files (doubles the number of API calls)",
5168
+ "name": "overwrite",
5169
+ "allowNo": false,
5170
+ "type": "boolean"
5171
+ },
5049
5172
  "debug": {
5050
5173
  "char": "d",
5051
5174
  "description": "Activate debug mode (more logs)",
@@ -5084,13 +5207,13 @@
5084
5207
  },
5085
5208
  "hasDynamicHelp": true,
5086
5209
  "hiddenAliases": [],
5087
- "id": "hardis:org:diagnose:instanceupgrade",
5210
+ "id": "hardis:org:files:import",
5088
5211
  "pluginAlias": "sfdx-hardis",
5089
5212
  "pluginName": "sfdx-hardis",
5090
5213
  "pluginType": "core",
5091
5214
  "strict": true,
5092
5215
  "enableJsonFlag": true,
5093
- "title": "Get Instance Upgrade date",
5216
+ "title": "Import files",
5094
5217
  "requiresProject": false,
5095
5218
  "isESM": true,
5096
5219
  "relativePath": [
@@ -5098,46 +5221,46 @@
5098
5221
  "commands",
5099
5222
  "hardis",
5100
5223
  "org",
5101
- "diagnose",
5102
- "instanceupgrade.js"
5224
+ "files",
5225
+ "import.js"
5103
5226
  ],
5104
5227
  "aliasPermutations": [],
5105
5228
  "permutations": [
5106
- "hardis:org:diagnose:instanceupgrade",
5107
- "org:hardis:diagnose:instanceupgrade",
5108
- "org:diagnose:hardis:instanceupgrade",
5109
- "org:diagnose:instanceupgrade:hardis",
5110
- "hardis:diagnose:org:instanceupgrade",
5111
- "diagnose:hardis:org:instanceupgrade",
5112
- "diagnose:org:hardis:instanceupgrade",
5113
- "diagnose:org:instanceupgrade:hardis",
5114
- "hardis:diagnose:instanceupgrade:org",
5115
- "diagnose:hardis:instanceupgrade:org",
5116
- "diagnose:instanceupgrade:hardis:org",
5117
- "diagnose:instanceupgrade:org:hardis",
5118
- "hardis:org:instanceupgrade:diagnose",
5119
- "org:hardis:instanceupgrade:diagnose",
5120
- "org:instanceupgrade:hardis:diagnose",
5121
- "org:instanceupgrade:diagnose:hardis",
5122
- "hardis:instanceupgrade:org:diagnose",
5123
- "instanceupgrade:hardis:org:diagnose",
5124
- "instanceupgrade:org:hardis:diagnose",
5125
- "instanceupgrade:org:diagnose:hardis",
5126
- "hardis:instanceupgrade:diagnose:org",
5127
- "instanceupgrade:hardis:diagnose:org",
5128
- "instanceupgrade:diagnose:hardis:org",
5129
- "instanceupgrade:diagnose:org:hardis"
5229
+ "hardis:org:files:import",
5230
+ "org:hardis:files:import",
5231
+ "org:files:hardis:import",
5232
+ "org:files:import:hardis",
5233
+ "hardis:files:org:import",
5234
+ "files:hardis:org:import",
5235
+ "files:org:hardis:import",
5236
+ "files:org:import:hardis",
5237
+ "hardis:files:import:org",
5238
+ "files:hardis:import:org",
5239
+ "files:import:hardis:org",
5240
+ "files:import:org:hardis",
5241
+ "hardis:org:import:files",
5242
+ "org:hardis:import:files",
5243
+ "org:import:hardis:files",
5244
+ "org:import:files:hardis",
5245
+ "hardis:import:org:files",
5246
+ "import:hardis:org:files",
5247
+ "import:org:hardis:files",
5248
+ "import:org:files:hardis",
5249
+ "hardis:import:files:org",
5250
+ "import:hardis:files:org",
5251
+ "import:files:hardis:org",
5252
+ "import:files:org:hardis"
5130
5253
  ]
5131
5254
  },
5132
- "hardis:org:diagnose:legacyapi": {
5255
+ "hardis:org:diagnose:audittrail": {
5133
5256
  "aliases": [],
5134
5257
  "args": {},
5135
- "description": "Checks if an org uses retired or someday retired API version\n\n\nSee article below\n\n[![Handle Salesforce API versions Deprecation like a pro](https://github.com/hardisgroupcom/sfdx-hardis/raw/main/docs/assets/images/article-deprecated-api.jpg)](https://nicolas.vuillamy.fr/handle-salesforce-api-versions-deprecation-like-a-pro-335065f52238)\n\nThis command is part of [sfdx-hardis Monitoring](https://sfdx-hardis.cloudity.com/salesforce-monitoring-deprecated-api-calls/) and can output Grafana, Slack and MsTeams Notifications.\n",
5258
+ "description": "Export Audit trail into a CSV file with selected criteria, and highlight suspect actions\n\nRegular setup actions performed in major orgs are filtered.\n\n- \"\"\n - createScratchOrg\n - changedsenderemail\n - deleteScratchOrg\n - loginasgrantedtopartnerbt\n- Certificate and Key Management\n - insertCertificate\n- Custom App Licenses\n - addeduserpackagelicense\n - granteduserpackagelicense\n- Customer Portal\n - createdcustomersuccessuser\n- Currency\n - updateddatedexchrate\n- Data Management\n - queueMembership\n- Email Administration\n - dkimRotationPreparationSuccessful\n - dkimRotationSuccessful\n- Groups\n - groupMembership\n- Holidays\n - holiday_insert\n- Inbox mobile and legacy desktop apps\n - enableSIQUserNonEAC\n- Manage Users\n - activateduser\n - createduser\n - changedcommunitynickname\n - changedemail\n - changedfederationid\n - changedpassword\n - changedinteractionuseroffon\n - changedinteractionuseronoff\n - changedmarketinguseroffon\n - changedmarketinguseronoff\n - changedprofileforuser\n - changedprofileforusercusttostd\n - changedprofileforuserstdtocust\n - changedroleforusertonone\n - changedroleforuser\n - changedroleforuserfromnone\n - changedUserEmailVerifiedStatusUnverified\n - changedUserEmailVerifiedStatusVerified\n - changedUserPhoneNumber\n - changedUserPhoneVerifiedStatusUnverified\n - deactivateduser\n - deleteAuthenticatorPairing\n - deleteTwoFactorInfo2\n - deleteTwoFactorTempCode\n - frozeuser\n - insertAuthenticatorPairing\n - insertTwoFactorInfo2\n - insertTwoFactorTempCode\n - lightningloginenroll\n - PermSetAssign\n - PermSetGroupAssign\n - PermSetGroupUnassign\n - PermSetLicenseAssign\n - PermSetUnassign\n - PermSetLicenseUnassign\n - registeredUserPhoneNumber\n - resetpassword\n - suOrgAdminLogin\n - suOrgAdminLogout\n - unfrozeuser\n - useremailchangesent\n- Mobile Administration\n - assigneduserstomobileconfig\n- Reporting Snapshots\n - createdReportJob\n - deletedReportJob\n- Sandboxes\n - DeleteSandbox\n\nBy default, deployment user defined in .sfdx-hardis.yml targetUsername property will be excluded.\n\nYou can define additional users to exclude in .sfdx-hardis.yml **monitoringExcludeUsernames** property.\n\nYou can also add more sections / actions considered as not suspect using property **monitoringAllowedSectionsActions**\n\nExample:\n\n```yaml\nmonitoringExcludeUsernames:\n - deploymentuser@cloudity.com\n - marketingcloud@cloudity.com\n - integration-user@cloudity.com\n\nmonitoringAllowedSectionsActions:\n \"Some section\": [] // Will ignore all actions from such section\n \"Some other section\": [\"actionType1\",\"actionType2\",\"actionType3\"] // Will ignore only those 3 actions from section \"Some other section\". Other actions in the same section will be considered as suspect.\n```\n\nThis command is part of [sfdx-hardis Monitoring](https://sfdx-hardis.cloudity.com/salesforce-monitoring-suspect-audit-trail/) and can output Grafana, Slack and MsTeams Notifications.\n",
5136
5259
  "examples": [
5137
- "$ sf hardis:org:diagnose:legacyapi",
5138
- "$ sf hardis:org:diagnose:legacyapi -u hardis@myclient.com",
5139
- "$ sf hardis:org:diagnose:legacyapi --outputfile 'c:/path/to/folder/legacyapi.csv'",
5140
- "$ sf hardis:org:diagnose:legacyapi -u hardis@myclient.com --outputfile ./tmp/legacyapi.csv"
5260
+ "$ sf hardis:org:diagnose:audittrail",
5261
+ "$ sf hardis:org:diagnose:audittrail --excludeusers baptiste@titi.com",
5262
+ "$ sf hardis:org:diagnose:audittrail --excludeusers baptiste@titi.com,bertrand@titi.com",
5263
+ "$ sf hardis:org:diagnose:audittrail --lastndays 5"
5141
5264
  ],
5142
5265
  "flags": {
5143
5266
  "json": {
@@ -5155,20 +5278,18 @@
5155
5278
  "multiple": false,
5156
5279
  "type": "option"
5157
5280
  },
5158
- "eventtype": {
5281
+ "excludeusers": {
5159
5282
  "char": "e",
5160
- "description": "Type of EventLogFile event to analyze",
5161
- "name": "eventtype",
5162
- "default": "ApiTotalUsage",
5283
+ "description": "Comma-separated list of usernames to exclude",
5284
+ "name": "excludeusers",
5163
5285
  "hasDynamicHelp": false,
5164
5286
  "multiple": false,
5165
5287
  "type": "option"
5166
5288
  },
5167
- "limit": {
5168
- "char": "l",
5169
- "description": "Number of latest EventLogFile events to analyze",
5170
- "name": "limit",
5171
- "default": 999,
5289
+ "lastndays": {
5290
+ "char": "t",
5291
+ "description": "Number of days to extract from today (included)",
5292
+ "name": "lastndays",
5172
5293
  "hasDynamicHelp": false,
5173
5294
  "multiple": false,
5174
5295
  "type": "option"
@@ -5219,13 +5340,13 @@
5219
5340
  },
5220
5341
  "hasDynamicHelp": true,
5221
5342
  "hiddenAliases": [],
5222
- "id": "hardis:org:diagnose:legacyapi",
5343
+ "id": "hardis:org:diagnose:audittrail",
5223
5344
  "pluginAlias": "sfdx-hardis",
5224
5345
  "pluginName": "sfdx-hardis",
5225
5346
  "pluginType": "core",
5226
5347
  "strict": true,
5227
5348
  "enableJsonFlag": true,
5228
- "title": "Check for legacy API use",
5349
+ "title": "Diagnose content of Setup Audit Trail",
5229
5350
  "requiresProject": false,
5230
5351
  "isESM": true,
5231
5352
  "relativePath": [
@@ -5234,42 +5355,42 @@
5234
5355
  "hardis",
5235
5356
  "org",
5236
5357
  "diagnose",
5237
- "legacyapi.js"
5358
+ "audittrail.js"
5238
5359
  ],
5239
5360
  "aliasPermutations": [],
5240
5361
  "permutations": [
5241
- "hardis:org:diagnose:legacyapi",
5242
- "org:hardis:diagnose:legacyapi",
5243
- "org:diagnose:hardis:legacyapi",
5244
- "org:diagnose:legacyapi:hardis",
5245
- "hardis:diagnose:org:legacyapi",
5246
- "diagnose:hardis:org:legacyapi",
5247
- "diagnose:org:hardis:legacyapi",
5248
- "diagnose:org:legacyapi:hardis",
5249
- "hardis:diagnose:legacyapi:org",
5250
- "diagnose:hardis:legacyapi:org",
5251
- "diagnose:legacyapi:hardis:org",
5252
- "diagnose:legacyapi:org:hardis",
5253
- "hardis:org:legacyapi:diagnose",
5254
- "org:hardis:legacyapi:diagnose",
5255
- "org:legacyapi:hardis:diagnose",
5256
- "org:legacyapi:diagnose:hardis",
5257
- "hardis:legacyapi:org:diagnose",
5258
- "legacyapi:hardis:org:diagnose",
5259
- "legacyapi:org:hardis:diagnose",
5260
- "legacyapi:org:diagnose:hardis",
5261
- "hardis:legacyapi:diagnose:org",
5262
- "legacyapi:hardis:diagnose:org",
5263
- "legacyapi:diagnose:hardis:org",
5264
- "legacyapi:diagnose:org:hardis"
5362
+ "hardis:org:diagnose:audittrail",
5363
+ "org:hardis:diagnose:audittrail",
5364
+ "org:diagnose:hardis:audittrail",
5365
+ "org:diagnose:audittrail:hardis",
5366
+ "hardis:diagnose:org:audittrail",
5367
+ "diagnose:hardis:org:audittrail",
5368
+ "diagnose:org:hardis:audittrail",
5369
+ "diagnose:org:audittrail:hardis",
5370
+ "hardis:diagnose:audittrail:org",
5371
+ "diagnose:hardis:audittrail:org",
5372
+ "diagnose:audittrail:hardis:org",
5373
+ "diagnose:audittrail:org:hardis",
5374
+ "hardis:org:audittrail:diagnose",
5375
+ "org:hardis:audittrail:diagnose",
5376
+ "org:audittrail:hardis:diagnose",
5377
+ "org:audittrail:diagnose:hardis",
5378
+ "hardis:audittrail:org:diagnose",
5379
+ "audittrail:hardis:org:diagnose",
5380
+ "audittrail:org:hardis:diagnose",
5381
+ "audittrail:org:diagnose:hardis",
5382
+ "hardis:audittrail:diagnose:org",
5383
+ "audittrail:hardis:diagnose:org",
5384
+ "audittrail:diagnose:hardis:org",
5385
+ "audittrail:diagnose:org:hardis"
5265
5386
  ]
5266
5387
  },
5267
- "hardis:org:diagnose:licenses": {
5388
+ "hardis:org:diagnose:instanceupgrade": {
5268
5389
  "aliases": [],
5269
5390
  "args": {},
5270
- "description": "Mostly used for monitoring (Grafana) but you can also use it manually :)",
5391
+ "description": "Get the date when the org instance will be upgraded (to Spring, Summer or Winter)\n ",
5271
5392
  "examples": [
5272
- "$ sf hardis:org:diagnose:licenses"
5393
+ "$ sf hardis:org:diagnose:instanceupgrade"
5273
5394
  ],
5274
5395
  "flags": {
5275
5396
  "json": {
@@ -5287,21 +5408,6 @@
5287
5408
  "multiple": false,
5288
5409
  "type": "option"
5289
5410
  },
5290
- "outputfile": {
5291
- "char": "f",
5292
- "description": "Force the path and name of output report file. Must end with .csv",
5293
- "name": "outputfile",
5294
- "hasDynamicHelp": false,
5295
- "multiple": false,
5296
- "type": "option"
5297
- },
5298
- "usedonly": {
5299
- "char": "u",
5300
- "description": "Filter to have only used licenses",
5301
- "name": "usedonly",
5302
- "allowNo": false,
5303
- "type": "boolean"
5304
- },
5305
5411
  "debug": {
5306
5412
  "char": "d",
5307
5413
  "description": "Activate debug mode (more logs)",
@@ -5340,13 +5446,13 @@
5340
5446
  },
5341
5447
  "hasDynamicHelp": true,
5342
5448
  "hiddenAliases": [],
5343
- "id": "hardis:org:diagnose:licenses",
5449
+ "id": "hardis:org:diagnose:instanceupgrade",
5344
5450
  "pluginAlias": "sfdx-hardis",
5345
5451
  "pluginName": "sfdx-hardis",
5346
5452
  "pluginType": "core",
5347
5453
  "strict": true,
5348
5454
  "enableJsonFlag": true,
5349
- "title": "List licenses subscribed and used in a Salesforce org",
5455
+ "title": "Get Instance Upgrade date",
5350
5456
  "requiresProject": false,
5351
5457
  "isESM": true,
5352
5458
  "relativePath": [
@@ -5355,59 +5461,80 @@
5355
5461
  "hardis",
5356
5462
  "org",
5357
5463
  "diagnose",
5358
- "licenses.js"
5464
+ "instanceupgrade.js"
5359
5465
  ],
5360
5466
  "aliasPermutations": [],
5361
5467
  "permutations": [
5362
- "hardis:org:diagnose:licenses",
5363
- "org:hardis:diagnose:licenses",
5364
- "org:diagnose:hardis:licenses",
5365
- "org:diagnose:licenses:hardis",
5366
- "hardis:diagnose:org:licenses",
5367
- "diagnose:hardis:org:licenses",
5368
- "diagnose:org:hardis:licenses",
5369
- "diagnose:org:licenses:hardis",
5370
- "hardis:diagnose:licenses:org",
5371
- "diagnose:hardis:licenses:org",
5372
- "diagnose:licenses:hardis:org",
5373
- "diagnose:licenses:org:hardis",
5374
- "hardis:org:licenses:diagnose",
5375
- "org:hardis:licenses:diagnose",
5376
- "org:licenses:hardis:diagnose",
5377
- "org:licenses:diagnose:hardis",
5378
- "hardis:licenses:org:diagnose",
5379
- "licenses:hardis:org:diagnose",
5380
- "licenses:org:hardis:diagnose",
5381
- "licenses:org:diagnose:hardis",
5382
- "hardis:licenses:diagnose:org",
5383
- "licenses:hardis:diagnose:org",
5384
- "licenses:diagnose:hardis:org",
5385
- "licenses:diagnose:org:hardis"
5386
- ]
5387
- },
5388
- "hardis:org:diagnose:releaseupdates": {
5389
- "aliases": [],
5390
- "args": {},
5391
- "description": "Export Release Updates into a CSV file with selected criteria, and highlight Release Updates that should be checked.\n\nBefore publishing **Breaking Changes** ❌, Salesforce announce them in the setup menu [**Release Updates**](https://help.salesforce.com/s/articleView?id=sf.release_updates.htm&type=5)\n\n⚠️ Some of them are very important, because if you don't make the related upgrades in time (ex: before Winter 25) , your production org can crash !\n\nThis command is part of [sfdx-hardis Monitoring](https://sfdx-hardis.cloudity.com/salesforce-monitoring-release-updates/) and can output Grafana, Slack and MsTeams Notifications.\n",
5392
- "examples": [
5393
- "$ sf hardis:org:diagnose:releaseupdates"
5394
- ],
5395
- "flags": {
5396
- "json": {
5397
- "description": "Format output as json.",
5398
- "helpGroup": "GLOBAL",
5399
- "name": "json",
5400
- "allowNo": false,
5401
- "type": "boolean"
5402
- },
5403
- "flags-dir": {
5404
- "helpGroup": "GLOBAL",
5405
- "name": "flags-dir",
5468
+ "hardis:org:diagnose:instanceupgrade",
5469
+ "org:hardis:diagnose:instanceupgrade",
5470
+ "org:diagnose:hardis:instanceupgrade",
5471
+ "org:diagnose:instanceupgrade:hardis",
5472
+ "hardis:diagnose:org:instanceupgrade",
5473
+ "diagnose:hardis:org:instanceupgrade",
5474
+ "diagnose:org:hardis:instanceupgrade",
5475
+ "diagnose:org:instanceupgrade:hardis",
5476
+ "hardis:diagnose:instanceupgrade:org",
5477
+ "diagnose:hardis:instanceupgrade:org",
5478
+ "diagnose:instanceupgrade:hardis:org",
5479
+ "diagnose:instanceupgrade:org:hardis",
5480
+ "hardis:org:instanceupgrade:diagnose",
5481
+ "org:hardis:instanceupgrade:diagnose",
5482
+ "org:instanceupgrade:hardis:diagnose",
5483
+ "org:instanceupgrade:diagnose:hardis",
5484
+ "hardis:instanceupgrade:org:diagnose",
5485
+ "instanceupgrade:hardis:org:diagnose",
5486
+ "instanceupgrade:org:hardis:diagnose",
5487
+ "instanceupgrade:org:diagnose:hardis",
5488
+ "hardis:instanceupgrade:diagnose:org",
5489
+ "instanceupgrade:hardis:diagnose:org",
5490
+ "instanceupgrade:diagnose:hardis:org",
5491
+ "instanceupgrade:diagnose:org:hardis"
5492
+ ]
5493
+ },
5494
+ "hardis:org:diagnose:legacyapi": {
5495
+ "aliases": [],
5496
+ "args": {},
5497
+ "description": "Checks if an org uses retired or someday retired API version\n\n\nSee article below\n\n[![Handle Salesforce API versions Deprecation like a pro](https://github.com/hardisgroupcom/sfdx-hardis/raw/main/docs/assets/images/article-deprecated-api.jpg)](https://nicolas.vuillamy.fr/handle-salesforce-api-versions-deprecation-like-a-pro-335065f52238)\n\nThis command is part of [sfdx-hardis Monitoring](https://sfdx-hardis.cloudity.com/salesforce-monitoring-deprecated-api-calls/) and can output Grafana, Slack and MsTeams Notifications.\n",
5498
+ "examples": [
5499
+ "$ sf hardis:org:diagnose:legacyapi",
5500
+ "$ sf hardis:org:diagnose:legacyapi -u hardis@myclient.com",
5501
+ "$ sf hardis:org:diagnose:legacyapi --outputfile 'c:/path/to/folder/legacyapi.csv'",
5502
+ "$ sf hardis:org:diagnose:legacyapi -u hardis@myclient.com --outputfile ./tmp/legacyapi.csv"
5503
+ ],
5504
+ "flags": {
5505
+ "json": {
5506
+ "description": "Format output as json.",
5507
+ "helpGroup": "GLOBAL",
5508
+ "name": "json",
5509
+ "allowNo": false,
5510
+ "type": "boolean"
5511
+ },
5512
+ "flags-dir": {
5513
+ "helpGroup": "GLOBAL",
5514
+ "name": "flags-dir",
5406
5515
  "summary": "Import flag values from a directory.",
5407
5516
  "hasDynamicHelp": false,
5408
5517
  "multiple": false,
5409
5518
  "type": "option"
5410
5519
  },
5520
+ "eventtype": {
5521
+ "char": "e",
5522
+ "description": "Type of EventLogFile event to analyze",
5523
+ "name": "eventtype",
5524
+ "default": "ApiTotalUsage",
5525
+ "hasDynamicHelp": false,
5526
+ "multiple": false,
5527
+ "type": "option"
5528
+ },
5529
+ "limit": {
5530
+ "char": "l",
5531
+ "description": "Number of latest EventLogFile events to analyze",
5532
+ "name": "limit",
5533
+ "default": 999,
5534
+ "hasDynamicHelp": false,
5535
+ "multiple": false,
5536
+ "type": "option"
5537
+ },
5411
5538
  "outputfile": {
5412
5539
  "char": "f",
5413
5540
  "description": "Force the path and name of output report file. Must end with .csv",
@@ -5454,13 +5581,13 @@
5454
5581
  },
5455
5582
  "hasDynamicHelp": true,
5456
5583
  "hiddenAliases": [],
5457
- "id": "hardis:org:diagnose:releaseupdates",
5584
+ "id": "hardis:org:diagnose:legacyapi",
5458
5585
  "pluginAlias": "sfdx-hardis",
5459
5586
  "pluginName": "sfdx-hardis",
5460
5587
  "pluginType": "core",
5461
5588
  "strict": true,
5462
5589
  "enableJsonFlag": true,
5463
- "title": "Check Release Updates of an org",
5590
+ "title": "Check for legacy API use",
5464
5591
  "requiresProject": false,
5465
5592
  "isESM": true,
5466
5593
  "relativePath": [
@@ -5469,43 +5596,42 @@
5469
5596
  "hardis",
5470
5597
  "org",
5471
5598
  "diagnose",
5472
- "releaseupdates.js"
5599
+ "legacyapi.js"
5473
5600
  ],
5474
5601
  "aliasPermutations": [],
5475
5602
  "permutations": [
5476
- "hardis:org:diagnose:releaseupdates",
5477
- "org:hardis:diagnose:releaseupdates",
5478
- "org:diagnose:hardis:releaseupdates",
5479
- "org:diagnose:releaseupdates:hardis",
5480
- "hardis:diagnose:org:releaseupdates",
5481
- "diagnose:hardis:org:releaseupdates",
5482
- "diagnose:org:hardis:releaseupdates",
5483
- "diagnose:org:releaseupdates:hardis",
5484
- "hardis:diagnose:releaseupdates:org",
5485
- "diagnose:hardis:releaseupdates:org",
5486
- "diagnose:releaseupdates:hardis:org",
5487
- "diagnose:releaseupdates:org:hardis",
5488
- "hardis:org:releaseupdates:diagnose",
5489
- "org:hardis:releaseupdates:diagnose",
5490
- "org:releaseupdates:hardis:diagnose",
5491
- "org:releaseupdates:diagnose:hardis",
5492
- "hardis:releaseupdates:org:diagnose",
5493
- "releaseupdates:hardis:org:diagnose",
5494
- "releaseupdates:org:hardis:diagnose",
5495
- "releaseupdates:org:diagnose:hardis",
5496
- "hardis:releaseupdates:diagnose:org",
5497
- "releaseupdates:hardis:diagnose:org",
5498
- "releaseupdates:diagnose:hardis:org",
5499
- "releaseupdates:diagnose:org:hardis"
5603
+ "hardis:org:diagnose:legacyapi",
5604
+ "org:hardis:diagnose:legacyapi",
5605
+ "org:diagnose:hardis:legacyapi",
5606
+ "org:diagnose:legacyapi:hardis",
5607
+ "hardis:diagnose:org:legacyapi",
5608
+ "diagnose:hardis:org:legacyapi",
5609
+ "diagnose:org:hardis:legacyapi",
5610
+ "diagnose:org:legacyapi:hardis",
5611
+ "hardis:diagnose:legacyapi:org",
5612
+ "diagnose:hardis:legacyapi:org",
5613
+ "diagnose:legacyapi:hardis:org",
5614
+ "diagnose:legacyapi:org:hardis",
5615
+ "hardis:org:legacyapi:diagnose",
5616
+ "org:hardis:legacyapi:diagnose",
5617
+ "org:legacyapi:hardis:diagnose",
5618
+ "org:legacyapi:diagnose:hardis",
5619
+ "hardis:legacyapi:org:diagnose",
5620
+ "legacyapi:hardis:org:diagnose",
5621
+ "legacyapi:org:hardis:diagnose",
5622
+ "legacyapi:org:diagnose:hardis",
5623
+ "hardis:legacyapi:diagnose:org",
5624
+ "legacyapi:hardis:diagnose:org",
5625
+ "legacyapi:diagnose:hardis:org",
5626
+ "legacyapi:diagnose:org:hardis"
5500
5627
  ]
5501
5628
  },
5502
- "hardis:org:diagnose:unused-apex-classes": {
5629
+ "hardis:org:diagnose:licenses": {
5503
5630
  "aliases": [],
5504
5631
  "args": {},
5505
- "description": "List all async Apex classes (Batch,Queueable,Schedulable) that has not been called for more than 365 days.\n \nThe result class list probably can be removed from the project, and that will improve your test classes performances :)\n\nThe number of unused day is overridable using --days option. \n\nThe command uses queries on AsyncApexJob and CronTrigger technical tables to build the result.\n\nApex Classes CreatedBy and CreatedOn fields are calculated from MIN(date from git, date from org)\n\nThis command is part of [sfdx-hardis Monitoring](https://sfdx-hardis.cloudity.com/salesforce-monitoring-unused-apex-classes/) and can output Grafana, Slack and MsTeams Notifications.\n\n![](https://sfdx-hardis.cloudity.com/assets/images/screenshot-monitoring-unused-apex-grafana.jpg)\n",
5632
+ "description": "Mostly used for monitoring (Grafana) but you can also use it manually :)",
5506
5633
  "examples": [
5507
- "$ sf hardis:org:diagnose:unused-apex-classes",
5508
- "$ sf hardis:org:diagnose:unused-apex-classes --days 700"
5634
+ "$ sf hardis:org:diagnose:licenses"
5509
5635
  ],
5510
5636
  "flags": {
5511
5637
  "json": {
@@ -5531,13 +5657,12 @@
5531
5657
  "multiple": false,
5532
5658
  "type": "option"
5533
5659
  },
5534
- "days": {
5535
- "char": "t",
5536
- "description": "Extracts the users that have been inactive for the amount of days specified. In CI, default is 180 days",
5537
- "name": "days",
5538
- "hasDynamicHelp": false,
5539
- "multiple": false,
5540
- "type": "option"
5660
+ "usedonly": {
5661
+ "char": "u",
5662
+ "description": "Filter to have only used licenses",
5663
+ "name": "usedonly",
5664
+ "allowNo": false,
5665
+ "type": "boolean"
5541
5666
  },
5542
5667
  "debug": {
5543
5668
  "char": "d",
@@ -5577,13 +5702,13 @@
5577
5702
  },
5578
5703
  "hasDynamicHelp": true,
5579
5704
  "hiddenAliases": [],
5580
- "id": "hardis:org:diagnose:unused-apex-classes",
5705
+ "id": "hardis:org:diagnose:licenses",
5581
5706
  "pluginAlias": "sfdx-hardis",
5582
5707
  "pluginName": "sfdx-hardis",
5583
5708
  "pluginType": "core",
5584
5709
  "strict": true,
5585
5710
  "enableJsonFlag": true,
5586
- "title": "Detect unused Apex classes in an org",
5711
+ "title": "List licenses subscribed and used in a Salesforce org",
5587
5712
  "requiresProject": false,
5588
5713
  "isESM": true,
5589
5714
  "relativePath": [
@@ -5592,42 +5717,42 @@
5592
5717
  "hardis",
5593
5718
  "org",
5594
5719
  "diagnose",
5595
- "unused-apex-classes.js"
5720
+ "licenses.js"
5596
5721
  ],
5597
5722
  "aliasPermutations": [],
5598
5723
  "permutations": [
5599
- "hardis:org:diagnose:unused-apex-classes",
5600
- "org:hardis:diagnose:unused-apex-classes",
5601
- "org:diagnose:hardis:unused-apex-classes",
5602
- "org:diagnose:unused-apex-classes:hardis",
5603
- "hardis:diagnose:org:unused-apex-classes",
5604
- "diagnose:hardis:org:unused-apex-classes",
5605
- "diagnose:org:hardis:unused-apex-classes",
5606
- "diagnose:org:unused-apex-classes:hardis",
5607
- "hardis:diagnose:unused-apex-classes:org",
5608
- "diagnose:hardis:unused-apex-classes:org",
5609
- "diagnose:unused-apex-classes:hardis:org",
5610
- "diagnose:unused-apex-classes:org:hardis",
5611
- "hardis:org:unused-apex-classes:diagnose",
5612
- "org:hardis:unused-apex-classes:diagnose",
5613
- "org:unused-apex-classes:hardis:diagnose",
5614
- "org:unused-apex-classes:diagnose:hardis",
5615
- "hardis:unused-apex-classes:org:diagnose",
5616
- "unused-apex-classes:hardis:org:diagnose",
5617
- "unused-apex-classes:org:hardis:diagnose",
5618
- "unused-apex-classes:org:diagnose:hardis",
5619
- "hardis:unused-apex-classes:diagnose:org",
5620
- "unused-apex-classes:hardis:diagnose:org",
5621
- "unused-apex-classes:diagnose:hardis:org",
5622
- "unused-apex-classes:diagnose:org:hardis"
5724
+ "hardis:org:diagnose:licenses",
5725
+ "org:hardis:diagnose:licenses",
5726
+ "org:diagnose:hardis:licenses",
5727
+ "org:diagnose:licenses:hardis",
5728
+ "hardis:diagnose:org:licenses",
5729
+ "diagnose:hardis:org:licenses",
5730
+ "diagnose:org:hardis:licenses",
5731
+ "diagnose:org:licenses:hardis",
5732
+ "hardis:diagnose:licenses:org",
5733
+ "diagnose:hardis:licenses:org",
5734
+ "diagnose:licenses:hardis:org",
5735
+ "diagnose:licenses:org:hardis",
5736
+ "hardis:org:licenses:diagnose",
5737
+ "org:hardis:licenses:diagnose",
5738
+ "org:licenses:hardis:diagnose",
5739
+ "org:licenses:diagnose:hardis",
5740
+ "hardis:licenses:org:diagnose",
5741
+ "licenses:hardis:org:diagnose",
5742
+ "licenses:org:hardis:diagnose",
5743
+ "licenses:org:diagnose:hardis",
5744
+ "hardis:licenses:diagnose:org",
5745
+ "licenses:hardis:diagnose:org",
5746
+ "licenses:diagnose:hardis:org",
5747
+ "licenses:diagnose:org:hardis"
5623
5748
  ]
5624
5749
  },
5625
- "hardis:org:diagnose:unused-connected-apps": {
5750
+ "hardis:org:diagnose:releaseupdates": {
5626
5751
  "aliases": [],
5627
5752
  "args": {},
5628
- "description": "Request objects ConnectedApp, LoginHistory and OAuthToken to find which connected apps might not be used anymore, and could be deleted for security / technical debt reasons.\n\nCheck with Connected Apps metadatas if the app is still active (inactive = \"Admin Users are pre-authorized + no Profile or Permission set assigned\")\n\nThe following default Salesforce Connected Apps are ignored:\n\n- Ant Migration Tool\n- Chatter Desktop\n- Chatter Mobile for BlackBerry\n- Force.com IDE\n- OIQ_Integration\n- Salesforce CLI\n- Salesforce Files\n- Salesforce Mobile Dashboards\n- Salesforce Touch\n- Salesforce for Outlook\n- SalesforceA\n- SalesforceA for Android\n- SalesforceA for iOS\n- SalesforceDX Namespace Registry\n- SalesforceIQ\n\nYou can add more ignored apps by defining a comma-separated list of names in variable ALLOWED_INACTIVE_CONNECTED_APPS\n\n_Example: ALLOWED_INACTIVE_CONNECTED_APPS=My App 1,My App 2, My App 3_\n\nThis command is part of [sfdx-hardis Monitoring](https://sfdx-hardis.cloudity.com/salesforce-monitoring-release-updates/) and can output Grafana, Slack and MsTeams Notifications.\n",
5753
+ "description": "Export Release Updates into a CSV file with selected criteria, and highlight Release Updates that should be checked.\n\nBefore publishing **Breaking Changes** ❌, Salesforce announce them in the setup menu [**Release Updates**](https://help.salesforce.com/s/articleView?id=sf.release_updates.htm&type=5)\n\n⚠️ Some of them are very important, because if you don't make the related upgrades in time (ex: before Winter 25) , your production org can crash !\n\nThis command is part of [sfdx-hardis Monitoring](https://sfdx-hardis.cloudity.com/salesforce-monitoring-release-updates/) and can output Grafana, Slack and MsTeams Notifications.\n",
5629
5754
  "examples": [
5630
- "$ sf hardis:org:diagnose:unused-connected-apps"
5755
+ "$ sf hardis:org:diagnose:releaseupdates"
5631
5756
  ],
5632
5757
  "flags": {
5633
5758
  "json": {
@@ -5691,30 +5816,13 @@
5691
5816
  },
5692
5817
  "hasDynamicHelp": true,
5693
5818
  "hiddenAliases": [],
5694
- "id": "hardis:org:diagnose:unused-connected-apps",
5819
+ "id": "hardis:org:diagnose:releaseupdates",
5695
5820
  "pluginAlias": "sfdx-hardis",
5696
5821
  "pluginName": "sfdx-hardis",
5697
5822
  "pluginType": "core",
5698
5823
  "strict": true,
5699
5824
  "enableJsonFlag": true,
5700
- "title": "Unused Connected Apps in an org",
5701
- "allowedInactiveConnectedApps": [
5702
- "Ant Migration Tool",
5703
- "Chatter Desktop",
5704
- "Chatter Mobile for BlackBerry",
5705
- "Force.com IDE",
5706
- "OIQ_Integration",
5707
- "Salesforce CLI",
5708
- "Salesforce Files",
5709
- "Salesforce Mobile Dashboards",
5710
- "Salesforce Touch",
5711
- "Salesforce for Outlook",
5712
- "SalesforceA",
5713
- "SalesforceA for Android",
5714
- "SalesforceA for iOS",
5715
- "SalesforceDX Namespace Registry",
5716
- "SalesforceIQ"
5717
- ],
5825
+ "title": "Check Release Updates of an org",
5718
5826
  "requiresProject": false,
5719
5827
  "isESM": true,
5720
5828
  "relativePath": [
@@ -5723,44 +5831,44 @@
5723
5831
  "hardis",
5724
5832
  "org",
5725
5833
  "diagnose",
5726
- "unused-connected-apps.js"
5834
+ "releaseupdates.js"
5727
5835
  ],
5728
5836
  "aliasPermutations": [],
5729
5837
  "permutations": [
5730
- "hardis:org:diagnose:unused-connected-apps",
5731
- "org:hardis:diagnose:unused-connected-apps",
5732
- "org:diagnose:hardis:unused-connected-apps",
5733
- "org:diagnose:unused-connected-apps:hardis",
5734
- "hardis:diagnose:org:unused-connected-apps",
5735
- "diagnose:hardis:org:unused-connected-apps",
5736
- "diagnose:org:hardis:unused-connected-apps",
5737
- "diagnose:org:unused-connected-apps:hardis",
5738
- "hardis:diagnose:unused-connected-apps:org",
5739
- "diagnose:hardis:unused-connected-apps:org",
5740
- "diagnose:unused-connected-apps:hardis:org",
5741
- "diagnose:unused-connected-apps:org:hardis",
5742
- "hardis:org:unused-connected-apps:diagnose",
5743
- "org:hardis:unused-connected-apps:diagnose",
5744
- "org:unused-connected-apps:hardis:diagnose",
5745
- "org:unused-connected-apps:diagnose:hardis",
5746
- "hardis:unused-connected-apps:org:diagnose",
5747
- "unused-connected-apps:hardis:org:diagnose",
5748
- "unused-connected-apps:org:hardis:diagnose",
5749
- "unused-connected-apps:org:diagnose:hardis",
5750
- "hardis:unused-connected-apps:diagnose:org",
5751
- "unused-connected-apps:hardis:diagnose:org",
5752
- "unused-connected-apps:diagnose:hardis:org",
5753
- "unused-connected-apps:diagnose:org:hardis"
5754
- ]
5755
- },
5756
- "hardis:org:diagnose:unusedlicenses": {
5757
- "aliases": [],
5758
- "args": {},
5759
- "description": "When you assign a Permission Set to a user, and that this Permission Set is related to a Permission Set License, a Permission Set License Assignment is automatically created for the user.\n\nBut when you unassign this Permission Set from the user, **the Permission Set License Assignment is not deleted**.\n\nThis leads that you can be **charged for Permission Set Licenses that are not used** !\n\nThis command detects such useless Permission Set Licenses Assignments and suggests to delete them.\n\nMany thanks to [Vincent Finet](https://www.linkedin.com/in/vincentfinet/) for the inspiration during his great speaker session at [French Touch Dreamin '23](https://frenchtouchdreamin.com/), and his kind agreement for reusing such inspiration in this command :)\n\nThis command is part of [sfdx-hardis Monitoring](https://sfdx-hardis.cloudity.com/salesforce-monitoring-unused-licenses/) and can output Grafana, Slack and MsTeams Notifications.\n",
5760
- "examples": [
5761
- "$ sf hardis:org:diagnose:unusedlicenses",
5762
- "$ sf hardis:org:diagnose:unusedlicenses --fix"
5763
- ],
5838
+ "hardis:org:diagnose:releaseupdates",
5839
+ "org:hardis:diagnose:releaseupdates",
5840
+ "org:diagnose:hardis:releaseupdates",
5841
+ "org:diagnose:releaseupdates:hardis",
5842
+ "hardis:diagnose:org:releaseupdates",
5843
+ "diagnose:hardis:org:releaseupdates",
5844
+ "diagnose:org:hardis:releaseupdates",
5845
+ "diagnose:org:releaseupdates:hardis",
5846
+ "hardis:diagnose:releaseupdates:org",
5847
+ "diagnose:hardis:releaseupdates:org",
5848
+ "diagnose:releaseupdates:hardis:org",
5849
+ "diagnose:releaseupdates:org:hardis",
5850
+ "hardis:org:releaseupdates:diagnose",
5851
+ "org:hardis:releaseupdates:diagnose",
5852
+ "org:releaseupdates:hardis:diagnose",
5853
+ "org:releaseupdates:diagnose:hardis",
5854
+ "hardis:releaseupdates:org:diagnose",
5855
+ "releaseupdates:hardis:org:diagnose",
5856
+ "releaseupdates:org:hardis:diagnose",
5857
+ "releaseupdates:org:diagnose:hardis",
5858
+ "hardis:releaseupdates:diagnose:org",
5859
+ "releaseupdates:hardis:diagnose:org",
5860
+ "releaseupdates:diagnose:hardis:org",
5861
+ "releaseupdates:diagnose:org:hardis"
5862
+ ]
5863
+ },
5864
+ "hardis:org:diagnose:unused-apex-classes": {
5865
+ "aliases": [],
5866
+ "args": {},
5867
+ "description": "List all async Apex classes (Batch,Queueable,Schedulable) that has not been called for more than 365 days.\n \nThe result class list probably can be removed from the project, and that will improve your test classes performances :)\n\nThe number of unused day is overridable using --days option. \n\nThe command uses queries on AsyncApexJob and CronTrigger technical tables to build the result.\n\nApex Classes CreatedBy and CreatedOn fields are calculated from MIN(date from git, date from org)\n\nThis command is part of [sfdx-hardis Monitoring](https://sfdx-hardis.cloudity.com/salesforce-monitoring-unused-apex-classes/) and can output Grafana, Slack and MsTeams Notifications.\n\n![](https://sfdx-hardis.cloudity.com/assets/images/screenshot-monitoring-unused-apex-grafana.jpg)\n",
5868
+ "examples": [
5869
+ "$ sf hardis:org:diagnose:unused-apex-classes",
5870
+ "$ sf hardis:org:diagnose:unused-apex-classes --days 700"
5871
+ ],
5764
5872
  "flags": {
5765
5873
  "json": {
5766
5874
  "description": "Format output as json.",
@@ -5785,6 +5893,14 @@
5785
5893
  "multiple": false,
5786
5894
  "type": "option"
5787
5895
  },
5896
+ "days": {
5897
+ "char": "t",
5898
+ "description": "Extracts the users that have been inactive for the amount of days specified. In CI, default is 180 days",
5899
+ "name": "days",
5900
+ "hasDynamicHelp": false,
5901
+ "multiple": false,
5902
+ "type": "option"
5903
+ },
5788
5904
  "debug": {
5789
5905
  "char": "d",
5790
5906
  "description": "Activate debug mode (more logs)",
@@ -5823,32 +5939,14 @@
5823
5939
  },
5824
5940
  "hasDynamicHelp": true,
5825
5941
  "hiddenAliases": [],
5826
- "id": "hardis:org:diagnose:unusedlicenses",
5942
+ "id": "hardis:org:diagnose:unused-apex-classes",
5827
5943
  "pluginAlias": "sfdx-hardis",
5828
5944
  "pluginName": "sfdx-hardis",
5829
5945
  "pluginType": "core",
5830
5946
  "strict": true,
5831
5947
  "enableJsonFlag": true,
5832
- "title": "Detect unused Permission Set Licenses (beta)",
5948
+ "title": "Detect unused Apex classes in an org",
5833
5949
  "requiresProject": false,
5834
- "additionalPermissionSetsToAlwaysGet": [
5835
- "Sales_User"
5836
- ],
5837
- "permSetsPermSetLicenses": [
5838
- {
5839
- "permSet": "Sales_User",
5840
- "permSetLicense": "SalesUserPsl"
5841
- }
5842
- ],
5843
- "profilesPermissionSetLicenses": [
5844
- {
5845
- "profile": "Salesforce API Only",
5846
- "permSetLicense": "SalesforceAPIIntegrationPsl"
5847
- }
5848
- ],
5849
- "alwaysExcludeForActiveUsersPermissionSetLicenses": [
5850
- "IdentityConnect"
5851
- ],
5852
5950
  "isESM": true,
5853
5951
  "relativePath": [
5854
5952
  "lib",
@@ -5856,46 +5954,42 @@
5856
5954
  "hardis",
5857
5955
  "org",
5858
5956
  "diagnose",
5859
- "unusedlicenses.js"
5957
+ "unused-apex-classes.js"
5860
5958
  ],
5861
5959
  "aliasPermutations": [],
5862
5960
  "permutations": [
5863
- "hardis:org:diagnose:unusedlicenses",
5864
- "org:hardis:diagnose:unusedlicenses",
5865
- "org:diagnose:hardis:unusedlicenses",
5866
- "org:diagnose:unusedlicenses:hardis",
5867
- "hardis:diagnose:org:unusedlicenses",
5868
- "diagnose:hardis:org:unusedlicenses",
5869
- "diagnose:org:hardis:unusedlicenses",
5870
- "diagnose:org:unusedlicenses:hardis",
5871
- "hardis:diagnose:unusedlicenses:org",
5872
- "diagnose:hardis:unusedlicenses:org",
5873
- "diagnose:unusedlicenses:hardis:org",
5874
- "diagnose:unusedlicenses:org:hardis",
5875
- "hardis:org:unusedlicenses:diagnose",
5876
- "org:hardis:unusedlicenses:diagnose",
5877
- "org:unusedlicenses:hardis:diagnose",
5878
- "org:unusedlicenses:diagnose:hardis",
5879
- "hardis:unusedlicenses:org:diagnose",
5880
- "unusedlicenses:hardis:org:diagnose",
5881
- "unusedlicenses:org:hardis:diagnose",
5882
- "unusedlicenses:org:diagnose:hardis",
5883
- "hardis:unusedlicenses:diagnose:org",
5884
- "unusedlicenses:hardis:diagnose:org",
5885
- "unusedlicenses:diagnose:hardis:org",
5886
- "unusedlicenses:diagnose:org:hardis"
5961
+ "hardis:org:diagnose:unused-apex-classes",
5962
+ "org:hardis:diagnose:unused-apex-classes",
5963
+ "org:diagnose:hardis:unused-apex-classes",
5964
+ "org:diagnose:unused-apex-classes:hardis",
5965
+ "hardis:diagnose:org:unused-apex-classes",
5966
+ "diagnose:hardis:org:unused-apex-classes",
5967
+ "diagnose:org:hardis:unused-apex-classes",
5968
+ "diagnose:org:unused-apex-classes:hardis",
5969
+ "hardis:diagnose:unused-apex-classes:org",
5970
+ "diagnose:hardis:unused-apex-classes:org",
5971
+ "diagnose:unused-apex-classes:hardis:org",
5972
+ "diagnose:unused-apex-classes:org:hardis",
5973
+ "hardis:org:unused-apex-classes:diagnose",
5974
+ "org:hardis:unused-apex-classes:diagnose",
5975
+ "org:unused-apex-classes:hardis:diagnose",
5976
+ "org:unused-apex-classes:diagnose:hardis",
5977
+ "hardis:unused-apex-classes:org:diagnose",
5978
+ "unused-apex-classes:hardis:org:diagnose",
5979
+ "unused-apex-classes:org:hardis:diagnose",
5980
+ "unused-apex-classes:org:diagnose:hardis",
5981
+ "hardis:unused-apex-classes:diagnose:org",
5982
+ "unused-apex-classes:hardis:diagnose:org",
5983
+ "unused-apex-classes:diagnose:hardis:org",
5984
+ "unused-apex-classes:diagnose:org:hardis"
5887
5985
  ]
5888
5986
  },
5889
- "hardis:org:diagnose:unusedusers": {
5987
+ "hardis:org:diagnose:unused-connected-apps": {
5890
5988
  "aliases": [],
5891
5989
  "args": {},
5892
- "description": "Efficient user management is vital in Salesforce to ensure resources are optimized and costs are controlled. However, inactive or unused user accounts can often go unnoticed, leading to wasted licenses and potential security risks. This tool addresses this challenge by enabling administrators to identify users who haven't logged in within a specified period.\n\nBy analyzing user login activity and last login timestamps, this feature highlights inactive user accounts, allowing administrators to take appropriate action. Whether it's deactivating dormant accounts, freeing up licenses, or ensuring compliance with security policies, this functionality empowers administrators to maintain a lean and secure Salesforce environment.\n\nlicensetypes values are the following:\n\n- all-crm: SFDC,AUL,AUL1,AULL_IGHT\n\n- all-paying: SFDC,AUL,AUL1,AULL_IGHT,PID_Customer_Community,PID_Customer_Community_Login,PID_Partner_Community,PID_Partner_Community_Login\n\nNote: You can see the full list of available license identifiers in [Salesforce Documentation](https://developer.salesforce.com/docs/atlas.en-us.object_reference.meta/object_reference/sforce_api_objects_userlicense.htm)\n\nUse --returnactiveusers to revert the command and retrieve active users that has logged in during the period.\n\nThis command is part of [sfdx-hardis Monitoring](https://sfdx-hardis.cloudity.com/salesforce-monitoring-inactive-users/) and can output Grafana, Slack and MsTeams Notifications.\n",
5990
+ "description": "Request objects ConnectedApp, LoginHistory and OAuthToken to find which connected apps might not be used anymore, and could be deleted for security / technical debt reasons.\n\nCheck with Connected Apps metadatas if the app is still active (inactive = \"Admin Users are pre-authorized + no Profile or Permission set assigned\")\n\nThe following default Salesforce Connected Apps are ignored:\n\n- Ant Migration Tool\n- Chatter Desktop\n- Chatter Mobile for BlackBerry\n- Force.com IDE\n- OIQ_Integration\n- Salesforce CLI\n- Salesforce Files\n- Salesforce Mobile Dashboards\n- Salesforce Touch\n- Salesforce for Outlook\n- SalesforceA\n- SalesforceA for Android\n- SalesforceA for iOS\n- SalesforceDX Namespace Registry\n- SalesforceIQ\n\nYou can add more ignored apps by defining a comma-separated list of names in variable ALLOWED_INACTIVE_CONNECTED_APPS\n\n_Example: ALLOWED_INACTIVE_CONNECTED_APPS=My App 1,My App 2, My App 3_\n\nThis command is part of [sfdx-hardis Monitoring](https://sfdx-hardis.cloudity.com/salesforce-monitoring-release-updates/) and can output Grafana, Slack and MsTeams Notifications.\n",
5893
5991
  "examples": [
5894
- "$ sf hardis:org:diagnose:unusedusers",
5895
- "$ sf hardis:org:diagnose:unusedusers --days 365",
5896
- "$ sf hardis:org:diagnose:unusedusers --days 60 --licensetypes all-crm",
5897
- "$ sf hardis:org:diagnose:unusedusers --days 60 --licenseidentifiers SFDC,AUL,AUL1",
5898
- "$ sf hardis:org:diagnose:unusedusers --days 60 --licensetypes all-crm --returnactiveusers"
5992
+ "$ sf hardis:org:diagnose:unused-connected-apps"
5899
5993
  ],
5900
5994
  "flags": {
5901
5995
  "json": {
@@ -5921,41 +6015,6 @@
5921
6015
  "multiple": false,
5922
6016
  "type": "option"
5923
6017
  },
5924
- "days": {
5925
- "char": "t",
5926
- "description": "Extracts the users that have been inactive for the amount of days specified. In CI, default is 180 days",
5927
- "name": "days",
5928
- "hasDynamicHelp": false,
5929
- "multiple": false,
5930
- "type": "option"
5931
- },
5932
- "licensetypes": {
5933
- "char": "l",
5934
- "description": "Type of licenses to check. If set, do not use licenseidentifiers option. In CI, default is all-crm",
5935
- "name": "licensetypes",
5936
- "hasDynamicHelp": false,
5937
- "multiple": false,
5938
- "options": [
5939
- "all",
5940
- "all-crm",
5941
- "all-paying"
5942
- ],
5943
- "type": "option"
5944
- },
5945
- "licenseidentifiers": {
5946
- "char": "i",
5947
- "description": "Comma-separated list of license identifiers, in case licensetypes is not used.. Identifiers available at https://developer.salesforce.com/docs/atlas.en-us.object_reference.meta/object_reference/sforce_api_objects_userlicense.htm",
5948
- "name": "licenseidentifiers",
5949
- "hasDynamicHelp": false,
5950
- "multiple": false,
5951
- "type": "option"
5952
- },
5953
- "returnactiveusers": {
5954
- "description": "Inverts the command by returning the active users",
5955
- "name": "returnactiveusers",
5956
- "allowNo": false,
5957
- "type": "boolean"
5958
- },
5959
6018
  "debug": {
5960
6019
  "char": "d",
5961
6020
  "description": "Activate debug mode (more logs)",
@@ -5994,13 +6053,30 @@
5994
6053
  },
5995
6054
  "hasDynamicHelp": true,
5996
6055
  "hiddenAliases": [],
5997
- "id": "hardis:org:diagnose:unusedusers",
6056
+ "id": "hardis:org:diagnose:unused-connected-apps",
5998
6057
  "pluginAlias": "sfdx-hardis",
5999
6058
  "pluginName": "sfdx-hardis",
6000
6059
  "pluginType": "core",
6001
6060
  "strict": true,
6002
6061
  "enableJsonFlag": true,
6003
- "title": "Detect unused Users in Salesforce",
6062
+ "title": "Unused Connected Apps in an org",
6063
+ "allowedInactiveConnectedApps": [
6064
+ "Ant Migration Tool",
6065
+ "Chatter Desktop",
6066
+ "Chatter Mobile for BlackBerry",
6067
+ "Force.com IDE",
6068
+ "OIQ_Integration",
6069
+ "Salesforce CLI",
6070
+ "Salesforce Files",
6071
+ "Salesforce Mobile Dashboards",
6072
+ "Salesforce Touch",
6073
+ "Salesforce for Outlook",
6074
+ "SalesforceA",
6075
+ "SalesforceA for Android",
6076
+ "SalesforceA for iOS",
6077
+ "SalesforceDX Namespace Registry",
6078
+ "SalesforceIQ"
6079
+ ],
6004
6080
  "requiresProject": false,
6005
6081
  "isESM": true,
6006
6082
  "relativePath": [
@@ -6009,42 +6085,43 @@
6009
6085
  "hardis",
6010
6086
  "org",
6011
6087
  "diagnose",
6012
- "unusedusers.js"
6088
+ "unused-connected-apps.js"
6013
6089
  ],
6014
6090
  "aliasPermutations": [],
6015
6091
  "permutations": [
6016
- "hardis:org:diagnose:unusedusers",
6017
- "org:hardis:diagnose:unusedusers",
6018
- "org:diagnose:hardis:unusedusers",
6019
- "org:diagnose:unusedusers:hardis",
6020
- "hardis:diagnose:org:unusedusers",
6021
- "diagnose:hardis:org:unusedusers",
6022
- "diagnose:org:hardis:unusedusers",
6023
- "diagnose:org:unusedusers:hardis",
6024
- "hardis:diagnose:unusedusers:org",
6025
- "diagnose:hardis:unusedusers:org",
6026
- "diagnose:unusedusers:hardis:org",
6027
- "diagnose:unusedusers:org:hardis",
6028
- "hardis:org:unusedusers:diagnose",
6029
- "org:hardis:unusedusers:diagnose",
6030
- "org:unusedusers:hardis:diagnose",
6031
- "org:unusedusers:diagnose:hardis",
6032
- "hardis:unusedusers:org:diagnose",
6033
- "unusedusers:hardis:org:diagnose",
6034
- "unusedusers:org:hardis:diagnose",
6035
- "unusedusers:org:diagnose:hardis",
6036
- "hardis:unusedusers:diagnose:org",
6037
- "unusedusers:hardis:diagnose:org",
6038
- "unusedusers:diagnose:hardis:org",
6039
- "unusedusers:diagnose:org:hardis"
6092
+ "hardis:org:diagnose:unused-connected-apps",
6093
+ "org:hardis:diagnose:unused-connected-apps",
6094
+ "org:diagnose:hardis:unused-connected-apps",
6095
+ "org:diagnose:unused-connected-apps:hardis",
6096
+ "hardis:diagnose:org:unused-connected-apps",
6097
+ "diagnose:hardis:org:unused-connected-apps",
6098
+ "diagnose:org:hardis:unused-connected-apps",
6099
+ "diagnose:org:unused-connected-apps:hardis",
6100
+ "hardis:diagnose:unused-connected-apps:org",
6101
+ "diagnose:hardis:unused-connected-apps:org",
6102
+ "diagnose:unused-connected-apps:hardis:org",
6103
+ "diagnose:unused-connected-apps:org:hardis",
6104
+ "hardis:org:unused-connected-apps:diagnose",
6105
+ "org:hardis:unused-connected-apps:diagnose",
6106
+ "org:unused-connected-apps:hardis:diagnose",
6107
+ "org:unused-connected-apps:diagnose:hardis",
6108
+ "hardis:unused-connected-apps:org:diagnose",
6109
+ "unused-connected-apps:hardis:org:diagnose",
6110
+ "unused-connected-apps:org:hardis:diagnose",
6111
+ "unused-connected-apps:org:diagnose:hardis",
6112
+ "hardis:unused-connected-apps:diagnose:org",
6113
+ "unused-connected-apps:hardis:diagnose:org",
6114
+ "unused-connected-apps:diagnose:hardis:org",
6115
+ "unused-connected-apps:diagnose:org:hardis"
6040
6116
  ]
6041
6117
  },
6042
- "hardis:org:files:export": {
6118
+ "hardis:org:diagnose:unusedlicenses": {
6043
6119
  "aliases": [],
6044
6120
  "args": {},
6045
- "description": "Export file attachments from a Salesforce org\n\nSee article below\n\n[![How to mass download notes and attachments files from a Salesforce org](https://github.com/hardisgroupcom/sfdx-hardis/raw/main/docs/assets/images/article-mass-download.jpg)](https://nicolas.vuillamy.fr/how-to-mass-download-notes-and-attachments-files-from-a-salesforce-org-83a028824afd)\n",
6121
+ "description": "When you assign a Permission Set to a user, and that this Permission Set is related to a Permission Set License, a Permission Set License Assignment is automatically created for the user.\n\nBut when you unassign this Permission Set from the user, **the Permission Set License Assignment is not deleted**.\n\nThis leads that you can be **charged for Permission Set Licenses that are not used** !\n\nThis command detects such useless Permission Set Licenses Assignments and suggests to delete them.\n\nMany thanks to [Vincent Finet](https://www.linkedin.com/in/vincentfinet/) for the inspiration during his great speaker session at [French Touch Dreamin '23](https://frenchtouchdreamin.com/), and his kind agreement for reusing such inspiration in this command :)\n\nThis command is part of [sfdx-hardis Monitoring](https://sfdx-hardis.cloudity.com/salesforce-monitoring-unused-licenses/) and can output Grafana, Slack and MsTeams Notifications.\n",
6046
6122
  "examples": [
6047
- "$ sf hardis:org:files:export"
6123
+ "$ sf hardis:org:diagnose:unusedlicenses",
6124
+ "$ sf hardis:org:diagnose:unusedlicenses --fix"
6048
6125
  ],
6049
6126
  "flags": {
6050
6127
  "json": {
@@ -6062,37 +6139,10 @@
6062
6139
  "multiple": false,
6063
6140
  "type": "option"
6064
6141
  },
6065
- "path": {
6066
- "char": "p",
6067
- "description": "Path to the file export project",
6068
- "name": "path",
6069
- "hasDynamicHelp": false,
6070
- "multiple": false,
6071
- "type": "option"
6072
- },
6073
- "chunksize": {
6074
- "char": "c",
6075
- "description": "Number of records to add in a chunk before it is processed",
6076
- "name": "chunksize",
6077
- "default": 1000,
6078
- "hasDynamicHelp": false,
6079
- "multiple": false,
6080
- "type": "option"
6081
- },
6082
- "polltimeout": {
6083
- "char": "t",
6084
- "description": "Timeout in MS for Bulk API calls",
6085
- "name": "polltimeout",
6086
- "default": 300000,
6087
- "hasDynamicHelp": false,
6088
- "multiple": false,
6089
- "type": "option"
6090
- },
6091
- "startchunknumber": {
6092
- "char": "s",
6093
- "description": "Chunk number to start from",
6094
- "name": "startchunknumber",
6095
- "default": 0,
6142
+ "outputfile": {
6143
+ "char": "f",
6144
+ "description": "Force the path and name of output report file. Must end with .csv",
6145
+ "name": "outputfile",
6096
6146
  "hasDynamicHelp": false,
6097
6147
  "multiple": false,
6098
6148
  "type": "option"
@@ -6135,57 +6185,79 @@
6135
6185
  },
6136
6186
  "hasDynamicHelp": true,
6137
6187
  "hiddenAliases": [],
6138
- "id": "hardis:org:files:export",
6188
+ "id": "hardis:org:diagnose:unusedlicenses",
6139
6189
  "pluginAlias": "sfdx-hardis",
6140
6190
  "pluginName": "sfdx-hardis",
6141
6191
  "pluginType": "core",
6142
6192
  "strict": true,
6143
6193
  "enableJsonFlag": true,
6144
- "title": "Export files",
6194
+ "title": "Detect unused Permission Set Licenses (beta)",
6145
6195
  "requiresProject": false,
6196
+ "additionalPermissionSetsToAlwaysGet": [
6197
+ "Sales_User"
6198
+ ],
6199
+ "permSetsPermSetLicenses": [
6200
+ {
6201
+ "permSet": "Sales_User",
6202
+ "permSetLicense": "SalesUserPsl"
6203
+ }
6204
+ ],
6205
+ "profilesPermissionSetLicenses": [
6206
+ {
6207
+ "profile": "Salesforce API Only",
6208
+ "permSetLicense": "SalesforceAPIIntegrationPsl"
6209
+ }
6210
+ ],
6211
+ "alwaysExcludeForActiveUsersPermissionSetLicenses": [
6212
+ "IdentityConnect"
6213
+ ],
6146
6214
  "isESM": true,
6147
6215
  "relativePath": [
6148
6216
  "lib",
6149
6217
  "commands",
6150
6218
  "hardis",
6151
6219
  "org",
6152
- "files",
6153
- "export.js"
6220
+ "diagnose",
6221
+ "unusedlicenses.js"
6154
6222
  ],
6155
6223
  "aliasPermutations": [],
6156
6224
  "permutations": [
6157
- "hardis:org:files:export",
6158
- "org:hardis:files:export",
6159
- "org:files:hardis:export",
6160
- "org:files:export:hardis",
6161
- "hardis:files:org:export",
6162
- "files:hardis:org:export",
6163
- "files:org:hardis:export",
6164
- "files:org:export:hardis",
6165
- "hardis:files:export:org",
6166
- "files:hardis:export:org",
6167
- "files:export:hardis:org",
6168
- "files:export:org:hardis",
6169
- "hardis:org:export:files",
6170
- "org:hardis:export:files",
6171
- "org:export:hardis:files",
6172
- "org:export:files:hardis",
6173
- "hardis:export:org:files",
6174
- "export:hardis:org:files",
6175
- "export:org:hardis:files",
6176
- "export:org:files:hardis",
6177
- "hardis:export:files:org",
6178
- "export:hardis:files:org",
6179
- "export:files:hardis:org",
6180
- "export:files:org:hardis"
6225
+ "hardis:org:diagnose:unusedlicenses",
6226
+ "org:hardis:diagnose:unusedlicenses",
6227
+ "org:diagnose:hardis:unusedlicenses",
6228
+ "org:diagnose:unusedlicenses:hardis",
6229
+ "hardis:diagnose:org:unusedlicenses",
6230
+ "diagnose:hardis:org:unusedlicenses",
6231
+ "diagnose:org:hardis:unusedlicenses",
6232
+ "diagnose:org:unusedlicenses:hardis",
6233
+ "hardis:diagnose:unusedlicenses:org",
6234
+ "diagnose:hardis:unusedlicenses:org",
6235
+ "diagnose:unusedlicenses:hardis:org",
6236
+ "diagnose:unusedlicenses:org:hardis",
6237
+ "hardis:org:unusedlicenses:diagnose",
6238
+ "org:hardis:unusedlicenses:diagnose",
6239
+ "org:unusedlicenses:hardis:diagnose",
6240
+ "org:unusedlicenses:diagnose:hardis",
6241
+ "hardis:unusedlicenses:org:diagnose",
6242
+ "unusedlicenses:hardis:org:diagnose",
6243
+ "unusedlicenses:org:hardis:diagnose",
6244
+ "unusedlicenses:org:diagnose:hardis",
6245
+ "hardis:unusedlicenses:diagnose:org",
6246
+ "unusedlicenses:hardis:diagnose:org",
6247
+ "unusedlicenses:diagnose:hardis:org",
6248
+ "unusedlicenses:diagnose:org:hardis"
6181
6249
  ]
6182
6250
  },
6183
- "hardis:org:files:import": {
6251
+ "hardis:org:diagnose:unusedusers": {
6184
6252
  "aliases": [],
6185
6253
  "args": {},
6186
- "description": "Import file attachments into a Salesforce org\n\nSee article below to see how to Export them.\n\n[![How to mass download notes and attachments files from a Salesforce org](https://github.com/hardisgroupcom/sfdx-hardis/raw/main/docs/assets/images/article-mass-download.jpg)](https://nicolas.vuillamy.fr/how-to-mass-download-notes-and-attachments-files-from-a-salesforce-org-83a028824afd)\n",
6254
+ "description": "Efficient user management is vital in Salesforce to ensure resources are optimized and costs are controlled. However, inactive or unused user accounts can often go unnoticed, leading to wasted licenses and potential security risks. This tool addresses this challenge by enabling administrators to identify users who haven't logged in within a specified period.\n\nBy analyzing user login activity and last login timestamps, this feature highlights inactive user accounts, allowing administrators to take appropriate action. Whether it's deactivating dormant accounts, freeing up licenses, or ensuring compliance with security policies, this functionality empowers administrators to maintain a lean and secure Salesforce environment.\n\nlicensetypes values are the following:\n\n- all-crm: SFDC,AUL,AUL1,AULL_IGHT\n\n- all-paying: SFDC,AUL,AUL1,AULL_IGHT,PID_Customer_Community,PID_Customer_Community_Login,PID_Partner_Community,PID_Partner_Community_Login\n\nNote: You can see the full list of available license identifiers in [Salesforce Documentation](https://developer.salesforce.com/docs/atlas.en-us.object_reference.meta/object_reference/sforce_api_objects_userlicense.htm)\n\nUse --returnactiveusers to revert the command and retrieve active users that has logged in during the period.\n\nThis command is part of [sfdx-hardis Monitoring](https://sfdx-hardis.cloudity.com/salesforce-monitoring-inactive-users/) and can output Grafana, Slack and MsTeams Notifications.\n",
6187
6255
  "examples": [
6188
- "$ sf hardis:org:files:import"
6256
+ "$ sf hardis:org:diagnose:unusedusers",
6257
+ "$ sf hardis:org:diagnose:unusedusers --days 365",
6258
+ "$ sf hardis:org:diagnose:unusedusers --days 60 --licensetypes all-crm",
6259
+ "$ sf hardis:org:diagnose:unusedusers --days 60 --licenseidentifiers SFDC,AUL,AUL1",
6260
+ "$ sf hardis:org:diagnose:unusedusers --days 60 --licensetypes all-crm --returnactiveusers"
6189
6261
  ],
6190
6262
  "flags": {
6191
6263
  "json": {
@@ -6203,18 +6275,46 @@
6203
6275
  "multiple": false,
6204
6276
  "type": "option"
6205
6277
  },
6206
- "path": {
6207
- "char": "p",
6208
- "description": "Path to the file export project",
6209
- "name": "path",
6278
+ "outputfile": {
6279
+ "char": "f",
6280
+ "description": "Force the path and name of output report file. Must end with .csv",
6281
+ "name": "outputfile",
6210
6282
  "hasDynamicHelp": false,
6211
6283
  "multiple": false,
6212
6284
  "type": "option"
6213
6285
  },
6214
- "overwrite": {
6215
- "char": "f",
6216
- "description": "Override existing files (doubles the number of API calls)",
6217
- "name": "overwrite",
6286
+ "days": {
6287
+ "char": "t",
6288
+ "description": "Extracts the users that have been inactive for the amount of days specified. In CI, default is 180 days",
6289
+ "name": "days",
6290
+ "hasDynamicHelp": false,
6291
+ "multiple": false,
6292
+ "type": "option"
6293
+ },
6294
+ "licensetypes": {
6295
+ "char": "l",
6296
+ "description": "Type of licenses to check. If set, do not use licenseidentifiers option. In CI, default is all-crm",
6297
+ "name": "licensetypes",
6298
+ "hasDynamicHelp": false,
6299
+ "multiple": false,
6300
+ "options": [
6301
+ "all",
6302
+ "all-crm",
6303
+ "all-paying"
6304
+ ],
6305
+ "type": "option"
6306
+ },
6307
+ "licenseidentifiers": {
6308
+ "char": "i",
6309
+ "description": "Comma-separated list of license identifiers, in case licensetypes is not used.. Identifiers available at https://developer.salesforce.com/docs/atlas.en-us.object_reference.meta/object_reference/sforce_api_objects_userlicense.htm",
6310
+ "name": "licenseidentifiers",
6311
+ "hasDynamicHelp": false,
6312
+ "multiple": false,
6313
+ "type": "option"
6314
+ },
6315
+ "returnactiveusers": {
6316
+ "description": "Inverts the command by returning the active users",
6317
+ "name": "returnactiveusers",
6218
6318
  "allowNo": false,
6219
6319
  "type": "boolean"
6220
6320
  },
@@ -6256,13 +6356,13 @@
6256
6356
  },
6257
6357
  "hasDynamicHelp": true,
6258
6358
  "hiddenAliases": [],
6259
- "id": "hardis:org:files:import",
6359
+ "id": "hardis:org:diagnose:unusedusers",
6260
6360
  "pluginAlias": "sfdx-hardis",
6261
6361
  "pluginName": "sfdx-hardis",
6262
6362
  "pluginType": "core",
6263
6363
  "strict": true,
6264
6364
  "enableJsonFlag": true,
6265
- "title": "Import files",
6365
+ "title": "Detect unused Users in Salesforce",
6266
6366
  "requiresProject": false,
6267
6367
  "isESM": true,
6268
6368
  "relativePath": [
@@ -6270,35 +6370,35 @@
6270
6370
  "commands",
6271
6371
  "hardis",
6272
6372
  "org",
6273
- "files",
6274
- "import.js"
6373
+ "diagnose",
6374
+ "unusedusers.js"
6275
6375
  ],
6276
6376
  "aliasPermutations": [],
6277
6377
  "permutations": [
6278
- "hardis:org:files:import",
6279
- "org:hardis:files:import",
6280
- "org:files:hardis:import",
6281
- "org:files:import:hardis",
6282
- "hardis:files:org:import",
6283
- "files:hardis:org:import",
6284
- "files:org:hardis:import",
6285
- "files:org:import:hardis",
6286
- "hardis:files:import:org",
6287
- "files:hardis:import:org",
6288
- "files:import:hardis:org",
6289
- "files:import:org:hardis",
6290
- "hardis:org:import:files",
6291
- "org:hardis:import:files",
6292
- "org:import:hardis:files",
6293
- "org:import:files:hardis",
6294
- "hardis:import:org:files",
6295
- "import:hardis:org:files",
6296
- "import:org:hardis:files",
6297
- "import:org:files:hardis",
6298
- "hardis:import:files:org",
6299
- "import:hardis:files:org",
6300
- "import:files:hardis:org",
6301
- "import:files:org:hardis"
6378
+ "hardis:org:diagnose:unusedusers",
6379
+ "org:hardis:diagnose:unusedusers",
6380
+ "org:diagnose:hardis:unusedusers",
6381
+ "org:diagnose:unusedusers:hardis",
6382
+ "hardis:diagnose:org:unusedusers",
6383
+ "diagnose:hardis:org:unusedusers",
6384
+ "diagnose:org:hardis:unusedusers",
6385
+ "diagnose:org:unusedusers:hardis",
6386
+ "hardis:diagnose:unusedusers:org",
6387
+ "diagnose:hardis:unusedusers:org",
6388
+ "diagnose:unusedusers:hardis:org",
6389
+ "diagnose:unusedusers:org:hardis",
6390
+ "hardis:org:unusedusers:diagnose",
6391
+ "org:hardis:unusedusers:diagnose",
6392
+ "org:unusedusers:hardis:diagnose",
6393
+ "org:unusedusers:diagnose:hardis",
6394
+ "hardis:unusedusers:org:diagnose",
6395
+ "unusedusers:hardis:org:diagnose",
6396
+ "unusedusers:org:hardis:diagnose",
6397
+ "unusedusers:org:diagnose:hardis",
6398
+ "hardis:unusedusers:diagnose:org",
6399
+ "unusedusers:hardis:diagnose:org",
6400
+ "unusedusers:diagnose:hardis:org",
6401
+ "unusedusers:diagnose:org:hardis"
6302
6402
  ]
6303
6403
  },
6304
6404
  "hardis:org:fix:listviewmine": {
@@ -6733,7 +6833,7 @@
6733
6833
  "hardis:org:monitor:backup": {
6734
6834
  "aliases": [],
6735
6835
  "args": {},
6736
- "description": "Retrieve sfdx sources in the context of a monitoring backup\n\nThe command exists in 2 modes: filtered(default & recommended) and full.\n\n## Filtered mode (default, better performances)\n\nAutomatically skips metadatas from installed packages with namespace. \n\nYou can remove more metadata types from backup, especially in case you have too many metadatas and that provokes a crash, using:\n\n- Manual update of `manifest/package-skip-items.xml` config file (then commit & push in the same branch)\n\n- Environment variable MONITORING_BACKUP_SKIP_METADATA_TYPES (example: `MONITORING_BACKUP_SKIP_METADATA_TYPES=CustomLabel,StaticResource,Translation`): that will be applied to all monitoring branches.\n\n## Full mode\n\nActivate it with **--full** parameter, or variable MONITORING_BACKUP_MODE_FULL=true\n\nIgnores filters (namespaces items & manifest/package-skip-items.xml) to retrieve ALL metadatas, including those you might not care about (reports, translations...)\n\nAs we can retrieve only 10000 files by call, the list of all metadatas will be chunked to make multiple calls (and take more time than filtered mode)\n\n- if you use `--full-apply-filters` , manifest/package-skip-items.xml and MONITORING_BACKUP_SKIP_METADATA_TYPES filters will be applied anyway\n- if you use `--exclude-namespaces` , namespaced items will be ignored\n\n_With those both options, it's like if you are not using --full, but with chunked metadata download_\n\n## In CI/CD\n\nThis command is part of [sfdx-hardis Monitoring](https://sfdx-hardis.cloudity.com/salesforce-monitoring-metadata-backup/) and can output Grafana, Slack and MsTeams Notifications.\n\n## Documentation\n\n[Doc generation (including visual flows)](https://sfdx-hardis.cloudity.com/hardis/doc/project2markdown/) is triggered at the end of the command.\n\nIf Flow history doc always display a single state, you probably need to update your workflow configuration:\n\n- on Gitlab: Env variable [`GIT_FETCH_EXTRA_FLAGS: --depth 10000`](https://github.com/hardisgroupcom/sfdx-hardis/blob/main/defaults/monitoring/.gitlab-ci.yml#L11)\n- on GitHub: [`fetch-depth: 0`](https://github.com/hardisgroupcom/sfdx-hardis/blob/main/defaults/monitoring/.github/workflows/org-monitoring.yml#L58)\n- on Azure: [`fetchDepth: \"0\"`](https://github.com/hardisgroupcom/sfdx-hardis/blob/main/defaults/monitoring/azure-pipelines.yml#L39)\n- on Bitbucket: [`step: clone: depth: full`](https://github.com/hardisgroupcom/sfdx-hardis/blob/main/defaults/monitoring/bitbucket-pipelines.yml#L18)\n",
6836
+ "description": "Retrieve sfdx sources in the context of a monitoring backup\n\nThe command exists in 2 modes: filtered(default & recommended) and full.\n\n## Filtered mode (default, better performances)\n\nAutomatically skips metadatas from installed packages with namespace. \n\nYou can remove more metadata types from backup, especially in case you have too many metadatas and that provokes a crash, using:\n\n- Manual update of `manifest/package-skip-items.xml` config file (then commit & push in the same branch)\n\n- Environment variable MONITORING_BACKUP_SKIP_METADATA_TYPES (example: `MONITORING_BACKUP_SKIP_METADATA_TYPES=CustomLabel,StaticResource,Translation`): that will be applied to all monitoring branches.\n\n## Full mode\n\nActivate it with **--full** parameter, or variable MONITORING_BACKUP_MODE_FULL=true\n\nIgnores filters (namespaces items & manifest/package-skip-items.xml) to retrieve ALL metadatas, including those you might not care about (reports, translations...)\n\nAs we can retrieve only 10000 files by call, the list of all metadatas will be chunked to make multiple calls (and take more time than filtered mode)\n\n- if you use `--full-apply-filters` , manifest/package-skip-items.xml and MONITORING_BACKUP_SKIP_METADATA_TYPES filters will be applied anyway\n- if you use `--exclude-namespaces` , namespaced items will be ignored\n\n_With those both options, it's like if you are not using --full, but with chunked metadata download_\n\n## In CI/CD\n\nThis command is part of [sfdx-hardis Monitoring](https://sfdx-hardis.cloudity.com/salesforce-monitoring-metadata-backup/) and can output Grafana, Slack and MsTeams Notifications.\n\n## Documentation\n\n[Doc generation (including visual flows)](https://sfdx-hardis.cloudity.com/hardis/doc/project2markdown/) is triggered at the end of the command.\n\nIf you want to also upload HTML Documentation on your Salesforce Org as static resource, use variable **SFDX_HARDIS_DOC_DEPLOY_TO_ORG=\"true\"**\n\nIf Flow history doc always display a single state, you probably need to update your workflow configuration:\n\n- on Gitlab: Env variable [`GIT_FETCH_EXTRA_FLAGS: --depth 10000`](https://github.com/hardisgroupcom/sfdx-hardis/blob/main/defaults/monitoring/.gitlab-ci.yml#L11)\n- on GitHub: [`fetch-depth: 0`](https://github.com/hardisgroupcom/sfdx-hardis/blob/main/defaults/monitoring/.github/workflows/org-monitoring.yml#L58)\n- on Azure: [`fetchDepth: \"0\"`](https://github.com/hardisgroupcom/sfdx-hardis/blob/main/defaults/monitoring/azure-pipelines.yml#L39)\n- on Bitbucket: [`step: clone: depth: full`](https://github.com/hardisgroupcom/sfdx-hardis/blob/main/defaults/monitoring/bitbucket-pipelines.yml#L18)\n",
6737
6837
  "examples": [
6738
6838
  "$ sf hardis:org:monitor:backup",
6739
6839
  "$ sf hardis:org:monitor:backup --full",
@@ -7499,8 +7599,8 @@
7499
7599
  "description": "Update sandbox users so their email is valid\n\n Example: replaces `toto@company.com.dev.invalid` with `toto@company.com.dev.invalid`\n\nSee article below\n\n[![Reactivate all the sandbox users with .invalid emails in 3 clicks](https://github.com/hardisgroupcom/sfdx-hardis/raw/main/docs/assets/images/article-invalid-email.jpg)](https://nicolas.vuillamy.fr/reactivate-all-the-sandbox-users-with-invalid-emails-in-3-clicks-2265af4e3a3d)\n",
7500
7600
  "examples": [
7501
7601
  "$ sf hardis:org:user:activateinvalid",
7502
- "$ sf hardis:org:user:activateinvalid --target-org myuser@myorg.com",
7503
- "$ sf hardis:org:user:activateinvalid --profiles 'System Administrator,MyCustomProfile' --target-org myuser@myorg.com"
7602
+ "$ sf hardis:org:user:activateinvalid --target-org my-user@myorg.com",
7603
+ "$ sf hardis:org:user:activateinvalid --profiles 'System Administrator,MyCustomProfile' --target-org my-user@myorg.com"
7504
7604
  ],
7505
7605
  "flags": {
7506
7606
  "json": {
@@ -7615,7 +7715,7 @@
7615
7715
  "description": "Mass freeze users in org before a maintenance or go live\n\nSee user guide in the following article\n\n<https://medium.com/@dimitrimonge/freeze-unfreeze-users-during-salesforce-deployment-8a1488bf8dd3>\n\n[![How to freeze / unfreeze users during a Salesforce deployment](https://github.com/hardisgroupcom/sfdx-hardis/raw/main/docs/assets/images/article-freeze.jpg)](https://medium.com/@dimitrimonge/freeze-unfreeze-users-during-salesforce-deployment-8a1488bf8dd3)",
7616
7716
  "examples": [
7617
7717
  "$ sf hardis:org:user:freeze",
7618
- "$ sf hardis:org:user:freeze --target-org myuser@myorg.com",
7718
+ "$ sf hardis:org:user:freeze --target-org my-user@myorg.com",
7619
7719
  "$ sf hardis:org:user:freeze --includeprofiles 'Standard'",
7620
7720
  "$ sf hardis:org:user:freeze --excludeprofiles 'System Administrator,Some Other Profile'"
7621
7721
  ],
@@ -7757,7 +7857,7 @@
7757
7857
  "description": "Mass unfreeze users in org after a maintenance or go live\n\nSee user guide in the following article\n\n<https://medium.com/@dimitrimonge/freeze-unfreeze-users-during-salesforce-deployment-8a1488bf8dd3>\n\n[![How to freeze / unfreeze users during a Salesforce deployment](https://github.com/hardisgroupcom/sfdx-hardis/raw/main/docs/assets/images/article-freeze.jpg)](https://medium.com/@dimitrimonge/freeze-unfreeze-users-during-salesforce-deployment-8a1488bf8dd3)",
7758
7858
  "examples": [
7759
7859
  "$ sf hardis:org:user:unfreeze",
7760
- "$ sf hardis:org:user:unfreeze --target-org myuser@myorg.com",
7860
+ "$ sf hardis:org:user:unfreeze --target-org my-user@myorg.com",
7761
7861
  "$ sf hardis:org:user:unfreeze --includeprofiles 'Standard'",
7762
7862
  "$ sf hardis:org:user:unfreeze --excludeprofiles 'System Administrator,Some Other Profile'"
7763
7863
  ],
@@ -10764,7 +10864,8 @@
10764
10864
  "$ sf hardis:project:deploy:smart",
10765
10865
  "$ FORCE_TARGET_BRANCH=preprod NODE_OPTIONS=--inspect-brk sf hardis:project:deploy:smart --check --websocket localhost:2702 --skipauth --target-org nicolas.vuillamy@myclient.com.preprod",
10766
10866
  "$ SYSTEM_ACCESSTOKEN=xxxxxx SYSTEM_COLLECTIONURI=https://dev.azure.com/xxxxxxx/ SYSTEM_TEAMPROJECT=\"xxxxxxx\" BUILD_REPOSITORY_ID=xxxxx SYSTEM_PULLREQUEST_PULLREQUESTID=1418 FORCE_TARGET_BRANCH=uat NODE_OPTIONS=--inspect-brk sf hardis:project:deploy:smart --check --websocket localhost:2702 --skipauth --target-org my.salesforce@org.com",
10767
- "$ CI_SFDX_HARDIS_BITBUCKET_TOKEN=xxxxxx BITBUCKET_WORKSPACE=sfdxhardis-demo BITBUCKET_REPO_SLUG=test BITBUCKET_BUILD_NUMBER=1 BITBUCKET_BRANCH=uat BITBUCKET_PR_ID=2 FORCE_TARGET_BRANCH=uat NODE_OPTIONS=--inspect-brk sf hardis:project:deploy:smart --check --websocket localhost:2702 --skipauth --target-org my-salesforce-org@client.com"
10867
+ "$ CI_SFDX_HARDIS_BITBUCKET_TOKEN=xxxxxx BITBUCKET_WORKSPACE=sfdxhardis-demo BITBUCKET_REPO_SLUG=test BITBUCKET_BUILD_NUMBER=1 BITBUCKET_BRANCH=uat BITBUCKET_PR_ID=2 FORCE_TARGET_BRANCH=uat NODE_OPTIONS=--inspect-brk sf hardis:project:deploy:smart --check --websocket localhost:2702 --skipauth --target-org my-salesforce-org@client.com",
10868
+ "$ GITHUB_TOKEN=xxxx GITHUB_REPOSITORY=my-user/my-repo FORCE_TARGET_BRANCH=uat NODE_OPTIONS=--inspect-brk sf hardis:project:deploy:smart --check --websocket localhost:2702 --skipauth --target-org my-salesforce-org@client.com"
10768
10869
  ],
10769
10870
  "flags": {
10770
10871
  "json": {
@@ -14039,5 +14140,5 @@
14039
14140
  ]
14040
14141
  }
14041
14142
  },
14042
- "version": "5.10.2-beta202501031058.0"
14143
+ "version": "5.11.1-beta202501041352.0"
14043
14144
  }