Skip to content

Result types are missing fields the API returns #999

Description

@B4nan

While writing the integration test suite (#995) we hit four places where the declared result types don't match what the API returns. Each test site works around it with a local cast shape plus a comment, and those casts should be retired once the types catch up:

  • ScheduleClient.getLog() is declared as Promise<string | undefined>, but the API responds with an array of log entries (src/resource_clients/schedule.ts).
  • ActorCollectionListItem doesn't declare the stats object (e.g. stats.lastRunStartedAt) returned by the actor listing endpoint (src/resource_clients/actor_collection.ts).
  • BuildCollectionClientListItem doesn't declare actId, which the builds listing endpoint returns (src/resource_clients/build_collection.ts).
  • RequestQueueClientGetRequestResult doesn't declare userData, which getRequest() returns (src/resource_clients/request_queue.ts).

The workaround sites are easy to find: grep -rn "does not declare" test/integration/.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

t-toolingIssues with this label are in the ownership of the tooling team.

Type

No type

Projects

No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions