@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.
- package/LICENSE +81 -30
- package/README.md +59 -95
- package/lib/adapters/connection-facade.d.ts +458 -0
- package/lib/adapters/connection-facade.js +379 -0
- package/lib/adapters/connection-facade.js.map +1 -0
- package/lib/adapters/errors.d.ts +547 -0
- package/lib/adapters/errors.js +937 -0
- package/lib/adapters/errors.js.map +1 -0
- package/lib/adapters/index.d.ts +33 -0
- package/lib/adapters/index.js +50 -0
- package/lib/adapters/index.js.map +1 -0
- package/lib/adapters/lifecycle.d.ts +119 -0
- package/lib/adapters/lifecycle.js +94 -0
- package/lib/adapters/lifecycle.js.map +1 -0
- package/lib/adapters/rest/cache.d.ts +69 -0
- package/lib/adapters/rest/cache.js +133 -0
- package/lib/adapters/rest/cache.js.map +1 -0
- package/lib/adapters/rest/index.d.ts +11 -0
- package/lib/adapters/rest/index.js +18 -0
- package/lib/adapters/rest/index.js.map +1 -0
- package/lib/adapters/rest/profiling-rest-client.d.ts +137 -0
- package/lib/adapters/rest/profiling-rest-client.js +115 -0
- package/lib/adapters/rest/profiling-rest-client.js.map +1 -0
- package/lib/adapters/rest/rest-api-adapter.d.ts +389 -0
- package/lib/adapters/rest/rest-api-adapter.js +747 -0
- package/lib/adapters/rest/rest-api-adapter.js.map +1 -0
- package/lib/adapters/rest/types.d.ts +34 -0
- package/lib/adapters/rest/types.js +9 -0
- package/lib/adapters/rest/types.js.map +1 -0
- package/lib/adapters/retry.d.ts +91 -0
- package/lib/adapters/retry.js +215 -0
- package/lib/adapters/retry.js.map +1 -0
- package/lib/adapters/soql/cuneiform-query-builder.d.ts +391 -0
- package/lib/adapters/soql/cuneiform-query-builder.js +559 -0
- package/lib/adapters/soql/cuneiform-query-builder.js.map +1 -0
- package/lib/adapters/soql/index.d.ts +13 -0
- package/lib/adapters/soql/index.js +21 -0
- package/lib/adapters/soql/index.js.map +1 -0
- package/lib/adapters/soql/soql-query-adapter.d.ts +141 -0
- package/lib/adapters/soql/soql-query-adapter.js +259 -0
- package/lib/adapters/soql/soql-query-adapter.js.map +1 -0
- package/lib/adapters/soql/types.d.ts +37 -0
- package/lib/adapters/soql/types.js +19 -0
- package/lib/adapters/soql/types.js.map +1 -0
- package/lib/adapters/testing/index.d.ts +37 -0
- package/lib/adapters/testing/index.js +20 -0
- package/lib/adapters/testing/index.js.map +1 -0
- package/lib/adapters/testing/mock-connection.d.ts +77 -0
- package/lib/adapters/testing/mock-connection.js +207 -0
- package/lib/adapters/testing/mock-connection.js.map +1 -0
- package/lib/adapters/testing/mock-logger.d.ts +29 -0
- package/lib/adapters/testing/mock-logger.js +57 -0
- package/lib/adapters/testing/mock-logger.js.map +1 -0
- package/lib/adapters/testing/mock-mcp-adapters.d.ts +32 -0
- package/lib/adapters/testing/mock-mcp-adapters.js +52 -0
- package/lib/adapters/testing/mock-mcp-adapters.js.map +1 -0
- package/lib/adapters/testing/mock-oclif-config.d.ts +22 -0
- package/lib/adapters/testing/mock-oclif-config.js +90 -0
- package/lib/adapters/testing/mock-oclif-config.js.map +1 -0
- package/lib/adapters/testing/mock-rest-adapter.d.ts +26 -0
- package/lib/adapters/testing/mock-rest-adapter.js +243 -0
- package/lib/adapters/testing/mock-rest-adapter.js.map +1 -0
- package/lib/adapters/testing/mock-salesforce-connection.d.ts +40 -0
- package/lib/adapters/testing/mock-salesforce-connection.js +61 -0
- package/lib/adapters/testing/mock-salesforce-connection.js.map +1 -0
- package/lib/adapters/testing/mock-soql-adapter.d.ts +30 -0
- package/lib/adapters/testing/mock-soql-adapter.js +120 -0
- package/lib/adapters/testing/mock-soql-adapter.js.map +1 -0
- package/lib/adapters/testing/mock-tooling-adapter.d.ts +24 -0
- package/lib/adapters/testing/mock-tooling-adapter.js +163 -0
- package/lib/adapters/testing/mock-tooling-adapter.js.map +1 -0
- package/lib/adapters/testing/stub-connection.d.ts +93 -0
- package/lib/adapters/testing/stub-connection.js +97 -0
- package/lib/adapters/testing/stub-connection.js.map +1 -0
- package/lib/adapters/testing/stub-rest-adapter.d.ts +52 -0
- package/lib/adapters/testing/stub-rest-adapter.js +58 -0
- package/lib/adapters/testing/stub-rest-adapter.js.map +1 -0
- package/lib/adapters/testing/stub-soql-adapter.d.ts +56 -0
- package/lib/adapters/testing/stub-soql-adapter.js +50 -0
- package/lib/adapters/testing/stub-soql-adapter.js.map +1 -0
- package/lib/adapters/testing/types.d.ts +71 -0
- package/lib/adapters/testing/types.js +9 -0
- package/lib/adapters/testing/types.js.map +1 -0
- package/lib/adapters/tooling/index.d.ts +10 -0
- package/lib/adapters/tooling/index.js +17 -0
- package/lib/adapters/tooling/index.js.map +1 -0
- package/lib/adapters/tooling/tooling-api-adapter.d.ts +157 -0
- package/lib/adapters/tooling/tooling-api-adapter.js +339 -0
- package/lib/adapters/tooling/tooling-api-adapter.js.map +1 -0
- package/lib/adapters/tooling/types.d.ts +81 -0
- package/lib/adapters/tooling/types.js +9 -0
- package/lib/adapters/tooling/types.js.map +1 -0
- package/lib/adapters/types.d.ts +112 -0
- package/lib/adapters/types.js +169 -0
- package/lib/adapters/types.js.map +1 -0
- package/lib/base/cuneiform-command.d.ts +152 -0
- package/lib/base/cuneiform-command.js +243 -0
- package/lib/base/cuneiform-command.js.map +1 -0
- package/lib/commands/cuneiform/compatibility/check.d.ts +43 -0
- package/lib/commands/cuneiform/compatibility/check.js +114 -0
- package/lib/commands/cuneiform/compatibility/check.js.map +1 -0
- package/lib/commands/cuneiform/definition/create.d.ts +119 -0
- package/lib/commands/cuneiform/definition/create.js +693 -0
- package/lib/commands/cuneiform/definition/create.js.map +1 -0
- package/lib/commands/cuneiform/definition/export.d.ts +57 -0
- package/lib/commands/cuneiform/definition/export.js +133 -0
- package/lib/commands/cuneiform/definition/export.js.map +1 -0
- package/lib/commands/cuneiform/definition/get.d.ts +86 -0
- package/lib/commands/cuneiform/definition/get.js +270 -0
- package/lib/commands/cuneiform/definition/get.js.map +1 -0
- package/lib/commands/cuneiform/definition/import.d.ts +54 -0
- package/lib/commands/cuneiform/definition/import.js +118 -0
- package/lib/commands/cuneiform/definition/import.js.map +1 -0
- package/lib/commands/cuneiform/definition/list.d.ts +110 -0
- package/lib/commands/cuneiform/definition/list.js +344 -0
- package/lib/commands/cuneiform/definition/list.js.map +1 -0
- package/lib/commands/cuneiform/definition/purge.d.ts +105 -0
- package/lib/commands/cuneiform/definition/purge.js +533 -0
- package/lib/commands/cuneiform/definition/purge.js.map +1 -0
- package/lib/commands/cuneiform/definition/update.d.ts +58 -0
- package/lib/commands/cuneiform/definition/update.js +206 -0
- package/lib/commands/cuneiform/definition/update.js.map +1 -0
- package/lib/commands/cuneiform/mcp/serve.d.ts +56 -0
- package/lib/commands/cuneiform/mcp/serve.js +109 -0
- package/lib/commands/cuneiform/mcp/serve.js.map +1 -0
- package/lib/commands/cuneiform/object/describe.d.ts +61 -0
- package/lib/commands/cuneiform/object/describe.js +461 -0
- package/lib/commands/cuneiform/object/describe.js.map +1 -0
- package/lib/commands/cuneiform/object/list.d.ts +111 -0
- package/lib/commands/cuneiform/object/list.js +239 -0
- package/lib/commands/cuneiform/object/list.js.map +1 -0
- package/lib/commands/cuneiform/org/details.d.ts +99 -0
- package/lib/commands/cuneiform/org/details.js +521 -0
- package/lib/commands/cuneiform/org/details.js.map +1 -0
- package/lib/commands/cuneiform/org/reset.d.ts +46 -0
- package/lib/commands/cuneiform/org/reset.js +135 -0
- package/lib/commands/cuneiform/org/reset.js.map +1 -0
- package/lib/commands/cuneiform/profile/request/cancel.d.ts +59 -0
- package/lib/commands/cuneiform/profile/request/cancel.js +202 -0
- package/lib/commands/cuneiform/profile/request/cancel.js.map +1 -0
- package/lib/commands/cuneiform/profile/request/delete.d.ts +59 -0
- package/lib/commands/cuneiform/profile/request/delete.js +223 -0
- package/lib/commands/cuneiform/profile/request/delete.js.map +1 -0
- package/lib/commands/cuneiform/profile/request/list.d.ts +35 -0
- package/lib/commands/cuneiform/profile/request/list.js +102 -0
- package/lib/commands/cuneiform/profile/request/list.js.map +1 -0
- package/lib/commands/cuneiform/profile.d.ts +90 -0
- package/lib/commands/cuneiform/profile.js +322 -0
- package/lib/commands/cuneiform/profile.js.map +1 -0
- package/lib/commands/cuneiform/summary/purge.d.ts +77 -0
- package/lib/commands/cuneiform/summary/purge.js +429 -0
- package/lib/commands/cuneiform/summary/purge.js.map +1 -0
- package/lib/commands/cuneiform/summary/reprofile.d.ts +60 -0
- package/lib/commands/cuneiform/summary/reprofile.js +236 -0
- package/lib/commands/cuneiform/summary/reprofile.js.map +1 -0
- package/lib/commands/cuneiform/summary/stop.d.ts +59 -0
- package/lib/commands/cuneiform/summary/stop.js +234 -0
- package/lib/commands/cuneiform/summary/stop.js.map +1 -0
- package/lib/commands/cuneiform/user/details.d.ts +73 -0
- package/lib/commands/cuneiform/user/details.js +391 -0
- package/lib/commands/cuneiform/user/details.js.map +1 -0
- package/lib/constants/index.d.ts +8 -0
- package/lib/constants/index.js +16 -0
- package/lib/constants/index.js.map +1 -0
- package/lib/constants/namespace-constants.d.ts +91 -0
- package/lib/constants/namespace-constants.js +211 -0
- package/lib/constants/namespace-constants.js.map +1 -0
- package/lib/debug/command-debug-proxy.d.ts +101 -0
- package/lib/debug/command-debug-proxy.js +171 -0
- package/lib/debug/command-debug-proxy.js.map +1 -0
- package/lib/debug/debug-logger.d.ts +85 -0
- package/lib/debug/debug-logger.js +133 -0
- package/lib/debug/debug-logger.js.map +1 -0
- package/lib/debug/index.d.ts +12 -0
- package/lib/debug/index.js +20 -0
- package/lib/debug/index.js.map +1 -0
- package/lib/debug/service-debug-proxy.d.ts +30 -0
- package/lib/debug/service-debug-proxy.js +102 -0
- package/lib/debug/service-debug-proxy.js.map +1 -0
- package/lib/hooks/prerun.d.ts +25 -0
- package/lib/hooks/prerun.js +47 -0
- package/lib/hooks/prerun.js.map +1 -0
- package/lib/mcp/config/mcp-config.d.ts +55 -0
- package/lib/mcp/config/mcp-config.js +51 -0
- package/lib/mcp/config/mcp-config.js.map +1 -0
- package/lib/mcp/config/pagination.d.ts +96 -0
- package/lib/mcp/config/pagination.js +108 -0
- package/lib/mcp/config/pagination.js.map +1 -0
- package/lib/mcp/config/system-prompts.d.ts +18 -0
- package/lib/mcp/config/system-prompts.js +92 -0
- package/lib/mcp/config/system-prompts.js.map +1 -0
- package/lib/mcp/errors.d.ts +23 -0
- package/lib/mcp/errors.js +27 -0
- package/lib/mcp/errors.js.map +1 -0
- package/lib/mcp/schemas/input-schemas.d.ts +327 -0
- package/lib/mcp/schemas/input-schemas.js +302 -0
- package/lib/mcp/schemas/input-schemas.js.map +1 -0
- package/lib/mcp/server.d.ts +40 -0
- package/lib/mcp/server.js +316 -0
- package/lib/mcp/server.js.map +1 -0
- package/lib/mcp/tools/contactpoint-tools.d.ts +14 -0
- package/lib/mcp/tools/contactpoint-tools.js +34 -0
- package/lib/mcp/tools/contactpoint-tools.js.map +1 -0
- package/lib/mcp/tools/definition-io-tools.d.ts +19 -0
- package/lib/mcp/tools/definition-io-tools.js +152 -0
- package/lib/mcp/tools/definition-io-tools.js.map +1 -0
- package/lib/mcp/tools/definition-tools.d.ts +51 -0
- package/lib/mcp/tools/definition-tools.js +199 -0
- package/lib/mcp/tools/definition-tools.js.map +1 -0
- package/lib/mcp/tools/index.d.ts +37 -0
- package/lib/mcp/tools/index.js +88 -0
- package/lib/mcp/tools/index.js.map +1 -0
- package/lib/mcp/tools/object-tools.d.ts +22 -0
- package/lib/mcp/tools/object-tools.js +306 -0
- package/lib/mcp/tools/object-tools.js.map +1 -0
- package/lib/mcp/tools/org-tools.d.ts +14 -0
- package/lib/mcp/tools/org-tools.js +177 -0
- package/lib/mcp/tools/org-tools.js.map +1 -0
- package/lib/mcp/tools/profile-tools.d.ts +59 -0
- package/lib/mcp/tools/profile-tools.js +213 -0
- package/lib/mcp/tools/profile-tools.js.map +1 -0
- package/lib/mcp/tools/summary-tools.d.ts +14 -0
- package/lib/mcp/tools/summary-tools.js +38 -0
- package/lib/mcp/tools/summary-tools.js.map +1 -0
- package/lib/mcp/tools/tool-factory.d.ts +63 -0
- package/lib/mcp/tools/tool-factory.js +146 -0
- package/lib/mcp/tools/tool-factory.js.map +1 -0
- package/lib/mcp/tools/user-tools.d.ts +25 -0
- package/lib/mcp/tools/user-tools.js +167 -0
- package/lib/mcp/tools/user-tools.js.map +1 -0
- package/lib/models/date-literal.d.ts +211 -0
- package/lib/models/date-literal.js +615 -0
- package/lib/models/date-literal.js.map +1 -0
- package/lib/models/object-describe-types.d.ts +173 -0
- package/lib/models/object-describe-types.js +9 -0
- package/lib/models/object-describe-types.js.map +1 -0
- package/lib/models/profile-request-types.d.ts +118 -0
- package/lib/models/profile-request-types.js +23 -0
- package/lib/models/profile-request-types.js.map +1 -0
- package/lib/models/profiling-execution-types.d.ts +154 -0
- package/lib/models/profiling-execution-types.js +14 -0
- package/lib/models/profiling-execution-types.js.map +1 -0
- package/lib/models/service-result.d.ts +114 -0
- package/lib/models/service-result.js +81 -0
- package/lib/models/service-result.js.map +1 -0
- package/lib/models/sfdmu-types.d.ts +53 -0
- package/lib/models/sfdmu-types.js +23 -0
- package/lib/models/sfdmu-types.js.map +1 -0
- package/lib/models/status-types.d.ts +38 -0
- package/lib/models/status-types.js +12 -0
- package/lib/models/status-types.js.map +1 -0
- package/lib/models/summary-bulk-types.d.ts +61 -0
- package/lib/models/summary-bulk-types.js +23 -0
- package/lib/models/summary-bulk-types.js.map +1 -0
- package/lib/models/user-details-types.d.ts +163 -0
- package/lib/models/user-details-types.js +9 -0
- package/lib/models/user-details-types.js.map +1 -0
- package/lib/models/year-range.d.ts +78 -0
- package/lib/models/year-range.js +153 -0
- package/lib/models/year-range.js.map +1 -0
- package/lib/operations/CompatibilityCheckOperation.d.ts +62 -0
- package/lib/operations/CompatibilityCheckOperation.js +102 -0
- package/lib/operations/CompatibilityCheckOperation.js.map +1 -0
- package/lib/operations/DefinitionCreateOperation.d.ts +411 -0
- package/lib/operations/DefinitionCreateOperation.js +1121 -0
- package/lib/operations/DefinitionCreateOperation.js.map +1 -0
- package/lib/operations/DefinitionExportOperation.d.ts +155 -0
- package/lib/operations/DefinitionExportOperation.js +281 -0
- package/lib/operations/DefinitionExportOperation.js.map +1 -0
- package/lib/operations/DefinitionImportOperation.d.ts +144 -0
- package/lib/operations/DefinitionImportOperation.js +357 -0
- package/lib/operations/DefinitionImportOperation.js.map +1 -0
- package/lib/operations/DefinitionListOperation.d.ts +66 -0
- package/lib/operations/DefinitionListOperation.js +108 -0
- package/lib/operations/DefinitionListOperation.js.map +1 -0
- package/lib/operations/DefinitionPurgeOperation.d.ts +199 -0
- package/lib/operations/DefinitionPurgeOperation.js +465 -0
- package/lib/operations/DefinitionPurgeOperation.js.map +1 -0
- package/lib/operations/DefinitionUpdateOperation.d.ts +78 -0
- package/lib/operations/DefinitionUpdateOperation.js +142 -0
- package/lib/operations/DefinitionUpdateOperation.js.map +1 -0
- package/lib/operations/OrgDetailsOperation.d.ts +253 -0
- package/lib/operations/OrgDetailsOperation.js +456 -0
- package/lib/operations/OrgDetailsOperation.js.map +1 -0
- package/lib/operations/OrgResetOperation.d.ts +114 -0
- package/lib/operations/OrgResetOperation.js +209 -0
- package/lib/operations/OrgResetOperation.js.map +1 -0
- package/lib/operations/ProfileOperation.d.ts +187 -0
- package/lib/operations/ProfileOperation.js +373 -0
- package/lib/operations/ProfileOperation.js.map +1 -0
- package/lib/operations/ProfileRequestCancelOperation.d.ts +59 -0
- package/lib/operations/ProfileRequestCancelOperation.js +137 -0
- package/lib/operations/ProfileRequestCancelOperation.js.map +1 -0
- package/lib/operations/ProfileRequestDeleteOperation.d.ts +64 -0
- package/lib/operations/ProfileRequestDeleteOperation.js +134 -0
- package/lib/operations/ProfileRequestDeleteOperation.js.map +1 -0
- package/lib/operations/ProfileRequestListOperation.d.ts +39 -0
- package/lib/operations/ProfileRequestListOperation.js +61 -0
- package/lib/operations/ProfileRequestListOperation.js.map +1 -0
- package/lib/operations/SummaryPurgeOperation.d.ts +134 -0
- package/lib/operations/SummaryPurgeOperation.js +257 -0
- package/lib/operations/SummaryPurgeOperation.js.map +1 -0
- package/lib/operations/SummaryReprofileOperation.d.ts +88 -0
- package/lib/operations/SummaryReprofileOperation.js +174 -0
- package/lib/operations/SummaryReprofileOperation.js.map +1 -0
- package/lib/operations/SummaryStopOperation.d.ts +87 -0
- package/lib/operations/SummaryStopOperation.js +175 -0
- package/lib/operations/SummaryStopOperation.js.map +1 -0
- package/lib/services/BulkExecutionService.d.ts +120 -0
- package/lib/services/BulkExecutionService.js +535 -0
- package/lib/services/BulkExecutionService.js.map +1 -0
- package/lib/services/CompatibilityService.d.ts +81 -0
- package/lib/services/CompatibilityService.js +118 -0
- package/lib/services/CompatibilityService.js.map +1 -0
- package/lib/services/ConfigureMode.d.ts +85 -0
- package/lib/services/ConfigureMode.js +390 -0
- package/lib/services/ConfigureMode.js.map +1 -0
- package/lib/services/ContactPointService.d.ts +111 -0
- package/lib/services/ContactPointService.js +286 -0
- package/lib/services/ContactPointService.js.map +1 -0
- package/lib/services/DataAvailabilityService.d.ts +81 -0
- package/lib/services/DataAvailabilityService.js +128 -0
- package/lib/services/DataAvailabilityService.js.map +1 -0
- package/lib/services/DefinitionFieldGenerationService.d.ts +309 -0
- package/lib/services/DefinitionFieldGenerationService.js +795 -0
- package/lib/services/DefinitionFieldGenerationService.js.map +1 -0
- package/lib/services/DefinitionQueryBuilder.d.ts +59 -0
- package/lib/services/DefinitionQueryBuilder.js +234 -0
- package/lib/services/DefinitionQueryBuilder.js.map +1 -0
- package/lib/services/ObjectDescribeService.d.ts +436 -0
- package/lib/services/ObjectDescribeService.js +869 -0
- package/lib/services/ObjectDescribeService.js.map +1 -0
- package/lib/services/ObjectFilteringService.d.ts +400 -0
- package/lib/services/ObjectFilteringService.js +878 -0
- package/lib/services/ObjectFilteringService.js.map +1 -0
- package/lib/services/ObjectListCommandService.d.ts +429 -0
- package/lib/services/ObjectListCommandService.js +873 -0
- package/lib/services/ObjectListCommandService.js.map +1 -0
- package/lib/services/ObjectListService.d.ts +201 -0
- package/lib/services/ObjectListService.js +345 -0
- package/lib/services/ObjectListService.js.map +1 -0
- package/lib/services/OrgInfoService.d.ts +485 -0
- package/lib/services/OrgInfoService.js +1122 -0
- package/lib/services/OrgInfoService.js.map +1 -0
- package/lib/services/PollingService.d.ts +105 -0
- package/lib/services/PollingService.js +117 -0
- package/lib/services/PollingService.js.map +1 -0
- package/lib/services/ProfileRequestService.d.ts +186 -0
- package/lib/services/ProfileRequestService.js +555 -0
- package/lib/services/ProfileRequestService.js.map +1 -0
- package/lib/services/ProfilingDefinitionService.d.ts +535 -0
- package/lib/services/ProfilingDefinitionService.js +981 -0
- package/lib/services/ProfilingDefinitionService.js.map +1 -0
- package/lib/services/ProfilingExecutionService.d.ts +122 -0
- package/lib/services/ProfilingExecutionService.js +320 -0
- package/lib/services/ProfilingExecutionService.js.map +1 -0
- package/lib/services/ProfilingSummaryService.d.ts +292 -0
- package/lib/services/ProfilingSummaryService.js +685 -0
- package/lib/services/ProfilingSummaryService.js.map +1 -0
- package/lib/services/RecordTypeService.d.ts +129 -0
- package/lib/services/RecordTypeService.js +284 -0
- package/lib/services/RecordTypeService.js.map +1 -0
- package/lib/services/SFDMUService.d.ts +133 -0
- package/lib/services/SFDMUService.js +295 -0
- package/lib/services/SFDMUService.js.map +1 -0
- package/lib/services/TabDetectionService.d.ts +105 -0
- package/lib/services/TabDetectionService.js +206 -0
- package/lib/services/TabDetectionService.js.map +1 -0
- package/lib/services/UnconfigureMode.d.ts +74 -0
- package/lib/services/UnconfigureMode.js +378 -0
- package/lib/services/UnconfigureMode.js.map +1 -0
- package/lib/services/UserConfigurationService.d.ts +155 -0
- package/lib/services/UserConfigurationService.js +573 -0
- package/lib/services/UserConfigurationService.js.map +1 -0
- package/lib/services/UserConfigurationTypes.d.ts +181 -0
- package/lib/services/UserConfigurationTypes.js +14 -0
- package/lib/services/UserConfigurationTypes.js.map +1 -0
- package/lib/services/UserReadinessService.d.ts +330 -0
- package/lib/services/UserReadinessService.js +831 -0
- package/lib/services/UserReadinessService.js.map +1 -0
- package/lib/services/constants.d.ts +53 -0
- package/lib/services/constants.js +71 -0
- package/lib/services/constants.js.map +1 -0
- package/lib/services/namespace-constants.d.ts +1 -0
- package/lib/services/namespace-constants.js +11 -0
- package/lib/services/namespace-constants.js.map +1 -0
- package/lib/services/validation.d.ts +47 -0
- package/lib/services/validation.js +119 -0
- package/lib/services/validation.js.map +1 -0
- package/lib/utils/batch-processor.d.ts +13 -0
- package/lib/utils/batch-processor.js +39 -0
- package/lib/utils/batch-processor.js.map +1 -0
- package/lib/utils/formatting/availability-grid.d.ts +81 -0
- package/lib/utils/formatting/availability-grid.js +94 -0
- package/lib/utils/formatting/availability-grid.js.map +1 -0
- package/lib/utils/formatting/business-process-grid.d.ts +51 -0
- package/lib/utils/formatting/business-process-grid.js +58 -0
- package/lib/utils/formatting/business-process-grid.js.map +1 -0
- package/lib/utils/formatting/command-display.d.ts +154 -0
- package/lib/utils/formatting/command-display.js +154 -0
- package/lib/utils/formatting/command-display.js.map +1 -0
- package/lib/utils/formatting/definition-create-display.d.ts +118 -0
- package/lib/utils/formatting/definition-create-display.js +231 -0
- package/lib/utils/formatting/definition-create-display.js.map +1 -0
- package/lib/utils/formatting/empty-states.d.ts +35 -0
- package/lib/utils/formatting/empty-states.js +70 -0
- package/lib/utils/formatting/empty-states.js.map +1 -0
- package/lib/utils/formatting/errors.d.ts +33 -0
- package/lib/utils/formatting/errors.js +72 -0
- package/lib/utils/formatting/errors.js.map +1 -0
- package/lib/utils/formatting/field-types.d.ts +32 -0
- package/lib/utils/formatting/field-types.js +88 -0
- package/lib/utils/formatting/field-types.js.map +1 -0
- package/lib/utils/formatting/index.d.ts +29 -0
- package/lib/utils/formatting/index.js +28 -0
- package/lib/utils/formatting/index.js.map +1 -0
- package/lib/utils/formatting/indicators.d.ts +113 -0
- package/lib/utils/formatting/indicators.js +161 -0
- package/lib/utils/formatting/indicators.js.map +1 -0
- package/lib/utils/formatting/loading-messages.d.ts +37 -0
- package/lib/utils/formatting/loading-messages.js +50 -0
- package/lib/utils/formatting/loading-messages.js.map +1 -0
- package/lib/utils/formatting/namespace-display.d.ts +31 -0
- package/lib/utils/formatting/namespace-display.js +64 -0
- package/lib/utils/formatting/namespace-display.js.map +1 -0
- package/lib/utils/formatting/numbers.d.ts +73 -0
- package/lib/utils/formatting/numbers.js +187 -0
- package/lib/utils/formatting/numbers.js.map +1 -0
- package/lib/utils/formatting/object-describe-display.d.ts +114 -0
- package/lib/utils/formatting/object-describe-display.js +440 -0
- package/lib/utils/formatting/object-describe-display.js.map +1 -0
- package/lib/utils/formatting/object-list-display.d.ts +213 -0
- package/lib/utils/formatting/object-list-display.js +672 -0
- package/lib/utils/formatting/object-list-display.js.map +1 -0
- package/lib/utils/formatting/org-identity.d.ts +15 -0
- package/lib/utils/formatting/org-identity.js +28 -0
- package/lib/utils/formatting/org-identity.js.map +1 -0
- package/lib/utils/formatting/record-age-grid.d.ts +41 -0
- package/lib/utils/formatting/record-age-grid.js +56 -0
- package/lib/utils/formatting/record-age-grid.js.map +1 -0
- package/lib/utils/formatting/sections.d.ts +108 -0
- package/lib/utils/formatting/sections.js +150 -0
- package/lib/utils/formatting/sections.js.map +1 -0
- package/lib/utils/formatting/tables.d.ts +90 -0
- package/lib/utils/formatting/tables.js +113 -0
- package/lib/utils/formatting/tables.js.map +1 -0
- package/lib/utils/formatting/user-details-display.d.ts +101 -0
- package/lib/utils/formatting/user-details-display.js +425 -0
- package/lib/utils/formatting/user-details-display.js.map +1 -0
- package/lib/utils/pagination/index.d.ts +11 -0
- package/lib/utils/pagination/index.js +18 -0
- package/lib/utils/pagination/index.js.map +1 -0
- package/lib/utils/pagination/keypress-reader.d.ts +20 -0
- package/lib/utils/pagination/keypress-reader.js +63 -0
- package/lib/utils/pagination/keypress-reader.js.map +1 -0
- package/lib/utils/pagination/paginate-output.d.ts +48 -0
- package/lib/utils/pagination/paginate-output.js +136 -0
- package/lib/utils/pagination/paginate-output.js.map +1 -0
- package/messages/compatibility.check.md +71 -0
- package/messages/cuneiform.access.md +138 -0
- package/messages/definition.create.md +511 -0
- package/messages/definition.export.md +84 -0
- package/messages/definition.get.md +147 -0
- package/messages/definition.import.md +65 -0
- package/messages/definition.list.md +264 -0
- package/messages/definition.purge.md +318 -0
- package/messages/definition.update.md +118 -0
- package/messages/mcp.serve.md +66 -0
- package/messages/object.describe.md +201 -0
- package/messages/object.list.md +443 -0
- package/messages/org.details.md +386 -0
- package/messages/org.reset.md +71 -0
- package/messages/profile.md +231 -0
- package/messages/profile.request.cancel.md +143 -0
- package/messages/profile.request.delete.md +139 -0
- package/messages/profile.request.list.md +89 -0
- package/messages/summary.purge.md +218 -0
- package/messages/summary.reprofile.md +150 -0
- package/messages/summary.stop.md +157 -0
- package/messages/user.details.md +501 -0
- package/oclif.lock +2887 -2149
- package/oclif.manifest.json +2813 -31
- package/package.json +94 -19
- package/lib/commands/cuneiform/about.d.ts +0 -13
- package/lib/commands/cuneiform/about.js +0 -26
- package/lib/commands/cuneiform/about.js.map +0 -1
- package/lib/commands/hello/world.d.ts +0 -14
- package/lib/commands/hello/world.js +0 -27
- package/lib/commands/hello/world.js.map +0 -1
- package/lib/index.d.ts +0 -2
- package/lib/index.js +0 -2
- package/lib/index.js.map +0 -1
- package/messages/cuneiform.about.md +0 -19
- package/messages/hello.world.md +0 -29
|
@@ -0,0 +1,559 @@
|
|
|
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 NULL check condition with AND logic.
|
|
282
|
+
*
|
|
283
|
+
* @param field - The field API name
|
|
284
|
+
* @param isNull - true for IS NULL, false for IS NOT NULL
|
|
285
|
+
* @returns this for method chaining
|
|
286
|
+
*
|
|
287
|
+
* @example
|
|
288
|
+
* ```typescript
|
|
289
|
+
* builder.andWhereNull('ParentId', true) // ParentId = null
|
|
290
|
+
* builder.andWhereNull('Email', false) // Email != null
|
|
291
|
+
* ```
|
|
292
|
+
*/
|
|
293
|
+
andWhereNull(field, isNull = true) {
|
|
294
|
+
const condition = {
|
|
295
|
+
field,
|
|
296
|
+
operator: isNull ? '=' : '!=',
|
|
297
|
+
value: 'null',
|
|
298
|
+
literalType: 'NULL',
|
|
299
|
+
};
|
|
300
|
+
this.addCondition(condition, 'AND');
|
|
301
|
+
return this;
|
|
302
|
+
}
|
|
303
|
+
/**
|
|
304
|
+
* Adds a DATETIME literal condition with AND logic.
|
|
305
|
+
*
|
|
306
|
+
* DATETIME literals in SOQL are not quoted and follow the format:
|
|
307
|
+
* YYYY-MM-DDTHH:MM:SSZ (e.g., 2024-01-01T00:00:00Z)
|
|
308
|
+
*
|
|
309
|
+
* @param field - The field API name (typically CreatedDate, LastModifiedDate, etc.)
|
|
310
|
+
* @param operator - The comparison operator
|
|
311
|
+
* @param datetimeValue - ISO 8601 datetime string (e.g., '2024-01-01T00:00:00Z')
|
|
312
|
+
* @returns this for method chaining
|
|
313
|
+
*
|
|
314
|
+
* @example
|
|
315
|
+
* ```typescript
|
|
316
|
+
* builder
|
|
317
|
+
* .select(['Id'])
|
|
318
|
+
* .from('Account')
|
|
319
|
+
* .andWhereDatetime('CreatedDate', '>=', '2024-01-01T00:00:00Z')
|
|
320
|
+
* .andWhereDatetime('CreatedDate', '<', '2025-01-01T00:00:00Z')
|
|
321
|
+
* ```
|
|
322
|
+
*/
|
|
323
|
+
andWhereDatetime(field, operator, datetimeValue) {
|
|
324
|
+
const condition = {
|
|
325
|
+
field,
|
|
326
|
+
operator: operator,
|
|
327
|
+
value: datetimeValue,
|
|
328
|
+
literalType: 'DATETIME',
|
|
329
|
+
};
|
|
330
|
+
this.addCondition(condition, 'AND');
|
|
331
|
+
return this;
|
|
332
|
+
}
|
|
333
|
+
/**
|
|
334
|
+
* Adds a DATETIME literal as the initial WHERE condition.
|
|
335
|
+
*
|
|
336
|
+
* @param field - The field API name
|
|
337
|
+
* @param operator - The comparison operator
|
|
338
|
+
* @param datetimeValue - ISO 8601 datetime string
|
|
339
|
+
* @returns this for method chaining
|
|
340
|
+
*/
|
|
341
|
+
whereDatetime(field, operator, datetimeValue) {
|
|
342
|
+
this.firstCondition = {
|
|
343
|
+
field,
|
|
344
|
+
operator: operator,
|
|
345
|
+
value: datetimeValue,
|
|
346
|
+
literalType: 'DATETIME',
|
|
347
|
+
};
|
|
348
|
+
this.conditions = [];
|
|
349
|
+
return this;
|
|
350
|
+
}
|
|
351
|
+
/**
|
|
352
|
+
* Adds an ORDER BY clause.
|
|
353
|
+
*
|
|
354
|
+
* @param field - The field API name to sort by
|
|
355
|
+
* @param order - Sort direction ('ASC' or 'DESC')
|
|
356
|
+
* @param nullsOrder - Optional null handling ('NULLS FIRST' or 'NULLS LAST')
|
|
357
|
+
* @returns this for method chaining
|
|
358
|
+
*
|
|
359
|
+
* @example
|
|
360
|
+
* ```typescript
|
|
361
|
+
* builder.orderBy('Name', 'ASC')
|
|
362
|
+
* builder.orderBy('CreatedDate', 'DESC', 'NULLS LAST')
|
|
363
|
+
* ```
|
|
364
|
+
*/
|
|
365
|
+
orderBy(field, order = 'ASC', nullsOrder) {
|
|
366
|
+
const orderByClause = {
|
|
367
|
+
field,
|
|
368
|
+
order,
|
|
369
|
+
};
|
|
370
|
+
if (nullsOrder) {
|
|
371
|
+
orderByClause.nulls = nullsOrder === 'NULLS FIRST' ? 'FIRST' : 'LAST';
|
|
372
|
+
}
|
|
373
|
+
this.orderByFields.push(orderByClause);
|
|
374
|
+
return this;
|
|
375
|
+
}
|
|
376
|
+
/**
|
|
377
|
+
* Adds a LIMIT clause to the query.
|
|
378
|
+
*
|
|
379
|
+
* @param count - Maximum number of records to return
|
|
380
|
+
* @returns this for method chaining
|
|
381
|
+
*
|
|
382
|
+
* @example
|
|
383
|
+
* ```typescript
|
|
384
|
+
* builder.limit(50)
|
|
385
|
+
* ```
|
|
386
|
+
*/
|
|
387
|
+
limit(count) {
|
|
388
|
+
this.limitValue = count;
|
|
389
|
+
return this;
|
|
390
|
+
}
|
|
391
|
+
/**
|
|
392
|
+
* Adds an OFFSET clause for pagination.
|
|
393
|
+
*
|
|
394
|
+
* @param count - Number of records to skip
|
|
395
|
+
* @returns this for method chaining
|
|
396
|
+
*
|
|
397
|
+
* @example
|
|
398
|
+
* ```typescript
|
|
399
|
+
* builder.limit(50).offset(100) // Skip first 100, return next 50
|
|
400
|
+
* ```
|
|
401
|
+
*/
|
|
402
|
+
offset(count) {
|
|
403
|
+
if (count !== undefined && count > 0) {
|
|
404
|
+
this.offsetValue = count;
|
|
405
|
+
}
|
|
406
|
+
return this;
|
|
407
|
+
}
|
|
408
|
+
/**
|
|
409
|
+
* Adds a GROUP BY clause for aggregate queries.
|
|
410
|
+
*
|
|
411
|
+
* @param fields - Array of field API names to group by
|
|
412
|
+
* @returns this for method chaining
|
|
413
|
+
*
|
|
414
|
+
* @example
|
|
415
|
+
* ```typescript
|
|
416
|
+
* const soql = builder
|
|
417
|
+
* .select(['SobjectType'])
|
|
418
|
+
* .from('RecordType')
|
|
419
|
+
* .where('IsActive', '=', true)
|
|
420
|
+
* .groupBy(['SobjectType'])
|
|
421
|
+
* .toSOQL();
|
|
422
|
+
* ```
|
|
423
|
+
*/
|
|
424
|
+
groupBy(fields) {
|
|
425
|
+
this.groupByFields = fields.map((f) => ({ field: f }));
|
|
426
|
+
return this;
|
|
427
|
+
}
|
|
428
|
+
/**
|
|
429
|
+
* Adds a HAVING clause for filtering grouped results.
|
|
430
|
+
*
|
|
431
|
+
* @param field - The aggregate function or field to filter on
|
|
432
|
+
* @param operator - The comparison operator
|
|
433
|
+
* @param value - The value to compare against
|
|
434
|
+
* @returns this for method chaining
|
|
435
|
+
*
|
|
436
|
+
* @example
|
|
437
|
+
* ```typescript
|
|
438
|
+
* builder
|
|
439
|
+
* .select(['Industry', 'COUNT(Id)'])
|
|
440
|
+
* .from('Account')
|
|
441
|
+
* .groupBy(['Industry'])
|
|
442
|
+
* .having('COUNT(Id)', '>', 5)
|
|
443
|
+
* ```
|
|
444
|
+
*/
|
|
445
|
+
having(field, operator, value) {
|
|
446
|
+
this.havingCondition = CuneiformQueryBuilder.createCondition(field, operator, value);
|
|
447
|
+
return this;
|
|
448
|
+
}
|
|
449
|
+
/**
|
|
450
|
+
* Generates the SOQL query string.
|
|
451
|
+
*
|
|
452
|
+
* @returns The complete SOQL query string
|
|
453
|
+
* @throws Error if required components (fields or sObject) are missing
|
|
454
|
+
*
|
|
455
|
+
* @example
|
|
456
|
+
* ```typescript
|
|
457
|
+
* const soql = builder
|
|
458
|
+
* .select(['Id', 'Name'])
|
|
459
|
+
* .from('Account')
|
|
460
|
+
* .where('Industry', '=', 'Technology')
|
|
461
|
+
* .toSOQL();
|
|
462
|
+
* // Returns: "SELECT Id, Name FROM Account WHERE Industry = 'Technology'"
|
|
463
|
+
* ```
|
|
464
|
+
*/
|
|
465
|
+
toSOQL() {
|
|
466
|
+
this.validate();
|
|
467
|
+
const query = {
|
|
468
|
+
sObject: this.sObject,
|
|
469
|
+
};
|
|
470
|
+
// Handle COUNT() vs regular SELECT
|
|
471
|
+
if (this.isCountQuery) {
|
|
472
|
+
query.fields = [{ type: 'FieldFunctionExpression', functionName: 'COUNT', parameters: [], isAggregateFn: true }];
|
|
473
|
+
}
|
|
474
|
+
else {
|
|
475
|
+
query.fields = this.fields;
|
|
476
|
+
}
|
|
477
|
+
// Build WHERE clause
|
|
478
|
+
const whereClause = this.buildWhereClause();
|
|
479
|
+
if (whereClause) {
|
|
480
|
+
query.where = whereClause;
|
|
481
|
+
}
|
|
482
|
+
if (this.orderByFields.length > 0) {
|
|
483
|
+
query.orderBy = this.orderByFields;
|
|
484
|
+
}
|
|
485
|
+
if (this.limitValue !== undefined) {
|
|
486
|
+
query.limit = this.limitValue;
|
|
487
|
+
}
|
|
488
|
+
if (this.offsetValue !== undefined) {
|
|
489
|
+
query.offset = this.offsetValue;
|
|
490
|
+
}
|
|
491
|
+
if (this.groupByFields.length > 0) {
|
|
492
|
+
query.groupBy = this.groupByFields;
|
|
493
|
+
}
|
|
494
|
+
if (this.havingCondition) {
|
|
495
|
+
query.having = { left: this.havingCondition };
|
|
496
|
+
}
|
|
497
|
+
return composeQuery(query, { format: false });
|
|
498
|
+
}
|
|
499
|
+
/**
|
|
500
|
+
* Validates the query has required components.
|
|
501
|
+
*/
|
|
502
|
+
validate() {
|
|
503
|
+
if (!this.sObject) {
|
|
504
|
+
throw new Error('Query must specify a sObject using from()');
|
|
505
|
+
}
|
|
506
|
+
if (!this.isCountQuery && this.fields.length === 0) {
|
|
507
|
+
throw new Error('Query must specify fields using select() or use count() for aggregate queries');
|
|
508
|
+
}
|
|
509
|
+
}
|
|
510
|
+
/**
|
|
511
|
+
* Adds a condition to the internal list.
|
|
512
|
+
*/
|
|
513
|
+
addCondition(condition, operator) {
|
|
514
|
+
// If no first condition, make this the first
|
|
515
|
+
if (!this.firstCondition) {
|
|
516
|
+
this.firstCondition = condition;
|
|
517
|
+
}
|
|
518
|
+
else {
|
|
519
|
+
this.conditions.push({ condition, operator });
|
|
520
|
+
}
|
|
521
|
+
}
|
|
522
|
+
/**
|
|
523
|
+
* Builds the WHERE clause from accumulated conditions.
|
|
524
|
+
*
|
|
525
|
+
* The soql-parser-js library expects WHERE clauses in this format:
|
|
526
|
+
* A AND B AND C becomes:
|
|
527
|
+
* { left: A, operator: AND, right: { left: B, operator: AND, right: { left: C } } }
|
|
528
|
+
*
|
|
529
|
+
* We build from right to left to create the proper nesting structure.
|
|
530
|
+
*/
|
|
531
|
+
buildWhereClause() {
|
|
532
|
+
if (!this.firstCondition) {
|
|
533
|
+
return undefined;
|
|
534
|
+
}
|
|
535
|
+
// If there are no additional conditions, just return the first one wrapped
|
|
536
|
+
if (this.conditions.length === 0) {
|
|
537
|
+
return { left: this.firstCondition };
|
|
538
|
+
}
|
|
539
|
+
// Build from right to left: start with the last condition
|
|
540
|
+
// and wrap it with previous conditions
|
|
541
|
+
let result = { left: this.conditions[this.conditions.length - 1].condition };
|
|
542
|
+
// Process conditions in reverse order (excluding the last one we already used)
|
|
543
|
+
for (let i = this.conditions.length - 2; i >= 0; i--) {
|
|
544
|
+
result = {
|
|
545
|
+
left: this.conditions[i].condition,
|
|
546
|
+
operator: this.conditions[i + 1].operator,
|
|
547
|
+
right: result,
|
|
548
|
+
};
|
|
549
|
+
}
|
|
550
|
+
// Finally wrap with the first condition using the first additional condition's operator
|
|
551
|
+
result = {
|
|
552
|
+
left: this.firstCondition,
|
|
553
|
+
operator: this.conditions[0].operator,
|
|
554
|
+
right: result,
|
|
555
|
+
};
|
|
556
|
+
return result;
|
|
557
|
+
}
|
|
558
|
+
}
|
|
559
|
+
//# 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;AA0DtC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;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;IAC5C,YAAY,GAAY,KAAK,CAAC;IAEtC;;;;OAIG;IACI,MAAM,CAAC,MAAM;QAClB,OAAO,IAAI,qBAAqB,EAAE,CAAC;IACrC,CAAC;IAED;;;;;OAKG;IACK,MAAM,CAAC,YAAY,CAAC,KAAa;QACvC,wDAAwD;QACxD,0BAA0B;QAC1B,OAAO,KAAK,CAAC,OAAO,CAAC,KAAK,EAAE,MAAM,CAAC,CAAC,OAAO,CAAC,IAAI,EAAE,KAAK,CAAC,CAAC;IAC3D,CAAC;IAED;;OAEG;IACK,MAAM,CAAC,eAAe,CAC5B,KAAa,EACb,QAA4B,EAC5B,KAAgC;QAEhC,IAAI,cAAsB,CAAC;QAC3B,IAAI,WAAwB,CAAC;QAE7B,IAAI,OAAO,KAAK,KAAK,QAAQ,EAAE,CAAC;YAC9B,cAAc,GAAG,IAAI,qBAAqB,CAAC,YAAY,CAAC,KAAK,CAAC,GAAG,CAAC;YAClE,WAAW,GAAG,QAAQ,CAAC;QACzB,CAAC;aAAM,IAAI,OAAO,KAAK,K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I,EAAE,IAAI,CAAC,UAAU,CAAC,IAAI,CAAC,UAAU,CAAC,MAAM,GAAG,CAAC,CAAC,CAAC,SAAS,EAAE,CAAC;QAE1F,+EAA+E;QAC/E,KAAK,IAAI,CAAC,GAAG,IAAI,CAAC,UAAU,CAAC,MAAM,GAAG,CAAC,EAAE,CAAC,IAAI,CAAC,EAAE,CAAC,EAAE,EAAE,CAAC;YACrD,MAAM,GAAG;gBACP,IAAI,EAAE,IAAI,CAAC,UAAU,CAAC,CAAC,CAAC,CAAC,SAAS;gBAClC,QAAQ,EAAE,IAAI,CAAC,UAAU,CAAC,CAAC,GAAG,CAAC,CAAC,CAAC,QAA+B;gBAChE,KAAK,EAAE,MAAM;aACd,CAAC;QACJ,CAAC;QAED,wFAAwF;QACxF,MAAM,GAAG;YACP,IAAI,EAAE,IAAI,CAAC,cAAc;YACzB,QAAQ,EAAE,IAAI,CAAC,UAAU,CAAC,CAAC,CAAC,CAAC,QAA+B;YAC5D,KAAK,EAAE,MAAM;SACd,CAAC;QAEF,OAAO,MAAM,CAAC;IAChB,CAAC;CACF"}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* SOQL query adapter for Salesforce data queries.
|
|
3
|
+
*
|
|
4
|
+
* Provides the SoqlQueryAdapter for executing SOQL queries with
|
|
5
|
+
* automatic pagination, chunking, and queryAll support.
|
|
6
|
+
*
|
|
7
|
+
* Also provides CuneiformQueryBuilder for programmatic SOQL construction.
|
|
8
|
+
*
|
|
9
|
+
* @module adapters/soql
|
|
10
|
+
*/
|
|
11
|
+
export { SoqlQueryAdapter, type ISoqlQueryAdapter, type SoqlQueryAdapterConfig } from './soql-query-adapter.js';
|
|
12
|
+
export { DEFAULT_CHUNK_SIZE, type ChunkOptions, type QueryResult } from './types.js';
|
|
13
|
+
export { CuneiformQueryBuilder, type ICuneiformQueryBuilder, type SortOrder, type ComparisonOperator, type LogicalOperator, type NullsOrder, } from './cuneiform-query-builder.js';
|
|
@@ -0,0 +1,21 @@
|
|
|
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
|
+
/**
|
|
9
|
+
* SOQL query adapter for Salesforce data queries.
|
|
10
|
+
*
|
|
11
|
+
* Provides the SoqlQueryAdapter for executing SOQL queries with
|
|
12
|
+
* automatic pagination, chunking, and queryAll support.
|
|
13
|
+
*
|
|
14
|
+
* Also provides CuneiformQueryBuilder for programmatic SOQL construction.
|
|
15
|
+
*
|
|
16
|
+
* @module adapters/soql
|
|
17
|
+
*/
|
|
18
|
+
export { SoqlQueryAdapter } from './soql-query-adapter.js';
|
|
19
|
+
export { DEFAULT_CHUNK_SIZE } from './types.js';
|
|
20
|
+
export { CuneiformQueryBuilder, } from './cuneiform-query-builder.js';
|
|
21
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/adapters/soql/index.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAEH;;;;;;;;;GASG;AAEH,OAAO,EAAE,gBAAgB,EAAuD,MAAM,yBAAyB,CAAC;AAChH,OAAO,EAAE,kBAAkB,EAAuC,MAAM,YAAY,CAAC;AACrF,OAAO,EACL,qBAAqB,GAMtB,MAAM,8BAA8B,CAAC"}
|