Skip to content

feat: runs.retrieve() is missing requestOptions param #2769

@madebyfabian

Description

@madebyfabian

Is your feature request related to a problem? Please describe.

Hi there! :)

Some methods like tasks.trigger() do accept a requestOptions param (the 4th in this case, TriggerApiRequestOptions). This supports for example setting { clientConfig: ... }.

await tasks.trigger(taskId, undefined, { tags: ['...'] }, { clientConfig: { accessToken } })

Others however do not accept any clientConfig:

await runs.retrieve(runId, ) <- does not accept `requestOptions`

I was wondering if this was by choice or just missing parameters/types.
Because in my case, I cannot use the configure() method to apply the accessToken. I have two trigger projects which I both use in my project. Since I have parallel requests (React server actions), the configure() is not correctly applied to the requests, even though if I call it directly before each request.

Describe the solution you'd like to see

If this is a mistake, than this is a feature request and Ideally, all SDK API methods would be streamlined to support the requestOptions param.

Describe alternate solutions

  • I currently use the HTTP API directly with fetch now. However, I noticed that the docs on these seem outdated, the status enum documented differs from what the 4.1.0 SDK returns as types.

Additional information

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions