sfdx-hardis 5.16.3 → 5.16.4-beta202501221328.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.
@@ -129,12 +129,12 @@
129
129
  "clear:cache:hardis"
130
130
  ]
131
131
  },
132
- "hardis:auth:login": {
132
+ "hardis:config:get": {
133
133
  "aliases": [],
134
134
  "args": {},
135
- "description": "Login to salesforce org",
135
+ "description": "Returns sfdx-hardis project config for a given level",
136
136
  "examples": [
137
- "$ sf hardis:auth:login"
137
+ "$ sf hardis:project:deploy:sources:metadata"
138
138
  ],
139
139
  "flags": {
140
140
  "json": {
@@ -152,28 +152,20 @@
152
152
  "multiple": false,
153
153
  "type": "option"
154
154
  },
155
- "instanceurl": {
156
- "char": "r",
157
- "description": "URL of org instance",
158
- "name": "instanceurl",
155
+ "level": {
156
+ "char": "l",
157
+ "description": "project,branch or user",
158
+ "name": "level",
159
+ "default": "project",
159
160
  "hasDynamicHelp": false,
160
161
  "multiple": false,
162
+ "options": [
163
+ "project",
164
+ "branch",
165
+ "user"
166
+ ],
161
167
  "type": "option"
162
168
  },
163
- "devhub": {
164
- "char": "h",
165
- "description": "Also connect associated DevHub",
166
- "name": "devhub",
167
- "allowNo": false,
168
- "type": "boolean"
169
- },
170
- "scratchorg": {
171
- "char": "s",
172
- "description": "Scratch org",
173
- "name": "scratchorg",
174
- "allowNo": false,
175
- "type": "boolean"
176
- },
177
169
  "debug": {
178
170
  "char": "d",
179
171
  "description": "Activate debug mode (more logs)",
@@ -197,38 +189,39 @@
197
189
  },
198
190
  "hasDynamicHelp": false,
199
191
  "hiddenAliases": [],
200
- "id": "hardis:auth:login",
192
+ "id": "hardis:config:get",
201
193
  "pluginAlias": "sfdx-hardis",
202
194
  "pluginName": "sfdx-hardis",
203
195
  "pluginType": "core",
204
196
  "strict": true,
205
197
  "enableJsonFlag": true,
206
- "title": "Login",
198
+ "title": "Deploy metadata sources to org",
207
199
  "requiresProject": false,
208
200
  "isESM": true,
209
201
  "relativePath": [
210
202
  "lib",
211
203
  "commands",
212
204
  "hardis",
213
- "auth",
214
- "login.js"
205
+ "config",
206
+ "get.js"
215
207
  ],
216
208
  "aliasPermutations": [],
217
209
  "permutations": [
218
- "hardis:auth:login",
219
- "auth:hardis:login",
220
- "auth:login:hardis",
221
- "hardis:login:auth",
222
- "login:hardis:auth",
223
- "login:auth:hardis"
210
+ "hardis:config:get",
211
+ "config:hardis:get",
212
+ "config:get:hardis",
213
+ "hardis:get:config",
214
+ "get:hardis:config",
215
+ "get:config:hardis"
224
216
  ]
225
217
  },
226
- "hardis:config:get": {
218
+ "hardis:auth:login": {
227
219
  "aliases": [],
228
220
  "args": {},
229
- "description": "Returns sfdx-hardis project config for a given level",
221
+ "description": "Login to salesforce org",
230
222
  "examples": [
231
- "$ sf hardis:project:deploy:sources:metadata"
223
+ "$ sf hardis:auth:login",
224
+ "CI=true sf hardis:auth:login"
232
225
  ],
233
226
  "flags": {
234
227
  "json": {
@@ -246,20 +239,28 @@
246
239
  "multiple": false,
247
240
  "type": "option"
248
241
  },
249
- "level": {
250
- "char": "l",
251
- "description": "project,branch or user",
252
- "name": "level",
253
- "default": "project",
242
+ "instanceurl": {
243
+ "char": "r",
244
+ "description": "URL of org instance",
245
+ "name": "instanceurl",
254
246
  "hasDynamicHelp": false,
255
247
  "multiple": false,
256
- "options": [
257
- "project",
258
- "branch",
259
- "user"
260
- ],
261
248
  "type": "option"
262
249
  },
250
+ "devhub": {
251
+ "char": "h",
252
+ "description": "Also connect associated DevHub",
253
+ "name": "devhub",
254
+ "allowNo": false,
255
+ "type": "boolean"
256
+ },
257
+ "scratchorg": {
258
+ "char": "s",
259
+ "description": "Scratch org",
260
+ "name": "scratchorg",
261
+ "allowNo": false,
262
+ "type": "boolean"
263
+ },
263
264
  "debug": {
264
265
  "char": "d",
265
266
  "description": "Activate debug mode (more logs)",
@@ -283,30 +284,30 @@
283
284
  },
284
285
  "hasDynamicHelp": false,
285
286
  "hiddenAliases": [],
286
- "id": "hardis:config:get",
287
+ "id": "hardis:auth:login",
287
288
  "pluginAlias": "sfdx-hardis",
288
289
  "pluginName": "sfdx-hardis",
289
290
  "pluginType": "core",
290
291
  "strict": true,
291
292
  "enableJsonFlag": true,
292
- "title": "Deploy metadata sources to org",
293
+ "title": "Login",
293
294
  "requiresProject": false,
294
295
  "isESM": true,
295
296
  "relativePath": [
296
297
  "lib",
297
298
  "commands",
298
299
  "hardis",
299
- "config",
300
- "get.js"
300
+ "auth",
301
+ "login.js"
301
302
  ],
302
303
  "aliasPermutations": [],
303
304
  "permutations": [
304
- "hardis:config:get",
305
- "config:hardis:get",
306
- "config:get:hardis",
307
- "hardis:get:config",
308
- "get:hardis:config",
309
- "get:config:hardis"
305
+ "hardis:auth:login",
306
+ "auth:hardis:login",
307
+ "auth:login:hardis",
308
+ "hardis:login:auth",
309
+ "login:hardis:auth",
310
+ "login:auth:hardis"
310
311
  ]
311
312
  },
312
313
  "hardis:doc:flow2markdown": {
@@ -610,7 +611,7 @@
610
611
  "hardis:doc:project2markdown": {
611
612
  "aliases": [],
612
613
  "args": {},
613
- "description": "Generates a markdown documentation from a SFDX project\n\n- Package.xml files\n- Source Packages\n- sfdx-hardis configuration\n- Installed packages\n\nCan work on any sfdx project, no need for it to be a sfdx-hardis flavored one.\n\nGenerates markdown files will be written in **docs** folder (except README.md where a link to doc index is added)\n\nTo read Flow documentations if your markdown reader doesn't handle MermaidJS syntax, this command could require @mermaid-js/mermaid-cli\n\n- Run `npm install @mermaid-js/mermaid-cli --global` if puppeteer works in your environment\n- It can also be run as a docker image\n\nBoth modes will be tried by default, but you can also force one of them by defining environment variable `MERMAID_MODES=docker` or `MERMAID_MODES=cli`\n\n_sfdx-hardis docker image is alpine-based and does not succeed to run mermaid/puppeteer: if you can help, please submit a PR !_\n\nIf Flow history doc always display a single state, you probably need to update your workflow configuration:\n\n- on Gitlab: Env variable [`GIT_FETCH_EXTRA_FLAGS: --depth 10000`](https://github.com/hardisgroupcom/sfdx-hardis/blob/main/defaults/monitoring/.gitlab-ci.yml#L11)\n- on GitHub: [`fetch-depth: 0`](https://github.com/hardisgroupcom/sfdx-hardis/blob/main/defaults/monitoring/.github/workflows/org-monitoring.yml#L58)\n- on Azure: [`fetchDepth: \"0\"`](https://github.com/hardisgroupcom/sfdx-hardis/blob/main/defaults/monitoring/azure-pipelines.yml#L39)\n- on Bitbucket: [`step: clone: depth: full`](https://github.com/hardisgroupcom/sfdx-hardis/blob/main/defaults/monitoring/bitbucket-pipelines.yml#L18)\n\n![Screenshot flow doc](https://github.com/hardisgroupcom/sfdx-hardis/raw/main/docs/assets/images/screenshot-flow-doc.jpg)\n\n![Screenshot project documentation](https://github.com/hardisgroupcom/sfdx-hardis/raw/main/docs/assets/images/screenshot-project-doc.jpg)\n\n![Screenshot project documentation](https://github.com/hardisgroupcom/sfdx-hardis/raw/main/docs/assets/images/screenshot-project-doc-2.jpg)\n\nIf it is a sfdx-hardis CI/CD project, a diagram of the branches and orgs strategy will be generated.\n\n![](https://github.com/hardisgroupcom/sfdx-hardis/raw/main/docs/assets/images/screenshot-doc-branches-strategy.jpg)\n\nIf [AI integration](https://sfdx-hardis.cloudity.com/salesforce-ai-setup/) is configured, documentation will contain a summary of the Flow.\n\nIf you have a complex strategy, you might need to input property **mergeTargets** in branch-scoped sfdx-hardis.yml file to have a correct diagram.\n\n## Doc HTML Pages\n\nTo read the documentation as HTML pages, run the following code (you need [**Python**](https://www.python.org/downloads/) on your computer)\n\n```python\npip install mkdocs-material mdx_truly_sane_lists || python -m pip install mkdocs-material mdx_truly_sane_lists || py -m pip install mkdocs-material mdx_truly_sane_lists\nmkdocs serve || python -m mkdocs serve || py -m mkdocs serve\n```\n\nTo just generate HTML pages that you can host anywhere, run `mkdocs build || python -m mkdocs build || py -m mkdocs build`\n\n",
614
+ "description": "Generates a markdown documentation from a SFDX project\n\n- Package.xml files\n- Source Packages\n- sfdx-hardis configuration\n- Installed packages\n\nCan work on any sfdx project, no need for it to be a sfdx-hardis flavored one.\n\nGenerates markdown files will be written in **docs** folder (except README.md where a link to doc index is added)\n\nTo read Flow documentations if your markdown reader doesn't handle MermaidJS syntax, this command could require @mermaid-js/mermaid-cli\n\n- Run `npm install @mermaid-js/mermaid-cli --global` if puppeteer works in your environment\n- It can also be run as a docker image\n\nBoth modes will be tried by default, but you can also force one of them by defining environment variable `MERMAID_MODES=docker` or `MERMAID_MODES=cli`\n\n_sfdx-hardis docker image is alpine-based and does not succeed to run mermaid/puppeteer: if you can help, please submit a PR !_\n\nIf Flow history doc always display a single state, you probably need to update your workflow configuration:\n\n- on Gitlab: Env variable [`GIT_FETCH_EXTRA_FLAGS: --depth 10000`](https://github.com/hardisgroupcom/sfdx-hardis/blob/main/defaults/monitoring/.gitlab-ci.yml#L11)\n- on GitHub: [`fetch-depth: 0`](https://github.com/hardisgroupcom/sfdx-hardis/blob/main/defaults/monitoring/.github/workflows/org-monitoring.yml#L58)\n- on Azure: [`fetchDepth: \"0\"`](https://github.com/hardisgroupcom/sfdx-hardis/blob/main/defaults/monitoring/azure-pipelines.yml#L39)\n- on Bitbucket: [`step: clone: depth: full`](https://github.com/hardisgroupcom/sfdx-hardis/blob/main/defaults/monitoring/bitbucket-pipelines.yml#L18)\n\n![Screenshot flow doc](https://github.com/hardisgroupcom/sfdx-hardis/raw/main/docs/assets/images/screenshot-flow-doc.jpg)\n\n![Screenshot project documentation](https://github.com/hardisgroupcom/sfdx-hardis/raw/main/docs/assets/images/screenshot-project-doc.jpg)\n\n![Screenshot project documentation](https://github.com/hardisgroupcom/sfdx-hardis/raw/main/docs/assets/images/screenshot-project-doc-2.jpg)\n\nIf it is a sfdx-hardis CI/CD project, a diagram of the branches and orgs strategy will be generated.\n\n![](https://github.com/hardisgroupcom/sfdx-hardis/raw/main/docs/assets/images/screenshot-doc-branches-strategy.jpg)\n\nIf [AI integration](https://sfdx-hardis.cloudity.com/salesforce-ai-setup/) is configured, documentation will contain a summary of the Flow.\n\nIf you have a complex strategy, you might need to input property **mergeTargets** in branch-scoped sfdx-hardis.yml file to have a correct diagram.\n\n## Doc HTML Pages\n\nTo read the documentation as HTML pages, run the following code (you need [**Python**](https://www.python.org/downloads/) on your computer)\n\n```python\npip install mkdocs-material mkdocs-exclude-search mdx_truly_sane_lists || python -m pip install mkdocs-material mkdocs-exclude-search mdx_truly_sane_lists || py -m pip install mkdocs-material mkdocs-exclude-search mdx_truly_sane_lists\nmkdocs serve || python -m mkdocs serve || py -m mkdocs serve\n```\n\nTo just generate HTML pages that you can host anywhere, run `mkdocs build || python -m mkdocs build || py -m mkdocs build`\n\n",
614
615
  "examples": [
615
616
  "$ sf hardis:doc:project2markdown",
616
617
  "$ sf hardis:doc:project2markdown --with-history"
@@ -687,7 +688,7 @@
687
688
  "strict": true,
688
689
  "enableJsonFlag": true,
689
690
  "title": "SFDX Project to Markdown",
690
- "htmlInstructions": "## Doc HTML Pages\n\nTo read the documentation as HTML pages, run the following code (you need [**Python**](https://www.python.org/downloads/) on your computer)\n\n```python\npip install mkdocs-material mdx_truly_sane_lists || python -m pip install mkdocs-material mdx_truly_sane_lists || py -m pip install mkdocs-material mdx_truly_sane_lists\nmkdocs serve || python -m mkdocs serve || py -m mkdocs serve\n```\n\nTo just generate HTML pages that you can host anywhere, run `mkdocs build || python -m mkdocs build || py -m mkdocs build`\n",
691
+ "htmlInstructions": "## Doc HTML Pages\n\nTo read the documentation as HTML pages, run the following code (you need [**Python**](https://www.python.org/downloads/) on your computer)\n\n```python\npip install mkdocs-material mkdocs-exclude-search mdx_truly_sane_lists || python -m pip install mkdocs-material mkdocs-exclude-search mdx_truly_sane_lists || py -m pip install mkdocs-material mkdocs-exclude-search mdx_truly_sane_lists\nmkdocs serve || python -m mkdocs serve || py -m mkdocs serve\n```\n\nTo just generate HTML pages that you can host anywhere, run `mkdocs build || python -m mkdocs build || py -m mkdocs build`\n",
691
692
  "requiresProject": true,
692
693
  "isESM": true,
693
694
  "relativePath": [
@@ -5018,15 +5019,12 @@
5018
5019
  "import:data:org:hardis"
5019
5020
  ]
5020
5021
  },
5021
- "hardis:org:diagnose:audittrail": {
5022
+ "hardis:org:files:export": {
5022
5023
  "aliases": [],
5023
5024
  "args": {},
5024
- "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",
5025
+ "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",
5025
5026
  "examples": [
5026
- "$ sf hardis:org:diagnose:audittrail",
5027
- "$ sf hardis:org:diagnose:audittrail --excludeusers baptiste@titi.com",
5028
- "$ sf hardis:org:diagnose:audittrail --excludeusers baptiste@titi.com,bertrand@titi.com",
5029
- "$ sf hardis:org:diagnose:audittrail --lastndays 5"
5027
+ "$ sf hardis:org:files:export"
5030
5028
  ],
5031
5029
  "flags": {
5032
5030
  "json": {
@@ -5044,26 +5042,37 @@
5044
5042
  "multiple": false,
5045
5043
  "type": "option"
5046
5044
  },
5047
- "excludeusers": {
5048
- "char": "e",
5049
- "description": "Comma-separated list of usernames to exclude",
5050
- "name": "excludeusers",
5045
+ "path": {
5046
+ "char": "p",
5047
+ "description": "Path to the file export project",
5048
+ "name": "path",
5051
5049
  "hasDynamicHelp": false,
5052
5050
  "multiple": false,
5053
5051
  "type": "option"
5054
5052
  },
5055
- "lastndays": {
5053
+ "chunksize": {
5054
+ "char": "c",
5055
+ "description": "Number of records to add in a chunk before it is processed",
5056
+ "name": "chunksize",
5057
+ "default": 1000,
5058
+ "hasDynamicHelp": false,
5059
+ "multiple": false,
5060
+ "type": "option"
5061
+ },
5062
+ "polltimeout": {
5056
5063
  "char": "t",
5057
- "description": "Number of days to extract from today (included)",
5058
- "name": "lastndays",
5064
+ "description": "Timeout in MS for Bulk API calls",
5065
+ "name": "polltimeout",
5066
+ "default": 300000,
5059
5067
  "hasDynamicHelp": false,
5060
5068
  "multiple": false,
5061
5069
  "type": "option"
5062
5070
  },
5063
- "outputfile": {
5064
- "char": "f",
5065
- "description": "Force the path and name of output report file. Must end with .csv",
5066
- "name": "outputfile",
5071
+ "startchunknumber": {
5072
+ "char": "s",
5073
+ "description": "Chunk number to start from",
5074
+ "name": "startchunknumber",
5075
+ "default": 0,
5067
5076
  "hasDynamicHelp": false,
5068
5077
  "multiple": false,
5069
5078
  "type": "option"
@@ -5106,13 +5115,13 @@
5106
5115
  },
5107
5116
  "hasDynamicHelp": true,
5108
5117
  "hiddenAliases": [],
5109
- "id": "hardis:org:diagnose:audittrail",
5118
+ "id": "hardis:org:files:export",
5110
5119
  "pluginAlias": "sfdx-hardis",
5111
5120
  "pluginName": "sfdx-hardis",
5112
5121
  "pluginType": "core",
5113
5122
  "strict": true,
5114
5123
  "enableJsonFlag": true,
5115
- "title": "Diagnose content of Setup Audit Trail",
5124
+ "title": "Export files",
5116
5125
  "requiresProject": false,
5117
5126
  "isESM": true,
5118
5127
  "relativePath": [
@@ -5120,43 +5129,43 @@
5120
5129
  "commands",
5121
5130
  "hardis",
5122
5131
  "org",
5123
- "diagnose",
5124
- "audittrail.js"
5132
+ "files",
5133
+ "export.js"
5125
5134
  ],
5126
5135
  "aliasPermutations": [],
5127
5136
  "permutations": [
5128
- "hardis:org:diagnose:audittrail",
5129
- "org:hardis:diagnose:audittrail",
5130
- "org:diagnose:hardis:audittrail",
5131
- "org:diagnose:audittrail:hardis",
5132
- "hardis:diagnose:org:audittrail",
5133
- "diagnose:hardis:org:audittrail",
5134
- "diagnose:org:hardis:audittrail",
5135
- "diagnose:org:audittrail:hardis",
5136
- "hardis:diagnose:audittrail:org",
5137
- "diagnose:hardis:audittrail:org",
5138
- "diagnose:audittrail:hardis:org",
5139
- "diagnose:audittrail:org:hardis",
5140
- "hardis:org:audittrail:diagnose",
5141
- "org:hardis:audittrail:diagnose",
5142
- "org:audittrail:hardis:diagnose",
5143
- "org:audittrail:diagnose:hardis",
5144
- "hardis:audittrail:org:diagnose",
5145
- "audittrail:hardis:org:diagnose",
5146
- "audittrail:org:hardis:diagnose",
5147
- "audittrail:org:diagnose:hardis",
5148
- "hardis:audittrail:diagnose:org",
5149
- "audittrail:hardis:diagnose:org",
5150
- "audittrail:diagnose:hardis:org",
5151
- "audittrail:diagnose:org:hardis"
5137
+ "hardis:org:files:export",
5138
+ "org:hardis:files:export",
5139
+ "org:files:hardis:export",
5140
+ "org:files:export:hardis",
5141
+ "hardis:files:org:export",
5142
+ "files:hardis:org:export",
5143
+ "files:org:hardis:export",
5144
+ "files:org:export:hardis",
5145
+ "hardis:files:export:org",
5146
+ "files:hardis:export:org",
5147
+ "files:export:hardis:org",
5148
+ "files:export:org:hardis",
5149
+ "hardis:org:export:files",
5150
+ "org:hardis:export:files",
5151
+ "org:export:hardis:files",
5152
+ "org:export:files:hardis",
5153
+ "hardis:export:org:files",
5154
+ "export:hardis:org:files",
5155
+ "export:org:hardis:files",
5156
+ "export:org:files:hardis",
5157
+ "hardis:export:files:org",
5158
+ "export:hardis:files:org",
5159
+ "export:files:hardis:org",
5160
+ "export:files:org:hardis"
5152
5161
  ]
5153
5162
  },
5154
- "hardis:org:diagnose:instanceupgrade": {
5163
+ "hardis:org:files:import": {
5155
5164
  "aliases": [],
5156
5165
  "args": {},
5157
- "description": "Get the date when the org instance will be upgraded (to Spring, Summer or Winter)\n ",
5166
+ "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",
5158
5167
  "examples": [
5159
- "$ sf hardis:org:diagnose:instanceupgrade"
5168
+ "$ sf hardis:org:files:import"
5160
5169
  ],
5161
5170
  "flags": {
5162
5171
  "json": {
@@ -5174,6 +5183,21 @@
5174
5183
  "multiple": false,
5175
5184
  "type": "option"
5176
5185
  },
5186
+ "path": {
5187
+ "char": "p",
5188
+ "description": "Path to the file export project",
5189
+ "name": "path",
5190
+ "hasDynamicHelp": false,
5191
+ "multiple": false,
5192
+ "type": "option"
5193
+ },
5194
+ "overwrite": {
5195
+ "char": "f",
5196
+ "description": "Override existing files (doubles the number of API calls)",
5197
+ "name": "overwrite",
5198
+ "allowNo": false,
5199
+ "type": "boolean"
5200
+ },
5177
5201
  "debug": {
5178
5202
  "char": "d",
5179
5203
  "description": "Activate debug mode (more logs)",
@@ -5212,13 +5236,13 @@
5212
5236
  },
5213
5237
  "hasDynamicHelp": true,
5214
5238
  "hiddenAliases": [],
5215
- "id": "hardis:org:diagnose:instanceupgrade",
5239
+ "id": "hardis:org:files:import",
5216
5240
  "pluginAlias": "sfdx-hardis",
5217
5241
  "pluginName": "sfdx-hardis",
5218
5242
  "pluginType": "core",
5219
5243
  "strict": true,
5220
5244
  "enableJsonFlag": true,
5221
- "title": "Get Instance Upgrade date",
5245
+ "title": "Import files",
5222
5246
  "requiresProject": false,
5223
5247
  "isESM": true,
5224
5248
  "relativePath": [
@@ -5226,46 +5250,46 @@
5226
5250
  "commands",
5227
5251
  "hardis",
5228
5252
  "org",
5229
- "diagnose",
5230
- "instanceupgrade.js"
5253
+ "files",
5254
+ "import.js"
5231
5255
  ],
5232
5256
  "aliasPermutations": [],
5233
5257
  "permutations": [
5234
- "hardis:org:diagnose:instanceupgrade",
5235
- "org:hardis:diagnose:instanceupgrade",
5236
- "org:diagnose:hardis:instanceupgrade",
5237
- "org:diagnose:instanceupgrade:hardis",
5238
- "hardis:diagnose:org:instanceupgrade",
5239
- "diagnose:hardis:org:instanceupgrade",
5240
- "diagnose:org:hardis:instanceupgrade",
5241
- "diagnose:org:instanceupgrade:hardis",
5242
- "hardis:diagnose:instanceupgrade:org",
5243
- "diagnose:hardis:instanceupgrade:org",
5244
- "diagnose:instanceupgrade:hardis:org",
5245
- "diagnose:instanceupgrade:org:hardis",
5246
- "hardis:org:instanceupgrade:diagnose",
5247
- "org:hardis:instanceupgrade:diagnose",
5248
- "org:instanceupgrade:hardis:diagnose",
5249
- "org:instanceupgrade:diagnose:hardis",
5250
- "hardis:instanceupgrade:org:diagnose",
5251
- "instanceupgrade:hardis:org:diagnose",
5252
- "instanceupgrade:org:hardis:diagnose",
5253
- "instanceupgrade:org:diagnose:hardis",
5254
- "hardis:instanceupgrade:diagnose:org",
5255
- "instanceupgrade:hardis:diagnose:org",
5256
- "instanceupgrade:diagnose:hardis:org",
5257
- "instanceupgrade:diagnose:org:hardis"
5258
+ "hardis:org:files:import",
5259
+ "org:hardis:files:import",
5260
+ "org:files:hardis:import",
5261
+ "org:files:import:hardis",
5262
+ "hardis:files:org:import",
5263
+ "files:hardis:org:import",
5264
+ "files:org:hardis:import",
5265
+ "files:org:import:hardis",
5266
+ "hardis:files:import:org",
5267
+ "files:hardis:import:org",
5268
+ "files:import:hardis:org",
5269
+ "files:import:org:hardis",
5270
+ "hardis:org:import:files",
5271
+ "org:hardis:import:files",
5272
+ "org:import:hardis:files",
5273
+ "org:import:files:hardis",
5274
+ "hardis:import:org:files",
5275
+ "import:hardis:org:files",
5276
+ "import:org:hardis:files",
5277
+ "import:org:files:hardis",
5278
+ "hardis:import:files:org",
5279
+ "import:hardis:files:org",
5280
+ "import:files:hardis:org",
5281
+ "import:files:org:hardis"
5258
5282
  ]
5259
5283
  },
5260
- "hardis:org:diagnose:legacyapi": {
5284
+ "hardis:org:diagnose:audittrail": {
5261
5285
  "aliases": [],
5262
5286
  "args": {},
5263
- "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",
5287
+ "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",
5264
5288
  "examples": [
5265
- "$ sf hardis:org:diagnose:legacyapi",
5266
- "$ sf hardis:org:diagnose:legacyapi -u hardis@myclient.com",
5267
- "$ sf hardis:org:diagnose:legacyapi --outputfile 'c:/path/to/folder/legacyapi.csv'",
5268
- "$ sf hardis:org:diagnose:legacyapi -u hardis@myclient.com --outputfile ./tmp/legacyapi.csv"
5289
+ "$ sf hardis:org:diagnose:audittrail",
5290
+ "$ sf hardis:org:diagnose:audittrail --excludeusers baptiste@titi.com",
5291
+ "$ sf hardis:org:diagnose:audittrail --excludeusers baptiste@titi.com,bertrand@titi.com",
5292
+ "$ sf hardis:org:diagnose:audittrail --lastndays 5"
5269
5293
  ],
5270
5294
  "flags": {
5271
5295
  "json": {
@@ -5283,20 +5307,18 @@
5283
5307
  "multiple": false,
5284
5308
  "type": "option"
5285
5309
  },
5286
- "eventtype": {
5310
+ "excludeusers": {
5287
5311
  "char": "e",
5288
- "description": "Type of EventLogFile event to analyze",
5289
- "name": "eventtype",
5290
- "default": "ApiTotalUsage",
5312
+ "description": "Comma-separated list of usernames to exclude",
5313
+ "name": "excludeusers",
5291
5314
  "hasDynamicHelp": false,
5292
5315
  "multiple": false,
5293
5316
  "type": "option"
5294
5317
  },
5295
- "limit": {
5296
- "char": "l",
5297
- "description": "Number of latest EventLogFile events to analyze",
5298
- "name": "limit",
5299
- "default": 999,
5318
+ "lastndays": {
5319
+ "char": "t",
5320
+ "description": "Number of days to extract from today (included)",
5321
+ "name": "lastndays",
5300
5322
  "hasDynamicHelp": false,
5301
5323
  "multiple": false,
5302
5324
  "type": "option"
@@ -5347,13 +5369,13 @@
5347
5369
  },
5348
5370
  "hasDynamicHelp": true,
5349
5371
  "hiddenAliases": [],
5350
- "id": "hardis:org:diagnose:legacyapi",
5372
+ "id": "hardis:org:diagnose:audittrail",
5351
5373
  "pluginAlias": "sfdx-hardis",
5352
5374
  "pluginName": "sfdx-hardis",
5353
5375
  "pluginType": "core",
5354
5376
  "strict": true,
5355
5377
  "enableJsonFlag": true,
5356
- "title": "Check for legacy API use",
5378
+ "title": "Diagnose content of Setup Audit Trail",
5357
5379
  "requiresProject": false,
5358
5380
  "isESM": true,
5359
5381
  "relativePath": [
@@ -5362,42 +5384,42 @@
5362
5384
  "hardis",
5363
5385
  "org",
5364
5386
  "diagnose",
5365
- "legacyapi.js"
5387
+ "audittrail.js"
5366
5388
  ],
5367
5389
  "aliasPermutations": [],
5368
5390
  "permutations": [
5369
- "hardis:org:diagnose:legacyapi",
5370
- "org:hardis:diagnose:legacyapi",
5371
- "org:diagnose:hardis:legacyapi",
5372
- "org:diagnose:legacyapi:hardis",
5373
- "hardis:diagnose:org:legacyapi",
5374
- "diagnose:hardis:org:legacyapi",
5375
- "diagnose:org:hardis:legacyapi",
5376
- "diagnose:org:legacyapi:hardis",
5377
- "hardis:diagnose:legacyapi:org",
5378
- "diagnose:hardis:legacyapi:org",
5379
- "diagnose:legacyapi:hardis:org",
5380
- "diagnose:legacyapi:org:hardis",
5381
- "hardis:org:legacyapi:diagnose",
5382
- "org:hardis:legacyapi:diagnose",
5383
- "org:legacyapi:hardis:diagnose",
5384
- "org:legacyapi:diagnose:hardis",
5385
- "hardis:legacyapi:org:diagnose",
5386
- "legacyapi:hardis:org:diagnose",
5387
- "legacyapi:org:hardis:diagnose",
5388
- "legacyapi:org:diagnose:hardis",
5389
- "hardis:legacyapi:diagnose:org",
5390
- "legacyapi:hardis:diagnose:org",
5391
- "legacyapi:diagnose:hardis:org",
5392
- "legacyapi:diagnose:org:hardis"
5391
+ "hardis:org:diagnose:audittrail",
5392
+ "org:hardis:diagnose:audittrail",
5393
+ "org:diagnose:hardis:audittrail",
5394
+ "org:diagnose:audittrail:hardis",
5395
+ "hardis:diagnose:org:audittrail",
5396
+ "diagnose:hardis:org:audittrail",
5397
+ "diagnose:org:hardis:audittrail",
5398
+ "diagnose:org:audittrail:hardis",
5399
+ "hardis:diagnose:audittrail:org",
5400
+ "diagnose:hardis:audittrail:org",
5401
+ "diagnose:audittrail:hardis:org",
5402
+ "diagnose:audittrail:org:hardis",
5403
+ "hardis:org:audittrail:diagnose",
5404
+ "org:hardis:audittrail:diagnose",
5405
+ "org:audittrail:hardis:diagnose",
5406
+ "org:audittrail:diagnose:hardis",
5407
+ "hardis:audittrail:org:diagnose",
5408
+ "audittrail:hardis:org:diagnose",
5409
+ "audittrail:org:hardis:diagnose",
5410
+ "audittrail:org:diagnose:hardis",
5411
+ "hardis:audittrail:diagnose:org",
5412
+ "audittrail:hardis:diagnose:org",
5413
+ "audittrail:diagnose:hardis:org",
5414
+ "audittrail:diagnose:org:hardis"
5393
5415
  ]
5394
5416
  },
5395
- "hardis:org:diagnose:licenses": {
5417
+ "hardis:org:diagnose:instanceupgrade": {
5396
5418
  "aliases": [],
5397
5419
  "args": {},
5398
- "description": "Mostly used for monitoring (Grafana) but you can also use it manually :)",
5420
+ "description": "Get the date when the org instance will be upgraded (to Spring, Summer or Winter)\n ",
5399
5421
  "examples": [
5400
- "$ sf hardis:org:diagnose:licenses"
5422
+ "$ sf hardis:org:diagnose:instanceupgrade"
5401
5423
  ],
5402
5424
  "flags": {
5403
5425
  "json": {
@@ -5415,21 +5437,6 @@
5415
5437
  "multiple": false,
5416
5438
  "type": "option"
5417
5439
  },
5418
- "outputfile": {
5419
- "char": "f",
5420
- "description": "Force the path and name of output report file. Must end with .csv",
5421
- "name": "outputfile",
5422
- "hasDynamicHelp": false,
5423
- "multiple": false,
5424
- "type": "option"
5425
- },
5426
- "usedonly": {
5427
- "char": "u",
5428
- "description": "Filter to have only used licenses",
5429
- "name": "usedonly",
5430
- "allowNo": false,
5431
- "type": "boolean"
5432
- },
5433
5440
  "debug": {
5434
5441
  "char": "d",
5435
5442
  "description": "Activate debug mode (more logs)",
@@ -5468,13 +5475,13 @@
5468
5475
  },
5469
5476
  "hasDynamicHelp": true,
5470
5477
  "hiddenAliases": [],
5471
- "id": "hardis:org:diagnose:licenses",
5478
+ "id": "hardis:org:diagnose:instanceupgrade",
5472
5479
  "pluginAlias": "sfdx-hardis",
5473
5480
  "pluginName": "sfdx-hardis",
5474
5481
  "pluginType": "core",
5475
5482
  "strict": true,
5476
5483
  "enableJsonFlag": true,
5477
- "title": "List licenses subscribed and used in a Salesforce org",
5484
+ "title": "Get Instance Upgrade date",
5478
5485
  "requiresProject": false,
5479
5486
  "isESM": true,
5480
5487
  "relativePath": [
@@ -5483,42 +5490,45 @@
5483
5490
  "hardis",
5484
5491
  "org",
5485
5492
  "diagnose",
5486
- "licenses.js"
5493
+ "instanceupgrade.js"
5487
5494
  ],
5488
5495
  "aliasPermutations": [],
5489
5496
  "permutations": [
5490
- "hardis:org:diagnose:licenses",
5491
- "org:hardis:diagnose:licenses",
5492
- "org:diagnose:hardis:licenses",
5493
- "org:diagnose:licenses:hardis",
5494
- "hardis:diagnose:org:licenses",
5495
- "diagnose:hardis:org:licenses",
5496
- "diagnose:org:hardis:licenses",
5497
- "diagnose:org:licenses:hardis",
5498
- "hardis:diagnose:licenses:org",
5499
- "diagnose:hardis:licenses:org",
5500
- "diagnose:licenses:hardis:org",
5501
- "diagnose:licenses:org:hardis",
5502
- "hardis:org:licenses:diagnose",
5503
- "org:hardis:licenses:diagnose",
5504
- "org:licenses:hardis:diagnose",
5505
- "org:licenses:diagnose:hardis",
5506
- "hardis:licenses:org:diagnose",
5507
- "licenses:hardis:org:diagnose",
5508
- "licenses:org:hardis:diagnose",
5509
- "licenses:org:diagnose:hardis",
5510
- "hardis:licenses:diagnose:org",
5511
- "licenses:hardis:diagnose:org",
5512
- "licenses:diagnose:hardis:org",
5513
- "licenses:diagnose:org:hardis"
5497
+ "hardis:org:diagnose:instanceupgrade",
5498
+ "org:hardis:diagnose:instanceupgrade",
5499
+ "org:diagnose:hardis:instanceupgrade",
5500
+ "org:diagnose:instanceupgrade:hardis",
5501
+ "hardis:diagnose:org:instanceupgrade",
5502
+ "diagnose:hardis:org:instanceupgrade",
5503
+ "diagnose:org:hardis:instanceupgrade",
5504
+ "diagnose:org:instanceupgrade:hardis",
5505
+ "hardis:diagnose:instanceupgrade:org",
5506
+ "diagnose:hardis:instanceupgrade:org",
5507
+ "diagnose:instanceupgrade:hardis:org",
5508
+ "diagnose:instanceupgrade:org:hardis",
5509
+ "hardis:org:instanceupgrade:diagnose",
5510
+ "org:hardis:instanceupgrade:diagnose",
5511
+ "org:instanceupgrade:hardis:diagnose",
5512
+ "org:instanceupgrade:diagnose:hardis",
5513
+ "hardis:instanceupgrade:org:diagnose",
5514
+ "instanceupgrade:hardis:org:diagnose",
5515
+ "instanceupgrade:org:hardis:diagnose",
5516
+ "instanceupgrade:org:diagnose:hardis",
5517
+ "hardis:instanceupgrade:diagnose:org",
5518
+ "instanceupgrade:hardis:diagnose:org",
5519
+ "instanceupgrade:diagnose:hardis:org",
5520
+ "instanceupgrade:diagnose:org:hardis"
5514
5521
  ]
5515
5522
  },
5516
- "hardis:org:diagnose:releaseupdates": {
5523
+ "hardis:org:diagnose:legacyapi": {
5517
5524
  "aliases": [],
5518
5525
  "args": {},
5519
- "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",
5526
+ "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",
5520
5527
  "examples": [
5521
- "$ sf hardis:org:diagnose:releaseupdates"
5528
+ "$ sf hardis:org:diagnose:legacyapi",
5529
+ "$ sf hardis:org:diagnose:legacyapi -u hardis@myclient.com",
5530
+ "$ sf hardis:org:diagnose:legacyapi --outputfile 'c:/path/to/folder/legacyapi.csv'",
5531
+ "$ sf hardis:org:diagnose:legacyapi -u hardis@myclient.com --outputfile ./tmp/legacyapi.csv"
5522
5532
  ],
5523
5533
  "flags": {
5524
5534
  "json": {
@@ -5536,6 +5546,24 @@
5536
5546
  "multiple": false,
5537
5547
  "type": "option"
5538
5548
  },
5549
+ "eventtype": {
5550
+ "char": "e",
5551
+ "description": "Type of EventLogFile event to analyze",
5552
+ "name": "eventtype",
5553
+ "default": "ApiTotalUsage",
5554
+ "hasDynamicHelp": false,
5555
+ "multiple": false,
5556
+ "type": "option"
5557
+ },
5558
+ "limit": {
5559
+ "char": "l",
5560
+ "description": "Number of latest EventLogFile events to analyze",
5561
+ "name": "limit",
5562
+ "default": 999,
5563
+ "hasDynamicHelp": false,
5564
+ "multiple": false,
5565
+ "type": "option"
5566
+ },
5539
5567
  "outputfile": {
5540
5568
  "char": "f",
5541
5569
  "description": "Force the path and name of output report file. Must end with .csv",
@@ -5582,13 +5610,13 @@
5582
5610
  },
5583
5611
  "hasDynamicHelp": true,
5584
5612
  "hiddenAliases": [],
5585
- "id": "hardis:org:diagnose:releaseupdates",
5613
+ "id": "hardis:org:diagnose:legacyapi",
5586
5614
  "pluginAlias": "sfdx-hardis",
5587
5615
  "pluginName": "sfdx-hardis",
5588
5616
  "pluginType": "core",
5589
5617
  "strict": true,
5590
5618
  "enableJsonFlag": true,
5591
- "title": "Check Release Updates of an org",
5619
+ "title": "Check for legacy API use",
5592
5620
  "requiresProject": false,
5593
5621
  "isESM": true,
5594
5622
  "relativePath": [
@@ -5597,51 +5625,50 @@
5597
5625
  "hardis",
5598
5626
  "org",
5599
5627
  "diagnose",
5600
- "releaseupdates.js"
5628
+ "legacyapi.js"
5601
5629
  ],
5602
5630
  "aliasPermutations": [],
5603
5631
  "permutations": [
5604
- "hardis:org:diagnose:releaseupdates",
5605
- "org:hardis:diagnose:releaseupdates",
5606
- "org:diagnose:hardis:releaseupdates",
5607
- "org:diagnose:releaseupdates:hardis",
5608
- "hardis:diagnose:org:releaseupdates",
5609
- "diagnose:hardis:org:releaseupdates",
5610
- "diagnose:org:hardis:releaseupdates",
5611
- "diagnose:org:releaseupdates:hardis",
5612
- "hardis:diagnose:releaseupdates:org",
5613
- "diagnose:hardis:releaseupdates:org",
5614
- "diagnose:releaseupdates:hardis:org",
5615
- "diagnose:releaseupdates:org:hardis",
5616
- "hardis:org:releaseupdates:diagnose",
5617
- "org:hardis:releaseupdates:diagnose",
5618
- "org:releaseupdates:hardis:diagnose",
5619
- "org:releaseupdates:diagnose:hardis",
5620
- "hardis:releaseupdates:org:diagnose",
5621
- "releaseupdates:hardis:org:diagnose",
5622
- "releaseupdates:org:hardis:diagnose",
5623
- "releaseupdates:org:diagnose:hardis",
5624
- "hardis:releaseupdates:diagnose:org",
5625
- "releaseupdates:hardis:diagnose:org",
5626
- "releaseupdates:diagnose:hardis:org",
5627
- "releaseupdates:diagnose:org:hardis"
5628
- ]
5629
- },
5630
- "hardis:org:diagnose:unused-apex-classes": {
5631
- "aliases": [],
5632
- "args": {},
5633
- "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",
5634
- "examples": [
5635
- "$ sf hardis:org:diagnose:unused-apex-classes",
5636
- "$ sf hardis:org:diagnose:unused-apex-classes --days 700"
5637
- ],
5638
- "flags": {
5639
- "json": {
5640
- "description": "Format output as json.",
5641
- "helpGroup": "GLOBAL",
5642
- "name": "json",
5643
- "allowNo": false,
5644
- "type": "boolean"
5632
+ "hardis:org:diagnose:legacyapi",
5633
+ "org:hardis:diagnose:legacyapi",
5634
+ "org:diagnose:hardis:legacyapi",
5635
+ "org:diagnose:legacyapi:hardis",
5636
+ "hardis:diagnose:org:legacyapi",
5637
+ "diagnose:hardis:org:legacyapi",
5638
+ "diagnose:org:hardis:legacyapi",
5639
+ "diagnose:org:legacyapi:hardis",
5640
+ "hardis:diagnose:legacyapi:org",
5641
+ "diagnose:hardis:legacyapi:org",
5642
+ "diagnose:legacyapi:hardis:org",
5643
+ "diagnose:legacyapi:org:hardis",
5644
+ "hardis:org:legacyapi:diagnose",
5645
+ "org:hardis:legacyapi:diagnose",
5646
+ "org:legacyapi:hardis:diagnose",
5647
+ "org:legacyapi:diagnose:hardis",
5648
+ "hardis:legacyapi:org:diagnose",
5649
+ "legacyapi:hardis:org:diagnose",
5650
+ "legacyapi:org:hardis:diagnose",
5651
+ "legacyapi:org:diagnose:hardis",
5652
+ "hardis:legacyapi:diagnose:org",
5653
+ "legacyapi:hardis:diagnose:org",
5654
+ "legacyapi:diagnose:hardis:org",
5655
+ "legacyapi:diagnose:org:hardis"
5656
+ ]
5657
+ },
5658
+ "hardis:org:diagnose:licenses": {
5659
+ "aliases": [],
5660
+ "args": {},
5661
+ "description": "Mostly used for monitoring (Grafana) but you can also use it manually :)",
5662
+ "examples": [
5663
+ "$ sf hardis:org:diagnose:licenses"
5664
+ ],
5665
+ "flags": {
5666
+ "json": {
5667
+ "description": "Format output as json.",
5668
+ "helpGroup": "GLOBAL",
5669
+ "name": "json",
5670
+ "allowNo": false,
5671
+ "type": "boolean"
5645
5672
  },
5646
5673
  "flags-dir": {
5647
5674
  "helpGroup": "GLOBAL",
@@ -5659,13 +5686,12 @@
5659
5686
  "multiple": false,
5660
5687
  "type": "option"
5661
5688
  },
5662
- "days": {
5663
- "char": "t",
5664
- "description": "Extracts the users that have been inactive for the amount of days specified. In CI, default is 180 days",
5665
- "name": "days",
5666
- "hasDynamicHelp": false,
5667
- "multiple": false,
5668
- "type": "option"
5689
+ "usedonly": {
5690
+ "char": "u",
5691
+ "description": "Filter to have only used licenses",
5692
+ "name": "usedonly",
5693
+ "allowNo": false,
5694
+ "type": "boolean"
5669
5695
  },
5670
5696
  "debug": {
5671
5697
  "char": "d",
@@ -5705,13 +5731,13 @@
5705
5731
  },
5706
5732
  "hasDynamicHelp": true,
5707
5733
  "hiddenAliases": [],
5708
- "id": "hardis:org:diagnose:unused-apex-classes",
5734
+ "id": "hardis:org:diagnose:licenses",
5709
5735
  "pluginAlias": "sfdx-hardis",
5710
5736
  "pluginName": "sfdx-hardis",
5711
5737
  "pluginType": "core",
5712
5738
  "strict": true,
5713
5739
  "enableJsonFlag": true,
5714
- "title": "Detect unused Apex classes in an org",
5740
+ "title": "List licenses subscribed and used in a Salesforce org",
5715
5741
  "requiresProject": false,
5716
5742
  "isESM": true,
5717
5743
  "relativePath": [
@@ -5720,42 +5746,42 @@
5720
5746
  "hardis",
5721
5747
  "org",
5722
5748
  "diagnose",
5723
- "unused-apex-classes.js"
5749
+ "licenses.js"
5724
5750
  ],
5725
5751
  "aliasPermutations": [],
5726
5752
  "permutations": [
5727
- "hardis:org:diagnose:unused-apex-classes",
5728
- "org:hardis:diagnose:unused-apex-classes",
5729
- "org:diagnose:hardis:unused-apex-classes",
5730
- "org:diagnose:unused-apex-classes:hardis",
5731
- "hardis:diagnose:org:unused-apex-classes",
5732
- "diagnose:hardis:org:unused-apex-classes",
5733
- "diagnose:org:hardis:unused-apex-classes",
5734
- "diagnose:org:unused-apex-classes:hardis",
5735
- "hardis:diagnose:unused-apex-classes:org",
5736
- "diagnose:hardis:unused-apex-classes:org",
5737
- "diagnose:unused-apex-classes:hardis:org",
5738
- "diagnose:unused-apex-classes:org:hardis",
5739
- "hardis:org:unused-apex-classes:diagnose",
5740
- "org:hardis:unused-apex-classes:diagnose",
5741
- "org:unused-apex-classes:hardis:diagnose",
5742
- "org:unused-apex-classes:diagnose:hardis",
5743
- "hardis:unused-apex-classes:org:diagnose",
5744
- "unused-apex-classes:hardis:org:diagnose",
5745
- "unused-apex-classes:org:hardis:diagnose",
5746
- "unused-apex-classes:org:diagnose:hardis",
5747
- "hardis:unused-apex-classes:diagnose:org",
5748
- "unused-apex-classes:hardis:diagnose:org",
5749
- "unused-apex-classes:diagnose:hardis:org",
5750
- "unused-apex-classes:diagnose:org:hardis"
5753
+ "hardis:org:diagnose:licenses",
5754
+ "org:hardis:diagnose:licenses",
5755
+ "org:diagnose:hardis:licenses",
5756
+ "org:diagnose:licenses:hardis",
5757
+ "hardis:diagnose:org:licenses",
5758
+ "diagnose:hardis:org:licenses",
5759
+ "diagnose:org:hardis:licenses",
5760
+ "diagnose:org:licenses:hardis",
5761
+ "hardis:diagnose:licenses:org",
5762
+ "diagnose:hardis:licenses:org",
5763
+ "diagnose:licenses:hardis:org",
5764
+ "diagnose:licenses:org:hardis",
5765
+ "hardis:org:licenses:diagnose",
5766
+ "org:hardis:licenses:diagnose",
5767
+ "org:licenses:hardis:diagnose",
5768
+ "org:licenses:diagnose:hardis",
5769
+ "hardis:licenses:org:diagnose",
5770
+ "licenses:hardis:org:diagnose",
5771
+ "licenses:org:hardis:diagnose",
5772
+ "licenses:org:diagnose:hardis",
5773
+ "hardis:licenses:diagnose:org",
5774
+ "licenses:hardis:diagnose:org",
5775
+ "licenses:diagnose:hardis:org",
5776
+ "licenses:diagnose:org:hardis"
5751
5777
  ]
5752
5778
  },
5753
- "hardis:org:diagnose:unused-connected-apps": {
5779
+ "hardis:org:diagnose:releaseupdates": {
5754
5780
  "aliases": [],
5755
5781
  "args": {},
5756
- "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",
5782
+ "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",
5757
5783
  "examples": [
5758
- "$ sf hardis:org:diagnose:unused-connected-apps"
5784
+ "$ sf hardis:org:diagnose:releaseupdates"
5759
5785
  ],
5760
5786
  "flags": {
5761
5787
  "json": {
@@ -5819,30 +5845,13 @@
5819
5845
  },
5820
5846
  "hasDynamicHelp": true,
5821
5847
  "hiddenAliases": [],
5822
- "id": "hardis:org:diagnose:unused-connected-apps",
5848
+ "id": "hardis:org:diagnose:releaseupdates",
5823
5849
  "pluginAlias": "sfdx-hardis",
5824
5850
  "pluginName": "sfdx-hardis",
5825
5851
  "pluginType": "core",
5826
5852
  "strict": true,
5827
5853
  "enableJsonFlag": true,
5828
- "title": "Unused Connected Apps in an org",
5829
- "allowedInactiveConnectedApps": [
5830
- "Ant Migration Tool",
5831
- "Chatter Desktop",
5832
- "Chatter Mobile for BlackBerry",
5833
- "Force.com IDE",
5834
- "OIQ_Integration",
5835
- "Salesforce CLI",
5836
- "Salesforce Files",
5837
- "Salesforce Mobile Dashboards",
5838
- "Salesforce Touch",
5839
- "Salesforce for Outlook",
5840
- "SalesforceA",
5841
- "SalesforceA for Android",
5842
- "SalesforceA for iOS",
5843
- "SalesforceDX Namespace Registry",
5844
- "SalesforceIQ"
5845
- ],
5854
+ "title": "Check Release Updates of an org",
5846
5855
  "requiresProject": false,
5847
5856
  "isESM": true,
5848
5857
  "relativePath": [
@@ -5851,43 +5860,43 @@
5851
5860
  "hardis",
5852
5861
  "org",
5853
5862
  "diagnose",
5854
- "unused-connected-apps.js"
5863
+ "releaseupdates.js"
5855
5864
  ],
5856
5865
  "aliasPermutations": [],
5857
5866
  "permutations": [
5858
- "hardis:org:diagnose:unused-connected-apps",
5859
- "org:hardis:diagnose:unused-connected-apps",
5860
- "org:diagnose:hardis:unused-connected-apps",
5861
- "org:diagnose:unused-connected-apps:hardis",
5862
- "hardis:diagnose:org:unused-connected-apps",
5863
- "diagnose:hardis:org:unused-connected-apps",
5864
- "diagnose:org:hardis:unused-connected-apps",
5865
- "diagnose:org:unused-connected-apps:hardis",
5866
- "hardis:diagnose:unused-connected-apps:org",
5867
- "diagnose:hardis:unused-connected-apps:org",
5868
- "diagnose:unused-connected-apps:hardis:org",
5869
- "diagnose:unused-connected-apps:org:hardis",
5870
- "hardis:org:unused-connected-apps:diagnose",
5871
- "org:hardis:unused-connected-apps:diagnose",
5872
- "org:unused-connected-apps:hardis:diagnose",
5873
- "org:unused-connected-apps:diagnose:hardis",
5874
- "hardis:unused-connected-apps:org:diagnose",
5875
- "unused-connected-apps:hardis:org:diagnose",
5876
- "unused-connected-apps:org:hardis:diagnose",
5877
- "unused-connected-apps:org:diagnose:hardis",
5878
- "hardis:unused-connected-apps:diagnose:org",
5879
- "unused-connected-apps:hardis:diagnose:org",
5880
- "unused-connected-apps:diagnose:hardis:org",
5881
- "unused-connected-apps:diagnose:org:hardis"
5867
+ "hardis:org:diagnose:releaseupdates",
5868
+ "org:hardis:diagnose:releaseupdates",
5869
+ "org:diagnose:hardis:releaseupdates",
5870
+ "org:diagnose:releaseupdates:hardis",
5871
+ "hardis:diagnose:org:releaseupdates",
5872
+ "diagnose:hardis:org:releaseupdates",
5873
+ "diagnose:org:hardis:releaseupdates",
5874
+ "diagnose:org:releaseupdates:hardis",
5875
+ "hardis:diagnose:releaseupdates:org",
5876
+ "diagnose:hardis:releaseupdates:org",
5877
+ "diagnose:releaseupdates:hardis:org",
5878
+ "diagnose:releaseupdates:org:hardis",
5879
+ "hardis:org:releaseupdates:diagnose",
5880
+ "org:hardis:releaseupdates:diagnose",
5881
+ "org:releaseupdates:hardis:diagnose",
5882
+ "org:releaseupdates:diagnose:hardis",
5883
+ "hardis:releaseupdates:org:diagnose",
5884
+ "releaseupdates:hardis:org:diagnose",
5885
+ "releaseupdates:org:hardis:diagnose",
5886
+ "releaseupdates:org:diagnose:hardis",
5887
+ "hardis:releaseupdates:diagnose:org",
5888
+ "releaseupdates:hardis:diagnose:org",
5889
+ "releaseupdates:diagnose:hardis:org",
5890
+ "releaseupdates:diagnose:org:hardis"
5882
5891
  ]
5883
5892
  },
5884
- "hardis:org:diagnose:unusedlicenses": {
5893
+ "hardis:org:diagnose:unused-apex-classes": {
5885
5894
  "aliases": [],
5886
5895
  "args": {},
5887
- "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",
5896
+ "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",
5888
5897
  "examples": [
5889
- "$ sf hardis:org:diagnose:unusedlicenses",
5890
- "$ sf hardis:org:diagnose:unusedlicenses --fix"
5898
+ "$ sf hardis:org:diagnose:unused-apex-classes",
5899
+ "$ sf hardis:org:diagnose:unused-apex-classes --days 700"
5891
5900
  ],
5892
5901
  "flags": {
5893
5902
  "json": {
@@ -5913,6 +5922,14 @@
5913
5922
  "multiple": false,
5914
5923
  "type": "option"
5915
5924
  },
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
+ },
5916
5933
  "debug": {
5917
5934
  "char": "d",
5918
5935
  "description": "Activate debug mode (more logs)",
@@ -5951,32 +5968,14 @@
5951
5968
  },
5952
5969
  "hasDynamicHelp": true,
5953
5970
  "hiddenAliases": [],
5954
- "id": "hardis:org:diagnose:unusedlicenses",
5971
+ "id": "hardis:org:diagnose:unused-apex-classes",
5955
5972
  "pluginAlias": "sfdx-hardis",
5956
5973
  "pluginName": "sfdx-hardis",
5957
5974
  "pluginType": "core",
5958
5975
  "strict": true,
5959
5976
  "enableJsonFlag": true,
5960
- "title": "Detect unused Permission Set Licenses (beta)",
5977
+ "title": "Detect unused Apex classes in an org",
5961
5978
  "requiresProject": false,
5962
- "additionalPermissionSetsToAlwaysGet": [
5963
- "Sales_User"
5964
- ],
5965
- "permSetsPermSetLicenses": [
5966
- {
5967
- "permSet": "Sales_User",
5968
- "permSetLicense": "SalesUserPsl"
5969
- }
5970
- ],
5971
- "profilesPermissionSetLicenses": [
5972
- {
5973
- "profile": "Salesforce API Only",
5974
- "permSetLicense": "SalesforceAPIIntegrationPsl"
5975
- }
5976
- ],
5977
- "alwaysExcludeForActiveUsersPermissionSetLicenses": [
5978
- "IdentityConnect"
5979
- ],
5980
5979
  "isESM": true,
5981
5980
  "relativePath": [
5982
5981
  "lib",
@@ -5984,46 +5983,42 @@
5984
5983
  "hardis",
5985
5984
  "org",
5986
5985
  "diagnose",
5987
- "unusedlicenses.js"
5986
+ "unused-apex-classes.js"
5988
5987
  ],
5989
5988
  "aliasPermutations": [],
5990
5989
  "permutations": [
5991
- "hardis:org:diagnose:unusedlicenses",
5992
- "org:hardis:diagnose:unusedlicenses",
5993
- "org:diagnose:hardis:unusedlicenses",
5994
- "org:diagnose:unusedlicenses:hardis",
5995
- "hardis:diagnose:org:unusedlicenses",
5996
- "diagnose:hardis:org:unusedlicenses",
5997
- "diagnose:org:hardis:unusedlicenses",
5998
- "diagnose:org:unusedlicenses:hardis",
5999
- "hardis:diagnose:unusedlicenses:org",
6000
- "diagnose:hardis:unusedlicenses:org",
6001
- "diagnose:unusedlicenses:hardis:org",
6002
- "diagnose:unusedlicenses:org:hardis",
6003
- "hardis:org:unusedlicenses:diagnose",
6004
- "org:hardis:unusedlicenses:diagnose",
6005
- "org:unusedlicenses:hardis:diagnose",
6006
- "org:unusedlicenses:diagnose:hardis",
6007
- "hardis:unusedlicenses:org:diagnose",
6008
- "unusedlicenses:hardis:org:diagnose",
6009
- "unusedlicenses:org:hardis:diagnose",
6010
- "unusedlicenses:org:diagnose:hardis",
6011
- "hardis:unusedlicenses:diagnose:org",
6012
- "unusedlicenses:hardis:diagnose:org",
6013
- "unusedlicenses:diagnose:hardis:org",
6014
- "unusedlicenses:diagnose:org:hardis"
6015
- ]
6016
- },
6017
- "hardis:org:diagnose:unusedusers": {
6018
- "aliases": [],
6019
- "args": {},
6020
- "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",
6021
- "examples": [
6022
- "$ sf hardis:org:diagnose:unusedusers",
6023
- "$ sf hardis:org:diagnose:unusedusers --days 365",
6024
- "$ sf hardis:org:diagnose:unusedusers --days 60 --licensetypes all-crm",
6025
- "$ sf hardis:org:diagnose:unusedusers --days 60 --licenseidentifiers SFDC,AUL,AUL1",
6026
- "$ sf hardis:org:diagnose:unusedusers --days 60 --licensetypes all-crm --returnactiveusers"
5990
+ "hardis:org:diagnose:unused-apex-classes",
5991
+ "org:hardis:diagnose:unused-apex-classes",
5992
+ "org:diagnose:hardis:unused-apex-classes",
5993
+ "org:diagnose:unused-apex-classes:hardis",
5994
+ "hardis:diagnose:org:unused-apex-classes",
5995
+ "diagnose:hardis:org:unused-apex-classes",
5996
+ "diagnose:org:hardis:unused-apex-classes",
5997
+ "diagnose:org:unused-apex-classes:hardis",
5998
+ "hardis:diagnose:unused-apex-classes:org",
5999
+ "diagnose:hardis:unused-apex-classes:org",
6000
+ "diagnose:unused-apex-classes:hardis:org",
6001
+ "diagnose:unused-apex-classes:org:hardis",
6002
+ "hardis:org:unused-apex-classes:diagnose",
6003
+ "org:hardis:unused-apex-classes:diagnose",
6004
+ "org:unused-apex-classes:hardis:diagnose",
6005
+ "org:unused-apex-classes:diagnose:hardis",
6006
+ "hardis:unused-apex-classes:org:diagnose",
6007
+ "unused-apex-classes:hardis:org:diagnose",
6008
+ "unused-apex-classes:org:hardis:diagnose",
6009
+ "unused-apex-classes:org:diagnose:hardis",
6010
+ "hardis:unused-apex-classes:diagnose:org",
6011
+ "unused-apex-classes:hardis:diagnose:org",
6012
+ "unused-apex-classes:diagnose:hardis:org",
6013
+ "unused-apex-classes:diagnose:org:hardis"
6014
+ ]
6015
+ },
6016
+ "hardis:org:diagnose:unused-connected-apps": {
6017
+ "aliases": [],
6018
+ "args": {},
6019
+ "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",
6020
+ "examples": [
6021
+ "$ sf hardis:org:diagnose:unused-connected-apps"
6027
6022
  ],
6028
6023
  "flags": {
6029
6024
  "json": {
@@ -6049,41 +6044,6 @@
6049
6044
  "multiple": false,
6050
6045
  "type": "option"
6051
6046
  },
6052
- "days": {
6053
- "char": "t",
6054
- "description": "Extracts the users that have been inactive for the amount of days specified. In CI, default is 180 days",
6055
- "name": "days",
6056
- "hasDynamicHelp": false,
6057
- "multiple": false,
6058
- "type": "option"
6059
- },
6060
- "licensetypes": {
6061
- "char": "l",
6062
- "description": "Type of licenses to check. If set, do not use licenseidentifiers option. In CI, default is all-crm",
6063
- "name": "licensetypes",
6064
- "hasDynamicHelp": false,
6065
- "multiple": false,
6066
- "options": [
6067
- "all",
6068
- "all-crm",
6069
- "all-paying"
6070
- ],
6071
- "type": "option"
6072
- },
6073
- "licenseidentifiers": {
6074
- "char": "i",
6075
- "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",
6076
- "name": "licenseidentifiers",
6077
- "hasDynamicHelp": false,
6078
- "multiple": false,
6079
- "type": "option"
6080
- },
6081
- "returnactiveusers": {
6082
- "description": "Inverts the command by returning the active users",
6083
- "name": "returnactiveusers",
6084
- "allowNo": false,
6085
- "type": "boolean"
6086
- },
6087
6047
  "debug": {
6088
6048
  "char": "d",
6089
6049
  "description": "Activate debug mode (more logs)",
@@ -6122,13 +6082,30 @@
6122
6082
  },
6123
6083
  "hasDynamicHelp": true,
6124
6084
  "hiddenAliases": [],
6125
- "id": "hardis:org:diagnose:unusedusers",
6085
+ "id": "hardis:org:diagnose:unused-connected-apps",
6126
6086
  "pluginAlias": "sfdx-hardis",
6127
6087
  "pluginName": "sfdx-hardis",
6128
6088
  "pluginType": "core",
6129
6089
  "strict": true,
6130
6090
  "enableJsonFlag": true,
6131
- "title": "Detect unused Users in Salesforce",
6091
+ "title": "Unused Connected Apps in an org",
6092
+ "allowedInactiveConnectedApps": [
6093
+ "Ant Migration Tool",
6094
+ "Chatter Desktop",
6095
+ "Chatter Mobile for BlackBerry",
6096
+ "Force.com IDE",
6097
+ "OIQ_Integration",
6098
+ "Salesforce CLI",
6099
+ "Salesforce Files",
6100
+ "Salesforce Mobile Dashboards",
6101
+ "Salesforce Touch",
6102
+ "Salesforce for Outlook",
6103
+ "SalesforceA",
6104
+ "SalesforceA for Android",
6105
+ "SalesforceA for iOS",
6106
+ "SalesforceDX Namespace Registry",
6107
+ "SalesforceIQ"
6108
+ ],
6132
6109
  "requiresProject": false,
6133
6110
  "isESM": true,
6134
6111
  "relativePath": [
@@ -6137,42 +6114,43 @@
6137
6114
  "hardis",
6138
6115
  "org",
6139
6116
  "diagnose",
6140
- "unusedusers.js"
6117
+ "unused-connected-apps.js"
6141
6118
  ],
6142
6119
  "aliasPermutations": [],
6143
6120
  "permutations": [
6144
- "hardis:org:diagnose:unusedusers",
6145
- "org:hardis:diagnose:unusedusers",
6146
- "org:diagnose:hardis:unusedusers",
6147
- "org:diagnose:unusedusers:hardis",
6148
- "hardis:diagnose:org:unusedusers",
6149
- "diagnose:hardis:org:unusedusers",
6150
- "diagnose:org:hardis:unusedusers",
6151
- "diagnose:org:unusedusers:hardis",
6152
- "hardis:diagnose:unusedusers:org",
6153
- "diagnose:hardis:unusedusers:org",
6154
- "diagnose:unusedusers:hardis:org",
6155
- "diagnose:unusedusers:org:hardis",
6156
- "hardis:org:unusedusers:diagnose",
6157
- "org:hardis:unusedusers:diagnose",
6158
- "org:unusedusers:hardis:diagnose",
6159
- "org:unusedusers:diagnose:hardis",
6160
- "hardis:unusedusers:org:diagnose",
6161
- "unusedusers:hardis:org:diagnose",
6162
- "unusedusers:org:hardis:diagnose",
6163
- "unusedusers:org:diagnose:hardis",
6164
- "hardis:unusedusers:diagnose:org",
6165
- "unusedusers:hardis:diagnose:org",
6166
- "unusedusers:diagnose:hardis:org",
6167
- "unusedusers:diagnose:org:hardis"
6121
+ "hardis:org:diagnose:unused-connected-apps",
6122
+ "org:hardis:diagnose:unused-connected-apps",
6123
+ "org:diagnose:hardis:unused-connected-apps",
6124
+ "org:diagnose:unused-connected-apps:hardis",
6125
+ "hardis:diagnose:org:unused-connected-apps",
6126
+ "diagnose:hardis:org:unused-connected-apps",
6127
+ "diagnose:org:hardis:unused-connected-apps",
6128
+ "diagnose:org:unused-connected-apps:hardis",
6129
+ "hardis:diagnose:unused-connected-apps:org",
6130
+ "diagnose:hardis:unused-connected-apps:org",
6131
+ "diagnose:unused-connected-apps:hardis:org",
6132
+ "diagnose:unused-connected-apps:org:hardis",
6133
+ "hardis:org:unused-connected-apps:diagnose",
6134
+ "org:hardis:unused-connected-apps:diagnose",
6135
+ "org:unused-connected-apps:hardis:diagnose",
6136
+ "org:unused-connected-apps:diagnose:hardis",
6137
+ "hardis:unused-connected-apps:org:diagnose",
6138
+ "unused-connected-apps:hardis:org:diagnose",
6139
+ "unused-connected-apps:org:hardis:diagnose",
6140
+ "unused-connected-apps:org:diagnose:hardis",
6141
+ "hardis:unused-connected-apps:diagnose:org",
6142
+ "unused-connected-apps:hardis:diagnose:org",
6143
+ "unused-connected-apps:diagnose:hardis:org",
6144
+ "unused-connected-apps:diagnose:org:hardis"
6168
6145
  ]
6169
6146
  },
6170
- "hardis:org:files:export": {
6147
+ "hardis:org:diagnose:unusedlicenses": {
6171
6148
  "aliases": [],
6172
6149
  "args": {},
6173
- "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",
6150
+ "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",
6174
6151
  "examples": [
6175
- "$ sf hardis:org:files:export"
6152
+ "$ sf hardis:org:diagnose:unusedlicenses",
6153
+ "$ sf hardis:org:diagnose:unusedlicenses --fix"
6176
6154
  ],
6177
6155
  "flags": {
6178
6156
  "json": {
@@ -6190,37 +6168,10 @@
6190
6168
  "multiple": false,
6191
6169
  "type": "option"
6192
6170
  },
6193
- "path": {
6194
- "char": "p",
6195
- "description": "Path to the file export project",
6196
- "name": "path",
6197
- "hasDynamicHelp": false,
6198
- "multiple": false,
6199
- "type": "option"
6200
- },
6201
- "chunksize": {
6202
- "char": "c",
6203
- "description": "Number of records to add in a chunk before it is processed",
6204
- "name": "chunksize",
6205
- "default": 1000,
6206
- "hasDynamicHelp": false,
6207
- "multiple": false,
6208
- "type": "option"
6209
- },
6210
- "polltimeout": {
6211
- "char": "t",
6212
- "description": "Timeout in MS for Bulk API calls",
6213
- "name": "polltimeout",
6214
- "default": 300000,
6215
- "hasDynamicHelp": false,
6216
- "multiple": false,
6217
- "type": "option"
6218
- },
6219
- "startchunknumber": {
6220
- "char": "s",
6221
- "description": "Chunk number to start from",
6222
- "name": "startchunknumber",
6223
- "default": 0,
6171
+ "outputfile": {
6172
+ "char": "f",
6173
+ "description": "Force the path and name of output report file. Must end with .csv",
6174
+ "name": "outputfile",
6224
6175
  "hasDynamicHelp": false,
6225
6176
  "multiple": false,
6226
6177
  "type": "option"
@@ -6263,57 +6214,79 @@
6263
6214
  },
6264
6215
  "hasDynamicHelp": true,
6265
6216
  "hiddenAliases": [],
6266
- "id": "hardis:org:files:export",
6217
+ "id": "hardis:org:diagnose:unusedlicenses",
6267
6218
  "pluginAlias": "sfdx-hardis",
6268
6219
  "pluginName": "sfdx-hardis",
6269
6220
  "pluginType": "core",
6270
6221
  "strict": true,
6271
6222
  "enableJsonFlag": true,
6272
- "title": "Export files",
6223
+ "title": "Detect unused Permission Set Licenses (beta)",
6273
6224
  "requiresProject": false,
6225
+ "additionalPermissionSetsToAlwaysGet": [
6226
+ "Sales_User"
6227
+ ],
6228
+ "permSetsPermSetLicenses": [
6229
+ {
6230
+ "permSet": "Sales_User",
6231
+ "permSetLicense": "SalesUserPsl"
6232
+ }
6233
+ ],
6234
+ "profilesPermissionSetLicenses": [
6235
+ {
6236
+ "profile": "Salesforce API Only",
6237
+ "permSetLicense": "SalesforceAPIIntegrationPsl"
6238
+ }
6239
+ ],
6240
+ "alwaysExcludeForActiveUsersPermissionSetLicenses": [
6241
+ "IdentityConnect"
6242
+ ],
6274
6243
  "isESM": true,
6275
6244
  "relativePath": [
6276
6245
  "lib",
6277
6246
  "commands",
6278
6247
  "hardis",
6279
6248
  "org",
6280
- "files",
6281
- "export.js"
6249
+ "diagnose",
6250
+ "unusedlicenses.js"
6282
6251
  ],
6283
6252
  "aliasPermutations": [],
6284
6253
  "permutations": [
6285
- "hardis:org:files:export",
6286
- "org:hardis:files:export",
6287
- "org:files:hardis:export",
6288
- "org:files:export:hardis",
6289
- "hardis:files:org:export",
6290
- "files:hardis:org:export",
6291
- "files:org:hardis:export",
6292
- "files:org:export:hardis",
6293
- "hardis:files:export:org",
6294
- "files:hardis:export:org",
6295
- "files:export:hardis:org",
6296
- "files:export:org:hardis",
6297
- "hardis:org:export:files",
6298
- "org:hardis:export:files",
6299
- "org:export:hardis:files",
6300
- "org:export:files:hardis",
6301
- "hardis:export:org:files",
6302
- "export:hardis:org:files",
6303
- "export:org:hardis:files",
6304
- "export:org:files:hardis",
6305
- "hardis:export:files:org",
6306
- "export:hardis:files:org",
6307
- "export:files:hardis:org",
6308
- "export:files:org:hardis"
6254
+ "hardis:org:diagnose:unusedlicenses",
6255
+ "org:hardis:diagnose:unusedlicenses",
6256
+ "org:diagnose:hardis:unusedlicenses",
6257
+ "org:diagnose:unusedlicenses:hardis",
6258
+ "hardis:diagnose:org:unusedlicenses",
6259
+ "diagnose:hardis:org:unusedlicenses",
6260
+ "diagnose:org:hardis:unusedlicenses",
6261
+ "diagnose:org:unusedlicenses:hardis",
6262
+ "hardis:diagnose:unusedlicenses:org",
6263
+ "diagnose:hardis:unusedlicenses:org",
6264
+ "diagnose:unusedlicenses:hardis:org",
6265
+ "diagnose:unusedlicenses:org:hardis",
6266
+ "hardis:org:unusedlicenses:diagnose",
6267
+ "org:hardis:unusedlicenses:diagnose",
6268
+ "org:unusedlicenses:hardis:diagnose",
6269
+ "org:unusedlicenses:diagnose:hardis",
6270
+ "hardis:unusedlicenses:org:diagnose",
6271
+ "unusedlicenses:hardis:org:diagnose",
6272
+ "unusedlicenses:org:hardis:diagnose",
6273
+ "unusedlicenses:org:diagnose:hardis",
6274
+ "hardis:unusedlicenses:diagnose:org",
6275
+ "unusedlicenses:hardis:diagnose:org",
6276
+ "unusedlicenses:diagnose:hardis:org",
6277
+ "unusedlicenses:diagnose:org:hardis"
6309
6278
  ]
6310
6279
  },
6311
- "hardis:org:files:import": {
6280
+ "hardis:org:diagnose:unusedusers": {
6312
6281
  "aliases": [],
6313
6282
  "args": {},
6314
- "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",
6283
+ "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",
6315
6284
  "examples": [
6316
- "$ sf hardis:org:files:import"
6285
+ "$ sf hardis:org:diagnose:unusedusers",
6286
+ "$ sf hardis:org:diagnose:unusedusers --days 365",
6287
+ "$ sf hardis:org:diagnose:unusedusers --days 60 --licensetypes all-crm",
6288
+ "$ sf hardis:org:diagnose:unusedusers --days 60 --licenseidentifiers SFDC,AUL,AUL1",
6289
+ "$ sf hardis:org:diagnose:unusedusers --days 60 --licensetypes all-crm --returnactiveusers"
6317
6290
  ],
6318
6291
  "flags": {
6319
6292
  "json": {
@@ -6331,18 +6304,46 @@
6331
6304
  "multiple": false,
6332
6305
  "type": "option"
6333
6306
  },
6334
- "path": {
6335
- "char": "p",
6336
- "description": "Path to the file export project",
6337
- "name": "path",
6307
+ "outputfile": {
6308
+ "char": "f",
6309
+ "description": "Force the path and name of output report file. Must end with .csv",
6310
+ "name": "outputfile",
6338
6311
  "hasDynamicHelp": false,
6339
6312
  "multiple": false,
6340
6313
  "type": "option"
6341
6314
  },
6342
- "overwrite": {
6343
- "char": "f",
6344
- "description": "Override existing files (doubles the number of API calls)",
6345
- "name": "overwrite",
6315
+ "days": {
6316
+ "char": "t",
6317
+ "description": "Extracts the users that have been inactive for the amount of days specified. In CI, default is 180 days",
6318
+ "name": "days",
6319
+ "hasDynamicHelp": false,
6320
+ "multiple": false,
6321
+ "type": "option"
6322
+ },
6323
+ "licensetypes": {
6324
+ "char": "l",
6325
+ "description": "Type of licenses to check. If set, do not use licenseidentifiers option. In CI, default is all-crm",
6326
+ "name": "licensetypes",
6327
+ "hasDynamicHelp": false,
6328
+ "multiple": false,
6329
+ "options": [
6330
+ "all",
6331
+ "all-crm",
6332
+ "all-paying"
6333
+ ],
6334
+ "type": "option"
6335
+ },
6336
+ "licenseidentifiers": {
6337
+ "char": "i",
6338
+ "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",
6339
+ "name": "licenseidentifiers",
6340
+ "hasDynamicHelp": false,
6341
+ "multiple": false,
6342
+ "type": "option"
6343
+ },
6344
+ "returnactiveusers": {
6345
+ "description": "Inverts the command by returning the active users",
6346
+ "name": "returnactiveusers",
6346
6347
  "allowNo": false,
6347
6348
  "type": "boolean"
6348
6349
  },
@@ -6384,13 +6385,13 @@
6384
6385
  },
6385
6386
  "hasDynamicHelp": true,
6386
6387
  "hiddenAliases": [],
6387
- "id": "hardis:org:files:import",
6388
+ "id": "hardis:org:diagnose:unusedusers",
6388
6389
  "pluginAlias": "sfdx-hardis",
6389
6390
  "pluginName": "sfdx-hardis",
6390
6391
  "pluginType": "core",
6391
6392
  "strict": true,
6392
6393
  "enableJsonFlag": true,
6393
- "title": "Import files",
6394
+ "title": "Detect unused Users in Salesforce",
6394
6395
  "requiresProject": false,
6395
6396
  "isESM": true,
6396
6397
  "relativePath": [
@@ -6398,35 +6399,35 @@
6398
6399
  "commands",
6399
6400
  "hardis",
6400
6401
  "org",
6401
- "files",
6402
- "import.js"
6402
+ "diagnose",
6403
+ "unusedusers.js"
6403
6404
  ],
6404
6405
  "aliasPermutations": [],
6405
6406
  "permutations": [
6406
- "hardis:org:files:import",
6407
- "org:hardis:files:import",
6408
- "org:files:hardis:import",
6409
- "org:files:import:hardis",
6410
- "hardis:files:org:import",
6411
- "files:hardis:org:import",
6412
- "files:org:hardis:import",
6413
- "files:org:import:hardis",
6414
- "hardis:files:import:org",
6415
- "files:hardis:import:org",
6416
- "files:import:hardis:org",
6417
- "files:import:org:hardis",
6418
- "hardis:org:import:files",
6419
- "org:hardis:import:files",
6420
- "org:import:hardis:files",
6421
- "org:import:files:hardis",
6422
- "hardis:import:org:files",
6423
- "import:hardis:org:files",
6424
- "import:org:hardis:files",
6425
- "import:org:files:hardis",
6426
- "hardis:import:files:org",
6427
- "import:hardis:files:org",
6428
- "import:files:hardis:org",
6429
- "import:files:org:hardis"
6407
+ "hardis:org:diagnose:unusedusers",
6408
+ "org:hardis:diagnose:unusedusers",
6409
+ "org:diagnose:hardis:unusedusers",
6410
+ "org:diagnose:unusedusers:hardis",
6411
+ "hardis:diagnose:org:unusedusers",
6412
+ "diagnose:hardis:org:unusedusers",
6413
+ "diagnose:org:hardis:unusedusers",
6414
+ "diagnose:org:unusedusers:hardis",
6415
+ "hardis:diagnose:unusedusers:org",
6416
+ "diagnose:hardis:unusedusers:org",
6417
+ "diagnose:unusedusers:hardis:org",
6418
+ "diagnose:unusedusers:org:hardis",
6419
+ "hardis:org:unusedusers:diagnose",
6420
+ "org:hardis:unusedusers:diagnose",
6421
+ "org:unusedusers:hardis:diagnose",
6422
+ "org:unusedusers:diagnose:hardis",
6423
+ "hardis:unusedusers:org:diagnose",
6424
+ "unusedusers:hardis:org:diagnose",
6425
+ "unusedusers:org:hardis:diagnose",
6426
+ "unusedusers:org:diagnose:hardis",
6427
+ "hardis:unusedusers:diagnose:org",
6428
+ "unusedusers:hardis:diagnose:org",
6429
+ "unusedusers:diagnose:hardis:org",
6430
+ "unusedusers:diagnose:org:hardis"
6430
6431
  ]
6431
6432
  },
6432
6433
  "hardis:org:fix:listviewmine": {
@@ -14200,5 +14201,5 @@
14200
14201
  ]
14201
14202
  }
14202
14203
  },
14203
- "version": "5.16.3"
14204
+ "version": "5.16.4-beta202501221328.0"
14204
14205
  }