Skip to main content

Cloudflare

@webframp/cloudflarev2026.07.18.2· 19d agoMODELS
01README

Cloudflare management - zones, DNS records, WAF/firewall rules, Workers, and cache/CDN

02Release Notes

2026.07.18.2

Added: An upgrades array entry (no-op) to cache.ts, dns.ts, waf.ts, worker.ts, zone.ts for proper typeVersion tracking on existing instances. No schema or behavior changes.

2026.07.18.1

Changed: Renamed the manifest tags: field to labels: — the schema's actual field name. No runtime or install behavior change.

2026.07.13.1

Changed: Pinned the zod import specifier to npm:zod@4.4.3 across all model files (zone, worker, waf, dns, cache), matching the version used by the rest of the repo. Previously these files pinned 4.3.6. No API or runtime behavior changes — 4.4.3 is a backward-compatible patch.

03Models5
@webframp/cloudflare/zonev2026.07.18.2cloudflare/zone.ts

Global Arguments

ArgumentTypeDescription
apiTokenstringCloudflare API token with Zone read/write permissions
fn list(status?: enum)
List all zones in the account
ArgumentTypeDescription
status?enumFilter by zone status
fn get(zoneId: string)
Get details for a specific zone
ArgumentTypeDescription
zoneIdstringZone ID
fn get_settings(zoneId: string)
Get all settings for a zone
ArgumentTypeDescription
zoneIdstringZone ID
fn update_setting(zoneId: string, setting: string, value: unknown)
Update a specific zone setting
ArgumentTypeDescription
zoneIdstringZone ID
settingstringSetting name (e.g., 'ssl', 'cache_level', 'minify')
valueunknownNew value for the setting
fn pause(zoneId: string)
Pause a zone (disable Cloudflare proxy)
ArgumentTypeDescription
zoneIdstringZone ID
fn unpause(zoneId: string)
Unpause a zone (enable Cloudflare proxy)
ArgumentTypeDescription
zoneIdstringZone ID

Resources

zones(infinite)— List of all zones in the account
zone(infinite)— Single zone details
settings(infinite)— Zone settings (caching, SSL, etc.)
@webframp/cloudflare/dnsv2026.07.18.2cloudflare/dns.ts

Global Arguments

ArgumentTypeDescription
apiTokenstringCloudflare API token with DNS read/write permissions
zoneIdstringZone ID to manage DNS records for
fn list(type?: enum, name?: string)
List all DNS records in the zone
ArgumentTypeDescription
type?enumFilter by record type
name?stringFilter by record name (exact match)
fn get(recordId: string)
Get a specific DNS record
ArgumentTypeDescription
recordIdstringDNS record ID
fn create(type: enum, name: string, content: string, ttl: number, proxied: boolean, priority?: number, comment?: string)
Create a new DNS record
ArgumentTypeDescription
typeenumRecord type
namestringRecord name (e.g., 'www' or '@' for root)
contentstringRecord content (IP address, hostname, etc.)
ttlnumberTTL in seconds (1 = auto)
proxiedbooleanEnable Cloudflare proxy (orange cloud)
priority?numberPriority (required for MX records)
comment?stringComment for the record
fn update(recordId: string, type: enum, name: string, content: string, ttl: number, proxied: boolean, priority?: number, comment?: string)
Update an existing DNS record
ArgumentTypeDescription
recordIdstringDNS record ID to update
typeenumRecord type
namestringRecord name
contentstringRecord content
ttlnumberTTL in seconds (1 = auto)
proxiedbooleanEnable Cloudflare proxy
priority?numberPriority (for MX records)
comment?stringComment for the record
fn delete(recordId: string)
Delete a DNS record
ArgumentTypeDescription
recordIdstringDNS record ID to delete
fn export()
Export all DNS records in BIND format

Resources

records(infinite)— List of DNS records for the zone
record(infinite)— Single DNS record

Files

export(text/plain)— DNS records exported in BIND zone file format
@webframp/cloudflare/wafv2026.07.18.2cloudflare/waf.ts

Global Arguments

