sfdx-hardis 5.10.2-beta202412292224.0 → 5.10.2-beta202412301125.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.
@@ -350,7 +350,6 @@
350
350
  "type": "option"
351
351
  },
352
352
  "with-history": {
353
- "char": "d",
354
353
  "description": "Generate a markdown file with the history diff of the Flow",
355
354
  "name": "with-history",
356
355
  "allowNo": false,
@@ -524,7 +523,6 @@
524
523
  "type": "boolean"
525
524
  },
526
525
  "with-history": {
527
- "char": "d",
528
526
  "description": "Generate a markdown file with the history diff of the Flow",
529
527
  "name": "with-history",
530
528
  "allowNo": false,
@@ -4891,15 +4889,12 @@
4891
4889
  "import:data:org:hardis"
4892
4890
  ]
4893
4891
  },
4894
- "hardis:org:diagnose:audittrail": {
4892
+ "hardis:org:files:export": {
4895
4893
  "aliases": [],
4896
4894
  "args": {},
4897
- "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",
4895
+ "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",
4898
4896
  "examples": [
4899
- "$ sf hardis:org:diagnose:audittrail",
4900
- "$ sf hardis:org:diagnose:audittrail --excludeusers baptiste@titi.com",
4901
- "$ sf hardis:org:diagnose:audittrail --excludeusers baptiste@titi.com,bertrand@titi.com",
4902
- "$ sf hardis:org:diagnose:audittrail --lastndays 5"
4897
+ "$ sf hardis:org:files:export"
4903
4898
  ],
4904
4899
  "flags": {
4905
4900
  "json": {
@@ -4917,26 +4912,37 @@
4917
4912
  "multiple": false,
4918
4913
  "type": "option"
4919
4914
  },
4920
- "excludeusers": {
4921
- "char": "e",
4922
- "description": "Comma-separated list of usernames to exclude",
4923
- "name": "excludeusers",
4915
+ "path": {
4916
+ "char": "p",
4917
+ "description": "Path to the file export project",
4918
+ "name": "path",
4924
4919
  "hasDynamicHelp": false,
4925
4920
  "multiple": false,
4926
4921
  "type": "option"
4927
4922
  },
4928
- "lastndays": {
4923
+ "chunksize": {
4924
+ "char": "c",
4925
+ "description": "Number of records to add in a chunk before it is processed",
4926
+ "name": "chunksize",
4927
+ "default": 1000,
4928
+ "hasDynamicHelp": false,
4929
+ "multiple": false,
4930
+ "type": "option"
4931
+ },
4932
+ "polltimeout": {
4929
4933
  "char": "t",
4930
- "description": "Number of days to extract from today (included)",
4931
- "name": "lastndays",
4934
+ "description": "Timeout in MS for Bulk API calls",
4935
+ "name": "polltimeout",
4936
+ "default": 300000,
4932
4937
  "hasDynamicHelp": false,
4933
4938
  "multiple": false,
4934
4939
  "type": "option"
4935
4940
  },
4936
- "outputfile": {
4937
- "char": "f",
4938
- "description": "Force the path and name of output report file. Must end with .csv",
4939
- "name": "outputfile",
4941
+ "startchunknumber": {
4942
+ "char": "s",
4943
+ "description": "Chunk number to start from",
4944
+ "name": "startchunknumber",
4945
+ "default": 0,
4940
4946
  "hasDynamicHelp": false,
4941
4947
  "multiple": false,
4942
4948
  "type": "option"
@@ -4979,13 +4985,13 @@
4979
4985
  },
4980
4986
  "hasDynamicHelp": true,
4981
4987
  "hiddenAliases": [],
4982
- "id": "hardis:org:diagnose:audittrail",
4988
+ "id": "hardis:org:files:export",
4983
4989
  "pluginAlias": "sfdx-hardis",
4984
4990
  "pluginName": "sfdx-hardis",
4985
4991
  "pluginType": "core",
4986
4992
  "strict": true,
4987
4993
  "enableJsonFlag": true,
4988
- "title": "Diagnose content of Setup Audit Trail",
4994
+ "title": "Export files",
4989
4995
  "requiresProject": false,
4990
4996
  "isESM": true,
4991
4997
  "relativePath": [
@@ -4993,43 +4999,43 @@
4993
4999
  "commands",
4994
5000
  "hardis",
4995
5001
  "org",
4996
- "diagnose",
4997
- "audittrail.js"
5002
+ "files",
5003
+ "export.js"
4998
5004
  ],
4999
5005
  "aliasPermutations": [],
5000
5006
  "permutations": [
5001
- "hardis:org:diagnose:audittrail",
5002
- "org:hardis:diagnose:audittrail",
5003
- "org:diagnose:hardis:audittrail",
5004
- "org:diagnose:audittrail:hardis",
5005
- "hardis:diagnose:org:audittrail",
5006
- "diagnose:hardis:org:audittrail",
5007
- "diagnose:org:hardis:audittrail",
5008
- "diagnose:org:audittrail:hardis",
5009
- "hardis:diagnose:audittrail:org",
5010
- "diagnose:hardis:audittrail:org",
5011
- "diagnose:audittrail:hardis:org",
5012
- "diagnose:audittrail:org:hardis",
5013
- "hardis:org:audittrail:diagnose",
5014
- "org:hardis:audittrail:diagnose",
5015
- "org:audittrail:hardis:diagnose",
5016
- "org:audittrail:diagnose:hardis",
5017
- "hardis:audittrail:org:diagnose",
5018
- "audittrail:hardis:org:diagnose",
5019
- "audittrail:org:hardis:diagnose",
5020
- "audittrail:org:diagnose:hardis",
5021
- "hardis:audittrail:diagnose:org",
5022
- "audittrail:hardis:diagnose:org",
5023
- "audittrail:diagnose:hardis:org",
5024
- "audittrail:diagnose:org:hardis"
5007
+ "hardis:org:files:export",
5008
+ "org:hardis:files:export",
5009
+ "org:files:hardis:export",
5010
+ "org:files:export:hardis",
5011
+ "hardis:files:org:export",
5012
+ "files:hardis:org:export",
5013
+ "files:org:hardis:export",
5014
+ "files:org:export:hardis",
5015
+ "hardis:files:export:org",
5016
+ "files:hardis:export:org",
5017
+ "files:export:hardis:org",
5018
+ "files:export:org:hardis",
5019
+ "hardis:org:export:files",
5020
+ "org:hardis:export:files",
5021
+ "org:export:hardis:files",
5022
+ "org:export:files:hardis",
5023
+ "hardis:export:org:files",
5024
+ "export:hardis:org:files",
5025
+ "export:org:hardis:files",
5026
+ "export:org:files:hardis",
5027
+ "hardis:export:files:org",
5028
+ "export:hardis:files:org",
5029
+ "export:files:hardis:org",
5030
+ "export:files:org:hardis"
5025
5031
  ]
5026
5032
  },
5027
- "hardis:org:diagnose:instanceupgrade": {
5033
+ "hardis:org:files:import": {
5028
5034
  "aliases": [],
5029
5035
  "args": {},
5030
- "description": "Get the date when the org instance will be upgraded (to Spring, Summer or Winter)\n ",
5036
+ "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",
5031
5037
  "examples": [
5032
- "$ sf hardis:org:diagnose:instanceupgrade"
5038
+ "$ sf hardis:org:files:import"
5033
5039
  ],
5034
5040
  "flags": {
5035
5041
  "json": {
@@ -5047,6 +5053,21 @@
5047
5053
  "multiple": false,
5048
5054
  "type": "option"
5049
5055
  },
5056
+ "path": {
5057
+ "char": "p",
5058
+ "description": "Path to the file export project",
5059
+ "name": "path",
5060
+ "hasDynamicHelp": false,
5061
+ "multiple": false,
5062
+ "type": "option"
5063
+ },
5064
+ "overwrite": {
5065
+ "char": "f",
5066
+ "description": "Override existing files (doubles the number of API calls)",
5067
+ "name": "overwrite",
5068
+ "allowNo": false,
5069
+ "type": "boolean"
5070
+ },
5050
5071
  "debug": {
5051
5072
  "char": "d",
5052
5073
  "description": "Activate debug mode (more logs)",
@@ -5085,13 +5106,13 @@
5085
5106
  },
5086
5107
  "hasDynamicHelp": true,
5087
5108
  "hiddenAliases": [],
5088
- "id": "hardis:org:diagnose:instanceupgrade",
5109
+ "id": "hardis:org:files:import",
5089
5110
  "pluginAlias": "sfdx-hardis",
5090
5111
  "pluginName": "sfdx-hardis",
5091
5112
  "pluginType": "core",
5092
5113
  "strict": true,
5093
5114
  "enableJsonFlag": true,
5094
- "title": "Get Instance Upgrade date",
5115
+ "title": "Import files",
5095
5116
  "requiresProject": false,
5096
5117
  "isESM": true,
5097
5118
  "relativePath": [
@@ -5099,46 +5120,46 @@
5099
5120
  "commands",
5100
5121
  "hardis",
5101
5122
  "org",
5102
- "diagnose",
5103
- "instanceupgrade.js"
5123
+ "files",
5124
+ "import.js"
5104
5125
  ],
5105
5126
  "aliasPermutations": [],
5106
5127
  "permutations": [
5107
- "hardis:org:diagnose:instanceupgrade",
5108
- "org:hardis:diagnose:instanceupgrade",
5109
- "org:diagnose:hardis:instanceupgrade",
5110
- "org:diagnose:instanceupgrade:hardis",
5111
- "hardis:diagnose:org:instanceupgrade",
5112
- "diagnose:hardis:org:instanceupgrade",
5113
- "diagnose:org:hardis:instanceupgrade",
5114
- "diagnose:org:instanceupgrade:hardis",
5115
- "hardis:diagnose:instanceupgrade:org",
5116
- "diagnose:hardis:instanceupgrade:org",
5117
- "diagnose:instanceupgrade:hardis:org",
5118
- "diagnose:instanceupgrade:org:hardis",
5119
- "hardis:org:instanceupgrade:diagnose",
5120
- "org:hardis:instanceupgrade:diagnose",
5121
- "org:instanceupgrade:hardis:diagnose",
5122
- "org:instanceupgrade:diagnose:hardis",
5123
- "hardis:instanceupgrade:org:diagnose",
5124
- "instanceupgrade:hardis:org:diagnose",
5125
- "instanceupgrade:org:hardis:diagnose",
5126
- "instanceupgrade:org:diagnose:hardis",
5127
- "hardis:instanceupgrade:diagnose:org",
5128
- "instanceupgrade:hardis:diagnose:org",
5129
- "instanceupgrade:diagnose:hardis:org",
5130
- "instanceupgrade:diagnose:org:hardis"
5128
+ "hardis:org:files:import",
5129
+ "org:hardis:files:import",
5130
+ "org:files:hardis:import",
5131
+ "org:files:import:hardis",
5132
+ "hardis:files:org:import",
5133
+ "files:hardis:org:import",
5134
+ "files:org:hardis:import",
5135
+ "files:org:import:hardis",
5136
+ "hardis:files:import:org",
5137
+ "files:hardis:import:org",
5138
+ "files:import:hardis:org",
5139
+ "files:import:org:hardis",
5140
+ "hardis:org:import:files",
5141
+ "org:hardis:import:files",
5142
+ "org:import:hardis:files",
5143
+ "org:import:files:hardis",
5144
+ "hardis:import:org:files",
5145
+ "import:hardis:org:files",
5146
+ "import:org:hardis:files",
5147
+ "import:org:files:hardis",
5148
+ "hardis:import:files:org",
5149
+ "import:hardis:files:org",
5150
+ "import:files:hardis:org",
5151
+ "import:files:org:hardis"
5131
5152
  ]
5132
5153
  },
5133
- "hardis:org:diagnose:legacyapi": {
5154
+ "hardis:org:diagnose:audittrail": {
5134
5155
  "aliases": [],
5135
5156
  "args": {},
5136
- "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",
5157
+ "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",
5137
5158
  "examples": [
5138
- "$ sf hardis:org:diagnose:legacyapi",
5139
- "$ sf hardis:org:diagnose:legacyapi -u hardis@myclient.com",
5140
- "$ sf hardis:org:diagnose:legacyapi --outputfile 'c:/path/to/folder/legacyapi.csv'",
5141
- "$ sf hardis:org:diagnose:legacyapi -u hardis@myclient.com --outputfile ./tmp/legacyapi.csv"
5159
+ "$ sf hardis:org:diagnose:audittrail",
5160
+ "$ sf hardis:org:diagnose:audittrail --excludeusers baptiste@titi.com",
5161
+ "$ sf hardis:org:diagnose:audittrail --excludeusers baptiste@titi.com,bertrand@titi.com",
5162
+ "$ sf hardis:org:diagnose:audittrail --lastndays 5"
5142
5163
  ],
5143
5164
  "flags": {
5144
5165
  "json": {
@@ -5156,20 +5177,18 @@
5156
5177
  "multiple": false,
5157
5178
  "type": "option"
5158
5179
  },
5159
- "eventtype": {
5180
+ "excludeusers": {
5160
5181
  "char": "e",
5161
- "description": "Type of EventLogFile event to analyze",
5162
- "name": "eventtype",
5163
- "default": "ApiTotalUsage",
5182
+ "description": "Comma-separated list of usernames to exclude",
5183
+ "name": "excludeusers",
5164
5184
  "hasDynamicHelp": false,
5165
5185
  "multiple": false,
5166
5186
  "type": "option"
5167
5187
  },
5168
- "limit": {
5169
- "char": "l",
5170
- "description": "Number of latest EventLogFile events to analyze",
5171
- "name": "limit",
5172
- "default": 999,
5188
+ "lastndays": {
5189
+ "char": "t",
5190
+ "description": "Number of days to extract from today (included)",
5191
+ "name": "lastndays",
5173
5192
  "hasDynamicHelp": false,
5174
5193
  "multiple": false,
5175
5194
  "type": "option"
@@ -5220,13 +5239,13 @@
5220
5239
  },
5221
5240
  "hasDynamicHelp": true,
5222
5241
  "hiddenAliases": [],
5223
- "id": "hardis:org:diagnose:legacyapi",
5242
+ "id": "hardis:org:diagnose:audittrail",
5224
5243
  "pluginAlias": "sfdx-hardis",
5225
5244
  "pluginName": "sfdx-hardis",
5226
5245
  "pluginType": "core",
5227
5246
  "strict": true,
5228
5247
  "enableJsonFlag": true,
5229
- "title": "Check for legacy API use",
5248
+ "title": "Diagnose content of Setup Audit Trail",
5230
5249
  "requiresProject": false,
5231
5250
  "isESM": true,
5232
5251
  "relativePath": [
@@ -5235,74 +5254,59 @@
5235
5254
  "hardis",
5236
5255
  "org",
5237
5256
  "diagnose",
5238
- "legacyapi.js"
5257
+ "audittrail.js"
5239
5258
  ],
5240
5259
  "aliasPermutations": [],
5241
5260
  "permutations": [
5242
- "hardis:org:diagnose:legacyapi",
5243
- "org:hardis:diagnose:legacyapi",
5244
- "org:diagnose:hardis:legacyapi",
5245
- "org:diagnose:legacyapi:hardis",
5246
- "hardis:diagnose:org:legacyapi",
5247
- "diagnose:hardis:org:legacyapi",
5248
- "diagnose:org:hardis:legacyapi",
5249
- "diagnose:org:legacyapi:hardis",
5250
- "hardis:diagnose:legacyapi:org",
5251
- "diagnose:hardis:legacyapi:org",
5252
- "diagnose:legacyapi:hardis:org",
5253
- "diagnose:legacyapi:org:hardis",
5254
- "hardis:org:legacyapi:diagnose",
5255
- "org:hardis:legacyapi:diagnose",
5256
- "org:legacyapi:hardis:diagnose",
5257
- "org:legacyapi:diagnose:hardis",
5258
- "hardis:legacyapi:org:diagnose",
5259
- "legacyapi:hardis:org:diagnose",
5260
- "legacyapi:org:hardis:diagnose",
5261
- "legacyapi:org:diagnose:hardis",
5262
- "hardis:legacyapi:diagnose:org",
5263
- "legacyapi:hardis:diagnose:org",
5264
- "legacyapi:diagnose:hardis:org",
5265
- "legacyapi:diagnose:org:hardis"
5266
- ]
5267
- },
5268
- "hardis:org:diagnose:licenses": {
5269
- "aliases": [],
5270
- "args": {},
5271
- "description": "Mostly used for monitoring (Grafana) but you can also use it manually :)",
5272
- "examples": [
5273
- "$ sf hardis:org:diagnose:licenses"
5274
- ],
5275
- "flags": {
5276
- "json": {
5277
- "description": "Format output as json.",
5278
- "helpGroup": "GLOBAL",
5279
- "name": "json",
5280
- "allowNo": false,
5281
- "type": "boolean"
5282
- },
5283
- "flags-dir": {
5284
- "helpGroup": "GLOBAL",
5285
- "name": "flags-dir",
5286
- "summary": "Import flag values from a directory.",
5287
- "hasDynamicHelp": false,
5288
- "multiple": false,
5289
- "type": "option"
5261
+ "hardis:org:diagnose:audittrail",
5262
+ "org:hardis:diagnose:audittrail",
5263
+ "org:diagnose:hardis:audittrail",
5264
+ "org:diagnose:audittrail:hardis",
5265
+ "hardis:diagnose:org:audittrail",
5266
+ "diagnose:hardis:org:audittrail",
5267
+ "diagnose:org:hardis:audittrail",
5268
+ "diagnose:org:audittrail:hardis",
5269
+ "hardis:diagnose:audittrail:org",
5270
+ "diagnose:hardis:audittrail:org",
5271
+ "diagnose:audittrail:hardis:org",
5272
+ "diagnose:audittrail:org:hardis",
5273
+ "hardis:org:audittrail:diagnose",
5274
+ "org:hardis:audittrail:diagnose",
5275
+ "org:audittrail:hardis:diagnose",
5276
+ "org:audittrail:diagnose:hardis",
5277
+ "hardis:audittrail:org:diagnose",
5278
+ "audittrail:hardis:org:diagnose",
5279
+ "audittrail:org:hardis:diagnose",
5280
+ "audittrail:org:diagnose:hardis",
5281
+ "hardis:audittrail:diagnose:org",
5282
+ "audittrail:hardis:diagnose:org",
5283
+ "audittrail:diagnose:hardis:org",
5284
+ "audittrail:diagnose:org:hardis"
5285
+ ]
5286
+ },
5287
+ "hardis:org:diagnose:instanceupgrade": {
5288
+ "aliases": [],
5289
+ "args": {},
5290
+ "description": "Get the date when the org instance will be upgraded (to Spring, Summer or Winter)\n ",
5291
+ "examples": [
5292
+ "$ sf hardis:org:diagnose:instanceupgrade"
5293
+ ],
5294
+ "flags": {
5295
+ "json": {
5296
+ "description": "Format output as json.",
5297
+ "helpGroup": "GLOBAL",
5298
+ "name": "json",
5299
+ "allowNo": false,
5300
+ "type": "boolean"
5290
5301
  },
5291
- "outputfile": {
5292
- "char": "f",
5293
- "description": "Force the path and name of output report file. Must end with .csv",
5294
- "name": "outputfile",
5302
+ "flags-dir": {
5303
+ "helpGroup": "GLOBAL",
5304
+ "name": "flags-dir",
5305
+ "summary": "Import flag values from a directory.",
5295
5306
  "hasDynamicHelp": false,
5296
5307
  "multiple": false,
5297
5308
  "type": "option"
5298
5309
  },
5299
- "usedonly": {
5300
- "char": "u",
5301
- "description": "Filter to have only used licenses",
5302
- "name": "usedonly",
5303
- "allowNo": false,
5304
- "type": "boolean"
5305
- },
5306
5310
  "debug": {
5307
5311
  "char": "d",
5308
5312
  "description": "Activate debug mode (more logs)",
@@ -5341,13 +5345,13 @@
5341
5345
  },
5342
5346
  "hasDynamicHelp": true,
5343
5347
  "hiddenAliases": [],
5344
- "id": "hardis:org:diagnose:licenses",
5348
+ "id": "hardis:org:diagnose:instanceupgrade",
5345
5349
  "pluginAlias": "sfdx-hardis",
5346
5350
  "pluginName": "sfdx-hardis",
5347
5351
  "pluginType": "core",
5348
5352
  "strict": true,
5349
5353
  "enableJsonFlag": true,
5350
- "title": "List licenses subscribed and used in a Salesforce org",
5354
+ "title": "Get Instance Upgrade date",
5351
5355
  "requiresProject": false,
5352
5356
  "isESM": true,
5353
5357
  "relativePath": [
@@ -5356,42 +5360,45 @@
5356
5360
  "hardis",
5357
5361
  "org",
5358
5362
  "diagnose",
5359
- "licenses.js"
5363
+ "instanceupgrade.js"
5360
5364
  ],
5361
5365
  "aliasPermutations": [],
5362
5366
  "permutations": [
5363
- "hardis:org:diagnose:licenses",
5364
- "org:hardis:diagnose:licenses",
5365
- "org:diagnose:hardis:licenses",
5366
- "org:diagnose:licenses:hardis",
5367
- "hardis:diagnose:org:licenses",
5368
- "diagnose:hardis:org:licenses",
5369
- "diagnose:org:hardis:licenses",
5370
- "diagnose:org:licenses:hardis",
5371
- "hardis:diagnose:licenses:org",
5372
- "diagnose:hardis:licenses:org",
5373
- "diagnose:licenses:hardis:org",
5374
- "diagnose:licenses:org:hardis",
5375
- "hardis:org:licenses:diagnose",
5376
- "org:hardis:licenses:diagnose",
5377
- "org:licenses:hardis:diagnose",
5378
- "org:licenses:diagnose:hardis",
5379
- "hardis:licenses:org:diagnose",
5380
- "licenses:hardis:org:diagnose",
5381
- "licenses:org:hardis:diagnose",
5382
- "licenses:org:diagnose:hardis",
5383
- "hardis:licenses:diagnose:org",
5384
- "licenses:hardis:diagnose:org",
5385
- "licenses:diagnose:hardis:org",
5386
- "licenses:diagnose:org:hardis"
5367
+ "hardis:org:diagnose:instanceupgrade",
5368
+ "org:hardis:diagnose:instanceupgrade",
5369
+ "org:diagnose:hardis:instanceupgrade",
5370
+ "org:diagnose:instanceupgrade:hardis",
5371
+ "hardis:diagnose:org:instanceupgrade",
5372
+ "diagnose:hardis:org:instanceupgrade",
5373
+ "diagnose:org:hardis:instanceupgrade",
5374
+ "diagnose:org:instanceupgrade:hardis",
5375
+ "hardis:diagnose:instanceupgrade:org",
5376
+ "diagnose:hardis:instanceupgrade:org",
5377
+ "diagnose:instanceupgrade:hardis:org",
5378
+ "diagnose:instanceupgrade:org:hardis",
5379
+ "hardis:org:instanceupgrade:diagnose",
5380
+ "org:hardis:instanceupgrade:diagnose",
5381
+ "org:instanceupgrade:hardis:diagnose",
5382
+ "org:instanceupgrade:diagnose:hardis",
5383
+ "hardis:instanceupgrade:org:diagnose",
5384
+ "instanceupgrade:hardis:org:diagnose",
5385
+ "instanceupgrade:org:hardis:diagnose",
5386
+ "instanceupgrade:org:diagnose:hardis",
5387
+ "hardis:instanceupgrade:diagnose:org",
5388
+ "instanceupgrade:hardis:diagnose:org",
5389
+ "instanceupgrade:diagnose:hardis:org",
5390
+ "instanceupgrade:diagnose:org:hardis"
5387
5391
  ]
5388
5392
  },
5389
- "hardis:org:diagnose:releaseupdates": {
5393
+ "hardis:org:diagnose:legacyapi": {
5390
5394
  "aliases": [],
5391
5395
  "args": {},
5392
- "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",
5396
+ "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",
5393
5397
  "examples": [
5394
- "$ sf hardis:org:diagnose:releaseupdates"
5398
+ "$ sf hardis:org:diagnose:legacyapi",
5399
+ "$ sf hardis:org:diagnose:legacyapi -u hardis@myclient.com",
5400
+ "$ sf hardis:org:diagnose:legacyapi --outputfile 'c:/path/to/folder/legacyapi.csv'",
5401
+ "$ sf hardis:org:diagnose:legacyapi -u hardis@myclient.com --outputfile ./tmp/legacyapi.csv"
5395
5402
  ],
5396
5403
  "flags": {
5397
5404
  "json": {
@@ -5409,6 +5416,24 @@
5409
5416
  "multiple": false,
5410
5417
  "type": "option"
5411
5418
  },
5419
+ "eventtype": {
5420
+ "char": "e",
5421
+ "description": "Type of EventLogFile event to analyze",
5422
+ "name": "eventtype",
5423
+ "default": "ApiTotalUsage",
5424
+ "hasDynamicHelp": false,
5425
+ "multiple": false,
5426
+ "type": "option"
5427
+ },
5428
+ "limit": {
5429
+ "char": "l",
5430
+ "description": "Number of latest EventLogFile events to analyze",
5431
+ "name": "limit",
5432
+ "default": 999,
5433
+ "hasDynamicHelp": false,
5434
+ "multiple": false,
5435
+ "type": "option"
5436
+ },
5412
5437
  "outputfile": {
5413
5438
  "char": "f",
5414
5439
  "description": "Force the path and name of output report file. Must end with .csv",
@@ -5455,13 +5480,13 @@
5455
5480
  },
5456
5481
  "hasDynamicHelp": true,
5457
5482
  "hiddenAliases": [],
5458
- "id": "hardis:org:diagnose:releaseupdates",
5483
+ "id": "hardis:org:diagnose:legacyapi",
5459
5484
  "pluginAlias": "sfdx-hardis",
5460
5485
  "pluginName": "sfdx-hardis",
5461
5486
  "pluginType": "core",
5462
5487
  "strict": true,
5463
5488
  "enableJsonFlag": true,
5464
- "title": "Check Release Updates of an org",
5489
+ "title": "Check for legacy API use",
5465
5490
  "requiresProject": false,
5466
5491
  "isESM": true,
5467
5492
  "relativePath": [
@@ -5470,43 +5495,42 @@
5470
5495
  "hardis",
5471
5496
  "org",
5472
5497
  "diagnose",
5473
- "releaseupdates.js"
5498
+ "legacyapi.js"
5474
5499
  ],
5475
5500
  "aliasPermutations": [],
5476
5501
  "permutations": [
5477
- "hardis:org:diagnose:releaseupdates",
5478
- "org:hardis:diagnose:releaseupdates",
5479
- "org:diagnose:hardis:releaseupdates",
5480
- "org:diagnose:releaseupdates:hardis",
5481
- "hardis:diagnose:org:releaseupdates",
5482
- "diagnose:hardis:org:releaseupdates",
5483
- "diagnose:org:hardis:releaseupdates",
5484
- "diagnose:org:releaseupdates:hardis",
5485
- "hardis:diagnose:releaseupdates:org",
5486
- "diagnose:hardis:releaseupdates:org",
5487
- "diagnose:releaseupdates:hardis:org",
5488
- "diagnose:releaseupdates:org:hardis",
5489
- "hardis:org:releaseupdates:diagnose",
5490
- "org:hardis:releaseupdates:diagnose",
5491
- "org:releaseupdates:hardis:diagnose",
5492
- "org:releaseupdates:diagnose:hardis",
5493
- "hardis:releaseupdates:org:diagnose",
5494
- "releaseupdates:hardis:org:diagnose",
5495
- "releaseupdates:org:hardis:diagnose",
5496
- "releaseupdates:org:diagnose:hardis",
5497
- "hardis:releaseupdates:diagnose:org",
5498
- "releaseupdates:hardis:diagnose:org",
5499
- "releaseupdates:diagnose:hardis:org",
5500
- "releaseupdates:diagnose:org:hardis"
5502
+ "hardis:org:diagnose:legacyapi",
5503
+ "org:hardis:diagnose:legacyapi",
5504
+ "org:diagnose:hardis:legacyapi",
5505
+ "org:diagnose:legacyapi:hardis",
5506
+ "hardis:diagnose:org:legacyapi",
5507
+ "diagnose:hardis:org:legacyapi",
5508
+ "diagnose:org:hardis:legacyapi",
5509
+ "diagnose:org:legacyapi:hardis",
5510
+ "hardis:diagnose:legacyapi:org",
5511
+ "diagnose:hardis:legacyapi:org",
5512
+ "diagnose:legacyapi:hardis:org",
5513
+ "diagnose:legacyapi:org:hardis",
5514
+ "hardis:org:legacyapi:diagnose",
5515
+ "org:hardis:legacyapi:diagnose",
5516
+ "org:legacyapi:hardis:diagnose",
5517
+ "org:legacyapi:diagnose:hardis",
5518
+ "hardis:legacyapi:org:diagnose",
5519
+ "legacyapi:hardis:org:diagnose",
5520
+ "legacyapi:org:hardis:diagnose",
5521
+ "legacyapi:org:diagnose:hardis",
5522
+ "hardis:legacyapi:diagnose:org",
5523
+ "legacyapi:hardis:diagnose:org",
5524
+ "legacyapi:diagnose:hardis:org",
5525
+ "legacyapi:diagnose:org:hardis"
5501
5526
  ]
5502
5527
  },
5503
- "hardis:org:diagnose:unused-apex-classes": {
5528
+ "hardis:org:diagnose:licenses": {
5504
5529
  "aliases": [],
5505
5530
  "args": {},
5506
- "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",
5531
+ "description": "Mostly used for monitoring (Grafana) but you can also use it manually :)",
5507
5532
  "examples": [
5508
- "$ sf hardis:org:diagnose:unused-apex-classes",
5509
- "$ sf hardis:org:diagnose:unused-apex-classes --days 700"
5533
+ "$ sf hardis:org:diagnose:licenses"
5510
5534
  ],
5511
5535
  "flags": {
5512
5536
  "json": {
@@ -5532,13 +5556,12 @@
5532
5556
  "multiple": false,
5533
5557
  "type": "option"
5534
5558
  },
5535
- "days": {
5536
- "char": "t",
5537
- "description": "Extracts the users that have been inactive for the amount of days specified. In CI, default is 180 days",
5538
- "name": "days",
5539
- "hasDynamicHelp": false,
5540
- "multiple": false,
5541
- "type": "option"
5559
+ "usedonly": {
5560
+ "char": "u",
5561
+ "description": "Filter to have only used licenses",
5562
+ "name": "usedonly",
5563
+ "allowNo": false,
5564
+ "type": "boolean"
5542
5565
  },
5543
5566
  "debug": {
5544
5567
  "char": "d",
@@ -5578,13 +5601,13 @@
5578
5601
  },
5579
5602
  "hasDynamicHelp": true,
5580
5603
  "hiddenAliases": [],
5581
- "id": "hardis:org:diagnose:unused-apex-classes",
5604
+ "id": "hardis:org:diagnose:licenses",
5582
5605
  "pluginAlias": "sfdx-hardis",
5583
5606
  "pluginName": "sfdx-hardis",
5584
5607
  "pluginType": "core",
5585
5608
  "strict": true,
5586
5609
  "enableJsonFlag": true,
5587
- "title": "Detect unused Apex classes in an org",
5610
+ "title": "List licenses subscribed and used in a Salesforce org",
5588
5611
  "requiresProject": false,
5589
5612
  "isESM": true,
5590
5613
  "relativePath": [
@@ -5593,47 +5616,47 @@
5593
5616
  "hardis",
5594
5617
  "org",
5595
5618
  "diagnose",
5596
- "unused-apex-classes.js"
5619
+ "licenses.js"
5597
5620
  ],
5598
5621
  "aliasPermutations": [],
5599
5622
  "permutations": [
5600
- "hardis:org:diagnose:unused-apex-classes",
5601
- "org:hardis:diagnose:unused-apex-classes",
5602
- "org:diagnose:hardis:unused-apex-classes",
5603
- "org:diagnose:unused-apex-classes:hardis",
5604
- "hardis:diagnose:org:unused-apex-classes",
5605
- "diagnose:hardis:org:unused-apex-classes",
5606
- "diagnose:org:hardis:unused-apex-classes",
5607
- "diagnose:org:unused-apex-classes:hardis",
5608
- "hardis:diagnose:unused-apex-classes:org",
5609
- "diagnose:hardis:unused-apex-classes:org",
5610
- "diagnose:unused-apex-classes:hardis:org",
5611
- "diagnose:unused-apex-classes:org:hardis",
5612
- "hardis:org:unused-apex-classes:diagnose",
5613
- "org:hardis:unused-apex-classes:diagnose",
5614
- "org:unused-apex-classes:hardis:diagnose",
5615
- "org:unused-apex-classes:diagnose:hardis",
5616
- "hardis:unused-apex-classes:org:diagnose",
5617
- "unused-apex-classes:hardis:org:diagnose",
5618
- "unused-apex-classes:org:hardis:diagnose",
5619
- "unused-apex-classes:org:diagnose:hardis",
5620
- "hardis:unused-apex-classes:diagnose:org",
5621
- "unused-apex-classes:hardis:diagnose:org",
5622
- "unused-apex-classes:diagnose:hardis:org",
5623
- "unused-apex-classes:diagnose:org:hardis"
5624
- ]
5625
- },
5626
- "hardis:org:diagnose:unused-connected-apps": {
5627
- "aliases": [],
5628
- "args": {},
5629
- "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",
5630
- "examples": [
5631
- "$ sf hardis:org:diagnose:unused-connected-apps"
5632
- ],
5633
- "flags": {
5634
- "json": {
5635
- "description": "Format output as json.",
5636
- "helpGroup": "GLOBAL",
5623
+ "hardis:org:diagnose:licenses",
5624
+ "org:hardis:diagnose:licenses",
5625
+ "org:diagnose:hardis:licenses",
5626
+ "org:diagnose:licenses:hardis",
5627
+ "hardis:diagnose:org:licenses",
5628
+ "diagnose:hardis:org:licenses",
5629
+ "diagnose:org:hardis:licenses",
5630
+ "diagnose:org:licenses:hardis",
5631
+ "hardis:diagnose:licenses:org",
5632
+ "diagnose:hardis:licenses:org",
5633
+ "diagnose:licenses:hardis:org",
5634
+ "diagnose:licenses:org:hardis",
5635
+ "hardis:org:licenses:diagnose",
5636
+ "org:hardis:licenses:diagnose",
5637
+ "org:licenses:hardis:diagnose",
5638
+ "org:licenses:diagnose:hardis",
5639
+ "hardis:licenses:org:diagnose",
5640
+ "licenses:hardis:org:diagnose",
5641
+ "licenses:org:hardis:diagnose",
5642
+ "licenses:org:diagnose:hardis",
5643
+ "hardis:licenses:diagnose:org",
5644
+ "licenses:hardis:diagnose:org",
5645
+ "licenses:diagnose:hardis:org",
5646
+ "licenses:diagnose:org:hardis"
5647
+ ]
5648
+ },
5649
+ "hardis:org:diagnose:releaseupdates": {
5650
+ "aliases": [],
5651
+ "args": {},
5652
+ "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",
5653
+ "examples": [
5654
+ "$ sf hardis:org:diagnose:releaseupdates"
5655
+ ],
5656
+ "flags": {
5657
+ "json": {
5658
+ "description": "Format output as json.",
5659
+ "helpGroup": "GLOBAL",
5637
5660
  "name": "json",
5638
5661
  "allowNo": false,
5639
5662
  "type": "boolean"
@@ -5692,30 +5715,13 @@
5692
5715
  },
5693
5716
  "hasDynamicHelp": true,
5694
5717
  "hiddenAliases": [],
5695
- "id": "hardis:org:diagnose:unused-connected-apps",
5718
+ "id": "hardis:org:diagnose:releaseupdates",
5696
5719
  "pluginAlias": "sfdx-hardis",
5697
5720
  "pluginName": "sfdx-hardis",
5698
5721
  "pluginType": "core",
5699
5722
  "strict": true,
5700
5723
  "enableJsonFlag": true,
5701
- "title": "Unused Connected Apps in an org",
5702
- "allowedInactiveConnectedApps": [
5703
- "Ant Migration Tool",
5704
- "Chatter Desktop",
5705
- "Chatter Mobile for BlackBerry",
5706
- "Force.com IDE",
5707
- "OIQ_Integration",
5708
- "Salesforce CLI",
5709
- "Salesforce Files",
5710
- "Salesforce Mobile Dashboards",
5711
- "Salesforce Touch",
5712
- "Salesforce for Outlook",
5713
- "SalesforceA",
5714
- "SalesforceA for Android",
5715
- "SalesforceA for iOS",
5716
- "SalesforceDX Namespace Registry",
5717
- "SalesforceIQ"
5718
- ],
5724
+ "title": "Check Release Updates of an org",
5719
5725
  "requiresProject": false,
5720
5726
  "isESM": true,
5721
5727
  "relativePath": [
@@ -5724,43 +5730,43 @@
5724
5730
  "hardis",
5725
5731
  "org",
5726
5732
  "diagnose",
5727
- "unused-connected-apps.js"
5733
+ "releaseupdates.js"
5728
5734
  ],
5729
5735
  "aliasPermutations": [],
5730
5736
  "permutations": [
5731
- "hardis:org:diagnose:unused-connected-apps",
5732
- "org:hardis:diagnose:unused-connected-apps",
5733
- "org:diagnose:hardis:unused-connected-apps",
5734
- "org:diagnose:unused-connected-apps:hardis",
5735
- "hardis:diagnose:org:unused-connected-apps",
5736
- "diagnose:hardis:org:unused-connected-apps",
5737
- "diagnose:org:hardis:unused-connected-apps",
5738
- "diagnose:org:unused-connected-apps:hardis",
5739
- "hardis:diagnose:unused-connected-apps:org",
5740
- "diagnose:hardis:unused-connected-apps:org",
5741
- "diagnose:unused-connected-apps:hardis:org",
5742
- "diagnose:unused-connected-apps:org:hardis",
5743
- "hardis:org:unused-connected-apps:diagnose",
5744
- "org:hardis:unused-connected-apps:diagnose",
5745
- "org:unused-connected-apps:hardis:diagnose",
5746
- "org:unused-connected-apps:diagnose:hardis",
5747
- "hardis:unused-connected-apps:org:diagnose",
5748
- "unused-connected-apps:hardis:org:diagnose",
5749
- "unused-connected-apps:org:hardis:diagnose",
5750
- "unused-connected-apps:org:diagnose:hardis",
5751
- "hardis:unused-connected-apps:diagnose:org",
5752
- "unused-connected-apps:hardis:diagnose:org",
5753
- "unused-connected-apps:diagnose:hardis:org",
5754
- "unused-connected-apps:diagnose:org:hardis"
5737
+ "hardis:org:diagnose:releaseupdates",
5738
+ "org:hardis:diagnose:releaseupdates",
5739
+ "org:diagnose:hardis:releaseupdates",
5740
+ "org:diagnose:releaseupdates:hardis",
5741
+ "hardis:diagnose:org:releaseupdates",
5742
+ "diagnose:hardis:org:releaseupdates",
5743
+ "diagnose:org:hardis:releaseupdates",
5744
+ "diagnose:org:releaseupdates:hardis",
5745
+ "hardis:diagnose:releaseupdates:org",
5746
+ "diagnose:hardis:releaseupdates:org",
5747
+ "diagnose:releaseupdates:hardis:org",
5748
+ "diagnose:releaseupdates:org:hardis",
5749
+ "hardis:org:releaseupdates:diagnose",
5750
+ "org:hardis:releaseupdates:diagnose",
5751
+ "org:releaseupdates:hardis:diagnose",
5752
+ "org:releaseupdates:diagnose:hardis",
5753
+ "hardis:releaseupdates:org:diagnose",
5754
+ "releaseupdates:hardis:org:diagnose",
5755
+ "releaseupdates:org:hardis:diagnose",
5756
+ "releaseupdates:org:diagnose:hardis",
5757
+ "hardis:releaseupdates:diagnose:org",
5758
+ "releaseupdates:hardis:diagnose:org",
5759
+ "releaseupdates:diagnose:hardis:org",
5760
+ "releaseupdates:diagnose:org:hardis"
5755
5761
  ]
5756
5762
  },
5757
- "hardis:org:diagnose:unusedlicenses": {
5763
+ "hardis:org:diagnose:unused-apex-classes": {
5758
5764
  "aliases": [],
5759
5765
  "args": {},
5760
- "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",
5766
+ "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",
5761
5767
  "examples": [
5762
- "$ sf hardis:org:diagnose:unusedlicenses",
5763
- "$ sf hardis:org:diagnose:unusedlicenses --fix"
5768
+ "$ sf hardis:org:diagnose:unused-apex-classes",
5769
+ "$ sf hardis:org:diagnose:unused-apex-classes --days 700"
5764
5770
  ],
5765
5771
  "flags": {
5766
5772
  "json": {
@@ -5786,6 +5792,14 @@
5786
5792
  "multiple": false,
5787
5793
  "type": "option"
5788
5794
  },
5795
+ "days": {
5796
+ "char": "t",
5797
+ "description": "Extracts the users that have been inactive for the amount of days specified. In CI, default is 180 days",
5798
+ "name": "days",
5799
+ "hasDynamicHelp": false,
5800
+ "multiple": false,
5801
+ "type": "option"
5802
+ },
5789
5803
  "debug": {
5790
5804
  "char": "d",
5791
5805
  "description": "Activate debug mode (more logs)",
@@ -5824,32 +5838,14 @@
5824
5838
  },
5825
5839
  "hasDynamicHelp": true,
5826
5840
  "hiddenAliases": [],
5827
- "id": "hardis:org:diagnose:unusedlicenses",
5841
+ "id": "hardis:org:diagnose:unused-apex-classes",
5828
5842
  "pluginAlias": "sfdx-hardis",
5829
5843
  "pluginName": "sfdx-hardis",
5830
5844
  "pluginType": "core",
5831
5845
  "strict": true,
5832
5846
  "enableJsonFlag": true,
5833
- "title": "Detect unused Permission Set Licenses (beta)",
5847
+ "title": "Detect unused Apex classes in an org",
5834
5848
  "requiresProject": false,
5835
- "additionalPermissionSetsToAlwaysGet": [
5836
- "Sales_User"
5837
- ],
5838
- "permSetsPermSetLicenses": [
5839
- {
5840
- "permSet": "Sales_User",
5841
- "permSetLicense": "SalesUserPsl"
5842
- }
5843
- ],
5844
- "profilesPermissionSetLicenses": [
5845
- {
5846
- "profile": "Salesforce API Only",
5847
- "permSetLicense": "SalesforceAPIIntegrationPsl"
5848
- }
5849
- ],
5850
- "alwaysExcludeForActiveUsersPermissionSetLicenses": [
5851
- "IdentityConnect"
5852
- ],
5853
5849
  "isESM": true,
5854
5850
  "relativePath": [
5855
5851
  "lib",
@@ -5857,46 +5853,42 @@
5857
5853
  "hardis",
5858
5854
  "org",
5859
5855
  "diagnose",
5860
- "unusedlicenses.js"
5856
+ "unused-apex-classes.js"
5861
5857
  ],
5862
5858
  "aliasPermutations": [],
5863
5859
  "permutations": [
5864
- "hardis:org:diagnose:unusedlicenses",
5865
- "org:hardis:diagnose:unusedlicenses",
5866
- "org:diagnose:hardis:unusedlicenses",
5867
- "org:diagnose:unusedlicenses:hardis",
5868
- "hardis:diagnose:org:unusedlicenses",
5869
- "diagnose:hardis:org:unusedlicenses",
5870
- "diagnose:org:hardis:unusedlicenses",
5871
- "diagnose:org:unusedlicenses:hardis",
5872
- "hardis:diagnose:unusedlicenses:org",
5873
- "diagnose:hardis:unusedlicenses:org",
5874
- "diagnose:unusedlicenses:hardis:org",
5875
- "diagnose:unusedlicenses:org:hardis",
5876
- "hardis:org:unusedlicenses:diagnose",
5877
- "org:hardis:unusedlicenses:diagnose",
5878
- "org:unusedlicenses:hardis:diagnose",
5879
- "org:unusedlicenses:diagnose:hardis",
5880
- "hardis:unusedlicenses:org:diagnose",
5881
- "unusedlicenses:hardis:org:diagnose",
5882
- "unusedlicenses:org:hardis:diagnose",
5883
- "unusedlicenses:org:diagnose:hardis",
5884
- "hardis:unusedlicenses:diagnose:org",
5885
- "unusedlicenses:hardis:diagnose:org",
5886
- "unusedlicenses:diagnose:hardis:org",
5887
- "unusedlicenses:diagnose:org:hardis"
5860
+ "hardis:org:diagnose:unused-apex-classes",
5861
+ "org:hardis:diagnose:unused-apex-classes",
5862
+ "org:diagnose:hardis:unused-apex-classes",
5863
+ "org:diagnose:unused-apex-classes:hardis",
5864
+ "hardis:diagnose:org:unused-apex-classes",
5865
+ "diagnose:hardis:org:unused-apex-classes",
5866
+ "diagnose:org:hardis:unused-apex-classes",
5867
+ "diagnose:org:unused-apex-classes:hardis",
5868
+ "hardis:diagnose:unused-apex-classes:org",
5869
+ "diagnose:hardis:unused-apex-classes:org",
5870
+ "diagnose:unused-apex-classes:hardis:org",
5871
+ "diagnose:unused-apex-classes:org:hardis",
5872
+ "hardis:org:unused-apex-classes:diagnose",
5873
+ "org:hardis:unused-apex-classes:diagnose",
5874
+ "org:unused-apex-classes:hardis:diagnose",
5875
+ "org:unused-apex-classes:diagnose:hardis",
5876
+ "hardis:unused-apex-classes:org:diagnose",
5877
+ "unused-apex-classes:hardis:org:diagnose",
5878
+ "unused-apex-classes:org:hardis:diagnose",
5879
+ "unused-apex-classes:org:diagnose:hardis",
5880
+ "hardis:unused-apex-classes:diagnose:org",
5881
+ "unused-apex-classes:hardis:diagnose:org",
5882
+ "unused-apex-classes:diagnose:hardis:org",
5883
+ "unused-apex-classes:diagnose:org:hardis"
5888
5884
  ]
5889
5885
  },
5890
- "hardis:org:diagnose:unusedusers": {
5886
+ "hardis:org:diagnose:unused-connected-apps": {
5891
5887
  "aliases": [],
5892
5888
  "args": {},
5893
- "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",
5889
+ "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",
5894
5890
  "examples": [
5895
- "$ sf hardis:org:diagnose:unusedusers",
5896
- "$ sf hardis:org:diagnose:unusedusers --days 365",
5897
- "$ sf hardis:org:diagnose:unusedusers --days 60 --licensetypes all-crm",
5898
- "$ sf hardis:org:diagnose:unusedusers --days 60 --licenseidentifiers SFDC,AUL,AUL1",
5899
- "$ sf hardis:org:diagnose:unusedusers --days 60 --licensetypes all-crm --returnactiveusers"
5891
+ "$ sf hardis:org:diagnose:unused-connected-apps"
5900
5892
  ],
5901
5893
  "flags": {
5902
5894
  "json": {
@@ -5922,41 +5914,6 @@
5922
5914
  "multiple": false,
5923
5915
  "type": "option"
5924
5916
  },
5925
- "days": {
5926
- "char": "t",
5927
- "description": "Extracts the users that have been inactive for the amount of days specified. In CI, default is 180 days",
5928
- "name": "days",
5929
- "hasDynamicHelp": false,
5930
- "multiple": false,
5931
- "type": "option"
5932
- },
5933
- "licensetypes": {
5934
- "char": "l",
5935
- "description": "Type of licenses to check. If set, do not use licenseidentifiers option. In CI, default is all-crm",
5936
- "name": "licensetypes",
5937
- "hasDynamicHelp": false,
5938
- "multiple": false,
5939
- "options": [
5940
- "all",
5941
- "all-crm",
5942
- "all-paying"
5943
- ],
5944
- "type": "option"
5945
- },
5946
- "licenseidentifiers": {
5947
- "char": "i",
5948
- "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",
5949
- "name": "licenseidentifiers",
5950
- "hasDynamicHelp": false,
5951
- "multiple": false,
5952
- "type": "option"
5953
- },
5954
- "returnactiveusers": {
5955
- "description": "Inverts the command by returning the active users",
5956
- "name": "returnactiveusers",
5957
- "allowNo": false,
5958
- "type": "boolean"
5959
- },
5960
5917
  "debug": {
5961
5918
  "char": "d",
5962
5919
  "description": "Activate debug mode (more logs)",
@@ -5995,57 +5952,75 @@
5995
5952
  },
5996
5953
  "hasDynamicHelp": true,
5997
5954
  "hiddenAliases": [],
5998
- "id": "hardis:org:diagnose:unusedusers",
5955
+ "id": "hardis:org:diagnose:unused-connected-apps",
5999
5956
  "pluginAlias": "sfdx-hardis",
6000
5957
  "pluginName": "sfdx-hardis",
6001
5958
  "pluginType": "core",
6002
5959
  "strict": true,
6003
5960
  "enableJsonFlag": true,
6004
- "title": "Detect unused Users in Salesforce",
6005
- "requiresProject": false,
6006
- "isESM": true,
6007
- "relativePath": [
6008
- "lib",
6009
- "commands",
6010
- "hardis",
6011
- "org",
6012
- "diagnose",
6013
- "unusedusers.js"
6014
- ],
6015
- "aliasPermutations": [],
6016
- "permutations": [
6017
- "hardis:org:diagnose:unusedusers",
6018
- "org:hardis:diagnose:unusedusers",
6019
- "org:diagnose:hardis:unusedusers",
6020
- "org:diagnose:unusedusers:hardis",
6021
- "hardis:diagnose:org:unusedusers",
6022
- "diagnose:hardis:org:unusedusers",
6023
- "diagnose:org:hardis:unusedusers",
6024
- "diagnose:org:unusedusers:hardis",
6025
- "hardis:diagnose:unusedusers:org",
6026
- "diagnose:hardis:unusedusers:org",
6027
- "diagnose:unusedusers:hardis:org",
6028
- "diagnose:unusedusers:org:hardis",
6029
- "hardis:org:unusedusers:diagnose",
6030
- "org:hardis:unusedusers:diagnose",
6031
- "org:unusedusers:hardis:diagnose",
6032
- "org:unusedusers:diagnose:hardis",
6033
- "hardis:unusedusers:org:diagnose",
6034
- "unusedusers:hardis:org:diagnose",
6035
- "unusedusers:org:hardis:diagnose",
6036
- "unusedusers:org:diagnose:hardis",
6037
- "hardis:unusedusers:diagnose:org",
6038
- "unusedusers:hardis:diagnose:org",
6039
- "unusedusers:diagnose:hardis:org",
6040
- "unusedusers:diagnose:org:hardis"
5961
+ "title": "Unused Connected Apps in an org",
5962
+ "allowedInactiveConnectedApps": [
5963
+ "Ant Migration Tool",
5964
+ "Chatter Desktop",
5965
+ "Chatter Mobile for BlackBerry",
5966
+ "Force.com IDE",
5967
+ "OIQ_Integration",
5968
+ "Salesforce CLI",
5969
+ "Salesforce Files",
5970
+ "Salesforce Mobile Dashboards",
5971
+ "Salesforce Touch",
5972
+ "Salesforce for Outlook",
5973
+ "SalesforceA",
5974
+ "SalesforceA for Android",
5975
+ "SalesforceA for iOS",
5976
+ "SalesforceDX Namespace Registry",
5977
+ "SalesforceIQ"
5978
+ ],
5979
+ "requiresProject": false,
5980
+ "isESM": true,
5981
+ "relativePath": [
5982
+ "lib",
5983
+ "commands",
5984
+ "hardis",
5985
+ "org",
5986
+ "diagnose",
5987
+ "unused-connected-apps.js"
5988
+ ],
5989
+ "aliasPermutations": [],
5990
+ "permutations": [
5991
+ "hardis:org:diagnose:unused-connected-apps",
5992
+ "org:hardis:diagnose:unused-connected-apps",
5993
+ "org:diagnose:hardis:unused-connected-apps",
5994
+ "org:diagnose:unused-connected-apps:hardis",
5995
+ "hardis:diagnose:org:unused-connected-apps",
5996
+ "diagnose:hardis:org:unused-connected-apps",
5997
+ "diagnose:org:hardis:unused-connected-apps",
5998
+ "diagnose:org:unused-connected-apps:hardis",
5999
+ "hardis:diagnose:unused-connected-apps:org",
6000
+ "diagnose:hardis:unused-connected-apps:org",
6001
+ "diagnose:unused-connected-apps:hardis:org",
6002
+ "diagnose:unused-connected-apps:org:hardis",
6003
+ "hardis:org:unused-connected-apps:diagnose",
6004
+ "org:hardis:unused-connected-apps:diagnose",
6005
+ "org:unused-connected-apps:hardis:diagnose",
6006
+ "org:unused-connected-apps:diagnose:hardis",
6007
+ "hardis:unused-connected-apps:org:diagnose",
6008
+ "unused-connected-apps:hardis:org:diagnose",
6009
+ "unused-connected-apps:org:hardis:diagnose",
6010
+ "unused-connected-apps:org:diagnose:hardis",
6011
+ "hardis:unused-connected-apps:diagnose:org",
6012
+ "unused-connected-apps:hardis:diagnose:org",
6013
+ "unused-connected-apps:diagnose:hardis:org",
6014
+ "unused-connected-apps:diagnose:org:hardis"
6041
6015
  ]
6042
6016
  },
6043
- "hardis:org:files:export": {
6017
+ "hardis:org:diagnose:unusedlicenses": {
6044
6018
  "aliases": [],
6045
6019
  "args": {},
6046
- "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",
6020
+ "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",
6047
6021
  "examples": [
6048
- "$ sf hardis:org:files:export"
6022
+ "$ sf hardis:org:diagnose:unusedlicenses",
6023
+ "$ sf hardis:org:diagnose:unusedlicenses --fix"
6049
6024
  ],
6050
6025
  "flags": {
6051
6026
  "json": {
@@ -6063,37 +6038,10 @@
6063
6038
  "multiple": false,
6064
6039
  "type": "option"
6065
6040
  },
6066
- "path": {
6067
- "char": "p",
6068
- "description": "Path to the file export project",
6069
- "name": "path",
6070
- "hasDynamicHelp": false,
6071
- "multiple": false,
6072
- "type": "option"
6073
- },
6074
- "chunksize": {
6075
- "char": "c",
6076
- "description": "Number of records to add in a chunk before it is processed",
6077
- "name": "chunksize",
6078
- "default": 1000,
6079
- "hasDynamicHelp": false,
6080
- "multiple": false,
6081
- "type": "option"
6082
- },
6083
- "polltimeout": {
6084
- "char": "t",
6085
- "description": "Timeout in MS for Bulk API calls",
6086
- "name": "polltimeout",
6087
- "default": 300000,
6088
- "hasDynamicHelp": false,
6089
- "multiple": false,
6090
- "type": "option"
6091
- },
6092
- "startchunknumber": {
6093
- "char": "s",
6094
- "description": "Chunk number to start from",
6095
- "name": "startchunknumber",
6096
- "default": 0,
6041
+ "outputfile": {
6042
+ "char": "f",
6043
+ "description": "Force the path and name of output report file. Must end with .csv",
6044
+ "name": "outputfile",
6097
6045
  "hasDynamicHelp": false,
6098
6046
  "multiple": false,
6099
6047
  "type": "option"
@@ -6136,57 +6084,79 @@
6136
6084
  },
6137
6085
  "hasDynamicHelp": true,
6138
6086
  "hiddenAliases": [],
6139
- "id": "hardis:org:files:export",
6087
+ "id": "hardis:org:diagnose:unusedlicenses",
6140
6088
  "pluginAlias": "sfdx-hardis",
6141
6089
  "pluginName": "sfdx-hardis",
6142
6090
  "pluginType": "core",
6143
6091
  "strict": true,
6144
6092
  "enableJsonFlag": true,
6145
- "title": "Export files",
6093
+ "title": "Detect unused Permission Set Licenses (beta)",
6146
6094
  "requiresProject": false,
6095
+ "additionalPermissionSetsToAlwaysGet": [
6096
+ "Sales_User"
6097
+ ],
6098
+ "permSetsPermSetLicenses": [
6099
+ {
6100
+ "permSet": "Sales_User",
6101
+ "permSetLicense": "SalesUserPsl"
6102
+ }
6103
+ ],
6104
+ "profilesPermissionSetLicenses": [
6105
+ {
6106
+ "profile": "Salesforce API Only",
6107
+ "permSetLicense": "SalesforceAPIIntegrationPsl"
6108
+ }
6109
+ ],
6110
+ "alwaysExcludeForActiveUsersPermissionSetLicenses": [
6111
+ "IdentityConnect"
6112
+ ],
6147
6113
  "isESM": true,
6148
6114
  "relativePath": [
6149
6115
  "lib",
6150
6116
  "commands",
6151
6117
  "hardis",
6152
6118
  "org",
6153
- "files",
6154
- "export.js"
6119
+ "diagnose",
6120
+ "unusedlicenses.js"
6155
6121
  ],
6156
6122
  "aliasPermutations": [],
6157
6123
  "permutations": [
6158
- "hardis:org:files:export",
6159
- "org:hardis:files:export",
6160
- "org:files:hardis:export",
6161
- "org:files:export:hardis",
6162
- "hardis:files:org:export",
6163
- "files:hardis:org:export",
6164
- "files:org:hardis:export",
6165
- "files:org:export:hardis",
6166
- "hardis:files:export:org",
6167
- "files:hardis:export:org",
6168
- "files:export:hardis:org",
6169
- "files:export:org:hardis",
6170
- "hardis:org:export:files",
6171
- "org:hardis:export:files",
6172
- "org:export:hardis:files",
6173
- "org:export:files:hardis",
6174
- "hardis:export:org:files",
6175
- "export:hardis:org:files",
6176
- "export:org:hardis:files",
6177
- "export:org:files:hardis",
6178
- "hardis:export:files:org",
6179
- "export:hardis:files:org",
6180
- "export:files:hardis:org",
6181
- "export:files:org:hardis"
6124
+ "hardis:org:diagnose:unusedlicenses",
6125
+ "org:hardis:diagnose:unusedlicenses",
6126
+ "org:diagnose:hardis:unusedlicenses",
6127
+ "org:diagnose:unusedlicenses:hardis",
6128
+ "hardis:diagnose:org:unusedlicenses",
6129
+ "diagnose:hardis:org:unusedlicenses",
6130
+ "diagnose:org:hardis:unusedlicenses",
6131
+ "diagnose:org:unusedlicenses:hardis",
6132
+ "hardis:diagnose:unusedlicenses:org",
6133
+ "diagnose:hardis:unusedlicenses:org",
6134
+ "diagnose:unusedlicenses:hardis:org",
6135
+ "diagnose:unusedlicenses:org:hardis",
6136
+ "hardis:org:unusedlicenses:diagnose",
6137
+ "org:hardis:unusedlicenses:diagnose",
6138
+ "org:unusedlicenses:hardis:diagnose",
6139
+ "org:unusedlicenses:diagnose:hardis",
6140
+ "hardis:unusedlicenses:org:diagnose",
6141
+ "unusedlicenses:hardis:org:diagnose",
6142
+ "unusedlicenses:org:hardis:diagnose",
6143
+ "unusedlicenses:org:diagnose:hardis",
6144
+ "hardis:unusedlicenses:diagnose:org",
6145
+ "unusedlicenses:hardis:diagnose:org",
6146
+ "unusedlicenses:diagnose:hardis:org",
6147
+ "unusedlicenses:diagnose:org:hardis"
6182
6148
  ]
6183
6149
  },
6184
- "hardis:org:files:import": {
6150
+ "hardis:org:diagnose:unusedusers": {
6185
6151
  "aliases": [],
6186
6152
  "args": {},
6187
- "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",
6153
+ "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",
6188
6154
  "examples": [
6189
- "$ sf hardis:org:files:import"
6155
+ "$ sf hardis:org:diagnose:unusedusers",
6156
+ "$ sf hardis:org:diagnose:unusedusers --days 365",
6157
+ "$ sf hardis:org:diagnose:unusedusers --days 60 --licensetypes all-crm",
6158
+ "$ sf hardis:org:diagnose:unusedusers --days 60 --licenseidentifiers SFDC,AUL,AUL1",
6159
+ "$ sf hardis:org:diagnose:unusedusers --days 60 --licensetypes all-crm --returnactiveusers"
6190
6160
  ],
6191
6161
  "flags": {
6192
6162
  "json": {
@@ -6204,18 +6174,46 @@
6204
6174
  "multiple": false,
6205
6175
  "type": "option"
6206
6176
  },
6207
- "path": {
6208
- "char": "p",
6209
- "description": "Path to the file export project",
6210
- "name": "path",
6177
+ "outputfile": {
6178
+ "char": "f",
6179
+ "description": "Force the path and name of output report file. Must end with .csv",
6180
+ "name": "outputfile",
6211
6181
  "hasDynamicHelp": false,
6212
6182
  "multiple": false,
6213
6183
  "type": "option"
6214
6184
  },
6215
- "overwrite": {
6216
- "char": "f",
6217
- "description": "Override existing files (doubles the number of API calls)",
6218
- "name": "overwrite",
6185
+ "days": {
6186
+ "char": "t",
6187
+ "description": "Extracts the users that have been inactive for the amount of days specified. In CI, default is 180 days",
6188
+ "name": "days",
6189
+ "hasDynamicHelp": false,
6190
+ "multiple": false,
6191
+ "type": "option"
6192
+ },
6193
+ "licensetypes": {
6194
+ "char": "l",
6195
+ "description": "Type of licenses to check. If set, do not use licenseidentifiers option. In CI, default is all-crm",
6196
+ "name": "licensetypes",
6197
+ "hasDynamicHelp": false,
6198
+ "multiple": false,
6199
+ "options": [
6200
+ "all",
6201
+ "all-crm",
6202
+ "all-paying"
6203
+ ],
6204
+ "type": "option"
6205
+ },
6206
+ "licenseidentifiers": {
6207
+ "char": "i",
6208
+ "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",
6209
+ "name": "licenseidentifiers",
6210
+ "hasDynamicHelp": false,
6211
+ "multiple": false,
6212
+ "type": "option"
6213
+ },
6214
+ "returnactiveusers": {
6215
+ "description": "Inverts the command by returning the active users",
6216
+ "name": "returnactiveusers",
6219
6217
  "allowNo": false,
6220
6218
  "type": "boolean"
6221
6219
  },
@@ -6257,13 +6255,13 @@
6257
6255
  },
6258
6256
  "hasDynamicHelp": true,
6259
6257
  "hiddenAliases": [],
6260
- "id": "hardis:org:files:import",
6258
+ "id": "hardis:org:diagnose:unusedusers",
6261
6259
  "pluginAlias": "sfdx-hardis",
6262
6260
  "pluginName": "sfdx-hardis",
6263
6261
  "pluginType": "core",
6264
6262
  "strict": true,
6265
6263
  "enableJsonFlag": true,
6266
- "title": "Import files",
6264
+ "title": "Detect unused Users in Salesforce",
6267
6265
  "requiresProject": false,
6268
6266
  "isESM": true,
6269
6267
  "relativePath": [
@@ -6271,35 +6269,35 @@
6271
6269
  "commands",
6272
6270
  "hardis",
6273
6271
  "org",
6274
- "files",
6275
- "import.js"
6272
+ "diagnose",
6273
+ "unusedusers.js"
6276
6274
  ],
6277
6275
  "aliasPermutations": [],
6278
6276
  "permutations": [
6279
- "hardis:org:files:import",
6280
- "org:hardis:files:import",
6281
- "org:files:hardis:import",
6282
- "org:files:import:hardis",
6283
- "hardis:files:org:import",
6284
- "files:hardis:org:import",
6285
- "files:org:hardis:import",
6286
- "files:org:import:hardis",
6287
- "hardis:files:import:org",
6288
- "files:hardis:import:org",
6289
- "files:import:hardis:org",
6290
- "files:import:org:hardis",
6291
- "hardis:org:import:files",
6292
- "org:hardis:import:files",
6293
- "org:import:hardis:files",
6294
- "org:import:files:hardis",
6295
- "hardis:import:org:files",
6296
- "import:hardis:org:files",
6297
- "import:org:hardis:files",
6298
- "import:org:files:hardis",
6299
- "hardis:import:files:org",
6300
- "import:hardis:files:org",
6301
- "import:files:hardis:org",
6302
- "import:files:org:hardis"
6277
+ "hardis:org:diagnose:unusedusers",
6278
+ "org:hardis:diagnose:unusedusers",
6279
+ "org:diagnose:hardis:unusedusers",
6280
+ "org:diagnose:unusedusers:hardis",
6281
+ "hardis:diagnose:org:unusedusers",
6282
+ "diagnose:hardis:org:unusedusers",
6283
+ "diagnose:org:hardis:unusedusers",
6284
+ "diagnose:org:unusedusers:hardis",
6285
+ "hardis:diagnose:unusedusers:org",
6286
+ "diagnose:hardis:unusedusers:org",
6287
+ "diagnose:unusedusers:hardis:org",
6288
+ "diagnose:unusedusers:org:hardis",
6289
+ "hardis:org:unusedusers:diagnose",
6290
+ "org:hardis:unusedusers:diagnose",
6291
+ "org:unusedusers:hardis:diagnose",
6292
+ "org:unusedusers:diagnose:hardis",
6293
+ "hardis:unusedusers:org:diagnose",
6294
+ "unusedusers:hardis:org:diagnose",
6295
+ "unusedusers:org:hardis:diagnose",
6296
+ "unusedusers:org:diagnose:hardis",
6297
+ "hardis:unusedusers:diagnose:org",
6298
+ "unusedusers:hardis:diagnose:org",
6299
+ "unusedusers:diagnose:hardis:org",
6300
+ "unusedusers:diagnose:org:hardis"
6303
6301
  ]
6304
6302
  },
6305
6303
  "hardis:org:fix:listviewmine": {
@@ -13885,5 +13883,5 @@
13885
13883
  ]
13886
13884
  }
13887
13885
  },
13888
- "version": "5.10.2-beta202412292224.0"
13886
+ "version": "5.10.2-beta202412301125.0"
13889
13887
  }