Confirm this is a TypeScript library issue and not an underlying Cloudflare API issue
Describe the bug
Sorry if this is a stupid question but doesn't that defeat the purpose of using PATCH ?
I could be confused but it appears the actual API endpoint accepts partial updates e..g. { content: new_ip } but the API definition requires ttl, name, and type making edit and update synonyms.
If the actual API endpoint accepts partials then the API should allow them too e.g. RecordEditParams should be defined with ?: for everything except zoneid: rather than being an exact duplicate of RecordUpdateParams.
If I am confused and the partial update is forcing missing settings to some default then the API is currently correct.
Note: Code generation looks correct. It is the actual spec I am questioning.
To Reproduce
Reproduction is simple. This fragment appears to work fine in a production worker:
await creds.cloudflare.dns.records.edit(dnsid, {
zone_id: creds.zoneid,
content: ip,
})
But when compiled with tsc it refuses to build due to the missing mandatory fields.
Code snippets
OS
Ubuntu 22.04
Runtime version
Typescript 7.0.2
Library version
cloudflare 7.0.0 cloudflare/types 7.0.1 cloudflare/workers-types 5.20260801.1
Confirm this is a TypeScript library issue and not an underlying Cloudflare API issue
Describe the bug
Sorry if this is a stupid question but doesn't that defeat the purpose of using PATCH ?
I could be confused but it appears the actual API endpoint accepts partial updates e..g. { content: new_ip } but the API definition requires ttl, name, and type making edit and update synonyms.
If the actual API endpoint accepts partials then the API should allow them too e.g. RecordEditParams should be defined with ?: for everything except zoneid: rather than being an exact duplicate of RecordUpdateParams.
If I am confused and the partial update is forcing missing settings to some default then the API is currently correct.
Note: Code generation looks correct. It is the actual spec I am questioning.
To Reproduce
Reproduction is simple. This fragment appears to work fine in a production worker:
But when compiled with tsc it refuses to build due to the missing mandatory fields.
Code snippets
OS
Ubuntu 22.04
Runtime version
Typescript 7.0.2
Library version
cloudflare 7.0.0 cloudflare/types 7.0.1 cloudflare/workers-types 5.20260801.1