dropbox / dropbox/dropbox-sdk-js
feat: add possibility to request for all (`filesSaveUrl`) jobs (optionally filtered)
- Dominant language
- JavaScript
- Stars
- 970
- Forks
- 353
- Avg merge
- 9h 3m
- Merged PRs (30d)
- 2
Description
## Why is this feature valuable to you? Does it solve a problem you're having?
I'm currently uploading some files to Dropbox using the `filesSaveUrl` method.
It seems like the the `filesSaveUrl` method always launches an async job, so the return type of these requests are all of type `LaunchResultBaseAsyncJobId`.
There's currently no way on getting all the launched jobs, so I have to somehow persist these `AsyncJobId`'s and call `filesSaveUrlCheckJobStatus` after that.
## Describe the solution you'd like
I'd like to propose a new `filesSaveUrlCheckJobStatuses` that will give me all the statuses of my launched jobs.
Adding a filter so I can only see the `pending`/`failed` jobs would be a good addition too.
```js
const dropbox = new Dropbox({ accessToken: process.env.DROPBOX_TOKEN });
dropbox.filesSaveUrlCheckJobStatuses({ filter: { '.tag': ['in_progress', 'failed'] } });
```
## Describe alternatives you've considered
Persist all `AsyncJobId`'s and call `filesSaveUrlCheckJobStatus` for each `AsyncJobId`
Contributor guide
Research direction
Start by tracing the existing filesSaveUrl and filesSaveUrlCheckJobStatus entry points in the JavaScript SDK, then determine how the proposed filesSaveUrlCheckJobStatuses operation should expose all launched jobs. Confirm the unfiltered behavior and the requested pending or failed filtering, with completion shown for both cases.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- javascript
- Domain
- api
- Issue type
- Feature
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100