Closed terinjokes closed 7 months ago
Hi @terinjokes,
I've attempted creating a TypeScript client for Cloudflare API. As of now only user & user-token APIs are created and test cases are added for the same as well.
I know the code needs quite a lot of work for being better organized & tested, however, I wanted to share it with you in case if it makes sense to use it as a base or maybe if there's a way I could contribute towards the approach you are going ahead with.
The approach I have taken is
cf.userToken.details(identifier);
.Any news?
Any news?
Ditto
We should have TypeScript support in the next major version of this client, which is redesigned to be easier to update.
I'll accept contributions to this version.
Not sure if this work is still planned, but for folks coming to this issue, another alternative is Pulumi which has typescript bindings (plus other languages) https://www.pulumi.com/docs/intro/cloud-providers/cloudflare/
Yep, still planned.
Not sure if it's related but currently the client initialization causes a type error:
Value of type 'typeof Cloudflare' is not callable. Did you mean to include 'new'?ts(2348)
with the code:
const cloudflare = require('cloudflare')({
email: 'email',
key: 'key',
});
Couldn't find a workaround.
Hello !
We are in 2023, Im starting implementing Cloudflare API and before writing from scratch I jumped here. It seems to not really be updated ?
Without typescript and an SDK up to date I think it preferable to write from scratch.
Any news ?
I'm in the proccess of generating clients we can better support from our new OpenAPI schemas. I don't have any news on when they'll be available, but it is being worked on.
I also need to use the API preferably with typescript support. Please let me know when there's an ETA =).
@terinjokes Any progress on new OpenAPI generated clients? Has that work stagnated?
For reference: OpenAPI schemas are here: https://github.com/cloudflare/api-schemas
To help aid in better documentation and autocomplete in editors (#59), I'd like to begin to using TypeScript. Packages pushed to npm would be compiled to JavaScript and include the "*.d.ts" files.
This is mostly a tracking ticket for this work.