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

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 (494) hide show
  1. package/LICENSE +81 -30
  2. package/README.md +59 -95
  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/index.d.ts +33 -0
  10. package/lib/adapters/index.js +50 -0
  11. package/lib/adapters/index.js.map +1 -0
  12. package/lib/adapters/lifecycle.d.ts +119 -0
  13. package/lib/adapters/lifecycle.js +94 -0
  14. package/lib/adapters/lifecycle.js.map +1 -0
  15. package/lib/adapters/rest/cache.d.ts +69 -0
  16. package/lib/adapters/rest/cache.js +133 -0
  17. package/lib/adapters/rest/cache.js.map +1 -0
  18. package/lib/adapters/rest/index.d.ts +11 -0
  19. package/lib/adapters/rest/index.js +18 -0
  20. package/lib/adapters/rest/index.js.map +1 -0
  21. package/lib/adapters/rest/profiling-rest-client.d.ts +137 -0
  22. package/lib/adapters/rest/profiling-rest-client.js +115 -0
  23. package/lib/adapters/rest/profiling-rest-client.js.map +1 -0
  24. package/lib/adapters/rest/rest-api-adapter.d.ts +389 -0
  25. package/lib/adapters/rest/rest-api-adapter.js +747 -0
  26. package/lib/adapters/rest/rest-api-adapter.js.map +1 -0
  27. package/lib/adapters/rest/types.d.ts +34 -0
  28. package/lib/adapters/rest/types.js +9 -0
  29. package/lib/adapters/rest/types.js.map +1 -0
  30. package/lib/adapters/retry.d.ts +91 -0
  31. package/lib/adapters/retry.js +215 -0
  32. package/lib/adapters/retry.js.map +1 -0
  33. package/lib/adapters/soql/cuneiform-query-builder.d.ts +391 -0
  34. package/lib/adapters/soql/cuneiform-query-builder.js +559 -0
  35. package/lib/adapters/soql/cuneiform-query-builder.js.map +1 -0
  36. package/lib/adapters/soql/index.d.ts +13 -0
  37. package/lib/adapters/soql/index.js +21 -0
  38. package/lib/adapters/soql/index.js.map +1 -0
  39. package/lib/adapters/soql/soql-query-adapter.d.ts +141 -0
  40. package/lib/adapters/soql/soql-query-adapter.js +259 -0
  41. package/lib/adapters/soql/soql-query-adapter.js.map +1 -0
  42. package/lib/adapters/soql/types.d.ts +37 -0
  43. package/lib/adapters/soql/types.js +19 -0
  44. package/lib/adapters/soql/types.js.map +1 -0
  45. package/lib/adapters/testing/index.d.ts +37 -0
  46. package/lib/adapters/testing/index.js +20 -0
  47. package/lib/adapters/testing/index.js.map +1 -0
  48. package/lib/adapters/testing/mock-connection.d.ts +77 -0
  49. package/lib/adapters/testing/mock-connection.js +207 -0
  50. package/lib/adapters/testing/mock-connection.js.map +1 -0
  51. package/lib/adapters/testing/mock-logger.d.ts +29 -0
  52. package/lib/adapters/testing/mock-logger.js +57 -0
  53. package/lib/adapters/testing/mock-logger.js.map +1 -0
  54. package/lib/adapters/testing/mock-mcp-adapters.d.ts +32 -0
  55. package/lib/adapters/testing/mock-mcp-adapters.js +52 -0
  56. package/lib/adapters/testing/mock-mcp-adapters.js.map +1 -0
  57. package/lib/adapters/testing/mock-oclif-config.d.ts +22 -0
  58. package/lib/adapters/testing/mock-oclif-config.js +90 -0
  59. package/lib/adapters/testing/mock-oclif-config.js.map +1 -0
  60. package/lib/adapters/testing/mock-rest-adapter.d.ts +26 -0
  61. package/lib/adapters/testing/mock-rest-adapter.js +243 -0
  62. package/lib/adapters/testing/mock-rest-adapter.js.map +1 -0
  63. package/lib/adapters/testing/mock-salesforce-connection.d.ts +40 -0
  64. package/lib/adapters/testing/mock-salesforce-connection.js +61 -0
  65. package/lib/adapters/testing/mock-salesforce-connection.js.map +1 -0
  66. package/lib/adapters/testing/mock-soql-adapter.d.ts +30 -0
  67. package/lib/adapters/testing/mock-soql-adapter.js +120 -0
  68. package/lib/adapters/testing/mock-soql-adapter.js.map +1 -0
  69. package/lib/adapters/testing/mock-tooling-adapter.d.ts +24 -0
  70. package/lib/adapters/testing/mock-tooling-adapter.js +163 -0
  71. package/lib/adapters/testing/mock-tooling-adapter.js.map +1 -0
  72. package/lib/adapters/testing/stub-connection.d.ts +93 -0
  73. package/lib/adapters/testing/stub-connection.js +97 -0
  74. package/lib/adapters/testing/stub-connection.js.map +1 -0
  75. package/lib/adapters/testing/stub-rest-adapter.d.ts +52 -0
  76. package/lib/adapters/testing/stub-rest-adapter.js +58 -0
  77. package/lib/adapters/testing/stub-rest-adapter.js.map +1 -0
  78. package/lib/adapters/testing/stub-soql-adapter.d.ts +56 -0
  79. package/lib/adapters/testing/stub-soql-adapter.js +50 -0
  80. package/lib/adapters/testing/stub-soql-adapter.js.map +1 -0
  81. package/lib/adapters/testing/types.d.ts +71 -0
  82. package/lib/adapters/testing/types.js +9 -0
  83. package/lib/adapters/testing/types.js.map +1 -0
  84. package/lib/adapters/tooling/index.d.ts +10 -0
  85. package/lib/adapters/tooling/index.js +17 -0
  86. package/lib/adapters/tooling/index.js.map +1 -0
  87. package/lib/adapters/tooling/tooling-api-adapter.d.ts +157 -0
  88. package/lib/adapters/tooling/tooling-api-adapter.js +339 -0
  89. package/lib/adapters/tooling/tooling-api-adapter.js.map +1 -0
  90. package/lib/adapters/tooling/types.d.ts +81 -0
  91. package/lib/adapters/tooling/types.js +9 -0
  92. package/lib/adapters/tooling/types.js.map +1 -0
  93. package/lib/adapters/types.d.ts +112 -0
  94. package/lib/adapters/types.js +169 -0
  95. package/lib/adapters/types.js.map +1 -0
  96. package/lib/base/cuneiform-command.d.ts +152 -0
  97. package/lib/base/cuneiform-command.js +243 -0
  98. package/lib/base/cuneiform-command.js.map +1 -0
  99. package/lib/commands/cuneiform/compatibility/check.d.ts +43 -0
  100. package/lib/commands/cuneiform/compatibility/check.js +114 -0
  101. package/lib/commands/cuneiform/compatibility/check.js.map +1 -0
  102. package/lib/commands/cuneiform/definition/create.d.ts +119 -0
  103. package/lib/commands/cuneiform/definition/create.js +693 -0
  104. package/lib/commands/cuneiform/definition/create.js.map +1 -0
  105. package/lib/commands/cuneiform/definition/export.d.ts +57 -0
  106. package/lib/commands/cuneiform/definition/export.js +133 -0
  107. package/lib/commands/cuneiform/definition/export.js.map +1 -0
  108. package/lib/commands/cuneiform/definition/get.d.ts +86 -0
  109. package/lib/commands/cuneiform/definition/get.js +270 -0
  110. package/lib/commands/cuneiform/definition/get.js.map +1 -0
  111. package/lib/commands/cuneiform/definition/import.d.ts +54 -0
  112. package/lib/commands/cuneiform/definition/import.js +118 -0
  113. package/lib/commands/cuneiform/definition/import.js.map +1 -0
  114. package/lib/commands/cuneiform/definition/list.d.ts +110 -0
  115. package/lib/commands/cuneiform/definition/list.js +344 -0
  116. package/lib/commands/cuneiform/definition/list.js.map +1 -0
  117. package/lib/commands/cuneiform/definition/purge.d.ts +105 -0
  118. package/lib/commands/cuneiform/definition/purge.js +533 -0
  119. package/lib/commands/cuneiform/definition/purge.js.map +1 -0
  120. package/lib/commands/cuneiform/definition/update.d.ts +58 -0
  121. package/lib/commands/cuneiform/definition/update.js +206 -0
  122. package/lib/commands/cuneiform/definition/update.js.map +1 -0
  123. package/lib/commands/cuneiform/mcp/serve.d.ts +56 -0
  124. package/lib/commands/cuneiform/mcp/serve.js +109 -0
  125. package/lib/commands/cuneiform/mcp/serve.js.map +1 -0
  126. package/lib/commands/cuneiform/object/describe.d.ts +61 -0
  127. package/lib/commands/cuneiform/object/describe.js +461 -0
  128. package/lib/commands/cuneiform/object/describe.js.map +1 -0
  129. package/lib/commands/cuneiform/object/list.d.ts +111 -0
  130. package/lib/commands/cuneiform/object/list.js +239 -0
  131. package/lib/commands/cuneiform/object/list.js.map +1 -0
  132. package/lib/commands/cuneiform/org/details.d.ts +99 -0
  133. package/lib/commands/cuneiform/org/details.js +521 -0
  134. package/lib/commands/cuneiform/org/details.js.map +1 -0
  135. package/lib/commands/cuneiform/org/reset.d.ts +46 -0
  136. package/lib/commands/cuneiform/org/reset.js +135 -0
  137. package/lib/commands/cuneiform/org/reset.js.map +1 -0
  138. package/lib/commands/cuneiform/profile/request/cancel.d.ts +59 -0
  139. package/lib/commands/cuneiform/profile/request/cancel.js +202 -0
  140. package/lib/commands/cuneiform/profile/request/cancel.js.map +1 -0
  141. package/lib/commands/cuneiform/profile/request/delete.d.ts +59 -0
  142. package/lib/commands/cuneiform/profile/request/delete.js +223 -0
  143. package/lib/commands/cuneiform/profile/request/delete.js.map +1 -0
  144. package/lib/commands/cuneiform/profile/request/list.d.ts +35 -0
  145. package/lib/commands/cuneiform/profile/request/list.js +102 -0
  146. package/lib/commands/cuneiform/profile/request/list.js.map +1 -0
  147. package/lib/commands/cuneiform/profile.d.ts +90 -0
  148. package/lib/commands/cuneiform/profile.js +322 -0
  149. package/lib/commands/cuneiform/profile.js.map +1 -0
  150. package/lib/commands/cuneiform/summary/purge.d.ts +77 -0
  151. package/lib/commands/cuneiform/summary/purge.js +429 -0
  152. package/lib/commands/cuneiform/summary/purge.js.map +1 -0
  153. package/lib/commands/cuneiform/summary/reprofile.d.ts +60 -0
  154. package/lib/commands/cuneiform/summary/reprofile.js +236 -0
  155. package/lib/commands/cuneiform/summary/reprofile.js.map +1 -0
  156. package/lib/commands/cuneiform/summary/stop.d.ts +59 -0
  157. package/lib/commands/cuneiform/summary/stop.js +234 -0
  158. package/lib/commands/cuneiform/summary/stop.js.map +1 -0
  159. package/lib/commands/cuneiform/user/details.d.ts +73 -0
  160. package/lib/commands/cuneiform/user/details.js +391 -0
  161. package/lib/commands/cuneiform/user/details.js.map +1 -0
  162. package/lib/constants/index.d.ts +8 -0
  163. package/lib/constants/index.js +16 -0
  164. package/lib/constants/index.js.map +1 -0
  165. package/lib/constants/namespace-constants.d.ts +91 -0
  166. package/lib/constants/namespace-constants.js +211 -0
  167. package/lib/constants/namespace-constants.js.map +1 -0
  168. package/lib/debug/command-debug-proxy.d.ts +101 -0
  169. package/lib/debug/command-debug-proxy.js +171 -0
  170. package/lib/debug/command-debug-proxy.js.map +1 -0
  171. package/lib/debug/debug-logger.d.ts +85 -0
  172. package/lib/debug/debug-logger.js +133 -0
  173. package/lib/debug/debug-logger.js.map +1 -0
  174. package/lib/debug/index.d.ts +12 -0
  175. package/lib/debug/index.js +20 -0
  176. package/lib/debug/index.js.map +1 -0
  177. package/lib/debug/service-debug-proxy.d.ts +30 -0
  178. package/lib/debug/service-debug-proxy.js +102 -0
  179. package/lib/debug/service-debug-proxy.js.map +1 -0
  180. package/lib/hooks/prerun.d.ts +25 -0
  181. package/lib/hooks/prerun.js +47 -0
  182. package/lib/hooks/prerun.js.map +1 -0
  183. package/lib/mcp/config/mcp-config.d.ts +55 -0
  184. package/lib/mcp/config/mcp-config.js +51 -0
  185. package/lib/mcp/config/mcp-config.js.map +1 -0
  186. package/lib/mcp/config/pagination.d.ts +96 -0
  187. package/lib/mcp/config/pagination.js +108 -0
  188. package/lib/mcp/config/pagination.js.map +1 -0
  189. package/lib/mcp/config/system-prompts.d.ts +18 -0
  190. package/lib/mcp/config/system-prompts.js +92 -0
  191. package/lib/mcp/config/system-prompts.js.map +1 -0
  192. package/lib/mcp/errors.d.ts +23 -0
  193. package/lib/mcp/errors.js +27 -0
  194. package/lib/mcp/errors.js.map +1 -0
  195. package/lib/mcp/schemas/input-schemas.d.ts +327 -0
  196. package/lib/mcp/schemas/input-schemas.js +302 -0
  197. package/lib/mcp/schemas/input-schemas.js.map +1 -0
  198. package/lib/mcp/server.d.ts +40 -0
  199. package/lib/mcp/server.js +316 -0
  200. package/lib/mcp/server.js.map +1 -0
  201. package/lib/mcp/tools/contactpoint-tools.d.ts +14 -0
  202. package/lib/mcp/tools/contactpoint-tools.js +34 -0
  203. package/lib/mcp/tools/contactpoint-tools.js.map +1 -0
  204. package/lib/mcp/tools/definition-io-tools.d.ts +19 -0
  205. package/lib/mcp/tools/definition-io-tools.js +152 -0
  206. package/lib/mcp/tools/definition-io-tools.js.map +1 -0
  207. package/lib/mcp/tools/definition-tools.d.ts +51 -0
  208. package/lib/mcp/tools/definition-tools.js +199 -0
  209. package/lib/mcp/tools/definition-tools.js.map +1 -0
  210. package/lib/mcp/tools/index.d.ts +37 -0
  211. package/lib/mcp/tools/index.js +88 -0
  212. package/lib/mcp/tools/index.js.map +1 -0
  213. package/lib/mcp/tools/object-tools.d.ts +22 -0
  214. package/lib/mcp/tools/object-tools.js +306 -0
  215. package/lib/mcp/tools/object-tools.js.map +1 -0
  216. package/lib/mcp/tools/org-tools.d.ts +14 -0
  217. package/lib/mcp/tools/org-tools.js +177 -0
  218. package/lib/mcp/tools/org-tools.js.map +1 -0
  219. package/lib/mcp/tools/profile-tools.d.ts +59 -0
  220. package/lib/mcp/tools/profile-tools.js +213 -0
  221. package/lib/mcp/tools/profile-tools.js.map +1 -0
  222. package/lib/mcp/tools/summary-tools.d.ts +14 -0
  223. package/lib/mcp/tools/summary-tools.js +38 -0
  224. package/lib/mcp/tools/summary-tools.js.map +1 -0
  225. package/lib/mcp/tools/tool-factory.d.ts +63 -0
  226. package/lib/mcp/tools/tool-factory.js +146 -0
  227. package/lib/mcp/tools/tool-factory.js.map +1 -0
  228. package/lib/mcp/tools/user-tools.d.ts +25 -0
  229. package/lib/mcp/tools/user-tools.js +167 -0
  230. package/lib/mcp/tools/user-tools.js.map +1 -0
  231. package/lib/models/date-literal.d.ts +211 -0
  232. package/lib/models/date-literal.js +615 -0
  233. package/lib/models/date-literal.js.map +1 -0
  234. package/lib/models/object-describe-types.d.ts +173 -0
  235. package/lib/models/object-describe-types.js +9 -0
  236. package/lib/models/object-describe-types.js.map +1 -0
  237. package/lib/models/profile-request-types.d.ts +118 -0
  238. package/lib/models/profile-request-types.js +23 -0
  239. package/lib/models/profile-request-types.js.map +1 -0
  240. package/lib/models/profiling-execution-types.d.ts +154 -0
  241. package/lib/models/profiling-execution-types.js +14 -0
  242. package/lib/models/profiling-execution-types.js.map +1 -0
  243. package/lib/models/service-result.d.ts +114 -0
  244. package/lib/models/service-result.js +81 -0
  245. package/lib/models/service-result.js.map +1 -0
  246. package/lib/models/sfdmu-types.d.ts +53 -0
  247. package/lib/models/sfdmu-types.js +23 -0
  248. package/lib/models/sfdmu-types.js.map +1 -0
  249. package/lib/models/status-types.d.ts +38 -0
  250. package/lib/models/status-types.js +12 -0
  251. package/lib/models/status-types.js.map +1 -0
  252. package/lib/models/summary-bulk-types.d.ts +61 -0
  253. package/lib/models/summary-bulk-types.js +23 -0
  254. package/lib/models/summary-bulk-types.js.map +1 -0
  255. package/lib/models/user-details-types.d.ts +163 -0
  256. package/lib/models/user-details-types.js +9 -0
  257. package/lib/models/user-details-types.js.map +1 -0
  258. package/lib/models/year-range.d.ts +78 -0
  259. package/lib/models/year-range.js +153 -0
  260. package/lib/models/year-range.js.map +1 -0
  261. package/lib/operations/CompatibilityCheckOperation.d.ts +62 -0
  262. package/lib/operations/CompatibilityCheckOperation.js +102 -0
  263. package/lib/operations/CompatibilityCheckOperation.js.map +1 -0
  264. package/lib/operations/DefinitionCreateOperation.d.ts +411 -0
  265. package/lib/operations/DefinitionCreateOperation.js +1121 -0
  266. package/lib/operations/DefinitionCreateOperation.js.map +1 -0
  267. package/lib/operations/DefinitionExportOperation.d.ts +155 -0
  268. package/lib/operations/DefinitionExportOperation.js +281 -0
  269. package/lib/operations/DefinitionExportOperation.js.map +1 -0
  270. package/lib/operations/DefinitionImportOperation.d.ts +144 -0
  271. package/lib/operations/DefinitionImportOperation.js +357 -0
  272. package/lib/operations/DefinitionImportOperation.js.map +1 -0
  273. package/lib/operations/DefinitionListOperation.d.ts +66 -0
  274. package/lib/operations/DefinitionListOperation.js +108 -0
  275. package/lib/operations/DefinitionListOperation.js.map +1 -0
  276. package/lib/operations/DefinitionPurgeOperation.d.ts +199 -0
  277. package/lib/operations/DefinitionPurgeOperation.js +465 -0
  278. package/lib/operations/DefinitionPurgeOperation.js.map +1 -0
  279. package/lib/operations/DefinitionUpdateOperation.d.ts +78 -0
  280. package/lib/operations/DefinitionUpdateOperation.js +142 -0
  281. package/lib/operations/DefinitionUpdateOperation.js.map +1 -0
  282. package/lib/operations/OrgDetailsOperation.d.ts +253 -0
  283. package/lib/operations/OrgDetailsOperation.js +456 -0
  284. package/lib/operations/OrgDetailsOperation.js.map +1 -0
  285. package/lib/operations/OrgResetOperation.d.ts +114 -0
  286. package/lib/operations/OrgResetOperation.js +209 -0
  287. package/lib/operations/OrgResetOperation.js.map +1 -0
  288. package/lib/operations/ProfileOperation.d.ts +187 -0
  289. package/lib/operations/ProfileOperation.js +373 -0
  290. package/lib/operations/ProfileOperation.js.map +1 -0
  291. package/lib/operations/ProfileRequestCancelOperation.d.ts +59 -0
  292. package/lib/operations/ProfileRequestCancelOperation.js +137 -0
  293. package/lib/operations/ProfileRequestCancelOperation.js.map +1 -0
  294. package/lib/operations/ProfileRequestDeleteOperation.d.ts +64 -0
  295. package/lib/operations/ProfileRequestDeleteOperation.js +134 -0
  296. package/lib/operations/ProfileRequestDeleteOperation.js.map +1 -0
  297. package/lib/operations/ProfileRequestListOperation.d.ts +39 -0
  298. package/lib/operations/ProfileRequestListOperation.js +61 -0
  299. package/lib/operations/ProfileRequestListOperation.js.map +1 -0
  300. package/lib/operations/SummaryPurgeOperation.d.ts +134 -0
  301. package/lib/operations/SummaryPurgeOperation.js +257 -0
  302. package/lib/operations/SummaryPurgeOperation.js.map +1 -0
  303. package/lib/operations/SummaryReprofileOperation.d.ts +88 -0
  304. package/lib/operations/SummaryReprofileOperation.js +174 -0
  305. package/lib/operations/SummaryReprofileOperation.js.map +1 -0
  306. package/lib/operations/SummaryStopOperation.d.ts +87 -0
  307. package/lib/operations/SummaryStopOperation.js +175 -0
  308. package/lib/operations/SummaryStopOperation.js.map +1 -0
  309. package/lib/services/BulkExecutionService.d.ts +120 -0
  310. package/lib/services/BulkExecutionService.js +535 -0
  311. package/lib/services/BulkExecutionService.js.map +1 -0
  312. package/lib/services/CompatibilityService.d.ts +81 -0
  313. package/lib/services/CompatibilityService.js +118 -0
  314. package/lib/services/CompatibilityService.js.map +1 -0
  315. package/lib/services/ConfigureMode.d.ts +85 -0
  316. package/lib/services/ConfigureMode.js +390 -0
  317. package/lib/services/ConfigureMode.js.map +1 -0
  318. package/lib/services/ContactPointService.d.ts +111 -0
  319. package/lib/services/ContactPointService.js +286 -0
  320. package/lib/services/ContactPointService.js.map +1 -0
  321. package/lib/services/DataAvailabilityService.d.ts +81 -0
  322. package/lib/services/DataAvailabilityService.js +128 -0
  323. package/lib/services/DataAvailabilityService.js.map +1 -0
  324. package/lib/services/DefinitionFieldGenerationService.d.ts +309 -0
  325. package/lib/services/DefinitionFieldGenerationService.js +795 -0
  326. package/lib/services/DefinitionFieldGenerationService.js.map +1 -0
  327. package/lib/services/DefinitionQueryBuilder.d.ts +59 -0
  328. package/lib/services/DefinitionQueryBuilder.js +234 -0
  329. package/lib/services/DefinitionQueryBuilder.js.map +1 -0
  330. package/lib/services/ObjectDescribeService.d.ts +436 -0
  331. package/lib/services/ObjectDescribeService.js +869 -0
  332. package/lib/services/ObjectDescribeService.js.map +1 -0
  333. package/lib/services/ObjectFilteringService.d.ts +400 -0
  334. package/lib/services/ObjectFilteringService.js +878 -0
  335. package/lib/services/ObjectFilteringService.js.map +1 -0
  336. package/lib/services/ObjectListCommandService.d.ts +429 -0
  337. package/lib/services/ObjectListCommandService.js +873 -0
  338. package/lib/services/ObjectListCommandService.js.map +1 -0
  339. package/lib/services/ObjectListService.d.ts +201 -0
  340. package/lib/services/ObjectListService.js +345 -0
  341. package/lib/services/ObjectListService.js.map +1 -0
  342. package/lib/services/OrgInfoService.d.ts +485 -0
  343. package/lib/services/OrgInfoService.js +1122 -0
  344. package/lib/services/OrgInfoService.js.map +1 -0
  345. package/lib/services/PollingService.d.ts +105 -0
  346. package/lib/services/PollingService.js +117 -0
  347. package/lib/services/PollingService.js.map +1 -0
  348. package/lib/services/ProfileRequestService.d.ts +186 -0
  349. package/lib/services/ProfileRequestService.js +555 -0
  350. package/lib/services/ProfileRequestService.js.map +1 -0
  351. package/lib/services/ProfilingDefinitionService.d.ts +535 -0
  352. package/lib/services/ProfilingDefinitionService.js +981 -0
  353. package/lib/services/ProfilingDefinitionService.js.map +1 -0
  354. package/lib/services/ProfilingExecutionService.d.ts +122 -0
  355. package/lib/services/ProfilingExecutionService.js +320 -0
  356. package/lib/services/ProfilingExecutionService.js.map +1 -0
  357. package/lib/services/ProfilingSummaryService.d.ts +292 -0
  358. package/lib/services/ProfilingSummaryService.js +685 -0
  359. package/lib/services/ProfilingSummaryService.js.map +1 -0
  360. package/lib/services/RecordTypeService.d.ts +129 -0
  361. package/lib/services/RecordTypeService.js +284 -0
  362. package/lib/services/RecordTypeService.js.map +1 -0
  363. package/lib/services/SFDMUService.d.ts +133 -0
  364. package/lib/services/SFDMUService.js +295 -0
  365. package/lib/services/SFDMUService.js.map +1 -0
  366. package/lib/services/TabDetectionService.d.ts +105 -0
  367. package/lib/services/TabDetectionService.js +206 -0
  368. package/lib/services/TabDetectionService.js.map +1 -0
  369. package/lib/services/UnconfigureMode.d.ts +74 -0
  370. package/lib/services/UnconfigureMode.js +378 -0
  371. package/lib/services/UnconfigureMode.js.map +1 -0
  372. package/lib/services/UserConfigurationService.d.ts +155 -0
  373. package/lib/services/UserConfigurationService.js +573 -0
  374. package/lib/services/UserConfigurationService.js.map +1 -0
  375. package/lib/services/UserConfigurationTypes.d.ts +181 -0
  376. package/lib/services/UserConfigurationTypes.js +14 -0
  377. package/lib/services/UserConfigurationTypes.js.map +1 -0
  378. package/lib/services/UserReadinessService.d.ts +330 -0
  379. package/lib/services/UserReadinessService.js +831 -0
  380. package/lib/services/UserReadinessService.js.map +1 -0
  381. package/lib/services/constants.d.ts +53 -0
  382. package/lib/services/constants.js +71 -0
  383. package/lib/services/constants.js.map +1 -0
  384. package/lib/services/namespace-constants.d.ts +1 -0
  385. package/lib/services/namespace-constants.js +11 -0
  386. package/lib/services/namespace-constants.js.map +1 -0
  387. package/lib/services/validation.d.ts +47 -0
  388. package/lib/services/validation.js +119 -0
  389. package/lib/services/validation.js.map +1 -0
  390. package/lib/utils/batch-processor.d.ts +13 -0
  391. package/lib/utils/batch-processor.js +39 -0
  392. package/lib/utils/batch-processor.js.map +1 -0
  393. package/lib/utils/formatting/availability-grid.d.ts +81 -0
  394. package/lib/utils/formatting/availability-grid.js +94 -0
  395. package/lib/utils/formatting/availability-grid.js.map +1 -0
  396. package/lib/utils/formatting/business-process-grid.d.ts +51 -0
  397. package/lib/utils/formatting/business-process-grid.js +58 -0
  398. package/lib/utils/formatting/business-process-grid.js.map +1 -0
  399. package/lib/utils/formatting/command-display.d.ts +154 -0
  400. package/lib/utils/formatting/command-display.js +154 -0
  401. package/lib/utils/formatting/command-display.js.map +1 -0
  402. package/lib/utils/formatting/definition-create-display.d.ts +118 -0
  403. package/lib/utils/formatting/definition-create-display.js +231 -0
  404. package/lib/utils/formatting/definition-create-display.js.map +1 -0
  405. package/lib/utils/formatting/empty-states.d.ts +35 -0
  406. package/lib/utils/formatting/empty-states.js +70 -0
  407. package/lib/utils/formatting/empty-states.js.map +1 -0
  408. package/lib/utils/formatting/errors.d.ts +33 -0
  409. package/lib/utils/formatting/errors.js +72 -0
  410. package/lib/utils/formatting/errors.js.map +1 -0
  411. package/lib/utils/formatting/field-types.d.ts +32 -0
  412. package/lib/utils/formatting/field-types.js +88 -0
  413. package/lib/utils/formatting/field-types.js.map +1 -0
  414. package/lib/utils/formatting/index.d.ts +29 -0
  415. package/lib/utils/formatting/index.js +28 -0
  416. package/lib/utils/formatting/index.js.map +1 -0
  417. package/lib/utils/formatting/indicators.d.ts +113 -0
  418. package/lib/utils/formatting/indicators.js +161 -0
  419. package/lib/utils/formatting/indicators.js.map +1 -0
  420. package/lib/utils/formatting/loading-messages.d.ts +37 -0
  421. package/lib/utils/formatting/loading-messages.js +50 -0
  422. package/lib/utils/formatting/loading-messages.js.map +1 -0
  423. package/lib/utils/formatting/namespace-display.d.ts +31 -0
  424. package/lib/utils/formatting/namespace-display.js +64 -0
  425. package/lib/utils/formatting/namespace-display.js.map +1 -0
  426. package/lib/utils/formatting/numbers.d.ts +73 -0
  427. package/lib/utils/formatting/numbers.js +187 -0
  428. package/lib/utils/formatting/numbers.js.map +1 -0
  429. package/lib/utils/formatting/object-describe-display.d.ts +114 -0
  430. package/lib/utils/formatting/object-describe-display.js +440 -0
  431. package/lib/utils/formatting/object-describe-display.js.map +1 -0
  432. package/lib/utils/formatting/object-list-display.d.ts +213 -0
  433. package/lib/utils/formatting/object-list-display.js +672 -0
  434. package/lib/utils/formatting/object-list-display.js.map +1 -0
  435. package/lib/utils/formatting/org-identity.d.ts +15 -0
  436. package/lib/utils/formatting/org-identity.js +28 -0
  437. package/lib/utils/formatting/org-identity.js.map +1 -0
  438. package/lib/utils/formatting/record-age-grid.d.ts +41 -0
  439. package/lib/utils/formatting/record-age-grid.js +56 -0
  440. package/lib/utils/formatting/record-age-grid.js.map +1 -0
  441. package/lib/utils/formatting/sections.d.ts +108 -0
  442. package/lib/utils/formatting/sections.js +150 -0
  443. package/lib/utils/formatting/sections.js.map +1 -0
  444. package/lib/utils/formatting/tables.d.ts +90 -0
  445. package/lib/utils/formatting/tables.js +113 -0
  446. package/lib/utils/formatting/tables.js.map +1 -0
  447. package/lib/utils/formatting/user-details-display.d.ts +101 -0
  448. package/lib/utils/formatting/user-details-display.js +425 -0
  449. package/lib/utils/formatting/user-details-display.js.map +1 -0
  450. package/lib/utils/pagination/index.d.ts +11 -0
  451. package/lib/utils/pagination/index.js +18 -0
  452. package/lib/utils/pagination/index.js.map +1 -0
  453. package/lib/utils/pagination/keypress-reader.d.ts +20 -0
  454. package/lib/utils/pagination/keypress-reader.js +63 -0
  455. package/lib/utils/pagination/keypress-reader.js.map +1 -0
  456. package/lib/utils/pagination/paginate-output.d.ts +48 -0
  457. package/lib/utils/pagination/paginate-output.js +136 -0
  458. package/lib/utils/pagination/paginate-output.js.map +1 -0
  459. package/messages/compatibility.check.md +71 -0
  460. package/messages/cuneiform.access.md +138 -0
  461. package/messages/definition.create.md +511 -0
  462. package/messages/definition.export.md +84 -0
  463. package/messages/definition.get.md +147 -0
  464. package/messages/definition.import.md +65 -0
  465. package/messages/definition.list.md +264 -0
  466. package/messages/definition.purge.md +318 -0
  467. package/messages/definition.update.md +118 -0
  468. package/messages/mcp.serve.md +66 -0
  469. package/messages/object.describe.md +201 -0
  470. package/messages/object.list.md +443 -0
  471. package/messages/org.details.md +386 -0
  472. package/messages/org.reset.md +71 -0
  473. package/messages/profile.md +231 -0
  474. package/messages/profile.request.cancel.md +143 -0
  475. package/messages/profile.request.delete.md +139 -0
  476. package/messages/profile.request.list.md +89 -0
  477. package/messages/summary.purge.md +218 -0
  478. package/messages/summary.reprofile.md +150 -0
  479. package/messages/summary.stop.md +157 -0
  480. package/messages/user.details.md +501 -0
  481. package/oclif.lock +2887 -2149
  482. package/oclif.manifest.json +2813 -31
  483. package/package.json +94 -19
  484. package/lib/commands/cuneiform/about.d.ts +0 -13
  485. package/lib/commands/cuneiform/about.js +0 -26
  486. package/lib/commands/cuneiform/about.js.map +0 -1
  487. package/lib/commands/hello/world.d.ts +0 -14
  488. package/lib/commands/hello/world.js +0 -27
  489. package/lib/commands/hello/world.js.map +0 -1
  490. package/lib/index.d.ts +0 -2
  491. package/lib/index.js +0 -2
  492. package/lib/index.js.map +0 -1
  493. package/messages/cuneiform.about.md +0 -19
  494. 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);
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);
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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iB,EAAE,QAAQ,CAAC,eAAe,EAAE,gBAAgB;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,111 @@
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
+ /** Service metadata */
53
+ metadata?: {
54
+ duration?: number;
55
+ };
56
+ /** Error message if failed */
57
+ error?: string;
58
+ };
59
+ /**
60
+ * Lists Salesforce objects with record counts and optional filtering.
61
+ *
62
+ * Use this command to:
63
+ * - Discover objects in an org with record counts
64
+ * - Filter objects by type, namespace, or naming pattern
65
+ * - Find objects with specific characteristics (OwnerId, record types)
66
+ * - Analyze contact point fields for data profiling
67
+ *
68
+ * @example
69
+ * ```bash
70
+ * # List all objects with record counts
71
+ * sf cuneiform object list --target-org myOrg
72
+ *
73
+ * # List custom objects only
74
+ * sf cuneiform object list --target-org myOrg --filter custom
75
+ *
76
+ * # Filter by namespace and include contact points
77
+ * sf cuneiform object list --target-org myOrg --namespace SBQQ --with-contact-points
78
+ * ```
79
+ */
80
+ export default class ObjectList extends CuneiformCommand<ObjectListCommandResult> {
81
+ static readonly summary: string;
82
+ static readonly description: string;
83
+ static readonly examples: string[];
84
+ static readonly flags: {
85
+ 'target-org': import("@oclif/core/interfaces").OptionFlag<import("@salesforce/core").Org, import("@oclif/core/interfaces").CustomOptions>;
86
+ 'api-version': import("@oclif/core/interfaces").OptionFlag<string | undefined, import("@oclif/core/interfaces").CustomOptions>;
87
+ object: import("@oclif/core/interfaces").OptionFlag<string | undefined, import("@oclif/core/interfaces").CustomOptions>;
88
+ filter: import("@oclif/core/interfaces").OptionFlag<"standard" | "custom" | "all", import("@oclif/core/interfaces").CustomOptions>;
89
+ namespace: import("@oclif/core/interfaces").OptionFlag<string | undefined, import("@oclif/core/interfaces").CustomOptions>;
90
+ pattern: import("@oclif/core/interfaces").OptionFlag<string | undefined, import("@oclif/core/interfaces").CustomOptions>;
91
+ 'with-records': import("@oclif/core/interfaces").BooleanFlag<boolean>;
92
+ 'without-records': import("@oclif/core/interfaces").BooleanFlag<boolean>;
93
+ 'with-owner': import("@oclif/core/interfaces").BooleanFlag<boolean>;
94
+ 'with-record-types': import("@oclif/core/interfaces").BooleanFlag<boolean>;
95
+ 'with-business-process': import("@oclif/core/interfaces").BooleanFlag<boolean>;
96
+ 'with-fields': import("@oclif/core/interfaces").BooleanFlag<boolean>;
97
+ 'with-references': import("@oclif/core/interfaces").BooleanFlag<boolean>;
98
+ 'with-contact-points': import("@oclif/core/interfaces").BooleanFlag<boolean>;
99
+ classification: import("@oclif/core/interfaces").OptionFlag<"all" | "customer" | "internal", import("@oclif/core/interfaces").CustomOptions>;
100
+ 'min-records': import("@oclif/core/interfaces").OptionFlag<number, import("@oclif/core/interfaces").CustomOptions>;
101
+ sort: import("@oclif/core/interfaces").OptionFlag<"name" | "recordCount" | "label", import("@oclif/core/interfaces").CustomOptions>;
102
+ limit: import("@oclif/core/interfaces").OptionFlag<number, import("@oclif/core/interfaces").CustomOptions>;
103
+ };
104
+ /**
105
+ * Executes the object list command.
106
+ *
107
+ * @returns ObjectListCommandResult with success status, summary, and object list
108
+ */
109
+ run(): Promise<ObjectListCommandResult>;
110
+ private validateObjectFlagExclusions;
111
+ }