@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,606 @@
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 { composeQuery, getField, } from '@jetstreamapp/soql-parser-js';
9
+ /**
10
+ * Fluent query builder for constructing type-safe SOQL queries.
11
+ *
12
+ * This class wraps @jetstreamapp/soql-parser-js to provide a fluent API
13
+ * for building SOQL queries programmatically, replacing ad-hoc string
14
+ * concatenation patterns throughout the codebase.
15
+ *
16
+ * @example Simple query
17
+ * ```typescript
18
+ * const soql = new CuneiformQueryBuilder()
19
+ * .select(['Id', 'Name', 'CreatedDate'])
20
+ * .from('Account')
21
+ * .where('Industry', '=', 'Technology')
22
+ * .orderBy('Name', 'ASC')
23
+ * .limit(50)
24
+ * .toSOQL();
25
+ * ```
26
+ *
27
+ * @example Aggregate query
28
+ * ```typescript
29
+ * const soql = new CuneiformQueryBuilder()
30
+ * .count()
31
+ * .from('Account')
32
+ * .toSOQL();
33
+ * // Result: SELECT COUNT() FROM Account
34
+ * ```
35
+ *
36
+ * @example Complex WHERE with IN clause
37
+ * ```typescript
38
+ * const soql = new CuneiformQueryBuilder()
39
+ * .select(['Id', 'Name'])
40
+ * .from('PermissionSetAssignment')
41
+ * .where('AssigneeId', '=', userId)
42
+ * .andWhereIn('PermissionSet.Name', ['CuneiformUser', 'CuneiformAdmin'])
43
+ * .toSOQL();
44
+ * ```
45
+ */
46
+ export class CuneiformQueryBuilder {
47
+ fields = [];
48
+ sObject = '';
49
+ conditions = [];
50
+ firstCondition;
51
+ orderByFields = [];
52
+ limitValue;
53
+ offsetValue;
54
+ groupByFields = [];
55
+ havingCondition;
56
+ isCountQuery = false;
57
+ /**
58
+ * Returns a new builder instance (for reuse patterns).
59
+ *
60
+ * @returns A new CuneiformQueryBuilder instance
61
+ */
62
+ static create() {
63
+ return new CuneiformQueryBuilder();
64
+ }
65
+ /**
66
+ * Escapes special characters in SOQL string values.
67
+ *
68
+ * @param value - The string value to escape
69
+ * @returns The escaped string
70
+ */
71
+ static escapeString(value) {
72
+ // Escape single quotes by doubling them (SOQL standard)
73
+ // Also escape backslashes
74
+ return value.replace(/\\/g, '\\\\').replace(/'/g, "\\'");
75
+ }
76
+ /**
77
+ * Creates a simple comparison condition.
78
+ */
79
+ static createCondition(field, operator, value) {
80
+ let formattedValue;
81
+ let literalType;
82
+ if (typeof value === 'string') {
83
+ formattedValue = `'${CuneiformQueryBuilder.escapeString(value)}'`;
84
+ literalType = 'STRING';
85
+ }
86
+ else if (typeof value === 'boolean') {
87
+ formattedValue = String(value).toUpperCase();
88
+ literalType = 'BOOLEAN';
89
+ }
90
+ else {
91
+ formattedValue = String(value);
92
+ literalType = 'INTEGER';
93
+ }
94
+ return {
95
+ field,
96
+ operator: operator,
97
+ value: formattedValue,
98
+ literalType,
99
+ };
100
+ }
101
+ /**
102
+ * Creates an IN or NOT IN condition.
103
+ */
104
+ static createInCondition(field, values, isNotIn) {
105
+ const formattedValues = values.map((v) => {
106
+ if (typeof v === 'string') {
107
+ return `'${CuneiformQueryBuilder.escapeString(v)}'`;
108
+ }
109
+ return String(v);
110
+ });
111
+ const literalType = typeof values[0] === 'string' ? 'STRING' : 'INTEGER';
112
+ return {
113
+ field,
114
+ operator: isNotIn ? 'NOT IN' : 'IN',
115
+ value: formattedValues,
116
+ literalType: values.map(() => literalType),
117
+ };
118
+ }
119
+ /**
120
+ * Specifies the fields to select in the query.
121
+ *
122
+ * @param fields - Array of field API names (supports relationship notation like 'Account.Name')
123
+ * @returns this for method chaining
124
+ *
125
+ * @example
126
+ * ```typescript
127
+ * builder.select(['Id', 'Name', 'Account.Name', 'CreatedDate'])
128
+ * ```
129
+ */
130
+ select(fields) {
131
+ this.fields = fields.map((field) => getField(field));
132
+ this.isCountQuery = false;
133
+ return this;
134
+ }
135
+ /**
136
+ * Creates a COUNT() aggregate query.
137
+ *
138
+ * When using count(), do not call select() as COUNT() replaces field selection.
139
+ *
140
+ * @returns this for method chaining
141
+ *
142
+ * @example
143
+ * ```typescript
144
+ * const soql = builder.count().from('Account').toSOQL();
145
+ * // Result: SELECT COUNT() FROM Account
146
+ * ```
147
+ */
148
+ count() {
149
+ this.isCountQuery = true;
150
+ this.fields = [];
151
+ return this;
152
+ }
153
+ /**
154
+ * Specifies the sObject to query.
155
+ *
156
+ * @param objectName - The API name of the Salesforce object
157
+ * @returns this for method chaining
158
+ *
159
+ * @example
160
+ * ```typescript
161
+ * builder.from('Account')
162
+ * builder.from('Profiling_Definition__c')
163
+ * ```
164
+ */
165
+ from(objectName) {
166
+ this.sObject = objectName;
167
+ return this;
168
+ }
169
+ /**
170
+ * Adds a WHERE condition to the query.
171
+ *
172
+ * This is the initial WHERE condition. Use andWhere() or orWhere() to add additional conditions.
173
+ *
174
+ * @param field - The field API name
175
+ * @param operator - The comparison operator
176
+ * @param value - The value to compare against (automatically escaped for strings)
177
+ * @returns this for method chaining
178
+ *
179
+ * @example
180
+ * ```typescript
181
+ * builder.where('Industry', '=', 'Technology')
182
+ * builder.where('Amount', '>', 1000)
183
+ * builder.where('Name', 'LIKE', 'Acme%')
184
+ * ```
185
+ */
186
+ where(field, operator, value) {
187
+ this.firstCondition = CuneiformQueryBuilder.createCondition(field, operator, value);
188
+ this.conditions = [];
189
+ return this;
190
+ }
191
+ /**
192
+ * Adds an AND condition to the WHERE clause.
193
+ *
194
+ * @param field - The field API name
195
+ * @param operator - The comparison operator
196
+ * @param value - The value to compare against
197
+ * @returns this for method chaining
198
+ *
199
+ * @example
200
+ * ```typescript
201
+ * builder
202
+ * .where('Industry', '=', 'Technology')
203
+ * .andWhere('IsActive', '=', true)
204
+ * .andWhere('Revenue', '>', 1000000)
205
+ * ```
206
+ */
207
+ andWhere(field, operator, value) {
208
+ const condition = CuneiformQueryBuilder.createCondition(field, operator, value);
209
+ this.addCondition(condition, 'AND');
210
+ return this;
211
+ }
212
+ /**
213
+ * Adds an OR condition to the WHERE clause.
214
+ *
215
+ * @param field - The field API name
216
+ * @param operator - The comparison operator
217
+ * @param value - The value to compare against
218
+ * @returns this for method chaining
219
+ *
220
+ * @example
221
+ * ```typescript
222
+ * builder
223
+ * .where('Status', '=', 'Active')
224
+ * .orWhere('Status', '=', 'Pending')
225
+ * ```
226
+ */
227
+ orWhere(field, operator, value) {
228
+ const condition = CuneiformQueryBuilder.createCondition(field, operator, value);
229
+ this.addCondition(condition, 'OR');
230
+ return this;
231
+ }
232
+ /**
233
+ * Adds an IN clause condition to the WHERE clause with AND logic.
234
+ *
235
+ * @param field - The field API name
236
+ * @param values - Array of values for the IN clause
237
+ * @returns this for method chaining
238
+ *
239
+ * @example
240
+ * ```typescript
241
+ * builder.andWhereIn('PermissionSet.Name', ['CuneiformUser', 'CuneiformAdmin'])
242
+ * // Generates: ... AND PermissionSet.Name IN ('CuneiformUser', 'CuneiformAdmin')
243
+ * ```
244
+ */
245
+ andWhereIn(field, values) {
246
+ const condition = CuneiformQueryBuilder.createInCondition(field, values, false);
247
+ this.addCondition(condition, 'AND');
248
+ return this;
249
+ }
250
+ /**
251
+ * Adds a NOT IN clause condition to the WHERE clause with AND logic.
252
+ *
253
+ * @param field - The field API name
254
+ * @param values - Array of values for the NOT IN clause
255
+ * @returns this for method chaining
256
+ *
257
+ * @example
258
+ * ```typescript
259
+ * builder.andWhereNotIn('Status', ['Complete', 'Failed', 'Cancelled'])
260
+ * // Generates: ... AND Status NOT IN ('Complete', 'Failed', 'Cancelled')
261
+ * ```
262
+ */
263
+ andWhereNotIn(field, values) {
264
+ const condition = CuneiformQueryBuilder.createInCondition(field, values, true);
265
+ this.addCondition(condition, 'AND');
266
+ return this;
267
+ }
268
+ /**
269
+ * Adds an IN clause condition to the WHERE clause with OR logic.
270
+ *
271
+ * @param field - The field API name
272
+ * @param values - Array of values for the IN clause
273
+ * @returns this for method chaining
274
+ */
275
+ orWhereIn(field, values) {
276
+ const condition = CuneiformQueryBuilder.createInCondition(field, values, false);
277
+ this.addCondition(condition, 'OR');
278
+ return this;
279
+ }
280
+ /**
281
+ * Adds a parenthesized OR-of-LIKE group AND'd to the existing WHERE clause.
282
+ *
283
+ * Behavior:
284
+ * - `likeValues.length === 0` → no-op (returns this unchanged)
285
+ * - `likeValues.length === 1` → emits a single `field LIKE 'value'` AND'd in (equivalent to `andWhere(field, 'LIKE', likeValues[0])`)
286
+ * - `likeValues.length >= 2` → emits `(field LIKE 'a' OR field LIKE 'b' OR ...)` as a parenthesized group AND'd with prior conditions
287
+ *
288
+ * Used for multi-namespace SOQL filters (CLI-3801) where a single field is
289
+ * matched against several LIKE patterns connected by OR. Parentheses are
290
+ * emitted via the soql-parser-js `openParen`/`closeParen` counts on the first
291
+ * and last conditions in the group.
292
+ *
293
+ * @param field - The field API name to match
294
+ * @param likeValues - Array of SOQL LIKE patterns (already-formatted, e.g. 'pnova__%')
295
+ * @returns this for method chaining
296
+ *
297
+ * @example
298
+ * ```typescript
299
+ * builder
300
+ * .where('IsActive__c', '=', true)
301
+ * .andWhereLikeAny('Name', ['pnova__%', 'SBQQ__%'])
302
+ * // Generates: ... WHERE IsActive__c = TRUE AND (Name LIKE 'pnova__%' OR Name LIKE 'SBQQ__%')
303
+ * ```
304
+ */
305
+ andWhereLikeAny(field, likeValues) {
306
+ if (likeValues.length === 0) {
307
+ return this;
308
+ }
309
+ if (likeValues.length === 1) {
310
+ return this.andWhere(field, 'LIKE', likeValues[0]);
311
+ }
312
+ // Build N conditions: first gets openParen=1, last gets closeParen=1,
313
+ // and connectors are AND for the first (joining to existing chain) then OR for the rest.
314
+ for (let i = 0; i < likeValues.length; i++) {
315
+ const condition = CuneiformQueryBuilder.createCondition(field, 'LIKE', likeValues[i]);
316
+ if (i === 0) {
317
+ condition.openParen = 1;
318
+ }
319
+ if (i === likeValues.length - 1) {
320
+ condition.closeParen = 1;
321
+ }
322
+ const connector = i === 0 ? 'AND' : 'OR';
323
+ this.addCondition(condition, connector);
324
+ }
325
+ return this;
326
+ }
327
+ /**
328
+ * Adds a NULL check condition with AND logic.
329
+ *
330
+ * @param field - The field API name
331
+ * @param isNull - true for IS NULL, false for IS NOT NULL
332
+ * @returns this for method chaining
333
+ *
334
+ * @example
335
+ * ```typescript
336
+ * builder.andWhereNull('ParentId', true) // ParentId = null
337
+ * builder.andWhereNull('Email', false) // Email != null
338
+ * ```
339
+ */
340
+ andWhereNull(field, isNull = true) {
341
+ const condition = {
342
+ field,
343
+ operator: isNull ? '=' : '!=',
344
+ value: 'null',
345
+ literalType: 'NULL',
346
+ };
347
+ this.addCondition(condition, 'AND');
348
+ return this;
349
+ }
350
+ /**
351
+ * Adds a DATETIME literal condition with AND logic.
352
+ *
353
+ * DATETIME literals in SOQL are not quoted and follow the format:
354
+ * YYYY-MM-DDTHH:MM:SSZ (e.g., 2024-01-01T00:00:00Z)
355
+ *
356
+ * @param field - The field API name (typically CreatedDate, LastModifiedDate, etc.)
357
+ * @param operator - The comparison operator
358
+ * @param datetimeValue - ISO 8601 datetime string (e.g., '2024-01-01T00:00:00Z')
359
+ * @returns this for method chaining
360
+ *
361
+ * @example
362
+ * ```typescript
363
+ * builder
364
+ * .select(['Id'])
365
+ * .from('Account')
366
+ * .andWhereDatetime('CreatedDate', '>=', '2024-01-01T00:00:00Z')
367
+ * .andWhereDatetime('CreatedDate', '<', '2025-01-01T00:00:00Z')
368
+ * ```
369
+ */
370
+ andWhereDatetime(field, operator, datetimeValue) {
371
+ const condition = {
372
+ field,
373
+ operator: operator,
374
+ value: datetimeValue,
375
+ literalType: 'DATETIME',
376
+ };
377
+ this.addCondition(condition, 'AND');
378
+ return this;
379
+ }
380
+ /**
381
+ * Adds a DATETIME literal as the initial WHERE condition.
382
+ *
383
+ * @param field - The field API name
384
+ * @param operator - The comparison operator
385
+ * @param datetimeValue - ISO 8601 datetime string
386
+ * @returns this for method chaining
387
+ */
388
+ whereDatetime(field, operator, datetimeValue) {
389
+ this.firstCondition = {
390
+ field,
391
+ operator: operator,
392
+ value: datetimeValue,
393
+ literalType: 'DATETIME',
394
+ };
395
+ this.conditions = [];
396
+ return this;
397
+ }
398
+ /**
399
+ * Adds an ORDER BY clause.
400
+ *
401
+ * @param field - The field API name to sort by
402
+ * @param order - Sort direction ('ASC' or 'DESC')
403
+ * @param nullsOrder - Optional null handling ('NULLS FIRST' or 'NULLS LAST')
404
+ * @returns this for method chaining
405
+ *
406
+ * @example
407
+ * ```typescript
408
+ * builder.orderBy('Name', 'ASC')
409
+ * builder.orderBy('CreatedDate', 'DESC', 'NULLS LAST')
410
+ * ```
411
+ */
412
+ orderBy(field, order = 'ASC', nullsOrder) {
413
+ const orderByClause = {
414
+ field,
415
+ order,
416
+ };
417
+ if (nullsOrder) {
418
+ orderByClause.nulls = nullsOrder === 'NULLS FIRST' ? 'FIRST' : 'LAST';
419
+ }
420
+ this.orderByFields.push(orderByClause);
421
+ return this;
422
+ }
423
+ /**
424
+ * Adds a LIMIT clause to the query.
425
+ *
426
+ * @param count - Maximum number of records to return
427
+ * @returns this for method chaining
428
+ *
429
+ * @example
430
+ * ```typescript
431
+ * builder.limit(50)
432
+ * ```
433
+ */
434
+ limit(count) {
435
+ this.limitValue = count;
436
+ return this;
437
+ }
438
+ /**
439
+ * Adds an OFFSET clause for pagination.
440
+ *
441
+ * @param count - Number of records to skip
442
+ * @returns this for method chaining
443
+ *
444
+ * @example
445
+ * ```typescript
446
+ * builder.limit(50).offset(100) // Skip first 100, return next 50
447
+ * ```
448
+ */
449
+ offset(count) {
450
+ if (count !== undefined && count > 0) {
451
+ this.offsetValue = count;
452
+ }
453
+ return this;
454
+ }
455
+ /**
456
+ * Adds a GROUP BY clause for aggregate queries.
457
+ *
458
+ * @param fields - Array of field API names to group by
459
+ * @returns this for method chaining
460
+ *
461
+ * @example
462
+ * ```typescript
463
+ * const soql = builder
464
+ * .select(['SobjectType'])
465
+ * .from('RecordType')
466
+ * .where('IsActive', '=', true)
467
+ * .groupBy(['SobjectType'])
468
+ * .toSOQL();
469
+ * ```
470
+ */
471
+ groupBy(fields) {
472
+ this.groupByFields = fields.map((f) => ({ field: f }));
473
+ return this;
474
+ }
475
+ /**
476
+ * Adds a HAVING clause for filtering grouped results.
477
+ *
478
+ * @param field - The aggregate function or field to filter on
479
+ * @param operator - The comparison operator
480
+ * @param value - The value to compare against
481
+ * @returns this for method chaining
482
+ *
483
+ * @example
484
+ * ```typescript
485
+ * builder
486
+ * .select(['Industry', 'COUNT(Id)'])
487
+ * .from('Account')
488
+ * .groupBy(['Industry'])
489
+ * .having('COUNT(Id)', '>', 5)
490
+ * ```
491
+ */
492
+ having(field, operator, value) {
493
+ this.havingCondition = CuneiformQueryBuilder.createCondition(field, operator, value);
494
+ return this;
495
+ }
496
+ /**
497
+ * Generates the SOQL query string.
498
+ *
499
+ * @returns The complete SOQL query string
500
+ * @throws Error if required components (fields or sObject) are missing
501
+ *
502
+ * @example
503
+ * ```typescript
504
+ * const soql = builder
505
+ * .select(['Id', 'Name'])
506
+ * .from('Account')
507
+ * .where('Industry', '=', 'Technology')
508
+ * .toSOQL();
509
+ * // Returns: "SELECT Id, Name FROM Account WHERE Industry = 'Technology'"
510
+ * ```
511
+ */
512
+ toSOQL() {
513
+ this.validate();
514
+ const query = {
515
+ sObject: this.sObject,
516
+ };
517
+ // Handle COUNT() vs regular SELECT
518
+ if (this.isCountQuery) {
519
+ query.fields = [{ type: 'FieldFunctionExpression', functionName: 'COUNT', parameters: [], isAggregateFn: true }];
520
+ }
521
+ else {
522
+ query.fields = this.fields;
523
+ }
524
+ // Build WHERE clause
525
+ const whereClause = this.buildWhereClause();
526
+ if (whereClause) {
527
+ query.where = whereClause;
528
+ }
529
+ if (this.orderByFields.length > 0) {
530
+ query.orderBy = this.orderByFields;
531
+ }
532
+ if (this.limitValue !== undefined) {
533
+ query.limit = this.limitValue;
534
+ }
535
+ if (this.offsetValue !== undefined) {
536
+ query.offset = this.offsetValue;
537
+ }
538
+ if (this.groupByFields.length > 0) {
539
+ query.groupBy = this.groupByFields;
540
+ }
541
+ if (this.havingCondition) {
542
+ query.having = { left: this.havingCondition };
543
+ }
544
+ return composeQuery(query, { format: false });
545
+ }
546
+ /**
547
+ * Validates the query has required components.
548
+ */
549
+ validate() {
550
+ if (!this.sObject) {
551
+ throw new Error('Query must specify a sObject using from()');
552
+ }
553
+ if (!this.isCountQuery && this.fields.length === 0) {
554
+ throw new Error('Query must specify fields using select() or use count() for aggregate queries');
555
+ }
556
+ }
557
+ /**
558
+ * Adds a condition to the internal list.
559
+ */
560
+ addCondition(condition, operator) {
561
+ // If no first condition, make this the first
562
+ if (!this.firstCondition) {
563
+ this.firstCondition = condition;
564
+ }
565
+ else {
566
+ this.conditions.push({ condition, operator });
567
+ }
568
+ }
569
+ /**
570
+ * Builds the WHERE clause from accumulated conditions.
571
+ *
572
+ * The soql-parser-js library expects WHERE clauses in this format:
573
+ * A AND B AND C becomes:
574
+ * { left: A, operator: AND, right: { left: B, operator: AND, right: { left: C } } }
575
+ *
576
+ * We build from right to left to create the proper nesting structure.
577
+ */
578
+ buildWhereClause() {
579
+ if (!this.firstCondition) {
580
+ return undefined;
581
+ }
582
+ // If there are no additional conditions, just return the first one wrapped
583
+ if (this.conditions.length === 0) {
584
+ return { left: this.firstCondition };
585
+ }
586
+ // Build from right to left: start with the last condition
587
+ // and wrap it with previous conditions
588
+ let result = { left: this.conditions[this.conditions.length - 1].condition };
589
+ // Process conditions in reverse order (excluding the last one we already used)
590
+ for (let i = this.conditions.length - 2; i >= 0; i--) {
591
+ result = {
592
+ left: this.conditions[i].condition,
593
+ operator: this.conditions[i + 1].operator,
594
+ right: result,
595
+ };
596
+ }
597
+ // Finally wrap with the first condition using the first additional condition's operator
598
+ result = {
599
+ left: this.firstCondition,
600
+ operator: this.conditions[0].operator,
601
+ right: result,
602
+ };
603
+ return result;
604
+ }
605
+ }
606
+ //# sourceMappingURL=cuneiform-query-builder.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"cuneiform-query-builder.js","sourceRoot":"","sources":["../../../src/adapters/soql/cuneiform-query-builder.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAEH,OAAO,EACL,YAAY,EACZ,QAAQ,GAUT,MAAM,8BAA8B,CAAC;AA2DtC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAoCG;AACH,MAAM,OAAO,qBAAqB;IACxB,MAAM,GAAgB,EAAE,CAAC;IACzB,OAAO,GAAW,EAAE,CAAC;IACrB,UAAU,GAA4B,EAAE,CAAC;IACzC,cAAc,CAA6B;IAC3C,aAAa,GAAoB,EAAE,CAAC;IACpC,UAAU,CAAqB;IAC/B,WAAW,CAAqB;IAChC,aAAa,GAAoB,EAAE,CAAC;IACpC,eAAe,CAA6B;I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