@distilled.cloud/cloudflare 0.0.0 → 0.2.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +41 -7
- package/lib/auth.d.ts +13 -0
- package/lib/auth.d.ts.map +1 -0
- package/lib/auth.js +12 -0
- package/lib/auth.js.map +1 -0
- package/lib/category.d.ts +2 -0
- package/lib/category.d.ts.map +1 -0
- package/lib/category.js +2 -0
- package/lib/category.js.map +1 -0
- package/lib/client/api.d.ts +14 -0
- package/lib/client/api.d.ts.map +1 -0
- package/lib/client/api.js +245 -0
- package/lib/client/api.js.map +1 -0
- package/lib/client/index.d.ts +8 -0
- package/lib/client/index.d.ts.map +1 -0
- package/lib/client/index.js +8 -0
- package/lib/client/index.js.map +1 -0
- package/lib/credentials.d.ts +14 -0
- package/lib/credentials.d.ts.map +1 -0
- package/lib/credentials.js +17 -0
- package/lib/credentials.js.map +1 -0
- package/lib/errors.d.ts +37 -0
- package/lib/errors.d.ts.map +1 -0
- package/lib/errors.js +31 -0
- package/lib/errors.js.map +1 -0
- package/lib/index.d.ts +10 -0
- package/lib/index.d.ts.map +1 -0
- package/lib/index.js +10 -0
- package/lib/index.js.map +1 -0
- package/lib/retry.d.ts +14 -0
- package/lib/retry.d.ts.map +1 -0
- package/lib/retry.js +14 -0
- package/lib/retry.js.map +1 -0
- package/lib/schemas.d.ts +29 -0
- package/lib/schemas.d.ts.map +1 -0
- package/lib/schemas.js +34 -0
- package/lib/schemas.js.map +1 -0
- package/lib/services/abuse-reports.d.ts +224 -0
- package/lib/services/abuse-reports.d.ts.map +1 -0
- package/lib/services/abuse-reports.js +353 -0
- package/lib/services/abuse-reports.js.map +1 -0
- package/lib/services/accounts.d.ts +682 -0
- package/lib/services/accounts.d.ts.map +1 -0
- package/lib/services/accounts.js +805 -0
- package/lib/services/accounts.js.map +1 -0
- package/lib/services/acm.d.ts +73 -0
- package/lib/services/acm.d.ts.map +1 -0
- package/lib/services/acm.js +76 -0
- package/lib/services/acm.js.map +1 -0
- package/lib/services/addressing.d.ts +1208 -0
- package/lib/services/addressing.d.ts.map +1 -0
- package/lib/services/addressing.js +1776 -0
- package/lib/services/addressing.js.map +1 -0
- package/lib/services/ai-gateway.d.ts +956 -0
- package/lib/services/ai-gateway.d.ts.map +1 -0
- package/lib/services/ai-gateway.js +1706 -0
- package/lib/services/ai-gateway.js.map +1 -0
- package/lib/services/ai.d.ts +243 -0
- package/lib/services/ai.d.ts.map +1 -0
- package/lib/services/ai.js +299 -0
- package/lib/services/ai.js.map +1 -0
- package/lib/services/aisearch.d.ts +915 -0
- package/lib/services/aisearch.d.ts.map +1 -0
- package/lib/services/aisearch.js +2425 -0
- package/lib/services/aisearch.js.map +1 -0
- package/lib/services/alerting.d.ts +718 -0
- package/lib/services/alerting.d.ts.map +1 -0
- package/lib/services/alerting.js +1388 -0
- package/lib/services/alerting.js.map +1 -0
- package/lib/services/api-gateway.d.ts +830 -0
- package/lib/services/api-gateway.d.ts.map +1 -0
- package/lib/services/api-gateway.js +1548 -0
- package/lib/services/api-gateway.js.map +1 -0
- package/lib/services/argo.d.ts +101 -0
- package/lib/services/argo.d.ts.map +1 -0
- package/lib/services/argo.js +105 -0
- package/lib/services/argo.js.map +1 -0
- package/lib/services/audit-logs.d.ts +46 -0
- package/lib/services/audit-logs.d.ts.map +1 -0
- package/lib/services/audit-logs.js +37 -0
- package/lib/services/audit-logs.js.map +1 -0
- package/lib/services/billing.d.ts +62 -0
- package/lib/services/billing.d.ts.map +1 -0
- package/lib/services/billing.js +100 -0
- package/lib/services/billing.js.map +1 -0
- package/lib/services/bot-management.d.ts +124 -0
- package/lib/services/bot-management.d.ts.map +1 -0
- package/lib/services/bot-management.js +262 -0
- package/lib/services/bot-management.js.map +1 -0
- package/lib/services/botnet-feed.d.ts +65 -0
- package/lib/services/botnet-feed.d.ts.map +1 -0
- package/lib/services/botnet-feed.js +84 -0
- package/lib/services/botnet-feed.js.map +1 -0
- package/lib/services/brand-protection.d.ts +188 -0
- package/lib/services/brand-protection.d.ts.map +1 -0
- package/lib/services/brand-protection.js +214 -0
- package/lib/services/brand-protection.js.map +1 -0
- package/lib/services/browser-rendering.d.ts +857 -0
- package/lib/services/browser-rendering.d.ts.map +1 -0
- package/lib/services/browser-rendering.js +1141 -0
- package/lib/services/browser-rendering.js.map +1 -0
- package/lib/services/cache.d.ts +287 -0
- package/lib/services/cache.d.ts.map +1 -0
- package/lib/services/cache.js +330 -0
- package/lib/services/cache.js.map +1 -0
- package/lib/services/calls.d.ts +202 -0
- package/lib/services/calls.d.ts.map +1 -0
- package/lib/services/calls.js +175 -0
- package/lib/services/calls.js.map +1 -0
- package/lib/services/certificate-authorities.d.ts +40 -0
- package/lib/services/certificate-authorities.d.ts.map +1 -0
- package/lib/services/certificate-authorities.js +49 -0
- package/lib/services/certificate-authorities.js.map +1 -0
- package/lib/services/client-certificates.d.ts +254 -0
- package/lib/services/client-certificates.d.ts.map +1 -0
- package/lib/services/client-certificates.js +350 -0
- package/lib/services/client-certificates.js.map +1 -0
- package/lib/services/cloud-connector.d.ts +59 -0
- package/lib/services/cloud-connector.d.ts.map +1 -0
- package/lib/services/cloud-connector.js +84 -0
- package/lib/services/cloud-connector.js.map +1 -0
- package/lib/services/cloudforce-one.d.ts +1318 -0
- package/lib/services/cloudforce-one.d.ts.map +1 -0
- package/lib/services/cloudforce-one.js +1684 -0
- package/lib/services/cloudforce-one.js.map +1 -0
- package/lib/services/connectivity.d.ts +248 -0
- package/lib/services/connectivity.d.ts.map +1 -0
- package/lib/services/connectivity.js +377 -0
- package/lib/services/connectivity.js.map +1 -0
- package/lib/services/content-scanning.d.ts +131 -0
- package/lib/services/content-scanning.d.ts.map +1 -0
- package/lib/services/content-scanning.js +156 -0
- package/lib/services/content-scanning.js.map +1 -0
- package/lib/services/custom-certificates.d.ts +211 -0
- package/lib/services/custom-certificates.d.ts.map +1 -0
- package/lib/services/custom-certificates.js +309 -0
- package/lib/services/custom-certificates.js.map +1 -0
- package/lib/services/custom-hostnames.d.ts +525 -0
- package/lib/services/custom-hostnames.d.ts.map +1 -0
- package/lib/services/custom-hostnames.js +1164 -0
- package/lib/services/custom-hostnames.js.map +1 -0
- package/lib/services/custom-nameservers.d.ts +67 -0
- package/lib/services/custom-nameservers.d.ts.map +1 -0
- package/lib/services/custom-nameservers.js +80 -0
- package/lib/services/custom-nameservers.js.map +1 -0
- package/lib/services/custom-pages.d.ts +74 -0
- package/lib/services/custom-pages.d.ts.map +1 -0
- package/lib/services/custom-pages.js +125 -0
- package/lib/services/custom-pages.js.map +1 -0
- package/lib/services/d1.d.ts +326 -0
- package/lib/services/d1.d.ts.map +1 -0
- package/lib/services/d1.js +448 -0
- package/lib/services/d1.js.map +1 -0
- package/lib/services/dcv-delegation.d.ts +24 -0
- package/lib/services/dcv-delegation.d.ts.map +1 -0
- package/lib/services/dcv-delegation.js +24 -0
- package/lib/services/dcv-delegation.js.map +1 -0
- package/lib/services/diagnostics.d.ts +175 -0
- package/lib/services/diagnostics.d.ts.map +1 -0
- package/lib/services/diagnostics.js +273 -0
- package/lib/services/diagnostics.js.map +1 -0
- package/lib/services/dns-firewall.d.ts +288 -0
- package/lib/services/dns-firewall.d.ts.map +1 -0
- package/lib/services/dns-firewall.js +373 -0
- package/lib/services/dns-firewall.js.map +1 -0
- package/lib/services/dns.d.ts +2946 -0
- package/lib/services/dns.d.ts.map +1 -0
- package/lib/services/dns.js +4511 -0
- package/lib/services/dns.js.map +1 -0
- package/lib/services/durable-objects.d.ts +61 -0
- package/lib/services/durable-objects.d.ts.map +1 -0
- package/lib/services/durable-objects.js +66 -0
- package/lib/services/durable-objects.js.map +1 -0
- package/lib/services/email-routing.d.ts +542 -0
- package/lib/services/email-routing.d.ts.map +1 -0
- package/lib/services/email-routing.js +662 -0
- package/lib/services/email-routing.js.map +1 -0
- package/lib/services/email-security.d.ts +1131 -0
- package/lib/services/email-security.d.ts.map +1 -0
- package/lib/services/email-security.js +2065 -0
- package/lib/services/email-security.js.map +1 -0
- package/lib/services/filters.d.ts +157 -0
- package/lib/services/filters.d.ts.map +1 -0
- package/lib/services/filters.js +135 -0
- package/lib/services/filters.js.map +1 -0
- package/lib/services/firewall.d.ts +1080 -0
- package/lib/services/firewall.d.ts.map +1 -0
- package/lib/services/firewall.js +1881 -0
- package/lib/services/firewall.js.map +1 -0
- package/lib/services/healthchecks.d.ts +464 -0
- package/lib/services/healthchecks.d.ts.map +1 -0
- package/lib/services/healthchecks.js +838 -0
- package/lib/services/healthchecks.js.map +1 -0
- package/lib/services/hostnames.d.ts +74 -0
- package/lib/services/hostnames.d.ts.map +1 -0
- package/lib/services/hostnames.js +100 -0
- package/lib/services/hostnames.js.map +1 -0
- package/lib/services/hyperdrive.d.ts +203 -0
- package/lib/services/hyperdrive.d.ts.map +1 -0
- package/lib/services/hyperdrive.js +299 -0
- package/lib/services/hyperdrive.js.map +1 -0
- package/lib/services/iam.d.ts +554 -0
- package/lib/services/iam.d.ts.map +1 -0
- package/lib/services/iam.js +743 -0
- package/lib/services/iam.js.map +1 -0
- package/lib/services/images.d.ts +403 -0
- package/lib/services/images.d.ts.map +1 -0
- package/lib/services/images.js +417 -0
- package/lib/services/images.js.map +1 -0
- package/lib/services/intel.d.ts +768 -0
- package/lib/services/intel.d.ts.map +1 -0
- package/lib/services/intel.js +1179 -0
- package/lib/services/intel.js.map +1 -0
- package/lib/services/ips.d.ts +28 -0
- package/lib/services/ips.d.ts.map +1 -0
- package/lib/services/ips.js +39 -0
- package/lib/services/ips.js.map +1 -0
- package/lib/services/keyless-certificates.d.ts +177 -0
- package/lib/services/keyless-certificates.d.ts.map +1 -0
- package/lib/services/keyless-certificates.js +216 -0
- package/lib/services/keyless-certificates.js.map +1 -0
- package/lib/services/kv.d.ts +339 -0
- package/lib/services/kv.d.ts.map +1 -0
- package/lib/services/kv.js +402 -0
- package/lib/services/kv.js.map +1 -0
- package/lib/services/leaked-credential-checks.d.ts +119 -0
- package/lib/services/leaked-credential-checks.d.ts.map +1 -0
- package/lib/services/leaked-credential-checks.js +130 -0
- package/lib/services/leaked-credential-checks.js.map +1 -0
- package/lib/services/load-balancers.d.ts +1767 -0
- package/lib/services/load-balancers.d.ts.map +1 -0
- package/lib/services/load-balancers.js +3068 -0
- package/lib/services/load-balancers.js.map +1 -0
- package/lib/services/logpush.d.ts +401 -0
- package/lib/services/logpush.d.ts.map +1 -0
- package/lib/services/logpush.js +724 -0
- package/lib/services/logpush.js.map +1 -0
- package/lib/services/logs.d.ts +125 -0
- package/lib/services/logs.d.ts.map +1 -0
- package/lib/services/logs.js +145 -0
- package/lib/services/logs.js.map +1 -0
- package/lib/services/magic-cloud-networking.d.ts +1599 -0
- package/lib/services/magic-cloud-networking.d.ts.map +1 -0
- package/lib/services/magic-cloud-networking.js +5205 -0
- package/lib/services/magic-cloud-networking.js.map +1 -0
- package/lib/services/magic-network-monitoring.d.ts +379 -0
- package/lib/services/magic-network-monitoring.d.ts.map +1 -0
- package/lib/services/magic-network-monitoring.js +535 -0
- package/lib/services/magic-network-monitoring.js.map +1 -0
- package/lib/services/magic-transit.d.ts +3650 -0
- package/lib/services/magic-transit.d.ts.map +1 -0
- package/lib/services/magic-transit.js +6120 -0
- package/lib/services/magic-transit.js.map +1 -0
- package/lib/services/managed-transforms.d.ts +79 -0
- package/lib/services/managed-transforms.d.ts.map +1 -0
- package/lib/services/managed-transforms.js +107 -0
- package/lib/services/managed-transforms.js.map +1 -0
- package/lib/services/memberships.d.ts +172 -0
- package/lib/services/memberships.d.ts.map +1 -0
- package/lib/services/memberships.js +282 -0
- package/lib/services/memberships.js.map +1 -0
- package/lib/services/mtls-certificates.d.ts +140 -0
- package/lib/services/mtls-certificates.d.ts.map +1 -0
- package/lib/services/mtls-certificates.js +173 -0
- package/lib/services/mtls-certificates.js.map +1 -0
- package/lib/services/network-interconnects.d.ts +410 -0
- package/lib/services/network-interconnects.d.ts.map +1 -0
- package/lib/services/network-interconnects.js +583 -0
- package/lib/services/network-interconnects.js.map +1 -0
- package/lib/services/organizations.d.ts +201 -0
- package/lib/services/organizations.d.ts.map +1 -0
- package/lib/services/organizations.js +355 -0
- package/lib/services/organizations.js.map +1 -0
- package/lib/services/origin-ca-certificates.d.ts +99 -0
- package/lib/services/origin-ca-certificates.d.ts.map +1 -0
- package/lib/services/origin-ca-certificates.js +156 -0
- package/lib/services/origin-ca-certificates.js.map +1 -0
- package/lib/services/origin-post-quantum-encryption.d.ts +50 -0
- package/lib/services/origin-post-quantum-encryption.d.ts.map +1 -0
- package/lib/services/origin-post-quantum-encryption.js +60 -0
- package/lib/services/origin-post-quantum-encryption.js.map +1 -0
- package/lib/services/origin-tls-client-auth.d.ts +273 -0
- package/lib/services/origin-tls-client-auth.d.ts.map +1 -0
- package/lib/services/origin-tls-client-auth.js +401 -0
- package/lib/services/origin-tls-client-auth.js.map +1 -0
- package/lib/services/page-rules.d.ts +773 -0
- package/lib/services/page-rules.d.ts.map +1 -0
- package/lib/services/page-rules.js +1365 -0
- package/lib/services/page-rules.js.map +1 -0
- package/lib/services/page-shield.d.ts +426 -0
- package/lib/services/page-shield.d.ts.map +1 -0
- package/lib/services/page-shield.js +484 -0
- package/lib/services/page-shield.js.map +1 -0
- package/lib/services/pages.d.ts +1654 -0
- package/lib/services/pages.d.ts.map +1 -0
- package/lib/services/pages.js +2954 -0
- package/lib/services/pages.js.map +1 -0
- package/lib/services/pipelines.d.ts +1461 -0
- package/lib/services/pipelines.d.ts.map +1 -0
- package/lib/services/pipelines.js +2912 -0
- package/lib/services/pipelines.js.map +1 -0
- package/lib/services/queues.d.ts +807 -0
- package/lib/services/queues.d.ts.map +1 -0
- package/lib/services/queues.js +1194 -0
- package/lib/services/queues.js.map +1 -0
- package/lib/services/r2-data-catalog.d.ts +341 -0
- package/lib/services/r2-data-catalog.d.ts.map +1 -0
- package/lib/services/r2-data-catalog.js +499 -0
- package/lib/services/r2-data-catalog.js.map +1 -0
- package/lib/services/r2.d.ts +1041 -0
- package/lib/services/r2.d.ts.map +1 -0
- package/lib/services/r2.js +1384 -0
- package/lib/services/r2.js.map +1 -0
- package/lib/services/radar.d.ts +9276 -0
- package/lib/services/radar.d.ts.map +1 -0
- package/lib/services/radar.js +20491 -0
- package/lib/services/radar.js.map +1 -0
- package/lib/services/rate-limits.d.ts +315 -0
- package/lib/services/rate-limits.d.ts.map +1 -0
- package/lib/services/rate-limits.js +521 -0
- package/lib/services/rate-limits.js.map +1 -0
- package/lib/services/realtime-kit.d.ts +2728 -0
- package/lib/services/realtime-kit.d.ts.map +1 -0
- package/lib/services/realtime-kit.js +5401 -0
- package/lib/services/realtime-kit.js.map +1 -0
- package/lib/services/registrar.d.ts +81 -0
- package/lib/services/registrar.d.ts.map +1 -0
- package/lib/services/registrar.js +154 -0
- package/lib/services/registrar.js.map +1 -0
- package/lib/services/request-tracers.d.ts +61 -0
- package/lib/services/request-tracers.d.ts.map +1 -0
- package/lib/services/request-tracers.js +82 -0
- package/lib/services/request-tracers.js.map +1 -0
- package/lib/services/resource-sharing.d.ts +540 -0
- package/lib/services/resource-sharing.d.ts.map +1 -0
- package/lib/services/resource-sharing.js +846 -0
- package/lib/services/resource-sharing.js.map +1 -0
- package/lib/services/rules.d.ts +297 -0
- package/lib/services/rules.d.ts.map +1 -0
- package/lib/services/rules.js +396 -0
- package/lib/services/rules.js.map +1 -0
- package/lib/services/rulesets.d.ts +3300 -0
- package/lib/services/rulesets.d.ts.map +1 -0
- package/lib/services/rulesets.js +7852 -0
- package/lib/services/rulesets.js.map +1 -0
- package/lib/services/rum.d.ts +289 -0
- package/lib/services/rum.d.ts.map +1 -0
- package/lib/services/rum.js +409 -0
- package/lib/services/rum.js.map +1 -0
- package/lib/services/schema-validation.d.ts +240 -0
- package/lib/services/schema-validation.d.ts.map +1 -0
- package/lib/services/schema-validation.js +306 -0
- package/lib/services/schema-validation.js.map +1 -0
- package/lib/services/secrets-store.d.ts +321 -0
- package/lib/services/secrets-store.d.ts.map +1 -0
- package/lib/services/secrets-store.js +385 -0
- package/lib/services/secrets-store.js.map +1 -0
- package/lib/services/security-center.d.ts +102 -0
- package/lib/services/security-center.d.ts.map +1 -0
- package/lib/services/security-center.js +170 -0
- package/lib/services/security-center.js.map +1 -0
- package/lib/services/security-txt.d.ts +105 -0
- package/lib/services/security-txt.d.ts.map +1 -0
- package/lib/services/security-txt.js +136 -0
- package/lib/services/security-txt.js.map +1 -0
- package/lib/services/snippets.d.ts +138 -0
- package/lib/services/snippets.d.ts.map +1 -0
- package/lib/services/snippets.js +178 -0
- package/lib/services/snippets.js.map +1 -0
- package/lib/services/spectrum.d.ts +316 -0
- package/lib/services/spectrum.d.ts.map +1 -0
- package/lib/services/spectrum.js +510 -0
- package/lib/services/spectrum.js.map +1 -0
- package/lib/services/speed.d.ts +227 -0
- package/lib/services/speed.d.ts.map +1 -0
- package/lib/services/speed.js +444 -0
- package/lib/services/speed.js.map +1 -0
- package/lib/services/ssl.d.ts +370 -0
- package/lib/services/ssl.d.ts.map +1 -0
- package/lib/services/ssl.js +732 -0
- package/lib/services/ssl.js.map +1 -0
- package/lib/services/stream.d.ts +1014 -0
- package/lib/services/stream.d.ts.map +1 -0
- package/lib/services/stream.js +1049 -0
- package/lib/services/stream.js.map +1 -0
- package/lib/services/token-validation.d.ts +547 -0
- package/lib/services/token-validation.d.ts.map +1 -0
- package/lib/services/token-validation.js +768 -0
- package/lib/services/token-validation.js.map +1 -0
- package/lib/services/turnstile.d.ts +248 -0
- package/lib/services/turnstile.d.ts.map +1 -0
- package/lib/services/turnstile.js +308 -0
- package/lib/services/turnstile.js.map +1 -0
- package/lib/services/url-normalization.d.ts +53 -0
- package/lib/services/url-normalization.d.ts.map +1 -0
- package/lib/services/url-normalization.js +52 -0
- package/lib/services/url-normalization.js.map +1 -0
- package/lib/services/url-scanner.d.ts +612 -0
- package/lib/services/url-scanner.d.ts.map +1 -0
- package/lib/services/url-scanner.js +915 -0
- package/lib/services/url-scanner.js.map +1 -0
- package/lib/services/user.d.ts +441 -0
- package/lib/services/user.d.ts.map +1 -0
- package/lib/services/user.js +567 -0
- package/lib/services/user.js.map +1 -0
- package/lib/services/vectorize.d.ts +282 -0
- package/lib/services/vectorize.d.ts.map +1 -0
- package/lib/services/vectorize.js +340 -0
- package/lib/services/vectorize.js.map +1 -0
- package/lib/services/waiting-rooms.d.ts +1009 -0
- package/lib/services/waiting-rooms.d.ts.map +1 -0
- package/lib/services/waiting-rooms.js +1757 -0
- package/lib/services/waiting-rooms.js.map +1 -0
- package/lib/services/web3.d.ts +274 -0
- package/lib/services/web3.d.ts.map +1 -0
- package/lib/services/web3.js +362 -0
- package/lib/services/web3.js.map +1 -0
- package/lib/services/workers-for-platforms.d.ts +1224 -0
- package/lib/services/workers-for-platforms.d.ts.map +1 -0
- package/lib/services/workers-for-platforms.js +2078 -0
- package/lib/services/workers-for-platforms.js.map +1 -0
- package/lib/services/workers.d.ts +3498 -0
- package/lib/services/workers.d.ts.map +1 -0
- package/lib/services/workers.js +5967 -0
- package/lib/services/workers.js.map +1 -0
- package/lib/services/workflows.d.ts +359 -0
- package/lib/services/workflows.d.ts.map +1 -0
- package/lib/services/workflows.js +516 -0
- package/lib/services/workflows.js.map +1 -0
- package/lib/services/zaraz.d.ts +300 -0
- package/lib/services/zaraz.d.ts.map +1 -0
- package/lib/services/zaraz.js +298 -0
- package/lib/services/zaraz.js.map +1 -0
- package/lib/services/zero-trust.d.ts +15449 -0
- package/lib/services/zero-trust.d.ts.map +1 -0
- package/lib/services/zero-trust.js +29194 -0
- package/lib/services/zero-trust.js.map +1 -0
- package/lib/services/zones.d.ts +1278 -0
- package/lib/services/zones.d.ts.map +1 -0
- package/lib/services/zones.js +2416 -0
- package/lib/services/zones.js.map +1 -0
- package/lib/traits.d.ts +28 -0
- package/lib/traits.d.ts.map +1 -0
- package/lib/traits.js +26 -0
- package/lib/traits.js.map +1 -0
- package/package.json +68 -5
- package/src/auth.ts +14 -0
- package/src/category.ts +1 -0
- package/src/client/api.ts +329 -0
- package/src/client/index.ts +7 -0
- package/src/credentials.ts +30 -0
- package/src/errors.ts +57 -0
- package/src/index.ts +9 -0
- package/src/retry.ts +35 -0
- package/src/schemas.ts +51 -0
- package/src/services/abuse-reports.ts +747 -0
- package/src/services/accounts.ts +1947 -0
- package/src/services/acm.ts +170 -0
- package/src/services/addressing.ts +3947 -0
- package/src/services/ai-gateway.ts +3335 -0
- package/src/services/ai.ts +727 -0
- package/src/services/aisearch.ts +4750 -0
- package/src/services/alerting.ts +2947 -0
- package/src/services/api-gateway.ts +3391 -0
- package/src/services/argo.ts +254 -0
- package/src/services/audit-logs.ts +90 -0
- package/src/services/billing.ts +172 -0
- package/src/services/bot-management.ts +541 -0
- package/src/services/botnet-feed.ts +193 -0
- package/src/services/brand-protection.ts +553 -0
- package/src/services/browser-rendering.ts +2707 -0
- package/src/services/cache.ts +827 -0
- package/src/services/calls.ts +483 -0
- package/src/services/certificate-authorities.ts +110 -0
- package/src/services/client-certificates.ts +718 -0
- package/src/services/cloud-connector.ts +181 -0
- package/src/services/cloudforce-one.ts +3876 -0
- package/src/services/connectivity.ts +629 -0
- package/src/services/content-scanning.ts +385 -0
- package/src/services/custom-certificates.ts +611 -0
- package/src/services/custom-hostnames.ts +2453 -0
- package/src/services/custom-nameservers.ts +182 -0
- package/src/services/custom-pages.ts +264 -0
- package/src/services/d1.ts +1034 -0
- package/src/services/dcv-delegation.ts +52 -0
- package/src/services/diagnostics.ts +603 -0
- package/src/services/dns-firewall.ts +823 -0
- package/src/services/dns.ts +8897 -0
- package/src/services/durable-objects.ts +148 -0
- package/src/services/email-routing.ts +1602 -0
- package/src/services/email-security.ts +4283 -0
- package/src/services/filters.ts +370 -0
- package/src/services/firewall.ts +3896 -0
- package/src/services/healthchecks.ts +1750 -0
- package/src/services/hostnames.ts +218 -0
- package/src/services/hyperdrive.ts +592 -0
- package/src/services/iam.ts +1668 -0
- package/src/services/images.ts +1086 -0
- package/src/services/intel.ts +2768 -0
- package/src/services/ips.ts +88 -0
- package/src/services/keyless-certificates.ts +462 -0
- package/src/services/kv.ts +1011 -0
- package/src/services/leaked-credential-checks.ts +325 -0
- package/src/services/load-balancers.ts +6438 -0
- package/src/services/logpush.ts +1667 -0
- package/src/services/logs.ts +375 -0
- package/src/services/magic-cloud-networking.ts +10020 -0
- package/src/services/magic-network-monitoring.ts +1156 -0
- package/src/services/magic-transit.ts +13050 -0
- package/src/services/managed-transforms.ts +237 -0
- package/src/services/memberships.ts +615 -0
- package/src/services/mtls-certificates.ts +374 -0
- package/src/services/network-interconnects.ts +1253 -0
- package/src/services/organizations.ts +674 -0
- package/src/services/origin-ca-certificates.ts +303 -0
- package/src/services/origin-post-quantum-encryption.ts +128 -0
- package/src/services/origin-tls-client-auth.ts +878 -0
- package/src/services/page-rules.ts +2612 -0
- package/src/services/page-shield.ts +1195 -0
- package/src/services/pages.ts +5709 -0
- package/src/services/pipelines.ts +6000 -0
- package/src/services/queues.ts +2629 -0
- package/src/services/r2-data-catalog.ts +1119 -0
- package/src/services/r2.ts +3348 -0
- package/src/services/radar.ts +42152 -0
- package/src/services/rate-limits.ts +1150 -0
- package/src/services/realtime-kit.ts +11079 -0
- package/src/services/registrar.ts +295 -0
- package/src/services/request-tracers.ts +158 -0
- package/src/services/resource-sharing.ts +1832 -0
- package/src/services/rules.ts +837 -0
- package/src/services/rulesets.ts +15144 -0
- package/src/services/rum.ts +901 -0
- package/src/services/schema-validation.ts +733 -0
- package/src/services/secrets-store.ts +860 -0
- package/src/services/security-center.ts +397 -0
- package/src/services/security-txt.ts +315 -0
- package/src/services/snippets.ts +420 -0
- package/src/services/spectrum.ts +1103 -0
- package/src/services/speed.ts +1056 -0
- package/src/services/ssl.ts +1587 -0
- package/src/services/stream.ts +2756 -0
- package/src/services/token-validation.ts +1585 -0
- package/src/services/turnstile.ts +643 -0
- package/src/services/url-normalization.ts +129 -0
- package/src/services/url-scanner.ts +1851 -0
- package/src/services/user.ts +1384 -0
- package/src/services/vectorize.ts +816 -0
- package/src/services/waiting-rooms.ts +3807 -0
- package/src/services/web3.ts +834 -0
- package/src/services/workers-for-platforms.ts +3859 -0
- package/src/services/workers.ts +11637 -0
- package/src/services/workflows.ts +1124 -0
- package/src/services/zaraz.ts +797 -0
- package/src/services/zero-trust.ts +58929 -0
- package/src/services/zones.ts +4875 -0
- package/src/traits.ts +47 -0
- package/bun.lock +0 -26
- package/index.ts +0 -1
- package/tsconfig.json +0 -29
|
@@ -0,0 +1,3947 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Cloudflare ADDRESSING API
|
|
3
|
+
*
|
|
4
|
+
* Generated from Cloudflare TypeScript SDK.
|
|
5
|
+
* DO NOT EDIT - regenerate with: bun scripts/generate.ts --service addressing
|
|
6
|
+
*/
|
|
7
|
+
|
|
8
|
+
import * as Schema from "effect/Schema";
|
|
9
|
+
import type * as HttpClient from "effect/unstable/http/HttpClient";
|
|
10
|
+
import * as API from "../client/api.ts";
|
|
11
|
+
import * as T from "../traits";
|
|
12
|
+
import type { Credentials } from "../credentials";
|
|
13
|
+
import { type DefaultErrors } from "../errors";
|
|
14
|
+
|
|
15
|
+
// =============================================================================
|
|
16
|
+
// Errors
|
|
17
|
+
// =============================================================================
|
|
18
|
+
|
|
19
|
+
export class AddressMapNotFound extends Schema.TaggedErrorClass<AddressMapNotFound>()(
|
|
20
|
+
"AddressMapNotFound",
|
|
21
|
+
{ code: Schema.Number, message: Schema.String },
|
|
22
|
+
) {}
|
|
23
|
+
T.applyErrorMatchers(AddressMapNotFound, [
|
|
24
|
+
{ code: 1000 },
|
|
25
|
+
{ code: 1000, message: { includes: "not_found" } },
|
|
26
|
+
]);
|
|
27
|
+
|
|
28
|
+
export class BgpPrefixNotFound extends Schema.TaggedErrorClass<BgpPrefixNotFound>()(
|
|
29
|
+
"BgpPrefixNotFound",
|
|
30
|
+
{ code: Schema.Number, message: Schema.String },
|
|
31
|
+
) {}
|
|
32
|
+
T.applyErrorMatchers(BgpPrefixNotFound, [{ code: 1002 }]);
|
|
33
|
+
|
|
34
|
+
export class BindingNotFound extends Schema.TaggedErrorClass<BindingNotFound>()(
|
|
35
|
+
"BindingNotFound",
|
|
36
|
+
{ code: Schema.Number, message: Schema.String },
|
|
37
|
+
) {}
|
|
38
|
+
T.applyErrorMatchers(BindingNotFound, [{ code: 1002 }]);
|
|
39
|
+
|
|
40
|
+
export class DelegationNotFound extends Schema.TaggedErrorClass<DelegationNotFound>()(
|
|
41
|
+
"DelegationNotFound",
|
|
42
|
+
{ code: Schema.Number, message: Schema.String },
|
|
43
|
+
) {}
|
|
44
|
+
T.applyErrorMatchers(DelegationNotFound, [{ code: 1000 }]);
|
|
45
|
+
|
|
46
|
+
export class FeatureNotEnabled extends Schema.TaggedErrorClass<FeatureNotEnabled>()(
|
|
47
|
+
"FeatureNotEnabled",
|
|
48
|
+
{ code: Schema.Number, message: Schema.String },
|
|
49
|
+
) {}
|
|
50
|
+
T.applyErrorMatchers(FeatureNotEnabled, [
|
|
51
|
+
{ code: 1002, message: { includes: "address_maps_not_enabled" } },
|
|
52
|
+
]);
|
|
53
|
+
|
|
54
|
+
export class InvalidAccountId extends Schema.TaggedErrorClass<InvalidAccountId>()(
|
|
55
|
+
"InvalidAccountId",
|
|
56
|
+
{ code: Schema.Number, message: Schema.String },
|
|
57
|
+
) {}
|
|
58
|
+
T.applyErrorMatchers(InvalidAccountId, [
|
|
59
|
+
{ code: 7003, message: { includes: "Could not route" } },
|
|
60
|
+
]);
|
|
61
|
+
|
|
62
|
+
export class InvalidHostname extends Schema.TaggedErrorClass<InvalidHostname>()(
|
|
63
|
+
"InvalidHostname",
|
|
64
|
+
{ code: Schema.Number, message: Schema.String },
|
|
65
|
+
) {}
|
|
66
|
+
T.applyErrorMatchers(InvalidHostname, [
|
|
67
|
+
{ code: 1002, message: { includes: "forbidden" } },
|
|
68
|
+
]);
|
|
69
|
+
|
|
70
|
+
export class InvalidLoaForm extends Schema.TaggedErrorClass<InvalidLoaForm>()(
|
|
71
|
+
"InvalidLoaForm",
|
|
72
|
+
{ code: Schema.Number, message: Schema.String },
|
|
73
|
+
) {}
|
|
74
|
+
T.applyErrorMatchers(InvalidLoaForm, [
|
|
75
|
+
{ code: 1001, message: { includes: "invalid_loa_form" } },
|
|
76
|
+
]);
|
|
77
|
+
|
|
78
|
+
export class InvalidNetworkCidr extends Schema.TaggedErrorClass<InvalidNetworkCidr>()(
|
|
79
|
+
"InvalidNetworkCidr",
|
|
80
|
+
{ code: Schema.Number, message: Schema.String },
|
|
81
|
+
) {}
|
|
82
|
+
T.applyErrorMatchers(InvalidNetworkCidr, [
|
|
83
|
+
{ code: 1001, message: { includes: "invalid_network_cidr" } },
|
|
84
|
+
]);
|
|
85
|
+
|
|
86
|
+
export class InvalidZoneId extends Schema.TaggedErrorClass<InvalidZoneId>()(
|
|
87
|
+
"InvalidZoneId",
|
|
88
|
+
{ code: Schema.Number, message: Schema.String },
|
|
89
|
+
) {}
|
|
90
|
+
T.applyErrorMatchers(InvalidZoneId, [
|
|
91
|
+
{ code: 7003, message: { includes: "Could not route" } },
|
|
92
|
+
]);
|
|
93
|
+
|
|
94
|
+
export class IrrEntryNotFound extends Schema.TaggedErrorClass<IrrEntryNotFound>()(
|
|
95
|
+
"IrrEntryNotFound",
|
|
96
|
+
{ code: Schema.Number, message: Schema.String },
|
|
97
|
+
) {}
|
|
98
|
+
T.applyErrorMatchers(IrrEntryNotFound, [
|
|
99
|
+
{ code: 1003, message: { includes: "irr_entry_not_found" } },
|
|
100
|
+
]);
|
|
101
|
+
|
|
102
|
+
export class LoaDocumentNotFound extends Schema.TaggedErrorClass<LoaDocumentNotFound>()(
|
|
103
|
+
"LoaDocumentNotFound",
|
|
104
|
+
{ code: Schema.Number, message: Schema.String },
|
|
105
|
+
) {}
|
|
106
|
+
T.applyErrorMatchers(LoaDocumentNotFound, [{ code: 1000 }]);
|
|
107
|
+
|
|
108
|
+
export class MethodNotAllowed extends Schema.TaggedErrorClass<MethodNotAllowed>()(
|
|
109
|
+
"MethodNotAllowed",
|
|
110
|
+
{ code: Schema.Number, message: Schema.String },
|
|
111
|
+
) {}
|
|
112
|
+
T.applyErrorMatchers(MethodNotAllowed, [
|
|
113
|
+
{ code: 10405, message: { includes: "not allowed" } },
|
|
114
|
+
{ code: 10000, message: { includes: "not allowed" } },
|
|
115
|
+
]);
|
|
116
|
+
|
|
117
|
+
export class MissingAccountId extends Schema.TaggedErrorClass<MissingAccountId>()(
|
|
118
|
+
"MissingAccountId",
|
|
119
|
+
{ code: Schema.Number, message: Schema.String },
|
|
120
|
+
) {}
|
|
121
|
+
T.applyErrorMatchers(MissingAccountId, [{ code: 1001 }]);
|
|
122
|
+
|
|
123
|
+
export class NonexistentAccountPrefix extends Schema.TaggedErrorClass<NonexistentAccountPrefix>()(
|
|
124
|
+
"NonexistentAccountPrefix",
|
|
125
|
+
{ code: Schema.Number, message: Schema.String },
|
|
126
|
+
) {}
|
|
127
|
+
T.applyErrorMatchers(NonexistentAccountPrefix, [{ code: 1003 }]);
|
|
128
|
+
|
|
129
|
+
export class PrefixNotFound extends Schema.TaggedErrorClass<PrefixNotFound>()(
|
|
130
|
+
"PrefixNotFound",
|
|
131
|
+
{ code: Schema.Number, message: Schema.String },
|
|
132
|
+
) {}
|
|
133
|
+
T.applyErrorMatchers(PrefixNotFound, [
|
|
134
|
+
{ code: 1000 },
|
|
135
|
+
{ code: 1000, message: { includes: "not_found" } },
|
|
136
|
+
]);
|
|
137
|
+
|
|
138
|
+
export class RegionalHostnameEmpty extends Schema.TaggedErrorClass<RegionalHostnameEmpty>()(
|
|
139
|
+
"RegionalHostnameEmpty",
|
|
140
|
+
{ code: Schema.Number, message: Schema.String },
|
|
141
|
+
) {}
|
|
142
|
+
T.applyErrorMatchers(RegionalHostnameEmpty, [
|
|
143
|
+
{ code: 1000, message: { includes: "not_found" } },
|
|
144
|
+
]);
|
|
145
|
+
|
|
146
|
+
export class RegionalHostnameNotFound extends Schema.TaggedErrorClass<RegionalHostnameNotFound>()(
|
|
147
|
+
"RegionalHostnameNotFound",
|
|
148
|
+
{ code: Schema.Number, message: Schema.String },
|
|
149
|
+
) {}
|
|
150
|
+
T.applyErrorMatchers(RegionalHostnameNotFound, [
|
|
151
|
+
{ code: 1002, message: { includes: "forbidden" } },
|
|
152
|
+
]);
|
|
153
|
+
|
|
154
|
+
export class UnsupportedBindingConfiguration extends Schema.TaggedErrorClass<UnsupportedBindingConfiguration>()(
|
|
155
|
+
"UnsupportedBindingConfiguration",
|
|
156
|
+
{ code: Schema.Number, message: Schema.String },
|
|
157
|
+
) {}
|
|
158
|
+
T.applyErrorMatchers(UnsupportedBindingConfiguration, [{ code: 1003 }]);
|
|
159
|
+
|
|
160
|
+
// =============================================================================
|
|
161
|
+
// AddressMap
|
|
162
|
+
// =============================================================================
|
|
163
|
+
|
|
164
|
+
export interface GetAddressMapRequest {
|
|
165
|
+
addressMapId: string;
|
|
166
|
+
/** Identifier of a Cloudflare account. */
|
|
167
|
+
accountId: string;
|
|
168
|
+
}
|
|
169
|
+
|
|
170
|
+
export const GetAddressMapRequest = /*@__PURE__*/ /*#__PURE__*/ Schema.Struct({
|
|
171
|
+
addressMapId: Schema.String.pipe(T.HttpPath("addressMapId")),
|
|
172
|
+
accountId: Schema.String.pipe(T.HttpPath("account_id")),
|
|
173
|
+
}).pipe(
|
|
174
|
+
T.Http({
|
|
175
|
+
method: "GET",
|
|
176
|
+
path: "/accounts/{account_id}/addressing/address_maps/{addressMapId}",
|
|
177
|
+
}),
|
|
178
|
+
) as unknown as Schema.Schema<GetAddressMapRequest>;
|
|
179
|
+
|
|
180
|
+
export interface GetAddressMapResponse {
|
|
181
|
+
/** Identifier of an Address Map. */
|
|
182
|
+
id?: string | null;
|
|
183
|
+
/** If set to false, then the Address Map cannot be deleted via API. This is true for Cloudflare-managed maps. */
|
|
184
|
+
canDelete?: boolean | null;
|
|
185
|
+
/** If set to false, then the IPs on the Address Map cannot be modified via the API. This is true for Cloudflare-managed maps. */
|
|
186
|
+
canModifyIps?: boolean | null;
|
|
187
|
+
createdAt?: string | null;
|
|
188
|
+
/** If you have legacy TLS clients which do not send the TLS server name indicator, then you can specify one default SNI on the map. If Cloudflare receives a TLS handshake from a client without an SNI, it */
|
|
189
|
+
defaultSni?: string | null;
|
|
190
|
+
/** An optional description field which may be used to describe the types of IPs or zones on the map. */
|
|
191
|
+
description?: string | null;
|
|
192
|
+
/** Whether the Address Map is enabled or not. Cloudflare's DNS will not respond with IP addresses on an Address Map until the map is enabled. */
|
|
193
|
+
enabled?: boolean | null;
|
|
194
|
+
/** The set of IPs on the Address Map. */
|
|
195
|
+
ips?: unknown | null;
|
|
196
|
+
/** Zones and Accounts which will be assigned IPs on this Address Map. A zone membership will take priority over an account membership. */
|
|
197
|
+
memberships?:
|
|
198
|
+
| {
|
|
199
|
+
canDelete?: boolean | null;
|
|
200
|
+
createdAt?: string | null;
|
|
201
|
+
identifier?: string | null;
|
|
202
|
+
kind?: "zone" | "account" | null;
|
|
203
|
+
}[]
|
|
204
|
+
| null;
|
|
205
|
+
modifiedAt?: string | null;
|
|
206
|
+
}
|
|
207
|
+
|
|
208
|
+
export const GetAddressMapResponse = /*@__PURE__*/ /*#__PURE__*/ Schema.Struct({
|
|
209
|
+
id: Schema.optional(Schema.Union([Schema.String, Schema.Null])),
|
|
210
|
+
canDelete: Schema.optional(Schema.Union([Schema.Boolean, Schema.Null])),
|
|
211
|
+
canModifyIps: Schema.optional(Schema.Union([Schema.Boolean, Schema.Null])),
|
|
212
|
+
createdAt: Schema.optional(Schema.Union([Schema.String, Schema.Null])),
|
|
213
|
+
defaultSni: Schema.optional(Schema.Union([Schema.String, Schema.Null])),
|
|
214
|
+
description: Schema.optional(Schema.Union([Schema.String, Schema.Null])),
|
|
215
|
+
enabled: Schema.optional(Schema.Union([Schema.Boolean, Schema.Null])),
|
|
216
|
+
ips: Schema.optional(Schema.Union([Schema.Unknown, Schema.Null])),
|
|
217
|
+
memberships: Schema.optional(
|
|
218
|
+
Schema.Union([
|
|
219
|
+
Schema.Array(
|
|
220
|
+
Schema.Struct({
|
|
221
|
+
canDelete: Schema.optional(
|
|
222
|
+
Schema.Union([Schema.Boolean, Schema.Null]),
|
|
223
|
+
),
|
|
224
|
+
createdAt: Schema.optional(
|
|
225
|
+
Schema.Union([Schema.String, Schema.Null]),
|
|
226
|
+
),
|
|
227
|
+
identifier: Schema.optional(
|
|
228
|
+
Schema.Union([Schema.String, Schema.Null]),
|
|
229
|
+
),
|
|
230
|
+
kind: Schema.optional(
|
|
231
|
+
Schema.Union([Schema.Literals(["zone", "account"]), Schema.Null]),
|
|
232
|
+
),
|
|
233
|
+
}).pipe(
|
|
234
|
+
Schema.encodeKeys({
|
|
235
|
+
canDelete: "can_delete",
|
|
236
|
+
createdAt: "created_at",
|
|
237
|
+
identifier: "identifier",
|
|
238
|
+
kind: "kind",
|
|
239
|
+
}),
|
|
240
|
+
),
|
|
241
|
+
),
|
|
242
|
+
Schema.Null,
|
|
243
|
+
]),
|
|
244
|
+
),
|
|
245
|
+
modifiedAt: Schema.optional(Schema.Union([Schema.String, Schema.Null])),
|
|
246
|
+
}).pipe(
|
|
247
|
+
Schema.encodeKeys({
|
|
248
|
+
id: "id",
|
|
249
|
+
canDelete: "can_delete",
|
|
250
|
+
canModifyIps: "can_modify_ips",
|
|
251
|
+
createdAt: "created_at",
|
|
252
|
+
defaultSni: "default_sni",
|
|
253
|
+
description: "description",
|
|
254
|
+
enabled: "enabled",
|
|
255
|
+
ips: "ips",
|
|
256
|
+
memberships: "memberships",
|
|
257
|
+
modifiedAt: "modified_at",
|
|
258
|
+
}),
|
|
259
|
+
) as unknown as Schema.Schema<GetAddressMapResponse>;
|
|
260
|
+
|
|
261
|
+
export type GetAddressMapError =
|
|
262
|
+
| DefaultErrors
|
|
263
|
+
| AddressMapNotFound
|
|
264
|
+
| InvalidAccountId;
|
|
265
|
+
|
|
266
|
+
export const getAddressMap: API.OperationMethod<
|
|
267
|
+
GetAddressMapRequest,
|
|
268
|
+
GetAddressMapResponse,
|
|
269
|
+
GetAddressMapError,
|
|
270
|
+
Credentials | HttpClient.HttpClient
|
|
271
|
+
> = /*@__PURE__*/ /*#__PURE__*/ API.make(() => ({
|
|
272
|
+
input: GetAddressMapRequest,
|
|
273
|
+
output: GetAddressMapResponse,
|
|
274
|
+
errors: [AddressMapNotFound, InvalidAccountId],
|
|
275
|
+
}));
|
|
276
|
+
|
|
277
|
+
export interface ListAddressMapsRequest {
|
|
278
|
+
/** Identifier of a Cloudflare account. */
|
|
279
|
+
accountId: string;
|
|
280
|
+
}
|
|
281
|
+
|
|
282
|
+
export const ListAddressMapsRequest = /*@__PURE__*/ /*#__PURE__*/ Schema.Struct(
|
|
283
|
+
{
|
|
284
|
+
accountId: Schema.String.pipe(T.HttpPath("account_id")),
|
|
285
|
+
},
|
|
286
|
+
).pipe(
|
|
287
|
+
T.Http({
|
|
288
|
+
method: "GET",
|
|
289
|
+
path: "/accounts/{account_id}/addressing/address_maps",
|
|
290
|
+
}),
|
|
291
|
+
) as unknown as Schema.Schema<ListAddressMapsRequest>;
|
|
292
|
+
|
|
293
|
+
export type ListAddressMapsResponse = {
|
|
294
|
+
id?: string | null;
|
|
295
|
+
canDelete?: boolean | null;
|
|
296
|
+
canModifyIps?: boolean | null;
|
|
297
|
+
createdAt?: string | null;
|
|
298
|
+
defaultSni?: string | null;
|
|
299
|
+
description?: string | null;
|
|
300
|
+
enabled?: boolean | null;
|
|
301
|
+
modifiedAt?: string | null;
|
|
302
|
+
}[];
|
|
303
|
+
|
|
304
|
+
export const ListAddressMapsResponse = /*@__PURE__*/ /*#__PURE__*/ Schema.Array(
|
|
305
|
+
Schema.Struct({
|
|
306
|
+
id: Schema.optional(Schema.Union([Schema.String, Schema.Null])),
|
|
307
|
+
canDelete: Schema.optional(Schema.Union([Schema.Boolean, Schema.Null])),
|
|
308
|
+
canModifyIps: Schema.optional(Schema.Union([Schema.Boolean, Schema.Null])),
|
|
309
|
+
createdAt: Schema.optional(Schema.Union([Schema.String, Schema.Null])),
|
|
310
|
+
defaultSni: Schema.optional(Schema.Union([Schema.String, Schema.Null])),
|
|
311
|
+
description: Schema.optional(Schema.Union([Schema.String, Schema.Null])),
|
|
312
|
+
enabled: Schema.optional(Schema.Union([Schema.Boolean, Schema.Null])),
|
|
313
|
+
modifiedAt: Schema.optional(Schema.Union([Schema.String, Schema.Null])),
|
|
314
|
+
}).pipe(
|
|
315
|
+
Schema.encodeKeys({
|
|
316
|
+
id: "id",
|
|
317
|
+
canDelete: "can_delete",
|
|
318
|
+
canModifyIps: "can_modify_ips",
|
|
319
|
+
createdAt: "created_at",
|
|
320
|
+
defaultSni: "default_sni",
|
|
321
|
+
description: "description",
|
|
322
|
+
enabled: "enabled",
|
|
323
|
+
modifiedAt: "modified_at",
|
|
324
|
+
}),
|
|
325
|
+
),
|
|
326
|
+
) as unknown as Schema.Schema<ListAddressMapsResponse>;
|
|
327
|
+
|
|
328
|
+
export type ListAddressMapsError = DefaultErrors;
|
|
329
|
+
|
|
330
|
+
export const listAddressMaps: API.OperationMethod<
|
|
331
|
+
ListAddressMapsRequest,
|
|
332
|
+
ListAddressMapsResponse,
|
|
333
|
+
ListAddressMapsError,
|
|
334
|
+
Credentials | HttpClient.HttpClient
|
|
335
|
+
> = /*@__PURE__*/ /*#__PURE__*/ API.make(() => ({
|
|
336
|
+
input: ListAddressMapsRequest,
|
|
337
|
+
output: ListAddressMapsResponse,
|
|
338
|
+
errors: [],
|
|
339
|
+
}));
|
|
340
|
+
|
|
341
|
+
export interface CreateAddressMapRequest {
|
|
342
|
+
/** Path param: Identifier of a Cloudflare account. */
|
|
343
|
+
accountId: string;
|
|
344
|
+
/** Body param: An optional description field which may be used to describe the types of IPs or zones on the map. */
|
|
345
|
+
description?: string | null;
|
|
346
|
+
/** Body param: Whether the Address Map is enabled or not. Cloudflare's DNS will not respond with IP addresses on an Address Map until the map is enabled. */
|
|
347
|
+
enabled?: boolean | null;
|
|
348
|
+
/** Body param: */
|
|
349
|
+
ips?: string[];
|
|
350
|
+
/** Body param: Zones and Accounts which will be assigned IPs on this Address Map. A zone membership will take priority over an account membership. */
|
|
351
|
+
memberships?: { identifier?: string; kind?: "zone" | "account" }[];
|
|
352
|
+
}
|
|
353
|
+
|
|
354
|
+
export const CreateAddressMapRequest =
|
|
355
|
+
/*@__PURE__*/ /*#__PURE__*/ Schema.Struct({
|
|
356
|
+
accountId: Schema.String.pipe(T.HttpPath("account_id")),
|
|
357
|
+
description: Schema.optional(Schema.Union([Schema.String, Schema.Null])),
|
|
358
|
+
enabled: Schema.optional(Schema.Union([Schema.Boolean, Schema.Null])),
|
|
359
|
+
ips: Schema.optional(Schema.Array(Schema.String)),
|
|
360
|
+
memberships: Schema.optional(
|
|
361
|
+
Schema.Array(
|
|
362
|
+
Schema.Struct({
|
|
363
|
+
identifier: Schema.optional(Schema.String),
|
|
364
|
+
kind: Schema.optional(Schema.Literals(["zone", "account"])),
|
|
365
|
+
}),
|
|
366
|
+
),
|
|
367
|
+
),
|
|
368
|
+
}).pipe(
|
|
369
|
+
T.Http({
|
|
370
|
+
method: "POST",
|
|
371
|
+
path: "/accounts/{account_id}/addressing/address_maps",
|
|
372
|
+
}),
|
|
373
|
+
) as unknown as Schema.Schema<CreateAddressMapRequest>;
|
|
374
|
+
|
|
375
|
+
export interface CreateAddressMapResponse {
|
|
376
|
+
/** Identifier of an Address Map. */
|
|
377
|
+
id?: string | null;
|
|
378
|
+
/** If set to false, then the Address Map cannot be deleted via API. This is true for Cloudflare-managed maps. */
|
|
379
|
+
canDelete?: boolean | null;
|
|
380
|
+
/** If set to false, then the IPs on the Address Map cannot be modified via the API. This is true for Cloudflare-managed maps. */
|
|
381
|
+
canModifyIps?: boolean | null;
|
|
382
|
+
createdAt?: string | null;
|
|
383
|
+
/** If you have legacy TLS clients which do not send the TLS server name indicator, then you can specify one default SNI on the map. If Cloudflare receives a TLS handshake from a client without an SNI, it */
|
|
384
|
+
defaultSni?: string | null;
|
|
385
|
+
/** An optional description field which may be used to describe the types of IPs or zones on the map. */
|
|
386
|
+
description?: string | null;
|
|
387
|
+
/** Whether the Address Map is enabled or not. Cloudflare's DNS will not respond with IP addresses on an Address Map until the map is enabled. */
|
|
388
|
+
enabled?: boolean | null;
|
|
389
|
+
/** The set of IPs on the Address Map. */
|
|
390
|
+
ips?: unknown | null;
|
|
391
|
+
/** Zones and Accounts which will be assigned IPs on this Address Map. A zone membership will take priority over an account membership. */
|
|
392
|
+
memberships?:
|
|
393
|
+
| {
|
|
394
|
+
canDelete?: boolean | null;
|
|
395
|
+
createdAt?: string | null;
|
|
396
|
+
identifier?: string | null;
|
|
397
|
+
kind?: "zone" | "account" | null;
|
|
398
|
+
}[]
|
|
399
|
+
| null;
|
|
400
|
+
modifiedAt?: string | null;
|
|
401
|
+
}
|
|
402
|
+
|
|
403
|
+
export const CreateAddressMapResponse =
|
|
404
|
+
/*@__PURE__*/ /*#__PURE__*/ Schema.Struct({
|
|
405
|
+
id: Schema.optional(Schema.Union([Schema.String, Schema.Null])),
|
|
406
|
+
canDelete: Schema.optional(Schema.Union([Schema.Boolean, Schema.Null])),
|
|
407
|
+
canModifyIps: Schema.optional(Schema.Union([Schema.Boolean, Schema.Null])),
|
|
408
|
+
createdAt: Schema.optional(Schema.Union([Schema.String, Schema.Null])),
|
|
409
|
+
defaultSni: Schema.optional(Schema.Union([Schema.String, Schema.Null])),
|
|
410
|
+
description: Schema.optional(Schema.Union([Schema.String, Schema.Null])),
|
|
411
|
+
enabled: Schema.optional(Schema.Union([Schema.Boolean, Schema.Null])),
|
|
412
|
+
ips: Schema.optional(Schema.Union([Schema.Unknown, Schema.Null])),
|
|
413
|
+
memberships: Schema.optional(
|
|
414
|
+
Schema.Union([
|
|
415
|
+
Schema.Array(
|
|
416
|
+
Schema.Struct({
|
|
417
|
+
canDelete: Schema.optional(
|
|
418
|
+
Schema.Union([Schema.Boolean, Schema.Null]),
|
|
419
|
+
),
|
|
420
|
+
createdAt: Schema.optional(
|
|
421
|
+
Schema.Union([Schema.String, Schema.Null]),
|
|
422
|
+
),
|
|
423
|
+
identifier: Schema.optional(
|
|
424
|
+
Schema.Union([Schema.String, Schema.Null]),
|
|
425
|
+
),
|
|
426
|
+
kind: Schema.optional(
|
|
427
|
+
Schema.Union([Schema.Literals(["zone", "account"]), Schema.Null]),
|
|
428
|
+
),
|
|
429
|
+
}).pipe(
|
|
430
|
+
Schema.encodeKeys({
|
|
431
|
+
canDelete: "can_delete",
|
|
432
|
+
createdAt: "created_at",
|
|
433
|
+
identifier: "identifier",
|
|
434
|
+
kind: "kind",
|
|
435
|
+
}),
|
|
436
|
+
),
|
|
437
|
+
),
|
|
438
|
+
Schema.Null,
|
|
439
|
+
]),
|
|
440
|
+
),
|
|
441
|
+
modifiedAt: Schema.optional(Schema.Union([Schema.String, Schema.Null])),
|
|
442
|
+
}).pipe(
|
|
443
|
+
Schema.encodeKeys({
|
|
444
|
+
id: "id",
|
|
445
|
+
canDelete: "can_delete",
|
|
446
|
+
canModifyIps: "can_modify_ips",
|
|
447
|
+
createdAt: "created_at",
|
|
448
|
+
defaultSni: "default_sni",
|
|
449
|
+
description: "description",
|
|
450
|
+
enabled: "enabled",
|
|
451
|
+
ips: "ips",
|
|
452
|
+
memberships: "memberships",
|
|
453
|
+
modifiedAt: "modified_at",
|
|
454
|
+
}),
|
|
455
|
+
) as unknown as Schema.Schema<CreateAddressMapResponse>;
|
|
456
|
+
|
|
457
|
+
export type CreateAddressMapError =
|
|
458
|
+
| DefaultErrors
|
|
459
|
+
| FeatureNotEnabled
|
|
460
|
+
| InvalidAccountId;
|
|
461
|
+
|
|
462
|
+
export const createAddressMap: API.OperationMethod<
|
|
463
|
+
CreateAddressMapRequest,
|
|
464
|
+
CreateAddressMapResponse,
|
|
465
|
+
CreateAddressMapError,
|
|
466
|
+
Credentials | HttpClient.HttpClient
|
|
467
|
+
> = /*@__PURE__*/ /*#__PURE__*/ API.make(() => ({
|
|
468
|
+
input: CreateAddressMapRequest,
|
|
469
|
+
output: CreateAddressMapResponse,
|
|
470
|
+
errors: [FeatureNotEnabled, InvalidAccountId],
|
|
471
|
+
}));
|
|
472
|
+
|
|
473
|
+
export interface PatchAddressMapRequest {
|
|
474
|
+
addressMapId: string;
|
|
475
|
+
/** Path param: Identifier of a Cloudflare account. */
|
|
476
|
+
accountId: string;
|
|
477
|
+
/** Body param: If you have legacy TLS clients which do not send the TLS server name indicator, then you can specify one default SNI on the map. If Cloudflare receives a TLS handshake from a client withou */
|
|
478
|
+
defaultSni?: string | null;
|
|
479
|
+
/** Body param: An optional description field which may be used to describe the types of IPs or zones on the map. */
|
|
480
|
+
description?: string | null;
|
|
481
|
+
/** Body param: Whether the Address Map is enabled or not. Cloudflare's DNS will not respond with IP addresses on an Address Map until the map is enabled. */
|
|
482
|
+
enabled?: boolean | null;
|
|
483
|
+
}
|
|
484
|
+
|
|
485
|
+
export const PatchAddressMapRequest = /*@__PURE__*/ /*#__PURE__*/ Schema.Struct(
|
|
486
|
+
{
|
|
487
|
+
addressMapId: Schema.String.pipe(T.HttpPath("addressMapId")),
|
|
488
|
+
accountId: Schema.String.pipe(T.HttpPath("account_id")),
|
|
489
|
+
defaultSni: Schema.optional(Schema.Union([Schema.String, Schema.Null])),
|
|
490
|
+
description: Schema.optional(Schema.Union([Schema.String, Schema.Null])),
|
|
491
|
+
enabled: Schema.optional(Schema.Union([Schema.Boolean, Schema.Null])),
|
|
492
|
+
},
|
|
493
|
+
).pipe(
|
|
494
|
+
Schema.encodeKeys({
|
|
495
|
+
defaultSni: "default_sni",
|
|
496
|
+
description: "description",
|
|
497
|
+
enabled: "enabled",
|
|
498
|
+
}),
|
|
499
|
+
T.Http({
|
|
500
|
+
method: "PATCH",
|
|
501
|
+
path: "/accounts/{account_id}/addressing/address_maps/{addressMapId}",
|
|
502
|
+
}),
|
|
503
|
+
) as unknown as Schema.Schema<PatchAddressMapRequest>;
|
|
504
|
+
|
|
505
|
+
export interface PatchAddressMapResponse {
|
|
506
|
+
/** Identifier of an Address Map. */
|
|
507
|
+
id?: string | null;
|
|
508
|
+
/** If set to false, then the Address Map cannot be deleted via API. This is true for Cloudflare-managed maps. */
|
|
509
|
+
canDelete?: boolean | null;
|
|
510
|
+
/** If set to false, then the IPs on the Address Map cannot be modified via the API. This is true for Cloudflare-managed maps. */
|
|
511
|
+
canModifyIps?: boolean | null;
|
|
512
|
+
createdAt?: string | null;
|
|
513
|
+
/** If you have legacy TLS clients which do not send the TLS server name indicator, then you can specify one default SNI on the map. If Cloudflare receives a TLS handshake from a client without an SNI, it */
|
|
514
|
+
defaultSni?: string | null;
|
|
515
|
+
/** An optional description field which may be used to describe the types of IPs or zones on the map. */
|
|
516
|
+
description?: string | null;
|
|
517
|
+
/** Whether the Address Map is enabled or not. Cloudflare's DNS will not respond with IP addresses on an Address Map until the map is enabled. */
|
|
518
|
+
enabled?: boolean | null;
|
|
519
|
+
modifiedAt?: string | null;
|
|
520
|
+
}
|
|
521
|
+
|
|
522
|
+
export const PatchAddressMapResponse =
|
|
523
|
+
/*@__PURE__*/ /*#__PURE__*/ Schema.Struct({
|
|
524
|
+
id: Schema.optional(Schema.Union([Schema.String, Schema.Null])),
|
|
525
|
+
canDelete: Schema.optional(Schema.Union([Schema.Boolean, Schema.Null])),
|
|
526
|
+
canModifyIps: Schema.optional(Schema.Union([Schema.Boolean, Schema.Null])),
|
|
527
|
+
createdAt: Schema.optional(Schema.Union([Schema.String, Schema.Null])),
|
|
528
|
+
defaultSni: Schema.optional(Schema.Union([Schema.String, Schema.Null])),
|
|
529
|
+
description: Schema.optional(Schema.Union([Schema.String, Schema.Null])),
|
|
530
|
+
enabled: Schema.optional(Schema.Union([Schema.Boolean, Schema.Null])),
|
|
531
|
+
modifiedAt: Schema.optional(Schema.Union([Schema.String, Schema.Null])),
|
|
532
|
+
}).pipe(
|
|
533
|
+
Schema.encodeKeys({
|
|
534
|
+
id: "id",
|
|
535
|
+
canDelete: "can_delete",
|
|
536
|
+
canModifyIps: "can_modify_ips",
|
|
537
|
+
createdAt: "created_at",
|
|
538
|
+
defaultSni: "default_sni",
|
|
539
|
+
description: "description",
|
|
540
|
+
enabled: "enabled",
|
|
541
|
+
modifiedAt: "modified_at",
|
|
542
|
+
}),
|
|
543
|
+
) as unknown as Schema.Schema<PatchAddressMapResponse>;
|
|
544
|
+
|
|
545
|
+
export type PatchAddressMapError =
|
|
546
|
+
| DefaultErrors
|
|
547
|
+
| MethodNotAllowed
|
|
548
|
+
| FeatureNotEnabled
|
|
549
|
+
| InvalidAccountId;
|
|
550
|
+
|
|
551
|
+
export const patchAddressMap: API.OperationMethod<
|
|
552
|
+
PatchAddressMapRequest,
|
|
553
|
+
PatchAddressMapResponse,
|
|
554
|
+
PatchAddressMapError,
|
|
555
|
+
Credentials | HttpClient.HttpClient
|
|
556
|
+
> = /*@__PURE__*/ /*#__PURE__*/ API.make(() => ({
|
|
557
|
+
input: PatchAddressMapRequest,
|
|
558
|
+
output: PatchAddressMapResponse,
|
|
559
|
+
errors: [MethodNotAllowed, FeatureNotEnabled, InvalidAccountId],
|
|
560
|
+
}));
|
|
561
|
+
|
|
562
|
+
export interface DeleteAddressMapRequest {
|
|
563
|
+
addressMapId: string;
|
|
564
|
+
/** Identifier of a Cloudflare account. */
|
|
565
|
+
accountId: string;
|
|
566
|
+
}
|
|
567
|
+
|
|
568
|
+
export const DeleteAddressMapRequest =
|
|
569
|
+
/*@__PURE__*/ /*#__PURE__*/ Schema.Struct({
|
|
570
|
+
addressMapId: Schema.String.pipe(T.HttpPath("addressMapId")),
|
|
571
|
+
accountId: Schema.String.pipe(T.HttpPath("account_id")),
|
|
572
|
+
}).pipe(
|
|
573
|
+
T.Http({
|
|
574
|
+
method: "DELETE",
|
|
575
|
+
path: "/accounts/{account_id}/addressing/address_maps/{addressMapId}",
|
|
576
|
+
}),
|
|
577
|
+
) as unknown as Schema.Schema<DeleteAddressMapRequest>;
|
|
578
|
+
|
|
579
|
+
export interface DeleteAddressMapResponse {
|
|
580
|
+
errors: {
|
|
581
|
+
code: number;
|
|
582
|
+
message: string;
|
|
583
|
+
documentationUrl?: string | null;
|
|
584
|
+
source?: { pointer?: string | null } | null;
|
|
585
|
+
}[];
|
|
586
|
+
messages: {
|
|
587
|
+
code: number;
|
|
588
|
+
message: string;
|
|
589
|
+
documentationUrl?: string | null;
|
|
590
|
+
source?: { pointer?: string | null } | null;
|
|
591
|
+
}[];
|
|
592
|
+
/** Whether the API call was successful. */
|
|
593
|
+
success: true;
|
|
594
|
+
resultInfo?: {
|
|
595
|
+
count?: number | null;
|
|
596
|
+
page?: number | null;
|
|
597
|
+
perPage?: number | null;
|
|
598
|
+
totalCount?: number | null;
|
|
599
|
+
} | null;
|
|
600
|
+
}
|
|
601
|
+
|
|
602
|
+
export const DeleteAddressMapResponse =
|
|
603
|
+
/*@__PURE__*/ /*#__PURE__*/ Schema.Struct({
|
|
604
|
+
errors: Schema.Array(
|
|
605
|
+
Schema.Struct({
|
|
606
|
+
code: Schema.Number,
|
|
607
|
+
message: Schema.String,
|
|
608
|
+
documentationUrl: Schema.optional(
|
|
609
|
+
Schema.Union([Schema.String, Schema.Null]),
|
|
610
|
+
),
|
|
611
|
+
source: Schema.optional(
|
|
612
|
+
Schema.Union([
|
|
613
|
+
Schema.Struct({
|
|
614
|
+
pointer: Schema.optional(
|
|
615
|
+
Schema.Union([Schema.String, Schema.Null]),
|
|
616
|
+
),
|
|
617
|
+
}),
|
|
618
|
+
Schema.Null,
|
|
619
|
+
]),
|
|
620
|
+
),
|
|
621
|
+
}).pipe(
|
|
622
|
+
Schema.encodeKeys({
|
|
623
|
+
code: "code",
|
|
624
|
+
message: "message",
|
|
625
|
+
documentationUrl: "documentation_url",
|
|
626
|
+
source: "source",
|
|
627
|
+
}),
|
|
628
|
+
),
|
|
629
|
+
),
|
|
630
|
+
messages: Schema.Array(
|
|
631
|
+
Schema.Struct({
|
|
632
|
+
code: Schema.Number,
|
|
633
|
+
message: Schema.String,
|
|
634
|
+
documentationUrl: Schema.optional(
|
|
635
|
+
Schema.Union([Schema.String, Schema.Null]),
|
|
636
|
+
),
|
|
637
|
+
source: Schema.optional(
|
|
638
|
+
Schema.Union([
|
|
639
|
+
Schema.Struct({
|
|
640
|
+
pointer: Schema.optional(
|
|
641
|
+
Schema.Union([Schema.String, Schema.Null]),
|
|
642
|
+
),
|
|
643
|
+
}),
|
|
644
|
+
Schema.Null,
|
|
645
|
+
]),
|
|
646
|
+
),
|
|
647
|
+
}).pipe(
|
|
648
|
+
Schema.encodeKeys({
|
|
649
|
+
code: "code",
|
|
650
|
+
message: "message",
|
|
651
|
+
documentationUrl: "documentation_url",
|
|
652
|
+
source: "source",
|
|
653
|
+
}),
|
|
654
|
+
),
|
|
655
|
+
),
|
|
656
|
+
success: Schema.Literal(true),
|
|
657
|
+
resultInfo: Schema.optional(
|
|
658
|
+
Schema.Union([
|
|
659
|
+
Schema.Struct({
|
|
660
|
+
count: Schema.optional(Schema.Union([Schema.Number, Schema.Null])),
|
|
661
|
+
page: Schema.optional(Schema.Union([Schema.Number, Schema.Null])),
|
|
662
|
+
perPage: Schema.optional(Schema.Union([Schema.Number, Schema.Null])),
|
|
663
|
+
totalCount: Schema.optional(
|
|
664
|
+
Schema.Union([Schema.Number, Schema.Null]),
|
|
665
|
+
),
|
|
666
|
+
}).pipe(
|
|
667
|
+
Schema.encodeKeys({
|
|
668
|
+
count: "count",
|
|
669
|
+
page: "page",
|
|
670
|
+
perPage: "per_page",
|
|
671
|
+
totalCount: "total_count",
|
|
672
|
+
}),
|
|
673
|
+
),
|
|
674
|
+
Schema.Null,
|
|
675
|
+
]),
|
|
676
|
+
),
|
|
677
|
+
}).pipe(
|
|
678
|
+
Schema.encodeKeys({
|
|
679
|
+
errors: "errors",
|
|
680
|
+
messages: "messages",
|
|
681
|
+
success: "success",
|
|
682
|
+
resultInfo: "result_info",
|
|
683
|
+
}),
|
|
684
|
+
) as unknown as Schema.Schema<DeleteAddressMapResponse>;
|
|
685
|
+
|
|
686
|
+
export type DeleteAddressMapError =
|
|
687
|
+
| DefaultErrors
|
|
688
|
+
| MethodNotAllowed
|
|
689
|
+
| FeatureNotEnabled
|
|
690
|
+
| InvalidAccountId
|
|
691
|
+
| AddressMapNotFound;
|
|
692
|
+
|
|
693
|
+
export const deleteAddressMap: API.OperationMethod<
|
|
694
|
+
DeleteAddressMapRequest,
|
|
695
|
+
DeleteAddressMapResponse,
|
|
696
|
+
DeleteAddressMapError,
|
|
697
|
+
Credentials | HttpClient.HttpClient
|
|
698
|
+
> = /*@__PURE__*/ /*#__PURE__*/ API.make(() => ({
|
|
699
|
+
input: DeleteAddressMapRequest,
|
|
700
|
+
output: DeleteAddressMapResponse,
|
|
701
|
+
errors: [
|
|
702
|
+
MethodNotAllowed,
|
|
703
|
+
FeatureNotEnabled,
|
|
704
|
+
InvalidAccountId,
|
|
705
|
+
AddressMapNotFound,
|
|
706
|
+
],
|
|
707
|
+
}));
|
|
708
|
+
|
|
709
|
+
// =============================================================================
|
|
710
|
+
// AddressMapAccount
|
|
711
|
+
// =============================================================================
|
|
712
|
+
|
|
713
|
+
export interface PutAddressMapAccountRequest {
|
|
714
|
+
addressMapId: string;
|
|
715
|
+
/** Path param: Identifier of a Cloudflare account. */
|
|
716
|
+
accountId: string;
|
|
717
|
+
/** Body param: */
|
|
718
|
+
body: unknown;
|
|
719
|
+
}
|
|
720
|
+
|
|
721
|
+
export const PutAddressMapAccountRequest =
|
|
722
|
+
/*@__PURE__*/ /*#__PURE__*/ Schema.Struct({
|
|
723
|
+
addressMapId: Schema.String.pipe(T.HttpPath("addressMapId")),
|
|
724
|
+
accountId: Schema.String.pipe(T.HttpPath("account_id")),
|
|
725
|
+
body: Schema.Unknown.pipe(T.HttpBody()),
|
|
726
|
+
}).pipe(
|
|
727
|
+
T.Http({
|
|
728
|
+
method: "PUT",
|
|
729
|
+
path: "/accounts/{account_id}/addressing/address_maps/{addressMapId}/accounts/{account_id}",
|
|
730
|
+
}),
|
|
731
|
+
) as unknown as Schema.Schema<PutAddressMapAccountRequest>;
|
|
732
|
+
|
|
733
|
+
export interface PutAddressMapAccountResponse {
|
|
734
|
+
errors: {
|
|
735
|
+
code: number;
|
|
736
|
+
message: string;
|
|
737
|
+
documentationUrl?: string | null;
|
|
738
|
+
source?: { pointer?: string | null } | null;
|
|
739
|
+
}[];
|
|
740
|
+
messages: {
|
|
741
|
+
code: number;
|
|
742
|
+
message: string;
|
|
743
|
+
documentationUrl?: string | null;
|
|
744
|
+
source?: { pointer?: string | null } | null;
|
|
745
|
+
}[];
|
|
746
|
+
/** Whether the API call was successful. */
|
|
747
|
+
success: true;
|
|
748
|
+
resultInfo?: {
|
|
749
|
+
count?: number | null;
|
|
750
|
+
page?: number | null;
|
|
751
|
+
perPage?: number | null;
|
|
752
|
+
totalCount?: number | null;
|
|
753
|
+
} | null;
|
|
754
|
+
}
|
|
755
|
+
|
|
756
|
+
export const PutAddressMapAccountResponse =
|
|
757
|
+
/*@__PURE__*/ /*#__PURE__*/ Schema.Struct({
|
|
758
|
+
errors: Schema.Array(
|
|
759
|
+
Schema.Struct({
|
|
760
|
+
code: Schema.Number,
|
|
761
|
+
message: Schema.String,
|
|
762
|
+
documentationUrl: Schema.optional(
|
|
763
|
+
Schema.Union([Schema.String, Schema.Null]),
|
|
764
|
+
),
|
|
765
|
+
source: Schema.optional(
|
|
766
|
+
Schema.Union([
|
|
767
|
+
Schema.Struct({
|
|
768
|
+
pointer: Schema.optional(
|
|
769
|
+
Schema.Union([Schema.String, Schema.Null]),
|
|
770
|
+
),
|
|
771
|
+
}),
|
|
772
|
+
Schema.Null,
|
|
773
|
+
]),
|
|
774
|
+
),
|
|
775
|
+
}).pipe(
|
|
776
|
+
Schema.encodeKeys({
|
|
777
|
+
code: "code",
|
|
778
|
+
message: "message",
|
|
779
|
+
documentationUrl: "documentation_url",
|
|
780
|
+
source: "source",
|
|
781
|
+
}),
|
|
782
|
+
),
|
|
783
|
+
),
|
|
784
|
+
messages: Schema.Array(
|
|
785
|
+
Schema.Struct({
|
|
786
|
+
code: Schema.Number,
|
|
787
|
+
message: Schema.String,
|
|
788
|
+
documentationUrl: Schema.optional(
|
|
789
|
+
Schema.Union([Schema.String, Schema.Null]),
|
|
790
|
+
),
|
|
791
|
+
source: Schema.optional(
|
|
792
|
+
Schema.Union([
|
|
793
|
+
Schema.Struct({
|
|
794
|
+
pointer: Schema.optional(
|
|
795
|
+
Schema.Union([Schema.String, Schema.Null]),
|
|
796
|
+
),
|
|
797
|
+
}),
|
|
798
|
+
Schema.Null,
|
|
799
|
+
]),
|
|
800
|
+
),
|
|
801
|
+
}).pipe(
|
|
802
|
+
Schema.encodeKeys({
|
|
803
|
+
code: "code",
|
|
804
|
+
message: "message",
|
|
805
|
+
documentationUrl: "documentation_url",
|
|
806
|
+
source: "source",
|
|
807
|
+
}),
|
|
808
|
+
),
|
|
809
|
+
),
|
|
810
|
+
success: Schema.Literal(true),
|
|
811
|
+
resultInfo: Schema.optional(
|
|
812
|
+
Schema.Union([
|
|
813
|
+
Schema.Struct({
|
|
814
|
+
count: Schema.optional(Schema.Union([Schema.Number, Schema.Null])),
|
|
815
|
+
page: Schema.optional(Schema.Union([Schema.Number, Schema.Null])),
|
|
816
|
+
perPage: Schema.optional(Schema.Union([Schema.Number, Schema.Null])),
|
|
817
|
+
totalCount: Schema.optional(
|
|
818
|
+
Schema.Union([Schema.Number, Schema.Null]),
|
|
819
|
+
),
|
|
820
|
+
}).pipe(
|
|
821
|
+
Schema.encodeKeys({
|
|
822
|
+
count: "count",
|
|
823
|
+
page: "page",
|
|
824
|
+
perPage: "per_page",
|
|
825
|
+
totalCount: "total_count",
|
|
826
|
+
}),
|
|
827
|
+
),
|
|
828
|
+
Schema.Null,
|
|
829
|
+
]),
|
|
830
|
+
),
|
|
831
|
+
}).pipe(
|
|
832
|
+
Schema.encodeKeys({
|
|
833
|
+
errors: "errors",
|
|
834
|
+
messages: "messages",
|
|
835
|
+
success: "success",
|
|
836
|
+
resultInfo: "result_info",
|
|
837
|
+
}),
|
|
838
|
+
) as unknown as Schema.Schema<PutAddressMapAccountResponse>;
|
|
839
|
+
|
|
840
|
+
export type PutAddressMapAccountError =
|
|
841
|
+
| DefaultErrors
|
|
842
|
+
| MethodNotAllowed
|
|
843
|
+
| FeatureNotEnabled
|
|
844
|
+
| InvalidAccountId;
|
|
845
|
+
|
|
846
|
+
export const putAddressMapAccount: API.OperationMethod<
|
|
847
|
+
PutAddressMapAccountRequest,
|
|
848
|
+
PutAddressMapAccountResponse,
|
|
849
|
+
PutAddressMapAccountError,
|
|
850
|
+
Credentials | HttpClient.HttpClient
|
|
851
|
+
> = /*@__PURE__*/ /*#__PURE__*/ API.make(() => ({
|
|
852
|
+
input: PutAddressMapAccountRequest,
|
|
853
|
+
output: PutAddressMapAccountResponse,
|
|
854
|
+
errors: [MethodNotAllowed, FeatureNotEnabled, InvalidAccountId],
|
|
855
|
+
}));
|
|
856
|
+
|
|
857
|
+
export interface DeleteAddressMapAccountRequest {
|
|
858
|
+
addressMapId: string;
|
|
859
|
+
/** Identifier of a Cloudflare account. */
|
|
860
|
+
accountId: string;
|
|
861
|
+
}
|
|
862
|
+
|
|
863
|
+
export const DeleteAddressMapAccountRequest =
|
|
864
|
+
/*@__PURE__*/ /*#__PURE__*/ Schema.Struct({
|
|
865
|
+
addressMapId: Schema.String.pipe(T.HttpPath("addressMapId")),
|
|
866
|
+
accountId: Schema.String.pipe(T.HttpPath("account_id")),
|
|
867
|
+
}).pipe(
|
|
868
|
+
T.Http({
|
|
869
|
+
method: "DELETE",
|
|
870
|
+
path: "/accounts/{account_id}/addressing/address_maps/{addressMapId}/accounts/{account_id}",
|
|
871
|
+
}),
|
|
872
|
+
) as unknown as Schema.Schema<DeleteAddressMapAccountRequest>;
|
|
873
|
+
|
|
874
|
+
export interface DeleteAddressMapAccountResponse {
|
|
875
|
+
errors: {
|
|
876
|
+
code: number;
|
|
877
|
+
message: string;
|
|
878
|
+
documentationUrl?: string | null;
|
|
879
|
+
source?: { pointer?: string | null } | null;
|
|
880
|
+
}[];
|
|
881
|
+
messages: {
|
|
882
|
+
code: number;
|
|
883
|
+
message: string;
|
|
884
|
+
documentationUrl?: string | null;
|
|
885
|
+
source?: { pointer?: string | null } | null;
|
|
886
|
+
}[];
|
|
887
|
+
/** Whether the API call was successful. */
|
|
888
|
+
success: true;
|
|
889
|
+
resultInfo?: {
|
|
890
|
+
count?: number | null;
|
|
891
|
+
page?: number | null;
|
|
892
|
+
perPage?: number | null;
|
|
893
|
+
totalCount?: number | null;
|
|
894
|
+
} | null;
|
|
895
|
+
}
|
|
896
|
+
|
|
897
|
+
export const DeleteAddressMapAccountResponse =
|
|
898
|
+
/*@__PURE__*/ /*#__PURE__*/ Schema.Struct({
|
|
899
|
+
errors: Schema.Array(
|
|
900
|
+
Schema.Struct({
|
|
901
|
+
code: Schema.Number,
|
|
902
|
+
message: Schema.String,
|
|
903
|
+
documentationUrl: Schema.optional(
|
|
904
|
+
Schema.Union([Schema.String, Schema.Null]),
|
|
905
|
+
),
|
|
906
|
+
source: Schema.optional(
|
|
907
|
+
Schema.Union([
|
|
908
|
+
Schema.Struct({
|
|
909
|
+
pointer: Schema.optional(
|
|
910
|
+
Schema.Union([Schema.String, Schema.Null]),
|
|
911
|
+
),
|
|
912
|
+
}),
|
|
913
|
+
Schema.Null,
|
|
914
|
+
]),
|
|
915
|
+
),
|
|
916
|
+
}).pipe(
|
|
917
|
+
Schema.encodeKeys({
|
|
918
|
+
code: "code",
|
|
919
|
+
message: "message",
|
|
920
|
+
documentationUrl: "documentation_url",
|
|
921
|
+
source: "source",
|
|
922
|
+
}),
|
|
923
|
+
),
|
|
924
|
+
),
|
|
925
|
+
messages: Schema.Array(
|
|
926
|
+
Schema.Struct({
|
|
927
|
+
code: Schema.Number,
|
|
928
|
+
message: Schema.String,
|
|
929
|
+
documentationUrl: Schema.optional(
|
|
930
|
+
Schema.Union([Schema.String, Schema.Null]),
|
|
931
|
+
),
|
|
932
|
+
source: Schema.optional(
|
|
933
|
+
Schema.Union([
|
|
934
|
+
Schema.Struct({
|
|
935
|
+
pointer: Schema.optional(
|
|
936
|
+
Schema.Union([Schema.String, Schema.Null]),
|
|
937
|
+
),
|
|
938
|
+
}),
|
|
939
|
+
Schema.Null,
|
|
940
|
+
]),
|
|
941
|
+
),
|
|
942
|
+
}).pipe(
|
|
943
|
+
Schema.encodeKeys({
|
|
944
|
+
code: "code",
|
|
945
|
+
message: "message",
|
|
946
|
+
documentationUrl: "documentation_url",
|
|
947
|
+
source: "source",
|
|
948
|
+
}),
|
|
949
|
+
),
|
|
950
|
+
),
|
|
951
|
+
success: Schema.Literal(true),
|
|
952
|
+
resultInfo: Schema.optional(
|
|
953
|
+
Schema.Union([
|
|
954
|
+
Schema.Struct({
|
|
955
|
+
count: Schema.optional(Schema.Union([Schema.Number, Schema.Null])),
|
|
956
|
+
page: Schema.optional(Schema.Union([Schema.Number, Schema.Null])),
|
|
957
|
+
perPage: Schema.optional(Schema.Union([Schema.Number, Schema.Null])),
|
|
958
|
+
totalCount: Schema.optional(
|
|
959
|
+
Schema.Union([Schema.Number, Schema.Null]),
|
|
960
|
+
),
|
|
961
|
+
}).pipe(
|
|
962
|
+
Schema.encodeKeys({
|
|
963
|
+
count: "count",
|
|
964
|
+
page: "page",
|
|
965
|
+
perPage: "per_page",
|
|
966
|
+
totalCount: "total_count",
|
|
967
|
+
}),
|
|
968
|
+
),
|
|
969
|
+
Schema.Null,
|
|
970
|
+
]),
|
|
971
|
+
),
|
|
972
|
+
}).pipe(
|
|
973
|
+
Schema.encodeKeys({
|
|
974
|
+
errors: "errors",
|
|
975
|
+
messages: "messages",
|
|
976
|
+
success: "success",
|
|
977
|
+
resultInfo: "result_info",
|
|
978
|
+
}),
|
|
979
|
+
) as unknown as Schema.Schema<DeleteAddressMapAccountResponse>;
|
|
980
|
+
|
|
981
|
+
export type DeleteAddressMapAccountError =
|
|
982
|
+
| DefaultErrors
|
|
983
|
+
| MethodNotAllowed
|
|
984
|
+
| FeatureNotEnabled
|
|
985
|
+
| InvalidAccountId;
|
|
986
|
+
|
|
987
|
+
export const deleteAddressMapAccount: API.OperationMethod<
|
|
988
|
+
DeleteAddressMapAccountRequest,
|
|
989
|
+
DeleteAddressMapAccountResponse,
|
|
990
|
+
DeleteAddressMapAccountError,
|
|
991
|
+
Credentials | HttpClient.HttpClient
|
|
992
|
+
> = /*@__PURE__*/ /*#__PURE__*/ API.make(() => ({
|
|
993
|
+
input: DeleteAddressMapAccountRequest,
|
|
994
|
+
output: DeleteAddressMapAccountResponse,
|
|
995
|
+
errors: [MethodNotAllowed, FeatureNotEnabled, InvalidAccountId],
|
|
996
|
+
}));
|
|
997
|
+
|
|
998
|
+
// =============================================================================
|
|
999
|
+
// AddressMapIp
|
|
1000
|
+
// =============================================================================
|
|
1001
|
+
|
|
1002
|
+
export interface PutAddressMapIpRequest {
|
|
1003
|
+
addressMapId: string;
|
|
1004
|
+
ipAddress: string;
|
|
1005
|
+
/** Path param: Identifier of a Cloudflare account. */
|
|
1006
|
+
accountId: string;
|
|
1007
|
+
/** Body param: */
|
|
1008
|
+
body: unknown;
|
|
1009
|
+
}
|
|
1010
|
+
|
|
1011
|
+
export const PutAddressMapIpRequest = /*@__PURE__*/ /*#__PURE__*/ Schema.Struct(
|
|
1012
|
+
{
|
|
1013
|
+
addressMapId: Schema.String.pipe(T.HttpPath("addressMapId")),
|
|
1014
|
+
ipAddress: Schema.String.pipe(T.HttpPath("ipAddress")),
|
|
1015
|
+
accountId: Schema.String.pipe(T.HttpPath("account_id")),
|
|
1016
|
+
body: Schema.Unknown.pipe(T.HttpBody()),
|
|
1017
|
+
},
|
|
1018
|
+
).pipe(
|
|
1019
|
+
T.Http({
|
|
1020
|
+
method: "PUT",
|
|
1021
|
+
path: "/accounts/{account_id}/addressing/address_maps/{addressMapId}/ips/{ipAddress}",
|
|
1022
|
+
}),
|
|
1023
|
+
) as unknown as Schema.Schema<PutAddressMapIpRequest>;
|
|
1024
|
+
|
|
1025
|
+
export interface PutAddressMapIpResponse {
|
|
1026
|
+
errors: {
|
|
1027
|
+
code: number;
|
|
1028
|
+
message: string;
|
|
1029
|
+
documentationUrl?: string | null;
|
|
1030
|
+
source?: { pointer?: string | null } | null;
|
|
1031
|
+
}[];
|
|
1032
|
+
messages: {
|
|
1033
|
+
code: number;
|
|
1034
|
+
message: string;
|
|
1035
|
+
documentationUrl?: string | null;
|
|
1036
|
+
source?: { pointer?: string | null } | null;
|
|
1037
|
+
}[];
|
|
1038
|
+
/** Whether the API call was successful. */
|
|
1039
|
+
success: true;
|
|
1040
|
+
resultInfo?: {
|
|
1041
|
+
count?: number | null;
|
|
1042
|
+
page?: number | null;
|
|
1043
|
+
perPage?: number | null;
|
|
1044
|
+
totalCount?: number | null;
|
|
1045
|
+
} | null;
|
|
1046
|
+
}
|
|
1047
|
+
|
|
1048
|
+
export const PutAddressMapIpResponse =
|
|
1049
|
+
/*@__PURE__*/ /*#__PURE__*/ Schema.Struct({
|
|
1050
|
+
errors: Schema.Array(
|
|
1051
|
+
Schema.Struct({
|
|
1052
|
+
code: Schema.Number,
|
|
1053
|
+
message: Schema.String,
|
|
1054
|
+
documentationUrl: Schema.optional(
|
|
1055
|
+
Schema.Union([Schema.String, Schema.Null]),
|
|
1056
|
+
),
|
|
1057
|
+
source: Schema.optional(
|
|
1058
|
+
Schema.Union([
|
|
1059
|
+
Schema.Struct({
|
|
1060
|
+
pointer: Schema.optional(
|
|
1061
|
+
Schema.Union([Schema.String, Schema.Null]),
|
|
1062
|
+
),
|
|
1063
|
+
}),
|
|
1064
|
+
Schema.Null,
|
|
1065
|
+
]),
|
|
1066
|
+
),
|
|
1067
|
+
}).pipe(
|
|
1068
|
+
Schema.encodeKeys({
|
|
1069
|
+
code: "code",
|
|
1070
|
+
message: "message",
|
|
1071
|
+
documentationUrl: "documentation_url",
|
|
1072
|
+
source: "source",
|
|
1073
|
+
}),
|
|
1074
|
+
),
|
|
1075
|
+
),
|
|
1076
|
+
messages: Schema.Array(
|
|
1077
|
+
Schema.Struct({
|
|
1078
|
+
code: Schema.Number,
|
|
1079
|
+
message: Schema.String,
|
|
1080
|
+
documentationUrl: Schema.optional(
|
|
1081
|
+
Schema.Union([Schema.String, Schema.Null]),
|
|
1082
|
+
),
|
|
1083
|
+
source: Schema.optional(
|
|
1084
|
+
Schema.Union([
|
|
1085
|
+
Schema.Struct({
|
|
1086
|
+
pointer: Schema.optional(
|
|
1087
|
+
Schema.Union([Schema.String, Schema.Null]),
|
|
1088
|
+
),
|
|
1089
|
+
}),
|
|
1090
|
+
Schema.Null,
|
|
1091
|
+
]),
|
|
1092
|
+
),
|
|
1093
|
+
}).pipe(
|
|
1094
|
+
Schema.encodeKeys({
|
|
1095
|
+
code: "code",
|
|
1096
|
+
message: "message",
|
|
1097
|
+
documentationUrl: "documentation_url",
|
|
1098
|
+
source: "source",
|
|
1099
|
+
}),
|
|
1100
|
+
),
|
|
1101
|
+
),
|
|
1102
|
+
success: Schema.Literal(true),
|
|
1103
|
+
resultInfo: Schema.optional(
|
|
1104
|
+
Schema.Union([
|
|
1105
|
+
Schema.Struct({
|
|
1106
|
+
count: Schema.optional(Schema.Union([Schema.Number, Schema.Null])),
|
|
1107
|
+
page: Schema.optional(Schema.Union([Schema.Number, Schema.Null])),
|
|
1108
|
+
perPage: Schema.optional(Schema.Union([Schema.Number, Schema.Null])),
|
|
1109
|
+
totalCount: Schema.optional(
|
|
1110
|
+
Schema.Union([Schema.Number, Schema.Null]),
|
|
1111
|
+
),
|
|
1112
|
+
}).pipe(
|
|
1113
|
+
Schema.encodeKeys({
|
|
1114
|
+
count: "count",
|
|
1115
|
+
page: "page",
|
|
1116
|
+
perPage: "per_page",
|
|
1117
|
+
totalCount: "total_count",
|
|
1118
|
+
}),
|
|
1119
|
+
),
|
|
1120
|
+
Schema.Null,
|
|
1121
|
+
]),
|
|
1122
|
+
),
|
|
1123
|
+
}).pipe(
|
|
1124
|
+
Schema.encodeKeys({
|
|
1125
|
+
errors: "errors",
|
|
1126
|
+
messages: "messages",
|
|
1127
|
+
success: "success",
|
|
1128
|
+
resultInfo: "result_info",
|
|
1129
|
+
}),
|
|
1130
|
+
) as unknown as Schema.Schema<PutAddressMapIpResponse>;
|
|
1131
|
+
|
|
1132
|
+
export type PutAddressMapIpError =
|
|
1133
|
+
| DefaultErrors
|
|
1134
|
+
| MethodNotAllowed
|
|
1135
|
+
| FeatureNotEnabled
|
|
1136
|
+
| InvalidAccountId
|
|
1137
|
+
| AddressMapNotFound;
|
|
1138
|
+
|
|
1139
|
+
export const putAddressMapIp: API.OperationMethod<
|
|
1140
|
+
PutAddressMapIpRequest,
|
|
1141
|
+
PutAddressMapIpResponse,
|
|
1142
|
+
PutAddressMapIpError,
|
|
1143
|
+
Credentials | HttpClient.HttpClient
|
|
1144
|
+
> = /*@__PURE__*/ /*#__PURE__*/ API.make(() => ({
|
|
1145
|
+
input: PutAddressMapIpRequest,
|
|
1146
|
+
output: PutAddressMapIpResponse,
|
|
1147
|
+
errors: [
|
|
1148
|
+
MethodNotAllowed,
|
|
1149
|
+
FeatureNotEnabled,
|
|
1150
|
+
InvalidAccountId,
|
|
1151
|
+
AddressMapNotFound,
|
|
1152
|
+
],
|
|
1153
|
+
}));
|
|
1154
|
+
|
|
1155
|
+
export interface DeleteAddressMapIpRequest {
|
|
1156
|
+
addressMapId: string;
|
|
1157
|
+
ipAddress: string;
|
|
1158
|
+
/** Identifier of a Cloudflare account. */
|
|
1159
|
+
accountId: string;
|
|
1160
|
+
}
|
|
1161
|
+
|
|
1162
|
+
export const DeleteAddressMapIpRequest =
|
|
1163
|
+
/*@__PURE__*/ /*#__PURE__*/ Schema.Struct({
|
|
1164
|
+
addressMapId: Schema.String.pipe(T.HttpPath("addressMapId")),
|
|
1165
|
+
ipAddress: Schema.String.pipe(T.HttpPath("ipAddress")),
|
|
1166
|
+
accountId: Schema.String.pipe(T.HttpPath("account_id")),
|
|
1167
|
+
}).pipe(
|
|
1168
|
+
T.Http({
|
|
1169
|
+
method: "DELETE",
|
|
1170
|
+
path: "/accounts/{account_id}/addressing/address_maps/{addressMapId}/ips/{ipAddress}",
|
|
1171
|
+
}),
|
|
1172
|
+
) as unknown as Schema.Schema<DeleteAddressMapIpRequest>;
|
|
1173
|
+
|
|
1174
|
+
export interface DeleteAddressMapIpResponse {
|
|
1175
|
+
errors: {
|
|
1176
|
+
code: number;
|
|
1177
|
+
message: string;
|
|
1178
|
+
documentationUrl?: string | null;
|
|
1179
|
+
source?: { pointer?: string | null } | null;
|
|
1180
|
+
}[];
|
|
1181
|
+
messages: {
|
|
1182
|
+
code: number;
|
|
1183
|
+
message: string;
|
|
1184
|
+
documentationUrl?: string | null;
|
|
1185
|
+
source?: { pointer?: string | null } | null;
|
|
1186
|
+
}[];
|
|
1187
|
+
/** Whether the API call was successful. */
|
|
1188
|
+
success: true;
|
|
1189
|
+
resultInfo?: {
|
|
1190
|
+
count?: number | null;
|
|
1191
|
+
page?: number | null;
|
|
1192
|
+
perPage?: number | null;
|
|
1193
|
+
totalCount?: number | null;
|
|
1194
|
+
} | null;
|
|
1195
|
+
}
|
|
1196
|
+
|
|
1197
|
+
export const DeleteAddressMapIpResponse =
|
|
1198
|
+
/*@__PURE__*/ /*#__PURE__*/ Schema.Struct({
|
|
1199
|
+
errors: Schema.Array(
|
|
1200
|
+
Schema.Struct({
|
|
1201
|
+
code: Schema.Number,
|
|
1202
|
+
message: Schema.String,
|
|
1203
|
+
documentationUrl: Schema.optional(
|
|
1204
|
+
Schema.Union([Schema.String, Schema.Null]),
|
|
1205
|
+
),
|
|
1206
|
+
source: Schema.optional(
|
|
1207
|
+
Schema.Union([
|
|
1208
|
+
Schema.Struct({
|
|
1209
|
+
pointer: Schema.optional(
|
|
1210
|
+
Schema.Union([Schema.String, Schema.Null]),
|
|
1211
|
+
),
|
|
1212
|
+
}),
|
|
1213
|
+
Schema.Null,
|
|
1214
|
+
]),
|
|
1215
|
+
),
|
|
1216
|
+
}).pipe(
|
|
1217
|
+
Schema.encodeKeys({
|
|
1218
|
+
code: "code",
|
|
1219
|
+
message: "message",
|
|
1220
|
+
documentationUrl: "documentation_url",
|
|
1221
|
+
source: "source",
|
|
1222
|
+
}),
|
|
1223
|
+
),
|
|
1224
|
+
),
|
|
1225
|
+
messages: Schema.Array(
|
|
1226
|
+
Schema.Struct({
|
|
1227
|
+
code: Schema.Number,
|
|
1228
|
+
message: Schema.String,
|
|
1229
|
+
documentationUrl: Schema.optional(
|
|
1230
|
+
Schema.Union([Schema.String, Schema.Null]),
|
|
1231
|
+
),
|
|
1232
|
+
source: Schema.optional(
|
|
1233
|
+
Schema.Union([
|
|
1234
|
+
Schema.Struct({
|
|
1235
|
+
pointer: Schema.optional(
|
|
1236
|
+
Schema.Union([Schema.String, Schema.Null]),
|
|
1237
|
+
),
|
|
1238
|
+
}),
|
|
1239
|
+
Schema.Null,
|
|
1240
|
+
]),
|
|
1241
|
+
),
|
|
1242
|
+
}).pipe(
|
|
1243
|
+
Schema.encodeKeys({
|
|
1244
|
+
code: "code",
|
|
1245
|
+
message: "message",
|
|
1246
|
+
documentationUrl: "documentation_url",
|
|
1247
|
+
source: "source",
|
|
1248
|
+
}),
|
|
1249
|
+
),
|
|
1250
|
+
),
|
|
1251
|
+
success: Schema.Literal(true),
|
|
1252
|
+
resultInfo: Schema.optional(
|
|
1253
|
+
Schema.Union([
|
|
1254
|
+
Schema.Struct({
|
|
1255
|
+
count: Schema.optional(Schema.Union([Schema.Number, Schema.Null])),
|
|
1256
|
+
page: Schema.optional(Schema.Union([Schema.Number, Schema.Null])),
|
|
1257
|
+
perPage: Schema.optional(Schema.Union([Schema.Number, Schema.Null])),
|
|
1258
|
+
totalCount: Schema.optional(
|
|
1259
|
+
Schema.Union([Schema.Number, Schema.Null]),
|
|
1260
|
+
),
|
|
1261
|
+
}).pipe(
|
|
1262
|
+
Schema.encodeKeys({
|
|
1263
|
+
count: "count",
|
|
1264
|
+
page: "page",
|
|
1265
|
+
perPage: "per_page",
|
|
1266
|
+
totalCount: "total_count",
|
|
1267
|
+
}),
|
|
1268
|
+
),
|
|
1269
|
+
Schema.Null,
|
|
1270
|
+
]),
|
|
1271
|
+
),
|
|
1272
|
+
}).pipe(
|
|
1273
|
+
Schema.encodeKeys({
|
|
1274
|
+
errors: "errors",
|
|
1275
|
+
messages: "messages",
|
|
1276
|
+
success: "success",
|
|
1277
|
+
resultInfo: "result_info",
|
|
1278
|
+
}),
|
|
1279
|
+
) as unknown as Schema.Schema<DeleteAddressMapIpResponse>;
|
|
1280
|
+
|
|
1281
|
+
export type DeleteAddressMapIpError =
|
|
1282
|
+
| DefaultErrors
|
|
1283
|
+
| MethodNotAllowed
|
|
1284
|
+
| FeatureNotEnabled
|
|
1285
|
+
| InvalidAccountId
|
|
1286
|
+
| AddressMapNotFound;
|
|
1287
|
+
|
|
1288
|
+
export const deleteAddressMapIp: API.OperationMethod<
|
|
1289
|
+
DeleteAddressMapIpRequest,
|
|
1290
|
+
DeleteAddressMapIpResponse,
|
|
1291
|
+
DeleteAddressMapIpError,
|
|
1292
|
+
Credentials | HttpClient.HttpClient
|
|
1293
|
+
> = /*@__PURE__*/ /*#__PURE__*/ API.make(() => ({
|
|
1294
|
+
input: DeleteAddressMapIpRequest,
|
|
1295
|
+
output: DeleteAddressMapIpResponse,
|
|
1296
|
+
errors: [
|
|
1297
|
+
MethodNotAllowed,
|
|
1298
|
+
FeatureNotEnabled,
|
|
1299
|
+
InvalidAccountId,
|
|
1300
|
+
AddressMapNotFound,
|
|
1301
|
+
],
|
|
1302
|
+
}));
|
|
1303
|
+
|
|
1304
|
+
// =============================================================================
|
|
1305
|
+
// AddressMapZone
|
|
1306
|
+
// =============================================================================
|
|
1307
|
+
|
|
1308
|
+
export interface PutAddressMapZoneRequest {
|
|
1309
|
+
addressMapId: string;
|
|
1310
|
+
/** Path param: Identifier of a zone. */
|
|
1311
|
+
zoneId: string;
|
|
1312
|
+
/** Path param: Identifier of a Cloudflare account. */
|
|
1313
|
+
accountId: string;
|
|
1314
|
+
/** Body param: */
|
|
1315
|
+
body: unknown;
|
|
1316
|
+
}
|
|
1317
|
+
|
|
1318
|
+
export const PutAddressMapZoneRequest =
|
|
1319
|
+
/*@__PURE__*/ /*#__PURE__*/ Schema.Struct({
|
|
1320
|
+
addressMapId: Schema.String.pipe(T.HttpPath("addressMapId")),
|
|
1321
|
+
zoneId: Schema.String.pipe(T.HttpPath("zone_id")),
|
|
1322
|
+
accountId: Schema.String.pipe(T.HttpPath("account_id")),
|
|
1323
|
+
body: Schema.Unknown.pipe(T.HttpBody()),
|
|
1324
|
+
}).pipe(
|
|
1325
|
+
T.Http({
|
|
1326
|
+
method: "PUT",
|
|
1327
|
+
path: "/accounts/{account_id}/addressing/address_maps/{addressMapId}/zones/{zone_id}",
|
|
1328
|
+
}),
|
|
1329
|
+
) as unknown as Schema.Schema<PutAddressMapZoneRequest>;
|
|
1330
|
+
|
|
1331
|
+
export interface PutAddressMapZoneResponse {
|
|
1332
|
+
errors: {
|
|
1333
|
+
code: number;
|
|
1334
|
+
message: string;
|
|
1335
|
+
documentationUrl?: string | null;
|
|
1336
|
+
source?: { pointer?: string | null } | null;
|
|
1337
|
+
}[];
|
|
1338
|
+
messages: {
|
|
1339
|
+
code: number;
|
|
1340
|
+
message: string;
|
|
1341
|
+
documentationUrl?: string | null;
|
|
1342
|
+
source?: { pointer?: string | null } | null;
|
|
1343
|
+
}[];
|
|
1344
|
+
/** Whether the API call was successful. */
|
|
1345
|
+
success: true;
|
|
1346
|
+
resultInfo?: {
|
|
1347
|
+
count?: number | null;
|
|
1348
|
+
page?: number | null;
|
|
1349
|
+
perPage?: number | null;
|
|
1350
|
+
totalCount?: number | null;
|
|
1351
|
+
} | null;
|
|
1352
|
+
}
|
|
1353
|
+
|
|
1354
|
+
export const PutAddressMapZoneResponse =
|
|
1355
|
+
/*@__PURE__*/ /*#__PURE__*/ Schema.Struct({
|
|
1356
|
+
errors: Schema.Array(
|
|
1357
|
+
Schema.Struct({
|
|
1358
|
+
code: Schema.Number,
|
|
1359
|
+
message: Schema.String,
|
|
1360
|
+
documentationUrl: Schema.optional(
|
|
1361
|
+
Schema.Union([Schema.String, Schema.Null]),
|
|
1362
|
+
),
|
|
1363
|
+
source: Schema.optional(
|
|
1364
|
+
Schema.Union([
|
|
1365
|
+
Schema.Struct({
|
|
1366
|
+
pointer: Schema.optional(
|
|
1367
|
+
Schema.Union([Schema.String, Schema.Null]),
|
|
1368
|
+
),
|
|
1369
|
+
}),
|
|
1370
|
+
Schema.Null,
|
|
1371
|
+
]),
|
|
1372
|
+
),
|
|
1373
|
+
}).pipe(
|
|
1374
|
+
Schema.encodeKeys({
|
|
1375
|
+
code: "code",
|
|
1376
|
+
message: "message",
|
|
1377
|
+
documentationUrl: "documentation_url",
|
|
1378
|
+
source: "source",
|
|
1379
|
+
}),
|
|
1380
|
+
),
|
|
1381
|
+
),
|
|
1382
|
+
messages: Schema.Array(
|
|
1383
|
+
Schema.Struct({
|
|
1384
|
+
code: Schema.Number,
|
|
1385
|
+
message: Schema.String,
|
|
1386
|
+
documentationUrl: Schema.optional(
|
|
1387
|
+
Schema.Union([Schema.String, Schema.Null]),
|
|
1388
|
+
),
|
|
1389
|
+
source: Schema.optional(
|
|
1390
|
+
Schema.Union([
|
|
1391
|
+
Schema.Struct({
|
|
1392
|
+
pointer: Schema.optional(
|
|
1393
|
+
Schema.Union([Schema.String, Schema.Null]),
|
|
1394
|
+
),
|
|
1395
|
+
}),
|
|
1396
|
+
Schema.Null,
|
|
1397
|
+
]),
|
|
1398
|
+
),
|
|
1399
|
+
}).pipe(
|
|
1400
|
+
Schema.encodeKeys({
|
|
1401
|
+
code: "code",
|
|
1402
|
+
message: "message",
|
|
1403
|
+
documentationUrl: "documentation_url",
|
|
1404
|
+
source: "source",
|
|
1405
|
+
}),
|
|
1406
|
+
),
|
|
1407
|
+
),
|
|
1408
|
+
success: Schema.Literal(true),
|
|
1409
|
+
resultInfo: Schema.optional(
|
|
1410
|
+
Schema.Union([
|
|
1411
|
+
Schema.Struct({
|
|
1412
|
+
count: Schema.optional(Schema.Union([Schema.Number, Schema.Null])),
|
|
1413
|
+
page: Schema.optional(Schema.Union([Schema.Number, Schema.Null])),
|
|
1414
|
+
perPage: Schema.optional(Schema.Union([Schema.Number, Schema.Null])),
|
|
1415
|
+
totalCount: Schema.optional(
|
|
1416
|
+
Schema.Union([Schema.Number, Schema.Null]),
|
|
1417
|
+
),
|
|
1418
|
+
}).pipe(
|
|
1419
|
+
Schema.encodeKeys({
|
|
1420
|
+
count: "count",
|
|
1421
|
+
page: "page",
|
|
1422
|
+
perPage: "per_page",
|
|
1423
|
+
totalCount: "total_count",
|
|
1424
|
+
}),
|
|
1425
|
+
),
|
|
1426
|
+
Schema.Null,
|
|
1427
|
+
]),
|
|
1428
|
+
),
|
|
1429
|
+
}).pipe(
|
|
1430
|
+
Schema.encodeKeys({
|
|
1431
|
+
errors: "errors",
|
|
1432
|
+
messages: "messages",
|
|
1433
|
+
success: "success",
|
|
1434
|
+
resultInfo: "result_info",
|
|
1435
|
+
}),
|
|
1436
|
+
) as unknown as Schema.Schema<PutAddressMapZoneResponse>;
|
|
1437
|
+
|
|
1438
|
+
export type PutAddressMapZoneError =
|
|
1439
|
+
| DefaultErrors
|
|
1440
|
+
| MethodNotAllowed
|
|
1441
|
+
| FeatureNotEnabled
|
|
1442
|
+
| InvalidAccountId;
|
|
1443
|
+
|
|
1444
|
+
export const putAddressMapZone: API.OperationMethod<
|
|
1445
|
+
PutAddressMapZoneRequest,
|
|
1446
|
+
PutAddressMapZoneResponse,
|
|
1447
|
+
PutAddressMapZoneError,
|
|
1448
|
+
Credentials | HttpClient.HttpClient
|
|
1449
|
+
> = /*@__PURE__*/ /*#__PURE__*/ API.make(() => ({
|
|
1450
|
+
input: PutAddressMapZoneRequest,
|
|
1451
|
+
output: PutAddressMapZoneResponse,
|
|
1452
|
+
errors: [MethodNotAllowed, FeatureNotEnabled, InvalidAccountId],
|
|
1453
|
+
}));
|
|
1454
|
+
|
|
1455
|
+
export interface DeleteAddressMapZoneRequest {
|
|
1456
|
+
addressMapId: string;
|
|
1457
|
+
/** Identifier of a zone. */
|
|
1458
|
+
zoneId: string;
|
|
1459
|
+
/** Identifier of a Cloudflare account. */
|
|
1460
|
+
accountId: string;
|
|
1461
|
+
}
|
|
1462
|
+
|
|
1463
|
+
export const DeleteAddressMapZoneRequest =
|
|
1464
|
+
/*@__PURE__*/ /*#__PURE__*/ Schema.Struct({
|
|
1465
|
+
addressMapId: Schema.String.pipe(T.HttpPath("addressMapId")),
|
|
1466
|
+
zoneId: Schema.String.pipe(T.HttpPath("zone_id")),
|
|
1467
|
+
accountId: Schema.String.pipe(T.HttpPath("account_id")),
|
|
1468
|
+
}).pipe(
|
|
1469
|
+
T.Http({
|
|
1470
|
+
method: "DELETE",
|
|
1471
|
+
path: "/accounts/{account_id}/addressing/address_maps/{addressMapId}/zones/{zone_id}",
|
|
1472
|
+
}),
|
|
1473
|
+
) as unknown as Schema.Schema<DeleteAddressMapZoneRequest>;
|
|
1474
|
+
|
|
1475
|
+
export interface DeleteAddressMapZoneResponse {
|
|
1476
|
+
errors: {
|
|
1477
|
+
code: number;
|
|
1478
|
+
message: string;
|
|
1479
|
+
documentationUrl?: string | null;
|
|
1480
|
+
source?: { pointer?: string | null } | null;
|
|
1481
|
+
}[];
|
|
1482
|
+
messages: {
|
|
1483
|
+
code: number;
|
|
1484
|
+
message: string;
|
|
1485
|
+
documentationUrl?: string | null;
|
|
1486
|
+
source?: { pointer?: string | null } | null;
|
|
1487
|
+
}[];
|
|
1488
|
+
/** Whether the API call was successful. */
|
|
1489
|
+
success: true;
|
|
1490
|
+
resultInfo?: {
|
|
1491
|
+
count?: number | null;
|
|
1492
|
+
page?: number | null;
|
|
1493
|
+
perPage?: number | null;
|
|
1494
|
+
totalCount?: number | null;
|
|
1495
|
+
} | null;
|
|
1496
|
+
}
|
|
1497
|
+
|
|
1498
|
+
export const DeleteAddressMapZoneResponse =
|
|
1499
|
+
/*@__PURE__*/ /*#__PURE__*/ Schema.Struct({
|
|
1500
|
+
errors: Schema.Array(
|
|
1501
|
+
Schema.Struct({
|
|
1502
|
+
code: Schema.Number,
|
|
1503
|
+
message: Schema.String,
|
|
1504
|
+
documentationUrl: Schema.optional(
|
|
1505
|
+
Schema.Union([Schema.String, Schema.Null]),
|
|
1506
|
+
),
|
|
1507
|
+
source: Schema.optional(
|
|
1508
|
+
Schema.Union([
|
|
1509
|
+
Schema.Struct({
|
|
1510
|
+
pointer: Schema.optional(
|
|
1511
|
+
Schema.Union([Schema.String, Schema.Null]),
|
|
1512
|
+
),
|
|
1513
|
+
}),
|
|
1514
|
+
Schema.Null,
|
|
1515
|
+
]),
|
|
1516
|
+
),
|
|
1517
|
+
}).pipe(
|
|
1518
|
+
Schema.encodeKeys({
|
|
1519
|
+
code: "code",
|
|
1520
|
+
message: "message",
|
|
1521
|
+
documentationUrl: "documentation_url",
|
|
1522
|
+
source: "source",
|
|
1523
|
+
}),
|
|
1524
|
+
),
|
|
1525
|
+
),
|
|
1526
|
+
messages: Schema.Array(
|
|
1527
|
+
Schema.Struct({
|
|
1528
|
+
code: Schema.Number,
|
|
1529
|
+
message: Schema.String,
|
|
1530
|
+
documentationUrl: Schema.optional(
|
|
1531
|
+
Schema.Union([Schema.String, Schema.Null]),
|
|
1532
|
+
),
|
|
1533
|
+
source: Schema.optional(
|
|
1534
|
+
Schema.Union([
|
|
1535
|
+
Schema.Struct({
|
|
1536
|
+
pointer: Schema.optional(
|
|
1537
|
+
Schema.Union([Schema.String, Schema.Null]),
|
|
1538
|
+
),
|
|
1539
|
+
}),
|
|
1540
|
+
Schema.Null,
|
|
1541
|
+
]),
|
|
1542
|
+
),
|
|
1543
|
+
}).pipe(
|
|
1544
|
+
Schema.encodeKeys({
|
|
1545
|
+
code: "code",
|
|
1546
|
+
message: "message",
|
|
1547
|
+
documentationUrl: "documentation_url",
|
|
1548
|
+
source: "source",
|
|
1549
|
+
}),
|
|
1550
|
+
),
|
|
1551
|
+
),
|
|
1552
|
+
success: Schema.Literal(true),
|
|
1553
|
+
resultInfo: Schema.optional(
|
|
1554
|
+
Schema.Union([
|
|
1555
|
+
Schema.Struct({
|
|
1556
|
+
count: Schema.optional(Schema.Union([Schema.Number, Schema.Null])),
|
|
1557
|
+
page: Schema.optional(Schema.Union([Schema.Number, Schema.Null])),
|
|
1558
|
+
perPage: Schema.optional(Schema.Union([Schema.Number, Schema.Null])),
|
|
1559
|
+
totalCount: Schema.optional(
|
|
1560
|
+
Schema.Union([Schema.Number, Schema.Null]),
|
|
1561
|
+
),
|
|
1562
|
+
}).pipe(
|
|
1563
|
+
Schema.encodeKeys({
|
|
1564
|
+
count: "count",
|
|
1565
|
+
page: "page",
|
|
1566
|
+
perPage: "per_page",
|
|
1567
|
+
totalCount: "total_count",
|
|
1568
|
+
}),
|
|
1569
|
+
),
|
|
1570
|
+
Schema.Null,
|
|
1571
|
+
]),
|
|
1572
|
+
),
|
|
1573
|
+
}).pipe(
|
|
1574
|
+
Schema.encodeKeys({
|
|
1575
|
+
errors: "errors",
|
|
1576
|
+
messages: "messages",
|
|
1577
|
+
success: "success",
|
|
1578
|
+
resultInfo: "result_info",
|
|
1579
|
+
}),
|
|
1580
|
+
) as unknown as Schema.Schema<DeleteAddressMapZoneResponse>;
|
|
1581
|
+
|
|
1582
|
+
export type DeleteAddressMapZoneError =
|
|
1583
|
+
| DefaultErrors
|
|
1584
|
+
| MethodNotAllowed
|
|
1585
|
+
| FeatureNotEnabled
|
|
1586
|
+
| InvalidAccountId;
|
|
1587
|
+
|
|
1588
|
+
export const deleteAddressMapZone: API.OperationMethod<
|
|
1589
|
+
DeleteAddressMapZoneRequest,
|
|
1590
|
+
DeleteAddressMapZoneResponse,
|
|
1591
|
+
DeleteAddressMapZoneError,
|
|
1592
|
+
Credentials | HttpClient.HttpClient
|
|
1593
|
+
> = /*@__PURE__*/ /*#__PURE__*/ API.make(() => ({
|
|
1594
|
+
input: DeleteAddressMapZoneRequest,
|
|
1595
|
+
output: DeleteAddressMapZoneResponse,
|
|
1596
|
+
errors: [MethodNotAllowed, FeatureNotEnabled, InvalidAccountId],
|
|
1597
|
+
}));
|
|
1598
|
+
|
|
1599
|
+
// =============================================================================
|
|
1600
|
+
// LoaDocument
|
|
1601
|
+
// =============================================================================
|
|
1602
|
+
|
|
1603
|
+
export interface GetLoaDocumentRequest {
|
|
1604
|
+
loaDocumentId: string | null;
|
|
1605
|
+
/** Identifier of a Cloudflare account. */
|
|
1606
|
+
accountId: string;
|
|
1607
|
+
}
|
|
1608
|
+
|
|
1609
|
+
export const GetLoaDocumentRequest = /*@__PURE__*/ /*#__PURE__*/ Schema.Struct({
|
|
1610
|
+
loaDocumentId: Schema.Union([Schema.String, Schema.Null]).pipe(
|
|
1611
|
+
T.HttpPath("loaDocumentId"),
|
|
1612
|
+
),
|
|
1613
|
+
accountId: Schema.String.pipe(T.HttpPath("account_id")),
|
|
1614
|
+
}).pipe(
|
|
1615
|
+
T.Http({
|
|
1616
|
+
method: "GET",
|
|
1617
|
+
path: "/accounts/{account_id}/addressing/loa_documents/{loaDocumentId}/download",
|
|
1618
|
+
}),
|
|
1619
|
+
) as unknown as Schema.Schema<GetLoaDocumentRequest>;
|
|
1620
|
+
|
|
1621
|
+
export type GetLoaDocumentResponse = unknown;
|
|
1622
|
+
|
|
1623
|
+
export const GetLoaDocumentResponse =
|
|
1624
|
+
/*@__PURE__*/ /*#__PURE__*/ Schema.Unknown as unknown as Schema.Schema<GetLoaDocumentResponse>;
|
|
1625
|
+
|
|
1626
|
+
export type GetLoaDocumentError =
|
|
1627
|
+
| DefaultErrors
|
|
1628
|
+
| LoaDocumentNotFound
|
|
1629
|
+
| InvalidAccountId;
|
|
1630
|
+
|
|
1631
|
+
export const getLoaDocument: API.OperationMethod<
|
|
1632
|
+
GetLoaDocumentRequest,
|
|
1633
|
+
GetLoaDocumentResponse,
|
|
1634
|
+
GetLoaDocumentError,
|
|
1635
|
+
Credentials | HttpClient.HttpClient
|
|
1636
|
+
> = /*@__PURE__*/ /*#__PURE__*/ API.make(() => ({
|
|
1637
|
+
input: GetLoaDocumentRequest,
|
|
1638
|
+
output: GetLoaDocumentResponse,
|
|
1639
|
+
errors: [LoaDocumentNotFound, InvalidAccountId],
|
|
1640
|
+
}));
|
|
1641
|
+
|
|
1642
|
+
export interface CreateLoaDocumentRequest {
|
|
1643
|
+
/** Path param: Identifier of a Cloudflare account. */
|
|
1644
|
+
accountId: string;
|
|
1645
|
+
/** Body param: LOA document to upload. */
|
|
1646
|
+
loaDocument: string;
|
|
1647
|
+
}
|
|
1648
|
+
|
|
1649
|
+
export const CreateLoaDocumentRequest =
|
|
1650
|
+
/*@__PURE__*/ /*#__PURE__*/ Schema.Struct({
|
|
1651
|
+
accountId: Schema.String.pipe(T.HttpPath("account_id")),
|
|
1652
|
+
loaDocument: Schema.String,
|
|
1653
|
+
}).pipe(
|
|
1654
|
+
Schema.encodeKeys({ loaDocument: "loa_document" }),
|
|
1655
|
+
T.Http({
|
|
1656
|
+
method: "POST",
|
|
1657
|
+
path: "/accounts/{account_id}/addressing/loa_documents",
|
|
1658
|
+
contentType: "multipart",
|
|
1659
|
+
}),
|
|
1660
|
+
) as unknown as Schema.Schema<CreateLoaDocumentRequest>;
|
|
1661
|
+
|
|
1662
|
+
export interface CreateLoaDocumentResponse {
|
|
1663
|
+
/** Identifier for the uploaded LOA document. */
|
|
1664
|
+
id?: string | null;
|
|
1665
|
+
/** Identifier of a Cloudflare account. */
|
|
1666
|
+
accountId?: string | null;
|
|
1667
|
+
/** Whether the LOA has been auto-generated for the prefix owner by Cloudflare. */
|
|
1668
|
+
autoGenerated?: boolean | null;
|
|
1669
|
+
created?: string | null;
|
|
1670
|
+
/** Name of LOA document. Max file size 10MB, and supported filetype is pdf. */
|
|
1671
|
+
filename?: string | null;
|
|
1672
|
+
/** File size of the uploaded LOA document. */
|
|
1673
|
+
sizeBytes?: number | null;
|
|
1674
|
+
/** Whether the LOA has been verified by Cloudflare staff. */
|
|
1675
|
+
verified?: boolean | null;
|
|
1676
|
+
/** Timestamp of the moment the LOA was marked as validated. */
|
|
1677
|
+
verifiedAt?: string | null;
|
|
1678
|
+
}
|
|
1679
|
+
|
|
1680
|
+
export const CreateLoaDocumentResponse =
|
|
1681
|
+
/*@__PURE__*/ /*#__PURE__*/ Schema.Struct({
|
|
1682
|
+
id: Schema.optional(Schema.Union([Schema.String, Schema.Null])),
|
|
1683
|
+
accountId: Schema.optional(Schema.Union([Schema.String, Schema.Null])),
|
|
1684
|
+
autoGenerated: Schema.optional(Schema.Union([Schema.Boolean, Schema.Null])),
|
|
1685
|
+
created: Schema.optional(Schema.Union([Schema.String, Schema.Null])),
|
|
1686
|
+
filename: Schema.optional(Schema.Union([Schema.String, Schema.Null])),
|
|
1687
|
+
sizeBytes: Schema.optional(Schema.Union([Schema.Number, Schema.Null])),
|
|
1688
|
+
verified: Schema.optional(Schema.Union([Schema.Boolean, Schema.Null])),
|
|
1689
|
+
verifiedAt: Schema.optional(Schema.Union([Schema.String, Schema.Null])),
|
|
1690
|
+
}).pipe(
|
|
1691
|
+
Schema.encodeKeys({
|
|
1692
|
+
id: "id",
|
|
1693
|
+
accountId: "account_id",
|
|
1694
|
+
autoGenerated: "auto_generated",
|
|
1695
|
+
created: "created",
|
|
1696
|
+
filename: "filename",
|
|
1697
|
+
sizeBytes: "size_bytes",
|
|
1698
|
+
verified: "verified",
|
|
1699
|
+
verifiedAt: "verified_at",
|
|
1700
|
+
}),
|
|
1701
|
+
) as unknown as Schema.Schema<CreateLoaDocumentResponse>;
|
|
1702
|
+
|
|
1703
|
+
export type CreateLoaDocumentError =
|
|
1704
|
+
| DefaultErrors
|
|
1705
|
+
| InvalidAccountId
|
|
1706
|
+
| InvalidLoaForm;
|
|
1707
|
+
|
|
1708
|
+
export const createLoaDocument: API.OperationMethod<
|
|
1709
|
+
CreateLoaDocumentRequest,
|
|
1710
|
+
CreateLoaDocumentResponse,
|
|
1711
|
+
CreateLoaDocumentError,
|
|
1712
|
+
Credentials | HttpClient.HttpClient
|
|
1713
|
+
> = /*@__PURE__*/ /*#__PURE__*/ API.make(() => ({
|
|
1714
|
+
input: CreateLoaDocumentRequest,
|
|
1715
|
+
output: CreateLoaDocumentResponse,
|
|
1716
|
+
errors: [InvalidAccountId, InvalidLoaForm],
|
|
1717
|
+
}));
|
|
1718
|
+
|
|
1719
|
+
// =============================================================================
|
|
1720
|
+
// Prefix
|
|
1721
|
+
// =============================================================================
|
|
1722
|
+
|
|
1723
|
+
export interface GetPrefixRequest {
|
|
1724
|
+
prefixId: string;
|
|
1725
|
+
/** Identifier of a Cloudflare account. */
|
|
1726
|
+
accountId: string;
|
|
1727
|
+
}
|
|
1728
|
+
|
|
1729
|
+
export const GetPrefixRequest = /*@__PURE__*/ /*#__PURE__*/ Schema.Struct({
|
|
1730
|
+
prefixId: Schema.String.pipe(T.HttpPath("prefixId")),
|
|
1731
|
+
accountId: Schema.String.pipe(T.HttpPath("account_id")),
|
|
1732
|
+
}).pipe(
|
|
1733
|
+
T.Http({
|
|
1734
|
+
method: "GET",
|
|
1735
|
+
path: "/accounts/{account_id}/addressing/prefixes/{prefixId}",
|
|
1736
|
+
}),
|
|
1737
|
+
) as unknown as Schema.Schema<GetPrefixRequest>;
|
|
1738
|
+
|
|
1739
|
+
export interface GetPrefixResponse {
|
|
1740
|
+
/** Identifier of an IP Prefix. */
|
|
1741
|
+
id?: string | null;
|
|
1742
|
+
/** Identifier of a Cloudflare account. */
|
|
1743
|
+
accountId?: string | null;
|
|
1744
|
+
/** @deprecated Prefer the [BGP Prefixes API](https://developers.cloudflare.com/api/resources/addressing/subresources/prefixes/subresources/bgp_prefixes/) instead, which allows for advertising multiple BG */
|
|
1745
|
+
advertised?: boolean | null;
|
|
1746
|
+
/** @deprecated Prefer the [BGP Prefixes API](https://developers.cloudflare.com/api/resources/addressing/subresources/prefixes/subresources/bgp_prefixes/) instead, which allows for advertising multiple BG */
|
|
1747
|
+
advertisedModifiedAt?: string | null;
|
|
1748
|
+
/** Approval state of the prefix (P = pending, V = active). */
|
|
1749
|
+
approved?: string | null;
|
|
1750
|
+
/** Autonomous System Number (ASN) the prefix will be advertised under. */
|
|
1751
|
+
asn?: number | null;
|
|
1752
|
+
/** IP Prefix in Classless Inter-Domain Routing format. */
|
|
1753
|
+
cidr?: string | null;
|
|
1754
|
+
createdAt?: string | null;
|
|
1755
|
+
/** Whether Cloudflare is allowed to generate the LOA document on behalf of the prefix owner. */
|
|
1756
|
+
delegateLoaCreation?: boolean | null;
|
|
1757
|
+
/** Description of the prefix. */
|
|
1758
|
+
description?: string | null;
|
|
1759
|
+
/** State of one kind of validation for an IP prefix. */
|
|
1760
|
+
irrValidationState?: string | null;
|
|
1761
|
+
/** Identifier for the uploaded LOA document. */
|
|
1762
|
+
loaDocumentId?: string | null;
|
|
1763
|
+
modifiedAt?: string | null;
|
|
1764
|
+
/** @deprecated Prefer the [BGP Prefixes API](https://developers.cloudflare.com/api/resources/addressing/subresources/prefixes/subresources/bgp_prefixes/) instead, which allows for advertising multiple BG */
|
|
1765
|
+
onDemandEnabled?: boolean | null;
|
|
1766
|
+
/** @deprecated Prefer the [BGP Prefixes API](https://developers.cloudflare.com/api/resources/addressing/subresources/prefixes/subresources/bgp_prefixes/) instead, which allows for advertising multiple BG */
|
|
1767
|
+
onDemandLocked?: boolean | null;
|
|
1768
|
+
/** State of one kind of validation for an IP prefix. */
|
|
1769
|
+
ownershipValidationState?: string | null;
|
|
1770
|
+
/** Token provided to demonstrate ownership of the prefix. */
|
|
1771
|
+
ownershipValidationToken?: string | null;
|
|
1772
|
+
/** State of one kind of validation for an IP prefix. */
|
|
1773
|
+
rpkiValidationState?: string | null;
|
|
1774
|
+
}
|
|
1775
|
+
|
|
1776
|
+
export const GetPrefixResponse = /*@__PURE__*/ /*#__PURE__*/ Schema.Struct({
|
|
1777
|
+
id: Schema.optional(Schema.Union([Schema.String, Schema.Null])),
|
|
1778
|
+
accountId: Schema.optional(Schema.Union([Schema.String, Schema.Null])),
|
|
1779
|
+
advertised: Schema.optional(Schema.Union([Schema.Boolean, Schema.Null])),
|
|
1780
|
+
advertisedModifiedAt: Schema.optional(
|
|
1781
|
+
Schema.Union([Schema.String, Schema.Null]),
|
|
1782
|
+
),
|
|
1783
|
+
approved: Schema.optional(Schema.Union([Schema.String, Schema.Null])),
|
|
1784
|
+
asn: Schema.optional(Schema.Union([Schema.Number, Schema.Null])),
|
|
1785
|
+
cidr: Schema.optional(Schema.Union([Schema.String, Schema.Null])),
|
|
1786
|
+
createdAt: Schema.optional(Schema.Union([Schema.String, Schema.Null])),
|
|
1787
|
+
delegateLoaCreation: Schema.optional(
|
|
1788
|
+
Schema.Union([Schema.Boolean, Schema.Null]),
|
|
1789
|
+
),
|
|
1790
|
+
description: Schema.optional(Schema.Union([Schema.String, Schema.Null])),
|
|
1791
|
+
irrValidationState: Schema.optional(
|
|
1792
|
+
Schema.Union([Schema.String, Schema.Null]),
|
|
1793
|
+
),
|
|
1794
|
+
loaDocumentId: Schema.optional(Schema.Union([Schema.String, Schema.Null])),
|
|
1795
|
+
modifiedAt: Schema.optional(Schema.Union([Schema.String, Schema.Null])),
|
|
1796
|
+
onDemandEnabled: Schema.optional(Schema.Union([Schema.Boolean, Schema.Null])),
|
|
1797
|
+
onDemandLocked: Schema.optional(Schema.Union([Schema.Boolean, Schema.Null])),
|
|
1798
|
+
ownershipValidationState: Schema.optional(
|
|
1799
|
+
Schema.Union([Schema.String, Schema.Null]),
|
|
1800
|
+
),
|
|
1801
|
+
ownershipValidationToken: Schema.optional(
|
|
1802
|
+
Schema.Union([Schema.String, Schema.Null]),
|
|
1803
|
+
),
|
|
1804
|
+
rpkiValidationState: Schema.optional(
|
|
1805
|
+
Schema.Union([Schema.String, Schema.Null]),
|
|
1806
|
+
),
|
|
1807
|
+
}).pipe(
|
|
1808
|
+
Schema.encodeKeys({
|
|
1809
|
+
id: "id",
|
|
1810
|
+
accountId: "account_id",
|
|
1811
|
+
advertised: "advertised",
|
|
1812
|
+
advertisedModifiedAt: "advertised_modified_at",
|
|
1813
|
+
approved: "approved",
|
|
1814
|
+
asn: "asn",
|
|
1815
|
+
cidr: "cidr",
|
|
1816
|
+
createdAt: "created_at",
|
|
1817
|
+
delegateLoaCreation: "delegate_loa_creation",
|
|
1818
|
+
description: "description",
|
|
1819
|
+
irrValidationState: "irr_validation_state",
|
|
1820
|
+
loaDocumentId: "loa_document_id",
|
|
1821
|
+
modifiedAt: "modified_at",
|
|
1822
|
+
onDemandEnabled: "on_demand_enabled",
|
|
1823
|
+
onDemandLocked: "on_demand_locked",
|
|
1824
|
+
ownershipValidationState: "ownership_validation_state",
|
|
1825
|
+
ownershipValidationToken: "ownership_validation_token",
|
|
1826
|
+
rpkiValidationState: "rpki_validation_state",
|
|
1827
|
+
}),
|
|
1828
|
+
) as unknown as Schema.Schema<GetPrefixResponse>;
|
|
1829
|
+
|
|
1830
|
+
export type GetPrefixError = DefaultErrors | PrefixNotFound | InvalidAccountId;
|
|
1831
|
+
|
|
1832
|
+
export const getPrefix: API.OperationMethod<
|
|
1833
|
+
GetPrefixRequest,
|
|
1834
|
+
GetPrefixResponse,
|
|
1835
|
+
GetPrefixError,
|
|
1836
|
+
Credentials | HttpClient.HttpClient
|
|
1837
|
+
> = /*@__PURE__*/ /*#__PURE__*/ API.make(() => ({
|
|
1838
|
+
input: GetPrefixRequest,
|
|
1839
|
+
output: GetPrefixResponse,
|
|
1840
|
+
errors: [PrefixNotFound, InvalidAccountId],
|
|
1841
|
+
}));
|
|
1842
|
+
|
|
1843
|
+
export interface ListPrefixesRequest {
|
|
1844
|
+
/** Identifier of a Cloudflare account. */
|
|
1845
|
+
accountId: string;
|
|
1846
|
+
}
|
|
1847
|
+
|
|
1848
|
+
export const ListPrefixesRequest = /*@__PURE__*/ /*#__PURE__*/ Schema.Struct({
|
|
1849
|
+
accountId: Schema.String.pipe(T.HttpPath("account_id")),
|
|
1850
|
+
}).pipe(
|
|
1851
|
+
T.Http({ method: "GET", path: "/accounts/{account_id}/addressing/prefixes" }),
|
|
1852
|
+
) as unknown as Schema.Schema<ListPrefixesRequest>;
|
|
1853
|
+
|
|
1854
|
+
export type ListPrefixesResponse = {
|
|
1855
|
+
id?: string | null;
|
|
1856
|
+
accountId?: string | null;
|
|
1857
|
+
advertised?: boolean | null;
|
|
1858
|
+
advertisedModifiedAt?: string | null;
|
|
1859
|
+
approved?: string | null;
|
|
1860
|
+
asn?: number | null;
|
|
1861
|
+
cidr?: string | null;
|
|
1862
|
+
createdAt?: string | null;
|
|
1863
|
+
delegateLoaCreation?: boolean | null;
|
|
1864
|
+
description?: string | null;
|
|
1865
|
+
irrValidationState?: string | null;
|
|
1866
|
+
loaDocumentId?: string | null;
|
|
1867
|
+
modifiedAt?: string | null;
|
|
1868
|
+
onDemandEnabled?: boolean | null;
|
|
1869
|
+
onDemandLocked?: boolean | null;
|
|
1870
|
+
ownershipValidationState?: string | null;
|
|
1871
|
+
ownershipValidationToken?: string | null;
|
|
1872
|
+
rpkiValidationState?: string | null;
|
|
1873
|
+
}[];
|
|
1874
|
+
|
|
1875
|
+
export const ListPrefixesResponse = /*@__PURE__*/ /*#__PURE__*/ Schema.Array(
|
|
1876
|
+
Schema.Struct({
|
|
1877
|
+
id: Schema.optional(Schema.Union([Schema.String, Schema.Null])),
|
|
1878
|
+
accountId: Schema.optional(Schema.Union([Schema.String, Schema.Null])),
|
|
1879
|
+
advertised: Schema.optional(Schema.Union([Schema.Boolean, Schema.Null])),
|
|
1880
|
+
advertisedModifiedAt: Schema.optional(
|
|
1881
|
+
Schema.Union([Schema.String, Schema.Null]),
|
|
1882
|
+
),
|
|
1883
|
+
approved: Schema.optional(Schema.Union([Schema.String, Schema.Null])),
|
|
1884
|
+
asn: Schema.optional(Schema.Union([Schema.Number, Schema.Null])),
|
|
1885
|
+
cidr: Schema.optional(Schema.Union([Schema.String, Schema.Null])),
|
|
1886
|
+
createdAt: Schema.optional(Schema.Union([Schema.String, Schema.Null])),
|
|
1887
|
+
delegateLoaCreation: Schema.optional(
|
|
1888
|
+
Schema.Union([Schema.Boolean, Schema.Null]),
|
|
1889
|
+
),
|
|
1890
|
+
description: Schema.optional(Schema.Union([Schema.String, Schema.Null])),
|
|
1891
|
+
irrValidationState: Schema.optional(
|
|
1892
|
+
Schema.Union([Schema.String, Schema.Null]),
|
|
1893
|
+
),
|
|
1894
|
+
loaDocumentId: Schema.optional(Schema.Union([Schema.String, Schema.Null])),
|
|
1895
|
+
modifiedAt: Schema.optional(Schema.Union([Schema.String, Schema.Null])),
|
|
1896
|
+
onDemandEnabled: Schema.optional(
|
|
1897
|
+
Schema.Union([Schema.Boolean, Schema.Null]),
|
|
1898
|
+
),
|
|
1899
|
+
onDemandLocked: Schema.optional(
|
|
1900
|
+
Schema.Union([Schema.Boolean, Schema.Null]),
|
|
1901
|
+
),
|
|
1902
|
+
ownershipValidationState: Schema.optional(
|
|
1903
|
+
Schema.Union([Schema.String, Schema.Null]),
|
|
1904
|
+
),
|
|
1905
|
+
ownershipValidationToken: Schema.optional(
|
|
1906
|
+
Schema.Union([Schema.String, Schema.Null]),
|
|
1907
|
+
),
|
|
1908
|
+
rpkiValidationState: Schema.optional(
|
|
1909
|
+
Schema.Union([Schema.String, Schema.Null]),
|
|
1910
|
+
),
|
|
1911
|
+
}).pipe(
|
|
1912
|
+
Schema.encodeKeys({
|
|
1913
|
+
id: "id",
|
|
1914
|
+
accountId: "account_id",
|
|
1915
|
+
advertised: "advertised",
|
|
1916
|
+
advertisedModifiedAt: "advertised_modified_at",
|
|
1917
|
+
approved: "approved",
|
|
1918
|
+
asn: "asn",
|
|
1919
|
+
cidr: "cidr",
|
|
1920
|
+
createdAt: "created_at",
|
|
1921
|
+
delegateLoaCreation: "delegate_loa_creation",
|
|
1922
|
+
description: "description",
|
|
1923
|
+
irrValidationState: "irr_validation_state",
|
|
1924
|
+
loaDocumentId: "loa_document_id",
|
|
1925
|
+
modifiedAt: "modified_at",
|
|
1926
|
+
onDemandEnabled: "on_demand_enabled",
|
|
1927
|
+
onDemandLocked: "on_demand_locked",
|
|
1928
|
+
ownershipValidationState: "ownership_validation_state",
|
|
1929
|
+
ownershipValidationToken: "ownership_validation_token",
|
|
1930
|
+
rpkiValidationState: "rpki_validation_state",
|
|
1931
|
+
}),
|
|
1932
|
+
),
|
|
1933
|
+
) as unknown as Schema.Schema<ListPrefixesResponse>;
|
|
1934
|
+
|
|
1935
|
+
export type ListPrefixesError = DefaultErrors;
|
|
1936
|
+
|
|
1937
|
+
export const listPrefixes: API.OperationMethod<
|
|
1938
|
+
ListPrefixesRequest,
|
|
1939
|
+
ListPrefixesResponse,
|
|
1940
|
+
ListPrefixesError,
|
|
1941
|
+
Credentials | HttpClient.HttpClient
|
|
1942
|
+
> = /*@__PURE__*/ /*#__PURE__*/ API.make(() => ({
|
|
1943
|
+
input: ListPrefixesRequest,
|
|
1944
|
+
output: ListPrefixesResponse,
|
|
1945
|
+
errors: [],
|
|
1946
|
+
}));
|
|
1947
|
+
|
|
1948
|
+
export interface CreatePrefixRequest {
|
|
1949
|
+
/** Path param: Identifier of a Cloudflare account. */
|
|
1950
|
+
accountId: string;
|
|
1951
|
+
/** Body param: Autonomous System Number (ASN) the prefix will be advertised under. */
|
|
1952
|
+
asn: number;
|
|
1953
|
+
/** Body param: IP Prefix in Classless Inter-Domain Routing format. */
|
|
1954
|
+
cidr: string;
|
|
1955
|
+
/** Body param: Whether Cloudflare is allowed to generate the LOA document on behalf of the prefix owner. */
|
|
1956
|
+
delegateLoaCreation?: boolean;
|
|
1957
|
+
/** Body param: Description of the prefix. */
|
|
1958
|
+
description?: string;
|
|
1959
|
+
/** Body param: Identifier for the uploaded LOA document. */
|
|
1960
|
+
loaDocumentId?: string | null;
|
|
1961
|
+
}
|
|
1962
|
+
|
|
1963
|
+
export const CreatePrefixRequest = /*@__PURE__*/ /*#__PURE__*/ Schema.Struct({
|
|
1964
|
+
accountId: Schema.String.pipe(T.HttpPath("account_id")),
|
|
1965
|
+
asn: Schema.Number,
|
|
1966
|
+
cidr: Schema.String,
|
|
1967
|
+
delegateLoaCreation: Schema.optional(Schema.Boolean),
|
|
1968
|
+
description: Schema.optional(Schema.String),
|
|
1969
|
+
loaDocumentId: Schema.optional(Schema.Union([Schema.String, Schema.Null])),
|
|
1970
|
+
}).pipe(
|
|
1971
|
+
Schema.encodeKeys({
|
|
1972
|
+
asn: "asn",
|
|
1973
|
+
cidr: "cidr",
|
|
1974
|
+
delegateLoaCreation: "delegate_loa_creation",
|
|
1975
|
+
description: "description",
|
|
1976
|
+
loaDocumentId: "loa_document_id",
|
|
1977
|
+
}),
|
|
1978
|
+
T.Http({
|
|
1979
|
+
method: "POST",
|
|
1980
|
+
path: "/accounts/{account_id}/addressing/prefixes",
|
|
1981
|
+
}),
|
|
1982
|
+
) as unknown as Schema.Schema<CreatePrefixRequest>;
|
|
1983
|
+
|
|
1984
|
+
export interface CreatePrefixResponse {
|
|
1985
|
+
/** Identifier of an IP Prefix. */
|
|
1986
|
+
id?: string | null;
|
|
1987
|
+
/** Identifier of a Cloudflare account. */
|
|
1988
|
+
accountId?: string | null;
|
|
1989
|
+
/** @deprecated Prefer the [BGP Prefixes API](https://developers.cloudflare.com/api/resources/addressing/subresources/prefixes/subresources/bgp_prefixes/) instead, which allows for advertising multiple BG */
|
|
1990
|
+
advertised?: boolean | null;
|
|
1991
|
+
/** @deprecated Prefer the [BGP Prefixes API](https://developers.cloudflare.com/api/resources/addressing/subresources/prefixes/subresources/bgp_prefixes/) instead, which allows for advertising multiple BG */
|
|
1992
|
+
advertisedModifiedAt?: string | null;
|
|
1993
|
+
/** Approval state of the prefix (P = pending, V = active). */
|
|
1994
|
+
approved?: string | null;
|
|
1995
|
+
/** Autonomous System Number (ASN) the prefix will be advertised under. */
|
|
1996
|
+
asn?: number | null;
|
|
1997
|
+
/** IP Prefix in Classless Inter-Domain Routing format. */
|
|
1998
|
+
cidr?: string | null;
|
|
1999
|
+
createdAt?: string | null;
|
|
2000
|
+
/** Whether Cloudflare is allowed to generate the LOA document on behalf of the prefix owner. */
|
|
2001
|
+
delegateLoaCreation?: boolean | null;
|
|
2002
|
+
/** Description of the prefix. */
|
|
2003
|
+
description?: string | null;
|
|
2004
|
+
/** State of one kind of validation for an IP prefix. */
|
|
2005
|
+
irrValidationState?: string | null;
|
|
2006
|
+
/** Identifier for the uploaded LOA document. */
|
|
2007
|
+
loaDocumentId?: string | null;
|
|
2008
|
+
modifiedAt?: string | null;
|
|
2009
|
+
/** @deprecated Prefer the [BGP Prefixes API](https://developers.cloudflare.com/api/resources/addressing/subresources/prefixes/subresources/bgp_prefixes/) instead, which allows for advertising multiple BG */
|
|
2010
|
+
onDemandEnabled?: boolean | null;
|
|
2011
|
+
/** @deprecated Prefer the [BGP Prefixes API](https://developers.cloudflare.com/api/resources/addressing/subresources/prefixes/subresources/bgp_prefixes/) instead, which allows for advertising multiple BG */
|
|
2012
|
+
onDemandLocked?: boolean | null;
|
|
2013
|
+
/** State of one kind of validation for an IP prefix. */
|
|
2014
|
+
ownershipValidationState?: string | null;
|
|
2015
|
+
/** Token provided to demonstrate ownership of the prefix. */
|
|
2016
|
+
ownershipValidationToken?: string | null;
|
|
2017
|
+
/** State of one kind of validation for an IP prefix. */
|
|
2018
|
+
rpkiValidationState?: string | null;
|
|
2019
|
+
}
|
|
2020
|
+
|
|
2021
|
+
export const CreatePrefixResponse = /*@__PURE__*/ /*#__PURE__*/ Schema.Struct({
|
|
2022
|
+
id: Schema.optional(Schema.Union([Schema.String, Schema.Null])),
|
|
2023
|
+
accountId: Schema.optional(Schema.Union([Schema.String, Schema.Null])),
|
|
2024
|
+
advertised: Schema.optional(Schema.Union([Schema.Boolean, Schema.Null])),
|
|
2025
|
+
advertisedModifiedAt: Schema.optional(
|
|
2026
|
+
Schema.Union([Schema.String, Schema.Null]),
|
|
2027
|
+
),
|
|
2028
|
+
approved: Schema.optional(Schema.Union([Schema.String, Schema.Null])),
|
|
2029
|
+
asn: Schema.optional(Schema.Union([Schema.Number, Schema.Null])),
|
|
2030
|
+
cidr: Schema.optional(Schema.Union([Schema.String, Schema.Null])),
|
|
2031
|
+
createdAt: Schema.optional(Schema.Union([Schema.String, Schema.Null])),
|
|
2032
|
+
delegateLoaCreation: Schema.optional(
|
|
2033
|
+
Schema.Union([Schema.Boolean, Schema.Null]),
|
|
2034
|
+
),
|
|
2035
|
+
description: Schema.optional(Schema.Union([Schema.String, Schema.Null])),
|
|
2036
|
+
irrValidationState: Schema.optional(
|
|
2037
|
+
Schema.Union([Schema.String, Schema.Null]),
|
|
2038
|
+
),
|
|
2039
|
+
loaDocumentId: Schema.optional(Schema.Union([Schema.String, Schema.Null])),
|
|
2040
|
+
modifiedAt: Schema.optional(Schema.Union([Schema.String, Schema.Null])),
|
|
2041
|
+
onDemandEnabled: Schema.optional(Schema.Union([Schema.Boolean, Schema.Null])),
|
|
2042
|
+
onDemandLocked: Schema.optional(Schema.Union([Schema.Boolean, Schema.Null])),
|
|
2043
|
+
ownershipValidationState: Schema.optional(
|
|
2044
|
+
Schema.Union([Schema.String, Schema.Null]),
|
|
2045
|
+
),
|
|
2046
|
+
ownershipValidationToken: Schema.optional(
|
|
2047
|
+
Schema.Union([Schema.String, Schema.Null]),
|
|
2048
|
+
),
|
|
2049
|
+
rpkiValidationState: Schema.optional(
|
|
2050
|
+
Schema.Union([Schema.String, Schema.Null]),
|
|
2051
|
+
),
|
|
2052
|
+
}).pipe(
|
|
2053
|
+
Schema.encodeKeys({
|
|
2054
|
+
id: "id",
|
|
2055
|
+
accountId: "account_id",
|
|
2056
|
+
advertised: "advertised",
|
|
2057
|
+
advertisedModifiedAt: "advertised_modified_at",
|
|
2058
|
+
approved: "approved",
|
|
2059
|
+
asn: "asn",
|
|
2060
|
+
cidr: "cidr",
|
|
2061
|
+
createdAt: "created_at",
|
|
2062
|
+
delegateLoaCreation: "delegate_loa_creation",
|
|
2063
|
+
description: "description",
|
|
2064
|
+
irrValidationState: "irr_validation_state",
|
|
2065
|
+
loaDocumentId: "loa_document_id",
|
|
2066
|
+
modifiedAt: "modified_at",
|
|
2067
|
+
onDemandEnabled: "on_demand_enabled",
|
|
2068
|
+
onDemandLocked: "on_demand_locked",
|
|
2069
|
+
ownershipValidationState: "ownership_validation_state",
|
|
2070
|
+
ownershipValidationToken: "ownership_validation_token",
|
|
2071
|
+
rpkiValidationState: "rpki_validation_state",
|
|
2072
|
+
}),
|
|
2073
|
+
) as unknown as Schema.Schema<CreatePrefixResponse>;
|
|
2074
|
+
|
|
2075
|
+
export type CreatePrefixError =
|
|
2076
|
+
| DefaultErrors
|
|
2077
|
+
| InvalidAccountId
|
|
2078
|
+
| InvalidNetworkCidr
|
|
2079
|
+
| IrrEntryNotFound;
|
|
2080
|
+
|
|
2081
|
+
export const createPrefix: API.OperationMethod<
|
|
2082
|
+
CreatePrefixRequest,
|
|
2083
|
+
CreatePrefixResponse,
|
|
2084
|
+
CreatePrefixError,
|
|
2085
|
+
Credentials | HttpClient.HttpClient
|
|
2086
|
+
> = /*@__PURE__*/ /*#__PURE__*/ API.make(() => ({
|
|
2087
|
+
input: CreatePrefixRequest,
|
|
2088
|
+
output: CreatePrefixResponse,
|
|
2089
|
+
errors: [InvalidAccountId, InvalidNetworkCidr, IrrEntryNotFound],
|
|
2090
|
+
}));
|
|
2091
|
+
|
|
2092
|
+
export interface PatchPrefixRequest {
|
|
2093
|
+
prefixId: string;
|
|
2094
|
+
/** Path param: Identifier of a Cloudflare account. */
|
|
2095
|
+
accountId: string;
|
|
2096
|
+
/** Body param: Description of the prefix. */
|
|
2097
|
+
description: string;
|
|
2098
|
+
}
|
|
2099
|
+
|
|
2100
|
+
export const PatchPrefixRequest = /*@__PURE__*/ /*#__PURE__*/ Schema.Struct({
|
|
2101
|
+
prefixId: Schema.String.pipe(T.HttpPath("prefixId")),
|
|
2102
|
+
accountId: Schema.String.pipe(T.HttpPath("account_id")),
|
|
2103
|
+
description: Schema.String,
|
|
2104
|
+
}).pipe(
|
|
2105
|
+
T.Http({
|
|
2106
|
+
method: "PATCH",
|
|
2107
|
+
path: "/accounts/{account_id}/addressing/prefixes/{prefixId}",
|
|
2108
|
+
}),
|
|
2109
|
+
) as unknown as Schema.Schema<PatchPrefixRequest>;
|
|
2110
|
+
|
|
2111
|
+
export interface PatchPrefixResponse {
|
|
2112
|
+
/** Identifier of an IP Prefix. */
|
|
2113
|
+
id?: string | null;
|
|
2114
|
+
/** Identifier of a Cloudflare account. */
|
|
2115
|
+
accountId?: string | null;
|
|
2116
|
+
/** @deprecated Prefer the [BGP Prefixes API](https://developers.cloudflare.com/api/resources/addressing/subresources/prefixes/subresources/bgp_prefixes/) instead, which allows for advertising multiple BG */
|
|
2117
|
+
advertised?: boolean | null;
|
|
2118
|
+
/** @deprecated Prefer the [BGP Prefixes API](https://developers.cloudflare.com/api/resources/addressing/subresources/prefixes/subresources/bgp_prefixes/) instead, which allows for advertising multiple BG */
|
|
2119
|
+
advertisedModifiedAt?: string | null;
|
|
2120
|
+
/** Approval state of the prefix (P = pending, V = active). */
|
|
2121
|
+
approved?: string | null;
|
|
2122
|
+
/** Autonomous System Number (ASN) the prefix will be advertised under. */
|
|
2123
|
+
asn?: number | null;
|
|
2124
|
+
/** IP Prefix in Classless Inter-Domain Routing format. */
|
|
2125
|
+
cidr?: string | null;
|
|
2126
|
+
createdAt?: string | null;
|
|
2127
|
+
/** Whether Cloudflare is allowed to generate the LOA document on behalf of the prefix owner. */
|
|
2128
|
+
delegateLoaCreation?: boolean | null;
|
|
2129
|
+
/** Description of the prefix. */
|
|
2130
|
+
description?: string | null;
|
|
2131
|
+
/** State of one kind of validation for an IP prefix. */
|
|
2132
|
+
irrValidationState?: string | null;
|
|
2133
|
+
/** Identifier for the uploaded LOA document. */
|
|
2134
|
+
loaDocumentId?: string | null;
|
|
2135
|
+
modifiedAt?: string | null;
|
|
2136
|
+
/** @deprecated Prefer the [BGP Prefixes API](https://developers.cloudflare.com/api/resources/addressing/subresources/prefixes/subresources/bgp_prefixes/) instead, which allows for advertising multiple BG */
|
|
2137
|
+
onDemandEnabled?: boolean | null;
|
|
2138
|
+
/** @deprecated Prefer the [BGP Prefixes API](https://developers.cloudflare.com/api/resources/addressing/subresources/prefixes/subresources/bgp_prefixes/) instead, which allows for advertising multiple BG */
|
|
2139
|
+
onDemandLocked?: boolean | null;
|
|
2140
|
+
/** State of one kind of validation for an IP prefix. */
|
|
2141
|
+
ownershipValidationState?: string | null;
|
|
2142
|
+
/** Token provided to demonstrate ownership of the prefix. */
|
|
2143
|
+
ownershipValidationToken?: string | null;
|
|
2144
|
+
/** State of one kind of validation for an IP prefix. */
|
|
2145
|
+
rpkiValidationState?: string | null;
|
|
2146
|
+
}
|
|
2147
|
+
|
|
2148
|
+
export const PatchPrefixResponse = /*@__PURE__*/ /*#__PURE__*/ Schema.Struct({
|
|
2149
|
+
id: Schema.optional(Schema.Union([Schema.String, Schema.Null])),
|
|
2150
|
+
accountId: Schema.optional(Schema.Union([Schema.String, Schema.Null])),
|
|
2151
|
+
advertised: Schema.optional(Schema.Union([Schema.Boolean, Schema.Null])),
|
|
2152
|
+
advertisedModifiedAt: Schema.optional(
|
|
2153
|
+
Schema.Union([Schema.String, Schema.Null]),
|
|
2154
|
+
),
|
|
2155
|
+
approved: Schema.optional(Schema.Union([Schema.String, Schema.Null])),
|
|
2156
|
+
asn: Schema.optional(Schema.Union([Schema.Number, Schema.Null])),
|
|
2157
|
+
cidr: Schema.optional(Schema.Union([Schema.String, Schema.Null])),
|
|
2158
|
+
createdAt: Schema.optional(Schema.Union([Schema.String, Schema.Null])),
|
|
2159
|
+
delegateLoaCreation: Schema.optional(
|
|
2160
|
+
Schema.Union([Schema.Boolean, Schema.Null]),
|
|
2161
|
+
),
|
|
2162
|
+
description: Schema.optional(Schema.Union([Schema.String, Schema.Null])),
|
|
2163
|
+
irrValidationState: Schema.optional(
|
|
2164
|
+
Schema.Union([Schema.String, Schema.Null]),
|
|
2165
|
+
),
|
|
2166
|
+
loaDocumentId: Schema.optional(Schema.Union([Schema.String, Schema.Null])),
|
|
2167
|
+
modifiedAt: Schema.optional(Schema.Union([Schema.String, Schema.Null])),
|
|
2168
|
+
onDemandEnabled: Schema.optional(Schema.Union([Schema.Boolean, Schema.Null])),
|
|
2169
|
+
onDemandLocked: Schema.optional(Schema.Union([Schema.Boolean, Schema.Null])),
|
|
2170
|
+
ownershipValidationState: Schema.optional(
|
|
2171
|
+
Schema.Union([Schema.String, Schema.Null]),
|
|
2172
|
+
),
|
|
2173
|
+
ownershipValidationToken: Schema.optional(
|
|
2174
|
+
Schema.Union([Schema.String, Schema.Null]),
|
|
2175
|
+
),
|
|
2176
|
+
rpkiValidationState: Schema.optional(
|
|
2177
|
+
Schema.Union([Schema.String, Schema.Null]),
|
|
2178
|
+
),
|
|
2179
|
+
}).pipe(
|
|
2180
|
+
Schema.encodeKeys({
|
|
2181
|
+
id: "id",
|
|
2182
|
+
accountId: "account_id",
|
|
2183
|
+
advertised: "advertised",
|
|
2184
|
+
advertisedModifiedAt: "advertised_modified_at",
|
|
2185
|
+
approved: "approved",
|
|
2186
|
+
asn: "asn",
|
|
2187
|
+
cidr: "cidr",
|
|
2188
|
+
createdAt: "created_at",
|
|
2189
|
+
delegateLoaCreation: "delegate_loa_creation",
|
|
2190
|
+
description: "description",
|
|
2191
|
+
irrValidationState: "irr_validation_state",
|
|
2192
|
+
loaDocumentId: "loa_document_id",
|
|
2193
|
+
modifiedAt: "modified_at",
|
|
2194
|
+
onDemandEnabled: "on_demand_enabled",
|
|
2195
|
+
onDemandLocked: "on_demand_locked",
|
|
2196
|
+
ownershipValidationState: "ownership_validation_state",
|
|
2197
|
+
ownershipValidationToken: "ownership_validation_token",
|
|
2198
|
+
rpkiValidationState: "rpki_validation_state",
|
|
2199
|
+
}),
|
|
2200
|
+
) as unknown as Schema.Schema<PatchPrefixResponse>;
|
|
2201
|
+
|
|
2202
|
+
export type PatchPrefixError =
|
|
2203
|
+
| DefaultErrors
|
|
2204
|
+
| MethodNotAllowed
|
|
2205
|
+
| PrefixNotFound
|
|
2206
|
+
| InvalidAccountId;
|
|
2207
|
+
|
|
2208
|
+
export const patchPrefix: API.OperationMethod<
|
|
2209
|
+
PatchPrefixRequest,
|
|
2210
|
+
PatchPrefixResponse,
|
|
2211
|
+
PatchPrefixError,
|
|
2212
|
+
Credentials | HttpClient.HttpClient
|
|
2213
|
+
> = /*@__PURE__*/ /*#__PURE__*/ API.make(() => ({
|
|
2214
|
+
input: PatchPrefixRequest,
|
|
2215
|
+
output: PatchPrefixResponse,
|
|
2216
|
+
errors: [MethodNotAllowed, PrefixNotFound, InvalidAccountId],
|
|
2217
|
+
}));
|
|
2218
|
+
|
|
2219
|
+
export interface DeletePrefixRequest {
|
|
2220
|
+
prefixId: string;
|
|
2221
|
+
/** Identifier of a Cloudflare account. */
|
|
2222
|
+
accountId: string;
|
|
2223
|
+
}
|
|
2224
|
+
|
|
2225
|
+
export const DeletePrefixRequest = /*@__PURE__*/ /*#__PURE__*/ Schema.Struct({
|
|
2226
|
+
prefixId: Schema.String.pipe(T.HttpPath("prefixId")),
|
|
2227
|
+
accountId: Schema.String.pipe(T.HttpPath("account_id")),
|
|
2228
|
+
}).pipe(
|
|
2229
|
+
T.Http({
|
|
2230
|
+
method: "DELETE",
|
|
2231
|
+
path: "/accounts/{account_id}/addressing/prefixes/{prefixId}",
|
|
2232
|
+
}),
|
|
2233
|
+
) as unknown as Schema.Schema<DeletePrefixRequest>;
|
|
2234
|
+
|
|
2235
|
+
export interface DeletePrefixResponse {
|
|
2236
|
+
errors: {
|
|
2237
|
+
code: number;
|
|
2238
|
+
message: string;
|
|
2239
|
+
documentationUrl?: string | null;
|
|
2240
|
+
source?: { pointer?: string | null } | null;
|
|
2241
|
+
}[];
|
|
2242
|
+
messages: {
|
|
2243
|
+
code: number;
|
|
2244
|
+
message: string;
|
|
2245
|
+
documentationUrl?: string | null;
|
|
2246
|
+
source?: { pointer?: string | null } | null;
|
|
2247
|
+
}[];
|
|
2248
|
+
/** Whether the API call was successful. */
|
|
2249
|
+
success: true;
|
|
2250
|
+
}
|
|
2251
|
+
|
|
2252
|
+
export const DeletePrefixResponse = /*@__PURE__*/ /*#__PURE__*/ Schema.Struct({
|
|
2253
|
+
errors: Schema.Array(
|
|
2254
|
+
Schema.Struct({
|
|
2255
|
+
code: Schema.Number,
|
|
2256
|
+
message: Schema.String,
|
|
2257
|
+
documentationUrl: Schema.optional(
|
|
2258
|
+
Schema.Union([Schema.String, Schema.Null]),
|
|
2259
|
+
),
|
|
2260
|
+
source: Schema.optional(
|
|
2261
|
+
Schema.Union([
|
|
2262
|
+
Schema.Struct({
|
|
2263
|
+
pointer: Schema.optional(
|
|
2264
|
+
Schema.Union([Schema.String, Schema.Null]),
|
|
2265
|
+
),
|
|
2266
|
+
}),
|
|
2267
|
+
Schema.Null,
|
|
2268
|
+
]),
|
|
2269
|
+
),
|
|
2270
|
+
}).pipe(
|
|
2271
|
+
Schema.encodeKeys({
|
|
2272
|
+
code: "code",
|
|
2273
|
+
message: "message",
|
|
2274
|
+
documentationUrl: "documentation_url",
|
|
2275
|
+
source: "source",
|
|
2276
|
+
}),
|
|
2277
|
+
),
|
|
2278
|
+
),
|
|
2279
|
+
messages: Schema.Array(
|
|
2280
|
+
Schema.Struct({
|
|
2281
|
+
code: Schema.Number,
|
|
2282
|
+
message: Schema.String,
|
|
2283
|
+
documentationUrl: Schema.optional(
|
|
2284
|
+
Schema.Union([Schema.String, Schema.Null]),
|
|
2285
|
+
),
|
|
2286
|
+
source: Schema.optional(
|
|
2287
|
+
Schema.Union([
|
|
2288
|
+
Schema.Struct({
|
|
2289
|
+
pointer: Schema.optional(
|
|
2290
|
+
Schema.Union([Schema.String, Schema.Null]),
|
|
2291
|
+
),
|
|
2292
|
+
}),
|
|
2293
|
+
Schema.Null,
|
|
2294
|
+
]),
|
|
2295
|
+
),
|
|
2296
|
+
}).pipe(
|
|
2297
|
+
Schema.encodeKeys({
|
|
2298
|
+
code: "code",
|
|
2299
|
+
message: "message",
|
|
2300
|
+
documentationUrl: "documentation_url",
|
|
2301
|
+
source: "source",
|
|
2302
|
+
}),
|
|
2303
|
+
),
|
|
2304
|
+
),
|
|
2305
|
+
success: Schema.Literal(true),
|
|
2306
|
+
}) as unknown as Schema.Schema<DeletePrefixResponse>;
|
|
2307
|
+
|
|
2308
|
+
export type DeletePrefixError =
|
|
2309
|
+
| DefaultErrors
|
|
2310
|
+
| MethodNotAllowed
|
|
2311
|
+
| PrefixNotFound
|
|
2312
|
+
| InvalidAccountId;
|
|
2313
|
+
|
|
2314
|
+
export const deletePrefix: API.OperationMethod<
|
|
2315
|
+
DeletePrefixRequest,
|
|
2316
|
+
DeletePrefixResponse,
|
|
2317
|
+
DeletePrefixError,
|
|
2318
|
+
Credentials | HttpClient.HttpClient
|
|
2319
|
+
> = /*@__PURE__*/ /*#__PURE__*/ API.make(() => ({
|
|
2320
|
+
input: DeletePrefixRequest,
|
|
2321
|
+
output: DeletePrefixResponse,
|
|
2322
|
+
errors: [MethodNotAllowed, PrefixNotFound, InvalidAccountId],
|
|
2323
|
+
}));
|
|
2324
|
+
|
|
2325
|
+
// =============================================================================
|
|
2326
|
+
// PrefixAdvertisementStatus
|
|
2327
|
+
// =============================================================================
|
|
2328
|
+
|
|
2329
|
+
export interface GetPrefixAdvertisementStatusRequest {
|
|
2330
|
+
prefixId: string;
|
|
2331
|
+
/** Identifier of a Cloudflare account. */
|
|
2332
|
+
accountId: string;
|
|
2333
|
+
}
|
|
2334
|
+
|
|
2335
|
+
export const GetPrefixAdvertisementStatusRequest =
|
|
2336
|
+
/*@__PURE__*/ /*#__PURE__*/ Schema.Struct({
|
|
2337
|
+
prefixId: Schema.String.pipe(T.HttpPath("prefixId")),
|
|
2338
|
+
accountId: Schema.String.pipe(T.HttpPath("account_id")),
|
|
2339
|
+
}).pipe(
|
|
2340
|
+
T.Http({
|
|
2341
|
+
method: "GET",
|
|
2342
|
+
path: "/accounts/{account_id}/addressing/prefixes/{prefixId}/bgp/status",
|
|
2343
|
+
}),
|
|
2344
|
+
) as unknown as Schema.Schema<GetPrefixAdvertisementStatusRequest>;
|
|
2345
|
+
|
|
2346
|
+
export interface GetPrefixAdvertisementStatusResponse {
|
|
2347
|
+
/** Advertisement status of the prefix. If `true`, the BGP route for the prefix is advertised to the Internet. If `false`, the BGP route is withdrawn. */
|
|
2348
|
+
advertised?: boolean | null;
|
|
2349
|
+
/** Last time the advertisement status was changed. This field is only not 'null' if on demand is enabled. */
|
|
2350
|
+
advertisedModifiedAt?: string | null;
|
|
2351
|
+
}
|
|
2352
|
+
|
|
2353
|
+
export const GetPrefixAdvertisementStatusResponse =
|
|
2354
|
+
/*@__PURE__*/ /*#__PURE__*/ Schema.Struct({
|
|
2355
|
+
advertised: Schema.optional(Schema.Union([Schema.Boolean, Schema.Null])),
|
|
2356
|
+
advertisedModifiedAt: Schema.optional(
|
|
2357
|
+
Schema.Union([Schema.String, Schema.Null]),
|
|
2358
|
+
),
|
|
2359
|
+
}).pipe(
|
|
2360
|
+
Schema.encodeKeys({
|
|
2361
|
+
advertised: "advertised",
|
|
2362
|
+
advertisedModifiedAt: "advertised_modified_at",
|
|
2363
|
+
}),
|
|
2364
|
+
) as unknown as Schema.Schema<GetPrefixAdvertisementStatusResponse>;
|
|
2365
|
+
|
|
2366
|
+
export type GetPrefixAdvertisementStatusError =
|
|
2367
|
+
| DefaultErrors
|
|
2368
|
+
| PrefixNotFound
|
|
2369
|
+
| InvalidAccountId;
|
|
2370
|
+
|
|
2371
|
+
export const getPrefixAdvertisementStatus: API.OperationMethod<
|
|
2372
|
+
GetPrefixAdvertisementStatusRequest,
|
|
2373
|
+
GetPrefixAdvertisementStatusResponse,
|
|
2374
|
+
GetPrefixAdvertisementStatusError,
|
|
2375
|
+
Credentials | HttpClient.HttpClient
|
|
2376
|
+
> = /*@__PURE__*/ /*#__PURE__*/ API.make(() => ({
|
|
2377
|
+
input: GetPrefixAdvertisementStatusRequest,
|
|
2378
|
+
output: GetPrefixAdvertisementStatusResponse,
|
|
2379
|
+
errors: [PrefixNotFound, InvalidAccountId],
|
|
2380
|
+
}));
|
|
2381
|
+
|
|
2382
|
+
export interface PatchPrefixAdvertisementStatusRequest {
|
|
2383
|
+
prefixId: string;
|
|
2384
|
+
/** Path param: Identifier of a Cloudflare account. */
|
|
2385
|
+
accountId: string;
|
|
2386
|
+
/** Body param: Advertisement status of the prefix. If `true`, the BGP route for the prefix is advertised to the Internet. If `false`, the BGP route is withdrawn. */
|
|
2387
|
+
advertised: boolean;
|
|
2388
|
+
}
|
|
2389
|
+
|
|
2390
|
+
export const PatchPrefixAdvertisementStatusRequest =
|
|
2391
|
+
/*@__PURE__*/ /*#__PURE__*/ Schema.Struct({
|
|
2392
|
+
prefixId: Schema.String.pipe(T.HttpPath("prefixId")),
|
|
2393
|
+
accountId: Schema.String.pipe(T.HttpPath("account_id")),
|
|
2394
|
+
advertised: Schema.Boolean,
|
|
2395
|
+
}).pipe(
|
|
2396
|
+
T.Http({
|
|
2397
|
+
method: "PATCH",
|
|
2398
|
+
path: "/accounts/{account_id}/addressing/prefixes/{prefixId}/bgp/status",
|
|
2399
|
+
}),
|
|
2400
|
+
) as unknown as Schema.Schema<PatchPrefixAdvertisementStatusRequest>;
|
|
2401
|
+
|
|
2402
|
+
export interface PatchPrefixAdvertisementStatusResponse {
|
|
2403
|
+
/** Advertisement status of the prefix. If `true`, the BGP route for the prefix is advertised to the Internet. If `false`, the BGP route is withdrawn. */
|
|
2404
|
+
advertised?: boolean | null;
|
|
2405
|
+
/** Last time the advertisement status was changed. This field is only not 'null' if on demand is enabled. */
|
|
2406
|
+
advertisedModifiedAt?: string | null;
|
|
2407
|
+
}
|
|
2408
|
+
|
|
2409
|
+
export const PatchPrefixAdvertisementStatusResponse =
|
|
2410
|
+
/*@__PURE__*/ /*#__PURE__*/ Schema.Struct({
|
|
2411
|
+
advertised: Schema.optional(Schema.Union([Schema.Boolean, Schema.Null])),
|
|
2412
|
+
advertisedModifiedAt: Schema.optional(
|
|
2413
|
+
Schema.Union([Schema.String, Schema.Null]),
|
|
2414
|
+
),
|
|
2415
|
+
}).pipe(
|
|
2416
|
+
Schema.encodeKeys({
|
|
2417
|
+
advertised: "advertised",
|
|
2418
|
+
advertisedModifiedAt: "advertised_modified_at",
|
|
2419
|
+
}),
|
|
2420
|
+
) as unknown as Schema.Schema<PatchPrefixAdvertisementStatusResponse>;
|
|
2421
|
+
|
|
2422
|
+
export type PatchPrefixAdvertisementStatusError =
|
|
2423
|
+
| DefaultErrors
|
|
2424
|
+
| PrefixNotFound
|
|
2425
|
+
| InvalidAccountId;
|
|
2426
|
+
|
|
2427
|
+
export const patchPrefixAdvertisementStatus: API.OperationMethod<
|
|
2428
|
+
PatchPrefixAdvertisementStatusRequest,
|
|
2429
|
+
PatchPrefixAdvertisementStatusResponse,
|
|
2430
|
+
PatchPrefixAdvertisementStatusError,
|
|
2431
|
+
Credentials | HttpClient.HttpClient
|
|
2432
|
+
> = /*@__PURE__*/ /*#__PURE__*/ API.make(() => ({
|
|
2433
|
+
input: PatchPrefixAdvertisementStatusRequest,
|
|
2434
|
+
output: PatchPrefixAdvertisementStatusResponse,
|
|
2435
|
+
errors: [PrefixNotFound, InvalidAccountId],
|
|
2436
|
+
}));
|
|
2437
|
+
|
|
2438
|
+
// =============================================================================
|
|
2439
|
+
// PrefixBgpPrefix
|
|
2440
|
+
// =============================================================================
|
|
2441
|
+
|
|
2442
|
+
export interface GetPrefixBgpPrefixRequest {
|
|
2443
|
+
prefixId: string;
|
|
2444
|
+
bgpPrefixId: string;
|
|
2445
|
+
/** Identifier of a Cloudflare account. */
|
|
2446
|
+
accountId: string;
|
|
2447
|
+
}
|
|
2448
|
+
|
|
2449
|
+
export const GetPrefixBgpPrefixRequest =
|
|
2450
|
+
/*@__PURE__*/ /*#__PURE__*/ Schema.Struct({
|
|
2451
|
+
prefixId: Schema.String.pipe(T.HttpPath("prefixId")),
|
|
2452
|
+
bgpPrefixId: Schema.String.pipe(T.HttpPath("bgpPrefixId")),
|
|
2453
|
+
accountId: Schema.String.pipe(T.HttpPath("account_id")),
|
|
2454
|
+
}).pipe(
|
|
2455
|
+
T.Http({
|
|
2456
|
+
method: "GET",
|
|
2457
|
+
path: "/accounts/{account_id}/addressing/prefixes/{prefixId}/bgp/prefixes/{bgpPrefixId}",
|
|
2458
|
+
}),
|
|
2459
|
+
) as unknown as Schema.Schema<GetPrefixBgpPrefixRequest>;
|
|
2460
|
+
|
|
2461
|
+
export interface GetPrefixBgpPrefixResponse {
|
|
2462
|
+
/** Identifier of BGP Prefix. */
|
|
2463
|
+
id?: string | null;
|
|
2464
|
+
/** Autonomous System Number (ASN) the prefix will be advertised under. */
|
|
2465
|
+
asn?: number | null;
|
|
2466
|
+
/** Number of times to prepend the Cloudflare ASN to the BGP AS-Path attribute */
|
|
2467
|
+
asnPrependCount?: number | null;
|
|
2468
|
+
/** Determines if Cloudflare advertises a BYOIP BGP prefix even when there is no matching BGP prefix in the Magic routing table. When true, Cloudflare will automatically withdraw the BGP prefix when there */
|
|
2469
|
+
autoAdvertiseWithdraw?: boolean | null;
|
|
2470
|
+
bgpSignalOpts?: {
|
|
2471
|
+
enabled?: boolean | null;
|
|
2472
|
+
modifiedAt?: string | null;
|
|
2473
|
+
} | null;
|
|
2474
|
+
/** IP Prefix in Classless Inter-Domain Routing format. */
|
|
2475
|
+
cidr?: string | null;
|
|
2476
|
+
createdAt?: string | null;
|
|
2477
|
+
modifiedAt?: string | null;
|
|
2478
|
+
onDemand?: {
|
|
2479
|
+
advertised?: boolean | null;
|
|
2480
|
+
advertisedModifiedAt?: string | null;
|
|
2481
|
+
onDemandEnabled?: boolean | null;
|
|
2482
|
+
onDemandLocked?: boolean | null;
|
|
2483
|
+
} | null;
|
|
2484
|
+
}
|
|
2485
|
+
|
|
2486
|
+
export const GetPrefixBgpPrefixResponse =
|
|
2487
|
+
/*@__PURE__*/ /*#__PURE__*/ Schema.Struct({
|
|
2488
|
+
id: Schema.optional(Schema.Union([Schema.String, Schema.Null])),
|
|
2489
|
+
asn: Schema.optional(Schema.Union([Schema.Number, Schema.Null])),
|
|
2490
|
+
asnPrependCount: Schema.optional(
|
|
2491
|
+
Schema.Union([Schema.Number, Schema.Null]),
|
|
2492
|
+
),
|
|
2493
|
+
autoAdvertiseWithdraw: Schema.optional(
|
|
2494
|
+
Schema.Union([Schema.Boolean, Schema.Null]),
|
|
2495
|
+
),
|
|
2496
|
+
bgpSignalOpts: Schema.optional(
|
|
2497
|
+
Schema.Union([
|
|
2498
|
+
Schema.Struct({
|
|
2499
|
+
enabled: Schema.optional(Schema.Union([Schema.Boolean, Schema.Null])),
|
|
2500
|
+
modifiedAt: Schema.optional(
|
|
2501
|
+
Schema.Union([Schema.String, Schema.Null]),
|
|
2502
|
+
),
|
|
2503
|
+
}).pipe(
|
|
2504
|
+
Schema.encodeKeys({ enabled: "enabled", modifiedAt: "modified_at" }),
|
|
2505
|
+
),
|
|
2506
|
+
Schema.Null,
|
|
2507
|
+
]),
|
|
2508
|
+
),
|
|
2509
|
+
cidr: Schema.optional(Schema.Union([Schema.String, Schema.Null])),
|
|
2510
|
+
createdAt: Schema.optional(Schema.Union([Schema.String, Schema.Null])),
|
|
2511
|
+
modifiedAt: Schema.optional(Schema.Union([Schema.String, Schema.Null])),
|
|
2512
|
+
onDemand: Schema.optional(
|
|
2513
|
+
Schema.Union([
|
|
2514
|
+
Schema.Struct({
|
|
2515
|
+
advertised: Schema.optional(
|
|
2516
|
+
Schema.Union([Schema.Boolean, Schema.Null]),
|
|
2517
|
+
),
|
|
2518
|
+
advertisedModifiedAt: Schema.optional(
|
|
2519
|
+
Schema.Union([Schema.String, Schema.Null]),
|
|
2520
|
+
),
|
|
2521
|
+
onDemandEnabled: Schema.optional(
|
|
2522
|
+
Schema.Union([Schema.Boolean, Schema.Null]),
|
|
2523
|
+
),
|
|
2524
|
+
onDemandLocked: Schema.optional(
|
|
2525
|
+
Schema.Union([Schema.Boolean, Schema.Null]),
|
|
2526
|
+
),
|
|
2527
|
+
}).pipe(
|
|
2528
|
+
Schema.encodeKeys({
|
|
2529
|
+
advertised: "advertised",
|
|
2530
|
+
advertisedModifiedAt: "advertised_modified_at",
|
|
2531
|
+
onDemandEnabled: "on_demand_enabled",
|
|
2532
|
+
onDemandLocked: "on_demand_locked",
|
|
2533
|
+
}),
|
|
2534
|
+
),
|
|
2535
|
+
Schema.Null,
|
|
2536
|
+
]),
|
|
2537
|
+
),
|
|
2538
|
+
}).pipe(
|
|
2539
|
+
Schema.encodeKeys({
|
|
2540
|
+
id: "id",
|
|
2541
|
+
asn: "asn",
|
|
2542
|
+
asnPrependCount: "asn_prepend_count",
|
|
2543
|
+
autoAdvertiseWithdraw: "auto_advertise_withdraw",
|
|
2544
|
+
bgpSignalOpts: "bgp_signal_opts",
|
|
2545
|
+
cidr: "cidr",
|
|
2546
|
+
createdAt: "created_at",
|
|
2547
|
+
modifiedAt: "modified_at",
|
|
2548
|
+
onDemand: "on_demand",
|
|
2549
|
+
}),
|
|
2550
|
+
) as unknown as Schema.Schema<GetPrefixBgpPrefixResponse>;
|
|
2551
|
+
|
|
2552
|
+
export type GetPrefixBgpPrefixError =
|
|
2553
|
+
| DefaultErrors
|
|
2554
|
+
| BgpPrefixNotFound
|
|
2555
|
+
| InvalidAccountId
|
|
2556
|
+
| PrefixNotFound;
|
|
2557
|
+
|
|
2558
|
+
export const getPrefixBgpPrefix: API.OperationMethod<
|
|
2559
|
+
GetPrefixBgpPrefixRequest,
|
|
2560
|
+
GetPrefixBgpPrefixResponse,
|
|
2561
|
+
GetPrefixBgpPrefixError,
|
|
2562
|
+
Credentials | HttpClient.HttpClient
|
|
2563
|
+
> = /*@__PURE__*/ /*#__PURE__*/ API.make(() => ({
|
|
2564
|
+
input: GetPrefixBgpPrefixRequest,
|
|
2565
|
+
output: GetPrefixBgpPrefixResponse,
|
|
2566
|
+
errors: [BgpPrefixNotFound, InvalidAccountId, PrefixNotFound],
|
|
2567
|
+
}));
|
|
2568
|
+
|
|
2569
|
+
export interface ListPrefixBgpPrefixesRequest {
|
|
2570
|
+
prefixId: string;
|
|
2571
|
+
/** Identifier of a Cloudflare account. */
|
|
2572
|
+
accountId: string;
|
|
2573
|
+
}
|
|
2574
|
+
|
|
2575
|
+
export const ListPrefixBgpPrefixesRequest =
|
|
2576
|
+
/*@__PURE__*/ /*#__PURE__*/ Schema.Struct({
|
|
2577
|
+
prefixId: Schema.String.pipe(T.HttpPath("prefixId")),
|
|
2578
|
+
accountId: Schema.String.pipe(T.HttpPath("account_id")),
|
|
2579
|
+
}).pipe(
|
|
2580
|
+
T.Http({
|
|
2581
|
+
method: "GET",
|
|
2582
|
+
path: "/accounts/{account_id}/addressing/prefixes/{prefixId}/bgp/prefixes",
|
|
2583
|
+
}),
|
|
2584
|
+
) as unknown as Schema.Schema<ListPrefixBgpPrefixesRequest>;
|
|
2585
|
+
|
|
2586
|
+
export type ListPrefixBgpPrefixesResponse = {
|
|
2587
|
+
id?: string | null;
|
|
2588
|
+
asn?: number | null;
|
|
2589
|
+
asnPrependCount?: number | null;
|
|
2590
|
+
autoAdvertiseWithdraw?: boolean | null;
|
|
2591
|
+
bgpSignalOpts?: {
|
|
2592
|
+
enabled?: boolean | null;
|
|
2593
|
+
modifiedAt?: string | null;
|
|
2594
|
+
} | null;
|
|
2595
|
+
cidr?: string | null;
|
|
2596
|
+
createdAt?: string | null;
|
|
2597
|
+
modifiedAt?: string | null;
|
|
2598
|
+
onDemand?: {
|
|
2599
|
+
advertised?: boolean | null;
|
|
2600
|
+
advertisedModifiedAt?: string | null;
|
|
2601
|
+
onDemandEnabled?: boolean | null;
|
|
2602
|
+
onDemandLocked?: boolean | null;
|
|
2603
|
+
} | null;
|
|
2604
|
+
}[];
|
|
2605
|
+
|
|
2606
|
+
export const ListPrefixBgpPrefixesResponse =
|
|
2607
|
+
/*@__PURE__*/ /*#__PURE__*/ Schema.Array(
|
|
2608
|
+
Schema.Struct({
|
|
2609
|
+
id: Schema.optional(Schema.Union([Schema.String, Schema.Null])),
|
|
2610
|
+
asn: Schema.optional(Schema.Union([Schema.Number, Schema.Null])),
|
|
2611
|
+
asnPrependCount: Schema.optional(
|
|
2612
|
+
Schema.Union([Schema.Number, Schema.Null]),
|
|
2613
|
+
),
|
|
2614
|
+
autoAdvertiseWithdraw: Schema.optional(
|
|
2615
|
+
Schema.Union([Schema.Boolean, Schema.Null]),
|
|
2616
|
+
),
|
|
2617
|
+
bgpSignalOpts: Schema.optional(
|
|
2618
|
+
Schema.Union([
|
|
2619
|
+
Schema.Struct({
|
|
2620
|
+
enabled: Schema.optional(
|
|
2621
|
+
Schema.Union([Schema.Boolean, Schema.Null]),
|
|
2622
|
+
),
|
|
2623
|
+
modifiedAt: Schema.optional(
|
|
2624
|
+
Schema.Union([Schema.String, Schema.Null]),
|
|
2625
|
+
),
|
|
2626
|
+
}).pipe(
|
|
2627
|
+
Schema.encodeKeys({
|
|
2628
|
+
enabled: "enabled",
|
|
2629
|
+
modifiedAt: "modified_at",
|
|
2630
|
+
}),
|
|
2631
|
+
),
|
|
2632
|
+
Schema.Null,
|
|
2633
|
+
]),
|
|
2634
|
+
),
|
|
2635
|
+
cidr: Schema.optional(Schema.Union([Schema.String, Schema.Null])),
|
|
2636
|
+
createdAt: Schema.optional(Schema.Union([Schema.String, Schema.Null])),
|
|
2637
|
+
modifiedAt: Schema.optional(Schema.Union([Schema.String, Schema.Null])),
|
|
2638
|
+
onDemand: Schema.optional(
|
|
2639
|
+
Schema.Union([
|
|
2640
|
+
Schema.Struct({
|
|
2641
|
+
advertised: Schema.optional(
|
|
2642
|
+
Schema.Union([Schema.Boolean, Schema.Null]),
|
|
2643
|
+
),
|
|
2644
|
+
advertisedModifiedAt: Schema.optional(
|
|
2645
|
+
Schema.Union([Schema.String, Schema.Null]),
|
|
2646
|
+
),
|
|
2647
|
+
onDemandEnabled: Schema.optional(
|
|
2648
|
+
Schema.Union([Schema.Boolean, Schema.Null]),
|
|
2649
|
+
),
|
|
2650
|
+
onDemandLocked: Schema.optional(
|
|
2651
|
+
Schema.Union([Schema.Boolean, Schema.Null]),
|
|
2652
|
+
),
|
|
2653
|
+
}).pipe(
|
|
2654
|
+
Schema.encodeKeys({
|
|
2655
|
+
advertised: "advertised",
|
|
2656
|
+
advertisedModifiedAt: "advertised_modified_at",
|
|
2657
|
+
onDemandEnabled: "on_demand_enabled",
|
|
2658
|
+
onDemandLocked: "on_demand_locked",
|
|
2659
|
+
}),
|
|
2660
|
+
),
|
|
2661
|
+
Schema.Null,
|
|
2662
|
+
]),
|
|
2663
|
+
),
|
|
2664
|
+
}).pipe(
|
|
2665
|
+
Schema.encodeKeys({
|
|
2666
|
+
id: "id",
|
|
2667
|
+
asn: "asn",
|
|
2668
|
+
asnPrependCount: "asn_prepend_count",
|
|
2669
|
+
autoAdvertiseWithdraw: "auto_advertise_withdraw",
|
|
2670
|
+
bgpSignalOpts: "bgp_signal_opts",
|
|
2671
|
+
cidr: "cidr",
|
|
2672
|
+
createdAt: "created_at",
|
|
2673
|
+
modifiedAt: "modified_at",
|
|
2674
|
+
onDemand: "on_demand",
|
|
2675
|
+
}),
|
|
2676
|
+
),
|
|
2677
|
+
) as unknown as Schema.Schema<ListPrefixBgpPrefixesResponse>;
|
|
2678
|
+
|
|
2679
|
+
export type ListPrefixBgpPrefixesError = DefaultErrors;
|
|
2680
|
+
|
|
2681
|
+
export const listPrefixBgpPrefixes: API.OperationMethod<
|
|
2682
|
+
ListPrefixBgpPrefixesRequest,
|
|
2683
|
+
ListPrefixBgpPrefixesResponse,
|
|
2684
|
+
ListPrefixBgpPrefixesError,
|
|
2685
|
+
Credentials | HttpClient.HttpClient
|
|
2686
|
+
> = /*@__PURE__*/ /*#__PURE__*/ API.make(() => ({
|
|
2687
|
+
input: ListPrefixBgpPrefixesRequest,
|
|
2688
|
+
output: ListPrefixBgpPrefixesResponse,
|
|
2689
|
+
errors: [],
|
|
2690
|
+
}));
|
|
2691
|
+
|
|
2692
|
+
export interface CreatePrefixBgpPrefixRequest {
|
|
2693
|
+
prefixId: string;
|
|
2694
|
+
/** Path param: Identifier of a Cloudflare account. */
|
|
2695
|
+
accountId: string;
|
|
2696
|
+
/** Body param: IP Prefix in Classless Inter-Domain Routing format. */
|
|
2697
|
+
cidr: string;
|
|
2698
|
+
}
|
|
2699
|
+
|
|
2700
|
+
export const CreatePrefixBgpPrefixRequest =
|
|
2701
|
+
/*@__PURE__*/ /*#__PURE__*/ Schema.Struct({
|
|
2702
|
+
prefixId: Schema.String.pipe(T.HttpPath("prefixId")),
|
|
2703
|
+
accountId: Schema.String.pipe(T.HttpPath("account_id")),
|
|
2704
|
+
cidr: Schema.String,
|
|
2705
|
+
}).pipe(
|
|
2706
|
+
T.Http({
|
|
2707
|
+
method: "POST",
|
|
2708
|
+
path: "/accounts/{account_id}/addressing/prefixes/{prefixId}/bgp/prefixes",
|
|
2709
|
+
}),
|
|
2710
|
+
) as unknown as Schema.Schema<CreatePrefixBgpPrefixRequest>;
|
|
2711
|
+
|
|
2712
|
+
export interface CreatePrefixBgpPrefixResponse {
|
|
2713
|
+
/** Identifier of BGP Prefix. */
|
|
2714
|
+
id?: string | null;
|
|
2715
|
+
/** Autonomous System Number (ASN) the prefix will be advertised under. */
|
|
2716
|
+
asn?: number | null;
|
|
2717
|
+
/** Number of times to prepend the Cloudflare ASN to the BGP AS-Path attribute */
|
|
2718
|
+
asnPrependCount?: number | null;
|
|
2719
|
+
/** Determines if Cloudflare advertises a BYOIP BGP prefix even when there is no matching BGP prefix in the Magic routing table. When true, Cloudflare will automatically withdraw the BGP prefix when there */
|
|
2720
|
+
autoAdvertiseWithdraw?: boolean | null;
|
|
2721
|
+
bgpSignalOpts?: {
|
|
2722
|
+
enabled?: boolean | null;
|
|
2723
|
+
modifiedAt?: string | null;
|
|
2724
|
+
} | null;
|
|
2725
|
+
/** IP Prefix in Classless Inter-Domain Routing format. */
|
|
2726
|
+
cidr?: string | null;
|
|
2727
|
+
createdAt?: string | null;
|
|
2728
|
+
modifiedAt?: string | null;
|
|
2729
|
+
onDemand?: {
|
|
2730
|
+
advertised?: boolean | null;
|
|
2731
|
+
advertisedModifiedAt?: string | null;
|
|
2732
|
+
onDemandEnabled?: boolean | null;
|
|
2733
|
+
onDemandLocked?: boolean | null;
|
|
2734
|
+
} | null;
|
|
2735
|
+
}
|
|
2736
|
+
|
|
2737
|
+
export const CreatePrefixBgpPrefixResponse =
|
|
2738
|
+
/*@__PURE__*/ /*#__PURE__*/ Schema.Struct({
|
|
2739
|
+
id: Schema.optional(Schema.Union([Schema.String, Schema.Null])),
|
|
2740
|
+
asn: Schema.optional(Schema.Union([Schema.Number, Schema.Null])),
|
|
2741
|
+
asnPrependCount: Schema.optional(
|
|
2742
|
+
Schema.Union([Schema.Number, Schema.Null]),
|
|
2743
|
+
),
|
|
2744
|
+
autoAdvertiseWithdraw: Schema.optional(
|
|
2745
|
+
Schema.Union([Schema.Boolean, Schema.Null]),
|
|
2746
|
+
),
|
|
2747
|
+
bgpSignalOpts: Schema.optional(
|
|
2748
|
+
Schema.Union([
|
|
2749
|
+
Schema.Struct({
|
|
2750
|
+
enabled: Schema.optional(Schema.Union([Schema.Boolean, Schema.Null])),
|
|
2751
|
+
modifiedAt: Schema.optional(
|
|
2752
|
+
Schema.Union([Schema.String, Schema.Null]),
|
|
2753
|
+
),
|
|
2754
|
+
}).pipe(
|
|
2755
|
+
Schema.encodeKeys({ enabled: "enabled", modifiedAt: "modified_at" }),
|
|
2756
|
+
),
|
|
2757
|
+
Schema.Null,
|
|
2758
|
+
]),
|
|
2759
|
+
),
|
|
2760
|
+
cidr: Schema.optional(Schema.Union([Schema.String, Schema.Null])),
|
|
2761
|
+
createdAt: Schema.optional(Schema.Union([Schema.String, Schema.Null])),
|
|
2762
|
+
modifiedAt: Schema.optional(Schema.Union([Schema.String, Schema.Null])),
|
|
2763
|
+
onDemand: Schema.optional(
|
|
2764
|
+
Schema.Union([
|
|
2765
|
+
Schema.Struct({
|
|
2766
|
+
advertised: Schema.optional(
|
|
2767
|
+
Schema.Union([Schema.Boolean, Schema.Null]),
|
|
2768
|
+
),
|
|
2769
|
+
advertisedModifiedAt: Schema.optional(
|
|
2770
|
+
Schema.Union([Schema.String, Schema.Null]),
|
|
2771
|
+
),
|
|
2772
|
+
onDemandEnabled: Schema.optional(
|
|
2773
|
+
Schema.Union([Schema.Boolean, Schema.Null]),
|
|
2774
|
+
),
|
|
2775
|
+
onDemandLocked: Schema.optional(
|
|
2776
|
+
Schema.Union([Schema.Boolean, Schema.Null]),
|
|
2777
|
+
),
|
|
2778
|
+
}).pipe(
|
|
2779
|
+
Schema.encodeKeys({
|
|
2780
|
+
advertised: "advertised",
|
|
2781
|
+
advertisedModifiedAt: "advertised_modified_at",
|
|
2782
|
+
onDemandEnabled: "on_demand_enabled",
|
|
2783
|
+
onDemandLocked: "on_demand_locked",
|
|
2784
|
+
}),
|
|
2785
|
+
),
|
|
2786
|
+
Schema.Null,
|
|
2787
|
+
]),
|
|
2788
|
+
),
|
|
2789
|
+
}).pipe(
|
|
2790
|
+
Schema.encodeKeys({
|
|
2791
|
+
id: "id",
|
|
2792
|
+
asn: "asn",
|
|
2793
|
+
asnPrependCount: "asn_prepend_count",
|
|
2794
|
+
autoAdvertiseWithdraw: "auto_advertise_withdraw",
|
|
2795
|
+
bgpSignalOpts: "bgp_signal_opts",
|
|
2796
|
+
cidr: "cidr",
|
|
2797
|
+
createdAt: "created_at",
|
|
2798
|
+
modifiedAt: "modified_at",
|
|
2799
|
+
onDemand: "on_demand",
|
|
2800
|
+
}),
|
|
2801
|
+
) as unknown as Schema.Schema<CreatePrefixBgpPrefixResponse>;
|
|
2802
|
+
|
|
2803
|
+
export type CreatePrefixBgpPrefixError =
|
|
2804
|
+
| DefaultErrors
|
|
2805
|
+
| NonexistentAccountPrefix
|
|
2806
|
+
| InvalidAccountId
|
|
2807
|
+
| InvalidNetworkCidr;
|
|
2808
|
+
|
|
2809
|
+
export const createPrefixBgpPrefix: API.OperationMethod<
|
|
2810
|
+
CreatePrefixBgpPrefixRequest,
|
|
2811
|
+
CreatePrefixBgpPrefixResponse,
|
|
2812
|
+
CreatePrefixBgpPrefixError,
|
|
2813
|
+
Credentials | HttpClient.HttpClient
|
|
2814
|
+
> = /*@__PURE__*/ /*#__PURE__*/ API.make(() => ({
|
|
2815
|
+
input: CreatePrefixBgpPrefixRequest,
|
|
2816
|
+
output: CreatePrefixBgpPrefixResponse,
|
|
2817
|
+
errors: [NonexistentAccountPrefix, InvalidAccountId, InvalidNetworkCidr],
|
|
2818
|
+
}));
|
|
2819
|
+
|
|
2820
|
+
export interface PatchPrefixBgpPrefixRequest {
|
|
2821
|
+
prefixId: string;
|
|
2822
|
+
bgpPrefixId: string;
|
|
2823
|
+
/** Path param: Identifier of a Cloudflare account. */
|
|
2824
|
+
accountId: string;
|
|
2825
|
+
/** Body param: Number of times to prepend the Cloudflare ASN to the BGP AS-Path attribute */
|
|
2826
|
+
asnPrependCount?: number;
|
|
2827
|
+
/** Body param: Determines if Cloudflare advertises a BYOIP BGP prefix even when there is no matching BGP prefix in the Magic routing table. When true, Cloudflare will automatically withdraw the BGP prefi */
|
|
2828
|
+
autoAdvertiseWithdraw?: boolean;
|
|
2829
|
+
/** Body param: */
|
|
2830
|
+
onDemand?: { advertised?: boolean };
|
|
2831
|
+
}
|
|
2832
|
+
|
|
2833
|
+
export const PatchPrefixBgpPrefixRequest =
|
|
2834
|
+
/*@__PURE__*/ /*#__PURE__*/ Schema.Struct({
|
|
2835
|
+
prefixId: Schema.String.pipe(T.HttpPath("prefixId")),
|
|
2836
|
+
bgpPrefixId: Schema.String.pipe(T.HttpPath("bgpPrefixId")),
|
|
2837
|
+
accountId: Schema.String.pipe(T.HttpPath("account_id")),
|
|
2838
|
+
asnPrependCount: Schema.optional(Schema.Number),
|
|
2839
|
+
autoAdvertiseWithdraw: Schema.optional(Schema.Boolean),
|
|
2840
|
+
onDemand: Schema.optional(
|
|
2841
|
+
Schema.Struct({
|
|
2842
|
+
advertised: Schema.optional(Schema.Boolean),
|
|
2843
|
+
}),
|
|
2844
|
+
),
|
|
2845
|
+
}).pipe(
|
|
2846
|
+
Schema.encodeKeys({
|
|
2847
|
+
asnPrependCount: "asn_prepend_count",
|
|
2848
|
+
autoAdvertiseWithdraw: "auto_advertise_withdraw",
|
|
2849
|
+
onDemand: "on_demand",
|
|
2850
|
+
}),
|
|
2851
|
+
T.Http({
|
|
2852
|
+
method: "PATCH",
|
|
2853
|
+
path: "/accounts/{account_id}/addressing/prefixes/{prefixId}/bgp/prefixes/{bgpPrefixId}",
|
|
2854
|
+
}),
|
|
2855
|
+
) as unknown as Schema.Schema<PatchPrefixBgpPrefixRequest>;
|
|
2856
|
+
|
|
2857
|
+
export interface PatchPrefixBgpPrefixResponse {
|
|
2858
|
+
/** Identifier of BGP Prefix. */
|
|
2859
|
+
id?: string | null;
|
|
2860
|
+
/** Autonomous System Number (ASN) the prefix will be advertised under. */
|
|
2861
|
+
asn?: number | null;
|
|
2862
|
+
/** Number of times to prepend the Cloudflare ASN to the BGP AS-Path attribute */
|
|
2863
|
+
asnPrependCount?: number | null;
|
|
2864
|
+
/** Determines if Cloudflare advertises a BYOIP BGP prefix even when there is no matching BGP prefix in the Magic routing table. When true, Cloudflare will automatically withdraw the BGP prefix when there */
|
|
2865
|
+
autoAdvertiseWithdraw?: boolean | null;
|
|
2866
|
+
bgpSignalOpts?: {
|
|
2867
|
+
enabled?: boolean | null;
|
|
2868
|
+
modifiedAt?: string | null;
|
|
2869
|
+
} | null;
|
|
2870
|
+
/** IP Prefix in Classless Inter-Domain Routing format. */
|
|
2871
|
+
cidr?: string | null;
|
|
2872
|
+
createdAt?: string | null;
|
|
2873
|
+
modifiedAt?: string | null;
|
|
2874
|
+
onDemand?: {
|
|
2875
|
+
advertised?: boolean | null;
|
|
2876
|
+
advertisedModifiedAt?: string | null;
|
|
2877
|
+
onDemandEnabled?: boolean | null;
|
|
2878
|
+
onDemandLocked?: boolean | null;
|
|
2879
|
+
} | null;
|
|
2880
|
+
}
|
|
2881
|
+
|
|
2882
|
+
export const PatchPrefixBgpPrefixResponse =
|
|
2883
|
+
/*@__PURE__*/ /*#__PURE__*/ Schema.Struct({
|
|
2884
|
+
id: Schema.optional(Schema.Union([Schema.String, Schema.Null])),
|
|
2885
|
+
asn: Schema.optional(Schema.Union([Schema.Number, Schema.Null])),
|
|
2886
|
+
asnPrependCount: Schema.optional(
|
|
2887
|
+
Schema.Union([Schema.Number, Schema.Null]),
|
|
2888
|
+
),
|
|
2889
|
+
autoAdvertiseWithdraw: Schema.optional(
|
|
2890
|
+
Schema.Union([Schema.Boolean, Schema.Null]),
|
|
2891
|
+
),
|
|
2892
|
+
bgpSignalOpts: Schema.optional(
|
|
2893
|
+
Schema.Union([
|
|
2894
|
+
Schema.Struct({
|
|
2895
|
+
enabled: Schema.optional(Schema.Union([Schema.Boolean, Schema.Null])),
|
|
2896
|
+
modifiedAt: Schema.optional(
|
|
2897
|
+
Schema.Union([Schema.String, Schema.Null]),
|
|
2898
|
+
),
|
|
2899
|
+
}).pipe(
|
|
2900
|
+
Schema.encodeKeys({ enabled: "enabled", modifiedAt: "modified_at" }),
|
|
2901
|
+
),
|
|
2902
|
+
Schema.Null,
|
|
2903
|
+
]),
|
|
2904
|
+
),
|
|
2905
|
+
cidr: Schema.optional(Schema.Union([Schema.String, Schema.Null])),
|
|
2906
|
+
createdAt: Schema.optional(Schema.Union([Schema.String, Schema.Null])),
|
|
2907
|
+
modifiedAt: Schema.optional(Schema.Union([Schema.String, Schema.Null])),
|
|
2908
|
+
onDemand: Schema.optional(
|
|
2909
|
+
Schema.Union([
|
|
2910
|
+
Schema.Struct({
|
|
2911
|
+
advertised: Schema.optional(
|
|
2912
|
+
Schema.Union([Schema.Boolean, Schema.Null]),
|
|
2913
|
+
),
|
|
2914
|
+
advertisedModifiedAt: Schema.optional(
|
|
2915
|
+
Schema.Union([Schema.String, Schema.Null]),
|
|
2916
|
+
),
|
|
2917
|
+
onDemandEnabled: Schema.optional(
|
|
2918
|
+
Schema.Union([Schema.Boolean, Schema.Null]),
|
|
2919
|
+
),
|
|
2920
|
+
onDemandLocked: Schema.optional(
|
|
2921
|
+
Schema.Union([Schema.Boolean, Schema.Null]),
|
|
2922
|
+
),
|
|
2923
|
+
}).pipe(
|
|
2924
|
+
Schema.encodeKeys({
|
|
2925
|
+
advertised: "advertised",
|
|
2926
|
+
advertisedModifiedAt: "advertised_modified_at",
|
|
2927
|
+
onDemandEnabled: "on_demand_enabled",
|
|
2928
|
+
onDemandLocked: "on_demand_locked",
|
|
2929
|
+
}),
|
|
2930
|
+
),
|
|
2931
|
+
Schema.Null,
|
|
2932
|
+
]),
|
|
2933
|
+
),
|
|
2934
|
+
}).pipe(
|
|
2935
|
+
Schema.encodeKeys({
|
|
2936
|
+
id: "id",
|
|
2937
|
+
asn: "asn",
|
|
2938
|
+
asnPrependCount: "asn_prepend_count",
|
|
2939
|
+
autoAdvertiseWithdraw: "auto_advertise_withdraw",
|
|
2940
|
+
bgpSignalOpts: "bgp_signal_opts",
|
|
2941
|
+
cidr: "cidr",
|
|
2942
|
+
createdAt: "created_at",
|
|
2943
|
+
modifiedAt: "modified_at",
|
|
2944
|
+
onDemand: "on_demand",
|
|
2945
|
+
}),
|
|
2946
|
+
) as unknown as Schema.Schema<PatchPrefixBgpPrefixResponse>;
|
|
2947
|
+
|
|
2948
|
+
export type PatchPrefixBgpPrefixError =
|
|
2949
|
+
| DefaultErrors
|
|
2950
|
+
| BgpPrefixNotFound
|
|
2951
|
+
| InvalidAccountId;
|
|
2952
|
+
|
|
2953
|
+
export const patchPrefixBgpPrefix: API.OperationMethod<
|
|
2954
|
+
PatchPrefixBgpPrefixRequest,
|
|
2955
|
+
PatchPrefixBgpPrefixResponse,
|
|
2956
|
+
PatchPrefixBgpPrefixError,
|
|
2957
|
+
Credentials | HttpClient.HttpClient
|
|
2958
|
+
> = /*@__PURE__*/ /*#__PURE__*/ API.make(() => ({
|
|
2959
|
+
input: PatchPrefixBgpPrefixRequest,
|
|
2960
|
+
output: PatchPrefixBgpPrefixResponse,
|
|
2961
|
+
errors: [BgpPrefixNotFound, InvalidAccountId],
|
|
2962
|
+
}));
|
|
2963
|
+
|
|
2964
|
+
// =============================================================================
|
|
2965
|
+
// PrefixDelegation
|
|
2966
|
+
// =============================================================================
|
|
2967
|
+
|
|
2968
|
+
export interface ListPrefixDelegationsRequest {
|
|
2969
|
+
prefixId: string;
|
|
2970
|
+
/** Identifier of a Cloudflare account. */
|
|
2971
|
+
accountId: string;
|
|
2972
|
+
}
|
|
2973
|
+
|
|
2974
|
+
export const ListPrefixDelegationsRequest =
|
|
2975
|
+
/*@__PURE__*/ /*#__PURE__*/ Schema.Struct({
|
|
2976
|
+
prefixId: Schema.String.pipe(T.HttpPath("prefixId")),
|
|
2977
|
+
accountId: Schema.String.pipe(T.HttpPath("account_id")),
|
|
2978
|
+
}).pipe(
|
|
2979
|
+
T.Http({
|
|
2980
|
+
method: "GET",
|
|
2981
|
+
path: "/accounts/{account_id}/addressing/prefixes/{prefixId}/delegations",
|
|
2982
|
+
}),
|
|
2983
|
+
) as unknown as Schema.Schema<ListPrefixDelegationsRequest>;
|
|
2984
|
+
|
|
2985
|
+
export type ListPrefixDelegationsResponse = {
|
|
2986
|
+
id?: string | null;
|
|
2987
|
+
cidr?: string | null;
|
|
2988
|
+
createdAt?: string | null;
|
|
2989
|
+
delegatedAccountId?: string | null;
|
|
2990
|
+
modifiedAt?: string | null;
|
|
2991
|
+
parentPrefixId?: string | null;
|
|
2992
|
+
}[];
|
|
2993
|
+
|
|
2994
|
+
export const ListPrefixDelegationsResponse =
|
|
2995
|
+
/*@__PURE__*/ /*#__PURE__*/ Schema.Array(
|
|
2996
|
+
Schema.Struct({
|
|
2997
|
+
id: Schema.optional(Schema.Union([Schema.String, Schema.Null])),
|
|
2998
|
+
cidr: Schema.optional(Schema.Union([Schema.String, Schema.Null])),
|
|
2999
|
+
createdAt: Schema.optional(Schema.Union([Schema.String, Schema.Null])),
|
|
3000
|
+
delegatedAccountId: Schema.optional(
|
|
3001
|
+
Schema.Union([Schema.String, Schema.Null]),
|
|
3002
|
+
),
|
|
3003
|
+
modifiedAt: Schema.optional(Schema.Union([Schema.String, Schema.Null])),
|
|
3004
|
+
parentPrefixId: Schema.optional(
|
|
3005
|
+
Schema.Union([Schema.String, Schema.Null]),
|
|
3006
|
+
),
|
|
3007
|
+
}).pipe(
|
|
3008
|
+
Schema.encodeKeys({
|
|
3009
|
+
id: "id",
|
|
3010
|
+
cidr: "cidr",
|
|
3011
|
+
createdAt: "created_at",
|
|
3012
|
+
delegatedAccountId: "delegated_account_id",
|
|
3013
|
+
modifiedAt: "modified_at",
|
|
3014
|
+
parentPrefixId: "parent_prefix_id",
|
|
3015
|
+
}),
|
|
3016
|
+
),
|
|
3017
|
+
) as unknown as Schema.Schema<ListPrefixDelegationsResponse>;
|
|
3018
|
+
|
|
3019
|
+
export type ListPrefixDelegationsError = DefaultErrors;
|
|
3020
|
+
|
|
3021
|
+
export const listPrefixDelegations: API.OperationMethod<
|
|
3022
|
+
ListPrefixDelegationsRequest,
|
|
3023
|
+
ListPrefixDelegationsResponse,
|
|
3024
|
+
ListPrefixDelegationsError,
|
|
3025
|
+
Credentials | HttpClient.HttpClient
|
|
3026
|
+
> = /*@__PURE__*/ /*#__PURE__*/ API.make(() => ({
|
|
3027
|
+
input: ListPrefixDelegationsRequest,
|
|
3028
|
+
output: ListPrefixDelegationsResponse,
|
|
3029
|
+
errors: [],
|
|
3030
|
+
}));
|
|
3031
|
+
|
|
3032
|
+
export interface CreatePrefixDelegationRequest {
|
|
3033
|
+
prefixId: string;
|
|
3034
|
+
/** Path param: Identifier of a Cloudflare account. */
|
|
3035
|
+
accountId: string;
|
|
3036
|
+
/** Body param: IP Prefix in Classless Inter-Domain Routing format. */
|
|
3037
|
+
cidr: string;
|
|
3038
|
+
/** Body param: Account identifier for the account to which prefix is being delegated. */
|
|
3039
|
+
delegatedAccountId: string;
|
|
3040
|
+
}
|
|
3041
|
+
|
|
3042
|
+
export const CreatePrefixDelegationRequest =
|
|
3043
|
+
/*@__PURE__*/ /*#__PURE__*/ Schema.Struct({
|
|
3044
|
+
prefixId: Schema.String.pipe(T.HttpPath("prefixId")),
|
|
3045
|
+
accountId: Schema.String.pipe(T.HttpPath("account_id")),
|
|
3046
|
+
cidr: Schema.String,
|
|
3047
|
+
delegatedAccountId: Schema.String,
|
|
3048
|
+
}).pipe(
|
|
3049
|
+
Schema.encodeKeys({
|
|
3050
|
+
cidr: "cidr",
|
|
3051
|
+
delegatedAccountId: "delegated_account_id",
|
|
3052
|
+
}),
|
|
3053
|
+
T.Http({
|
|
3054
|
+
method: "POST",
|
|
3055
|
+
path: "/accounts/{account_id}/addressing/prefixes/{prefixId}/delegations",
|
|
3056
|
+
}),
|
|
3057
|
+
) as unknown as Schema.Schema<CreatePrefixDelegationRequest>;
|
|
3058
|
+
|
|
3059
|
+
export interface CreatePrefixDelegationResponse {
|
|
3060
|
+
/** Identifier of a Delegation. */
|
|
3061
|
+
id?: string | null;
|
|
3062
|
+
/** IP Prefix in Classless Inter-Domain Routing format. */
|
|
3063
|
+
cidr?: string | null;
|
|
3064
|
+
createdAt?: string | null;
|
|
3065
|
+
/** Account identifier for the account to which prefix is being delegated. */
|
|
3066
|
+
delegatedAccountId?: string | null;
|
|
3067
|
+
modifiedAt?: string | null;
|
|
3068
|
+
/** Identifier of an IP Prefix. */
|
|
3069
|
+
parentPrefixId?: string | null;
|
|
3070
|
+
}
|
|
3071
|
+
|
|
3072
|
+
export const CreatePrefixDelegationResponse =
|
|
3073
|
+
/*@__PURE__*/ /*#__PURE__*/ Schema.Struct({
|
|
3074
|
+
id: Schema.optional(Schema.Union([Schema.String, Schema.Null])),
|
|
3075
|
+
cidr: Schema.optional(Schema.Union([Schema.String, Schema.Null])),
|
|
3076
|
+
createdAt: Schema.optional(Schema.Union([Schema.String, Schema.Null])),
|
|
3077
|
+
delegatedAccountId: Schema.optional(
|
|
3078
|
+
Schema.Union([Schema.String, Schema.Null]),
|
|
3079
|
+
),
|
|
3080
|
+
modifiedAt: Schema.optional(Schema.Union([Schema.String, Schema.Null])),
|
|
3081
|
+
parentPrefixId: Schema.optional(Schema.Union([Schema.String, Schema.Null])),
|
|
3082
|
+
}).pipe(
|
|
3083
|
+
Schema.encodeKeys({
|
|
3084
|
+
id: "id",
|
|
3085
|
+
cidr: "cidr",
|
|
3086
|
+
createdAt: "created_at",
|
|
3087
|
+
delegatedAccountId: "delegated_account_id",
|
|
3088
|
+
modifiedAt: "modified_at",
|
|
3089
|
+
parentPrefixId: "parent_prefix_id",
|
|
3090
|
+
}),
|
|
3091
|
+
) as unknown as Schema.Schema<CreatePrefixDelegationResponse>;
|
|
3092
|
+
|
|
3093
|
+
export type CreatePrefixDelegationError =
|
|
3094
|
+
| DefaultErrors
|
|
3095
|
+
| PrefixNotFound
|
|
3096
|
+
| MissingAccountId
|
|
3097
|
+
| InvalidAccountId;
|
|
3098
|
+
|
|
3099
|
+
export const createPrefixDelegation: API.OperationMethod<
|
|
3100
|
+
CreatePrefixDelegationRequest,
|
|
3101
|
+
CreatePrefixDelegationResponse,
|
|
3102
|
+
CreatePrefixDelegationError,
|
|
3103
|
+
Credentials | HttpClient.HttpClient
|
|
3104
|
+
> = /*@__PURE__*/ /*#__PURE__*/ API.make(() => ({
|
|
3105
|
+
input: CreatePrefixDelegationRequest,
|
|
3106
|
+
output: CreatePrefixDelegationResponse,
|
|
3107
|
+
errors: [PrefixNotFound, MissingAccountId, InvalidAccountId],
|
|
3108
|
+
}));
|
|
3109
|
+
|
|
3110
|
+
export interface DeletePrefixDelegationRequest {
|
|
3111
|
+
prefixId: string;
|
|
3112
|
+
delegationId: string;
|
|
3113
|
+
/** Identifier of a Cloudflare account. */
|
|
3114
|
+
accountId: string;
|
|
3115
|
+
}
|
|
3116
|
+
|
|
3117
|
+
export const DeletePrefixDelegationRequest =
|
|
3118
|
+
/*@__PURE__*/ /*#__PURE__*/ Schema.Struct({
|
|
3119
|
+
prefixId: Schema.String.pipe(T.HttpPath("prefixId")),
|
|
3120
|
+
delegationId: Schema.String.pipe(T.HttpPath("delegationId")),
|
|
3121
|
+
accountId: Schema.String.pipe(T.HttpPath("account_id")),
|
|
3122
|
+
}).pipe(
|
|
3123
|
+
T.Http({
|
|
3124
|
+
method: "DELETE",
|
|
3125
|
+
path: "/accounts/{account_id}/addressing/prefixes/{prefixId}/delegations/{delegationId}",
|
|
3126
|
+
}),
|
|
3127
|
+
) as unknown as Schema.Schema<DeletePrefixDelegationRequest>;
|
|
3128
|
+
|
|
3129
|
+
export interface DeletePrefixDelegationResponse {
|
|
3130
|
+
/** Identifier of a Delegation. */
|
|
3131
|
+
id?: string | null;
|
|
3132
|
+
}
|
|
3133
|
+
|
|
3134
|
+
export const DeletePrefixDelegationResponse =
|
|
3135
|
+
/*@__PURE__*/ /*#__PURE__*/ Schema.Struct({
|
|
3136
|
+
id: Schema.optional(Schema.Union([Schema.String, Schema.Null])),
|
|
3137
|
+
}) as unknown as Schema.Schema<DeletePrefixDelegationResponse>;
|
|
3138
|
+
|
|
3139
|
+
export type DeletePrefixDelegationError =
|
|
3140
|
+
| DefaultErrors
|
|
3141
|
+
| DelegationNotFound
|
|
3142
|
+
| InvalidAccountId;
|
|
3143
|
+
|
|
3144
|
+
export const deletePrefixDelegation: API.OperationMethod<
|
|
3145
|
+
DeletePrefixDelegationRequest,
|
|
3146
|
+
DeletePrefixDelegationResponse,
|
|
3147
|
+
DeletePrefixDelegationError,
|
|
3148
|
+
Credentials | HttpClient.HttpClient
|
|
3149
|
+
> = /*@__PURE__*/ /*#__PURE__*/ API.make(() => ({
|
|
3150
|
+
input: DeletePrefixDelegationRequest,
|
|
3151
|
+
output: DeletePrefixDelegationResponse,
|
|
3152
|
+
errors: [DelegationNotFound, InvalidAccountId],
|
|
3153
|
+
}));
|
|
3154
|
+
|
|
3155
|
+
// =============================================================================
|
|
3156
|
+
// PrefixServiceBinding
|
|
3157
|
+
// =============================================================================
|
|
3158
|
+
|
|
3159
|
+
export interface GetPrefixServiceBindingRequest {
|
|
3160
|
+
prefixId: string;
|
|
3161
|
+
bindingId: string;
|
|
3162
|
+
/** Identifier of a Cloudflare account. */
|
|
3163
|
+
accountId: string;
|
|
3164
|
+
}
|
|
3165
|
+
|
|
3166
|
+
export const GetPrefixServiceBindingRequest =
|
|
3167
|
+
/*@__PURE__*/ /*#__PURE__*/ Schema.Struct({
|
|
3168
|
+
prefixId: Schema.String.pipe(T.HttpPath("prefixId")),
|
|
3169
|
+
bindingId: Schema.String.pipe(T.HttpPath("bindingId")),
|
|
3170
|
+
accountId: Schema.String.pipe(T.HttpPath("account_id")),
|
|
3171
|
+
}).pipe(
|
|
3172
|
+
T.Http({
|
|
3173
|
+
method: "GET",
|
|
3174
|
+
path: "/accounts/{account_id}/addressing/prefixes/{prefixId}/bindings/{bindingId}",
|
|
3175
|
+
}),
|
|
3176
|
+
) as unknown as Schema.Schema<GetPrefixServiceBindingRequest>;
|
|
3177
|
+
|
|
3178
|
+
export interface GetPrefixServiceBindingResponse {
|
|
3179
|
+
/** Identifier of a Service Binding. */
|
|
3180
|
+
id?: string | null;
|
|
3181
|
+
/** IP Prefix in Classless Inter-Domain Routing format. */
|
|
3182
|
+
cidr?: string | null;
|
|
3183
|
+
/** Status of a Service Binding's deployment to the Cloudflare network */
|
|
3184
|
+
provisioning?: { state?: "provisioning" | "active" | null } | null;
|
|
3185
|
+
/** Identifier of a Service on the Cloudflare network. Available services and their IDs may be found in the List Services endpoint. */
|
|
3186
|
+
serviceId?: string | null;
|
|
3187
|
+
/** Name of a service running on the Cloudflare network */
|
|
3188
|
+
serviceName?: string | null;
|
|
3189
|
+
}
|
|
3190
|
+
|
|
3191
|
+
export const GetPrefixServiceBindingResponse =
|
|
3192
|
+
/*@__PURE__*/ /*#__PURE__*/ Schema.Struct({
|
|
3193
|
+
id: Schema.optional(Schema.Union([Schema.String, Schema.Null])),
|
|
3194
|
+
cidr: Schema.optional(Schema.Union([Schema.String, Schema.Null])),
|
|
3195
|
+
provisioning: Schema.optional(
|
|
3196
|
+
Schema.Union([
|
|
3197
|
+
Schema.Struct({
|
|
3198
|
+
state: Schema.optional(
|
|
3199
|
+
Schema.Union([
|
|
3200
|
+
Schema.Literals(["provisioning", "active"]),
|
|
3201
|
+
Schema.Null,
|
|
3202
|
+
]),
|
|
3203
|
+
),
|
|
3204
|
+
}),
|
|
3205
|
+
Schema.Null,
|
|
3206
|
+
]),
|
|
3207
|
+
),
|
|
3208
|
+
serviceId: Schema.optional(Schema.Union([Schema.String, Schema.Null])),
|
|
3209
|
+
serviceName: Schema.optional(Schema.Union([Schema.String, Schema.Null])),
|
|
3210
|
+
}).pipe(
|
|
3211
|
+
Schema.encodeKeys({
|
|
3212
|
+
id: "id",
|
|
3213
|
+
cidr: "cidr",
|
|
3214
|
+
provisioning: "provisioning",
|
|
3215
|
+
serviceId: "service_id",
|
|
3216
|
+
serviceName: "service_name",
|
|
3217
|
+
}),
|
|
3218
|
+
) as unknown as Schema.Schema<GetPrefixServiceBindingResponse>;
|
|
3219
|
+
|
|
3220
|
+
export type GetPrefixServiceBindingError =
|
|
3221
|
+
| DefaultErrors
|
|
3222
|
+
| BindingNotFound
|
|
3223
|
+
| InvalidAccountId
|
|
3224
|
+
| PrefixNotFound;
|
|
3225
|
+
|
|
3226
|
+
export const getPrefixServiceBinding: API.OperationMethod<
|
|
3227
|
+
GetPrefixServiceBindingRequest,
|
|
3228
|
+
GetPrefixServiceBindingResponse,
|
|
3229
|
+
GetPrefixServiceBindingError,
|
|
3230
|
+
Credentials | HttpClient.HttpClient
|
|
3231
|
+
> = /*@__PURE__*/ /*#__PURE__*/ API.make(() => ({
|
|
3232
|
+
input: GetPrefixServiceBindingRequest,
|
|
3233
|
+
output: GetPrefixServiceBindingResponse,
|
|
3234
|
+
errors: [BindingNotFound, InvalidAccountId, PrefixNotFound],
|
|
3235
|
+
}));
|
|
3236
|
+
|
|
3237
|
+
export interface ListPrefixServiceBindingsRequest {
|
|
3238
|
+
prefixId: string;
|
|
3239
|
+
/** Identifier of a Cloudflare account. */
|
|
3240
|
+
accountId: string;
|
|
3241
|
+
}
|
|
3242
|
+
|
|
3243
|
+
export const ListPrefixServiceBindingsRequest =
|
|
3244
|
+
/*@__PURE__*/ /*#__PURE__*/ Schema.Struct({
|
|
3245
|
+
prefixId: Schema.String.pipe(T.HttpPath("prefixId")),
|
|
3246
|
+
accountId: Schema.String.pipe(T.HttpPath("account_id")),
|
|
3247
|
+
}).pipe(
|
|
3248
|
+
T.Http({
|
|
3249
|
+
method: "GET",
|
|
3250
|
+
path: "/accounts/{account_id}/addressing/prefixes/{prefixId}/bindings",
|
|
3251
|
+
}),
|
|
3252
|
+
) as unknown as Schema.Schema<ListPrefixServiceBindingsRequest>;
|
|
3253
|
+
|
|
3254
|
+
export type ListPrefixServiceBindingsResponse = {
|
|
3255
|
+
id?: string | null;
|
|
3256
|
+
cidr?: string | null;
|
|
3257
|
+
provisioning?: { state?: "provisioning" | "active" | null } | null;
|
|
3258
|
+
serviceId?: string | null;
|
|
3259
|
+
serviceName?: string | null;
|
|
3260
|
+
}[];
|
|
3261
|
+
|
|
3262
|
+
export const ListPrefixServiceBindingsResponse =
|
|
3263
|
+
/*@__PURE__*/ /*#__PURE__*/ Schema.Array(
|
|
3264
|
+
Schema.Struct({
|
|
3265
|
+
id: Schema.optional(Schema.Union([Schema.String, Schema.Null])),
|
|
3266
|
+
cidr: Schema.optional(Schema.Union([Schema.String, Schema.Null])),
|
|
3267
|
+
provisioning: Schema.optional(
|
|
3268
|
+
Schema.Union([
|
|
3269
|
+
Schema.Struct({
|
|
3270
|
+
state: Schema.optional(
|
|
3271
|
+
Schema.Union([
|
|
3272
|
+
Schema.Literals(["provisioning", "active"]),
|
|
3273
|
+
Schema.Null,
|
|
3274
|
+
]),
|
|
3275
|
+
),
|
|
3276
|
+
}),
|
|
3277
|
+
Schema.Null,
|
|
3278
|
+
]),
|
|
3279
|
+
),
|
|
3280
|
+
serviceId: Schema.optional(Schema.Union([Schema.String, Schema.Null])),
|
|
3281
|
+
serviceName: Schema.optional(Schema.Union([Schema.String, Schema.Null])),
|
|
3282
|
+
}).pipe(
|
|
3283
|
+
Schema.encodeKeys({
|
|
3284
|
+
id: "id",
|
|
3285
|
+
cidr: "cidr",
|
|
3286
|
+
provisioning: "provisioning",
|
|
3287
|
+
serviceId: "service_id",
|
|
3288
|
+
serviceName: "service_name",
|
|
3289
|
+
}),
|
|
3290
|
+
),
|
|
3291
|
+
) as unknown as Schema.Schema<ListPrefixServiceBindingsResponse>;
|
|
3292
|
+
|
|
3293
|
+
export type ListPrefixServiceBindingsError = DefaultErrors;
|
|
3294
|
+
|
|
3295
|
+
export const listPrefixServiceBindings: API.OperationMethod<
|
|
3296
|
+
ListPrefixServiceBindingsRequest,
|
|
3297
|
+
ListPrefixServiceBindingsResponse,
|
|
3298
|
+
ListPrefixServiceBindingsError,
|
|
3299
|
+
Credentials | HttpClient.HttpClient
|
|
3300
|
+
> = /*@__PURE__*/ /*#__PURE__*/ API.make(() => ({
|
|
3301
|
+
input: ListPrefixServiceBindingsRequest,
|
|
3302
|
+
output: ListPrefixServiceBindingsResponse,
|
|
3303
|
+
errors: [],
|
|
3304
|
+
}));
|
|
3305
|
+
|
|
3306
|
+
export interface CreatePrefixServiceBindingRequest {
|
|
3307
|
+
prefixId: string;
|
|
3308
|
+
/** Path param: Identifier of a Cloudflare account. */
|
|
3309
|
+
accountId: string;
|
|
3310
|
+
/** Body param: IP Prefix in Classless Inter-Domain Routing format. */
|
|
3311
|
+
cidr: string;
|
|
3312
|
+
/** Body param: Identifier of a Service on the Cloudflare network. Available services and their IDs may be found in the List Services endpoint. */
|
|
3313
|
+
serviceId: string;
|
|
3314
|
+
}
|
|
3315
|
+
|
|
3316
|
+
export const CreatePrefixServiceBindingRequest =
|
|
3317
|
+
/*@__PURE__*/ /*#__PURE__*/ Schema.Struct({
|
|
3318
|
+
prefixId: Schema.String.pipe(T.HttpPath("prefixId")),
|
|
3319
|
+
accountId: Schema.String.pipe(T.HttpPath("account_id")),
|
|
3320
|
+
cidr: Schema.String,
|
|
3321
|
+
serviceId: Schema.String,
|
|
3322
|
+
}).pipe(
|
|
3323
|
+
Schema.encodeKeys({ cidr: "cidr", serviceId: "service_id" }),
|
|
3324
|
+
T.Http({
|
|
3325
|
+
method: "POST",
|
|
3326
|
+
path: "/accounts/{account_id}/addressing/prefixes/{prefixId}/bindings",
|
|
3327
|
+
}),
|
|
3328
|
+
) as unknown as Schema.Schema<CreatePrefixServiceBindingRequest>;
|
|
3329
|
+
|
|
3330
|
+
export interface CreatePrefixServiceBindingResponse {
|
|
3331
|
+
/** Identifier of a Service Binding. */
|
|
3332
|
+
id?: string | null;
|
|
3333
|
+
/** IP Prefix in Classless Inter-Domain Routing format. */
|
|
3334
|
+
cidr?: string | null;
|
|
3335
|
+
/** Status of a Service Binding's deployment to the Cloudflare network */
|
|
3336
|
+
provisioning?: { state?: "provisioning" | "active" | null } | null;
|
|
3337
|
+
/** Identifier of a Service on the Cloudflare network. Available services and their IDs may be found in the List Services endpoint. */
|
|
3338
|
+
serviceId?: string | null;
|
|
3339
|
+
/** Name of a service running on the Cloudflare network */
|
|
3340
|
+
serviceName?: string | null;
|
|
3341
|
+
}
|
|
3342
|
+
|
|
3343
|
+
export const CreatePrefixServiceBindingResponse =
|
|
3344
|
+
/*@__PURE__*/ /*#__PURE__*/ Schema.Struct({
|
|
3345
|
+
id: Schema.optional(Schema.Union([Schema.String, Schema.Null])),
|
|
3346
|
+
cidr: Schema.optional(Schema.Union([Schema.String, Schema.Null])),
|
|
3347
|
+
provisioning: Schema.optional(
|
|
3348
|
+
Schema.Union([
|
|
3349
|
+
Schema.Struct({
|
|
3350
|
+
state: Schema.optional(
|
|
3351
|
+
Schema.Union([
|
|
3352
|
+
Schema.Literals(["provisioning", "active"]),
|
|
3353
|
+
Schema.Null,
|
|
3354
|
+
]),
|
|
3355
|
+
),
|
|
3356
|
+
}),
|
|
3357
|
+
Schema.Null,
|
|
3358
|
+
]),
|
|
3359
|
+
),
|
|
3360
|
+
serviceId: Schema.optional(Schema.Union([Schema.String, Schema.Null])),
|
|
3361
|
+
serviceName: Schema.optional(Schema.Union([Schema.String, Schema.Null])),
|
|
3362
|
+
}).pipe(
|
|
3363
|
+
Schema.encodeKeys({
|
|
3364
|
+
id: "id",
|
|
3365
|
+
cidr: "cidr",
|
|
3366
|
+
provisioning: "provisioning",
|
|
3367
|
+
serviceId: "service_id",
|
|
3368
|
+
serviceName: "service_name",
|
|
3369
|
+
}),
|
|
3370
|
+
) as unknown as Schema.Schema<CreatePrefixServiceBindingResponse>;
|
|
3371
|
+
|
|
3372
|
+
export type CreatePrefixServiceBindingError =
|
|
3373
|
+
| DefaultErrors
|
|
3374
|
+
| UnsupportedBindingConfiguration
|
|
3375
|
+
| InvalidAccountId;
|
|
3376
|
+
|
|
3377
|
+
export const createPrefixServiceBinding: API.OperationMethod<
|
|
3378
|
+
CreatePrefixServiceBindingRequest,
|
|
3379
|
+
CreatePrefixServiceBindingResponse,
|
|
3380
|
+
CreatePrefixServiceBindingError,
|
|
3381
|
+
Credentials | HttpClient.HttpClient
|
|
3382
|
+
> = /*@__PURE__*/ /*#__PURE__*/ API.make(() => ({
|
|
3383
|
+
input: CreatePrefixServiceBindingRequest,
|
|
3384
|
+
output: CreatePrefixServiceBindingResponse,
|
|
3385
|
+
errors: [UnsupportedBindingConfiguration, InvalidAccountId],
|
|
3386
|
+
}));
|
|
3387
|
+
|
|
3388
|
+
export interface DeletePrefixServiceBindingRequest {
|
|
3389
|
+
prefixId: string;
|
|
3390
|
+
bindingId: string;
|
|
3391
|
+
/** Identifier of a Cloudflare account. */
|
|
3392
|
+
accountId: string;
|
|
3393
|
+
}
|
|
3394
|
+
|
|
3395
|
+
export const DeletePrefixServiceBindingRequest =
|
|
3396
|
+
/*@__PURE__*/ /*#__PURE__*/ Schema.Struct({
|
|
3397
|
+
prefixId: Schema.String.pipe(T.HttpPath("prefixId")),
|
|
3398
|
+
bindingId: Schema.String.pipe(T.HttpPath("bindingId")),
|
|
3399
|
+
accountId: Schema.String.pipe(T.HttpPath("account_id")),
|
|
3400
|
+
}).pipe(
|
|
3401
|
+
T.Http({
|
|
3402
|
+
method: "DELETE",
|
|
3403
|
+
path: "/accounts/{account_id}/addressing/prefixes/{prefixId}/bindings/{bindingId}",
|
|
3404
|
+
}),
|
|
3405
|
+
) as unknown as Schema.Schema<DeletePrefixServiceBindingRequest>;
|
|
3406
|
+
|
|
3407
|
+
export interface DeletePrefixServiceBindingResponse {
|
|
3408
|
+
errors: {
|
|
3409
|
+
code: number;
|
|
3410
|
+
message: string;
|
|
3411
|
+
documentationUrl?: string | null;
|
|
3412
|
+
source?: { pointer?: string | null } | null;
|
|
3413
|
+
}[];
|
|
3414
|
+
messages: {
|
|
3415
|
+
code: number;
|
|
3416
|
+
message: string;
|
|
3417
|
+
documentationUrl?: string | null;
|
|
3418
|
+
source?: { pointer?: string | null } | null;
|
|
3419
|
+
}[];
|
|
3420
|
+
/** Whether the API call was successful. */
|
|
3421
|
+
success: true;
|
|
3422
|
+
}
|
|
3423
|
+
|
|
3424
|
+
export const DeletePrefixServiceBindingResponse =
|
|
3425
|
+
/*@__PURE__*/ /*#__PURE__*/ Schema.Struct({
|
|
3426
|
+
errors: Schema.Array(
|
|
3427
|
+
Schema.Struct({
|
|
3428
|
+
code: Schema.Number,
|
|
3429
|
+
message: Schema.String,
|
|
3430
|
+
documentationUrl: Schema.optional(
|
|
3431
|
+
Schema.Union([Schema.String, Schema.Null]),
|
|
3432
|
+
),
|
|
3433
|
+
source: Schema.optional(
|
|
3434
|
+
Schema.Union([
|
|
3435
|
+
Schema.Struct({
|
|
3436
|
+
pointer: Schema.optional(
|
|
3437
|
+
Schema.Union([Schema.String, Schema.Null]),
|
|
3438
|
+
),
|
|
3439
|
+
}),
|
|
3440
|
+
Schema.Null,
|
|
3441
|
+
]),
|
|
3442
|
+
),
|
|
3443
|
+
}).pipe(
|
|
3444
|
+
Schema.encodeKeys({
|
|
3445
|
+
code: "code",
|
|
3446
|
+
message: "message",
|
|
3447
|
+
documentationUrl: "documentation_url",
|
|
3448
|
+
source: "source",
|
|
3449
|
+
}),
|
|
3450
|
+
),
|
|
3451
|
+
),
|
|
3452
|
+
messages: Schema.Array(
|
|
3453
|
+
Schema.Struct({
|
|
3454
|
+
code: Schema.Number,
|
|
3455
|
+
message: Schema.String,
|
|
3456
|
+
documentationUrl: Schema.optional(
|
|
3457
|
+
Schema.Union([Schema.String, Schema.Null]),
|
|
3458
|
+
),
|
|
3459
|
+
source: Schema.optional(
|
|
3460
|
+
Schema.Union([
|
|
3461
|
+
Schema.Struct({
|
|
3462
|
+
pointer: Schema.optional(
|
|
3463
|
+
Schema.Union([Schema.String, Schema.Null]),
|
|
3464
|
+
),
|
|
3465
|
+
}),
|
|
3466
|
+
Schema.Null,
|
|
3467
|
+
]),
|
|
3468
|
+
),
|
|
3469
|
+
}).pipe(
|
|
3470
|
+
Schema.encodeKeys({
|
|
3471
|
+
code: "code",
|
|
3472
|
+
message: "message",
|
|
3473
|
+
documentationUrl: "documentation_url",
|
|
3474
|
+
source: "source",
|
|
3475
|
+
}),
|
|
3476
|
+
),
|
|
3477
|
+
),
|
|
3478
|
+
success: Schema.Literal(true),
|
|
3479
|
+
}) as unknown as Schema.Schema<DeletePrefixServiceBindingResponse>;
|
|
3480
|
+
|
|
3481
|
+
export type DeletePrefixServiceBindingError =
|
|
3482
|
+
| DefaultErrors
|
|
3483
|
+
| BindingNotFound
|
|
3484
|
+
| InvalidAccountId
|
|
3485
|
+
| PrefixNotFound;
|
|
3486
|
+
|
|
3487
|
+
export const deletePrefixServiceBinding: API.OperationMethod<
|
|
3488
|
+
DeletePrefixServiceBindingRequest,
|
|
3489
|
+
DeletePrefixServiceBindingResponse,
|
|
3490
|
+
DeletePrefixServiceBindingError,
|
|
3491
|
+
Credentials | HttpClient.HttpClient
|
|
3492
|
+
> = /*@__PURE__*/ /*#__PURE__*/ API.make(() => ({
|
|
3493
|
+
input: DeletePrefixServiceBindingRequest,
|
|
3494
|
+
output: DeletePrefixServiceBindingResponse,
|
|
3495
|
+
errors: [BindingNotFound, InvalidAccountId, PrefixNotFound],
|
|
3496
|
+
}));
|
|
3497
|
+
|
|
3498
|
+
// =============================================================================
|
|
3499
|
+
// RegionalHostname
|
|
3500
|
+
// =============================================================================
|
|
3501
|
+
|
|
3502
|
+
export interface GetRegionalHostnameRequest {
|
|
3503
|
+
hostname: string;
|
|
3504
|
+
/** Identifier. */
|
|
3505
|
+
zoneId: string;
|
|
3506
|
+
}
|
|
3507
|
+
|
|
3508
|
+
export const GetRegionalHostnameRequest =
|
|
3509
|
+
/*@__PURE__*/ /*#__PURE__*/ Schema.Struct({
|
|
3510
|
+
hostname: Schema.String.pipe(T.HttpPath("hostname")),
|
|
3511
|
+
zoneId: Schema.String.pipe(T.HttpPath("zone_id")),
|
|
3512
|
+
}).pipe(
|
|
3513
|
+
T.Http({
|
|
3514
|
+
method: "GET",
|
|
3515
|
+
path: "/zones/{zone_id}/addressing/regional_hostnames/{hostname}",
|
|
3516
|
+
}),
|
|
3517
|
+
) as unknown as Schema.Schema<GetRegionalHostnameRequest>;
|
|
3518
|
+
|
|
3519
|
+
export interface GetRegionalHostnameResponse {
|
|
3520
|
+
/** When the regional hostname was created */
|
|
3521
|
+
createdOn: string;
|
|
3522
|
+
/** DNS hostname to be regionalized, must be a subdomain of the zone. Wildcards are supported for one level, e.g ` .example.com` */
|
|
3523
|
+
hostname: string;
|
|
3524
|
+
/** Identifying key for the region */
|
|
3525
|
+
regionKey: string;
|
|
3526
|
+
/** Configure which routing method to use for the regional hostname */
|
|
3527
|
+
routing?: string | null;
|
|
3528
|
+
}
|
|
3529
|
+
|
|
3530
|
+
export const GetRegionalHostnameResponse =
|
|
3531
|
+
/*@__PURE__*/ /*#__PURE__*/ Schema.Struct({
|
|
3532
|
+
createdOn: Schema.String,
|
|
3533
|
+
hostname: Schema.String,
|
|
3534
|
+
regionKey: Schema.String,
|
|
3535
|
+
routing: Schema.optional(Schema.Union([Schema.String, Schema.Null])),
|
|
3536
|
+
}).pipe(
|
|
3537
|
+
Schema.encodeKeys({
|
|
3538
|
+
createdOn: "created_on",
|
|
3539
|
+
hostname: "hostname",
|
|
3540
|
+
regionKey: "region_key",
|
|
3541
|
+
routing: "routing",
|
|
3542
|
+
}),
|
|
3543
|
+
) as unknown as Schema.Schema<GetRegionalHostnameResponse>;
|
|
3544
|
+
|
|
3545
|
+
export type GetRegionalHostnameError =
|
|
3546
|
+
| DefaultErrors
|
|
3547
|
+
| InvalidZoneId
|
|
3548
|
+
| RegionalHostnameNotFound
|
|
3549
|
+
| RegionalHostnameEmpty;
|
|
3550
|
+
|
|
3551
|
+
export const getRegionalHostname: API.OperationMethod<
|
|
3552
|
+
GetRegionalHostnameRequest,
|
|
3553
|
+
GetRegionalHostnameResponse,
|
|
3554
|
+
GetRegionalHostnameError,
|
|
3555
|
+
Credentials | HttpClient.HttpClient
|
|
3556
|
+
> = /*@__PURE__*/ /*#__PURE__*/ API.make(() => ({
|
|
3557
|
+
input: GetRegionalHostnameRequest,
|
|
3558
|
+
output: GetRegionalHostnameResponse,
|
|
3559
|
+
errors: [InvalidZoneId, RegionalHostnameNotFound, RegionalHostnameEmpty],
|
|
3560
|
+
}));
|
|
3561
|
+
|
|
3562
|
+
export interface ListRegionalHostnamesRequest {
|
|
3563
|
+
/** Identifier. */
|
|
3564
|
+
zoneId: string;
|
|
3565
|
+
}
|
|
3566
|
+
|
|
3567
|
+
export const ListRegionalHostnamesRequest =
|
|
3568
|
+
/*@__PURE__*/ /*#__PURE__*/ Schema.Struct({
|
|
3569
|
+
zoneId: Schema.String.pipe(T.HttpPath("zone_id")),
|
|
3570
|
+
}).pipe(
|
|
3571
|
+
T.Http({
|
|
3572
|
+
method: "GET",
|
|
3573
|
+
path: "/zones/{zone_id}/addressing/regional_hostnames",
|
|
3574
|
+
}),
|
|
3575
|
+
) as unknown as Schema.Schema<ListRegionalHostnamesRequest>;
|
|
3576
|
+
|
|
3577
|
+
export type ListRegionalHostnamesResponse = {
|
|
3578
|
+
createdOn: string;
|
|
3579
|
+
hostname: string;
|
|
3580
|
+
regionKey: string;
|
|
3581
|
+
routing?: string | null;
|
|
3582
|
+
}[];
|
|
3583
|
+
|
|
3584
|
+
export const ListRegionalHostnamesResponse =
|
|
3585
|
+
/*@__PURE__*/ /*#__PURE__*/ Schema.Array(
|
|
3586
|
+
Schema.Struct({
|
|
3587
|
+
createdOn: Schema.String,
|
|
3588
|
+
hostname: Schema.String,
|
|
3589
|
+
regionKey: Schema.String,
|
|
3590
|
+
routing: Schema.optional(Schema.Union([Schema.String, Schema.Null])),
|
|
3591
|
+
}).pipe(
|
|
3592
|
+
Schema.encodeKeys({
|
|
3593
|
+
createdOn: "created_on",
|
|
3594
|
+
hostname: "hostname",
|
|
3595
|
+
regionKey: "region_key",
|
|
3596
|
+
routing: "routing",
|
|
3597
|
+
}),
|
|
3598
|
+
),
|
|
3599
|
+
) as unknown as Schema.Schema<ListRegionalHostnamesResponse>;
|
|
3600
|
+
|
|
3601
|
+
export type ListRegionalHostnamesError = DefaultErrors;
|
|
3602
|
+
|
|
3603
|
+
export const listRegionalHostnames: API.OperationMethod<
|
|
3604
|
+
ListRegionalHostnamesRequest,
|
|
3605
|
+
ListRegionalHostnamesResponse,
|
|
3606
|
+
ListRegionalHostnamesError,
|
|
3607
|
+
Credentials | HttpClient.HttpClient
|
|
3608
|
+
> = /*@__PURE__*/ /*#__PURE__*/ API.make(() => ({
|
|
3609
|
+
input: ListRegionalHostnamesRequest,
|
|
3610
|
+
output: ListRegionalHostnamesResponse,
|
|
3611
|
+
errors: [],
|
|
3612
|
+
}));
|
|
3613
|
+
|
|
3614
|
+
export interface CreateRegionalHostnameRequest {
|
|
3615
|
+
/** Path param: Identifier. */
|
|
3616
|
+
zoneId: string;
|
|
3617
|
+
/** Body param: DNS hostname to be regionalized, must be a subdomain of the zone. Wildcards are supported for one level, e.g ` .example.com` */
|
|
3618
|
+
hostname: string;
|
|
3619
|
+
/** Body param: Identifying key for the region */
|
|
3620
|
+
regionKey: string;
|
|
3621
|
+
/** Body param: Configure which routing method to use for the regional hostname */
|
|
3622
|
+
routing?: string;
|
|
3623
|
+
}
|
|
3624
|
+
|
|
3625
|
+
export const CreateRegionalHostnameRequest =
|
|
3626
|
+
/*@__PURE__*/ /*#__PURE__*/ Schema.Struct({
|
|
3627
|
+
zoneId: Schema.String.pipe(T.HttpPath("zone_id")),
|
|
3628
|
+
hostname: Schema.String,
|
|
3629
|
+
regionKey: Schema.String,
|
|
3630
|
+
routing: Schema.optional(Schema.String),
|
|
3631
|
+
}).pipe(
|
|
3632
|
+
Schema.encodeKeys({
|
|
3633
|
+
hostname: "hostname",
|
|
3634
|
+
regionKey: "region_key",
|
|
3635
|
+
routing: "routing",
|
|
3636
|
+
}),
|
|
3637
|
+
T.Http({
|
|
3638
|
+
method: "POST",
|
|
3639
|
+
path: "/zones/{zone_id}/addressing/regional_hostnames",
|
|
3640
|
+
}),
|
|
3641
|
+
) as unknown as Schema.Schema<CreateRegionalHostnameRequest>;
|
|
3642
|
+
|
|
3643
|
+
export interface CreateRegionalHostnameResponse {
|
|
3644
|
+
/** When the regional hostname was created */
|
|
3645
|
+
createdOn: string;
|
|
3646
|
+
/** DNS hostname to be regionalized, must be a subdomain of the zone. Wildcards are supported for one level, e.g ` .example.com` */
|
|
3647
|
+
hostname: string;
|
|
3648
|
+
/** Identifying key for the region */
|
|
3649
|
+
regionKey: string;
|
|
3650
|
+
/** Configure which routing method to use for the regional hostname */
|
|
3651
|
+
routing?: string | null;
|
|
3652
|
+
}
|
|
3653
|
+
|
|
3654
|
+
export const CreateRegionalHostnameResponse =
|
|
3655
|
+
/*@__PURE__*/ /*#__PURE__*/ Schema.Struct({
|
|
3656
|
+
createdOn: Schema.String,
|
|
3657
|
+
hostname: Schema.String,
|
|
3658
|
+
regionKey: Schema.String,
|
|
3659
|
+
routing: Schema.optional(Schema.Union([Schema.String, Schema.Null])),
|
|
3660
|
+
}).pipe(
|
|
3661
|
+
Schema.encodeKeys({
|
|
3662
|
+
createdOn: "created_on",
|
|
3663
|
+
hostname: "hostname",
|
|
3664
|
+
regionKey: "region_key",
|
|
3665
|
+
routing: "routing",
|
|
3666
|
+
}),
|
|
3667
|
+
) as unknown as Schema.Schema<CreateRegionalHostnameResponse>;
|
|
3668
|
+
|
|
3669
|
+
export type CreateRegionalHostnameError =
|
|
3670
|
+
| DefaultErrors
|
|
3671
|
+
| InvalidZoneId
|
|
3672
|
+
| InvalidHostname
|
|
3673
|
+
| RegionalHostnameEmpty;
|
|
3674
|
+
|
|
3675
|
+
export const createRegionalHostname: API.OperationMethod<
|
|
3676
|
+
CreateRegionalHostnameRequest,
|
|
3677
|
+
CreateRegionalHostnameResponse,
|
|
3678
|
+
CreateRegionalHostnameError,
|
|
3679
|
+
Credentials | HttpClient.HttpClient
|
|
3680
|
+
> = /*@__PURE__*/ /*#__PURE__*/ API.make(() => ({
|
|
3681
|
+
input: CreateRegionalHostnameRequest,
|
|
3682
|
+
output: CreateRegionalHostnameResponse,
|
|
3683
|
+
errors: [InvalidZoneId, InvalidHostname, RegionalHostnameEmpty],
|
|
3684
|
+
}));
|
|
3685
|
+
|
|
3686
|
+
export interface PatchRegionalHostnameRequest {
|
|
3687
|
+
hostname: string;
|
|
3688
|
+
/** Path param: Identifier. */
|
|
3689
|
+
zoneId: string;
|
|
3690
|
+
/** Body param: Identifying key for the region */
|
|
3691
|
+
regionKey: string;
|
|
3692
|
+
}
|
|
3693
|
+
|
|
3694
|
+
export const PatchRegionalHostnameRequest =
|
|
3695
|
+
/*@__PURE__*/ /*#__PURE__*/ Schema.Struct({
|
|
3696
|
+
hostname: Schema.String.pipe(T.HttpPath("hostname")),
|
|
3697
|
+
zoneId: Schema.String.pipe(T.HttpPath("zone_id")),
|
|
3698
|
+
regionKey: Schema.String,
|
|
3699
|
+
}).pipe(
|
|
3700
|
+
Schema.encodeKeys({ regionKey: "region_key" }),
|
|
3701
|
+
T.Http({
|
|
3702
|
+
method: "PATCH",
|
|
3703
|
+
path: "/zones/{zone_id}/addressing/regional_hostnames/{hostname}",
|
|
3704
|
+
}),
|
|
3705
|
+
) as unknown as Schema.Schema<PatchRegionalHostnameRequest>;
|
|
3706
|
+
|
|
3707
|
+
export interface PatchRegionalHostnameResponse {
|
|
3708
|
+
/** When the regional hostname was created */
|
|
3709
|
+
createdOn: string;
|
|
3710
|
+
/** DNS hostname to be regionalized, must be a subdomain of the zone. Wildcards are supported for one level, e.g ` .example.com` */
|
|
3711
|
+
hostname: string;
|
|
3712
|
+
/** Identifying key for the region */
|
|
3713
|
+
regionKey: string;
|
|
3714
|
+
/** Configure which routing method to use for the regional hostname */
|
|
3715
|
+
routing?: string | null;
|
|
3716
|
+
}
|
|
3717
|
+
|
|
3718
|
+
export const PatchRegionalHostnameResponse =
|
|
3719
|
+
/*@__PURE__*/ /*#__PURE__*/ Schema.Struct({
|
|
3720
|
+
createdOn: Schema.String,
|
|
3721
|
+
hostname: Schema.String,
|
|
3722
|
+
regionKey: Schema.String,
|
|
3723
|
+
routing: Schema.optional(Schema.Union([Schema.String, Schema.Null])),
|
|
3724
|
+
}).pipe(
|
|
3725
|
+
Schema.encodeKeys({
|
|
3726
|
+
createdOn: "created_on",
|
|
3727
|
+
hostname: "hostname",
|
|
3728
|
+
regionKey: "region_key",
|
|
3729
|
+
routing: "routing",
|
|
3730
|
+
}),
|
|
3731
|
+
) as unknown as Schema.Schema<PatchRegionalHostnameResponse>;
|
|
3732
|
+
|
|
3733
|
+
export type PatchRegionalHostnameError =
|
|
3734
|
+
| DefaultErrors
|
|
3735
|
+
| InvalidZoneId
|
|
3736
|
+
| RegionalHostnameNotFound
|
|
3737
|
+
| RegionalHostnameEmpty;
|
|
3738
|
+
|
|
3739
|
+
export const patchRegionalHostname: API.OperationMethod<
|
|
3740
|
+
PatchRegionalHostnameRequest,
|
|
3741
|
+
PatchRegionalHostnameResponse,
|
|
3742
|
+
PatchRegionalHostnameError,
|
|
3743
|
+
Credentials | HttpClient.HttpClient
|
|
3744
|
+
> = /*@__PURE__*/ /*#__PURE__*/ API.make(() => ({
|
|
3745
|
+
input: PatchRegionalHostnameRequest,
|
|
3746
|
+
output: PatchRegionalHostnameResponse,
|
|
3747
|
+
errors: [InvalidZoneId, RegionalHostnameNotFound, RegionalHostnameEmpty],
|
|
3748
|
+
}));
|
|
3749
|
+
|
|
3750
|
+
export interface DeleteRegionalHostnameRequest {
|
|
3751
|
+
hostname: string;
|
|
3752
|
+
/** Identifier. */
|
|
3753
|
+
zoneId: string;
|
|
3754
|
+
}
|
|
3755
|
+
|
|
3756
|
+
export const DeleteRegionalHostnameRequest =
|
|
3757
|
+
/*@__PURE__*/ /*#__PURE__*/ Schema.Struct({
|
|
3758
|
+
hostname: Schema.String.pipe(T.HttpPath("hostname")),
|
|
3759
|
+
zoneId: Schema.String.pipe(T.HttpPath("zone_id")),
|
|
3760
|
+
}).pipe(
|
|
3761
|
+
T.Http({
|
|
3762
|
+
method: "DELETE",
|
|
3763
|
+
path: "/zones/{zone_id}/addressing/regional_hostnames/{hostname}",
|
|
3764
|
+
}),
|
|
3765
|
+
) as unknown as Schema.Schema<DeleteRegionalHostnameRequest>;
|
|
3766
|
+
|
|
3767
|
+
export interface DeleteRegionalHostnameResponse {
|
|
3768
|
+
errors: {
|
|
3769
|
+
code: number;
|
|
3770
|
+
message: string;
|
|
3771
|
+
documentationUrl?: string | null;
|
|
3772
|
+
source?: { pointer?: string | null } | null;
|
|
3773
|
+
}[];
|
|
3774
|
+
messages: {
|
|
3775
|
+
code: number;
|
|
3776
|
+
message: string;
|
|
3777
|
+
documentationUrl?: string | null;
|
|
3778
|
+
source?: { pointer?: string | null } | null;
|
|
3779
|
+
}[];
|
|
3780
|
+
/** Whether the API call was successful. */
|
|
3781
|
+
success: true;
|
|
3782
|
+
}
|
|
3783
|
+
|
|
3784
|
+
export const DeleteRegionalHostnameResponse =
|
|
3785
|
+
/*@__PURE__*/ /*#__PURE__*/ Schema.Struct({
|
|
3786
|
+
errors: Schema.Array(
|
|
3787
|
+
Schema.Struct({
|
|
3788
|
+
code: Schema.Number,
|
|
3789
|
+
message: Schema.String,
|
|
3790
|
+
documentationUrl: Schema.optional(
|
|
3791
|
+
Schema.Union([Schema.String, Schema.Null]),
|
|
3792
|
+
),
|
|
3793
|
+
source: Schema.optional(
|
|
3794
|
+
Schema.Union([
|
|
3795
|
+
Schema.Struct({
|
|
3796
|
+
pointer: Schema.optional(
|
|
3797
|
+
Schema.Union([Schema.String, Schema.Null]),
|
|
3798
|
+
),
|
|
3799
|
+
}),
|
|
3800
|
+
Schema.Null,
|
|
3801
|
+
]),
|
|
3802
|
+
),
|
|
3803
|
+
}).pipe(
|
|
3804
|
+
Schema.encodeKeys({
|
|
3805
|
+
code: "code",
|
|
3806
|
+
message: "message",
|
|
3807
|
+
documentationUrl: "documentation_url",
|
|
3808
|
+
source: "source",
|
|
3809
|
+
}),
|
|
3810
|
+
),
|
|
3811
|
+
),
|
|
3812
|
+
messages: Schema.Array(
|
|
3813
|
+
Schema.Struct({
|
|
3814
|
+
code: Schema.Number,
|
|
3815
|
+
message: Schema.String,
|
|
3816
|
+
documentationUrl: Schema.optional(
|
|
3817
|
+
Schema.Union([Schema.String, Schema.Null]),
|
|
3818
|
+
),
|
|
3819
|
+
source: Schema.optional(
|
|
3820
|
+
Schema.Union([
|
|
3821
|
+
Schema.Struct({
|
|
3822
|
+
pointer: Schema.optional(
|
|
3823
|
+
Schema.Union([Schema.String, Schema.Null]),
|
|
3824
|
+
),
|
|
3825
|
+
}),
|
|
3826
|
+
Schema.Null,
|
|
3827
|
+
]),
|
|
3828
|
+
),
|
|
3829
|
+
}).pipe(
|
|
3830
|
+
Schema.encodeKeys({
|
|
3831
|
+
code: "code",
|
|
3832
|
+
message: "message",
|
|
3833
|
+
documentationUrl: "documentation_url",
|
|
3834
|
+
source: "source",
|
|
3835
|
+
}),
|
|
3836
|
+
),
|
|
3837
|
+
),
|
|
3838
|
+
success: Schema.Literal(true),
|
|
3839
|
+
}) as unknown as Schema.Schema<DeleteRegionalHostnameResponse>;
|
|
3840
|
+
|
|
3841
|
+
export type DeleteRegionalHostnameError =
|
|
3842
|
+
| DefaultErrors
|
|
3843
|
+
| MethodNotAllowed
|
|
3844
|
+
| InvalidZoneId
|
|
3845
|
+
| RegionalHostnameNotFound
|
|
3846
|
+
| RegionalHostnameEmpty;
|
|
3847
|
+
|
|
3848
|
+
export const deleteRegionalHostname: API.OperationMethod<
|
|
3849
|
+
DeleteRegionalHostnameRequest,
|
|
3850
|
+
DeleteRegionalHostnameResponse,
|
|
3851
|
+
DeleteRegionalHostnameError,
|
|
3852
|
+
Credentials | HttpClient.HttpClient
|
|
3853
|
+
> = /*@__PURE__*/ /*#__PURE__*/ API.make(() => ({
|
|
3854
|
+
input: DeleteRegionalHostnameRequest,
|
|
3855
|
+
output: DeleteRegionalHostnameResponse,
|
|
3856
|
+
errors: [
|
|
3857
|
+
MethodNotAllowed,
|
|
3858
|
+
InvalidZoneId,
|
|
3859
|
+
RegionalHostnameNotFound,
|
|
3860
|
+
RegionalHostnameEmpty,
|
|
3861
|
+
],
|
|
3862
|
+
}));
|
|
3863
|
+
|
|
3864
|
+
// =============================================================================
|
|
3865
|
+
// RegionalHostnameRegion
|
|
3866
|
+
// =============================================================================
|
|
3867
|
+
|
|
3868
|
+
export interface ListRegionalHostnameRegionsRequest {
|
|
3869
|
+
/** Identifier. */
|
|
3870
|
+
accountId: string;
|
|
3871
|
+
}
|
|
3872
|
+
|
|
3873
|
+
export const ListRegionalHostnameRegionsRequest =
|
|
3874
|
+
/*@__PURE__*/ /*#__PURE__*/ Schema.Struct({
|
|
3875
|
+
accountId: Schema.String.pipe(T.HttpPath("account_id")),
|
|
3876
|
+
}).pipe(
|
|
3877
|
+
T.Http({
|
|
3878
|
+
method: "GET",
|
|
3879
|
+
path: "/accounts/{account_id}/addressing/regional_hostnames/regions",
|
|
3880
|
+
}),
|
|
3881
|
+
) as unknown as Schema.Schema<ListRegionalHostnameRegionsRequest>;
|
|
3882
|
+
|
|
3883
|
+
export type ListRegionalHostnameRegionsResponse = {
|
|
3884
|
+
key?: string | null;
|
|
3885
|
+
label?: string | null;
|
|
3886
|
+
}[];
|
|
3887
|
+
|
|
3888
|
+
export const ListRegionalHostnameRegionsResponse =
|
|
3889
|
+
/*@__PURE__*/ /*#__PURE__*/ Schema.Array(
|
|
3890
|
+
Schema.Struct({
|
|
3891
|
+
key: Schema.optional(Schema.Union([Schema.String, Schema.Null])),
|
|
3892
|
+
label: Schema.optional(Schema.Union([Schema.String, Schema.Null])),
|
|
3893
|
+
}),
|
|
3894
|
+
) as unknown as Schema.Schema<ListRegionalHostnameRegionsResponse>;
|
|
3895
|
+
|
|
3896
|
+
export type ListRegionalHostnameRegionsError = DefaultErrors;
|
|
3897
|
+
|
|
3898
|
+
export const listRegionalHostnameRegions: API.OperationMethod<
|
|
3899
|
+
ListRegionalHostnameRegionsRequest,
|
|
3900
|
+
ListRegionalHostnameRegionsResponse,
|
|
3901
|
+
ListRegionalHostnameRegionsError,
|
|
3902
|
+
Credentials | HttpClient.HttpClient
|
|
3903
|
+
> = /*@__PURE__*/ /*#__PURE__*/ API.make(() => ({
|
|
3904
|
+
input: ListRegionalHostnameRegionsRequest,
|
|
3905
|
+
output: ListRegionalHostnameRegionsResponse,
|
|
3906
|
+
errors: [],
|
|
3907
|
+
}));
|
|
3908
|
+
|
|
3909
|
+
// =============================================================================
|
|
3910
|
+
// Service
|
|
3911
|
+
// =============================================================================
|
|
3912
|
+
|
|
3913
|
+
export interface ListServicesRequest {
|
|
3914
|
+
/** Identifier of a Cloudflare account. */
|
|
3915
|
+
accountId: string;
|
|
3916
|
+
}
|
|
3917
|
+
|
|
3918
|
+
export const ListServicesRequest = /*@__PURE__*/ /*#__PURE__*/ Schema.Struct({
|
|
3919
|
+
accountId: Schema.String.pipe(T.HttpPath("account_id")),
|
|
3920
|
+
}).pipe(
|
|
3921
|
+
T.Http({ method: "GET", path: "/accounts/{account_id}/addressing/services" }),
|
|
3922
|
+
) as unknown as Schema.Schema<ListServicesRequest>;
|
|
3923
|
+
|
|
3924
|
+
export type ListServicesResponse = {
|
|
3925
|
+
id?: string | null;
|
|
3926
|
+
name?: string | null;
|
|
3927
|
+
}[];
|
|
3928
|
+
|
|
3929
|
+
export const ListServicesResponse = /*@__PURE__*/ /*#__PURE__*/ Schema.Array(
|
|
3930
|
+
Schema.Struct({
|
|
3931
|
+
id: Schema.optional(Schema.Union([Schema.String, Schema.Null])),
|
|
3932
|
+
name: Schema.optional(Schema.Union([Schema.String, Schema.Null])),
|
|
3933
|
+
}),
|
|
3934
|
+
) as unknown as Schema.Schema<ListServicesResponse>;
|
|
3935
|
+
|
|
3936
|
+
export type ListServicesError = DefaultErrors;
|
|
3937
|
+
|
|
3938
|
+
export const listServices: API.OperationMethod<
|
|
3939
|
+
ListServicesRequest,
|
|
3940
|
+
ListServicesResponse,
|
|
3941
|
+
ListServicesError,
|
|
3942
|
+
Credentials | HttpClient.HttpClient
|
|
3943
|
+
> = /*@__PURE__*/ /*#__PURE__*/ API.make(() => ({
|
|
3944
|
+
input: ListServicesRequest,
|
|
3945
|
+
output: ListServicesResponse,
|
|
3946
|
+
errors: [],
|
|
3947
|
+
}));
|