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