@peernova/cuneiform-sf 1.0.2 → 1.0.4-beta.10

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (488) hide show
  1. package/LICENSE +81 -30
  2. package/README.md +168 -134
  3. package/lib/adapters/connection-facade.d.ts +458 -0
  4. package/lib/adapters/connection-facade.js +379 -0
  5. package/lib/adapters/connection-facade.js.map +1 -0
  6. package/lib/adapters/errors.d.ts +547 -0
  7. package/lib/adapters/errors.js +937 -0
  8. package/lib/adapters/errors.js.map +1 -0
  9. package/lib/adapters/lifecycle.d.ts +112 -0
  10. package/lib/adapters/lifecycle.js +94 -0
  11. package/lib/adapters/lifecycle.js.map +1 -0
  12. package/lib/adapters/rest/cache.d.ts +69 -0
  13. package/lib/adapters/rest/cache.js +133 -0
  14. package/lib/adapters/rest/cache.js.map +1 -0
  15. package/lib/adapters/rest/index.d.ts +11 -0
  16. package/lib/adapters/rest/index.js +18 -0
  17. package/lib/adapters/rest/index.js.map +1 -0
  18. package/lib/adapters/rest/profiling-rest-client.d.ts +137 -0
  19. package/lib/adapters/rest/profiling-rest-client.js +115 -0
  20. package/lib/adapters/rest/profiling-rest-client.js.map +1 -0
  21. package/lib/adapters/rest/rest-api-adapter.d.ts +393 -0
  22. package/lib/adapters/rest/rest-api-adapter.js +764 -0
  23. package/lib/adapters/rest/rest-api-adapter.js.map +1 -0
  24. package/lib/adapters/rest/types.d.ts +34 -0
  25. package/lib/adapters/rest/types.js +9 -0
  26. package/lib/adapters/rest/types.js.map +1 -0
  27. package/lib/adapters/retry.d.ts +91 -0
  28. package/lib/adapters/retry.js +215 -0
  29. package/lib/adapters/retry.js.map +1 -0
  30. package/lib/adapters/soql/cuneiform-query-builder.d.ts +418 -0
  31. package/lib/adapters/soql/cuneiform-query-builder.js +606 -0
  32. package/lib/adapters/soql/cuneiform-query-builder.js.map +1 -0
  33. package/lib/adapters/soql/soql-query-adapter.d.ts +141 -0
  34. package/lib/adapters/soql/soql-query-adapter.js +259 -0
  35. package/lib/adapters/soql/soql-query-adapter.js.map +1 -0
  36. package/lib/adapters/soql/types.d.ts +37 -0
  37. package/lib/adapters/soql/types.js +19 -0
  38. package/lib/adapters/soql/types.js.map +1 -0
  39. package/lib/adapters/testing/index.d.ts +37 -0
  40. package/lib/adapters/testing/index.js +20 -0
  41. package/lib/adapters/testing/index.js.map +1 -0
  42. package/lib/adapters/testing/mock-connection.d.ts +77 -0
  43. package/lib/adapters/testing/mock-connection.js +207 -0
  44. package/lib/adapters/testing/mock-connection.js.map +1 -0
  45. package/lib/adapters/testing/mock-logger.d.ts +29 -0
  46. package/lib/adapters/testing/mock-logger.js +57 -0
  47. package/lib/adapters/testing/mock-logger.js.map +1 -0
  48. package/lib/adapters/testing/mock-mcp-adapters.d.ts +32 -0
  49. package/lib/adapters/testing/mock-mcp-adapters.js +52 -0
  50. package/lib/adapters/testing/mock-mcp-adapters.js.map +1 -0
  51. package/lib/adapters/testing/mock-oclif-config.d.ts +22 -0
  52. package/lib/adapters/testing/mock-oclif-config.js +90 -0
  53. package/lib/adapters/testing/mock-oclif-config.js.map +1 -0
  54. package/lib/adapters/testing/mock-rest-adapter.d.ts +26 -0
  55. package/lib/adapters/testing/mock-rest-adapter.js +243 -0
  56. package/lib/adapters/testing/mock-rest-adapter.js.map +1 -0
  57. package/lib/adapters/testing/mock-salesforce-connection.d.ts +40 -0
  58. package/lib/adapters/testing/mock-salesforce-connection.js +61 -0
  59. package/lib/adapters/testing/mock-salesforce-connection.js.map +1 -0
  60. package/lib/adapters/testing/mock-soql-adapter.d.ts +30 -0
  61. package/lib/adapters/testing/mock-soql-adapter.js +120 -0
  62. package/lib/adapters/testing/mock-soql-adapter.js.map +1 -0
  63. package/lib/adapters/testing/mock-tooling-adapter.d.ts +24 -0
  64. package/lib/adapters/testing/mock-tooling-adapter.js +163 -0
  65. package/lib/adapters/testing/mock-tooling-adapter.js.map +1 -0
  66. package/lib/adapters/testing/stub-connection.d.ts +93 -0
  67. package/lib/adapters/testing/stub-connection.js +97 -0
  68. package/lib/adapters/testing/stub-connection.js.map +1 -0
  69. package/lib/adapters/testing/stub-rest-adapter.d.ts +52 -0
  70. package/lib/adapters/testing/stub-rest-adapter.js +58 -0
  71. package/lib/adapters/testing/stub-rest-adapter.js.map +1 -0
  72. package/lib/adapters/testing/stub-soql-adapter.d.ts +56 -0
  73. package/lib/adapters/testing/stub-soql-adapter.js +50 -0
  74. package/lib/adapters/testing/stub-soql-adapter.js.map +1 -0
  75. package/lib/adapters/testing/types.d.ts +71 -0
  76. package/lib/adapters/testing/types.js +9 -0
  77. package/lib/adapters/testing/types.js.map +1 -0
  78. package/lib/adapters/tooling/index.d.ts +10 -0
  79. package/lib/adapters/tooling/index.js +17 -0
  80. package/lib/adapters/tooling/index.js.map +1 -0
  81. package/lib/adapters/tooling/tooling-api-adapter.d.ts +157 -0
  82. package/lib/adapters/tooling/tooling-api-adapter.js +339 -0
  83. package/lib/adapters/tooling/tooling-api-adapter.js.map +1 -0
  84. package/lib/adapters/tooling/types.d.ts +81 -0
  85. package/lib/adapters/tooling/types.js +9 -0
  86. package/lib/adapters/tooling/types.js.map +1 -0
  87. package/lib/adapters/types.d.ts +112 -0
  88. package/lib/adapters/types.js +169 -0
  89. package/lib/adapters/types.js.map +1 -0
  90. package/lib/base/cuneiform-command.d.ts +175 -0
  91. package/lib/base/cuneiform-command.js +326 -0
  92. package/lib/base/cuneiform-command.js.map +1 -0
  93. package/lib/commands/cuneiform/compatibility/check.d.ts +43 -0
  94. package/lib/commands/cuneiform/compatibility/check.js +114 -0
  95. package/lib/commands/cuneiform/compatibility/check.js.map +1 -0
  96. package/lib/commands/cuneiform/definition/create.d.ts +120 -0
  97. package/lib/commands/cuneiform/definition/create.js +737 -0
  98. package/lib/commands/cuneiform/definition/create.js.map +1 -0
  99. package/lib/commands/cuneiform/definition/export.d.ts +57 -0
  100. package/lib/commands/cuneiform/definition/export.js +133 -0
  101. package/lib/commands/cuneiform/definition/export.js.map +1 -0
  102. package/lib/commands/cuneiform/definition/get.d.ts +86 -0
  103. package/lib/commands/cuneiform/definition/get.js +277 -0
  104. package/lib/commands/cuneiform/definition/get.js.map +1 -0
  105. package/lib/commands/cuneiform/definition/import.d.ts +54 -0
  106. package/lib/commands/cuneiform/definition/import.js +118 -0
  107. package/lib/commands/cuneiform/definition/import.js.map +1 -0
  108. package/lib/commands/cuneiform/definition/list.d.ts +110 -0
  109. package/lib/commands/cuneiform/definition/list.js +351 -0
  110. package/lib/commands/cuneiform/definition/list.js.map +1 -0
  111. package/lib/commands/cuneiform/definition/purge.d.ts +109 -0
  112. package/lib/commands/cuneiform/definition/purge.js +578 -0
  113. package/lib/commands/cuneiform/definition/purge.js.map +1 -0
  114. package/lib/commands/cuneiform/definition/update.d.ts +58 -0
  115. package/lib/commands/cuneiform/definition/update.js +209 -0
  116. package/lib/commands/cuneiform/definition/update.js.map +1 -0
  117. package/lib/commands/cuneiform/mcp/serve.d.ts +56 -0
  118. package/lib/commands/cuneiform/mcp/serve.js +109 -0
  119. package/lib/commands/cuneiform/mcp/serve.js.map +1 -0
  120. package/lib/commands/cuneiform/object/describe.d.ts +61 -0
  121. package/lib/commands/cuneiform/object/describe.js +461 -0
  122. package/lib/commands/cuneiform/object/describe.js.map +1 -0
  123. package/lib/commands/cuneiform/object/list.d.ts +123 -0
  124. package/lib/commands/cuneiform/object/list.js +264 -0
  125. package/lib/commands/cuneiform/object/list.js.map +1 -0
  126. package/lib/commands/cuneiform/org/details.d.ts +99 -0
  127. package/lib/commands/cuneiform/org/details.js +521 -0
  128. package/lib/commands/cuneiform/org/details.js.map +1 -0
  129. package/lib/commands/cuneiform/org/reset.d.ts +46 -0
  130. package/lib/commands/cuneiform/org/reset.js +135 -0
  131. package/lib/commands/cuneiform/org/reset.js.map +1 -0
  132. package/lib/commands/cuneiform/profile/request/cancel.d.ts +59 -0
  133. package/lib/commands/cuneiform/profile/request/cancel.js +202 -0
  134. package/lib/commands/cuneiform/profile/request/cancel.js.map +1 -0
  135. package/lib/commands/cuneiform/profile/request/delete.d.ts +59 -0
  136. package/lib/commands/cuneiform/profile/request/delete.js +223 -0
  137. package/lib/commands/cuneiform/profile/request/delete.js.map +1 -0
  138. package/lib/commands/cuneiform/profile/request/list.d.ts +35 -0
  139. package/lib/commands/cuneiform/profile/request/list.js +102 -0
  140. package/lib/commands/cuneiform/profile/request/list.js.map +1 -0
  141. package/lib/commands/cuneiform/profile.d.ts +93 -0
  142. package/lib/commands/cuneiform/profile.js +353 -0
  143. package/lib/commands/cuneiform/profile.js.map +1 -0
  144. package/lib/commands/cuneiform/summary/purge.d.ts +80 -0
  145. package/lib/commands/cuneiform/summary/purge.js +467 -0
  146. package/lib/commands/cuneiform/summary/purge.js.map +1 -0
  147. package/lib/commands/cuneiform/summary/reprofile.d.ts +60 -0
  148. package/lib/commands/cuneiform/summary/reprofile.js +236 -0
  149. package/lib/commands/cuneiform/summary/reprofile.js.map +1 -0
  150. package/lib/commands/cuneiform/summary/stop.d.ts +59 -0
  151. package/lib/commands/cuneiform/summary/stop.js +234 -0
  152. package/lib/commands/cuneiform/summary/stop.js.map +1 -0
  153. package/lib/commands/cuneiform/user/details.d.ts +77 -0
  154. package/lib/commands/cuneiform/user/details.js +414 -0
  155. package/lib/commands/cuneiform/user/details.js.map +1 -0
  156. package/lib/constants/namespace-constants.d.ts +102 -0
  157. package/lib/constants/namespace-constants.js +225 -0
  158. package/lib/constants/namespace-constants.js.map +1 -0
  159. package/lib/debug/command-debug-proxy.d.ts +101 -0
  160. package/lib/debug/command-debug-proxy.js +171 -0
  161. package/lib/debug/command-debug-proxy.js.map +1 -0
  162. package/lib/debug/debug-logger.d.ts +85 -0
  163. package/lib/debug/debug-logger.js +133 -0
  164. package/lib/debug/debug-logger.js.map +1 -0
  165. package/lib/debug/service-debug-proxy.d.ts +30 -0
  166. package/lib/debug/service-debug-proxy.js +102 -0
  167. package/lib/debug/service-debug-proxy.js.map +1 -0
  168. package/lib/hooks/prerun.d.ts +25 -0
  169. package/lib/hooks/prerun.js +47 -0
  170. package/lib/hooks/prerun.js.map +1 -0
  171. package/lib/mcp/config/mcp-config.d.ts +55 -0
  172. package/lib/mcp/config/mcp-config.js +51 -0
  173. package/lib/mcp/config/mcp-config.js.map +1 -0
  174. package/lib/mcp/config/pagination.d.ts +96 -0
  175. package/lib/mcp/config/pagination.js +108 -0
  176. package/lib/mcp/config/pagination.js.map +1 -0
  177. package/lib/mcp/config/system-prompts.d.ts +18 -0
  178. package/lib/mcp/config/system-prompts.js +92 -0
  179. package/lib/mcp/config/system-prompts.js.map +1 -0
  180. package/lib/mcp/errors.d.ts +23 -0
  181. package/lib/mcp/errors.js +27 -0
  182. package/lib/mcp/errors.js.map +1 -0
  183. package/lib/mcp/schemas/input-schemas.d.ts +327 -0
  184. package/lib/mcp/schemas/input-schemas.js +310 -0
  185. package/lib/mcp/schemas/input-schemas.js.map +1 -0
  186. package/lib/mcp/server.d.ts +40 -0
  187. package/lib/mcp/server.js +316 -0
  188. package/lib/mcp/server.js.map +1 -0
  189. package/lib/mcp/tools/contactpoint-tools.d.ts +14 -0
  190. package/lib/mcp/tools/contactpoint-tools.js +34 -0
  191. package/lib/mcp/tools/contactpoint-tools.js.map +1 -0
  192. package/lib/mcp/tools/definition-io-tools.d.ts +19 -0
  193. package/lib/mcp/tools/definition-io-tools.js +152 -0
  194. package/lib/mcp/tools/definition-io-tools.js.map +1 -0
  195. package/lib/mcp/tools/definition-tools.d.ts +51 -0
  196. package/lib/mcp/tools/definition-tools.js +220 -0
  197. package/lib/mcp/tools/definition-tools.js.map +1 -0
  198. package/lib/mcp/tools/index.d.ts +37 -0
  199. package/lib/mcp/tools/index.js +88 -0
  200. package/lib/mcp/tools/index.js.map +1 -0
  201. package/lib/mcp/tools/object-tools.d.ts +22 -0
  202. package/lib/mcp/tools/object-tools.js +327 -0
  203. package/lib/mcp/tools/object-tools.js.map +1 -0
  204. package/lib/mcp/tools/org-tools.d.ts +14 -0
  205. package/lib/mcp/tools/org-tools.js +177 -0
  206. package/lib/mcp/tools/org-tools.js.map +1 -0
  207. package/lib/mcp/tools/profile-tools.d.ts +59 -0
  208. package/lib/mcp/tools/profile-tools.js +213 -0
  209. package/lib/mcp/tools/profile-tools.js.map +1 -0
  210. package/lib/mcp/tools/summary-tools.d.ts +14 -0
  211. package/lib/mcp/tools/summary-tools.js +38 -0
  212. package/lib/mcp/tools/summary-tools.js.map +1 -0
  213. package/lib/mcp/tools/tool-factory.d.ts +63 -0
  214. package/lib/mcp/tools/tool-factory.js +146 -0
  215. package/lib/mcp/tools/tool-factory.js.map +1 -0
  216. package/lib/mcp/tools/user-tools.d.ts +25 -0
  217. package/lib/mcp/tools/user-tools.js +167 -0
  218. package/lib/mcp/tools/user-tools.js.map +1 -0
  219. package/lib/models/cascade-skip-accumulator.d.ts +25 -0
  220. package/lib/models/cascade-skip-accumulator.js +9 -0
  221. package/lib/models/cascade-skip-accumulator.js.map +1 -0
  222. package/lib/models/date-literal.d.ts +280 -0
  223. package/lib/models/date-literal.js +1164 -0
  224. package/lib/models/date-literal.js.map +1 -0
  225. package/lib/models/object-describe-types.d.ts +173 -0
  226. package/lib/models/object-describe-types.js +9 -0
  227. package/lib/models/object-describe-types.js.map +1 -0
  228. package/lib/models/portability-recipe.d.ts +35 -0
  229. package/lib/models/portability-recipe.js +113 -0
  230. package/lib/models/portability-recipe.js.map +1 -0
  231. package/lib/models/profile-request-types.d.ts +118 -0
  232. package/lib/models/profile-request-types.js +23 -0
  233. package/lib/models/profile-request-types.js.map +1 -0
  234. package/lib/models/profiling-execution-types.d.ts +154 -0
  235. package/lib/models/profiling-execution-types.js +14 -0
  236. package/lib/models/profiling-execution-types.js.map +1 -0
  237. package/lib/models/service-result.d.ts +114 -0
  238. package/lib/models/service-result.js +81 -0
  239. package/lib/models/service-result.js.map +1 -0
  240. package/lib/models/sfdmu-types.d.ts +49 -0
  241. package/lib/models/sfdmu-types.js +23 -0
  242. package/lib/models/sfdmu-types.js.map +1 -0
  243. package/lib/models/status-types.d.ts +38 -0
  244. package/lib/models/status-types.js +12 -0
  245. package/lib/models/status-types.js.map +1 -0
  246. package/lib/models/summary-bulk-types.d.ts +61 -0
  247. package/lib/models/summary-bulk-types.js +23 -0
  248. package/lib/models/summary-bulk-types.js.map +1 -0
  249. package/lib/models/user-details-types.d.ts +188 -0
  250. package/lib/models/user-details-types.js +9 -0
  251. package/lib/models/user-details-types.js.map +1 -0
  252. package/lib/models/year-range.d.ts +78 -0
  253. package/lib/models/year-range.js +153 -0
  254. package/lib/models/year-range.js.map +1 -0
  255. package/lib/operations/CompatibilityCheckOperation.d.ts +62 -0
  256. package/lib/operations/CompatibilityCheckOperation.js +102 -0
  257. package/lib/operations/CompatibilityCheckOperation.js.map +1 -0
  258. package/lib/operations/DefinitionCreateOperation.d.ts +427 -0
  259. package/lib/operations/DefinitionCreateOperation.js +1270 -0
  260. package/lib/operations/DefinitionCreateOperation.js.map +1 -0
  261. package/lib/operations/DefinitionExportOperation.d.ts +155 -0
  262. package/lib/operations/DefinitionExportOperation.js +281 -0
  263. package/lib/operations/DefinitionExportOperation.js.map +1 -0
  264. package/lib/operations/DefinitionImportOperation.d.ts +144 -0
  265. package/lib/operations/DefinitionImportOperation.js +357 -0
  266. package/lib/operations/DefinitionImportOperation.js.map +1 -0
  267. package/lib/operations/DefinitionListOperation.d.ts +66 -0
  268. package/lib/operations/DefinitionListOperation.js +108 -0
  269. package/lib/operations/DefinitionListOperation.js.map +1 -0
  270. package/lib/operations/DefinitionPurgeOperation.d.ts +203 -0
  271. package/lib/operations/DefinitionPurgeOperation.js +465 -0
  272. package/lib/operations/DefinitionPurgeOperation.js.map +1 -0
  273. package/lib/operations/DefinitionUpdateOperation.d.ts +78 -0
  274. package/lib/operations/DefinitionUpdateOperation.js +142 -0
  275. package/lib/operations/DefinitionUpdateOperation.js.map +1 -0
  276. package/lib/operations/OrgDetailsOperation.d.ts +253 -0
  277. package/lib/operations/OrgDetailsOperation.js +456 -0
  278. package/lib/operations/OrgDetailsOperation.js.map +1 -0
  279. package/lib/operations/OrgResetOperation.d.ts +114 -0
  280. package/lib/operations/OrgResetOperation.js +209 -0
  281. package/lib/operations/OrgResetOperation.js.map +1 -0
  282. package/lib/operations/ProfileOperation.d.ts +192 -0
  283. package/lib/operations/ProfileOperation.js +371 -0
  284. package/lib/operations/ProfileOperation.js.map +1 -0
  285. package/lib/operations/ProfileRequestCancelOperation.d.ts +59 -0
  286. package/lib/operations/ProfileRequestCancelOperation.js +137 -0
  287. package/lib/operations/ProfileRequestCancelOperation.js.map +1 -0
  288. package/lib/operations/ProfileRequestDeleteOperation.d.ts +64 -0
  289. package/lib/operations/ProfileRequestDeleteOperation.js +134 -0
  290. package/lib/operations/ProfileRequestDeleteOperation.js.map +1 -0
  291. package/lib/operations/ProfileRequestListOperation.d.ts +39 -0
  292. package/lib/operations/ProfileRequestListOperation.js +61 -0
  293. package/lib/operations/ProfileRequestListOperation.js.map +1 -0
  294. package/lib/operations/SummaryPurgeOperation.d.ts +134 -0
  295. package/lib/operations/SummaryPurgeOperation.js +257 -0
  296. package/lib/operations/SummaryPurgeOperation.js.map +1 -0
  297. package/lib/operations/SummaryReprofileOperation.d.ts +88 -0
  298. package/lib/operations/SummaryReprofileOperation.js +174 -0
  299. package/lib/operations/SummaryReprofileOperation.js.map +1 -0
  300. package/lib/operations/SummaryStopOperation.d.ts +87 -0
  301. package/lib/operations/SummaryStopOperation.js +175 -0
  302. package/lib/operations/SummaryStopOperation.js.map +1 -0
  303. package/lib/services/BulkExecutionService.d.ts +120 -0
  304. package/lib/services/BulkExecutionService.js +535 -0
  305. package/lib/services/BulkExecutionService.js.map +1 -0
  306. package/lib/services/CompatibilityService.d.ts +81 -0
  307. package/lib/services/CompatibilityService.js +118 -0
  308. package/lib/services/CompatibilityService.js.map +1 -0
  309. package/lib/services/ConfigureMode.d.ts +98 -0
  310. package/lib/services/ConfigureMode.js +413 -0
  311. package/lib/services/ConfigureMode.js.map +1 -0
  312. package/lib/services/ContactPointService.d.ts +111 -0
  313. package/lib/services/ContactPointService.js +286 -0
  314. package/lib/services/ContactPointService.js.map +1 -0
  315. package/lib/services/DataAvailabilityService.d.ts +81 -0
  316. package/lib/services/DataAvailabilityService.js +128 -0
  317. package/lib/services/DataAvailabilityService.js.map +1 -0
  318. package/lib/services/DefinitionFieldGenerationService.d.ts +357 -0
  319. package/lib/services/DefinitionFieldGenerationService.js +899 -0
  320. package/lib/services/DefinitionFieldGenerationService.js.map +1 -0
  321. package/lib/services/DefinitionQueryBuilder.d.ts +92 -0
  322. package/lib/services/DefinitionQueryBuilder.js +328 -0
  323. package/lib/services/DefinitionQueryBuilder.js.map +1 -0
  324. package/lib/services/ObjectDescribeService.d.ts +436 -0
  325. package/lib/services/ObjectDescribeService.js +881 -0
  326. package/lib/services/ObjectDescribeService.js.map +1 -0
  327. package/lib/services/ObjectFilteringService.d.ts +484 -0
  328. package/lib/services/ObjectFilteringService.js +1080 -0
  329. package/lib/services/ObjectFilteringService.js.map +1 -0
  330. package/lib/services/ObjectListCommandService.d.ts +467 -0
  331. package/lib/services/ObjectListCommandService.js +904 -0
  332. package/lib/services/ObjectListCommandService.js.map +1 -0
  333. package/lib/services/ObjectListService.d.ts +201 -0
  334. package/lib/services/ObjectListService.js +350 -0
  335. package/lib/services/ObjectListService.js.map +1 -0
  336. package/lib/services/OrgInfoService.d.ts +493 -0
  337. package/lib/services/OrgInfoService.js +1142 -0
  338. package/lib/services/OrgInfoService.js.map +1 -0
  339. package/lib/services/PollingService.d.ts +105 -0
  340. package/lib/services/PollingService.js +117 -0
  341. package/lib/services/PollingService.js.map +1 -0
  342. package/lib/services/ProfileRequestService.d.ts +186 -0
  343. package/lib/services/ProfileRequestService.js +555 -0
  344. package/lib/services/ProfileRequestService.js.map +1 -0
  345. package/lib/services/ProfilingDefinitionService.d.ts +575 -0
  346. package/lib/services/ProfilingDefinitionService.js +1029 -0
  347. package/lib/services/ProfilingDefinitionService.js.map +1 -0
  348. package/lib/services/ProfilingExecutionService.d.ts +122 -0
  349. package/lib/services/ProfilingExecutionService.js +320 -0
  350. package/lib/services/ProfilingExecutionService.js.map +1 -0
  351. package/lib/services/ProfilingSummaryService.d.ts +292 -0
  352. package/lib/services/ProfilingSummaryService.js +688 -0
  353. package/lib/services/ProfilingSummaryService.js.map +1 -0
  354. package/lib/services/RecordTypeService.d.ts +129 -0
  355. package/lib/services/RecordTypeService.js +284 -0
  356. package/lib/services/RecordTypeService.js.map +1 -0
  357. package/lib/services/SFDMUService.d.ts +146 -0
  358. package/lib/services/SFDMUService.js +323 -0
  359. package/lib/services/SFDMUService.js.map +1 -0
  360. package/lib/services/TabDetectionService.d.ts +105 -0
  361. package/lib/services/TabDetectionService.js +206 -0
  362. package/lib/services/TabDetectionService.js.map +1 -0
  363. package/lib/services/UnconfigureMode.d.ts +74 -0
  364. package/lib/services/UnconfigureMode.js +378 -0
  365. package/lib/services/UnconfigureMode.js.map +1 -0
  366. package/lib/services/UserConfigurationService.d.ts +158 -0
  367. package/lib/services/UserConfigurationService.js +574 -0
  368. package/lib/services/UserConfigurationService.js.map +1 -0
  369. package/lib/services/UserConfigurationTypes.d.ts +181 -0
  370. package/lib/services/UserConfigurationTypes.js +14 -0
  371. package/lib/services/UserConfigurationTypes.js.map +1 -0
  372. package/lib/services/UserReadinessService.d.ts +347 -0
  373. package/lib/services/UserReadinessService.js +891 -0
  374. package/lib/services/UserReadinessService.js.map +1 -0
  375. package/lib/services/constants.d.ts +54 -0
  376. package/lib/services/constants.js +71 -0
  377. package/lib/services/constants.js.map +1 -0
  378. package/lib/services/namespace-constants.d.ts +1 -0
  379. package/lib/services/namespace-constants.js +11 -0
  380. package/lib/services/namespace-constants.js.map +1 -0
  381. package/lib/services/namespace-filter.d.ts +36 -0
  382. package/lib/services/namespace-filter.js +109 -0
  383. package/lib/services/namespace-filter.js.map +1 -0
  384. package/lib/services/validation.d.ts +47 -0
  385. package/lib/services/validation.js +119 -0
  386. package/lib/services/validation.js.map +1 -0
  387. package/lib/utils/batch-processor.d.ts +13 -0
  388. package/lib/utils/batch-processor.js +39 -0
  389. package/lib/utils/batch-processor.js.map +1 -0
  390. package/lib/utils/formatting/availability-grid.d.ts +81 -0
  391. package/lib/utils/formatting/availability-grid.js +94 -0
  392. package/lib/utils/formatting/availability-grid.js.map +1 -0
  393. package/lib/utils/formatting/business-process-grid.d.ts +51 -0
  394. package/lib/utils/formatting/business-process-grid.js +58 -0
  395. package/lib/utils/formatting/business-process-grid.js.map +1 -0
  396. package/lib/utils/formatting/command-display.d.ts +154 -0
  397. package/lib/utils/formatting/command-display.js +154 -0
  398. package/lib/utils/formatting/command-display.js.map +1 -0
  399. package/lib/utils/formatting/definition-create-display.d.ts +118 -0
  400. package/lib/utils/formatting/definition-create-display.js +230 -0
  401. package/lib/utils/formatting/definition-create-display.js.map +1 -0
  402. package/lib/utils/formatting/empty-states.d.ts +35 -0
  403. package/lib/utils/formatting/empty-states.js +70 -0
  404. package/lib/utils/formatting/empty-states.js.map +1 -0
  405. package/lib/utils/formatting/errors.d.ts +33 -0
  406. package/lib/utils/formatting/errors.js +72 -0
  407. package/lib/utils/formatting/errors.js.map +1 -0
  408. package/lib/utils/formatting/field-types.d.ts +32 -0
  409. package/lib/utils/formatting/field-types.js +88 -0
  410. package/lib/utils/formatting/field-types.js.map +1 -0
  411. package/lib/utils/formatting/index.d.ts +29 -0
  412. package/lib/utils/formatting/index.js +28 -0
  413. package/lib/utils/formatting/index.js.map +1 -0
  414. package/lib/utils/formatting/indicators.d.ts +113 -0
  415. package/lib/utils/formatting/indicators.js +161 -0
  416. package/lib/utils/formatting/indicators.js.map +1 -0
  417. package/lib/utils/formatting/loading-messages.d.ts +37 -0
  418. package/lib/utils/formatting/loading-messages.js +50 -0
  419. package/lib/utils/formatting/loading-messages.js.map +1 -0
  420. package/lib/utils/formatting/namespace-display.d.ts +31 -0
  421. package/lib/utils/formatting/namespace-display.js +64 -0
  422. package/lib/utils/formatting/namespace-display.js.map +1 -0
  423. package/lib/utils/formatting/numbers.d.ts +73 -0
  424. package/lib/utils/formatting/numbers.js +187 -0
  425. package/lib/utils/formatting/numbers.js.map +1 -0
  426. package/lib/utils/formatting/object-describe-display.d.ts +117 -0
  427. package/lib/utils/formatting/object-describe-display.js +447 -0
  428. package/lib/utils/formatting/object-describe-display.js.map +1 -0
  429. package/lib/utils/formatting/object-list-display.d.ts +225 -0
  430. package/lib/utils/formatting/object-list-display.js +718 -0
  431. package/lib/utils/formatting/object-list-display.js.map +1 -0
  432. package/lib/utils/formatting/org-identity.d.ts +15 -0
  433. package/lib/utils/formatting/org-identity.js +28 -0
  434. package/lib/utils/formatting/org-identity.js.map +1 -0
  435. package/lib/utils/formatting/record-age-grid.d.ts +41 -0
  436. package/lib/utils/formatting/record-age-grid.js +56 -0
  437. package/lib/utils/formatting/record-age-grid.js.map +1 -0
  438. package/lib/utils/formatting/sections.d.ts +108 -0
  439. package/lib/utils/formatting/sections.js +150 -0
  440. package/lib/utils/formatting/sections.js.map +1 -0
  441. package/lib/utils/formatting/tables.d.ts +90 -0
  442. package/lib/utils/formatting/tables.js +113 -0
  443. package/lib/utils/formatting/tables.js.map +1 -0
  444. package/lib/utils/formatting/user-details-display.d.ts +101 -0
  445. package/lib/utils/formatting/user-details-display.js +425 -0
  446. package/lib/utils/formatting/user-details-display.js.map +1 -0
  447. package/lib/utils/pagination/keypress-reader.d.ts +20 -0
  448. package/lib/utils/pagination/keypress-reader.js +63 -0
  449. package/lib/utils/pagination/keypress-reader.js.map +1 -0
  450. package/lib/utils/pagination/paginate-output.d.ts +48 -0
  451. package/lib/utils/pagination/paginate-output.js +136 -0
  452. package/lib/utils/pagination/paginate-output.js.map +1 -0
  453. package/messages/compatibility.check.md +71 -0
  454. package/messages/cuneiform.access.md +138 -0
  455. package/messages/definition.create.md +525 -0
  456. package/messages/definition.export.md +84 -0
  457. package/messages/definition.get.md +147 -0
  458. package/messages/definition.import.md +65 -0
  459. package/messages/definition.list.md +264 -0
  460. package/messages/definition.purge.md +330 -0
  461. package/messages/definition.update.md +118 -0
  462. package/messages/mcp.serve.md +66 -0
  463. package/messages/object.describe.md +205 -0
  464. package/messages/object.list.md +463 -0
  465. package/messages/org.details.md +386 -0
  466. package/messages/org.reset.md +71 -0
  467. package/messages/profile.md +243 -0
  468. package/messages/profile.request.cancel.md +143 -0
  469. package/messages/profile.request.delete.md +139 -0
  470. package/messages/profile.request.list.md +89 -0
  471. package/messages/summary.purge.md +218 -0
  472. package/messages/summary.reprofile.md +150 -0
  473. package/messages/summary.stop.md +157 -0
  474. package/messages/user.details.md +501 -0
  475. package/oclif.lock +3267 -2148
  476. package/oclif.manifest.json +2829 -31
  477. package/package.json +104 -18
  478. package/lib/commands/cuneiform/about.d.ts +0 -13
  479. package/lib/commands/cuneiform/about.js +0 -26
  480. package/lib/commands/cuneiform/about.js.map +0 -1
  481. package/lib/commands/hello/world.d.ts +0 -14
  482. package/lib/commands/hello/world.js +0 -27
  483. package/lib/commands/hello/world.js.map +0 -1
  484. package/lib/index.d.ts +0 -2
  485. package/lib/index.js +0 -2
  486. package/lib/index.js.map +0 -1
  487. package/messages/cuneiform.about.md +0 -19
  488. package/messages/hello.world.md +0 -29
