Skip to content

Split out types into its own package #195

@tombeckenham

Description

@tombeckenham

Right now new models on fal are coming out every day - perhaps every hour. The client library includes both runtime code and all the endpoint types. As it includes runtime code, consumers of that library may find it tough to update regularly, and it's tough to compeltely automate deployment of that library with automated tests alone.

I propose creating a new @fal-al/types npm library that just includes the endpoint types. This should be imported as a dev and peer dependency of the @fal-ai/client - not a dependency. By isolating the types into its own libary - and restricting it to types only using lint rules - you can develop automated workflows to release new versions the second new models are released.

As the types library would be is types only, it would safe for fal customers to import it using the "latest" tag - without worry about code changes creeping through.

Customers would need to include both the types and client in their apps.

before:

  "dependencies": {
    "@fal-ai/client": "^1.9.0"
  },

after:

  "dependencies": {
    "@fal-ai/client": "^1.9.0"
  },
  "devDependencies": {
    "@fal-ai/types": "latest"
  }

@drochetti / @aykutkardas - I'd be happy to look at this. Can the backend generate a single big openapi doc of all the endpoints?

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