v3.0.0 Beta #135
Replies: 14 comments 18 replies
-
Would love it if this was tree-shakeable! (ie, if you only want to talk to the workers API, then you should be able to bundle your JS app with only the files needed to do that) |
Beta Was this translation helpful? Give feedback.
-
I'm observing some minor type issues with the custom-hostname resource:
thanks! |
Beta Was this translation helpful? Give feedback.
-
It appears that listing queues is not paginatable? What's up with that? |
Beta Was this translation helpful? Give feedback.
-
I can’t find a method for editing stream videos, is it missing? |
Beta Was this translation helpful? Give feedback.
-
Attempting to pass in the native global new Cloudflare({
apiToken: process.env.["SOMETHING"],
fetch,
});
|
Beta Was this translation helpful? Give feedback.
-
Hi ! Method having a confusing signatureThe method asks for a body, i would have expected that it is the object containing the vecotrs to upsert, but the object is actually un-used : The special case of
|
Beta Was this translation helpful? Give feedback.
-
|
Beta Was this translation helpful? Give feedback.
-
Hi there, I’m currently trying to migrate our Cloudflare integration to this package. However, right now, our blocker is the custom hostname API response type. It’s severely lacking in v3.0.0, but I see the issue being fixed in v3.1.0. I am specifically referring to the Hostname status as highlighted in the Custom Hostname docs
Here’s the API Reference: The release seemed imminent at the time, so I put a lid on it, but seeing that there has been no maintainer activity on the new release and after receiving no response on my previous inquiries, I thought I'd raise the issue here for clarification before moving forward with a custom patch. Is there an ETA for v3.1.0? |
Beta Was this translation helpful? Give feedback.
-
Hey, I see that the Analytics engine endpoints are missing |
Beta Was this translation helpful? Give feedback.
-
Direct Uploads do not correctly parse the params into a multipart form body. NodeJS: v21.7.3
|
Beta Was this translation helpful? Give feedback.
-
TUS Upload returns no information. Looks like its because there is no response body and the data is sent in the headers. Node v20.13.1
|
Beta Was this translation helpful? Give feedback.
-
@jacobbednarz What happened to WorkerRoutes from 3.0.0 to 3.1.0/3.2.0? Are they renamed or has the functionality moved outside of workers ? |
Beta Was this translation helpful? Give feedback.
-
I can't send v3.2.0 According to the documentation, it is necessary to send Content-Type: application/x-ndjson, but there does not appear to be a mechanism for sending ndjson in this client. https://developers.cloudflare.com/api/operations/vectorize-insert-vector This code does not work. import Cloudflare from "cloudflare";
const cf = new Cloudflare({ apiToken: 'my-token'});
const vectors: VectorizeVector[] = [{
id: '1',
values: [0, 0, 1]
}]
await cf.vectorize.indexes.insert("my-embeddings-index", {
account_id: 'my-id',
body: vectors.map((vector) => JSON.stringify(vector)).join('\n'),
});
// error: Uncaught (in promise) Error: 400 {"result":null,"success":false,"errors":[{"code":1005,"message":"vectorize.unknown_content_type"}],"messages":[]} Overriding headers or body with a third argument did not work. My work aroundFetching direct is here https://gist.github.com/mizchi/95fe46c39a2a6248eca3d3035567ef27#file-run-cfai-ts-L36-L51 |
Beta Was this translation helpful? Give feedback.
-
v3.2.0 Auth credentials are required for the IP list api in order to pass validation when that specific api doesn't require auth. const Cloudflare = require('cloudflare')
async function main() {
const cloudflare = new Cloudflare()
console.log(await cloudflare.ips.list())
}
main() produces the following error
Workaround const Cloudflare = require('cloudflare')
async function main() {
const cloudflare = new Cloudflare({
apiToken: 'dummy_value'
})
console.log(await cloudflare.ips.list())
}
main() works and prints out the IP ranges. When calling additional APIs that require a token, setting a real token on the client will naturally avoid this issue. For use cases where this is the only API being called however, using a real token leads to having an additional token to secure and manage which isn't ideal when the token is unnecessary. The equivalent functionality in the SDK for go https://pkg.go.dev/github.com/cloudflare/cloudflare-go#IPs doesn't require credentials and will work without any credential values being set package main
import (
"log"
"github.com/cloudflare/cloudflare-go"
)
func main() {
ranges, err := cloudflare.IPs()
if err != nil {
log.Fatalln(err)
}
log.Println(ranges)
} |
Beta Was this translation helpful? Give feedback.
-
Warning
v3.x
of this library is a ground-up rewrite of the SDK, using code generation from our OpenAPI spec.This package should be in a usable state for many projects, but expect frequent minor breaking
changes as we rename methods and types until GA. If this isn't suitable for you project, we recommend
pinning to the
2.x
releases for now.We're working on a new major version of our SDK and are excited to have you test it!
Please use this discussion page as a place to report issues and feedback about the new release.
Install
Things we would like feedback on
Beta Was this translation helpful? Give feedback.
All reactions