@@ -0,0 +1,461 @@
1
+ /*
2
+ * Copyright (c) 2026, PeerNova, Inc. All Rights Reserved.
3
+ * PROPRIETARY AND CONFIDENTIAL. Unauthorized copying, modification,
4
+ * or distribution is strictly prohibited. Use is governed by the
5
+ * Master Subscription Agreement (MSA) between PeerNova, Inc. and the
6
+ * licensee. See LICENSE file in the repo root.
7
+ */
8
+ import { Flags } from '@salesforce/sf-plugins-core';
9
+ import { Messages } from '@salesforce/core';
10
+ import { CuneiformCommand } from '../../../base/cuneiform-command.js';
11
+ import { RecordTypeService } from '../../../services/RecordTypeService.js';
12
+ import { ProfilingDefinitionService } from '../../../services/ProfilingDefinitionService.js';
13
+ import { ProfilingSummaryService } from '../../../services/ProfilingSummaryService.js';
14
+ import { OrgInfoService } from '../../../services/OrgInfoService.js';
15
+ import { ProfilingRestClient } from '../../../adapters/rest/profiling-rest-client.js';
16
+ import { ObjectDescribeService, } from '../../../services/ObjectDescribeService.js';
17
+ import { loadingMessage } from '../../../utils/formatting/index.js';
18
+ import { renderWarningBlock } from '../../../utils/formatting/index.js';
19
+ import { displayObjectResult, displayOrgIdentity } from '../../../utils/formatting/object-describe-display.js';
20
+ Messages.importMessagesDirectoryFromMetaUrl(import.meta.url);
21
+ const messages = Messages.loadMessages('@peernova/cuneiform-sf', 'object.describe');
22
+ /** Valid sort options */
23
+ const SORT_OPTIONS = ['name', 'type', 'label'];
24
+ /** Valid field type filters */
25
+ const FIELD_TYPE_FILTERS = [
26
+ 'text',
27
+ 'picklist',
28
+ 'lookup',
29
+ 'number',
30
+ 'date',
31
+ 'formula',
32
+ 'checkbox',
33
+ 'id',
34
+ 'address',
35
+ ];
36
+ /** Field type mapping for filtering */
37
+ const FIELD_TYPE_MAP = {
38
+ text: ['string', 'textarea', 'url', 'email', 'phone'],
39
+ picklist: ['picklist', 'multipicklist'],
40
+ lookup: ['reference'],
41
+ number: ['double', 'currency', 'percent', 'int'],
42
+ date: ['date', 'datetime', 'time'],
43
+ formula: [], // Special handling - uses isFormula flag
44
+ checkbox: ['boolean'],
45
+ id: ['id'],
46
+ address: ['address'],
47
+ };
48
+ /**
49
+ * Extracts namespace from an API name.
50
+ *
51
+ * @param name - The API name (e.g., 'Name', 'Custom__c', 'pnova__Field__c')
52
+ * @returns The namespace (e.g., 'pnova') or null for standard/unmanaged
53
+ */
54
+ function extractNamespace(name) {
55
+ const parts = name.split('__');
56
+ if (parts.length >= 3) {
57
+ return parts[0];
58
+ }
59
+ return null;
60
+ }
61
+ /**
62
+ * Converts a wildcard pattern to a regex.
63
+ *
64
+ * @param pattern - The pattern with wildcards (e.g., '*__c')
65
+ * @returns A RegExp for matching
66
+ */
67
+ function patternToRegex(pattern) {
68
+ const escaped = pattern.replace(/[.+?^${}()|[\]\\]/g, '\\$&');
69
+ const withWildcards = escaped.replace(/\*/g, '.*');
70
+ return new RegExp(`^${withWildcards}$`, 'i');
71
+ }
72
+ /**
73
+ * Checks if a field matches the type filter.
74
+ *
75
+ * @param field - The field info to check
76
+ * @param filterType - The filter type to match
77
+ * @returns true if the field matches the filter
78
+ */
79
+ function matchesFieldType(field, filterType) {
80
+ if (filterType === 'formula') {
81
+ return field.isFormula;
82
+ }
83
+ return FIELD_TYPE_MAP[filterType].includes(field.type);
84
+ }
85
+ /**
86
+ * Maps a DescribeFieldResult to FieldInfo.
87
+ *
88
+ * @param field - The describe field result
89
+ * @returns The mapped field info
90
+ */
91
+ function mapToFieldInfo(field) {
92
+ return {
93
+ apiName: field.name,
94
+ label: field.label,
95
+ type: field.type,
96
+ length: field.length,
97
+ isCustom: field.custom,
98
+ isFormula: field.calculated,
99
+ isRequired: field.createable && !field.nillable && field.defaultValue === undefined,
100
+ namespace: extractNamespace(field.name),
101
+ referenceTo: field.referenceTo && field.referenceTo.length > 0 ? field.referenceTo : null,
102
+ };
103
+ }
104
+ /**
105
+ * Builds the field list with filtering and sorting.
106
+ *
107
+ * @param fields - The fields to process
108
+ * @param fieldType - Optional type filter
109
+ * @param fieldPattern - Optional name pattern filter
110
+ * @param sort - Sort order
111
+ * @returns Filtered and sorted field list
112
+ */
113
+ function buildFieldList(fields, fieldType, fieldPattern, sort) {
114
+ let result = fields.map((field) => mapToFieldInfo(field));
115
+ // Apply field type filter
116
+ if (fieldType) {
117
+ result = result.filter((field) => matchesFieldType(field, fieldType));
118
+ }
119
+ // Apply pattern filter
120
+ if (fieldPattern) {
121
+ const regex = patternToRegex(fieldPattern);
122
+ result = result.filter((field) => regex.test(field.apiName));
123
+ }
124
+ // Apply sorting
125
+ result.sort((a, b) => {
126
+ switch (sort) {
127
+ case 'type':
128
+ return a.type.localeCompare(b.type) || a.apiName.localeCompare(b.apiName);
129
+ case 'label':
130
+ return a.label.localeCompare(b.label);
131
+ case 'name':
132
+ default:
133
+ return a.apiName.localeCompare(b.apiName);
134
+ }
135
+ });
136
+ return result;
137
+ }
138
+ /**
139
+ * Describes Salesforce objects with comprehensive metadata and field analysis.
140
+ *
141
+ * Use this command to:
142
+ * - Understand object structure before creating profiling definitions
143
+ * - Analyze field inventory by type and namespace
144
+ * - Review record types and their configurations
145
+ * - Identify how many other objects reference this object
146
+ * - Assess record age distribution
147
+ * - Check existing profiling definitions
148
+ *
149
+ * @example
150
+ * ```bash
151
+ * # Describe Account object
152
+ * sf cuneiform object describe --object Account
153
+ *
154
+ * # Describe multiple objects
155
+ * sf cuneiform object describe --object Account,Contact,Opportunity
156
+ *
157
+ * # Include field listing
158
+ * sf cuneiform object describe --object Account --with-fields
159
+ *
160
+ * # Filter to lookup fields, sorted by type
161
+ * sf cuneiform object describe --object Account --with-fields --field-type lookup --sort type
162
+ * ```
163
+ */
164
+ // eslint-disable-next-line sf-plugin/only-extend-SfCommand -- CuneiformCommand extends SfCommand with shared access gate logic
165
+ export default class ObjectDescribe extends CuneiformCommand {
166
+ static summary = messages.getMessage('summary');
167
+ static description = messages.getMessage('description');
168
+ static examples = messages.getMessages('examples');
169
+ // eslint-disable-next-line sf-plugin/spread-base-flags -- CuneiformCommand has no additional flags to spread
170
+ static flags = {
171
+ 'target-org': Flags.requiredOrg({
172
+ summary: messages.getMessage('flags.target-org.summary'),
173
+ char: 'o',
174
+ required: true,
175
+ }),
176
+ 'api-version': Flags.orgApiVersion(),
177
+ object: Flags.string({
178
+ summary: messages.getMessage('flags.object.summary'),
179
+ required: true,
180
+ }),
181
+ 'with-fields': Flags.boolean({
182
+ summary: messages.getMessage('flags.with-fields.summary'),
183
+ aliases: ['show-fields'],
184
+ deprecateAliases: true,
185
+ default: false,
186
+ }),
187
+ 'field-type': Flags.string({
188
+ summary: messages.getMessage('flags.field-type.summary'),
189
+ options: [...FIELD_TYPE_FILTERS],
190
+ }),
191
+ 'field-pattern': Flags.string({
192
+ summary: messages.getMessage('flags.field-pattern.summary'),
193
+ }),
194
+ sort: Flags.string({
195
+ summary: messages.getMessage('flags.sort.summary'),
196
+ options: [...SORT_OPTIONS],
197
+ default: 'name',
198
+ }),
199
+ };
200
+ /**
201
+ * Computes aggregate totals across all described objects.
202
+ */
203
+ static computeTotals(results) {
204
+ let totalRecords = 0;
205
+ let totalFields = 0;
206
+ let totalStandardFields = 0;
207
+ let totalCustomFields = 0;
208
+ let totalFormulaFields = 0;
209
+ let totalLookupFields = 0;
210
+ let totalRecordTypes = 0;
211
+ for (const obj of results) {
212
+ totalFields += obj.fieldSummary.total;
213
+ totalStandardFields += obj.fieldSummary.standard;
214
+ totalCustomFields += obj.fieldSummary.custom;
215
+ totalFormulaFields += obj.fieldSummary.formula;
216
+ totalLookupFields += obj.fieldSummary.lookup;
217
+ totalRecordTypes += obj.recordTypes.filter((rt) => rt.isActive).length;
218
+ if (obj.summary.recordCount !== null && totalRecords !== null) {
219
+ totalRecords += obj.summary.recordCount;
220
+ }
221
+ else {
222
+ totalRecords = null;
223
+ }
224
+ }
225
+ return {
226
+ objectsDescribed: results.length,
227
+ totalFields,
228
+ totalStandardFields,
229
+ totalCustomFields,
230
+ totalFormulaFields,
231
+ totalLookupFields,
232
+ totalRecordTypes,
233
+ totalRecords,
234
+ };
235
+ }
236
+ /**
237
+ * Executes the object describe command.
238
+ *
239
+ * @returns ObjectDescribeCommandResult with object metadata
240
+ */
241
+ async run() {
242
+ const { flags } = await this.parse(ObjectDescribe);
243
+ const { facade, soqlAdapter, restAdapter } = await this.initConnection(flags);
244
+ // Parse object names
245
+ const objectNames = flags.object.split(',').map((name) => name.trim());
246
+ const recordTypeService = new RecordTypeService({ soqlAdapter });
247
+ const profilingDefinitionService = new ProfilingDefinitionService({ soqlAdapter });
248
+ const profilingSummaryService = new ProfilingSummaryService({ soqlAdapter });
249
+ const orgInfoService = new OrgInfoService({ connectionFacade: facade, soqlAdapter });
250
+ const restClient = new ProfilingRestClient(restAdapter);
251
+ const objectDescribeService = new ObjectDescribeService({
252
+ restApiAdapter: restAdapter,
253
+ soqlAdapter,
254
+ recordTypeService,
255
+ profilingDefinitionService,
256
+ profilingSummaryService,
257
+ restClient,
258
+ });
259
+ // Display start message
260
+ const objectListDisplay = objectNames.length > 3 ? `${objectNames.length} objects` : objectNames.join(', ');
261
+ this.log(loadingMessage('Describing', objectListDisplay));
262
+ this.log('');
263
+ // Fetch and display org identity (non-fatal)
264
+ const orgIdentityResult = await orgInfoService.getOrgIdentity();
265
+ if (orgIdentityResult.success) {
266
+ displayOrgIdentity(this.log.bind(this), orgIdentityResult.data, facade.instanceUrl ?? '');
267
+ }
268
+ else {
269
+ this.warn(messages.getMessage('errors.orgIdentityFailed'));
270
+ }
271
+ // Process objects
272
+ const results = [];
273
+ const warnings = [];
274
+ if (objectNames.length === 1) {
275
+ // Single object
276
+ const result = await this.describeAndFormat(objectDescribeService, restAdapter, objectNames[0], flags['with-fields'], flags['field-type'], flags['field-pattern'], flags.sort);
277
+ if (result.success) {
278
+ results.push(result.data);
279
+ displayObjectResult(this.log.bind(this), result.data, 1, 1, flags['with-fields']);
280
+ }
281
+ else {
282
+ this.error(result.message);
283
+ }
284
+ }
285
+ else {
286
+ // Multiple objects - process in parallel
287
+ const describePromises = objectNames.map(async (objectName, index) => {
288
+ const result = await this.describeAndFormat(objectDescribeService, restAdapter, objectName, flags['with-fields'], flags['field-type'], flags['field-pattern'], flags.sort);
289
+ return { objectName, result, index };
290
+ });
291
+ const allResults = await Promise.all(describePromises);
292
+ // Sort by original order and process
293
+ allResults.sort((a, b) => a.index - b.index);
294
+ for (const { objectName, result, index } of allResults) {
295
+ if (result.success) {
296
+ results.push(result.data);
297
+ displayObjectResult(this.log.bind(this), result.data, index + 1, objectNames.length, flags['with-fields']);
298
+ }
299
+ else {
300
+ warnings.push(`${objectName}: ${result.message}`);
301
+ }
302
+ }
303
+ }
304
+ // Display warnings for failed objects
305
+ if (warnings.length > 0) {
306
+ this.log('');
307
+ this.log(renderWarningBlock({
308
+ title: `${warnings.length} of ${objectNames.length} objects could not be described`,
309
+ items: warnings,
310
+ }));
311
+ }
312
+ return { objects: results, totals: ObjectDescribe.computeTotals(results) };
313
+ }
314
+ /**
315
+ * Enriches business processes with per-process record age distributions.
316
+ */
317
+ // eslint-disable-next-line class-methods-use-this
318
+ async enrichBusinessProcesses(service, objectName, bpResult) {
319
+ if (!bpResult.success || bpResult.data.length === 0)
320
+ return [];
321
+ const bpAgePromises = bpResult.data.map((bp) => bp.recordTypeIds.length > 0
322
+ ? service.getRecordAgeDistribution(objectName, bp.recordTypeIds)
323
+ : Promise.resolve(null));
324
+ const bpAgeResults = await Promise.all(bpAgePromises);
325
+ return bpResult.data.map((bp, idx) => {
326
+ const ageResult = bpAgeResults[idx];
327
+ return {
328
+ ...bp,
329
+ recordAgeDistribution: ageResult && ageResult.success ? ageResult.data : undefined,
330
+ };
331
+ });
332
+ }
333
+ /**
334
+ * Describes an object and formats the result.
335
+ */
336
+ // eslint-disable-next-line class-methods-use-this
337
+ async describeAndFormat(service, restAdapter, objectName, showFields, fieldType, fieldPattern, sort) {
338
+ // Run describe and record count in parallel (both independent, always needed)
339
+ const [describeResult, countResult] = await Promise.all([
340
+ service.describeObject(objectName),
341
+ restAdapter.getRecordCount(objectName),
342
+ ]);
343
+ if (!describeResult.success) {
344
+ return { success: false, message: describeResult.message ?? 'Object describe failed' };
345
+ }
346
+ const describe = describeResult.data;
347
+ const recordCount = countResult.success ? countResult.data : null;
348
+ // Build record types (needed before parallel age queries)
349
+ const rawRecordTypes = (describe.recordTypes ?? []).map((rt) => ({
350
+ id: rt.id,
351
+ name: rt.name,
352
+ developerName: rt.developerName,
353
+ isActive: rt.isActive,
354
+ isDefault: rt.isDefault,
355
+ isPersonType: rt.isPersonType ? true : undefined,
356
+ recordAgeDistribution: undefined,
357
+ }));
358
+ // Fetch object-level, per-record-type, and business process age distributions in parallel
359
+ let recordAgeDistribution = null;
360
+ let businessProcesses = [];
361
+ if (describe.isQueryable) {
362
+ // Phase 1: Object + per-RT age queries + business process metadata (all parallel)
363
+ const agePromises = [
364
+ service.getRecordAgeDistribution(objectName),
365
+ ...rawRecordTypes.map((rt) => service.getRecordAgeDistribution(objectName, rt.id)),
366
+ ];
367
+ const bpPromise = service.getBusinessProcesses(objectName, describe.recordTypes ?? []);
368
+ const [ageResults, bpResult] = await Promise.all([Promise.all(agePromises), bpPromise]);
369
+ // First result is object-level
370
+ if (ageResults[0].success) {
371
+ recordAgeDistribution = ageResults[0].data;
372
+ }
373
+ // Remaining results are per-record-type
374
+ for (let i = 0; i < rawRecordTypes.length; i++) {
375
+ if (ageResults[i + 1].success) {
376
+ rawRecordTypes[i].recordAgeDistribution = ageResults[i + 1].data;
377
+ }
378
+ }
379
+ // Phase 2: Per-business-process age queries (need BP metadata first)
380
+ businessProcesses = await this.enrichBusinessProcesses(service, objectName, bpResult);
381
+ }
382
+ const recordTypes = rawRecordTypes;
383
+ // Build field type distribution
384
+ const fieldTypeDistResult = ObjectDescribeService.getFieldTypeDistribution(describe.fields);
385
+ const fieldTypeDistribution = fieldTypeDistResult.success ? fieldTypeDistResult.data : [];
386
+ // Build namespace breakdown
387
+ const namespaceResult = ObjectDescribeService.getNamespaceBreakdown(describe.fields);
388
+ const namespaces = namespaceResult.success ? namespaceResult.data : [];
389
+ // Determine profileable status
390
+ const profileable = describe.isQueryable;
391
+ // Extract namespace from object name
392
+ const objectNamespace = extractNamespace(objectName);
393
+ // Build object summary
394
+ const summary = {
395
+ apiName: describe.objectName,
396
+ label: describe.label,
397
+ labelPlural: describe.labelPlural,
398
+ isCustom: describe.isCustom,
399
+ namespace: objectNamespace,
400
+ recordCount,
401
+ queryable: describe.isQueryable,
402
+ profileable,
403
+ };
404
+ if (describe.isPersonAccountEnabled !== undefined) {
405
+ summary.personAccountEnabled = describe.isPersonAccountEnabled;
406
+ }
407
+ // Build field summary
408
+ const classification = describe.fieldClassification;
409
+ const fieldSummary = {
410
+ total: classification.totalFields,
411
+ standard: classification.totalFields - classification.customFields,
412
+ custom: classification.customFields,
413
+ formula: classification.formulaFields,
414
+ lookup: classification.lookupFields,
415
+ };
416
+ // Build relationships
417
+ const relationships = {
418
+ referencedByCount: describe.relationships?.referencedByCount ?? 0,
419
+ referencedBy: (describe.relationships?.referencedBy ?? []).map((ref) => ({
420
+ objectName: ref.objectName,
421
+ fieldName: ref.fieldName,
422
+ relationshipName: ref.relationshipName,
423
+ })),
424
+ lookupFields: (describe.relationships?.lookupFields ?? []).map((lf) => ({
425
+ fieldName: lf.fieldName,
426
+ targetObject: lf.targetObjects[0] ?? '',
427
+ })),
428
+ };
429
+ // Build profiling status
430
+ const profilingStatus = {
431
+ definitionCount: describe.profilingStatus?.definitionCount ?? 0,
432
+ summaryCount: describe.profilingStatus?.summaryCount ?? 0,
433
+ definitions: (describe.profilingStatus?.definitions ?? []).map((def) => ({
434
+ name: def.name,
435
+ latestSummaryDate: describe.profilingStatus?.lastProfiledDate,
436
+ latestStatus: undefined,
437
+ })),
438
+ };
439
+ // Build fields list if requested
440
+ let fields = null;
441
+ if (showFields) {
442
+ fields = buildFieldList(describe.fields, fieldType, fieldPattern, sort);
443
+ }
444
+ return {
445
+ success: true,
446
+ data: {
447
+ summary,
448
+ recordTypes,
449
+ fieldSummary,
450
+ fieldTypeDistribution,
451
+ namespaces,
452
+ relationships,
453
+ recordAgeDistribution,
454
+ businessProcesses,
455
+ profilingStatus,
456
+ fields,
457
+ },
458
+ };
459
+ }
460
+ }
461
+ //# sourceMappingURL=describe.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"describe.js","sourceRoot":"","sources":["../../../../src/commands/cuneiform/object/describe.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAEH,OAAO,EAAE,KAAK,EAAE,MAAM,6BAA6B,CAAC;AACpD,OAAO,EAAE,QAAQ,EAAE,MAAM,kBAAkB,CAAC;AAC5C,OAAO,EAAE,gBAAgB,EAAE,MAAM,oCAAoC,CAAC;AAGtE,OAAO,EAAE,iBAAiB,EAAuB,MAAM,wCAAwC,CAAC;AAChG,OAAO,EAAE,0BAA0B,EAAE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;gBAC7D,YAAY,EAAE,SAAS;aACxB,CAAC,CAAC;SACJ,CAAC;QAEF,iCAAiC;QACjC,IAAI,MAAM,GAAuB,IAAI,CAAC;QACtC,IAAI,UAAU,EAAE,CAAC;YACf,MAAM,GAAG,cAAc,CAAC,QAAQ,CAAC,MAAM,EAAE,SAAS,EAAE,YAAY,EAAE,IAAI,CAAC,CAAC;QAC1E,CAAC;QAED,OAAO;YACL,OAAO,EAAE,IAAI;YACb,IAAI,EAAE;gBACJ,OAAO;gBACP,WAAW;gBACX,YAAY;gBACZ,qBAAqB;gBACrB,UAAU;gBACV,aAAa;gBACb,qBAAqB;gBACrB,iBAAiB;gBACjB,eAAe;gBACf,MAAM;aACP;SACF,CAAC;IACJ,CAAC"}
@@ -0,0 +1,123 @@
1
+ import { CuneiformCommand } from '../../../base/cuneiform-command.js';
2
+ import { type ObjectListItem, type NamespaceCount } from '../../../services/ObjectListCommandService.js';
3
+ /**
4
+ * Command result type for JSON output.
5
+ */
6
+ export type ObjectListCommandResult = {
7
+ /** Whether the command was successful */
8
+ success: boolean;
9
+ /** Org identity information (if available) */
10
+ orgIdentity?: {
11
+ orgId: string;
12
+ orgName: string;
13
+ orgType: string;
14
+ isSandbox: boolean;
15
+ instanceUrl: string;
16
+ username: string;
17
+ namespacePrefix?: string;
18
+ };
19
+ /** Summary statistics */
20
+ summary: {
21
+ totalObjects: number;
22
+ withRecords: number;
23
+ withoutRecords: number;
24
+ standardObjects: number;
25
+ customObjects: number;
26
+ externalObjects: number;
27
+ withOwner?: number;
28
+ withRecordTypes?: number;
29
+ namespaceCounts: NamespaceCount[];
30
+ };
31
+ /** Applied filters */
32
+ filters: {
33
+ object?: string;
34
+ filter?: string;
35
+ namespace?: string;
36
+ pattern?: string;
37
+ withRecords?: boolean;
38
+ withoutRecords?: boolean;
39
+ withOwner?: boolean;
40
+ withRecordTypes?: boolean;
41
+ withBusinessProcess?: boolean;
42
+ includeFieldCounts?: boolean;
43
+ includeReferences?: boolean;
44
+ withContactPoints?: boolean;
45
+ classification?: 'customer' | 'internal' | 'all';
46
+ minRecords?: number;
47
+ sort?: string;
48
+ limit?: number;
49
+ };
50
+ /** List of objects matching filters */
51
+ objects: ObjectListItem[];
52
+ /**
53
+ * Non-fatal disclosures from the filtering chain (CLI-4214) — carries the
54
+ * record-count reconciliation truncation message.
55
+ */
56
+ warnings?: string[];
57
+ /** Service metadata */
58
+ metadata?: {
59
+ duration?: number;
60
+ };
61
+ /** Error message if failed */
62
+ error?: string;
63
+ };
64
+ /**
65
+ * Lists Salesforce objects with record counts and optional filtering.
66
+ *
67
+ * Use this command to:
68
+ * - Discover objects in an org with record counts
69
+ * - Filter objects by type, namespace, or naming pattern
70
+ * - Find objects with specific characteristics (OwnerId, record types)
71
+ * - Analyze contact point fields for data profiling
72
+ *
73
+ * @example
74
+ * ```bash
75
+ * # List all objects with record counts
76
+ * sf cuneiform object list --target-org myOrg
77
+ *
78
+ * # List custom objects only
79
+ * sf cuneiform object list --target-org myOrg --filter custom
80
+ *
81
+ * # Filter by namespace and include contact points
82
+ * sf cuneiform object list --target-org myOrg --namespace SBQQ --with-contact-points
83
+ * ```
84
+ */
85
+ export default class ObjectList extends CuneiformCommand<ObjectListCommandResult> {
86
+ static readonly summary: string;
87
+ static readonly description: string;
88
+ static readonly examples: string[];
89
+ static readonly flags: {
90
+ 'target-org': import("@oclif/core/interfaces").OptionFlag<import("@salesforce/core").Org, import("@oclif/core/interfaces").CustomOptions>;
91
+ 'api-version': import("@oclif/core/interfaces").OptionFlag<string | undefined, import("@oclif/core/interfaces").CustomOptions>;
92
+ object: import("@oclif/core/interfaces").OptionFlag<string | undefined, import("@oclif/core/interfaces").CustomOptions>;
93
+ filter: import("@oclif/core/interfaces").OptionFlag<"standard" | "custom" | "all", import("@oclif/core/interfaces").CustomOptions>;
94
+ namespace: import("@oclif/core/interfaces").OptionFlag<string | undefined, import("@oclif/core/interfaces").CustomOptions>;
95
+ pattern: import("@oclif/core/interfaces").OptionFlag<string | undefined, import("@oclif/core/interfaces").CustomOptions>;
96
+ 'with-records': import("@oclif/core/interfaces").BooleanFlag<boolean>;
97
+ 'without-records': import("@oclif/core/interfaces").BooleanFlag<boolean>;
98
+ 'with-owner': import("@oclif/core/interfaces").BooleanFlag<boolean>;
99
+ 'with-record-types': import("@oclif/core/interfaces").BooleanFlag<boolean>;
100
+ 'with-business-process': import("@oclif/core/interfaces").BooleanFlag<boolean>;
101
+ 'with-fields': import("@oclif/core/interfaces").BooleanFlag<boolean>;
102
+ 'with-references': import("@oclif/core/interfaces").BooleanFlag<boolean>;
103
+ 'with-contact-points': import("@oclif/core/interfaces").BooleanFlag<boolean>;
104
+ classification: import("@oclif/core/interfaces").OptionFlag<"all" | "customer" | "internal", import("@oclif/core/interfaces").CustomOptions>;
105
+ 'min-records': import("@oclif/core/interfaces").OptionFlag<number, import("@oclif/core/interfaces").CustomOptions>;
106
+ sort: import("@oclif/core/interfaces").OptionFlag<"name" | "recordCount" | "label", import("@oclif/core/interfaces").CustomOptions>;
107
+ limit: import("@oclif/core/interfaces").OptionFlag<number, import("@oclif/core/interfaces").CustomOptions>;
108
+ };
109
+ /**
110
+ * Executes the object list command.
111
+ *
112
+ * @returns ObjectListCommandResult with success status, summary, and object list
113
+ */
114
+ run(): Promise<ObjectListCommandResult>;
115
+ /**
116
+ * Surfaces non-fatal filtering-chain warnings (CLI-4214) via `this.warn` so the
117
+ * record-count reconciliation truncation disclosure is never silently dropped.
118
+ *
119
+ * @param warnings - Warnings carried on the command service result, if any
120
+ */
121
+ private surfaceWarnings;
122
+ private validateObjectFlagExclusions;
123
+ }