firebase / firebase/firebase-admin-node
Why isn't the response of FunctionsApiClient.enqueue returned?
- Dominant language
- TypeScript
- Stars
- 1.7k
- Forks
- 419
- Avg merge
- 3d 10h
- Merged PRs (30d)
- 16
Description
Here:
https://github.com/firebase/firebase-admin-node/blame/83585498d9bd48b9ba715a882a3b9c951ca8422d/src/functions/functions-api-client-internal.ts#L162
```
await this.httpClient.send(request)
```
Or better yet, actually check it, type it, and return it, like the google-cloud library
https://cloud.google.com/nodejs/docs/reference/tasks/latest/tasks/v2.cloudtasksclient#_google_cloud_tasks_v2_CloudTasksClient_createTask_member_1_
https://github.com/GoogleCloudPlatform/nodejs-docs-samples/blob/0469e1fbf20906aaef01e17b0274c79a0725b9a4/cloud-tasks/snippets/createTask.js#L77
The feat that included this option last year seemed to mention this too. Obviously that's not yet done, and is probably a load of work, so, for the moment, it'd be great if just the response of that is returned, and we can work with that.
Reason I need this is to be able to refer to a created task, to be able to delete it later (functionality I'd also love was added here) - I'd prefer to be able to edit it, specifically the scheduleTime, but that functionality doesn't seem to be available from cloud tasks.
I'm happy to submit a PR returning the response, but wanted to open this issue first, as adding that as a PR would likely get rejected out of hand.
Contributor guide
Research direction
Start in src/functions/functions-api-client-internal.ts at the referenced line and compare the requested behavior with the linked Cloud Tasks client documentation and sample. Check the existing FunctionsApiClient.enqueue contract and coverage, then verify that a successful enqueue exposes the created task response to callers.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- google-cloud, nodejs, typescript
- Domain
- api, backend
- Issue type
- Feature
- Difficulty
- 2/5
- Estimated time
- 1-3 hours
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 42/100