ArgumentTypeDescription
apiTokenstringCloudflare API token with Firewall read/write permissions
zoneIdstringZone ID to manage firewall rules for
fn list_rules()
List all firewall rules
fn create_rule(expression: string, action: enum, description?: string, priority?: number, paused: boolean)
Create a new firewall rule
ArgumentTypeDescription
expressionstringFirewall expression (e.g., 'ip.src eq 1.2.3.4' or 'http.request.uri.path contains \
actionenumAction to take when rule matches
description?stringHuman-readable description
priority?numberRule priority (lower = higher priority)
pausedbooleanCreate rule in paused state
fn delete_rule(ruleId: string)
Delete a firewall rule
ArgumentTypeDescription
ruleIdstringFirewall rule ID to delete
fn toggle_rule(ruleId: string, paused: boolean)
Pause or unpause a firewall rule
ArgumentTypeDescription
ruleIdstringFirewall rule ID
pausedbooleanSet to true to pause, false to enable
fn list_packages()
List WAF packages (managed rulesets)
fn get_security_events(limit: number)
Get recent security events (blocks, challenges, etc.)
ArgumentTypeDescription
limitnumberMaximum number of events to fetch

Resources

rules(infinite)— Firewall rules for the zone
rule(infinite)— Single firewall rule
packages(infinite)— WAF packages (managed rulesets)
events(7d)— Recent security events
@webframp/cloudflare/workerv2026.07.18.2cloudflare/worker.ts

Global Arguments

ArgumentTypeDescription
apiTokenstringCloudflare API token with Workers read/write permissions
accountIdstringCloudflare account ID
fn list_scripts()
List all Worker scripts in the account
fn get_script(scriptName: string)
Get Worker script metadata and source code
ArgumentTypeDescription
scriptNamestringWorker script name
fn deploy(scriptName: string, script: string, bindings?: array)
Deploy a Worker script
ArgumentTypeDescription
scriptNamestringWorker script name
scriptstringJavaScript/TypeScript source code
bindings?arrayEnvironment bindings
fn delete_script(scriptName: string)
Delete a Worker script
ArgumentTypeDescription
scriptNamestringWorker script name to delete
fn list_routes(zoneId: string)
List Worker routes for a zone
ArgumentTypeDescription
zoneIdstringZone ID
fn create_route(zoneId: string, pattern: string, scriptName: string)
Create a Worker route
ArgumentTypeDescription
zoneIdstringZone ID
patternstringRoute pattern (e.g., 'example.com/*')
scriptNamestringWorker script name to execute
fn delete_route(zoneId: string, routeId: string)
Delete a Worker route
ArgumentTypeDescription
zoneIdstringZone ID
routeIdstringRoute ID to delete
fn toggle_subdomain(scriptName: string, enabled: boolean)
Enable or disable workers.dev subdomain for a Worker script
ArgumentTypeDescription
scriptNamestringWorker script name
enabledbooleanEnable or disable workers.dev subdomain

Resources

scripts(infinite)— List of Worker scripts in the account
script(infinite)— Single Worker script metadata
routes(infinite)— Worker routes for a zone
deployment(infinite)— Worker deployment result

Files

source(application/javascript)— Worker script source code
@webframp/cloudflare/cachev2026.07.18.2cloudflare/cache.ts

Global Arguments

ArgumentTypeDescription
apiTokenstringCloudflare API token with Cache Purge permissions
zoneIdstringZone ID to manage cache for
fn purge_all()
Purge all cached content for the zone
fn purge_urls(urls: array)
Purge specific URLs from cache
ArgumentTypeDescription
urlsarrayList of URLs to purge (max 30)
fn purge_tags(tags: array)
Purge cache by Cache-Tag headers (Enterprise only)
ArgumentTypeDescription
tagsarrayList of Cache-Tag values to purge
fn purge_prefixes(prefixes: array)
Purge cache by URL prefixes (Enterprise only)
ArgumentTypeDescription
prefixesarrayList of URL prefixes to purge
fn get_settings()
Get cache-related settings for the zone
fn set_cache_level(level: enum)
Set the cache level for the zone
ArgumentTypeDescription
levelenumCache level: bypass (no cache), basic, simplified, or aggressive
fn toggle_dev_mode(enabled: boolean)
Toggle development mode (bypasses cache for 3 hours)
ArgumentTypeDescription
enabledbooleanEnable or disable development mode
fn get_analytics(since: string, until: string)
Get cache analytics (hit rate, bandwidth)
ArgumentTypeDescription
sincestringStart time (minutes ago, e.g., '-1440' for last 24h)
untilstringEnd time (minutes ago, '0' for now)

Resources

purge(7d)— Cache purge operation result
settings(infinite)— Cache-related zone settings
analytics(1d)— Cache analytics and hit rates
04Previous Versions14
2026.07.18.1

2026.07.18.1

Changed: Renamed the manifest tags: field to labels: — the schema's actual field name. No runtime or install behavior change.

2026.07.13.1

Changed: Pinned the zod import specifier to npm:zod@4.4.3 across all model files (zone, worker, waf, dns, cache), matching the version used by the rest of the repo. Previously these files pinned 4.3.6. No API or runtime behavior changes — 4.4.3 is a backward-compatible patch.

updated labels

2026.07.13.1

2026.07.13.1

Changed: Pinned the zod import specifier to npm:zod@4.4.3 across all model files (zone, worker, waf, dns, cache), matching the version used by the rest of the repo. Previously these files pinned 4.3.6. No API or runtime behavior changes — 4.4.3 is a backward-compatible patch.

2026.06.27.1

2026.06.27.1

Fixed: Removed stale "zod": "npm:zod@4.3.6" alias from deno.json imports map. All source files already used direct npm:zod@4.3.6 specifiers; the alias was dead. The scorer's deno doc --lint flagged it as a mismatch, causing the extension to fail scoring (Warning Import "zod" not a dependency).

Upgrade note: If you use @webframp/cloudflare-audit, pull both extensions together — cloudflare-audit@2026.06.27.1 requires cloudflare@2026.06.27.1.

2026.06.26.1

Fixed: get_analytics (cache model) and get_security_events (waf model) now use parameterized GraphQL variables. Previously these methods failed silently due to a query syntax error — they returned empty/zero data instead of actual analytics. After upgrading, expect to see real cache hit-rate and security event data where there was none before.

Added: All paginated methods (zone list, DNS list, WAF rules, WAF packages, worker scripts, worker routes) now log a WARNING when results are truncated at the 1000-item pagination cap. Previously truncation was silent.

Upgrade note: If you use @webframp/cloudflare-audit, pull both extensions together — cloudflare-audit@2026.06.26.1 requires cloudflare@2026.06.26.1.

2026.06.26.1
2026.06.21.1
2026.06.16.1
2026.06.15.1
2026.05.27.1
2026.05.20.1
2026.04.22.1
2026.04.13.1
2026.03.31.2
2026.03.31.1
2026.03.28.1
05Stats
A
100 / 100
Downloads
774
Archive size
27.9 KB
  • Has README or module doc2/2earned
  • README has a code example1/1earned
  • README is substantive1/1earned
  • Most symbols documented1/1earned
  • No slow types (deprecated)1/1earned
  • Dependencies pass trust audit2/2earned
  • Has description1/1earned
  • Platform support declared (or universal)2/2earned
  • License declared1/1earned
  • Verified public repository2/2earned
06Platforms
07Labels