shotstack-sdk-node icon indicating copy to clipboard operation
shotstack-sdk-node copied to clipboard

Typescript type definitions

Open unlimitedcoder2 opened this issue 5 years ago • 4 comments

I was hoping to be able to add typescript types using this. But I cannot find where the openapi document is located. Would you be able to add typescript types or point me in the direction of where I can generate my own?

unlimitedcoder2 avatar Oct 31 '20 14:10 unlimitedcoder2

@unlimitedcoder2 is this what you are looking for: https://github.com/shotstack/oas-api-definition

Our Swagger (Open API 3) yaml file is here: https://github.com/shotstack/oas-api-definition/blob/main/api.oas3.yaml

We also use the OpenAPI generator tool to generate our SDKs but there are always a few things we need to manually fix up each time to get them the way we want. We welcome any contributions or feedback.

Hopefully you can use that to create the TS definitions.

jeffski avatar Dec 30 '20 02:12 jeffski

@jeffski we're actively considering shotstack for a high-volume trimming solution. Dedicated and shipped TypeScript types for SDKs are a major consideration during our evaluation. It's definitely a negative that the SDK doesn't ship with those, and the request was made four years ago. TypeScript is absolutely first-class these days.

Pointing users to the Open API spec is nice, but not so nice when it doesn't validate (https://raw.githubusercontent.com/shotstack/oas-api-definition/main/api.oas3.yaml doesn't validate with https://validator.swagger.io/) because codegen tools won't work with that.

Offloading some required DX for developers isn't great.

As an aside, we're also a bit concerned that the SDK hasn't received updates in two years, while the product certainly has improved and the API expanded over that time. If the SDK isn't being actively maintained, perhaps it should be archived?

shellscape avatar Mar 25 '24 15:03 shellscape

Working on this now but will be a week or so before it's released.

jeffski avatar Apr 03 '24 12:04 jeffski

@jeffski Any update on the Typescript types here? Should we think of this SDK as a primary way to access Shotstack, or should I rely on the APIs directly?

akhilgupta1093 avatar Mar 06 '25 22:03 akhilgupta1093