feat(jobs): add Jobs.stop() method [PLT-100574]#337
Open
ninja-shreyash wants to merge 1 commit intomainfrom
Open
feat(jobs): add Jobs.stop() method [PLT-100574]#337ninja-shreyash wants to merge 1 commit intomainfrom
ninja-shreyash wants to merge 1 commit intomainfrom
Conversation
Add stop method to the Jobs service that stops one or more jobs by their UUID keys. Resolves keys to integer IDs in batches of 50, then calls the StopJobs OData action. Supports SoftStop and Kill strategies. Also adds text responseType handling to api-client for endpoints returning empty 200 responses. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.



Method Added
jobs.stop()stop(jobKeys: string[], folderId: number, options?: JobStopOptions): Promise<OperationResponse<JobStopData>>Endpoint Called
stop()(resolve)/orchestrator_/odata/JobsOR.Jobsstop()(action)/orchestrator_/odata/Jobs/UiPath.Server.Configuration.OData.StopJobsOR.JobsFolderScopedService— setsX-UIPATH-OrganizationUnitIdheaderSoftStop(graceful) andKill(forceful) strategies via existingStopStrategyenumExample Usage
API Response vs SDK Response
Composition flow
Additional fix
Added
responseType: 'text'handling toapi-client.tsfor endpoints returning empty HTTP 200 bodies (StopJobs returns 200 with no body, not 204).Files
src/utils/constants/endpoints/orchestrator.tssrc/models/orchestrator/jobs.types.tssrc/models/orchestrator/jobs.models.tssrc/services/orchestrator/jobs/jobs.tssrc/core/http/api-client.ts(text responseType support)tests/unit/services/orchestrator/jobs.test.ts(12 tests)tests/integration/shared/orchestrator/jobs.integration.test.ts(5 tests)tests/utils/constants/jobs.tsdocs/oauth-scopes.mdRefs PLT-100574
🤖 Auto-generated using onboarding skills