@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,88 @@
|
|
|
1
|
+
import { type ServiceResult } from '../models/service-result.js';
|
|
2
|
+
import { ProfilingSummaryService, type PurgeSummaryRecord } from '../services/ProfilingSummaryService.js';
|
|
3
|
+
import type { BulkSummaryResult } from '../models/summary-bulk-types.js';
|
|
4
|
+
/**
|
|
5
|
+
* Options for the summary reprofile operation.
|
|
6
|
+
*/
|
|
7
|
+
export type SummaryReprofileOptions = {
|
|
8
|
+
/** Specific summary IDs to reprofile — exclusive mode */
|
|
9
|
+
ids?: string[];
|
|
10
|
+
/** Reprofile all eligible summaries */
|
|
11
|
+
all?: boolean;
|
|
12
|
+
/** Filter by object API names */
|
|
13
|
+
objects?: string[];
|
|
14
|
+
/** Preview mode — show what would be reprofiled without executing */
|
|
15
|
+
dryRun?: boolean;
|
|
16
|
+
/** Skip interactive confirmation prompt */
|
|
17
|
+
noPrompt?: boolean;
|
|
18
|
+
/** Callback when reprofilable summaries are found */
|
|
19
|
+
onSummariesFound?: (count: number) => void;
|
|
20
|
+
/** Callback for user confirmation before re-profiling */
|
|
21
|
+
onConfirm?: (count: number) => Promise<boolean>;
|
|
22
|
+
};
|
|
23
|
+
/**
|
|
24
|
+
* Result of a summary reprofile operation.
|
|
25
|
+
*/
|
|
26
|
+
export type SummaryReprofileResult = {
|
|
27
|
+
/** Number of summaries successfully submitted for re-profiling */
|
|
28
|
+
submitted: number;
|
|
29
|
+
/** Number of summaries that failed to submit */
|
|
30
|
+
failed: number;
|
|
31
|
+
/** Total number of summaries processed */
|
|
32
|
+
total: number;
|
|
33
|
+
/** Whether the operation was cancelled by the user */
|
|
34
|
+
cancelled?: boolean;
|
|
35
|
+
/** Whether dry-run mode was active */
|
|
36
|
+
dryRun?: boolean;
|
|
37
|
+
/** Preview data (summaries that would be reprofiled) */
|
|
38
|
+
preview?: PurgeSummaryRecord[];
|
|
39
|
+
/** Per-item results from the API */
|
|
40
|
+
apiResults?: BulkSummaryResult;
|
|
41
|
+
};
|
|
42
|
+
/**
|
|
43
|
+
* Error codes for summary reprofile operations.
|
|
44
|
+
* Re-exported from ServiceErrorCodes (E4530-E4537) for convenience.
|
|
45
|
+
*/
|
|
46
|
+
export declare const SummaryReprofileErrorCodes: {
|
|
47
|
+
readonly NO_SELECTION_CRITERIA: "E4530";
|
|
48
|
+
readonly MUTUALLY_EXCLUSIVE: "E4531";
|
|
49
|
+
readonly QUERY_FAILED: "E4532";
|
|
50
|
+
readonly NO_ELIGIBLE_SUMMARIES: "E4533";
|
|
51
|
+
readonly REPROFILE_FAILED: "E4534";
|
|
52
|
+
readonly USER_CANCELLED: "E4535";
|
|
53
|
+
readonly OPERATION_FAILED: "E4536";
|
|
54
|
+
readonly INVALID_IDS: "E4537";
|
|
55
|
+
};
|
|
56
|
+
/**
|
|
57
|
+
* Orchestrates re-profiling of failed or stopped profiling summaries.
|
|
58
|
+
*
|
|
59
|
+
* Supports three selection modes:
|
|
60
|
+
* 1. ID mode: Reprofile specific summaries by ID
|
|
61
|
+
* 2. All mode: Reprofile all eligible (failed/stopped) summaries
|
|
62
|
+
* 3. Object mode: Reprofile summaries for specific objects
|
|
63
|
+
*
|
|
64
|
+
* These modes are mutually exclusive.
|
|
65
|
+
* This is a fire-and-forget operation — no polling.
|
|
66
|
+
*/
|
|
67
|
+
export declare class SummaryReprofileOperation {
|
|
68
|
+
private readonly summaryService;
|
|
69
|
+
private readonly logger?;
|
|
70
|
+
constructor(summaryService: ProfilingSummaryService, logger?: Console | undefined);
|
|
71
|
+
/**
|
|
72
|
+
* Creates the empty result structure.
|
|
73
|
+
*/
|
|
74
|
+
private static emptyResult;
|
|
75
|
+
/**
|
|
76
|
+
* Validates selection options and returns a failure result if invalid.
|
|
77
|
+
* Returns undefined when validation passes.
|
|
78
|
+
*/
|
|
79
|
+
private static validateOptions;
|
|
80
|
+
/**
|
|
81
|
+
* Executes the summary reprofile operation.
|
|
82
|
+
*/
|
|
83
|
+
execute(options: SummaryReprofileOptions): Promise<ServiceResult<SummaryReprofileResult>>;
|
|
84
|
+
/**
|
|
85
|
+
* Queries reprofilable summaries based on the selection mode.
|
|
86
|
+
*/
|
|
87
|
+
private querySummaries;
|
|
88
|
+
}
|
|
@@ -0,0 +1,174 @@
|
|
|
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 { createSuccessResult, createFailureResult } from '../models/service-result.js';
|
|
9
|
+
import { validateSalesforceId } from '../services/validation.js';
|
|
10
|
+
import { ServiceErrorCodes } from '../adapters/errors.js';
|
|
11
|
+
/**
|
|
12
|
+
* Error codes for summary reprofile operations.
|
|
13
|
+
* Re-exported from ServiceErrorCodes (E4530-E4537) for convenience.
|
|
14
|
+
*/
|
|
15
|
+
export const SummaryReprofileErrorCodes = {
|
|
16
|
+
NO_SELECTION_CRITERIA: ServiceErrorCodes.SUMMARY_REPROFILE_NO_SELECTION,
|
|
17
|
+
MUTUALLY_EXCLUSIVE: ServiceErrorCodes.SUMMARY_REPROFILE_MUTUALLY_EXCLUSIVE,
|
|
18
|
+
QUERY_FAILED: ServiceErrorCodes.SUMMARY_REPROFILE_QUERY_FAILED,
|
|
19
|
+
NO_ELIGIBLE_SUMMARIES: ServiceErrorCodes.SUMMARY_REPROFILE_NO_ELIGIBLE,
|
|
20
|
+
REPROFILE_FAILED: ServiceErrorCodes.SUMMARY_REPROFILE_FAILED,
|
|
21
|
+
USER_CANCELLED: ServiceErrorCodes.SUMMARY_REPROFILE_USER_CANCELLED,
|
|
22
|
+
OPERATION_FAILED: ServiceErrorCodes.SUMMARY_REPROFILE_OPERATION_FAILED,
|
|
23
|
+
INVALID_IDS: ServiceErrorCodes.SUMMARY_REPROFILE_INVALID_IDS,
|
|
24
|
+
};
|
|
25
|
+
/**
|
|
26
|
+
* Orchestrates re-profiling of failed or stopped profiling summaries.
|
|
27
|
+
*
|
|
28
|
+
* Supports three selection modes:
|
|
29
|
+
* 1. ID mode: Reprofile specific summaries by ID
|
|
30
|
+
* 2. All mode: Reprofile all eligible (failed/stopped) summaries
|
|
31
|
+
* 3. Object mode: Reprofile summaries for specific objects
|
|
32
|
+
*
|
|
33
|
+
* These modes are mutually exclusive.
|
|
34
|
+
* This is a fire-and-forget operation — no polling.
|
|
35
|
+
*/
|
|
36
|
+
export class SummaryReprofileOperation {
|
|
37
|
+
summaryService;
|
|
38
|
+
logger;
|
|
39
|
+
constructor(summaryService, logger) {
|
|
40
|
+
this.summaryService = summaryService;
|
|
41
|
+
this.logger = logger;
|
|
42
|
+
}
|
|
43
|
+
/**
|
|
44
|
+
* Creates the empty result structure.
|
|
45
|
+
*/
|
|
46
|
+
static emptyResult() {
|
|
47
|
+
return { submitted: 0, failed: 0, total: 0 };
|
|
48
|
+
}
|
|
49
|
+
/**
|
|
50
|
+
* Validates selection options and returns a failure result if invalid.
|
|
51
|
+
* Returns undefined when validation passes.
|
|
52
|
+
*/
|
|
53
|
+
static validateOptions(options, emptyResult, startTime) {
|
|
54
|
+
const hasIds = options.ids !== undefined && options.ids.length > 0;
|
|
55
|
+
const hasAll = options.all === true;
|
|
56
|
+
const hasObjects = options.objects !== undefined && options.objects.length > 0;
|
|
57
|
+
const modeCount = [hasIds, hasAll, hasObjects].filter(Boolean).length;
|
|
58
|
+
if (modeCount > 1) {
|
|
59
|
+
return createFailureResult(emptyResult, SummaryReprofileErrorCodes.MUTUALLY_EXCLUSIVE, 'The flags --ids, --all, and --objects are mutually exclusive.', { metadata: { duration: Date.now() - startTime } });
|
|
60
|
+
}
|
|
61
|
+
if (modeCount === 0) {
|
|
62
|
+
return createFailureResult(emptyResult, SummaryReprofileErrorCodes.NO_SELECTION_CRITERIA, 'No selection criteria specified. Provide --ids, --all, or --objects.', { metadata: { duration: Date.now() - startTime } });
|
|
63
|
+
}
|
|
64
|
+
if (hasIds && options.ids) {
|
|
65
|
+
for (const id of options.ids) {
|
|
66
|
+
const idError = validateSalesforceId(id);
|
|
67
|
+
if (idError) {
|
|
68
|
+
return createFailureResult(emptyResult, SummaryReprofileErrorCodes.INVALID_IDS, `Invalid summary ID: ${id} - ${idError}`, { metadata: { duration: Date.now() - startTime } });
|
|
69
|
+
}
|
|
70
|
+
}
|
|
71
|
+
}
|
|
72
|
+
return undefined;
|
|
73
|
+
}
|
|
74
|
+
/**
|
|
75
|
+
* Executes the summary reprofile operation.
|
|
76
|
+
*/
|
|
77
|
+
async execute(options) {
|
|
78
|
+
const startTime = Date.now();
|
|
79
|
+
const emptyResult = SummaryReprofileOperation.emptyResult();
|
|
80
|
+
try {
|
|
81
|
+
this.logger?.log('Starting summary reprofile operation');
|
|
82
|
+
// Validate options
|
|
83
|
+
const validationError = SummaryReprofileOperation.validateOptions(options, emptyResult, startTime);
|
|
84
|
+
if (validationError) {
|
|
85
|
+
return validationError;
|
|
86
|
+
}
|
|
87
|
+
// Query reprofilable summaries
|
|
88
|
+
const queryOutcome = await this.querySummaries(options, startTime);
|
|
89
|
+
if (!queryOutcome.success) {
|
|
90
|
+
return createFailureResult(emptyResult, queryOutcome.errorCode, queryOutcome.message, {
|
|
91
|
+
metadata: queryOutcome.metadata,
|
|
92
|
+
});
|
|
93
|
+
}
|
|
94
|
+
const summaries = queryOutcome.data;
|
|
95
|
+
if (summaries.length === 0) {
|
|
96
|
+
return createFailureResult(emptyResult, SummaryReprofileErrorCodes.NO_ELIGIBLE_SUMMARIES, 'No failed or stopped summaries found matching the specified criteria.', { metadata: { duration: Date.now() - startTime } });
|
|
97
|
+
}
|
|
98
|
+
options.onSummariesFound?.(summaries.length);
|
|
99
|
+
// Dry-run mode
|
|
100
|
+
if (options.dryRun) {
|
|
101
|
+
return createSuccessResult({
|
|
102
|
+
...emptyResult,
|
|
103
|
+
total: summaries.length,
|
|
104
|
+
dryRun: true,
|
|
105
|
+
preview: summaries,
|
|
106
|
+
}, {
|
|
107
|
+
message: `Dry-run: ${summaries.length} summary(ies) would be re-profiled`,
|
|
108
|
+
metadata: { duration: Date.now() - startTime },
|
|
109
|
+
});
|
|
110
|
+
}
|
|
111
|
+
// User confirmation
|
|
112
|
+
if (!options.noPrompt && options.onConfirm) {
|
|
113
|
+
const confirmed = await options.onConfirm(summaries.length);
|
|
114
|
+
if (!confirmed) {
|
|
115
|
+
return createSuccessResult({
|
|
116
|
+
...emptyResult,
|
|
117
|
+
total: summaries.length,
|
|
118
|
+
cancelled: true,
|
|
119
|
+
}, {
|
|
120
|
+
message: 'Reprofile cancelled by user.',
|
|
121
|
+
metadata: { duration: Date.now() - startTime },
|
|
122
|
+
});
|
|
123
|
+
}
|
|
124
|
+
}
|
|
125
|
+
// Execute reprofile
|
|
126
|
+
const summaryIds = summaries.map((s) => s.id);
|
|
127
|
+
const reprofileResult = await this.summaryService.reprofileSummaries(summaryIds);
|
|
128
|
+
if (!reprofileResult.success) {
|
|
129
|
+
return createFailureResult(emptyResult, SummaryReprofileErrorCodes.REPROFILE_FAILED, reprofileResult.message ?? 'Reprofile operation failed', { metadata: { duration: Date.now() - startTime } });
|
|
130
|
+
}
|
|
131
|
+
const { summary } = reprofileResult.data;
|
|
132
|
+
const duration = Date.now() - startTime;
|
|
133
|
+
return createSuccessResult({
|
|
134
|
+
submitted: summary.succeeded,
|
|
135
|
+
failed: summary.failed,
|
|
136
|
+
total: summary.total,
|
|
137
|
+
apiResults: reprofileResult.data,
|
|
138
|
+
}, {
|
|
139
|
+
message: `Submitted ${summary.succeeded} of ${summary.total} summary(ies) for re-profiling`,
|
|
140
|
+
metadata: { duration },
|
|
141
|
+
});
|
|
142
|
+
}
|
|
143
|
+
catch (error) {
|
|
144
|
+
const errorMessage = error instanceof Error ? error.message : String(error);
|
|
145
|
+
this.logger?.log(`Summary reprofile operation failed: ${errorMessage}`);
|
|
146
|
+
return createFailureResult(emptyResult, SummaryReprofileErrorCodes.OPERATION_FAILED, errorMessage, {
|
|
147
|
+
metadata: { duration: Date.now() - startTime },
|
|
148
|
+
});
|
|
149
|
+
}
|
|
150
|
+
}
|
|
151
|
+
/**
|
|
152
|
+
* Queries reprofilable summaries based on the selection mode.
|
|
153
|
+
*/
|
|
154
|
+
async querySummaries(options, startTime) {
|
|
155
|
+
const hasIds = options.ids !== undefined && options.ids.length > 0;
|
|
156
|
+
const hasObjects = options.objects !== undefined && options.objects.length > 0;
|
|
157
|
+
if (hasIds) {
|
|
158
|
+
const queryResult = await this.summaryService.getReprofilableSummaries();
|
|
159
|
+
if (!queryResult.success) {
|
|
160
|
+
return createFailureResult([], SummaryReprofileErrorCodes.QUERY_FAILED, queryResult.message ?? 'Query failed', { metadata: { duration: Date.now() - startTime } });
|
|
161
|
+
}
|
|
162
|
+
const idSet = new Set(options.ids);
|
|
163
|
+
return createSuccessResult(queryResult.data.filter((s) => idSet.has(s.id)));
|
|
164
|
+
}
|
|
165
|
+
const queryResult = await this.summaryService.getReprofilableSummaries({
|
|
166
|
+
objectNames: hasObjects ? options.objects : undefined,
|
|
167
|
+
});
|
|
168
|
+
if (!queryResult.success) {
|
|
169
|
+
return createFailureResult([], SummaryReprofileErrorCodes.QUERY_FAILED, queryResult.message ?? 'Query failed', { metadata: { duration: Date.now() - startTime } });
|
|
170
|
+
}
|
|
171
|
+
return createSuccessResult(queryResult.data);
|
|
172
|
+
}
|
|
173
|
+
}
|
|
174
|
+
//# sourceMappingURL=SummaryReprofileOperation.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"SummaryReprofileOperation.js","sourceRoot":"","sources":["../../src/operations/SummaryReprofileOperation.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAEH,OAAO,EAAsB,mBAAmB,EAAE,mBAAmB,EAAE,MAAM,6BAA6B,CAAC;AAG3G,OAAO,EAAE,oBAAoB,EAAE,MAAM,2BAA2B,CAAC;AACjE,OAAO,EAAE,iBAAiB,EAAE,MAAM,uBAAuB,CAAC;AAgD1D;;;GAGG;AACH,MAAM,CAAC,MAAM,0BAA0B,GAAG;IACxC,qBAAqB,EAAE,iBAAiB,CAAC,8BAA8B;IACvE,kBAAkB,EAAE,iBAAiB,CAAC,oCAAoC;IAC1E,YAAY,EAAE,iBAAiB,CAAC,8BAA8B;IAC9D,qBAAqB,EAAE,iBAAiB,CAAC,6BAA6B;IACtE,gBAAgB,EAAE,iBAAiB,CAAC,wBAAwB;IAC5D,cAAc,EAAE,iBAAiB,CA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AAC,CAAC,CAAC,SAAS;SACtD,CAAC,CAAC;QACH,IAAI,CAAC,WAAW,CAAC,OAAO,EAAE,CAAC;YACzB,OAAO,mBAAmB,CACxB,EAA0B,EAC1B,0BAA0B,CAAC,YAAY,EACvC,WAAW,CAAC,OAAO,IAAI,cAAc,EACrC,EAAE,QAAQ,EAAE,EAAE,QAAQ,EAAE,IAAI,CAAC,GAAG,EAAE,GAAG,SAAS,EAAE,EAAE,CACnD,CAAC;QACJ,CAAC;QACD,OAAO,mBAAmB,CAAC,WAAW,CAAC,IAAI,CAAC,CAAC;IAC/C,CAAC;CACF"}
|
|
@@ -0,0 +1,87 @@
|
|
|
1
|
+
import { type ServiceResult } from '../models/service-result.js';
|
|
2
|
+
import { ProfilingSummaryService, type PurgeSummaryRecord } from '../services/ProfilingSummaryService.js';
|
|
3
|
+
import type { BulkSummaryResult } from '../models/summary-bulk-types.js';
|
|
4
|
+
/**
|
|
5
|
+
* Options for the summary stop operation.
|
|
6
|
+
*/
|
|
7
|
+
export type SummaryStopOptions = {
|
|
8
|
+
/** Specific summary IDs to stop — exclusive mode */
|
|
9
|
+
ids?: string[];
|
|
10
|
+
/** Stop all in-progress summaries */
|
|
11
|
+
all?: boolean;
|
|
12
|
+
/** Filter by object API names */
|
|
13
|
+
objects?: string[];
|
|
14
|
+
/** Preview mode — show what would be stopped without executing */
|
|
15
|
+
dryRun?: boolean;
|
|
16
|
+
/** Skip interactive confirmation prompt */
|
|
17
|
+
noPrompt?: boolean;
|
|
18
|
+
/** Callback when in-progress summaries are found */
|
|
19
|
+
onSummariesFound?: (count: number) => void;
|
|
20
|
+
/** Callback for user confirmation before stopping */
|
|
21
|
+
onConfirm?: (count: number) => Promise<boolean>;
|
|
22
|
+
};
|
|
23
|
+
/**
|
|
24
|
+
* Result of a summary stop operation.
|
|
25
|
+
*/
|
|
26
|
+
export type SummaryStopResult = {
|
|
27
|
+
/** Number of summaries successfully stopped */
|
|
28
|
+
stopped: number;
|
|
29
|
+
/** Number of summaries that failed to stop */
|
|
30
|
+
failed: number;
|
|
31
|
+
/** Total number of summaries processed */
|
|
32
|
+
total: number;
|
|
33
|
+
/** Whether the operation was cancelled by the user */
|
|
34
|
+
cancelled?: boolean;
|
|
35
|
+
/** Whether dry-run mode was active */
|
|
36
|
+
dryRun?: boolean;
|
|
37
|
+
/** Preview data (summaries that would be stopped) */
|
|
38
|
+
preview?: PurgeSummaryRecord[];
|
|
39
|
+
/** Per-item results from the API */
|
|
40
|
+
apiResults?: BulkSummaryResult;
|
|
41
|
+
};
|
|
42
|
+
/**
|
|
43
|
+
* Error codes for summary stop operations.
|
|
44
|
+
* Re-exported from ServiceErrorCodes (E4520-E4527) for convenience.
|
|
45
|
+
*/
|
|
46
|
+
export declare const SummaryStopErrorCodes: {
|
|
47
|
+
readonly NO_SELECTION_CRITERIA: "E4520";
|
|
48
|
+
readonly MUTUALLY_EXCLUSIVE: "E4521";
|
|
49
|
+
readonly QUERY_FAILED: "E4522";
|
|
50
|
+
readonly NO_ELIGIBLE_SUMMARIES: "E4523";
|
|
51
|
+
readonly STOP_FAILED: "E4524";
|
|
52
|
+
readonly USER_CANCELLED: "E4525";
|
|
53
|
+
readonly OPERATION_FAILED: "E4526";
|
|
54
|
+
readonly INVALID_IDS: "E4527";
|
|
55
|
+
};
|
|
56
|
+
/**
|
|
57
|
+
* Orchestrates stopping of in-progress profiling summaries.
|
|
58
|
+
*
|
|
59
|
+
* Supports three selection modes:
|
|
60
|
+
* 1. ID mode: Stop specific summaries by ID
|
|
61
|
+
* 2. All mode: Stop all in-progress summaries
|
|
62
|
+
* 3. Object mode: Stop summaries for specific objects
|
|
63
|
+
*
|
|
64
|
+
* These modes are mutually exclusive.
|
|
65
|
+
*/
|
|
66
|
+
export declare class SummaryStopOperation {
|
|
67
|
+
private readonly summaryService;
|
|
68
|
+
private readonly logger?;
|
|
69
|
+
constructor(summaryService: ProfilingSummaryService, logger?: Console | undefined);
|
|
70
|
+
/**
|
|
71
|
+
* Creates the empty result structure.
|
|
72
|
+
*/
|
|
73
|
+
private static emptyResult;
|
|
74
|
+
/**
|
|
75
|
+
* Validates selection options and returns a failure result if invalid.
|
|
76
|
+
* Returns undefined when validation passes.
|
|
77
|
+
*/
|
|
78
|
+
private static validateOptions;
|
|
79
|
+
/**
|
|
80
|
+
* Executes the summary stop operation.
|
|
81
|
+
*/
|
|
82
|
+
execute(options: SummaryStopOptions): Promise<ServiceResult<SummaryStopResult>>;
|
|
83
|
+
/**
|
|
84
|
+
* Queries in-progress summaries based on the selection mode.
|
|
85
|
+
*/
|
|
86
|
+
private querySummaries;
|
|
87
|
+
}
|
|
@@ -0,0 +1,175 @@
|
|
|
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 { createSuccessResult, createFailureResult } from '../models/service-result.js';
|
|
9
|
+
import { validateSalesforceId } from '../services/validation.js';
|
|
10
|
+
import { ServiceErrorCodes } from '../adapters/errors.js';
|
|
11
|
+
/**
|
|
12
|
+
* Error codes for summary stop operations.
|
|
13
|
+
* Re-exported from ServiceErrorCodes (E4520-E4527) for convenience.
|
|
14
|
+
*/
|
|
15
|
+
export const SummaryStopErrorCodes = {
|
|
16
|
+
NO_SELECTION_CRITERIA: ServiceErrorCodes.SUMMARY_STOP_NO_SELECTION,
|
|
17
|
+
MUTUALLY_EXCLUSIVE: ServiceErrorCodes.SUMMARY_STOP_MUTUALLY_EXCLUSIVE,
|
|
18
|
+
QUERY_FAILED: ServiceErrorCodes.SUMMARY_STOP_QUERY_FAILED,
|
|
19
|
+
NO_ELIGIBLE_SUMMARIES: ServiceErrorCodes.SUMMARY_STOP_NO_ELIGIBLE,
|
|
20
|
+
STOP_FAILED: ServiceErrorCodes.SUMMARY_STOP_FAILED,
|
|
21
|
+
USER_CANCELLED: ServiceErrorCodes.SUMMARY_STOP_USER_CANCELLED,
|
|
22
|
+
OPERATION_FAILED: ServiceErrorCodes.SUMMARY_STOP_OPERATION_FAILED,
|
|
23
|
+
INVALID_IDS: ServiceErrorCodes.SUMMARY_STOP_INVALID_IDS,
|
|
24
|
+
};
|
|
25
|
+
/**
|
|
26
|
+
* Orchestrates stopping of in-progress profiling summaries.
|
|
27
|
+
*
|
|
28
|
+
* Supports three selection modes:
|
|
29
|
+
* 1. ID mode: Stop specific summaries by ID
|
|
30
|
+
* 2. All mode: Stop all in-progress summaries
|
|
31
|
+
* 3. Object mode: Stop summaries for specific objects
|
|
32
|
+
*
|
|
33
|
+
* These modes are mutually exclusive.
|
|
34
|
+
*/
|
|
35
|
+
export class SummaryStopOperation {
|
|
36
|
+
summaryService;
|
|
37
|
+
logger;
|
|
38
|
+
constructor(summaryService, logger) {
|
|
39
|
+
this.summaryService = summaryService;
|
|
40
|
+
this.logger = logger;
|
|
41
|
+
}
|
|
42
|
+
/**
|
|
43
|
+
* Creates the empty result structure.
|
|
44
|
+
*/
|
|
45
|
+
static emptyResult() {
|
|
46
|
+
return { stopped: 0, failed: 0, total: 0 };
|
|
47
|
+
}
|
|
48
|
+
/**
|
|
49
|
+
* Validates selection options and returns a failure result if invalid.
|
|
50
|
+
* Returns undefined when validation passes.
|
|
51
|
+
*/
|
|
52
|
+
static validateOptions(options, emptyResult, startTime) {
|
|
53
|
+
const hasIds = options.ids !== undefined && options.ids.length > 0;
|
|
54
|
+
const hasAll = options.all === true;
|
|
55
|
+
const hasObjects = options.objects !== undefined && options.objects.length > 0;
|
|
56
|
+
const modeCount = [hasIds, hasAll, hasObjects].filter(Boolean).length;
|
|
57
|
+
if (modeCount > 1) {
|
|
58
|
+
return createFailureResult(emptyResult, SummaryStopErrorCodes.MUTUALLY_EXCLUSIVE, 'The flags --ids, --all, and --objects are mutually exclusive.', { metadata: { duration: Date.now() - startTime } });
|
|
59
|
+
}
|
|
60
|
+
if (modeCount === 0) {
|
|
61
|
+
return createFailureResult(emptyResult, SummaryStopErrorCodes.NO_SELECTION_CRITERIA, 'No selection criteria specified. Provide --ids, --all, or --objects.', { metadata: { duration: Date.now() - startTime } });
|
|
62
|
+
}
|
|
63
|
+
if (hasIds && options.ids) {
|
|
64
|
+
for (const id of options.ids) {
|
|
65
|
+
const idError = validateSalesforceId(id);
|
|
66
|
+
if (idError) {
|
|
67
|
+
return createFailureResult(emptyResult, SummaryStopErrorCodes.INVALID_IDS, `Invalid summary ID: ${id} - ${idError}`, {
|
|
68
|
+
metadata: { duration: Date.now() - startTime },
|
|
69
|
+
});
|
|
70
|
+
}
|
|
71
|
+
}
|
|
72
|
+
}
|
|
73
|
+
return undefined;
|
|
74
|
+
}
|
|
75
|
+
/**
|
|
76
|
+
* Executes the summary stop operation.
|
|
77
|
+
*/
|
|
78
|
+
async execute(options) {
|
|
79
|
+
const startTime = Date.now();
|
|
80
|
+
const emptyResult = SummaryStopOperation.emptyResult();
|
|
81
|
+
try {
|
|
82
|
+
this.logger?.log('Starting summary stop operation');
|
|
83
|
+
// Validate options
|
|
84
|
+
const validationError = SummaryStopOperation.validateOptions(options, emptyResult, startTime);
|
|
85
|
+
if (validationError) {
|
|
86
|
+
return validationError;
|
|
87
|
+
}
|
|
88
|
+
// Query in-progress summaries
|
|
89
|
+
const queryOutcome = await this.querySummaries(options, startTime);
|
|
90
|
+
if (!queryOutcome.success) {
|
|
91
|
+
return createFailureResult(emptyResult, queryOutcome.errorCode, queryOutcome.message, {
|
|
92
|
+
metadata: queryOutcome.metadata,
|
|
93
|
+
});
|
|
94
|
+
}
|
|
95
|
+
const summaries = queryOutcome.data;
|
|
96
|
+
if (summaries.length === 0) {
|
|
97
|
+
return createFailureResult(emptyResult, SummaryStopErrorCodes.NO_ELIGIBLE_SUMMARIES, 'No in-progress summaries found matching the specified criteria.', { metadata: { duration: Date.now() - startTime } });
|
|
98
|
+
}
|
|
99
|
+
options.onSummariesFound?.(summaries.length);
|
|
100
|
+
// Dry-run mode
|
|
101
|
+
if (options.dryRun) {
|
|
102
|
+
return createSuccessResult({
|
|
103
|
+
...emptyResult,
|
|
104
|
+
total: summaries.length,
|
|
105
|
+
dryRun: true,
|
|
106
|
+
preview: summaries,
|
|
107
|
+
}, {
|
|
108
|
+
message: `Dry-run: ${summaries.length} summary(ies) would be stopped`,
|
|
109
|
+
metadata: { duration: Date.now() - startTime },
|
|
110
|
+
});
|
|
111
|
+
}
|
|
112
|
+
// User confirmation
|
|
113
|
+
if (!options.noPrompt && options.onConfirm) {
|
|
114
|
+
const confirmed = await options.onConfirm(summaries.length);
|
|
115
|
+
if (!confirmed) {
|
|
116
|
+
return createSuccessResult({
|
|
117
|
+
...emptyResult,
|
|
118
|
+
total: summaries.length,
|
|
119
|
+
cancelled: true,
|
|
120
|
+
}, {
|
|
121
|
+
message: 'Stop cancelled by user.',
|
|
122
|
+
metadata: { duration: Date.now() - startTime },
|
|
123
|
+
});
|
|
124
|
+
}
|
|
125
|
+
}
|
|
126
|
+
// Execute stop
|
|
127
|
+
const summaryIds = summaries.map((s) => s.id);
|
|
128
|
+
const stopResult = await this.summaryService.stopSummaries(summaryIds);
|
|
129
|
+
if (!stopResult.success) {
|
|
130
|
+
return createFailureResult(emptyResult, SummaryStopErrorCodes.STOP_FAILED, stopResult.message ?? 'Stop operation failed', { metadata: { duration: Date.now() - startTime } });
|
|
131
|
+
}
|
|
132
|
+
const { summary } = stopResult.data;
|
|
133
|
+
const duration = Date.now() - startTime;
|
|
134
|
+
return createSuccessResult({
|
|
135
|
+
stopped: summary.succeeded,
|
|
136
|
+
failed: summary.failed,
|
|
137
|
+
total: summary.total,
|
|
138
|
+
apiResults: stopResult.data,
|
|
139
|
+
}, {
|
|
140
|
+
message: `Stopped ${summary.succeeded} of ${summary.total} summary(ies)`,
|
|
141
|
+
metadata: { duration },
|
|
142
|
+
});
|
|
143
|
+
}
|
|
144
|
+
catch (error) {
|
|
145
|
+
const errorMessage = error instanceof Error ? error.message : String(error);
|
|
146
|
+
this.logger?.log(`Summary stop operation failed: ${errorMessage}`);
|
|
147
|
+
return createFailureResult(emptyResult, SummaryStopErrorCodes.OPERATION_FAILED, errorMessage, {
|
|
148
|
+
metadata: { duration: Date.now() - startTime },
|
|
149
|
+
});
|
|
150
|
+
}
|
|
151
|
+
}
|
|
152
|
+
/**
|
|
153
|
+
* Queries in-progress summaries based on the selection mode.
|
|
154
|
+
*/
|
|
155
|
+
async querySummaries(options, startTime) {
|
|
156
|
+
const hasIds = options.ids !== undefined && options.ids.length > 0;
|
|
157
|
+
const hasObjects = options.objects !== undefined && options.objects.length > 0;
|
|
158
|
+
if (hasIds) {
|
|
159
|
+
const queryResult = await this.summaryService.getInProgressSummaries();
|
|
160
|
+
if (!queryResult.success) {
|
|
161
|
+
return createFailureResult([], SummaryStopErrorCodes.QUERY_FAILED, queryResult.message ?? 'Query failed', { metadata: { duration: Date.now() - startTime } });
|
|
162
|
+
}
|
|
163
|
+
const idSet = new Set(options.ids);
|
|
164
|
+
return createSuccessResult(queryResult.data.filter((s) => idSet.has(s.id)));
|
|
165
|
+
}
|
|
166
|
+
const queryResult = await this.summaryService.getInProgressSummaries({
|
|
167
|
+
objectNames: hasObjects ? options.objects : undefined,
|
|
168
|
+
});
|
|
169
|
+
if (!queryResult.success) {
|
|
170
|
+
return createFailureResult([], SummaryStopErrorCodes.QUERY_FAILED, queryResult.message ?? 'Query failed', { metadata: { duration: Date.now() - startTime } });
|
|
171
|
+
}
|
|
172
|
+
return createSuccessResult(queryResult.data);
|
|
173
|
+
}
|
|
174
|
+
}
|
|
175
|
+
//# sourceMappingURL=SummaryStopOperation.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"SummaryStopOperation.js","sourceRoot":"","sources":["../../src/operations/SummaryStopOperation.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAEH,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EAAE,QAAQ,EAAE,IAAI,CAAC,GAAG,EAAE,GAAG,SAAS,EAAE,EAAE,CACnD,CAAC;YACJ,CAAC;YACD,MAAM,KAAK,GAAG,IAAI,GAAG,CAAC,OAAO,CAAC,GAAG,CAAC,CAAC;YACnC,OAAO,mBAAmB,CAAC,WAAW,CAAC,IAAI,CAAC,MAAM,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,CAAC;QAC9E,CAAC;QAED,MAAM,WAAW,GAAG,MAAM,IAAI,CAAC,cAAc,CAAC,sBAAsB,CAAC;YACnE,WAAW,EAAE,UAAU,CAAC,CAAC,CAAC,OAAO,CAAC,OAAO,CAAC,CAAC,CAAC,SAAS;SACtD,CAAC,CAAC;QACH,IAAI,CAAC,WAAW,CAAC,OAAO,EAAE,CAAC;YACzB,OAAO,mBAAmB,CACxB,EAA0B,EAC1B,qBAAqB,CAAC,YAAY,EAClC,WAAW,CAAC,OAAO,IAAI,cAAc,EACrC,EAAE,QAAQ,EAAE,EAAE,QAAQ,EAAE,IAAI,CAAC,GAAG,EAAE,GAAG,SAAS,EAAE,EAAE,CACnD,CAAC;QACJ,CAAC;QACD,OAAO,mBAAmB,CAAC,WAAW,CAAC,IAAI,CAAC,CAAC;IAC/C,CAAC;CACF"}
|
|
@@ -0,0 +1,120 @@
|
|
|
1
|
+
import type { ServiceResult } from '../models/service-result.js';
|
|
2
|
+
import type { ISoqlQueryAdapter } from '../adapters/soql/soql-query-adapter.js';
|
|
3
|
+
import type { BulkExecutionOptions, BulkExecutionResult, ProgressCallback, IProfilingExecutor } from '../models/profiling-execution-types.js';
|
|
4
|
+
import type { ProfilingDefinition } from './ProfilingDefinitionService.js';
|
|
5
|
+
import type { PollingService } from './PollingService.js';
|
|
6
|
+
export type { BulkExecutionOptions, BulkExecutionResult, BulkExecutionSummary, DefinitionExecutionResult, BulkProgressUpdate, ProgressCallback, SkipReason, IProfilingExecutor, } from '../models/profiling-execution-types.js';
|
|
7
|
+
/**
|
|
8
|
+
* Configuration for BulkExecutionService constructor.
|
|
9
|
+
*/
|
|
10
|
+
export type IBulkExecutionServiceConfig = {
|
|
11
|
+
/** SOQL adapter for record count queries (skip-empty logic) */
|
|
12
|
+
soqlAdapter: ISoqlQueryAdapter;
|
|
13
|
+
/** PollingService for waiting on individual request completion */
|
|
14
|
+
pollingService: PollingService;
|
|
15
|
+
/** Optional logger for debug output */
|
|
16
|
+
logger?: Console;
|
|
17
|
+
};
|
|
18
|
+
/**
|
|
19
|
+
* Service for bulk execution of profiling definitions with controlled concurrency.
|
|
20
|
+
*
|
|
21
|
+
* Orchestrates parallel execution of multiple profiling definitions using a
|
|
22
|
+
* semaphore-based concurrency model. Receives an `IProfilingExecutor`
|
|
23
|
+
* callback object to decouple bulk orchestration from single-execution mechanics.
|
|
24
|
+
*
|
|
25
|
+
* Responsibilities:
|
|
26
|
+
* - Semaphore-based concurrency control (1-10 parallel threads)
|
|
27
|
+
* - Skip-empty logic (check record count before profiling)
|
|
28
|
+
* - Progress reporting via callbacks
|
|
29
|
+
* - Error resolution mapping for user-friendly guidance
|
|
30
|
+
* - Aggregate result summary (successful, failed, skipped)
|
|
31
|
+
*
|
|
32
|
+
* @example
|
|
33
|
+
* ```typescript
|
|
34
|
+
* const bulkService = new BulkExecutionService({
|
|
35
|
+
* soqlAdapter,
|
|
36
|
+
* pollingService,
|
|
37
|
+
* });
|
|
38
|
+
*
|
|
39
|
+
* const executor = {
|
|
40
|
+
* execute: (defId: string) => executionService.execute(defId),
|
|
41
|
+
* getStatus: (reqId: string) => executionService.getStatus(reqId),
|
|
42
|
+
* };
|
|
43
|
+
*
|
|
44
|
+
* const result = await bulkService.executeBulk(
|
|
45
|
+
* definitions,
|
|
46
|
+
* executor,
|
|
47
|
+
* { parallel: 5, skipEmpty: true },
|
|
48
|
+
* (update) => console.log(`${update.index + 1}/${update.total}: ${update.message}`)
|
|
49
|
+
* );
|
|
50
|
+
* ```
|
|
51
|
+
*/
|
|
52
|
+
export declare class BulkExecutionService {
|
|
53
|
+
private readonly soqlAdapter;
|
|
54
|
+
private readonly pollingService;
|
|
55
|
+
private readonly logger?;
|
|
56
|
+
constructor(config: IBulkExecutionServiceConfig);
|
|
57
|
+
/**
|
|
58
|
+
* Maps an error message to user-friendly resolution guidance.
|
|
59
|
+
*
|
|
60
|
+
* Searches through known error patterns and returns appropriate resolution
|
|
61
|
+
* guidance. If no pattern matches, returns undefined.
|
|
62
|
+
*
|
|
63
|
+
* @param errorMessage - The error message to analyze
|
|
64
|
+
* @returns User-friendly resolution guidance or undefined
|
|
65
|
+
*/
|
|
66
|
+
private static getErrorResolution;
|
|
67
|
+
/**
|
|
68
|
+
* Reports progress update via callback.
|
|
69
|
+
*
|
|
70
|
+
* @param onProgress - Optional progress callback
|
|
71
|
+
* @param definition - Current definition
|
|
72
|
+
* @param status - Current status
|
|
73
|
+
* @param index - Index in batch
|
|
74
|
+
* @param total - Total count
|
|
75
|
+
* @param summary - Running summary
|
|
76
|
+
* @param message - Optional message
|
|
77
|
+
*/
|
|
78
|
+
private static reportProgress;
|
|
79
|
+
/**
|
|
80
|
+
* Executes profiling for multiple definitions in parallel with controlled concurrency.
|
|
81
|
+
*
|
|
82
|
+
* Implements semaphore-based concurrency control, progress callbacks, skip-empty
|
|
83
|
+
* logic, and error resolution mapping. Returns an aggregated summary of results.
|
|
84
|
+
*
|
|
85
|
+
* @param definitions - Array of profiling definitions to execute
|
|
86
|
+
* @param executor - Executor interface for triggering and monitoring profiling
|
|
87
|
+
* @param options - Bulk execution options (parallel, skipEmpty, pollInterval)
|
|
88
|
+
* @param onProgress - Optional callback for progress updates
|
|
89
|
+
* @returns ServiceResult containing BulkExecutionResult with summary and per-definition results
|
|
90
|
+
*/
|
|
91
|
+
executeBulk(definitions: ProfilingDefinition[], executor: IProfilingExecutor, options?: BulkExecutionOptions, onProgress?: ProgressCallback): Promise<ServiceResult<BulkExecutionResult>>;
|
|
92
|
+
/**
|
|
93
|
+
* Checks the record count for an object.
|
|
94
|
+
*
|
|
95
|
+
* Used by skip-empty logic to determine if an object has records to profile.
|
|
96
|
+
*
|
|
97
|
+
* @param objectName - The Salesforce object API name
|
|
98
|
+
* @returns Typed result distinguishing success, validation failure, and query failure
|
|
99
|
+
*/
|
|
100
|
+
private getRecordCount;
|
|
101
|
+
/**
|
|
102
|
+
* Checks if a definition should be skipped due to empty records.
|
|
103
|
+
*
|
|
104
|
+
* @param definition - The profiling definition to check
|
|
105
|
+
* @returns Skip info if should be skipped, null otherwise
|
|
106
|
+
*/
|
|
107
|
+
private checkSkipEmpty;
|
|
108
|
+
/**
|
|
109
|
+
* Processes a single definition within bulk execution.
|
|
110
|
+
*
|
|
111
|
+
* Acquires a semaphore permit, executes the definition, waits for completion,
|
|
112
|
+
* and releases the permit. Updates summary counts and calls progress callback.
|
|
113
|
+
*
|
|
114
|
+
* @param item - The definition and its position in the batch
|
|
115
|
+
* @param ctx - Shared batch execution state (options, semaphore, counters)
|
|
116
|
+
* @param callbacks - Caller-provided execution and status functions
|
|
117
|
+
* @returns The execution result for this definition
|
|
118
|
+
*/
|
|
119
|
+
private processDefinition;
|
|
120
|
+
}
|