@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,485 @@
|
|
|
1
|
+
import type { IConnectionFacade, DescribeGlobalResult } from '../adapters/connection-facade.js';
|
|
2
|
+
import type { ISoqlQueryAdapter } from '../adapters/soql/soql-query-adapter.js';
|
|
3
|
+
import type { IToolingApiAdapter } from '../adapters/tooling/tooling-api-adapter.js';
|
|
4
|
+
import type { IRestApiAdapter } from '../adapters/rest/rest-api-adapter.js';
|
|
5
|
+
import type { ServiceResult } from '../models/service-result.js';
|
|
6
|
+
/**
|
|
7
|
+
* Org identity information from the Salesforce API.
|
|
8
|
+
*/
|
|
9
|
+
export type OrgIdentity = {
|
|
10
|
+
/** The user ID of the current user */
|
|
11
|
+
userId: string;
|
|
12
|
+
/** The organization ID */
|
|
13
|
+
organizationId: string;
|
|
14
|
+
/** The username of the current user */
|
|
15
|
+
username: string;
|
|
16
|
+
/** The organization name */
|
|
17
|
+
organizationName?: string;
|
|
18
|
+
/** Whether this is a sandbox org */
|
|
19
|
+
isSandbox?: boolean;
|
|
20
|
+
/** The org type (e.g., 'Developer Edition', 'Enterprise Edition') */
|
|
21
|
+
organizationType?: string;
|
|
22
|
+
/** The org's namespace prefix (if any) */
|
|
23
|
+
namespacePrefix?: string;
|
|
24
|
+
};
|
|
25
|
+
/**
|
|
26
|
+
* API limit information from /limits endpoint.
|
|
27
|
+
*/
|
|
28
|
+
export type OrgLimit = {
|
|
29
|
+
/** Name of the limit */
|
|
30
|
+
name: string;
|
|
31
|
+
/** Maximum allowed value */
|
|
32
|
+
max: number;
|
|
33
|
+
/** Number of used units */
|
|
34
|
+
used: number;
|
|
35
|
+
/** Percentage used (0-100) */
|
|
36
|
+
percentUsed: number;
|
|
37
|
+
};
|
|
38
|
+
/**
|
|
39
|
+
* Org limits aggregated from /limits endpoint.
|
|
40
|
+
*/
|
|
41
|
+
export type OrgLimits = {
|
|
42
|
+
/** All limits indexed by name */
|
|
43
|
+
limits: Record<string, OrgLimit>;
|
|
44
|
+
/** Daily API requests limit */
|
|
45
|
+
dailyApiRequests?: OrgLimit;
|
|
46
|
+
/** Data storage limit in MB */
|
|
47
|
+
dataStorageMB?: OrgLimit;
|
|
48
|
+
/** File storage limit in MB */
|
|
49
|
+
fileStorageMB?: OrgLimit;
|
|
50
|
+
/** Daily Bulk API 1.0 requests */
|
|
51
|
+
dailyBulkApiRequests?: OrgLimit;
|
|
52
|
+
/** Daily Bulk API 2.0 query jobs */
|
|
53
|
+
dailyBulkV2QueryJobs?: OrgLimit;
|
|
54
|
+
/** Daily async Apex executions */
|
|
55
|
+
dailyAsyncApexExecutions?: OrgLimit;
|
|
56
|
+
/** Daily streaming/platform events delivered */
|
|
57
|
+
dailyStreamingApiEvents?: OrgLimit;
|
|
58
|
+
};
|
|
59
|
+
/**
|
|
60
|
+
* Information about an installed package.
|
|
61
|
+
*/
|
|
62
|
+
export type InstalledPackage = {
|
|
63
|
+
/** The subscriber package ID */
|
|
64
|
+
id: string;
|
|
65
|
+
/** The namespace prefix */
|
|
66
|
+
namespacePrefix: string;
|
|
67
|
+
/** The package name */
|
|
68
|
+
name: string;
|
|
69
|
+
/** The installed version number */
|
|
70
|
+
versionNumber: string;
|
|
71
|
+
/** Whether this is a managed package */
|
|
72
|
+
isManaged: boolean;
|
|
73
|
+
/** The product name (from NAMESPACE_PRODUCT_MAP) */
|
|
74
|
+
productName?: string;
|
|
75
|
+
};
|
|
76
|
+
/**
|
|
77
|
+
* Complete org information aggregated from multiple sources.
|
|
78
|
+
*/
|
|
79
|
+
export type OrgInfo = {
|
|
80
|
+
/** Org identity information */
|
|
81
|
+
identity: OrgIdentity;
|
|
82
|
+
/** API limits */
|
|
83
|
+
limits: OrgLimits;
|
|
84
|
+
/** Installed packages */
|
|
85
|
+
packages: InstalledPackage[];
|
|
86
|
+
/** Active namespaces detected in the org */
|
|
87
|
+
activeNamespaces: string[];
|
|
88
|
+
/** Cuneiform version (null if not installed) */
|
|
89
|
+
cuneiformVersion: string | null;
|
|
90
|
+
};
|
|
91
|
+
/**
|
|
92
|
+
* Org features detected via object/field probing.
|
|
93
|
+
*/
|
|
94
|
+
export type OrgFeatures = {
|
|
95
|
+
/** Whether multi-currency is enabled (CurrencyIsoCode field exists) */
|
|
96
|
+
multiCurrency: boolean;
|
|
97
|
+
/** Whether enhanced notes is enabled (ContentNote object is queryable) */
|
|
98
|
+
enhancedNotes: boolean;
|
|
99
|
+
/** Whether state/country picklists is enabled (CountryCode field exists on Address) */
|
|
100
|
+
stateCountryPicklists: boolean;
|
|
101
|
+
/** Whether territory management 2.0 is enabled (Territory2 object exists) */
|
|
102
|
+
territoryManagement: boolean;
|
|
103
|
+
/** Whether person accounts is enabled (IsPersonAccount field exists on Account) */
|
|
104
|
+
personAccounts: boolean;
|
|
105
|
+
/** Whether digital experiences (communities) is enabled (Network object exists) */
|
|
106
|
+
digitalExperiences: boolean;
|
|
107
|
+
/** Whether Einstein AI scoring features are enabled (AIRecordInsight object exists) */
|
|
108
|
+
einsteinAI: boolean;
|
|
109
|
+
};
|
|
110
|
+
/**
|
|
111
|
+
* Information about a detected Salesforce Cloud or product.
|
|
112
|
+
*/
|
|
113
|
+
export type DetectedCloud = {
|
|
114
|
+
/** Display name: "Sales Cloud", "Financial Services Cloud" */
|
|
115
|
+
name: string;
|
|
116
|
+
/** How it's detected: license-based or package-based */
|
|
117
|
+
type: 'license' | 'package';
|
|
118
|
+
/** Whether detected in org */
|
|
119
|
+
installed: boolean;
|
|
120
|
+
/** Total licenses purchased (for license-based clouds) */
|
|
121
|
+
totalLicenses?: number;
|
|
122
|
+
/** Licenses in use (for license-based clouds) */
|
|
123
|
+
usedLicenses?: number;
|
|
124
|
+
/** Package namespace (for package-based clouds) */
|
|
125
|
+
namespace?: string;
|
|
126
|
+
/** Version if installed (for package-based clouds) */
|
|
127
|
+
version?: string;
|
|
128
|
+
/** License status from UserLicense.Status (for license-based clouds) */
|
|
129
|
+
status?: string;
|
|
130
|
+
};
|
|
131
|
+
/**
|
|
132
|
+
* User license information from UserLicense object.
|
|
133
|
+
*/
|
|
134
|
+
export type LicenseInfo = {
|
|
135
|
+
/** The license ID */
|
|
136
|
+
id: string;
|
|
137
|
+
/** The license name */
|
|
138
|
+
name: string;
|
|
139
|
+
/** The master label */
|
|
140
|
+
masterLabel: string;
|
|
141
|
+
/** Total licenses available */
|
|
142
|
+
totalLicenses: number;
|
|
143
|
+
/** Licenses currently in use */
|
|
144
|
+
usedLicenses: number;
|
|
145
|
+
/** License status */
|
|
146
|
+
status: string;
|
|
147
|
+
/** License type: user or permissionSet */
|
|
148
|
+
type: 'user' | 'permissionSet';
|
|
149
|
+
};
|
|
150
|
+
/**
|
|
151
|
+
* Information about an installed namespace with object count.
|
|
152
|
+
*/
|
|
153
|
+
export type InstalledNamespace = {
|
|
154
|
+
/** Mapped product name or "Unknown" */
|
|
155
|
+
productName: string;
|
|
156
|
+
/** Namespace prefix: "FinServ", "SBQQ" */
|
|
157
|
+
prefix: string;
|
|
158
|
+
/** Number of objects with this namespace */
|
|
159
|
+
objectCount: number;
|
|
160
|
+
/** Number of objects with at least one record */
|
|
161
|
+
populatedCount: number;
|
|
162
|
+
/** Number of objects with zero records */
|
|
163
|
+
emptyCount: number;
|
|
164
|
+
};
|
|
165
|
+
/**
|
|
166
|
+
* Summary of namespaces discovered via describeGlobal().
|
|
167
|
+
*/
|
|
168
|
+
export type NamespaceSummary = {
|
|
169
|
+
/** Total unique namespaces */
|
|
170
|
+
count: number;
|
|
171
|
+
/** Details per namespace */
|
|
172
|
+
namespaces: InstalledNamespace[];
|
|
173
|
+
};
|
|
174
|
+
/**
|
|
175
|
+
* Extended Cuneiform package info with license details.
|
|
176
|
+
*/
|
|
177
|
+
export type CuneiformPackageInfo = {
|
|
178
|
+
/** Whether the package is installed */
|
|
179
|
+
installed: boolean;
|
|
180
|
+
/** Package version if installed */
|
|
181
|
+
version?: string;
|
|
182
|
+
/** Install date if available */
|
|
183
|
+
installedDate?: string;
|
|
184
|
+
/** License expiration date if available */
|
|
185
|
+
licenseExpirationDate?: string;
|
|
186
|
+
/** License status */
|
|
187
|
+
licenseStatus: 'Active' | 'Expired' | 'Suspended' | 'Unknown' | 'Not Installed';
|
|
188
|
+
};
|
|
189
|
+
/**
|
|
190
|
+
* Org type classification.
|
|
191
|
+
*/
|
|
192
|
+
export type OrgType = 'Production' | 'Sandbox' | 'Scratch' | 'Developer' | 'Trial';
|
|
193
|
+
/**
|
|
194
|
+
* Outcome type for business process behavioral flags.
|
|
195
|
+
*/
|
|
196
|
+
export type BusinessProcessOutcomeType = 'win-loss' | 'closure' | 'conversion' | 'review';
|
|
197
|
+
/**
|
|
198
|
+
* A business process with its associated record types.
|
|
199
|
+
*/
|
|
200
|
+
export type BusinessProcessInfo = {
|
|
201
|
+
/** Process name */
|
|
202
|
+
name: string;
|
|
203
|
+
/** Object API name (Opportunity, Case, Lead, Solution) */
|
|
204
|
+
objectName: string;
|
|
205
|
+
/** Whether the process is active */
|
|
206
|
+
isActive: boolean;
|
|
207
|
+
/** Description if provided */
|
|
208
|
+
description?: string;
|
|
209
|
+
/** Number of record types using this process */
|
|
210
|
+
recordTypeCount: number;
|
|
211
|
+
/** Record type names using this process */
|
|
212
|
+
recordTypeNames: string[];
|
|
213
|
+
};
|
|
214
|
+
/**
|
|
215
|
+
* Summary of business processes discovered in the org.
|
|
216
|
+
*/
|
|
217
|
+
export type BusinessProcessSummary = {
|
|
218
|
+
/** Total process count */
|
|
219
|
+
count: number;
|
|
220
|
+
/** Processes grouped by object */
|
|
221
|
+
processes: BusinessProcessInfo[];
|
|
222
|
+
};
|
|
223
|
+
/**
|
|
224
|
+
* Configuration for OrgInfoService.
|
|
225
|
+
*/
|
|
226
|
+
export type IOrgInfoServiceConfig = {
|
|
227
|
+
/** Connection facade for identity and limits */
|
|
228
|
+
connectionFacade: IConnectionFacade;
|
|
229
|
+
/** SOQL query adapter for org info queries */
|
|
230
|
+
soqlAdapter: ISoqlQueryAdapter;
|
|
231
|
+
/** Optional Tooling API adapter for package queries */
|
|
232
|
+
toolingAdapter?: IToolingApiAdapter;
|
|
233
|
+
/** Optional REST API adapter for describeGlobal and feature detection */
|
|
234
|
+
restAdapter?: IRestApiAdapter;
|
|
235
|
+
/** Optional logger for debug output */
|
|
236
|
+
logger?: Console;
|
|
237
|
+
/** Optional REST client for server-side org info via ISV REST API */
|
|
238
|
+
restClient?: import('../adapters/rest/profiling-rest-client.js').ProfilingRestClient;
|
|
239
|
+
};
|
|
240
|
+
/**
|
|
241
|
+
* Service for aggregating org-level metadata.
|
|
242
|
+
*
|
|
243
|
+
* Provides methods to retrieve org identity, API limits, installed packages,
|
|
244
|
+
* active namespaces, and Cuneiform version information.
|
|
245
|
+
*
|
|
246
|
+
* @example
|
|
247
|
+
* ```typescript
|
|
248
|
+
* const service = new OrgInfoService({
|
|
249
|
+
* connectionFacade,
|
|
250
|
+
* soqlAdapter,
|
|
251
|
+
* toolingAdapter, // optional
|
|
252
|
+
* });
|
|
253
|
+
*
|
|
254
|
+
* const result = await service.getOrgInfo();
|
|
255
|
+
* if (result.success) {
|
|
256
|
+
* console.log(`Org: ${result.data.identity.organizationName}`);
|
|
257
|
+
* console.log(`Cuneiform: ${result.data.cuneiformVersion ?? 'Not installed'}`);
|
|
258
|
+
* }
|
|
259
|
+
* ```
|
|
260
|
+
*/
|
|
261
|
+
export declare class OrgInfoService {
|
|
262
|
+
private readonly connectionFacade;
|
|
263
|
+
private readonly soqlAdapter;
|
|
264
|
+
private readonly toolingAdapter?;
|
|
265
|
+
private readonly restAdapter?;
|
|
266
|
+
private readonly logger?;
|
|
267
|
+
private readonly restClient?;
|
|
268
|
+
constructor(config: IOrgInfoServiceConfig);
|
|
269
|
+
/**
|
|
270
|
+
* Classifies the org type based on Organization record data.
|
|
271
|
+
*
|
|
272
|
+
* @param isSandbox - Whether the org is marked as sandbox
|
|
273
|
+
* @param orgType - The OrganizationType field value
|
|
274
|
+
* @param trialExpirationDate - Trial expiration date if set
|
|
275
|
+
* @returns The classified OrgType
|
|
276
|
+
*/
|
|
277
|
+
static classifyOrgType(isSandbox: boolean | undefined, orgType: string | undefined, trialExpirationDate?: string): OrgType;
|
|
278
|
+
/**
|
|
279
|
+
* Transforms raw limits response to OrgLimit format.
|
|
280
|
+
*
|
|
281
|
+
* Calculates percentage utilization from Max and Remaining values.
|
|
282
|
+
* Returns 0% if Max is 0 to avoid division by zero.
|
|
283
|
+
*/
|
|
284
|
+
private static transformLimit;
|
|
285
|
+
/**
|
|
286
|
+
* Maps InstalledPackageRecord to InstalledPackage.
|
|
287
|
+
*
|
|
288
|
+
* Formats version as semantic version string (Major.Minor.Patch.Build)
|
|
289
|
+
* and looks up human-readable product name by namespace prefix.
|
|
290
|
+
*/
|
|
291
|
+
private static mapPackage;
|
|
292
|
+
/**
|
|
293
|
+
* Extracts active namespaces from installed packages.
|
|
294
|
+
*/
|
|
295
|
+
private static extractActiveNamespaces;
|
|
296
|
+
/**
|
|
297
|
+
* Finds the Cuneiform package version from installed packages.
|
|
298
|
+
*/
|
|
299
|
+
private static findCuneiformVersion;
|
|
300
|
+
/**
|
|
301
|
+
* Detects additional cloud products from PermissionSetLicense data.
|
|
302
|
+
*/
|
|
303
|
+
private static detectPslClouds;
|
|
304
|
+
/**
|
|
305
|
+
* Groups objects by namespace from global describe result.
|
|
306
|
+
*
|
|
307
|
+
* Extracts namespace prefixes from custom object names matching pattern:
|
|
308
|
+
* Namespace__ObjectName__c
|
|
309
|
+
*
|
|
310
|
+
* @param globalDescribe - The global describe result
|
|
311
|
+
* @returns Map of namespace prefix to object names and count
|
|
312
|
+
*/
|
|
313
|
+
private static groupNamespaceObjects;
|
|
314
|
+
/**
|
|
315
|
+
* Builds the SOQL string for a LIMIT 0 field-existence probe, sanitizing both
|
|
316
|
+
* identifiers via sanitizeSoqlIdentifier. Returns null when either identifier
|
|
317
|
+
* is invalid — callers MUST treat null as "field cannot exist" without invoking
|
|
318
|
+
* the SOQL adapter.
|
|
319
|
+
*
|
|
320
|
+
* Pure, side-effect-free, and exposed at the class level so the sanitizer
|
|
321
|
+
* hardening introduced in CLI-3174 can be unit-tested directly.
|
|
322
|
+
*/
|
|
323
|
+
private static buildProbeQuery;
|
|
324
|
+
/**
|
|
325
|
+
* Retrieves complete org information.
|
|
326
|
+
*
|
|
327
|
+
* Executes multiple API calls in parallel for performance:
|
|
328
|
+
* - Identity + Organization SOQL (getOrgIdentity)
|
|
329
|
+
* - Limits API (getOrgLimits)
|
|
330
|
+
* - Installed packages via Tooling API (getInstalledPackages)
|
|
331
|
+
*
|
|
332
|
+
* @returns ServiceResult containing complete OrgInfo
|
|
333
|
+
*/
|
|
334
|
+
getOrgInfo(): Promise<ServiceResult<OrgInfo>>;
|
|
335
|
+
/**
|
|
336
|
+
* Retrieves org identity information.
|
|
337
|
+
*
|
|
338
|
+
* Combines connection.identity() with Organization SOQL query for complete info.
|
|
339
|
+
*
|
|
340
|
+
* @returns ServiceResult containing OrgIdentity
|
|
341
|
+
*/
|
|
342
|
+
getOrgIdentity(): Promise<ServiceResult<OrgIdentity>>;
|
|
343
|
+
/**
|
|
344
|
+
* Retrieves org API limits.
|
|
345
|
+
*
|
|
346
|
+
* Calls /limits REST endpoint and transforms to OrgLimits format.
|
|
347
|
+
*
|
|
348
|
+
* @returns ServiceResult containing OrgLimits
|
|
349
|
+
*/
|
|
350
|
+
getOrgLimits(): Promise<ServiceResult<OrgLimits>>;
|
|
351
|
+
/**
|
|
352
|
+
* Retrieves installed packages via Tooling API.
|
|
353
|
+
*
|
|
354
|
+
* If Tooling adapter is not provided, returns empty array with warning.
|
|
355
|
+
*
|
|
356
|
+
* @returns ServiceResult containing array of InstalledPackage
|
|
357
|
+
*/
|
|
358
|
+
getInstalledPackages(): Promise<ServiceResult<InstalledPackage[]>>;
|
|
359
|
+
/**
|
|
360
|
+
* Retrieves active namespaces from installed packages.
|
|
361
|
+
*
|
|
362
|
+
* @returns ServiceResult containing array of namespace strings
|
|
363
|
+
*/
|
|
364
|
+
getActiveNamespaces(): Promise<ServiceResult<string[]>>;
|
|
365
|
+
/**
|
|
366
|
+
* Retrieves the Cuneiform version if installed.
|
|
367
|
+
*
|
|
368
|
+
* @returns ServiceResult containing version string or null if not installed
|
|
369
|
+
*/
|
|
370
|
+
getCuneiformVersion(): Promise<ServiceResult<string | null>>;
|
|
371
|
+
/**
|
|
372
|
+
* Fetches the describeGlobal result from the REST adapter.
|
|
373
|
+
*
|
|
374
|
+
* Used by OrgDetailsOperation to cache the result across multiple service calls,
|
|
375
|
+
* avoiding redundant API round-trips for features, clouds, and namespace detection.
|
|
376
|
+
*
|
|
377
|
+
* @returns ServiceResult containing DescribeGlobalResult
|
|
378
|
+
*/
|
|
379
|
+
fetchDescribeGlobal(): Promise<ServiceResult<DescribeGlobalResult>>;
|
|
380
|
+
/**
|
|
381
|
+
* Detects org features via object/field probing.
|
|
382
|
+
*
|
|
383
|
+
* Checks for:
|
|
384
|
+
* - Multi-Currency: CurrencyType object exists in describeGlobal
|
|
385
|
+
* - Enhanced Notes: ContentNote object is queryable
|
|
386
|
+
* - State/Country Picklists: BillingCountryCode field exists on Account
|
|
387
|
+
* - Territory Management: Territory2 object exists
|
|
388
|
+
* - Person Accounts: IsPersonAccount field exists on Account
|
|
389
|
+
* - Digital Experiences: Network object exists in describeGlobal
|
|
390
|
+
* - Einstein AI: AIRecordInsight object exists in describeGlobal
|
|
391
|
+
*
|
|
392
|
+
* @param cachedGlobal - Optional pre-fetched describeGlobal result to avoid redundant API calls
|
|
393
|
+
* @returns ServiceResult containing OrgFeatures
|
|
394
|
+
*/
|
|
395
|
+
getOrgFeatures(cachedGlobal?: ServiceResult<DescribeGlobalResult>): Promise<ServiceResult<OrgFeatures>>;
|
|
396
|
+
/**
|
|
397
|
+
* Retrieves license information from UserLicense and PermissionSetLicense.
|
|
398
|
+
*
|
|
399
|
+
* @returns ServiceResult containing array of LicenseInfo
|
|
400
|
+
*/
|
|
401
|
+
getLicenseInfo(): Promise<ServiceResult<LicenseInfo[]>>;
|
|
402
|
+
/**
|
|
403
|
+
* Detects installed Salesforce Clouds (Sales Cloud, Service Cloud, Industry Clouds).
|
|
404
|
+
*
|
|
405
|
+
* Combines license-based detection (Sales/Service Cloud via UserLicense) with
|
|
406
|
+
* package-based detection (Industry Clouds via namespace lookup).
|
|
407
|
+
*
|
|
408
|
+
* @param cachedGlobal - Optional pre-fetched describeGlobal result to avoid redundant API calls
|
|
409
|
+
* @returns ServiceResult containing array of DetectedCloud
|
|
410
|
+
*/
|
|
411
|
+
getDetectedClouds(cachedGlobal?: ServiceResult<DescribeGlobalResult>, cachedPackages?: ServiceResult<InstalledPackage[]>): Promise<ServiceResult<DetectedCloud[]>>;
|
|
412
|
+
/**
|
|
413
|
+
* Discovers installed namespaces via describeGlobal() with object counts.
|
|
414
|
+
*
|
|
415
|
+
* Extracts unique namespaces from custom object names (pattern: Namespace__ObjectName__c)
|
|
416
|
+
* and counts objects per namespace. Maps known namespaces to product names.
|
|
417
|
+
*
|
|
418
|
+
* @param cachedGlobal - Optional pre-fetched describeGlobal result to avoid redundant API calls
|
|
419
|
+
* @returns ServiceResult containing NamespaceSummary
|
|
420
|
+
*/
|
|
421
|
+
getInstalledNamespaces(cachedGlobal?: ServiceResult<DescribeGlobalResult>): Promise<ServiceResult<NamespaceSummary>>;
|
|
422
|
+
/**
|
|
423
|
+
* Retrieves enhanced Cuneiform package information with license details.
|
|
424
|
+
*
|
|
425
|
+
* @returns ServiceResult containing CuneiformPackageInfo
|
|
426
|
+
*/
|
|
427
|
+
getCuneiformPackageInfo(cachedPackages?: ServiceResult<InstalledPackage[]>): Promise<ServiceResult<CuneiformPackageInfo>>;
|
|
428
|
+
/**
|
|
429
|
+
* Retrieves business processes with associated record type counts.
|
|
430
|
+
*
|
|
431
|
+
* Queries BusinessProcess records and enriches each with the count and names
|
|
432
|
+
* of RecordTypes linked via BusinessProcessId. If no business processes exist,
|
|
433
|
+
* the RecordType query is skipped entirely.
|
|
434
|
+
*
|
|
435
|
+
* @returns ServiceResult containing BusinessProcessSummary
|
|
436
|
+
*/
|
|
437
|
+
getBusinessProcesses(): Promise<ServiceResult<BusinessProcessSummary>>;
|
|
438
|
+
/**
|
|
439
|
+
* Delegates org info retrieval to the ISV REST API.
|
|
440
|
+
*
|
|
441
|
+
* @param startTime - Timestamp for duration tracking
|
|
442
|
+
* @returns ServiceResult containing OrgInfo from REST endpoint
|
|
443
|
+
*/
|
|
444
|
+
private getOrgInfoViaRest;
|
|
445
|
+
/**
|
|
446
|
+
* Detects whether the Cuneiform namespace exists by querying a known CMT object.
|
|
447
|
+
*
|
|
448
|
+
* CLI-1569: InstalledSubscriberPackage is empty in scratch orgs where packages are
|
|
449
|
+
* deployed as source metadata. This method queries pnova__Active_Configuration__mdt
|
|
450
|
+
* as a lightweight namespace presence check — if the query succeeds (even with 0
|
|
451
|
+
* records), the namespace exists. If it fails with "sObject type not supported",
|
|
452
|
+
* the namespace is absent.
|
|
453
|
+
*
|
|
454
|
+
* @returns true if the pnova namespace is present, false otherwise
|
|
455
|
+
*/
|
|
456
|
+
private detectCuneiformNamespace;
|
|
457
|
+
/**
|
|
458
|
+
* Probes whether a field exists on an object using a LIMIT 0 SOQL query.
|
|
459
|
+
* Returns true if the query succeeds (field exists), false if it fails or the
|
|
460
|
+
* sanitizer rejects the inputs. Much lighter than a full describe.
|
|
461
|
+
*
|
|
462
|
+
* **Input source contract**: callers must pass Salesforce API names already
|
|
463
|
+
* classified as safe (hardcoded constants, describeGlobal results, or upstream
|
|
464
|
+
* validated values). The sanitizer in buildProbeQuery defends against malformed
|
|
465
|
+
* identifiers as a last line of defence, but this method is NOT a user-input
|
|
466
|
+
* gateway — never wire it directly to a flag value or untrusted external input.
|
|
467
|
+
*
|
|
468
|
+
* Today's only call sites pass hardcoded constants from getOrgFeatures()
|
|
469
|
+
* (Account / BillingCountryCode / IsPersonAccount). The sanitizer is in place
|
|
470
|
+
* defensively so a future caller cannot accidentally introduce SOQL injection.
|
|
471
|
+
*/
|
|
472
|
+
private probeFieldExists;
|
|
473
|
+
/**
|
|
474
|
+
* Detects Sales Cloud and Service Cloud from license data and global describe.
|
|
475
|
+
*
|
|
476
|
+
* Uses license patterns to find Sales/Service Cloud licenses, then confirms
|
|
477
|
+
* by checking for Opportunity (Sales) and Case (Service) objects in the org.
|
|
478
|
+
*/
|
|
479
|
+
private detectLicenseClouds;
|
|
480
|
+
/**
|
|
481
|
+
* Resolves whether Opportunity and Case objects exist in the org.
|
|
482
|
+
* Uses cached global describe if available, otherwise fetches fresh.
|
|
483
|
+
*/
|
|
484
|
+
private resolveCloudObjects;
|
|
485
|
+
}
|