@distilled.cloud/cloudflare 0.0.0 → 0.2.0-alpha
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/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 +197 -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 +48 -0
- package/lib/errors.d.ts.map +1 -0
- package/lib/errors.js +38 -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 +67 -5
- package/src/auth.ts +14 -0
- package/src/category.ts +1 -0
- package/src/client/api.ts +269 -0
- package/src/client/index.ts +7 -0
- package/src/credentials.ts +30 -0
- package/src/errors.ts +65 -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 +58933 -0
- package/src/services/zones.ts +4875 -0
- package/src/traits.ts +47 -0
- package/README.md +0 -15
- package/bun.lock +0 -26
- package/index.ts +0 -1
- package/tsconfig.json +0 -29
|
@@ -0,0 +1,1947 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Cloudflare ACCOUNTS API
|
|
3
|
+
*
|
|
4
|
+
* Generated from Cloudflare TypeScript SDK.
|
|
5
|
+
* DO NOT EDIT - regenerate with: bun scripts/generate.ts --service accounts
|
|
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 AccountCreationForbidden extends Schema.TaggedErrorClass<AccountCreationForbidden>()(
|
|
20
|
+
"AccountCreationForbidden",
|
|
21
|
+
{ code: Schema.Number, message: Schema.String },
|
|
22
|
+
) {}
|
|
23
|
+
T.applyErrorMatchers(AccountCreationForbidden, [{ code: 1002 }]);
|
|
24
|
+
|
|
25
|
+
export class AccountNameTooLong extends Schema.TaggedErrorClass<AccountNameTooLong>()(
|
|
26
|
+
"AccountNameTooLong",
|
|
27
|
+
{ code: Schema.Number, message: Schema.String },
|
|
28
|
+
) {}
|
|
29
|
+
T.applyErrorMatchers(AccountNameTooLong, [
|
|
30
|
+
{ code: 1001, message: { includes: "too long" } },
|
|
31
|
+
]);
|
|
32
|
+
|
|
33
|
+
export class BadRequest extends Schema.TaggedErrorClass<BadRequest>()(
|
|
34
|
+
"BadRequest",
|
|
35
|
+
{ code: Schema.Number, message: Schema.String },
|
|
36
|
+
) {}
|
|
37
|
+
T.applyErrorMatchers(BadRequest, [{ code: 400 }]);
|
|
38
|
+
|
|
39
|
+
export class EndpointNotFound extends Schema.TaggedErrorClass<EndpointNotFound>()(
|
|
40
|
+
"EndpointNotFound",
|
|
41
|
+
{ code: Schema.Number, message: Schema.String },
|
|
42
|
+
) {}
|
|
43
|
+
T.applyErrorMatchers(EndpointNotFound, [{ code: 1199 }]);
|
|
44
|
+
|
|
45
|
+
export class InvalidAccountName extends Schema.TaggedErrorClass<InvalidAccountName>()(
|
|
46
|
+
"InvalidAccountName",
|
|
47
|
+
{ code: Schema.Number, message: Schema.String },
|
|
48
|
+
) {}
|
|
49
|
+
T.applyErrorMatchers(InvalidAccountName, [
|
|
50
|
+
{ code: 1001, message: { includes: "invalid character" } },
|
|
51
|
+
]);
|
|
52
|
+
|
|
53
|
+
export class InvalidRoute extends Schema.TaggedErrorClass<InvalidRoute>()(
|
|
54
|
+
"InvalidRoute",
|
|
55
|
+
{ code: Schema.Number, message: Schema.String },
|
|
56
|
+
) {}
|
|
57
|
+
T.applyErrorMatchers(InvalidRoute, [{ code: 7003 }]);
|
|
58
|
+
|
|
59
|
+
export class InvalidTokenName extends Schema.TaggedErrorClass<InvalidTokenName>()(
|
|
60
|
+
"InvalidTokenName",
|
|
61
|
+
{ code: Schema.Number, message: Schema.String },
|
|
62
|
+
) {}
|
|
63
|
+
T.applyErrorMatchers(InvalidTokenName, [
|
|
64
|
+
{ code: 400, message: { includes: "name must have a length" } },
|
|
65
|
+
]);
|
|
66
|
+
|
|
67
|
+
export class JsonDecodeFailure extends Schema.TaggedErrorClass<JsonDecodeFailure>()(
|
|
68
|
+
"JsonDecodeFailure",
|
|
69
|
+
{ code: Schema.Number, message: Schema.String },
|
|
70
|
+
) {}
|
|
71
|
+
T.applyErrorMatchers(JsonDecodeFailure, [{ code: 1198 }]);
|
|
72
|
+
|
|
73
|
+
export class MemberNotFound extends Schema.TaggedErrorClass<MemberNotFound>()(
|
|
74
|
+
"MemberNotFound",
|
|
75
|
+
{ code: Schema.Number, message: Schema.String },
|
|
76
|
+
) {}
|
|
77
|
+
T.applyErrorMatchers(MemberNotFound, [{ code: 1003 }]);
|
|
78
|
+
|
|
79
|
+
export class MethodNotAllowed extends Schema.TaggedErrorClass<MethodNotAllowed>()(
|
|
80
|
+
"MethodNotAllowed",
|
|
81
|
+
{ code: Schema.Number, message: Schema.String },
|
|
82
|
+
) {}
|
|
83
|
+
T.applyErrorMatchers(MethodNotAllowed, [
|
|
84
|
+
{ code: 7001 },
|
|
85
|
+
{ code: 10000 },
|
|
86
|
+
{ code: 10405 },
|
|
87
|
+
]);
|
|
88
|
+
|
|
89
|
+
export class MissingAuthenticationToken extends Schema.TaggedErrorClass<MissingAuthenticationToken>()(
|
|
90
|
+
"MissingAuthenticationToken",
|
|
91
|
+
{ code: Schema.Number, message: Schema.String },
|
|
92
|
+
) {}
|
|
93
|
+
T.applyErrorMatchers(MissingAuthenticationToken, [{ code: 1001 }]);
|
|
94
|
+
|
|
95
|
+
export class MissingName extends Schema.TaggedErrorClass<MissingName>()(
|
|
96
|
+
"MissingName",
|
|
97
|
+
{ code: Schema.Number, message: Schema.String },
|
|
98
|
+
) {}
|
|
99
|
+
T.applyErrorMatchers(MissingName, [{ code: 1001 }]);
|
|
100
|
+
|
|
101
|
+
export class UpdateAccountTypeNotSupported extends Schema.TaggedErrorClass<UpdateAccountTypeNotSupported>()(
|
|
102
|
+
"UpdateAccountTypeNotSupported",
|
|
103
|
+
{ code: Schema.Number, message: Schema.String },
|
|
104
|
+
) {}
|
|
105
|
+
T.applyErrorMatchers(UpdateAccountTypeNotSupported, [
|
|
106
|
+
{ code: 1001, message: { includes: "account type is not supported" } },
|
|
107
|
+
]);
|
|
108
|
+
|
|
109
|
+
export class ValidationError extends Schema.TaggedErrorClass<ValidationError>()(
|
|
110
|
+
"ValidationError",
|
|
111
|
+
{ code: Schema.Number, message: Schema.String },
|
|
112
|
+
) {}
|
|
113
|
+
T.applyErrorMatchers(ValidationError, [{ code: 1001 }]);
|
|
114
|
+
|
|
115
|
+
// =============================================================================
|
|
116
|
+
// Account
|
|
117
|
+
// =============================================================================
|
|
118
|
+
|
|
119
|
+
export interface GetAccountRequest {
|
|
120
|
+
/** Account identifier tag. */
|
|
121
|
+
accountId: string;
|
|
122
|
+
}
|
|
123
|
+
|
|
124
|
+
export const GetAccountRequest = /*@__PURE__*/ /*#__PURE__*/ Schema.Struct({
|
|
125
|
+
accountId: Schema.String.pipe(T.HttpPath("account_id")),
|
|
126
|
+
}).pipe(
|
|
127
|
+
T.Http({ method: "GET", path: "/accounts/{account_id}" }),
|
|
128
|
+
) as unknown as Schema.Schema<GetAccountRequest>;
|
|
129
|
+
|
|
130
|
+
export interface GetAccountResponse {
|
|
131
|
+
/** Identifier */
|
|
132
|
+
id: string;
|
|
133
|
+
/** Account name */
|
|
134
|
+
name: string;
|
|
135
|
+
type: "standard" | "enterprise";
|
|
136
|
+
/** Timestamp for the creation of the account */
|
|
137
|
+
createdOn?: string | null;
|
|
138
|
+
/** Parent container details */
|
|
139
|
+
managedBy?: {
|
|
140
|
+
parentOrgId?: string | null;
|
|
141
|
+
parentOrgName?: string | null;
|
|
142
|
+
} | null;
|
|
143
|
+
/** Account settings */
|
|
144
|
+
settings?: {
|
|
145
|
+
abuseContactEmail?: string | null;
|
|
146
|
+
enforceTwofactor?: boolean | null;
|
|
147
|
+
} | null;
|
|
148
|
+
}
|
|
149
|
+
|
|
150
|
+
export const GetAccountResponse = /*@__PURE__*/ /*#__PURE__*/ Schema.Struct({
|
|
151
|
+
id: Schema.String,
|
|
152
|
+
name: Schema.String,
|
|
153
|
+
type: Schema.Literals(["standard", "enterprise"]),
|
|
154
|
+
createdOn: Schema.optional(Schema.Union([Schema.String, Schema.Null])),
|
|
155
|
+
managedBy: Schema.optional(
|
|
156
|
+
Schema.Union([
|
|
157
|
+
Schema.Struct({
|
|
158
|
+
parentOrgId: Schema.optional(
|
|
159
|
+
Schema.Union([Schema.String, Schema.Null]),
|
|
160
|
+
),
|
|
161
|
+
parentOrgName: Schema.optional(
|
|
162
|
+
Schema.Union([Schema.String, Schema.Null]),
|
|
163
|
+
),
|
|
164
|
+
}).pipe(
|
|
165
|
+
Schema.encodeKeys({
|
|
166
|
+
parentOrgId: "parent_org_id",
|
|
167
|
+
parentOrgName: "parent_org_name",
|
|
168
|
+
}),
|
|
169
|
+
),
|
|
170
|
+
Schema.Null,
|
|
171
|
+
]),
|
|
172
|
+
),
|
|
173
|
+
settings: Schema.optional(
|
|
174
|
+
Schema.Union([
|
|
175
|
+
Schema.Struct({
|
|
176
|
+
abuseContactEmail: Schema.optional(
|
|
177
|
+
Schema.Union([Schema.String, Schema.Null]),
|
|
178
|
+
),
|
|
179
|
+
enforceTwofactor: Schema.optional(
|
|
180
|
+
Schema.Union([Schema.Boolean, Schema.Null]),
|
|
181
|
+
),
|
|
182
|
+
}).pipe(
|
|
183
|
+
Schema.encodeKeys({
|
|
184
|
+
abuseContactEmail: "abuse_contact_email",
|
|
185
|
+
enforceTwofactor: "enforce_twofactor",
|
|
186
|
+
}),
|
|
187
|
+
),
|
|
188
|
+
Schema.Null,
|
|
189
|
+
]),
|
|
190
|
+
),
|
|
191
|
+
}).pipe(
|
|
192
|
+
Schema.encodeKeys({
|
|
193
|
+
id: "id",
|
|
194
|
+
name: "name",
|
|
195
|
+
type: "type",
|
|
196
|
+
createdOn: "created_on",
|
|
197
|
+
managedBy: "managed_by",
|
|
198
|
+
settings: "settings",
|
|
199
|
+
}),
|
|
200
|
+
) as unknown as Schema.Schema<GetAccountResponse>;
|
|
201
|
+
|
|
202
|
+
export type GetAccountError = DefaultErrors | InvalidRoute;
|
|
203
|
+
|
|
204
|
+
export const getAccount: API.OperationMethod<
|
|
205
|
+
GetAccountRequest,
|
|
206
|
+
GetAccountResponse,
|
|
207
|
+
GetAccountError,
|
|
208
|
+
Credentials | HttpClient.HttpClient
|
|
209
|
+
> = /*@__PURE__*/ /*#__PURE__*/ API.make(() => ({
|
|
210
|
+
input: GetAccountRequest,
|
|
211
|
+
output: GetAccountResponse,
|
|
212
|
+
errors: [InvalidRoute],
|
|
213
|
+
}));
|
|
214
|
+
|
|
215
|
+
export interface ListAccountsRequest {}
|
|
216
|
+
|
|
217
|
+
export const ListAccountsRequest = /*@__PURE__*/ /*#__PURE__*/ Schema.Struct(
|
|
218
|
+
{},
|
|
219
|
+
).pipe(
|
|
220
|
+
T.Http({ method: "GET", path: "/accounts" }),
|
|
221
|
+
) as unknown as Schema.Schema<ListAccountsRequest>;
|
|
222
|
+
|
|
223
|
+
export type ListAccountsResponse = {
|
|
224
|
+
id: string;
|
|
225
|
+
name: string;
|
|
226
|
+
type: "standard" | "enterprise";
|
|
227
|
+
createdOn?: string | null;
|
|
228
|
+
managedBy?: {
|
|
229
|
+
parentOrgId?: string | null;
|
|
230
|
+
parentOrgName?: string | null;
|
|
231
|
+
} | null;
|
|
232
|
+
settings?: {
|
|
233
|
+
abuseContactEmail?: string | null;
|
|
234
|
+
enforceTwofactor?: boolean | null;
|
|
235
|
+
} | null;
|
|
236
|
+
}[];
|
|
237
|
+
|
|
238
|
+
export const ListAccountsResponse = /*@__PURE__*/ /*#__PURE__*/ Schema.Array(
|
|
239
|
+
Schema.Struct({
|
|
240
|
+
id: Schema.String,
|
|
241
|
+
name: Schema.String,
|
|
242
|
+
type: Schema.Literals(["standard", "enterprise"]),
|
|
243
|
+
createdOn: Schema.optional(Schema.Union([Schema.String, Schema.Null])),
|
|
244
|
+
managedBy: Schema.optional(
|
|
245
|
+
Schema.Union([
|
|
246
|
+
Schema.Struct({
|
|
247
|
+
parentOrgId: Schema.optional(
|
|
248
|
+
Schema.Union([Schema.String, Schema.Null]),
|
|
249
|
+
),
|
|
250
|
+
parentOrgName: Schema.optional(
|
|
251
|
+
Schema.Union([Schema.String, Schema.Null]),
|
|
252
|
+
),
|
|
253
|
+
}).pipe(
|
|
254
|
+
Schema.encodeKeys({
|
|
255
|
+
parentOrgId: "parent_org_id",
|
|
256
|
+
parentOrgName: "parent_org_name",
|
|
257
|
+
}),
|
|
258
|
+
),
|
|
259
|
+
Schema.Null,
|
|
260
|
+
]),
|
|
261
|
+
),
|
|
262
|
+
settings: Schema.optional(
|
|
263
|
+
Schema.Union([
|
|
264
|
+
Schema.Struct({
|
|
265
|
+
abuseContactEmail: Schema.optional(
|
|
266
|
+
Schema.Union([Schema.String, Schema.Null]),
|
|
267
|
+
),
|
|
268
|
+
enforceTwofactor: Schema.optional(
|
|
269
|
+
Schema.Union([Schema.Boolean, Schema.Null]),
|
|
270
|
+
),
|
|
271
|
+
}).pipe(
|
|
272
|
+
Schema.encodeKeys({
|
|
273
|
+
abuseContactEmail: "abuse_contact_email",
|
|
274
|
+
enforceTwofactor: "enforce_twofactor",
|
|
275
|
+
}),
|
|
276
|
+
),
|
|
277
|
+
Schema.Null,
|
|
278
|
+
]),
|
|
279
|
+
),
|
|
280
|
+
}).pipe(
|
|
281
|
+
Schema.encodeKeys({
|
|
282
|
+
id: "id",
|
|
283
|
+
name: "name",
|
|
284
|
+
type: "type",
|
|
285
|
+
createdOn: "created_on",
|
|
286
|
+
managedBy: "managed_by",
|
|
287
|
+
settings: "settings",
|
|
288
|
+
}),
|
|
289
|
+
),
|
|
290
|
+
) as unknown as Schema.Schema<ListAccountsResponse>;
|
|
291
|
+
|
|
292
|
+
export type ListAccountsError = DefaultErrors;
|
|
293
|
+
|
|
294
|
+
export const listAccounts: API.OperationMethod<
|
|
295
|
+
ListAccountsRequest,
|
|
296
|
+
ListAccountsResponse,
|
|
297
|
+
ListAccountsError,
|
|
298
|
+
Credentials | HttpClient.HttpClient
|
|
299
|
+
> = /*@__PURE__*/ /*#__PURE__*/ API.make(() => ({
|
|
300
|
+
input: ListAccountsRequest,
|
|
301
|
+
output: ListAccountsResponse,
|
|
302
|
+
errors: [],
|
|
303
|
+
}));
|
|
304
|
+
|
|
305
|
+
export interface CreateAccountRequest {
|
|
306
|
+
/** Account name */
|
|
307
|
+
name: string;
|
|
308
|
+
type?: "standard" | "enterprise";
|
|
309
|
+
/** information related to the tenant unit, and optionally, an id of the unit to create the account on. see https://developers.cloudflare.com/tenant/how-to/manage-accounts/ */
|
|
310
|
+
unit?: { id?: string };
|
|
311
|
+
}
|
|
312
|
+
|
|
313
|
+
export const CreateAccountRequest = /*@__PURE__*/ /*#__PURE__*/ Schema.Struct({
|
|
314
|
+
name: Schema.String,
|
|
315
|
+
type: Schema.optional(Schema.Literals(["standard", "enterprise"])),
|
|
316
|
+
unit: Schema.optional(
|
|
317
|
+
Schema.Struct({
|
|
318
|
+
id: Schema.optional(Schema.String),
|
|
319
|
+
}),
|
|
320
|
+
),
|
|
321
|
+
}).pipe(
|
|
322
|
+
T.Http({ method: "POST", path: "/accounts" }),
|
|
323
|
+
) as unknown as Schema.Schema<CreateAccountRequest>;
|
|
324
|
+
|
|
325
|
+
export interface CreateAccountResponse {
|
|
326
|
+
/** Identifier */
|
|
327
|
+
id: string;
|
|
328
|
+
/** Account name */
|
|
329
|
+
name: string;
|
|
330
|
+
type: "standard" | "enterprise";
|
|
331
|
+
/** Timestamp for the creation of the account */
|
|
332
|
+
createdOn?: string | null;
|
|
333
|
+
/** Parent container details */
|
|
334
|
+
managedBy?: {
|
|
335
|
+
parentOrgId?: string | null;
|
|
336
|
+
parentOrgName?: string | null;
|
|
337
|
+
} | null;
|
|
338
|
+
/** Account settings */
|
|
339
|
+
settings?: {
|
|
340
|
+
abuseContactEmail?: string | null;
|
|
341
|
+
enforceTwofactor?: boolean | null;
|
|
342
|
+
} | null;
|
|
343
|
+
}
|
|
344
|
+
|
|
345
|
+
export const CreateAccountResponse = /*@__PURE__*/ /*#__PURE__*/ Schema.Struct({
|
|
346
|
+
id: Schema.String,
|
|
347
|
+
name: Schema.String,
|
|
348
|
+
type: Schema.Literals(["standard", "enterprise"]),
|
|
349
|
+
createdOn: Schema.optional(Schema.Union([Schema.String, Schema.Null])),
|
|
350
|
+
managedBy: Schema.optional(
|
|
351
|
+
Schema.Union([
|
|
352
|
+
Schema.Struct({
|
|
353
|
+
parentOrgId: Schema.optional(
|
|
354
|
+
Schema.Union([Schema.String, Schema.Null]),
|
|
355
|
+
),
|
|
356
|
+
parentOrgName: Schema.optional(
|
|
357
|
+
Schema.Union([Schema.String, Schema.Null]),
|
|
358
|
+
),
|
|
359
|
+
}).pipe(
|
|
360
|
+
Schema.encodeKeys({
|
|
361
|
+
parentOrgId: "parent_org_id",
|
|
362
|
+
parentOrgName: "parent_org_name",
|
|
363
|
+
}),
|
|
364
|
+
),
|
|
365
|
+
Schema.Null,
|
|
366
|
+
]),
|
|
367
|
+
),
|
|
368
|
+
settings: Schema.optional(
|
|
369
|
+
Schema.Union([
|
|
370
|
+
Schema.Struct({
|
|
371
|
+
abuseContactEmail: Schema.optional(
|
|
372
|
+
Schema.Union([Schema.String, Schema.Null]),
|
|
373
|
+
),
|
|
374
|
+
enforceTwofactor: Schema.optional(
|
|
375
|
+
Schema.Union([Schema.Boolean, Schema.Null]),
|
|
376
|
+
),
|
|
377
|
+
}).pipe(
|
|
378
|
+
Schema.encodeKeys({
|
|
379
|
+
abuseContactEmail: "abuse_contact_email",
|
|
380
|
+
enforceTwofactor: "enforce_twofactor",
|
|
381
|
+
}),
|
|
382
|
+
),
|
|
383
|
+
Schema.Null,
|
|
384
|
+
]),
|
|
385
|
+
),
|
|
386
|
+
}).pipe(
|
|
387
|
+
Schema.encodeKeys({
|
|
388
|
+
id: "id",
|
|
389
|
+
name: "name",
|
|
390
|
+
type: "type",
|
|
391
|
+
createdOn: "created_on",
|
|
392
|
+
managedBy: "managed_by",
|
|
393
|
+
settings: "settings",
|
|
394
|
+
}),
|
|
395
|
+
) as unknown as Schema.Schema<CreateAccountResponse>;
|
|
396
|
+
|
|
397
|
+
export type CreateAccountError =
|
|
398
|
+
| DefaultErrors
|
|
399
|
+
| AccountCreationForbidden
|
|
400
|
+
| MissingName;
|
|
401
|
+
|
|
402
|
+
export const createAccount: API.OperationMethod<
|
|
403
|
+
CreateAccountRequest,
|
|
404
|
+
CreateAccountResponse,
|
|
405
|
+
CreateAccountError,
|
|
406
|
+
Credentials | HttpClient.HttpClient
|
|
407
|
+
> = /*@__PURE__*/ /*#__PURE__*/ API.make(() => ({
|
|
408
|
+
input: CreateAccountRequest,
|
|
409
|
+
output: CreateAccountResponse,
|
|
410
|
+
errors: [AccountCreationForbidden, MissingName],
|
|
411
|
+
}));
|
|
412
|
+
|
|
413
|
+
export interface UpdateAccountRequest {
|
|
414
|
+
/** Path param: Account identifier tag. */
|
|
415
|
+
accountId: string;
|
|
416
|
+
/** Body param: Identifier */
|
|
417
|
+
id: string;
|
|
418
|
+
/** Body param: Account name */
|
|
419
|
+
name: string;
|
|
420
|
+
/** Body param: */
|
|
421
|
+
type?: "standard" | "enterprise";
|
|
422
|
+
/** Body param: Parent container details */
|
|
423
|
+
managedBy?: unknown;
|
|
424
|
+
/** Body param: Account settings */
|
|
425
|
+
settings?: { abuseContactEmail?: string; enforceTwofactor?: boolean };
|
|
426
|
+
}
|
|
427
|
+
|
|
428
|
+
export const UpdateAccountRequest = /*@__PURE__*/ /*#__PURE__*/ Schema.Struct({
|
|
429
|
+
accountId: Schema.String.pipe(T.HttpPath("account_id")),
|
|
430
|
+
id: Schema.String,
|
|
431
|
+
name: Schema.String,
|
|
432
|
+
type: Schema.optional(Schema.Literals(["standard", "enterprise"])),
|
|
433
|
+
managedBy: Schema.optional(Schema.Unknown),
|
|
434
|
+
settings: Schema.optional(
|
|
435
|
+
Schema.Struct({
|
|
436
|
+
abuseContactEmail: Schema.optional(Schema.String),
|
|
437
|
+
enforceTwofactor: Schema.optional(Schema.Boolean),
|
|
438
|
+
}).pipe(
|
|
439
|
+
Schema.encodeKeys({
|
|
440
|
+
abuseContactEmail: "abuse_contact_email",
|
|
441
|
+
enforceTwofactor: "enforce_twofactor",
|
|
442
|
+
}),
|
|
443
|
+
),
|
|
444
|
+
),
|
|
445
|
+
}).pipe(
|
|
446
|
+
Schema.encodeKeys({
|
|
447
|
+
id: "id",
|
|
448
|
+
name: "name",
|
|
449
|
+
type: "type",
|
|
450
|
+
managedBy: "managed_by",
|
|
451
|
+
settings: "settings",
|
|
452
|
+
}),
|
|
453
|
+
T.Http({ method: "PUT", path: "/accounts/{account_id}" }),
|
|
454
|
+
) as unknown as Schema.Schema<UpdateAccountRequest>;
|
|
455
|
+
|
|
456
|
+
export interface UpdateAccountResponse {
|
|
457
|
+
/** Identifier */
|
|
458
|
+
id: string;
|
|
459
|
+
/** Account name */
|
|
460
|
+
name: string;
|
|
461
|
+
type: "standard" | "enterprise";
|
|
462
|
+
/** Timestamp for the creation of the account */
|
|
463
|
+
createdOn?: string | null;
|
|
464
|
+
/** Parent container details */
|
|
465
|
+
managedBy?: {
|
|
466
|
+
parentOrgId?: string | null;
|
|
467
|
+
parentOrgName?: string | null;
|
|
468
|
+
} | null;
|
|
469
|
+
/** Account settings */
|
|
470
|
+
settings?: {
|
|
471
|
+
abuseContactEmail?: string | null;
|
|
472
|
+
enforceTwofactor?: boolean | null;
|
|
473
|
+
} | null;
|
|
474
|
+
}
|
|
475
|
+
|
|
476
|
+
export const UpdateAccountResponse = /*@__PURE__*/ /*#__PURE__*/ Schema.Struct({
|
|
477
|
+
id: Schema.String,
|
|
478
|
+
name: Schema.String,
|
|
479
|
+
type: Schema.Literals(["standard", "enterprise"]),
|
|
480
|
+
createdOn: Schema.optional(Schema.Union([Schema.String, Schema.Null])),
|
|
481
|
+
managedBy: Schema.optional(
|
|
482
|
+
Schema.Union([
|
|
483
|
+
Schema.Struct({
|
|
484
|
+
parentOrgId: Schema.optional(
|
|
485
|
+
Schema.Union([Schema.String, Schema.Null]),
|
|
486
|
+
),
|
|
487
|
+
parentOrgName: Schema.optional(
|
|
488
|
+
Schema.Union([Schema.String, Schema.Null]),
|
|
489
|
+
),
|
|
490
|
+
}).pipe(
|
|
491
|
+
Schema.encodeKeys({
|
|
492
|
+
parentOrgId: "parent_org_id",
|
|
493
|
+
parentOrgName: "parent_org_name",
|
|
494
|
+
}),
|
|
495
|
+
),
|
|
496
|
+
Schema.Null,
|
|
497
|
+
]),
|
|
498
|
+
),
|
|
499
|
+
settings: Schema.optional(
|
|
500
|
+
Schema.Union([
|
|
501
|
+
Schema.Struct({
|
|
502
|
+
abuseContactEmail: Schema.optional(
|
|
503
|
+
Schema.Union([Schema.String, Schema.Null]),
|
|
504
|
+
),
|
|
505
|
+
enforceTwofactor: Schema.optional(
|
|
506
|
+
Schema.Union([Schema.Boolean, Schema.Null]),
|
|
507
|
+
),
|
|
508
|
+
}).pipe(
|
|
509
|
+
Schema.encodeKeys({
|
|
510
|
+
abuseContactEmail: "abuse_contact_email",
|
|
511
|
+
enforceTwofactor: "enforce_twofactor",
|
|
512
|
+
}),
|
|
513
|
+
),
|
|
514
|
+
Schema.Null,
|
|
515
|
+
]),
|
|
516
|
+
),
|
|
517
|
+
}).pipe(
|
|
518
|
+
Schema.encodeKeys({
|
|
519
|
+
id: "id",
|
|
520
|
+
name: "name",
|
|
521
|
+
type: "type",
|
|
522
|
+
createdOn: "created_on",
|
|
523
|
+
managedBy: "managed_by",
|
|
524
|
+
settings: "settings",
|
|
525
|
+
}),
|
|
526
|
+
) as unknown as Schema.Schema<UpdateAccountResponse>;
|
|
527
|
+
|
|
528
|
+
export type UpdateAccountError =
|
|
529
|
+
| DefaultErrors
|
|
530
|
+
| InvalidAccountName
|
|
531
|
+
| AccountNameTooLong
|
|
532
|
+
| UpdateAccountTypeNotSupported
|
|
533
|
+
| InvalidRoute
|
|
534
|
+
| MethodNotAllowed;
|
|
535
|
+
|
|
536
|
+
export const updateAccount: API.OperationMethod<
|
|
537
|
+
UpdateAccountRequest,
|
|
538
|
+
UpdateAccountResponse,
|
|
539
|
+
UpdateAccountError,
|
|
540
|
+
Credentials | HttpClient.HttpClient
|
|
541
|
+
> = /*@__PURE__*/ /*#__PURE__*/ API.make(() => ({
|
|
542
|
+
input: UpdateAccountRequest,
|
|
543
|
+
output: UpdateAccountResponse,
|
|
544
|
+
errors: [
|
|
545
|
+
InvalidAccountName,
|
|
546
|
+
AccountNameTooLong,
|
|
547
|
+
UpdateAccountTypeNotSupported,
|
|
548
|
+
InvalidRoute,
|
|
549
|
+
MethodNotAllowed,
|
|
550
|
+
],
|
|
551
|
+
}));
|
|
552
|
+
|
|
553
|
+
export interface DeleteAccountRequest {
|
|
554
|
+
/** The account ID of the account to be deleted */
|
|
555
|
+
accountId: string;
|
|
556
|
+
}
|
|
557
|
+
|
|
558
|
+
export const DeleteAccountRequest = /*@__PURE__*/ /*#__PURE__*/ Schema.Struct({
|
|
559
|
+
accountId: Schema.String.pipe(T.HttpPath("account_id")),
|
|
560
|
+
}).pipe(
|
|
561
|
+
T.Http({ method: "DELETE", path: "/accounts/{account_id}" }),
|
|
562
|
+
) as unknown as Schema.Schema<DeleteAccountRequest>;
|
|
563
|
+
|
|
564
|
+
export interface DeleteAccountResponse {
|
|
565
|
+
/** Identifier */
|
|
566
|
+
id: string;
|
|
567
|
+
}
|
|
568
|
+
|
|
569
|
+
export const DeleteAccountResponse = /*@__PURE__*/ /*#__PURE__*/ Schema.Struct({
|
|
570
|
+
id: Schema.String,
|
|
571
|
+
}) as unknown as Schema.Schema<DeleteAccountResponse>;
|
|
572
|
+
|
|
573
|
+
export type DeleteAccountError =
|
|
574
|
+
| DefaultErrors
|
|
575
|
+
| InvalidRoute
|
|
576
|
+
| MethodNotAllowed;
|
|
577
|
+
|
|
578
|
+
export const deleteAccount: API.OperationMethod<
|
|
579
|
+
DeleteAccountRequest,
|
|
580
|
+
DeleteAccountResponse,
|
|
581
|
+
DeleteAccountError,
|
|
582
|
+
Credentials | HttpClient.HttpClient
|
|
583
|
+
> = /*@__PURE__*/ /*#__PURE__*/ API.make(() => ({
|
|
584
|
+
input: DeleteAccountRequest,
|
|
585
|
+
output: DeleteAccountResponse,
|
|
586
|
+
errors: [InvalidRoute, MethodNotAllowed],
|
|
587
|
+
}));
|
|
588
|
+
|
|
589
|
+
// =============================================================================
|
|
590
|
+
// LogAudit
|
|
591
|
+
// =============================================================================
|
|
592
|
+
|
|
593
|
+
export interface ListLogAuditsRequest {
|
|
594
|
+
/** Path param: The unique id that identifies the account. */
|
|
595
|
+
accountId: string;
|
|
596
|
+
/** Query param: Limits the returned results to logs older than the specified date. This can be a date string 2019-04-30 (interpreted in UTC) or an absolute timestamp that conforms to RFC3339. */
|
|
597
|
+
before: string;
|
|
598
|
+
/** Query param: Limits the returned results to logs newer than the specified date. This can be a date string 2019-04-30 (interpreted in UTC) or an absolute timestamp that conforms to RFC3339. */
|
|
599
|
+
since: string;
|
|
600
|
+
/** Query param: */
|
|
601
|
+
id?: { not?: string[] };
|
|
602
|
+
/** Query param: */
|
|
603
|
+
accountName?: { not?: string[] };
|
|
604
|
+
/** Query param: */
|
|
605
|
+
actionResult?: { not?: ("success" | "failure")[] };
|
|
606
|
+
/** Query param: */
|
|
607
|
+
actionType?: { not?: ("create" | "delete" | "view" | "update")[] };
|
|
608
|
+
/** Query param: */
|
|
609
|
+
actorContext?: {
|
|
610
|
+
not?: ("api_key" | "api_token" | "dash" | "oauth" | "origin_ca_key")[];
|
|
611
|
+
};
|
|
612
|
+
/** Query param: */
|
|
613
|
+
actorEmail?: { not?: string[] };
|
|
614
|
+
/** Query param: */
|
|
615
|
+
actorId?: { not?: string[] };
|
|
616
|
+
/** Query param: */
|
|
617
|
+
actorIpAddress?: { not?: string[] };
|
|
618
|
+
/** Query param: */
|
|
619
|
+
actorTokenId?: { not?: string[] };
|
|
620
|
+
/** Query param: */
|
|
621
|
+
actorTokenName?: { not?: string[] };
|
|
622
|
+
/** Query param: */
|
|
623
|
+
actorType?: { not?: ("account" | "cloudflare_admin" | "system" | "user")[] };
|
|
624
|
+
/** Query param: */
|
|
625
|
+
auditLogId?: { not?: string[] };
|
|
626
|
+
/** Query param: Sets sorting order. */
|
|
627
|
+
direction?: "desc" | "asc";
|
|
628
|
+
/** Query param: The number limits the objects to return. The cursor attribute may be used to iterate over the next batch of objects if there are more than the limit. */
|
|
629
|
+
limit?: number;
|
|
630
|
+
/** Query param: */
|
|
631
|
+
rawCfRayId?: { not?: string[] };
|
|
632
|
+
/** Query param: */
|
|
633
|
+
rawMethod?: { not?: string[] };
|
|
634
|
+
/** Query param: */
|
|
635
|
+
rawStatusCode?: { not?: number[] };
|
|
636
|
+
/** Query param: */
|
|
637
|
+
rawUri?: { not?: string[] };
|
|
638
|
+
/** Query param: */
|
|
639
|
+
resourceId?: { not?: string[] };
|
|
640
|
+
/** Query param: */
|
|
641
|
+
resourceProduct?: { not?: string[] };
|
|
642
|
+
/** Query param: */
|
|
643
|
+
resourceScope?: { not?: ("accounts" | "user" | "zones")[] };
|
|
644
|
+
/** Query param: */
|
|
645
|
+
resourceType?: { not?: string[] };
|
|
646
|
+
/** Query param: */
|
|
647
|
+
zoneId?: { not?: string[] };
|
|
648
|
+
/** Query param: */
|
|
649
|
+
zoneName?: { not?: string[] };
|
|
650
|
+
}
|
|
651
|
+
|
|
652
|
+
export const ListLogAuditsRequest = /*@__PURE__*/ /*#__PURE__*/ Schema.Struct({
|
|
653
|
+
accountId: Schema.String.pipe(T.HttpPath("account_id")),
|
|
654
|
+
before: Schema.String.pipe(T.HttpQuery("before")),
|
|
655
|
+
since: Schema.String.pipe(T.HttpQuery("since")),
|
|
656
|
+
id: Schema.optional(
|
|
657
|
+
Schema.Struct({
|
|
658
|
+
not: Schema.optional(Schema.Array(Schema.String)),
|
|
659
|
+
}),
|
|
660
|
+
).pipe(T.HttpQuery("id")),
|
|
661
|
+
accountName: Schema.optional(
|
|
662
|
+
Schema.Struct({
|
|
663
|
+
not: Schema.optional(Schema.Array(Schema.String)),
|
|
664
|
+
}),
|
|
665
|
+
).pipe(T.HttpQuery("account_name")),
|
|
666
|
+
actionResult: Schema.optional(
|
|
667
|
+
Schema.Struct({
|
|
668
|
+
not: Schema.optional(
|
|
669
|
+
Schema.Array(Schema.Literals(["success", "failure"])),
|
|
670
|
+
),
|
|
671
|
+
}),
|
|
672
|
+
).pipe(T.HttpQuery("action_result")),
|
|
673
|
+
actionType: Schema.optional(
|
|
674
|
+
Schema.Struct({
|
|
675
|
+
not: Schema.optional(
|
|
676
|
+
Schema.Array(Schema.Literals(["create", "delete", "view", "update"])),
|
|
677
|
+
),
|
|
678
|
+
}),
|
|
679
|
+
).pipe(T.HttpQuery("action_type")),
|
|
680
|
+
actorContext: Schema.optional(
|
|
681
|
+
Schema.Struct({
|
|
682
|
+
not: Schema.optional(
|
|
683
|
+
Schema.Array(
|
|
684
|
+
Schema.Literals([
|
|
685
|
+
"api_key",
|
|
686
|
+
"api_token",
|
|
687
|
+
"dash",
|
|
688
|
+
"oauth",
|
|
689
|
+
"origin_ca_key",
|
|
690
|
+
]),
|
|
691
|
+
),
|
|
692
|
+
),
|
|
693
|
+
}),
|
|
694
|
+
).pipe(T.HttpQuery("actor_context")),
|
|
695
|
+
actorEmail: Schema.optional(
|
|
696
|
+
Schema.Struct({
|
|
697
|
+
not: Schema.optional(Schema.Array(Schema.String)),
|
|
698
|
+
}),
|
|
699
|
+
).pipe(T.HttpQuery("actor_email")),
|
|
700
|
+
actorId: Schema.optional(
|
|
701
|
+
Schema.Struct({
|
|
702
|
+
not: Schema.optional(Schema.Array(Schema.String)),
|
|
703
|
+
}),
|
|
704
|
+
).pipe(T.HttpQuery("actor_id")),
|
|
705
|
+
actorIpAddress: Schema.optional(
|
|
706
|
+
Schema.Struct({
|
|
707
|
+
not: Schema.optional(Schema.Array(Schema.String)),
|
|
708
|
+
}),
|
|
709
|
+
).pipe(T.HttpQuery("actor_ip_address")),
|
|
710
|
+
actorTokenId: Schema.optional(
|
|
711
|
+
Schema.Struct({
|
|
712
|
+
not: Schema.optional(Schema.Array(Schema.String)),
|
|
713
|
+
}),
|
|
714
|
+
).pipe(T.HttpQuery("actor_token_id")),
|
|
715
|
+
actorTokenName: Schema.optional(
|
|
716
|
+
Schema.Struct({
|
|
717
|
+
not: Schema.optional(Schema.Array(Schema.String)),
|
|
718
|
+
}),
|
|
719
|
+
).pipe(T.HttpQuery("actor_token_name")),
|
|
720
|
+
actorType: Schema.optional(
|
|
721
|
+
Schema.Struct({
|
|
722
|
+
not: Schema.optional(
|
|
723
|
+
Schema.Array(
|
|
724
|
+
Schema.Literals(["account", "cloudflare_admin", "system", "user"]),
|
|
725
|
+
),
|
|
726
|
+
),
|
|
727
|
+
}),
|
|
728
|
+
).pipe(T.HttpQuery("actor_type")),
|
|
729
|
+
auditLogId: Schema.optional(
|
|
730
|
+
Schema.Struct({
|
|
731
|
+
not: Schema.optional(Schema.Array(Schema.String)),
|
|
732
|
+
}),
|
|
733
|
+
).pipe(T.HttpQuery("audit_log_id")),
|
|
734
|
+
direction: Schema.optional(Schema.Literals(["desc", "asc"])).pipe(
|
|
735
|
+
T.HttpQuery("direction"),
|
|
736
|
+
),
|
|
737
|
+
limit: Schema.optional(Schema.Number).pipe(T.HttpQuery("limit")),
|
|
738
|
+
rawCfRayId: Schema.optional(
|
|
739
|
+
Schema.Struct({
|
|
740
|
+
not: Schema.optional(Schema.Array(Schema.String)),
|
|
741
|
+
}),
|
|
742
|
+
).pipe(T.HttpQuery("raw_cf_ray_id")),
|
|
743
|
+
rawMethod: Schema.optional(
|
|
744
|
+
Schema.Struct({
|
|
745
|
+
not: Schema.optional(Schema.Array(Schema.String)),
|
|
746
|
+
}),
|
|
747
|
+
).pipe(T.HttpQuery("raw_method")),
|
|
748
|
+
rawStatusCode: Schema.optional(
|
|
749
|
+
Schema.Struct({
|
|
750
|
+
not: Schema.optional(Schema.Array(Schema.Number)),
|
|
751
|
+
}),
|
|
752
|
+
).pipe(T.HttpQuery("raw_status_code")),
|
|
753
|
+
rawUri: Schema.optional(
|
|
754
|
+
Schema.Struct({
|
|
755
|
+
not: Schema.optional(Schema.Array(Schema.String)),
|
|
756
|
+
}),
|
|
757
|
+
).pipe(T.HttpQuery("raw_uri")),
|
|
758
|
+
resourceId: Schema.optional(
|
|
759
|
+
Schema.Struct({
|
|
760
|
+
not: Schema.optional(Schema.Array(Schema.String)),
|
|
761
|
+
}),
|
|
762
|
+
).pipe(T.HttpQuery("resource_id")),
|
|
763
|
+
resourceProduct: Schema.optional(
|
|
764
|
+
Schema.Struct({
|
|
765
|
+
not: Schema.optional(Schema.Array(Schema.String)),
|
|
766
|
+
}),
|
|
767
|
+
).pipe(T.HttpQuery("resource_product")),
|
|
768
|
+
resourceScope: Schema.optional(
|
|
769
|
+
Schema.Struct({
|
|
770
|
+
not: Schema.optional(
|
|
771
|
+
Schema.Array(Schema.Literals(["accounts", "user", "zones"])),
|
|
772
|
+
),
|
|
773
|
+
}),
|
|
774
|
+
).pipe(T.HttpQuery("resource_scope")),
|
|
775
|
+
resourceType: Schema.optional(
|
|
776
|
+
Schema.Struct({
|
|
777
|
+
not: Schema.optional(Schema.Array(Schema.String)),
|
|
778
|
+
}),
|
|
779
|
+
).pipe(T.HttpQuery("resource_type")),
|
|
780
|
+
zoneId: Schema.optional(
|
|
781
|
+
Schema.Struct({
|
|
782
|
+
not: Schema.optional(Schema.Array(Schema.String)),
|
|
783
|
+
}),
|
|
784
|
+
).pipe(T.HttpQuery("zone_id")),
|
|
785
|
+
zoneName: Schema.optional(
|
|
786
|
+
Schema.Struct({
|
|
787
|
+
not: Schema.optional(Schema.Array(Schema.String)),
|
|
788
|
+
}),
|
|
789
|
+
).pipe(T.HttpQuery("zone_name")),
|
|
790
|
+
}).pipe(
|
|
791
|
+
T.Http({ method: "GET", path: "/accounts/{account_id}/logs/audit" }),
|
|
792
|
+
) as unknown as Schema.Schema<ListLogAuditsRequest>;
|
|
793
|
+
|
|
794
|
+
export type ListLogAuditsResponse = {
|
|
795
|
+
id?: string | null;
|
|
796
|
+
account?: { id?: string | null; name?: string | null } | null;
|
|
797
|
+
action?: {
|
|
798
|
+
description?: string | null;
|
|
799
|
+
result?: string | null;
|
|
800
|
+
time?: string | null;
|
|
801
|
+
type?: string | null;
|
|
802
|
+
} | null;
|
|
803
|
+
actor?: {
|
|
804
|
+
id?: string | null;
|
|
805
|
+
context?:
|
|
806
|
+
| "api_key"
|
|
807
|
+
| "api_token"
|
|
808
|
+
| "dash"
|
|
809
|
+
| "oauth"
|
|
810
|
+
| "origin_ca_key"
|
|
811
|
+
| null;
|
|
812
|
+
email?: string | null;
|
|
813
|
+
ipAddress?: string | null;
|
|
814
|
+
tokenId?: string | null;
|
|
815
|
+
tokenName?: string | null;
|
|
816
|
+
type?: "account" | "cloudflare_admin" | "system" | "user" | null;
|
|
817
|
+
} | null;
|
|
818
|
+
raw?: {
|
|
819
|
+
cfRayId?: string | null;
|
|
820
|
+
method?: string | null;
|
|
821
|
+
statusCode?: number | null;
|
|
822
|
+
uri?: string | null;
|
|
823
|
+
userAgent?: string | null;
|
|
824
|
+
} | null;
|
|
825
|
+
resource?: {
|
|
826
|
+
id?: string | null;
|
|
827
|
+
product?: string | null;
|
|
828
|
+
request?: unknown | null;
|
|
829
|
+
response?: unknown | null;
|
|
830
|
+
scope?: unknown | null;
|
|
831
|
+
type?: string | null;
|
|
832
|
+
} | null;
|
|
833
|
+
zone?: { id?: string | null; name?: string | null } | null;
|
|
834
|
+
}[];
|
|
835
|
+
|
|
836
|
+
export const ListLogAuditsResponse = /*@__PURE__*/ /*#__PURE__*/ Schema.Array(
|
|
837
|
+
Schema.Struct({
|
|
838
|
+
id: Schema.optional(Schema.Union([Schema.String, Schema.Null])),
|
|
839
|
+
account: Schema.optional(
|
|
840
|
+
Schema.Union([
|
|
841
|
+
Schema.Struct({
|
|
842
|
+
id: Schema.optional(Schema.Union([Schema.String, Schema.Null])),
|
|
843
|
+
name: Schema.optional(Schema.Union([Schema.String, Schema.Null])),
|
|
844
|
+
}),
|
|
845
|
+
Schema.Null,
|
|
846
|
+
]),
|
|
847
|
+
),
|
|
848
|
+
action: Schema.optional(
|
|
849
|
+
Schema.Union([
|
|
850
|
+
Schema.Struct({
|
|
851
|
+
description: Schema.optional(
|
|
852
|
+
Schema.Union([Schema.String, Schema.Null]),
|
|
853
|
+
),
|
|
854
|
+
result: Schema.optional(Schema.Union([Schema.String, Schema.Null])),
|
|
855
|
+
time: Schema.optional(Schema.Union([Schema.String, Schema.Null])),
|
|
856
|
+
type: Schema.optional(Schema.Union([Schema.String, Schema.Null])),
|
|
857
|
+
}),
|
|
858
|
+
Schema.Null,
|
|
859
|
+
]),
|
|
860
|
+
),
|
|
861
|
+
actor: Schema.optional(
|
|
862
|
+
Schema.Union([
|
|
863
|
+
Schema.Struct({
|
|
864
|
+
id: Schema.optional(Schema.Union([Schema.String, Schema.Null])),
|
|
865
|
+
context: Schema.optional(
|
|
866
|
+
Schema.Union([
|
|
867
|
+
Schema.Literals([
|
|
868
|
+
"api_key",
|
|
869
|
+
"api_token",
|
|
870
|
+
"dash",
|
|
871
|
+
"oauth",
|
|
872
|
+
"origin_ca_key",
|
|
873
|
+
]),
|
|
874
|
+
Schema.Null,
|
|
875
|
+
]),
|
|
876
|
+
),
|
|
877
|
+
email: Schema.optional(Schema.Union([Schema.String, Schema.Null])),
|
|
878
|
+
ipAddress: Schema.optional(
|
|
879
|
+
Schema.Union([Schema.String, Schema.Null]),
|
|
880
|
+
),
|
|
881
|
+
tokenId: Schema.optional(Schema.Union([Schema.String, Schema.Null])),
|
|
882
|
+
tokenName: Schema.optional(
|
|
883
|
+
Schema.Union([Schema.String, Schema.Null]),
|
|
884
|
+
),
|
|
885
|
+
type: Schema.optional(
|
|
886
|
+
Schema.Union([
|
|
887
|
+
Schema.Literals([
|
|
888
|
+
"account",
|
|
889
|
+
"cloudflare_admin",
|
|
890
|
+
"system",
|
|
891
|
+
"user",
|
|
892
|
+
]),
|
|
893
|
+
Schema.Null,
|
|
894
|
+
]),
|
|
895
|
+
),
|
|
896
|
+
}).pipe(
|
|
897
|
+
Schema.encodeKeys({
|
|
898
|
+
id: "id",
|
|
899
|
+
context: "context",
|
|
900
|
+
email: "email",
|
|
901
|
+
ipAddress: "ip_address",
|
|
902
|
+
tokenId: "token_id",
|
|
903
|
+
tokenName: "token_name",
|
|
904
|
+
type: "type",
|
|
905
|
+
}),
|
|
906
|
+
),
|
|
907
|
+
Schema.Null,
|
|
908
|
+
]),
|
|
909
|
+
),
|
|
910
|
+
raw: Schema.optional(
|
|
911
|
+
Schema.Union([
|
|
912
|
+
Schema.Struct({
|
|
913
|
+
cfRayId: Schema.optional(Schema.Union([Schema.String, Schema.Null])),
|
|
914
|
+
method: Schema.optional(Schema.Union([Schema.String, Schema.Null])),
|
|
915
|
+
statusCode: Schema.optional(
|
|
916
|
+
Schema.Union([Schema.Number, Schema.Null]),
|
|
917
|
+
),
|
|
918
|
+
uri: Schema.optional(Schema.Union([Schema.String, Schema.Null])),
|
|
919
|
+
userAgent: Schema.optional(
|
|
920
|
+
Schema.Union([Schema.String, Schema.Null]),
|
|
921
|
+
),
|
|
922
|
+
}).pipe(
|
|
923
|
+
Schema.encodeKeys({
|
|
924
|
+
cfRayId: "cf_ray_id",
|
|
925
|
+
method: "method",
|
|
926
|
+
statusCode: "status_code",
|
|
927
|
+
uri: "uri",
|
|
928
|
+
userAgent: "user_agent",
|
|
929
|
+
}),
|
|
930
|
+
),
|
|
931
|
+
Schema.Null,
|
|
932
|
+
]),
|
|
933
|
+
),
|
|
934
|
+
resource: Schema.optional(
|
|
935
|
+
Schema.Union([
|
|
936
|
+
Schema.Struct({
|
|
937
|
+
id: Schema.optional(Schema.Union([Schema.String, Schema.Null])),
|
|
938
|
+
product: Schema.optional(Schema.Union([Schema.String, Schema.Null])),
|
|
939
|
+
request: Schema.optional(Schema.Union([Schema.Unknown, Schema.Null])),
|
|
940
|
+
response: Schema.optional(
|
|
941
|
+
Schema.Union([Schema.Unknown, Schema.Null]),
|
|
942
|
+
),
|
|
943
|
+
scope: Schema.optional(Schema.Union([Schema.Unknown, Schema.Null])),
|
|
944
|
+
type: Schema.optional(Schema.Union([Schema.String, Schema.Null])),
|
|
945
|
+
}),
|
|
946
|
+
Schema.Null,
|
|
947
|
+
]),
|
|
948
|
+
),
|
|
949
|
+
zone: Schema.optional(
|
|
950
|
+
Schema.Union([
|
|
951
|
+
Schema.Struct({
|
|
952
|
+
id: Schema.optional(Schema.Union([Schema.String, Schema.Null])),
|
|
953
|
+
name: Schema.optional(Schema.Union([Schema.String, Schema.Null])),
|
|
954
|
+
}),
|
|
955
|
+
Schema.Null,
|
|
956
|
+
]),
|
|
957
|
+
),
|
|
958
|
+
}),
|
|
959
|
+
) as unknown as Schema.Schema<ListLogAuditsResponse>;
|
|
960
|
+
|
|
961
|
+
export type ListLogAuditsError = DefaultErrors;
|
|
962
|
+
|
|
963
|
+
export const listLogAudits: API.OperationMethod<
|
|
964
|
+
ListLogAuditsRequest,
|
|
965
|
+
ListLogAuditsResponse,
|
|
966
|
+
ListLogAuditsError,
|
|
967
|
+
Credentials | HttpClient.HttpClient
|
|
968
|
+
> = /*@__PURE__*/ /*#__PURE__*/ API.make(() => ({
|
|
969
|
+
input: ListLogAuditsRequest,
|
|
970
|
+
output: ListLogAuditsResponse,
|
|
971
|
+
errors: [],
|
|
972
|
+
}));
|
|
973
|
+
|
|
974
|
+
// =============================================================================
|
|
975
|
+
// Member
|
|
976
|
+
// =============================================================================
|
|
977
|
+
|
|
978
|
+
export interface GetMemberRequest {
|
|
979
|
+
memberId: string;
|
|
980
|
+
/** Account identifier tag. */
|
|
981
|
+
accountId: string;
|
|
982
|
+
}
|
|
983
|
+
|
|
984
|
+
export const GetMemberRequest = /*@__PURE__*/ /*#__PURE__*/ Schema.Struct({
|
|
985
|
+
memberId: Schema.String.pipe(T.HttpPath("memberId")),
|
|
986
|
+
accountId: Schema.String.pipe(T.HttpPath("account_id")),
|
|
987
|
+
}).pipe(
|
|
988
|
+
T.Http({ method: "GET", path: "/accounts/{account_id}/members/{memberId}" }),
|
|
989
|
+
) as unknown as Schema.Schema<GetMemberRequest>;
|
|
990
|
+
|
|
991
|
+
export type GetMemberResponse = unknown;
|
|
992
|
+
|
|
993
|
+
export const GetMemberResponse =
|
|
994
|
+
/*@__PURE__*/ /*#__PURE__*/ Schema.Unknown as unknown as Schema.Schema<GetMemberResponse>;
|
|
995
|
+
|
|
996
|
+
export type GetMemberError = DefaultErrors | MemberNotFound | InvalidRoute;
|
|
997
|
+
|
|
998
|
+
export const getMember: API.OperationMethod<
|
|
999
|
+
GetMemberRequest,
|
|
1000
|
+
GetMemberResponse,
|
|
1001
|
+
GetMemberError,
|
|
1002
|
+
Credentials | HttpClient.HttpClient
|
|
1003
|
+
> = /*@__PURE__*/ /*#__PURE__*/ API.make(() => ({
|
|
1004
|
+
input: GetMemberRequest,
|
|
1005
|
+
output: GetMemberResponse,
|
|
1006
|
+
errors: [MemberNotFound, InvalidRoute],
|
|
1007
|
+
}));
|
|
1008
|
+
|
|
1009
|
+
export interface ListMembersRequest {
|
|
1010
|
+
/** Path param: Account identifier tag. */
|
|
1011
|
+
accountId: string;
|
|
1012
|
+
/** Query param: Direction to order results. */
|
|
1013
|
+
direction?: "asc" | "desc";
|
|
1014
|
+
/** Query param: Field to order results by. */
|
|
1015
|
+
order?: "user.first_name" | "user.last_name" | "user.email" | "status";
|
|
1016
|
+
/** Query param: A member's status in the account. */
|
|
1017
|
+
status?: "accepted" | "pending" | "rejected";
|
|
1018
|
+
}
|
|
1019
|
+
|
|
1020
|
+
export const ListMembersRequest = /*@__PURE__*/ /*#__PURE__*/ Schema.Struct({
|
|
1021
|
+
accountId: Schema.String.pipe(T.HttpPath("account_id")),
|
|
1022
|
+
direction: Schema.optional(Schema.Literals(["asc", "desc"])).pipe(
|
|
1023
|
+
T.HttpQuery("direction"),
|
|
1024
|
+
),
|
|
1025
|
+
order: Schema.optional(
|
|
1026
|
+
Schema.Literals([
|
|
1027
|
+
"user.first_name",
|
|
1028
|
+
"user.last_name",
|
|
1029
|
+
"user.email",
|
|
1030
|
+
"status",
|
|
1031
|
+
]),
|
|
1032
|
+
).pipe(T.HttpQuery("order")),
|
|
1033
|
+
status: Schema.optional(
|
|
1034
|
+
Schema.Literals(["accepted", "pending", "rejected"]),
|
|
1035
|
+
).pipe(T.HttpQuery("status")),
|
|
1036
|
+
}).pipe(
|
|
1037
|
+
T.Http({ method: "GET", path: "/accounts/{account_id}/members" }),
|
|
1038
|
+
) as unknown as Schema.Schema<ListMembersRequest>;
|
|
1039
|
+
|
|
1040
|
+
export type ListMembersResponse = unknown;
|
|
1041
|
+
|
|
1042
|
+
export const ListMembersResponse =
|
|
1043
|
+
/*@__PURE__*/ /*#__PURE__*/ Schema.Unknown as unknown as Schema.Schema<ListMembersResponse>;
|
|
1044
|
+
|
|
1045
|
+
export type ListMembersError = DefaultErrors;
|
|
1046
|
+
|
|
1047
|
+
export const listMembers: API.OperationMethod<
|
|
1048
|
+
ListMembersRequest,
|
|
1049
|
+
ListMembersResponse,
|
|
1050
|
+
ListMembersError,
|
|
1051
|
+
Credentials | HttpClient.HttpClient
|
|
1052
|
+
> = /*@__PURE__*/ /*#__PURE__*/ API.make(() => ({
|
|
1053
|
+
input: ListMembersRequest,
|
|
1054
|
+
output: ListMembersResponse,
|
|
1055
|
+
errors: [],
|
|
1056
|
+
}));
|
|
1057
|
+
|
|
1058
|
+
export interface CreateMemberRequest {
|
|
1059
|
+
/** Path param: Account identifier tag. */
|
|
1060
|
+
accountId: string;
|
|
1061
|
+
/** Body param: The contact email address of the user. */
|
|
1062
|
+
email: string;
|
|
1063
|
+
/** Body param: Array of roles associated with this member. */
|
|
1064
|
+
roles: string[];
|
|
1065
|
+
/** Body param: */
|
|
1066
|
+
status?: "accepted" | "pending";
|
|
1067
|
+
}
|
|
1068
|
+
|
|
1069
|
+
export const CreateMemberRequest = /*@__PURE__*/ /*#__PURE__*/ Schema.Struct({
|
|
1070
|
+
accountId: Schema.String.pipe(T.HttpPath("account_id")),
|
|
1071
|
+
email: Schema.String,
|
|
1072
|
+
roles: Schema.Array(Schema.String),
|
|
1073
|
+
status: Schema.optional(Schema.Literals(["accepted", "pending"])),
|
|
1074
|
+
}).pipe(
|
|
1075
|
+
T.Http({ method: "POST", path: "/accounts/{account_id}/members" }),
|
|
1076
|
+
) as unknown as Schema.Schema<CreateMemberRequest>;
|
|
1077
|
+
|
|
1078
|
+
export type CreateMemberResponse = unknown;
|
|
1079
|
+
|
|
1080
|
+
export const CreateMemberResponse =
|
|
1081
|
+
/*@__PURE__*/ /*#__PURE__*/ Schema.Unknown as unknown as Schema.Schema<CreateMemberResponse>;
|
|
1082
|
+
|
|
1083
|
+
export type CreateMemberError = DefaultErrors | InvalidRoute | ValidationError;
|
|
1084
|
+
|
|
1085
|
+
export const createMember: API.OperationMethod<
|
|
1086
|
+
CreateMemberRequest,
|
|
1087
|
+
CreateMemberResponse,
|
|
1088
|
+
CreateMemberError,
|
|
1089
|
+
Credentials | HttpClient.HttpClient
|
|
1090
|
+
> = /*@__PURE__*/ /*#__PURE__*/ API.make(() => ({
|
|
1091
|
+
input: CreateMemberRequest,
|
|
1092
|
+
output: CreateMemberResponse,
|
|
1093
|
+
errors: [InvalidRoute, ValidationError],
|
|
1094
|
+
}));
|
|
1095
|
+
|
|
1096
|
+
export interface UpdateMemberRequest {
|
|
1097
|
+
memberId: string;
|
|
1098
|
+
/** Path param: Account identifier tag. */
|
|
1099
|
+
accountId: string;
|
|
1100
|
+
/** Body param: Roles assigned to this member. */
|
|
1101
|
+
roles?: unknown[];
|
|
1102
|
+
}
|
|
1103
|
+
|
|
1104
|
+
export const UpdateMemberRequest = /*@__PURE__*/ /*#__PURE__*/ Schema.Struct({
|
|
1105
|
+
memberId: Schema.String.pipe(T.HttpPath("memberId")),
|
|
1106
|
+
accountId: Schema.String.pipe(T.HttpPath("account_id")),
|
|
1107
|
+
roles: Schema.optional(Schema.Array(Schema.Unknown)),
|
|
1108
|
+
}).pipe(
|
|
1109
|
+
T.Http({ method: "PUT", path: "/accounts/{account_id}/members/{memberId}" }),
|
|
1110
|
+
) as unknown as Schema.Schema<UpdateMemberRequest>;
|
|
1111
|
+
|
|
1112
|
+
export type UpdateMemberResponse = unknown;
|
|
1113
|
+
|
|
1114
|
+
export const UpdateMemberResponse =
|
|
1115
|
+
/*@__PURE__*/ /*#__PURE__*/ Schema.Unknown as unknown as Schema.Schema<UpdateMemberResponse>;
|
|
1116
|
+
|
|
1117
|
+
export type UpdateMemberError =
|
|
1118
|
+
| DefaultErrors
|
|
1119
|
+
| MemberNotFound
|
|
1120
|
+
| InvalidRoute
|
|
1121
|
+
| BadRequest
|
|
1122
|
+
| MethodNotAllowed;
|
|
1123
|
+
|
|
1124
|
+
export const updateMember: API.OperationMethod<
|
|
1125
|
+
UpdateMemberRequest,
|
|
1126
|
+
UpdateMemberResponse,
|
|
1127
|
+
UpdateMemberError,
|
|
1128
|
+
Credentials | HttpClient.HttpClient
|
|
1129
|
+
> = /*@__PURE__*/ /*#__PURE__*/ API.make(() => ({
|
|
1130
|
+
input: UpdateMemberRequest,
|
|
1131
|
+
output: UpdateMemberResponse,
|
|
1132
|
+
errors: [MemberNotFound, InvalidRoute, BadRequest, MethodNotAllowed],
|
|
1133
|
+
}));
|
|
1134
|
+
|
|
1135
|
+
export interface DeleteMemberRequest {
|
|
1136
|
+
memberId: string;
|
|
1137
|
+
/** Account identifier tag. */
|
|
1138
|
+
accountId: string;
|
|
1139
|
+
}
|
|
1140
|
+
|
|
1141
|
+
export const DeleteMemberRequest = /*@__PURE__*/ /*#__PURE__*/ Schema.Struct({
|
|
1142
|
+
memberId: Schema.String.pipe(T.HttpPath("memberId")),
|
|
1143
|
+
accountId: Schema.String.pipe(T.HttpPath("account_id")),
|
|
1144
|
+
}).pipe(
|
|
1145
|
+
T.Http({
|
|
1146
|
+
method: "DELETE",
|
|
1147
|
+
path: "/accounts/{account_id}/members/{memberId}",
|
|
1148
|
+
}),
|
|
1149
|
+
) as unknown as Schema.Schema<DeleteMemberRequest>;
|
|
1150
|
+
|
|
1151
|
+
export interface DeleteMemberResponse {
|
|
1152
|
+
/** Identifier */
|
|
1153
|
+
id: string;
|
|
1154
|
+
}
|
|
1155
|
+
|
|
1156
|
+
export const DeleteMemberResponse = /*@__PURE__*/ /*#__PURE__*/ Schema.Struct({
|
|
1157
|
+
id: Schema.String,
|
|
1158
|
+
}) as unknown as Schema.Schema<DeleteMemberResponse>;
|
|
1159
|
+
|
|
1160
|
+
export type DeleteMemberError = DefaultErrors | MemberNotFound | InvalidRoute;
|
|
1161
|
+
|
|
1162
|
+
export const deleteMember: API.OperationMethod<
|
|
1163
|
+
DeleteMemberRequest,
|
|
1164
|
+
DeleteMemberResponse,
|
|
1165
|
+
DeleteMemberError,
|
|
1166
|
+
Credentials | HttpClient.HttpClient
|
|
1167
|
+
> = /*@__PURE__*/ /*#__PURE__*/ API.make(() => ({
|
|
1168
|
+
input: DeleteMemberRequest,
|
|
1169
|
+
output: DeleteMemberResponse,
|
|
1170
|
+
errors: [MemberNotFound, InvalidRoute],
|
|
1171
|
+
}));
|
|
1172
|
+
|
|
1173
|
+
// =============================================================================
|
|
1174
|
+
// Role
|
|
1175
|
+
// =============================================================================
|
|
1176
|
+
|
|
1177
|
+
export interface GetRoleRequest {
|
|
1178
|
+
roleId: string;
|
|
1179
|
+
/** Account identifier tag. */
|
|
1180
|
+
accountId: string;
|
|
1181
|
+
}
|
|
1182
|
+
|
|
1183
|
+
export const GetRoleRequest = /*@__PURE__*/ /*#__PURE__*/ Schema.Struct({
|
|
1184
|
+
roleId: Schema.String.pipe(T.HttpPath("roleId")),
|
|
1185
|
+
accountId: Schema.String.pipe(T.HttpPath("account_id")),
|
|
1186
|
+
}).pipe(
|
|
1187
|
+
T.Http({ method: "GET", path: "/accounts/{account_id}/roles/{roleId}" }),
|
|
1188
|
+
) as unknown as Schema.Schema<GetRoleRequest>;
|
|
1189
|
+
|
|
1190
|
+
export type GetRoleResponse = unknown;
|
|
1191
|
+
|
|
1192
|
+
export const GetRoleResponse =
|
|
1193
|
+
/*@__PURE__*/ /*#__PURE__*/ Schema.Unknown as unknown as Schema.Schema<GetRoleResponse>;
|
|
1194
|
+
|
|
1195
|
+
export type GetRoleError = DefaultErrors | InvalidRoute;
|
|
1196
|
+
|
|
1197
|
+
export const getRole: API.OperationMethod<
|
|
1198
|
+
GetRoleRequest,
|
|
1199
|
+
GetRoleResponse,
|
|
1200
|
+
GetRoleError,
|
|
1201
|
+
Credentials | HttpClient.HttpClient
|
|
1202
|
+
> = /*@__PURE__*/ /*#__PURE__*/ API.make(() => ({
|
|
1203
|
+
input: GetRoleRequest,
|
|
1204
|
+
output: GetRoleResponse,
|
|
1205
|
+
errors: [InvalidRoute],
|
|
1206
|
+
}));
|
|
1207
|
+
|
|
1208
|
+
export interface ListRolesRequest {
|
|
1209
|
+
/** Path param: Account identifier tag. */
|
|
1210
|
+
accountId: string;
|
|
1211
|
+
}
|
|
1212
|
+
|
|
1213
|
+
export const ListRolesRequest = /*@__PURE__*/ /*#__PURE__*/ Schema.Struct({
|
|
1214
|
+
accountId: Schema.String.pipe(T.HttpPath("account_id")),
|
|
1215
|
+
}).pipe(
|
|
1216
|
+
T.Http({ method: "GET", path: "/accounts/{account_id}/roles" }),
|
|
1217
|
+
) as unknown as Schema.Schema<ListRolesRequest>;
|
|
1218
|
+
|
|
1219
|
+
export type ListRolesResponse = unknown;
|
|
1220
|
+
|
|
1221
|
+
export const ListRolesResponse =
|
|
1222
|
+
/*@__PURE__*/ /*#__PURE__*/ Schema.Unknown as unknown as Schema.Schema<ListRolesResponse>;
|
|
1223
|
+
|
|
1224
|
+
export type ListRolesError = DefaultErrors;
|
|
1225
|
+
|
|
1226
|
+
export const listRoles: API.OperationMethod<
|
|
1227
|
+
ListRolesRequest,
|
|
1228
|
+
ListRolesResponse,
|
|
1229
|
+
ListRolesError,
|
|
1230
|
+
Credentials | HttpClient.HttpClient
|
|
1231
|
+
> = /*@__PURE__*/ /*#__PURE__*/ API.make(() => ({
|
|
1232
|
+
input: ListRolesRequest,
|
|
1233
|
+
output: ListRolesResponse,
|
|
1234
|
+
errors: [],
|
|
1235
|
+
}));
|
|
1236
|
+
|
|
1237
|
+
// =============================================================================
|
|
1238
|
+
// Subscription
|
|
1239
|
+
// =============================================================================
|
|
1240
|
+
|
|
1241
|
+
export interface GetSubscriptionRequest {
|
|
1242
|
+
/** Identifier */
|
|
1243
|
+
accountId: string;
|
|
1244
|
+
}
|
|
1245
|
+
|
|
1246
|
+
export const GetSubscriptionRequest = /*@__PURE__*/ /*#__PURE__*/ Schema.Struct(
|
|
1247
|
+
{
|
|
1248
|
+
accountId: Schema.String.pipe(T.HttpPath("account_id")),
|
|
1249
|
+
},
|
|
1250
|
+
).pipe(
|
|
1251
|
+
T.Http({ method: "GET", path: "/accounts/{account_id}/subscriptions" }),
|
|
1252
|
+
) as unknown as Schema.Schema<GetSubscriptionRequest>;
|
|
1253
|
+
|
|
1254
|
+
export type GetSubscriptionResponse = unknown;
|
|
1255
|
+
|
|
1256
|
+
export const GetSubscriptionResponse =
|
|
1257
|
+
/*@__PURE__*/ /*#__PURE__*/ Schema.Unknown as unknown as Schema.Schema<GetSubscriptionResponse>;
|
|
1258
|
+
|
|
1259
|
+
export type GetSubscriptionError = DefaultErrors;
|
|
1260
|
+
|
|
1261
|
+
export const getSubscription: API.OperationMethod<
|
|
1262
|
+
GetSubscriptionRequest,
|
|
1263
|
+
GetSubscriptionResponse,
|
|
1264
|
+
GetSubscriptionError,
|
|
1265
|
+
Credentials | HttpClient.HttpClient
|
|
1266
|
+
> = /*@__PURE__*/ /*#__PURE__*/ API.make(() => ({
|
|
1267
|
+
input: GetSubscriptionRequest,
|
|
1268
|
+
output: GetSubscriptionResponse,
|
|
1269
|
+
errors: [],
|
|
1270
|
+
}));
|
|
1271
|
+
|
|
1272
|
+
export interface CreateSubscriptionRequest {
|
|
1273
|
+
/** Path param: Identifier */
|
|
1274
|
+
accountId: string;
|
|
1275
|
+
/** Body param: How often the subscription is renewed automatically. */
|
|
1276
|
+
frequency?: "weekly" | "monthly" | "quarterly" | "yearly";
|
|
1277
|
+
/** Body param: The rate plan applied to the subscription. */
|
|
1278
|
+
ratePlan?: unknown;
|
|
1279
|
+
}
|
|
1280
|
+
|
|
1281
|
+
export const CreateSubscriptionRequest =
|
|
1282
|
+
/*@__PURE__*/ /*#__PURE__*/ Schema.Struct({
|
|
1283
|
+
accountId: Schema.String.pipe(T.HttpPath("account_id")),
|
|
1284
|
+
frequency: Schema.optional(
|
|
1285
|
+
Schema.Literals(["weekly", "monthly", "quarterly", "yearly"]),
|
|
1286
|
+
),
|
|
1287
|
+
ratePlan: Schema.optional(Schema.Unknown),
|
|
1288
|
+
}).pipe(
|
|
1289
|
+
Schema.encodeKeys({ frequency: "frequency", ratePlan: "rate_plan" }),
|
|
1290
|
+
T.Http({ method: "POST", path: "/accounts/{account_id}/subscriptions" }),
|
|
1291
|
+
) as unknown as Schema.Schema<CreateSubscriptionRequest>;
|
|
1292
|
+
|
|
1293
|
+
export type CreateSubscriptionResponse = unknown;
|
|
1294
|
+
|
|
1295
|
+
export const CreateSubscriptionResponse =
|
|
1296
|
+
/*@__PURE__*/ /*#__PURE__*/ Schema.Unknown as unknown as Schema.Schema<CreateSubscriptionResponse>;
|
|
1297
|
+
|
|
1298
|
+
export type CreateSubscriptionError =
|
|
1299
|
+
| DefaultErrors
|
|
1300
|
+
| JsonDecodeFailure
|
|
1301
|
+
| InvalidRoute;
|
|
1302
|
+
|
|
1303
|
+
export const createSubscription: API.OperationMethod<
|
|
1304
|
+
CreateSubscriptionRequest,
|
|
1305
|
+
CreateSubscriptionResponse,
|
|
1306
|
+
CreateSubscriptionError,
|
|
1307
|
+
Credentials | HttpClient.HttpClient
|
|
1308
|
+
> = /*@__PURE__*/ /*#__PURE__*/ API.make(() => ({
|
|
1309
|
+
input: CreateSubscriptionRequest,
|
|
1310
|
+
output: CreateSubscriptionResponse,
|
|
1311
|
+
errors: [JsonDecodeFailure, InvalidRoute],
|
|
1312
|
+
}));
|
|
1313
|
+
|
|
1314
|
+
export interface UpdateSubscriptionRequest {
|
|
1315
|
+
subscriptionIdentifier: string;
|
|
1316
|
+
/** Path param: Identifier */
|
|
1317
|
+
accountId: string;
|
|
1318
|
+
/** Body param: How often the subscription is renewed automatically. */
|
|
1319
|
+
frequency?: "weekly" | "monthly" | "quarterly" | "yearly";
|
|
1320
|
+
/** Body param: The rate plan applied to the subscription. */
|
|
1321
|
+
ratePlan?: unknown;
|
|
1322
|
+
}
|
|
1323
|
+
|
|
1324
|
+
export const UpdateSubscriptionRequest =
|
|
1325
|
+
/*@__PURE__*/ /*#__PURE__*/ Schema.Struct({
|
|
1326
|
+
subscriptionIdentifier: Schema.String.pipe(
|
|
1327
|
+
T.HttpPath("subscriptionIdentifier"),
|
|
1328
|
+
),
|
|
1329
|
+
accountId: Schema.String.pipe(T.HttpPath("account_id")),
|
|
1330
|
+
frequency: Schema.optional(
|
|
1331
|
+
Schema.Literals(["weekly", "monthly", "quarterly", "yearly"]),
|
|
1332
|
+
),
|
|
1333
|
+
ratePlan: Schema.optional(Schema.Unknown),
|
|
1334
|
+
}).pipe(
|
|
1335
|
+
Schema.encodeKeys({ frequency: "frequency", ratePlan: "rate_plan" }),
|
|
1336
|
+
T.Http({
|
|
1337
|
+
method: "PUT",
|
|
1338
|
+
path: "/accounts/{account_id}/subscriptions/{subscriptionIdentifier}",
|
|
1339
|
+
}),
|
|
1340
|
+
) as unknown as Schema.Schema<UpdateSubscriptionRequest>;
|
|
1341
|
+
|
|
1342
|
+
export type UpdateSubscriptionResponse = unknown;
|
|
1343
|
+
|
|
1344
|
+
export const UpdateSubscriptionResponse =
|
|
1345
|
+
/*@__PURE__*/ /*#__PURE__*/ Schema.Unknown as unknown as Schema.Schema<UpdateSubscriptionResponse>;
|
|
1346
|
+
|
|
1347
|
+
export type UpdateSubscriptionError =
|
|
1348
|
+
| DefaultErrors
|
|
1349
|
+
| JsonDecodeFailure
|
|
1350
|
+
| InvalidRoute
|
|
1351
|
+
| EndpointNotFound;
|
|
1352
|
+
|
|
1353
|
+
export const updateSubscription: API.OperationMethod<
|
|
1354
|
+
UpdateSubscriptionRequest,
|
|
1355
|
+
UpdateSubscriptionResponse,
|
|
1356
|
+
UpdateSubscriptionError,
|
|
1357
|
+
Credentials | HttpClient.HttpClient
|
|
1358
|
+
> = /*@__PURE__*/ /*#__PURE__*/ API.make(() => ({
|
|
1359
|
+
input: UpdateSubscriptionRequest,
|
|
1360
|
+
output: UpdateSubscriptionResponse,
|
|
1361
|
+
errors: [JsonDecodeFailure, InvalidRoute, EndpointNotFound],
|
|
1362
|
+
}));
|
|
1363
|
+
|
|
1364
|
+
export interface DeleteSubscriptionRequest {
|
|
1365
|
+
subscriptionIdentifier: string;
|
|
1366
|
+
/** Identifier */
|
|
1367
|
+
accountId: string;
|
|
1368
|
+
}
|
|
1369
|
+
|
|
1370
|
+
export const DeleteSubscriptionRequest =
|
|
1371
|
+
/*@__PURE__*/ /*#__PURE__*/ Schema.Struct({
|
|
1372
|
+
subscriptionIdentifier: Schema.String.pipe(
|
|
1373
|
+
T.HttpPath("subscriptionIdentifier"),
|
|
1374
|
+
),
|
|
1375
|
+
accountId: Schema.String.pipe(T.HttpPath("account_id")),
|
|
1376
|
+
}).pipe(
|
|
1377
|
+
T.Http({
|
|
1378
|
+
method: "DELETE",
|
|
1379
|
+
path: "/accounts/{account_id}/subscriptions/{subscriptionIdentifier}",
|
|
1380
|
+
}),
|
|
1381
|
+
) as unknown as Schema.Schema<DeleteSubscriptionRequest>;
|
|
1382
|
+
|
|
1383
|
+
export interface DeleteSubscriptionResponse {
|
|
1384
|
+
/** Subscription identifier tag. */
|
|
1385
|
+
subscriptionId?: string | null;
|
|
1386
|
+
}
|
|
1387
|
+
|
|
1388
|
+
export const DeleteSubscriptionResponse =
|
|
1389
|
+
/*@__PURE__*/ /*#__PURE__*/ Schema.Struct({
|
|
1390
|
+
subscriptionId: Schema.optional(Schema.Union([Schema.String, Schema.Null])),
|
|
1391
|
+
}).pipe(
|
|
1392
|
+
Schema.encodeKeys({ subscriptionId: "subscription_id" }),
|
|
1393
|
+
) as unknown as Schema.Schema<DeleteSubscriptionResponse>;
|
|
1394
|
+
|
|
1395
|
+
export type DeleteSubscriptionError =
|
|
1396
|
+
| DefaultErrors
|
|
1397
|
+
| InvalidRoute
|
|
1398
|
+
| EndpointNotFound;
|
|
1399
|
+
|
|
1400
|
+
export const deleteSubscription: API.OperationMethod<
|
|
1401
|
+
DeleteSubscriptionRequest,
|
|
1402
|
+
DeleteSubscriptionResponse,
|
|
1403
|
+
DeleteSubscriptionError,
|
|
1404
|
+
Credentials | HttpClient.HttpClient
|
|
1405
|
+
> = /*@__PURE__*/ /*#__PURE__*/ API.make(() => ({
|
|
1406
|
+
input: DeleteSubscriptionRequest,
|
|
1407
|
+
output: DeleteSubscriptionResponse,
|
|
1408
|
+
errors: [InvalidRoute, EndpointNotFound],
|
|
1409
|
+
}));
|
|
1410
|
+
|
|
1411
|
+
// =============================================================================
|
|
1412
|
+
// Token
|
|
1413
|
+
// =============================================================================
|
|
1414
|
+
|
|
1415
|
+
export interface GetTokenRequest {
|
|
1416
|
+
tokenId: string;
|
|
1417
|
+
/** Account identifier tag. */
|
|
1418
|
+
accountId: string;
|
|
1419
|
+
}
|
|
1420
|
+
|
|
1421
|
+
export const GetTokenRequest = /*@__PURE__*/ /*#__PURE__*/ Schema.Struct({
|
|
1422
|
+
tokenId: Schema.String.pipe(T.HttpPath("tokenId")),
|
|
1423
|
+
accountId: Schema.String.pipe(T.HttpPath("account_id")),
|
|
1424
|
+
}).pipe(
|
|
1425
|
+
T.Http({ method: "GET", path: "/accounts/{account_id}/tokens/{tokenId}" }),
|
|
1426
|
+
) as unknown as Schema.Schema<GetTokenRequest>;
|
|
1427
|
+
|
|
1428
|
+
export type GetTokenResponse = unknown;
|
|
1429
|
+
|
|
1430
|
+
export const GetTokenResponse =
|
|
1431
|
+
/*@__PURE__*/ /*#__PURE__*/ Schema.Unknown as unknown as Schema.Schema<GetTokenResponse>;
|
|
1432
|
+
|
|
1433
|
+
export type GetTokenError = DefaultErrors | InvalidRoute;
|
|
1434
|
+
|
|
1435
|
+
export const getToken: API.OperationMethod<
|
|
1436
|
+
GetTokenRequest,
|
|
1437
|
+
GetTokenResponse,
|
|
1438
|
+
GetTokenError,
|
|
1439
|
+
Credentials | HttpClient.HttpClient
|
|
1440
|
+
> = /*@__PURE__*/ /*#__PURE__*/ API.make(() => ({
|
|
1441
|
+
input: GetTokenRequest,
|
|
1442
|
+
output: GetTokenResponse,
|
|
1443
|
+
errors: [InvalidRoute],
|
|
1444
|
+
}));
|
|
1445
|
+
|
|
1446
|
+
export interface ListTokensRequest {
|
|
1447
|
+
/** Path param: Account identifier tag. */
|
|
1448
|
+
accountId: string;
|
|
1449
|
+
/** Query param: Direction to order results. */
|
|
1450
|
+
direction?: "asc" | "desc";
|
|
1451
|
+
}
|
|
1452
|
+
|
|
1453
|
+
export const ListTokensRequest = /*@__PURE__*/ /*#__PURE__*/ Schema.Struct({
|
|
1454
|
+
accountId: Schema.String.pipe(T.HttpPath("account_id")),
|
|
1455
|
+
direction: Schema.optional(Schema.Literals(["asc", "desc"])).pipe(
|
|
1456
|
+
T.HttpQuery("direction"),
|
|
1457
|
+
),
|
|
1458
|
+
}).pipe(
|
|
1459
|
+
T.Http({ method: "GET", path: "/accounts/{account_id}/tokens" }),
|
|
1460
|
+
) as unknown as Schema.Schema<ListTokensRequest>;
|
|
1461
|
+
|
|
1462
|
+
export type ListTokensResponse = unknown;
|
|
1463
|
+
|
|
1464
|
+
export const ListTokensResponse =
|
|
1465
|
+
/*@__PURE__*/ /*#__PURE__*/ Schema.Unknown as unknown as Schema.Schema<ListTokensResponse>;
|
|
1466
|
+
|
|
1467
|
+
export type ListTokensError = DefaultErrors;
|
|
1468
|
+
|
|
1469
|
+
export const listTokens: API.OperationMethod<
|
|
1470
|
+
ListTokensRequest,
|
|
1471
|
+
ListTokensResponse,
|
|
1472
|
+
ListTokensError,
|
|
1473
|
+
Credentials | HttpClient.HttpClient
|
|
1474
|
+
> = /*@__PURE__*/ /*#__PURE__*/ API.make(() => ({
|
|
1475
|
+
input: ListTokensRequest,
|
|
1476
|
+
output: ListTokensResponse,
|
|
1477
|
+
errors: [],
|
|
1478
|
+
}));
|
|
1479
|
+
|
|
1480
|
+
export interface CreateTokenRequest {
|
|
1481
|
+
/** Path param: Account identifier tag. */
|
|
1482
|
+
accountId: string;
|
|
1483
|
+
/** Body param: Token name. */
|
|
1484
|
+
name: string;
|
|
1485
|
+
/** Body param: List of access policies assigned to the token. */
|
|
1486
|
+
policies: unknown[];
|
|
1487
|
+
/** Body param: */
|
|
1488
|
+
condition?: { requestIp?: { in?: string[]; notIn?: string[] } };
|
|
1489
|
+
/** Body param: The expiration time on or after which the JWT MUST NOT be accepted for processing. */
|
|
1490
|
+
expiresOn?: string;
|
|
1491
|
+
/** Body param: The time before which the token MUST NOT be accepted for processing. */
|
|
1492
|
+
notBefore?: string;
|
|
1493
|
+
}
|
|
1494
|
+
|
|
1495
|
+
export const CreateTokenRequest = /*@__PURE__*/ /*#__PURE__*/ Schema.Struct({
|
|
1496
|
+
accountId: Schema.String.pipe(T.HttpPath("account_id")),
|
|
1497
|
+
name: Schema.String,
|
|
1498
|
+
policies: Schema.Array(Schema.Unknown),
|
|
1499
|
+
condition: Schema.optional(
|
|
1500
|
+
Schema.Struct({
|
|
1501
|
+
requestIp: Schema.optional(
|
|
1502
|
+
Schema.Struct({
|
|
1503
|
+
in: Schema.optional(Schema.Array(Schema.String)),
|
|
1504
|
+
notIn: Schema.optional(Schema.Array(Schema.String)),
|
|
1505
|
+
}).pipe(Schema.encodeKeys({ in: "in", notIn: "not_in" })),
|
|
1506
|
+
),
|
|
1507
|
+
}).pipe(Schema.encodeKeys({ requestIp: "request_ip" })),
|
|
1508
|
+
),
|
|
1509
|
+
expiresOn: Schema.optional(Schema.String),
|
|
1510
|
+
notBefore: Schema.optional(Schema.String),
|
|
1511
|
+
}).pipe(
|
|
1512
|
+
Schema.encodeKeys({
|
|
1513
|
+
name: "name",
|
|
1514
|
+
policies: "policies",
|
|
1515
|
+
condition: "condition",
|
|
1516
|
+
expiresOn: "expires_on",
|
|
1517
|
+
notBefore: "not_before",
|
|
1518
|
+
}),
|
|
1519
|
+
T.Http({ method: "POST", path: "/accounts/{account_id}/tokens" }),
|
|
1520
|
+
) as unknown as Schema.Schema<CreateTokenRequest>;
|
|
1521
|
+
|
|
1522
|
+
export interface CreateTokenResponse {
|
|
1523
|
+
/** Token identifier tag. */
|
|
1524
|
+
id?: string | null;
|
|
1525
|
+
condition?: {
|
|
1526
|
+
requestIp?: { in?: string[] | null; notIn?: string[] | null } | null;
|
|
1527
|
+
} | null;
|
|
1528
|
+
/** The expiration time on or after which the JWT MUST NOT be accepted for processing. */
|
|
1529
|
+
expiresOn?: string | null;
|
|
1530
|
+
/** The time on which the token was created. */
|
|
1531
|
+
issuedOn?: string | null;
|
|
1532
|
+
/** Last time the token was used. */
|
|
1533
|
+
lastUsedOn?: string | null;
|
|
1534
|
+
/** Last time the token was modified. */
|
|
1535
|
+
modifiedOn?: string | null;
|
|
1536
|
+
/** Token name. */
|
|
1537
|
+
name?: string | null;
|
|
1538
|
+
/** The time before which the token MUST NOT be accepted for processing. */
|
|
1539
|
+
notBefore?: string | null;
|
|
1540
|
+
/** List of access policies assigned to the token. */
|
|
1541
|
+
policies?: unknown[] | null;
|
|
1542
|
+
/** Status of the token. */
|
|
1543
|
+
status?: "active" | "disabled" | "expired" | null;
|
|
1544
|
+
/** The token value. */
|
|
1545
|
+
value?: string | null;
|
|
1546
|
+
}
|
|
1547
|
+
|
|
1548
|
+
export const CreateTokenResponse = /*@__PURE__*/ /*#__PURE__*/ Schema.Struct({
|
|
1549
|
+
id: Schema.optional(Schema.Union([Schema.String, Schema.Null])),
|
|
1550
|
+
condition: Schema.optional(
|
|
1551
|
+
Schema.Union([
|
|
1552
|
+
Schema.Struct({
|
|
1553
|
+
requestIp: Schema.optional(
|
|
1554
|
+
Schema.Union([
|
|
1555
|
+
Schema.Struct({
|
|
1556
|
+
in: Schema.optional(
|
|
1557
|
+
Schema.Union([Schema.Array(Schema.String), Schema.Null]),
|
|
1558
|
+
),
|
|
1559
|
+
notIn: Schema.optional(
|
|
1560
|
+
Schema.Union([Schema.Array(Schema.String), Schema.Null]),
|
|
1561
|
+
),
|
|
1562
|
+
}).pipe(Schema.encodeKeys({ in: "in", notIn: "not_in" })),
|
|
1563
|
+
Schema.Null,
|
|
1564
|
+
]),
|
|
1565
|
+
),
|
|
1566
|
+
}).pipe(Schema.encodeKeys({ requestIp: "request_ip" })),
|
|
1567
|
+
Schema.Null,
|
|
1568
|
+
]),
|
|
1569
|
+
),
|
|
1570
|
+
expiresOn: Schema.optional(Schema.Union([Schema.String, Schema.Null])),
|
|
1571
|
+
issuedOn: Schema.optional(Schema.Union([Schema.String, Schema.Null])),
|
|
1572
|
+
lastUsedOn: Schema.optional(Schema.Union([Schema.String, Schema.Null])),
|
|
1573
|
+
modifiedOn: Schema.optional(Schema.Union([Schema.String, Schema.Null])),
|
|
1574
|
+
name: Schema.optional(Schema.Union([Schema.String, Schema.Null])),
|
|
1575
|
+
notBefore: Schema.optional(Schema.Union([Schema.String, Schema.Null])),
|
|
1576
|
+
policies: Schema.optional(
|
|
1577
|
+
Schema.Union([Schema.Array(Schema.Unknown), Schema.Null]),
|
|
1578
|
+
),
|
|
1579
|
+
status: Schema.optional(
|
|
1580
|
+
Schema.Union([
|
|
1581
|
+
Schema.Literals(["active", "disabled", "expired"]),
|
|
1582
|
+
Schema.Null,
|
|
1583
|
+
]),
|
|
1584
|
+
),
|
|
1585
|
+
value: Schema.optional(Schema.Union([Schema.String, Schema.Null])),
|
|
1586
|
+
}).pipe(
|
|
1587
|
+
Schema.encodeKeys({
|
|
1588
|
+
id: "id",
|
|
1589
|
+
condition: "condition",
|
|
1590
|
+
expiresOn: "expires_on",
|
|
1591
|
+
issuedOn: "issued_on",
|
|
1592
|
+
lastUsedOn: "last_used_on",
|
|
1593
|
+
modifiedOn: "modified_on",
|
|
1594
|
+
name: "name",
|
|
1595
|
+
notBefore: "not_before",
|
|
1596
|
+
policies: "policies",
|
|
1597
|
+
status: "status",
|
|
1598
|
+
value: "value",
|
|
1599
|
+
}),
|
|
1600
|
+
) as unknown as Schema.Schema<CreateTokenResponse>;
|
|
1601
|
+
|
|
1602
|
+
export type CreateTokenError = DefaultErrors | InvalidRoute | InvalidTokenName;
|
|
1603
|
+
|
|
1604
|
+
export const createToken: API.OperationMethod<
|
|
1605
|
+
CreateTokenRequest,
|
|
1606
|
+
CreateTokenResponse,
|
|
1607
|
+
CreateTokenError,
|
|
1608
|
+
Credentials | HttpClient.HttpClient
|
|
1609
|
+
> = /*@__PURE__*/ /*#__PURE__*/ API.make(() => ({
|
|
1610
|
+
input: CreateTokenRequest,
|
|
1611
|
+
output: CreateTokenResponse,
|
|
1612
|
+
errors: [InvalidRoute, InvalidTokenName],
|
|
1613
|
+
}));
|
|
1614
|
+
|
|
1615
|
+
export interface UpdateTokenRequest {
|
|
1616
|
+
tokenId: string;
|
|
1617
|
+
/** Path param: Account identifier tag. */
|
|
1618
|
+
accountId: string;
|
|
1619
|
+
/** Body param: Token name. */
|
|
1620
|
+
name: string;
|
|
1621
|
+
/** Body param: List of access policies assigned to the token. */
|
|
1622
|
+
policies: unknown[];
|
|
1623
|
+
/** Body param: */
|
|
1624
|
+
condition?: { requestIp?: { in?: string[]; notIn?: string[] } };
|
|
1625
|
+
/** Body param: The expiration time on or after which the JWT MUST NOT be accepted for processing. */
|
|
1626
|
+
expiresOn?: string;
|
|
1627
|
+
/** Body param: The time before which the token MUST NOT be accepted for processing. */
|
|
1628
|
+
notBefore?: string;
|
|
1629
|
+
/** Body param: Status of the token. */
|
|
1630
|
+
status?: "active" | "disabled" | "expired";
|
|
1631
|
+
}
|
|
1632
|
+
|
|
1633
|
+
export const UpdateTokenRequest = /*@__PURE__*/ /*#__PURE__*/ Schema.Struct({
|
|
1634
|
+
tokenId: Schema.String.pipe(T.HttpPath("tokenId")),
|
|
1635
|
+
accountId: Schema.String.pipe(T.HttpPath("account_id")),
|
|
1636
|
+
name: Schema.String,
|
|
1637
|
+
policies: Schema.Array(Schema.Unknown),
|
|
1638
|
+
condition: Schema.optional(
|
|
1639
|
+
Schema.Struct({
|
|
1640
|
+
requestIp: Schema.optional(
|
|
1641
|
+
Schema.Struct({
|
|
1642
|
+
in: Schema.optional(Schema.Array(Schema.String)),
|
|
1643
|
+
notIn: Schema.optional(Schema.Array(Schema.String)),
|
|
1644
|
+
}).pipe(Schema.encodeKeys({ in: "in", notIn: "not_in" })),
|
|
1645
|
+
),
|
|
1646
|
+
}).pipe(Schema.encodeKeys({ requestIp: "request_ip" })),
|
|
1647
|
+
),
|
|
1648
|
+
expiresOn: Schema.optional(Schema.String),
|
|
1649
|
+
notBefore: Schema.optional(Schema.String),
|
|
1650
|
+
status: Schema.optional(Schema.Literals(["active", "disabled", "expired"])),
|
|
1651
|
+
}).pipe(
|
|
1652
|
+
Schema.encodeKeys({
|
|
1653
|
+
name: "name",
|
|
1654
|
+
policies: "policies",
|
|
1655
|
+
condition: "condition",
|
|
1656
|
+
expiresOn: "expires_on",
|
|
1657
|
+
notBefore: "not_before",
|
|
1658
|
+
status: "status",
|
|
1659
|
+
}),
|
|
1660
|
+
T.Http({ method: "PUT", path: "/accounts/{account_id}/tokens/{tokenId}" }),
|
|
1661
|
+
) as unknown as Schema.Schema<UpdateTokenRequest>;
|
|
1662
|
+
|
|
1663
|
+
export type UpdateTokenResponse = unknown;
|
|
1664
|
+
|
|
1665
|
+
export const UpdateTokenResponse =
|
|
1666
|
+
/*@__PURE__*/ /*#__PURE__*/ Schema.Unknown as unknown as Schema.Schema<UpdateTokenResponse>;
|
|
1667
|
+
|
|
1668
|
+
export type UpdateTokenError = DefaultErrors | InvalidRoute | MethodNotAllowed;
|
|
1669
|
+
|
|
1670
|
+
export const updateToken: API.OperationMethod<
|
|
1671
|
+
UpdateTokenRequest,
|
|
1672
|
+
UpdateTokenResponse,
|
|
1673
|
+
UpdateTokenError,
|
|
1674
|
+
Credentials | HttpClient.HttpClient
|
|
1675
|
+
> = /*@__PURE__*/ /*#__PURE__*/ API.make(() => ({
|
|
1676
|
+
input: UpdateTokenRequest,
|
|
1677
|
+
output: UpdateTokenResponse,
|
|
1678
|
+
errors: [InvalidRoute, MethodNotAllowed],
|
|
1679
|
+
}));
|
|
1680
|
+
|
|
1681
|
+
export interface DeleteTokenRequest {
|
|
1682
|
+
tokenId: string;
|
|
1683
|
+
/** Account identifier tag. */
|
|
1684
|
+
accountId: string;
|
|
1685
|
+
}
|
|
1686
|
+
|
|
1687
|
+
export const DeleteTokenRequest = /*@__PURE__*/ /*#__PURE__*/ Schema.Struct({
|
|
1688
|
+
tokenId: Schema.String.pipe(T.HttpPath("tokenId")),
|
|
1689
|
+
accountId: Schema.String.pipe(T.HttpPath("account_id")),
|
|
1690
|
+
}).pipe(
|
|
1691
|
+
T.Http({ method: "DELETE", path: "/accounts/{account_id}/tokens/{tokenId}" }),
|
|
1692
|
+
) as unknown as Schema.Schema<DeleteTokenRequest>;
|
|
1693
|
+
|
|
1694
|
+
export interface DeleteTokenResponse {
|
|
1695
|
+
/** Identifier */
|
|
1696
|
+
id: string;
|
|
1697
|
+
}
|
|
1698
|
+
|
|
1699
|
+
export const DeleteTokenResponse = /*@__PURE__*/ /*#__PURE__*/ Schema.Struct({
|
|
1700
|
+
id: Schema.String,
|
|
1701
|
+
}) as unknown as Schema.Schema<DeleteTokenResponse>;
|
|
1702
|
+
|
|
1703
|
+
export type DeleteTokenError = DefaultErrors | InvalidRoute | MethodNotAllowed;
|
|
1704
|
+
|
|
1705
|
+
export const deleteToken: API.OperationMethod<
|
|
1706
|
+
DeleteTokenRequest,
|
|
1707
|
+
DeleteTokenResponse,
|
|
1708
|
+
DeleteTokenError,
|
|
1709
|
+
Credentials | HttpClient.HttpClient
|
|
1710
|
+
> = /*@__PURE__*/ /*#__PURE__*/ API.make(() => ({
|
|
1711
|
+
input: DeleteTokenRequest,
|
|
1712
|
+
output: DeleteTokenResponse,
|
|
1713
|
+
errors: [InvalidRoute, MethodNotAllowed],
|
|
1714
|
+
}));
|
|
1715
|
+
|
|
1716
|
+
export interface VerifyTokenRequest {
|
|
1717
|
+
/** Account identifier tag. */
|
|
1718
|
+
accountId: string;
|
|
1719
|
+
}
|
|
1720
|
+
|
|
1721
|
+
export const VerifyTokenRequest = /*@__PURE__*/ /*#__PURE__*/ Schema.Struct({
|
|
1722
|
+
accountId: Schema.String.pipe(T.HttpPath("account_id")),
|
|
1723
|
+
}).pipe(
|
|
1724
|
+
T.Http({ method: "GET", path: "/accounts/{account_id}/tokens/verify" }),
|
|
1725
|
+
) as unknown as Schema.Schema<VerifyTokenRequest>;
|
|
1726
|
+
|
|
1727
|
+
export interface VerifyTokenResponse {
|
|
1728
|
+
/** Token identifier tag. */
|
|
1729
|
+
id: string;
|
|
1730
|
+
/** Status of the token. */
|
|
1731
|
+
status: "active" | "disabled" | "expired";
|
|
1732
|
+
/** The expiration time on or after which the JWT MUST NOT be accepted for processing. */
|
|
1733
|
+
expiresOn?: string | null;
|
|
1734
|
+
/** The time before which the token MUST NOT be accepted for processing. */
|
|
1735
|
+
notBefore?: string | null;
|
|
1736
|
+
}
|
|
1737
|
+
|
|
1738
|
+
export const VerifyTokenResponse = /*@__PURE__*/ /*#__PURE__*/ Schema.Struct({
|
|
1739
|
+
id: Schema.String,
|
|
1740
|
+
status: Schema.Literals(["active", "disabled", "expired"]),
|
|
1741
|
+
expiresOn: Schema.optional(Schema.Union([Schema.String, Schema.Null])),
|
|
1742
|
+
notBefore: Schema.optional(Schema.Union([Schema.String, Schema.Null])),
|
|
1743
|
+
}).pipe(
|
|
1744
|
+
Schema.encodeKeys({
|
|
1745
|
+
id: "id",
|
|
1746
|
+
status: "status",
|
|
1747
|
+
expiresOn: "expires_on",
|
|
1748
|
+
notBefore: "not_before",
|
|
1749
|
+
}),
|
|
1750
|
+
) as unknown as Schema.Schema<VerifyTokenResponse>;
|
|
1751
|
+
|
|
1752
|
+
export type VerifyTokenError =
|
|
1753
|
+
| DefaultErrors
|
|
1754
|
+
| MissingAuthenticationToken
|
|
1755
|
+
| InvalidRoute;
|
|
1756
|
+
|
|
1757
|
+
export const verifyToken: API.OperationMethod<
|
|
1758
|
+
VerifyTokenRequest,
|
|
1759
|
+
VerifyTokenResponse,
|
|
1760
|
+
VerifyTokenError,
|
|
1761
|
+
Credentials | HttpClient.HttpClient
|
|
1762
|
+
> = /*@__PURE__*/ /*#__PURE__*/ API.make(() => ({
|
|
1763
|
+
input: VerifyTokenRequest,
|
|
1764
|
+
output: VerifyTokenResponse,
|
|
1765
|
+
errors: [MissingAuthenticationToken, InvalidRoute],
|
|
1766
|
+
}));
|
|
1767
|
+
|
|
1768
|
+
// =============================================================================
|
|
1769
|
+
// TokenPermissionGroup
|
|
1770
|
+
// =============================================================================
|
|
1771
|
+
|
|
1772
|
+
export interface GetTokenPermissionGroupRequest {
|
|
1773
|
+
/** Path param: Account identifier tag. */
|
|
1774
|
+
accountId: string;
|
|
1775
|
+
/** Query param: Filter by the name of the permission group. The value must be URL-encoded. */
|
|
1776
|
+
name?: string;
|
|
1777
|
+
/** Query param: Filter by the scope of the permission group. The value must be URL-encoded. */
|
|
1778
|
+
scope?: string;
|
|
1779
|
+
}
|
|
1780
|
+
|
|
1781
|
+
export const GetTokenPermissionGroupRequest =
|
|
1782
|
+
/*@__PURE__*/ /*#__PURE__*/ Schema.Struct({
|
|
1783
|
+
accountId: Schema.String.pipe(T.HttpPath("account_id")),
|
|
1784
|
+
name: Schema.optional(Schema.String).pipe(T.HttpQuery("name")),
|
|
1785
|
+
scope: Schema.optional(Schema.String).pipe(T.HttpQuery("scope")),
|
|
1786
|
+
}).pipe(
|
|
1787
|
+
T.Http({
|
|
1788
|
+
method: "GET",
|
|
1789
|
+
path: "/accounts/{account_id}/tokens/permission_groups",
|
|
1790
|
+
}),
|
|
1791
|
+
) as unknown as Schema.Schema<GetTokenPermissionGroupRequest>;
|
|
1792
|
+
|
|
1793
|
+
export type GetTokenPermissionGroupResponse = {
|
|
1794
|
+
id?: string | null;
|
|
1795
|
+
name?: string | null;
|
|
1796
|
+
scopes?:
|
|
1797
|
+
| (
|
|
1798
|
+
| "com.cloudflare.api.account"
|
|
1799
|
+
| "com.cloudflare.api.account.zone"
|
|
1800
|
+
| "com.cloudflare.api.user"
|
|
1801
|
+
| "com.cloudflare.edge.r2.bucket"
|
|
1802
|
+
)[]
|
|
1803
|
+
| null;
|
|
1804
|
+
}[];
|
|
1805
|
+
|
|
1806
|
+
export const GetTokenPermissionGroupResponse =
|
|
1807
|
+
/*@__PURE__*/ /*#__PURE__*/ Schema.Array(
|
|
1808
|
+
Schema.Struct({
|
|
1809
|
+
id: Schema.optional(Schema.Union([Schema.String, Schema.Null])),
|
|
1810
|
+
name: Schema.optional(Schema.Union([Schema.String, Schema.Null])),
|
|
1811
|
+
scopes: Schema.optional(
|
|
1812
|
+
Schema.Union([
|
|
1813
|
+
Schema.Array(
|
|
1814
|
+
Schema.Literals([
|
|
1815
|
+
"com.cloudflare.api.account",
|
|
1816
|
+
"com.cloudflare.api.account.zone",
|
|
1817
|
+
"com.cloudflare.api.user",
|
|
1818
|
+
"com.cloudflare.edge.r2.bucket",
|
|
1819
|
+
]),
|
|
1820
|
+
),
|
|
1821
|
+
Schema.Null,
|
|
1822
|
+
]),
|
|
1823
|
+
),
|
|
1824
|
+
}),
|
|
1825
|
+
) as unknown as Schema.Schema<GetTokenPermissionGroupResponse>;
|
|
1826
|
+
|
|
1827
|
+
export type GetTokenPermissionGroupError = DefaultErrors | InvalidRoute;
|
|
1828
|
+
|
|
1829
|
+
export const getTokenPermissionGroup: API.OperationMethod<
|
|
1830
|
+
GetTokenPermissionGroupRequest,
|
|
1831
|
+
GetTokenPermissionGroupResponse,
|
|
1832
|
+
GetTokenPermissionGroupError,
|
|
1833
|
+
Credentials | HttpClient.HttpClient
|
|
1834
|
+
> = /*@__PURE__*/ /*#__PURE__*/ API.make(() => ({
|
|
1835
|
+
input: GetTokenPermissionGroupRequest,
|
|
1836
|
+
output: GetTokenPermissionGroupResponse,
|
|
1837
|
+
errors: [InvalidRoute],
|
|
1838
|
+
}));
|
|
1839
|
+
|
|
1840
|
+
export interface ListTokenPermissionGroupsRequest {
|
|
1841
|
+
/** Path param: Account identifier tag. */
|
|
1842
|
+
accountId: string;
|
|
1843
|
+
/** Query param: Filter by the name of the permission group. The value must be URL-encoded. */
|
|
1844
|
+
name?: string;
|
|
1845
|
+
/** Query param: Filter by the scope of the permission group. The value must be URL-encoded. */
|
|
1846
|
+
scope?: string;
|
|
1847
|
+
}
|
|
1848
|
+
|
|
1849
|
+
export const ListTokenPermissionGroupsRequest =
|
|
1850
|
+
/*@__PURE__*/ /*#__PURE__*/ Schema.Struct({
|
|
1851
|
+
accountId: Schema.String.pipe(T.HttpPath("account_id")),
|
|
1852
|
+
name: Schema.optional(Schema.String).pipe(T.HttpQuery("name")),
|
|
1853
|
+
scope: Schema.optional(Schema.String).pipe(T.HttpQuery("scope")),
|
|
1854
|
+
}).pipe(
|
|
1855
|
+
T.Http({
|
|
1856
|
+
method: "GET",
|
|
1857
|
+
path: "/accounts/{account_id}/tokens/permission_groups",
|
|
1858
|
+
}),
|
|
1859
|
+
) as unknown as Schema.Schema<ListTokenPermissionGroupsRequest>;
|
|
1860
|
+
|
|
1861
|
+
export type ListTokenPermissionGroupsResponse = {
|
|
1862
|
+
id?: string | null;
|
|
1863
|
+
name?: string | null;
|
|
1864
|
+
scopes?:
|
|
1865
|
+
| (
|
|
1866
|
+
| "com.cloudflare.api.account"
|
|
1867
|
+
| "com.cloudflare.api.account.zone"
|
|
1868
|
+
| "com.cloudflare.api.user"
|
|
1869
|
+
| "com.cloudflare.edge.r2.bucket"
|
|
1870
|
+
)[]
|
|
1871
|
+
| null;
|
|
1872
|
+
}[];
|
|
1873
|
+
|
|
1874
|
+
export const ListTokenPermissionGroupsResponse =
|
|
1875
|
+
/*@__PURE__*/ /*#__PURE__*/ Schema.Array(
|
|
1876
|
+
Schema.Struct({
|
|
1877
|
+
id: Schema.optional(Schema.Union([Schema.String, Schema.Null])),
|
|
1878
|
+
name: Schema.optional(Schema.Union([Schema.String, Schema.Null])),
|
|
1879
|
+
scopes: Schema.optional(
|
|
1880
|
+
Schema.Union([
|
|
1881
|
+
Schema.Array(
|
|
1882
|
+
Schema.Literals([
|
|
1883
|
+
"com.cloudflare.api.account",
|
|
1884
|
+
"com.cloudflare.api.account.zone",
|
|
1885
|
+
"com.cloudflare.api.user",
|
|
1886
|
+
"com.cloudflare.edge.r2.bucket",
|
|
1887
|
+
]),
|
|
1888
|
+
),
|
|
1889
|
+
Schema.Null,
|
|
1890
|
+
]),
|
|
1891
|
+
),
|
|
1892
|
+
}),
|
|
1893
|
+
) as unknown as Schema.Schema<ListTokenPermissionGroupsResponse>;
|
|
1894
|
+
|
|
1895
|
+
export type ListTokenPermissionGroupsError = DefaultErrors;
|
|
1896
|
+
|
|
1897
|
+
export const listTokenPermissionGroups: API.OperationMethod<
|
|
1898
|
+
ListTokenPermissionGroupsRequest,
|
|
1899
|
+
ListTokenPermissionGroupsResponse,
|
|
1900
|
+
ListTokenPermissionGroupsError,
|
|
1901
|
+
Credentials | HttpClient.HttpClient
|
|
1902
|
+
> = /*@__PURE__*/ /*#__PURE__*/ API.make(() => ({
|
|
1903
|
+
input: ListTokenPermissionGroupsRequest,
|
|
1904
|
+
output: ListTokenPermissionGroupsResponse,
|
|
1905
|
+
errors: [],
|
|
1906
|
+
}));
|
|
1907
|
+
|
|
1908
|
+
// =============================================================================
|
|
1909
|
+
// TokenValue
|
|
1910
|
+
// =============================================================================
|
|
1911
|
+
|
|
1912
|
+
export interface PutTokenValueRequest {
|
|
1913
|
+
tokenId: string;
|
|
1914
|
+
/** Path param: Account identifier tag. */
|
|
1915
|
+
accountId: string;
|
|
1916
|
+
/** Body param: */
|
|
1917
|
+
body: unknown;
|
|
1918
|
+
}
|
|
1919
|
+
|
|
1920
|
+
export const PutTokenValueRequest = /*@__PURE__*/ /*#__PURE__*/ Schema.Struct({
|
|
1921
|
+
tokenId: Schema.String.pipe(T.HttpPath("tokenId")),
|
|
1922
|
+
accountId: Schema.String.pipe(T.HttpPath("account_id")),
|
|
1923
|
+
body: Schema.Unknown.pipe(T.HttpBody()),
|
|
1924
|
+
}).pipe(
|
|
1925
|
+
T.Http({
|
|
1926
|
+
method: "PUT",
|
|
1927
|
+
path: "/accounts/{account_id}/tokens/{tokenId}/value",
|
|
1928
|
+
}),
|
|
1929
|
+
) as unknown as Schema.Schema<PutTokenValueRequest>;
|
|
1930
|
+
|
|
1931
|
+
export type PutTokenValueResponse = unknown;
|
|
1932
|
+
|
|
1933
|
+
export const PutTokenValueResponse =
|
|
1934
|
+
/*@__PURE__*/ /*#__PURE__*/ Schema.Unknown as unknown as Schema.Schema<PutTokenValueResponse>;
|
|
1935
|
+
|
|
1936
|
+
export type PutTokenValueError = DefaultErrors | InvalidRoute;
|
|
1937
|
+
|
|
1938
|
+
export const putTokenValue: API.OperationMethod<
|
|
1939
|
+
PutTokenValueRequest,
|
|
1940
|
+
PutTokenValueResponse,
|
|
1941
|
+
PutTokenValueError,
|
|
1942
|
+
Credentials | HttpClient.HttpClient
|
|
1943
|
+
> = /*@__PURE__*/ /*#__PURE__*/ API.make(() => ({
|
|
1944
|
+
input: PutTokenValueRequest,
|
|
1945
|
+
output: PutTokenValueResponse,
|
|
1946
|
+
errors: [InvalidRoute],
|
|
1947
|
+
}));
|