Skip to content

Several typing issues found in the client #526

Open
@vladfrangu

Description

@vladfrangu

While rewriting the tests for apify-cli, I've encountered several issues with the types for ActorVersion (and I am partly to blame):

  • enums are not exported but are used in concrete types (this is very bad as we don't provide string fallbacks, and thus people require casts)
    • solutions: either export the enum and use it, reference the types as imported from @apify/consts, or move to raw strings only
  • ActorVersionSourceFile seems to be missing the folder boolean (this type is used in ActorVersionSourceFiles, and seems to signal a folder of files)
  • keyValueStore(store.id).setRecord doesn't allow buffers
  • version(version).update has a wrong type (also reported https://apify.slack.com/archives/C0L33UM7Z/p1709550430797429)
  • builds lack newer fields, like buildNumber, build.stats?.computeUnits and build.stats?.imageSizeBytes being concretely typed

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions