Skip to content

Generate and use classes for each seam resource #157

Open
@razor-x

Description

@razor-x

This issue is a draft. The approach is being refined and should not be implemented until after #73

Currently each method returns an Promise for a SeamHttpRequest which resolves to an object types using the route spec.

This is nice because the types provide the interface without additional codegen. This mostly helps TypeScript consumers.

However, other SDKs wrap all responses in a typed class by generating models. This SDK should follow the same pattern:

  1. This provides a strict interface for JS consumers.
  2. This enables Seam to enforce LTS changes at the SDK level before properties are removed from the API response.

Instead of using a class, we may be able to get a similar result by passing the method args and return though the zod.parse methods.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions