From 9f4bba3ade9f627a4af2278d09126e981fc4fd7b Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Mon, 8 Apr 2024 20:18:11 +0000 Subject: [PATCH] feat(api): update via SDK Studio (#248) --- api.md | 1444 ++++--- src/index.ts | 290 +- src/resources/accounts/accounts.ts | 15 +- src/resources/accounts/index.ts | 24 +- src/resources/accounts/members.ts | 92 +- src/resources/accounts/roles.ts | 35 +- .../addressing/address-maps/address-maps.ts | 16 +- .../addressing/address-maps/index.ts | 4 +- src/resources/addressing/addressing.ts | 8 +- src/resources/addressing/index.ts | 12 +- src/resources/addressing/prefixes/bgp/bgp.ts | 8 +- .../addressing/prefixes/bgp/bindings.ts | 24 +- .../addressing/prefixes/bgp/index.ts | 10 +- .../addressing/prefixes/bgp/prefixes.ts | 26 +- .../addressing/prefixes/delegations.ts | 16 +- src/resources/addressing/prefixes/index.ts | 11 +- src/resources/addressing/prefixes/prefixes.ts | 35 +- src/resources/alerting/alerting.ts | 14 +- .../alerting/destinations/destinations.ts | 7 +- src/resources/alerting/destinations/index.ts | 13 +- .../alerting/destinations/pagerduty.ts | 10 +- .../alerting/destinations/webhooks.ts | 20 +- src/resources/alerting/history.ts | 16 +- src/resources/alerting/index.ts | 19 +- src/resources/alerting/policies.ts | 1112 ++---- src/resources/audit-logs.ts | 7 - src/resources/bot-management.ts | 375 +- src/resources/brand-protection.ts | 33 +- src/resources/cache/cache.ts | 3 - src/resources/cache/index.ts | 2 +- src/resources/calls.ts | 12 - .../certificate-authorities.ts | 1 + .../hostname-associations.ts | 11 +- .../certificate-authorities/index.ts | 1 + src/resources/challenges/challenges.ts | 7 +- src/resources/challenges/index.ts | 7 +- src/resources/challenges/widgets.ts | 55 +- src/resources/client-certificates.ts | 11 - .../cloudforce-one/cloudforce-one.ts | 12 +- src/resources/cloudforce-one/index.ts | 12 +- .../cloudforce-one/requests/index.ts | 25 +- .../cloudforce-one/requests/message.ts | 18 +- .../cloudforce-one/requests/priority.ts | 59 +- .../cloudforce-one/requests/requests.ts | 124 +- .../custom-certificates.ts | 70 +- src/resources/custom-certificates/index.ts | 11 +- .../custom-hostnames/custom-hostnames.ts | 1455 +------ src/resources/custom-hostnames/index.ts | 19 +- src/resources/custom-nameservers.ts | 13 - src/resources/d1/d1.ts | 9 +- src/resources/d1/database.ts | 75 +- src/resources/d1/index.ts | 9 +- src/resources/diagnostics/diagnostics.ts | 2 +- src/resources/diagnostics/index.ts | 7 +- src/resources/diagnostics/traceroutes.ts | 10 +- src/resources/dns/analytics/analytics.ts | 2 +- src/resources/dns/analytics/index.ts | 2 +- .../dns/analytics/reports/bytimes.ts | 12 +- src/resources/dns/analytics/reports/index.ts | 4 +- .../dns/analytics/reports/reports.ts | 14 +- src/resources/dns/dns.ts | 13 +- .../dns/firewall/analytics/reports/bytimes.ts | 4 +- .../dns/firewall/analytics/reports/reports.ts | 4 +- src/resources/dns/firewall/firewall.ts | 154 +- src/resources/dns/firewall/index.ts | 9 +- src/resources/dns/index.ts | 16 +- src/resources/dns/records.ts | 40 +- src/resources/dnssec.ts | 8 - .../durable-objects/durable-objects.ts | 4 +- src/resources/durable-objects/index.ts | 7 +- .../durable-objects/namespaces/index.ts | 7 +- .../durable-objects/namespaces/namespaces.ts | 12 +- src/resources/email-routing/addresses.ts | 137 +- src/resources/email-routing/dns.ts | 6 +- src/resources/email-routing/email-routing.ts | 175 +- src/resources/email-routing/index.ts | 43 +- .../email-routing/rules/catch-alls.ts | 84 +- src/resources/email-routing/rules/index.ts | 16 +- src/resources/email-routing/rules/rules.ts | 486 +-- src/resources/filters.ts | 163 +- src/resources/firewall/access-rules.ts | 40 +- src/resources/firewall/firewall.ts | 18 +- src/resources/firewall/index.ts | 34 +- src/resources/firewall/lockdowns.ts | 198 +- src/resources/firewall/rules.ts | 485 ++- src/resources/firewall/ua-rules.ts | 51 +- src/resources/firewall/waf/index.ts | 22 +- src/resources/firewall/waf/overrides.ts | 200 +- src/resources/firewall/waf/packages/groups.ts | 12 +- src/resources/firewall/waf/packages/index.ts | 23 +- .../firewall/waf/packages/packages.ts | 31 +- src/resources/firewall/waf/packages/rules.ts | 55 +- src/resources/firewall/waf/waf.ts | 8 +- src/resources/healthchecks/healthchecks.ts | 588 +-- src/resources/healthchecks/index.ts | 14 +- src/resources/healthchecks/previews.ts | 87 +- src/resources/hostnames/settings/index.ts | 5 +- src/resources/hostnames/settings/settings.ts | 5 +- src/resources/hostnames/settings/tls.ts | 42 +- src/resources/hyperdrive/configs.ts | 104 +- src/resources/hyperdrive/hyperdrive.ts | 19 +- src/resources/hyperdrive/index.ts | 8 +- src/resources/images/v1/index.ts | 10 +- src/resources/images/v1/keys.ts | 22 +- src/resources/images/v1/stats.ts | 12 +- src/resources/images/v1/v1.ts | 60 +- src/resources/images/v1/variants.ts | 194 +- src/resources/index.ts | 426 +- src/resources/intel/asn/asn.ts | 12 +- src/resources/intel/asn/index.ts | 2 +- src/resources/intel/asn/subnets.ts | 4 +- .../attack-surface-report.ts | 5 + .../intel/attack-surface-report/index.ts | 5 + .../intel/attack-surface-report/issues.ts | 148 +- src/resources/intel/dns.ts | 8 +- src/resources/intel/domain-history.ts | 14 +- src/resources/intel/domains/domains.ts | 20 +- src/resources/intel/domains/index.ts | 2 +- src/resources/intel/index.ts | 31 +- src/resources/intel/intel.ts | 22 +- src/resources/intel/ip-lists.ts | 6 +- src/resources/intel/ips.ts | 10 +- src/resources/intel/sinkholes.ts | 12 +- src/resources/intel/whois.ts | 8 +- src/resources/ips.ts | 8 - src/resources/keyless-certificates.ts | 138 +- src/resources/kv/index.ts | 4 +- src/resources/kv/kv.ts | 4 +- src/resources/kv/namespaces/index.ts | 8 +- src/resources/kv/namespaces/keys.ts | 12 +- src/resources/kv/namespaces/namespaces.ts | 20 +- src/resources/load-balancers/index.ts | 14 +- .../load-balancers/load-balancers.ts | 3251 +++------------ src/resources/load-balancers/pools/pools.ts | 569 +-- src/resources/load-balancers/previews.ts | 4 +- src/resources/logpush/datasets/datasets.ts | 3 +- src/resources/logpush/datasets/index.ts | 2 +- src/resources/logpush/datasets/jobs.ts | 157 +- src/resources/logpush/jobs.ts | 270 +- .../configs/configs.ts | 36 +- .../magic-network-monitoring/configs/full.ts | 7 +- .../magic-network-monitoring/configs/index.ts | 4 +- .../magic-network-monitoring/index.ts | 8 +- .../magic-network-monitoring.ts | 6 +- .../rules/advertisements.ts | 8 +- .../magic-network-monitoring/rules/index.ts | 10 +- .../magic-network-monitoring/rules/rules.ts | 52 +- src/resources/magic-transit/gre-tunnels.ts | 120 +- src/resources/magic-transit/index.ts | 42 +- src/resources/magic-transit/ipsec-tunnels.ts | 129 +- src/resources/magic-transit/magic-transit.ts | 45 +- src/resources/magic-transit/routes.ts | 85 +- src/resources/magic-transit/sites/acls.ts | 590 +-- src/resources/magic-transit/sites/index.ts | 41 +- src/resources/magic-transit/sites/lans.ts | 919 +---- src/resources/magic-transit/sites/sites.ts | 364 +- src/resources/magic-transit/sites/wans.ts | 384 +- src/resources/managed-headers.ts | 84 +- src/resources/memberships.ts | 14 +- .../mtls-certificates/associations.ts | 6 +- src/resources/mtls-certificates/index.ts | 13 +- .../mtls-certificates/mtls-certificates.ts | 16 +- src/resources/origin-ca-certificates.ts | 9 - .../origin-post-quantum-encryption.ts | 6 - .../hostnames/certificates.ts | 27 +- .../hostnames/hostnames.ts | 22 +- .../origin-tls-client-auth/hostnames/index.ts | 20 +- src/resources/origin-tls-client-auth/index.ts | 17 +- .../origin-tls-client-auth.ts | 42 +- src/resources/page-shield/connections.ts | 21 +- src/resources/page-shield/index.ts | 20 +- src/resources/page-shield/page-shield.ts | 25 +- src/resources/page-shield/policies.ts | 26 +- src/resources/page-shield/scripts.ts | 15 +- src/resources/pagerules/index.ts | 15 +- src/resources/pagerules/pagerules.ts | 352 +- src/resources/pagerules/settings.ts | 8 +- src/resources/pages/index.ts | 9 +- src/resources/pages/pages.ts | 7 +- .../pages/projects/deployments/deployments.ts | 24 +- src/resources/pages/projects/index.ts | 29 +- src/resources/pages/projects/projects.ts | 95 +- src/resources/pcaps/index.ts | 15 +- src/resources/pcaps/ownership.ts | 24 +- src/resources/pcaps/pcaps.ts | 489 +-- src/resources/plans.ts | 6 - src/resources/queues/index.ts | 16 +- src/resources/queues/queues.ts | 13 - src/resources/r2/buckets.ts | 20 +- src/resources/r2/index.ts | 10 +- src/resources/r2/r2.ts | 8 +- src/resources/r2/sippy.ts | 22 +- src/resources/radar/index.ts | 15 +- src/resources/radar/radar.ts | 12 - src/resources/rate-limits.ts | 193 +- src/resources/rate-plans.ts | 99 +- src/resources/registrar/domains.ts | 199 +- src/resources/registrar/index.ts | 7 +- src/resources/registrar/registrar.ts | 5 +- src/resources/rules/index.ts | 6 +- src/resources/rules/lists/index.ts | 6 +- src/resources/rules/lists/items.ts | 102 +- src/resources/rules/lists/lists.ts | 60 +- src/resources/rules/rules.ts | 6 +- src/resources/rulesets/index.ts | 19 +- src/resources/rulesets/rulesets.ts | 16 - src/resources/rum/index.ts | 6 +- src/resources/rum/rules.ts | 18 +- src/resources/rum/rum.ts | 6 +- src/resources/rum/site-info.ts | 41 +- src/resources/secondary-dns/acls.ts | 35 +- src/resources/secondary-dns/force-axfr.ts | 12 +- src/resources/secondary-dns/index.ts | 20 +- src/resources/secondary-dns/outgoing/index.ts | 4 +- .../secondary-dns/outgoing/outgoing.ts | 22 +- .../secondary-dns/outgoing/status.ts | 7 +- src/resources/secondary-dns/peers.ts | 39 +- src/resources/secondary-dns/secondary-dns.ts | 20 +- src/resources/secondary-dns/tsigs.ts | 39 +- src/resources/shared.ts | 444 +-- src/resources/snippets/index.ts | 2 +- src/resources/snippets/snippets.ts | 4 - src/resources/spectrum/analytics/analytics.ts | 1 + .../spectrum/analytics/events/bytimes.ts | 3 +- .../spectrum/analytics/events/events.ts | 4 + .../spectrum/analytics/events/index.ts | 2 +- .../spectrum/analytics/events/summaries.ts | 3 +- src/resources/spectrum/analytics/index.ts | 2 +- src/resources/spectrum/apps.ts | 301 +- src/resources/spectrum/spectrum.ts | 81 + src/resources/speed/availabilities.ts | 51 +- src/resources/speed/index.ts | 18 +- src/resources/speed/pages.ts | 40 +- src/resources/speed/schedule.ts | 4 +- src/resources/speed/speed.ts | 138 +- src/resources/speed/tests.ts | 220 +- .../certificate-packs/certificate-packs.ts | 5 +- src/resources/ssl/certificate-packs/index.ts | 1 + src/resources/ssl/certificate-packs/order.ts | 5 +- src/resources/ssl/index.ts | 7 +- src/resources/ssl/ssl.ts | 5 +- src/resources/ssl/verification.ts | 14 +- src/resources/storage/analytics.ts | 41 +- src/resources/storage/index.ts | 6 +- src/resources/storage/storage.ts | 4 +- src/resources/stream/audio-tracks.ts | 14 +- src/resources/stream/captions.ts | 6 +- src/resources/stream/clip.ts | 23 +- src/resources/stream/copy.ts | 6 +- src/resources/stream/direct-upload.ts | 5 +- src/resources/stream/index.ts | 36 +- src/resources/stream/keys.ts | 8 +- src/resources/stream/live-inputs/index.ts | 6 +- .../stream/live-inputs/live-inputs.ts | 36 +- src/resources/stream/live-inputs/outputs.ts | 20 +- src/resources/stream/stream.ts | 58 +- src/resources/stream/watermarks.ts | 16 +- src/resources/subscriptions.ts | 163 +- src/resources/url-normalization.ts | 8 - src/resources/url-scanner/index.ts | 2 +- src/resources/url-scanner/url-scanner.ts | 3 - src/resources/user/firewall/access-rules.ts | 308 +- src/resources/user/firewall/firewall.ts | 6 +- src/resources/user/firewall/index.ts | 6 +- src/resources/user/index.ts | 37 +- src/resources/user/invites.ts | 112 +- .../load-balancers/analytics/analytics.ts | 4 +- .../user/load-balancers/analytics/events.ts | 25 +- .../user/load-balancers/analytics/index.ts | 2 +- src/resources/user/load-balancers/index.ts | 2 +- .../user/load-balancers/load-balancers.ts | 4 +- src/resources/user/load-balancers/pools.ts | 787 +--- src/resources/user/load-balancers/preview.ts | 14 +- src/resources/user/organizations.ts | 3 +- src/resources/user/subscriptions.ts | 151 +- src/resources/user/tokens/index.ts | 16 +- .../user/tokens/permission-groups.ts | 31 + src/resources/user/tokens/tokens.ts | 117 +- src/resources/user/tokens/value.ts | 16 +- src/resources/user/user.ts | 79 +- src/resources/vectorize/index.ts | 15 +- src/resources/vectorize/indexes.ts | 105 +- src/resources/vectorize/vectorize.ts | 13 +- src/resources/waiting-rooms/events/details.ts | 95 +- src/resources/waiting-rooms/events/events.ts | 439 +- src/resources/waiting-rooms/events/index.ts | 12 +- src/resources/waiting-rooms/index.ts | 51 +- src/resources/waiting-rooms/rules.ts | 74 +- src/resources/waiting-rooms/waiting-rooms.ts | 616 +-- src/resources/warp-connector.ts | 11 - src/resources/web3/hostnames/hostnames.ts | 32 +- src/resources/web3/hostnames/index.ts | 4 +- .../content-lists/content-lists.ts | 16 +- .../content-lists/entries.ts | 18 +- .../content-lists/index.ts | 4 +- .../hostnames/ipfs-universal-paths/index.ts | 6 +- .../ipfs-universal-paths.ts | 2 +- src/resources/web3/index.ts | 4 +- src/resources/web3/web3.ts | 4 +- .../dispatch/namespaces/index.ts | 8 +- .../dispatch/namespaces/namespaces.ts | 2 +- .../dispatch/namespaces/scripts/bindings.ts | 222 +- .../dispatch/namespaces/scripts/content.ts | 4 +- .../dispatch/namespaces/scripts/index.ts | 18 +- .../dispatch/namespaces/scripts/scripts.ts | 168 +- .../dispatch/namespaces/scripts/settings.ts | 117 +- src/resources/workers/domains.ts | 27 +- src/resources/workers/index.ts | 38 +- src/resources/workers/scripts/bindings.ts | 28 +- src/resources/workers/scripts/content.ts | 4 +- src/resources/workers/scripts/index.ts | 36 +- src/resources/workers/scripts/scripts.ts | 219 +- src/resources/workers/scripts/settings.ts | 104 +- src/resources/workers/scripts/tail.ts | 42 + .../workers/scripts/versions/index.ts | 6 +- .../workers/scripts/versions/settings.ts | 1141 +----- .../workers/scripts/versions/versions.ts | 6 +- .../workers/services/environments/content.ts | 4 +- .../services/environments/environments.ts | 2 - .../workers/services/environments/index.ts | 8 +- .../workers/services/environments/settings.ts | 117 +- src/resources/workers/workers.ts | 347 +- src/resources/zero-trust/access/access.ts | 431 +- .../access/applications/applications.ts | 1056 ++--- .../zero-trust/access/applications/cas.ts | 19 +- .../zero-trust/access/applications/index.ts | 55 +- .../access/applications/policies.ts | 3395 +--------------- .../access/applications/user-policy-checks.ts | 23 +- src/resources/zero-trust/access/bookmarks.ts | 31 +- .../access/certificates/certificates.ts | 50 +- .../zero-trust/access/certificates/index.ts | 8 +- .../access/certificates/settings.ts | 10 +- .../zero-trust/access/custom-pages.ts | 28 +- src/resources/zero-trust/access/groups.ts | 3535 +---------------- src/resources/zero-trust/access/index.ts | 108 +- .../zero-trust/access/logs/access-requests.ts | 6 +- src/resources/zero-trust/access/logs/index.ts | 2 +- src/resources/zero-trust/access/logs/logs.ts | 1 - .../zero-trust/access/service-tokens.ts | 38 +- src/resources/zero-trust/access/tags.ts | 31 +- .../access/users/active-sessions.ts | 7 +- .../zero-trust/access/users/index.ts | 4 +- .../access/users/last-seen-identity.ts | 25 +- .../zero-trust/access/users/users.ts | 17 +- src/resources/zero-trust/devices/devices.ts | 37 +- src/resources/zero-trust/devices/dex-tests.ts | 165 +- src/resources/zero-trust/devices/index.ts | 71 +- src/resources/zero-trust/devices/networks.ts | 37 +- .../zero-trust/devices/policies/excludes.ts | 20 +- .../devices/policies/fallback-domains.ts | 20 +- .../zero-trust/devices/policies/includes.ts | 20 +- .../zero-trust/devices/policies/index.ts | 34 +- .../zero-trust/devices/policies/policies.ts | 85 +- .../zero-trust/devices/posture/index.ts | 25 +- .../devices/posture/integrations.ts | 28 +- .../zero-trust/devices/posture/posture.ts | 1378 +------ src/resources/zero-trust/devices/settings.ts | 18 +- src/resources/zero-trust/dex/dex.ts | 33 +- .../zero-trust/dex/fleet-status/devices.ts | 15 +- .../dex/fleet-status/fleet-status.ts | 71 +- .../zero-trust/dex/fleet-status/index.ts | 8 +- .../zero-trust/dex/http-tests/http-tests.ts | 191 +- .../zero-trust/dex/http-tests/index.ts | 8 +- .../zero-trust/dex/http-tests/percentiles.ts | 101 +- src/resources/zero-trust/dex/index.ts | 29 +- src/resources/zero-trust/dex/tests/index.ts | 10 +- src/resources/zero-trust/dex/tests/tests.ts | 92 +- .../zero-trust/dex/tests/unique-devices.ts | 11 +- .../dex/traceroute-test-results/index.ts | 6 +- .../traceroute-test-results/network-path.ts | 16 +- .../traceroute-test-results.ts | 4 +- .../zero-trust/dex/traceroute-tests.ts | 387 +- .../zero-trust/dlp/datasets/datasets.ts | 44 +- .../zero-trust/dlp/datasets/index.ts | 10 +- .../zero-trust/dlp/datasets/upload.ts | 12 +- src/resources/zero-trust/dlp/dlp.ts | 17 +- src/resources/zero-trust/dlp/index.ts | 33 +- src/resources/zero-trust/dlp/payload-logs.ts | 20 +- .../zero-trust/dlp/profiles/custom.ts | 182 +- .../zero-trust/dlp/profiles/index.ts | 27 +- .../zero-trust/dlp/profiles/predefined.ts | 76 +- .../zero-trust/dlp/profiles/profiles.ts | 58 +- src/resources/zero-trust/gateway/app-types.ts | 20 +- .../zero-trust/gateway/audit-ssh-settings.ts | 18 +- .../zero-trust/gateway/categories.ts | 16 +- .../zero-trust/gateway/configurations.ts | 369 +- src/resources/zero-trust/gateway/gateway.ts | 46 +- src/resources/zero-trust/gateway/index.ts | 100 +- .../zero-trust/gateway/lists/index.ts | 7 +- .../zero-trust/gateway/lists/items.ts | 23 +- .../zero-trust/gateway/lists/lists.ts | 81 +- src/resources/zero-trust/gateway/locations.ts | 89 +- src/resources/zero-trust/gateway/logging.ts | 42 +- .../zero-trust/gateway/proxy-endpoints.ts | 44 +- src/resources/zero-trust/gateway/rules.ts | 1961 ++------- .../zero-trust/identity-providers.ts | 742 +--- src/resources/zero-trust/index.ts | 88 +- src/resources/zero-trust/networks/index.ts | 12 +- src/resources/zero-trust/networks/networks.ts | 9 +- .../zero-trust/networks/routes/index.ts | 8 +- .../zero-trust/networks/routes/ips.ts | 8 +- .../zero-trust/networks/routes/networks.ts | 12 +- .../zero-trust/networks/routes/routes.ts | 73 +- .../zero-trust/networks/virtual-networks.ts | 19 +- src/resources/zero-trust/organizations.ts | 150 +- src/resources/zero-trust/seats.ts | 6 +- .../zero-trust/tunnels/connections.ts | 10 +- .../zero-trust/tunnels/connectors.ts | 4 +- src/resources/zero-trust/tunnels/index.ts | 17 +- src/resources/zero-trust/tunnels/tunnels.ts | 140 +- src/resources/zero-trust/zero-trust.ts | 37 +- src/resources/zones/dns-settings.ts | 31 +- src/resources/zones/holds.ts | 27 +- src/resources/zones/index.ts | 35 +- src/resources/zones/subscriptions.ts | 161 +- src/resources/zones/zones.ts | 14 +- .../firewall/waf/packages/packages.test.ts | 4 +- tests/api-resources/images/v1/v1.test.ts | 8 +- .../zero-trust/devices/dex-tests.test.ts | 12 + 419 files changed, 11777 insertions(+), 32783 deletions(-) diff --git a/api.md b/api.md index 0a8cf86e2c..39b245613f 100644 --- a/api.md +++ b/api.md @@ -23,11 +23,9 @@ Types: - UnnamedSchemaRefB92f86eb861cd3dee83c40884802fda6 - UnnamedSchemaRefCc2ac1a037e5d6702fc77b3bcb527854 - UnnamedSchemaRefD8600eb4758b3ae35607a0327bcd691b -- UnnamedSchemaRefDfef9380cb53cc7d4bda9f75e109d7a2 - UnnamedSchemaRefE7c61ebe06ebfc3861ae8b9db4ba152b - UnnamedSchemaRefEc4d85c3d1bcc6b3b7e99c199ae99846 - UnnamedSchemaRefEe1e79edcb234d14c4dd266880f2fd24 -- UnnamedSchemaRefFb1dc8bb871d835b75bd0c2f50bd8572 # Accounts @@ -47,14 +45,14 @@ Methods: Types: - Member -- MemberPermission -- MemberWithCode +- MemberWithInviteCode +- Role - MemberListResponse - MemberDeleteResponse Methods: -- client.accounts.members.create({ ...params }) -> MemberWithCode +- client.accounts.members.create({ ...params }) -> MemberWithInviteCode - client.accounts.members.update(memberId, { ...params }) -> Member - client.accounts.members.list({ ...params }) -> MemberListResponsesV4PagePaginationArray - client.accounts.members.delete(memberId, { ...params }) -> MemberDeleteResponse | null @@ -66,11 +64,10 @@ Types: - PermissionGrant - Role -- RoleListResponse Methods: -- client.accounts.roles.list({ ...params }) -> RoleListResponsesSinglePage +- client.accounts.roles.list({ ...params }) -> RolesSinglePage - client.accounts.roles.get(roleId, { ...params }) -> UnnamedSchemaRef9444735ca60712dbcf8afd832eb5716a # OriginCACertificates @@ -114,10 +111,6 @@ Methods: # User -Types: - -- User - Methods: - client.user.edit({ ...params }) -> UnnamedSchemaRef9444735ca60712dbcf8afd832eb5716a @@ -158,26 +151,27 @@ Methods: Types: -- AccessRule +- AccessRuleCreateResponse +- AccessRuleListResponse - AccessRuleDeleteResponse +- AccessRuleEditResponse Methods: -- client.user.firewall.accessRules.create({ ...params }) -> AccessRule | null -- client.user.firewall.accessRules.list({ ...params }) -> AccessRulesV4PagePaginationArray -- client.user.firewall.accessRules.delete(identifier, { ...params }) -> AccessRuleDeleteResponse | null -- client.user.firewall.accessRules.edit(identifier, { ...params }) -> AccessRule | null +- client.user.firewall.accessRules.create({ ...params }) -> AccessRuleCreateResponse +- client.user.firewall.accessRules.list({ ...params }) -> AccessRuleListResponsesV4PagePaginationArray +- client.user.firewall.accessRules.delete(identifier, { ...params }) -> AccessRuleDeleteResponse +- client.user.firewall.accessRules.edit(identifier, { ...params }) -> AccessRuleEditResponse ## Invites Types: - Invite -- InviteListResponse Methods: -- client.user.invites.list() -> InviteListResponsesSinglePage +- client.user.invites.list() -> InvitesSinglePage - client.user.invites.edit(inviteId, { ...params }) -> UnnamedSchemaRef9444735ca60712dbcf8afd832eb5716a - client.user.invites.get(inviteId) -> UnnamedSchemaRef9444735ca60712dbcf8afd832eb5716a @@ -229,11 +223,11 @@ Methods: Types: -- LoadBalancingPreview +- Preview Methods: -- client.user.loadBalancers.preview.get(previewId) -> LoadBalancingPreview +- client.user.loadBalancers.preview.get(previewId) -> Preview ### Analytics @@ -241,11 +235,11 @@ Methods: Types: -- LoadBalancingAnalytics +- Analytics Methods: -- client.user.loadBalancers.analytics.events.list({ ...params }) -> LoadBalancingAnalyticsSinglePage +- client.user.loadBalancers.analytics.events.list({ ...params }) -> AnalyticsSinglePage ## Organizations @@ -279,6 +273,8 @@ Methods: Types: +- CIDRListItem +- Policy - TokenCreateResponse - TokenListResponse - TokenDeleteResponse @@ -297,6 +293,8 @@ Methods: Types: +- Permission +- PermissionItem - PermissionGroupListResponse Methods: @@ -307,11 +305,11 @@ Methods: Types: -- TokenValue +- Value Methods: -- client.user.tokens.value.update(tokenId, { ...params }) -> TokenValue +- client.user.tokens.value.update(tokenId, { ...params }) -> Value # Zones @@ -343,6 +341,7 @@ Methods: Types: - DNSSetting +- Nameserver Methods: @@ -924,13 +923,13 @@ Methods: Types: -- UnnamedSchemaRef45004a9444b6da9f88158ed2fb9a5820 +- ZoneHold Methods: -- client.zones.holds.create({ ...params }) -> UnnamedSchemaRef45004a9444b6da9f88158ed2fb9a5820 -- client.zones.holds.delete({ ...params }) -> UnnamedSchemaRef45004a9444b6da9f88158ed2fb9a5820 -- client.zones.holds.get({ ...params }) -> UnnamedSchemaRef45004a9444b6da9f88158ed2fb9a5820 +- client.zones.holds.create({ ...params }) -> ZoneHold +- client.zones.holds.delete({ ...params }) -> ZoneHold +- client.zones.holds.get({ ...params }) -> ZoneHold ## Workers @@ -944,21 +943,32 @@ Methods: ## Subscriptions -Types: - -- SubscriptionListResponse - Methods: - client.zones.subscriptions.create(identifier, { ...params }) -> UnnamedSchemaRef9444735ca60712dbcf8afd832eb5716a -- client.zones.subscriptions.list(accountIdentifier) -> SubscriptionListResponsesSinglePage +- client.zones.subscriptions.list(accountIdentifier) -> SubscriptionsSinglePage - client.zones.subscriptions.get(identifier) -> UnnamedSchemaRef9444735ca60712dbcf8afd832eb5716a # LoadBalancers Types: +- AdaptiveRouting +- CheckRegion +- DefaultPoolsItem +- FilterOptions +- Header +- HostItem - LoadBalancer +- LoadShedding +- LocationStrategy +- NotificationFilter +- Origin +- OriginItem +- OriginSteering +- RandomSteering +- RulesItem +- SessionAffinityAttributes - UnnamedSchemaRef06ba14ec7860c091efc98fd9af30f382 - LoadBalancerDeleteResponse @@ -1047,7 +1057,7 @@ Methods: Methods: -- client.loadBalancers.previews.get(previewId, { ...params }) -> LoadBalancingPreview +- client.loadBalancers.previews.get(previewId, { ...params }) -> Preview ## Regions @@ -1146,6 +1156,7 @@ Methods: Types: +- HostItem - CertificatePackListResponse - CertificatePackEditResponse @@ -1203,7 +1214,7 @@ Methods: Types: -- TLSVerificationSetting +- Verification - VerificationEditResponse - VerificationGetResponse @@ -1216,14 +1227,13 @@ Methods: Types: -- SubscriptionListResponse - SubscriptionDeleteResponse Methods: - client.subscriptions.create(identifier, { ...params }) -> UnnamedSchemaRef9444735ca60712dbcf8afd832eb5716a - client.subscriptions.update(accountIdentifier, subscriptionIdentifier, { ...params }) -> UnnamedSchemaRef9444735ca60712dbcf8afd832eb5716a -- client.subscriptions.list(accountIdentifier) -> SubscriptionListResponsesSinglePage +- client.subscriptions.list(accountIdentifier) -> SubscriptionsSinglePage - client.subscriptions.delete(accountIdentifier, subscriptionIdentifier, { ...params }) -> SubscriptionDeleteResponse - client.subscriptions.get(identifier) -> UnnamedSchemaRef9444735ca60712dbcf8afd832eb5716a @@ -1272,6 +1282,7 @@ Methods: Types: +- Component - RatePlan - RatePlanGetResponse @@ -1285,6 +1296,7 @@ Methods: Types: +- HostnameAssociationItem - TLSHostnameAssociation - HostnameAssociationUpdateResponse - HostnameAssociationGetResponse @@ -1313,6 +1325,7 @@ Methods: Types: - CustomCertificate +- GeoRestrictions Methods: @@ -1337,22 +1350,19 @@ Methods: Types: - CustomHostname +- SSL - UnnamedSchemaRef16aca57bde2963201c7e6e895436c1c1 - UnnamedSchemaRef78adb375f06c6d462dd92b99e2ecf510 - UnnamedSchemaRef9a9935a9a770967bb604ae41a81e42e1 - UnnamedSchemaRefD2a16d7ee1ad3a888dd5821c918d51fd -- CustomHostnameCreateResponse -- CustomHostnameListResponse -- CustomHostnameEditResponse -- CustomHostnameGetResponse Methods: -- client.customHostnames.create({ ...params }) -> CustomHostnameCreateResponse -- client.customHostnames.list({ ...params }) -> CustomHostnameListResponsesV4PagePaginationArray +- client.customHostnames.create({ ...params }) -> CustomHostname +- client.customHostnames.list({ ...params }) -> CustomHostnamesV4PagePaginationArray - client.customHostnames.delete(customHostnameId, { ...params }) -> UnnamedSchemaRef8900f4cb9dca9b9ed0ac41ad571e6837 -- client.customHostnames.edit(customHostnameId, { ...params }) -> CustomHostnameEditResponse -- client.customHostnames.get(customHostnameId, { ...params }) -> CustomHostnameGetResponse +- client.customHostnames.edit(customHostnameId, { ...params }) -> CustomHostname +- client.customHostnames.get(customHostnameId, { ...params }) -> CustomHostname ## FallbackOrigin @@ -1440,37 +1450,40 @@ Methods: Types: -- DNSAnalyticsReport +- Report Methods: -- client.dns.analytics.reports.get({ ...params }) -> DNSAnalyticsReport +- client.dns.analytics.reports.get({ ...params }) -> Report #### Bytimes Types: -- DNSAnalyticsReportByTime +- ByTime Methods: -- client.dns.analytics.reports.bytimes.get({ ...params }) -> DNSAnalyticsReportByTime +- client.dns.analytics.reports.bytimes.get({ ...params }) -> ByTime ## Firewall Types: -- DNSFirewall +- AttackMitigation +- Firewall +- FirewallIPsItem - UnnamedSchemaRef7a0f93d9e1afc3221d2a57b7bab16955 +- UpstreamIPsItems - FirewallDeleteResponse Methods: -- client.dns.firewall.create({ ...params }) -> DNSFirewall -- client.dns.firewall.list({ ...params }) -> DNSFirewallsV4PagePaginationArray +- client.dns.firewall.create({ ...params }) -> Firewall +- client.dns.firewall.list({ ...params }) -> FirewallsV4PagePaginationArray - client.dns.firewall.delete(dnsFirewallId, { ...params }) -> FirewallDeleteResponse -- client.dns.firewall.edit(dnsFirewallId, { ...params }) -> DNSFirewall -- client.dns.firewall.get(dnsFirewallId, { ...params }) -> DNSFirewall +- client.dns.firewall.edit(dnsFirewallId, { ...params }) -> Firewall +- client.dns.firewall.get(dnsFirewallId, { ...params }) -> Firewall ### Analytics @@ -1478,13 +1491,13 @@ Methods: Methods: -- client.dns.firewall.analytics.reports.get(dnsFirewallId, { ...params }) -> DNSAnalyticsReport +- client.dns.firewall.analytics.reports.get(dnsFirewallId, { ...params }) -> Report ##### Bytimes Methods: -- client.dns.firewall.analytics.reports.bytimes.get(dnsFirewallId, { ...params }) -> DNSAnalyticsReportByTime +- client.dns.firewall.analytics.reports.bytimes.get(dnsFirewallId, { ...params }) -> ByTime # DNSSEC @@ -1502,22 +1515,19 @@ Methods: Types: -- EmailSettings -- EmailRoutingDisableResponse -- EmailRoutingEnableResponse -- EmailRoutingGetResponse +- Settings Methods: -- client.emailRouting.disable(zoneIdentifier, { ...params }) -> EmailRoutingDisableResponse -- client.emailRouting.enable(zoneIdentifier, { ...params }) -> EmailRoutingEnableResponse -- client.emailRouting.get(zoneIdentifier) -> EmailRoutingGetResponse +- client.emailRouting.disable(zoneIdentifier, { ...params }) -> Settings +- client.emailRouting.enable(zoneIdentifier, { ...params }) -> Settings +- client.emailRouting.get(zoneIdentifier) -> Settings ## DNS Types: -- EmailDNSRecord +- DNSRecord - DNSGetResponse Methods: @@ -1528,64 +1538,65 @@ Methods: Types: -- EmailRules -- RuleCreateResponse -- RuleUpdateResponse -- RuleListResponse -- RuleDeleteResponse -- RuleGetResponse +- Action +- ActionItem +- EmailRule +- Matcher +- MatcherItem +- Properties Methods: -- client.emailRouting.rules.create(zoneIdentifier, { ...params }) -> RuleCreateResponse -- client.emailRouting.rules.update(zoneIdentifier, ruleIdentifier, { ...params }) -> RuleUpdateResponse -- client.emailRouting.rules.list(zoneIdentifier, { ...params }) -> RuleListResponsesV4PagePaginationArray -- client.emailRouting.rules.delete(zoneIdentifier, ruleIdentifier) -> RuleDeleteResponse -- client.emailRouting.rules.get(zoneIdentifier, ruleIdentifier) -> RuleGetResponse +- client.emailRouting.rules.create(zoneIdentifier, { ...params }) -> EmailRule +- client.emailRouting.rules.update(zoneIdentifier, ruleIdentifier, { ...params }) -> EmailRule +- client.emailRouting.rules.list(zoneIdentifier, { ...params }) -> EmailRulesV4PagePaginationArray +- client.emailRouting.rules.delete(zoneIdentifier, ruleIdentifier) -> EmailRule +- client.emailRouting.rules.get(zoneIdentifier, ruleIdentifier) -> EmailRule ### CatchAlls Types: -- EmailCatchAllRule +- Action +- CatchAllRule +- Matcher Methods: -- client.emailRouting.rules.catchAlls.update(zoneIdentifier, { ...params }) -> EmailCatchAllRule -- client.emailRouting.rules.catchAlls.get(zoneIdentifier) -> EmailCatchAllRule +- client.emailRouting.rules.catchAlls.update(zoneIdentifier, { ...params }) -> CatchAllRule +- client.emailRouting.rules.catchAlls.get(zoneIdentifier) -> CatchAllRule ## Addresses Types: -- EmailAddresses -- AddressCreateResponse -- AddressListResponse -- AddressDeleteResponse -- AddressGetResponse +- Address +- DestinationAddress Methods: -- client.emailRouting.addresses.create(accountIdentifier, { ...params }) -> AddressCreateResponse -- client.emailRouting.addresses.list(accountIdentifier, { ...params }) -> AddressListResponsesV4PagePaginationArray -- client.emailRouting.addresses.delete(accountIdentifier, destinationAddressIdentifier) -> AddressDeleteResponse -- client.emailRouting.addresses.get(accountIdentifier, destinationAddressIdentifier) -> AddressGetResponse +- client.emailRouting.addresses.create(accountIdentifier, { ...params }) -> Address +- client.emailRouting.addresses.list(accountIdentifier, { ...params }) -> AddressesV4PagePaginationArray +- client.emailRouting.addresses.delete(accountIdentifier, destinationAddressIdentifier) -> Address +- client.emailRouting.addresses.get(accountIdentifier, destinationAddressIdentifier) -> Address # Filters Types: -- FirewallFilter -- UnnamedSchemaRef39af4f78d23244e2595fb47c811221df - FilterCreateResponse +- FilterUpdateResponse +- FilterListResponse +- FilterDeleteResponse +- FilterGetResponse Methods: - client.filters.create(zoneIdentifier, { ...params }) -> FilterCreateResponse | null -- client.filters.update(zoneIdentifier, id, { ...params }) -> FirewallFilter | null -- client.filters.list(zoneIdentifier, { ...params }) -> FirewallFiltersV4PagePaginationArray -- client.filters.delete(zoneIdentifier, id, { ...params }) -> FirewallFilter | null -- client.filters.get(zoneIdentifier, id) -> FirewallFilter | null +- client.filters.update(zoneIdentifier, id, { ...params }) -> FilterUpdateResponse +- client.filters.list(zoneIdentifier, { ...params }) -> FilterListResponsesV4PagePaginationArray +- client.filters.delete(zoneIdentifier, id, { ...params }) -> FilterDeleteResponse +- client.filters.get(zoneIdentifier, id) -> FilterGetResponse # Firewall @@ -1593,36 +1604,39 @@ Methods: Types: -- FirewallZoneLockdown -- UnnamedSchemaRefA4044d3c73ad1e6c8fff4dc05f922ab5 +- LockdownCreateResponse +- LockdownUpdateResponse +- LockdownListResponse - LockdownDeleteResponse +- LockdownGetResponse Methods: -- client.firewall.lockdowns.create(zoneIdentifier, { ...params }) -> FirewallZoneLockdown | null -- client.firewall.lockdowns.update(zoneIdentifier, id, { ...params }) -> FirewallZoneLockdown | null -- client.firewall.lockdowns.list(zoneIdentifier, { ...params }) -> FirewallZoneLockdownsV4PagePaginationArray +- client.firewall.lockdowns.create(zoneIdentifier, { ...params }) -> LockdownCreateResponse +- client.firewall.lockdowns.update(zoneIdentifier, id, { ...params }) -> LockdownUpdateResponse +- client.firewall.lockdowns.list(zoneIdentifier, { ...params }) -> LockdownListResponsesV4PagePaginationArray - client.firewall.lockdowns.delete(zoneIdentifier, id, { ...params }) -> LockdownDeleteResponse -- client.firewall.lockdowns.get(zoneIdentifier, id) -> FirewallZoneLockdown | null +- client.firewall.lockdowns.get(zoneIdentifier, id) -> LockdownGetResponse ## Rules Types: -- FirewallFilterRule -- UnnamedSchemaRef6fe6c1eba94d9c3f475fb22f0118bf57 -- UnnamedSchemaRefAb48d2d33259c9107401d174735701c7 - RuleCreateResponse +- RuleUpdateResponse +- RuleListResponse +- RuleDeleteResponse - RuleEditResponse +- RuleGetResponse Methods: - client.firewall.rules.create(zoneIdentifier, { ...params }) -> RuleCreateResponse | null -- client.firewall.rules.update(zoneIdentifier, id, { ...params }) -> FirewallFilterRule | null -- client.firewall.rules.list(zoneIdentifier, { ...params }) -> FirewallFilterRulesV4PagePaginationArray -- client.firewall.rules.delete(zoneIdentifier, id, { ...params }) -> FirewallFilterRule | null +- client.firewall.rules.update(zoneIdentifier, id, { ...params }) -> RuleUpdateResponse +- client.firewall.rules.list(zoneIdentifier, { ...params }) -> RuleListResponsesV4PagePaginationArray +- client.firewall.rules.delete(zoneIdentifier, id, { ...params }) -> RuleDeleteResponse - client.firewall.rules.edit(zoneIdentifier, id, { ...params }) -> RuleEditResponse | null -- client.firewall.rules.get(zoneIdentifier, { ...params }) -> FirewallFilterRule | null +- client.firewall.rules.get(zoneIdentifier, { ...params }) -> RuleGetResponse ## AccessRules @@ -1643,7 +1657,6 @@ Methods: Types: -- FirewallUserAgentRule - UARuleListResponse - UARuleDeleteResponse @@ -1652,7 +1665,7 @@ Methods: - client.firewall.uaRules.create(zoneIdentifier, { ...params }) -> UnnamedSchemaRef9444735ca60712dbcf8afd832eb5716a - client.firewall.uaRules.update(zoneIdentifier, id, { ...params }) -> UnnamedSchemaRef9444735ca60712dbcf8afd832eb5716a - client.firewall.uaRules.list(zoneIdentifier, { ...params }) -> UARuleListResponsesV4PagePaginationArray -- client.firewall.uaRules.delete(zoneIdentifier, id, { ...params }) -> UARuleDeleteResponse | null +- client.firewall.uaRules.delete(zoneIdentifier, id, { ...params }) -> UARuleDeleteResponse - client.firewall.uaRules.get(zoneIdentifier, id) -> UnnamedSchemaRef9444735ca60712dbcf8afd832eb5716a ## WAF @@ -1661,17 +1674,19 @@ Methods: Types: -- UnnamedSchemaRefA9cc7506f87ce3d646e3794e609120a1 -- WAFOverride +- OverrideCreateResponse +- OverrideUpdateResponse +- OverrideListResponse - OverrideDeleteResponse +- OverrideGetResponse Methods: -- client.firewall.waf.overrides.create(zoneIdentifier, { ...params }) -> WAFOverride | null -- client.firewall.waf.overrides.update(zoneIdentifier, id, { ...params }) -> WAFOverride | null -- client.firewall.waf.overrides.list(zoneIdentifier, { ...params }) -> WAFOverridesV4PagePaginationArray +- client.firewall.waf.overrides.create(zoneIdentifier, { ...params }) -> OverrideCreateResponse +- client.firewall.waf.overrides.update(zoneIdentifier, id, { ...params }) -> OverrideUpdateResponse +- client.firewall.waf.overrides.list(zoneIdentifier, { ...params }) -> OverrideListResponsesV4PagePaginationArray - client.firewall.waf.overrides.delete(zoneIdentifier, id, { ...params }) -> OverrideDeleteResponse -- client.firewall.waf.overrides.get(zoneIdentifier, id) -> WAFOverride | null +- client.firewall.waf.overrides.get(zoneIdentifier, id) -> OverrideGetResponse ### Packages @@ -1689,11 +1704,11 @@ Methods: Types: -- WAFManagedRulesGroup +- Group Methods: -- client.firewall.waf.packages.groups.list(packageId, { ...params }) -> WAFManagedRulesGroupsV4PagePaginationArray +- client.firewall.waf.packages.groups.list(packageId, { ...params }) -> GroupsV4PagePaginationArray - client.firewall.waf.packages.groups.edit(packageId, groupId, { ...params }) -> UnnamedSchemaRef9444735ca60712dbcf8afd832eb5716a - client.firewall.waf.packages.groups.get(packageId, groupId, { ...params }) -> UnnamedSchemaRef9444735ca60712dbcf8afd832eb5716a @@ -1701,13 +1716,14 @@ Methods: Types: +- AllowedModesAnomalyItem +- Rule - UnnamedSchemaRef532d8b97684c9032dd36bae8acddebf5 -- WAFManagedRulesRule - RuleEditResponse Methods: -- client.firewall.waf.packages.rules.list(packageId, { ...params }) -> WAFManagedRulesRulesV4PagePaginationArray +- client.firewall.waf.packages.rules.list(packageId, { ...params }) -> RulesV4PagePaginationArray - client.firewall.waf.packages.rules.edit(packageId, ruleId, { ...params }) -> RuleEditResponse - client.firewall.waf.packages.rules.get(packageId, ruleId, { ...params }) -> UnnamedSchemaRef9444735ca60712dbcf8afd832eb5716a @@ -1715,7 +1731,11 @@ Methods: Types: +- CheckRegionItem - Healthcheck +- HTTPConfiguration +- QueryHealthcheck +- TCPConfiguration - UnnamedSchemaRefAaa560acadcbf1ae1dc619ba1ea5948e - HealthcheckDeleteResponse @@ -1744,17 +1764,18 @@ Methods: Types: +- Hostname - KeylessCertificate -- KeylessCertificateHostname +- Tunnel - UnnamedSchemaRefA91f0bd72ee433f010eecfdc94ccf298 Methods: -- client.keylessCertificates.create({ ...params }) -> KeylessCertificateHostname -- client.keylessCertificates.list({ ...params }) -> KeylessCertificateHostnamesSinglePage +- client.keylessCertificates.create({ ...params }) -> Hostname +- client.keylessCertificates.list({ ...params }) -> KeylessCertificatesSinglePage - client.keylessCertificates.delete(keylessCertificateId, { ...params }) -> UnnamedSchemaRef8900f4cb9dca9b9ed0ac41ad571e6837 -- client.keylessCertificates.edit(keylessCertificateId, { ...params }) -> KeylessCertificateHostname -- client.keylessCertificates.get(keylessCertificateId, { ...params }) -> KeylessCertificateHostname +- client.keylessCertificates.edit(keylessCertificateId, { ...params }) -> Hostname +- client.keylessCertificates.get(keylessCertificateId, { ...params }) -> Hostname # Logpush @@ -1774,7 +1795,8 @@ Methods: Types: -- LogpushJob +- Job +- OutputOptions - JobGetResponse Methods: @@ -1801,11 +1823,11 @@ Types: Methods: -- client.logpush.jobs.create({ ...params }) -> LogpushJob | null -- client.logpush.jobs.update(jobId, { ...params }) -> LogpushJob | null -- client.logpush.jobs.list({ ...params }) -> LogpushJobsSinglePage +- client.logpush.jobs.create({ ...params }) -> Job | null +- client.logpush.jobs.update(jobId, { ...params }) -> Job | null +- client.logpush.jobs.list({ ...params }) -> JobsSinglePage - client.logpush.jobs.delete(jobId, { ...params }) -> UnnamedSchemaRef65e3c8c1a9c4638ec25cdbbaca7165c1 | null -- client.logpush.jobs.get(jobId, { ...params }) -> LogpushJob | null +- client.logpush.jobs.get(jobId, { ...params }) -> Job | null ## Ownership @@ -1888,13 +1910,12 @@ Methods: Types: -- OriginTLSClientCertificateZoneAuthenticatedOriginPull -- OriginTLSClientAuthListResponse +- ZoneAuthenticatedOriginPull Methods: - client.originTLSClientAuth.create({ ...params }) -> UnnamedSchemaRef9444735ca60712dbcf8afd832eb5716a -- client.originTLSClientAuth.list({ ...params }) -> OriginTLSClientAuthListResponsesSinglePage +- client.originTLSClientAuth.list({ ...params }) -> ZoneAuthenticatedOriginPullsSinglePage - client.originTLSClientAuth.delete(certificateId, { ...params }) -> UnnamedSchemaRef9444735ca60712dbcf8afd832eb5716a - client.originTLSClientAuth.get(certificateId, { ...params }) -> UnnamedSchemaRef9444735ca60712dbcf8afd832eb5716a @@ -1902,28 +1923,28 @@ Methods: Types: -- OriginTLSClientCertificateAuthenticatedOriginPull -- OriginTLSClientCertificateID +- AuthenticatedOriginPull +- ID - HostnameUpdateResponse Methods: - client.originTLSClientAuth.hostnames.update({ ...params }) -> HostnameUpdateResponse | null -- client.originTLSClientAuth.hostnames.get(hostname, { ...params }) -> OriginTLSClientCertificateID +- client.originTLSClientAuth.hostnames.get(hostname, { ...params }) -> ID ### Certificates Types: -- OriginTLSClientCertificate +- Certificate - UnnamedSchemaRefD182888b36f93a765d9ce5aefa3009e9 Methods: -- client.originTLSClientAuth.hostnames.certificates.create({ ...params }) -> OriginTLSClientCertificate -- client.originTLSClientAuth.hostnames.certificates.list({ ...params }) -> OriginTLSClientCertificateIDsSinglePage -- client.originTLSClientAuth.hostnames.certificates.delete(certificateId, { ...params }) -> OriginTLSClientCertificate -- client.originTLSClientAuth.hostnames.certificates.get(certificateId, { ...params }) -> OriginTLSClientCertificate +- client.originTLSClientAuth.hostnames.certificates.create({ ...params }) -> Certificate +- client.originTLSClientAuth.hostnames.certificates.list({ ...params }) -> AuthenticatedOriginPullsSinglePage +- client.originTLSClientAuth.hostnames.certificates.delete(certificateId, { ...params }) -> Certificate +- client.originTLSClientAuth.hostnames.certificates.get(certificateId, { ...params }) -> Certificate ## Settings @@ -1941,7 +1962,11 @@ Methods: Types: -- ZonesPagerule +- ActionItem +- PageRule +- Route +- TargesItem +- URLTarget - PageruleListResponse - PageruleDeleteResponse @@ -1958,17 +1983,16 @@ Methods: Types: -- ZonePageruleSettings +- Settings Methods: -- client.pagerules.settings.list({ ...params }) -> ZonePageruleSettings +- client.pagerules.settings.list({ ...params }) -> Settings # RateLimits Types: -- RateLimit - RateLimitListResponse - RateLimitDeleteResponse @@ -1976,7 +2000,7 @@ Methods: - client.rateLimits.create(zoneIdentifier, { ...params }) -> UnnamedSchemaRef9444735ca60712dbcf8afd832eb5716a - client.rateLimits.list(zoneIdentifier, { ...params }) -> RateLimitListResponsesV4PagePaginationArray -- client.rateLimits.delete(zoneIdentifier, id, { ...params }) -> RateLimitDeleteResponse | null +- client.rateLimits.delete(zoneIdentifier, id, { ...params }) -> RateLimitDeleteResponse - client.rateLimits.edit(zoneIdentifier, id, { ...params }) -> UnnamedSchemaRef9444735ca60712dbcf8afd832eb5716a - client.rateLimits.get(zoneIdentifier, id) -> UnnamedSchemaRef9444735ca60712dbcf8afd832eb5716a @@ -1986,11 +2010,11 @@ Methods: Types: -- SecondaryDNSForce +- ForceAXFR Methods: -- client.secondaryDNS.forceAXFR.create({ ...params }) -> SecondaryDNSForce +- client.secondaryDNS.forceAXFR.create({ ...params }) -> ForceAXFR ## Incoming @@ -2013,8 +2037,8 @@ Methods: Types: -- SecondaryDNSDisableTransfer -- SecondaryDNSEnableTransfer +- DisableTransfer +- EnableTransfer - UnnamedSchemaRef0e152c3e4c55b8a0ca6531578a42c564 - UnnamedSchemaRefBf34e74a34c9a2f63d85505dc69d4adc - OutgoingCreateResponse @@ -2028,8 +2052,8 @@ Methods: - client.secondaryDNS.outgoing.create({ ...params }) -> OutgoingCreateResponse - client.secondaryDNS.outgoing.update({ ...params }) -> OutgoingUpdateResponse - client.secondaryDNS.outgoing.delete({ ...params }) -> OutgoingDeleteResponse -- client.secondaryDNS.outgoing.disable({ ...params }) -> SecondaryDNSDisableTransfer -- client.secondaryDNS.outgoing.enable({ ...params }) -> SecondaryDNSEnableTransfer +- client.secondaryDNS.outgoing.disable({ ...params }) -> DisableTransfer +- client.secondaryDNS.outgoing.enable({ ...params }) -> EnableTransfer - client.secondaryDNS.outgoing.forceNotify({ ...params }) -> OutgoingForceNotifyResponse - client.secondaryDNS.outgoing.get({ ...params }) -> OutgoingGetResponse @@ -2037,60 +2061,63 @@ Methods: Methods: -- client.secondaryDNS.outgoing.status.get({ ...params }) -> SecondaryDNSEnableTransfer +- client.secondaryDNS.outgoing.status.get({ ...params }) -> EnableTransfer ## ACLs Types: -- SecondaryDNSACL +- ACL - UnnamedSchemaRef08eaa2f22bb9ce0f80063d710d4edafd - ACLDeleteResponse Methods: -- client.secondaryDNS.acls.create({ ...params }) -> SecondaryDNSACL -- client.secondaryDNS.acls.update(aclId, { ...params }) -> SecondaryDNSACL -- client.secondaryDNS.acls.list({ ...params }) -> SecondaryDnsaclsSinglePage +- client.secondaryDNS.acls.create({ ...params }) -> ACL +- client.secondaryDNS.acls.update(aclId, { ...params }) -> ACL +- client.secondaryDNS.acls.list({ ...params }) -> ACLsSinglePage - client.secondaryDNS.acls.delete(aclId, { ...params }) -> ACLDeleteResponse -- client.secondaryDNS.acls.get(aclId, { ...params }) -> SecondaryDNSACL +- client.secondaryDNS.acls.get(aclId, { ...params }) -> ACL ## Peers Types: -- SecondaryDNSPeer +- Peer - UnnamedSchemaRefBc727f0a53d75f2b531245a82603fbe0 - PeerDeleteResponse Methods: -- client.secondaryDNS.peers.create({ ...params }) -> SecondaryDNSPeer -- client.secondaryDNS.peers.update(peerId, { ...params }) -> SecondaryDNSPeer -- client.secondaryDNS.peers.list({ ...params }) -> SecondaryDNSPeersSinglePage +- client.secondaryDNS.peers.create({ ...params }) -> Peer +- client.secondaryDNS.peers.update(peerId, { ...params }) -> Peer +- client.secondaryDNS.peers.list({ ...params }) -> PeersSinglePage - client.secondaryDNS.peers.delete(peerId, { ...params }) -> PeerDeleteResponse -- client.secondaryDNS.peers.get(peerId, { ...params }) -> SecondaryDNSPeer +- client.secondaryDNS.peers.get(peerId, { ...params }) -> Peer ## TSIGs Types: -- SecondaryDNSTSIG +- TSIG - UnnamedSchemaRefC3d6ffaf5dde0c570eaa72462c2ee738 - TSIGDeleteResponse Methods: -- client.secondaryDNS.tsigs.create({ ...params }) -> SecondaryDNSTSIG -- client.secondaryDNS.tsigs.update(tsigId, { ...params }) -> SecondaryDNSTSIG -- client.secondaryDNS.tsigs.list({ ...params }) -> SecondaryDnstsigsSinglePage +- client.secondaryDNS.tsigs.create({ ...params }) -> TSIG +- client.secondaryDNS.tsigs.update(tsigId, { ...params }) -> TSIG +- client.secondaryDNS.tsigs.list({ ...params }) -> TSIGsSinglePage - client.secondaryDNS.tsigs.delete(tsigId, { ...params }) -> TSIGDeleteResponse -- client.secondaryDNS.tsigs.get(tsigId, { ...params }) -> SecondaryDNSTSIG +- client.secondaryDNS.tsigs.get(tsigId, { ...params }) -> TSIG # WaitingRooms Types: +- AdditionalRoutesItem +- CookieAttributes +- Query - UnnamedSchemaRefA282afe149b2cf60a204505bd4c53324 - WaitingRoom - WaitingRoomDeleteResponse @@ -2118,35 +2145,41 @@ Methods: Types: +- Event - UnnamedSchemaRef229c159575bc68a9c21f5a1615629cf6 -- WaitingroomEvent +- EventCreateResponse +- EventUpdateResponse +- EventListResponse - EventDeleteResponse +- EventEditResponse +- EventGetResponse Methods: -- client.waitingRooms.events.create(waitingRoomId, { ...params }) -> WaitingroomEvent -- client.waitingRooms.events.update(waitingRoomId, eventId, { ...params }) -> WaitingroomEvent -- client.waitingRooms.events.list(waitingRoomId, { ...params }) -> WaitingroomEventsSinglePage +- client.waitingRooms.events.create(waitingRoomId, { ...params }) -> EventCreateResponse +- client.waitingRooms.events.update(waitingRoomId, eventId, { ...params }) -> EventUpdateResponse +- client.waitingRooms.events.list(waitingRoomId, { ...params }) -> EventListResponsesSinglePage - client.waitingRooms.events.delete(waitingRoomId, eventId, { ...params }) -> EventDeleteResponse -- client.waitingRooms.events.edit(waitingRoomId, eventId, { ...params }) -> WaitingroomEvent -- client.waitingRooms.events.get(waitingRoomId, eventId, { ...params }) -> WaitingroomEvent +- client.waitingRooms.events.edit(waitingRoomId, eventId, { ...params }) -> EventEditResponse +- client.waitingRooms.events.get(waitingRoomId, eventId, { ...params }) -> EventGetResponse ### Details Types: -- WaitingroomEventDetails +- Event +- DetailGetResponse Methods: -- client.waitingRooms.events.details.get(waitingRoomId, eventId, { ...params }) -> WaitingroomEventDetails +- client.waitingRooms.events.details.get(waitingRoomId, eventId, { ...params }) -> DetailGetResponse ## Rules Types: +- Rule - UnnamedSchemaRefF1c0ba8f44601f2db2e07b9397b6c430 -- WaitingroomRule - RuleCreateResponse - RuleUpdateResponse - RuleDeleteResponse @@ -2156,7 +2189,7 @@ Methods: - client.waitingRooms.rules.create(waitingRoomId, { ...params }) -> RuleCreateResponse | null - client.waitingRooms.rules.update(waitingRoomId, [ ...body ]) -> RuleUpdateResponse | null -- client.waitingRooms.rules.list(waitingRoomId, { ...params }) -> WaitingroomRulesSinglePage +- client.waitingRooms.rules.list(waitingRoomId, { ...params }) -> EventsSinglePage - client.waitingRooms.rules.delete(waitingRoomId, ruleId, { ...params }) -> RuleDeleteResponse | null - client.waitingRooms.rules.edit(waitingRoomId, ruleId, { ...params }) -> RuleEditResponse | null @@ -2191,17 +2224,17 @@ Methods: Types: -- DistributedWebHostname +- Hostname - UnnamedSchemaRef2e420942fb77cd2cd2ba3ca7b5f32e1e - HostnameDeleteResponse Methods: -- client.web3.hostnames.create(zoneIdentifier, { ...params }) -> DistributedWebHostname -- client.web3.hostnames.list(zoneIdentifier) -> DistributedWebHostnamesSinglePage +- client.web3.hostnames.create(zoneIdentifier, { ...params }) -> Hostname +- client.web3.hostnames.list(zoneIdentifier) -> HostnamesSinglePage - client.web3.hostnames.delete(zoneIdentifier, identifier, { ...params }) -> HostnameDeleteResponse | null -- client.web3.hostnames.edit(zoneIdentifier, identifier, { ...params }) -> DistributedWebHostname -- client.web3.hostnames.get(zoneIdentifier, identifier) -> DistributedWebHostname +- client.web3.hostnames.edit(zoneIdentifier, identifier, { ...params }) -> Hostname +- client.web3.hostnames.get(zoneIdentifier, identifier) -> Hostname ### IPFSUniversalPaths @@ -2209,32 +2242,47 @@ Methods: Types: -- DistributedWebConfigContentList +- ContentList Methods: -- client.web3.hostnames.ipfsUniversalPaths.contentLists.update(zoneIdentifier, identifier, { ...params }) -> DistributedWebConfigContentList -- client.web3.hostnames.ipfsUniversalPaths.contentLists.get(zoneIdentifier, identifier) -> DistributedWebConfigContentList +- client.web3.hostnames.ipfsUniversalPaths.contentLists.update(zoneIdentifier, identifier, { ...params }) -> ContentList +- client.web3.hostnames.ipfsUniversalPaths.contentLists.get(zoneIdentifier, identifier) -> ContentList ##### Entries Types: -- DistributedWebConfigContentListEntry +- ContentListItem - UnnamedSchemaRef5e618833803e286db9ee7c73727f8b86 - EntryListResponse - EntryDeleteResponse Methods: -- client.web3.hostnames.ipfsUniversalPaths.contentLists.entries.create(zoneIdentifier, identifier, { ...params }) -> DistributedWebConfigContentListEntry -- client.web3.hostnames.ipfsUniversalPaths.contentLists.entries.update(zoneIdentifier, identifier, contentListEntryIdentifier, { ...params }) -> DistributedWebConfigContentListEntry +- client.web3.hostnames.ipfsUniversalPaths.contentLists.entries.create(zoneIdentifier, identifier, { ...params }) -> ContentListItem +- client.web3.hostnames.ipfsUniversalPaths.contentLists.entries.update(zoneIdentifier, identifier, contentListEntryIdentifier, { ...params }) -> ContentListItem - client.web3.hostnames.ipfsUniversalPaths.contentLists.entries.list(zoneIdentifier, identifier) -> EntryListResponse | null - client.web3.hostnames.ipfsUniversalPaths.contentLists.entries.delete(zoneIdentifier, identifier, contentListEntryIdentifier, { ...params }) -> EntryDeleteResponse | null -- client.web3.hostnames.ipfsUniversalPaths.contentLists.entries.get(zoneIdentifier, identifier, contentListEntryIdentifier) -> DistributedWebConfigContentListEntry +- client.web3.hostnames.ipfsUniversalPaths.contentLists.entries.get(zoneIdentifier, identifier, contentListEntryIdentifier) -> ContentListItem # Workers +Types: + +- Binding +- D1Binding +- DispatchNamespaceBinding +- DurableObjectBinding +- KVNamespaceBinding +- MigrationStep +- MTLSCERTBinding +- PlacementConfiguration +- R2Binding +- ServiceBinding +- SingleStepMigration +- SteppedMigration + ## AI Types: @@ -2249,12 +2297,14 @@ Methods: Types: -- WorkersScript +- Script +- Setting +- SettingsItem Methods: -- client.workers.scripts.update(scriptName, { ...params }) -> WorkersScript -- client.workers.scripts.list({ ...params }) -> WorkersScriptsSinglePage +- client.workers.scripts.update(scriptName, { ...params }) -> Script +- client.workers.scripts.list({ ...params }) -> ScriptsSinglePage - client.workers.scripts.delete(scriptName, { ...params }) -> void - client.workers.scripts.get(scriptName, { ...params }) -> Response @@ -2262,7 +2312,7 @@ Methods: Types: -- WorkersBinding +- Binding - BindingGetResponse Methods: @@ -2286,6 +2336,8 @@ Methods: Types: +- ConsumerScript +- ConsumerScriptItem - TailCreateResponse - TailGetResponse @@ -2311,7 +2363,7 @@ Methods: Methods: -- client.workers.scripts.content.update(scriptName, { ...params }) -> WorkersScript +- client.workers.scripts.content.update(scriptName, { ...params }) -> Script ### ContentV2 @@ -2321,15 +2373,10 @@ Methods: ### Settings -Types: - -- SettingEditResponse -- SettingGetResponse - Methods: -- client.workers.scripts.settings.edit(scriptName, { ...params }) -> SettingEditResponse -- client.workers.scripts.settings.get(scriptName, { ...params }) -> SettingGetResponse +- client.workers.scripts.settings.edit(scriptName, { ...params }) -> SettingsItem +- client.workers.scripts.settings.get(scriptName, { ...params }) -> SettingsItem ### Deployments @@ -2362,13 +2409,15 @@ Methods: Types: -- SettingEditResponse -- SettingGetResponse +- BindingItem +- CompatibilityFlagsItem +- SettingsItem +- TagsItem Methods: -- client.workers.scripts.versions.settings.edit(scriptName, { ...params }) -> SettingEditResponse -- client.workers.scripts.versions.settings.get(scriptName, { ...params }) -> SettingGetResponse +- client.workers.scripts.versions.settings.edit(scriptName, { ...params }) -> SettingsItem +- client.workers.scripts.versions.settings.get(scriptName, { ...params }) -> SettingsItem ## Filters @@ -2437,14 +2486,14 @@ Methods: Types: -- WorkersDomain +- Domain Methods: -- client.workers.domains.update({ ...params }) -> WorkersDomain -- client.workers.domains.list({ ...params }) -> WorkersDomainsSinglePage +- client.workers.domains.update({ ...params }) -> Domain +- client.workers.domains.list({ ...params }) -> DomainsSinglePage - client.workers.domains.delete(domainId, { ...params }) -> void -- client.workers.domains.get(domainId, { ...params }) -> WorkersDomain +- client.workers.domains.get(domainId, { ...params }) -> Domain ## Subdomains @@ -2466,20 +2515,15 @@ Methods: Methods: -- client.workers.services.environments.content.update(serviceName, environmentName, { ...params }) -> WorkersScript +- client.workers.services.environments.content.update(serviceName, environmentName, { ...params }) -> Script - client.workers.services.environments.content.get(serviceName, environmentName, { ...params }) -> Response #### Settings -Types: - -- SettingEditResponse -- SettingGetResponse - Methods: -- client.workers.services.environments.settings.edit(serviceName, environmentName, { ...params }) -> SettingEditResponse -- client.workers.services.environments.settings.get(serviceName, environmentName, { ...params }) -> SettingGetResponse +- client.workers.services.environments.settings.edit(serviceName, environmentName, { ...params }) -> SettingsItem +- client.workers.services.environments.settings.get(serviceName, environmentName, { ...params }) -> SettingsItem # KV @@ -2487,13 +2531,13 @@ Methods: Types: -- WorkersKVNamespace +- Namespace Methods: -- client.kv.namespaces.create({ ...params }) -> WorkersKVNamespace +- client.kv.namespaces.create({ ...params }) -> Namespace - client.kv.namespaces.update(namespaceId, { ...params }) -> UnnamedSchemaRef8d6a37a1e4190f86652802244d29525f -- client.kv.namespaces.list({ ...params }) -> WorkersKVNamespacesV4PagePaginationArray +- client.kv.namespaces.list({ ...params }) -> NamespacesV4PagePaginationArray - client.kv.namespaces.delete(namespaceId, { ...params }) -> UnnamedSchemaRef8d6a37a1e4190f86652802244d29525f ### Bulk @@ -2507,11 +2551,11 @@ Methods: Types: -- WorkersKVKey +- Key Methods: -- client.kv.namespaces.keys.list(namespaceId, { ...params }) -> WorkersKVKeysCursorLimitPagination +- client.kv.namespaces.keys.list(namespaceId, { ...params }) -> KeysCursorLimitPagination ### Metadata @@ -2541,11 +2585,11 @@ Methods: Types: -- DurableObjectNamespace +- Namespace Methods: -- client.durableObjects.namespaces.list({ ...params }) -> DurableObjectNamespacesSinglePage +- client.durableObjects.namespaces.list({ ...params }) -> NamespacesSinglePage ### Objects @@ -2610,6 +2654,8 @@ Methods: Types: +- RequestListItem +- RequestModel - ManagedHeaderListResponse - ManagedHeaderEditResponse @@ -2622,49 +2668,49 @@ Methods: Types: -- PageShieldSetting +- Setting - PageShieldUpdateResponse Methods: - client.pageShield.update({ ...params }) -> PageShieldUpdateResponse -- client.pageShield.get({ ...params }) -> PageShieldSetting +- client.pageShield.get({ ...params }) -> Setting ## Policies Types: -- PageShieldPolicy +- Policy Methods: -- client.pageShield.policies.create({ ...params }) -> PageShieldPolicy -- client.pageShield.policies.update(policyId, { ...params }) -> PageShieldPolicy -- client.pageShield.policies.list({ ...params }) -> PageShieldPoliciesSinglePage +- client.pageShield.policies.create({ ...params }) -> Policy +- client.pageShield.policies.update(policyId, { ...params }) -> Policy +- client.pageShield.policies.list({ ...params }) -> PoliciesSinglePage - client.pageShield.policies.delete(policyId, { ...params }) -> void -- client.pageShield.policies.get(policyId, { ...params }) -> PageShieldPolicy +- client.pageShield.policies.get(policyId, { ...params }) -> Policy ## Connections Types: -- PageShieldConnection +- Connection Methods: -- client.pageShield.connections.list({ ...params }) -> PageShieldConnectionsSinglePage -- client.pageShield.connections.get(connectionId, { ...params }) -> PageShieldConnection +- client.pageShield.connections.list({ ...params }) -> ConnectionsSinglePage +- client.pageShield.connections.get(connectionId, { ...params }) -> Connection ## Scripts Types: -- PageShieldScript +- Script - ScriptGetResponse Methods: -- client.pageShield.scripts.list({ ...params }) -> PageShieldScriptsSinglePage +- client.pageShield.scripts.list({ ...params }) -> ScriptsSinglePage - client.pageShield.scripts.get(scriptId, { ...params }) -> ScriptGetResponse # Rulesets @@ -2762,6 +2808,13 @@ Methods: # Spectrum +Types: + +- DNS +- EdgeIPs +- OriginDNS +- OriginPort + ## Analytics ### Aggregates @@ -2778,6 +2831,10 @@ Methods: ### Events +Types: + +- DimensionItem + #### Bytimes Methods: @@ -2823,16 +2880,16 @@ Methods: Types: -- AddressingAddressMaps +- AddressMap - AddressMapCreateResponse - AddressMapGetResponse Methods: - client.addressing.addressMaps.create({ ...params }) -> AddressMapCreateResponse -- client.addressing.addressMaps.list({ ...params }) -> AddressingAddressMapsSinglePage +- client.addressing.addressMaps.list({ ...params }) -> AddressMapsSinglePage - client.addressing.addressMaps.delete(addressMapId, { ...params }) -> UnnamedSchemaRef67bbb1ccdd42c3e2937b9fd19f791151 | null -- client.addressing.addressMaps.edit(addressMapId, { ...params }) -> AddressingAddressMaps +- client.addressing.addressMaps.edit(addressMapId, { ...params }) -> AddressMap - client.addressing.addressMaps.get(addressMapId, { ...params }) -> AddressMapGetResponse ### Accounts @@ -2880,16 +2937,16 @@ Methods: Types: -- AddressingIpamPrefixes +- Prefix - UnnamedSchemaRefE358666e049bf8f9281c0a4f89b5fe46 Methods: -- client.addressing.prefixes.create({ ...params }) -> AddressingIpamPrefixes -- client.addressing.prefixes.list({ ...params }) -> AddressingIpamPrefixesSinglePage +- client.addressing.prefixes.create({ ...params }) -> Prefix +- client.addressing.prefixes.list({ ...params }) -> PrefixesSinglePage - client.addressing.prefixes.delete(prefixId, { ...params }) -> UnnamedSchemaRef67bbb1ccdd42c3e2937b9fd19f791151 | null -- client.addressing.prefixes.edit(prefixId, { ...params }) -> AddressingIpamPrefixes -- client.addressing.prefixes.get(prefixId, { ...params }) -> AddressingIpamPrefixes +- client.addressing.prefixes.edit(prefixId, { ...params }) -> Prefix +- client.addressing.prefixes.get(prefixId, { ...params }) -> Prefix ### BGP @@ -2897,26 +2954,26 @@ Methods: Types: -- AddressingServiceBinding +- ServiceBinding Methods: -- client.addressing.prefixes.bgp.bindings.create(prefixId, { ...params }) -> AddressingServiceBinding -- client.addressing.prefixes.bgp.bindings.list(prefixId, { ...params }) -> AddressingServiceBindingsSinglePage +- client.addressing.prefixes.bgp.bindings.create(prefixId, { ...params }) -> ServiceBinding +- client.addressing.prefixes.bgp.bindings.list(prefixId, { ...params }) -> ServiceBindingsSinglePage - client.addressing.prefixes.bgp.bindings.delete(prefixId, bindingId, { ...params }) -> UnnamedSchemaRefEc4d85c3d1bcc6b3b7e99c199ae99846 -- client.addressing.prefixes.bgp.bindings.get(prefixId, bindingId, { ...params }) -> AddressingServiceBinding +- client.addressing.prefixes.bgp.bindings.get(prefixId, bindingId, { ...params }) -> ServiceBinding #### Prefixes Types: -- AddressingIpamBGPPrefixes +- BGPPrefix Methods: -- client.addressing.prefixes.bgp.prefixes.list(prefixId, { ...params }) -> AddressingIpamBGPPrefixesSinglePage -- client.addressing.prefixes.bgp.prefixes.edit(prefixId, bgpPrefixId, { ...params }) -> AddressingIpamBGPPrefixes -- client.addressing.prefixes.bgp.prefixes.get(prefixId, bgpPrefixId, { ...params }) -> AddressingIpamBGPPrefixes +- client.addressing.prefixes.bgp.prefixes.list(prefixId, { ...params }) -> BGPPrefixesSinglePage +- client.addressing.prefixes.bgp.prefixes.edit(prefixId, bgpPrefixId, { ...params }) -> BGPPrefix +- client.addressing.prefixes.bgp.prefixes.get(prefixId, bgpPrefixId, { ...params }) -> BGPPrefix #### Statuses @@ -2934,13 +2991,13 @@ Methods: Types: -- AddressingIpamDelegations +- Delegations - DelegationDeleteResponse Methods: -- client.addressing.prefixes.delegations.create(prefixId, { ...params }) -> AddressingIpamDelegations -- client.addressing.prefixes.delegations.list(prefixId, { ...params }) -> AddressingIpamDelegationsSinglePage +- client.addressing.prefixes.delegations.create(prefixId, { ...params }) -> Delegations +- client.addressing.prefixes.delegations.list(prefixId, { ...params }) -> DelegationsSinglePage - client.addressing.prefixes.delegations.delete(prefixId, delegationId, { ...params }) -> DelegationDeleteResponse # AuditLogs @@ -2965,8 +3022,8 @@ Methods: Types: -- IntelPhishingURLInfo -- IntelPhishingURLSubmit +- Info +- Submit - UnnamedSchemaRef209db30ed499548152d6f3bccf720b54 - UnnamedSchemaRef39419d70e2399b28b15cd660afd342fb - UnnamedSchemaRef3e10ea08deb8102a27500f986488c1e8 @@ -2977,8 +3034,8 @@ Types: Methods: -- client.brandProtection.submit({ ...params }) -> IntelPhishingURLSubmit -- client.brandProtection.urlInfo({ ...params }) -> IntelPhishingURLInfo +- client.brandProtection.submit({ ...params }) -> Submit +- client.brandProtection.urlInfo({ ...params }) -> Info # Diagnostics @@ -2986,7 +3043,7 @@ Methods: Types: -- MagicTransitTargetResult +- Traceroute - TracerouteCreateResponse Methods: @@ -3015,40 +3072,42 @@ Methods: Types: -- ImagesImageKeys +- Key - UnnamedSchemaRef918e794287a67b5e85126e00cf2d9a95 Methods: -- client.images.v1.keys.update(signingKeyName, { ...params }) -> ImagesImageKeys -- client.images.v1.keys.list({ ...params }) -> ImagesImageKeys -- client.images.v1.keys.delete(signingKeyName, { ...params }) -> ImagesImageKeys +- client.images.v1.keys.update(signingKeyName, { ...params }) -> Key +- client.images.v1.keys.list({ ...params }) -> Key +- client.images.v1.keys.delete(signingKeyName, { ...params }) -> Key ### Stats Types: -- ImagesImagesStats +- Stat Methods: -- client.images.v1.stats.get({ ...params }) -> ImagesImagesStats +- client.images.v1.stats.get({ ...params }) -> Stat ### Variants Types: - UnnamedSchemaRefD02195de7dadf27801875f36cddfa3a3 -- V1ImageVariant -- V1ImageVariants +- Variant +- VariantCreateResponse +- VariantEditResponse +- VariantGetResponse Methods: -- client.images.v1.variants.create({ ...params }) -> V1ImageVariant -- client.images.v1.variants.list({ ...params }) -> V1ImageVariants +- client.images.v1.variants.create({ ...params }) -> VariantCreateResponse +- client.images.v1.variants.list({ ...params }) -> Variant - client.images.v1.variants.delete(variantId, { ...params }) -> UnnamedSchemaRef9444735ca60712dbcf8afd832eb5716a -- client.images.v1.variants.edit(variantId, { ...params }) -> V1ImageVariant -- client.images.v1.variants.get(variantId, { ...params }) -> V1ImageVariant +- client.images.v1.variants.edit(variantId, { ...params }) -> VariantEditResponse +- client.images.v1.variants.get(variantId, { ...params }) -> VariantGetResponse ### Blobs @@ -3082,11 +3141,11 @@ Methods: Types: -- IntelASN +- ASN Methods: -- client.intel.asn.get(asn, { ...params }) -> IntelASN +- client.intel.asn.get(asn, { ...params }) -> ASN ### Subnets @@ -3102,22 +3161,22 @@ Methods: Types: -- IntelPassiveDNSByIP +- DNS - UnnamedSchemaRefB5e16cee4f32382c294201aedb9fc050 Methods: -- client.intel.dns.get({ ...params }) -> IntelPassiveDNSByIP +- client.intel.dns.get({ ...params }) -> DNS ## Domains Types: -- IntelDomain +- Domain Methods: -- client.intel.domains.get({ ...params }) -> IntelDomain +- client.intel.domains.get({ ...params }) -> Domain ### Bulks @@ -3133,7 +3192,7 @@ Methods: Types: -- IntelDomainHistory +- DomainHistory - DomainHistoryGetResponse Methods: @@ -3144,7 +3203,7 @@ Methods: Types: -- IntelSchemasIP +- IP - IPGetResponse Methods: @@ -3155,7 +3214,7 @@ Methods: Types: -- IntelIPList +- IPList - IPListGetResponse Methods: @@ -3172,11 +3231,11 @@ Methods: Types: -- IntelWhois +- Whois Methods: -- client.intel.whois.get({ ...params }) -> IntelWhois +- client.intel.whois.get({ ...params }) -> Whois ## IndicatorFeeds @@ -3214,11 +3273,11 @@ Methods: Types: -- IntelSinkholeItem +- SinkholeItem Methods: -- client.intel.sinkholes.list({ ...params }) -> IntelSinkholeItemsSinglePage +- client.intel.sinkholes.list({ ...params }) -> SinkholeItemsSinglePage ## AttackSurfaceReport @@ -3236,6 +3295,11 @@ Methods: Types: +- IssueClassItem +- IssueTypeItem +- ProductItem +- SeverityQueryParamItem +- SubjectsItem - IssueListResponse - IssueClassResponse - IssueSeverityResponse @@ -3253,6 +3317,7 @@ Methods: Types: +- HealthCheck - UnnamedSchemaRef3b1a76a5e4a139b72ed7d93834773d39 - UnnamedSchemaRefEebdc868ce7f7ae92e23438caa84e7b5 @@ -3292,6 +3357,7 @@ Methods: Types: +- PSKMetadata - IPSECTunnelCreateResponse - IPSECTunnelUpdateResponse - IPSECTunnelListResponse @@ -3312,6 +3378,9 @@ Methods: Types: +- ColoNamesItem +- ColoRegionsItem +- Scope - RouteCreateResponse - RouteUpdateResponse - RouteListResponse @@ -3332,6 +3401,8 @@ Methods: Types: +- Site +- SiteLocation - SiteCreateResponse - SiteUpdateResponse - SiteListResponse @@ -3350,6 +3421,9 @@ Methods: Types: +- ACL +- ACLConfiguration +- Subnet - UnnamedSchemaRef87fa9e5fe9f6b8d607be1df57340d916 - ACLCreateResponse - ACLUpdateResponse @@ -3369,6 +3443,12 @@ Methods: Types: +- DHCPRelay +- DHCPServer +- LAN +- Nat +- RoutedSubnet +- StaticAddressing - LANCreateResponse - LANUpdateResponse - LANListResponse @@ -3387,6 +3467,8 @@ Methods: Types: +- StaticAddressing +- WAN - WANCreateResponse - WANUpdateResponse - WANListResponse @@ -3407,59 +3489,59 @@ Methods: Types: -- MagicNetworkMonitoringConfig +- Configuration - UnnamedSchemaRef621ca3f6ea9a96427c902b0d14279ff8 Methods: -- client.magicNetworkMonitoring.configs.create({ ...params }) -> MagicNetworkMonitoringConfig -- client.magicNetworkMonitoring.configs.update({ ...params }) -> MagicNetworkMonitoringConfig -- client.magicNetworkMonitoring.configs.delete({ ...params }) -> MagicNetworkMonitoringConfig -- client.magicNetworkMonitoring.configs.edit({ ...params }) -> MagicNetworkMonitoringConfig -- client.magicNetworkMonitoring.configs.get({ ...params }) -> MagicNetworkMonitoringConfig +- client.magicNetworkMonitoring.configs.create({ ...params }) -> Configuration +- client.magicNetworkMonitoring.configs.update({ ...params }) -> Configuration +- client.magicNetworkMonitoring.configs.delete({ ...params }) -> Configuration +- client.magicNetworkMonitoring.configs.edit({ ...params }) -> Configuration +- client.magicNetworkMonitoring.configs.get({ ...params }) -> Configuration ### Full Methods: -- client.magicNetworkMonitoring.configs.full.get({ ...params }) -> MagicNetworkMonitoringConfig +- client.magicNetworkMonitoring.configs.full.get({ ...params }) -> Configuration ## Rules Types: -- MagicNetworkMonitoringRule +- Rule - UnnamedSchemaRef99ba74ba6027c3c87ca03d4e81cfc16d Methods: -- client.magicNetworkMonitoring.rules.create({ ...params }) -> MagicNetworkMonitoringRule | null -- client.magicNetworkMonitoring.rules.update({ ...params }) -> MagicNetworkMonitoringRule | null -- client.magicNetworkMonitoring.rules.list({ ...params }) -> MagicNetworkMonitoringRulesSinglePage -- client.magicNetworkMonitoring.rules.delete(ruleId, { ...params }) -> MagicNetworkMonitoringRule | null -- client.magicNetworkMonitoring.rules.edit(ruleId, { ...params }) -> MagicNetworkMonitoringRule | null -- client.magicNetworkMonitoring.rules.get(ruleId, { ...params }) -> MagicNetworkMonitoringRule | null +- client.magicNetworkMonitoring.rules.create({ ...params }) -> Rule | null +- client.magicNetworkMonitoring.rules.update({ ...params }) -> Rule | null +- client.magicNetworkMonitoring.rules.list({ ...params }) -> RulesSinglePage +- client.magicNetworkMonitoring.rules.delete(ruleId, { ...params }) -> Rule | null +- client.magicNetworkMonitoring.rules.edit(ruleId, { ...params }) -> Rule | null +- client.magicNetworkMonitoring.rules.get(ruleId, { ...params }) -> Rule | null ### Advertisements Types: -- MagicNetworkMonitoringRuleAdvertisable +- Advertisement Methods: -- client.magicNetworkMonitoring.rules.advertisements.edit(ruleId, { ...params }) -> MagicNetworkMonitoringRuleAdvertisable | null +- client.magicNetworkMonitoring.rules.advertisements.edit(ruleId, { ...params }) -> Advertisement | null # MTLSCertificates Types: - MTLSCertificate -- MTLSCertificateUpdate +- MTLSCertificateCreateResponse Methods: -- client.mtlsCertificates.create({ ...params }) -> MTLSCertificateUpdate +- client.mtlsCertificates.create({ ...params }) -> MTLSCertificateCreateResponse - client.mtlsCertificates.list({ ...params }) -> MTLSCertificatesSinglePage - client.mtlsCertificates.delete(mtlsCertificateId, { ...params }) -> MTLSCertificate - client.mtlsCertificates.get(mtlsCertificateId, { ...params }) -> MTLSCertificate @@ -3468,7 +3550,7 @@ Methods: Types: -- MTLSCertificateAsssociation +- CertificateAsssociation - AssociationGetResponse Methods: @@ -3481,18 +3563,19 @@ Methods: Types: -- PagesDeployments -- PagesProjects +- Deployment +- Project +- Stage - ProjectDeleteResponse - ProjectPurgeBuildCacheResponse Methods: - client.pages.projects.create({ ...params }) -> UnnamedSchemaRef65e3c8c1a9c4638ec25cdbbaca7165c1 | null -- client.pages.projects.list({ ...params }) -> PagesDeploymentsSinglePage +- client.pages.projects.list({ ...params }) -> DeploymentsSinglePage - client.pages.projects.delete(projectName, { ...params }) -> unknown - client.pages.projects.edit(projectName, { ...params }) -> UnnamedSchemaRef65e3c8c1a9c4638ec25cdbbaca7165c1 | null -- client.pages.projects.get(projectName, { ...params }) -> PagesProjects +- client.pages.projects.get(projectName, { ...params }) -> Project - client.pages.projects.purgeBuildCache(projectName, { ...params }) -> unknown ### Deployments @@ -3503,12 +3586,12 @@ Types: Methods: -- client.pages.projects.deployments.create(projectName, { ...params }) -> PagesDeployments -- client.pages.projects.deployments.list(projectName, { ...params }) -> PagesDeploymentsSinglePage +- client.pages.projects.deployments.create(projectName, { ...params }) -> Deployment +- client.pages.projects.deployments.list(projectName, { ...params }) -> DeploymentsSinglePage - client.pages.projects.deployments.delete(projectName, deploymentId, { ...params }) -> unknown -- client.pages.projects.deployments.get(projectName, deploymentId, { ...params }) -> PagesDeployments -- client.pages.projects.deployments.retry(projectName, deploymentId, { ...params }) -> PagesDeployments -- client.pages.projects.deployments.rollback(projectName, deploymentId, { ...params }) -> PagesDeployments +- client.pages.projects.deployments.get(projectName, deploymentId, { ...params }) -> Deployment +- client.pages.projects.deployments.retry(projectName, deploymentId, { ...params }) -> Deployment +- client.pages.projects.deployments.rollback(projectName, deploymentId, { ...params }) -> Deployment #### History @@ -3537,6 +3620,8 @@ Methods: Types: +- Filter +- PCAP - PCAPCreateResponse - PCAPListResponse - PCAPGetResponse @@ -3551,15 +3636,15 @@ Methods: Types: -- MagicVisibilityPCAPsOwnership +- Ownership - OwnershipGetResponse Methods: -- client.pcaps.ownership.create({ ...params }) -> MagicVisibilityPCAPsOwnership +- client.pcaps.ownership.create({ ...params }) -> Ownership - client.pcaps.ownership.delete(ownershipId, { ...params }) -> void - client.pcaps.ownership.get({ ...params }) -> OwnershipGetResponse | null -- client.pcaps.ownership.validate({ ...params }) -> MagicVisibilityPCAPsOwnership +- client.pcaps.ownership.validate({ ...params }) -> Ownership ## Download @@ -3573,13 +3658,12 @@ Methods: Types: -- RegistrarDomains -- DomainListResponse +- Domain Methods: - client.registrar.domains.update(domainName, { ...params }) -> UnnamedSchemaRef65e3c8c1a9c4638ec25cdbbaca7165c1 | null -- client.registrar.domains.list({ ...params }) -> DomainListResponsesSinglePage +- client.registrar.domains.list({ ...params }) -> DomainsSinglePage - client.registrar.domains.get(domainName, { ...params }) -> UnnamedSchemaRef65e3c8c1a9c4638ec25cdbbaca7165c1 | null # RequestTracers @@ -3602,17 +3686,19 @@ Methods: Types: -- ListsList +- Hostname +- List +- Redirect - UnnamedSchemaRefE706d5e8367564544e2991af82ebb07a - ListDeleteResponse Methods: -- client.rules.lists.create({ ...params }) -> ListsList | null -- client.rules.lists.update(listId, { ...params }) -> ListsList | null -- client.rules.lists.list({ ...params }) -> ListsListsSinglePage +- client.rules.lists.create({ ...params }) -> List | null +- client.rules.lists.update(listId, { ...params }) -> List | null +- client.rules.lists.list({ ...params }) -> ListsSinglePage - client.rules.lists.delete(listId, { ...params }) -> ListDeleteResponse | null -- client.rules.lists.get(listId, { ...params }) -> ListsList | null +- client.rules.lists.get(listId, { ...params }) -> List | null ### BulkOperations @@ -3651,40 +3737,41 @@ Methods: Types: +- Components +- Schema - UnnamedSchemaRef608bee5065f7314d6fa572b89a1910f7 -- WorkersKVComponentsSchemasResult -- WorkersKVSchemasResult Methods: -- client.storage.analytics.list({ ...params }) -> WorkersKVSchemasResult -- client.storage.analytics.stored({ ...params }) -> WorkersKVComponentsSchemasResult +- client.storage.analytics.list({ ...params }) -> Schema +- client.storage.analytics.stored({ ...params }) -> Components # Stream Types: -- StreamVideos +- AllowedOriginsItem +- Video Methods: - client.stream.create({ ...params }) -> void -- client.stream.list({ ...params }) -> StreamVideosSinglePage +- client.stream.list({ ...params }) -> VideosSinglePage - client.stream.delete(identifier, { ...params }) -> void -- client.stream.get(identifier, { ...params }) -> StreamVideos +- client.stream.get(identifier, { ...params }) -> Video ## AudioTracks Types: -- StreamAudio +- Audio - AudioTrackGetResponse Methods: - client.stream.audioTracks.delete(identifier, audioIdentifier, { ...params }) -> UnnamedSchemaRef602dd5f63eab958d53da61434dec08f0 -- client.stream.audioTracks.copy(identifier, { ...params }) -> StreamAudio -- client.stream.audioTracks.edit(identifier, audioIdentifier, { ...params }) -> StreamAudio +- client.stream.audioTracks.copy(identifier, { ...params }) -> Audio +- client.stream.audioTracks.edit(identifier, audioIdentifier, { ...params }) -> Audio - client.stream.audioTracks.get(identifier, { ...params }) -> AudioTrackGetResponse ## Videos @@ -3701,17 +3788,17 @@ Methods: Types: -- StreamClipping +- Clip Methods: -- client.stream.clip.create({ ...params }) -> StreamClipping +- client.stream.clip.create({ ...params }) -> Clip ## Copy Methods: -- client.stream.copy.create({ ...params }) -> StreamVideos +- client.stream.copy.create({ ...params }) -> Video ## DirectUpload @@ -3727,12 +3814,12 @@ Methods: Types: -- StreamKeys +- Keys - KeyGetResponse Methods: -- client.stream.keys.create({ ...params }) -> StreamKeys +- client.stream.keys.create({ ...params }) -> Keys - client.stream.keys.delete(identifier, { ...params }) -> UnnamedSchemaRef602dd5f63eab958d53da61434dec08f0 - client.stream.keys.get({ ...params }) -> KeyGetResponse @@ -3740,40 +3827,40 @@ Methods: Types: -- StreamLiveInput +- LiveInput - LiveInputListResponse Methods: -- client.stream.liveInputs.create({ ...params }) -> StreamLiveInput -- client.stream.liveInputs.update(liveInputIdentifier, { ...params }) -> StreamLiveInput +- client.stream.liveInputs.create({ ...params }) -> LiveInput +- client.stream.liveInputs.update(liveInputIdentifier, { ...params }) -> LiveInput - client.stream.liveInputs.list({ ...params }) -> LiveInputListResponse - client.stream.liveInputs.delete(liveInputIdentifier, { ...params }) -> void -- client.stream.liveInputs.get(liveInputIdentifier, { ...params }) -> StreamLiveInput +- client.stream.liveInputs.get(liveInputIdentifier, { ...params }) -> LiveInput ### Outputs Types: -- StreamOutput +- Output Methods: -- client.stream.liveInputs.outputs.create(liveInputIdentifier, { ...params }) -> StreamOutput -- client.stream.liveInputs.outputs.update(liveInputIdentifier, outputIdentifier, { ...params }) -> StreamOutput -- client.stream.liveInputs.outputs.list(liveInputIdentifier, { ...params }) -> StreamOutputsSinglePage +- client.stream.liveInputs.outputs.create(liveInputIdentifier, { ...params }) -> Output +- client.stream.liveInputs.outputs.update(liveInputIdentifier, outputIdentifier, { ...params }) -> Output +- client.stream.liveInputs.outputs.list(liveInputIdentifier, { ...params }) -> OutputsSinglePage - client.stream.liveInputs.outputs.delete(liveInputIdentifier, outputIdentifier, { ...params }) -> void ## Watermarks Types: -- StreamWatermarks +- Watermaks Methods: - client.stream.watermarks.create({ ...params }) -> UnnamedSchemaRef9444735ca60712dbcf8afd832eb5716a -- client.stream.watermarks.list({ ...params }) -> StreamWatermarksSinglePage +- client.stream.watermarks.list({ ...params }) -> WatermaksSinglePage - client.stream.watermarks.delete(identifier, { ...params }) -> UnnamedSchemaRef602dd5f63eab958d53da61434dec08f0 - client.stream.watermarks.get(identifier, { ...params }) -> UnnamedSchemaRef9444735ca60712dbcf8afd832eb5716a @@ -3789,7 +3876,7 @@ Methods: Types: -- StreamCaptions +- Caption - CaptionDeleteResponse - CaptionGetResponse @@ -3859,7 +3946,7 @@ Methods: Types: -- AlertingPagerduty +- Pagerduty - PagerdutyCreateResponse - PagerdutyGetResponse - PagerdutyLinkResponse @@ -3875,7 +3962,7 @@ Methods: Types: -- AlertingWebhooks +- Webhooks - WebhookCreateResponse - WebhookUpdateResponse @@ -3883,25 +3970,27 @@ Methods: - client.alerting.destinations.webhooks.create({ ...params }) -> WebhookCreateResponse - client.alerting.destinations.webhooks.update(webhookId, { ...params }) -> WebhookUpdateResponse -- client.alerting.destinations.webhooks.list({ ...params }) -> AlertingWebhooksSinglePage +- client.alerting.destinations.webhooks.list({ ...params }) -> WebhooksSinglePage - client.alerting.destinations.webhooks.delete(webhookId, { ...params }) -> UnnamedSchemaRef67bbb1ccdd42c3e2937b9fd19f791151 | null -- client.alerting.destinations.webhooks.get(webhookId, { ...params }) -> AlertingWebhooks +- client.alerting.destinations.webhooks.get(webhookId, { ...params }) -> Webhooks ## History Types: -- AlertingHistory +- History Methods: -- client.alerting.history.list({ ...params }) -> AlertingHistoriesV4PagePaginationArray +- client.alerting.history.list({ ...params }) -> HistoriesV4PagePaginationArray ## Policies Types: -- AlertingPolicies +- Filter +- Mechanism +- Policy - PolicyCreateResponse - PolicyUpdateResponse @@ -3909,9 +3998,9 @@ Methods: - client.alerting.policies.create({ ...params }) -> PolicyCreateResponse - client.alerting.policies.update(policyId, { ...params }) -> PolicyUpdateResponse -- client.alerting.policies.list({ ...params }) -> AlertingPoliciesSinglePage +- client.alerting.policies.list({ ...params }) -> PoliciesSinglePage - client.alerting.policies.delete(policyId, { ...params }) -> UnnamedSchemaRef67bbb1ccdd42c3e2937b9fd19f791151 | null -- client.alerting.policies.get(policyId, { ...params }) -> AlertingPolicies +- client.alerting.policies.get(policyId, { ...params }) -> Policy # D1 @@ -3919,17 +4008,18 @@ Methods: Types: -- D1CreateDatabase -- D1DatabaseDetails -- D1QueryResult +- D1 +- QueryResult +- DatabaseCreateResponse +- DatabaseListResponse - DatabaseQueryResponse Methods: -- client.d1.database.create({ ...params }) -> D1CreateDatabase -- client.d1.database.list({ ...params }) -> D1CreateDatabasesV4PagePaginationArray +- client.d1.database.create({ ...params }) -> DatabaseCreateResponse +- client.d1.database.list({ ...params }) -> DatabaseListResponsesV4PagePaginationArray - client.d1.database.delete(accountIdentifier, databaseIdentifier) -> UnnamedSchemaRef9444735ca60712dbcf8afd832eb5716a -- client.d1.database.get(accountIdentifier, databaseIdentifier) -> D1DatabaseDetails +- client.d1.database.get(accountIdentifier, databaseIdentifier) -> D1 - client.d1.database.query(accountIdentifier, databaseIdentifier, { ...params }) -> DatabaseQueryResponse # R2 @@ -3938,29 +4028,29 @@ Methods: Types: -- R2Bucket +- Bucket - BucketDeleteResponse Methods: -- client.r2.buckets.create({ ...params }) -> R2Bucket -- client.r2.buckets.list({ ...params }) -> R2BucketsCursorPagination +- client.r2.buckets.create({ ...params }) -> Bucket +- client.r2.buckets.list({ ...params }) -> BucketsCursorPagination - client.r2.buckets.delete(bucketName, { ...params }) -> BucketDeleteResponse -- client.r2.buckets.get(bucketName, { ...params }) -> R2Bucket +- client.r2.buckets.get(bucketName, { ...params }) -> Bucket ## Sippy Types: -- R2Sippy +- Sippy - UnnamedSchemaRef6430970563db310f19d39aafe3debd27 - SippyDeleteResponse Methods: -- client.r2.sippy.update(bucketName, { ...params }) -> R2Sippy +- client.r2.sippy.update(bucketName, { ...params }) -> Sippy - client.r2.sippy.delete(bucketName, { ...params }) -> SippyDeleteResponse -- client.r2.sippy.get(bucketName, { ...params }) -> R2Sippy +- client.r2.sippy.get(bucketName, { ...params }) -> Sippy # WARPConnector @@ -4001,42 +4091,33 @@ Methods: Types: -- WorkersForPlatformsNamespaceScript +- Script Methods: -- client.workersForPlatforms.dispatch.namespaces.scripts.update(dispatchNamespace, scriptName, { ...params }) -> WorkersScript +- client.workersForPlatforms.dispatch.namespaces.scripts.update(dispatchNamespace, scriptName, { ...params }) -> Script - client.workersForPlatforms.dispatch.namespaces.scripts.delete(dispatchNamespace, scriptName, { ...params }) -> void -- client.workersForPlatforms.dispatch.namespaces.scripts.get(dispatchNamespace, scriptName, { ...params }) -> WorkersForPlatformsNamespaceScript +- client.workersForPlatforms.dispatch.namespaces.scripts.get(dispatchNamespace, scriptName, { ...params }) -> Script ##### Content Methods: -- client.workersForPlatforms.dispatch.namespaces.scripts.content.update(dispatchNamespace, scriptName, { ...params }) -> WorkersScript +- client.workersForPlatforms.dispatch.namespaces.scripts.content.update(dispatchNamespace, scriptName, { ...params }) -> Script - client.workersForPlatforms.dispatch.namespaces.scripts.content.get(dispatchNamespace, scriptName, { ...params }) -> Response ##### Settings -Types: - -- SettingEditResponse -- SettingGetResponse - Methods: -- client.workersForPlatforms.dispatch.namespaces.scripts.settings.edit(dispatchNamespace, scriptName, { ...params }) -> SettingEditResponse -- client.workersForPlatforms.dispatch.namespaces.scripts.settings.get(dispatchNamespace, scriptName, { ...params }) -> SettingGetResponse +- client.workersForPlatforms.dispatch.namespaces.scripts.settings.edit(dispatchNamespace, scriptName, { ...params }) -> SettingsItem +- client.workersForPlatforms.dispatch.namespaces.scripts.settings.get(dispatchNamespace, scriptName, { ...params }) -> SettingsItem ##### Bindings -Types: - -- BindingGetResponse - Methods: -- client.workersForPlatforms.dispatch.namespaces.scripts.bindings.get(dispatchNamespace, scriptName, { ...params }) -> BindingGetResponse +- client.workersForPlatforms.dispatch.namespaces.scripts.bindings.get(dispatchNamespace, scriptName, { ...params }) -> Binding # ZeroTrust @@ -4044,60 +4125,61 @@ Methods: Types: -- ZeroTrustDevices +- Device Methods: -- client.zeroTrust.devices.list({ ...params }) -> ZeroTrustDevicesSinglePage +- client.zeroTrust.devices.list({ ...params }) -> DevicesSinglePage - client.zeroTrust.devices.get(deviceId, { ...params }) -> UnnamedSchemaRef9444735ca60712dbcf8afd832eb5716a ### DEXTests Types: -- DEXTestSchemasHTTP +- SchemaData +- SchemaHTTP - UnnamedSchemaRef15fd6ef0641450fd873ffb71715170c9 - DEXTestDeleteResponse Methods: -- client.zeroTrust.devices.dexTests.create({ ...params }) -> DEXTestSchemasHTTP | null -- client.zeroTrust.devices.dexTests.update(dexTestId, { ...params }) -> DEXTestSchemasHTTP | null -- client.zeroTrust.devices.dexTests.list({ ...params }) -> DEXTestSchemasHTTPSSinglePage +- client.zeroTrust.devices.dexTests.create({ ...params }) -> SchemaHTTP | null +- client.zeroTrust.devices.dexTests.update(dexTestId, { ...params }) -> SchemaHTTP | null +- client.zeroTrust.devices.dexTests.list({ ...params }) -> SchemaHTTPSSinglePage - client.zeroTrust.devices.dexTests.delete(dexTestId, { ...params }) -> DEXTestDeleteResponse | null -- client.zeroTrust.devices.dexTests.get(dexTestId, { ...params }) -> DEXTestSchemasHTTP | null +- client.zeroTrust.devices.dexTests.get(dexTestId, { ...params }) -> SchemaHTTP | null ### Networks Types: -- DeviceManagedNetworks +- Network - UnnamedSchemaRefD2b048663faf5e0cd5c90501b71171de - NetworkDeleteResponse Methods: -- client.zeroTrust.devices.networks.create({ ...params }) -> DeviceManagedNetworks | null -- client.zeroTrust.devices.networks.update(networkId, { ...params }) -> DeviceManagedNetworks | null -- client.zeroTrust.devices.networks.list({ ...params }) -> DeviceManagedNetworksSinglePage +- client.zeroTrust.devices.networks.create({ ...params }) -> Network | null +- client.zeroTrust.devices.networks.update(networkId, { ...params }) -> Network | null +- client.zeroTrust.devices.networks.list({ ...params }) -> NetworksSinglePage - client.zeroTrust.devices.networks.delete(networkId, { ...params }) -> NetworkDeleteResponse | null -- client.zeroTrust.devices.networks.get(networkId, { ...params }) -> DeviceManagedNetworks | null +- client.zeroTrust.devices.networks.get(networkId, { ...params }) -> Network | null ### Policies Types: -- DevicesDeviceSettingsPolicy +- SettingsPolicy - UnnamedSchemaRefF636ff9f2cb41ff4b715cf8ed8515581 - PolicyDeleteResponse Methods: -- client.zeroTrust.devices.policies.create({ ...params }) -> DevicesDeviceSettingsPolicy | null -- client.zeroTrust.devices.policies.list({ ...params }) -> DevicesDeviceSettingsPoliciesSinglePage +- client.zeroTrust.devices.policies.create({ ...params }) -> SettingsPolicy | null +- client.zeroTrust.devices.policies.list({ ...params }) -> SettingsPoliciesSinglePage - client.zeroTrust.devices.policies.delete(policyId, { ...params }) -> PolicyDeleteResponse | null -- client.zeroTrust.devices.policies.edit(policyId, { ...params }) -> DevicesDeviceSettingsPolicy | null -- client.zeroTrust.devices.policies.get(policyId, { ...params }) -> DevicesDeviceSettingsPolicy | null +- client.zeroTrust.devices.policies.edit(policyId, { ...params }) -> SettingsPolicy | null +- client.zeroTrust.devices.policies.get(policyId, { ...params }) -> SettingsPolicy | null #### DefaultPolicy @@ -4113,7 +4195,7 @@ Methods: Types: -- DevicesSplitTunnel +- SplitTunnelExclude - UnnamedSchemaRef0462afe1a32ee90b1999d4277af59fa8 - ExcludeUpdateResponse - ExcludeGetResponse @@ -4121,14 +4203,14 @@ Types: Methods: - client.zeroTrust.devices.policies.excludes.update([ ...body ]) -> ExcludeUpdateResponse | null -- client.zeroTrust.devices.policies.excludes.list({ ...params }) -> DevicesSplitTunnelsSinglePage +- client.zeroTrust.devices.policies.excludes.list({ ...params }) -> SplitTunnelExcludesSinglePage - client.zeroTrust.devices.policies.excludes.get(policyId, { ...params }) -> ExcludeGetResponse | null #### FallbackDomains Types: -- DevicesFallbackDomain +- FallbackDomain - UnnamedSchemaRef1fbf91ecd61792c751fead58dc8005e6 - FallbackDomainUpdateResponse - FallbackDomainGetResponse @@ -4136,14 +4218,14 @@ Types: Methods: - client.zeroTrust.devices.policies.fallbackDomains.update(policyId, [ ...body ]) -> FallbackDomainUpdateResponse | null -- client.zeroTrust.devices.policies.fallbackDomains.list({ ...params }) -> DevicesFallbackDomainsSinglePage +- client.zeroTrust.devices.policies.fallbackDomains.list({ ...params }) -> FallbackDomainsSinglePage - client.zeroTrust.devices.policies.fallbackDomains.get(policyId, { ...params }) -> FallbackDomainGetResponse | null #### Includes Types: -- DevicesSplitTunnelInclude +- SplitTunnelInclude - UnnamedSchemaRef5e0c6134a624678286f4a424b001870a - IncludeUpdateResponse - IncludeGetResponse @@ -4151,14 +4233,16 @@ Types: Methods: - client.zeroTrust.devices.policies.includes.update([ ...body ]) -> IncludeUpdateResponse | null -- client.zeroTrust.devices.policies.includes.list({ ...params }) -> DevicesSplitTunnelIncludesSinglePage +- client.zeroTrust.devices.policies.includes.list({ ...params }) -> SplitTunnelIncludesSinglePage - client.zeroTrust.devices.policies.includes.get(policyId, { ...params }) -> IncludeGetResponse | null ### Posture Types: -- DevicePostureRules +- DevicePostureRule +- Input +- MatchItem - UnnamedSchemaRef34ef0ad73a63c3f76ed170adca181930 - UnnamedSchemaRef41885dd46b9e0294254c49305a273681 - UnnamedSchemaRef9e35ef84511131488ae286ce78ac4b27 @@ -4166,26 +4250,26 @@ Types: Methods: -- client.zeroTrust.devices.posture.create({ ...params }) -> DevicePostureRules | null -- client.zeroTrust.devices.posture.update(ruleId, { ...params }) -> DevicePostureRules | null +- client.zeroTrust.devices.posture.create({ ...params }) -> DevicePostureRule | null +- client.zeroTrust.devices.posture.update(ruleId, { ...params }) -> DevicePostureRule | null - client.zeroTrust.devices.posture.list({ ...params }) -> DevicePostureRulesSinglePage - client.zeroTrust.devices.posture.delete(ruleId, { ...params }) -> PostureDeleteResponse | null -- client.zeroTrust.devices.posture.get(ruleId, { ...params }) -> DevicePostureRules | null +- client.zeroTrust.devices.posture.get(ruleId, { ...params }) -> DevicePostureRule | null #### Integrations Types: -- DevicePostureIntegrations +- Integrations - UnnamedSchemaRefB84b377dfc9454d455b646d4bc9ab507 Methods: -- client.zeroTrust.devices.posture.integrations.create({ ...params }) -> DevicePostureIntegrations | null -- client.zeroTrust.devices.posture.integrations.list({ ...params }) -> DevicePostureIntegrationsSinglePage +- client.zeroTrust.devices.posture.integrations.create({ ...params }) -> Integrations | null +- client.zeroTrust.devices.posture.integrations.list({ ...params }) -> IntegrationsSinglePage - client.zeroTrust.devices.posture.integrations.delete(integrationId, { ...params }) -> UnnamedSchemaRef9444735ca60712dbcf8afd832eb5716a -- client.zeroTrust.devices.posture.integrations.edit(integrationId, { ...params }) -> DevicePostureIntegrations | null -- client.zeroTrust.devices.posture.integrations.get(integrationId, { ...params }) -> DevicePostureIntegrations | null +- client.zeroTrust.devices.posture.integrations.edit(integrationId, { ...params }) -> Integrations | null +- client.zeroTrust.devices.posture.integrations.get(integrationId, { ...params }) -> Integrations | null ### Revoke @@ -4197,12 +4281,12 @@ Methods: Types: -- ZeroTrustAccountDeviceSettings +- Settings Methods: -- client.zeroTrust.devices.settings.update({ ...params }) -> ZeroTrustAccountDeviceSettings | null -- client.zeroTrust.devices.settings.list({ ...params }) -> ZeroTrustAccountDeviceSettings | null +- client.zeroTrust.devices.settings.update({ ...params }) -> Settings | null +- client.zeroTrust.devices.settings.list({ ...params }) -> Settings | null ### Unrevoke @@ -4224,39 +4308,42 @@ Methods: Types: +- AzureAd +- GenericOAuthConfig +- IdentityProvider - UnnamedSchemaRef9ab84e842cdf571c8f3898648bcdabcb - UnnamedSchemaRefDd86d8b7ea73283da7b160ed3f86cae1 -- ZeroTrustIdentityProviders - IdentityProviderListResponse - IdentityProviderDeleteResponse Methods: -- client.zeroTrust.identityProviders.create({ ...params }) -> ZeroTrustIdentityProviders -- client.zeroTrust.identityProviders.update(uuid, { ...params }) -> ZeroTrustIdentityProviders +- client.zeroTrust.identityProviders.create({ ...params }) -> IdentityProvider +- client.zeroTrust.identityProviders.update(uuid, { ...params }) -> IdentityProvider - client.zeroTrust.identityProviders.list({ ...params }) -> IdentityProviderListResponsesSinglePage - client.zeroTrust.identityProviders.delete(uuid, { ...params }) -> IdentityProviderDeleteResponse -- client.zeroTrust.identityProviders.get(uuid, { ...params }) -> ZeroTrustIdentityProviders +- client.zeroTrust.identityProviders.get(uuid, { ...params }) -> IdentityProvider ## Organizations Types: -- ZeroTrustOrganizations +- LoginDesign +- Organizations - OrganizationRevokeUsersResponse Methods: -- client.zeroTrust.organizations.create({ ...params }) -> ZeroTrustOrganizations -- client.zeroTrust.organizations.update({ ...params }) -> ZeroTrustOrganizations -- client.zeroTrust.organizations.list({ ...params }) -> ZeroTrustOrganizations +- client.zeroTrust.organizations.create({ ...params }) -> Organizations +- client.zeroTrust.organizations.update({ ...params }) -> Organizations +- client.zeroTrust.organizations.list({ ...params }) -> Organizations - client.zeroTrust.organizations.revokeUsers({ ...params }) -> OrganizationRevokeUsersResponse ## Seats Types: -- ZeroTrustSeats +- Seat - SeatEditResponse Methods: @@ -4265,37 +4352,67 @@ Methods: ## Access +Types: + +- AnyValidServiceTokenRule +- AuthenticationMethodRule +- AzureGroupRule +- CertificateRule +- CountryRule +- DevicePostureRule +- DomainRule +- EmailListRule +- EmailRule +- EveryoneRule +- ExternalEvaluationRule +- GitHubOrganizationRule +- GroupRule +- GsuiteGroupRule +- IncludeItem +- IPListRule +- IPRule +- OktaGroupRule +- Rule +- SamlGroupRule +- ServiceTokenRule + ### Applications Types: -- UnnamedSchemaRef6ed9646890b9be79e16f1cfff86ec832 -- UnnamedSchemaRefC335ce55d4fdf132c942dfce6e45dcb9 -- UnnamedSchemaRefC6200e37c458aaa3c42e6e5b999bc419 -- ZeroTrustApps +- AllowedHeadersItem +- AllowedIDPsItem +- AllowedMethodsItem +- AllowedOriginsItem +- AppID +- Application +- CorsHeaders +- CustomPagesItem +- SamlSaasApp +- SelfHostedDomainsItem - ApplicationDeleteResponse - ApplicationRevokeTokensResponse Methods: -- client.zeroTrust.access.applications.create({ ...params }) -> ZeroTrustApps -- client.zeroTrust.access.applications.update(appId, { ...params }) -> ZeroTrustApps -- client.zeroTrust.access.applications.list({ ...params }) -> ZeroTrustAppsSinglePage +- client.zeroTrust.access.applications.create({ ...params }) -> Application +- client.zeroTrust.access.applications.update(appId, { ...params }) -> Application +- client.zeroTrust.access.applications.list({ ...params }) -> ApplicationsSinglePage - client.zeroTrust.access.applications.delete(appId, { ...params }) -> ApplicationDeleteResponse -- client.zeroTrust.access.applications.get(appId, { ...params }) -> ZeroTrustApps +- client.zeroTrust.access.applications.get(appId, { ...params }) -> Application - client.zeroTrust.access.applications.revokeTokens(appId, { ...params }) -> ApplicationRevokeTokensResponse | null #### CAs Types: -- ZeroTrustCA +- CA - CADeleteResponse Methods: - client.zeroTrust.access.applications.cas.create(uuid, { ...params }) -> UnnamedSchemaRef9444735ca60712dbcf8afd832eb5716a -- client.zeroTrust.access.applications.cas.list({ ...params }) -> ZeroTrustCAsSinglePage +- client.zeroTrust.access.applications.cas.list({ ...params }) -> CAsSinglePage - client.zeroTrust.access.applications.cas.delete(uuid, { ...params }) -> CADeleteResponse - client.zeroTrust.access.applications.cas.get(uuid, { ...params }) -> UnnamedSchemaRef9444735ca60712dbcf8afd832eb5716a @@ -4303,7 +4420,6 @@ Methods: Types: -- UnnamedSchemaRef6a02fe18089d53b52b2cd3949b717919 - UserPolicyCheckListResponse Methods: @@ -4314,37 +4430,42 @@ Methods: Types: -- ZeroTrustPolicies +- ApprovalGroup +- ApprovalGroupItem +- ExcludeItem +- Policy +- RequireItem - PolicyDeleteResponse Methods: -- client.zeroTrust.access.applications.policies.create(uuid, { ...params }) -> ZeroTrustPolicies -- client.zeroTrust.access.applications.policies.update(uuid1, uuid, { ...params }) -> ZeroTrustPolicies -- client.zeroTrust.access.applications.policies.list(uuid, { ...params }) -> ZeroTrustPoliciesSinglePage +- client.zeroTrust.access.applications.policies.create(uuid, { ...params }) -> Policy +- client.zeroTrust.access.applications.policies.update(uuid1, uuid, { ...params }) -> Policy +- client.zeroTrust.access.applications.policies.list(uuid, { ...params }) -> PoliciesSinglePage - client.zeroTrust.access.applications.policies.delete(uuid1, uuid, { ...params }) -> PolicyDeleteResponse -- client.zeroTrust.access.applications.policies.get(uuid1, uuid, { ...params }) -> ZeroTrustPolicies +- client.zeroTrust.access.applications.policies.get(uuid1, uuid, { ...params }) -> Policy ### Certificates Types: -- ZeroTrustCertificates +- AssociatedHostnamesItem +- Certificate - CertificateDeleteResponse Methods: -- client.zeroTrust.access.certificates.create({ ...params }) -> ZeroTrustCertificates -- client.zeroTrust.access.certificates.update(uuid, { ...params }) -> ZeroTrustCertificates -- client.zeroTrust.access.certificates.list({ ...params }) -> ZeroTrustCertificatesSinglePage +- client.zeroTrust.access.certificates.create({ ...params }) -> Certificate +- client.zeroTrust.access.certificates.update(uuid, { ...params }) -> Certificate +- client.zeroTrust.access.certificates.list({ ...params }) -> CertificatesSinglePage - client.zeroTrust.access.certificates.delete(uuid, { ...params }) -> CertificateDeleteResponse -- client.zeroTrust.access.certificates.get(uuid, { ...params }) -> ZeroTrustCertificates +- client.zeroTrust.access.certificates.get(uuid, { ...params }) -> Certificate #### Settings Types: -- ZeroTrustSettings +- Settings - SettingUpdateResponse - SettingGetResponse @@ -4357,48 +4478,50 @@ Methods: Types: -- ZeroTrustGroups +- ExcludeItem +- RequireItem +- ZeroTrustGroup - GroupDeleteResponse Methods: -- client.zeroTrust.access.groups.create({ ...params }) -> ZeroTrustGroups -- client.zeroTrust.access.groups.update(uuid, { ...params }) -> ZeroTrustGroups +- client.zeroTrust.access.groups.create({ ...params }) -> ZeroTrustGroup +- client.zeroTrust.access.groups.update(uuid, { ...params }) -> ZeroTrustGroup - client.zeroTrust.access.groups.list({ ...params }) -> ZeroTrustGroupsSinglePage - client.zeroTrust.access.groups.delete(uuid, { ...params }) -> GroupDeleteResponse -- client.zeroTrust.access.groups.get(uuid, { ...params }) -> ZeroTrustGroups +- client.zeroTrust.access.groups.get(uuid, { ...params }) -> ZeroTrustGroup ### ServiceTokens Types: -- ZeroTrustServiceTokens +- ErviceToken - ServiceTokenCreateResponse - ServiceTokenRotateResponse Methods: - client.zeroTrust.access.serviceTokens.create({ ...params }) -> ServiceTokenCreateResponse -- client.zeroTrust.access.serviceTokens.update(uuid, { ...params }) -> ZeroTrustServiceTokens -- client.zeroTrust.access.serviceTokens.list({ ...params }) -> ZeroTrustServiceTokensSinglePage -- client.zeroTrust.access.serviceTokens.delete(uuid, { ...params }) -> ZeroTrustServiceTokens -- client.zeroTrust.access.serviceTokens.refresh(identifier, uuid) -> ZeroTrustServiceTokens +- client.zeroTrust.access.serviceTokens.update(uuid, { ...params }) -> ErviceToken +- client.zeroTrust.access.serviceTokens.list({ ...params }) -> ErviceTokensSinglePage +- client.zeroTrust.access.serviceTokens.delete(uuid, { ...params }) -> ErviceToken +- client.zeroTrust.access.serviceTokens.refresh(identifier, uuid) -> ErviceToken - client.zeroTrust.access.serviceTokens.rotate(identifier, uuid) -> ServiceTokenRotateResponse ### Bookmarks Types: -- ZeroTrustBookmarks +- Bookmarks - BookmarkDeleteResponse Methods: -- client.zeroTrust.access.bookmarks.create(identifier, uuid, { ...params }) -> ZeroTrustBookmarks -- client.zeroTrust.access.bookmarks.update(identifier, uuid, { ...params }) -> ZeroTrustBookmarks -- client.zeroTrust.access.bookmarks.list(identifier) -> ZeroTrustBookmarksSinglePage +- client.zeroTrust.access.bookmarks.create(identifier, uuid, { ...params }) -> Bookmarks +- client.zeroTrust.access.bookmarks.update(identifier, uuid, { ...params }) -> Bookmarks +- client.zeroTrust.access.bookmarks.list(identifier) -> BookmarksSinglePage - client.zeroTrust.access.bookmarks.delete(identifier, uuid, { ...params }) -> BookmarkDeleteResponse -- client.zeroTrust.access.bookmarks.get(identifier, uuid) -> ZeroTrustBookmarks +- client.zeroTrust.access.bookmarks.get(identifier, uuid) -> Bookmarks ### Keys @@ -4414,7 +4537,7 @@ Methods: Types: -- ZeroTrustAccessRequests +- AccessRequests - AccessRequestListResponse Methods: @@ -4425,11 +4548,11 @@ Methods: Types: -- ZeroTrustUsers +- User Methods: -- client.zeroTrust.access.users.list(identifier) -> ZeroTrustUsersSinglePage +- client.zeroTrust.access.users.list(identifier) -> UsersSinglePage #### ActiveSessions @@ -4447,11 +4570,11 @@ Methods: Types: -- ZeroTrustIdentity +- Identity Methods: -- client.zeroTrust.access.users.lastSeenIdentity.get(identifier, id) -> ZeroTrustIdentity +- client.zeroTrust.access.users.lastSeenIdentity.get(identifier, id) -> Identity #### FailedLogins @@ -4467,37 +4590,38 @@ Methods: Types: -- ZeroTrustCustomPage -- ZeroTrustCustomPageWithoutHTML +- CustomPage +- CustomPageWithoutHTML - CustomPageDeleteResponse Methods: -- client.zeroTrust.access.customPages.create(identifier, { ...params }) -> ZeroTrustCustomPageWithoutHTML -- client.zeroTrust.access.customPages.update(identifier, uuid, { ...params }) -> ZeroTrustCustomPageWithoutHTML -- client.zeroTrust.access.customPages.list(identifier) -> ZeroTrustCustomPageWithoutHTMLsSinglePage +- client.zeroTrust.access.customPages.create(identifier, { ...params }) -> CustomPageWithoutHTML +- client.zeroTrust.access.customPages.update(identifier, uuid, { ...params }) -> CustomPageWithoutHTML +- client.zeroTrust.access.customPages.list(identifier) -> CustomPageWithoutHTMLsSinglePage - client.zeroTrust.access.customPages.delete(identifier, uuid) -> CustomPageDeleteResponse -- client.zeroTrust.access.customPages.get(identifier, uuid) -> ZeroTrustCustomPage +- client.zeroTrust.access.customPages.get(identifier, uuid) -> CustomPage ### Tags Types: -- ZeroTrustTag +- Tag - TagDeleteResponse Methods: -- client.zeroTrust.access.tags.create(identifier, { ...params }) -> ZeroTrustTag -- client.zeroTrust.access.tags.update(identifier, tagName, { ...params }) -> ZeroTrustTag -- client.zeroTrust.access.tags.list(identifier) -> ZeroTrustTagsSinglePage +- client.zeroTrust.access.tags.create(identifier, { ...params }) -> Tag +- client.zeroTrust.access.tags.update(identifier, tagName, { ...params }) -> Tag +- client.zeroTrust.access.tags.list(identifier) -> TagsSinglePage - client.zeroTrust.access.tags.delete(identifier, name) -> TagDeleteResponse -- client.zeroTrust.access.tags.get(identifier, name) -> ZeroTrustTag +- client.zeroTrust.access.tags.get(identifier, name) -> Tag ## DEX Types: +- Percentiles - UnnamedSchemaRefBf9e2abcf1b78a6cab8e6e29e2228a11 ### Colos @@ -4514,6 +4638,7 @@ Methods: Types: +- LiveStat - FleetStatusLiveResponse Methods: @@ -4525,37 +4650,39 @@ Methods: Types: -- DigitalExperienceMonitoringDevice +- Device Methods: -- client.zeroTrust.dex.fleetStatus.devices.list({ ...params }) -> DigitalExperienceMonitoringDevicesV4PagePaginationArray +- client.zeroTrust.dex.fleetStatus.devices.list({ ...params }) -> DevicesV4PagePaginationArray ### HTTPTests Types: -- DigitalExperienceMonitoringHTTPDetails +- HTTPDetails Methods: -- client.zeroTrust.dex.httpTests.get(testId, { ...params }) -> DigitalExperienceMonitoringHTTPDetails +- client.zeroTrust.dex.httpTests.get(testId, { ...params }) -> HTTPDetails #### Percentiles Types: -- DigitalExperienceMonitoringHTTPDetailsPercentiles +- HTTPDetailsPercentiles +- TestStatOverTime Methods: -- client.zeroTrust.dex.httpTests.percentiles.get(testId, { ...params }) -> DigitalExperienceMonitoringHTTPDetailsPercentiles +- client.zeroTrust.dex.httpTests.percentiles.get(testId, { ...params }) -> HTTPDetailsPercentiles ### Tests Types: -- DigitalExperienceMonitoringTests +- AggregateTimePeriod +- Tests - TestListResponse Methods: @@ -4566,11 +4693,11 @@ Methods: Types: -- DigitalExperienceMonitoringUniqueDevices +- UniqueDevices Methods: -- client.zeroTrust.dex.tests.uniqueDevices.list({ ...params }) -> DigitalExperienceMonitoringUniqueDevices +- client.zeroTrust.dex.tests.uniqueDevices.list({ ...params }) -> UniqueDevices ### TracerouteTestResults @@ -4578,40 +4705,41 @@ Methods: Types: -- DigitalExperienceMonitoringTracerouteTestResultNetworkPath +- NetworkPath Methods: -- client.zeroTrust.dex.tracerouteTestResults.networkPath.get(testResultId, { ...params }) -> DigitalExperienceMonitoringTracerouteTestResultNetworkPath +- client.zeroTrust.dex.tracerouteTestResults.networkPath.get(testResultId, { ...params }) -> NetworkPath ### TracerouteTests Types: -- DigitalExperienceMonitoringTracerouteDetails -- DigitalExperienceMonitoringTracerouteDetailsPercentiles -- DigitalExperienceMonitoringTracerouteTestNetworkPath +- NetworkPath +- Percentiles +- Traceroute Methods: -- client.zeroTrust.dex.tracerouteTests.get(testId, { ...params }) -> DigitalExperienceMonitoringTracerouteDetails -- client.zeroTrust.dex.tracerouteTests.networkPath(testId, { ...params }) -> DigitalExperienceMonitoringTracerouteTestNetworkPath -- client.zeroTrust.dex.tracerouteTests.percentiles(testId, { ...params }) -> DigitalExperienceMonitoringTracerouteDetailsPercentiles +- client.zeroTrust.dex.tracerouteTests.get(testId, { ...params }) -> Traceroute +- client.zeroTrust.dex.tracerouteTests.networkPath(testId, { ...params }) -> NetworkPath +- client.zeroTrust.dex.tracerouteTests.percentiles(testId, { ...params }) -> Percentiles ## Tunnels Types: -- TunnelArgoTunnel +- Tunnel - UnnamedSchemaRefA9c0e0a8cc5fd0e244f41ea806cd954a +- WARPConnectorTunnel Methods: -- client.zeroTrust.tunnels.create({ ...params }) -> TunnelArgoTunnel +- client.zeroTrust.tunnels.create({ ...params }) -> Tunnel - client.zeroTrust.tunnels.list({ ...params }) -> UnnamedSchemaRef413ab4522f0bb93f63444799121fe2f8sV4PagePaginationArray -- client.zeroTrust.tunnels.delete(tunnelId, { ...params }) -> TunnelArgoTunnel +- client.zeroTrust.tunnels.delete(tunnelId, { ...params }) -> Tunnel - client.zeroTrust.tunnels.edit(tunnelId, { ...params }) -> UnnamedSchemaRef413ab4522f0bb93f63444799121fe2f8 -- client.zeroTrust.tunnels.get(tunnelId, { ...params }) -> TunnelArgoTunnel +- client.zeroTrust.tunnels.get(tunnelId, { ...params }) -> Tunnel ### Configurations @@ -4624,7 +4752,7 @@ Methods: Types: -- TunnelTunnelClient +- Client - ConnectionGetResponse Methods: @@ -4646,7 +4774,7 @@ Methods: Methods: -- client.zeroTrust.tunnels.connectors.get(tunnelId, connectorId, { ...params }) -> TunnelTunnelClient +- client.zeroTrust.tunnels.connectors.get(tunnelId, connectorId, { ...params }) -> Client ### Management @@ -4676,28 +4804,28 @@ Methods: Types: -- DLPDataset -- DLPDatasetArray -- DLPDatasetCreation +- Dataset +- DatasetArray +- DatasetCreation Methods: -- client.zeroTrust.dlp.datasets.create({ ...params }) -> DLPDatasetCreation -- client.zeroTrust.dlp.datasets.update(datasetId, { ...params }) -> DLPDataset -- client.zeroTrust.dlp.datasets.list({ ...params }) -> DLPDatasetsSinglePage +- client.zeroTrust.dlp.datasets.create({ ...params }) -> DatasetCreation +- client.zeroTrust.dlp.datasets.update(datasetId, { ...params }) -> Dataset +- client.zeroTrust.dlp.datasets.list({ ...params }) -> DatasetsSinglePage - client.zeroTrust.dlp.datasets.delete(datasetId, { ...params }) -> void -- client.zeroTrust.dlp.datasets.get(datasetId, { ...params }) -> DLPDataset +- client.zeroTrust.dlp.datasets.get(datasetId, { ...params }) -> Dataset #### Upload Types: -- DLPDatasetNewVersion +- NewVersion Methods: -- client.zeroTrust.dlp.datasets.upload.create(datasetId, { ...params }) -> DLPDatasetNewVersion -- client.zeroTrust.dlp.datasets.upload.edit(datasetId, version, { ...params }) -> DLPDataset +- client.zeroTrust.dlp.datasets.upload.create(datasetId, { ...params }) -> NewVersion +- client.zeroTrust.dlp.datasets.upload.edit(datasetId, version, { ...params }) -> Dataset ### Patterns @@ -4709,51 +4837,55 @@ Methods: Types: -- UnnamedSchemaRefE31ff4936b1b42746e8cb62bbc87f2e5 +- PayloadLogUpdateResponse +- PayloadLogGetResponse Methods: -- client.zeroTrust.dlp.payloadLogs.update({ ...params }) -> UnnamedSchemaRefE31ff4936b1b42746e8cb62bbc87f2e5 | null -- client.zeroTrust.dlp.payloadLogs.get({ ...params }) -> UnnamedSchemaRefE31ff4936b1b42746e8cb62bbc87f2e5 | null +- client.zeroTrust.dlp.payloadLogs.update({ ...params }) -> PayloadLogUpdateResponse +- client.zeroTrust.dlp.payloadLogs.get({ ...params }) -> PayloadLogGetResponse ### Profiles Types: -- DLPProfiles +- ContextAwareness +- Profile +- SkipConfiguration - UnnamedSchemaRefC105db122868c71badeac3b4822ad6b1 - UnnamedSchemaRefE38bfdf1acf5a4bfada6779c79528bc0 - ProfileGetResponse Methods: -- client.zeroTrust.dlp.profiles.list({ ...params }) -> DLPProfilesSinglePage +- client.zeroTrust.dlp.profiles.list({ ...params }) -> ProfilesSinglePage - client.zeroTrust.dlp.profiles.get(profileId, { ...params }) -> ProfileGetResponse #### Custom Types: -- DLPCustomProfile +- CustomProfile +- Pattern - CustomCreateResponse Methods: - client.zeroTrust.dlp.profiles.custom.create({ ...params }) -> CustomCreateResponse | null -- client.zeroTrust.dlp.profiles.custom.update(profileId, { ...params }) -> DLPCustomProfile +- client.zeroTrust.dlp.profiles.custom.update(profileId, { ...params }) -> CustomProfile - client.zeroTrust.dlp.profiles.custom.delete(profileId, { ...params }) -> UnnamedSchemaRef8d6a37a1e4190f86652802244d29525f -- client.zeroTrust.dlp.profiles.custom.get(profileId, { ...params }) -> DLPCustomProfile +- client.zeroTrust.dlp.profiles.custom.get(profileId, { ...params }) -> CustomProfile #### Predefined Types: -- DLPPredefinedProfile +- PredefinedProfile Methods: -- client.zeroTrust.dlp.profiles.predefined.update(profileId, { ...params }) -> DLPPredefinedProfile -- client.zeroTrust.dlp.profiles.predefined.get(profileId, { ...params }) -> DLPPredefinedProfile +- client.zeroTrust.dlp.profiles.predefined.update(profileId, { ...params }) -> PredefinedProfile +- client.zeroTrust.dlp.profiles.predefined.get(profileId, { ...params }) -> PredefinedProfile ## Gateway @@ -4771,37 +4903,48 @@ Methods: Types: -- ZeroTrustGatewaySettings +- Settings Methods: -- client.zeroTrust.gateway.auditSSHSettings.update({ ...params }) -> ZeroTrustGatewaySettings -- client.zeroTrust.gateway.auditSSHSettings.get({ ...params }) -> ZeroTrustGatewaySettings +- client.zeroTrust.gateway.auditSSHSettings.update({ ...params }) -> Settings +- client.zeroTrust.gateway.auditSSHSettings.get({ ...params }) -> Settings ### Categories Types: -- ZeroTrustGatewayCategories +- Category Methods: -- client.zeroTrust.gateway.categories.list({ ...params }) -> ZeroTrustGatewayCategoriesSinglePage +- client.zeroTrust.gateway.categories.list({ ...params }) -> CategoriesSinglePage ### AppTypes Types: -- ZeroTrustGatewayAppTypes +- AppType Methods: -- client.zeroTrust.gateway.appTypes.list({ ...params }) -> ZeroTrustGatewayAppTypesSinglePage +- client.zeroTrust.gateway.appTypes.list({ ...params }) -> AppTypesSinglePage ### Configurations Types: +- ActivityLogSettings +- AntiVirusSettings +- BlockPageSettings +- BodyScanningSettings +- BrowserIsolationSettings +- CustomCertificateSettings +- ExtendedEmailMatching +- FipsSettings +- NotificationSettings +- ProtocolDetection +- TLSSettings - UnnamedSchemaRef055aaf3918bf29f81c09d394a864182e - ConfigurationUpdateResponse - ConfigurationEditResponse @@ -4817,23 +4960,24 @@ Methods: Types: +- Lists - UnnamedSchemaRef30ecd0f5ce68fc07dbb7760deda3d707 -- ZeroTrustGatewayLists - ListCreateResponse Methods: - client.zeroTrust.gateway.lists.create({ ...params }) -> ListCreateResponse -- client.zeroTrust.gateway.lists.update(listId, { ...params }) -> ZeroTrustGatewayLists -- client.zeroTrust.gateway.lists.list({ ...params }) -> ZeroTrustGatewayListsSinglePage +- client.zeroTrust.gateway.lists.update(listId, { ...params }) -> Lists +- client.zeroTrust.gateway.lists.list({ ...params }) -> ListsSinglePage - client.zeroTrust.gateway.lists.delete(listId, { ...params }) -> UnnamedSchemaRef9444735ca60712dbcf8afd832eb5716a -- client.zeroTrust.gateway.lists.edit(listId, { ...params }) -> ZeroTrustGatewayLists -- client.zeroTrust.gateway.lists.get(listId, { ...params }) -> ZeroTrustGatewayLists +- client.zeroTrust.gateway.lists.edit(listId, { ...params }) -> Lists +- client.zeroTrust.gateway.lists.get(listId, { ...params }) -> Lists #### Items Types: +- ListsItem - ItemListResponse Methods: @@ -4844,58 +4988,66 @@ Methods: Types: +- Location +- Network +- NetworkItem - UnnamedSchemaRef1b37523fdb0ae5806cd8e062492aab66 -- ZeroTrustGatewayLocations Methods: -- client.zeroTrust.gateway.locations.create({ ...params }) -> ZeroTrustGatewayLocations -- client.zeroTrust.gateway.locations.update(locationId, { ...params }) -> ZeroTrustGatewayLocations -- client.zeroTrust.gateway.locations.list({ ...params }) -> ZeroTrustGatewayLocationsSinglePage +- client.zeroTrust.gateway.locations.create({ ...params }) -> Location +- client.zeroTrust.gateway.locations.update(locationId, { ...params }) -> Location +- client.zeroTrust.gateway.locations.list({ ...params }) -> LocationsSinglePage - client.zeroTrust.gateway.locations.delete(locationId, { ...params }) -> UnnamedSchemaRef9444735ca60712dbcf8afd832eb5716a -- client.zeroTrust.gateway.locations.get(locationId, { ...params }) -> ZeroTrustGatewayLocations +- client.zeroTrust.gateway.locations.get(locationId, { ...params }) -> Location ### Logging Types: +- LoggingSetting - UnnamedSchemaRefE86eeb84b7e922c35cfb0031a6309f7b -- ZeroTrustGatewayGatewayAccountLoggingSettings Methods: -- client.zeroTrust.gateway.logging.update({ ...params }) -> ZeroTrustGatewayGatewayAccountLoggingSettings -- client.zeroTrust.gateway.logging.get({ ...params }) -> ZeroTrustGatewayGatewayAccountLoggingSettings +- client.zeroTrust.gateway.logging.update({ ...params }) -> LoggingSetting +- client.zeroTrust.gateway.logging.get({ ...params }) -> LoggingSetting ### ProxyEndpoints Types: +- GatewayIPsItem +- ProxyEndpoint - UnnamedSchemaRef4753ee81779d0e57189420079abab61e -- ZeroTrustGatewayProxyEndpoints Methods: -- client.zeroTrust.gateway.proxyEndpoints.create({ ...params }) -> ZeroTrustGatewayProxyEndpoints -- client.zeroTrust.gateway.proxyEndpoints.list({ ...params }) -> ZeroTrustGatewayProxyEndpointsSinglePage +- client.zeroTrust.gateway.proxyEndpoints.create({ ...params }) -> ProxyEndpoint +- client.zeroTrust.gateway.proxyEndpoints.list({ ...params }) -> ProxyEndpointsSinglePage - client.zeroTrust.gateway.proxyEndpoints.delete(proxyEndpointId, { ...params }) -> UnnamedSchemaRef9444735ca60712dbcf8afd832eb5716a -- client.zeroTrust.gateway.proxyEndpoints.edit(proxyEndpointId, { ...params }) -> ZeroTrustGatewayProxyEndpoints -- client.zeroTrust.gateway.proxyEndpoints.get(proxyEndpointId, { ...params }) -> ZeroTrustGatewayProxyEndpoints +- client.zeroTrust.gateway.proxyEndpoints.edit(proxyEndpointId, { ...params }) -> ProxyEndpoint +- client.zeroTrust.gateway.proxyEndpoints.get(proxyEndpointId, { ...params }) -> ProxyEndpoint ### Rules Types: +- DNSResolverSettingsV4 +- DNSResolverSettingsV6 +- FilterItem +- Rule +- RuleSetting +- Schedule - UnnamedSchemaRef0b0764cdb06aad66b555fd74c8c78b2a -- ZeroTrustGatewayRules Methods: -- client.zeroTrust.gateway.rules.create({ ...params }) -> ZeroTrustGatewayRules -- client.zeroTrust.gateway.rules.update(ruleId, { ...params }) -> ZeroTrustGatewayRules -- client.zeroTrust.gateway.rules.list({ ...params }) -> ZeroTrustGatewayRulesSinglePage +- client.zeroTrust.gateway.rules.create({ ...params }) -> Rule +- client.zeroTrust.gateway.rules.update(ruleId, { ...params }) -> Rule +- client.zeroTrust.gateway.rules.list({ ...params }) -> RulesSinglePage - client.zeroTrust.gateway.rules.delete(ruleId, { ...params }) -> UnnamedSchemaRef9444735ca60712dbcf8afd832eb5716a -- client.zeroTrust.gateway.rules.get(ruleId, { ...params }) -> ZeroTrustGatewayRules +- client.zeroTrust.gateway.rules.get(ruleId, { ...params }) -> Rule ## Networks @@ -4903,41 +5055,41 @@ Methods: Types: -- TunnelRoute -- TunnelTeamnet +- Network +- Route - UnnamedSchemaRefC125d35cbb7f93aab989cd19bd764ed6 Methods: -- client.zeroTrust.networks.routes.create({ ...params }) -> TunnelRoute -- client.zeroTrust.networks.routes.list({ ...params }) -> TunnelTeamnetsV4PagePaginationArray -- client.zeroTrust.networks.routes.delete(routeId, { ...params }) -> TunnelRoute -- client.zeroTrust.networks.routes.edit(routeId, { ...params }) -> TunnelRoute +- client.zeroTrust.networks.routes.create({ ...params }) -> Route +- client.zeroTrust.networks.routes.list({ ...params }) -> NetworksV4PagePaginationArray +- client.zeroTrust.networks.routes.delete(routeId, { ...params }) -> Route +- client.zeroTrust.networks.routes.edit(routeId, { ...params }) -> Route #### IPs Methods: -- client.zeroTrust.networks.routes.ips.get(ip, { ...params }) -> TunnelTeamnet +- client.zeroTrust.networks.routes.ips.get(ip, { ...params }) -> Network #### Networks Methods: -- client.zeroTrust.networks.routes.networks.create(ipNetworkEncoded, { ...params }) -> TunnelRoute -- client.zeroTrust.networks.routes.networks.delete(ipNetworkEncoded, { ...params }) -> TunnelRoute -- client.zeroTrust.networks.routes.networks.edit(ipNetworkEncoded, { ...params }) -> TunnelRoute +- client.zeroTrust.networks.routes.networks.create(ipNetworkEncoded, { ...params }) -> Route +- client.zeroTrust.networks.routes.networks.delete(ipNetworkEncoded, { ...params }) -> Route +- client.zeroTrust.networks.routes.networks.edit(ipNetworkEncoded, { ...params }) -> Route ### VirtualNetworks Types: -- TunnelVirtualNetwork +- Network Methods: - client.zeroTrust.networks.virtualNetworks.create({ ...params }) -> UnnamedSchemaRef65e3c8c1a9c4638ec25cdbbaca7165c1 | null -- client.zeroTrust.networks.virtualNetworks.list({ ...params }) -> TunnelVirtualNetworksSinglePage +- client.zeroTrust.networks.virtualNetworks.list({ ...params }) -> NetworksSinglePage - client.zeroTrust.networks.virtualNetworks.delete(virtualNetworkId, { ...params }) -> UnnamedSchemaRef65e3c8c1a9c4638ec25cdbbaca7165c1 | null - client.zeroTrust.networks.virtualNetworks.edit(virtualNetworkId, { ...params }) -> UnnamedSchemaRef65e3c8c1a9c4638ec25cdbbaca7165c1 | null @@ -4947,42 +5099,36 @@ Methods: Types: -- ChallengesWidget -- ChallengesWidgetList +- Widget +- WidgetDomain +- WidgetDomainItem Methods: -- client.challenges.widgets.create({ ...params }) -> ChallengesWidget -- client.challenges.widgets.update(sitekey, { ...params }) -> ChallengesWidget -- client.challenges.widgets.list({ ...params }) -> ChallengesWidgetListsV4PagePaginationArray -- client.challenges.widgets.delete(sitekey, { ...params }) -> ChallengesWidget -- client.challenges.widgets.get(sitekey, { ...params }) -> ChallengesWidget -- client.challenges.widgets.rotateSecret(sitekey, { ...params }) -> ChallengesWidget +- client.challenges.widgets.create({ ...params }) -> Widget +- client.challenges.widgets.update(sitekey, { ...params }) -> Widget +- client.challenges.widgets.list({ ...params }) -> WidgetDomainsV4PagePaginationArray +- client.challenges.widgets.delete(sitekey, { ...params }) -> Widget +- client.challenges.widgets.get(sitekey, { ...params }) -> Widget +- client.challenges.widgets.rotateSecret(sitekey, { ...params }) -> Widget # Hyperdrive Types: +- Configuration - Hyperdrive ## Configs -Types: - -- ConfigCreateResponse -- ConfigUpdateResponse -- ConfigListResponse -- ConfigEditResponse -- ConfigGetResponse - Methods: -- client.hyperdrive.configs.create({ ...params }) -> ConfigCreateResponse | null -- client.hyperdrive.configs.update(hyperdriveId, { ...params }) -> ConfigUpdateResponse | null -- client.hyperdrive.configs.list({ ...params }) -> ConfigListResponsesSinglePage +- client.hyperdrive.configs.create({ ...params }) -> Hyperdrive | null +- client.hyperdrive.configs.update(hyperdriveId, { ...params }) -> Hyperdrive | null +- client.hyperdrive.configs.list({ ...params }) -> HyperdrivesSinglePage - client.hyperdrive.configs.delete(hyperdriveId, { ...params }) -> UnnamedSchemaRef9444735ca60712dbcf8afd832eb5716a -- client.hyperdrive.configs.edit(hyperdriveId, { ...params }) -> ConfigEditResponse | null -- client.hyperdrive.configs.get(hyperdriveId, { ...params }) -> ConfigGetResponse | null +- client.hyperdrive.configs.edit(hyperdriveId, { ...params }) -> Hyperdrive | null +- client.hyperdrive.configs.get(hyperdriveId, { ...params }) -> Hyperdrive | null # RUM @@ -4990,29 +5136,29 @@ Methods: Types: -- RUMSite +- Site - SiteInfoDeleteResponse Methods: -- client.rum.siteInfo.create({ ...params }) -> RUMSite -- client.rum.siteInfo.update(siteId, { ...params }) -> RUMSite -- client.rum.siteInfo.list({ ...params }) -> RUMSitesV4PagePaginationArray +- client.rum.siteInfo.create({ ...params }) -> Site +- client.rum.siteInfo.update(siteId, { ...params }) -> Site +- client.rum.siteInfo.list({ ...params }) -> SitesV4PagePaginationArray - client.rum.siteInfo.delete(siteId, { ...params }) -> SiteInfoDeleteResponse -- client.rum.siteInfo.get(siteId, { ...params }) -> RUMSite +- client.rum.siteInfo.get(siteId, { ...params }) -> Site ## Rules Types: -- RUMRule +- Rule - RuleListResponse - RuleDeleteResponse Methods: -- client.rum.rules.create(rulesetId, { ...params }) -> RUMRule -- client.rum.rules.update(rulesetId, ruleId, { ...params }) -> RUMRule +- client.rum.rules.create(rulesetId, { ...params }) -> Rule +- client.rum.rules.update(rulesetId, ruleId, { ...params }) -> Rule - client.rum.rules.list(rulesetId, { ...params }) -> RuleListResponse - client.rum.rules.delete(rulesetId, ruleId, { ...params }) -> RuleDeleteResponse @@ -5022,25 +5168,26 @@ Methods: Types: -- VectorizeCreateIndex -- VectorizeIndexDeleteVectorsByID -- VectorizeIndexInsert -- VectorizeIndexQuery -- VectorizeIndexUpsert +- CreateIndex +- IndexDeleteVectorsByID +- IndexDimensionConfiguration +- IndexInsert +- IndexQuery +- IndexUpsert - IndexGetByIDsResponse Methods: -- client.vectorize.indexes.create(accountIdentifier, { ...params }) -> VectorizeCreateIndex | null -- client.vectorize.indexes.update(accountIdentifier, indexName, { ...params }) -> VectorizeCreateIndex | null -- client.vectorize.indexes.list(accountIdentifier) -> VectorizeCreateIndicesSinglePage +- client.vectorize.indexes.create(accountIdentifier, { ...params }) -> CreateIndex | null +- client.vectorize.indexes.update(accountIdentifier, indexName, { ...params }) -> CreateIndex | null +- client.vectorize.indexes.list(accountIdentifier) -> CreateIndicesSinglePage - client.vectorize.indexes.delete(accountIdentifier, indexName) -> UnnamedSchemaRef9444735ca60712dbcf8afd832eb5716a -- client.vectorize.indexes.deleteByIds(accountIdentifier, indexName, { ...params }) -> VectorizeIndexDeleteVectorsByID | null -- client.vectorize.indexes.get(accountIdentifier, indexName) -> VectorizeCreateIndex | null +- client.vectorize.indexes.deleteByIds(accountIdentifier, indexName, { ...params }) -> IndexDeleteVectorsByID | null +- client.vectorize.indexes.get(accountIdentifier, indexName) -> CreateIndex | null - client.vectorize.indexes.getByIds(accountIdentifier, indexName, { ...params }) -> IndexGetByIDsResponse | null -- client.vectorize.indexes.insert(accountIdentifier, indexName, { ...params }) -> VectorizeIndexInsert | null -- client.vectorize.indexes.query(accountIdentifier, indexName, { ...params }) -> VectorizeIndexQuery | null -- client.vectorize.indexes.upsert(accountIdentifier, indexName, { ...params }) -> VectorizeIndexUpsert | null +- client.vectorize.indexes.insert(accountIdentifier, indexName, { ...params }) -> IndexInsert | null +- client.vectorize.indexes.query(accountIdentifier, indexName, { ...params }) -> IndexQuery | null +- client.vectorize.indexes.upsert(accountIdentifier, indexName, { ...params }) -> IndexUpsert | null # URLScanner @@ -5980,6 +6127,10 @@ Methods: Types: +- BotFightModeConfiguration +- SubscriptionConfiguration +- SuperBotFightModeDefinitelyConfiguration +- SuperBotFightModeLikelyConfig - BotManagementUpdateResponse - BotManagementGetResponse @@ -5999,30 +6150,32 @@ Methods: Types: -- ObservatorySchedule -- ObservatoryTrend +- LabeledRegion +- LighthouseReport +- Schedule +- Trend - SpeedDeleteResponse Methods: - client.speed.delete(url, { ...params }) -> SpeedDeleteResponse -- client.speed.scheduleGet(url, { ...params }) -> ObservatorySchedule -- client.speed.trendsList(url, { ...params }) -> ObservatoryTrend +- client.speed.scheduleGet(url, { ...params }) -> Schedule +- client.speed.trendsList(url, { ...params }) -> Trend ## Tests Types: -- ObservatoryPageTest +- Test - TestListResponse - TestDeleteResponse Methods: -- client.speed.tests.create(url, { ...params }) -> ObservatoryPageTest +- client.speed.tests.create(url, { ...params }) -> Test - client.speed.tests.list(url, { ...params }) -> TestListResponse - client.speed.tests.delete(url, { ...params }) -> TestDeleteResponse -- client.speed.tests.get(url, testId, { ...params }) -> ObservatoryPageTest +- client.speed.tests.get(url, testId, { ...params }) -> Test ## Schedule @@ -6038,11 +6191,11 @@ Methods: Types: -- ObservatoryAvailabilities +- Availability Methods: -- client.speed.availabilities.list({ ...params }) -> ObservatoryAvailabilities +- client.speed.availabilities.list({ ...params }) -> Availability ## Pages @@ -6074,14 +6227,15 @@ Methods: Types: -- HostnameSettingDelete -- HostnameStting +- Setting +- SettingValue +- TLSDeleteResponse - TLSGetResponse Methods: -- client.hostnames.settings.tls.update(settingId, hostname, { ...params }) -> HostnameStting -- client.hostnames.settings.tls.delete(settingId, hostname, { ...params }) -> HostnameSettingDelete +- client.hostnames.settings.tls.update(settingId, hostname, { ...params }) -> Setting +- client.hostnames.settings.tls.delete(settingId, hostname, { ...params }) -> TLSDeleteResponse - client.hostnames.settings.tls.get(settingId, { ...params }) -> TLSGetResponse | null # Snippets @@ -6136,34 +6290,34 @@ Methods: Types: -- CloudforceOneQuota -- CloudforceOneRequestConstants -- CloudforceOneRequestItem -- CloudforceOneRequestListItem -- CloudforceOneRequestTypes +- Item +- ListItem +- Quota +- RequestConstants +- RequestTypes Methods: -- client.cloudforceOne.requests.create(accountIdentifier, { ...params }) -> CloudforceOneRequestItem -- client.cloudforceOne.requests.update(accountIdentifier, requestIdentifier, { ...params }) -> CloudforceOneRequestItem -- client.cloudforceOne.requests.list(accountIdentifier, { ...params }) -> CloudforceOneRequestListItemsV4PagePaginationArray +- client.cloudforceOne.requests.create(accountIdentifier, { ...params }) -> Item +- client.cloudforceOne.requests.update(accountIdentifier, requestIdentifier, { ...params }) -> Item +- client.cloudforceOne.requests.list(accountIdentifier, { ...params }) -> ListItemsV4PagePaginationArray - client.cloudforceOne.requests.delete(accountIdentifier, requestIdentifier) -> UnnamedSchemaRefEc4d85c3d1bcc6b3b7e99c199ae99846 -- client.cloudforceOne.requests.constants(accountIdentifier) -> CloudforceOneRequestConstants -- client.cloudforceOne.requests.get(accountIdentifier, requestIdentifier) -> CloudforceOneRequestItem -- client.cloudforceOne.requests.quota(accountIdentifier) -> CloudforceOneQuota -- client.cloudforceOne.requests.types(accountIdentifier) -> CloudforceOneRequestTypes +- client.cloudforceOne.requests.constants(accountIdentifier) -> RequestConstants +- client.cloudforceOne.requests.get(accountIdentifier, requestIdentifier) -> Item +- client.cloudforceOne.requests.quota(accountIdentifier) -> Quota +- client.cloudforceOne.requests.types(accountIdentifier) -> RequestTypes ### Message Types: -- CloudforceOneRequestMessageItem +- Message - MessageGetResponse Methods: -- client.cloudforceOne.requests.message.create(accountIdentifier, requestIdentifier, { ...params }) -> CloudforceOneRequestMessageItem -- client.cloudforceOne.requests.message.update(accountIdentifier, requestIdentifier, messageIdentifer, { ...params }) -> CloudforceOneRequestMessageItem +- client.cloudforceOne.requests.message.create(accountIdentifier, requestIdentifier, { ...params }) -> Message +- client.cloudforceOne.requests.message.update(accountIdentifier, requestIdentifier, messageIdentifer, { ...params }) -> Message - client.cloudforceOne.requests.message.delete(accountIdentifier, requestIdentifier, messageIdentifer) -> UnnamedSchemaRefEc4d85c3d1bcc6b3b7e99c199ae99846 - client.cloudforceOne.requests.message.get(accountIdentifier, requestIdentifier, { ...params }) -> MessageGetResponse @@ -6171,12 +6325,14 @@ Methods: Types: -- CloudforceOnePriorityItem +- LabelItem +- Priority +- PriorityEdit Methods: -- client.cloudforceOne.requests.priority.create(accountIdentifier, { ...params }) -> CloudforceOnePriorityItem -- client.cloudforceOne.requests.priority.update(accountIdentifier, priorityIdentifer, { ...params }) -> CloudforceOneRequestItem +- client.cloudforceOne.requests.priority.create(accountIdentifier, { ...params }) -> Priority +- client.cloudforceOne.requests.priority.update(accountIdentifier, priorityIdentifer, { ...params }) -> Item - client.cloudforceOne.requests.priority.delete(accountIdentifier, priorityIdentifer) -> UnnamedSchemaRefEc4d85c3d1bcc6b3b7e99c199ae99846 -- client.cloudforceOne.requests.priority.get(accountIdentifier, priorityIdentifer) -> CloudforceOneRequestItem -- client.cloudforceOne.requests.priority.quota(accountIdentifier) -> CloudforceOneQuota +- client.cloudforceOne.requests.priority.get(accountIdentifier, priorityIdentifer) -> Item +- client.cloudforceOne.requests.priority.quota(accountIdentifier) -> Quota diff --git a/src/index.ts b/src/index.ts index a46eb89e66..099ce46f21 100644 --- a/src/index.ts +++ b/src/index.ts @@ -146,7 +146,7 @@ export class Cloudflare extends Core.APIClient { originCACertificates: API.OriginCACertificates = new API.OriginCACertificates(this); ips: API.IPs = new API.IPs(this); memberships: API.Memberships = new API.Memberships(this); - user: API.UserResource = new API.UserResource(this); + user: API.User = new API.User(this); zones: API.Zones = new API.Zones(this); loadBalancers: API.LoadBalancers = new API.LoadBalancers(this); cache: API.Cache = new API.Cache(this); @@ -390,234 +390,70 @@ export namespace Cloudflare { export import SinglePageResponse = Pagination.SinglePageResponse; export import Accounts = API.Accounts; - export import Account = API.Account; - export import AccountListResponse = API.AccountListResponse; - export import AccountListResponsesV4PagePaginationArray = API.AccountListResponsesV4PagePaginationArray; - export import AccountUpdateParams = API.AccountUpdateParams; - export import AccountListParams = API.AccountListParams; - export import AccountGetParams = API.AccountGetParams; export import OriginCACertificates = API.OriginCACertificates; - export import OriginCACertificate = API.OriginCACertificate; - export import OriginCACertificatesSinglePage = API.OriginCACertificatesSinglePage; - export import OriginCACertificateCreateParams = API.OriginCACertificateCreateParams; - export import OriginCACertificateListParams = API.OriginCACertificateListParams; - export import OriginCACertificateDeleteParams = API.OriginCACertificateDeleteParams; export import IPs = API.IPs; - export import JDCloudIPs = API.JDCloudIPs; - export import IPListResponse = API.IPListResponse; - export import IPListParams = API.IPListParams; export import Memberships = API.Memberships; - export import Membership = API.Membership; - export import MembershipDeleteResponse = API.MembershipDeleteResponse; - export import MembershipsV4PagePaginationArray = API.MembershipsV4PagePaginationArray; - export import MembershipUpdateParams = API.MembershipUpdateParams; - export import MembershipListParams = API.MembershipListParams; - export import MembershipDeleteParams = API.MembershipDeleteParams; - - export import UserResource = API.UserResource; + export import User = API.User; - export import UserEditParams = API.UserEditParams; export import Zones = API.Zones; - export import Zone = API.Zone; - export import ZoneDeleteResponse = API.ZoneDeleteResponse; - export import ZonesV4PagePaginationArray = API.ZonesV4PagePaginationArray; - export import ZoneCreateParams = API.ZoneCreateParams; - export import ZoneListParams = API.ZoneListParams; - export import ZoneDeleteParams = API.ZoneDeleteParams; - export import ZoneEditParams = API.ZoneEditParams; - export import ZoneGetParams = API.ZoneGetParams; export import LoadBalancers = API.LoadBalancers; - export import LoadBalancer = API.LoadBalancer; - export import UnnamedSchemaRef06ba14ec7860c091efc98fd9af30f382 = API.UnnamedSchemaRef06ba14ec7860c091efc98fd9af30f382; - export import LoadBalancerDeleteResponse = API.LoadBalancerDeleteResponse; - export import LoadBalancersSinglePage = API.LoadBalancersSinglePage; - export import LoadBalancerCreateParams = API.LoadBalancerCreateParams; - export import LoadBalancerUpdateParams = API.LoadBalancerUpdateParams; - export import LoadBalancerListParams = API.LoadBalancerListParams; - export import LoadBalancerDeleteParams = API.LoadBalancerDeleteParams; - export import LoadBalancerEditParams = API.LoadBalancerEditParams; - export import LoadBalancerGetParams = API.LoadBalancerGetParams; export import Cache = API.Cache; - export import CachePurgeResponse = API.CachePurgeResponse; - export import CachePurgeParams = API.CachePurgeParams; export import SSL = API.SSL; export import Subscriptions = API.Subscriptions; - export import SubscriptionListResponse = API.SubscriptionListResponse; - export import SubscriptionDeleteResponse = API.SubscriptionDeleteResponse; - export import SubscriptionListResponsesSinglePage = API.SubscriptionListResponsesSinglePage; - export import SubscriptionCreateParams = API.SubscriptionCreateParams; - export import SubscriptionUpdateParams = API.SubscriptionUpdateParams; - export import SubscriptionDeleteParams = API.SubscriptionDeleteParams; export import ACM = API.ACM; export import Argo = API.Argo; export import Plans = API.Plans; - export import AvailableRatePlan = API.AvailableRatePlan; - export import AvailableRatePlansSinglePage = API.AvailableRatePlansSinglePage; export import RatePlans = API.RatePlans; - export import RatePlan = API.RatePlan; - export import RatePlanGetResponse = API.RatePlanGetResponse; export import CertificateAuthorities = API.CertificateAuthorities; export import ClientCertificates = API.ClientCertificates; - export import ClientCertificate = API.ClientCertificate; - export import ClientCertificatesV4PagePaginationArray = API.ClientCertificatesV4PagePaginationArray; - export import ClientCertificateCreateParams = API.ClientCertificateCreateParams; - export import ClientCertificateListParams = API.ClientCertificateListParams; - export import ClientCertificateDeleteParams = API.ClientCertificateDeleteParams; - export import ClientCertificateEditParams = API.ClientCertificateEditParams; - export import ClientCertificateGetParams = API.ClientCertificateGetParams; export import CustomCertificates = API.CustomCertificates; - export import CustomCertificate = API.CustomCertificate; - export import CustomCertificatesV4PagePaginationArray = API.CustomCertificatesV4PagePaginationArray; - export import CustomCertificateCreateParams = API.CustomCertificateCreateParams; - export import CustomCertificateListParams = API.CustomCertificateListParams; - export import CustomCertificateDeleteParams = API.CustomCertificateDeleteParams; - export import CustomCertificateEditParams = API.CustomCertificateEditParams; - export import CustomCertificateGetParams = API.CustomCertificateGetParams; export import CustomHostnames = API.CustomHostnames; - export import CustomHostname = API.CustomHostname; - export import UnnamedSchemaRef16aca57bde2963201c7e6e895436c1c1 = API.UnnamedSchemaRef16aca57bde2963201c7e6e895436c1c1; - export import UnnamedSchemaRef78adb375f06c6d462dd92b99e2ecf510 = API.UnnamedSchemaRef78adb375f06c6d462dd92b99e2ecf510; - export import UnnamedSchemaRef9a9935a9a770967bb604ae41a81e42e1 = API.UnnamedSchemaRef9a9935a9a770967bb604ae41a81e42e1; - export import UnnamedSchemaRefD2a16d7ee1ad3a888dd5821c918d51fd = API.UnnamedSchemaRefD2a16d7ee1ad3a888dd5821c918d51fd; - export import CustomHostnameCreateResponse = API.CustomHostnameCreateResponse; - export import CustomHostnameListResponse = API.CustomHostnameListResponse; - export import CustomHostnameEditResponse = API.CustomHostnameEditResponse; - export import CustomHostnameGetResponse = API.CustomHostnameGetResponse; - export import CustomHostnameListResponsesV4PagePaginationArray = API.CustomHostnameListResponsesV4PagePaginationArray; - export import CustomHostnameCreateParams = API.CustomHostnameCreateParams; - export import CustomHostnameListParams = API.CustomHostnameListParams; - export import CustomHostnameDeleteParams = API.CustomHostnameDeleteParams; - export import CustomHostnameEditParams = API.CustomHostnameEditParams; - export import CustomHostnameGetParams = API.CustomHostnameGetParams; export import CustomNameservers = API.CustomNameservers; - export import CustomNameserver = API.CustomNameserver; - export import CustomNameserverAvailabiltyResponse = API.CustomNameserverAvailabiltyResponse; - export import CustomNameserverGetResponse = API.CustomNameserverGetResponse; - export import CustomNameserverVerifyResponse = API.CustomNameserverVerifyResponse; - export import CustomNameserverCreateParams = API.CustomNameserverCreateParams; - export import CustomNameserverDeleteParams = API.CustomNameserverDeleteParams; - export import CustomNameserverAvailabiltyParams = API.CustomNameserverAvailabiltyParams; - export import CustomNameserverGetParams = API.CustomNameserverGetParams; - export import CustomNameserverVerifyParams = API.CustomNameserverVerifyParams; export import DNS = API.DNS; - export import UnnamedSchemaRef6595695ff25b0614667b25f66b7bbaba = API.UnnamedSchemaRef6595695ff25b0614667b25f66b7bbaba; - export import UnnamedSchemaRef65be9614de145bf4a58d0fddf46df7ca = API.UnnamedSchemaRef65be9614de145bf4a58d0fddf46df7ca; - export import UnnamedSchemaRef85b45d163202bbab7456da6b346d9fe2 = API.UnnamedSchemaRef85b45d163202bbab7456da6b346d9fe2; export import DNSSECResource = API.DNSSECResource; - export import DNSSEC = API.DNSSEC; - export import DNSSECDeleteParams = API.DNSSECDeleteParams; - export import DNSSECEditParams = API.DNSSECEditParams; - export import DNSSECGetParams = API.DNSSECGetParams; export import EmailRouting = API.EmailRouting; - export import EmailSettings = API.EmailSettings; - export import EmailRoutingDisableResponse = API.EmailRoutingDisableResponse; - export import EmailRoutingEnableResponse = API.EmailRoutingEnableResponse; - export import EmailRoutingGetResponse = API.EmailRoutingGetResponse; - export import EmailRoutingDisableParams = API.EmailRoutingDisableParams; - export import EmailRoutingEnableParams = API.EmailRoutingEnableParams; export import Filters = API.Filters; - export import FirewallFilter = API.FirewallFilter; - export import UnnamedSchemaRef39af4f78d23244e2595fb47c811221df = API.UnnamedSchemaRef39af4f78d23244e2595fb47c811221df; - export import FilterCreateResponse = API.FilterCreateResponse; - export import FirewallFiltersV4PagePaginationArray = API.FirewallFiltersV4PagePaginationArray; - export import FilterCreateParams = API.FilterCreateParams; - export import FilterUpdateParams = API.FilterUpdateParams; - export import FilterListParams = API.FilterListParams; - export import FilterDeleteParams = API.FilterDeleteParams; export import Firewall = API.Firewall; export import Healthchecks = API.Healthchecks; - export import Healthcheck = API.Healthcheck; - export import UnnamedSchemaRefAaa560acadcbf1ae1dc619ba1ea5948e = API.UnnamedSchemaRefAaa560acadcbf1ae1dc619ba1ea5948e; - export import HealthcheckDeleteResponse = API.HealthcheckDeleteResponse; - export import HealthchecksSinglePage = API.HealthchecksSinglePage; - export import HealthcheckCreateParams = API.HealthcheckCreateParams; - export import HealthcheckUpdateParams = API.HealthcheckUpdateParams; - export import HealthcheckListParams = API.HealthcheckListParams; - export import HealthcheckDeleteParams = API.HealthcheckDeleteParams; - export import HealthcheckEditParams = API.HealthcheckEditParams; - export import HealthcheckGetParams = API.HealthcheckGetParams; export import KeylessCertificates = API.KeylessCertificates; - export import KeylessCertificate = API.KeylessCertificate; - export import KeylessCertificateHostname = API.KeylessCertificateHostname; - export import UnnamedSchemaRefA91f0bd72ee433f010eecfdc94ccf298 = API.UnnamedSchemaRefA91f0bd72ee433f010eecfdc94ccf298; - export import KeylessCertificateHostnamesSinglePage = API.KeylessCertificateHostnamesSinglePage; - export import KeylessCertificateCreateParams = API.KeylessCertificateCreateParams; - export import KeylessCertificateListParams = API.KeylessCertificateListParams; - export import KeylessCertificateDeleteParams = API.KeylessCertificateDeleteParams; - export import KeylessCertificateEditParams = API.KeylessCertificateEditParams; - export import KeylessCertificateGetParams = API.KeylessCertificateGetParams; export import Logpush = API.Logpush; export import Logs = API.Logs; export import OriginTLSClientAuth = API.OriginTLSClientAuth; - export import OriginTLSClientCertificateZoneAuthenticatedOriginPull = API.OriginTLSClientCertificateZoneAuthenticatedOriginPull; - export import OriginTLSClientAuthListResponse = API.OriginTLSClientAuthListResponse; - export import OriginTLSClientAuthListResponsesSinglePage = API.OriginTLSClientAuthListResponsesSinglePage; - export import OriginTLSClientAuthCreateParams = API.OriginTLSClientAuthCreateParams; - export import OriginTLSClientAuthListParams = API.OriginTLSClientAuthListParams; - export import OriginTLSClientAuthDeleteParams = API.OriginTLSClientAuthDeleteParams; - export import OriginTLSClientAuthGetParams = API.OriginTLSClientAuthGetParams; export import Pagerules = API.Pagerules; - export import ZonesPagerule = API.ZonesPagerule; - export import PageruleListResponse = API.PageruleListResponse; - export import PageruleDeleteResponse = API.PageruleDeleteResponse; - export import PageruleCreateParams = API.PageruleCreateParams; - export import PageruleUpdateParams = API.PageruleUpdateParams; - export import PageruleListParams = API.PageruleListParams; - export import PageruleDeleteParams = API.PageruleDeleteParams; - export import PageruleEditParams = API.PageruleEditParams; - export import PageruleGetParams = API.PageruleGetParams; export import RateLimits = API.RateLimits; - export import RateLimit = API.RateLimit; - export import RateLimitListResponse = API.RateLimitListResponse; - export import RateLimitDeleteResponse = API.RateLimitDeleteResponse; - export import RateLimitListResponsesV4PagePaginationArray = API.RateLimitListResponsesV4PagePaginationArray; - export import RateLimitCreateParams = API.RateLimitCreateParams; - export import RateLimitListParams = API.RateLimitListParams; - export import RateLimitDeleteParams = API.RateLimitDeleteParams; - export import RateLimitEditParams = API.RateLimitEditParams; export import SecondaryDNS = API.SecondaryDNS; export import WaitingRooms = API.WaitingRooms; - export import UnnamedSchemaRefA282afe149b2cf60a204505bd4c53324 = API.UnnamedSchemaRefA282afe149b2cf60a204505bd4c53324; - export import WaitingRoom = API.WaitingRoom; - export import WaitingRoomDeleteResponse = API.WaitingRoomDeleteResponse; - export import WaitingRoomsSinglePage = API.WaitingRoomsSinglePage; - export import WaitingRoomCreateParams = API.WaitingRoomCreateParams; - export import WaitingRoomUpdateParams = API.WaitingRoomUpdateParams; - export import WaitingRoomListParams = API.WaitingRoomListParams; - export import WaitingRoomDeleteParams = API.WaitingRoomDeleteParams; - export import WaitingRoomEditParams = API.WaitingRoomEditParams; - export import WaitingRoomGetParams = API.WaitingRoomGetParams; export import Web3 = API.Web3; @@ -628,77 +464,24 @@ export namespace Cloudflare { export import DurableObjects = API.DurableObjects; export import Queues = API.Queues; - export import Queue = API.Queue; - export import QueueCreated = API.QueueCreated; - export import QueueUpdated = API.QueueUpdated; - export import QueueCreateResponse = API.QueueCreateResponse; - export import QueueUpdateResponse = API.QueueUpdateResponse; - export import QueueListResponse = API.QueueListResponse; - export import QueueGetResponse = API.QueueGetResponse; - export import QueueCreateParams = API.QueueCreateParams; - export import QueueUpdateParams = API.QueueUpdateParams; - export import QueueListParams = API.QueueListParams; - export import QueueDeleteParams = API.QueueDeleteParams; - export import QueueGetParams = API.QueueGetParams; export import ManagedHeaders = API.ManagedHeaders; - export import ManagedHeaderListResponse = API.ManagedHeaderListResponse; - export import ManagedHeaderEditResponse = API.ManagedHeaderEditResponse; - export import ManagedHeaderListParams = API.ManagedHeaderListParams; - export import ManagedHeaderEditParams = API.ManagedHeaderEditParams; export import PageShield = API.PageShield; - export import PageShieldSetting = API.PageShieldSetting; - export import PageShieldUpdateResponse = API.PageShieldUpdateResponse; - export import PageShieldUpdateParams = API.PageShieldUpdateParams; - export import PageShieldGetParams = API.PageShieldGetParams; export import Rulesets = API.Rulesets; - export import BlockRule = API.BlockRule; - export import ExecuteRule = API.ExecuteRule; - export import LogRule = API.LogRule; - export import RequestRule = API.RequestRule; - export import Ruleset = API.Ruleset; - export import SkipRule = API.SkipRule; - export import RulesetCreateResponse = API.RulesetCreateResponse; - export import RulesetUpdateResponse = API.RulesetUpdateResponse; - export import RulesetGetResponse = API.RulesetGetResponse; - export import RulesetsSinglePage = API.RulesetsSinglePage; - export import RulesetCreateParams = API.RulesetCreateParams; - export import RulesetUpdateParams = API.RulesetUpdateParams; - export import RulesetListParams = API.RulesetListParams; - export import RulesetDeleteParams = API.RulesetDeleteParams; - export import RulesetGetParams = API.RulesetGetParams; export import URLNormalization = API.URLNormalization; - export import URLNormalizationUpdateResponse = API.URLNormalizationUpdateResponse; - export import URLNormalizationGetResponse = API.URLNormalizationGetResponse; - export import URLNormalizationUpdateParams = API.URLNormalizationUpdateParams; - export import URLNormalizationGetParams = API.URLNormalizationGetParams; export import Spectrum = API.Spectrum; export import Addressing = API.Addressing; export import AuditLogs = API.AuditLogs; - export import AuditLogListResponse = API.AuditLogListResponse; - export import AuditLogListResponsesV4PagePaginationArray = API.AuditLogListResponsesV4PagePaginationArray; - export import AuditLogListParams = API.AuditLogListParams; export import Billing = API.Billing; export import BrandProtection = API.BrandProtection; - export import IntelPhishingURLInfo = API.IntelPhishingURLInfo; - export import IntelPhishingURLSubmit = API.IntelPhishingURLSubmit; - export import UnnamedSchemaRef209db30ed499548152d6f3bccf720b54 = API.UnnamedSchemaRef209db30ed499548152d6f3bccf720b54; - export import UnnamedSchemaRef39419d70e2399b28b15cd660afd342fb = API.UnnamedSchemaRef39419d70e2399b28b15cd660afd342fb; - export import UnnamedSchemaRef3e10ea08deb8102a27500f986488c1e8 = API.UnnamedSchemaRef3e10ea08deb8102a27500f986488c1e8; - export import UnnamedSchemaRef44e66100b948bfe723054c56b6144766 = API.UnnamedSchemaRef44e66100b948bfe723054c56b6144766; - export import UnnamedSchemaRef767c0981cf47f45f0c766253dbd18669 = API.UnnamedSchemaRef767c0981cf47f45f0c766253dbd18669; - export import UnnamedSchemaRef9b4c9779a35b172cb69c71389ebc7014 = API.UnnamedSchemaRef9b4c9779a35b172cb69c71389ebc7014; - export import UnnamedSchemaRefA64e2a18a86750b6bd72cdf37ecfd869 = API.UnnamedSchemaRefA64e2a18a86750b6bd72cdf37ecfd869; - export import BrandProtectionSubmitParams = API.BrandProtectionSubmitParams; - export import BrandProtectionURLInfoParams = API.BrandProtectionURLInfoParams; export import Diagnostics = API.Diagnostics; @@ -707,30 +490,14 @@ export namespace Cloudflare { export import Intel = API.Intel; export import MagicTransit = API.MagicTransit; - export import UnnamedSchemaRef3b1a76a5e4a139b72ed7d93834773d39 = API.UnnamedSchemaRef3b1a76a5e4a139b72ed7d93834773d39; - export import UnnamedSchemaRefEebdc868ce7f7ae92e23438caa84e7b5 = API.UnnamedSchemaRefEebdc868ce7f7ae92e23438caa84e7b5; export import MagicNetworkMonitoring = API.MagicNetworkMonitoring; export import MTLSCertificates = API.MTLSCertificates; - export import MTLSCertificate = API.MTLSCertificate; - export import MTLSCertificateUpdate = API.MTLSCertificateUpdate; - export import MTLSCertificatesSinglePage = API.MTLSCertificatesSinglePage; - export import MTLSCertificateCreateParams = API.MTLSCertificateCreateParams; - export import MTLSCertificateListParams = API.MTLSCertificateListParams; - export import MTLSCertificateDeleteParams = API.MTLSCertificateDeleteParams; - export import MTLSCertificateGetParams = API.MTLSCertificateGetParams; export import Pages = API.Pages; export import PCAPs = API.PCAPs; - export import PCAPCreateResponse = API.PCAPCreateResponse; - export import PCAPListResponse = API.PCAPListResponse; - export import PCAPGetResponse = API.PCAPGetResponse; - export import PCAPListResponsesSinglePage = API.PCAPListResponsesSinglePage; - export import PCAPCreateParams = API.PCAPCreateParams; - export import PCAPListParams = API.PCAPListParams; - export import PCAPGetParams = API.PCAPGetParams; export import Registrar = API.Registrar; @@ -741,28 +508,14 @@ export namespace Cloudflare { export import Storage = API.Storage; export import Stream = API.Stream; - export import StreamVideos = API.StreamVideos; - export import StreamVideosSinglePage = API.StreamVideosSinglePage; - export import StreamCreateParams = API.StreamCreateParams; - export import StreamListParams = API.StreamListParams; - export import StreamDeleteParams = API.StreamDeleteParams; - export import StreamGetParams = API.StreamGetParams; export import Alerting = API.Alerting; - export import UnnamedSchemaRefD6e23adacaca017802aaa484a8b3f405 = API.UnnamedSchemaRefD6e23adacaca017802aaa484a8b3f405; export import D1 = API.D1; export import R2 = API.R2; export import WARPConnector = API.WARPConnector; - export import WARPConnectorTokenResponse = API.WARPConnectorTokenResponse; - export import WARPConnectorCreateParams = API.WARPConnectorCreateParams; - export import WARPConnectorListParams = API.WARPConnectorListParams; - export import WARPConnectorDeleteParams = API.WARPConnectorDeleteParams; - export import WARPConnectorEditParams = API.WARPConnectorEditParams; - export import WARPConnectorGetParams = API.WARPConnectorGetParams; - export import WARPConnectorTokenParams = API.WARPConnectorTokenParams; export import WorkersForPlatforms = API.WorkersForPlatforms; @@ -771,65 +524,28 @@ export namespace Cloudflare { export import Challenges = API.Challenges; export import HyperdriveResource = API.HyperdriveResource; - export import Hyperdrive = API.Hyperdrive; export import RUM = API.RUM; export import Vectorize = API.Vectorize; export import URLScanner = API.URLScanner; - export import URLScannerScanResponse = API.URLScannerScanResponse; - export import URLScannerScanParams = API.URLScannerScanParams; export import Radar = API.Radar; - export import UnnamedSchemaRef16e559c45a31db5480e21fbe904b2e42 = API.UnnamedSchemaRef16e559c45a31db5480e21fbe904b2e42; - export import UnnamedSchemaRef4124a22436f90127c7fa2c4543219752 = API.UnnamedSchemaRef4124a22436f90127c7fa2c4543219752; - export import UnnamedSchemaRef73de8b634bb48667e28a6c6c56080c51 = API.UnnamedSchemaRef73de8b634bb48667e28a6c6c56080c51; - export import UnnamedSchemaRef75bae70cf28e6bcef364b9840db3bdeb = API.UnnamedSchemaRef75bae70cf28e6bcef364b9840db3bdeb; - export import UnnamedSchemaRef7826220e105d84352ba1108d9ed88e55 = API.UnnamedSchemaRef7826220e105d84352ba1108d9ed88e55; - export import UnnamedSchemaRef83a14d589e799bc901b9ccc870251d09 = API.UnnamedSchemaRef83a14d589e799bc901b9ccc870251d09; - export import UnnamedSchemaRef8b383e904d9fb02521257ef9cc77d297 = API.UnnamedSchemaRef8b383e904d9fb02521257ef9cc77d297; - export import UnnamedSchemaRef9002274ed7cb7f3dc567421e31529a3a = API.UnnamedSchemaRef9002274ed7cb7f3dc567421e31529a3a; - export import UnnamedSchemaRefB5f3bd1840490bc487ffef84567807b1 = API.UnnamedSchemaRefB5f3bd1840490bc487ffef84567807b1; - export import UnnamedSchemaRefBaac9d7da12de53e99142f8ecd3982e5 = API.UnnamedSchemaRefBaac9d7da12de53e99142f8ecd3982e5; - export import UnnamedSchemaRefC5858f1f916a921846e0b6159af470a7 = API.UnnamedSchemaRefC5858f1f916a921846e0b6159af470a7; export import BotManagement = API.BotManagement; - export import BotManagementUpdateResponse = API.BotManagementUpdateResponse; - export import BotManagementGetResponse = API.BotManagementGetResponse; - export import BotManagementUpdateParams = API.BotManagementUpdateParams; - export import BotManagementGetParams = API.BotManagementGetParams; export import OriginPostQuantumEncryption = API.OriginPostQuantumEncryption; - export import OriginPostQuantumEncryptionUpdateParams = API.OriginPostQuantumEncryptionUpdateParams; - export import OriginPostQuantumEncryptionGetParams = API.OriginPostQuantumEncryptionGetParams; export import Speed = API.Speed; - export import ObservatorySchedule = API.ObservatorySchedule; - export import ObservatoryTrend = API.ObservatoryTrend; - export import SpeedDeleteResponse = API.SpeedDeleteResponse; - export import SpeedDeleteParams = API.SpeedDeleteParams; - export import SpeedScheduleGetParams = API.SpeedScheduleGetParams; - export import SpeedTrendsListParams = API.SpeedTrendsListParams; export import DCVDelegation = API.DCVDelegation; export import Hostnames = API.Hostnames; export import Snippets = API.Snippets; - export import Snippet = API.Snippet; - export import SnippetsSinglePage = API.SnippetsSinglePage; - export import SnippetUpdateParams = API.SnippetUpdateParams; export import Calls = API.Calls; - export import CallsApp = API.CallsApp; - export import CallsAppWithSecret = API.CallsAppWithSecret; - export import CallsAppsSinglePage = API.CallsAppsSinglePage; - export import CallCreateParams = API.CallCreateParams; - export import CallUpdateParams = API.CallUpdateParams; - export import CallListParams = API.CallListParams; - export import CallDeleteParams = API.CallDeleteParams; - export import CallGetParams = API.CallGetParams; export import CloudforceOne = API.CloudforceOne; @@ -854,11 +570,9 @@ export namespace Cloudflare { export import UnnamedSchemaRefB92f86eb861cd3dee83c40884802fda6 = API.UnnamedSchemaRefB92f86eb861cd3dee83c40884802fda6; export import UnnamedSchemaRefCc2ac1a037e5d6702fc77b3bcb527854 = API.UnnamedSchemaRefCc2ac1a037e5d6702fc77b3bcb527854; export import UnnamedSchemaRefD8600eb4758b3ae35607a0327bcd691b = API.UnnamedSchemaRefD8600eb4758b3ae35607a0327bcd691b; - export import UnnamedSchemaRefDfef9380cb53cc7d4bda9f75e109d7a2 = API.UnnamedSchemaRefDfef9380cb53cc7d4bda9f75e109d7a2; export import UnnamedSchemaRefE7c61ebe06ebfc3861ae8b9db4ba152b = API.UnnamedSchemaRefE7c61ebe06ebfc3861ae8b9db4ba152b; export import UnnamedSchemaRefEc4d85c3d1bcc6b3b7e99c199ae99846 = API.UnnamedSchemaRefEc4d85c3d1bcc6b3b7e99c199ae99846; export import UnnamedSchemaRefEe1e79edcb234d14c4dd266880f2fd24 = API.UnnamedSchemaRefEe1e79edcb234d14c4dd266880f2fd24; - export import UnnamedSchemaRefFb1dc8bb871d835b75bd0c2f50bd8572 = API.UnnamedSchemaRefFb1dc8bb871d835b75bd0c2f50bd8572; } export default Cloudflare; diff --git a/src/resources/accounts/accounts.ts b/src/resources/accounts/accounts.ts index a350333092..589928572a 100644 --- a/src/resources/accounts/accounts.ts +++ b/src/resources/accounts/accounts.ts @@ -3,7 +3,6 @@ import * as Core from 'cloudflare/core'; import { APIResource } from 'cloudflare/resource'; import { isRequestOptions } from 'cloudflare/core'; -import * as AccountsAPI from 'cloudflare/resources/accounts/accounts'; import * as Shared from 'cloudflare/resources/shared'; import * as MembersAPI from 'cloudflare/resources/accounts/members'; import * as RolesAPI from 'cloudflare/resources/accounts/roles'; @@ -197,16 +196,10 @@ export interface AccountGetParams { } export namespace Accounts { - export import Account = AccountsAPI.Account; - export import AccountListResponse = AccountsAPI.AccountListResponse; - export import AccountListResponsesV4PagePaginationArray = AccountsAPI.AccountListResponsesV4PagePaginationArray; - export import AccountUpdateParams = AccountsAPI.AccountUpdateParams; - export import AccountListParams = AccountsAPI.AccountListParams; - export import AccountGetParams = AccountsAPI.AccountGetParams; export import Members = MembersAPI.Members; export import Member = MembersAPI.Member; - export import MemberPermission = MembersAPI.MemberPermission; - export import MemberWithCode = MembersAPI.MemberWithCode; + export import MemberWithInviteCode = MembersAPI.MemberWithInviteCode; + export import Role = MembersAPI.Role; export import MemberListResponse = MembersAPI.MemberListResponse; export import MemberDeleteResponse = MembersAPI.MemberDeleteResponse; export import MemberListResponsesV4PagePaginationArray = MembersAPI.MemberListResponsesV4PagePaginationArray; @@ -217,9 +210,7 @@ export namespace Accounts { export import MemberGetParams = MembersAPI.MemberGetParams; export import Roles = RolesAPI.Roles; export import PermissionGrant = RolesAPI.PermissionGrant; - export import Role = RolesAPI.Role; - export import RoleListResponse = RolesAPI.RoleListResponse; - export import RoleListResponsesSinglePage = RolesAPI.RoleListResponsesSinglePage; + export import RolesSinglePage = RolesAPI.RolesSinglePage; export import RoleListParams = RolesAPI.RoleListParams; export import RoleGetParams = RolesAPI.RoleGetParams; } diff --git a/src/resources/accounts/index.ts b/src/resources/accounts/index.ts index 0955aacd71..ee38ab800c 100644 --- a/src/resources/accounts/index.ts +++ b/src/resources/accounts/index.ts @@ -1,18 +1,10 @@ // File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. -export { - Account, - AccountListResponse, - AccountUpdateParams, - AccountListParams, - AccountGetParams, - AccountListResponsesV4PagePaginationArray, - Accounts, -} from './accounts'; +export { Accounts } from './accounts'; export { Member, - MemberPermission, - MemberWithCode, + MemberWithInviteCode, + Role, MemberListResponse, MemberDeleteResponse, MemberCreateParams, @@ -23,12 +15,4 @@ export { MemberListResponsesV4PagePaginationArray, Members, } from './members'; -export { - PermissionGrant, - Role, - RoleListResponse, - RoleListParams, - RoleGetParams, - RoleListResponsesSinglePage, - Roles, -} from './roles'; +export { PermissionGrant, Role, RoleListParams, RoleGetParams, RolesSinglePage, Roles } from './roles'; diff --git a/src/resources/accounts/members.ts b/src/resources/accounts/members.ts index d729f0f544..52563c16df 100644 --- a/src/resources/accounts/members.ts +++ b/src/resources/accounts/members.ts @@ -4,17 +4,18 @@ import * as Core from 'cloudflare/core'; import { APIResource } from 'cloudflare/resource'; import * as MembersAPI from 'cloudflare/resources/accounts/members'; import * as RolesAPI from 'cloudflare/resources/accounts/roles'; +import * as PermissionGroupsAPI from 'cloudflare/resources/user/tokens/permission-groups'; import { V4PagePaginationArray, type V4PagePaginationArrayParams } from 'cloudflare/pagination'; export class Members extends APIResource { /** * Add a user to the list of members for this account. */ - create(params: MemberCreateParams, options?: Core.RequestOptions): Core.APIPromise { + create(params: MemberCreateParams, options?: Core.RequestOptions): Core.APIPromise { const { account_id, ...body } = params; return ( this._client.post(`/accounts/${account_id}/members`, { body, ...options }) as Core.APIPromise<{ - result: MemberWithCode; + result: MemberWithInviteCode; }> )._thenUnwrap((obj) => obj.result); } @@ -92,7 +93,7 @@ export interface Member { /** * Roles assigned to this member. */ - roles: Array; + roles: Array; status: unknown; @@ -129,33 +130,7 @@ export namespace Member { } } -export interface MemberPermission { - analytics?: RolesAPI.PermissionGrant; - - billing?: RolesAPI.PermissionGrant; - - cache_purge?: RolesAPI.PermissionGrant; - - dns?: RolesAPI.PermissionGrant; - - dns_records?: RolesAPI.PermissionGrant; - - lb?: RolesAPI.PermissionGrant; - - logs?: RolesAPI.PermissionGrant; - - organization?: RolesAPI.PermissionGrant; - - ssl?: RolesAPI.PermissionGrant; - - waf?: RolesAPI.PermissionGrant; - - zone_settings?: RolesAPI.PermissionGrant; - - zones?: RolesAPI.PermissionGrant; -} - -export interface MemberWithCode { +export interface MemberWithInviteCode { /** * Membership identifier tag. */ @@ -164,11 +139,11 @@ export interface MemberWithCode { /** * Roles assigned to this member. */ - roles: Array; + roles: Array; status: unknown; - user: MemberWithCode.User; + user: MemberWithInviteCode.User; /** * The unique activation code for the account membership. @@ -176,7 +151,7 @@ export interface MemberWithCode { code?: string; } -export namespace MemberWithCode { +export namespace MemberWithInviteCode { export interface User { /** * The contact email address of the user. @@ -206,6 +181,25 @@ export namespace MemberWithCode { } } +export interface Role { + /** + * Role identifier tag. + */ + id: string; + + /** + * Description of role's permissions. + */ + description: string; + + /** + * Role name. + */ + name: string; + + permissions: PermissionGroupsAPI.Permission; +} + export interface MemberListResponse { /** * Identifier @@ -225,7 +219,7 @@ export interface MemberListResponse { /** * Roles assigned to this Member. */ - roles: Array; + roles: Array; /** * A member's status in the organization. @@ -233,30 +227,6 @@ export interface MemberListResponse { status: 'accepted' | 'invited'; } -export namespace MemberListResponse { - export interface Role { - /** - * Role identifier tag. - */ - id: string; - - /** - * Description of role's permissions. - */ - description: string; - - /** - * Role Name. - */ - name: string; - - /** - * Access permissions for this User. - */ - permissions: Array; - } -} - export interface MemberDeleteResponse { /** * Identifier @@ -295,7 +265,7 @@ export interface MemberUpdateParams { /** * Body param: Roles assigned to this member. */ - roles: Array; + roles: Array; } export interface MemberListParams extends V4PagePaginationArrayParams { @@ -338,8 +308,8 @@ export interface MemberGetParams { export namespace Members { export import Member = MembersAPI.Member; - export import MemberPermission = MembersAPI.MemberPermission; - export import MemberWithCode = MembersAPI.MemberWithCode; + export import MemberWithInviteCode = MembersAPI.MemberWithInviteCode; + export import Role = MembersAPI.Role; export import MemberListResponse = MembersAPI.MemberListResponse; export import MemberDeleteResponse = MembersAPI.MemberDeleteResponse; export import MemberListResponsesV4PagePaginationArray = MembersAPI.MemberListResponsesV4PagePaginationArray; diff --git a/src/resources/accounts/roles.ts b/src/resources/accounts/roles.ts index 958aa9801e..b7f38866e0 100644 --- a/src/resources/accounts/roles.ts +++ b/src/resources/accounts/roles.ts @@ -4,19 +4,16 @@ import * as Core from 'cloudflare/core'; import { APIResource } from 'cloudflare/resource'; import * as RolesAPI from 'cloudflare/resources/accounts/roles'; import * as Shared from 'cloudflare/resources/shared'; -import * as MembersAPI from 'cloudflare/resources/accounts/members'; +import * as PermissionGroupsAPI from 'cloudflare/resources/user/tokens/permission-groups'; import { SinglePage } from 'cloudflare/pagination'; export class Roles extends APIResource { /** * Get all available roles for an account. */ - list( - params: RoleListParams, - options?: Core.RequestOptions, - ): Core.PagePromise { + list(params: RoleListParams, options?: Core.RequestOptions): Core.PagePromise { const { account_id } = params; - return this._client.getAPIList(`/accounts/${account_id}/roles`, RoleListResponsesSinglePage, options); + return this._client.getAPIList(`/accounts/${account_id}/roles`, RolesSinglePage, options); } /** @@ -36,7 +33,7 @@ export class Roles extends APIResource { } } -export class RoleListResponsesSinglePage extends SinglePage {} +export class RolesSinglePage extends SinglePage {} export interface PermissionGrant { read?: boolean; @@ -55,25 +52,6 @@ export interface Role { */ description: string; - /** - * Role name. - */ - name: string; - - permissions: MembersAPI.MemberPermission; -} - -export interface RoleListResponse { - /** - * Role identifier tag. - */ - id: string; - - /** - * Description of role's permissions. - */ - description: string; - /** * Role Name. */ @@ -82,7 +60,7 @@ export interface RoleListResponse { /** * Access permissions for this User. */ - permissions: Array; + permissions: Array; } export interface RoleListParams { @@ -96,8 +74,7 @@ export interface RoleGetParams { export namespace Roles { export import PermissionGrant = RolesAPI.PermissionGrant; export import Role = RolesAPI.Role; - export import RoleListResponse = RolesAPI.RoleListResponse; - export import RoleListResponsesSinglePage = RolesAPI.RoleListResponsesSinglePage; + export import RolesSinglePage = RolesAPI.RolesSinglePage; export import RoleListParams = RolesAPI.RoleListParams; export import RoleGetParams = RolesAPI.RoleGetParams; } diff --git a/src/resources/addressing/address-maps/address-maps.ts b/src/resources/addressing/address-maps/address-maps.ts index 949cc53ff9..ea49f245d8 100644 --- a/src/resources/addressing/address-maps/address-maps.ts +++ b/src/resources/addressing/address-maps/address-maps.ts @@ -36,11 +36,11 @@ export class AddressMaps extends APIResource { list( params: AddressMapListParams, options?: Core.RequestOptions, - ): Core.PagePromise { + ): Core.PagePromise { const { account_id } = params; return this._client.getAPIList( `/accounts/${account_id}/addressing/address_maps`, - AddressingAddressMapsSinglePage, + AddressMapsSinglePage, options, ); } @@ -70,13 +70,13 @@ export class AddressMaps extends APIResource { addressMapId: string, params: AddressMapEditParams, options?: Core.RequestOptions, - ): Core.APIPromise { + ): Core.APIPromise { const { account_id, ...body } = params; return ( this._client.patch(`/accounts/${account_id}/addressing/address_maps/${addressMapId}`, { body, ...options, - }) as Core.APIPromise<{ result: AddressingAddressMaps }> + }) as Core.APIPromise<{ result: AddressMap }> )._thenUnwrap((obj) => obj.result); } @@ -98,9 +98,9 @@ export class AddressMaps extends APIResource { } } -export class AddressingAddressMapsSinglePage extends SinglePage {} +export class AddressMapsSinglePage extends SinglePage {} -export interface AddressingAddressMaps { +export interface AddressMap { /** * Identifier */ @@ -388,10 +388,10 @@ export interface AddressMapGetParams { } export namespace AddressMaps { - export import AddressingAddressMaps = AddressMapsAPI.AddressingAddressMaps; + export import AddressMap = AddressMapsAPI.AddressMap; export import AddressMapCreateResponse = AddressMapsAPI.AddressMapCreateResponse; export import AddressMapGetResponse = AddressMapsAPI.AddressMapGetResponse; - export import AddressingAddressMapsSinglePage = AddressMapsAPI.AddressingAddressMapsSinglePage; + export import AddressMapsSinglePage = AddressMapsAPI.AddressMapsSinglePage; export import AddressMapCreateParams = AddressMapsAPI.AddressMapCreateParams; export import AddressMapListParams = AddressMapsAPI.AddressMapListParams; export import AddressMapDeleteParams = AddressMapsAPI.AddressMapDeleteParams; diff --git a/src/resources/addressing/address-maps/index.ts b/src/resources/addressing/address-maps/index.ts index 70d9ab4093..bb162fd0d8 100644 --- a/src/resources/addressing/address-maps/index.ts +++ b/src/resources/addressing/address-maps/index.ts @@ -2,7 +2,7 @@ export { AccountUpdateParams, AccountDeleteParams, Accounts } from './accounts'; export { - AddressingAddressMaps, + AddressMap, AddressMapCreateResponse, AddressMapGetResponse, AddressMapCreateParams, @@ -10,7 +10,7 @@ export { AddressMapDeleteParams, AddressMapEditParams, AddressMapGetParams, - AddressingAddressMapsSinglePage, + AddressMapsSinglePage, AddressMaps, } from './address-maps'; export { IPUpdateParams, IPDeleteParams, IPs } from './ips'; diff --git a/src/resources/addressing/addressing.ts b/src/resources/addressing/addressing.ts index 8291a1dc5a..ea1bcf0640 100644 --- a/src/resources/addressing/addressing.ts +++ b/src/resources/addressing/addressing.ts @@ -19,10 +19,10 @@ export namespace Addressing { export import ServiceListResponsesSinglePage = ServicesAPI.ServiceListResponsesSinglePage; export import ServiceListParams = ServicesAPI.ServiceListParams; export import AddressMaps = AddressMapsAPI.AddressMaps; - export import AddressingAddressMaps = AddressMapsAPI.AddressingAddressMaps; + export import AddressMap = AddressMapsAPI.AddressMap; export import AddressMapCreateResponse = AddressMapsAPI.AddressMapCreateResponse; export import AddressMapGetResponse = AddressMapsAPI.AddressMapGetResponse; - export import AddressingAddressMapsSinglePage = AddressMapsAPI.AddressingAddressMapsSinglePage; + export import AddressMapsSinglePage = AddressMapsAPI.AddressMapsSinglePage; export import AddressMapCreateParams = AddressMapsAPI.AddressMapCreateParams; export import AddressMapListParams = AddressMapsAPI.AddressMapListParams; export import AddressMapDeleteParams = AddressMapsAPI.AddressMapDeleteParams; @@ -32,9 +32,9 @@ export namespace Addressing { export import LOADocumentCreateResponse = LOADocumentsAPI.LOADocumentCreateResponse; export import LOADocumentCreateParams = LOADocumentsAPI.LOADocumentCreateParams; export import Prefixes = PrefixesAPI.Prefixes; - export import AddressingIpamPrefixes = PrefixesAPI.AddressingIpamPrefixes; + export import Prefix = PrefixesAPI.Prefix; export import UnnamedSchemaRefE358666e049bf8f9281c0a4f89b5fe46 = PrefixesAPI.UnnamedSchemaRefE358666e049bf8f9281c0a4f89b5fe46; - export import AddressingIpamPrefixesSinglePage = PrefixesAPI.AddressingIpamPrefixesSinglePage; + export import PrefixesSinglePage = PrefixesAPI.PrefixesSinglePage; export import PrefixCreateParams = PrefixesAPI.PrefixCreateParams; export import PrefixListParams = PrefixesAPI.PrefixListParams; export import PrefixDeleteParams = PrefixesAPI.PrefixDeleteParams; diff --git a/src/resources/addressing/index.ts b/src/resources/addressing/index.ts index f6ad5a6714..ca7d71153b 100644 --- a/src/resources/addressing/index.ts +++ b/src/resources/addressing/index.ts @@ -1,8 +1,7 @@ // File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. -export { Addressing } from './addressing'; export { - AddressingAddressMaps, + AddressMap, AddressMapCreateResponse, AddressMapGetResponse, AddressMapCreateParams, @@ -10,19 +9,20 @@ export { AddressMapDeleteParams, AddressMapEditParams, AddressMapGetParams, - AddressingAddressMapsSinglePage, + AddressMapsSinglePage, AddressMaps, } from './address-maps/index'; +export { Addressing } from './addressing'; +export { LOADocumentCreateResponse, LOADocumentCreateParams, LOADocuments } from './loa-documents/index'; export { - AddressingIpamPrefixes, + Prefix, UnnamedSchemaRefE358666e049bf8f9281c0a4f89b5fe46, PrefixCreateParams, PrefixListParams, PrefixDeleteParams, PrefixEditParams, PrefixGetParams, - AddressingIpamPrefixesSinglePage, + PrefixesSinglePage, Prefixes, } from './prefixes/index'; -export { LOADocumentCreateResponse, LOADocumentCreateParams, LOADocuments } from './loa-documents/index'; export { ServiceListResponse, ServiceListParams, ServiceListResponsesSinglePage, Services } from './services'; diff --git a/src/resources/addressing/prefixes/bgp/bgp.ts b/src/resources/addressing/prefixes/bgp/bgp.ts index bc9797a52a..4a50b64e91 100644 --- a/src/resources/addressing/prefixes/bgp/bgp.ts +++ b/src/resources/addressing/prefixes/bgp/bgp.ts @@ -13,15 +13,15 @@ export class BGP extends APIResource { export namespace BGP { export import Bindings = BindingsAPI.Bindings; - export import AddressingServiceBinding = BindingsAPI.AddressingServiceBinding; - export import AddressingServiceBindingsSinglePage = BindingsAPI.AddressingServiceBindingsSinglePage; + export import ServiceBinding = BindingsAPI.ServiceBinding; + export import ServiceBindingsSinglePage = BindingsAPI.ServiceBindingsSinglePage; export import BindingCreateParams = BindingsAPI.BindingCreateParams; export import BindingListParams = BindingsAPI.BindingListParams; export import BindingDeleteParams = BindingsAPI.BindingDeleteParams; export import BindingGetParams = BindingsAPI.BindingGetParams; export import Prefixes = PrefixesAPI.Prefixes; - export import AddressingIpamBGPPrefixes = PrefixesAPI.AddressingIpamBGPPrefixes; - export import AddressingIpamBGPPrefixesSinglePage = PrefixesAPI.AddressingIpamBGPPrefixesSinglePage; + export import BGPPrefix = PrefixesAPI.BGPPrefix; + export import BGPPrefixesSinglePage = PrefixesAPI.BGPPrefixesSinglePage; export import PrefixListParams = PrefixesAPI.PrefixListParams; export import PrefixEditParams = PrefixesAPI.PrefixEditParams; export import PrefixGetParams = PrefixesAPI.PrefixGetParams; diff --git a/src/resources/addressing/prefixes/bgp/bindings.ts b/src/resources/addressing/prefixes/bgp/bindings.ts index 519523873e..1b054d9550 100644 --- a/src/resources/addressing/prefixes/bgp/bindings.ts +++ b/src/resources/addressing/prefixes/bgp/bindings.ts @@ -17,13 +17,13 @@ export class Bindings extends APIResource { prefixId: string, params: BindingCreateParams, options?: Core.RequestOptions, - ): Core.APIPromise { + ): Core.APIPromise { const { account_id, ...body } = params; return ( this._client.post(`/accounts/${account_id}/addressing/prefixes/${prefixId}/bindings`, { body, ...options, - }) as Core.APIPromise<{ result: AddressingServiceBinding }> + }) as Core.APIPromise<{ result: ServiceBinding }> )._thenUnwrap((obj) => obj.result); } @@ -39,11 +39,11 @@ export class Bindings extends APIResource { prefixId: string, params: BindingListParams, options?: Core.RequestOptions, - ): Core.PagePromise { + ): Core.PagePromise { const { account_id } = params; return this._client.getAPIList( `/accounts/${account_id}/addressing/prefixes/${prefixId}/bindings`, - AddressingServiceBindingsSinglePage, + ServiceBindingsSinglePage, options, ); } @@ -74,20 +74,20 @@ export class Bindings extends APIResource { bindingId: string, params: BindingGetParams, options?: Core.RequestOptions, - ): Core.APIPromise { + ): Core.APIPromise { const { account_id } = params; return ( this._client.get( `/accounts/${account_id}/addressing/prefixes/${prefixId}/bindings/${bindingId}`, options, - ) as Core.APIPromise<{ result: AddressingServiceBinding }> + ) as Core.APIPromise<{ result: ServiceBinding }> )._thenUnwrap((obj) => obj.result); } } -export class AddressingServiceBindingsSinglePage extends SinglePage {} +export class ServiceBindingsSinglePage extends SinglePage {} -export interface AddressingServiceBinding { +export interface ServiceBinding { /** * Identifier */ @@ -101,7 +101,7 @@ export interface AddressingServiceBinding { /** * Status of a Service Binding's deployment to the Cloudflare network */ - provisioning?: AddressingServiceBinding.Provisioning; + provisioning?: ServiceBinding.Provisioning; /** * Identifier @@ -114,7 +114,7 @@ export interface AddressingServiceBinding { service_name?: string; } -export namespace AddressingServiceBinding { +export namespace ServiceBinding { /** * Status of a Service Binding's deployment to the Cloudflare network */ @@ -166,8 +166,8 @@ export interface BindingGetParams { } export namespace Bindings { - export import AddressingServiceBinding = BindingsAPI.AddressingServiceBinding; - export import AddressingServiceBindingsSinglePage = BindingsAPI.AddressingServiceBindingsSinglePage; + export import ServiceBinding = BindingsAPI.ServiceBinding; + export import ServiceBindingsSinglePage = BindingsAPI.ServiceBindingsSinglePage; export import BindingCreateParams = BindingsAPI.BindingCreateParams; export import BindingListParams = BindingsAPI.BindingListParams; export import BindingDeleteParams = BindingsAPI.BindingDeleteParams; diff --git a/src/resources/addressing/prefixes/bgp/index.ts b/src/resources/addressing/prefixes/bgp/index.ts index 806b25c172..a7eac934f6 100644 --- a/src/resources/addressing/prefixes/bgp/index.ts +++ b/src/resources/addressing/prefixes/bgp/index.ts @@ -1,23 +1,23 @@ // File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. +export { BGP } from './bgp'; export { - AddressingIpamBGPPrefixes, + BGPPrefix, PrefixListParams, PrefixEditParams, PrefixGetParams, - AddressingIpamBGPPrefixesSinglePage, + BGPPrefixesSinglePage, Prefixes, } from './prefixes'; export { - AddressingServiceBinding, + ServiceBinding, BindingCreateParams, BindingListParams, BindingDeleteParams, BindingGetParams, - AddressingServiceBindingsSinglePage, + ServiceBindingsSinglePage, Bindings, } from './bindings'; -export { BGP } from './bgp'; export { StatusEditResponse, StatusGetResponse, diff --git a/src/resources/addressing/prefixes/bgp/prefixes.ts b/src/resources/addressing/prefixes/bgp/prefixes.ts index 26bcd70df2..f08fed9587 100644 --- a/src/resources/addressing/prefixes/bgp/prefixes.ts +++ b/src/resources/addressing/prefixes/bgp/prefixes.ts @@ -16,11 +16,11 @@ export class Prefixes extends APIResource { prefixId: string, params: PrefixListParams, options?: Core.RequestOptions, - ): Core.PagePromise { + ): Core.PagePromise { const { account_id } = params; return this._client.getAPIList( `/accounts/${account_id}/addressing/prefixes/${prefixId}/bgp/prefixes`, - AddressingIpamBGPPrefixesSinglePage, + BGPPrefixesSinglePage, options, ); } @@ -34,13 +34,13 @@ export class Prefixes extends APIResource { bgpPrefixId: string, params: PrefixEditParams, options?: Core.RequestOptions, - ): Core.APIPromise { + ): Core.APIPromise { const { account_id, ...body } = params; return ( this._client.patch( `/accounts/${account_id}/addressing/prefixes/${prefixId}/bgp/prefixes/${bgpPrefixId}`, { body, ...options }, - ) as Core.APIPromise<{ result: AddressingIpamBGPPrefixes }> + ) as Core.APIPromise<{ result: BGPPrefix }> )._thenUnwrap((obj) => obj.result); } @@ -52,20 +52,20 @@ export class Prefixes extends APIResource { bgpPrefixId: string, params: PrefixGetParams, options?: Core.RequestOptions, - ): Core.APIPromise { + ): Core.APIPromise { const { account_id } = params; return ( this._client.get( `/accounts/${account_id}/addressing/prefixes/${prefixId}/bgp/prefixes/${bgpPrefixId}`, options, - ) as Core.APIPromise<{ result: AddressingIpamBGPPrefixes }> + ) as Core.APIPromise<{ result: BGPPrefix }> )._thenUnwrap((obj) => obj.result); } } -export class AddressingIpamBGPPrefixesSinglePage extends SinglePage {} +export class BGPPrefixesSinglePage extends SinglePage {} -export interface AddressingIpamBGPPrefixes { +export interface BGPPrefix { /** * Identifier */ @@ -76,7 +76,7 @@ export interface AddressingIpamBGPPrefixes { */ asn?: number | null; - bgp_signal_opts?: AddressingIpamBGPPrefixes.BGPSignalOpts; + bgp_signal_opts?: BGPPrefix.BGPSignalOpts; /** * IP Prefix in Classless Inter-Domain Routing format. @@ -87,10 +87,10 @@ export interface AddressingIpamBGPPrefixes { modified_at?: string; - on_demand?: AddressingIpamBGPPrefixes.OnDemand; + on_demand?: BGPPrefix.OnDemand; } -export namespace AddressingIpamBGPPrefixes { +export namespace BGPPrefix { export interface BGPSignalOpts { /** * Whether control of advertisement of the prefix to the Internet is enabled to be @@ -165,8 +165,8 @@ export interface PrefixGetParams { } export namespace Prefixes { - export import AddressingIpamBGPPrefixes = PrefixesAPI.AddressingIpamBGPPrefixes; - export import AddressingIpamBGPPrefixesSinglePage = PrefixesAPI.AddressingIpamBGPPrefixesSinglePage; + export import BGPPrefix = PrefixesAPI.BGPPrefix; + export import BGPPrefixesSinglePage = PrefixesAPI.BGPPrefixesSinglePage; export import PrefixListParams = PrefixesAPI.PrefixListParams; export import PrefixEditParams = PrefixesAPI.PrefixEditParams; export import PrefixGetParams = PrefixesAPI.PrefixGetParams; diff --git a/src/resources/addressing/prefixes/delegations.ts b/src/resources/addressing/prefixes/delegations.ts index c0b81dfce9..ebccd55199 100644 --- a/src/resources/addressing/prefixes/delegations.ts +++ b/src/resources/addressing/prefixes/delegations.ts @@ -13,13 +13,13 @@ export class Delegations extends APIResource { prefixId: string, params: DelegationCreateParams, options?: Core.RequestOptions, - ): Core.APIPromise { + ): Core.APIPromise { const { account_id, ...body } = params; return ( this._client.post(`/accounts/${account_id}/addressing/prefixes/${prefixId}/delegations`, { body, ...options, - }) as Core.APIPromise<{ result: AddressingIpamDelegations }> + }) as Core.APIPromise<{ result: Delegations }> )._thenUnwrap((obj) => obj.result); } @@ -30,11 +30,11 @@ export class Delegations extends APIResource { prefixId: string, params: DelegationListParams, options?: Core.RequestOptions, - ): Core.PagePromise { + ): Core.PagePromise { const { account_id } = params; return this._client.getAPIList( `/accounts/${account_id}/addressing/prefixes/${prefixId}/delegations`, - AddressingIpamDelegationsSinglePage, + DelegationsSinglePage, options, ); } @@ -58,9 +58,9 @@ export class Delegations extends APIResource { } } -export class AddressingIpamDelegationsSinglePage extends SinglePage {} +export class DelegationsSinglePage extends SinglePage {} -export interface AddressingIpamDelegations { +export interface Delegations { /** * Delegation identifier tag. */ @@ -131,9 +131,9 @@ export interface DelegationDeleteParams { } export namespace Delegations { - export import AddressingIpamDelegations = DelegationsAPI.AddressingIpamDelegations; + export import Delegations = DelegationsAPI.Delegations; export import DelegationDeleteResponse = DelegationsAPI.DelegationDeleteResponse; - export import AddressingIpamDelegationsSinglePage = DelegationsAPI.AddressingIpamDelegationsSinglePage; + export import DelegationsSinglePage = DelegationsAPI.DelegationsSinglePage; export import DelegationCreateParams = DelegationsAPI.DelegationCreateParams; export import DelegationListParams = DelegationsAPI.DelegationListParams; export import DelegationDeleteParams = DelegationsAPI.DelegationDeleteParams; diff --git a/src/resources/addressing/prefixes/index.ts b/src/resources/addressing/prefixes/index.ts index 0b8c8f29c4..30676b550b 100644 --- a/src/resources/addressing/prefixes/index.ts +++ b/src/resources/addressing/prefixes/index.ts @@ -1,23 +1,22 @@ // File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. +export { BGP } from './bgp/index'; export { - AddressingIpamDelegations, + Delegations, DelegationDeleteResponse, DelegationCreateParams, DelegationListParams, DelegationDeleteParams, - AddressingIpamDelegationsSinglePage, - Delegations, + DelegationsSinglePage, } from './delegations'; export { - AddressingIpamPrefixes, + Prefix, UnnamedSchemaRefE358666e049bf8f9281c0a4f89b5fe46, PrefixCreateParams, PrefixListParams, PrefixDeleteParams, PrefixEditParams, PrefixGetParams, - AddressingIpamPrefixesSinglePage, + PrefixesSinglePage, Prefixes, } from './prefixes'; -export { BGP } from './bgp/index'; diff --git a/src/resources/addressing/prefixes/prefixes.ts b/src/resources/addressing/prefixes/prefixes.ts index f40bb4ad54..26d588d73b 100644 --- a/src/resources/addressing/prefixes/prefixes.ts +++ b/src/resources/addressing/prefixes/prefixes.ts @@ -15,13 +15,13 @@ export class Prefixes extends APIResource { /** * Add a new prefix under the account. */ - create(params: PrefixCreateParams, options?: Core.RequestOptions): Core.APIPromise { + create(params: PrefixCreateParams, options?: Core.RequestOptions): Core.APIPromise { const { account_id, ...body } = params; return ( this._client.post(`/accounts/${account_id}/addressing/prefixes`, { body, ...options, - }) as Core.APIPromise<{ result: AddressingIpamPrefixes }> + }) as Core.APIPromise<{ result: Prefix }> )._thenUnwrap((obj) => obj.result); } @@ -31,11 +31,11 @@ export class Prefixes extends APIResource { list( params: PrefixListParams, options?: Core.RequestOptions, - ): Core.PagePromise { + ): Core.PagePromise { const { account_id } = params; return this._client.getAPIList( `/accounts/${account_id}/addressing/prefixes`, - AddressingIpamPrefixesSinglePage, + PrefixesSinglePage, options, ); } @@ -60,41 +60,33 @@ export class Prefixes extends APIResource { /** * Modify the description for a prefix owned by the account. */ - edit( - prefixId: string, - params: PrefixEditParams, - options?: Core.RequestOptions, - ): Core.APIPromise { + edit(prefixId: string, params: PrefixEditParams, options?: Core.RequestOptions): Core.APIPromise { const { account_id, ...body } = params; return ( this._client.patch(`/accounts/${account_id}/addressing/prefixes/${prefixId}`, { body, ...options, - }) as Core.APIPromise<{ result: AddressingIpamPrefixes }> + }) as Core.APIPromise<{ result: Prefix }> )._thenUnwrap((obj) => obj.result); } /** * List a particular prefix owned by the account. */ - get( - prefixId: string, - params: PrefixGetParams, - options?: Core.RequestOptions, - ): Core.APIPromise { + get(prefixId: string, params: PrefixGetParams, options?: Core.RequestOptions): Core.APIPromise { const { account_id } = params; return ( this._client.get( `/accounts/${account_id}/addressing/prefixes/${prefixId}`, options, - ) as Core.APIPromise<{ result: AddressingIpamPrefixes }> + ) as Core.APIPromise<{ result: Prefix }> )._thenUnwrap((obj) => obj.result); } } -export class AddressingIpamPrefixesSinglePage extends SinglePage {} +export class PrefixesSinglePage extends SinglePage {} -export interface AddressingIpamPrefixes { +export interface Prefix { /** * Identifier */ @@ -285,9 +277,9 @@ export interface PrefixGetParams { } export namespace Prefixes { - export import AddressingIpamPrefixes = PrefixesAPI.AddressingIpamPrefixes; + export import Prefix = PrefixesAPI.Prefix; export import UnnamedSchemaRefE358666e049bf8f9281c0a4f89b5fe46 = PrefixesAPI.UnnamedSchemaRefE358666e049bf8f9281c0a4f89b5fe46; - export import AddressingIpamPrefixesSinglePage = PrefixesAPI.AddressingIpamPrefixesSinglePage; + export import PrefixesSinglePage = PrefixesAPI.PrefixesSinglePage; export import PrefixCreateParams = PrefixesAPI.PrefixCreateParams; export import PrefixListParams = PrefixesAPI.PrefixListParams; export import PrefixDeleteParams = PrefixesAPI.PrefixDeleteParams; @@ -295,9 +287,8 @@ export namespace Prefixes { export import PrefixGetParams = PrefixesAPI.PrefixGetParams; export import BGP = BGPAPI.BGP; export import Delegations = DelegationsAPI.Delegations; - export import AddressingIpamDelegations = DelegationsAPI.AddressingIpamDelegations; export import DelegationDeleteResponse = DelegationsAPI.DelegationDeleteResponse; - export import AddressingIpamDelegationsSinglePage = DelegationsAPI.AddressingIpamDelegationsSinglePage; + export import DelegationsSinglePage = DelegationsAPI.DelegationsSinglePage; export import DelegationCreateParams = DelegationsAPI.DelegationCreateParams; export import DelegationListParams = DelegationsAPI.DelegationListParams; export import DelegationDeleteParams = DelegationsAPI.DelegationDeleteParams; diff --git a/src/resources/alerting/alerting.ts b/src/resources/alerting/alerting.ts index d0e9b6e8fb..8deaac10fa 100644 --- a/src/resources/alerting/alerting.ts +++ b/src/resources/alerting/alerting.ts @@ -1,7 +1,6 @@ // File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. import { APIResource } from 'cloudflare/resource'; -import * as AlertingAPI from 'cloudflare/resources/alerting/alerting'; import * as AvailableAlertsAPI from 'cloudflare/resources/alerting/available-alerts'; import * as HistoryAPI from 'cloudflare/resources/alerting/history'; import * as PoliciesAPI from 'cloudflare/resources/alerting/policies'; @@ -10,7 +9,7 @@ import * as DestinationsAPI from 'cloudflare/resources/alerting/destinations/des export class Alerting extends APIResource { availableAlerts: AvailableAlertsAPI.AvailableAlerts = new AvailableAlertsAPI.AvailableAlerts(this._client); destinations: DestinationsAPI.Destinations = new DestinationsAPI.Destinations(this._client); - history: HistoryAPI.History = new HistoryAPI.History(this._client); + history: HistoryAPI.HistoryResource = new HistoryAPI.HistoryResource(this._client); policies: PoliciesAPI.Policies = new PoliciesAPI.Policies(this._client); } @@ -22,20 +21,21 @@ export interface UnnamedSchemaRefD6e23adacaca017802aaa484a8b3f405 { } export namespace Alerting { - export import UnnamedSchemaRefD6e23adacaca017802aaa484a8b3f405 = AlertingAPI.UnnamedSchemaRefD6e23adacaca017802aaa484a8b3f405; export import AvailableAlerts = AvailableAlertsAPI.AvailableAlerts; export import AvailableAlertListResponse = AvailableAlertsAPI.AvailableAlertListResponse; export import AvailableAlertListParams = AvailableAlertsAPI.AvailableAlertListParams; export import Destinations = DestinationsAPI.Destinations; + export import HistoryResource = HistoryAPI.HistoryResource; export import History = HistoryAPI.History; - export import AlertingHistory = HistoryAPI.AlertingHistory; - export import AlertingHistoriesV4PagePaginationArray = HistoryAPI.AlertingHistoriesV4PagePaginationArray; + export import HistoriesV4PagePaginationArray = HistoryAPI.HistoriesV4PagePaginationArray; export import HistoryListParams = HistoryAPI.HistoryListParams; export import Policies = PoliciesAPI.Policies; - export import AlertingPolicies = PoliciesAPI.AlertingPolicies; + export import Filter = PoliciesAPI.Filter; + export import Mechanism = PoliciesAPI.Mechanism; + export import Policy = PoliciesAPI.Policy; export import PolicyCreateResponse = PoliciesAPI.PolicyCreateResponse; export import PolicyUpdateResponse = PoliciesAPI.PolicyUpdateResponse; - export import AlertingPoliciesSinglePage = PoliciesAPI.AlertingPoliciesSinglePage; + export import PoliciesSinglePage = PoliciesAPI.PoliciesSinglePage; export import PolicyCreateParams = PoliciesAPI.PolicyCreateParams; export import PolicyUpdateParams = PoliciesAPI.PolicyUpdateParams; export import PolicyListParams = PoliciesAPI.PolicyListParams; diff --git a/src/resources/alerting/destinations/destinations.ts b/src/resources/alerting/destinations/destinations.ts index 73adefd518..d7af158130 100644 --- a/src/resources/alerting/destinations/destinations.ts +++ b/src/resources/alerting/destinations/destinations.ts @@ -7,7 +7,7 @@ import * as WebhooksAPI from 'cloudflare/resources/alerting/destinations/webhook export class Destinations extends APIResource { eligible: EligibleAPI.Eligible = new EligibleAPI.Eligible(this._client); - pagerduty: PagerdutyAPI.Pagerduty = new PagerdutyAPI.Pagerduty(this._client); + pagerduty: PagerdutyAPI.PagerdutyResource = new PagerdutyAPI.PagerdutyResource(this._client); webhooks: WebhooksAPI.Webhooks = new WebhooksAPI.Webhooks(this._client); } @@ -15,8 +15,8 @@ export namespace Destinations { export import Eligible = EligibleAPI.Eligible; export import EligibleGetResponse = EligibleAPI.EligibleGetResponse; export import EligibleGetParams = EligibleAPI.EligibleGetParams; + export import PagerdutyResource = PagerdutyAPI.PagerdutyResource; export import Pagerduty = PagerdutyAPI.Pagerduty; - export import AlertingPagerduty = PagerdutyAPI.AlertingPagerduty; export import PagerdutyCreateResponse = PagerdutyAPI.PagerdutyCreateResponse; export import PagerdutyGetResponse = PagerdutyAPI.PagerdutyGetResponse; export import PagerdutyLinkResponse = PagerdutyAPI.PagerdutyLinkResponse; @@ -25,10 +25,9 @@ export namespace Destinations { export import PagerdutyGetParams = PagerdutyAPI.PagerdutyGetParams; export import PagerdutyLinkParams = PagerdutyAPI.PagerdutyLinkParams; export import Webhooks = WebhooksAPI.Webhooks; - export import AlertingWebhooks = WebhooksAPI.AlertingWebhooks; export import WebhookCreateResponse = WebhooksAPI.WebhookCreateResponse; export import WebhookUpdateResponse = WebhooksAPI.WebhookUpdateResponse; - export import AlertingWebhooksSinglePage = WebhooksAPI.AlertingWebhooksSinglePage; + export import WebhooksSinglePage = WebhooksAPI.WebhooksSinglePage; export import WebhookCreateParams = WebhooksAPI.WebhookCreateParams; export import WebhookUpdateParams = WebhooksAPI.WebhookUpdateParams; export import WebhookListParams = WebhooksAPI.WebhookListParams; diff --git a/src/resources/alerting/destinations/index.ts b/src/resources/alerting/destinations/index.ts index 62f69af762..2937e96289 100644 --- a/src/resources/alerting/destinations/index.ts +++ b/src/resources/alerting/destinations/index.ts @@ -1,7 +1,9 @@ // File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. +export { Destinations } from './destinations'; +export { EligibleGetResponse, EligibleGetParams, Eligible } from './eligible'; export { - AlertingPagerduty, + Pagerduty, PagerdutyCreateResponse, PagerdutyGetResponse, PagerdutyLinkResponse, @@ -9,10 +11,10 @@ export { PagerdutyDeleteParams, PagerdutyGetParams, PagerdutyLinkParams, - Pagerduty, + PagerdutyResource, } from './pagerduty'; export { - AlertingWebhooks, + Webhooks, WebhookCreateResponse, WebhookUpdateResponse, WebhookCreateParams, @@ -20,8 +22,5 @@ export { WebhookListParams, WebhookDeleteParams, WebhookGetParams, - AlertingWebhooksSinglePage, - Webhooks, + WebhooksSinglePage, } from './webhooks'; -export { Destinations } from './destinations'; -export { EligibleGetResponse, EligibleGetParams, Eligible } from './eligible'; diff --git a/src/resources/alerting/destinations/pagerduty.ts b/src/resources/alerting/destinations/pagerduty.ts index 4d7f197d4d..090fc24c81 100644 --- a/src/resources/alerting/destinations/pagerduty.ts +++ b/src/resources/alerting/destinations/pagerduty.ts @@ -5,7 +5,7 @@ import { APIResource } from 'cloudflare/resource'; import * as PagerdutyAPI from 'cloudflare/resources/alerting/destinations/pagerduty'; import * as Shared from 'cloudflare/resources/shared'; -export class Pagerduty extends APIResource { +export class PagerdutyResource extends APIResource { /** * Creates a new token for integrating with PagerDuty. */ @@ -72,7 +72,7 @@ export class Pagerduty extends APIResource { } } -export interface AlertingPagerduty { +export interface Pagerduty { /** * UUID */ @@ -91,7 +91,7 @@ export interface PagerdutyCreateResponse { id?: string; } -export type PagerdutyGetResponse = Array; +export type PagerdutyGetResponse = Array; export interface PagerdutyLinkResponse { /** @@ -128,8 +128,8 @@ export interface PagerdutyLinkParams { account_id: string; } -export namespace Pagerduty { - export import AlertingPagerduty = PagerdutyAPI.AlertingPagerduty; +export namespace PagerdutyResource { + export import Pagerduty = PagerdutyAPI.Pagerduty; export import PagerdutyCreateResponse = PagerdutyAPI.PagerdutyCreateResponse; export import PagerdutyGetResponse = PagerdutyAPI.PagerdutyGetResponse; export import PagerdutyLinkResponse = PagerdutyAPI.PagerdutyLinkResponse; diff --git a/src/resources/alerting/destinations/webhooks.ts b/src/resources/alerting/destinations/webhooks.ts index a49411fe49..d392c15b9e 100644 --- a/src/resources/alerting/destinations/webhooks.ts +++ b/src/resources/alerting/destinations/webhooks.ts @@ -43,11 +43,11 @@ export class Webhooks extends APIResource { list( params: WebhookListParams, options?: Core.RequestOptions, - ): Core.PagePromise { + ): Core.PagePromise { const { account_id } = params; return this._client.getAPIList( `/accounts/${account_id}/alerting/v3/destinations/webhooks`, - AlertingWebhooksSinglePage, + WebhooksSinglePage, options, ); } @@ -72,24 +72,20 @@ export class Webhooks extends APIResource { /** * Get details for a single webhooks destination. */ - get( - webhookId: string, - params: WebhookGetParams, - options?: Core.RequestOptions, - ): Core.APIPromise { + get(webhookId: string, params: WebhookGetParams, options?: Core.RequestOptions): Core.APIPromise { const { account_id } = params; return ( this._client.get( `/accounts/${account_id}/alerting/v3/destinations/webhooks/${webhookId}`, options, - ) as Core.APIPromise<{ result: AlertingWebhooks }> + ) as Core.APIPromise<{ result: Webhooks }> )._thenUnwrap((obj) => obj.result); } } -export class AlertingWebhooksSinglePage extends SinglePage {} +export class WebhooksSinglePage extends SinglePage {} -export interface AlertingWebhooks { +export interface Webhooks { /** * The unique identifier of a webhook */ @@ -222,10 +218,10 @@ export interface WebhookGetParams { } export namespace Webhooks { - export import AlertingWebhooks = WebhooksAPI.AlertingWebhooks; + export import Webhooks = WebhooksAPI.Webhooks; export import WebhookCreateResponse = WebhooksAPI.WebhookCreateResponse; export import WebhookUpdateResponse = WebhooksAPI.WebhookUpdateResponse; - export import AlertingWebhooksSinglePage = WebhooksAPI.AlertingWebhooksSinglePage; + export import WebhooksSinglePage = WebhooksAPI.WebhooksSinglePage; export import WebhookCreateParams = WebhooksAPI.WebhookCreateParams; export import WebhookUpdateParams = WebhooksAPI.WebhookUpdateParams; export import WebhookListParams = WebhooksAPI.WebhookListParams; diff --git a/src/resources/alerting/history.ts b/src/resources/alerting/history.ts index c8549ea238..87204e440b 100644 --- a/src/resources/alerting/history.ts +++ b/src/resources/alerting/history.ts @@ -5,7 +5,7 @@ import { APIResource } from 'cloudflare/resource'; import * as HistoryAPI from 'cloudflare/resources/alerting/history'; import { V4PagePaginationArray, type V4PagePaginationArrayParams } from 'cloudflare/pagination'; -export class History extends APIResource { +export class HistoryResource extends APIResource { /** * Gets a list of history records for notifications sent to an account. The records * are displayed for last `x` number of days based on the zone plan (free = 30, pro @@ -14,19 +14,19 @@ export class History extends APIResource { list( params: HistoryListParams, options?: Core.RequestOptions, - ): Core.PagePromise { + ): Core.PagePromise { const { account_id, ...query } = params; return this._client.getAPIList( `/accounts/${account_id}/alerting/v3/history`, - AlertingHistoriesV4PagePaginationArray, + HistoriesV4PagePaginationArray, { query, ...options }, ); } } -export class AlertingHistoriesV4PagePaginationArray extends V4PagePaginationArray {} +export class HistoriesV4PagePaginationArray extends V4PagePaginationArray {} -export interface AlertingHistory { +export interface History { /** * UUID */ @@ -93,8 +93,8 @@ export interface HistoryListParams extends V4PagePaginationArrayParams { since?: string; } -export namespace History { - export import AlertingHistory = HistoryAPI.AlertingHistory; - export import AlertingHistoriesV4PagePaginationArray = HistoryAPI.AlertingHistoriesV4PagePaginationArray; +export namespace HistoryResource { + export import History = HistoryAPI.History; + export import HistoriesV4PagePaginationArray = HistoryAPI.HistoriesV4PagePaginationArray; export import HistoryListParams = HistoryAPI.HistoryListParams; } diff --git a/src/resources/alerting/index.ts b/src/resources/alerting/index.ts index e06d3efffc..2c4f8722b8 100644 --- a/src/resources/alerting/index.ts +++ b/src/resources/alerting/index.ts @@ -1,13 +1,12 @@ // File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. +export { Alerting } from './alerting'; +export { AvailableAlertListResponse, AvailableAlertListParams, AvailableAlerts } from './available-alerts'; +export { Destinations } from './destinations/index'; export { - AlertingHistory, - HistoryListParams, - AlertingHistoriesV4PagePaginationArray, - History, -} from './history'; -export { - AlertingPolicies, + Filter, + Mechanism, + Policy, PolicyCreateResponse, PolicyUpdateResponse, PolicyCreateParams, @@ -15,9 +14,7 @@ export { PolicyListParams, PolicyDeleteParams, PolicyGetParams, - AlertingPoliciesSinglePage, + PoliciesSinglePage, Policies, } from './policies'; -export { AvailableAlertListResponse, AvailableAlertListParams, AvailableAlerts } from './available-alerts'; -export { Destinations } from './destinations/index'; -export { UnnamedSchemaRefD6e23adacaca017802aaa484a8b3f405, Alerting } from './alerting'; +export { History, HistoryListParams, HistoriesV4PagePaginationArray, HistoryResource } from './history'; diff --git a/src/resources/alerting/policies.ts b/src/resources/alerting/policies.ts index bb3c0199cf..cd6288490a 100644 --- a/src/resources/alerting/policies.ts +++ b/src/resources/alerting/policies.ts @@ -43,11 +43,11 @@ export class Policies extends APIResource { list( params: PolicyListParams, options?: Core.RequestOptions, - ): Core.PagePromise { + ): Core.PagePromise { const { account_id } = params; return this._client.getAPIList( `/accounts/${account_id}/alerting/v3/policies`, - AlertingPoliciesSinglePage, + PoliciesSinglePage, options, ); } @@ -72,24 +72,245 @@ export class Policies extends APIResource { /** * Get details for a single policy. */ - get( - policyId: string, - params: PolicyGetParams, - options?: Core.RequestOptions, - ): Core.APIPromise { + get(policyId: string, params: PolicyGetParams, options?: Core.RequestOptions): Core.APIPromise { const { account_id } = params; return ( this._client.get( `/accounts/${account_id}/alerting/v3/policies/${policyId}`, options, - ) as Core.APIPromise<{ result: AlertingPolicies }> + ) as Core.APIPromise<{ result: Policy }> )._thenUnwrap((obj) => obj.result); } } -export class AlertingPoliciesSinglePage extends SinglePage {} +export class PoliciesSinglePage extends SinglePage {} + +/** + * Optional filters that allow you to be alerted only on a subset of events for + * that alert type based on some criteria. This is only available for select alert + * types. See alert type documentation for more details. + */ +export interface Filter { + /** + * Usage depends on specific alert type + */ + actions?: Array; + + /** + * Used for configuring radar_notification + */ + affected_asns?: Array; + + /** + * Used for configuring incident_alert. A list of identifiers for each component to + * monitor. + */ + affected_components?: Array; + + /** + * Used for configuring radar_notification + */ + affected_locations?: Array; + + /** + * Used for configuring maintenance_event_notification + */ + airport_code?: Array; + + /** + * Usage depends on specific alert type + */ + alert_trigger_preferences?: Array; + + /** + * Used for configuring magic_tunnel_health_check_event + */ + alert_trigger_preferences_value?: Array<'99.0' | '98.0' | '97.0'>; + + /** + * Used for configuring load_balancing_pool_enablement_alert + */ + enabled?: Array; + + /** + * Used for configuring pages_event_alert + */ + environment?: Array; + + /** + * Used for configuring pages_event_alert + */ + event?: Array; + + /** + * Used for configuring load_balancing_health_alert + */ + event_source?: Array; + + /** + * Usage depends on specific alert type + */ + event_type?: Array; + + /** + * Usage depends on specific alert type + */ + group_by?: Array; + + /** + * Used for configuring health_check_status_notification + */ + health_check_id?: Array; + + /** + * Used for configuring incident_alert + */ + incident_impact?: Array< + 'INCIDENT_IMPACT_NONE' | 'INCIDENT_IMPACT_MINOR' | 'INCIDENT_IMPACT_MAJOR' | 'INCIDENT_IMPACT_CRITICAL' + >; + + /** + * Used for configuring stream_live_notifications + */ + input_id?: Array; + + /** + * Used for configuring billing_usage_alert + */ + limit?: Array; + + /** + * Used for configuring logo_match_alert + */ + logo_tag?: Array; + + /** + * Used for configuring advanced_ddos_attack_l4_alert + */ + megabits_per_second?: Array; + + /** + * Used for configuring load_balancing_health_alert + */ + new_health?: Array; + + /** + * Used for configuring tunnel_health_event + */ + new_status?: Array; + + /** + * Used for configuring advanced_ddos_attack_l4_alert + */ + packets_per_second?: Array; + + /** + * Usage depends on specific alert type + */ + pool_id?: Array; + + /** + * Used for configuring billing_usage_alert + */ + product?: Array; + + /** + * Used for configuring pages_event_alert + */ + project_id?: Array; + + /** + * Used for configuring advanced_ddos_attack_l4_alert + */ + protocol?: Array; + + /** + * Usage depends on specific alert type + */ + query_tag?: Array; + + /** + * Used for configuring advanced_ddos_attack_l7_alert + */ + requests_per_second?: Array; + + /** + * Usage depends on specific alert type + */ + selectors?: Array; + + /** + * Used for configuring clickhouse_alert_fw_ent_anomaly + */ + services?: Array; + + /** + * Usage depends on specific alert type + */ + slo?: Array; + + /** + * Used for configuring health_check_status_notification + */ + status?: Array; + + /** + * Used for configuring advanced_ddos_attack_l7_alert + */ + target_hostname?: Array; + + /** + * Used for configuring advanced_ddos_attack_l4_alert + */ + target_ip?: Array; + + /** + * Used for configuring advanced_ddos_attack_l7_alert + */ + target_zone_name?: Array; + + /** + * Used for configuring traffic_anomalies_alert + */ + traffic_exclusions?: Array<'security_events'>; + + /** + * Used for configuring tunnel_health_event + */ + tunnel_id?: Array; + + /** + * Used for configuring magic_tunnel_health_check_event + */ + tunnel_name?: Array; + + /** + * Usage depends on specific alert type + */ + where?: Array; + + /** + * Usage depends on specific alert type + */ + zones?: Array; +} + +/** + * List of IDs that will be used when dispatching a notification. IDs for email + * type will be the email address. + */ +export type Mechanism = Record>; + +export namespace Mechanism { + export interface UnnamedSchemaWithMapParent1 { + /** + * UUID + */ + id?: string | string; + } +} -export interface AlertingPolicies { +export interface Policy { /** * The unique identifier of a notification policy */ @@ -174,13 +395,13 @@ export interface AlertingPolicies { * that alert type based on some criteria. This is only available for select alert * types. See alert type documentation for more details. */ - filters?: AlertingPolicies.Filters; + filters?: Filter; /** * List of IDs that will be used when dispatching a notification. IDs for email * type will be the email address. */ - mechanisms?: Record>; + mechanisms?: Mechanism; modified?: string; @@ -190,554 +411,116 @@ export interface AlertingPolicies { name?: string; } -export namespace AlertingPolicies { +export interface PolicyCreateResponse { /** - * Optional filters that allow you to be alerted only on a subset of events for - * that alert type based on some criteria. This is only available for select alert - * types. See alert type documentation for more details. + * UUID */ - export interface Filters { - /** - * Usage depends on specific alert type - */ - actions?: Array; - - /** - * Used for configuring radar_notification - */ - affected_asns?: Array; - - /** - * Used for configuring incident_alert. A list of identifiers for each component to - * monitor. - */ - affected_components?: Array; + id?: string; +} - /** - * Used for configuring radar_notification - */ - affected_locations?: Array; +export interface PolicyUpdateResponse { + /** + * UUID + */ + id?: string; +} - /** - * Used for configuring maintenance_event_notification - */ - airport_code?: Array; +export interface PolicyCreateParams { + /** + * Path param: The account id + */ + account_id: string; - /** - * Usage depends on specific alert type - */ - alert_trigger_preferences?: Array; + /** + * Body param: Refers to which event will trigger a Notification dispatch. You can + * use the endpoint to get available alert types which then will give you a list of + * possible values. + */ + alert_type: + | 'access_custom_certificate_expiration_type' + | 'advanced_ddos_attack_l4_alert' + | 'advanced_ddos_attack_l7_alert' + | 'advanced_http_alert_error' + | 'bgp_hijack_notification' + | 'billing_usage_alert' + | 'block_notification_block_removed' + | 'block_notification_new_block' + | 'block_notification_review_rejected' + | 'brand_protection_alert' + | 'brand_protection_digest' + | 'clickhouse_alert_fw_anomaly' + | 'clickhouse_alert_fw_ent_anomaly' + | 'custom_ssl_certificate_event_type' + | 'dedicated_ssl_certificate_event_type' + | 'dos_attack_l4' + | 'dos_attack_l7' + | 'expiring_service_token_alert' + | 'failing_logpush_job_disabled_alert' + | 'fbm_auto_advertisement' + | 'fbm_dosd_attack' + | 'fbm_volumetric_attack' + | 'health_check_status_notification' + | 'hostname_aop_custom_certificate_expiration_type' + | 'http_alert_edge_error' + | 'http_alert_origin_error' + | 'incident_alert' + | 'load_balancing_health_alert' + | 'load_balancing_pool_enablement_alert' + | 'logo_match_alert' + | 'magic_tunnel_health_check_event' + | 'maintenance_event_notification' + | 'mtls_certificate_store_certificate_expiration_type' + | 'pages_event_alert' + | 'radar_notification' + | 'real_origin_monitoring' + | 'scriptmonitor_alert_new_code_change_detections' + | 'scriptmonitor_alert_new_hosts' + | 'scriptmonitor_alert_new_malicious_hosts' + | 'scriptmonitor_alert_new_malicious_scripts' + | 'scriptmonitor_alert_new_malicious_url' + | 'scriptmonitor_alert_new_max_length_resource_url' + | 'scriptmonitor_alert_new_resources' + | 'secondary_dns_all_primaries_failing' + | 'secondary_dns_primaries_failing' + | 'secondary_dns_zone_successfully_updated' + | 'secondary_dns_zone_validation_warning' + | 'sentinel_alert' + | 'stream_live_notifications' + | 'traffic_anomalies_alert' + | 'tunnel_health_event' + | 'tunnel_update_event' + | 'universal_ssl_event_type' + | 'web_analytics_metrics_update' + | 'zone_aop_custom_certificate_expiration_type'; - /** - * Used for configuring magic_tunnel_health_check_event - */ - alert_trigger_preferences_value?: Array<'99.0' | '98.0' | '97.0'>; + /** + * Body param: Whether or not the Notification policy is enabled. + */ + enabled: boolean; - /** - * Used for configuring load_balancing_pool_enablement_alert - */ - enabled?: Array; + /** + * Body param: List of IDs that will be used when dispatching a notification. IDs + * for email type will be the email address. + */ + mechanisms: Mechanism; - /** - * Used for configuring pages_event_alert - */ - environment?: Array; + /** + * Body param: Name of the policy. + */ + name: string; - /** - * Used for configuring pages_event_alert - */ - event?: Array; + /** + * Body param: Optional description for the Notification policy. + */ + description?: string; - /** - * Used for configuring load_balancing_health_alert - */ - event_source?: Array; - - /** - * Usage depends on specific alert type - */ - event_type?: Array; - - /** - * Usage depends on specific alert type - */ - group_by?: Array; - - /** - * Used for configuring health_check_status_notification - */ - health_check_id?: Array; - - /** - * Used for configuring incident_alert - */ - incident_impact?: Array< - 'INCIDENT_IMPACT_NONE' | 'INCIDENT_IMPACT_MINOR' | 'INCIDENT_IMPACT_MAJOR' | 'INCIDENT_IMPACT_CRITICAL' - >; - - /** - * Used for configuring stream_live_notifications - */ - input_id?: Array; - - /** - * Used for configuring billing_usage_alert - */ - limit?: Array; - - /** - * Used for configuring logo_match_alert - */ - logo_tag?: Array; - - /** - * Used for configuring advanced_ddos_attack_l4_alert - */ - megabits_per_second?: Array; - - /** - * Used for configuring load_balancing_health_alert - */ - new_health?: Array; - - /** - * Used for configuring tunnel_health_event - */ - new_status?: Array; - - /** - * Used for configuring advanced_ddos_attack_l4_alert - */ - packets_per_second?: Array; - - /** - * Usage depends on specific alert type - */ - pool_id?: Array; - - /** - * Used for configuring billing_usage_alert - */ - product?: Array; - - /** - * Used for configuring pages_event_alert - */ - project_id?: Array; - - /** - * Used for configuring advanced_ddos_attack_l4_alert - */ - protocol?: Array; - - /** - * Usage depends on specific alert type - */ - query_tag?: Array; - - /** - * Used for configuring advanced_ddos_attack_l7_alert - */ - requests_per_second?: Array; - - /** - * Usage depends on specific alert type - */ - selectors?: Array; - - /** - * Used for configuring clickhouse_alert_fw_ent_anomaly - */ - services?: Array; - - /** - * Usage depends on specific alert type - */ - slo?: Array; - - /** - * Used for configuring health_check_status_notification - */ - status?: Array; - - /** - * Used for configuring advanced_ddos_attack_l7_alert - */ - target_hostname?: Array; - - /** - * Used for configuring advanced_ddos_attack_l4_alert - */ - target_ip?: Array; - - /** - * Used for configuring advanced_ddos_attack_l7_alert - */ - target_zone_name?: Array; - - /** - * Used for configuring traffic_anomalies_alert - */ - traffic_exclusions?: Array<'security_events'>; - - /** - * Used for configuring tunnel_health_event - */ - tunnel_id?: Array; - - /** - * Used for configuring magic_tunnel_health_check_event - */ - tunnel_name?: Array; - - /** - * Usage depends on specific alert type - */ - where?: Array; - - /** - * Usage depends on specific alert type - */ - zones?: Array; - } - - export interface Mechanisms { - /** - * UUID - */ - id?: string | string; - } -} - -export interface PolicyCreateResponse { - /** - * UUID - */ - id?: string; -} - -export interface PolicyUpdateResponse { - /** - * UUID - */ - id?: string; -} - -export interface PolicyCreateParams { - /** - * Path param: The account id - */ - account_id: string; - - /** - * Body param: Refers to which event will trigger a Notification dispatch. You can - * use the endpoint to get available alert types which then will give you a list of - * possible values. - */ - alert_type: - | 'access_custom_certificate_expiration_type' - | 'advanced_ddos_attack_l4_alert' - | 'advanced_ddos_attack_l7_alert' - | 'advanced_http_alert_error' - | 'bgp_hijack_notification' - | 'billing_usage_alert' - | 'block_notification_block_removed' - | 'block_notification_new_block' - | 'block_notification_review_rejected' - | 'brand_protection_alert' - | 'brand_protection_digest' - | 'clickhouse_alert_fw_anomaly' - | 'clickhouse_alert_fw_ent_anomaly' - | 'custom_ssl_certificate_event_type' - | 'dedicated_ssl_certificate_event_type' - | 'dos_attack_l4' - | 'dos_attack_l7' - | 'expiring_service_token_alert' - | 'failing_logpush_job_disabled_alert' - | 'fbm_auto_advertisement' - | 'fbm_dosd_attack' - | 'fbm_volumetric_attack' - | 'health_check_status_notification' - | 'hostname_aop_custom_certificate_expiration_type' - | 'http_alert_edge_error' - | 'http_alert_origin_error' - | 'incident_alert' - | 'load_balancing_health_alert' - | 'load_balancing_pool_enablement_alert' - | 'logo_match_alert' - | 'magic_tunnel_health_check_event' - | 'maintenance_event_notification' - | 'mtls_certificate_store_certificate_expiration_type' - | 'pages_event_alert' - | 'radar_notification' - | 'real_origin_monitoring' - | 'scriptmonitor_alert_new_code_change_detections' - | 'scriptmonitor_alert_new_hosts' - | 'scriptmonitor_alert_new_malicious_hosts' - | 'scriptmonitor_alert_new_malicious_scripts' - | 'scriptmonitor_alert_new_malicious_url' - | 'scriptmonitor_alert_new_max_length_resource_url' - | 'scriptmonitor_alert_new_resources' - | 'secondary_dns_all_primaries_failing' - | 'secondary_dns_primaries_failing' - | 'secondary_dns_zone_successfully_updated' - | 'secondary_dns_zone_validation_warning' - | 'sentinel_alert' - | 'stream_live_notifications' - | 'traffic_anomalies_alert' - | 'tunnel_health_event' - | 'tunnel_update_event' - | 'universal_ssl_event_type' - | 'web_analytics_metrics_update' - | 'zone_aop_custom_certificate_expiration_type'; - - /** - * Body param: Whether or not the Notification policy is enabled. - */ - enabled: boolean; - - /** - * Body param: List of IDs that will be used when dispatching a notification. IDs - * for email type will be the email address. - */ - mechanisms: Record>; - - /** - * Body param: Name of the policy. - */ - name: string; - - /** - * Body param: Optional description for the Notification policy. - */ - description?: string; - - /** - * Body param: Optional filters that allow you to be alerted only on a subset of - * events for that alert type based on some criteria. This is only available for - * select alert types. See alert type documentation for more details. - */ - filters?: PolicyCreateParams.Filters; -} - -export namespace PolicyCreateParams { - export interface Mechanisms { - /** - * UUID - */ - id?: string | string; - } - - /** - * Optional filters that allow you to be alerted only on a subset of events for - * that alert type based on some criteria. This is only available for select alert - * types. See alert type documentation for more details. - */ - export interface Filters { - /** - * Usage depends on specific alert type - */ - actions?: Array; - - /** - * Used for configuring radar_notification - */ - affected_asns?: Array; - - /** - * Used for configuring incident_alert. A list of identifiers for each component to - * monitor. - */ - affected_components?: Array; - - /** - * Used for configuring radar_notification - */ - affected_locations?: Array; - - /** - * Used for configuring maintenance_event_notification - */ - airport_code?: Array; - - /** - * Usage depends on specific alert type - */ - alert_trigger_preferences?: Array; - - /** - * Used for configuring magic_tunnel_health_check_event - */ - alert_trigger_preferences_value?: Array<'99.0' | '98.0' | '97.0'>; - - /** - * Used for configuring load_balancing_pool_enablement_alert - */ - enabled?: Array; - - /** - * Used for configuring pages_event_alert - */ - environment?: Array; - - /** - * Used for configuring pages_event_alert - */ - event?: Array; - - /** - * Used for configuring load_balancing_health_alert - */ - event_source?: Array; - - /** - * Usage depends on specific alert type - */ - event_type?: Array; - - /** - * Usage depends on specific alert type - */ - group_by?: Array; - - /** - * Used for configuring health_check_status_notification - */ - health_check_id?: Array; - - /** - * Used for configuring incident_alert - */ - incident_impact?: Array< - 'INCIDENT_IMPACT_NONE' | 'INCIDENT_IMPACT_MINOR' | 'INCIDENT_IMPACT_MAJOR' | 'INCIDENT_IMPACT_CRITICAL' - >; - - /** - * Used for configuring stream_live_notifications - */ - input_id?: Array; - - /** - * Used for configuring billing_usage_alert - */ - limit?: Array; - - /** - * Used for configuring logo_match_alert - */ - logo_tag?: Array; - - /** - * Used for configuring advanced_ddos_attack_l4_alert - */ - megabits_per_second?: Array; - - /** - * Used for configuring load_balancing_health_alert - */ - new_health?: Array; - - /** - * Used for configuring tunnel_health_event - */ - new_status?: Array; - - /** - * Used for configuring advanced_ddos_attack_l4_alert - */ - packets_per_second?: Array; - - /** - * Usage depends on specific alert type - */ - pool_id?: Array; - - /** - * Used for configuring billing_usage_alert - */ - product?: Array; - - /** - * Used for configuring pages_event_alert - */ - project_id?: Array; - - /** - * Used for configuring advanced_ddos_attack_l4_alert - */ - protocol?: Array; - - /** - * Usage depends on specific alert type - */ - query_tag?: Array; - - /** - * Used for configuring advanced_ddos_attack_l7_alert - */ - requests_per_second?: Array; - - /** - * Usage depends on specific alert type - */ - selectors?: Array; - - /** - * Used for configuring clickhouse_alert_fw_ent_anomaly - */ - services?: Array; - - /** - * Usage depends on specific alert type - */ - slo?: Array; - - /** - * Used for configuring health_check_status_notification - */ - status?: Array; - - /** - * Used for configuring advanced_ddos_attack_l7_alert - */ - target_hostname?: Array; - - /** - * Used for configuring advanced_ddos_attack_l4_alert - */ - target_ip?: Array; - - /** - * Used for configuring advanced_ddos_attack_l7_alert - */ - target_zone_name?: Array; - - /** - * Used for configuring traffic_anomalies_alert - */ - traffic_exclusions?: Array<'security_events'>; - - /** - * Used for configuring tunnel_health_event - */ - tunnel_id?: Array; - - /** - * Used for configuring magic_tunnel_health_check_event - */ - tunnel_name?: Array; - - /** - * Usage depends on specific alert type - */ - where?: Array; - - /** - * Usage depends on specific alert type - */ - zones?: Array; - } -} + /** + * Body param: Optional filters that allow you to be alerted only on a subset of + * events for that alert type based on some criteria. This is only available for + * select alert types. See alert type documentation for more details. + */ + filters?: Filter; +} export interface PolicyUpdateParams { /** @@ -822,13 +605,13 @@ export interface PolicyUpdateParams { * events for that alert type based on some criteria. This is only available for * select alert types. See alert type documentation for more details. */ - filters?: PolicyUpdateParams.Filters; + filters?: Filter; /** * Body param: List of IDs that will be used when dispatching a notification. IDs * for email type will be the email address. */ - mechanisms?: Record>; + mechanisms?: Mechanism; /** * Body param: Name of the policy. @@ -836,225 +619,6 @@ export interface PolicyUpdateParams { name?: string; } -export namespace PolicyUpdateParams { - /** - * Optional filters that allow you to be alerted only on a subset of events for - * that alert type based on some criteria. This is only available for select alert - * types. See alert type documentation for more details. - */ - export interface Filters { - /** - * Usage depends on specific alert type - */ - actions?: Array; - - /** - * Used for configuring radar_notification - */ - affected_asns?: Array; - - /** - * Used for configuring incident_alert. A list of identifiers for each component to - * monitor. - */ - affected_components?: Array; - - /** - * Used for configuring radar_notification - */ - affected_locations?: Array; - - /** - * Used for configuring maintenance_event_notification - */ - airport_code?: Array; - - /** - * Usage depends on specific alert type - */ - alert_trigger_preferences?: Array; - - /** - * Used for configuring magic_tunnel_health_check_event - */ - alert_trigger_preferences_value?: Array<'99.0' | '98.0' | '97.0'>; - - /** - * Used for configuring load_balancing_pool_enablement_alert - */ - enabled?: Array; - - /** - * Used for configuring pages_event_alert - */ - environment?: Array; - - /** - * Used for configuring pages_event_alert - */ - event?: Array; - - /** - * Used for configuring load_balancing_health_alert - */ - event_source?: Array; - - /** - * Usage depends on specific alert type - */ - event_type?: Array; - - /** - * Usage depends on specific alert type - */ - group_by?: Array; - - /** - * Used for configuring health_check_status_notification - */ - health_check_id?: Array; - - /** - * Used for configuring incident_alert - */ - incident_impact?: Array< - 'INCIDENT_IMPACT_NONE' | 'INCIDENT_IMPACT_MINOR' | 'INCIDENT_IMPACT_MAJOR' | 'INCIDENT_IMPACT_CRITICAL' - >; - - /** - * Used for configuring stream_live_notifications - */ - input_id?: Array; - - /** - * Used for configuring billing_usage_alert - */ - limit?: Array; - - /** - * Used for configuring logo_match_alert - */ - logo_tag?: Array; - - /** - * Used for configuring advanced_ddos_attack_l4_alert - */ - megabits_per_second?: Array; - - /** - * Used for configuring load_balancing_health_alert - */ - new_health?: Array; - - /** - * Used for configuring tunnel_health_event - */ - new_status?: Array; - - /** - * Used for configuring advanced_ddos_attack_l4_alert - */ - packets_per_second?: Array; - - /** - * Usage depends on specific alert type - */ - pool_id?: Array; - - /** - * Used for configuring billing_usage_alert - */ - product?: Array; - - /** - * Used for configuring pages_event_alert - */ - project_id?: Array; - - /** - * Used for configuring advanced_ddos_attack_l4_alert - */ - protocol?: Array; - - /** - * Usage depends on specific alert type - */ - query_tag?: Array; - - /** - * Used for configuring advanced_ddos_attack_l7_alert - */ - requests_per_second?: Array; - - /** - * Usage depends on specific alert type - */ - selectors?: Array; - - /** - * Used for configuring clickhouse_alert_fw_ent_anomaly - */ - services?: Array; - - /** - * Usage depends on specific alert type - */ - slo?: Array; - - /** - * Used for configuring health_check_status_notification - */ - status?: Array; - - /** - * Used for configuring advanced_ddos_attack_l7_alert - */ - target_hostname?: Array; - - /** - * Used for configuring advanced_ddos_attack_l4_alert - */ - target_ip?: Array; - - /** - * Used for configuring advanced_ddos_attack_l7_alert - */ - target_zone_name?: Array; - - /** - * Used for configuring traffic_anomalies_alert - */ - traffic_exclusions?: Array<'security_events'>; - - /** - * Used for configuring tunnel_health_event - */ - tunnel_id?: Array; - - /** - * Used for configuring magic_tunnel_health_check_event - */ - tunnel_name?: Array; - - /** - * Usage depends on specific alert type - */ - where?: Array; - - /** - * Usage depends on specific alert type - */ - zones?: Array; - } - - export interface Mechanisms { - /** - * UUID - */ - id?: string | string; - } -} - export interface PolicyListParams { /** * The account id @@ -1077,10 +641,12 @@ export interface PolicyGetParams { } export namespace Policies { - export import AlertingPolicies = PoliciesAPI.AlertingPolicies; + export import Filter = PoliciesAPI.Filter; + export import Mechanism = PoliciesAPI.Mechanism; + export import Policy = PoliciesAPI.Policy; export import PolicyCreateResponse = PoliciesAPI.PolicyCreateResponse; export import PolicyUpdateResponse = PoliciesAPI.PolicyUpdateResponse; - export import AlertingPoliciesSinglePage = PoliciesAPI.AlertingPoliciesSinglePage; + export import PoliciesSinglePage = PoliciesAPI.PoliciesSinglePage; export import PolicyCreateParams = PoliciesAPI.PolicyCreateParams; export import PolicyUpdateParams = PoliciesAPI.PolicyUpdateParams; export import PolicyListParams = PoliciesAPI.PolicyListParams; diff --git a/src/resources/audit-logs.ts b/src/resources/audit-logs.ts index 0553ca6f85..1c480fde2a 100644 --- a/src/resources/audit-logs.ts +++ b/src/resources/audit-logs.ts @@ -2,7 +2,6 @@ import * as Core from 'cloudflare/core'; import { APIResource } from 'cloudflare/resource'; -import * as AuditLogsAPI from 'cloudflare/resources/audit-logs'; import { V4PagePaginationArray, type V4PagePaginationArrayParams } from 'cloudflare/pagination'; export class AuditLogs extends APIResource { @@ -206,9 +205,3 @@ export namespace AuditLogListParams { name?: string; } } - -export namespace AuditLogs { - export import AuditLogListResponse = AuditLogsAPI.AuditLogListResponse; - export import AuditLogListResponsesV4PagePaginationArray = AuditLogsAPI.AuditLogListResponsesV4PagePaginationArray; - export import AuditLogListParams = AuditLogsAPI.AuditLogListParams; -} diff --git a/src/resources/bot-management.ts b/src/resources/bot-management.ts index c7796af99c..6e7e36516f 100644 --- a/src/resources/bot-management.ts +++ b/src/resources/bot-management.ts @@ -2,7 +2,6 @@ import * as Core from 'cloudflare/core'; import { APIResource } from 'cloudflare/resource'; -import * as BotManagementAPI from 'cloudflare/resources/bot-management'; export class BotManagement extends APIResource { /** @@ -45,276 +44,149 @@ export class BotManagement extends APIResource { } } -export type BotManagementUpdateResponse = - | BotManagementUpdateResponse.BotManagementBotFightModeConfig - | BotManagementUpdateResponse.BotManagementSbfmDefinitelyConfig - | BotManagementUpdateResponse.BotManagementSbfmLikelyConfig - | BotManagementUpdateResponse.BotManagementBmSubscriptionConfig; - -export namespace BotManagementUpdateResponse { - export interface BotManagementBotFightModeConfig { - /** - * Use lightweight, invisible JavaScript detections to improve Bot Management. - * [Learn more about JavaScript Detections](https://developers.cloudflare.com/bots/reference/javascript-detections/). - */ - enable_js?: boolean; - - /** - * Whether to enable Bot Fight Mode. - */ - fight_mode?: boolean; - - /** - * A read-only field that indicates whether the zone currently is running the - * latest ML model. - */ - using_latest_model?: boolean; - } - - export interface BotManagementSbfmDefinitelyConfig { - /** - * Use lightweight, invisible JavaScript detections to improve Bot Management. - * [Learn more about JavaScript Detections](https://developers.cloudflare.com/bots/reference/javascript-detections/). - */ - enable_js?: boolean; - - /** - * Whether to optimize Super Bot Fight Mode protections for Wordpress. - */ - optimize_wordpress?: boolean; - - /** - * Super Bot Fight Mode (SBFM) action to take on definitely automated requests. - */ - sbfm_definitely_automated?: 'allow' | 'block' | 'managed_challenge'; - - /** - * Super Bot Fight Mode (SBFM) to enable static resource protection. Enable if - * static resources on your application need bot protection. Note: Static resource - * protection can also result in legitimate traffic being blocked. - */ - sbfm_static_resource_protection?: boolean; - - /** - * Super Bot Fight Mode (SBFM) action to take on verified bots requests. - */ - sbfm_verified_bots?: 'allow' | 'block'; - - /** - * A read-only field that indicates whether the zone currently is running the - * latest ML model. - */ - using_latest_model?: boolean; - } - - export interface BotManagementSbfmLikelyConfig { - /** - * Use lightweight, invisible JavaScript detections to improve Bot Management. - * [Learn more about JavaScript Detections](https://developers.cloudflare.com/bots/reference/javascript-detections/). - */ - enable_js?: boolean; - - /** - * Whether to optimize Super Bot Fight Mode protections for Wordpress. - */ - optimize_wordpress?: boolean; - - /** - * Super Bot Fight Mode (SBFM) action to take on definitely automated requests. - */ - sbfm_definitely_automated?: 'allow' | 'block' | 'managed_challenge'; - - /** - * Super Bot Fight Mode (SBFM) action to take on likely automated requests. - */ - sbfm_likely_automated?: 'allow' | 'block' | 'managed_challenge'; - - /** - * Super Bot Fight Mode (SBFM) to enable static resource protection. Enable if - * static resources on your application need bot protection. Note: Static resource - * protection can also result in legitimate traffic being blocked. - */ - sbfm_static_resource_protection?: boolean; - - /** - * Super Bot Fight Mode (SBFM) action to take on verified bots requests. - */ - sbfm_verified_bots?: 'allow' | 'block'; - - /** - * A read-only field that indicates whether the zone currently is running the - * latest ML model. - */ - using_latest_model?: boolean; - } - - export interface BotManagementBmSubscriptionConfig { - /** - * Automatically update to the newest bot detection models created by Cloudflare as - * they are released. - * [Learn more.](https://developers.cloudflare.com/bots/reference/machine-learning-models#model-versions-and-release-notes) - */ - auto_update_model?: boolean; - - /** - * Use lightweight, invisible JavaScript detections to improve Bot Management. - * [Learn more about JavaScript Detections](https://developers.cloudflare.com/bots/reference/javascript-detections/). - */ - enable_js?: boolean; +export interface BotFightModeConfiguration { + /** + * Use lightweight, invisible JavaScript detections to improve Bot Management. + * [Learn more about JavaScript Detections](https://developers.cloudflare.com/bots/reference/javascript-detections/). + */ + enable_js?: boolean; - /** - * Whether to disable tracking the highest bot score for a session in the Bot - * Management cookie. - */ - suppress_session_score?: boolean; + /** + * Whether to enable Bot Fight Mode. + */ + fight_mode?: boolean; - /** - * A read-only field that indicates whether the zone currently is running the - * latest ML model. - */ - using_latest_model?: boolean; - } + /** + * A read-only field that indicates whether the zone currently is running the + * latest ML model. + */ + using_latest_model?: boolean; } -export type BotManagementGetResponse = - | BotManagementGetResponse.BotManagementBotFightModeConfig - | BotManagementGetResponse.BotManagementSbfmDefinitelyConfig - | BotManagementGetResponse.BotManagementSbfmLikelyConfig - | BotManagementGetResponse.BotManagementBmSubscriptionConfig; - -export namespace BotManagementGetResponse { - export interface BotManagementBotFightModeConfig { - /** - * Use lightweight, invisible JavaScript detections to improve Bot Management. - * [Learn more about JavaScript Detections](https://developers.cloudflare.com/bots/reference/javascript-detections/). - */ - enable_js?: boolean; - - /** - * Whether to enable Bot Fight Mode. - */ - fight_mode?: boolean; +export interface SubscriptionConfiguration { + /** + * Automatically update to the newest bot detection models created by Cloudflare as + * they are released. + * [Learn more.](https://developers.cloudflare.com/bots/reference/machine-learning-models#model-versions-and-release-notes) + */ + auto_update_model?: boolean; - /** - * A read-only field that indicates whether the zone currently is running the - * latest ML model. - */ - using_latest_model?: boolean; - } + /** + * Use lightweight, invisible JavaScript detections to improve Bot Management. + * [Learn more about JavaScript Detections](https://developers.cloudflare.com/bots/reference/javascript-detections/). + */ + enable_js?: boolean; - export interface BotManagementSbfmDefinitelyConfig { - /** - * Use lightweight, invisible JavaScript detections to improve Bot Management. - * [Learn more about JavaScript Detections](https://developers.cloudflare.com/bots/reference/javascript-detections/). - */ - enable_js?: boolean; + /** + * Whether to disable tracking the highest bot score for a session in the Bot + * Management cookie. + */ + suppress_session_score?: boolean; - /** - * Whether to optimize Super Bot Fight Mode protections for Wordpress. - */ - optimize_wordpress?: boolean; + /** + * A read-only field that indicates whether the zone currently is running the + * latest ML model. + */ + using_latest_model?: boolean; +} - /** - * Super Bot Fight Mode (SBFM) action to take on definitely automated requests. - */ - sbfm_definitely_automated?: 'allow' | 'block' | 'managed_challenge'; +export interface SuperBotFightModeDefinitelyConfiguration { + /** + * Use lightweight, invisible JavaScript detections to improve Bot Management. + * [Learn more about JavaScript Detections](https://developers.cloudflare.com/bots/reference/javascript-detections/). + */ + enable_js?: boolean; - /** - * Super Bot Fight Mode (SBFM) to enable static resource protection. Enable if - * static resources on your application need bot protection. Note: Static resource - * protection can also result in legitimate traffic being blocked. - */ - sbfm_static_resource_protection?: boolean; + /** + * Whether to optimize Super Bot Fight Mode protections for Wordpress. + */ + optimize_wordpress?: boolean; - /** - * Super Bot Fight Mode (SBFM) action to take on verified bots requests. - */ - sbfm_verified_bots?: 'allow' | 'block'; + /** + * Super Bot Fight Mode (SBFM) action to take on definitely automated requests. + */ + sbfm_definitely_automated?: 'allow' | 'block' | 'managed_challenge'; - /** - * A read-only field that indicates whether the zone currently is running the - * latest ML model. - */ - using_latest_model?: boolean; - } + /** + * Super Bot Fight Mode (SBFM) to enable static resource protection. Enable if + * static resources on your application need bot protection. Note: Static resource + * protection can also result in legitimate traffic being blocked. + */ + sbfm_static_resource_protection?: boolean; - export interface BotManagementSbfmLikelyConfig { - /** - * Use lightweight, invisible JavaScript detections to improve Bot Management. - * [Learn more about JavaScript Detections](https://developers.cloudflare.com/bots/reference/javascript-detections/). - */ - enable_js?: boolean; + /** + * Super Bot Fight Mode (SBFM) action to take on verified bots requests. + */ + sbfm_verified_bots?: 'allow' | 'block'; - /** - * Whether to optimize Super Bot Fight Mode protections for Wordpress. - */ - optimize_wordpress?: boolean; + /** + * A read-only field that indicates whether the zone currently is running the + * latest ML model. + */ + using_latest_model?: boolean; +} - /** - * Super Bot Fight Mode (SBFM) action to take on definitely automated requests. - */ - sbfm_definitely_automated?: 'allow' | 'block' | 'managed_challenge'; +export interface SuperBotFightModeLikelyConfig { + /** + * Use lightweight, invisible JavaScript detections to improve Bot Management. + * [Learn more about JavaScript Detections](https://developers.cloudflare.com/bots/reference/javascript-detections/). + */ + enable_js?: boolean; - /** - * Super Bot Fight Mode (SBFM) action to take on likely automated requests. - */ - sbfm_likely_automated?: 'allow' | 'block' | 'managed_challenge'; + /** + * Whether to optimize Super Bot Fight Mode protections for Wordpress. + */ + optimize_wordpress?: boolean; - /** - * Super Bot Fight Mode (SBFM) to enable static resource protection. Enable if - * static resources on your application need bot protection. Note: Static resource - * protection can also result in legitimate traffic being blocked. - */ - sbfm_static_resource_protection?: boolean; + /** + * Super Bot Fight Mode (SBFM) action to take on definitely automated requests. + */ + sbfm_definitely_automated?: 'allow' | 'block' | 'managed_challenge'; - /** - * Super Bot Fight Mode (SBFM) action to take on verified bots requests. - */ - sbfm_verified_bots?: 'allow' | 'block'; + /** + * Super Bot Fight Mode (SBFM) action to take on likely automated requests. + */ + sbfm_likely_automated?: 'allow' | 'block' | 'managed_challenge'; - /** - * A read-only field that indicates whether the zone currently is running the - * latest ML model. - */ - using_latest_model?: boolean; - } + /** + * Super Bot Fight Mode (SBFM) to enable static resource protection. Enable if + * static resources on your application need bot protection. Note: Static resource + * protection can also result in legitimate traffic being blocked. + */ + sbfm_static_resource_protection?: boolean; - export interface BotManagementBmSubscriptionConfig { - /** - * Automatically update to the newest bot detection models created by Cloudflare as - * they are released. - * [Learn more.](https://developers.cloudflare.com/bots/reference/machine-learning-models#model-versions-and-release-notes) - */ - auto_update_model?: boolean; + /** + * Super Bot Fight Mode (SBFM) action to take on verified bots requests. + */ + sbfm_verified_bots?: 'allow' | 'block'; - /** - * Use lightweight, invisible JavaScript detections to improve Bot Management. - * [Learn more about JavaScript Detections](https://developers.cloudflare.com/bots/reference/javascript-detections/). - */ - enable_js?: boolean; + /** + * A read-only field that indicates whether the zone currently is running the + * latest ML model. + */ + using_latest_model?: boolean; +} - /** - * Whether to disable tracking the highest bot score for a session in the Bot - * Management cookie. - */ - suppress_session_score?: boolean; +export type BotManagementUpdateResponse = + | BotFightModeConfiguration + | SuperBotFightModeDefinitelyConfiguration + | SuperBotFightModeLikelyConfig + | SubscriptionConfiguration; - /** - * A read-only field that indicates whether the zone currently is running the - * latest ML model. - */ - using_latest_model?: boolean; - } -} +export type BotManagementGetResponse = + | BotFightModeConfiguration + | SuperBotFightModeDefinitelyConfiguration + | SuperBotFightModeLikelyConfig + | SubscriptionConfiguration; export type BotManagementUpdateParams = - | BotManagementUpdateParams.BotManagementBotFightModeConfig - | BotManagementUpdateParams.BotManagementSbfmDefinitelyConfig - | BotManagementUpdateParams.BotManagementSbfmLikelyConfig - | BotManagementUpdateParams.BotManagementBmSubscriptionConfig; + | BotManagementUpdateParams.BotFightModeConfiguration + | BotManagementUpdateParams.SuperBotFightModeDefinitelyConfiguration + | BotManagementUpdateParams.SuperBotFightModeLikelyConfig + | BotManagementUpdateParams.SubscriptionConfiguration; export namespace BotManagementUpdateParams { - export interface BotManagementBotFightModeConfig { + export interface BotFightModeConfiguration { /** * Path param: Identifier */ @@ -333,7 +205,7 @@ export namespace BotManagementUpdateParams { fight_mode?: boolean; } - export interface BotManagementSbfmDefinitelyConfig { + export interface SuperBotFightModeDefinitelyConfiguration { /** * Path param: Identifier */ @@ -371,7 +243,7 @@ export namespace BotManagementUpdateParams { sbfm_verified_bots?: 'allow' | 'block'; } - export interface BotManagementSbfmLikelyConfig { + export interface SuperBotFightModeLikelyConfig { /** * Path param: Identifier */ @@ -415,7 +287,7 @@ export namespace BotManagementUpdateParams { sbfm_verified_bots?: 'allow' | 'block'; } - export interface BotManagementBmSubscriptionConfig { + export interface SubscriptionConfiguration { /** * Path param: Identifier */ @@ -449,10 +321,3 @@ export interface BotManagementGetParams { */ zone_id: string; } - -export namespace BotManagement { - export import BotManagementUpdateResponse = BotManagementAPI.BotManagementUpdateResponse; - export import BotManagementGetResponse = BotManagementAPI.BotManagementGetResponse; - export import BotManagementUpdateParams = BotManagementAPI.BotManagementUpdateParams; - export import BotManagementGetParams = BotManagementAPI.BotManagementGetParams; -} diff --git a/src/resources/brand-protection.ts b/src/resources/brand-protection.ts index e3cb03a280..4ae0e025a0 100644 --- a/src/resources/brand-protection.ts +++ b/src/resources/brand-protection.ts @@ -2,43 +2,36 @@ import * as Core from 'cloudflare/core'; import { APIResource } from 'cloudflare/resource'; -import * as BrandProtectionAPI from 'cloudflare/resources/brand-protection'; export class BrandProtection extends APIResource { /** * Submit suspicious URL for scanning */ - submit( - params: BrandProtectionSubmitParams, - options?: Core.RequestOptions, - ): Core.APIPromise { + submit(params: BrandProtectionSubmitParams, options?: Core.RequestOptions): Core.APIPromise { const { account_id, ...body } = params; return ( this._client.post(`/accounts/${account_id}/brand-protection/submit`, { body, ...options, - }) as Core.APIPromise<{ result: IntelPhishingURLSubmit }> + }) as Core.APIPromise<{ result: Submit }> )._thenUnwrap((obj) => obj.result); } /** * Get results for a URL scan */ - urlInfo( - params: BrandProtectionURLInfoParams, - options?: Core.RequestOptions, - ): Core.APIPromise { + urlInfo(params: BrandProtectionURLInfoParams, options?: Core.RequestOptions): Core.APIPromise { const { account_id, ...query } = params; return ( this._client.get(`/accounts/${account_id}/brand-protection/url-info`, { query, ...options, - }) as Core.APIPromise<{ result: IntelPhishingURLInfo }> + }) as Core.APIPromise<{ result: Info }> )._thenUnwrap((obj) => obj.result); } } -export interface IntelPhishingURLInfo { +export interface Info { /** * List of categorizations applied to this submission. */ @@ -76,7 +69,7 @@ export interface IntelPhishingURLInfo { url?: string; } -export interface IntelPhishingURLSubmit { +export interface Submit { /** * URLs that were excluded from scanning because their domain is in our no-scan * list. @@ -233,17 +226,3 @@ export namespace BrandProtectionURLInfoParams { url_id?: number; } } - -export namespace BrandProtection { - export import IntelPhishingURLInfo = BrandProtectionAPI.IntelPhishingURLInfo; - export import IntelPhishingURLSubmit = BrandProtectionAPI.IntelPhishingURLSubmit; - export import UnnamedSchemaRef209db30ed499548152d6f3bccf720b54 = BrandProtectionAPI.UnnamedSchemaRef209db30ed499548152d6f3bccf720b54; - export import UnnamedSchemaRef39419d70e2399b28b15cd660afd342fb = BrandProtectionAPI.UnnamedSchemaRef39419d70e2399b28b15cd660afd342fb; - export import UnnamedSchemaRef3e10ea08deb8102a27500f986488c1e8 = BrandProtectionAPI.UnnamedSchemaRef3e10ea08deb8102a27500f986488c1e8; - export import UnnamedSchemaRef44e66100b948bfe723054c56b6144766 = BrandProtectionAPI.UnnamedSchemaRef44e66100b948bfe723054c56b6144766; - export import UnnamedSchemaRef767c0981cf47f45f0c766253dbd18669 = BrandProtectionAPI.UnnamedSchemaRef767c0981cf47f45f0c766253dbd18669; - export import UnnamedSchemaRef9b4c9779a35b172cb69c71389ebc7014 = BrandProtectionAPI.UnnamedSchemaRef9b4c9779a35b172cb69c71389ebc7014; - export import UnnamedSchemaRefA64e2a18a86750b6bd72cdf37ecfd869 = BrandProtectionAPI.UnnamedSchemaRefA64e2a18a86750b6bd72cdf37ecfd869; - export import BrandProtectionSubmitParams = BrandProtectionAPI.BrandProtectionSubmitParams; - export import BrandProtectionURLInfoParams = BrandProtectionAPI.BrandProtectionURLInfoParams; -} diff --git a/src/resources/cache/cache.ts b/src/resources/cache/cache.ts index 7855d4c122..adbaf94155 100644 --- a/src/resources/cache/cache.ts +++ b/src/resources/cache/cache.ts @@ -2,7 +2,6 @@ import * as Core from 'cloudflare/core'; import { APIResource } from 'cloudflare/resource'; -import * as CacheAPI from 'cloudflare/resources/cache/cache'; import * as CacheReserveAPI from 'cloudflare/resources/cache/cache-reserve'; import * as RegionalTieredCacheAPI from 'cloudflare/resources/cache/regional-tiered-cache'; import * as SmartTieredCacheAPI from 'cloudflare/resources/cache/smart-tiered-cache'; @@ -144,8 +143,6 @@ export namespace CachePurgeParams { } export namespace Cache { - export import CachePurgeResponse = CacheAPI.CachePurgeResponse; - export import CachePurgeParams = CacheAPI.CachePurgeParams; export import CacheReserve = CacheReserveAPI.CacheReserve; export import UnnamedSchemaRef2b5e755404a4bfd7892291ce97c4968d = CacheReserveAPI.UnnamedSchemaRef2b5e755404a4bfd7892291ce97c4968d; export import UnnamedSchemaRef37c385b4ebac5c7a6475b3f81ef9a7ad = CacheReserveAPI.UnnamedSchemaRef37c385b4ebac5c7a6475b3f81ef9a7ad; diff --git a/src/resources/cache/index.ts b/src/resources/cache/index.ts index 49811a683c..9219f47f5b 100644 --- a/src/resources/cache/index.ts +++ b/src/resources/cache/index.ts @@ -1,6 +1,6 @@ // File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. -export { CachePurgeResponse, CachePurgeParams, Cache } from './cache'; +export { Cache } from './cache'; export { CacheVariants, UnnamedSchemaRef669bfbb16c0913af7077c3c194fbfcd0, diff --git a/src/resources/calls.ts b/src/resources/calls.ts index 373dce3bb5..0d638360ad 100644 --- a/src/resources/calls.ts +++ b/src/resources/calls.ts @@ -2,7 +2,6 @@ import * as Core from 'cloudflare/core'; import { APIResource } from 'cloudflare/resource'; -import * as CallsAPI from 'cloudflare/resources/calls'; import { SinglePage } from 'cloudflare/pagination'; export class Calls extends APIResource { @@ -163,14 +162,3 @@ export interface CallGetParams { */ account_id: string; } - -export namespace Calls { - export import CallsApp = CallsAPI.CallsApp; - export import CallsAppWithSecret = CallsAPI.CallsAppWithSecret; - export import CallsAppsSinglePage = CallsAPI.CallsAppsSinglePage; - export import CallCreateParams = CallsAPI.CallCreateParams; - export import CallUpdateParams = CallsAPI.CallUpdateParams; - export import CallListParams = CallsAPI.CallListParams; - export import CallDeleteParams = CallsAPI.CallDeleteParams; - export import CallGetParams = CallsAPI.CallGetParams; -} diff --git a/src/resources/certificate-authorities/certificate-authorities.ts b/src/resources/certificate-authorities/certificate-authorities.ts index 8d99237054..825fbe0430 100644 --- a/src/resources/certificate-authorities/certificate-authorities.ts +++ b/src/resources/certificate-authorities/certificate-authorities.ts @@ -10,6 +10,7 @@ export class CertificateAuthorities extends APIResource { export namespace CertificateAuthorities { export import HostnameAssociations = HostnameAssociationsAPI.HostnameAssociations; + export import HostnameAssociationItem = HostnameAssociationsAPI.HostnameAssociationItem; export import TLSHostnameAssociation = HostnameAssociationsAPI.TLSHostnameAssociation; export import HostnameAssociationUpdateResponse = HostnameAssociationsAPI.HostnameAssociationUpdateResponse; export import HostnameAssociationGetResponse = HostnameAssociationsAPI.HostnameAssociationGetResponse; diff --git a/src/resources/certificate-authorities/hostname-associations.ts b/src/resources/certificate-authorities/hostname-associations.ts index f3813c2926..f894ea79c1 100644 --- a/src/resources/certificate-authorities/hostname-associations.ts +++ b/src/resources/certificate-authorities/hostname-associations.ts @@ -38,8 +38,10 @@ export class HostnameAssociations extends APIResource { } } +export type HostnameAssociationItem = string; + export interface TLSHostnameAssociation { - hostnames?: Array; + hostnames?: Array; /** * The UUID for a certificate that was uploaded to the mTLS Certificate Management @@ -50,11 +52,11 @@ export interface TLSHostnameAssociation { } export interface HostnameAssociationUpdateResponse { - hostnames?: Array; + hostnames?: Array; } export interface HostnameAssociationGetResponse { - hostnames?: Array; + hostnames?: Array; } export interface HostnameAssociationUpdateParams { @@ -66,7 +68,7 @@ export interface HostnameAssociationUpdateParams { /** * Body param: */ - hostnames?: Array; + hostnames?: Array; /** * Body param: The UUID for a certificate that was uploaded to the mTLS Certificate @@ -92,6 +94,7 @@ export interface HostnameAssociationGetParams { } export namespace HostnameAssociations { + export import HostnameAssociationItem = HostnameAssociationsAPI.HostnameAssociationItem; export import TLSHostnameAssociation = HostnameAssociationsAPI.TLSHostnameAssociation; export import HostnameAssociationUpdateResponse = HostnameAssociationsAPI.HostnameAssociationUpdateResponse; export import HostnameAssociationGetResponse = HostnameAssociationsAPI.HostnameAssociationGetResponse; diff --git a/src/resources/certificate-authorities/index.ts b/src/resources/certificate-authorities/index.ts index 59f26ddb90..034ce2320c 100644 --- a/src/resources/certificate-authorities/index.ts +++ b/src/resources/certificate-authorities/index.ts @@ -2,6 +2,7 @@ export { CertificateAuthorities } from './certificate-authorities'; export { + HostnameAssociationItem, TLSHostnameAssociation, HostnameAssociationUpdateResponse, HostnameAssociationGetResponse, diff --git a/src/resources/challenges/challenges.ts b/src/resources/challenges/challenges.ts index bf3e168b70..20772c4ef8 100644 --- a/src/resources/challenges/challenges.ts +++ b/src/resources/challenges/challenges.ts @@ -9,9 +9,10 @@ export class Challenges extends APIResource { export namespace Challenges { export import Widgets = WidgetsAPI.Widgets; - export import ChallengesWidget = WidgetsAPI.ChallengesWidget; - export import ChallengesWidgetList = WidgetsAPI.ChallengesWidgetList; - export import ChallengesWidgetListsV4PagePaginationArray = WidgetsAPI.ChallengesWidgetListsV4PagePaginationArray; + export import Widget = WidgetsAPI.Widget; + export import WidgetDomain = WidgetsAPI.WidgetDomain; + export import WidgetDomainItem = WidgetsAPI.WidgetDomainItem; + export import WidgetDomainsV4PagePaginationArray = WidgetsAPI.WidgetDomainsV4PagePaginationArray; export import WidgetCreateParams = WidgetsAPI.WidgetCreateParams; export import WidgetUpdateParams = WidgetsAPI.WidgetUpdateParams; export import WidgetListParams = WidgetsAPI.WidgetListParams; diff --git a/src/resources/challenges/index.ts b/src/resources/challenges/index.ts index e97706cb9f..aa66f3339c 100644 --- a/src/resources/challenges/index.ts +++ b/src/resources/challenges/index.ts @@ -2,14 +2,15 @@ export { Challenges } from './challenges'; export { - ChallengesWidget, - ChallengesWidgetList, + Widget, + WidgetDomain, + WidgetDomainItem, WidgetCreateParams, WidgetUpdateParams, WidgetListParams, WidgetDeleteParams, WidgetGetParams, WidgetRotateSecretParams, - ChallengesWidgetListsV4PagePaginationArray, + WidgetDomainsV4PagePaginationArray, Widgets, } from './widgets'; diff --git a/src/resources/challenges/widgets.ts b/src/resources/challenges/widgets.ts index bb62f4eff0..1f54e42dfc 100644 --- a/src/resources/challenges/widgets.ts +++ b/src/resources/challenges/widgets.ts @@ -9,14 +9,14 @@ export class Widgets extends APIResource { /** * Lists challenge widgets. */ - create(params: WidgetCreateParams, options?: Core.RequestOptions): Core.APIPromise { + create(params: WidgetCreateParams, options?: Core.RequestOptions): Core.APIPromise { const { account_id, direction, order, page, per_page, ...body } = params; return ( this._client.post(`/accounts/${account_id}/challenges/widgets`, { query: { direction, order, page, per_page }, body, ...options, - }) as Core.APIPromise<{ result: ChallengesWidget }> + }) as Core.APIPromise<{ result: Widget }> )._thenUnwrap((obj) => obj.result); } @@ -27,13 +27,13 @@ export class Widgets extends APIResource { sitekey: string, params: WidgetUpdateParams, options?: Core.RequestOptions, - ): Core.APIPromise { + ): Core.APIPromise { const { account_id, ...body } = params; return ( this._client.put(`/accounts/${account_id}/challenges/widgets/${sitekey}`, { body, ...options, - }) as Core.APIPromise<{ result: ChallengesWidget }> + }) as Core.APIPromise<{ result: Widget }> )._thenUnwrap((obj) => obj.result); } @@ -43,11 +43,11 @@ export class Widgets extends APIResource { list( params: WidgetListParams, options?: Core.RequestOptions, - ): Core.PagePromise { + ): Core.PagePromise { const { account_id, ...query } = params; return this._client.getAPIList( `/accounts/${account_id}/challenges/widgets`, - ChallengesWidgetListsV4PagePaginationArray, + WidgetDomainsV4PagePaginationArray, { query, ...options }, ); } @@ -59,28 +59,24 @@ export class Widgets extends APIResource { sitekey: string, params: WidgetDeleteParams, options?: Core.RequestOptions, - ): Core.APIPromise { + ): Core.APIPromise { const { account_id } = params; return ( this._client.delete( `/accounts/${account_id}/challenges/widgets/${sitekey}`, options, - ) as Core.APIPromise<{ result: ChallengesWidget }> + ) as Core.APIPromise<{ result: Widget }> )._thenUnwrap((obj) => obj.result); } /** * Show a single challenge widget configuration. */ - get( - sitekey: string, - params: WidgetGetParams, - options?: Core.RequestOptions, - ): Core.APIPromise { + get(sitekey: string, params: WidgetGetParams, options?: Core.RequestOptions): Core.APIPromise { const { account_id } = params; return ( this._client.get(`/accounts/${account_id}/challenges/widgets/${sitekey}`, options) as Core.APIPromise<{ - result: ChallengesWidget; + result: Widget; }> )._thenUnwrap((obj) => obj.result); } @@ -95,23 +91,23 @@ export class Widgets extends APIResource { sitekey: string, params: WidgetRotateSecretParams, options?: Core.RequestOptions, - ): Core.APIPromise { + ): Core.APIPromise { const { account_id, ...body } = params; return ( this._client.post(`/accounts/${account_id}/challenges/widgets/${sitekey}/rotate_secret`, { body, ...options, - }) as Core.APIPromise<{ result: ChallengesWidget }> + }) as Core.APIPromise<{ result: Widget }> )._thenUnwrap((obj) => obj.result); } } -export class ChallengesWidgetListsV4PagePaginationArray extends V4PagePaginationArray {} +export class WidgetDomainsV4PagePaginationArray extends V4PagePaginationArray {} /** * A Turnstile widget's detailed configuration */ -export interface ChallengesWidget { +export interface Widget { /** * If bot_fight_mode is set to `true`, Cloudflare issues computationally expensive * challenges in response to malicious bots (ENT only). @@ -129,7 +125,7 @@ export interface ChallengesWidget { */ created_on: string; - domains: Array; + domains: Array; /** * Widget Mode @@ -172,7 +168,7 @@ export interface ChallengesWidget { /** * A Turnstile Widgets configuration as it appears in listings */ -export interface ChallengesWidgetList { +export interface WidgetDomain { /** * If bot_fight_mode is set to `true`, Cloudflare issues computationally expensive * challenges in response to malicious bots (ENT only). @@ -190,7 +186,7 @@ export interface ChallengesWidgetList { */ created_on: string; - domains: Array; + domains: Array; /** * Widget Mode @@ -225,6 +221,12 @@ export interface ChallengesWidgetList { sitekey: string; } +/** + * Hosts as a hostname or IPv4/IPv6 address represented by strings. The widget will + * only work on these domains, and their subdomains. + */ +export type WidgetDomainItem = string; + export interface WidgetCreateParams { /** * Path param: Identifier @@ -234,7 +236,7 @@ export interface WidgetCreateParams { /** * Body param: */ - domains: Array; + domains: Array; /** * Body param: Widget Mode @@ -301,7 +303,7 @@ export interface WidgetUpdateParams { /** * Body param: */ - domains: Array; + domains: Array; /** * Body param: Widget Mode @@ -380,9 +382,10 @@ export interface WidgetRotateSecretParams { } export namespace Widgets { - export import ChallengesWidget = WidgetsAPI.ChallengesWidget; - export import ChallengesWidgetList = WidgetsAPI.ChallengesWidgetList; - export import ChallengesWidgetListsV4PagePaginationArray = WidgetsAPI.ChallengesWidgetListsV4PagePaginationArray; + export import Widget = WidgetsAPI.Widget; + export import WidgetDomain = WidgetsAPI.WidgetDomain; + export import WidgetDomainItem = WidgetsAPI.WidgetDomainItem; + export import WidgetDomainsV4PagePaginationArray = WidgetsAPI.WidgetDomainsV4PagePaginationArray; export import WidgetCreateParams = WidgetsAPI.WidgetCreateParams; export import WidgetUpdateParams = WidgetsAPI.WidgetUpdateParams; export import WidgetListParams = WidgetsAPI.WidgetListParams; diff --git a/src/resources/client-certificates.ts b/src/resources/client-certificates.ts index b366ed5e73..cb852a4a35 100644 --- a/src/resources/client-certificates.ts +++ b/src/resources/client-certificates.ts @@ -2,7 +2,6 @@ import * as Core from 'cloudflare/core'; import { APIResource } from 'cloudflare/resource'; -import * as ClientCertificatesAPI from 'cloudflare/resources/client-certificates'; import { V4PagePaginationArray, type V4PagePaginationArrayParams } from 'cloudflare/pagination'; export class ClientCertificates extends APIResource { @@ -257,13 +256,3 @@ export interface ClientCertificateGetParams { */ zone_id: string; } - -export namespace ClientCertificates { - export import ClientCertificate = ClientCertificatesAPI.ClientCertificate; - export import ClientCertificatesV4PagePaginationArray = ClientCertificatesAPI.ClientCertificatesV4PagePaginationArray; - export import ClientCertificateCreateParams = ClientCertificatesAPI.ClientCertificateCreateParams; - export import ClientCertificateListParams = ClientCertificatesAPI.ClientCertificateListParams; - export import ClientCertificateDeleteParams = ClientCertificatesAPI.ClientCertificateDeleteParams; - export import ClientCertificateEditParams = ClientCertificatesAPI.ClientCertificateEditParams; - export import ClientCertificateGetParams = ClientCertificatesAPI.ClientCertificateGetParams; -} diff --git a/src/resources/cloudforce-one/cloudforce-one.ts b/src/resources/cloudforce-one/cloudforce-one.ts index 1c9b9ce01d..0e5275a645 100644 --- a/src/resources/cloudforce-one/cloudforce-one.ts +++ b/src/resources/cloudforce-one/cloudforce-one.ts @@ -9,12 +9,12 @@ export class CloudforceOne extends APIResource { export namespace CloudforceOne { export import Requests = RequestsAPI.Requests; - export import CloudforceOneQuota = RequestsAPI.CloudforceOneQuota; - export import CloudforceOneRequestConstants = RequestsAPI.CloudforceOneRequestConstants; - export import CloudforceOneRequestItem = RequestsAPI.CloudforceOneRequestItem; - export import CloudforceOneRequestListItem = RequestsAPI.CloudforceOneRequestListItem; - export import CloudforceOneRequestTypes = RequestsAPI.CloudforceOneRequestTypes; - export import CloudforceOneRequestListItemsV4PagePaginationArray = RequestsAPI.CloudforceOneRequestListItemsV4PagePaginationArray; + export import Item = RequestsAPI.Item; + export import ListItem = RequestsAPI.ListItem; + export import Quota = RequestsAPI.Quota; + export import RequestConstants = RequestsAPI.RequestConstants; + export import RequestTypes = RequestsAPI.RequestTypes; + export import ListItemsV4PagePaginationArray = RequestsAPI.ListItemsV4PagePaginationArray; export import RequestCreateParams = RequestsAPI.RequestCreateParams; export import RequestUpdateParams = RequestsAPI.RequestUpdateParams; export import RequestListParams = RequestsAPI.RequestListParams; diff --git a/src/resources/cloudforce-one/index.ts b/src/resources/cloudforce-one/index.ts index cf195bfb21..f8aa53efa6 100644 --- a/src/resources/cloudforce-one/index.ts +++ b/src/resources/cloudforce-one/index.ts @@ -2,14 +2,14 @@ export { CloudforceOne } from './cloudforce-one'; export { - CloudforceOneQuota, - CloudforceOneRequestConstants, - CloudforceOneRequestItem, - CloudforceOneRequestListItem, - CloudforceOneRequestTypes, + Item, + ListItem, + Quota, + RequestConstants, + RequestTypes, RequestCreateParams, RequestUpdateParams, RequestListParams, - CloudforceOneRequestListItemsV4PagePaginationArray, + ListItemsV4PagePaginationArray, Requests, } from './requests/index'; diff --git a/src/resources/cloudforce-one/requests/index.ts b/src/resources/cloudforce-one/requests/index.ts index 80c41005a0..be1e1087a6 100644 --- a/src/resources/cloudforce-one/requests/index.ts +++ b/src/resources/cloudforce-one/requests/index.ts @@ -1,23 +1,30 @@ // File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. -export { CloudforceOnePriorityItem, PriorityCreateParams, PriorityUpdateParams, Priority } from './priority'; export { - CloudforceOneQuota, - CloudforceOneRequestConstants, - CloudforceOneRequestItem, - CloudforceOneRequestListItem, - CloudforceOneRequestTypes, + Item, + ListItem, + Quota, + RequestConstants, + RequestTypes, RequestCreateParams, RequestUpdateParams, RequestListParams, - CloudforceOneRequestListItemsV4PagePaginationArray, + ListItemsV4PagePaginationArray, Requests, } from './requests'; export { - CloudforceOneRequestMessageItem, + LabelItem, + Priority, + PriorityEdit, + PriorityCreateParams, + PriorityUpdateParams, + PriorityResource, +} from './priority'; +export { + Message, MessageGetResponse, MessageCreateParams, MessageUpdateParams, MessageGetParams, - Message, + MessageResource, } from './message'; diff --git a/src/resources/cloudforce-one/requests/message.ts b/src/resources/cloudforce-one/requests/message.ts index b844af737b..49254561d2 100644 --- a/src/resources/cloudforce-one/requests/message.ts +++ b/src/resources/cloudforce-one/requests/message.ts @@ -5,7 +5,7 @@ import { APIResource } from 'cloudflare/resource'; import * as MessageAPI from 'cloudflare/resources/cloudforce-one/requests/message'; import * as Shared from 'cloudflare/resources/shared'; -export class Message extends APIResource { +export class MessageResource extends APIResource { /** * Creating a request adds the request into the Cloudforce One queue for analysis. * In addition to the content, a short title, type, priority, and releasability @@ -16,12 +16,12 @@ export class Message extends APIResource { requestIdentifier: string, body: MessageCreateParams, options?: Core.RequestOptions, - ): Core.APIPromise { + ): Core.APIPromise { return ( this._client.post( `/accounts/${accountIdentifier}/cloudforce-one/requests/${requestIdentifier}/message/new`, { body, ...options }, - ) as Core.APIPromise<{ result: CloudforceOneRequestMessageItem }> + ) as Core.APIPromise<{ result: Message }> )._thenUnwrap((obj) => obj.result); } @@ -34,12 +34,12 @@ export class Message extends APIResource { messageIdentifer: number, body: MessageUpdateParams, options?: Core.RequestOptions, - ): Core.APIPromise { + ): Core.APIPromise { return ( this._client.put( `/accounts/${accountIdentifier}/cloudforce-one/requests/${requestIdentifier}/message/${messageIdentifer}`, { body, ...options }, - ) as Core.APIPromise<{ result: CloudforceOneRequestMessageItem }> + ) as Core.APIPromise<{ result: Message }> )._thenUnwrap((obj) => obj.result); } @@ -78,7 +78,7 @@ export class Message extends APIResource { } } -export interface CloudforceOneRequestMessageItem { +export interface Message { /** * Message ID */ @@ -110,7 +110,7 @@ export interface CloudforceOneRequestMessageItem { created?: string; } -export type MessageGetResponse = Array; +export type MessageGetResponse = Array; export interface MessageCreateParams { /** @@ -178,8 +178,8 @@ export interface MessageGetParams { sort_order?: 'asc' | 'desc'; } -export namespace Message { - export import CloudforceOneRequestMessageItem = MessageAPI.CloudforceOneRequestMessageItem; +export namespace MessageResource { + export import Message = MessageAPI.Message; export import MessageGetResponse = MessageAPI.MessageGetResponse; export import MessageCreateParams = MessageAPI.MessageCreateParams; export import MessageUpdateParams = MessageAPI.MessageUpdateParams; diff --git a/src/resources/cloudforce-one/requests/priority.ts b/src/resources/cloudforce-one/requests/priority.ts index 6db12e6f80..d926292c12 100644 --- a/src/resources/cloudforce-one/requests/priority.ts +++ b/src/resources/cloudforce-one/requests/priority.ts @@ -6,7 +6,7 @@ import * as PriorityAPI from 'cloudflare/resources/cloudforce-one/requests/prior import * as Shared from 'cloudflare/resources/shared'; import * as RequestsAPI from 'cloudflare/resources/cloudforce-one/requests/requests'; -export class Priority extends APIResource { +export class PriorityResource extends APIResource { /** * Create a New Priority Requirement */ @@ -14,12 +14,12 @@ export class Priority extends APIResource { accountIdentifier: string, body: PriorityCreateParams, options?: Core.RequestOptions, - ): Core.APIPromise { + ): Core.APIPromise { return ( this._client.post(`/accounts/${accountIdentifier}/cloudforce-one/requests/priority/new`, { body, ...options, - }) as Core.APIPromise<{ result: CloudforceOnePriorityItem }> + }) as Core.APIPromise<{ result: Priority }> )._thenUnwrap((obj) => obj.result); } @@ -31,12 +31,12 @@ export class Priority extends APIResource { priorityIdentifer: string, body: PriorityUpdateParams, options?: Core.RequestOptions, - ): Core.APIPromise { + ): Core.APIPromise { return ( this._client.put( `/accounts/${accountIdentifier}/cloudforce-one/requests/priority/${priorityIdentifer}`, { body, ...options }, - ) as Core.APIPromise<{ result: RequestsAPI.CloudforceOneRequestItem }> + ) as Core.APIPromise<{ result: RequestsAPI.Item }> )._thenUnwrap((obj) => obj.result); } @@ -63,32 +63,31 @@ export class Priority extends APIResource { accountIdentifier: string, priorityIdentifer: string, options?: Core.RequestOptions, - ): Core.APIPromise { + ): Core.APIPromise { return ( this._client.get( `/accounts/${accountIdentifier}/cloudforce-one/requests/priority/${priorityIdentifer}`, options, - ) as Core.APIPromise<{ result: RequestsAPI.CloudforceOneRequestItem }> + ) as Core.APIPromise<{ result: RequestsAPI.Item }> )._thenUnwrap((obj) => obj.result); } /** * Get Priority Intelligence Requirement Quota */ - quota( - accountIdentifier: string, - options?: Core.RequestOptions, - ): Core.APIPromise { + quota(accountIdentifier: string, options?: Core.RequestOptions): Core.APIPromise { return ( this._client.get( `/accounts/${accountIdentifier}/cloudforce-one/requests/priority/quota`, options, - ) as Core.APIPromise<{ result: RequestsAPI.CloudforceOneQuota }> + ) as Core.APIPromise<{ result: RequestsAPI.Quota }> )._thenUnwrap((obj) => obj.result); } } -export interface CloudforceOnePriorityItem { +export type LabelItem = string; + +export interface Priority { /** * UUID */ @@ -102,7 +101,7 @@ export interface CloudforceOnePriorityItem { /** * List of labels */ - labels: Array; + labels: Array; /** * Priority @@ -125,11 +124,33 @@ export interface CloudforceOnePriorityItem { updated: string; } +export interface PriorityEdit { + /** + * List of labels + */ + labels: Array; + + /** + * Priority + */ + priority: number; + + /** + * Requirement + */ + requirement: string; + + /** + * The CISA defined Traffic Light Protocol (TLP) + */ + tlp: 'clear' | 'amber' | 'amber-strict' | 'green' | 'red'; +} + export interface PriorityCreateParams { /** * List of labels */ - labels: Array; + labels: Array; /** * Priority @@ -151,7 +172,7 @@ export interface PriorityUpdateParams { /** * List of labels */ - labels: Array; + labels: Array; /** * Priority @@ -169,8 +190,10 @@ export interface PriorityUpdateParams { tlp: 'clear' | 'amber' | 'amber-strict' | 'green' | 'red'; } -export namespace Priority { - export import CloudforceOnePriorityItem = PriorityAPI.CloudforceOnePriorityItem; +export namespace PriorityResource { + export import LabelItem = PriorityAPI.LabelItem; + export import Priority = PriorityAPI.Priority; + export import PriorityEdit = PriorityAPI.PriorityEdit; export import PriorityCreateParams = PriorityAPI.PriorityCreateParams; export import PriorityUpdateParams = PriorityAPI.PriorityUpdateParams; } diff --git a/src/resources/cloudforce-one/requests/requests.ts b/src/resources/cloudforce-one/requests/requests.ts index e919e291f1..be4cdea280 100644 --- a/src/resources/cloudforce-one/requests/requests.ts +++ b/src/resources/cloudforce-one/requests/requests.ts @@ -9,8 +9,8 @@ import * as PriorityAPI from 'cloudflare/resources/cloudforce-one/requests/prior import { V4PagePaginationArray, type V4PagePaginationArrayParams } from 'cloudflare/pagination'; export class Requests extends APIResource { - message: MessageAPI.Message = new MessageAPI.Message(this._client); - priority: PriorityAPI.Priority = new PriorityAPI.Priority(this._client); + message: MessageAPI.MessageResource = new MessageAPI.MessageResource(this._client); + priority: PriorityAPI.PriorityResource = new PriorityAPI.PriorityResource(this._client); /** * Creating a request adds the request into the Cloudforce One queue for analysis. @@ -21,12 +21,12 @@ export class Requests extends APIResource { accountIdentifier: string, body: RequestCreateParams, options?: Core.RequestOptions, - ): Core.APIPromise { + ): Core.APIPromise { return ( this._client.post(`/accounts/${accountIdentifier}/cloudforce-one/requests/new`, { body, ...options, - }) as Core.APIPromise<{ result: CloudforceOneRequestItem }> + }) as Core.APIPromise<{ result: Item }> )._thenUnwrap((obj) => obj.result); } @@ -40,12 +40,12 @@ export class Requests extends APIResource { requestIdentifier: string, body: RequestUpdateParams, options?: Core.RequestOptions, - ): Core.APIPromise { + ): Core.APIPromise { return ( this._client.put(`/accounts/${accountIdentifier}/cloudforce-one/requests/${requestIdentifier}`, { body, ...options, - }) as Core.APIPromise<{ result: CloudforceOneRequestItem }> + }) as Core.APIPromise<{ result: Item }> )._thenUnwrap((obj) => obj.result); } @@ -56,10 +56,10 @@ export class Requests extends APIResource { accountIdentifier: string, body: RequestListParams, options?: Core.RequestOptions, - ): Core.PagePromise { + ): Core.PagePromise { return this._client.getAPIList( `/accounts/${accountIdentifier}/cloudforce-one/requests`, - CloudforceOneRequestListItemsV4PagePaginationArray, + ListItemsV4PagePaginationArray, { body, method: 'post', ...options }, ); } @@ -83,15 +83,12 @@ export class Requests extends APIResource { /** * Get Request Priority, Status, and TLP constants */ - constants( - accountIdentifier: string, - options?: Core.RequestOptions, - ): Core.APIPromise { + constants(accountIdentifier: string, options?: Core.RequestOptions): Core.APIPromise { return ( this._client.get( `/accounts/${accountIdentifier}/cloudforce-one/requests/constants`, options, - ) as Core.APIPromise<{ result: CloudforceOneRequestConstants }> + ) as Core.APIPromise<{ result: RequestConstants }> )._thenUnwrap((obj) => obj.result); } @@ -102,76 +99,43 @@ export class Requests extends APIResource { accountIdentifier: string, requestIdentifier: string, options?: Core.RequestOptions, - ): Core.APIPromise { + ): Core.APIPromise { return ( this._client.get( `/accounts/${accountIdentifier}/cloudforce-one/requests/${requestIdentifier}`, options, - ) as Core.APIPromise<{ result: CloudforceOneRequestItem }> + ) as Core.APIPromise<{ result: Item }> )._thenUnwrap((obj) => obj.result); } /** * Get Request Quota */ - quota(accountIdentifier: string, options?: Core.RequestOptions): Core.APIPromise { + quota(accountIdentifier: string, options?: Core.RequestOptions): Core.APIPromise { return ( this._client.get( `/accounts/${accountIdentifier}/cloudforce-one/requests/quota`, options, - ) as Core.APIPromise<{ result: CloudforceOneQuota }> + ) as Core.APIPromise<{ result: Quota }> )._thenUnwrap((obj) => obj.result); } /** * Get Request Types */ - types( - accountIdentifier: string, - options?: Core.RequestOptions, - ): Core.APIPromise { + types(accountIdentifier: string, options?: Core.RequestOptions): Core.APIPromise { return ( this._client.get( `/accounts/${accountIdentifier}/cloudforce-one/requests/types`, options, - ) as Core.APIPromise<{ result: CloudforceOneRequestTypes }> + ) as Core.APIPromise<{ result: RequestTypes }> )._thenUnwrap((obj) => obj.result); } } -export class CloudforceOneRequestListItemsV4PagePaginationArray extends V4PagePaginationArray {} - -export interface CloudforceOneQuota { - /** - * Anniversary date is when annual quota limit is refresh - */ - anniversary_date?: string; - - /** - * Quater anniversary date is when quota limit is refreshed each quarter - */ - quarter_anniversary_date?: string; - - /** - * Tokens for the quarter - */ - quota?: number; - - /** - * Tokens remaining for the quarter - */ - remaining?: number; -} - -export interface CloudforceOneRequestConstants { - priority?: Array<'routine' | 'high' | 'urgent'>; - - status?: Array<'open' | 'accepted' | 'reported' | 'approved' | 'completed' | 'declined'>; - - tlp?: Array<'clear' | 'amber' | 'amber-strict' | 'green' | 'red'>; -} +export class ListItemsV4PagePaginationArray extends V4PagePaginationArray {} -export interface CloudforceOneRequestItem { +export interface Item { /** * UUID */ @@ -226,7 +190,7 @@ export interface CloudforceOneRequestItem { tokens?: number; } -export interface CloudforceOneRequestListItem { +export interface ListItem { /** * UUID */ @@ -285,7 +249,37 @@ export interface CloudforceOneRequestListItem { tokens?: number; } -export type CloudforceOneRequestTypes = Array; +export interface Quota { + /** + * Anniversary date is when annual quota limit is refresh + */ + anniversary_date?: string; + + /** + * Quater anniversary date is when quota limit is refreshed each quarter + */ + quarter_anniversary_date?: string; + + /** + * Tokens for the quarter + */ + quota?: number; + + /** + * Tokens remaining for the quarter + */ + remaining?: number; +} + +export interface RequestConstants { + priority?: Array<'routine' | 'high' | 'urgent'>; + + status?: Array<'open' | 'accepted' | 'reported' | 'approved' | 'completed' | 'declined'>; + + tlp?: Array<'clear' | 'amber' | 'amber-strict' | 'green' | 'red'>; +} + +export type RequestTypes = Array; export interface RequestCreateParams { /** @@ -384,23 +378,25 @@ export interface RequestListParams extends V4PagePaginationArrayParams { } export namespace Requests { - export import CloudforceOneQuota = RequestsAPI.CloudforceOneQuota; - export import CloudforceOneRequestConstants = RequestsAPI.CloudforceOneRequestConstants; - export import CloudforceOneRequestItem = RequestsAPI.CloudforceOneRequestItem; - export import CloudforceOneRequestListItem = RequestsAPI.CloudforceOneRequestListItem; - export import CloudforceOneRequestTypes = RequestsAPI.CloudforceOneRequestTypes; - export import CloudforceOneRequestListItemsV4PagePaginationArray = RequestsAPI.CloudforceOneRequestListItemsV4PagePaginationArray; + export import Item = RequestsAPI.Item; + export import ListItem = RequestsAPI.ListItem; + export import Quota = RequestsAPI.Quota; + export import RequestConstants = RequestsAPI.RequestConstants; + export import RequestTypes = RequestsAPI.RequestTypes; + export import ListItemsV4PagePaginationArray = RequestsAPI.ListItemsV4PagePaginationArray; export import RequestCreateParams = RequestsAPI.RequestCreateParams; export import RequestUpdateParams = RequestsAPI.RequestUpdateParams; export import RequestListParams = RequestsAPI.RequestListParams; + export import MessageResource = MessageAPI.MessageResource; export import Message = MessageAPI.Message; - export import CloudforceOneRequestMessageItem = MessageAPI.CloudforceOneRequestMessageItem; export import MessageGetResponse = MessageAPI.MessageGetResponse; export import MessageCreateParams = MessageAPI.MessageCreateParams; export import MessageUpdateParams = MessageAPI.MessageUpdateParams; export import MessageGetParams = MessageAPI.MessageGetParams; + export import PriorityResource = PriorityAPI.PriorityResource; + export import LabelItem = PriorityAPI.LabelItem; export import Priority = PriorityAPI.Priority; - export import CloudforceOnePriorityItem = PriorityAPI.CloudforceOnePriorityItem; + export import PriorityEdit = PriorityAPI.PriorityEdit; export import PriorityCreateParams = PriorityAPI.PriorityCreateParams; export import PriorityUpdateParams = PriorityAPI.PriorityUpdateParams; } diff --git a/src/resources/custom-certificates/custom-certificates.ts b/src/resources/custom-certificates/custom-certificates.ts index 1c56df0021..c72457487c 100644 --- a/src/resources/custom-certificates/custom-certificates.ts +++ b/src/resources/custom-certificates/custom-certificates.ts @@ -2,7 +2,6 @@ import * as Core from 'cloudflare/core'; import { APIResource } from 'cloudflare/resource'; -import * as CustomCertificatesAPI from 'cloudflare/resources/custom-certificates/custom-certificates'; import * as KeylessCertificatesAPI from 'cloudflare/resources/keyless-certificates'; import * as Shared from 'cloudflare/resources/shared'; import * as PrioritizeAPI from 'cloudflare/resources/custom-certificates/prioritize'; @@ -168,9 +167,9 @@ export interface CustomCertificate { * security data centers. Default distribution is to all Cloudflare datacenters, * for optimal performance. */ - geo_restrictions?: CustomCertificate.GeoRestrictions; + geo_restrictions?: GeoRestrictions; - keyless_server?: KeylessCertificatesAPI.KeylessCertificateHostname; + keyless_server?: KeylessCertificatesAPI.KeylessCertificate; /** * Specify the policy that determines the region where your private key will be @@ -186,19 +185,17 @@ export interface CustomCertificate { policy?: string; } -export namespace CustomCertificate { - /** - * Specify the region where your private key can be held locally for optimal TLS - * performance. HTTPS connections to any excluded data center will still be fully - * encrypted, but will incur some latency while Keyless SSL is used to complete the - * handshake with the nearest allowed data center. Options allow distribution to - * only to U.S. data centers, only to E.U. data centers, or only to highest - * security data centers. Default distribution is to all Cloudflare datacenters, - * for optimal performance. - */ - export interface GeoRestrictions { - label?: 'us' | 'eu' | 'highest_security'; - } +/** + * Specify the region where your private key can be held locally for optimal TLS + * performance. HTTPS connections to any excluded data center will still be fully + * encrypted, but will incur some latency while Keyless SSL is used to complete the + * handshake with the nearest allowed data center. Options allow distribution to + * only to U.S. data centers, only to E.U. data centers, or only to highest + * security data centers. Default distribution is to all Cloudflare datacenters, + * for optimal performance. + */ +export interface GeoRestrictions { + label?: 'us' | 'eu' | 'highest_security'; } export interface CustomCertificateCreateParams { @@ -234,7 +231,7 @@ export interface CustomCertificateCreateParams { * highest security data centers. Default distribution is to all Cloudflare * datacenters, for optimal performance. */ - geo_restrictions?: CustomCertificateCreateParams.GeoRestrictions; + geo_restrictions?: GeoRestrictions; /** * Body param: Specify the policy that determines the region where your private key @@ -256,21 +253,6 @@ export interface CustomCertificateCreateParams { type?: 'legacy_custom' | 'sni_custom'; } -export namespace CustomCertificateCreateParams { - /** - * Specify the region where your private key can be held locally for optimal TLS - * performance. HTTPS connections to any excluded data center will still be fully - * encrypted, but will incur some latency while Keyless SSL is used to complete the - * handshake with the nearest allowed data center. Options allow distribution to - * only to U.S. data centers, only to E.U. data centers, or only to highest - * security data centers. Default distribution is to all Cloudflare datacenters, - * for optimal performance. - */ - export interface GeoRestrictions { - label?: 'us' | 'eu' | 'highest_security'; - } -} - export interface CustomCertificateListParams extends V4PagePaginationArrayParams { /** * Path param: Identifier @@ -328,7 +310,7 @@ export interface CustomCertificateEditParams { * highest security data centers. Default distribution is to all Cloudflare * datacenters, for optimal performance. */ - geo_restrictions?: CustomCertificateEditParams.GeoRestrictions; + geo_restrictions?: GeoRestrictions; /** * Body param: Specify the policy that determines the region where your private key @@ -349,21 +331,6 @@ export interface CustomCertificateEditParams { private_key?: string; } -export namespace CustomCertificateEditParams { - /** - * Specify the region where your private key can be held locally for optimal TLS - * performance. HTTPS connections to any excluded data center will still be fully - * encrypted, but will incur some latency while Keyless SSL is used to complete the - * handshake with the nearest allowed data center. Options allow distribution to - * only to U.S. data centers, only to E.U. data centers, or only to highest - * security data centers. Default distribution is to all Cloudflare datacenters, - * for optimal performance. - */ - export interface GeoRestrictions { - label?: 'us' | 'eu' | 'highest_security'; - } -} - export interface CustomCertificateGetParams { /** * Identifier @@ -372,13 +339,6 @@ export interface CustomCertificateGetParams { } export namespace CustomCertificates { - export import CustomCertificate = CustomCertificatesAPI.CustomCertificate; - export import CustomCertificatesV4PagePaginationArray = CustomCertificatesAPI.CustomCertificatesV4PagePaginationArray; - export import CustomCertificateCreateParams = CustomCertificatesAPI.CustomCertificateCreateParams; - export import CustomCertificateListParams = CustomCertificatesAPI.CustomCertificateListParams; - export import CustomCertificateDeleteParams = CustomCertificatesAPI.CustomCertificateDeleteParams; - export import CustomCertificateEditParams = CustomCertificatesAPI.CustomCertificateEditParams; - export import CustomCertificateGetParams = CustomCertificatesAPI.CustomCertificateGetParams; export import Prioritize = PrioritizeAPI.Prioritize; export import PrioritizeUpdateResponse = PrioritizeAPI.PrioritizeUpdateResponse; export import PrioritizeUpdateParams = PrioritizeAPI.PrioritizeUpdateParams; diff --git a/src/resources/custom-certificates/index.ts b/src/resources/custom-certificates/index.ts index 509f87e6a0..28f1cc799c 100644 --- a/src/resources/custom-certificates/index.ts +++ b/src/resources/custom-certificates/index.ts @@ -1,13 +1,4 @@ // File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. -export { - CustomCertificate, - CustomCertificateCreateParams, - CustomCertificateListParams, - CustomCertificateDeleteParams, - CustomCertificateEditParams, - CustomCertificateGetParams, - CustomCertificatesV4PagePaginationArray, - CustomCertificates, -} from './custom-certificates'; +export { CustomCertificates } from './custom-certificates'; export { PrioritizeUpdateResponse, PrioritizeUpdateParams, Prioritize } from './prioritize'; diff --git a/src/resources/custom-hostnames/custom-hostnames.ts b/src/resources/custom-hostnames/custom-hostnames.ts index 0940100c72..1c8dab5d1c 100644 --- a/src/resources/custom-hostnames/custom-hostnames.ts +++ b/src/resources/custom-hostnames/custom-hostnames.ts @@ -19,14 +19,11 @@ export class CustomHostnames extends APIResource { * and the domain is not already pointing to the Managed CNAME host, the PATCH * method must be used once it is (to complete validation). */ - create( - params: CustomHostnameCreateParams, - options?: Core.RequestOptions, - ): Core.APIPromise { + create(params: CustomHostnameCreateParams, options?: Core.RequestOptions): Core.APIPromise { const { zone_id, ...body } = params; return ( this._client.post(`/zones/${zone_id}/custom_hostnames`, { body, ...options }) as Core.APIPromise<{ - result: CustomHostnameCreateResponse; + result: CustomHostname; }> )._thenUnwrap((obj) => obj.result); } @@ -37,11 +34,11 @@ export class CustomHostnames extends APIResource { list( params: CustomHostnameListParams, options?: Core.RequestOptions, - ): Core.PagePromise { + ): Core.PagePromise { const { zone_id, ...query } = params; return this._client.getAPIList( `/zones/${zone_id}/custom_hostnames`, - CustomHostnameListResponsesV4PagePaginationArray, + CustomHostnamesV4PagePaginationArray, { query, ...options }, ); } @@ -71,13 +68,13 @@ export class CustomHostnames extends APIResource { customHostnameId: string, params: CustomHostnameEditParams, options?: Core.RequestOptions, - ): Core.APIPromise { + ): Core.APIPromise { const { zone_id, ...body } = params; return ( this._client.patch(`/zones/${zone_id}/custom_hostnames/${customHostnameId}`, { body, ...options, - }) as Core.APIPromise<{ result: CustomHostnameEditResponse }> + }) as Core.APIPromise<{ result: CustomHostname }> )._thenUnwrap((obj) => obj.result); } @@ -88,17 +85,17 @@ export class CustomHostnames extends APIResource { customHostnameId: string, params: CustomHostnameGetParams, options?: Core.RequestOptions, - ): Core.APIPromise { + ): Core.APIPromise { const { zone_id } = params; return ( this._client.get(`/zones/${zone_id}/custom_hostnames/${customHostnameId}`, options) as Core.APIPromise<{ - result: CustomHostnameGetResponse; + result: CustomHostname; }> )._thenUnwrap((obj) => obj.result); } } -export class CustomHostnameListResponsesV4PagePaginationArray extends V4PagePaginationArray {} +export class CustomHostnamesV4PagePaginationArray extends V4PagePaginationArray {} export interface CustomHostname { /** @@ -114,205 +111,203 @@ export interface CustomHostname { /** * SSL properties for the custom hostname. */ - ssl: CustomHostname.SSL; + ssl: SSL; } -export namespace CustomHostname { +/** + * SSL properties for the custom hostname. + */ +export interface SSL { /** - * SSL properties for the custom hostname. + * Custom hostname SSL identifier tag. */ - export interface SSL { - /** - * Custom hostname SSL identifier tag. - */ - id?: string; + id?: string; - /** - * A ubiquitous bundle has the highest probability of being verified everywhere, - * even by clients using outdated or unusual trust stores. An optimal bundle uses - * the shortest chain and newest intermediates. And the force bundle verifies the - * chain, but does not otherwise modify it. - */ - bundle_method?: CustomHostnamesAPI.UnnamedSchemaRef16aca57bde2963201c7e6e895436c1c1; + /** + * A ubiquitous bundle has the highest probability of being verified everywhere, + * even by clients using outdated or unusual trust stores. An optimal bundle uses + * the shortest chain and newest intermediates. And the force bundle verifies the + * chain, but does not otherwise modify it. + */ + bundle_method?: UnnamedSchemaRef16aca57bde2963201c7e6e895436c1c1; - /** - * The Certificate Authority that will issue the certificate - */ - certificate_authority?: 'digicert' | 'google' | 'lets_encrypt'; + /** + * The Certificate Authority that will issue the certificate + */ + certificate_authority?: 'digicert' | 'google' | 'lets_encrypt'; - /** - * If a custom uploaded certificate is used. - */ - custom_certificate?: string; + /** + * If a custom uploaded certificate is used. + */ + custom_certificate?: string; - /** - * The identifier for the Custom CSR that was used. - */ - custom_csr_id?: string; + /** + * The identifier for the Custom CSR that was used. + */ + custom_csr_id?: string; - /** - * The key for a custom uploaded certificate. - */ - custom_key?: string; + /** + * The key for a custom uploaded certificate. + */ + custom_key?: string; - /** - * The time the custom certificate expires on. - */ - expires_on?: string; + /** + * The time the custom certificate expires on. + */ + expires_on?: string; - /** - * A list of Hostnames on a custom uploaded certificate. - */ - hosts?: Array; + /** + * A list of Hostnames on a custom uploaded certificate. + */ + hosts?: Array; - /** - * The issuer on a custom uploaded certificate. - */ - issuer?: string; + /** + * The issuer on a custom uploaded certificate. + */ + issuer?: string; + + /** + * Domain control validation (DCV) method used for this hostname. + */ + method?: UnnamedSchemaRef78adb375f06c6d462dd92b99e2ecf510; + + /** + * The serial number on a custom uploaded certificate. + */ + serial_number?: string; + + /** + * SSL specific settings. + */ + settings?: SSL.Settings; + + /** + * The signature on a custom uploaded certificate. + */ + signature?: string; + + /** + * Status of the hostname's SSL certificates. + */ + status?: + | 'initializing' + | 'pending_validation' + | 'deleted' + | 'pending_issuance' + | 'pending_deployment' + | 'pending_deletion' + | 'pending_expiration' + | 'expired' + | 'active' + | 'initializing_timed_out' + | 'validation_timed_out' + | 'issuance_timed_out' + | 'deployment_timed_out' + | 'deletion_timed_out' + | 'pending_cleanup' + | 'staging_deployment' + | 'staging_active' + | 'deactivating' + | 'inactive' + | 'backup_issued' + | 'holding_deployment'; + + /** + * Level of validation to be used for this hostname. Domain validation (dv) must be + * used. + */ + type?: UnnamedSchemaRef9a9935a9a770967bb604ae41a81e42e1; + + /** + * The time the custom certificate was uploaded. + */ + uploaded_on?: string; + + /** + * Domain validation errors that have been received by the certificate authority + * (CA). + */ + validation_errors?: Array; + + validation_records?: Array; + /** + * Indicates whether the certificate covers a wildcard. + */ + wildcard?: boolean; +} + +export namespace SSL { + /** + * SSL specific settings. + */ + export interface Settings { /** - * Domain control validation (DCV) method used for this hostname. + * An allowlist of ciphers for TLS termination. These ciphers must be in the + * BoringSSL format. */ - method?: CustomHostnamesAPI.UnnamedSchemaRef78adb375f06c6d462dd92b99e2ecf510; + ciphers?: Array; /** - * The serial number on a custom uploaded certificate. + * Whether or not Early Hints is enabled. */ - serial_number?: string; + early_hints?: 'on' | 'off'; /** - * SSL specific settings. + * Whether or not HTTP2 is enabled. */ - settings?: SSL.Settings; + http2?: 'on' | 'off'; /** - * The signature on a custom uploaded certificate. + * The minimum TLS version supported. */ - signature?: string; + min_tls_version?: '1.0' | '1.1' | '1.2' | '1.3'; /** - * Status of the hostname's SSL certificates. + * Whether or not TLS 1.3 is enabled. */ - status?: - | 'initializing' - | 'pending_validation' - | 'deleted' - | 'pending_issuance' - | 'pending_deployment' - | 'pending_deletion' - | 'pending_expiration' - | 'expired' - | 'active' - | 'initializing_timed_out' - | 'validation_timed_out' - | 'issuance_timed_out' - | 'deployment_timed_out' - | 'deletion_timed_out' - | 'pending_cleanup' - | 'staging_deployment' - | 'staging_active' - | 'deactivating' - | 'inactive' - | 'backup_issued' - | 'holding_deployment'; + tls_1_3?: 'on' | 'off'; + } + export interface ValidationError { /** - * Level of validation to be used for this hostname. Domain validation (dv) must be - * used. + * A domain validation error. */ - type?: CustomHostnamesAPI.UnnamedSchemaRef9a9935a9a770967bb604ae41a81e42e1; + message?: string; + } + /** + * Certificate's required validation record. + */ + export interface ValidationRecord { /** - * The time the custom certificate was uploaded. + * The set of email addresses that the certificate authority (CA) will use to + * complete domain validation. */ - uploaded_on?: string; + emails?: Array; /** - * Domain validation errors that have been received by the certificate authority - * (CA). + * The content that the certificate authority (CA) will expect to find at the + * http_url during the domain validation. */ - validation_errors?: Array; - - validation_records?: Array; + http_body?: string; /** - * Indicates whether the certificate covers a wildcard. + * The url that will be checked during domain validation. */ - wildcard?: boolean; - } + http_url?: string; - export namespace SSL { /** - * SSL specific settings. + * The hostname that the certificate authority (CA) will check for a TXT record + * during domain validation . */ - export interface Settings { - /** - * An allowlist of ciphers for TLS termination. These ciphers must be in the - * BoringSSL format. - */ - ciphers?: Array; - - /** - * Whether or not Early Hints is enabled. - */ - early_hints?: 'on' | 'off'; - - /** - * Whether or not HTTP2 is enabled. - */ - http2?: 'on' | 'off'; - - /** - * The minimum TLS version supported. - */ - min_tls_version?: '1.0' | '1.1' | '1.2' | '1.3'; - - /** - * Whether or not TLS 1.3 is enabled. - */ - tls_1_3?: 'on' | 'off'; - } - - export interface ValidationError { - /** - * A domain validation error. - */ - message?: string; - } + txt_name?: string; /** - * Certificate's required validation record. + * The TXT record that the certificate authority (CA) will check during domain + * validation. */ - export interface ValidationRecord { - /** - * The set of email addresses that the certificate authority (CA) will use to - * complete domain validation. - */ - emails?: Array; - - /** - * The content that the certificate authority (CA) will expect to find at the - * http_url during the domain validation. - */ - http_body?: string; - - /** - * The url that will be checked during domain validation. - */ - http_url?: string; - - /** - * The hostname that the certificate authority (CA) will check for a TXT record - * during domain validation . - */ - txt_name?: string; - - /** - * The TXT record that the certificate authority (CA) will check during domain - * validation. - */ - txt_value?: string; - } + txt_value?: string; } } @@ -349,7 +344,7 @@ export interface UnnamedSchemaRefD2a16d7ee1ad3a888dd5821c918d51fd { /** * SSL properties for the custom hostname. */ - ssl: UnnamedSchemaRefD2a16d7ee1ad3a888dd5821c918d51fd.SSL; + ssl: SSL; /** * This is the time the hostname was created. @@ -416,1114 +411,53 @@ export interface UnnamedSchemaRefD2a16d7ee1ad3a888dd5821c918d51fd { export namespace UnnamedSchemaRefD2a16d7ee1ad3a888dd5821c918d51fd { /** - * SSL properties for the custom hostname. + * These are per-hostname (customer) settings. */ - export interface SSL { - /** - * Custom hostname SSL identifier tag. - */ - id?: string; - - /** - * A ubiquitous bundle has the highest probability of being verified everywhere, - * even by clients using outdated or unusual trust stores. An optimal bundle uses - * the shortest chain and newest intermediates. And the force bundle verifies the - * chain, but does not otherwise modify it. - */ - bundle_method?: CustomHostnamesAPI.UnnamedSchemaRef16aca57bde2963201c7e6e895436c1c1; - - /** - * The Certificate Authority that will issue the certificate - */ - certificate_authority?: 'digicert' | 'google' | 'lets_encrypt'; - - /** - * If a custom uploaded certificate is used. - */ - custom_certificate?: string; - - /** - * The identifier for the Custom CSR that was used. - */ - custom_csr_id?: string; - - /** - * The key for a custom uploaded certificate. - */ - custom_key?: string; - - /** - * The time the custom certificate expires on. - */ - expires_on?: string; - - /** - * A list of Hostnames on a custom uploaded certificate. - */ - hosts?: Array; - - /** - * The issuer on a custom uploaded certificate. - */ - issuer?: string; - - /** - * Domain control validation (DCV) method used for this hostname. - */ - method?: CustomHostnamesAPI.UnnamedSchemaRef78adb375f06c6d462dd92b99e2ecf510; - - /** - * The serial number on a custom uploaded certificate. - */ - serial_number?: string; - - /** - * SSL specific settings. - */ - settings?: SSL.Settings; - - /** - * The signature on a custom uploaded certificate. - */ - signature?: string; - + export interface CustomMetadata { /** - * Status of the hostname's SSL certificates. + * Unique metadata for this hostname. */ - status?: - | 'initializing' - | 'pending_validation' - | 'deleted' - | 'pending_issuance' - | 'pending_deployment' - | 'pending_deletion' - | 'pending_expiration' - | 'expired' - | 'active' - | 'initializing_timed_out' - | 'validation_timed_out' - | 'issuance_timed_out' - | 'deployment_timed_out' - | 'deletion_timed_out' - | 'pending_cleanup' - | 'staging_deployment' - | 'staging_active' - | 'deactivating' - | 'inactive' - | 'backup_issued' - | 'holding_deployment'; + key?: string; + } + /** + * This is a record which can be placed to activate a hostname. + */ + export interface OwnershipVerification { /** - * Level of validation to be used for this hostname. Domain validation (dv) must be - * used. + * DNS Name for record. */ - type?: CustomHostnamesAPI.UnnamedSchemaRef9a9935a9a770967bb604ae41a81e42e1; + name?: string; /** - * The time the custom certificate was uploaded. + * DNS Record type. */ - uploaded_on?: string; + type?: 'txt'; /** - * Domain validation errors that have been received by the certificate authority - * (CA). + * Content for the record. */ - validation_errors?: Array; - - validation_records?: Array; + value?: string; + } + /** + * This presents the token to be served by the given http url to activate a + * hostname. + */ + export interface OwnershipVerificationHTTP { /** - * Indicates whether the certificate covers a wildcard. + * Token to be served. */ - wildcard?: boolean; - } + http_body?: string; - export namespace SSL { /** - * SSL specific settings. - */ - export interface Settings { - /** - * An allowlist of ciphers for TLS termination. These ciphers must be in the - * BoringSSL format. - */ - ciphers?: Array; - - /** - * Whether or not Early Hints is enabled. - */ - early_hints?: 'on' | 'off'; - - /** - * Whether or not HTTP2 is enabled. - */ - http2?: 'on' | 'off'; - - /** - * The minimum TLS version supported. - */ - min_tls_version?: '1.0' | '1.1' | '1.2' | '1.3'; - - /** - * Whether or not TLS 1.3 is enabled. - */ - tls_1_3?: 'on' | 'off'; - } - - export interface ValidationError { - /** - * A domain validation error. - */ - message?: string; - } - - /** - * Certificate's required validation record. - */ - export interface ValidationRecord { - /** - * The set of email addresses that the certificate authority (CA) will use to - * complete domain validation. - */ - emails?: Array; - - /** - * The content that the certificate authority (CA) will expect to find at the - * http_url during the domain validation. - */ - http_body?: string; - - /** - * The url that will be checked during domain validation. - */ - http_url?: string; - - /** - * The hostname that the certificate authority (CA) will check for a TXT record - * during domain validation . - */ - txt_name?: string; - - /** - * The TXT record that the certificate authority (CA) will check during domain - * validation. - */ - txt_value?: string; - } - } - - /** - * These are per-hostname (customer) settings. - */ - export interface CustomMetadata { - /** - * Unique metadata for this hostname. - */ - key?: string; - } - - /** - * This is a record which can be placed to activate a hostname. - */ - export interface OwnershipVerification { - /** - * DNS Name for record. - */ - name?: string; - - /** - * DNS Record type. - */ - type?: 'txt'; - - /** - * Content for the record. - */ - value?: string; - } - - /** - * This presents the token to be served by the given http url to activate a - * hostname. - */ - export interface OwnershipVerificationHTTP { - /** - * Token to be served. - */ - http_body?: string; - - /** - * The HTTP URL that will be checked during custom hostname verification and where - * the customer should host the token. + * The HTTP URL that will be checked during custom hostname verification and where + * the customer should host the token. */ http_url?: string; } } -export interface CustomHostnameCreateResponse { - /** - * Identifier - */ - id: string; - - /** - * The custom hostname that will point to your hostname via CNAME. - */ - hostname: string; - - /** - * SSL properties for the custom hostname. - */ - ssl: CustomHostnameCreateResponse.SSL; -} - -export namespace CustomHostnameCreateResponse { - /** - * SSL properties for the custom hostname. - */ - export interface SSL { - /** - * Custom hostname SSL identifier tag. - */ - id?: string; - - /** - * A ubiquitous bundle has the highest probability of being verified everywhere, - * even by clients using outdated or unusual trust stores. An optimal bundle uses - * the shortest chain and newest intermediates. And the force bundle verifies the - * chain, but does not otherwise modify it. - */ - bundle_method?: CustomHostnamesAPI.UnnamedSchemaRef16aca57bde2963201c7e6e895436c1c1; - - /** - * The Certificate Authority that will issue the certificate - */ - certificate_authority?: 'digicert' | 'google' | 'lets_encrypt'; - - /** - * If a custom uploaded certificate is used. - */ - custom_certificate?: string; - - /** - * The identifier for the Custom CSR that was used. - */ - custom_csr_id?: string; - - /** - * The key for a custom uploaded certificate. - */ - custom_key?: string; - - /** - * The time the custom certificate expires on. - */ - expires_on?: string; - - /** - * A list of Hostnames on a custom uploaded certificate. - */ - hosts?: Array; - - /** - * The issuer on a custom uploaded certificate. - */ - issuer?: string; - - /** - * Domain control validation (DCV) method used for this hostname. - */ - method?: CustomHostnamesAPI.UnnamedSchemaRef78adb375f06c6d462dd92b99e2ecf510; - - /** - * The serial number on a custom uploaded certificate. - */ - serial_number?: string; - - /** - * SSL specific settings. - */ - settings?: SSL.Settings; - - /** - * The signature on a custom uploaded certificate. - */ - signature?: string; - - /** - * Status of the hostname's SSL certificates. - */ - status?: - | 'initializing' - | 'pending_validation' - | 'deleted' - | 'pending_issuance' - | 'pending_deployment' - | 'pending_deletion' - | 'pending_expiration' - | 'expired' - | 'active' - | 'initializing_timed_out' - | 'validation_timed_out' - | 'issuance_timed_out' - | 'deployment_timed_out' - | 'deletion_timed_out' - | 'pending_cleanup' - | 'staging_deployment' - | 'staging_active' - | 'deactivating' - | 'inactive' - | 'backup_issued' - | 'holding_deployment'; - - /** - * Level of validation to be used for this hostname. Domain validation (dv) must be - * used. - */ - type?: CustomHostnamesAPI.UnnamedSchemaRef9a9935a9a770967bb604ae41a81e42e1; - - /** - * The time the custom certificate was uploaded. - */ - uploaded_on?: string; - - /** - * Domain validation errors that have been received by the certificate authority - * (CA). - */ - validation_errors?: Array; - - validation_records?: Array; - - /** - * Indicates whether the certificate covers a wildcard. - */ - wildcard?: boolean; - } - - export namespace SSL { - /** - * SSL specific settings. - */ - export interface Settings { - /** - * An allowlist of ciphers for TLS termination. These ciphers must be in the - * BoringSSL format. - */ - ciphers?: Array; - - /** - * Whether or not Early Hints is enabled. - */ - early_hints?: 'on' | 'off'; - - /** - * Whether or not HTTP2 is enabled. - */ - http2?: 'on' | 'off'; - - /** - * The minimum TLS version supported. - */ - min_tls_version?: '1.0' | '1.1' | '1.2' | '1.3'; - - /** - * Whether or not TLS 1.3 is enabled. - */ - tls_1_3?: 'on' | 'off'; - } - - export interface ValidationError { - /** - * A domain validation error. - */ - message?: string; - } - - /** - * Certificate's required validation record. - */ - export interface ValidationRecord { - /** - * The set of email addresses that the certificate authority (CA) will use to - * complete domain validation. - */ - emails?: Array; - - /** - * The content that the certificate authority (CA) will expect to find at the - * http_url during the domain validation. - */ - http_body?: string; - - /** - * The url that will be checked during domain validation. - */ - http_url?: string; - - /** - * The hostname that the certificate authority (CA) will check for a TXT record - * during domain validation . - */ - txt_name?: string; - - /** - * The TXT record that the certificate authority (CA) will check during domain - * validation. - */ - txt_value?: string; - } - } -} - -export interface CustomHostnameListResponse { - /** - * Identifier - */ - id: string; - - /** - * The custom hostname that will point to your hostname via CNAME. - */ - hostname: string; - - /** - * SSL properties for the custom hostname. - */ - ssl: CustomHostnameListResponse.SSL; -} - -export namespace CustomHostnameListResponse { - /** - * SSL properties for the custom hostname. - */ - export interface SSL { - /** - * Custom hostname SSL identifier tag. - */ - id?: string; - - /** - * A ubiquitous bundle has the highest probability of being verified everywhere, - * even by clients using outdated or unusual trust stores. An optimal bundle uses - * the shortest chain and newest intermediates. And the force bundle verifies the - * chain, but does not otherwise modify it. - */ - bundle_method?: CustomHostnamesAPI.UnnamedSchemaRef16aca57bde2963201c7e6e895436c1c1; - - /** - * The Certificate Authority that will issue the certificate - */ - certificate_authority?: 'digicert' | 'google' | 'lets_encrypt'; - - /** - * If a custom uploaded certificate is used. - */ - custom_certificate?: string; - - /** - * The identifier for the Custom CSR that was used. - */ - custom_csr_id?: string; - - /** - * The key for a custom uploaded certificate. - */ - custom_key?: string; - - /** - * The time the custom certificate expires on. - */ - expires_on?: string; - - /** - * A list of Hostnames on a custom uploaded certificate. - */ - hosts?: Array; - - /** - * The issuer on a custom uploaded certificate. - */ - issuer?: string; - - /** - * Domain control validation (DCV) method used for this hostname. - */ - method?: CustomHostnamesAPI.UnnamedSchemaRef78adb375f06c6d462dd92b99e2ecf510; - - /** - * The serial number on a custom uploaded certificate. - */ - serial_number?: string; - - /** - * SSL specific settings. - */ - settings?: SSL.Settings; - - /** - * The signature on a custom uploaded certificate. - */ - signature?: string; - - /** - * Status of the hostname's SSL certificates. - */ - status?: - | 'initializing' - | 'pending_validation' - | 'deleted' - | 'pending_issuance' - | 'pending_deployment' - | 'pending_deletion' - | 'pending_expiration' - | 'expired' - | 'active' - | 'initializing_timed_out' - | 'validation_timed_out' - | 'issuance_timed_out' - | 'deployment_timed_out' - | 'deletion_timed_out' - | 'pending_cleanup' - | 'staging_deployment' - | 'staging_active' - | 'deactivating' - | 'inactive' - | 'backup_issued' - | 'holding_deployment'; - - /** - * Level of validation to be used for this hostname. Domain validation (dv) must be - * used. - */ - type?: CustomHostnamesAPI.UnnamedSchemaRef9a9935a9a770967bb604ae41a81e42e1; - - /** - * The time the custom certificate was uploaded. - */ - uploaded_on?: string; - - /** - * Domain validation errors that have been received by the certificate authority - * (CA). - */ - validation_errors?: Array; - - validation_records?: Array; - - /** - * Indicates whether the certificate covers a wildcard. - */ - wildcard?: boolean; - } - - export namespace SSL { - /** - * SSL specific settings. - */ - export interface Settings { - /** - * An allowlist of ciphers for TLS termination. These ciphers must be in the - * BoringSSL format. - */ - ciphers?: Array; - - /** - * Whether or not Early Hints is enabled. - */ - early_hints?: 'on' | 'off'; - - /** - * Whether or not HTTP2 is enabled. - */ - http2?: 'on' | 'off'; - - /** - * The minimum TLS version supported. - */ - min_tls_version?: '1.0' | '1.1' | '1.2' | '1.3'; - - /** - * Whether or not TLS 1.3 is enabled. - */ - tls_1_3?: 'on' | 'off'; - } - - export interface ValidationError { - /** - * A domain validation error. - */ - message?: string; - } - - /** - * Certificate's required validation record. - */ - export interface ValidationRecord { - /** - * The set of email addresses that the certificate authority (CA) will use to - * complete domain validation. - */ - emails?: Array; - - /** - * The content that the certificate authority (CA) will expect to find at the - * http_url during the domain validation. - */ - http_body?: string; - - /** - * The url that will be checked during domain validation. - */ - http_url?: string; - - /** - * The hostname that the certificate authority (CA) will check for a TXT record - * during domain validation . - */ - txt_name?: string; - - /** - * The TXT record that the certificate authority (CA) will check during domain - * validation. - */ - txt_value?: string; - } - } -} - -export interface CustomHostnameEditResponse { - /** - * Identifier - */ - id: string; - - /** - * The custom hostname that will point to your hostname via CNAME. - */ - hostname: string; - - /** - * SSL properties for the custom hostname. - */ - ssl: CustomHostnameEditResponse.SSL; -} - -export namespace CustomHostnameEditResponse { - /** - * SSL properties for the custom hostname. - */ - export interface SSL { - /** - * Custom hostname SSL identifier tag. - */ - id?: string; - - /** - * A ubiquitous bundle has the highest probability of being verified everywhere, - * even by clients using outdated or unusual trust stores. An optimal bundle uses - * the shortest chain and newest intermediates. And the force bundle verifies the - * chain, but does not otherwise modify it. - */ - bundle_method?: CustomHostnamesAPI.UnnamedSchemaRef16aca57bde2963201c7e6e895436c1c1; - - /** - * The Certificate Authority that will issue the certificate - */ - certificate_authority?: 'digicert' | 'google' | 'lets_encrypt'; - - /** - * If a custom uploaded certificate is used. - */ - custom_certificate?: string; - - /** - * The identifier for the Custom CSR that was used. - */ - custom_csr_id?: string; - - /** - * The key for a custom uploaded certificate. - */ - custom_key?: string; - - /** - * The time the custom certificate expires on. - */ - expires_on?: string; - - /** - * A list of Hostnames on a custom uploaded certificate. - */ - hosts?: Array; - - /** - * The issuer on a custom uploaded certificate. - */ - issuer?: string; - - /** - * Domain control validation (DCV) method used for this hostname. - */ - method?: CustomHostnamesAPI.UnnamedSchemaRef78adb375f06c6d462dd92b99e2ecf510; - - /** - * The serial number on a custom uploaded certificate. - */ - serial_number?: string; - - /** - * SSL specific settings. - */ - settings?: SSL.Settings; - - /** - * The signature on a custom uploaded certificate. - */ - signature?: string; - - /** - * Status of the hostname's SSL certificates. - */ - status?: - | 'initializing' - | 'pending_validation' - | 'deleted' - | 'pending_issuance' - | 'pending_deployment' - | 'pending_deletion' - | 'pending_expiration' - | 'expired' - | 'active' - | 'initializing_timed_out' - | 'validation_timed_out' - | 'issuance_timed_out' - | 'deployment_timed_out' - | 'deletion_timed_out' - | 'pending_cleanup' - | 'staging_deployment' - | 'staging_active' - | 'deactivating' - | 'inactive' - | 'backup_issued' - | 'holding_deployment'; - - /** - * Level of validation to be used for this hostname. Domain validation (dv) must be - * used. - */ - type?: CustomHostnamesAPI.UnnamedSchemaRef9a9935a9a770967bb604ae41a81e42e1; - - /** - * The time the custom certificate was uploaded. - */ - uploaded_on?: string; - - /** - * Domain validation errors that have been received by the certificate authority - * (CA). - */ - validation_errors?: Array; - - validation_records?: Array; - - /** - * Indicates whether the certificate covers a wildcard. - */ - wildcard?: boolean; - } - - export namespace SSL { - /** - * SSL specific settings. - */ - export interface Settings { - /** - * An allowlist of ciphers for TLS termination. These ciphers must be in the - * BoringSSL format. - */ - ciphers?: Array; - - /** - * Whether or not Early Hints is enabled. - */ - early_hints?: 'on' | 'off'; - - /** - * Whether or not HTTP2 is enabled. - */ - http2?: 'on' | 'off'; - - /** - * The minimum TLS version supported. - */ - min_tls_version?: '1.0' | '1.1' | '1.2' | '1.3'; - - /** - * Whether or not TLS 1.3 is enabled. - */ - tls_1_3?: 'on' | 'off'; - } - - export interface ValidationError { - /** - * A domain validation error. - */ - message?: string; - } - - /** - * Certificate's required validation record. - */ - export interface ValidationRecord { - /** - * The set of email addresses that the certificate authority (CA) will use to - * complete domain validation. - */ - emails?: Array; - - /** - * The content that the certificate authority (CA) will expect to find at the - * http_url during the domain validation. - */ - http_body?: string; - - /** - * The url that will be checked during domain validation. - */ - http_url?: string; - - /** - * The hostname that the certificate authority (CA) will check for a TXT record - * during domain validation . - */ - txt_name?: string; - - /** - * The TXT record that the certificate authority (CA) will check during domain - * validation. - */ - txt_value?: string; - } - } -} - -export interface CustomHostnameGetResponse { - /** - * Identifier - */ - id: string; - - /** - * The custom hostname that will point to your hostname via CNAME. - */ - hostname: string; - - /** - * SSL properties for the custom hostname. - */ - ssl: CustomHostnameGetResponse.SSL; -} - -export namespace CustomHostnameGetResponse { - /** - * SSL properties for the custom hostname. - */ - export interface SSL { - /** - * Custom hostname SSL identifier tag. - */ - id?: string; - - /** - * A ubiquitous bundle has the highest probability of being verified everywhere, - * even by clients using outdated or unusual trust stores. An optimal bundle uses - * the shortest chain and newest intermediates. And the force bundle verifies the - * chain, but does not otherwise modify it. - */ - bundle_method?: CustomHostnamesAPI.UnnamedSchemaRef16aca57bde2963201c7e6e895436c1c1; - - /** - * The Certificate Authority that will issue the certificate - */ - certificate_authority?: 'digicert' | 'google' | 'lets_encrypt'; - - /** - * If a custom uploaded certificate is used. - */ - custom_certificate?: string; - - /** - * The identifier for the Custom CSR that was used. - */ - custom_csr_id?: string; - - /** - * The key for a custom uploaded certificate. - */ - custom_key?: string; - - /** - * The time the custom certificate expires on. - */ - expires_on?: string; - - /** - * A list of Hostnames on a custom uploaded certificate. - */ - hosts?: Array; - - /** - * The issuer on a custom uploaded certificate. - */ - issuer?: string; - - /** - * Domain control validation (DCV) method used for this hostname. - */ - method?: CustomHostnamesAPI.UnnamedSchemaRef78adb375f06c6d462dd92b99e2ecf510; - - /** - * The serial number on a custom uploaded certificate. - */ - serial_number?: string; - - /** - * SSL specific settings. - */ - settings?: SSL.Settings; - - /** - * The signature on a custom uploaded certificate. - */ - signature?: string; - - /** - * Status of the hostname's SSL certificates. - */ - status?: - | 'initializing' - | 'pending_validation' - | 'deleted' - | 'pending_issuance' - | 'pending_deployment' - | 'pending_deletion' - | 'pending_expiration' - | 'expired' - | 'active' - | 'initializing_timed_out' - | 'validation_timed_out' - | 'issuance_timed_out' - | 'deployment_timed_out' - | 'deletion_timed_out' - | 'pending_cleanup' - | 'staging_deployment' - | 'staging_active' - | 'deactivating' - | 'inactive' - | 'backup_issued' - | 'holding_deployment'; - - /** - * Level of validation to be used for this hostname. Domain validation (dv) must be - * used. - */ - type?: CustomHostnamesAPI.UnnamedSchemaRef9a9935a9a770967bb604ae41a81e42e1; - - /** - * The time the custom certificate was uploaded. - */ - uploaded_on?: string; - - /** - * Domain validation errors that have been received by the certificate authority - * (CA). - */ - validation_errors?: Array; - - validation_records?: Array; - - /** - * Indicates whether the certificate covers a wildcard. - */ - wildcard?: boolean; - } - - export namespace SSL { - /** - * SSL specific settings. - */ - export interface Settings { - /** - * An allowlist of ciphers for TLS termination. These ciphers must be in the - * BoringSSL format. - */ - ciphers?: Array; - - /** - * Whether or not Early Hints is enabled. - */ - early_hints?: 'on' | 'off'; - - /** - * Whether or not HTTP2 is enabled. - */ - http2?: 'on' | 'off'; - - /** - * The minimum TLS version supported. - */ - min_tls_version?: '1.0' | '1.1' | '1.2' | '1.3'; - - /** - * Whether or not TLS 1.3 is enabled. - */ - tls_1_3?: 'on' | 'off'; - } - - export interface ValidationError { - /** - * A domain validation error. - */ - message?: string; - } - - /** - * Certificate's required validation record. - */ - export interface ValidationRecord { - /** - * The set of email addresses that the certificate authority (CA) will use to - * complete domain validation. - */ - emails?: Array; - - /** - * The content that the certificate authority (CA) will expect to find at the - * http_url during the domain validation. - */ - http_body?: string; - - /** - * The url that will be checked during domain validation. - */ - http_url?: string; - - /** - * The hostname that the certificate authority (CA) will check for a TXT record - * during domain validation . - */ - txt_name?: string; - - /** - * The TXT record that the certificate authority (CA) will check during domain - * validation. - */ - txt_value?: string; - } - } -} - export interface CustomHostnameCreateParams { /** * Path param: Identifier @@ -1821,21 +755,6 @@ export interface CustomHostnameGetParams { } export namespace CustomHostnames { - export import CustomHostname = CustomHostnamesAPI.CustomHostname; - export import UnnamedSchemaRef16aca57bde2963201c7e6e895436c1c1 = CustomHostnamesAPI.UnnamedSchemaRef16aca57bde2963201c7e6e895436c1c1; - export import UnnamedSchemaRef78adb375f06c6d462dd92b99e2ecf510 = CustomHostnamesAPI.UnnamedSchemaRef78adb375f06c6d462dd92b99e2ecf510; - export import UnnamedSchemaRef9a9935a9a770967bb604ae41a81e42e1 = CustomHostnamesAPI.UnnamedSchemaRef9a9935a9a770967bb604ae41a81e42e1; - export import UnnamedSchemaRefD2a16d7ee1ad3a888dd5821c918d51fd = CustomHostnamesAPI.UnnamedSchemaRefD2a16d7ee1ad3a888dd5821c918d51fd; - export import CustomHostnameCreateResponse = CustomHostnamesAPI.CustomHostnameCreateResponse; - export import CustomHostnameListResponse = CustomHostnamesAPI.CustomHostnameListResponse; - export import CustomHostnameEditResponse = CustomHostnamesAPI.CustomHostnameEditResponse; - export import CustomHostnameGetResponse = CustomHostnamesAPI.CustomHostnameGetResponse; - export import CustomHostnameListResponsesV4PagePaginationArray = CustomHostnamesAPI.CustomHostnameListResponsesV4PagePaginationArray; - export import CustomHostnameCreateParams = CustomHostnamesAPI.CustomHostnameCreateParams; - export import CustomHostnameListParams = CustomHostnamesAPI.CustomHostnameListParams; - export import CustomHostnameDeleteParams = CustomHostnamesAPI.CustomHostnameDeleteParams; - export import CustomHostnameEditParams = CustomHostnamesAPI.CustomHostnameEditParams; - export import CustomHostnameGetParams = CustomHostnamesAPI.CustomHostnameGetParams; export import FallbackOrigin = FallbackOriginAPI.FallbackOrigin; export import FallbackOriginUpdateParams = FallbackOriginAPI.FallbackOriginUpdateParams; export import FallbackOriginDeleteParams = FallbackOriginAPI.FallbackOriginDeleteParams; diff --git a/src/resources/custom-hostnames/index.ts b/src/resources/custom-hostnames/index.ts index 09c65a15fb..3474323c2d 100644 --- a/src/resources/custom-hostnames/index.ts +++ b/src/resources/custom-hostnames/index.ts @@ -1,23 +1,6 @@ // File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. -export { - CustomHostname, - UnnamedSchemaRef16aca57bde2963201c7e6e895436c1c1, - UnnamedSchemaRef78adb375f06c6d462dd92b99e2ecf510, - UnnamedSchemaRef9a9935a9a770967bb604ae41a81e42e1, - UnnamedSchemaRefD2a16d7ee1ad3a888dd5821c918d51fd, - CustomHostnameCreateResponse, - CustomHostnameListResponse, - CustomHostnameEditResponse, - CustomHostnameGetResponse, - CustomHostnameCreateParams, - CustomHostnameListParams, - CustomHostnameDeleteParams, - CustomHostnameEditParams, - CustomHostnameGetParams, - CustomHostnameListResponsesV4PagePaginationArray, - CustomHostnames, -} from './custom-hostnames'; +export { CustomHostnames } from './custom-hostnames'; export { FallbackOriginUpdateParams, FallbackOriginDeleteParams, diff --git a/src/resources/custom-nameservers.ts b/src/resources/custom-nameservers.ts index 1911b8b033..276e5218a0 100644 --- a/src/resources/custom-nameservers.ts +++ b/src/resources/custom-nameservers.ts @@ -2,7 +2,6 @@ import * as Core from 'cloudflare/core'; import { APIResource } from 'cloudflare/resource'; -import * as CustomNameserversAPI from 'cloudflare/resources/custom-nameservers'; import * as Shared from 'cloudflare/resources/shared'; export class CustomNameservers extends APIResource { @@ -189,15 +188,3 @@ export interface CustomNameserverVerifyParams { */ body: unknown; } - -export namespace CustomNameservers { - export import CustomNameserver = CustomNameserversAPI.CustomNameserver; - export import CustomNameserverAvailabiltyResponse = CustomNameserversAPI.CustomNameserverAvailabiltyResponse; - export import CustomNameserverGetResponse = CustomNameserversAPI.CustomNameserverGetResponse; - export import CustomNameserverVerifyResponse = CustomNameserversAPI.CustomNameserverVerifyResponse; - export import CustomNameserverCreateParams = CustomNameserversAPI.CustomNameserverCreateParams; - export import CustomNameserverDeleteParams = CustomNameserversAPI.CustomNameserverDeleteParams; - export import CustomNameserverAvailabiltyParams = CustomNameserversAPI.CustomNameserverAvailabiltyParams; - export import CustomNameserverGetParams = CustomNameserversAPI.CustomNameserverGetParams; - export import CustomNameserverVerifyParams = CustomNameserversAPI.CustomNameserverVerifyParams; -} diff --git a/src/resources/d1/d1.ts b/src/resources/d1/d1.ts index 4403bee96e..bbcf64c32b 100644 --- a/src/resources/d1/d1.ts +++ b/src/resources/d1/d1.ts @@ -9,11 +9,12 @@ export class D1 extends APIResource { export namespace D1 { export import Database = DatabaseAPI.Database; - export import D1CreateDatabase = DatabaseAPI.D1CreateDatabase; - export import D1DatabaseDetails = DatabaseAPI.D1DatabaseDetails; - export import D1QueryResult = DatabaseAPI.D1QueryResult; + export import D1 = DatabaseAPI.D1; + export import QueryResult = DatabaseAPI.QueryResult; + export import DatabaseCreateResponse = DatabaseAPI.DatabaseCreateResponse; + export import DatabaseListResponse = DatabaseAPI.DatabaseListResponse; export import DatabaseQueryResponse = DatabaseAPI.DatabaseQueryResponse; - export import D1CreateDatabasesV4PagePaginationArray = DatabaseAPI.D1CreateDatabasesV4PagePaginationArray; + export import DatabaseListResponsesV4PagePaginationArray = DatabaseAPI.DatabaseListResponsesV4PagePaginationArray; export import DatabaseCreateParams = DatabaseAPI.DatabaseCreateParams; export import DatabaseListParams = DatabaseAPI.DatabaseListParams; export import DatabaseQueryParams = DatabaseAPI.DatabaseQueryParams; diff --git a/src/resources/d1/database.ts b/src/resources/d1/database.ts index b74215621c..74035dc0b1 100644 --- a/src/resources/d1/database.ts +++ b/src/resources/d1/database.ts @@ -10,11 +10,14 @@ export class Database extends APIResource { /** * Returns the created D1 database. */ - create(params: DatabaseCreateParams, options?: Core.RequestOptions): Core.APIPromise { + create( + params: DatabaseCreateParams, + options?: Core.RequestOptions, + ): Core.APIPromise { const { account_id, ...body } = params; return ( this._client.post(`/accounts/${account_id}/d1/database`, { body, ...options }) as Core.APIPromise<{ - result: D1CreateDatabase; + result: DatabaseCreateResponse; }> )._thenUnwrap((obj) => obj.result); } @@ -25,11 +28,11 @@ export class Database extends APIResource { list( params: DatabaseListParams, options?: Core.RequestOptions, - ): Core.PagePromise { + ): Core.PagePromise { const { account_id, ...query } = params; return this._client.getAPIList( `/accounts/${account_id}/d1/database`, - D1CreateDatabasesV4PagePaginationArray, + DatabaseListResponsesV4PagePaginationArray, { query, ...options }, ); } @@ -57,12 +60,12 @@ export class Database extends APIResource { accountIdentifier: string, databaseIdentifier: string, options?: Core.RequestOptions, - ): Core.APIPromise { + ): Core.APIPromise { return ( this._client.get( `/accounts/${accountIdentifier}/d1/database/${databaseIdentifier}`, options, - ) as Core.APIPromise<{ result: D1DatabaseDetails }> + ) as Core.APIPromise<{ result: D1 }> )._thenUnwrap((obj) => obj.result); } @@ -84,22 +87,9 @@ export class Database extends APIResource { } } -export class D1CreateDatabasesV4PagePaginationArray extends V4PagePaginationArray {} +export class DatabaseListResponsesV4PagePaginationArray extends V4PagePaginationArray {} -export interface D1CreateDatabase { - /** - * Specifies the timestamp the resource was created as an ISO8601 string. - */ - created_at?: string; - - name?: string; - - uuid?: string; - - version?: string; -} - -export interface D1DatabaseDetails { +export interface D1 { /** * Specifies the timestamp the resource was created as an ISO8601 string. */ @@ -119,15 +109,15 @@ export interface D1DatabaseDetails { version?: string; } -export interface D1QueryResult { - meta?: D1QueryResult.Meta; +export interface QueryResult { + meta?: QueryResult.Meta; results?: Array; success?: boolean; } -export namespace D1QueryResult { +export namespace QueryResult { export interface Meta { changed_db?: boolean; @@ -145,7 +135,33 @@ export namespace D1QueryResult { } } -export type DatabaseQueryResponse = Array; +export interface DatabaseCreateResponse { + /** + * Specifies the timestamp the resource was created as an ISO8601 string. + */ + created_at?: string; + + name?: string; + + uuid?: string; + + version?: string; +} + +export interface DatabaseListResponse { + /** + * Specifies the timestamp the resource was created as an ISO8601 string. + */ + created_at?: string; + + name?: string; + + uuid?: string; + + version?: string; +} + +export type DatabaseQueryResponse = Array; export interface DatabaseCreateParams { /** @@ -178,11 +194,12 @@ export interface DatabaseQueryParams { } export namespace Database { - export import D1CreateDatabase = DatabaseAPI.D1CreateDatabase; - export import D1DatabaseDetails = DatabaseAPI.D1DatabaseDetails; - export import D1QueryResult = DatabaseAPI.D1QueryResult; + export import D1 = DatabaseAPI.D1; + export import QueryResult = DatabaseAPI.QueryResult; + export import DatabaseCreateResponse = DatabaseAPI.DatabaseCreateResponse; + export import DatabaseListResponse = DatabaseAPI.DatabaseListResponse; export import DatabaseQueryResponse = DatabaseAPI.DatabaseQueryResponse; - export import D1CreateDatabasesV4PagePaginationArray = DatabaseAPI.D1CreateDatabasesV4PagePaginationArray; + export import DatabaseListResponsesV4PagePaginationArray = DatabaseAPI.DatabaseListResponsesV4PagePaginationArray; export import DatabaseCreateParams = DatabaseAPI.DatabaseCreateParams; export import DatabaseListParams = DatabaseAPI.DatabaseListParams; export import DatabaseQueryParams = DatabaseAPI.DatabaseQueryParams; diff --git a/src/resources/d1/index.ts b/src/resources/d1/index.ts index ddb196f31b..ff62895684 100644 --- a/src/resources/d1/index.ts +++ b/src/resources/d1/index.ts @@ -2,13 +2,14 @@ export { D1 } from './d1'; export { - D1CreateDatabase, - D1DatabaseDetails, - D1QueryResult, + D1, + QueryResult, + DatabaseCreateResponse, + DatabaseListResponse, DatabaseQueryResponse, DatabaseCreateParams, DatabaseListParams, DatabaseQueryParams, - D1CreateDatabasesV4PagePaginationArray, + DatabaseListResponsesV4PagePaginationArray, Database, } from './database'; diff --git a/src/resources/diagnostics/diagnostics.ts b/src/resources/diagnostics/diagnostics.ts index b7e2fb4943..3dc217bf32 100644 --- a/src/resources/diagnostics/diagnostics.ts +++ b/src/resources/diagnostics/diagnostics.ts @@ -9,7 +9,7 @@ export class Diagnostics extends APIResource { export namespace Diagnostics { export import Traceroutes = TraceroutesAPI.Traceroutes; - export import MagicTransitTargetResult = TraceroutesAPI.MagicTransitTargetResult; + export import Traceroute = TraceroutesAPI.Traceroute; export import TracerouteCreateResponse = TraceroutesAPI.TracerouteCreateResponse; export import TracerouteCreateParams = TraceroutesAPI.TracerouteCreateParams; } diff --git a/src/resources/diagnostics/index.ts b/src/resources/diagnostics/index.ts index 51ea391a75..bf7990e06e 100644 --- a/src/resources/diagnostics/index.ts +++ b/src/resources/diagnostics/index.ts @@ -1,9 +1,4 @@ // File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. export { Diagnostics } from './diagnostics'; -export { - MagicTransitTargetResult, - TracerouteCreateResponse, - TracerouteCreateParams, - Traceroutes, -} from './traceroutes'; +export { Traceroute, TracerouteCreateResponse, TracerouteCreateParams, Traceroutes } from './traceroutes'; diff --git a/src/resources/diagnostics/traceroutes.ts b/src/resources/diagnostics/traceroutes.ts index f1e2192f63..9d7d86e167 100644 --- a/src/resources/diagnostics/traceroutes.ts +++ b/src/resources/diagnostics/traceroutes.ts @@ -22,8 +22,8 @@ export class Traceroutes extends APIResource { } } -export interface MagicTransitTargetResult { - colos?: Array; +export interface Traceroute { + colos?: Array; /** * The target hostname, IPv6, or IPv6 address. @@ -31,7 +31,7 @@ export interface MagicTransitTargetResult { target?: string; } -export namespace MagicTransitTargetResult { +export namespace Traceroute { export interface Colo { colo?: Colo.Colo; @@ -146,7 +146,7 @@ export namespace MagicTransitTargetResult { } } -export type TracerouteCreateResponse = Array; +export type TracerouteCreateResponse = Array; export interface TracerouteCreateParams { /** @@ -203,7 +203,7 @@ export namespace TracerouteCreateParams { } export namespace Traceroutes { - export import MagicTransitTargetResult = TraceroutesAPI.MagicTransitTargetResult; + export import Traceroute = TraceroutesAPI.Traceroute; export import TracerouteCreateResponse = TraceroutesAPI.TracerouteCreateResponse; export import TracerouteCreateParams = TraceroutesAPI.TracerouteCreateParams; } diff --git a/src/resources/dns/analytics/analytics.ts b/src/resources/dns/analytics/analytics.ts index 2382884e96..8b31d9e046 100644 --- a/src/resources/dns/analytics/analytics.ts +++ b/src/resources/dns/analytics/analytics.ts @@ -9,6 +9,6 @@ export class Analytics extends APIResource { export namespace Analytics { export import Reports = ReportsAPI.Reports; - export import DNSAnalyticsReport = ReportsAPI.DNSAnalyticsReport; + export import Report = ReportsAPI.Report; export import ReportGetParams = ReportsAPI.ReportGetParams; } diff --git a/src/resources/dns/analytics/index.ts b/src/resources/dns/analytics/index.ts index c2b197ba2a..cd8b9eb0a6 100644 --- a/src/resources/dns/analytics/index.ts +++ b/src/resources/dns/analytics/index.ts @@ -1,4 +1,4 @@ // File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. export { Analytics } from './analytics'; -export { DNSAnalyticsReport, ReportGetParams, Reports } from './reports/index'; +export { Report, ReportGetParams, Reports } from './reports/index'; diff --git a/src/resources/dns/analytics/reports/bytimes.ts b/src/resources/dns/analytics/reports/bytimes.ts index da7775cae0..e2a54cea62 100644 --- a/src/resources/dns/analytics/reports/bytimes.ts +++ b/src/resources/dns/analytics/reports/bytimes.ts @@ -13,22 +13,22 @@ export class Bytimes extends APIResource { * [Analytics API properties](https://developers.cloudflare.com/dns/reference/analytics-api-properties/) * for detailed information about the available query parameters. */ - get(params: BytimeGetParams, options?: Core.RequestOptions): Core.APIPromise { + get(params: BytimeGetParams, options?: Core.RequestOptions): Core.APIPromise { const { zone_id, ...query } = params; return ( this._client.get(`/zones/${zone_id}/dns_analytics/report/bytime`, { query, ...options, - }) as Core.APIPromise<{ result: DNSAnalyticsReportByTime }> + }) as Core.APIPromise<{ result: ByTime }> )._thenUnwrap((obj) => obj.result); } } -export interface DNSAnalyticsReportByTime { +export interface ByTime { /** * Array with one row per combination of dimension values. */ - data: Array; + data: Array; /** * Number of seconds between current time and last processed event, in another @@ -68,7 +68,7 @@ export interface DNSAnalyticsReportByTime { totals: unknown; } -export namespace DNSAnalyticsReportByTime { +export namespace ByTime { export interface Data { /** * Array of dimension values, representing the combination of dimension values @@ -143,6 +143,6 @@ export interface BytimeGetParams { } export namespace Bytimes { - export import DNSAnalyticsReportByTime = BytimesAPI.DNSAnalyticsReportByTime; + export import ByTime = BytimesAPI.ByTime; export import BytimeGetParams = BytimesAPI.BytimeGetParams; } diff --git a/src/resources/dns/analytics/reports/index.ts b/src/resources/dns/analytics/reports/index.ts index 6066e1525d..7aedfa2ea9 100644 --- a/src/resources/dns/analytics/reports/index.ts +++ b/src/resources/dns/analytics/reports/index.ts @@ -1,4 +1,4 @@ // File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. -export { DNSAnalyticsReport, ReportGetParams, Reports } from './reports'; -export { DNSAnalyticsReportByTime, BytimeGetParams, Bytimes } from './bytimes'; +export { ByTime, BytimeGetParams, Bytimes } from './bytimes'; +export { Report, ReportGetParams, Reports } from './reports'; diff --git a/src/resources/dns/analytics/reports/reports.ts b/src/resources/dns/analytics/reports/reports.ts index 889960fdbe..d970ba17ce 100644 --- a/src/resources/dns/analytics/reports/reports.ts +++ b/src/resources/dns/analytics/reports/reports.ts @@ -16,17 +16,17 @@ export class Reports extends APIResource { * [Analytics API properties](https://developers.cloudflare.com/dns/reference/analytics-api-properties/) * for detailed information about the available query parameters. */ - get(params: ReportGetParams, options?: Core.RequestOptions): Core.APIPromise { + get(params: ReportGetParams, options?: Core.RequestOptions): Core.APIPromise { const { zone_id, ...query } = params; return ( this._client.get(`/zones/${zone_id}/dns_analytics/report`, { query, ...options }) as Core.APIPromise<{ - result: DNSAnalyticsReport; + result: Report; }> )._thenUnwrap((obj) => obj.result); } } -export interface DNSAnalyticsReport { +export interface Report { /** * Array with one row per combination of dimension values. */ @@ -50,7 +50,7 @@ export interface DNSAnalyticsReport { */ min: unknown; - query: DNSAnalyticsReport.Query; + query: Report.Query; /** * Total number of rows in the result. @@ -64,7 +64,7 @@ export interface DNSAnalyticsReport { totals: unknown; } -export namespace DNSAnalyticsReport { +export namespace Report { export interface Query { /** * Array of dimension names. @@ -148,9 +148,9 @@ export interface ReportGetParams { } export namespace Reports { - export import DNSAnalyticsReport = ReportsAPI.DNSAnalyticsReport; + export import Report = ReportsAPI.Report; export import ReportGetParams = ReportsAPI.ReportGetParams; export import Bytimes = BytimesAPI.Bytimes; - export import DNSAnalyticsReportByTime = BytimesAPI.DNSAnalyticsReportByTime; + export import ByTime = BytimesAPI.ByTime; export import BytimeGetParams = BytimesAPI.BytimeGetParams; } diff --git a/src/resources/dns/dns.ts b/src/resources/dns/dns.ts index b32f858885..25b1efdd13 100644 --- a/src/resources/dns/dns.ts +++ b/src/resources/dns/dns.ts @@ -1,7 +1,6 @@ // File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. import { APIResource } from 'cloudflare/resource'; -import * as DNSAPI from 'cloudflare/resources/dns/dns'; import * as RecordsAPI from 'cloudflare/resources/dns/records'; import * as AnalyticsAPI from 'cloudflare/resources/dns/analytics/analytics'; import * as FirewallAPI from 'cloudflare/resources/dns/firewall/firewall'; @@ -9,7 +8,7 @@ import * as FirewallAPI from 'cloudflare/resources/dns/firewall/firewall'; export class DNS extends APIResource { records: RecordsAPI.Records = new RecordsAPI.Records(this._client); analytics: AnalyticsAPI.Analytics = new AnalyticsAPI.Analytics(this._client); - firewall: FirewallAPI.Firewall = new FirewallAPI.Firewall(this._client); + firewall: FirewallAPI.FirewallResource = new FirewallAPI.FirewallResource(this._client); } export interface UnnamedSchemaRef6595695ff25b0614667b25f66b7bbaba { @@ -84,9 +83,6 @@ export interface UnnamedSchemaRef85b45d163202bbab7456da6b346d9fe2 { } export namespace DNS { - export import UnnamedSchemaRef6595695ff25b0614667b25f66b7bbaba = DNSAPI.UnnamedSchemaRef6595695ff25b0614667b25f66b7bbaba; - export import UnnamedSchemaRef65be9614de145bf4a58d0fddf46df7ca = DNSAPI.UnnamedSchemaRef65be9614de145bf4a58d0fddf46df7ca; - export import UnnamedSchemaRef85b45d163202bbab7456da6b346d9fe2 = DNSAPI.UnnamedSchemaRef85b45d163202bbab7456da6b346d9fe2; export import Records = RecordsAPI.Records; export import ARecord = RecordsAPI.ARecord; export import AAAARecord = RecordsAPI.AAAARecord; @@ -129,11 +125,14 @@ export namespace DNS { export import RecordImportParams = RecordsAPI.RecordImportParams; export import RecordScanParams = RecordsAPI.RecordScanParams; export import Analytics = AnalyticsAPI.Analytics; + export import FirewallResource = FirewallAPI.FirewallResource; + export import AttackMitigation = FirewallAPI.AttackMitigation; export import Firewall = FirewallAPI.Firewall; - export import DNSFirewall = FirewallAPI.DNSFirewall; + export import FirewallIPsItem = FirewallAPI.FirewallIPsItem; export import UnnamedSchemaRef7a0f93d9e1afc3221d2a57b7bab16955 = FirewallAPI.UnnamedSchemaRef7a0f93d9e1afc3221d2a57b7bab16955; + export import UpstreamIPsItems = FirewallAPI.UpstreamIPsItems; export import FirewallDeleteResponse = FirewallAPI.FirewallDeleteResponse; - export import DNSFirewallsV4PagePaginationArray = FirewallAPI.DNSFirewallsV4PagePaginationArray; + export import FirewallsV4PagePaginationArray = FirewallAPI.FirewallsV4PagePaginationArray; export import FirewallCreateParams = FirewallAPI.FirewallCreateParams; export import FirewallListParams = FirewallAPI.FirewallListParams; export import FirewallDeleteParams = FirewallAPI.FirewallDeleteParams; diff --git a/src/resources/dns/firewall/analytics/reports/bytimes.ts b/src/resources/dns/firewall/analytics/reports/bytimes.ts index 6e650b10ec..8e4fefe3bf 100644 --- a/src/resources/dns/firewall/analytics/reports/bytimes.ts +++ b/src/resources/dns/firewall/analytics/reports/bytimes.ts @@ -17,13 +17,13 @@ export class Bytimes extends APIResource { dnsFirewallId: string, params: BytimeGetParams, options?: Core.RequestOptions, - ): Core.APIPromise { + ): Core.APIPromise { const { account_id, ...query } = params; return ( this._client.get(`/accounts/${account_id}/dns_firewall/${dnsFirewallId}/dns_analytics/report/bytime`, { query, ...options, - }) as Core.APIPromise<{ result: BytimesAPI.DNSAnalyticsReportByTime }> + }) as Core.APIPromise<{ result: BytimesAPI.ByTime }> )._thenUnwrap((obj) => obj.result); } } diff --git a/src/resources/dns/firewall/analytics/reports/reports.ts b/src/resources/dns/firewall/analytics/reports/reports.ts index a714d8a4e4..818f34c268 100644 --- a/src/resources/dns/firewall/analytics/reports/reports.ts +++ b/src/resources/dns/firewall/analytics/reports/reports.ts @@ -20,13 +20,13 @@ export class Reports extends APIResource { dnsFirewallId: string, params: ReportGetParams, options?: Core.RequestOptions, - ): Core.APIPromise { + ): Core.APIPromise { const { account_id, ...query } = params; return ( this._client.get(`/accounts/${account_id}/dns_firewall/${dnsFirewallId}/dns_analytics/report`, { query, ...options, - }) as Core.APIPromise<{ result: ReportsAPI.DNSAnalyticsReport }> + }) as Core.APIPromise<{ result: ReportsAPI.Report }> )._thenUnwrap((obj) => obj.result); } } diff --git a/src/resources/dns/firewall/firewall.ts b/src/resources/dns/firewall/firewall.ts index 81e948b6a4..fef04f4174 100644 --- a/src/resources/dns/firewall/firewall.ts +++ b/src/resources/dns/firewall/firewall.ts @@ -6,17 +6,17 @@ import * as FirewallAPI from 'cloudflare/resources/dns/firewall/firewall'; import * as AnalyticsAPI from 'cloudflare/resources/dns/firewall/analytics/analytics'; import { V4PagePaginationArray, type V4PagePaginationArrayParams } from 'cloudflare/pagination'; -export class Firewall extends APIResource { +export class FirewallResource extends APIResource { analytics: AnalyticsAPI.Analytics = new AnalyticsAPI.Analytics(this._client); /** * Create a configured DNS Firewall Cluster. */ - create(params: FirewallCreateParams, options?: Core.RequestOptions): Core.APIPromise { + create(params: FirewallCreateParams, options?: Core.RequestOptions): Core.APIPromise { const { account_id, ...body } = params; return ( this._client.post(`/accounts/${account_id}/dns_firewall`, { body, ...options }) as Core.APIPromise<{ - result: DNSFirewall; + result: Firewall; }> )._thenUnwrap((obj) => obj.result); } @@ -27,13 +27,12 @@ export class Firewall extends APIResource { list( params: FirewallListParams, options?: Core.RequestOptions, - ): Core.PagePromise { + ): Core.PagePromise { const { account_id, ...query } = params; - return this._client.getAPIList( - `/accounts/${account_id}/dns_firewall`, - DNSFirewallsV4PagePaginationArray, - { query, ...options }, - ); + return this._client.getAPIList(`/accounts/${account_id}/dns_firewall`, FirewallsV4PagePaginationArray, { + query, + ...options, + }); } /** @@ -60,13 +59,13 @@ export class Firewall extends APIResource { dnsFirewallId: string, params: FirewallEditParams, options?: Core.RequestOptions, - ): Core.APIPromise { + ): Core.APIPromise { const { account_id, ...body } = params; return ( this._client.patch(`/accounts/${account_id}/dns_firewall/${dnsFirewallId}`, { body, ...options, - }) as Core.APIPromise<{ result: DNSFirewall }> + }) as Core.APIPromise<{ result: Firewall }> )._thenUnwrap((obj) => obj.result); } @@ -77,19 +76,35 @@ export class Firewall extends APIResource { dnsFirewallId: string, params: FirewallGetParams, options?: Core.RequestOptions, - ): Core.APIPromise { + ): Core.APIPromise { const { account_id } = params; return ( this._client.get(`/accounts/${account_id}/dns_firewall/${dnsFirewallId}`, options) as Core.APIPromise<{ - result: DNSFirewall; + result: Firewall; }> )._thenUnwrap((obj) => obj.result); } } -export class DNSFirewallsV4PagePaginationArray extends V4PagePaginationArray {} +export class FirewallsV4PagePaginationArray extends V4PagePaginationArray {} -export interface DNSFirewall { +/** + * Attack mitigation settings. + */ +export interface AttackMitigation { + /** + * When enabled, random-prefix attacks are automatically mitigated and the upstream + * DNS servers protected. + */ + enabled?: boolean; + + /** + * Only mitigate attacks when upstream servers seem unhealthy. + */ + only_when_upstream_unhealthy?: boolean; +} + +export interface Firewall { /** * Identifier */ @@ -100,7 +115,7 @@ export interface DNSFirewall { */ deprecate_any_requests: boolean; - dns_firewall_ips: Array; + dns_firewall_ips: Array; /** * Forward client IP (resolver) subnet if no EDNS Client Subnet is sent. @@ -127,12 +142,12 @@ export interface DNSFirewall { */ name: string; - upstream_ips: Array; + upstream_ips: Array; /** * Attack mitigation settings. */ - attack_mitigation?: DNSFirewall.AttackMitigation | null; + attack_mitigation?: AttackMitigation | null; /** * Negative DNS Cache TTL. @@ -152,23 +167,10 @@ export interface DNSFirewall { retries?: number; } -export namespace DNSFirewall { - /** - * Attack mitigation settings. - */ - export interface AttackMitigation { - /** - * When enabled, random-prefix attacks are automatically mitigated and the upstream - * DNS servers protected. - */ - enabled?: boolean; - - /** - * Only mitigate attacks when upstream servers seem unhealthy. - */ - only_when_upstream_unhealthy?: boolean; - } -} +/** + * Cloudflare-assigned DNS IPv4 Address. + */ +export type FirewallIPsItem = string | string; export interface UnnamedSchemaRef7a0f93d9e1afc3221d2a57b7bab16955 { /** @@ -181,7 +183,7 @@ export interface UnnamedSchemaRef7a0f93d9e1afc3221d2a57b7bab16955 { */ deprecate_any_requests: boolean; - dns_firewall_ips: Array; + dns_firewall_ips: Array; /** * Forward client IP (resolver) subnet if no EDNS Client Subnet is sent. @@ -208,12 +210,12 @@ export interface UnnamedSchemaRef7a0f93d9e1afc3221d2a57b7bab16955 { */ name: string; - upstream_ips: Array; + upstream_ips: Array; /** * Attack mitigation settings. */ - attack_mitigation?: UnnamedSchemaRef7a0f93d9e1afc3221d2a57b7bab16955.AttackMitigation | null; + attack_mitigation?: AttackMitigation | null; /** * Negative DNS Cache TTL. @@ -233,23 +235,10 @@ export interface UnnamedSchemaRef7a0f93d9e1afc3221d2a57b7bab16955 { retries?: number; } -export namespace UnnamedSchemaRef7a0f93d9e1afc3221d2a57b7bab16955 { - /** - * Attack mitigation settings. - */ - export interface AttackMitigation { - /** - * When enabled, random-prefix attacks are automatically mitigated and the upstream - * DNS servers protected. - */ - enabled?: boolean; - - /** - * Only mitigate attacks when upstream servers seem unhealthy. - */ - only_when_upstream_unhealthy?: boolean; - } -} +/** + * Upstream DNS Server IPv4 Address. + */ +export type UpstreamIPsItems = string | string; export interface FirewallDeleteResponse { /** @@ -272,12 +261,12 @@ export interface FirewallCreateParams { /** * Body param: */ - upstream_ips: Array; + upstream_ips: Array; /** * Body param: Attack mitigation settings. */ - attack_mitigation?: FirewallCreateParams.AttackMitigation | null; + attack_mitigation?: AttackMitigation | null; /** * Body param: Deprecate the response to ANY requests. @@ -318,24 +307,6 @@ export interface FirewallCreateParams { retries?: number; } -export namespace FirewallCreateParams { - /** - * Attack mitigation settings. - */ - export interface AttackMitigation { - /** - * When enabled, random-prefix attacks are automatically mitigated and the upstream - * DNS servers protected. - */ - enabled?: boolean; - - /** - * Only mitigate attacks when upstream servers seem unhealthy. - */ - only_when_upstream_unhealthy?: boolean; - } -} - export interface FirewallListParams extends V4PagePaginationArrayParams { /** * Path param: Identifier @@ -369,7 +340,7 @@ export interface FirewallEditParams { /** * Body param: */ - dns_firewall_ips: Array; + dns_firewall_ips: Array; /** * Body param: Forward client IP (resolver) subnet if no EDNS Client Subnet is @@ -395,12 +366,12 @@ export interface FirewallEditParams { /** * Body param: */ - upstream_ips: Array; + upstream_ips: Array; /** * Body param: Attack mitigation settings. */ - attack_mitigation?: FirewallEditParams.AttackMitigation | null; + attack_mitigation?: AttackMitigation | null; /** * Body param: Negative DNS Cache TTL. @@ -420,24 +391,6 @@ export interface FirewallEditParams { retries?: number; } -export namespace FirewallEditParams { - /** - * Attack mitigation settings. - */ - export interface AttackMitigation { - /** - * When enabled, random-prefix attacks are automatically mitigated and the upstream - * DNS servers protected. - */ - enabled?: boolean; - - /** - * Only mitigate attacks when upstream servers seem unhealthy. - */ - only_when_upstream_unhealthy?: boolean; - } -} - export interface FirewallGetParams { /** * Identifier @@ -445,11 +398,14 @@ export interface FirewallGetParams { account_id: string; } -export namespace Firewall { - export import DNSFirewall = FirewallAPI.DNSFirewall; +export namespace FirewallResource { + export import AttackMitigation = FirewallAPI.AttackMitigation; + export import Firewall = FirewallAPI.Firewall; + export import FirewallIPsItem = FirewallAPI.FirewallIPsItem; export import UnnamedSchemaRef7a0f93d9e1afc3221d2a57b7bab16955 = FirewallAPI.UnnamedSchemaRef7a0f93d9e1afc3221d2a57b7bab16955; + export import UpstreamIPsItems = FirewallAPI.UpstreamIPsItems; export import FirewallDeleteResponse = FirewallAPI.FirewallDeleteResponse; - export import DNSFirewallsV4PagePaginationArray = FirewallAPI.DNSFirewallsV4PagePaginationArray; + export import FirewallsV4PagePaginationArray = FirewallAPI.FirewallsV4PagePaginationArray; export import FirewallCreateParams = FirewallAPI.FirewallCreateParams; export import FirewallListParams = FirewallAPI.FirewallListParams; export import FirewallDeleteParams = FirewallAPI.FirewallDeleteParams; diff --git a/src/resources/dns/firewall/index.ts b/src/resources/dns/firewall/index.ts index 8074d5bc9d..a94d0ddb2f 100644 --- a/src/resources/dns/firewall/index.ts +++ b/src/resources/dns/firewall/index.ts @@ -2,14 +2,17 @@ export { Analytics } from './analytics/index'; export { - DNSFirewall, + AttackMitigation, + Firewall, + FirewallIPsItem, UnnamedSchemaRef7a0f93d9e1afc3221d2a57b7bab16955, + UpstreamIPsItems, FirewallDeleteResponse, FirewallCreateParams, FirewallListParams, FirewallDeleteParams, FirewallEditParams, FirewallGetParams, - DNSFirewallsV4PagePaginationArray, - Firewall, + FirewallsV4PagePaginationArray, + FirewallResource, } from './firewall'; diff --git a/src/resources/dns/index.ts b/src/resources/dns/index.ts index e47b56714b..62cd5036f3 100644 --- a/src/resources/dns/index.ts +++ b/src/resources/dns/index.ts @@ -45,20 +45,18 @@ export { } from './records'; export { Analytics } from './analytics/index'; export { - DNSFirewall, + AttackMitigation, + Firewall, + FirewallIPsItem, UnnamedSchemaRef7a0f93d9e1afc3221d2a57b7bab16955, + UpstreamIPsItems, FirewallDeleteResponse, FirewallCreateParams, FirewallListParams, FirewallDeleteParams, FirewallEditParams, FirewallGetParams, - DNSFirewallsV4PagePaginationArray, - Firewall, + FirewallsV4PagePaginationArray, + FirewallResource, } from './firewall/index'; -export { - UnnamedSchemaRef6595695ff25b0614667b25f66b7bbaba, - UnnamedSchemaRef65be9614de145bf4a58d0fddf46df7ca, - UnnamedSchemaRef85b45d163202bbab7456da6b346d9fe2, - DNS, -} from './dns'; +export { DNS } from './dns'; diff --git a/src/resources/dns/records.ts b/src/resources/dns/records.ts index 06baeb5708..f15f632661 100644 --- a/src/resources/dns/records.ts +++ b/src/resources/dns/records.ts @@ -228,7 +228,7 @@ export interface ARecord { /** * Custom tags for the DNS record. This field has no effect on DNS responses. */ - tags?: Array; + tags?: Array; /** * Time To Live (TTL) of the DNS record in seconds. Setting to 1 means 'automatic'. @@ -310,7 +310,7 @@ export interface AAAARecord { /** * Custom tags for the DNS record. This field has no effect on DNS responses. */ - tags?: Array; + tags?: Array; /** * Time To Live (TTL) of the DNS record in seconds. Setting to 1 means 'automatic'. @@ -391,7 +391,7 @@ export interface CAARecord { /** * Custom tags for the DNS record. This field has no effect on DNS responses. */ - tags?: Array; + tags?: Array; /** * Time To Live (TTL) of the DNS record in seconds. Setting to 1 means 'automatic'. @@ -494,7 +494,7 @@ export interface CERTRecord { /** * Custom tags for the DNS record. This field has no effect on DNS responses. */ - tags?: Array; + tags?: Array; /** * Time To Live (TTL) of the DNS record in seconds. Setting to 1 means 'automatic'. @@ -603,7 +603,7 @@ export interface CNAMERecord { /** * Custom tags for the DNS record. This field has no effect on DNS responses. */ - tags?: Array; + tags?: Array; /** * Time To Live (TTL) of the DNS record in seconds. Setting to 1 means 'automatic'. @@ -684,7 +684,7 @@ export interface DNSKEYRecord { /** * Custom tags for the DNS record. This field has no effect on DNS responses. */ - tags?: Array; + tags?: Array; /** * Time To Live (TTL) of the DNS record in seconds. Setting to 1 means 'automatic'. @@ -792,7 +792,7 @@ export interface DSRecord { /** * Custom tags for the DNS record. This field has no effect on DNS responses. */ - tags?: Array; + tags?: Array; /** * Time To Live (TTL) of the DNS record in seconds. Setting to 1 means 'automatic'. @@ -900,7 +900,7 @@ export interface HTTPSRecord { /** * Custom tags for the DNS record. This field has no effect on DNS responses. */ - tags?: Array; + tags?: Array; /** * Time To Live (TTL) of the DNS record in seconds. Setting to 1 means 'automatic'. @@ -1003,7 +1003,7 @@ export interface LOCRecord { /** * Custom tags for the DNS record. This field has no effect on DNS responses. */ - tags?: Array; + tags?: Array; /** * Time To Live (TTL) of the DNS record in seconds. Setting to 1 means 'automatic'. @@ -1152,7 +1152,7 @@ export interface MXRecord { /** * Custom tags for the DNS record. This field has no effect on DNS responses. */ - tags?: Array; + tags?: Array; /** * Time To Live (TTL) of the DNS record in seconds. Setting to 1 means 'automatic'. @@ -1233,7 +1233,7 @@ export interface NAPTRRecord { /** * Custom tags for the DNS record. This field has no effect on DNS responses. */ - tags?: Array; + tags?: Array; /** * Time To Live (TTL) of the DNS record in seconds. Setting to 1 means 'automatic'. @@ -1346,7 +1346,7 @@ export interface NSRecord { /** * Custom tags for the DNS record. This field has no effect on DNS responses. */ - tags?: Array; + tags?: Array; /** * Time To Live (TTL) of the DNS record in seconds. Setting to 1 means 'automatic'. @@ -1422,7 +1422,7 @@ export interface PTRRecord { /** * Custom tags for the DNS record. This field has no effect on DNS responses. */ - tags?: Array; + tags?: Array; /** * Time To Live (TTL) of the DNS record in seconds. Setting to 1 means 'automatic'. @@ -1531,7 +1531,7 @@ export interface SMIMEARecord { /** * Custom tags for the DNS record. This field has no effect on DNS responses. */ - tags?: Array; + tags?: Array; /** * Time To Live (TTL) of the DNS record in seconds. Setting to 1 means 'automatic'. @@ -1642,7 +1642,7 @@ export interface SRVRecord { /** * Custom tags for the DNS record. This field has no effect on DNS responses. */ - tags?: Array; + tags?: Array; /** * Time To Live (TTL) of the DNS record in seconds. Setting to 1 means 'automatic'. @@ -1772,7 +1772,7 @@ export interface SSHFPRecord { /** * Custom tags for the DNS record. This field has no effect on DNS responses. */ - tags?: Array; + tags?: Array; /** * Time To Live (TTL) of the DNS record in seconds. Setting to 1 means 'automatic'. @@ -1875,7 +1875,7 @@ export interface SVCBRecord { /** * Custom tags for the DNS record. This field has no effect on DNS responses. */ - tags?: Array; + tags?: Array; /** * Time To Live (TTL) of the DNS record in seconds. Setting to 1 means 'automatic'. @@ -1978,7 +1978,7 @@ export interface TLSARecord { /** * Custom tags for the DNS record. This field has no effect on DNS responses. */ - tags?: Array; + tags?: Array; /** * Time To Live (TTL) of the DNS record in seconds. Setting to 1 means 'automatic'. @@ -2088,7 +2088,7 @@ export interface TXTRecord { /** * Custom tags for the DNS record. This field has no effect on DNS responses. */ - tags?: Array; + tags?: Array; /** * Time To Live (TTL) of the DNS record in seconds. Setting to 1 means 'automatic'. @@ -2230,7 +2230,7 @@ export interface URIRecord { /** * Custom tags for the DNS record. This field has no effect on DNS responses. */ - tags?: Array; + tags?: Array; /** * Time To Live (TTL) of the DNS record in seconds. Setting to 1 means 'automatic'. diff --git a/src/resources/dnssec.ts b/src/resources/dnssec.ts index d5c45d5a97..98671859bd 100644 --- a/src/resources/dnssec.ts +++ b/src/resources/dnssec.ts @@ -2,7 +2,6 @@ import * as Core from 'cloudflare/core'; import { APIResource } from 'cloudflare/resource'; -import * as DNSSECAPI from 'cloudflare/resources/dnssec'; import * as Shared from 'cloudflare/resources/shared'; export class DNSSECResource extends APIResource { @@ -178,10 +177,3 @@ export interface DNSSECGetParams { */ zone_id: string; } - -export namespace DNSSECResource { - export import DNSSEC = DNSSECAPI.DNSSEC; - export import DNSSECDeleteParams = DNSSECAPI.DNSSECDeleteParams; - export import DNSSECEditParams = DNSSECAPI.DNSSECEditParams; - export import DNSSECGetParams = DNSSECAPI.DNSSECGetParams; -} diff --git a/src/resources/durable-objects/durable-objects.ts b/src/resources/durable-objects/durable-objects.ts index e8674be003..9887db1710 100644 --- a/src/resources/durable-objects/durable-objects.ts +++ b/src/resources/durable-objects/durable-objects.ts @@ -9,7 +9,7 @@ export class DurableObjects extends APIResource { export namespace DurableObjects { export import Namespaces = NamespacesAPI.Namespaces; - export import DurableObjectNamespace = NamespacesAPI.DurableObjectNamespace; - export import DurableObjectNamespacesSinglePage = NamespacesAPI.DurableObjectNamespacesSinglePage; + export import Namespace = NamespacesAPI.Namespace; + export import NamespacesSinglePage = NamespacesAPI.NamespacesSinglePage; export import NamespaceListParams = NamespacesAPI.NamespaceListParams; } diff --git a/src/resources/durable-objects/index.ts b/src/resources/durable-objects/index.ts index 235d832bea..bbf88b4e01 100644 --- a/src/resources/durable-objects/index.ts +++ b/src/resources/durable-objects/index.ts @@ -1,9 +1,4 @@ // File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. -export { - DurableObjectNamespace, - NamespaceListParams, - DurableObjectNamespacesSinglePage, - Namespaces, -} from './namespaces/index'; export { DurableObjects } from './durable-objects'; +export { Namespace, NamespaceListParams, NamespacesSinglePage, Namespaces } from './namespaces/index'; diff --git a/src/resources/durable-objects/namespaces/index.ts b/src/resources/durable-objects/namespaces/index.ts index f73b88d047..456b5e106c 100644 --- a/src/resources/durable-objects/namespaces/index.ts +++ b/src/resources/durable-objects/namespaces/index.ts @@ -1,9 +1,4 @@ // File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. export { DurableObject, ObjectListParams, DurableObjectsCursorLimitPagination, Objects } from './objects'; -export { - DurableObjectNamespace, - NamespaceListParams, - DurableObjectNamespacesSinglePage, - Namespaces, -} from './namespaces'; +export { Namespace, NamespaceListParams, NamespacesSinglePage, Namespaces } from './namespaces'; diff --git a/src/resources/durable-objects/namespaces/namespaces.ts b/src/resources/durable-objects/namespaces/namespaces.ts index 37392af31f..c0f425444e 100644 --- a/src/resources/durable-objects/namespaces/namespaces.ts +++ b/src/resources/durable-objects/namespaces/namespaces.ts @@ -15,19 +15,19 @@ export class Namespaces extends APIResource { list( params: NamespaceListParams, options?: Core.RequestOptions, - ): Core.PagePromise { + ): Core.PagePromise { const { account_id } = params; return this._client.getAPIList( `/accounts/${account_id}/workers/durable_objects/namespaces`, - DurableObjectNamespacesSinglePage, + NamespacesSinglePage, options, ); } } -export class DurableObjectNamespacesSinglePage extends SinglePage {} +export class NamespacesSinglePage extends SinglePage {} -export interface DurableObjectNamespace { +export interface Namespace { id?: unknown; class?: unknown; @@ -45,8 +45,8 @@ export interface NamespaceListParams { } export namespace Namespaces { - export import DurableObjectNamespace = NamespacesAPI.DurableObjectNamespace; - export import DurableObjectNamespacesSinglePage = NamespacesAPI.DurableObjectNamespacesSinglePage; + export import Namespace = NamespacesAPI.Namespace; + export import NamespacesSinglePage = NamespacesAPI.NamespacesSinglePage; export import NamespaceListParams = NamespacesAPI.NamespaceListParams; export import Objects = ObjectsAPI.Objects; export import DurableObject = ObjectsAPI.DurableObject; diff --git a/src/resources/email-routing/addresses.ts b/src/resources/email-routing/addresses.ts index d0fbd9ad62..d76d911cb4 100644 --- a/src/resources/email-routing/addresses.ts +++ b/src/resources/email-routing/addresses.ts @@ -15,12 +15,12 @@ export class Addresses extends APIResource { accountIdentifier: string, body: AddressCreateParams, options?: Core.RequestOptions, - ): Core.APIPromise { + ): Core.APIPromise
{ return ( this._client.post(`/accounts/${accountIdentifier}/email/routing/addresses`, { body, ...options, - }) as Core.APIPromise<{ result: AddressCreateResponse }> + }) as Core.APIPromise<{ result: Address }> )._thenUnwrap((obj) => obj.result); } @@ -31,22 +31,22 @@ export class Addresses extends APIResource { accountIdentifier: string, query?: AddressListParams, options?: Core.RequestOptions, - ): Core.PagePromise; + ): Core.PagePromise; list( accountIdentifier: string, options?: Core.RequestOptions, - ): Core.PagePromise; + ): Core.PagePromise; list( accountIdentifier: string, query: AddressListParams | Core.RequestOptions = {}, options?: Core.RequestOptions, - ): Core.PagePromise { + ): Core.PagePromise { if (isRequestOptions(query)) { return this.list(accountIdentifier, {}, query); } return this._client.getAPIList( `/accounts/${accountIdentifier}/email/routing/addresses`, - AddressListResponsesV4PagePaginationArray, + AddressesV4PagePaginationArray, { query, ...options }, ); } @@ -58,12 +58,12 @@ export class Addresses extends APIResource { accountIdentifier: string, destinationAddressIdentifier: string, options?: Core.RequestOptions, - ): Core.APIPromise { + ): Core.APIPromise
{ return ( this._client.delete( `/accounts/${accountIdentifier}/email/routing/addresses/${destinationAddressIdentifier}`, options, - ) as Core.APIPromise<{ result: AddressDeleteResponse }> + ) as Core.APIPromise<{ result: Address }> )._thenUnwrap((obj) => obj.result); } @@ -74,19 +74,19 @@ export class Addresses extends APIResource { accountIdentifier: string, destinationAddressIdentifier: string, options?: Core.RequestOptions, - ): Core.APIPromise { + ): Core.APIPromise
{ return ( this._client.get( `/accounts/${accountIdentifier}/email/routing/addresses/${destinationAddressIdentifier}`, options, - ) as Core.APIPromise<{ result: AddressGetResponse }> + ) as Core.APIPromise<{ result: Address }> )._thenUnwrap((obj) => obj.result); } } -export class AddressListResponsesV4PagePaginationArray extends V4PagePaginationArray {} +export class AddressesV4PagePaginationArray extends V4PagePaginationArray
{} -export interface EmailAddresses { +export interface Address { /** * Destination address identifier. */ @@ -120,109 +120,7 @@ export interface EmailAddresses { verified?: string; } -export interface AddressCreateResponse { - /** - * Destination address identifier. - */ - id?: string; - - /** - * The date and time the destination address has been created. - */ - created?: string; - - /** - * The contact email address of the user. - */ - email?: string; - - /** - * The date and time the destination address was last modified. - */ - modified?: string; - - /** - * @deprecated: Destination address tag. (Deprecated, replaced by destination - * address identifier) - */ - tag?: string; - - /** - * The date and time the destination address has been verified. Null means not - * verified yet. - */ - verified?: string; -} - -export interface AddressListResponse { - /** - * Destination address identifier. - */ - id?: string; - - /** - * The date and time the destination address has been created. - */ - created?: string; - - /** - * The contact email address of the user. - */ - email?: string; - - /** - * The date and time the destination address was last modified. - */ - modified?: string; - - /** - * @deprecated: Destination address tag. (Deprecated, replaced by destination - * address identifier) - */ - tag?: string; - - /** - * The date and time the destination address has been verified. Null means not - * verified yet. - */ - verified?: string; -} - -export interface AddressDeleteResponse { - /** - * Destination address identifier. - */ - id?: string; - - /** - * The date and time the destination address has been created. - */ - created?: string; - - /** - * The contact email address of the user. - */ - email?: string; - - /** - * The date and time the destination address was last modified. - */ - modified?: string; - - /** - * @deprecated: Destination address tag. (Deprecated, replaced by destination - * address identifier) - */ - tag?: string; - - /** - * The date and time the destination address has been verified. Null means not - * verified yet. - */ - verified?: string; -} - -export interface AddressGetResponse { +export interface DestinationAddress { /** * Destination address identifier. */ @@ -276,12 +174,9 @@ export interface AddressListParams extends V4PagePaginationArrayParams { } export namespace Addresses { - export import EmailAddresses = AddressesAPI.EmailAddresses; - export import AddressCreateResponse = AddressesAPI.AddressCreateResponse; - export import AddressListResponse = AddressesAPI.AddressListResponse; - export import AddressDeleteResponse = AddressesAPI.AddressDeleteResponse; - export import AddressGetResponse = AddressesAPI.AddressGetResponse; - export import AddressListResponsesV4PagePaginationArray = AddressesAPI.AddressListResponsesV4PagePaginationArray; + export import Address = AddressesAPI.Address; + export import DestinationAddress = AddressesAPI.DestinationAddress; + export import AddressesV4PagePaginationArray = AddressesAPI.AddressesV4PagePaginationArray; export import AddressCreateParams = AddressesAPI.AddressCreateParams; export import AddressListParams = AddressesAPI.AddressListParams; } diff --git a/src/resources/email-routing/dns.ts b/src/resources/email-routing/dns.ts index 126f62294f..24469c5879 100644 --- a/src/resources/email-routing/dns.ts +++ b/src/resources/email-routing/dns.ts @@ -20,7 +20,7 @@ export class DNS extends APIResource { /** * List of records needed to enable an Email Routing zone. */ -export interface EmailDNSRecord { +export interface DNSRecord { /** * DNS record content. */ @@ -67,9 +67,9 @@ export interface EmailDNSRecord { | 'URI'; } -export type DNSGetResponse = Array; +export type DNSGetResponse = Array; export namespace DNS { - export import EmailDNSRecord = DNSAPI.EmailDNSRecord; + export import DNSRecord = DNSAPI.DNSRecord; export import DNSGetResponse = DNSAPI.DNSGetResponse; } diff --git a/src/resources/email-routing/email-routing.ts b/src/resources/email-routing/email-routing.ts index 076a1ed6df..fcf6de87ce 100644 --- a/src/resources/email-routing/email-routing.ts +++ b/src/resources/email-routing/email-routing.ts @@ -2,7 +2,6 @@ import * as Core from 'cloudflare/core'; import { APIResource } from 'cloudflare/resource'; -import * as EmailRoutingAPI from 'cloudflare/resources/email-routing/email-routing'; import * as AddressesAPI from 'cloudflare/resources/email-routing/addresses'; import * as DNSAPI from 'cloudflare/resources/email-routing/dns'; import * as RulesAPI from 'cloudflare/resources/email-routing/rules/rules'; @@ -20,12 +19,12 @@ export class EmailRouting extends APIResource { zoneIdentifier: string, body: EmailRoutingDisableParams, options?: Core.RequestOptions, - ): Core.APIPromise { + ): Core.APIPromise { return ( this._client.post(`/zones/${zoneIdentifier}/email/routing/disable`, { body, ...options, - }) as Core.APIPromise<{ result: EmailRoutingDisableResponse }> + }) as Core.APIPromise<{ result: Settings }> )._thenUnwrap((obj) => obj.result); } @@ -36,157 +35,28 @@ export class EmailRouting extends APIResource { zoneIdentifier: string, body: EmailRoutingEnableParams, options?: Core.RequestOptions, - ): Core.APIPromise { + ): Core.APIPromise { return ( this._client.post(`/zones/${zoneIdentifier}/email/routing/enable`, { body, ...options, - }) as Core.APIPromise<{ result: EmailRoutingEnableResponse }> + }) as Core.APIPromise<{ result: Settings }> )._thenUnwrap((obj) => obj.result); } /** * Get information about the settings for your Email Routing zone. */ - get(zoneIdentifier: string, options?: Core.RequestOptions): Core.APIPromise { + get(zoneIdentifier: string, options?: Core.RequestOptions): Core.APIPromise { return ( this._client.get(`/zones/${zoneIdentifier}/email/routing`, options) as Core.APIPromise<{ - result: EmailRoutingGetResponse; + result: Settings; }> )._thenUnwrap((obj) => obj.result); } } -export interface EmailSettings { - /** - * Email Routing settings identifier. - */ - id?: string; - - /** - * The date and time the settings have been created. - */ - created?: string; - - /** - * State of the zone settings for Email Routing. - */ - enabled?: true | false; - - /** - * The date and time the settings have been modified. - */ - modified?: string; - - /** - * Domain of your zone. - */ - name?: string; - - /** - * Flag to check if the user skipped the configuration wizard. - */ - skip_wizard?: true | false; - - /** - * Show the state of your account, and the type or configuration error. - */ - status?: 'ready' | 'unconfigured' | 'misconfigured' | 'misconfigured/locked' | 'unlocked'; - - /** - * @deprecated: Email Routing settings tag. (Deprecated, replaced by Email Routing - * settings identifier) - */ - tag?: string; -} - -export interface EmailRoutingDisableResponse { - /** - * Email Routing settings identifier. - */ - id?: string; - - /** - * The date and time the settings have been created. - */ - created?: string; - - /** - * State of the zone settings for Email Routing. - */ - enabled?: true | false; - - /** - * The date and time the settings have been modified. - */ - modified?: string; - - /** - * Domain of your zone. - */ - name?: string; - - /** - * Flag to check if the user skipped the configuration wizard. - */ - skip_wizard?: true | false; - - /** - * Show the state of your account, and the type or configuration error. - */ - status?: 'ready' | 'unconfigured' | 'misconfigured' | 'misconfigured/locked' | 'unlocked'; - - /** - * @deprecated: Email Routing settings tag. (Deprecated, replaced by Email Routing - * settings identifier) - */ - tag?: string; -} - -export interface EmailRoutingEnableResponse { - /** - * Email Routing settings identifier. - */ - id?: string; - - /** - * The date and time the settings have been created. - */ - created?: string; - - /** - * State of the zone settings for Email Routing. - */ - enabled?: true | false; - - /** - * The date and time the settings have been modified. - */ - modified?: string; - - /** - * Domain of your zone. - */ - name?: string; - - /** - * Flag to check if the user skipped the configuration wizard. - */ - skip_wizard?: true | false; - - /** - * Show the state of your account, and the type or configuration error. - */ - status?: 'ready' | 'unconfigured' | 'misconfigured' | 'misconfigured/locked' | 'unlocked'; - - /** - * @deprecated: Email Routing settings tag. (Deprecated, replaced by Email Routing - * settings identifier) - */ - tag?: string; -} - -export interface EmailRoutingGetResponse { +export interface Settings { /** * Email Routing settings identifier. */ @@ -234,33 +104,24 @@ export type EmailRoutingDisableParams = unknown; export type EmailRoutingEnableParams = unknown; export namespace EmailRouting { - export import EmailSettings = EmailRoutingAPI.EmailSettings; - export import EmailRoutingDisableResponse = EmailRoutingAPI.EmailRoutingDisableResponse; - export import EmailRoutingEnableResponse = EmailRoutingAPI.EmailRoutingEnableResponse; - export import EmailRoutingGetResponse = EmailRoutingAPI.EmailRoutingGetResponse; - export import EmailRoutingDisableParams = EmailRoutingAPI.EmailRoutingDisableParams; - export import EmailRoutingEnableParams = EmailRoutingAPI.EmailRoutingEnableParams; export import DNS = DNSAPI.DNS; - export import EmailDNSRecord = DNSAPI.EmailDNSRecord; + export import DNSRecord = DNSAPI.DNSRecord; export import DNSGetResponse = DNSAPI.DNSGetResponse; export import Rules = RulesAPI.Rules; - export import EmailRules = RulesAPI.EmailRules; - export import RuleCreateResponse = RulesAPI.RuleCreateResponse; - export import RuleUpdateResponse = RulesAPI.RuleUpdateResponse; - export import RuleListResponse = RulesAPI.RuleListResponse; - export import RuleDeleteResponse = RulesAPI.RuleDeleteResponse; - export import RuleGetResponse = RulesAPI.RuleGetResponse; - export import RuleListResponsesV4PagePaginationArray = RulesAPI.RuleListResponsesV4PagePaginationArray; + export import Action = RulesAPI.Action; + export import ActionItem = RulesAPI.ActionItem; + export import EmailRule = RulesAPI.EmailRule; + export import Matcher = RulesAPI.Matcher; + export import MatcherItem = RulesAPI.MatcherItem; + export import Properties = RulesAPI.Properties; + export import EmailRulesV4PagePaginationArray = RulesAPI.EmailRulesV4PagePaginationArray; export import RuleCreateParams = RulesAPI.RuleCreateParams; export import RuleUpdateParams = RulesAPI.RuleUpdateParams; export import RuleListParams = RulesAPI.RuleListParams; export import Addresses = AddressesAPI.Addresses; - export import EmailAddresses = AddressesAPI.EmailAddresses; - export import AddressCreateResponse = AddressesAPI.AddressCreateResponse; - export import AddressListResponse = AddressesAPI.AddressListResponse; - export import AddressDeleteResponse = AddressesAPI.AddressDeleteResponse; - export import AddressGetResponse = AddressesAPI.AddressGetResponse; - export import AddressListResponsesV4PagePaginationArray = AddressesAPI.AddressListResponsesV4PagePaginationArray; + export import Address = AddressesAPI.Address; + export import DestinationAddress = AddressesAPI.DestinationAddress; + export import AddressesV4PagePaginationArray = AddressesAPI.AddressesV4PagePaginationArray; export import AddressCreateParams = AddressesAPI.AddressCreateParams; export import AddressListParams = AddressesAPI.AddressListParams; } diff --git a/src/resources/email-routing/index.ts b/src/resources/email-routing/index.ts index 3a86357fb1..470002bc47 100644 --- a/src/resources/email-routing/index.ts +++ b/src/resources/email-routing/index.ts @@ -1,36 +1,25 @@ // File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. export { - EmailAddresses, - AddressCreateResponse, - AddressListResponse, - AddressDeleteResponse, - AddressGetResponse, - AddressCreateParams, - AddressListParams, - AddressListResponsesV4PagePaginationArray, - Addresses, -} from './addresses'; -export { EmailDNSRecord, DNSGetResponse, DNS } from './dns'; -export { - EmailRules, - RuleCreateResponse, - RuleUpdateResponse, - RuleListResponse, - RuleDeleteResponse, - RuleGetResponse, + Action, + ActionItem, + EmailRule, + Matcher, + MatcherItem, + Properties, RuleCreateParams, RuleUpdateParams, RuleListParams, - RuleListResponsesV4PagePaginationArray, + EmailRulesV4PagePaginationArray, Rules, } from './rules/index'; export { - EmailSettings, - EmailRoutingDisableResponse, - EmailRoutingEnableResponse, - EmailRoutingGetResponse, - EmailRoutingDisableParams, - EmailRoutingEnableParams, - EmailRouting, -} from './email-routing'; + Address, + DestinationAddress, + AddressCreateParams, + AddressListParams, + AddressesV4PagePaginationArray, + Addresses, +} from './addresses'; +export { DNSRecord, DNSGetResponse, DNS } from './dns'; +export { EmailRouting } from './email-routing'; diff --git a/src/resources/email-routing/rules/catch-alls.ts b/src/resources/email-routing/rules/catch-alls.ts index d06ef022e3..90e296127a 100644 --- a/src/resources/email-routing/rules/catch-alls.ts +++ b/src/resources/email-routing/rules/catch-alls.ts @@ -13,28 +13,40 @@ export class CatchAlls extends APIResource { zoneIdentifier: string, body: CatchAllUpdateParams, options?: Core.RequestOptions, - ): Core.APIPromise { + ): Core.APIPromise { return ( this._client.put(`/zones/${zoneIdentifier}/email/routing/rules/catch_all`, { body, ...options, - }) as Core.APIPromise<{ result: EmailCatchAllRule }> + }) as Core.APIPromise<{ result: CatchAllRule }> )._thenUnwrap((obj) => obj.result); } /** * Get information on the default catch-all routing rule. */ - get(zoneIdentifier: string, options?: Core.RequestOptions): Core.APIPromise { + get(zoneIdentifier: string, options?: Core.RequestOptions): Core.APIPromise { return ( this._client.get(`/zones/${zoneIdentifier}/email/routing/rules/catch_all`, options) as Core.APIPromise<{ - result: EmailCatchAllRule; + result: CatchAllRule; }> )._thenUnwrap((obj) => obj.result); } } -export interface EmailCatchAllRule { +/** + * Action for the catch-all routing rule. + */ +export interface Action { + /** + * Type of action for catch-all rule. + */ + type: 'drop' | 'forward' | 'worker'; + + value?: Array; +} + +export interface CatchAllRule { /** * Routing rule identifier. */ @@ -43,7 +55,7 @@ export interface EmailCatchAllRule { /** * List actions for the catch-all routing rule. */ - actions?: Array; + actions?: Array; /** * Routing rule status. @@ -53,7 +65,7 @@ export interface EmailCatchAllRule { /** * List of matchers for the catch-all routing rule. */ - matchers?: Array; + matchers?: Array; /** * Routing rule name. @@ -66,40 +78,26 @@ export interface EmailCatchAllRule { tag?: string; } -export namespace EmailCatchAllRule { +/** + * Matcher for catch-all routing rule. + */ +export interface Matcher { /** - * Action for the catch-all routing rule. + * Type of matcher. Default is 'all'. */ - export interface Action { - /** - * Type of action for catch-all rule. - */ - type: 'drop' | 'forward' | 'worker'; - - value?: Array; - } - - /** - * Matcher for catch-all routing rule. - */ - export interface Matcher { - /** - * Type of matcher. Default is 'all'. - */ - type: 'all'; - } + type: 'all'; } export interface CatchAllUpdateParams { /** * List actions for the catch-all routing rule. */ - actions: Array; + actions: Array; /** * List of matchers for the catch-all routing rule. */ - matchers: Array; + matchers: Array; /** * Routing rule status. @@ -112,31 +110,9 @@ export interface CatchAllUpdateParams { name?: string; } -export namespace CatchAllUpdateParams { - /** - * Action for the catch-all routing rule. - */ - export interface Action { - /** - * Type of action for catch-all rule. - */ - type: 'drop' | 'forward' | 'worker'; - - value?: Array; - } - - /** - * Matcher for catch-all routing rule. - */ - export interface Matcher { - /** - * Type of matcher. Default is 'all'. - */ - type: 'all'; - } -} - export namespace CatchAlls { - export import EmailCatchAllRule = CatchAllsAPI.EmailCatchAllRule; + export import Action = CatchAllsAPI.Action; + export import CatchAllRule = CatchAllsAPI.CatchAllRule; + export import Matcher = CatchAllsAPI.Matcher; export import CatchAllUpdateParams = CatchAllsAPI.CatchAllUpdateParams; } diff --git a/src/resources/email-routing/rules/index.ts b/src/resources/email-routing/rules/index.ts index fad0a8500a..d39dcb5094 100644 --- a/src/resources/email-routing/rules/index.ts +++ b/src/resources/email-routing/rules/index.ts @@ -1,16 +1,16 @@ // File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. -export { EmailCatchAllRule, CatchAllUpdateParams, CatchAlls } from './catch-alls'; export { - EmailRules, - RuleCreateResponse, - RuleUpdateResponse, - RuleListResponse, - RuleDeleteResponse, - RuleGetResponse, + Action, + ActionItem, + EmailRule, + Matcher, + MatcherItem, + Properties, RuleCreateParams, RuleUpdateParams, RuleListParams, - RuleListResponsesV4PagePaginationArray, + EmailRulesV4PagePaginationArray, Rules, } from './rules'; +export { Action, CatchAllRule, Matcher, CatchAllUpdateParams, CatchAlls } from './catch-alls'; diff --git a/src/resources/email-routing/rules/rules.ts b/src/resources/email-routing/rules/rules.ts index cb0e7a52e6..6b1e0a7cdd 100644 --- a/src/resources/email-routing/rules/rules.ts +++ b/src/resources/email-routing/rules/rules.ts @@ -19,12 +19,12 @@ export class Rules extends APIResource { zoneIdentifier: string, body: RuleCreateParams, options?: Core.RequestOptions, - ): Core.APIPromise { + ): Core.APIPromise { return ( this._client.post(`/zones/${zoneIdentifier}/email/routing/rules`, { body, ...options, - }) as Core.APIPromise<{ result: RuleCreateResponse }> + }) as Core.APIPromise<{ result: EmailRule }> )._thenUnwrap((obj) => obj.result); } @@ -36,12 +36,12 @@ export class Rules extends APIResource { ruleIdentifier: string, body: RuleUpdateParams, options?: Core.RequestOptions, - ): Core.APIPromise { + ): Core.APIPromise { return ( this._client.put(`/zones/${zoneIdentifier}/email/routing/rules/${ruleIdentifier}`, { body, ...options, - }) as Core.APIPromise<{ result: RuleUpdateResponse }> + }) as Core.APIPromise<{ result: EmailRule }> )._thenUnwrap((obj) => obj.result); } @@ -52,22 +52,22 @@ export class Rules extends APIResource { zoneIdentifier: string, query?: RuleListParams, options?: Core.RequestOptions, - ): Core.PagePromise; + ): Core.PagePromise; list( zoneIdentifier: string, options?: Core.RequestOptions, - ): Core.PagePromise; + ): Core.PagePromise; list( zoneIdentifier: string, query: RuleListParams | Core.RequestOptions = {}, options?: Core.RequestOptions, - ): Core.PagePromise { + ): Core.PagePromise { if (isRequestOptions(query)) { return this.list(zoneIdentifier, {}, query); } return this._client.getAPIList( `/zones/${zoneIdentifier}/email/routing/rules`, - RuleListResponsesV4PagePaginationArray, + EmailRulesV4PagePaginationArray, { query, ...options }, ); } @@ -79,12 +79,12 @@ export class Rules extends APIResource { zoneIdentifier: string, ruleIdentifier: string, options?: Core.RequestOptions, - ): Core.APIPromise { + ): Core.APIPromise { return ( this._client.delete( `/zones/${zoneIdentifier}/email/routing/rules/${ruleIdentifier}`, options, - ) as Core.APIPromise<{ result: RuleDeleteResponse }> + ) as Core.APIPromise<{ result: EmailRule }> )._thenUnwrap((obj) => obj.result); } @@ -95,90 +95,43 @@ export class Rules extends APIResource { zoneIdentifier: string, ruleIdentifier: string, options?: Core.RequestOptions, - ): Core.APIPromise { + ): Core.APIPromise { return ( this._client.get( `/zones/${zoneIdentifier}/email/routing/rules/${ruleIdentifier}`, options, - ) as Core.APIPromise<{ result: RuleGetResponse }> + ) as Core.APIPromise<{ result: EmailRule }> )._thenUnwrap((obj) => obj.result); } } -export class RuleListResponsesV4PagePaginationArray extends V4PagePaginationArray {} +export class EmailRulesV4PagePaginationArray extends V4PagePaginationArray {} -export interface EmailRules { +/** + * Actions pattern. + */ +export interface Action { /** - * Routing rule identifier. - */ - id?: string; - - /** - * List actions patterns. - */ - actions?: Array; - - /** - * Routing rule status. - */ - enabled?: true | false; - - /** - * Matching patterns to forward to your actions. + * Type of supported action. */ - matchers?: Array; - - /** - * Routing rule name. - */ - name?: string; + type: 'drop' | 'forward' | 'worker'; - /** - * Priority of the routing rule. - */ - priority?: number; - - /** - * @deprecated: Routing rule tag. (Deprecated, replaced by routing rule identifier) - */ - tag?: string; + value: Array; } -export namespace EmailRules { +/** + * Actions pattern. + */ +export interface ActionItem { /** - * Actions pattern. + * Type of supported action. */ - export interface Action { - /** - * Type of supported action. - */ - type: 'drop' | 'forward' | 'worker'; + type: 'drop' | 'forward' | 'worker'; - value: Array; - } - - /** - * Matching pattern to forward your actions. - */ - export interface Matcher { - /** - * Field for type matcher. - */ - field: 'to'; - - /** - * Type of matcher. - */ - type: 'literal'; - - /** - * Value for matcher. - */ - value: string; - } + value: Array; } -export interface RuleCreateResponse { +export interface EmailRule { /** * Routing rule identifier. */ @@ -187,7 +140,7 @@ export interface RuleCreateResponse { /** * List actions patterns. */ - actions?: Array; + actions?: Array; /** * Routing rule status. @@ -197,7 +150,7 @@ export interface RuleCreateResponse { /** * Matching patterns to forward to your actions. */ - matchers?: Array; + matchers?: Array; /** * Routing rule name. @@ -215,254 +168,47 @@ export interface RuleCreateResponse { tag?: string; } -export namespace RuleCreateResponse { - /** - * Actions pattern. - */ - export interface Action { - /** - * Type of supported action. - */ - type: 'drop' | 'forward' | 'worker'; - - value: Array; - } - - /** - * Matching pattern to forward your actions. - */ - export interface Matcher { - /** - * Field for type matcher. - */ - field: 'to'; - - /** - * Type of matcher. - */ - type: 'literal'; - - /** - * Value for matcher. - */ - value: string; - } -} - -export interface RuleUpdateResponse { - /** - * Routing rule identifier. - */ - id?: string; - - /** - * List actions patterns. - */ - actions?: Array; - - /** - * Routing rule status. - */ - enabled?: true | false; - - /** - * Matching patterns to forward to your actions. - */ - matchers?: Array; - - /** - * Routing rule name. - */ - name?: string; - - /** - * Priority of the routing rule. - */ - priority?: number; - - /** - * @deprecated: Routing rule tag. (Deprecated, replaced by routing rule identifier) - */ - tag?: string; -} - -export namespace RuleUpdateResponse { - /** - * Actions pattern. - */ - export interface Action { - /** - * Type of supported action. - */ - type: 'drop' | 'forward' | 'worker'; - - value: Array; - } - - /** - * Matching pattern to forward your actions. - */ - export interface Matcher { - /** - * Field for type matcher. - */ - field: 'to'; - - /** - * Type of matcher. - */ - type: 'literal'; - - /** - * Value for matcher. - */ - value: string; - } -} - -export interface RuleListResponse { - /** - * Routing rule identifier. - */ - id?: string; - - /** - * List actions patterns. - */ - actions?: Array; - +/** + * Matching pattern to forward your actions. + */ +export interface Matcher { /** - * Routing rule status. + * Field for type matcher. */ - enabled?: true | false; - - /** - * Matching patterns to forward to your actions. - */ - matchers?: Array; - - /** - * Routing rule name. - */ - name?: string; + field: 'to'; /** - * Priority of the routing rule. + * Type of matcher. */ - priority?: number; + type: 'literal'; /** - * @deprecated: Routing rule tag. (Deprecated, replaced by routing rule identifier) + * Value for matcher. */ - tag?: string; + value: string; } -export namespace RuleListResponse { +/** + * Matching pattern to forward your actions. + */ +export interface MatcherItem { /** - * Actions pattern. + * Field for type matcher. */ - export interface Action { - /** - * Type of supported action. - */ - type: 'drop' | 'forward' | 'worker'; - - value: Array; - } + field: 'to'; /** - * Matching pattern to forward your actions. + * Type of matcher. */ - export interface Matcher { - /** - * Field for type matcher. - */ - field: 'to'; - - /** - * Type of matcher. - */ - type: 'literal'; + type: 'literal'; - /** - * Value for matcher. - */ - value: string; - } -} - -export interface RuleDeleteResponse { /** - * Routing rule identifier. + * Value for matcher. */ - id?: string; - - /** - * List actions patterns. - */ - actions?: Array; - - /** - * Routing rule status. - */ - enabled?: true | false; - - /** - * Matching patterns to forward to your actions. - */ - matchers?: Array; - - /** - * Routing rule name. - */ - name?: string; - - /** - * Priority of the routing rule. - */ - priority?: number; - - /** - * @deprecated: Routing rule tag. (Deprecated, replaced by routing rule identifier) - */ - tag?: string; + value: string; } -export namespace RuleDeleteResponse { - /** - * Actions pattern. - */ - export interface Action { - /** - * Type of supported action. - */ - type: 'drop' | 'forward' | 'worker'; - - value: Array; - } - - /** - * Matching pattern to forward your actions. - */ - export interface Matcher { - /** - * Field for type matcher. - */ - field: 'to'; - - /** - * Type of matcher. - */ - type: 'literal'; - - /** - * Value for matcher. - */ - value: string; - } -} - -export interface RuleGetResponse { +export interface Properties { /** * Routing rule identifier. */ @@ -471,7 +217,7 @@ export interface RuleGetResponse { /** * List actions patterns. */ - actions?: Array; + actions?: Array; /** * Routing rule status. @@ -481,7 +227,7 @@ export interface RuleGetResponse { /** * Matching patterns to forward to your actions. */ - matchers?: Array; + matchers?: Array; /** * Routing rule name. @@ -499,50 +245,16 @@ export interface RuleGetResponse { tag?: string; } -export namespace RuleGetResponse { - /** - * Actions pattern. - */ - export interface Action { - /** - * Type of supported action. - */ - type: 'drop' | 'forward' | 'worker'; - - value: Array; - } - - /** - * Matching pattern to forward your actions. - */ - export interface Matcher { - /** - * Field for type matcher. - */ - field: 'to'; - - /** - * Type of matcher. - */ - type: 'literal'; - - /** - * Value for matcher. - */ - value: string; - } -} - export interface RuleCreateParams { /** * List actions patterns. */ - actions: Array; + actions: Array; /** * Matching patterns to forward to your actions. */ - matchers: Array; + matchers: Array; /** * Routing rule status. @@ -560,50 +272,16 @@ export interface RuleCreateParams { priority?: number; } -export namespace RuleCreateParams { - /** - * Actions pattern. - */ - export interface Action { - /** - * Type of supported action. - */ - type: 'drop' | 'forward' | 'worker'; - - value: Array; - } - - /** - * Matching pattern to forward your actions. - */ - export interface Matcher { - /** - * Field for type matcher. - */ - field: 'to'; - - /** - * Type of matcher. - */ - type: 'literal'; - - /** - * Value for matcher. - */ - value: string; - } -} - export interface RuleUpdateParams { /** * List actions patterns. */ - actions: Array; + actions: Array; /** * Matching patterns to forward to your actions. */ - matchers: Array; + matchers: Array; /** * Routing rule status. @@ -621,40 +299,6 @@ export interface RuleUpdateParams { priority?: number; } -export namespace RuleUpdateParams { - /** - * Actions pattern. - */ - export interface Action { - /** - * Type of supported action. - */ - type: 'drop' | 'forward' | 'worker'; - - value: Array; - } - - /** - * Matching pattern to forward your actions. - */ - export interface Matcher { - /** - * Field for type matcher. - */ - field: 'to'; - - /** - * Type of matcher. - */ - type: 'literal'; - - /** - * Value for matcher. - */ - value: string; - } -} - export interface RuleListParams extends V4PagePaginationArrayParams { /** * Filter by enabled routing rules. @@ -663,17 +307,17 @@ export interface RuleListParams extends V4PagePaginationArrayParams { } export namespace Rules { - export import EmailRules = RulesAPI.EmailRules; - export import RuleCreateResponse = RulesAPI.RuleCreateResponse; - export import RuleUpdateResponse = RulesAPI.RuleUpdateResponse; - export import RuleListResponse = RulesAPI.RuleListResponse; - export import RuleDeleteResponse = RulesAPI.RuleDeleteResponse; - export import RuleGetResponse = RulesAPI.RuleGetResponse; - export import RuleListResponsesV4PagePaginationArray = RulesAPI.RuleListResponsesV4PagePaginationArray; + export import Action = RulesAPI.Action; + export import ActionItem = RulesAPI.ActionItem; + export import EmailRule = RulesAPI.EmailRule; + export import Matcher = RulesAPI.Matcher; + export import MatcherItem = RulesAPI.MatcherItem; + export import Properties = RulesAPI.Properties; + export import EmailRulesV4PagePaginationArray = RulesAPI.EmailRulesV4PagePaginationArray; export import RuleCreateParams = RulesAPI.RuleCreateParams; export import RuleUpdateParams = RulesAPI.RuleUpdateParams; export import RuleListParams = RulesAPI.RuleListParams; export import CatchAlls = CatchAllsAPI.CatchAlls; - export import EmailCatchAllRule = CatchAllsAPI.EmailCatchAllRule; + export import CatchAllRule = CatchAllsAPI.CatchAllRule; export import CatchAllUpdateParams = CatchAllsAPI.CatchAllUpdateParams; } diff --git a/src/resources/filters.ts b/src/resources/filters.ts index e67b7dc5d9..44fa78b7ea 100644 --- a/src/resources/filters.ts +++ b/src/resources/filters.ts @@ -3,7 +3,6 @@ import * as Core from 'cloudflare/core'; import { APIResource } from 'cloudflare/resource'; import { isRequestOptions } from 'cloudflare/core'; -import * as FiltersAPI from 'cloudflare/resources/filters'; import { V4PagePaginationArray, type V4PagePaginationArrayParams } from 'cloudflare/pagination'; export class Filters extends APIResource { @@ -30,10 +29,10 @@ export class Filters extends APIResource { id: string, body: FilterUpdateParams, options?: Core.RequestOptions, - ): Core.APIPromise { + ): Core.APIPromise { return ( this._client.put(`/zones/${zoneIdentifier}/filters/${id}`, { body, ...options }) as Core.APIPromise<{ - result: FirewallFilter | null; + result: FilterUpdateResponse; }> )._thenUnwrap((obj) => obj.result); } @@ -46,23 +45,24 @@ export class Filters extends APIResource { zoneIdentifier: string, query?: FilterListParams, options?: Core.RequestOptions, - ): Core.PagePromise; + ): Core.PagePromise; list( zoneIdentifier: string, options?: Core.RequestOptions, - ): Core.PagePromise; + ): Core.PagePromise; list( zoneIdentifier: string, query: FilterListParams | Core.RequestOptions = {}, options?: Core.RequestOptions, - ): Core.PagePromise { + ): Core.PagePromise { if (isRequestOptions(query)) { return this.list(zoneIdentifier, {}, query); } - return this._client.getAPIList(`/zones/${zoneIdentifier}/filters`, FirewallFiltersV4PagePaginationArray, { - query, - ...options, - }); + return this._client.getAPIList( + `/zones/${zoneIdentifier}/filters`, + FilterListResponsesV4PagePaginationArray, + { query, ...options }, + ); } /** @@ -73,10 +73,10 @@ export class Filters extends APIResource { id: string, body: FilterDeleteParams, options?: Core.RequestOptions, - ): Core.APIPromise { + ): Core.APIPromise { return ( this._client.delete(`/zones/${zoneIdentifier}/filters/${id}`, { body, ...options }) as Core.APIPromise<{ - result: FirewallFilter | null; + result: FilterDeleteResponse; }> )._thenUnwrap((obj) => obj.result); } @@ -84,22 +84,50 @@ export class Filters extends APIResource { /** * Fetches the details of a filter. */ - get( - zoneIdentifier: string, - id: string, - options?: Core.RequestOptions, - ): Core.APIPromise { + get(zoneIdentifier: string, id: string, options?: Core.RequestOptions): Core.APIPromise { return ( this._client.get(`/zones/${zoneIdentifier}/filters/${id}`, options) as Core.APIPromise<{ - result: FirewallFilter | null; + result: FilterGetResponse; }> )._thenUnwrap((obj) => obj.result); } } -export class FirewallFiltersV4PagePaginationArray extends V4PagePaginationArray {} +export class FilterListResponsesV4PagePaginationArray extends V4PagePaginationArray {} + +export type FilterCreateResponse = Array; + +export namespace FilterCreateResponse { + export interface FilterCreateResponseItem { + /** + * The unique identifier of the filter. + */ + id: string; + + /** + * The filter expression. For more information, refer to + * [Expressions](https://developers.cloudflare.com/ruleset-engine/rules-language/expressions/). + */ + expression: string; + + /** + * When true, indicates that the filter is currently paused. + */ + paused: boolean; + + /** + * An informative summary of the filter. + */ + description?: string; + + /** + * A short reference tag. Allows you to select related filters. + */ + ref?: string; + } +} -export interface FirewallFilter { +export interface FilterUpdateResponse { /** * The unique identifier of the filter. */ @@ -127,9 +155,89 @@ export interface FirewallFilter { ref?: string; } -export type UnnamedSchemaRef39af4f78d23244e2595fb47c811221df = Array; +export interface FilterListResponse { + /** + * The unique identifier of the filter. + */ + id: string; + + /** + * The filter expression. For more information, refer to + * [Expressions](https://developers.cloudflare.com/ruleset-engine/rules-language/expressions/). + */ + expression: string; + + /** + * When true, indicates that the filter is currently paused. + */ + paused: boolean; + + /** + * An informative summary of the filter. + */ + description?: string; + + /** + * A short reference tag. Allows you to select related filters. + */ + ref?: string; +} + +export interface FilterDeleteResponse { + /** + * The unique identifier of the filter. + */ + id: string; + + /** + * An informative summary of the filter. + */ + description?: string; + + /** + * The filter expression. For more information, refer to + * [Expressions](https://developers.cloudflare.com/ruleset-engine/rules-language/expressions/). + */ + expression?: string; + + /** + * When true, indicates that the filter is currently paused. + */ + paused?: boolean; + + /** + * A short reference tag. Allows you to select related filters. + */ + ref?: string; +} + +export interface FilterGetResponse { + /** + * The unique identifier of the filter. + */ + id?: string; + + /** + * An informative summary of the filter. + */ + description?: string; + + /** + * The filter expression. For more information, refer to + * [Expressions](https://developers.cloudflare.com/ruleset-engine/rules-language/expressions/). + */ + expression?: string; + + /** + * When true, indicates that the filter is currently paused. + */ + paused?: boolean; -export type FilterCreateResponse = Array; + /** + * A short reference tag. Allows you to select related filters. + */ + ref?: string; +} export type FilterCreateParams = unknown; @@ -163,14 +271,3 @@ export interface FilterListParams extends V4PagePaginationArrayParams { } export type FilterDeleteParams = unknown; - -export namespace Filters { - export import FirewallFilter = FiltersAPI.FirewallFilter; - export import UnnamedSchemaRef39af4f78d23244e2595fb47c811221df = FiltersAPI.UnnamedSchemaRef39af4f78d23244e2595fb47c811221df; - export import FilterCreateResponse = FiltersAPI.FilterCreateResponse; - export import FirewallFiltersV4PagePaginationArray = FiltersAPI.FirewallFiltersV4PagePaginationArray; - export import FilterCreateParams = FiltersAPI.FilterCreateParams; - export import FilterUpdateParams = FiltersAPI.FilterUpdateParams; - export import FilterListParams = FiltersAPI.FilterListParams; - export import FilterDeleteParams = FiltersAPI.FilterDeleteParams; -} diff --git a/src/resources/firewall/access-rules.ts b/src/resources/firewall/access-rules.ts index d2e30318ec..5a5bade2df 100644 --- a/src/resources/firewall/access-rules.ts +++ b/src/resources/firewall/access-rules.ts @@ -220,11 +220,11 @@ export interface AccessRuleCreateParams { * Body param: The rule configuration. */ configuration: - | AccessRuleCreateParams.LegacyJhsIPConfiguration - | AccessRuleCreateParams.LegacyJhsIPV6Configuration - | AccessRuleCreateParams.LegacyJhsCIDRConfiguration - | AccessRuleCreateParams.LegacyJhsASNConfiguration - | AccessRuleCreateParams.LegacyJhsCountryConfiguration; + | AccessRuleCreateParams.FirewallIPConfiguration + | AccessRuleCreateParams.FirewallIPV6Configuration + | AccessRuleCreateParams.FirewallCIDRConfiguration + | AccessRuleCreateParams.FirewallASNConfiguration + | AccessRuleCreateParams.FirewallCountryConfiguration; /** * Body param: The action to apply to a matched request. @@ -251,7 +251,7 @@ export interface AccessRuleCreateParams { } export namespace AccessRuleCreateParams { - export interface LegacyJhsIPConfiguration { + export interface FirewallIPConfiguration { /** * The configuration target. You must set the target to `ip` when specifying an IP * address in the rule. @@ -265,7 +265,7 @@ export namespace AccessRuleCreateParams { value?: string; } - export interface LegacyJhsIPV6Configuration { + export interface FirewallIPV6Configuration { /** * The configuration target. You must set the target to `ip6` when specifying an * IPv6 address in the rule. @@ -278,7 +278,7 @@ export namespace AccessRuleCreateParams { value?: string; } - export interface LegacyJhsCIDRConfiguration { + export interface FirewallCIDRConfiguration { /** * The configuration target. You must set the target to `ip_range` when specifying * an IP address range in the rule. @@ -292,7 +292,7 @@ export namespace AccessRuleCreateParams { value?: string; } - export interface LegacyJhsASNConfiguration { + export interface FirewallASNConfiguration { /** * The configuration target. You must set the target to `asn` when specifying an * Autonomous System Number (ASN) in the rule. @@ -305,7 +305,7 @@ export namespace AccessRuleCreateParams { value?: string; } - export interface LegacyJhsCountryConfiguration { + export interface FirewallCountryConfiguration { /** * The configuration target. You must set the target to `country` when specifying a * country code in the rule. @@ -432,11 +432,11 @@ export interface AccessRuleEditParams { * Body param: The rule configuration. */ configuration: - | AccessRuleEditParams.LegacyJhsIPConfiguration - | AccessRuleEditParams.LegacyJhsIPV6Configuration - | AccessRuleEditParams.LegacyJhsCIDRConfiguration - | AccessRuleEditParams.LegacyJhsASNConfiguration - | AccessRuleEditParams.LegacyJhsCountryConfiguration; + | AccessRuleEditParams.FirewallIPConfiguration + | AccessRuleEditParams.FirewallIPV6Configuration + | AccessRuleEditParams.FirewallCIDRConfiguration + | AccessRuleEditParams.FirewallASNConfiguration + | AccessRuleEditParams.FirewallCountryConfiguration; /** * Body param: The action to apply to a matched request. @@ -463,7 +463,7 @@ export interface AccessRuleEditParams { } export namespace AccessRuleEditParams { - export interface LegacyJhsIPConfiguration { + export interface FirewallIPConfiguration { /** * The configuration target. You must set the target to `ip` when specifying an IP * address in the rule. @@ -477,7 +477,7 @@ export namespace AccessRuleEditParams { value?: string; } - export interface LegacyJhsIPV6Configuration { + export interface FirewallIPV6Configuration { /** * The configuration target. You must set the target to `ip6` when specifying an * IPv6 address in the rule. @@ -490,7 +490,7 @@ export namespace AccessRuleEditParams { value?: string; } - export interface LegacyJhsCIDRConfiguration { + export interface FirewallCIDRConfiguration { /** * The configuration target. You must set the target to `ip_range` when specifying * an IP address range in the rule. @@ -504,7 +504,7 @@ export namespace AccessRuleEditParams { value?: string; } - export interface LegacyJhsASNConfiguration { + export interface FirewallASNConfiguration { /** * The configuration target. You must set the target to `asn` when specifying an * Autonomous System Number (ASN) in the rule. @@ -517,7 +517,7 @@ export namespace AccessRuleEditParams { value?: string; } - export interface LegacyJhsCountryConfiguration { + export interface FirewallCountryConfiguration { /** * The configuration target. You must set the target to `country` when specifying a * country code in the rule. diff --git a/src/resources/firewall/firewall.ts b/src/resources/firewall/firewall.ts index 2a3d640807..c1c9817a62 100644 --- a/src/resources/firewall/firewall.ts +++ b/src/resources/firewall/firewall.ts @@ -17,21 +17,24 @@ export class Firewall extends APIResource { export namespace Firewall { export import Lockdowns = LockdownsAPI.Lockdowns; - export import FirewallZoneLockdown = LockdownsAPI.FirewallZoneLockdown; - export import UnnamedSchemaRefA4044d3c73ad1e6c8fff4dc05f922ab5 = LockdownsAPI.UnnamedSchemaRefA4044d3c73ad1e6c8fff4dc05f922ab5; + export import LockdownCreateResponse = LockdownsAPI.LockdownCreateResponse; + export import LockdownUpdateResponse = LockdownsAPI.LockdownUpdateResponse; + export import LockdownListResponse = LockdownsAPI.LockdownListResponse; export import LockdownDeleteResponse = LockdownsAPI.LockdownDeleteResponse; - export import FirewallZoneLockdownsV4PagePaginationArray = LockdownsAPI.FirewallZoneLockdownsV4PagePaginationArray; + export import LockdownGetResponse = LockdownsAPI.LockdownGetResponse; + export import LockdownListResponsesV4PagePaginationArray = LockdownsAPI.LockdownListResponsesV4PagePaginationArray; export import LockdownCreateParams = LockdownsAPI.LockdownCreateParams; export import LockdownUpdateParams = LockdownsAPI.LockdownUpdateParams; export import LockdownListParams = LockdownsAPI.LockdownListParams; export import LockdownDeleteParams = LockdownsAPI.LockdownDeleteParams; export import Rules = RulesAPI.Rules; - export import FirewallFilterRule = RulesAPI.FirewallFilterRule; - export import UnnamedSchemaRef6fe6c1eba94d9c3f475fb22f0118bf57 = RulesAPI.UnnamedSchemaRef6fe6c1eba94d9c3f475fb22f0118bf57; - export import UnnamedSchemaRefAb48d2d33259c9107401d174735701c7 = RulesAPI.UnnamedSchemaRefAb48d2d33259c9107401d174735701c7; export import RuleCreateResponse = RulesAPI.RuleCreateResponse; + export import RuleUpdateResponse = RulesAPI.RuleUpdateResponse; + export import RuleListResponse = RulesAPI.RuleListResponse; + export import RuleDeleteResponse = RulesAPI.RuleDeleteResponse; export import RuleEditResponse = RulesAPI.RuleEditResponse; - export import FirewallFilterRulesV4PagePaginationArray = RulesAPI.FirewallFilterRulesV4PagePaginationArray; + export import RuleGetResponse = RulesAPI.RuleGetResponse; + export import RuleListResponsesV4PagePaginationArray = RulesAPI.RuleListResponsesV4PagePaginationArray; export import RuleCreateParams = RulesAPI.RuleCreateParams; export import RuleUpdateParams = RulesAPI.RuleUpdateParams; export import RuleListParams = RulesAPI.RuleListParams; @@ -48,7 +51,6 @@ export namespace Firewall { export import AccessRuleEditParams = AccessRulesAPI.AccessRuleEditParams; export import AccessRuleGetParams = AccessRulesAPI.AccessRuleGetParams; export import UARules = UARulesAPI.UARules; - export import FirewallUserAgentRule = UARulesAPI.FirewallUserAgentRule; export import UARuleListResponse = UARulesAPI.UARuleListResponse; export import UARuleDeleteResponse = UARulesAPI.UARuleDeleteResponse; export import UARuleListResponsesV4PagePaginationArray = UARulesAPI.UARuleListResponsesV4PagePaginationArray; diff --git a/src/resources/firewall/index.ts b/src/resources/firewall/index.ts index 80701b95dd..909358515e 100644 --- a/src/resources/firewall/index.ts +++ b/src/resources/firewall/index.ts @@ -13,22 +13,35 @@ export { } from './access-rules'; export { Firewall } from './firewall'; export { - FirewallFilterRule, - UnnamedSchemaRef6fe6c1eba94d9c3f475fb22f0118bf57, - UnnamedSchemaRefAb48d2d33259c9107401d174735701c7, + LockdownCreateResponse, + LockdownUpdateResponse, + LockdownListResponse, + LockdownDeleteResponse, + LockdownGetResponse, + LockdownCreateParams, + LockdownUpdateParams, + LockdownListParams, + LockdownDeleteParams, + LockdownListResponsesV4PagePaginationArray, + Lockdowns, +} from './lockdowns'; +export { RuleCreateResponse, + RuleUpdateResponse, + RuleListResponse, + RuleDeleteResponse, RuleEditResponse, + RuleGetResponse, RuleCreateParams, RuleUpdateParams, RuleListParams, RuleDeleteParams, RuleEditParams, RuleGetParams, - FirewallFilterRulesV4PagePaginationArray, + RuleListResponsesV4PagePaginationArray, Rules, } from './rules'; export { - FirewallUserAgentRule, UARuleListResponse, UARuleDeleteResponse, UARuleCreateParams, @@ -38,15 +51,4 @@ export { UARuleListResponsesV4PagePaginationArray, UARules, } from './ua-rules'; -export { - FirewallZoneLockdown, - UnnamedSchemaRefA4044d3c73ad1e6c8fff4dc05f922ab5, - LockdownDeleteResponse, - LockdownCreateParams, - LockdownUpdateParams, - LockdownListParams, - LockdownDeleteParams, - FirewallZoneLockdownsV4PagePaginationArray, - Lockdowns, -} from './lockdowns'; export { WAF } from './waf/index'; diff --git a/src/resources/firewall/lockdowns.ts b/src/resources/firewall/lockdowns.ts index 02991e0f32..ab37075a00 100644 --- a/src/resources/firewall/lockdowns.ts +++ b/src/resources/firewall/lockdowns.ts @@ -14,12 +14,12 @@ export class Lockdowns extends APIResource { zoneIdentifier: string, body: LockdownCreateParams, options?: Core.RequestOptions, - ): Core.APIPromise { + ): Core.APIPromise { return ( this._client.post(`/zones/${zoneIdentifier}/firewall/lockdowns`, { body, ...options, - }) as Core.APIPromise<{ result: FirewallZoneLockdown | null }> + }) as Core.APIPromise<{ result: LockdownCreateResponse }> )._thenUnwrap((obj) => obj.result); } @@ -31,12 +31,12 @@ export class Lockdowns extends APIResource { id: string, body: LockdownUpdateParams, options?: Core.RequestOptions, - ): Core.APIPromise { + ): Core.APIPromise { return ( this._client.put(`/zones/${zoneIdentifier}/firewall/lockdowns/${id}`, { body, ...options, - }) as Core.APIPromise<{ result: FirewallZoneLockdown | null }> + }) as Core.APIPromise<{ result: LockdownUpdateResponse }> )._thenUnwrap((obj) => obj.result); } @@ -48,22 +48,22 @@ export class Lockdowns extends APIResource { zoneIdentifier: string, query?: LockdownListParams, options?: Core.RequestOptions, - ): Core.PagePromise; + ): Core.PagePromise; list( zoneIdentifier: string, options?: Core.RequestOptions, - ): Core.PagePromise; + ): Core.PagePromise; list( zoneIdentifier: string, query: LockdownListParams | Core.RequestOptions = {}, options?: Core.RequestOptions, - ): Core.PagePromise { + ): Core.PagePromise { if (isRequestOptions(query)) { return this.list(zoneIdentifier, {}, query); } return this._client.getAPIList( `/zones/${zoneIdentifier}/firewall/lockdowns`, - FirewallZoneLockdownsV4PagePaginationArray, + LockdownListResponsesV4PagePaginationArray, { query, ...options }, ); } @@ -92,18 +92,18 @@ export class Lockdowns extends APIResource { zoneIdentifier: string, id: string, options?: Core.RequestOptions, - ): Core.APIPromise { + ): Core.APIPromise { return ( this._client.get(`/zones/${zoneIdentifier}/firewall/lockdowns/${id}`, options) as Core.APIPromise<{ - result: FirewallZoneLockdown | null; + result: LockdownGetResponse; }> )._thenUnwrap((obj) => obj.result); } } -export class FirewallZoneLockdownsV4PagePaginationArray extends V4PagePaginationArray {} +export class LockdownListResponsesV4PagePaginationArray extends V4PagePaginationArray {} -export interface FirewallZoneLockdown { +export interface LockdownCreateResponse { /** * The unique identifier of the Zone Lockdown rule. */ @@ -115,8 +115,8 @@ export interface FirewallZoneLockdown { * `ip_range` configurations. */ configurations: - | FirewallZoneLockdown.LegacyJhsSchemasIPConfiguration - | FirewallZoneLockdown.LegacyJhsSchemasCIDRConfiguration; + | LockdownCreateResponse.FirewallSchemasIPConfiguration + | LockdownCreateResponse.FirewallSchemasCIDRConfiguration; /** * The timestamp of when the rule was created. @@ -146,8 +146,8 @@ export interface FirewallZoneLockdown { urls: Array; } -export namespace FirewallZoneLockdown { - export interface LegacyJhsSchemasIPConfiguration { +export namespace LockdownCreateResponse { + export interface FirewallSchemasIPConfiguration { /** * The configuration target. You must set the target to `ip` when specifying an IP * address in the Zone Lockdown rule. @@ -161,7 +161,7 @@ export namespace FirewallZoneLockdown { value?: string; } - export interface LegacyJhsSchemasCIDRConfiguration { + export interface FirewallSchemasCIDRConfiguration { /** * The configuration target. You must set the target to `ip_range` when specifying * an IP address range in the Zone Lockdown rule. @@ -175,7 +175,7 @@ export namespace FirewallZoneLockdown { } } -export interface UnnamedSchemaRefA4044d3c73ad1e6c8fff4dc05f922ab5 { +export interface LockdownUpdateResponse { /** * The unique identifier of the Zone Lockdown rule. */ @@ -187,8 +187,8 @@ export interface UnnamedSchemaRefA4044d3c73ad1e6c8fff4dc05f922ab5 { * `ip_range` configurations. */ configurations: - | UnnamedSchemaRefA4044d3c73ad1e6c8fff4dc05f922ab5.LegacyJhsSchemasIPConfiguration - | UnnamedSchemaRefA4044d3c73ad1e6c8fff4dc05f922ab5.LegacyJhsSchemasCIDRConfiguration; + | LockdownUpdateResponse.FirewallSchemasIPConfiguration + | LockdownUpdateResponse.FirewallSchemasCIDRConfiguration; /** * The timestamp of when the rule was created. @@ -218,8 +218,8 @@ export interface UnnamedSchemaRefA4044d3c73ad1e6c8fff4dc05f922ab5 { urls: Array; } -export namespace UnnamedSchemaRefA4044d3c73ad1e6c8fff4dc05f922ab5 { - export interface LegacyJhsSchemasIPConfiguration { +export namespace LockdownUpdateResponse { + export interface FirewallSchemasIPConfiguration { /** * The configuration target. You must set the target to `ip` when specifying an IP * address in the Zone Lockdown rule. @@ -233,7 +233,79 @@ export namespace UnnamedSchemaRefA4044d3c73ad1e6c8fff4dc05f922ab5 { value?: string; } - export interface LegacyJhsSchemasCIDRConfiguration { + export interface FirewallSchemasCIDRConfiguration { + /** + * The configuration target. You must set the target to `ip_range` when specifying + * an IP address range in the Zone Lockdown rule. + */ + target?: 'ip_range'; + + /** + * The IP address range to match. You can only use prefix lengths `/16` and `/24`. + */ + value?: string; + } +} + +export interface LockdownListResponse { + /** + * The unique identifier of the Zone Lockdown rule. + */ + id: string; + + /** + * A list of IP addresses or CIDR ranges that will be allowed to access the URLs + * specified in the Zone Lockdown rule. You can include any number of `ip` or + * `ip_range` configurations. + */ + configurations: + | LockdownListResponse.FirewallSchemasIPConfiguration + | LockdownListResponse.FirewallSchemasCIDRConfiguration; + + /** + * The timestamp of when the rule was created. + */ + created_on: string; + + /** + * An informative summary of the rule. + */ + description: string; + + /** + * The timestamp of when the rule was last modified. + */ + modified_on: string; + + /** + * When true, indicates that the rule is currently paused. + */ + paused: boolean; + + /** + * The URLs to include in the rule definition. You can use wildcards. Each entered + * URL will be escaped before use, which means you can only use simple wildcard + * patterns. + */ + urls: Array; +} + +export namespace LockdownListResponse { + export interface FirewallSchemasIPConfiguration { + /** + * The configuration target. You must set the target to `ip` when specifying an IP + * address in the Zone Lockdown rule. + */ + target?: 'ip'; + + /** + * The IP address to match. This address will be compared to the IP address of + * incoming requests. + */ + value?: string; + } + + export interface FirewallSchemasCIDRConfiguration { /** * The configuration target. You must set the target to `ip_range` when specifying * an IP address range in the Zone Lockdown rule. @@ -254,6 +326,78 @@ export interface LockdownDeleteResponse { id?: string; } +export interface LockdownGetResponse { + /** + * The unique identifier of the Zone Lockdown rule. + */ + id: string; + + /** + * A list of IP addresses or CIDR ranges that will be allowed to access the URLs + * specified in the Zone Lockdown rule. You can include any number of `ip` or + * `ip_range` configurations. + */ + configurations: + | LockdownGetResponse.FirewallSchemasIPConfiguration + | LockdownGetResponse.FirewallSchemasCIDRConfiguration; + + /** + * The timestamp of when the rule was created. + */ + created_on: string; + + /** + * An informative summary of the rule. + */ + description: string; + + /** + * The timestamp of when the rule was last modified. + */ + modified_on: string; + + /** + * When true, indicates that the rule is currently paused. + */ + paused: boolean; + + /** + * The URLs to include in the rule definition. You can use wildcards. Each entered + * URL will be escaped before use, which means you can only use simple wildcard + * patterns. + */ + urls: Array; +} + +export namespace LockdownGetResponse { + export interface FirewallSchemasIPConfiguration { + /** + * The configuration target. You must set the target to `ip` when specifying an IP + * address in the Zone Lockdown rule. + */ + target?: 'ip'; + + /** + * The IP address to match. This address will be compared to the IP address of + * incoming requests. + */ + value?: string; + } + + export interface FirewallSchemasCIDRConfiguration { + /** + * The configuration target. You must set the target to `ip_range` when specifying + * an IP address range in the Zone Lockdown rule. + */ + target?: 'ip_range'; + + /** + * The IP address range to match. You can only use prefix lengths `/16` and `/24`. + */ + value?: string; + } +} + export type LockdownCreateParams = unknown; export type LockdownUpdateParams = unknown; @@ -310,10 +454,12 @@ export interface LockdownListParams extends V4PagePaginationArrayParams { export type LockdownDeleteParams = unknown; export namespace Lockdowns { - export import FirewallZoneLockdown = LockdownsAPI.FirewallZoneLockdown; - export import UnnamedSchemaRefA4044d3c73ad1e6c8fff4dc05f922ab5 = LockdownsAPI.UnnamedSchemaRefA4044d3c73ad1e6c8fff4dc05f922ab5; + export import LockdownCreateResponse = LockdownsAPI.LockdownCreateResponse; + export import LockdownUpdateResponse = LockdownsAPI.LockdownUpdateResponse; + export import LockdownListResponse = LockdownsAPI.LockdownListResponse; export import LockdownDeleteResponse = LockdownsAPI.LockdownDeleteResponse; - export import FirewallZoneLockdownsV4PagePaginationArray = LockdownsAPI.FirewallZoneLockdownsV4PagePaginationArray; + export import LockdownGetResponse = LockdownsAPI.LockdownGetResponse; + export import LockdownListResponsesV4PagePaginationArray = LockdownsAPI.LockdownListResponsesV4PagePaginationArray; export import LockdownCreateParams = LockdownsAPI.LockdownCreateParams; export import LockdownUpdateParams = LockdownsAPI.LockdownUpdateParams; export import LockdownListParams = LockdownsAPI.LockdownListParams; diff --git a/src/resources/firewall/rules.ts b/src/resources/firewall/rules.ts index a6e84278f2..ea9f8c7391 100644 --- a/src/resources/firewall/rules.ts +++ b/src/resources/firewall/rules.ts @@ -4,7 +4,6 @@ import * as Core from 'cloudflare/core'; import { APIResource } from 'cloudflare/resource'; import { isRequestOptions } from 'cloudflare/core'; import * as RulesAPI from 'cloudflare/resources/firewall/rules'; -import * as FiltersAPI from 'cloudflare/resources/filters'; import { V4PagePaginationArray, type V4PagePaginationArrayParams } from 'cloudflare/pagination'; export class Rules extends APIResource { @@ -31,12 +30,12 @@ export class Rules extends APIResource { id: string, body: RuleUpdateParams, options?: Core.RequestOptions, - ): Core.APIPromise { + ): Core.APIPromise { return ( this._client.put(`/zones/${zoneIdentifier}/firewall/rules/${id}`, { body, ...options, - }) as Core.APIPromise<{ result: FirewallFilterRule | null }> + }) as Core.APIPromise<{ result: RuleUpdateResponse }> )._thenUnwrap((obj) => obj.result); } @@ -48,22 +47,22 @@ export class Rules extends APIResource { zoneIdentifier: string, query?: RuleListParams, options?: Core.RequestOptions, - ): Core.PagePromise; + ): Core.PagePromise; list( zoneIdentifier: string, options?: Core.RequestOptions, - ): Core.PagePromise; + ): Core.PagePromise; list( zoneIdentifier: string, query: RuleListParams | Core.RequestOptions = {}, options?: Core.RequestOptions, - ): Core.PagePromise { + ): Core.PagePromise { if (isRequestOptions(query)) { return this.list(zoneIdentifier, {}, query); } return this._client.getAPIList( `/zones/${zoneIdentifier}/firewall/rules`, - FirewallFilterRulesV4PagePaginationArray, + RuleListResponsesV4PagePaginationArray, { query, ...options }, ); } @@ -76,12 +75,12 @@ export class Rules extends APIResource { id: string, body: RuleDeleteParams, options?: Core.RequestOptions, - ): Core.APIPromise { + ): Core.APIPromise { return ( this._client.delete(`/zones/${zoneIdentifier}/firewall/rules/${id}`, { body, ...options, - }) as Core.APIPromise<{ result: FirewallFilterRule | null }> + }) as Core.APIPromise<{ result: RuleDeleteResponse }> )._thenUnwrap((obj) => obj.result); } @@ -109,24 +108,271 @@ export class Rules extends APIResource { zoneIdentifier: string, params: RuleGetParams, options?: Core.RequestOptions, - ): Core.APIPromise { + ): Core.APIPromise { const { path_id, query_id, ...query } = params; return ( this._client.get(`/zones/${zoneIdentifier}/firewall/rules/${path_id}`, { query: { id: query_id, ...query }, ...options, - }) as Core.APIPromise<{ result: FirewallFilterRule | null }> + }) as Core.APIPromise<{ result: RuleGetResponse }> )._thenUnwrap((obj) => obj.result); } } -export class FirewallFilterRulesV4PagePaginationArray extends V4PagePaginationArray {} +export class RuleListResponsesV4PagePaginationArray extends V4PagePaginationArray {} -export interface FirewallFilterRule { +export type RuleCreateResponse = Array; + +export namespace RuleCreateResponse { + export interface RuleCreateResponseItem { + /** + * The unique identifier of the firewall rule. + */ + id: string; + + /** + * The action to apply to a matched request. The `log` action is only available on + * an Enterprise plan. + */ + action: 'block' | 'challenge' | 'js_challenge' | 'managed_challenge' | 'allow' | 'log' | 'bypass'; + + filter: RuleCreateResponseItem.FirewallFilter | RuleCreateResponseItem.FirewallDeletedFilter; + + /** + * When true, indicates that the firewall rule is currently paused. + */ + paused: boolean; + + /** + * An informative summary of the firewall rule. + */ + description?: string; + + /** + * The priority of the rule. Optional value used to define the processing order. A + * lower number indicates a higher priority. If not provided, rules with a defined + * priority will be processed before rules without a priority. + */ + priority?: number; + + products?: Array<'zoneLockdown' | 'uaBlock' | 'bic' | 'hot' | 'securityLevel' | 'rateLimit' | 'waf'>; + + /** + * A short reference tag. Allows you to select related firewall rules. + */ + ref?: string; + } + + export namespace RuleCreateResponseItem { + export interface FirewallFilter { + /** + * The unique identifier of the filter. + */ + id?: string; + + /** + * An informative summary of the filter. + */ + description?: string; + + /** + * The filter expression. For more information, refer to + * [Expressions](https://developers.cloudflare.com/ruleset-engine/rules-language/expressions/). + */ + expression?: string; + + /** + * When true, indicates that the filter is currently paused. + */ + paused?: boolean; + + /** + * A short reference tag. Allows you to select related filters. + */ + ref?: string; + } + + export interface FirewallDeletedFilter { + /** + * The unique identifier of the filter. + */ + id: string; + + /** + * When true, indicates that the firewall rule was deleted. + */ + deleted: boolean; + } + } +} + +export interface RuleUpdateResponse { /** * The unique identifier of the firewall rule. */ - id?: string; + id: string; + + /** + * The action to apply to a matched request. The `log` action is only available on + * an Enterprise plan. + */ + action: 'block' | 'challenge' | 'js_challenge' | 'managed_challenge' | 'allow' | 'log' | 'bypass'; + + filter: RuleUpdateResponse.FirewallFilter | RuleUpdateResponse.FirewallDeletedFilter; + + /** + * When true, indicates that the firewall rule is currently paused. + */ + paused: boolean; + + /** + * An informative summary of the firewall rule. + */ + description?: string; + + /** + * The priority of the rule. Optional value used to define the processing order. A + * lower number indicates a higher priority. If not provided, rules with a defined + * priority will be processed before rules without a priority. + */ + priority?: number; + + products?: Array<'zoneLockdown' | 'uaBlock' | 'bic' | 'hot' | 'securityLevel' | 'rateLimit' | 'waf'>; + + /** + * A short reference tag. Allows you to select related firewall rules. + */ + ref?: string; +} + +export namespace RuleUpdateResponse { + export interface FirewallFilter { + /** + * The unique identifier of the filter. + */ + id?: string; + + /** + * An informative summary of the filter. + */ + description?: string; + + /** + * The filter expression. For more information, refer to + * [Expressions](https://developers.cloudflare.com/ruleset-engine/rules-language/expressions/). + */ + expression?: string; + + /** + * When true, indicates that the filter is currently paused. + */ + paused?: boolean; + + /** + * A short reference tag. Allows you to select related filters. + */ + ref?: string; + } + + export interface FirewallDeletedFilter { + /** + * The unique identifier of the filter. + */ + id: string; + + /** + * When true, indicates that the firewall rule was deleted. + */ + deleted: boolean; + } +} + +export interface RuleListResponse { + /** + * The unique identifier of the firewall rule. + */ + id: string; + + /** + * The action to apply to a matched request. The `log` action is only available on + * an Enterprise plan. + */ + action: 'block' | 'challenge' | 'js_challenge' | 'managed_challenge' | 'allow' | 'log' | 'bypass'; + + filter: RuleListResponse.FirewallFilter | RuleListResponse.FirewallDeletedFilter; + + /** + * When true, indicates that the firewall rule is currently paused. + */ + paused: boolean; + + /** + * An informative summary of the firewall rule. + */ + description?: string; + + /** + * The priority of the rule. Optional value used to define the processing order. A + * lower number indicates a higher priority. If not provided, rules with a defined + * priority will be processed before rules without a priority. + */ + priority?: number; + + products?: Array<'zoneLockdown' | 'uaBlock' | 'bic' | 'hot' | 'securityLevel' | 'rateLimit' | 'waf'>; + + /** + * A short reference tag. Allows you to select related firewall rules. + */ + ref?: string; +} + +export namespace RuleListResponse { + export interface FirewallFilter { + /** + * The unique identifier of the filter. + */ + id?: string; + + /** + * An informative summary of the filter. + */ + description?: string; + + /** + * The filter expression. For more information, refer to + * [Expressions](https://developers.cloudflare.com/ruleset-engine/rules-language/expressions/). + */ + expression?: string; + + /** + * When true, indicates that the filter is currently paused. + */ + paused?: boolean; + + /** + * A short reference tag. Allows you to select related filters. + */ + ref?: string; + } + + export interface FirewallDeletedFilter { + /** + * The unique identifier of the filter. + */ + id: string; + + /** + * When true, indicates that the firewall rule was deleted. + */ + deleted: boolean; + } +} + +export interface RuleDeleteResponse { + /** + * The unique identifier of the firewall rule. + */ + id: string; /** * The action to apply to a matched request. The `log` action is only available on @@ -139,7 +385,7 @@ export interface FirewallFilterRule { */ description?: string; - filter?: UnnamedSchemaRefAb48d2d33259c9107401d174735701c7; + filter?: RuleDeleteResponse.FirewallFilter | RuleDeleteResponse.FirewallDeletedFilter; /** * When true, indicates that the firewall rule is currently paused. @@ -161,14 +407,36 @@ export interface FirewallFilterRule { ref?: string; } -export type UnnamedSchemaRef6fe6c1eba94d9c3f475fb22f0118bf57 = Array; +export namespace RuleDeleteResponse { + export interface FirewallFilter { + /** + * The unique identifier of the filter. + */ + id?: string; + + /** + * An informative summary of the filter. + */ + description?: string; + + /** + * The filter expression. For more information, refer to + * [Expressions](https://developers.cloudflare.com/ruleset-engine/rules-language/expressions/). + */ + expression?: string; + + /** + * When true, indicates that the filter is currently paused. + */ + paused?: boolean; -export type UnnamedSchemaRefAb48d2d33259c9107401d174735701c7 = - | FiltersAPI.FirewallFilter - | UnnamedSchemaRefAb48d2d33259c9107401d174735701c7.LegacyJhsDeletedFilter; + /** + * A short reference tag. Allows you to select related filters. + */ + ref?: string; + } -export namespace UnnamedSchemaRefAb48d2d33259c9107401d174735701c7 { - export interface LegacyJhsDeletedFilter { + export interface FirewallDeletedFilter { /** * The unique identifier of the filter. */ @@ -181,9 +449,171 @@ export namespace UnnamedSchemaRefAb48d2d33259c9107401d174735701c7 { } } -export type RuleCreateResponse = Array; +export type RuleEditResponse = Array; -export type RuleEditResponse = Array; +export namespace RuleEditResponse { + export interface RuleEditResponseItem { + /** + * The unique identifier of the firewall rule. + */ + id: string; + + /** + * The action to apply to a matched request. The `log` action is only available on + * an Enterprise plan. + */ + action: 'block' | 'challenge' | 'js_challenge' | 'managed_challenge' | 'allow' | 'log' | 'bypass'; + + filter: RuleEditResponseItem.FirewallFilter | RuleEditResponseItem.FirewallDeletedFilter; + + /** + * When true, indicates that the firewall rule is currently paused. + */ + paused: boolean; + + /** + * An informative summary of the firewall rule. + */ + description?: string; + + /** + * The priority of the rule. Optional value used to define the processing order. A + * lower number indicates a higher priority. If not provided, rules with a defined + * priority will be processed before rules without a priority. + */ + priority?: number; + + products?: Array<'zoneLockdown' | 'uaBlock' | 'bic' | 'hot' | 'securityLevel' | 'rateLimit' | 'waf'>; + + /** + * A short reference tag. Allows you to select related firewall rules. + */ + ref?: string; + } + + export namespace RuleEditResponseItem { + export interface FirewallFilter { + /** + * The unique identifier of the filter. + */ + id?: string; + + /** + * An informative summary of the filter. + */ + description?: string; + + /** + * The filter expression. For more information, refer to + * [Expressions](https://developers.cloudflare.com/ruleset-engine/rules-language/expressions/). + */ + expression?: string; + + /** + * When true, indicates that the filter is currently paused. + */ + paused?: boolean; + + /** + * A short reference tag. Allows you to select related filters. + */ + ref?: string; + } + + export interface FirewallDeletedFilter { + /** + * The unique identifier of the filter. + */ + id: string; + + /** + * When true, indicates that the firewall rule was deleted. + */ + deleted: boolean; + } + } +} + +export interface RuleGetResponse { + /** + * The unique identifier of the firewall rule. + */ + id: string; + + /** + * The action to apply to a matched request. The `log` action is only available on + * an Enterprise plan. + */ + action: 'block' | 'challenge' | 'js_challenge' | 'managed_challenge' | 'allow' | 'log' | 'bypass'; + + filter: RuleGetResponse.FirewallFilter | RuleGetResponse.FirewallDeletedFilter; + + /** + * When true, indicates that the firewall rule is currently paused. + */ + paused: boolean; + + /** + * An informative summary of the firewall rule. + */ + description?: string; + + /** + * The priority of the rule. Optional value used to define the processing order. A + * lower number indicates a higher priority. If not provided, rules with a defined + * priority will be processed before rules without a priority. + */ + priority?: number; + + products?: Array<'zoneLockdown' | 'uaBlock' | 'bic' | 'hot' | 'securityLevel' | 'rateLimit' | 'waf'>; + + /** + * A short reference tag. Allows you to select related firewall rules. + */ + ref?: string; +} + +export namespace RuleGetResponse { + export interface FirewallFilter { + /** + * The unique identifier of the filter. + */ + id?: string; + + /** + * An informative summary of the filter. + */ + description?: string; + + /** + * The filter expression. For more information, refer to + * [Expressions](https://developers.cloudflare.com/ruleset-engine/rules-language/expressions/). + */ + expression?: string; + + /** + * When true, indicates that the filter is currently paused. + */ + paused?: boolean; + + /** + * A short reference tag. Allows you to select related filters. + */ + ref?: string; + } + + export interface FirewallDeletedFilter { + /** + * The unique identifier of the filter. + */ + id: string; + + /** + * When true, indicates that the firewall rule was deleted. + */ + deleted: boolean; + } +} export type RuleCreateParams = unknown; @@ -234,12 +664,13 @@ export interface RuleGetParams { } export namespace Rules { - export import FirewallFilterRule = RulesAPI.FirewallFilterRule; - export import UnnamedSchemaRef6fe6c1eba94d9c3f475fb22f0118bf57 = RulesAPI.UnnamedSchemaRef6fe6c1eba94d9c3f475fb22f0118bf57; - export import UnnamedSchemaRefAb48d2d33259c9107401d174735701c7 = RulesAPI.UnnamedSchemaRefAb48d2d33259c9107401d174735701c7; export import RuleCreateResponse = RulesAPI.RuleCreateResponse; + export import RuleUpdateResponse = RulesAPI.RuleUpdateResponse; + export import RuleListResponse = RulesAPI.RuleListResponse; + export import RuleDeleteResponse = RulesAPI.RuleDeleteResponse; export import RuleEditResponse = RulesAPI.RuleEditResponse; - export import FirewallFilterRulesV4PagePaginationArray = RulesAPI.FirewallFilterRulesV4PagePaginationArray; + export import RuleGetResponse = RulesAPI.RuleGetResponse; + export import RuleListResponsesV4PagePaginationArray = RulesAPI.RuleListResponsesV4PagePaginationArray; export import RuleCreateParams = RulesAPI.RuleCreateParams; export import RuleUpdateParams = RulesAPI.RuleUpdateParams; export import RuleListParams = RulesAPI.RuleListParams; diff --git a/src/resources/firewall/ua-rules.ts b/src/resources/firewall/ua-rules.ts index ae3400694b..afd852aefa 100644 --- a/src/resources/firewall/ua-rules.ts +++ b/src/resources/firewall/ua-rules.ts @@ -77,12 +77,12 @@ export class UARules extends APIResource { id: string, body: UARuleDeleteParams, options?: Core.RequestOptions, - ): Core.APIPromise { + ): Core.APIPromise { return ( this._client.delete(`/zones/${zoneIdentifier}/firewall/ua_rules/${id}`, { body, ...options, - }) as Core.APIPromise<{ result: UARuleDeleteResponse | null }> + }) as Core.APIPromise<{ result: UARuleDeleteResponse }> )._thenUnwrap((obj) => obj.result); } @@ -104,52 +104,6 @@ export class UARules extends APIResource { export class UARuleListResponsesV4PagePaginationArray extends V4PagePaginationArray {} -export interface FirewallUserAgentRule { - /** - * The unique identifier of the User Agent Blocking rule. - */ - id?: string; - - /** - * The configuration object for the current rule. - */ - configuration?: FirewallUserAgentRule.Configuration; - - /** - * An informative summary of the rule. - */ - description?: string; - - /** - * The action to apply to a matched request. - */ - mode?: 'block' | 'challenge' | 'js_challenge' | 'managed_challenge'; - - /** - * When true, indicates that the rule is currently paused. - */ - paused?: boolean; -} - -export namespace FirewallUserAgentRule { - /** - * The configuration object for the current rule. - */ - export interface Configuration { - /** - * The configuration target for this rule. You must set the target to `ua` for User - * Agent Blocking rules. - */ - target?: string; - - /** - * The exact user agent string to match. This value will be compared to the - * received `User-Agent` HTTP header value. - */ - value?: string; - } -} - export interface UARuleListResponse { /** * The unique identifier of the User Agent Blocking rule. @@ -227,7 +181,6 @@ export interface UARuleListParams extends V4PagePaginationArrayParams { export type UARuleDeleteParams = unknown; export namespace UARules { - export import FirewallUserAgentRule = UARulesAPI.FirewallUserAgentRule; export import UARuleListResponse = UARulesAPI.UARuleListResponse; export import UARuleDeleteResponse = UARulesAPI.UARuleDeleteResponse; export import UARuleListResponsesV4PagePaginationArray = UARulesAPI.UARuleListResponsesV4PagePaginationArray; diff --git a/src/resources/firewall/waf/index.ts b/src/resources/firewall/waf/index.ts index 4fe0712ce5..628fda4d0e 100644 --- a/src/resources/firewall/waf/index.ts +++ b/src/resources/firewall/waf/index.ts @@ -1,21 +1,23 @@ // File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. export { - PackageListResponse, - PackageGetResponse, - PackageListParams, - PackageListResponsesV4PagePaginationArray, - Packages, -} from './packages/index'; -export { - UnnamedSchemaRefA9cc7506f87ce3d646e3794e609120a1, - WAFOverride, + OverrideCreateResponse, + OverrideUpdateResponse, + OverrideListResponse, OverrideDeleteResponse, + OverrideGetResponse, OverrideCreateParams, OverrideUpdateParams, OverrideListParams, OverrideDeleteParams, - WAFOverridesV4PagePaginationArray, + OverrideListResponsesV4PagePaginationArray, Overrides, } from './overrides'; +export { + PackageListResponse, + PackageGetResponse, + PackageListParams, + PackageListResponsesV4PagePaginationArray, + Packages, +} from './packages/index'; export { WAF } from './waf'; diff --git a/src/resources/firewall/waf/overrides.ts b/src/resources/firewall/waf/overrides.ts index 3490949f8d..f2e8c1225b 100644 --- a/src/resources/firewall/waf/overrides.ts +++ b/src/resources/firewall/waf/overrides.ts @@ -17,12 +17,12 @@ export class Overrides extends APIResource { zoneIdentifier: string, body: OverrideCreateParams, options?: Core.RequestOptions, - ): Core.APIPromise { + ): Core.APIPromise { return ( this._client.post(`/zones/${zoneIdentifier}/firewall/waf/overrides`, { body, ...options, - }) as Core.APIPromise<{ result: WAFOverride | null }> + }) as Core.APIPromise<{ result: OverrideCreateResponse }> )._thenUnwrap((obj) => obj.result); } @@ -37,12 +37,12 @@ export class Overrides extends APIResource { id: string, body: OverrideUpdateParams, options?: Core.RequestOptions, - ): Core.APIPromise { + ): Core.APIPromise { return ( this._client.put(`/zones/${zoneIdentifier}/firewall/waf/overrides/${id}`, { body, ...options, - }) as Core.APIPromise<{ result: WAFOverride | null }> + }) as Core.APIPromise<{ result: OverrideUpdateResponse }> )._thenUnwrap((obj) => obj.result); } @@ -56,22 +56,22 @@ export class Overrides extends APIResource { zoneIdentifier: string, query?: OverrideListParams, options?: Core.RequestOptions, - ): Core.PagePromise; + ): Core.PagePromise; list( zoneIdentifier: string, options?: Core.RequestOptions, - ): Core.PagePromise; + ): Core.PagePromise; list( zoneIdentifier: string, query: OverrideListParams | Core.RequestOptions = {}, options?: Core.RequestOptions, - ): Core.PagePromise { + ): Core.PagePromise { if (isRequestOptions(query)) { return this.list(zoneIdentifier, {}, query); } return this._client.getAPIList( `/zones/${zoneIdentifier}/firewall/waf/overrides`, - WAFOverridesV4PagePaginationArray, + OverrideListResponsesV4PagePaginationArray, { query, ...options }, ); } @@ -106,18 +106,18 @@ export class Overrides extends APIResource { zoneIdentifier: string, id: string, options?: Core.RequestOptions, - ): Core.APIPromise { + ): Core.APIPromise { return ( this._client.get(`/zones/${zoneIdentifier}/firewall/waf/overrides/${id}`, options) as Core.APIPromise<{ - result: WAFOverride | null; + result: OverrideGetResponse; }> )._thenUnwrap((obj) => obj.result); } } -export class WAFOverridesV4PagePaginationArray extends V4PagePaginationArray {} +export class OverrideListResponsesV4PagePaginationArray extends V4PagePaginationArray {} -export interface UnnamedSchemaRefA9cc7506f87ce3d646e3794e609120a1 { +export interface OverrideCreateResponse { /** * The unique identifier of the WAF override. */ @@ -153,7 +153,7 @@ export interface UnnamedSchemaRefA9cc7506f87ce3d646e3794e609120a1 { * Specifies that, when a WAF rule matches, its configured action will be replaced * by the action configured in this object. */ - rewrite_action?: UnnamedSchemaRefA9cc7506f87ce3d646e3794e609120a1.RewriteAction; + rewrite_action?: OverrideCreateResponse.RewriteAction; /** * An object that allows you to override the action of specific WAF rules. Each key @@ -172,7 +172,7 @@ export interface UnnamedSchemaRefA9cc7506f87ce3d646e3794e609120a1 { urls?: Array; } -export namespace UnnamedSchemaRefA9cc7506f87ce3d646e3794e609120a1 { +export namespace OverrideCreateResponse { /** * Specifies that, when a WAF rule matches, its configured action will be replaced * by the action configured in this object. @@ -196,7 +196,7 @@ export namespace UnnamedSchemaRefA9cc7506f87ce3d646e3794e609120a1 { } } -export interface WAFOverride { +export interface OverrideUpdateResponse { /** * The unique identifier of the WAF override. */ @@ -232,7 +232,7 @@ export interface WAFOverride { * Specifies that, when a WAF rule matches, its configured action will be replaced * by the action configured in this object. */ - rewrite_action?: WAFOverride.RewriteAction; + rewrite_action?: OverrideUpdateResponse.RewriteAction; /** * An object that allows you to override the action of specific WAF rules. Each key @@ -251,7 +251,86 @@ export interface WAFOverride { urls?: Array; } -export namespace WAFOverride { +export namespace OverrideUpdateResponse { + /** + * Specifies that, when a WAF rule matches, its configured action will be replaced + * by the action configured in this object. + */ + export interface RewriteAction { + /** + * The WAF rule action to apply. + */ + block?: 'challenge' | 'block' | 'simulate' | 'disable' | 'default'; + + challenge?: string; + + default?: string; + + /** + * The WAF rule action to apply. + */ + disable?: 'challenge' | 'block' | 'simulate' | 'disable' | 'default'; + + simulate?: string; + } +} + +export interface OverrideListResponse { + /** + * The unique identifier of the WAF override. + */ + id: string; + + /** + * When true, indicates that the WAF package is currently paused. + */ + paused: boolean; + + /** + * The relative priority of the current URI-based WAF override when multiple + * overrides match a single URL. A lower number indicates higher priority. Higher + * priority overrides may overwrite values set by lower priority overrides. + */ + priority: number; + + /** + * The URLs to include in the current WAF override. You can use wildcards. Each + * entered URL will be escaped before use, which means you can only use simple + * wildcard patterns. + */ + urls: Array; + + /** + * An informative summary of the current URI-based WAF override. + */ + description?: string | null; + + /** + * An object that allows you to enable or disable WAF rule groups for the current + * WAF override. Each key of this object must be the ID of a WAF rule group, and + * each value must be a valid WAF action (usually `default` or `disable`). When + * creating a new URI-based WAF override, you must provide a `groups` object or a + * `rules` object. + */ + groups?: Record; + + /** + * Specifies that, when a WAF rule matches, its configured action will be replaced + * by the action configured in this object. + */ + rewrite_action?: OverrideListResponse.RewriteAction; + + /** + * An object that allows you to override the action of specific WAF rules. Each key + * of this object must be the ID of a WAF rule, and each value must be a valid WAF + * action. Unless you are disabling a rule, ensure that you also enable the rule + * group that this WAF rule belongs to. When creating a new URI-based WAF override, + * you must provide a `groups` object or a `rules` object. + */ + rules?: Record; +} + +export namespace OverrideListResponse { /** * Specifies that, when a WAF rule matches, its configured action will be replaced * by the action configured in this object. @@ -282,6 +361,85 @@ export interface OverrideDeleteResponse { id?: string; } +export interface OverrideGetResponse { + /** + * The unique identifier of the WAF override. + */ + id?: string; + + /** + * An informative summary of the current URI-based WAF override. + */ + description?: string | null; + + /** + * An object that allows you to enable or disable WAF rule groups for the current + * WAF override. Each key of this object must be the ID of a WAF rule group, and + * each value must be a valid WAF action (usually `default` or `disable`). When + * creating a new URI-based WAF override, you must provide a `groups` object or a + * `rules` object. + */ + groups?: Record; + + /** + * When true, indicates that the WAF package is currently paused. + */ + paused?: boolean; + + /** + * The relative priority of the current URI-based WAF override when multiple + * overrides match a single URL. A lower number indicates higher priority. Higher + * priority overrides may overwrite values set by lower priority overrides. + */ + priority?: number; + + /** + * Specifies that, when a WAF rule matches, its configured action will be replaced + * by the action configured in this object. + */ + rewrite_action?: OverrideGetResponse.RewriteAction; + + /** + * An object that allows you to override the action of specific WAF rules. Each key + * of this object must be the ID of a WAF rule, and each value must be a valid WAF + * action. Unless you are disabling a rule, ensure that you also enable the rule + * group that this WAF rule belongs to. When creating a new URI-based WAF override, + * you must provide a `groups` object or a `rules` object. + */ + rules?: Record; + + /** + * The URLs to include in the current WAF override. You can use wildcards. Each + * entered URL will be escaped before use, which means you can only use simple + * wildcard patterns. + */ + urls?: Array; +} + +export namespace OverrideGetResponse { + /** + * Specifies that, when a WAF rule matches, its configured action will be replaced + * by the action configured in this object. + */ + export interface RewriteAction { + /** + * The WAF rule action to apply. + */ + block?: 'challenge' | 'block' | 'simulate' | 'disable' | 'default'; + + challenge?: string; + + default?: string; + + /** + * The WAF rule action to apply. + */ + disable?: 'challenge' | 'block' | 'simulate' | 'disable' | 'default'; + + simulate?: string; + } +} + export type OverrideCreateParams = unknown; export type OverrideUpdateParams = unknown; @@ -291,10 +449,12 @@ export interface OverrideListParams extends V4PagePaginationArrayParams {} export type OverrideDeleteParams = unknown; export namespace Overrides { - export import UnnamedSchemaRefA9cc7506f87ce3d646e3794e609120a1 = OverridesAPI.UnnamedSchemaRefA9cc7506f87ce3d646e3794e609120a1; - export import WAFOverride = OverridesAPI.WAFOverride; + export import OverrideCreateResponse = OverridesAPI.OverrideCreateResponse; + export import OverrideUpdateResponse = OverridesAPI.OverrideUpdateResponse; + export import OverrideListResponse = OverridesAPI.OverrideListResponse; export import OverrideDeleteResponse = OverridesAPI.OverrideDeleteResponse; - export import WAFOverridesV4PagePaginationArray = OverridesAPI.WAFOverridesV4PagePaginationArray; + export import OverrideGetResponse = OverridesAPI.OverrideGetResponse; + export import OverrideListResponsesV4PagePaginationArray = OverridesAPI.OverrideListResponsesV4PagePaginationArray; export import OverrideCreateParams = OverridesAPI.OverrideCreateParams; export import OverrideUpdateParams = OverridesAPI.OverrideUpdateParams; export import OverrideListParams = OverridesAPI.OverrideListParams; diff --git a/src/resources/firewall/waf/packages/groups.ts b/src/resources/firewall/waf/packages/groups.ts index c7ca00e627..eb91fe3320 100644 --- a/src/resources/firewall/waf/packages/groups.ts +++ b/src/resources/firewall/waf/packages/groups.ts @@ -17,11 +17,11 @@ export class Groups extends APIResource { packageId: string, params: GroupListParams, options?: Core.RequestOptions, - ): Core.PagePromise { + ): Core.PagePromise { const { zone_id, ...query } = params; return this._client.getAPIList( `/zones/${zone_id}/firewall/waf/packages/${packageId}/groups`, - WAFManagedRulesGroupsV4PagePaginationArray, + GroupsV4PagePaginationArray, { query, ...options }, ); } @@ -70,9 +70,9 @@ export class Groups extends APIResource { } } -export class WAFManagedRulesGroupsV4PagePaginationArray extends V4PagePaginationArray {} +export class GroupsV4PagePaginationArray extends V4PagePaginationArray {} -export interface WAFManagedRulesGroup { +export interface Group { /** * The unique identifier of the rule group. */ @@ -176,8 +176,8 @@ export interface GroupGetParams { } export namespace Groups { - export import WAFManagedRulesGroup = GroupsAPI.WAFManagedRulesGroup; - export import WAFManagedRulesGroupsV4PagePaginationArray = GroupsAPI.WAFManagedRulesGroupsV4PagePaginationArray; + export import Group = GroupsAPI.Group; + export import GroupsV4PagePaginationArray = GroupsAPI.GroupsV4PagePaginationArray; export import GroupListParams = GroupsAPI.GroupListParams; export import GroupEditParams = GroupsAPI.GroupEditParams; export import GroupGetParams = GroupsAPI.GroupGetParams; diff --git a/src/resources/firewall/waf/packages/index.ts b/src/resources/firewall/waf/packages/index.ts index 770cea0784..0ef7239ab0 100644 --- a/src/resources/firewall/waf/packages/index.ts +++ b/src/resources/firewall/waf/packages/index.ts @@ -1,27 +1,28 @@ // File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. export { - PackageListResponse, - PackageGetResponse, - PackageListParams, - PackageListResponsesV4PagePaginationArray, - Packages, -} from './packages'; -export { + AllowedModesAnomalyItem, + Rule, UnnamedSchemaRef532d8b97684c9032dd36bae8acddebf5, - WAFManagedRulesRule, RuleEditResponse, RuleListParams, RuleEditParams, RuleGetParams, - WAFManagedRulesRulesV4PagePaginationArray, + RulesV4PagePaginationArray, Rules, } from './rules'; export { - WAFManagedRulesGroup, + Group, GroupListParams, GroupEditParams, GroupGetParams, - WAFManagedRulesGroupsV4PagePaginationArray, + GroupsV4PagePaginationArray, Groups, } from './groups'; +export { + PackageListResponse, + PackageGetResponse, + PackageListParams, + PackageListResponsesV4PagePaginationArray, + Packages, +} from './packages'; diff --git a/src/resources/firewall/waf/packages/packages.ts b/src/resources/firewall/waf/packages/packages.ts index 2e74af572f..b4b649d323 100644 --- a/src/resources/firewall/waf/packages/packages.ts +++ b/src/resources/firewall/waf/packages/packages.ts @@ -61,11 +61,11 @@ export class Packages extends APIResource { export class PackageListResponsesV4PagePaginationArray extends V4PagePaginationArray {} export type PackageListResponse = - | PackageListResponse.LegacyJhsAPIResponseCollection + | PackageListResponse.FirewallAPIResponseCollection | PackageListResponse.Result; export namespace PackageListResponse { - export interface LegacyJhsAPIResponseCollection { + export interface FirewallAPIResponseCollection { errors: Array; messages: Array; @@ -77,10 +77,10 @@ export namespace PackageListResponse { */ success: true; - result_info?: LegacyJhsAPIResponseCollection.ResultInfo; + result_info?: FirewallAPIResponseCollection.ResultInfo; } - export namespace LegacyJhsAPIResponseCollection { + export namespace FirewallAPIResponseCollection { export interface ResultInfo { /** * Total number of results for the requested service @@ -105,13 +105,13 @@ export namespace PackageListResponse { } export interface Result { - result?: Array; + result?: Array; } export namespace Result { - export interface LegacyJhsPackageDefinition { + export interface FirewallPackageDefinition { /** - * The unique identifier of a WAF package. + * Identifier */ id: string; @@ -150,9 +150,9 @@ export namespace PackageListResponse { status?: 'active'; } - export interface LegacyJhsAnomalyPackage { + export interface FirewallAnomalyPackage { /** - * The unique identifier of a WAF package. + * Identifier */ id: string; @@ -197,10 +197,10 @@ export namespace PackageListResponse { } } -export type PackageGetResponse = PackageGetResponse.LegacyJhsAPIResponseSingle | PackageGetResponse.Result; +export type PackageGetResponse = PackageGetResponse.FirewallAPIResponseSingle | PackageGetResponse.Result; export namespace PackageGetResponse { - export interface LegacyJhsAPIResponseSingle { + export interface FirewallAPIResponseSingle { errors: Array; messages: Array; @@ -247,16 +247,17 @@ export namespace Packages { export import PackageListResponsesV4PagePaginationArray = PackagesAPI.PackageListResponsesV4PagePaginationArray; export import PackageListParams = PackagesAPI.PackageListParams; export import Groups = GroupsAPI.Groups; - export import WAFManagedRulesGroup = GroupsAPI.WAFManagedRulesGroup; - export import WAFManagedRulesGroupsV4PagePaginationArray = GroupsAPI.WAFManagedRulesGroupsV4PagePaginationArray; + export import Group = GroupsAPI.Group; + export import GroupsV4PagePaginationArray = GroupsAPI.GroupsV4PagePaginationArray; export import GroupListParams = GroupsAPI.GroupListParams; export import GroupEditParams = GroupsAPI.GroupEditParams; export import GroupGetParams = GroupsAPI.GroupGetParams; export import Rules = RulesAPI.Rules; + export import AllowedModesAnomalyItem = RulesAPI.AllowedModesAnomalyItem; + export import Rule = RulesAPI.Rule; export import UnnamedSchemaRef532d8b97684c9032dd36bae8acddebf5 = RulesAPI.UnnamedSchemaRef532d8b97684c9032dd36bae8acddebf5; - export import WAFManagedRulesRule = RulesAPI.WAFManagedRulesRule; export import RuleEditResponse = RulesAPI.RuleEditResponse; - export import WAFManagedRulesRulesV4PagePaginationArray = RulesAPI.WAFManagedRulesRulesV4PagePaginationArray; + export import RulesV4PagePaginationArray = RulesAPI.RulesV4PagePaginationArray; export import RuleListParams = RulesAPI.RuleListParams; export import RuleEditParams = RulesAPI.RuleEditParams; export import RuleGetParams = RulesAPI.RuleGetParams; diff --git a/src/resources/firewall/waf/packages/rules.ts b/src/resources/firewall/waf/packages/rules.ts index 9a1b2b0045..3b9001b8bd 100644 --- a/src/resources/firewall/waf/packages/rules.ts +++ b/src/resources/firewall/waf/packages/rules.ts @@ -17,11 +17,11 @@ export class Rules extends APIResource { packageId: string, params: RuleListParams, options?: Core.RequestOptions, - ): Core.PagePromise { + ): Core.PagePromise { const { zone_id, ...query } = params; return this._client.getAPIList( `/zones/${zone_id}/firewall/waf/packages/${packageId}/rules`, - WAFManagedRulesRulesV4PagePaginationArray, + RulesV4PagePaginationArray, { query, ...options }, ); } @@ -69,22 +69,13 @@ export class Rules extends APIResource { } } -export class WAFManagedRulesRulesV4PagePaginationArray extends V4PagePaginationArray {} +export class RulesV4PagePaginationArray extends V4PagePaginationArray {} /** - * The rule group to which the current WAF rule belongs. + * When set to `on`, the current WAF rule will be used when evaluating the request. + * Applies to anomaly detection WAF rules. */ -export interface UnnamedSchemaRef532d8b97684c9032dd36bae8acddebf5 { - /** - * The unique identifier of the rule group. - */ - id?: string; - - /** - * The name of the rule group. - */ - name?: string; -} +export type AllowedModesAnomalyItem = 'on' | 'off'; /** * When triggered, anomaly detection WAF rules contribute to an overall threat @@ -92,12 +83,12 @@ export interface UnnamedSchemaRef532d8b97684c9032dd36bae8acddebf5 { * configure the total scoring threshold through the 'sensitivity' property of the * WAF package. */ -export type WAFManagedRulesRule = - | WAFManagedRulesRule.WAFManagedRulesAnomalyRule - | WAFManagedRulesRule.WAFManagedRulesTraditionalDenyRule - | WAFManagedRulesRule.WAFManagedRulesTraditionalAllowRule; +export type Rule = + | Rule.WAFManagedRulesAnomalyRule + | Rule.WAFManagedRulesTraditionalDenyRule + | Rule.WAFManagedRulesTraditionalAllowRule; -export namespace WAFManagedRulesRule { +export namespace Rule { /** * When triggered, anomaly detection WAF rules contribute to an overall threat * score that will determine if a request is considered malicious. You can @@ -114,7 +105,7 @@ export namespace WAFManagedRulesRule { * Defines the available modes for the current WAF rule. Applies to anomaly * detection WAF rules. */ - allowed_modes: Array<'on' | 'off'>; + allowed_modes: Array; /** * The public description of the WAF rule. @@ -238,6 +229,21 @@ export namespace WAFManagedRulesRule { } } +/** + * The rule group to which the current WAF rule belongs. + */ +export interface UnnamedSchemaRef532d8b97684c9032dd36bae8acddebf5 { + /** + * The unique identifier of the rule group. + */ + id?: string; + + /** + * The name of the rule group. + */ + name?: string; +} + /** * When triggered, anomaly detection WAF rules contribute to an overall threat * score that will determine if a request is considered malicious. You can @@ -266,7 +272,7 @@ export namespace RuleEditResponse { * Defines the available modes for the current WAF rule. Applies to anomaly * detection WAF rules. */ - allowed_modes: Array<'on' | 'off'>; + allowed_modes: Array; /** * The public description of the WAF rule. @@ -455,10 +461,11 @@ export interface RuleGetParams { } export namespace Rules { + export import AllowedModesAnomalyItem = RulesAPI.AllowedModesAnomalyItem; + export import Rule = RulesAPI.Rule; export import UnnamedSchemaRef532d8b97684c9032dd36bae8acddebf5 = RulesAPI.UnnamedSchemaRef532d8b97684c9032dd36bae8acddebf5; - export import WAFManagedRulesRule = RulesAPI.WAFManagedRulesRule; export import RuleEditResponse = RulesAPI.RuleEditResponse; - export import WAFManagedRulesRulesV4PagePaginationArray = RulesAPI.WAFManagedRulesRulesV4PagePaginationArray; + export import RulesV4PagePaginationArray = RulesAPI.RulesV4PagePaginationArray; export import RuleListParams = RulesAPI.RuleListParams; export import RuleEditParams = RulesAPI.RuleEditParams; export import RuleGetParams = RulesAPI.RuleGetParams; diff --git a/src/resources/firewall/waf/waf.ts b/src/resources/firewall/waf/waf.ts index 0dc469611f..26c1a6a6b0 100644 --- a/src/resources/firewall/waf/waf.ts +++ b/src/resources/firewall/waf/waf.ts @@ -11,10 +11,12 @@ export class WAF extends APIResource { export namespace WAF { export import Overrides = OverridesAPI.Overrides; - export import UnnamedSchemaRefA9cc7506f87ce3d646e3794e609120a1 = OverridesAPI.UnnamedSchemaRefA9cc7506f87ce3d646e3794e609120a1; - export import WAFOverride = OverridesAPI.WAFOverride; + export import OverrideCreateResponse = OverridesAPI.OverrideCreateResponse; + export import OverrideUpdateResponse = OverridesAPI.OverrideUpdateResponse; + export import OverrideListResponse = OverridesAPI.OverrideListResponse; export import OverrideDeleteResponse = OverridesAPI.OverrideDeleteResponse; - export import WAFOverridesV4PagePaginationArray = OverridesAPI.WAFOverridesV4PagePaginationArray; + export import OverrideGetResponse = OverridesAPI.OverrideGetResponse; + export import OverrideListResponsesV4PagePaginationArray = OverridesAPI.OverrideListResponsesV4PagePaginationArray; export import OverrideCreateParams = OverridesAPI.OverrideCreateParams; export import OverrideUpdateParams = OverridesAPI.OverrideUpdateParams; export import OverrideListParams = OverridesAPI.OverrideListParams; diff --git a/src/resources/healthchecks/healthchecks.ts b/src/resources/healthchecks/healthchecks.ts index 8ad4ddd160..e9975e8208 100644 --- a/src/resources/healthchecks/healthchecks.ts +++ b/src/resources/healthchecks/healthchecks.ts @@ -2,7 +2,6 @@ import * as Core from 'cloudflare/core'; import { APIResource } from 'cloudflare/resource'; -import * as HealthchecksAPI from 'cloudflare/resources/healthchecks/healthchecks'; import * as PreviewsAPI from 'cloudflare/resources/healthchecks/previews'; import { SinglePage } from 'cloudflare/pagination'; @@ -102,6 +101,29 @@ export class Healthchecks extends APIResource { export class HealthchecksSinglePage extends SinglePage {} +/** + * WNAM: Western North America, ENAM: Eastern North America, WEU: Western Europe, + * EEU: Eastern Europe, NSAM: Northern South America, SSAM: Southern South America, + * OC: Oceania, ME: Middle East, NAF: North Africa, SAF: South Africa, IN: India, + * SEAS: South East Asia, NEAS: North East Asia, ALL_REGIONS: all regions (BUSINESS + * and ENTERPRISE customers only). + */ +export type CheckRegionItem = + | 'WNAM' + | 'ENAM' + | 'WEU' + | 'EEU' + | 'NSAM' + | 'SSAM' + | 'OC' + | 'ME' + | 'NAF' + | 'SAF' + | 'IN' + | 'SEAS' + | 'NEAS' + | 'ALL_REGIONS'; + export interface Healthcheck { /** * Identifier @@ -117,22 +139,7 @@ export interface Healthcheck { * A list of regions from which to run health checks. Null means Cloudflare will * pick a default region. */ - check_regions?: Array< - | 'WNAM' - | 'ENAM' - | 'WEU' - | 'EEU' - | 'NSAM' - | 'SSAM' - | 'OC' - | 'ME' - | 'NAF' - | 'SAF' - | 'IN' - | 'SEAS' - | 'NEAS' - | 'ALL_REGIONS' - > | null; + check_regions?: Array | null; /** * The number of consecutive fails required from a health check before changing the @@ -161,7 +168,7 @@ export interface Healthcheck { /** * Parameters specific to an HTTP or HTTPS health check. */ - http_config?: Healthcheck.HTTPConfig | null; + http_config?: HTTPConfiguration | null; /** * The interval between each health check. Shorter intervals may give quicker @@ -197,7 +204,7 @@ export interface Healthcheck { /** * Parameters specific to TCP health check. */ - tcp_config?: Healthcheck.TcpConfig | null; + tcp_config?: TCPConfiguration | null; /** * The timeout (in seconds) before marking the health check as failed. @@ -211,70 +218,143 @@ export interface Healthcheck { type?: string; } -export namespace Healthcheck { +/** + * Parameters specific to an HTTP or HTTPS health check. + */ +export interface HTTPConfiguration { + /** + * Do not validate the certificate when the health check uses HTTPS. + */ + allow_insecure?: boolean; + + /** + * A case-insensitive sub-string to look for in the response body. If this string + * is not found, the origin will be marked as unhealthy. + */ + expected_body?: string; + + /** + * The expected HTTP response codes (e.g. "200") or code ranges (e.g. "2xx" for all + * codes starting with 2) of the health check. + */ + expected_codes?: Array | null; + + /** + * Follow redirects if the origin returns a 3xx status code. + */ + follow_redirects?: boolean; + + /** + * The HTTP request headers to send in the health check. It is recommended you set + * a Host header by default. The User-Agent header cannot be overridden. + */ + header?: unknown | null; + + /** + * The HTTP method to use for the health check. + */ + method?: 'GET' | 'HEAD'; + + /** + * The endpoint path to health check against. + */ + path?: string; + + /** + * Port number to connect to for the health check. Defaults to 80 if type is HTTP + * or 443 if type is HTTPS. + */ + port?: number; +} + +export interface QueryHealthcheck { + /** + * The hostname or IP address of the origin server to run health checks on. + */ + address: string; + + /** + * A short name to identify the health check. Only alphanumeric characters, hyphens + * and underscores are allowed. + */ + name: string; + + /** + * A list of regions from which to run health checks. Null means Cloudflare will + * pick a default region. + */ + check_regions?: Array | null; + + /** + * The number of consecutive fails required from a health check before changing the + * health to unhealthy. + */ + consecutive_fails?: number; + + /** + * The number of consecutive successes required from a health check before changing + * the health to healthy. + */ + consecutive_successes?: number; + + /** + * A human-readable description of the health check. + */ + description?: string; + /** * Parameters specific to an HTTP or HTTPS health check. */ - export interface HTTPConfig { - /** - * Do not validate the certificate when the health check uses HTTPS. - */ - allow_insecure?: boolean; - - /** - * A case-insensitive sub-string to look for in the response body. If this string - * is not found, the origin will be marked as unhealthy. - */ - expected_body?: string; - - /** - * The expected HTTP response codes (e.g. "200") or code ranges (e.g. "2xx" for all - * codes starting with 2) of the health check. - */ - expected_codes?: Array | null; - - /** - * Follow redirects if the origin returns a 3xx status code. - */ - follow_redirects?: boolean; - - /** - * The HTTP request headers to send in the health check. It is recommended you set - * a Host header by default. The User-Agent header cannot be overridden. - */ - header?: unknown | null; - - /** - * The HTTP method to use for the health check. - */ - method?: 'GET' | 'HEAD'; - - /** - * The endpoint path to health check against. - */ - path?: string; - - /** - * Port number to connect to for the health check. Defaults to 80 if type is HTTP - * or 443 if type is HTTPS. - */ - port?: number; - } + http_config?: HTTPConfiguration | null; + + /** + * The interval between each health check. Shorter intervals may give quicker + * notifications if the origin status changes, but will increase load on the origin + * as we check from multiple locations. + */ + interval?: number; + + /** + * The number of retries to attempt in case of a timeout before marking the origin + * as unhealthy. Retries are attempted immediately. + */ + retries?: number; + + /** + * If suspended, no health checks are sent to the origin. + */ + suspended?: boolean; /** * Parameters specific to TCP health check. */ - export interface TcpConfig { - /** - * The TCP connection method to use for the health check. - */ - method?: 'connection_established'; + tcp_config?: TCPConfiguration | null; - /** - * Port number to connect to for the health check. Defaults to 80. - */ - port?: number; - } + /** + * The timeout (in seconds) before marking the health check as failed. + */ + timeout?: number; + + /** + * The protocol to use for the health check. Currently supported protocols are + * 'HTTP', 'HTTPS' and 'TCP'. + */ + type?: string; +} + +/** + * Parameters specific to TCP health check. + */ +export interface TCPConfiguration { + /** + * The TCP connection method to use for the health check. + */ + method?: 'connection_established'; + + /** + * Port number to connect to for the health check. Defaults to 80. + */ + port?: number; } export interface UnnamedSchemaRefAaa560acadcbf1ae1dc619ba1ea5948e { @@ -292,22 +372,7 @@ export interface UnnamedSchemaRefAaa560acadcbf1ae1dc619ba1ea5948e { * A list of regions from which to run health checks. Null means Cloudflare will * pick a default region. */ - check_regions?: Array< - | 'WNAM' - | 'ENAM' - | 'WEU' - | 'EEU' - | 'NSAM' - | 'SSAM' - | 'OC' - | 'ME' - | 'NAF' - | 'SAF' - | 'IN' - | 'SEAS' - | 'NEAS' - | 'ALL_REGIONS' - > | null; + check_regions?: Array | null; /** * The number of consecutive fails required from a health check before changing the @@ -336,7 +401,7 @@ export interface UnnamedSchemaRefAaa560acadcbf1ae1dc619ba1ea5948e { /** * Parameters specific to an HTTP or HTTPS health check. */ - http_config?: UnnamedSchemaRefAaa560acadcbf1ae1dc619ba1ea5948e.HTTPConfig | null; + http_config?: HTTPConfiguration | null; /** * The interval between each health check. Shorter intervals may give quicker @@ -372,7 +437,7 @@ export interface UnnamedSchemaRefAaa560acadcbf1ae1dc619ba1ea5948e { /** * Parameters specific to TCP health check. */ - tcp_config?: UnnamedSchemaRefAaa560acadcbf1ae1dc619ba1ea5948e.TcpConfig | null; + tcp_config?: TCPConfiguration | null; /** * The timeout (in seconds) before marking the health check as failed. @@ -386,72 +451,6 @@ export interface UnnamedSchemaRefAaa560acadcbf1ae1dc619ba1ea5948e { type?: string; } -export namespace UnnamedSchemaRefAaa560acadcbf1ae1dc619ba1ea5948e { - /** - * Parameters specific to an HTTP or HTTPS health check. - */ - export interface HTTPConfig { - /** - * Do not validate the certificate when the health check uses HTTPS. - */ - allow_insecure?: boolean; - - /** - * A case-insensitive sub-string to look for in the response body. If this string - * is not found, the origin will be marked as unhealthy. - */ - expected_body?: string; - - /** - * The expected HTTP response codes (e.g. "200") or code ranges (e.g. "2xx" for all - * codes starting with 2) of the health check. - */ - expected_codes?: Array | null; - - /** - * Follow redirects if the origin returns a 3xx status code. - */ - follow_redirects?: boolean; - - /** - * The HTTP request headers to send in the health check. It is recommended you set - * a Host header by default. The User-Agent header cannot be overridden. - */ - header?: unknown | null; - - /** - * The HTTP method to use for the health check. - */ - method?: 'GET' | 'HEAD'; - - /** - * The endpoint path to health check against. - */ - path?: string; - - /** - * Port number to connect to for the health check. Defaults to 80 if type is HTTP - * or 443 if type is HTTPS. - */ - port?: number; - } - - /** - * Parameters specific to TCP health check. - */ - export interface TcpConfig { - /** - * The TCP connection method to use for the health check. - */ - method?: 'connection_established'; - - /** - * Port number to connect to for the health check. Defaults to 80. - */ - port?: number; - } -} - export interface HealthcheckDeleteResponse { /** * Identifier @@ -481,22 +480,7 @@ export interface HealthcheckCreateParams { * Body param: A list of regions from which to run health checks. Null means * Cloudflare will pick a default region. */ - check_regions?: Array< - | 'WNAM' - | 'ENAM' - | 'WEU' - | 'EEU' - | 'NSAM' - | 'SSAM' - | 'OC' - | 'ME' - | 'NAF' - | 'SAF' - | 'IN' - | 'SEAS' - | 'NEAS' - | 'ALL_REGIONS' - > | null; + check_regions?: Array | null; /** * Body param: The number of consecutive fails required from a health check before @@ -518,7 +502,7 @@ export interface HealthcheckCreateParams { /** * Body param: Parameters specific to an HTTP or HTTPS health check. */ - http_config?: HealthcheckCreateParams.HTTPConfig | null; + http_config?: HTTPConfiguration | null; /** * Body param: The interval between each health check. Shorter intervals may give @@ -541,7 +525,7 @@ export interface HealthcheckCreateParams { /** * Body param: Parameters specific to TCP health check. */ - tcp_config?: HealthcheckCreateParams.TcpConfig | null; + tcp_config?: TCPConfiguration | null; /** * Body param: The timeout (in seconds) before marking the health check as failed. @@ -555,72 +539,6 @@ export interface HealthcheckCreateParams { type?: string; } -export namespace HealthcheckCreateParams { - /** - * Parameters specific to an HTTP or HTTPS health check. - */ - export interface HTTPConfig { - /** - * Do not validate the certificate when the health check uses HTTPS. - */ - allow_insecure?: boolean; - - /** - * A case-insensitive sub-string to look for in the response body. If this string - * is not found, the origin will be marked as unhealthy. - */ - expected_body?: string; - - /** - * The expected HTTP response codes (e.g. "200") or code ranges (e.g. "2xx" for all - * codes starting with 2) of the health check. - */ - expected_codes?: Array | null; - - /** - * Follow redirects if the origin returns a 3xx status code. - */ - follow_redirects?: boolean; - - /** - * The HTTP request headers to send in the health check. It is recommended you set - * a Host header by default. The User-Agent header cannot be overridden. - */ - header?: unknown | null; - - /** - * The HTTP method to use for the health check. - */ - method?: 'GET' | 'HEAD'; - - /** - * The endpoint path to health check against. - */ - path?: string; - - /** - * Port number to connect to for the health check. Defaults to 80 if type is HTTP - * or 443 if type is HTTPS. - */ - port?: number; - } - - /** - * Parameters specific to TCP health check. - */ - export interface TcpConfig { - /** - * The TCP connection method to use for the health check. - */ - method?: 'connection_established'; - - /** - * Port number to connect to for the health check. Defaults to 80. - */ - port?: number; - } -} - export interface HealthcheckUpdateParams { /** * Path param: Identifier @@ -643,22 +561,7 @@ export interface HealthcheckUpdateParams { * Body param: A list of regions from which to run health checks. Null means * Cloudflare will pick a default region. */ - check_regions?: Array< - | 'WNAM' - | 'ENAM' - | 'WEU' - | 'EEU' - | 'NSAM' - | 'SSAM' - | 'OC' - | 'ME' - | 'NAF' - | 'SAF' - | 'IN' - | 'SEAS' - | 'NEAS' - | 'ALL_REGIONS' - > | null; + check_regions?: Array | null; /** * Body param: The number of consecutive fails required from a health check before @@ -680,7 +583,7 @@ export interface HealthcheckUpdateParams { /** * Body param: Parameters specific to an HTTP or HTTPS health check. */ - http_config?: HealthcheckUpdateParams.HTTPConfig | null; + http_config?: HTTPConfiguration | null; /** * Body param: The interval between each health check. Shorter intervals may give @@ -703,7 +606,7 @@ export interface HealthcheckUpdateParams { /** * Body param: Parameters specific to TCP health check. */ - tcp_config?: HealthcheckUpdateParams.TcpConfig | null; + tcp_config?: TCPConfiguration | null; /** * Body param: The timeout (in seconds) before marking the health check as failed. @@ -717,72 +620,6 @@ export interface HealthcheckUpdateParams { type?: string; } -export namespace HealthcheckUpdateParams { - /** - * Parameters specific to an HTTP or HTTPS health check. - */ - export interface HTTPConfig { - /** - * Do not validate the certificate when the health check uses HTTPS. - */ - allow_insecure?: boolean; - - /** - * A case-insensitive sub-string to look for in the response body. If this string - * is not found, the origin will be marked as unhealthy. - */ - expected_body?: string; - - /** - * The expected HTTP response codes (e.g. "200") or code ranges (e.g. "2xx" for all - * codes starting with 2) of the health check. - */ - expected_codes?: Array | null; - - /** - * Follow redirects if the origin returns a 3xx status code. - */ - follow_redirects?: boolean; - - /** - * The HTTP request headers to send in the health check. It is recommended you set - * a Host header by default. The User-Agent header cannot be overridden. - */ - header?: unknown | null; - - /** - * The HTTP method to use for the health check. - */ - method?: 'GET' | 'HEAD'; - - /** - * The endpoint path to health check against. - */ - path?: string; - - /** - * Port number to connect to for the health check. Defaults to 80 if type is HTTP - * or 443 if type is HTTPS. - */ - port?: number; - } - - /** - * Parameters specific to TCP health check. - */ - export interface TcpConfig { - /** - * The TCP connection method to use for the health check. - */ - method?: 'connection_established'; - - /** - * Port number to connect to for the health check. Defaults to 80. - */ - port?: number; - } -} - export interface HealthcheckListParams { /** * Identifier @@ -824,22 +661,7 @@ export interface HealthcheckEditParams { * Body param: A list of regions from which to run health checks. Null means * Cloudflare will pick a default region. */ - check_regions?: Array< - | 'WNAM' - | 'ENAM' - | 'WEU' - | 'EEU' - | 'NSAM' - | 'SSAM' - | 'OC' - | 'ME' - | 'NAF' - | 'SAF' - | 'IN' - | 'SEAS' - | 'NEAS' - | 'ALL_REGIONS' - > | null; + check_regions?: Array | null; /** * Body param: The number of consecutive fails required from a health check before @@ -861,7 +683,7 @@ export interface HealthcheckEditParams { /** * Body param: Parameters specific to an HTTP or HTTPS health check. */ - http_config?: HealthcheckEditParams.HTTPConfig | null; + http_config?: HTTPConfiguration | null; /** * Body param: The interval between each health check. Shorter intervals may give @@ -884,7 +706,7 @@ export interface HealthcheckEditParams { /** * Body param: Parameters specific to TCP health check. */ - tcp_config?: HealthcheckEditParams.TcpConfig | null; + tcp_config?: TCPConfiguration | null; /** * Body param: The timeout (in seconds) before marking the health check as failed. @@ -898,72 +720,6 @@ export interface HealthcheckEditParams { type?: string; } -export namespace HealthcheckEditParams { - /** - * Parameters specific to an HTTP or HTTPS health check. - */ - export interface HTTPConfig { - /** - * Do not validate the certificate when the health check uses HTTPS. - */ - allow_insecure?: boolean; - - /** - * A case-insensitive sub-string to look for in the response body. If this string - * is not found, the origin will be marked as unhealthy. - */ - expected_body?: string; - - /** - * The expected HTTP response codes (e.g. "200") or code ranges (e.g. "2xx" for all - * codes starting with 2) of the health check. - */ - expected_codes?: Array | null; - - /** - * Follow redirects if the origin returns a 3xx status code. - */ - follow_redirects?: boolean; - - /** - * The HTTP request headers to send in the health check. It is recommended you set - * a Host header by default. The User-Agent header cannot be overridden. - */ - header?: unknown | null; - - /** - * The HTTP method to use for the health check. - */ - method?: 'GET' | 'HEAD'; - - /** - * The endpoint path to health check against. - */ - path?: string; - - /** - * Port number to connect to for the health check. Defaults to 80 if type is HTTP - * or 443 if type is HTTPS. - */ - port?: number; - } - - /** - * Parameters specific to TCP health check. - */ - export interface TcpConfig { - /** - * The TCP connection method to use for the health check. - */ - method?: 'connection_established'; - - /** - * Port number to connect to for the health check. Defaults to 80. - */ - port?: number; - } -} - export interface HealthcheckGetParams { /** * Identifier @@ -972,16 +728,6 @@ export interface HealthcheckGetParams { } export namespace Healthchecks { - export import Healthcheck = HealthchecksAPI.Healthcheck; - export import UnnamedSchemaRefAaa560acadcbf1ae1dc619ba1ea5948e = HealthchecksAPI.UnnamedSchemaRefAaa560acadcbf1ae1dc619ba1ea5948e; - export import HealthcheckDeleteResponse = HealthchecksAPI.HealthcheckDeleteResponse; - export import HealthchecksSinglePage = HealthchecksAPI.HealthchecksSinglePage; - export import HealthcheckCreateParams = HealthchecksAPI.HealthcheckCreateParams; - export import HealthcheckUpdateParams = HealthchecksAPI.HealthcheckUpdateParams; - export import HealthcheckListParams = HealthchecksAPI.HealthcheckListParams; - export import HealthcheckDeleteParams = HealthchecksAPI.HealthcheckDeleteParams; - export import HealthcheckEditParams = HealthchecksAPI.HealthcheckEditParams; - export import HealthcheckGetParams = HealthchecksAPI.HealthcheckGetParams; export import Previews = PreviewsAPI.Previews; export import PreviewDeleteResponse = PreviewsAPI.PreviewDeleteResponse; export import PreviewCreateParams = PreviewsAPI.PreviewCreateParams; diff --git a/src/resources/healthchecks/index.ts b/src/resources/healthchecks/index.ts index 8e1a0015ad..91364b0b65 100644 --- a/src/resources/healthchecks/index.ts +++ b/src/resources/healthchecks/index.ts @@ -1,18 +1,6 @@ // File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. -export { - Healthcheck, - UnnamedSchemaRefAaa560acadcbf1ae1dc619ba1ea5948e, - HealthcheckDeleteResponse, - HealthcheckCreateParams, - HealthcheckUpdateParams, - HealthcheckListParams, - HealthcheckDeleteParams, - HealthcheckEditParams, - HealthcheckGetParams, - HealthchecksSinglePage, - Healthchecks, -} from './healthchecks'; +export { Healthchecks } from './healthchecks'; export { PreviewDeleteResponse, PreviewCreateParams, diff --git a/src/resources/healthchecks/previews.ts b/src/resources/healthchecks/previews.ts index 054fc7e4ab..e64c03f2f6 100644 --- a/src/resources/healthchecks/previews.ts +++ b/src/resources/healthchecks/previews.ts @@ -85,22 +85,7 @@ export interface PreviewCreateParams { * Body param: A list of regions from which to run health checks. Null means * Cloudflare will pick a default region. */ - check_regions?: Array< - | 'WNAM' - | 'ENAM' - | 'WEU' - | 'EEU' - | 'NSAM' - | 'SSAM' - | 'OC' - | 'ME' - | 'NAF' - | 'SAF' - | 'IN' - | 'SEAS' - | 'NEAS' - | 'ALL_REGIONS' - > | null; + check_regions?: Array | null; /** * Body param: The number of consecutive fails required from a health check before @@ -122,7 +107,7 @@ export interface PreviewCreateParams { /** * Body param: Parameters specific to an HTTP or HTTPS health check. */ - http_config?: PreviewCreateParams.HTTPConfig | null; + http_config?: HealthchecksAPI.HTTPConfiguration | null; /** * Body param: The interval between each health check. Shorter intervals may give @@ -145,7 +130,7 @@ export interface PreviewCreateParams { /** * Body param: Parameters specific to TCP health check. */ - tcp_config?: PreviewCreateParams.TcpConfig | null; + tcp_config?: HealthchecksAPI.TCPConfiguration | null; /** * Body param: The timeout (in seconds) before marking the health check as failed. @@ -159,72 +144,6 @@ export interface PreviewCreateParams { type?: string; } -export namespace PreviewCreateParams { - /** - * Parameters specific to an HTTP or HTTPS health check. - */ - export interface HTTPConfig { - /** - * Do not validate the certificate when the health check uses HTTPS. - */ - allow_insecure?: boolean; - - /** - * A case-insensitive sub-string to look for in the response body. If this string - * is not found, the origin will be marked as unhealthy. - */ - expected_body?: string; - - /** - * The expected HTTP response codes (e.g. "200") or code ranges (e.g. "2xx" for all - * codes starting with 2) of the health check. - */ - expected_codes?: Array | null; - - /** - * Follow redirects if the origin returns a 3xx status code. - */ - follow_redirects?: boolean; - - /** - * The HTTP request headers to send in the health check. It is recommended you set - * a Host header by default. The User-Agent header cannot be overridden. - */ - header?: unknown | null; - - /** - * The HTTP method to use for the health check. - */ - method?: 'GET' | 'HEAD'; - - /** - * The endpoint path to health check against. - */ - path?: string; - - /** - * Port number to connect to for the health check. Defaults to 80 if type is HTTP - * or 443 if type is HTTPS. - */ - port?: number; - } - - /** - * Parameters specific to TCP health check. - */ - export interface TcpConfig { - /** - * The TCP connection method to use for the health check. - */ - method?: 'connection_established'; - - /** - * Port number to connect to for the health check. Defaults to 80. - */ - port?: number; - } -} - export interface PreviewDeleteParams { /** * Path param: Identifier diff --git a/src/resources/hostnames/settings/index.ts b/src/resources/hostnames/settings/index.ts index dd88eefdcb..e10a07e2c8 100644 --- a/src/resources/hostnames/settings/index.ts +++ b/src/resources/hostnames/settings/index.ts @@ -1,8 +1,9 @@ // File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. export { - HostnameSettingDelete, - HostnameStting, + Setting, + SettingValue, + TLSDeleteResponse, TLSGetResponse, TLSUpdateParams, TLSDeleteParams, diff --git a/src/resources/hostnames/settings/settings.ts b/src/resources/hostnames/settings/settings.ts index 21864d9784..01bf6cbd65 100644 --- a/src/resources/hostnames/settings/settings.ts +++ b/src/resources/hostnames/settings/settings.ts @@ -9,8 +9,9 @@ export class Settings extends APIResource { export namespace Settings { export import TLS = TLSAPI.TLS; - export import HostnameSettingDelete = TLSAPI.HostnameSettingDelete; - export import HostnameStting = TLSAPI.HostnameStting; + export import Setting = TLSAPI.Setting; + export import SettingValue = TLSAPI.SettingValue; + export import TLSDeleteResponse = TLSAPI.TLSDeleteResponse; export import TLSGetResponse = TLSAPI.TLSGetResponse; export import TLSUpdateParams = TLSAPI.TLSUpdateParams; export import TLSDeleteParams = TLSAPI.TLSDeleteParams; diff --git a/src/resources/hostnames/settings/tls.ts b/src/resources/hostnames/settings/tls.ts index 8cb72fd3d8..b27f0287c6 100644 --- a/src/resources/hostnames/settings/tls.ts +++ b/src/resources/hostnames/settings/tls.ts @@ -13,13 +13,13 @@ export class TLS extends APIResource { hostname: string, params: TLSUpdateParams, options?: Core.RequestOptions, - ): Core.APIPromise { + ): Core.APIPromise { const { zone_id, ...body } = params; return ( this._client.put(`/zones/${zone_id}/hostnames/settings/${settingId}/${hostname}`, { body, ...options, - }) as Core.APIPromise<{ result: HostnameStting }> + }) as Core.APIPromise<{ result: Setting }> )._thenUnwrap((obj) => obj.result); } @@ -31,13 +31,13 @@ export class TLS extends APIResource { hostname: string, params: TLSDeleteParams, options?: Core.RequestOptions, - ): Core.APIPromise { + ): Core.APIPromise { const { zone_id } = params; return ( this._client.delete( `/zones/${zone_id}/hostnames/settings/${settingId}/${hostname}`, options, - ) as Core.APIPromise<{ result: HostnameSettingDelete }> + ) as Core.APIPromise<{ result: TLSDeleteResponse }> )._thenUnwrap((obj) => obj.result); } @@ -58,7 +58,7 @@ export class TLS extends APIResource { } } -export interface HostnameSettingDelete { +export interface Setting { /** * This is the time the tls setting was originally created for this hostname. */ @@ -69,6 +69,9 @@ export interface HostnameSettingDelete { */ hostname?: string; + /** + * Deployment status for the given tls setting. + */ status?: string; /** @@ -76,10 +79,18 @@ export interface HostnameSettingDelete { */ updated_at?: string; - value?: string; + /** + * The tls setting value. + */ + value?: SettingValue; } -export interface HostnameStting { +/** + * The tls setting value. + */ +export type SettingValue = number | string | Array; + +export interface TLSDeleteResponse { /** * This is the time the tls setting was originally created for this hostname. */ @@ -90,9 +101,6 @@ export interface HostnameStting { */ hostname?: string; - /** - * Deployment status for the given tls setting. - */ status?: string; /** @@ -100,10 +108,7 @@ export interface HostnameStting { */ updated_at?: string; - /** - * The tls setting value. - */ - value?: number | string | Array; + value?: string; } export type TLSGetResponse = Array; @@ -133,7 +138,7 @@ export namespace TLSGetResponse { /** * The tls setting value. */ - value?: number | string | Array; + value?: TLSAPI.SettingValue; } } @@ -146,7 +151,7 @@ export interface TLSUpdateParams { /** * Body param: The tls setting value. */ - value: number | string | Array; + value: SettingValue; } export interface TLSDeleteParams { @@ -164,8 +169,9 @@ export interface TLSGetParams { } export namespace TLS { - export import HostnameSettingDelete = TLSAPI.HostnameSettingDelete; - export import HostnameStting = TLSAPI.HostnameStting; + export import Setting = TLSAPI.Setting; + export import SettingValue = TLSAPI.SettingValue; + export import TLSDeleteResponse = TLSAPI.TLSDeleteResponse; export import TLSGetResponse = TLSAPI.TLSGetResponse; export import TLSUpdateParams = TLSAPI.TLSUpdateParams; export import TLSDeleteParams = TLSAPI.TLSDeleteParams; diff --git a/src/resources/hyperdrive/configs.ts b/src/resources/hyperdrive/configs.ts index 3defddf97e..3859df3536 100644 --- a/src/resources/hyperdrive/configs.ts +++ b/src/resources/hyperdrive/configs.ts @@ -4,7 +4,8 @@ import * as Core from 'cloudflare/core'; import { APIResource } from 'cloudflare/resource'; import * as ConfigsAPI from 'cloudflare/resources/hyperdrive/configs'; import * as Shared from 'cloudflare/resources/shared'; -import { SinglePage } from 'cloudflare/pagination'; +import * as HyperdriveAPI from 'cloudflare/resources/hyperdrive/hyperdrive'; +import { HyperdrivesSinglePage } from 'cloudflare/resources/hyperdrive/hyperdrive'; export class Configs extends APIResource { /** @@ -13,13 +14,13 @@ export class Configs extends APIResource { create( params: ConfigCreateParams, options?: Core.RequestOptions, - ): Core.APIPromise { + ): Core.APIPromise { const { account_id, ...body } = params; return ( this._client.post(`/accounts/${account_id}/hyperdrive/configs`, { body, ...options, - }) as Core.APIPromise<{ result: ConfigCreateResponse | null }> + }) as Core.APIPromise<{ result: HyperdriveAPI.Hyperdrive | null }> )._thenUnwrap((obj) => obj.result); } @@ -30,13 +31,13 @@ export class Configs extends APIResource { hyperdriveId: string, params: ConfigUpdateParams, options?: Core.RequestOptions, - ): Core.APIPromise { + ): Core.APIPromise { const { account_id, ...body } = params; return ( this._client.put(`/accounts/${account_id}/hyperdrive/configs/${hyperdriveId}`, { body, ...options, - }) as Core.APIPromise<{ result: ConfigUpdateResponse | null }> + }) as Core.APIPromise<{ result: HyperdriveAPI.Hyperdrive | null }> )._thenUnwrap((obj) => obj.result); } @@ -46,11 +47,11 @@ export class Configs extends APIResource { list( params: ConfigListParams, options?: Core.RequestOptions, - ): Core.PagePromise { + ): Core.PagePromise { const { account_id } = params; return this._client.getAPIList( `/accounts/${account_id}/hyperdrive/configs`, - ConfigListResponsesSinglePage, + HyperdrivesSinglePage, options, ); } @@ -80,13 +81,13 @@ export class Configs extends APIResource { hyperdriveId: string, params: ConfigEditParams, options?: Core.RequestOptions, - ): Core.APIPromise { + ): Core.APIPromise { const { account_id, ...body } = params; return ( this._client.patch(`/accounts/${account_id}/hyperdrive/configs/${hyperdriveId}`, { body, ...options, - }) as Core.APIPromise<{ result: ConfigEditResponse | null }> + }) as Core.APIPromise<{ result: HyperdriveAPI.Hyperdrive | null }> )._thenUnwrap((obj) => obj.result); } @@ -97,54 +98,17 @@ export class Configs extends APIResource { hyperdriveId: string, params: ConfigGetParams, options?: Core.RequestOptions, - ): Core.APIPromise { + ): Core.APIPromise { const { account_id } = params; return ( this._client.get( `/accounts/${account_id}/hyperdrive/configs/${hyperdriveId}`, options, - ) as Core.APIPromise<{ result: ConfigGetResponse | null }> + ) as Core.APIPromise<{ result: HyperdriveAPI.Hyperdrive | null }> )._thenUnwrap((obj) => obj.result); } } -export class ConfigListResponsesSinglePage extends SinglePage {} - -export interface ConfigCreateResponse { - /** - * Identifier - */ - id?: string; -} - -export interface ConfigUpdateResponse { - /** - * Identifier - */ - id?: string; -} - -export interface ConfigListResponse { - /** - * Identifier - */ - id?: string; -} - -export interface ConfigEditResponse { - /** - * Identifier - */ - id?: string; -} - -export interface ConfigGetResponse { - /** - * Identifier - */ - id?: string; -} - export interface ConfigCreateParams { /** * Path param: Identifier @@ -159,17 +123,7 @@ export interface ConfigCreateParams { /** * Body param: */ - origin: ConfigCreateParams.Origin; -} - -export namespace ConfigCreateParams { - export interface Origin { - /** - * The password required to access your origin database. This value is write-only - * and never returned by the API. - */ - password: string; - } + origin: HyperdriveAPI.Configuration; } export interface ConfigUpdateParams { @@ -186,17 +140,7 @@ export interface ConfigUpdateParams { /** * Body param: */ - origin: ConfigUpdateParams.Origin; -} - -export namespace ConfigUpdateParams { - export interface Origin { - /** - * The password required to access your origin database. This value is write-only - * and never returned by the API. - */ - password: string; - } + origin: HyperdriveAPI.Configuration; } export interface ConfigListParams { @@ -222,17 +166,7 @@ export interface ConfigEditParams { /** * Body param: */ - origin?: ConfigEditParams.Origin; -} - -export namespace ConfigEditParams { - export interface Origin { - /** - * The password required to access your origin database. This value is write-only - * and never returned by the API. - */ - password: string; - } + origin?: HyperdriveAPI.Configuration; } export interface ConfigGetParams { @@ -243,12 +177,6 @@ export interface ConfigGetParams { } export namespace Configs { - export import ConfigCreateResponse = ConfigsAPI.ConfigCreateResponse; - export import ConfigUpdateResponse = ConfigsAPI.ConfigUpdateResponse; - export import ConfigListResponse = ConfigsAPI.ConfigListResponse; - export import ConfigEditResponse = ConfigsAPI.ConfigEditResponse; - export import ConfigGetResponse = ConfigsAPI.ConfigGetResponse; - export import ConfigListResponsesSinglePage = ConfigsAPI.ConfigListResponsesSinglePage; export import ConfigCreateParams = ConfigsAPI.ConfigCreateParams; export import ConfigUpdateParams = ConfigsAPI.ConfigUpdateParams; export import ConfigListParams = ConfigsAPI.ConfigListParams; @@ -256,3 +184,5 @@ export namespace Configs { export import ConfigEditParams = ConfigsAPI.ConfigEditParams; export import ConfigGetParams = ConfigsAPI.ConfigGetParams; } + +export { HyperdrivesSinglePage }; diff --git a/src/resources/hyperdrive/hyperdrive.ts b/src/resources/hyperdrive/hyperdrive.ts index 76485310d2..71eeccfd39 100644 --- a/src/resources/hyperdrive/hyperdrive.ts +++ b/src/resources/hyperdrive/hyperdrive.ts @@ -1,13 +1,23 @@ // File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. import { APIResource } from 'cloudflare/resource'; -import * as HyperdriveAPI from 'cloudflare/resources/hyperdrive/hyperdrive'; import * as ConfigsAPI from 'cloudflare/resources/hyperdrive/configs'; +import { SinglePage } from 'cloudflare/pagination'; export class HyperdriveResource extends APIResource { configs: ConfigsAPI.Configs = new ConfigsAPI.Configs(this._client); } +export class HyperdrivesSinglePage extends SinglePage {} + +export interface Configuration { + /** + * The password required to access your origin database. This value is write-only + * and never returned by the API. + */ + password: string; +} + export interface Hyperdrive { /** * Identifier @@ -16,14 +26,7 @@ export interface Hyperdrive { } export namespace HyperdriveResource { - export import Hyperdrive = HyperdriveAPI.Hyperdrive; export import Configs = ConfigsAPI.Configs; - export import ConfigCreateResponse = ConfigsAPI.ConfigCreateResponse; - export import ConfigUpdateResponse = ConfigsAPI.ConfigUpdateResponse; - export import ConfigListResponse = ConfigsAPI.ConfigListResponse; - export import ConfigEditResponse = ConfigsAPI.ConfigEditResponse; - export import ConfigGetResponse = ConfigsAPI.ConfigGetResponse; - export import ConfigListResponsesSinglePage = ConfigsAPI.ConfigListResponsesSinglePage; export import ConfigCreateParams = ConfigsAPI.ConfigCreateParams; export import ConfigUpdateParams = ConfigsAPI.ConfigUpdateParams; export import ConfigListParams = ConfigsAPI.ConfigListParams; diff --git a/src/resources/hyperdrive/index.ts b/src/resources/hyperdrive/index.ts index c272eefe2b..59ab9d3508 100644 --- a/src/resources/hyperdrive/index.ts +++ b/src/resources/hyperdrive/index.ts @@ -1,18 +1,12 @@ // File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. export { - ConfigCreateResponse, - ConfigUpdateResponse, - ConfigListResponse, - ConfigEditResponse, - ConfigGetResponse, ConfigCreateParams, ConfigUpdateParams, ConfigListParams, ConfigDeleteParams, ConfigEditParams, ConfigGetParams, - ConfigListResponsesSinglePage, Configs, } from './configs'; -export { Hyperdrive, HyperdriveResource } from './hyperdrive'; +export { HyperdriveResource } from './hyperdrive'; diff --git a/src/resources/images/v1/index.ts b/src/resources/images/v1/index.ts index 732b5ecd14..f365643d00 100644 --- a/src/resources/images/v1/index.ts +++ b/src/resources/images/v1/index.ts @@ -14,18 +14,20 @@ export { V1, } from './v1'; export { - ImagesImageKeys, + Key, UnnamedSchemaRef918e794287a67b5e85126e00cf2d9a95, KeyUpdateParams, KeyListParams, KeyDeleteParams, Keys, } from './keys'; -export { ImagesImagesStats, StatGetParams, Stats } from './stats'; +export { Stat, StatGetParams, Stats } from './stats'; export { UnnamedSchemaRefD02195de7dadf27801875f36cddfa3a3, - V1ImageVariant, - V1ImageVariants, + Variant, + VariantCreateResponse, + VariantEditResponse, + VariantGetResponse, VariantCreateParams, VariantListParams, VariantDeleteParams, diff --git a/src/resources/images/v1/keys.ts b/src/resources/images/v1/keys.ts index c26ea20a39..cd918d9d7e 100644 --- a/src/resources/images/v1/keys.ts +++ b/src/resources/images/v1/keys.ts @@ -12,25 +12,23 @@ export class Keys extends APIResource { signingKeyName: string, params: KeyUpdateParams, options?: Core.RequestOptions, - ): Core.APIPromise { + ): Core.APIPromise { const { account_id } = params; return ( this._client.put( `/accounts/${account_id}/images/v1/keys/${signingKeyName}`, options, - ) as Core.APIPromise<{ result: ImagesImageKeys }> + ) as Core.APIPromise<{ result: Key }> )._thenUnwrap((obj) => obj.result); } /** * Lists your signing keys. These can be found on your Cloudflare Images dashboard. */ - list(params: KeyListParams, options?: Core.RequestOptions): Core.APIPromise { + list(params: KeyListParams, options?: Core.RequestOptions): Core.APIPromise { const { account_id } = params; return ( - this._client.get(`/accounts/${account_id}/images/v1/keys`, options) as Core.APIPromise<{ - result: ImagesImageKeys; - }> + this._client.get(`/accounts/${account_id}/images/v1/keys`, options) as Core.APIPromise<{ result: Key }> )._thenUnwrap((obj) => obj.result); } @@ -42,22 +40,22 @@ export class Keys extends APIResource { signingKeyName: string, params: KeyDeleteParams, options?: Core.RequestOptions, - ): Core.APIPromise { + ): Core.APIPromise { const { account_id } = params; return ( this._client.delete( `/accounts/${account_id}/images/v1/keys/${signingKeyName}`, options, - ) as Core.APIPromise<{ result: ImagesImageKeys }> + ) as Core.APIPromise<{ result: Key }> )._thenUnwrap((obj) => obj.result); } } -export interface ImagesImageKeys { - keys?: Array; +export interface Key { + keys?: Array; } -export namespace ImagesImageKeys { +export namespace Key { export interface Key { /** * Key name. @@ -111,7 +109,7 @@ export interface KeyDeleteParams { } export namespace Keys { - export import ImagesImageKeys = KeysAPI.ImagesImageKeys; + export import Key = KeysAPI.Key; export import UnnamedSchemaRef918e794287a67b5e85126e00cf2d9a95 = KeysAPI.UnnamedSchemaRef918e794287a67b5e85126e00cf2d9a95; export import KeyUpdateParams = KeysAPI.KeyUpdateParams; export import KeyListParams = KeysAPI.KeyListParams; diff --git a/src/resources/images/v1/stats.ts b/src/resources/images/v1/stats.ts index ab7daecbe0..3546a0c74e 100644 --- a/src/resources/images/v1/stats.ts +++ b/src/resources/images/v1/stats.ts @@ -8,21 +8,21 @@ export class Stats extends APIResource { /** * Fetch usage statistics details for Cloudflare Images. */ - get(params: StatGetParams, options?: Core.RequestOptions): Core.APIPromise { + get(params: StatGetParams, options?: Core.RequestOptions): Core.APIPromise { const { account_id } = params; return ( this._client.get(`/accounts/${account_id}/images/v1/stats`, options) as Core.APIPromise<{ - result: ImagesImagesStats; + result: Stat; }> )._thenUnwrap((obj) => obj.result); } } -export interface ImagesImagesStats { - count?: ImagesImagesStats.Count; +export interface Stat { + count?: Stat.Count; } -export namespace ImagesImagesStats { +export namespace Stat { export interface Count { /** * Cloudflare Images allowed usage. @@ -44,6 +44,6 @@ export interface StatGetParams { } export namespace Stats { - export import ImagesImagesStats = StatsAPI.ImagesImagesStats; + export import Stat = StatsAPI.Stat; export import StatGetParams = StatsAPI.StatGetParams; } diff --git a/src/resources/images/v1/v1.ts b/src/resources/images/v1/v1.ts index c37ea3ff9a..7d6b8c8eed 100644 --- a/src/resources/images/v1/v1.ts +++ b/src/resources/images/v1/v1.ts @@ -181,32 +181,34 @@ export namespace V1ListResponse { } } -export type V1CreateParams = V1CreateParams.ImagesImageUploadViaFile | V1CreateParams.ImagesImageUploadViaURL; - -export namespace V1CreateParams { - export interface ImagesImageUploadViaFile { - /** - * Path param: Account identifier tag. - */ - account_id: string; - - /** - * Body param: An image binary data. - */ - file: unknown; - } +export interface V1CreateParams { + /** + * Path param: Account identifier tag. + */ + account_id: string; - export interface ImagesImageUploadViaURL { - /** - * Path param: Account identifier tag. - */ - account_id: string; + /** + * Body param: An image binary data. Only needed when type is uploading a file. + */ + file?: unknown; - /** - * Body param: A URL to fetch an image from origin. - */ - url: string; - } + /** + * Body param: User modifiable key-value store. Can use used for keeping references + * to another system of record for managing images. + */ + metadata?: unknown; + + /** + * Body param: Indicates whether the image requires a signature token for the + * access. + */ + requireSignedURLs?: boolean; + + /** + * Body param: A URL to fetch an image from origin. Only needed when type is + * uploading from a URL. + */ + url?: string; } export interface V1ListParams extends V4PagePaginationParams { @@ -266,18 +268,20 @@ export namespace V1 { export import V1EditParams = V1API.V1EditParams; export import V1GetParams = V1API.V1GetParams; export import Keys = KeysAPI.Keys; - export import ImagesImageKeys = KeysAPI.ImagesImageKeys; + export import Key = KeysAPI.Key; export import UnnamedSchemaRef918e794287a67b5e85126e00cf2d9a95 = KeysAPI.UnnamedSchemaRef918e794287a67b5e85126e00cf2d9a95; export import KeyUpdateParams = KeysAPI.KeyUpdateParams; export import KeyListParams = KeysAPI.KeyListParams; export import KeyDeleteParams = KeysAPI.KeyDeleteParams; export import Stats = StatsAPI.Stats; - export import ImagesImagesStats = StatsAPI.ImagesImagesStats; + export import Stat = StatsAPI.Stat; export import StatGetParams = StatsAPI.StatGetParams; export import Variants = VariantsAPI.Variants; export import UnnamedSchemaRefD02195de7dadf27801875f36cddfa3a3 = VariantsAPI.UnnamedSchemaRefD02195de7dadf27801875f36cddfa3a3; - export import V1ImageVariant = VariantsAPI.V1ImageVariant; - export import V1ImageVariants = VariantsAPI.V1ImageVariants; + export import Variant = VariantsAPI.Variant; + export import VariantCreateResponse = VariantsAPI.VariantCreateResponse; + export import VariantEditResponse = VariantsAPI.VariantEditResponse; + export import VariantGetResponse = VariantsAPI.VariantGetResponse; export import VariantCreateParams = VariantsAPI.VariantCreateParams; export import VariantListParams = VariantsAPI.VariantListParams; export import VariantDeleteParams = VariantsAPI.VariantDeleteParams; diff --git a/src/resources/images/v1/variants.ts b/src/resources/images/v1/variants.ts index 4d30ebdf66..24b64dc585 100644 --- a/src/resources/images/v1/variants.ts +++ b/src/resources/images/v1/variants.ts @@ -9,24 +9,24 @@ export class Variants extends APIResource { /** * Specify variants that allow you to resize images for different use cases. */ - create(params: VariantCreateParams, options?: Core.RequestOptions): Core.APIPromise { + create(params: VariantCreateParams, options?: Core.RequestOptions): Core.APIPromise { const { account_id, ...body } = params; return ( this._client.post(`/accounts/${account_id}/images/v1/variants`, { body, ...options, - }) as Core.APIPromise<{ result: V1ImageVariant }> + }) as Core.APIPromise<{ result: VariantCreateResponse }> )._thenUnwrap((obj) => obj.result); } /** * Lists existing variants. */ - list(params: VariantListParams, options?: Core.RequestOptions): Core.APIPromise { + list(params: VariantListParams, options?: Core.RequestOptions): Core.APIPromise { const { account_id } = params; return ( this._client.get(`/accounts/${account_id}/images/v1/variants`, options) as Core.APIPromise<{ - result: V1ImageVariants; + result: Variant; }> )._thenUnwrap((obj) => obj.result); } @@ -55,13 +55,13 @@ export class Variants extends APIResource { variantId: string, params: VariantEditParams, options?: Core.RequestOptions, - ): Core.APIPromise { + ): Core.APIPromise { const { account_id, ...body } = params; return ( this._client.patch(`/accounts/${account_id}/images/v1/variants/${variantId}`, { body, ...options, - }) as Core.APIPromise<{ result: V1ImageVariant }> + }) as Core.APIPromise<{ result: VariantEditResponse }> )._thenUnwrap((obj) => obj.result); } @@ -72,13 +72,13 @@ export class Variants extends APIResource { variantId: string, params: VariantGetParams, options?: Core.RequestOptions, - ): Core.APIPromise { + ): Core.APIPromise { const { account_id } = params; return ( this._client.get( `/accounts/${account_id}/images/v1/variants/${variantId}`, options, - ) as Core.APIPromise<{ result: V1ImageVariant }> + ) as Core.APIPromise<{ result: VariantGetResponse }> )._thenUnwrap((obj) => obj.result); } } @@ -132,11 +132,66 @@ export namespace UnnamedSchemaRefD02195de7dadf27801875f36cddfa3a3 { } } -export interface V1ImageVariant { - variant?: V1ImageVariant.Variant; +export interface Variant { + variants?: Variant.Variants; } -export namespace V1ImageVariant { +export namespace Variant { + export interface Variants { + hero?: Variants.Hero; + } + + export namespace Variants { + export interface Hero { + id: string; + + /** + * Allows you to define image resizing sizes for different use cases. + */ + options: Hero.Options; + + /** + * Indicates whether the variant can access an image without a signature, + * regardless of image access control. + */ + neverRequireSignedURLs?: boolean; + } + + export namespace Hero { + /** + * Allows you to define image resizing sizes for different use cases. + */ + export interface Options { + /** + * The fit property describes how the width and height dimensions should be + * interpreted. + */ + fit: 'scale-down' | 'contain' | 'cover' | 'crop' | 'pad'; + + /** + * Maximum height in image pixels. + */ + height: number; + + /** + * What EXIF data should be preserved in the output image. + */ + metadata: 'keep' | 'copyright' | 'none'; + + /** + * Maximum width in image pixels. + */ + width: number; + } + } + } +} + +export interface VariantCreateResponse { + variant?: VariantCreateResponse.Variant; +} + +export namespace VariantCreateResponse { export interface Variant { id: string; @@ -181,57 +236,100 @@ export namespace V1ImageVariant { } } -export interface V1ImageVariants { - variants?: V1ImageVariants.Variants; +export interface VariantEditResponse { + variant?: VariantEditResponse.Variant; } -export namespace V1ImageVariants { - export interface Variants { - hero?: Variants.Hero; +export namespace VariantEditResponse { + export interface Variant { + id: string; + + /** + * Allows you to define image resizing sizes for different use cases. + */ + options: Variant.Options; + + /** + * Indicates whether the variant can access an image without a signature, + * regardless of image access control. + */ + neverRequireSignedURLs?: boolean; } - export namespace Variants { - export interface Hero { - id: string; + export namespace Variant { + /** + * Allows you to define image resizing sizes for different use cases. + */ + export interface Options { + /** + * The fit property describes how the width and height dimensions should be + * interpreted. + */ + fit: 'scale-down' | 'contain' | 'cover' | 'crop' | 'pad'; /** - * Allows you to define image resizing sizes for different use cases. + * Maximum height in image pixels. */ - options: Hero.Options; + height: number; /** - * Indicates whether the variant can access an image without a signature, - * regardless of image access control. + * What EXIF data should be preserved in the output image. */ - neverRequireSignedURLs?: boolean; + metadata: 'keep' | 'copyright' | 'none'; + + /** + * Maximum width in image pixels. + */ + width: number; } + } +} - export namespace Hero { +export interface VariantGetResponse { + variant?: VariantGetResponse.Variant; +} + +export namespace VariantGetResponse { + export interface Variant { + id: string; + + /** + * Allows you to define image resizing sizes for different use cases. + */ + options: Variant.Options; + + /** + * Indicates whether the variant can access an image without a signature, + * regardless of image access control. + */ + neverRequireSignedURLs?: boolean; + } + + export namespace Variant { + /** + * Allows you to define image resizing sizes for different use cases. + */ + export interface Options { /** - * Allows you to define image resizing sizes for different use cases. + * The fit property describes how the width and height dimensions should be + * interpreted. */ - export interface Options { - /** - * The fit property describes how the width and height dimensions should be - * interpreted. - */ - fit: 'scale-down' | 'contain' | 'cover' | 'crop' | 'pad'; + fit: 'scale-down' | 'contain' | 'cover' | 'crop' | 'pad'; - /** - * Maximum height in image pixels. - */ - height: number; + /** + * Maximum height in image pixels. + */ + height: number; - /** - * What EXIF data should be preserved in the output image. - */ - metadata: 'keep' | 'copyright' | 'none'; + /** + * What EXIF data should be preserved in the output image. + */ + metadata: 'keep' | 'copyright' | 'none'; - /** - * Maximum width in image pixels. - */ - width: number; - } + /** + * Maximum width in image pixels. + */ + width: number; } } } @@ -361,8 +459,10 @@ export interface VariantGetParams { export namespace Variants { export import UnnamedSchemaRefD02195de7dadf27801875f36cddfa3a3 = VariantsAPI.UnnamedSchemaRefD02195de7dadf27801875f36cddfa3a3; - export import V1ImageVariant = VariantsAPI.V1ImageVariant; - export import V1ImageVariants = VariantsAPI.V1ImageVariants; + export import Variant = VariantsAPI.Variant; + export import VariantCreateResponse = VariantsAPI.VariantCreateResponse; + export import VariantEditResponse = VariantsAPI.VariantEditResponse; + export import VariantGetResponse = VariantsAPI.VariantGetResponse; export import VariantCreateParams = VariantsAPI.VariantCreateParams; export import VariantListParams = VariantsAPI.VariantListParams; export import VariantDeleteParams = VariantsAPI.VariantDeleteParams; diff --git a/src/resources/index.ts b/src/resources/index.ts index 31635a3c66..740a783b8a 100644 --- a/src/resources/index.ts +++ b/src/resources/index.ts @@ -2,416 +2,82 @@ export * from './shared'; export { ACM } from './acm/acm'; -export { - Account, - AccountListResponse, - AccountUpdateParams, - AccountListParams, - AccountGetParams, - AccountListResponsesV4PagePaginationArray, - Accounts, -} from './accounts/accounts'; +export { Accounts } from './accounts/accounts'; export { Addressing } from './addressing/addressing'; +export { Alerting } from './alerting/alerting'; export { Argo } from './argo/argo'; -export { - AuditLogListResponse, - AuditLogListParams, - AuditLogListResponsesV4PagePaginationArray, - AuditLogs, -} from './audit-logs'; -export { AvailableRatePlan, AvailableRatePlansSinglePage, Plans } from './plans'; +export { AuditLogs } from './audit-logs'; export { Billing } from './billing/billing'; -export { - BlockRule, - ExecuteRule, - LogRule, - RequestRule, - Ruleset, - SkipRule, - RulesetCreateResponse, - RulesetUpdateResponse, - RulesetGetResponse, - RulesetCreateParams, - RulesetUpdateParams, - RulesetListParams, - RulesetDeleteParams, - RulesetGetParams, - RulesetsSinglePage, - Rulesets, -} from './rulesets/rulesets'; -export { - BotManagementUpdateResponse, - BotManagementGetResponse, - BotManagementUpdateParams, - BotManagementGetParams, - BotManagement, -} from './bot-management'; -export { CachePurgeResponse, CachePurgeParams, Cache } from './cache/cache'; -export { - CallsApp, - CallsAppWithSecret, - CallCreateParams, - CallUpdateParams, - CallListParams, - CallDeleteParams, - CallGetParams, - CallsAppsSinglePage, - Calls, -} from './calls'; +export { BotManagement } from './bot-management'; +export { BrandProtection } from './brand-protection'; +export { Cache } from './cache/cache'; +export { Calls } from './calls'; export { CertificateAuthorities } from './certificate-authorities/certificate-authorities'; export { Challenges } from './challenges/challenges'; -export { - ClientCertificate, - ClientCertificateCreateParams, - ClientCertificateListParams, - ClientCertificateDeleteParams, - ClientCertificateEditParams, - ClientCertificateGetParams, - ClientCertificatesV4PagePaginationArray, - ClientCertificates, -} from './client-certificates'; +export { ClientCertificates } from './client-certificates'; export { CloudforceOne } from './cloudforce-one/cloudforce-one'; -export { - CustomCertificate, - CustomCertificateCreateParams, - CustomCertificateListParams, - CustomCertificateDeleteParams, - CustomCertificateEditParams, - CustomCertificateGetParams, - CustomCertificatesV4PagePaginationArray, - CustomCertificates, -} from './custom-certificates/custom-certificates'; -export { - CustomHostname, - UnnamedSchemaRef16aca57bde2963201c7e6e895436c1c1, - UnnamedSchemaRef78adb375f06c6d462dd92b99e2ecf510, - UnnamedSchemaRef9a9935a9a770967bb604ae41a81e42e1, - UnnamedSchemaRefD2a16d7ee1ad3a888dd5821c918d51fd, - CustomHostnameCreateResponse, - CustomHostnameListResponse, - CustomHostnameEditResponse, - CustomHostnameGetResponse, - CustomHostnameCreateParams, - CustomHostnameListParams, - CustomHostnameDeleteParams, - CustomHostnameEditParams, - CustomHostnameGetParams, - CustomHostnameListResponsesV4PagePaginationArray, - CustomHostnames, -} from './custom-hostnames/custom-hostnames'; -export { - CustomNameserver, - CustomNameserverAvailabiltyResponse, - CustomNameserverGetResponse, - CustomNameserverVerifyResponse, - CustomNameserverCreateParams, - CustomNameserverDeleteParams, - CustomNameserverAvailabiltyParams, - CustomNameserverGetParams, - CustomNameserverVerifyParams, - CustomNameservers, -} from './custom-nameservers'; +export { CustomCertificates } from './custom-certificates/custom-certificates'; +export { CustomHostnames } from './custom-hostnames/custom-hostnames'; +export { CustomNameservers } from './custom-nameservers'; export { D1 } from './d1/d1'; export { DCVDelegation } from './dcv-delegation/dcv-delegation'; -export { DNSSEC, DNSSECDeleteParams, DNSSECEditParams, DNSSECGetParams, DNSSECResource } from './dnssec'; +export { DNS } from './dns/dns'; +export { DNSSECResource } from './dnssec'; export { Diagnostics } from './diagnostics/diagnostics'; export { DurableObjects } from './durable-objects/durable-objects'; -export { - EmailSettings, - EmailRoutingDisableResponse, - EmailRoutingEnableResponse, - EmailRoutingGetResponse, - EmailRoutingDisableParams, - EmailRoutingEnableParams, - EmailRouting, -} from './email-routing/email-routing'; +export { EmailRouting } from './email-routing/email-routing'; +export { Filters } from './filters'; export { Firewall } from './firewall/firewall'; -export { - FirewallFilter, - UnnamedSchemaRef39af4f78d23244e2595fb47c811221df, - FilterCreateResponse, - FilterCreateParams, - FilterUpdateParams, - FilterListParams, - FilterDeleteParams, - FirewallFiltersV4PagePaginationArray, - Filters, -} from './filters'; -export { - Healthcheck, - UnnamedSchemaRefAaa560acadcbf1ae1dc619ba1ea5948e, - HealthcheckDeleteResponse, - HealthcheckCreateParams, - HealthcheckUpdateParams, - HealthcheckListParams, - HealthcheckDeleteParams, - HealthcheckEditParams, - HealthcheckGetParams, - HealthchecksSinglePage, - Healthchecks, -} from './healthchecks/healthchecks'; +export { Healthchecks } from './healthchecks/healthchecks'; export { Hostnames } from './hostnames/hostnames'; -export { Hyperdrive, HyperdriveResource } from './hyperdrive/hyperdrive'; -export { IPs, JDCloudIPs, IPListResponse, IPListParams } from './ips'; +export { HyperdriveResource } from './hyperdrive/hyperdrive'; +export { IPs } from './ips'; export { Images } from './images/images'; export { Intel } from './intel/intel'; -export { - IntelPhishingURLInfo, - IntelPhishingURLSubmit, - UnnamedSchemaRef209db30ed499548152d6f3bccf720b54, - UnnamedSchemaRef39419d70e2399b28b15cd660afd342fb, - UnnamedSchemaRef3e10ea08deb8102a27500f986488c1e8, - UnnamedSchemaRef44e66100b948bfe723054c56b6144766, - UnnamedSchemaRef767c0981cf47f45f0c766253dbd18669, - UnnamedSchemaRef9b4c9779a35b172cb69c71389ebc7014, - UnnamedSchemaRefA64e2a18a86750b6bd72cdf37ecfd869, - BrandProtectionSubmitParams, - BrandProtectionURLInfoParams, - BrandProtection, -} from './brand-protection'; export { KV } from './kv/kv'; -export { - KeylessCertificate, - KeylessCertificateHostname, - UnnamedSchemaRefA91f0bd72ee433f010eecfdc94ccf298, - KeylessCertificateCreateParams, - KeylessCertificateListParams, - KeylessCertificateDeleteParams, - KeylessCertificateEditParams, - KeylessCertificateGetParams, - KeylessCertificateHostnamesSinglePage, - KeylessCertificates, -} from './keyless-certificates'; -export { - LoadBalancer, - UnnamedSchemaRef06ba14ec7860c091efc98fd9af30f382, - LoadBalancerDeleteResponse, - LoadBalancerCreateParams, - LoadBalancerUpdateParams, - LoadBalancerListParams, - LoadBalancerDeleteParams, - LoadBalancerEditParams, - LoadBalancerGetParams, - LoadBalancersSinglePage, - LoadBalancers, -} from './load-balancers/load-balancers'; +export { KeylessCertificates } from './keyless-certificates'; +export { LoadBalancers } from './load-balancers/load-balancers'; export { Logpush } from './logpush/logpush'; export { Logs } from './logs/logs'; -export { - MTLSCertificate, - MTLSCertificateUpdate, - MTLSCertificateCreateParams, - MTLSCertificateListParams, - MTLSCertificateDeleteParams, - MTLSCertificateGetParams, - MTLSCertificatesSinglePage, - MTLSCertificates, -} from './mtls-certificates/mtls-certificates'; +export { MTLSCertificates } from './mtls-certificates/mtls-certificates'; export { MagicNetworkMonitoring } from './magic-network-monitoring/magic-network-monitoring'; -export { - ManagedHeaderListResponse, - ManagedHeaderEditResponse, - ManagedHeaderListParams, - ManagedHeaderEditParams, - ManagedHeaders, -} from './managed-headers'; -export { - Membership, - MembershipDeleteResponse, - MembershipUpdateParams, - MembershipListParams, - MembershipDeleteParams, - MembershipsV4PagePaginationArray, - Memberships, -} from './memberships'; -export { - ObservatorySchedule, - ObservatoryTrend, - SpeedDeleteResponse, - SpeedDeleteParams, - SpeedScheduleGetParams, - SpeedTrendsListParams, - Speed, -} from './speed/speed'; -export { - OriginCACertificate, - OriginCACertificateCreateParams, - OriginCACertificateListParams, - OriginCACertificateDeleteParams, - OriginCACertificatesSinglePage, - OriginCACertificates, -} from './origin-ca-certificates'; -export { - OriginPostQuantumEncryptionUpdateParams, - OriginPostQuantumEncryptionGetParams, - OriginPostQuantumEncryption, -} from './origin-post-quantum-encryption'; -export { - OriginTLSClientCertificateZoneAuthenticatedOriginPull, - OriginTLSClientAuthListResponse, - OriginTLSClientAuthCreateParams, - OriginTLSClientAuthListParams, - OriginTLSClientAuthDeleteParams, - OriginTLSClientAuthGetParams, - OriginTLSClientAuthListResponsesSinglePage, - OriginTLSClientAuth, -} from './origin-tls-client-auth/origin-tls-client-auth'; -export { - PCAPCreateResponse, - PCAPListResponse, - PCAPGetResponse, - PCAPCreateParams, - PCAPListParams, - PCAPGetParams, - PCAPListResponsesSinglePage, - PCAPs, -} from './pcaps/pcaps'; -export { - PageShieldSetting, - PageShieldUpdateResponse, - PageShieldUpdateParams, - PageShieldGetParams, - PageShield, -} from './page-shield/page-shield'; +export { MagicTransit } from './magic-transit/magic-transit'; +export { ManagedHeaders } from './managed-headers'; +export { Memberships } from './memberships'; +export { OriginCACertificates } from './origin-ca-certificates'; +export { OriginPostQuantumEncryption } from './origin-post-quantum-encryption'; +export { OriginTLSClientAuth } from './origin-tls-client-auth/origin-tls-client-auth'; +export { PCAPs } from './pcaps/pcaps'; +export { PageShield } from './page-shield/page-shield'; +export { Pagerules } from './pagerules/pagerules'; export { Pages } from './pages/pages'; -export { - Queue, - QueueCreated, - QueueUpdated, - QueueCreateResponse, - QueueUpdateResponse, - QueueListResponse, - QueueGetResponse, - QueueCreateParams, - QueueUpdateParams, - QueueListParams, - QueueDeleteParams, - QueueGetParams, - Queues, -} from './queues/queues'; +export { Plans } from './plans'; +export { Queues } from './queues/queues'; export { R2 } from './r2/r2'; export { RUM } from './rum/rum'; -export { - RateLimit, - RateLimitListResponse, - RateLimitDeleteResponse, - RateLimitCreateParams, - RateLimitListParams, - RateLimitDeleteParams, - RateLimitEditParams, - RateLimitListResponsesV4PagePaginationArray, - RateLimits, -} from './rate-limits'; -export { RatePlan, RatePlanGetResponse, RatePlans } from './rate-plans'; +export { Radar } from './radar/radar'; +export { RateLimits } from './rate-limits'; +export { RatePlans } from './rate-plans'; export { Registrar } from './registrar/registrar'; export { RequestTracers } from './request-tracers/request-tracers'; export { Rules } from './rules/rules'; +export { Rulesets } from './rulesets/rulesets'; export { SSL } from './ssl/ssl'; export { SecondaryDNS } from './secondary-dns/secondary-dns'; -export { Snippet, SnippetUpdateParams, SnippetsSinglePage, Snippets } from './snippets/snippets'; +export { Snippets } from './snippets/snippets'; export { Spectrum } from './spectrum/spectrum'; +export { Speed } from './speed/speed'; export { Storage } from './storage/storage'; -export { - StreamVideos, - StreamCreateParams, - StreamListParams, - StreamDeleteParams, - StreamGetParams, - StreamVideosSinglePage, - Stream, -} from './stream/stream'; -export { - SubscriptionListResponse, - SubscriptionDeleteResponse, - SubscriptionCreateParams, - SubscriptionUpdateParams, - SubscriptionDeleteParams, - SubscriptionListResponsesSinglePage, - Subscriptions, -} from './subscriptions'; -export { - URLNormalizationUpdateResponse, - URLNormalizationGetResponse, - URLNormalizationUpdateParams, - URLNormalizationGetParams, - URLNormalization, -} from './url-normalization'; -export { URLScannerScanResponse, URLScannerScanParams, URLScanner } from './url-scanner/url-scanner'; -export { - UnnamedSchemaRef16e559c45a31db5480e21fbe904b2e42, - UnnamedSchemaRef4124a22436f90127c7fa2c4543219752, - UnnamedSchemaRef73de8b634bb48667e28a6c6c56080c51, - UnnamedSchemaRef75bae70cf28e6bcef364b9840db3bdeb, - UnnamedSchemaRef7826220e105d84352ba1108d9ed88e55, - UnnamedSchemaRef83a14d589e799bc901b9ccc870251d09, - UnnamedSchemaRef8b383e904d9fb02521257ef9cc77d297, - UnnamedSchemaRef9002274ed7cb7f3dc567421e31529a3a, - UnnamedSchemaRefB5f3bd1840490bc487ffef84567807b1, - UnnamedSchemaRefBaac9d7da12de53e99142f8ecd3982e5, - UnnamedSchemaRefC5858f1f916a921846e0b6159af470a7, - Radar, -} from './radar/radar'; -export { - UnnamedSchemaRef3b1a76a5e4a139b72ed7d93834773d39, - UnnamedSchemaRefEebdc868ce7f7ae92e23438caa84e7b5, - MagicTransit, -} from './magic-transit/magic-transit'; -export { - UnnamedSchemaRef6595695ff25b0614667b25f66b7bbaba, - UnnamedSchemaRef65be9614de145bf4a58d0fddf46df7ca, - UnnamedSchemaRef85b45d163202bbab7456da6b346d9fe2, - DNS, -} from './dns/dns'; -export { - UnnamedSchemaRefA282afe149b2cf60a204505bd4c53324, - WaitingRoom, - WaitingRoomDeleteResponse, - WaitingRoomCreateParams, - WaitingRoomUpdateParams, - WaitingRoomListParams, - WaitingRoomDeleteParams, - WaitingRoomEditParams, - WaitingRoomGetParams, - WaitingRoomsSinglePage, - WaitingRooms, -} from './waiting-rooms/waiting-rooms'; -export { UnnamedSchemaRefD6e23adacaca017802aaa484a8b3f405, Alerting } from './alerting/alerting'; -export { User, UserEditParams, UserResource } from './user/user'; +export { Stream } from './stream/stream'; +export { Subscriptions } from './subscriptions'; +export { URLNormalization } from './url-normalization'; +export { URLScanner } from './url-scanner/url-scanner'; +export { User } from './user/user'; export { Vectorize } from './vectorize/vectorize'; -export { - WARPConnectorTokenResponse, - WARPConnectorCreateParams, - WARPConnectorListParams, - WARPConnectorDeleteParams, - WARPConnectorEditParams, - WARPConnectorGetParams, - WARPConnectorTokenParams, - WARPConnector, -} from './warp-connector'; +export { WARPConnector } from './warp-connector'; +export { WaitingRooms } from './waiting-rooms/waiting-rooms'; export { Web3 } from './web3/web3'; export { Workers } from './workers/workers'; export { WorkersForPlatforms } from './workers-for-platforms/workers-for-platforms'; export { ZeroTrust } from './zero-trust/zero-trust'; -export { - Zone, - ZoneDeleteResponse, - ZoneCreateParams, - ZoneListParams, - ZoneDeleteParams, - ZoneEditParams, - ZoneGetParams, - ZonesV4PagePaginationArray, - Zones, -} from './zones/zones'; -export { - ZonesPagerule, - PageruleListResponse, - PageruleDeleteResponse, - PageruleCreateParams, - PageruleUpdateParams, - PageruleListParams, - PageruleDeleteParams, - PageruleEditParams, - PageruleGetParams, - Pagerules, -} from './pagerules/pagerules'; +export { Zones } from './zones/zones'; diff --git a/src/resources/intel/asn/asn.ts b/src/resources/intel/asn/asn.ts index ffa9bff7ab..2e12810573 100644 --- a/src/resources/intel/asn/asn.ts +++ b/src/resources/intel/asn/asn.ts @@ -5,23 +5,23 @@ import { APIResource } from 'cloudflare/resource'; import * as ASNAPI from 'cloudflare/resources/intel/asn/asn'; import * as SubnetsAPI from 'cloudflare/resources/intel/asn/subnets'; -export class ASN extends APIResource { +export class ASNResource extends APIResource { subnets: SubnetsAPI.Subnets = new SubnetsAPI.Subnets(this._client); /** * Get ASN Overview */ - get(asn: IntelASN, params: ASNGetParams, options?: Core.RequestOptions): Core.APIPromise { + get(asn: ASN, params: ASNGetParams, options?: Core.RequestOptions): Core.APIPromise { const { account_id } = params; return ( this._client.get(`/accounts/${account_id}/intel/asn/${asn}`, options) as Core.APIPromise<{ - result: IntelASN; + result: ASN; }> )._thenUnwrap((obj) => obj.result); } } -export type IntelASN = number; +export type ASN = number; export interface ASNGetParams { /** @@ -30,8 +30,8 @@ export interface ASNGetParams { account_id: string; } -export namespace ASN { - export import IntelASN = ASNAPI.IntelASN; +export namespace ASNResource { + export import ASN = ASNAPI.ASN; export import ASNGetParams = ASNAPI.ASNGetParams; export import Subnets = SubnetsAPI.Subnets; export import SubnetGetResponse = SubnetsAPI.SubnetGetResponse; diff --git a/src/resources/intel/asn/index.ts b/src/resources/intel/asn/index.ts index 3480c3b5e9..63e013aafb 100644 --- a/src/resources/intel/asn/index.ts +++ b/src/resources/intel/asn/index.ts @@ -1,4 +1,4 @@ // File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. -export { IntelASN, ASNGetParams, ASN } from './asn'; +export { ASN, ASNGetParams, ASNResource } from './asn'; export { SubnetGetResponse, SubnetGetParams, Subnets } from './subnets'; diff --git a/src/resources/intel/asn/subnets.ts b/src/resources/intel/asn/subnets.ts index 1adc575f5c..95e64212dd 100644 --- a/src/resources/intel/asn/subnets.ts +++ b/src/resources/intel/asn/subnets.ts @@ -10,7 +10,7 @@ export class Subnets extends APIResource { * Get ASN Subnets */ get( - asn: ASNAPI.IntelASN, + asn: ASNAPI.ASN, params: SubnetGetParams, options?: Core.RequestOptions, ): Core.APIPromise { @@ -20,7 +20,7 @@ export class Subnets extends APIResource { } export interface SubnetGetResponse { - asn?: ASNAPI.IntelASN; + asn?: ASNAPI.ASN; /** * Total results returned based on your search parameters. diff --git a/src/resources/intel/attack-surface-report/attack-surface-report.ts b/src/resources/intel/attack-surface-report/attack-surface-report.ts index b227a51741..30b5e6d31d 100644 --- a/src/resources/intel/attack-surface-report/attack-surface-report.ts +++ b/src/resources/intel/attack-surface-report/attack-surface-report.ts @@ -14,6 +14,11 @@ export namespace AttackSurfaceReport { export import IssueTypeGetResponse = IssueTypesAPI.IssueTypeGetResponse; export import IssueTypeGetParams = IssueTypesAPI.IssueTypeGetParams; export import Issues = IssuesAPI.Issues; + export import IssueClassItem = IssuesAPI.IssueClassItem; + export import IssueTypeItem = IssuesAPI.IssueTypeItem; + export import ProductItem = IssuesAPI.ProductItem; + export import SeverityQueryParamItem = IssuesAPI.SeverityQueryParamItem; + export import SubjectsItem = IssuesAPI.SubjectsItem; export import IssueListResponse = IssuesAPI.IssueListResponse; export import IssueClassResponse = IssuesAPI.IssueClassResponse; export import IssueSeverityResponse = IssuesAPI.IssueSeverityResponse; diff --git a/src/resources/intel/attack-surface-report/index.ts b/src/resources/intel/attack-surface-report/index.ts index 4ac9dcc813..2ad3d5062f 100644 --- a/src/resources/intel/attack-surface-report/index.ts +++ b/src/resources/intel/attack-surface-report/index.ts @@ -2,6 +2,11 @@ export { AttackSurfaceReport } from './attack-surface-report'; export { + IssueClassItem, + IssueTypeItem, + ProductItem, + SeverityQueryParamItem, + SubjectsItem, IssueListResponse, IssueClassResponse, IssueSeverityResponse, diff --git a/src/resources/intel/attack-surface-report/issues.ts b/src/resources/intel/attack-surface-report/issues.ts index e81271477c..740ab87cf1 100644 --- a/src/resources/intel/attack-surface-report/issues.ts +++ b/src/resources/intel/attack-surface-report/issues.ts @@ -84,6 +84,21 @@ export class Issues extends APIResource { export class IssueListResponsesV4PagePagination extends V4PagePagination {} +export type IssueClassItem = string; + +export type IssueTypeItem = + | 'compliance_violation' + | 'email_security' + | 'exposed_infrastructure' + | 'insecure_configuration' + | 'weak_authentication'; + +export type ProductItem = string; + +export type SeverityQueryParamItem = 'low' | 'moderate' | 'critical'; + +export type SubjectsItem = string; + export interface IssueListResponse { errors: Array; @@ -193,64 +208,52 @@ export interface IssueListParams extends V4PagePaginationParams { /** * Query param: */ - issue_class?: Array; + issue_class?: Array; /** * Query param: */ - 'issue_class~neq'?: Array; + 'issue_class~neq'?: Array; /** * Query param: */ - issue_type?: Array< - | 'compliance_violation' - | 'email_security' - | 'exposed_infrastructure' - | 'insecure_configuration' - | 'weak_authentication' - >; + issue_type?: Array; /** * Query param: */ - 'issue_type~neq'?: Array< - | 'compliance_violation' - | 'email_security' - | 'exposed_infrastructure' - | 'insecure_configuration' - | 'weak_authentication' - >; + 'issue_type~neq'?: Array; /** * Query param: */ - product?: Array; + product?: Array; /** * Query param: */ - 'product~neq'?: Array; + 'product~neq'?: Array; /** * Query param: */ - severity?: Array<'low' | 'moderate' | 'critical'>; + severity?: Array; /** * Query param: */ - 'severity~neq'?: Array<'low' | 'moderate' | 'critical'>; + 'severity~neq'?: Array; /** * Query param: */ - subject?: Array; + subject?: Array; /** * Query param: */ - 'subject~neq'?: Array; + 'subject~neq'?: Array; } export interface IssueClassParams { @@ -267,64 +270,52 @@ export interface IssueClassParams { /** * Query param: */ - issue_class?: Array; + issue_class?: Array; /** * Query param: */ - 'issue_class~neq'?: Array; + 'issue_class~neq'?: Array; /** * Query param: */ - issue_type?: Array< - | 'compliance_violation' - | 'email_security' - | 'exposed_infrastructure' - | 'insecure_configuration' - | 'weak_authentication' - >; + issue_type?: Array; /** * Query param: */ - 'issue_type~neq'?: Array< - | 'compliance_violation' - | 'email_security' - | 'exposed_infrastructure' - | 'insecure_configuration' - | 'weak_authentication' - >; + 'issue_type~neq'?: Array; /** * Query param: */ - product?: Array; + product?: Array; /** * Query param: */ - 'product~neq'?: Array; + 'product~neq'?: Array; /** * Query param: */ - severity?: Array<'low' | 'moderate' | 'critical'>; + severity?: Array; /** * Query param: */ - 'severity~neq'?: Array<'low' | 'moderate' | 'critical'>; + 'severity~neq'?: Array; /** * Query param: */ - subject?: Array; + subject?: Array; /** * Query param: */ - 'subject~neq'?: Array; + 'subject~neq'?: Array; } export interface IssueDismissParams { @@ -353,64 +344,52 @@ export interface IssueSeverityParams { /** * Query param: */ - issue_class?: Array; + issue_class?: Array; /** * Query param: */ - 'issue_class~neq'?: Array; + 'issue_class~neq'?: Array; /** * Query param: */ - issue_type?: Array< - | 'compliance_violation' - | 'email_security' - | 'exposed_infrastructure' - | 'insecure_configuration' - | 'weak_authentication' - >; + issue_type?: Array; /** * Query param: */ - 'issue_type~neq'?: Array< - | 'compliance_violation' - | 'email_security' - | 'exposed_infrastructure' - | 'insecure_configuration' - | 'weak_authentication' - >; + 'issue_type~neq'?: Array; /** * Query param: */ - product?: Array; + product?: Array; /** * Query param: */ - 'product~neq'?: Array; + 'product~neq'?: Array; /** * Query param: */ - severity?: Array<'low' | 'moderate' | 'critical'>; + severity?: Array; /** * Query param: */ - 'severity~neq'?: Array<'low' | 'moderate' | 'critical'>; + 'severity~neq'?: Array; /** * Query param: */ - subject?: Array; + subject?: Array; /** * Query param: */ - 'subject~neq'?: Array; + 'subject~neq'?: Array; } export interface IssueTypeParams { @@ -427,67 +406,60 @@ export interface IssueTypeParams { /** * Query param: */ - issue_class?: Array; + issue_class?: Array; /** * Query param: */ - 'issue_class~neq'?: Array; + 'issue_class~neq'?: Array; /** * Query param: */ - issue_type?: Array< - | 'compliance_violation' - | 'email_security' - | 'exposed_infrastructure' - | 'insecure_configuration' - | 'weak_authentication' - >; + issue_type?: Array; /** * Query param: */ - 'issue_type~neq'?: Array< - | 'compliance_violation' - | 'email_security' - | 'exposed_infrastructure' - | 'insecure_configuration' - | 'weak_authentication' - >; + 'issue_type~neq'?: Array; /** * Query param: */ - product?: Array; + product?: Array; /** * Query param: */ - 'product~neq'?: Array; + 'product~neq'?: Array; /** * Query param: */ - severity?: Array<'low' | 'moderate' | 'critical'>; + severity?: Array; /** * Query param: */ - 'severity~neq'?: Array<'low' | 'moderate' | 'critical'>; + 'severity~neq'?: Array; /** * Query param: */ - subject?: Array; + subject?: Array; /** * Query param: */ - 'subject~neq'?: Array; + 'subject~neq'?: Array; } export namespace Issues { + export import IssueClassItem = IssuesAPI.IssueClassItem; + export import IssueTypeItem = IssuesAPI.IssueTypeItem; + export import ProductItem = IssuesAPI.ProductItem; + export import SeverityQueryParamItem = IssuesAPI.SeverityQueryParamItem; + export import SubjectsItem = IssuesAPI.SubjectsItem; export import IssueListResponse = IssuesAPI.IssueListResponse; export import IssueClassResponse = IssuesAPI.IssueClassResponse; export import IssueSeverityResponse = IssuesAPI.IssueSeverityResponse; diff --git a/src/resources/intel/dns.ts b/src/resources/intel/dns.ts index d6807de880..3c9fc7bac5 100644 --- a/src/resources/intel/dns.ts +++ b/src/resources/intel/dns.ts @@ -8,17 +8,17 @@ export class DNS extends APIResource { /** * Get Passive DNS by IP */ - get(params: DNSGetParams, options?: Core.RequestOptions): Core.APIPromise { + get(params: DNSGetParams, options?: Core.RequestOptions): Core.APIPromise { const { account_id, ...query } = params; return ( this._client.get(`/accounts/${account_id}/intel/dns`, { query, ...options }) as Core.APIPromise<{ - result: IntelPassiveDNSByIP; + result: DNS; }> )._thenUnwrap((obj) => obj.result); } } -export interface IntelPassiveDNSByIP { +export interface DNS { /** * Total results returned based on your search parameters. */ @@ -99,7 +99,7 @@ export namespace DNSGetParams { } export namespace DNS { - export import IntelPassiveDNSByIP = DNSAPI.IntelPassiveDNSByIP; + export import DNS = DNSAPI.DNS; export import UnnamedSchemaRefB5e16cee4f32382c294201aedb9fc050 = DNSAPI.UnnamedSchemaRefB5e16cee4f32382c294201aedb9fc050; export import DNSGetParams = DNSAPI.DNSGetParams; } diff --git a/src/resources/intel/domain-history.ts b/src/resources/intel/domain-history.ts index 59aef8ae8a..e637ba4ae6 100644 --- a/src/resources/intel/domain-history.ts +++ b/src/resources/intel/domain-history.ts @@ -4,7 +4,7 @@ import * as Core from 'cloudflare/core'; import { APIResource } from 'cloudflare/resource'; import * as DomainHistoryAPI from 'cloudflare/resources/intel/domain-history'; -export class DomainHistory extends APIResource { +export class DomainHistoryResource extends APIResource { /** * Get Domain History */ @@ -22,13 +22,13 @@ export class DomainHistory extends APIResource { } } -export interface IntelDomainHistory { - categorizations?: Array; +export interface DomainHistory { + categorizations?: Array; domain?: string; } -export namespace IntelDomainHistory { +export namespace DomainHistory { export interface Categorization { categories?: Array; @@ -38,7 +38,7 @@ export namespace IntelDomainHistory { } } -export type DomainHistoryGetResponse = Array; +export type DomainHistoryGetResponse = Array; export interface DomainHistoryGetParams { /** @@ -52,8 +52,8 @@ export interface DomainHistoryGetParams { domain?: string; } -export namespace DomainHistory { - export import IntelDomainHistory = DomainHistoryAPI.IntelDomainHistory; +export namespace DomainHistoryResource { + export import DomainHistory = DomainHistoryAPI.DomainHistory; export import DomainHistoryGetResponse = DomainHistoryAPI.DomainHistoryGetResponse; export import DomainHistoryGetParams = DomainHistoryAPI.DomainHistoryGetParams; } diff --git a/src/resources/intel/domains/domains.ts b/src/resources/intel/domains/domains.ts index 0ca36ee716..a38dc03d65 100644 --- a/src/resources/intel/domains/domains.ts +++ b/src/resources/intel/domains/domains.ts @@ -11,26 +11,26 @@ export class Domains extends APIResource { /** * Get Domain Details */ - get(params: DomainGetParams, options?: Core.RequestOptions): Core.APIPromise { + get(params: DomainGetParams, options?: Core.RequestOptions): Core.APIPromise { const { account_id, ...query } = params; return ( this._client.get(`/accounts/${account_id}/intel/domain`, { query, ...options }) as Core.APIPromise<{ - result: IntelDomain; + result: Domain; }> )._thenUnwrap((obj) => obj.result); } } -export interface IntelDomain { +export interface Domain { /** * Additional information related to the host name. */ - additional_information?: IntelDomain.AdditionalInformation; + additional_information?: Domain.AdditionalInformation; /** * Application that the hostname belongs to. */ - application?: IntelDomain.Application; + application?: Domain.Application; /** * Current content categories. @@ -39,7 +39,7 @@ export interface IntelDomain { domain?: string; - inherited_content_categories?: Array; + inherited_content_categories?: Array; /** * Domain from which `inherited_content_categories` and `inherited_risk_types` are @@ -47,7 +47,7 @@ export interface IntelDomain { */ inherited_from?: string; - inherited_risk_types?: Array; + inherited_risk_types?: Array; /** * Global Cloudflare 100k ranking for the last 30 days, if available for the @@ -59,7 +59,7 @@ export interface IntelDomain { * Specifies a list of references to one or more IP addresses or domain names that * the domain name currently resolves to. */ - resolves_to_refs?: Array; + resolves_to_refs?: Array; /** * Hostname risk score, which is a value between 0 (lowest risk) to 1 (highest @@ -70,7 +70,7 @@ export interface IntelDomain { risk_types?: Array; } -export namespace IntelDomain { +export namespace Domain { /** * Additional information related to the host name. */ @@ -133,7 +133,7 @@ export interface DomainGetParams { } export namespace Domains { - export import IntelDomain = DomainsAPI.IntelDomain; + export import Domain = DomainsAPI.Domain; export import DomainGetParams = DomainsAPI.DomainGetParams; export import Bulks = BulksAPI.Bulks; export import BulkGetResponse = BulksAPI.BulkGetResponse; diff --git a/src/resources/intel/domains/index.ts b/src/resources/intel/domains/index.ts index ca30fb3b23..01ad658f8f 100644 --- a/src/resources/intel/domains/index.ts +++ b/src/resources/intel/domains/index.ts @@ -1,4 +1,4 @@ // File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. export { BulkGetResponse, BulkGetParams, Bulks } from './bulks'; -export { IntelDomain, DomainGetParams, Domains } from './domains'; +export { Domain, DomainGetParams, Domains } from './domains'; diff --git a/src/resources/intel/index.ts b/src/resources/intel/index.ts index 5e44225241..23332f2d4a 100644 --- a/src/resources/intel/index.ts +++ b/src/resources/intel/index.ts @@ -1,6 +1,17 @@ // File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. +export { ASN, ASNGetParams, ASNResource } from './asn/index'; export { AttackSurfaceReport } from './attack-surface-report/index'; +export { DNS, UnnamedSchemaRefB5e16cee4f32382c294201aedb9fc050, DNSGetParams } from './dns'; +export { Domain, DomainGetParams, Domains } from './domains/index'; +export { + DomainHistory, + DomainHistoryGetResponse, + DomainHistoryGetParams, + DomainHistoryResource, +} from './domain-history'; +export { IP, IPGetResponse, IPGetParams, IPs } from './ips'; +export { IPList, IPListGetResponse, IPListGetParams, IPLists } from './ip-lists'; export { IndicatorFeedCreateResponse, IndicatorFeedUpdateResponse, @@ -16,22 +27,6 @@ export { IndicatorFeeds, } from './indicator-feeds/index'; export { Intel } from './intel'; -export { IntelASN, ASNGetParams, ASN } from './asn/index'; -export { IntelDomain, DomainGetParams, Domains } from './domains/index'; -export { - IntelDomainHistory, - DomainHistoryGetResponse, - DomainHistoryGetParams, - DomainHistory, -} from './domain-history'; -export { IntelIPList, IPListGetResponse, IPListGetParams, IPLists } from './ip-lists'; -export { - IntelPassiveDNSByIP, - UnnamedSchemaRefB5e16cee4f32382c294201aedb9fc050, - DNSGetParams, - DNS, -} from './dns'; -export { IntelSchemasIP, IPGetResponse, IPGetParams, IPs } from './ips'; -export { IntelSinkholeItem, SinkholeListParams, IntelSinkholeItemsSinglePage, Sinkholes } from './sinkholes'; -export { IntelWhois, WhoisGetParams, Whois } from './whois'; export { MiscategorizationCreateParams, Miscategorizations } from './miscategorizations'; +export { SinkholeItem, SinkholeListParams, SinkholeItemsSinglePage, Sinkholes } from './sinkholes'; +export { Whois, WhoisGetParams } from './whois'; diff --git a/src/resources/intel/intel.ts b/src/resources/intel/intel.ts index e58b4735d7..f6c8e8a3a4 100644 --- a/src/resources/intel/intel.ts +++ b/src/resources/intel/intel.ts @@ -14,10 +14,12 @@ import * as DomainsAPI from 'cloudflare/resources/intel/domains/domains'; import * as IndicatorFeedsAPI from 'cloudflare/resources/intel/indicator-feeds/indicator-feeds'; export class Intel extends APIResource { - asn: ASNAPI.ASN = new ASNAPI.ASN(this._client); + asn: ASNAPI.ASNResource = new ASNAPI.ASNResource(this._client); dns: DNSAPI.DNS = new DNSAPI.DNS(this._client); domains: DomainsAPI.Domains = new DomainsAPI.Domains(this._client); - domainHistory: DomainHistoryAPI.DomainHistory = new DomainHistoryAPI.DomainHistory(this._client); + domainHistory: DomainHistoryAPI.DomainHistoryResource = new DomainHistoryAPI.DomainHistoryResource( + this._client, + ); ips: IPsAPI.IPs = new IPsAPI.IPs(this._client); ipLists: IPListsAPI.IPLists = new IPListsAPI.IPLists(this._client); miscategorizations: MiscategorizationsAPI.Miscategorizations = new MiscategorizationsAPI.Miscategorizations( @@ -31,32 +33,30 @@ export class Intel extends APIResource { } export namespace Intel { + export import ASNResource = ASNAPI.ASNResource; export import ASN = ASNAPI.ASN; - export import IntelASN = ASNAPI.IntelASN; export import ASNGetParams = ASNAPI.ASNGetParams; export import DNS = DNSAPI.DNS; - export import IntelPassiveDNSByIP = DNSAPI.IntelPassiveDNSByIP; export import UnnamedSchemaRefB5e16cee4f32382c294201aedb9fc050 = DNSAPI.UnnamedSchemaRefB5e16cee4f32382c294201aedb9fc050; export import DNSGetParams = DNSAPI.DNSGetParams; export import Domains = DomainsAPI.Domains; - export import IntelDomain = DomainsAPI.IntelDomain; + export import Domain = DomainsAPI.Domain; export import DomainGetParams = DomainsAPI.DomainGetParams; + export import DomainHistoryResource = DomainHistoryAPI.DomainHistoryResource; export import DomainHistory = DomainHistoryAPI.DomainHistory; - export import IntelDomainHistory = DomainHistoryAPI.IntelDomainHistory; export import DomainHistoryGetResponse = DomainHistoryAPI.DomainHistoryGetResponse; export import DomainHistoryGetParams = DomainHistoryAPI.DomainHistoryGetParams; export import IPs = IPsAPI.IPs; - export import IntelSchemasIP = IPsAPI.IntelSchemasIP; + export import IP = IPsAPI.IP; export import IPGetResponse = IPsAPI.IPGetResponse; export import IPGetParams = IPsAPI.IPGetParams; export import IPLists = IPListsAPI.IPLists; - export import IntelIPList = IPListsAPI.IntelIPList; + export import IPList = IPListsAPI.IPList; export import IPListGetResponse = IPListsAPI.IPListGetResponse; export import IPListGetParams = IPListsAPI.IPListGetParams; export import Miscategorizations = MiscategorizationsAPI.Miscategorizations; export import MiscategorizationCreateParams = MiscategorizationsAPI.MiscategorizationCreateParams; export import Whois = WhoisAPI.Whois; - export import IntelWhois = WhoisAPI.IntelWhois; export import WhoisGetParams = WhoisAPI.WhoisGetParams; export import IndicatorFeeds = IndicatorFeedsAPI.IndicatorFeeds; export import IndicatorFeedCreateResponse = IndicatorFeedsAPI.IndicatorFeedCreateResponse; @@ -71,8 +71,8 @@ export namespace Intel { export import IndicatorFeedDataParams = IndicatorFeedsAPI.IndicatorFeedDataParams; export import IndicatorFeedGetParams = IndicatorFeedsAPI.IndicatorFeedGetParams; export import Sinkholes = SinkholesAPI.Sinkholes; - export import IntelSinkholeItem = SinkholesAPI.IntelSinkholeItem; - export import IntelSinkholeItemsSinglePage = SinkholesAPI.IntelSinkholeItemsSinglePage; + export import SinkholeItem = SinkholesAPI.SinkholeItem; + export import SinkholeItemsSinglePage = SinkholesAPI.SinkholeItemsSinglePage; export import SinkholeListParams = SinkholesAPI.SinkholeListParams; export import AttackSurfaceReport = AttackSurfaceReportAPI.AttackSurfaceReport; } diff --git a/src/resources/intel/ip-lists.ts b/src/resources/intel/ip-lists.ts index d56f901243..b7f51f3a25 100644 --- a/src/resources/intel/ip-lists.ts +++ b/src/resources/intel/ip-lists.ts @@ -18,7 +18,7 @@ export class IPLists extends APIResource { } } -export interface IntelIPList { +export interface IPList { id?: number; description?: string; @@ -26,7 +26,7 @@ export interface IntelIPList { name?: string; } -export type IPListGetResponse = Array; +export type IPListGetResponse = Array; export interface IPListGetParams { /** @@ -36,7 +36,7 @@ export interface IPListGetParams { } export namespace IPLists { - export import IntelIPList = IPListsAPI.IntelIPList; + export import IPList = IPListsAPI.IPList; export import IPListGetResponse = IPListsAPI.IPListGetResponse; export import IPListGetParams = IPListsAPI.IPListGetParams; } diff --git a/src/resources/intel/ips.ts b/src/resources/intel/ips.ts index 159e056bec..629fc7124b 100644 --- a/src/resources/intel/ips.ts +++ b/src/resources/intel/ips.ts @@ -18,19 +18,19 @@ export class IPs extends APIResource { } } -export interface IntelSchemasIP { +export interface IP { /** * Specifies a reference to the autonomous systems (AS) that the IP address belongs * to. */ - belongs_to_ref?: IntelSchemasIP.BelongsToRef; + belongs_to_ref?: IP.BelongsToRef; ip?: string | string; risk_types?: Array; } -export namespace IntelSchemasIP { +export namespace IP { /** * Specifies a reference to the autonomous systems (AS) that the IP address belongs * to. @@ -51,7 +51,7 @@ export namespace IntelSchemasIP { } } -export type IPGetResponse = Array; +export type IPGetResponse = Array; export interface IPGetParams { /** @@ -71,7 +71,7 @@ export interface IPGetParams { } export namespace IPs { - export import IntelSchemasIP = IPsAPI.IntelSchemasIP; + export import IP = IPsAPI.IP; export import IPGetResponse = IPsAPI.IPGetResponse; export import IPGetParams = IPsAPI.IPGetParams; } diff --git a/src/resources/intel/sinkholes.ts b/src/resources/intel/sinkholes.ts index d50e95fa55..53698a81c0 100644 --- a/src/resources/intel/sinkholes.ts +++ b/src/resources/intel/sinkholes.ts @@ -12,19 +12,19 @@ export class Sinkholes extends APIResource { list( params: SinkholeListParams, options?: Core.RequestOptions, - ): Core.PagePromise { + ): Core.PagePromise { const { account_id } = params; return this._client.getAPIList( `/accounts/${account_id}/intel/sinkholes`, - IntelSinkholeItemsSinglePage, + SinkholeItemsSinglePage, options, ); } } -export class IntelSinkholeItemsSinglePage extends SinglePage {} +export class SinkholeItemsSinglePage extends SinglePage {} -export interface IntelSinkholeItem { +export interface SinkholeItem { /** * The unique identifier for the sinkhole */ @@ -69,7 +69,7 @@ export interface SinkholeListParams { } export namespace Sinkholes { - export import IntelSinkholeItem = SinkholesAPI.IntelSinkholeItem; - export import IntelSinkholeItemsSinglePage = SinkholesAPI.IntelSinkholeItemsSinglePage; + export import SinkholeItem = SinkholesAPI.SinkholeItem; + export import SinkholeItemsSinglePage = SinkholesAPI.SinkholeItemsSinglePage; export import SinkholeListParams = SinkholesAPI.SinkholeListParams; } diff --git a/src/resources/intel/whois.ts b/src/resources/intel/whois.ts index e61bfda6ce..783babb77d 100644 --- a/src/resources/intel/whois.ts +++ b/src/resources/intel/whois.ts @@ -8,17 +8,17 @@ export class Whois extends APIResource { /** * Get WHOIS Record */ - get(params: WhoisGetParams, options?: Core.RequestOptions): Core.APIPromise { + get(params: WhoisGetParams, options?: Core.RequestOptions): Core.APIPromise { const { account_id, ...query } = params; return ( this._client.get(`/accounts/${account_id}/intel/whois`, { query, ...options }) as Core.APIPromise<{ - result: IntelWhois; + result: Whois; }> )._thenUnwrap((obj) => obj.result); } } -export interface IntelWhois { +export interface Whois { created_date?: string; domain?: string; @@ -51,6 +51,6 @@ export interface WhoisGetParams { } export namespace Whois { - export import IntelWhois = WhoisAPI.IntelWhois; + export import Whois = WhoisAPI.Whois; export import WhoisGetParams = WhoisAPI.WhoisGetParams; } diff --git a/src/resources/ips.ts b/src/resources/ips.ts index 0c5996051c..93a91a1596 100644 --- a/src/resources/ips.ts +++ b/src/resources/ips.ts @@ -3,7 +3,6 @@ import * as Core from 'cloudflare/core'; import { APIResource } from 'cloudflare/resource'; import { isRequestOptions } from 'cloudflare/core'; -import * as IPsAPI from 'cloudflare/resources/ips'; export class IPs extends APIResource { /** @@ -74,10 +73,3 @@ export interface IPListParams { */ networks?: string; } - -export namespace IPs { - export import IPs = IPsAPI.IPs; - export import JDCloudIPs = IPsAPI.JDCloudIPs; - export import IPListResponse = IPsAPI.IPListResponse; - export import IPListParams = IPsAPI.IPListParams; -} diff --git a/src/resources/keyless-certificates.ts b/src/resources/keyless-certificates.ts index bdc0269d87..44ddae28a3 100644 --- a/src/resources/keyless-certificates.ts +++ b/src/resources/keyless-certificates.ts @@ -2,7 +2,6 @@ import * as Core from 'cloudflare/core'; import { APIResource } from 'cloudflare/resource'; -import * as KeylessCertificatesAPI from 'cloudflare/resources/keyless-certificates'; import * as Shared from 'cloudflare/resources/shared'; import * as CustomHostnamesAPI from 'cloudflare/resources/custom-hostnames/custom-hostnames'; import { SinglePage } from 'cloudflare/pagination'; @@ -11,14 +10,11 @@ export class KeylessCertificates extends APIResource { /** * Create Keyless SSL Configuration */ - create( - params: KeylessCertificateCreateParams, - options?: Core.RequestOptions, - ): Core.APIPromise { + create(params: KeylessCertificateCreateParams, options?: Core.RequestOptions): Core.APIPromise { const { zone_id, ...body } = params; return ( this._client.post(`/zones/${zone_id}/keyless_certificates`, { body, ...options }) as Core.APIPromise<{ - result: KeylessCertificateHostname; + result: Hostname; }> )._thenUnwrap((obj) => obj.result); } @@ -29,11 +25,11 @@ export class KeylessCertificates extends APIResource { list( params: KeylessCertificateListParams, options?: Core.RequestOptions, - ): Core.PagePromise { + ): Core.PagePromise { const { zone_id } = params; return this._client.getAPIList( `/zones/${zone_id}/keyless_certificates`, - KeylessCertificateHostnamesSinglePage, + KeylessCertificatesSinglePage, options, ); } @@ -63,13 +59,13 @@ export class KeylessCertificates extends APIResource { keylessCertificateId: string, params: KeylessCertificateEditParams, options?: Core.RequestOptions, - ): Core.APIPromise { + ): Core.APIPromise { const { zone_id, ...body } = params; return ( this._client.patch(`/zones/${zone_id}/keyless_certificates/${keylessCertificateId}`, { body, ...options, - }) as Core.APIPromise<{ result: KeylessCertificateHostname }> + }) as Core.APIPromise<{ result: Hostname }> )._thenUnwrap((obj) => obj.result); } @@ -80,20 +76,20 @@ export class KeylessCertificates extends APIResource { keylessCertificateId: string, params: KeylessCertificateGetParams, options?: Core.RequestOptions, - ): Core.APIPromise { + ): Core.APIPromise { const { zone_id } = params; return ( this._client.get( `/zones/${zone_id}/keyless_certificates/${keylessCertificateId}`, options, - ) as Core.APIPromise<{ result: KeylessCertificateHostname }> + ) as Core.APIPromise<{ result: Hostname }> )._thenUnwrap((obj) => obj.result); } } -export class KeylessCertificateHostnamesSinglePage extends SinglePage {} +export class KeylessCertificatesSinglePage extends SinglePage {} -export interface KeylessCertificate { +export interface Hostname { /** * Keyless certificate identifier tag. */ @@ -144,27 +140,10 @@ export interface KeylessCertificate { /** * Configuration for using Keyless SSL through a Cloudflare Tunnel */ - tunnel?: KeylessCertificate.Tunnel; -} - -export namespace KeylessCertificate { - /** - * Configuration for using Keyless SSL through a Cloudflare Tunnel - */ - export interface Tunnel { - /** - * Private IP of the Key Server Host - */ - private_ip: string; - - /** - * Cloudflare Tunnel Virtual Network ID - */ - vnet_id: string; - } + tunnel?: Tunnel; } -export interface KeylessCertificateHostname { +export interface KeylessCertificate { /** * Keyless certificate identifier tag. */ @@ -215,24 +194,22 @@ export interface KeylessCertificateHostname { /** * Configuration for using Keyless SSL through a Cloudflare Tunnel */ - tunnel?: KeylessCertificateHostname.Tunnel; + tunnel?: Tunnel; } -export namespace KeylessCertificateHostname { +/** + * Configuration for using Keyless SSL through a Cloudflare Tunnel + */ +export interface Tunnel { /** - * Configuration for using Keyless SSL through a Cloudflare Tunnel + * Private IP of the Key Server Host */ - export interface Tunnel { - /** - * Private IP of the Key Server Host - */ - private_ip: string; + private_ip: string; - /** - * Cloudflare Tunnel Virtual Network ID - */ - vnet_id: string; - } + /** + * Cloudflare Tunnel Virtual Network ID + */ + vnet_id: string; } export interface UnnamedSchemaRefA91f0bd72ee433f010eecfdc94ccf298 { @@ -286,24 +263,7 @@ export interface UnnamedSchemaRefA91f0bd72ee433f010eecfdc94ccf298 { /** * Configuration for using Keyless SSL through a Cloudflare Tunnel */ - tunnel?: UnnamedSchemaRefA91f0bd72ee433f010eecfdc94ccf298.Tunnel; -} - -export namespace UnnamedSchemaRefA91f0bd72ee433f010eecfdc94ccf298 { - /** - * Configuration for using Keyless SSL through a Cloudflare Tunnel - */ - export interface Tunnel { - /** - * Private IP of the Key Server Host - */ - private_ip: string; - - /** - * Cloudflare Tunnel Virtual Network ID - */ - vnet_id: string; - } + tunnel?: Tunnel; } export interface KeylessCertificateCreateParams { @@ -344,24 +304,7 @@ export interface KeylessCertificateCreateParams { /** * Body param: Configuration for using Keyless SSL through a Cloudflare Tunnel */ - tunnel?: KeylessCertificateCreateParams.Tunnel; -} - -export namespace KeylessCertificateCreateParams { - /** - * Configuration for using Keyless SSL through a Cloudflare Tunnel - */ - export interface Tunnel { - /** - * Private IP of the Key Server Host - */ - private_ip: string; - - /** - * Cloudflare Tunnel Virtual Network ID - */ - vnet_id: string; - } + tunnel?: Tunnel; } export interface KeylessCertificateListParams { @@ -413,24 +356,7 @@ export interface KeylessCertificateEditParams { /** * Body param: Configuration for using Keyless SSL through a Cloudflare Tunnel */ - tunnel?: KeylessCertificateEditParams.Tunnel; -} - -export namespace KeylessCertificateEditParams { - /** - * Configuration for using Keyless SSL through a Cloudflare Tunnel - */ - export interface Tunnel { - /** - * Private IP of the Key Server Host - */ - private_ip: string; - - /** - * Cloudflare Tunnel Virtual Network ID - */ - vnet_id: string; - } + tunnel?: Tunnel; } export interface KeylessCertificateGetParams { @@ -439,15 +365,3 @@ export interface KeylessCertificateGetParams { */ zone_id: string; } - -export namespace KeylessCertificates { - export import KeylessCertificate = KeylessCertificatesAPI.KeylessCertificate; - export import KeylessCertificateHostname = KeylessCertificatesAPI.KeylessCertificateHostname; - export import UnnamedSchemaRefA91f0bd72ee433f010eecfdc94ccf298 = KeylessCertificatesAPI.UnnamedSchemaRefA91f0bd72ee433f010eecfdc94ccf298; - export import KeylessCertificateHostnamesSinglePage = KeylessCertificatesAPI.KeylessCertificateHostnamesSinglePage; - export import KeylessCertificateCreateParams = KeylessCertificatesAPI.KeylessCertificateCreateParams; - export import KeylessCertificateListParams = KeylessCertificatesAPI.KeylessCertificateListParams; - export import KeylessCertificateDeleteParams = KeylessCertificatesAPI.KeylessCertificateDeleteParams; - export import KeylessCertificateEditParams = KeylessCertificatesAPI.KeylessCertificateEditParams; - export import KeylessCertificateGetParams = KeylessCertificatesAPI.KeylessCertificateGetParams; -} diff --git a/src/resources/kv/index.ts b/src/resources/kv/index.ts index 95d7e64ad4..f050017d86 100644 --- a/src/resources/kv/index.ts +++ b/src/resources/kv/index.ts @@ -2,11 +2,11 @@ export { KV } from './kv'; export { - WorkersKVNamespace, + Namespace, NamespaceCreateParams, NamespaceUpdateParams, NamespaceListParams, NamespaceDeleteParams, - WorkersKVNamespacesV4PagePaginationArray, + NamespacesV4PagePaginationArray, Namespaces, } from './namespaces/index'; diff --git a/src/resources/kv/kv.ts b/src/resources/kv/kv.ts index 2046047ed1..b13659961f 100644 --- a/src/resources/kv/kv.ts +++ b/src/resources/kv/kv.ts @@ -9,8 +9,8 @@ export class KV extends APIResource { export namespace KV { export import Namespaces = NamespacesAPI.Namespaces; - export import WorkersKVNamespace = NamespacesAPI.WorkersKVNamespace; - export import WorkersKVNamespacesV4PagePaginationArray = NamespacesAPI.WorkersKVNamespacesV4PagePaginationArray; + export import Namespace = NamespacesAPI.Namespace; + export import NamespacesV4PagePaginationArray = NamespacesAPI.NamespacesV4PagePaginationArray; export import NamespaceCreateParams = NamespacesAPI.NamespaceCreateParams; export import NamespaceUpdateParams = NamespacesAPI.NamespaceUpdateParams; export import NamespaceListParams = NamespacesAPI.NamespaceListParams; diff --git a/src/resources/kv/namespaces/index.ts b/src/resources/kv/namespaces/index.ts index dc9c09240d..0db65c6c67 100644 --- a/src/resources/kv/namespaces/index.ts +++ b/src/resources/kv/namespaces/index.ts @@ -1,15 +1,15 @@ // File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. export { BulkUpdateParams, BulkDeleteParams, Bulk } from './bulk'; +export { Key, KeyListParams, KeysCursorLimitPagination, Keys } from './keys'; export { MetadataGetResponse, MetadataGetParams, Metadata } from './metadata'; -export { ValueGetResponse, ValueUpdateParams, ValueDeleteParams, ValueGetParams, Values } from './values'; -export { WorkersKVKey, KeyListParams, WorkersKVKeysCursorLimitPagination, Keys } from './keys'; export { - WorkersKVNamespace, + Namespace, NamespaceCreateParams, NamespaceUpdateParams, NamespaceListParams, NamespaceDeleteParams, - WorkersKVNamespacesV4PagePaginationArray, + NamespacesV4PagePaginationArray, Namespaces, } from './namespaces'; +export { ValueGetResponse, ValueUpdateParams, ValueDeleteParams, ValueGetParams, Values } from './values'; diff --git a/src/resources/kv/namespaces/keys.ts b/src/resources/kv/namespaces/keys.ts index 4884e6c326..0cb3be07df 100644 --- a/src/resources/kv/namespaces/keys.ts +++ b/src/resources/kv/namespaces/keys.ts @@ -13,23 +13,23 @@ export class Keys extends APIResource { namespaceId: string, params: KeyListParams, options?: Core.RequestOptions, - ): Core.PagePromise { + ): Core.PagePromise { const { account_id, ...query } = params; return this._client.getAPIList( `/accounts/${account_id}/storage/kv/namespaces/${namespaceId}/keys`, - WorkersKVKeysCursorLimitPagination, + KeysCursorLimitPagination, { query, ...options }, ); } } -export class WorkersKVKeysCursorLimitPagination extends CursorLimitPagination {} +export class KeysCursorLimitPagination extends CursorLimitPagination {} /** * A name for a value. A value stored under a given key may be retrieved via the * same key. */ -export interface WorkersKVKey { +export interface Key { /** * A key's name. The name may be at most 512 bytes. All printable, non-whitespace * characters are valid. Use percent-encoding to define key names as part of a URL. @@ -62,7 +62,7 @@ export interface KeyListParams extends CursorLimitPaginationParams { } export namespace Keys { - export import WorkersKVKey = KeysAPI.WorkersKVKey; - export import WorkersKVKeysCursorLimitPagination = KeysAPI.WorkersKVKeysCursorLimitPagination; + export import Key = KeysAPI.Key; + export import KeysCursorLimitPagination = KeysAPI.KeysCursorLimitPagination; export import KeyListParams = KeysAPI.KeyListParams; } diff --git a/src/resources/kv/namespaces/namespaces.ts b/src/resources/kv/namespaces/namespaces.ts index 16248bc523..f02bc85748 100644 --- a/src/resources/kv/namespaces/namespaces.ts +++ b/src/resources/kv/namespaces/namespaces.ts @@ -21,13 +21,13 @@ export class Namespaces extends APIResource { * already owns a namespace with this title. A namespace must be explicitly deleted * to be replaced. */ - create(params: NamespaceCreateParams, options?: Core.RequestOptions): Core.APIPromise { + create(params: NamespaceCreateParams, options?: Core.RequestOptions): Core.APIPromise { const { account_id, ...body } = params; return ( this._client.post(`/accounts/${account_id}/storage/kv/namespaces`, { body, ...options, - }) as Core.APIPromise<{ result: WorkersKVNamespace }> + }) as Core.APIPromise<{ result: Namespace }> )._thenUnwrap((obj) => obj.result); } @@ -54,11 +54,11 @@ export class Namespaces extends APIResource { list( params: NamespaceListParams, options?: Core.RequestOptions, - ): Core.PagePromise { + ): Core.PagePromise { const { account_id, ...query } = params; return this._client.getAPIList( `/accounts/${account_id}/storage/kv/namespaces`, - WorkersKVNamespacesV4PagePaginationArray, + NamespacesV4PagePaginationArray, { query, ...options }, ); } @@ -81,9 +81,9 @@ export class Namespaces extends APIResource { } } -export class WorkersKVNamespacesV4PagePaginationArray extends V4PagePaginationArray {} +export class NamespacesV4PagePaginationArray extends V4PagePaginationArray {} -export interface WorkersKVNamespace { +export interface Namespace { /** * Namespace identifier tag. */ @@ -155,8 +155,8 @@ export interface NamespaceDeleteParams { } export namespace Namespaces { - export import WorkersKVNamespace = NamespacesAPI.WorkersKVNamespace; - export import WorkersKVNamespacesV4PagePaginationArray = NamespacesAPI.WorkersKVNamespacesV4PagePaginationArray; + export import Namespace = NamespacesAPI.Namespace; + export import NamespacesV4PagePaginationArray = NamespacesAPI.NamespacesV4PagePaginationArray; export import NamespaceCreateParams = NamespacesAPI.NamespaceCreateParams; export import NamespaceUpdateParams = NamespacesAPI.NamespaceUpdateParams; export import NamespaceListParams = NamespacesAPI.NamespaceListParams; @@ -165,8 +165,8 @@ export namespace Namespaces { export import BulkUpdateParams = BulkAPI.BulkUpdateParams; export import BulkDeleteParams = BulkAPI.BulkDeleteParams; export import Keys = KeysAPI.Keys; - export import WorkersKVKey = KeysAPI.WorkersKVKey; - export import WorkersKVKeysCursorLimitPagination = KeysAPI.WorkersKVKeysCursorLimitPagination; + export import Key = KeysAPI.Key; + export import KeysCursorLimitPagination = KeysAPI.KeysCursorLimitPagination; export import KeyListParams = KeysAPI.KeyListParams; export import Metadata = MetadataAPI.Metadata; export import MetadataGetResponse = MetadataAPI.MetadataGetResponse; diff --git a/src/resources/load-balancers/index.ts b/src/resources/load-balancers/index.ts index 221e560e26..3ff41b22cd 100644 --- a/src/resources/load-balancers/index.ts +++ b/src/resources/load-balancers/index.ts @@ -1,18 +1,6 @@ // File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. -export { - LoadBalancer, - UnnamedSchemaRef06ba14ec7860c091efc98fd9af30f382, - LoadBalancerDeleteResponse, - LoadBalancerCreateParams, - LoadBalancerUpdateParams, - LoadBalancerListParams, - LoadBalancerDeleteParams, - LoadBalancerEditParams, - LoadBalancerGetParams, - LoadBalancersSinglePage, - LoadBalancers, -} from './load-balancers'; +export { LoadBalancers } from './load-balancers'; export { MonitorDeleteResponse, MonitorCreateParams, diff --git a/src/resources/load-balancers/load-balancers.ts b/src/resources/load-balancers/load-balancers.ts index bcc4058e5a..ccfceca0a8 100644 --- a/src/resources/load-balancers/load-balancers.ts +++ b/src/resources/load-balancers/load-balancers.ts @@ -110,6 +110,85 @@ export class LoadBalancers extends APIResource { export class LoadBalancersSinglePage extends SinglePage {} +/** + * Controls features that modify the routing of requests to pools and origins in + * response to dynamic conditions, such as during the interval between active + * health monitoring requests. For example, zero-downtime failover occurs + * immediately when an origin becomes unavailable due to HTTP 521, 522, or 523 + * response codes. If there is another healthy origin in the same pool, the request + * is retried once against this alternate origin. + */ +export interface AdaptiveRouting { + /** + * Extends zero-downtime failover of requests to healthy origins from alternate + * pools, when no healthy alternate exists in the same pool, according to the + * failover order defined by traffic and origin steering. When set false (the + * default) zero-downtime failover will only occur between origins within the same + * pool. See `session_affinity_attributes` for control over when sessions are + * broken or reassigned. + */ + failover_across_pools?: boolean; +} + +/** + * WNAM: Western North America, ENAM: Eastern North America, WEU: Western Europe, + * EEU: Eastern Europe, NSAM: Northern South America, SSAM: Southern South America, + * OC: Oceania, ME: Middle East, NAF: North Africa, SAF: South Africa, SAS: + * Southern Asia, SEAS: South East Asia, NEAS: North East Asia, ALL_REGIONS: all + * regions (ENTERPRISE customers only). + */ +export type CheckRegion = + | 'WNAM' + | 'ENAM' + | 'WEU' + | 'EEU' + | 'NSAM' + | 'SSAM' + | 'OC' + | 'ME' + | 'NAF' + | 'SAF' + | 'SAS' + | 'SEAS' + | 'NEAS' + | 'ALL_REGIONS'; + +/** + * A pool ID. + */ +export type DefaultPoolsItem = string; + +/** + * Filter options for a particular resource type (pool or origin). Use null to + * reset. + */ +export interface FilterOptions { + /** + * If set true, disable notifications for this type of resource (pool or origin). + */ + disable?: boolean; + + /** + * If present, send notifications only for this health status (e.g. false for only + * DOWN events). Use null to reset (all events). + */ + healthy?: boolean | null; +} + +/** + * The request header is used to pass additional information with an HTTP request. + * Currently supported header is 'Host'. + */ +export interface Header { + /** + * The 'Host' header allows to override the hostname set in the HTTP request. + * Current support is 1 'Host' header override per origin. + */ + Host?: Array; +} + +export type HostItem = string; + export interface LoadBalancer { id?: string; @@ -121,7 +200,7 @@ export interface LoadBalancer { * response codes. If there is another healthy origin in the same pool, the request * is retried once against this alternate origin. */ - adaptive_routing?: LoadBalancer.AdaptiveRouting; + adaptive_routing?: AdaptiveRouting; /** * A mapping of country codes to a list of pool IDs (ordered by their failover @@ -137,7 +216,7 @@ export interface LoadBalancer { * A list of pool IDs ordered by their failover priority. Pools defined here are * used by default, or when region_pools are not configured for a given region. */ - default_pools?: Array; + default_pools?: Array; /** * Object description. @@ -158,7 +237,7 @@ export interface LoadBalancer { * Controls location-based steering for non-proxied requests. See `steering_policy` * to learn how steering is affected. */ - location_strategy?: LoadBalancer.LocationStrategy; + location_strategy?: LocationStrategy; modified_on?: string; @@ -192,7 +271,7 @@ export interface LoadBalancer { * - `steering_policy="least_connections"`: Use pool weights to scale each pool's * open connections. */ - random_steering?: LoadBalancer.RandomSteering; + random_steering?: RandomSteering; /** * A mapping of region codes to a list of pool IDs (ordered by their failover @@ -205,7 +284,7 @@ export interface LoadBalancer { * BETA Field Not General Access: A list of rules for this load balancer to * execute. */ - rules?: Array; + rules?: Array; /** * Specifies the type of session affinity the load balancer should use unless @@ -237,7 +316,7 @@ export interface LoadBalancer { /** * Configures attributes for session affinity. */ - session_affinity_attributes?: LoadBalancer.SessionAffinityAttributes; + session_affinity_attributes?: SessionAffinityAttributes; /** * Time, in seconds, until a client's session expires after being created. Once the @@ -294,521 +373,535 @@ export interface LoadBalancer { ttl?: number; } -export namespace LoadBalancer { +/** + * Configures load shedding policies and percentages for the pool. + */ +export interface LoadShedding { /** - * Controls features that modify the routing of requests to pools and origins in - * response to dynamic conditions, such as during the interval between active - * health monitoring requests. For example, zero-downtime failover occurs - * immediately when an origin becomes unavailable due to HTTP 521, 522, or 523 - * response codes. If there is another healthy origin in the same pool, the request - * is retried once against this alternate origin. + * The percent of traffic to shed from the pool, according to the default policy. + * Applies to new sessions and traffic without session affinity. */ - export interface AdaptiveRouting { - /** - * Extends zero-downtime failover of requests to healthy origins from alternate - * pools, when no healthy alternate exists in the same pool, according to the - * failover order defined by traffic and origin steering. When set false (the - * default) zero-downtime failover will only occur between origins within the same - * pool. See `session_affinity_attributes` for control over when sessions are - * broken or reassigned. - */ - failover_across_pools?: boolean; - } + default_percent?: number; /** - * Controls location-based steering for non-proxied requests. See `steering_policy` - * to learn how steering is affected. + * The default policy to use when load shedding. A random policy randomly sheds a + * given percent of requests. A hash policy computes a hash over the + * CF-Connecting-IP address and sheds all requests originating from a percent of + * IPs. */ - export interface LocationStrategy { - /** - * Determines the authoritative location when ECS is not preferred, does not exist - * in the request, or its GeoIP lookup is unsuccessful. - * - * - `"pop"`: Use the Cloudflare PoP location. - * - `"resolver_ip"`: Use the DNS resolver GeoIP location. If the GeoIP lookup is - * unsuccessful, use the Cloudflare PoP location. - */ - mode?: 'pop' | 'resolver_ip'; + default_policy?: 'random' | 'hash'; - /** - * Whether the EDNS Client Subnet (ECS) GeoIP should be preferred as the - * authoritative location. - * - * - `"always"`: Always prefer ECS. - * - `"never"`: Never prefer ECS. - * - `"proximity"`: Prefer ECS only when `steering_policy="proximity"`. - * - `"geo"`: Prefer ECS only when `steering_policy="geo"`. - */ - prefer_ecs?: 'always' | 'never' | 'proximity' | 'geo'; - } + /** + * The percent of existing sessions to shed from the pool, according to the session + * policy. + */ + session_percent?: number; /** - * Configures pool weights. + * Only the hash policy is supported for existing sessions (to avoid exponential + * decay). + */ + session_policy?: 'hash'; +} + +/** + * Controls location-based steering for non-proxied requests. See `steering_policy` + * to learn how steering is affected. + */ +export interface LocationStrategy { + /** + * Determines the authoritative location when ECS is not preferred, does not exist + * in the request, or its GeoIP lookup is unsuccessful. * - * - `steering_policy="random"`: A random pool is selected with probability - * proportional to pool weights. - * - `steering_policy="least_outstanding_requests"`: Use pool weights to scale each - * pool's outstanding requests. - * - `steering_policy="least_connections"`: Use pool weights to scale each pool's + * - `"pop"`: Use the Cloudflare PoP location. + * - `"resolver_ip"`: Use the DNS resolver GeoIP location. If the GeoIP lookup is + * unsuccessful, use the Cloudflare PoP location. + */ + mode?: 'pop' | 'resolver_ip'; + + /** + * Whether the EDNS Client Subnet (ECS) GeoIP should be preferred as the + * authoritative location. + * + * - `"always"`: Always prefer ECS. + * - `"never"`: Never prefer ECS. + * - `"proximity"`: Prefer ECS only when `steering_policy="proximity"`. + * - `"geo"`: Prefer ECS only when `steering_policy="geo"`. + */ + prefer_ecs?: 'always' | 'never' | 'proximity' | 'geo'; +} + +/** + * Filter pool and origin health notifications by resource type or health status. + * Use null to reset. + */ +export interface NotificationFilter { + /** + * Filter options for a particular resource type (pool or origin). Use null to + * reset. + */ + origin?: FilterOptions | null; + + /** + * Filter options for a particular resource type (pool or origin). Use null to + * reset. + */ + pool?: FilterOptions | null; +} + +export interface Origin { + /** + * The IP address (IPv4 or IPv6) of the origin, or its publicly addressable + * hostname. Hostnames entered here should resolve directly to the origin, and not + * be a hostname proxied by Cloudflare. To set an internal/reserved address, + * virtual_network_id must also be set. + */ + address?: string; + + /** + * This field shows up only if the origin is disabled. This field is set with the + * time the origin was disabled. + */ + disabled_at?: string; + + /** + * Whether to enable (the default) this origin within the pool. Disabled origins + * will not receive traffic and are excluded from health checks. The origin will + * only be disabled for the current pool. + */ + enabled?: boolean; + + /** + * The request header is used to pass additional information with an HTTP request. + * Currently supported header is 'Host'. + */ + header?: Header; + + /** + * A human-identifiable name for the origin. + */ + name?: string; + + /** + * The virtual network subnet ID the origin belongs in. Virtual network must also + * belong to the account. + */ + virtual_network_id?: string; + + /** + * The weight of this origin relative to other origins in the pool. Based on the + * configured weight the total traffic is distributed among origins within the + * pool. + * + * - `origin_steering.policy="least_outstanding_requests"`: Use weight to scale the + * origin's outstanding requests. + * - `origin_steering.policy="least_connections"`: Use weight to scale the origin's * open connections. */ - export interface RandomSteering { - /** - * The default weight for pools in the load balancer that are not specified in the - * pool_weights map. - */ - default_weight?: number; + weight?: number; +} - /** - * A mapping of pool IDs to custom weights. The weight is relative to other pools - * in the load balancer. - */ - pool_weights?: unknown; - } +export interface OriginItem { + /** + * The IP address (IPv4 or IPv6) of the origin, or its publicly addressable + * hostname. Hostnames entered here should resolve directly to the origin, and not + * be a hostname proxied by Cloudflare. To set an internal/reserved address, + * virtual_network_id must also be set. + */ + address?: string; /** - * A rule object containing conditions and overrides for this load balancer to - * evaluate. + * This field shows up only if the origin is disabled. This field is set with the + * time the origin was disabled. */ - export interface Rule { - /** - * The condition expressions to evaluate. If the condition evaluates to true, the - * overrides or fixed_response in this rule will be applied. An empty condition is - * always true. For more details on condition expressions, please see - * https://developers.cloudflare.com/load-balancing/understand-basics/load-balancing-rules/expressions. - */ - condition?: string; + disabled_at?: string; + + /** + * Whether to enable (the default) this origin within the pool. Disabled origins + * will not receive traffic and are excluded from health checks. The origin will + * only be disabled for the current pool. + */ + enabled?: boolean; + + /** + * The request header is used to pass additional information with an HTTP request. + * Currently supported header is 'Host'. + */ + header?: Header; + + /** + * A human-identifiable name for the origin. + */ + name?: string; + + /** + * The virtual network subnet ID the origin belongs in. Virtual network must also + * belong to the account. + */ + virtual_network_id?: string; + + /** + * The weight of this origin relative to other origins in the pool. Based on the + * configured weight the total traffic is distributed among origins within the + * pool. + * + * - `origin_steering.policy="least_outstanding_requests"`: Use weight to scale the + * origin's outstanding requests. + * - `origin_steering.policy="least_connections"`: Use weight to scale the origin's + * open connections. + */ + weight?: number; +} + +/** + * Configures origin steering for the pool. Controls how origins are selected for + * new sessions and traffic without session affinity. + */ +export interface OriginSteering { + /** + * The type of origin steering policy to use. + * + * - `"random"`: Select an origin randomly. + * - `"hash"`: Select an origin by computing a hash over the CF-Connecting-IP + * address. + * - `"least_outstanding_requests"`: Select an origin by taking into consideration + * origin weights, as well as each origin's number of outstanding requests. + * Origins with more pending requests are weighted proportionately less relative + * to others. + * - `"least_connections"`: Select an origin by taking into consideration origin + * weights, as well as each origin's number of open connections. Origins with + * more open connections are weighted proportionately less relative to others. + * Supported for HTTP/1 and HTTP/2 connections. + */ + policy?: 'random' | 'hash' | 'least_outstanding_requests' | 'least_connections'; +} + +/** + * Configures pool weights. + * + * - `steering_policy="random"`: A random pool is selected with probability + * proportional to pool weights. + * - `steering_policy="least_outstanding_requests"`: Use pool weights to scale each + * pool's outstanding requests. + * - `steering_policy="least_connections"`: Use pool weights to scale each pool's + * open connections. + */ +export interface RandomSteering { + /** + * The default weight for pools in the load balancer that are not specified in the + * pool_weights map. + */ + default_weight?: number; + + /** + * A mapping of pool IDs to custom weights. The weight is relative to other pools + * in the load balancer. + */ + pool_weights?: unknown; +} + +/** + * A rule object containing conditions and overrides for this load balancer to + * evaluate. + */ +export interface RulesItem { + /** + * The condition expressions to evaluate. If the condition evaluates to true, the + * overrides or fixed_response in this rule will be applied. An empty condition is + * always true. For more details on condition expressions, please see + * https://developers.cloudflare.com/load-balancing/understand-basics/load-balancing-rules/expressions. + */ + condition?: string; + + /** + * Disable this specific rule. It will no longer be evaluated by this load + * balancer. + */ + disabled?: boolean; + + /** + * A collection of fields used to directly respond to the eyeball instead of + * routing to a pool. If a fixed_response is supplied the rule will be marked as + * terminates. + */ + fixed_response?: RulesItem.FixedResponse; + + /** + * Name of this rule. Only used for human readability. + */ + name?: string; + + /** + * A collection of overrides to apply to the load balancer when this rule's + * condition is true. All fields are optional. + */ + overrides?: RulesItem.Overrides; + + /** + * The order in which rules should be executed in relation to each other. Lower + * values are executed first. Values do not need to be sequential. If no value is + * provided for any rule the array order of the rules field will be used to assign + * a priority. + */ + priority?: number; + + /** + * If this rule's condition is true, this causes rule evaluation to stop after + * processing this rule. + */ + terminates?: boolean; +} +export namespace RulesItem { + /** + * A collection of fields used to directly respond to the eyeball instead of + * routing to a pool. If a fixed_response is supplied the rule will be marked as + * terminates. + */ + export interface FixedResponse { /** - * Disable this specific rule. It will no longer be evaluated by this load - * balancer. + * The http 'Content-Type' header to include in the response. */ - disabled?: boolean; + content_type?: string; /** - * A collection of fields used to directly respond to the eyeball instead of - * routing to a pool. If a fixed_response is supplied the rule will be marked as - * terminates. + * The http 'Location' header to include in the response. */ - fixed_response?: Rule.FixedResponse; + location?: string; /** - * Name of this rule. Only used for human readability. + * Text to include as the http body. */ - name?: string; + message_body?: string; /** - * A collection of overrides to apply to the load balancer when this rule's - * condition is true. All fields are optional. + * The http status code to respond with. */ - overrides?: Rule.Overrides; + status_code?: number; + } + /** + * A collection of overrides to apply to the load balancer when this rule's + * condition is true. All fields are optional. + */ + export interface Overrides { /** - * The order in which rules should be executed in relation to each other. Lower - * values are executed first. Values do not need to be sequential. If no value is - * provided for any rule the array order of the rules field will be used to assign - * a priority. + * Controls features that modify the routing of requests to pools and origins in + * response to dynamic conditions, such as during the interval between active + * health monitoring requests. For example, zero-downtime failover occurs + * immediately when an origin becomes unavailable due to HTTP 521, 522, or 523 + * response codes. If there is another healthy origin in the same pool, the request + * is retried once against this alternate origin. */ - priority?: number; + adaptive_routing?: LoadBalancersAPI.AdaptiveRouting; /** - * If this rule's condition is true, this causes rule evaluation to stop after - * processing this rule. + * A mapping of country codes to a list of pool IDs (ordered by their failover + * priority) for the given country. Any country not explicitly defined will fall + * back to using the corresponding region_pool mapping if it exists else to + * default_pools. */ - terminates?: boolean; - } + country_pools?: unknown; - export namespace Rule { /** - * A collection of fields used to directly respond to the eyeball instead of - * routing to a pool. If a fixed_response is supplied the rule will be marked as - * terminates. + * A list of pool IDs ordered by their failover priority. Pools defined here are + * used by default, or when region_pools are not configured for a given region. */ - export interface FixedResponse { - /** - * The http 'Content-Type' header to include in the response. - */ - content_type?: string; - - /** - * The http 'Location' header to include in the response. - */ - location?: string; - - /** - * Text to include as the http body. - */ - message_body?: string; - - /** - * The http status code to respond with. - */ - status_code?: number; - } + default_pools?: Array; /** - * A collection of overrides to apply to the load balancer when this rule's - * condition is true. All fields are optional. + * The pool ID to use when all other pools are detected as unhealthy. */ - export interface Overrides { - /** - * Controls features that modify the routing of requests to pools and origins in - * response to dynamic conditions, such as during the interval between active - * health monitoring requests. For example, zero-downtime failover occurs - * immediately when an origin becomes unavailable due to HTTP 521, 522, or 523 - * response codes. If there is another healthy origin in the same pool, the request - * is retried once against this alternate origin. - */ - adaptive_routing?: Overrides.AdaptiveRouting; - - /** - * A mapping of country codes to a list of pool IDs (ordered by their failover - * priority) for the given country. Any country not explicitly defined will fall - * back to using the corresponding region_pool mapping if it exists else to - * default_pools. - */ - country_pools?: unknown; - - /** - * A list of pool IDs ordered by their failover priority. Pools defined here are - * used by default, or when region_pools are not configured for a given region. - */ - default_pools?: Array; - - /** - * The pool ID to use when all other pools are detected as unhealthy. - */ - fallback_pool?: unknown; - - /** - * Controls location-based steering for non-proxied requests. See `steering_policy` - * to learn how steering is affected. - */ - location_strategy?: Overrides.LocationStrategy; - - /** - * (Enterprise only): A mapping of Cloudflare PoP identifiers to a list of pool IDs - * (ordered by their failover priority) for the PoP (datacenter). Any PoPs not - * explicitly defined will fall back to using the corresponding country_pool, then - * region_pool mapping if it exists else to default_pools. - */ - pop_pools?: unknown; - - /** - * Configures pool weights. - * - * - `steering_policy="random"`: A random pool is selected with probability - * proportional to pool weights. - * - `steering_policy="least_outstanding_requests"`: Use pool weights to scale each - * pool's outstanding requests. - * - `steering_policy="least_connections"`: Use pool weights to scale each pool's - * open connections. - */ - random_steering?: Overrides.RandomSteering; - - /** - * A mapping of region codes to a list of pool IDs (ordered by their failover - * priority) for the given region. Any regions not explicitly defined will fall - * back to using default_pools. - */ - region_pools?: unknown; - - /** - * Specifies the type of session affinity the load balancer should use unless - * specified as `"none"` or "" (default). The supported types are: - * - * - `"cookie"`: On the first request to a proxied load balancer, a cookie is - * generated, encoding information of which origin the request will be forwarded - * to. Subsequent requests, by the same client to the same load balancer, will be - * sent to the origin server the cookie encodes, for the duration of the cookie - * and as long as the origin server remains healthy. If the cookie has expired or - * the origin server is unhealthy, then a new origin server is calculated and - * used. - * - `"ip_cookie"`: Behaves the same as `"cookie"` except the initial origin - * selection is stable and based on the client's ip address. - * - `"header"`: On the first request to a proxied load balancer, a session key - * based on the configured HTTP headers (see - * `session_affinity_attributes.headers`) is generated, encoding the request - * headers used for storing in the load balancer session state which origin the - * request will be forwarded to. Subsequent requests to the load balancer with - * the same headers will be sent to the same origin server, for the duration of - * the session and as long as the origin server remains healthy. If the session - * has been idle for the duration of `session_affinity_ttl` seconds or the origin - * server is unhealthy, then a new origin server is calculated and used. See - * `headers` in `session_affinity_attributes` for additional required - * configuration. - */ - session_affinity?: 'none' | 'cookie' | 'ip_cookie' | 'header' | '""'; - - /** - * Configures attributes for session affinity. - */ - session_affinity_attributes?: Overrides.SessionAffinityAttributes; - - /** - * Time, in seconds, until a client's session expires after being created. Once the - * expiry time has been reached, subsequent requests may get sent to a different - * origin server. The accepted ranges per `session_affinity` policy are: - * - * - `"cookie"` / `"ip_cookie"`: The current default of 23 hours will be used - * unless explicitly set. The accepted range of values is between [1800, 604800]. - * - `"header"`: The current default of 1800 seconds will be used unless explicitly - * set. The accepted range of values is between [30, 3600]. Note: With session - * affinity by header, sessions only expire after they haven't been used for the - * number of seconds specified. - */ - session_affinity_ttl?: number; - - /** - * Steering Policy for this load balancer. - * - * - `"off"`: Use `default_pools`. - * - `"geo"`: Use `region_pools`/`country_pools`/`pop_pools`. For non-proxied - * requests, the country for `country_pools` is determined by - * `location_strategy`. - * - `"random"`: Select a pool randomly. - * - `"dynamic_latency"`: Use round trip time to select the closest pool in - * default_pools (requires pool health checks). - * - `"proximity"`: Use the pools' latitude and longitude to select the closest - * pool using the Cloudflare PoP location for proxied requests or the location - * determined by `location_strategy` for non-proxied requests. - * - `"least_outstanding_requests"`: Select a pool by taking into consideration - * `random_steering` weights, as well as each pool's number of outstanding - * requests. Pools with more pending requests are weighted proportionately less - * relative to others. - * - `"least_connections"`: Select a pool by taking into consideration - * `random_steering` weights, as well as each pool's number of open connections. - * Pools with more open connections are weighted proportionately less relative to - * others. Supported for HTTP/1 and HTTP/2 connections. - * - `""`: Will map to `"geo"` if you use - * `region_pools`/`country_pools`/`pop_pools` otherwise `"off"`. - */ - steering_policy?: - | 'off' - | 'geo' - | 'random' - | 'dynamic_latency' - | 'proximity' - | 'least_outstanding_requests' - | 'least_connections' - | '""'; - - /** - * Time to live (TTL) of the DNS entry for the IP address returned by this load - * balancer. This only applies to gray-clouded (unproxied) load balancers. - */ - ttl?: number; - } - - export namespace Overrides { - /** - * Controls features that modify the routing of requests to pools and origins in - * response to dynamic conditions, such as during the interval between active - * health monitoring requests. For example, zero-downtime failover occurs - * immediately when an origin becomes unavailable due to HTTP 521, 522, or 523 - * response codes. If there is another healthy origin in the same pool, the request - * is retried once against this alternate origin. - */ - export interface AdaptiveRouting { - /** - * Extends zero-downtime failover of requests to healthy origins from alternate - * pools, when no healthy alternate exists in the same pool, according to the - * failover order defined by traffic and origin steering. When set false (the - * default) zero-downtime failover will only occur between origins within the same - * pool. See `session_affinity_attributes` for control over when sessions are - * broken or reassigned. - */ - failover_across_pools?: boolean; - } - - /** - * Controls location-based steering for non-proxied requests. See `steering_policy` - * to learn how steering is affected. - */ - export interface LocationStrategy { - /** - * Determines the authoritative location when ECS is not preferred, does not exist - * in the request, or its GeoIP lookup is unsuccessful. - * - * - `"pop"`: Use the Cloudflare PoP location. - * - `"resolver_ip"`: Use the DNS resolver GeoIP location. If the GeoIP lookup is - * unsuccessful, use the Cloudflare PoP location. - */ - mode?: 'pop' | 'resolver_ip'; - - /** - * Whether the EDNS Client Subnet (ECS) GeoIP should be preferred as the - * authoritative location. - * - * - `"always"`: Always prefer ECS. - * - `"never"`: Never prefer ECS. - * - `"proximity"`: Prefer ECS only when `steering_policy="proximity"`. - * - `"geo"`: Prefer ECS only when `steering_policy="geo"`. - */ - prefer_ecs?: 'always' | 'never' | 'proximity' | 'geo'; - } - - /** - * Configures pool weights. - * - * - `steering_policy="random"`: A random pool is selected with probability - * proportional to pool weights. - * - `steering_policy="least_outstanding_requests"`: Use pool weights to scale each - * pool's outstanding requests. - * - `steering_policy="least_connections"`: Use pool weights to scale each pool's - * open connections. - */ - export interface RandomSteering { - /** - * The default weight for pools in the load balancer that are not specified in the - * pool_weights map. - */ - default_weight?: number; - - /** - * A mapping of pool IDs to custom weights. The weight is relative to other pools - * in the load balancer. - */ - pool_weights?: unknown; - } - - /** - * Configures attributes for session affinity. - */ - export interface SessionAffinityAttributes { - /** - * Configures the drain duration in seconds. This field is only used when session - * affinity is enabled on the load balancer. - */ - drain_duration?: number; - - /** - * Configures the names of HTTP headers to base session affinity on when header - * `session_affinity` is enabled. At least one HTTP header name must be provided. - * To specify the exact cookies to be used, include an item in the following - * format: `"cookie:,"` (example) where everything - * after the colon is a comma-separated list of cookie names. Providing only - * `"cookie"` will result in all cookies being used. The default max number of HTTP - * header names that can be provided depends on your plan: 5 for Enterprise, 1 for - * all other plans. - */ - headers?: Array; - - /** - * When header `session_affinity` is enabled, this option can be used to specify - * how HTTP headers on load balancing requests will be used. The supported values - * are: - * - * - `"true"`: Load balancing requests must contain _all_ of the HTTP headers - * specified by the `headers` session affinity attribute, otherwise sessions - * aren't created. - * - `"false"`: Load balancing requests must contain _at least one_ of the HTTP - * headers specified by the `headers` session affinity attribute, otherwise - * sessions aren't created. - */ - require_all_headers?: boolean; - - /** - * Configures the SameSite attribute on session affinity cookie. Value "Auto" will - * be translated to "Lax" or "None" depending if Always Use HTTPS is enabled. Note: - * when using value "None", the secure attribute can not be set to "Never". - */ - samesite?: 'Auto' | 'Lax' | 'None' | 'Strict'; - - /** - * Configures the Secure attribute on session affinity cookie. Value "Always" - * indicates the Secure attribute will be set in the Set-Cookie header, "Never" - * indicates the Secure attribute will not be set, and "Auto" will set the Secure - * attribute depending if Always Use HTTPS is enabled. - */ - secure?: 'Auto' | 'Always' | 'Never'; - - /** - * Configures the zero-downtime failover between origins within a pool when session - * affinity is enabled. This feature is currently incompatible with Argo, Tiered - * Cache, and Bandwidth Alliance. The supported values are: - * - * - `"none"`: No failover takes place for sessions pinned to the origin (default). - * - `"temporary"`: Traffic will be sent to another other healthy origin until the - * originally pinned origin is available; note that this can potentially result - * in heavy origin flapping. - * - `"sticky"`: The session affinity cookie is updated and subsequent requests are - * sent to the new origin. Note: Zero-downtime failover with sticky sessions is - * currently not supported for session affinity by header. - */ - zero_downtime_failover?: 'none' | 'temporary' | 'sticky'; - } - } - } + fallback_pool?: unknown; - /** - * Configures attributes for session affinity. - */ - export interface SessionAffinityAttributes { /** - * Configures the drain duration in seconds. This field is only used when session - * affinity is enabled on the load balancer. + * Controls location-based steering for non-proxied requests. See `steering_policy` + * to learn how steering is affected. */ - drain_duration?: number; + location_strategy?: LoadBalancersAPI.LocationStrategy; /** - * Configures the names of HTTP headers to base session affinity on when header - * `session_affinity` is enabled. At least one HTTP header name must be provided. - * To specify the exact cookies to be used, include an item in the following - * format: `"cookie:,"` (example) where everything - * after the colon is a comma-separated list of cookie names. Providing only - * `"cookie"` will result in all cookies being used. The default max number of HTTP - * header names that can be provided depends on your plan: 5 for Enterprise, 1 for - * all other plans. + * (Enterprise only): A mapping of Cloudflare PoP identifiers to a list of pool IDs + * (ordered by their failover priority) for the PoP (datacenter). Any PoPs not + * explicitly defined will fall back to using the corresponding country_pool, then + * region_pool mapping if it exists else to default_pools. */ - headers?: Array; + pop_pools?: unknown; /** - * When header `session_affinity` is enabled, this option can be used to specify - * how HTTP headers on load balancing requests will be used. The supported values - * are: + * Configures pool weights. * - * - `"true"`: Load balancing requests must contain _all_ of the HTTP headers - * specified by the `headers` session affinity attribute, otherwise sessions - * aren't created. - * - `"false"`: Load balancing requests must contain _at least one_ of the HTTP - * headers specified by the `headers` session affinity attribute, otherwise - * sessions aren't created. + * - `steering_policy="random"`: A random pool is selected with probability + * proportional to pool weights. + * - `steering_policy="least_outstanding_requests"`: Use pool weights to scale each + * pool's outstanding requests. + * - `steering_policy="least_connections"`: Use pool weights to scale each pool's + * open connections. */ - require_all_headers?: boolean; + random_steering?: LoadBalancersAPI.RandomSteering; /** - * Configures the SameSite attribute on session affinity cookie. Value "Auto" will - * be translated to "Lax" or "None" depending if Always Use HTTPS is enabled. Note: - * when using value "None", the secure attribute can not be set to "Never". + * A mapping of region codes to a list of pool IDs (ordered by their failover + * priority) for the given region. Any regions not explicitly defined will fall + * back to using default_pools. */ - samesite?: 'Auto' | 'Lax' | 'None' | 'Strict'; + region_pools?: unknown; /** - * Configures the Secure attribute on session affinity cookie. Value "Always" - * indicates the Secure attribute will be set in the Set-Cookie header, "Never" - * indicates the Secure attribute will not be set, and "Auto" will set the Secure - * attribute depending if Always Use HTTPS is enabled. + * Specifies the type of session affinity the load balancer should use unless + * specified as `"none"` or "" (default). The supported types are: + * + * - `"cookie"`: On the first request to a proxied load balancer, a cookie is + * generated, encoding information of which origin the request will be forwarded + * to. Subsequent requests, by the same client to the same load balancer, will be + * sent to the origin server the cookie encodes, for the duration of the cookie + * and as long as the origin server remains healthy. If the cookie has expired or + * the origin server is unhealthy, then a new origin server is calculated and + * used. + * - `"ip_cookie"`: Behaves the same as `"cookie"` except the initial origin + * selection is stable and based on the client's ip address. + * - `"header"`: On the first request to a proxied load balancer, a session key + * based on the configured HTTP headers (see + * `session_affinity_attributes.headers`) is generated, encoding the request + * headers used for storing in the load balancer session state which origin the + * request will be forwarded to. Subsequent requests to the load balancer with + * the same headers will be sent to the same origin server, for the duration of + * the session and as long as the origin server remains healthy. If the session + * has been idle for the duration of `session_affinity_ttl` seconds or the origin + * server is unhealthy, then a new origin server is calculated and used. See + * `headers` in `session_affinity_attributes` for additional required + * configuration. + */ + session_affinity?: 'none' | 'cookie' | 'ip_cookie' | 'header' | '""'; + + /** + * Configures attributes for session affinity. + */ + session_affinity_attributes?: LoadBalancersAPI.SessionAffinityAttributes; + + /** + * Time, in seconds, until a client's session expires after being created. Once the + * expiry time has been reached, subsequent requests may get sent to a different + * origin server. The accepted ranges per `session_affinity` policy are: + * + * - `"cookie"` / `"ip_cookie"`: The current default of 23 hours will be used + * unless explicitly set. The accepted range of values is between [1800, 604800]. + * - `"header"`: The current default of 1800 seconds will be used unless explicitly + * set. The accepted range of values is between [30, 3600]. Note: With session + * affinity by header, sessions only expire after they haven't been used for the + * number of seconds specified. */ - secure?: 'Auto' | 'Always' | 'Never'; + session_affinity_ttl?: number; /** - * Configures the zero-downtime failover between origins within a pool when session - * affinity is enabled. This feature is currently incompatible with Argo, Tiered - * Cache, and Bandwidth Alliance. The supported values are: + * Steering Policy for this load balancer. * - * - `"none"`: No failover takes place for sessions pinned to the origin (default). - * - `"temporary"`: Traffic will be sent to another other healthy origin until the - * originally pinned origin is available; note that this can potentially result - * in heavy origin flapping. - * - `"sticky"`: The session affinity cookie is updated and subsequent requests are - * sent to the new origin. Note: Zero-downtime failover with sticky sessions is - * currently not supported for session affinity by header. - */ - zero_downtime_failover?: 'none' | 'temporary' | 'sticky'; + * - `"off"`: Use `default_pools`. + * - `"geo"`: Use `region_pools`/`country_pools`/`pop_pools`. For non-proxied + * requests, the country for `country_pools` is determined by + * `location_strategy`. + * - `"random"`: Select a pool randomly. + * - `"dynamic_latency"`: Use round trip time to select the closest pool in + * default_pools (requires pool health checks). + * - `"proximity"`: Use the pools' latitude and longitude to select the closest + * pool using the Cloudflare PoP location for proxied requests or the location + * determined by `location_strategy` for non-proxied requests. + * - `"least_outstanding_requests"`: Select a pool by taking into consideration + * `random_steering` weights, as well as each pool's number of outstanding + * requests. Pools with more pending requests are weighted proportionately less + * relative to others. + * - `"least_connections"`: Select a pool by taking into consideration + * `random_steering` weights, as well as each pool's number of open connections. + * Pools with more open connections are weighted proportionately less relative to + * others. Supported for HTTP/1 and HTTP/2 connections. + * - `""`: Will map to `"geo"` if you use + * `region_pools`/`country_pools`/`pop_pools` otherwise `"off"`. + */ + steering_policy?: + | 'off' + | 'geo' + | 'random' + | 'dynamic_latency' + | 'proximity' + | 'least_outstanding_requests' + | 'least_connections' + | '""'; + + /** + * Time to live (TTL) of the DNS entry for the IP address returned by this load + * balancer. This only applies to gray-clouded (unproxied) load balancers. + */ + ttl?: number; } } +/** + * Configures attributes for session affinity. + */ +export interface SessionAffinityAttributes { + /** + * Configures the drain duration in seconds. This field is only used when session + * affinity is enabled on the load balancer. + */ + drain_duration?: number; + + /** + * Configures the names of HTTP headers to base session affinity on when header + * `session_affinity` is enabled. At least one HTTP header name must be provided. + * To specify the exact cookies to be used, include an item in the following + * format: `"cookie:,"` (example) where everything + * after the colon is a comma-separated list of cookie names. Providing only + * `"cookie"` will result in all cookies being used. The default max number of HTTP + * header names that can be provided depends on your plan: 5 for Enterprise, 1 for + * all other plans. + */ + headers?: Array; + + /** + * When header `session_affinity` is enabled, this option can be used to specify + * how HTTP headers on load balancing requests will be used. The supported values + * are: + * + * - `"true"`: Load balancing requests must contain _all_ of the HTTP headers + * specified by the `headers` session affinity attribute, otherwise sessions + * aren't created. + * - `"false"`: Load balancing requests must contain _at least one_ of the HTTP + * headers specified by the `headers` session affinity attribute, otherwise + * sessions aren't created. + */ + require_all_headers?: boolean; + + /** + * Configures the SameSite attribute on session affinity cookie. Value "Auto" will + * be translated to "Lax" or "None" depending if Always Use HTTPS is enabled. Note: + * when using value "None", the secure attribute can not be set to "Never". + */ + samesite?: 'Auto' | 'Lax' | 'None' | 'Strict'; + + /** + * Configures the Secure attribute on session affinity cookie. Value "Always" + * indicates the Secure attribute will be set in the Set-Cookie header, "Never" + * indicates the Secure attribute will not be set, and "Auto" will set the Secure + * attribute depending if Always Use HTTPS is enabled. + */ + secure?: 'Auto' | 'Always' | 'Never'; + + /** + * Configures the zero-downtime failover between origins within a pool when session + * affinity is enabled. This feature is currently incompatible with Argo, Tiered + * Cache, and Bandwidth Alliance. The supported values are: + * + * - `"none"`: No failover takes place for sessions pinned to the origin (default). + * - `"temporary"`: Traffic will be sent to another other healthy origin until the + * originally pinned origin is available; note that this can potentially result + * in heavy origin flapping. + * - `"sticky"`: The session affinity cookie is updated and subsequent requests are + * sent to the new origin. Note: Zero-downtime failover with sticky sessions is + * currently not supported for session affinity by header. + */ + zero_downtime_failover?: 'none' | 'temporary' | 'sticky'; +} + export interface UnnamedSchemaRef06ba14ec7860c091efc98fd9af30f382 { id?: string; @@ -820,7 +913,7 @@ export interface UnnamedSchemaRef06ba14ec7860c091efc98fd9af30f382 { * response codes. If there is another healthy origin in the same pool, the request * is retried once against this alternate origin. */ - adaptive_routing?: UnnamedSchemaRef06ba14ec7860c091efc98fd9af30f382.AdaptiveRouting; + adaptive_routing?: AdaptiveRouting; /** * A mapping of country codes to a list of pool IDs (ordered by their failover @@ -836,7 +929,7 @@ export interface UnnamedSchemaRef06ba14ec7860c091efc98fd9af30f382 { * A list of pool IDs ordered by their failover priority. Pools defined here are * used by default, or when region_pools are not configured for a given region. */ - default_pools?: Array; + default_pools?: Array; /** * Object description. @@ -857,7 +950,7 @@ export interface UnnamedSchemaRef06ba14ec7860c091efc98fd9af30f382 { * Controls location-based steering for non-proxied requests. See `steering_policy` * to learn how steering is affected. */ - location_strategy?: UnnamedSchemaRef06ba14ec7860c091efc98fd9af30f382.LocationStrategy; + location_strategy?: LocationStrategy; modified_on?: string; @@ -891,7 +984,7 @@ export interface UnnamedSchemaRef06ba14ec7860c091efc98fd9af30f382 { * - `steering_policy="least_connections"`: Use pool weights to scale each pool's * open connections. */ - random_steering?: UnnamedSchemaRef06ba14ec7860c091efc98fd9af30f382.RandomSteering; + random_steering?: RandomSteering; /** * A mapping of region codes to a list of pool IDs (ordered by their failover @@ -904,7 +997,7 @@ export interface UnnamedSchemaRef06ba14ec7860c091efc98fd9af30f382 { * BETA Field Not General Access: A list of rules for this load balancer to * execute. */ - rules?: Array; + rules?: Array; /** * Specifies the type of session affinity the load balancer should use unless @@ -936,7 +1029,7 @@ export interface UnnamedSchemaRef06ba14ec7860c091efc98fd9af30f382 { /** * Configures attributes for session affinity. */ - session_affinity_attributes?: UnnamedSchemaRef06ba14ec7860c091efc98fd9af30f382.SessionAffinityAttributes; + session_affinity_attributes?: SessionAffinityAttributes; /** * Time, in seconds, until a client's session expires after being created. Once the @@ -993,56 +1086,80 @@ export interface UnnamedSchemaRef06ba14ec7860c091efc98fd9af30f382 { ttl?: number; } -export namespace UnnamedSchemaRef06ba14ec7860c091efc98fd9af30f382 { +export interface LoadBalancerDeleteResponse { + id?: string; +} + +export interface LoadBalancerCreateParams { /** - * Controls features that modify the routing of requests to pools and origins in - * response to dynamic conditions, such as during the interval between active - * health monitoring requests. For example, zero-downtime failover occurs + * Path param: + */ + zone_id: string; + + /** + * Body param: A list of pool IDs ordered by their failover priority. Pools defined + * here are used by default, or when region_pools are not configured for a given + * region. + */ + default_pools: Array; + + /** + * Body param: The pool ID to use when all other pools are detected as unhealthy. + */ + fallback_pool: unknown; + + /** + * Body param: The DNS hostname to associate with your Load Balancer. If this + * hostname already exists as a DNS record in Cloudflare's DNS, the Load Balancer + * will take precedence and the DNS record will not be used. + */ + name: string; + + /** + * Body param: Controls features that modify the routing of requests to pools and + * origins in response to dynamic conditions, such as during the interval between + * active health monitoring requests. For example, zero-downtime failover occurs * immediately when an origin becomes unavailable due to HTTP 521, 522, or 523 * response codes. If there is another healthy origin in the same pool, the request * is retried once against this alternate origin. */ - export interface AdaptiveRouting { - /** - * Extends zero-downtime failover of requests to healthy origins from alternate - * pools, when no healthy alternate exists in the same pool, according to the - * failover order defined by traffic and origin steering. When set false (the - * default) zero-downtime failover will only occur between origins within the same - * pool. See `session_affinity_attributes` for control over when sessions are - * broken or reassigned. - */ - failover_across_pools?: boolean; - } + adaptive_routing?: AdaptiveRouting; /** - * Controls location-based steering for non-proxied requests. See `steering_policy` - * to learn how steering is affected. + * Body param: A mapping of country codes to a list of pool IDs (ordered by their + * failover priority) for the given country. Any country not explicitly defined + * will fall back to using the corresponding region_pool mapping if it exists else + * to default_pools. */ - export interface LocationStrategy { - /** - * Determines the authoritative location when ECS is not preferred, does not exist - * in the request, or its GeoIP lookup is unsuccessful. - * - * - `"pop"`: Use the Cloudflare PoP location. - * - `"resolver_ip"`: Use the DNS resolver GeoIP location. If the GeoIP lookup is - * unsuccessful, use the Cloudflare PoP location. - */ - mode?: 'pop' | 'resolver_ip'; + country_pools?: unknown; - /** - * Whether the EDNS Client Subnet (ECS) GeoIP should be preferred as the - * authoritative location. - * - * - `"always"`: Always prefer ECS. - * - `"never"`: Never prefer ECS. - * - `"proximity"`: Prefer ECS only when `steering_policy="proximity"`. - * - `"geo"`: Prefer ECS only when `steering_policy="geo"`. - */ - prefer_ecs?: 'always' | 'never' | 'proximity' | 'geo'; - } + /** + * Body param: Object description. + */ + description?: string; /** - * Configures pool weights. + * Body param: Controls location-based steering for non-proxied requests. See + * `steering_policy` to learn how steering is affected. + */ + location_strategy?: LocationStrategy; + + /** + * Body param: (Enterprise only): A mapping of Cloudflare PoP identifiers to a list + * of pool IDs (ordered by their failover priority) for the PoP (datacenter). Any + * PoPs not explicitly defined will fall back to using the corresponding + * country_pool, then region_pool mapping if it exists else to default_pools. + */ + pop_pools?: unknown; + + /** + * Body param: Whether the hostname should be gray clouded (false) or orange + * clouded (true). + */ + proxied?: boolean; + + /** + * Body param: Configures pool weights. * * - `steering_policy="random"`: A random pool is selected with probability * proportional to pool weights. @@ -1051,546 +1168,7 @@ export namespace UnnamedSchemaRef06ba14ec7860c091efc98fd9af30f382 { * - `steering_policy="least_connections"`: Use pool weights to scale each pool's * open connections. */ - export interface RandomSteering { - /** - * The default weight for pools in the load balancer that are not specified in the - * pool_weights map. - */ - default_weight?: number; - - /** - * A mapping of pool IDs to custom weights. The weight is relative to other pools - * in the load balancer. - */ - pool_weights?: unknown; - } - - /** - * A rule object containing conditions and overrides for this load balancer to - * evaluate. - */ - export interface Rule { - /** - * The condition expressions to evaluate. If the condition evaluates to true, the - * overrides or fixed_response in this rule will be applied. An empty condition is - * always true. For more details on condition expressions, please see - * https://developers.cloudflare.com/load-balancing/understand-basics/load-balancing-rules/expressions. - */ - condition?: string; - - /** - * Disable this specific rule. It will no longer be evaluated by this load - * balancer. - */ - disabled?: boolean; - - /** - * A collection of fields used to directly respond to the eyeball instead of - * routing to a pool. If a fixed_response is supplied the rule will be marked as - * terminates. - */ - fixed_response?: Rule.FixedResponse; - - /** - * Name of this rule. Only used for human readability. - */ - name?: string; - - /** - * A collection of overrides to apply to the load balancer when this rule's - * condition is true. All fields are optional. - */ - overrides?: Rule.Overrides; - - /** - * The order in which rules should be executed in relation to each other. Lower - * values are executed first. Values do not need to be sequential. If no value is - * provided for any rule the array order of the rules field will be used to assign - * a priority. - */ - priority?: number; - - /** - * If this rule's condition is true, this causes rule evaluation to stop after - * processing this rule. - */ - terminates?: boolean; - } - - export namespace Rule { - /** - * A collection of fields used to directly respond to the eyeball instead of - * routing to a pool. If a fixed_response is supplied the rule will be marked as - * terminates. - */ - export interface FixedResponse { - /** - * The http 'Content-Type' header to include in the response. - */ - content_type?: string; - - /** - * The http 'Location' header to include in the response. - */ - location?: string; - - /** - * Text to include as the http body. - */ - message_body?: string; - - /** - * The http status code to respond with. - */ - status_code?: number; - } - - /** - * A collection of overrides to apply to the load balancer when this rule's - * condition is true. All fields are optional. - */ - export interface Overrides { - /** - * Controls features that modify the routing of requests to pools and origins in - * response to dynamic conditions, such as during the interval between active - * health monitoring requests. For example, zero-downtime failover occurs - * immediately when an origin becomes unavailable due to HTTP 521, 522, or 523 - * response codes. If there is another healthy origin in the same pool, the request - * is retried once against this alternate origin. - */ - adaptive_routing?: Overrides.AdaptiveRouting; - - /** - * A mapping of country codes to a list of pool IDs (ordered by their failover - * priority) for the given country. Any country not explicitly defined will fall - * back to using the corresponding region_pool mapping if it exists else to - * default_pools. - */ - country_pools?: unknown; - - /** - * A list of pool IDs ordered by their failover priority. Pools defined here are - * used by default, or when region_pools are not configured for a given region. - */ - default_pools?: Array; - - /** - * The pool ID to use when all other pools are detected as unhealthy. - */ - fallback_pool?: unknown; - - /** - * Controls location-based steering for non-proxied requests. See `steering_policy` - * to learn how steering is affected. - */ - location_strategy?: Overrides.LocationStrategy; - - /** - * (Enterprise only): A mapping of Cloudflare PoP identifiers to a list of pool IDs - * (ordered by their failover priority) for the PoP (datacenter). Any PoPs not - * explicitly defined will fall back to using the corresponding country_pool, then - * region_pool mapping if it exists else to default_pools. - */ - pop_pools?: unknown; - - /** - * Configures pool weights. - * - * - `steering_policy="random"`: A random pool is selected with probability - * proportional to pool weights. - * - `steering_policy="least_outstanding_requests"`: Use pool weights to scale each - * pool's outstanding requests. - * - `steering_policy="least_connections"`: Use pool weights to scale each pool's - * open connections. - */ - random_steering?: Overrides.RandomSteering; - - /** - * A mapping of region codes to a list of pool IDs (ordered by their failover - * priority) for the given region. Any regions not explicitly defined will fall - * back to using default_pools. - */ - region_pools?: unknown; - - /** - * Specifies the type of session affinity the load balancer should use unless - * specified as `"none"` or "" (default). The supported types are: - * - * - `"cookie"`: On the first request to a proxied load balancer, a cookie is - * generated, encoding information of which origin the request will be forwarded - * to. Subsequent requests, by the same client to the same load balancer, will be - * sent to the origin server the cookie encodes, for the duration of the cookie - * and as long as the origin server remains healthy. If the cookie has expired or - * the origin server is unhealthy, then a new origin server is calculated and - * used. - * - `"ip_cookie"`: Behaves the same as `"cookie"` except the initial origin - * selection is stable and based on the client's ip address. - * - `"header"`: On the first request to a proxied load balancer, a session key - * based on the configured HTTP headers (see - * `session_affinity_attributes.headers`) is generated, encoding the request - * headers used for storing in the load balancer session state which origin the - * request will be forwarded to. Subsequent requests to the load balancer with - * the same headers will be sent to the same origin server, for the duration of - * the session and as long as the origin server remains healthy. If the session - * has been idle for the duration of `session_affinity_ttl` seconds or the origin - * server is unhealthy, then a new origin server is calculated and used. See - * `headers` in `session_affinity_attributes` for additional required - * configuration. - */ - session_affinity?: 'none' | 'cookie' | 'ip_cookie' | 'header' | '""'; - - /** - * Configures attributes for session affinity. - */ - session_affinity_attributes?: Overrides.SessionAffinityAttributes; - - /** - * Time, in seconds, until a client's session expires after being created. Once the - * expiry time has been reached, subsequent requests may get sent to a different - * origin server. The accepted ranges per `session_affinity` policy are: - * - * - `"cookie"` / `"ip_cookie"`: The current default of 23 hours will be used - * unless explicitly set. The accepted range of values is between [1800, 604800]. - * - `"header"`: The current default of 1800 seconds will be used unless explicitly - * set. The accepted range of values is between [30, 3600]. Note: With session - * affinity by header, sessions only expire after they haven't been used for the - * number of seconds specified. - */ - session_affinity_ttl?: number; - - /** - * Steering Policy for this load balancer. - * - * - `"off"`: Use `default_pools`. - * - `"geo"`: Use `region_pools`/`country_pools`/`pop_pools`. For non-proxied - * requests, the country for `country_pools` is determined by - * `location_strategy`. - * - `"random"`: Select a pool randomly. - * - `"dynamic_latency"`: Use round trip time to select the closest pool in - * default_pools (requires pool health checks). - * - `"proximity"`: Use the pools' latitude and longitude to select the closest - * pool using the Cloudflare PoP location for proxied requests or the location - * determined by `location_strategy` for non-proxied requests. - * - `"least_outstanding_requests"`: Select a pool by taking into consideration - * `random_steering` weights, as well as each pool's number of outstanding - * requests. Pools with more pending requests are weighted proportionately less - * relative to others. - * - `"least_connections"`: Select a pool by taking into consideration - * `random_steering` weights, as well as each pool's number of open connections. - * Pools with more open connections are weighted proportionately less relative to - * others. Supported for HTTP/1 and HTTP/2 connections. - * - `""`: Will map to `"geo"` if you use - * `region_pools`/`country_pools`/`pop_pools` otherwise `"off"`. - */ - steering_policy?: - | 'off' - | 'geo' - | 'random' - | 'dynamic_latency' - | 'proximity' - | 'least_outstanding_requests' - | 'least_connections' - | '""'; - - /** - * Time to live (TTL) of the DNS entry for the IP address returned by this load - * balancer. This only applies to gray-clouded (unproxied) load balancers. - */ - ttl?: number; - } - - export namespace Overrides { - /** - * Controls features that modify the routing of requests to pools and origins in - * response to dynamic conditions, such as during the interval between active - * health monitoring requests. For example, zero-downtime failover occurs - * immediately when an origin becomes unavailable due to HTTP 521, 522, or 523 - * response codes. If there is another healthy origin in the same pool, the request - * is retried once against this alternate origin. - */ - export interface AdaptiveRouting { - /** - * Extends zero-downtime failover of requests to healthy origins from alternate - * pools, when no healthy alternate exists in the same pool, according to the - * failover order defined by traffic and origin steering. When set false (the - * default) zero-downtime failover will only occur between origins within the same - * pool. See `session_affinity_attributes` for control over when sessions are - * broken or reassigned. - */ - failover_across_pools?: boolean; - } - - /** - * Controls location-based steering for non-proxied requests. See `steering_policy` - * to learn how steering is affected. - */ - export interface LocationStrategy { - /** - * Determines the authoritative location when ECS is not preferred, does not exist - * in the request, or its GeoIP lookup is unsuccessful. - * - * - `"pop"`: Use the Cloudflare PoP location. - * - `"resolver_ip"`: Use the DNS resolver GeoIP location. If the GeoIP lookup is - * unsuccessful, use the Cloudflare PoP location. - */ - mode?: 'pop' | 'resolver_ip'; - - /** - * Whether the EDNS Client Subnet (ECS) GeoIP should be preferred as the - * authoritative location. - * - * - `"always"`: Always prefer ECS. - * - `"never"`: Never prefer ECS. - * - `"proximity"`: Prefer ECS only when `steering_policy="proximity"`. - * - `"geo"`: Prefer ECS only when `steering_policy="geo"`. - */ - prefer_ecs?: 'always' | 'never' | 'proximity' | 'geo'; - } - - /** - * Configures pool weights. - * - * - `steering_policy="random"`: A random pool is selected with probability - * proportional to pool weights. - * - `steering_policy="least_outstanding_requests"`: Use pool weights to scale each - * pool's outstanding requests. - * - `steering_policy="least_connections"`: Use pool weights to scale each pool's - * open connections. - */ - export interface RandomSteering { - /** - * The default weight for pools in the load balancer that are not specified in the - * pool_weights map. - */ - default_weight?: number; - - /** - * A mapping of pool IDs to custom weights. The weight is relative to other pools - * in the load balancer. - */ - pool_weights?: unknown; - } - - /** - * Configures attributes for session affinity. - */ - export interface SessionAffinityAttributes { - /** - * Configures the drain duration in seconds. This field is only used when session - * affinity is enabled on the load balancer. - */ - drain_duration?: number; - - /** - * Configures the names of HTTP headers to base session affinity on when header - * `session_affinity` is enabled. At least one HTTP header name must be provided. - * To specify the exact cookies to be used, include an item in the following - * format: `"cookie:,"` (example) where everything - * after the colon is a comma-separated list of cookie names. Providing only - * `"cookie"` will result in all cookies being used. The default max number of HTTP - * header names that can be provided depends on your plan: 5 for Enterprise, 1 for - * all other plans. - */ - headers?: Array; - - /** - * When header `session_affinity` is enabled, this option can be used to specify - * how HTTP headers on load balancing requests will be used. The supported values - * are: - * - * - `"true"`: Load balancing requests must contain _all_ of the HTTP headers - * specified by the `headers` session affinity attribute, otherwise sessions - * aren't created. - * - `"false"`: Load balancing requests must contain _at least one_ of the HTTP - * headers specified by the `headers` session affinity attribute, otherwise - * sessions aren't created. - */ - require_all_headers?: boolean; - - /** - * Configures the SameSite attribute on session affinity cookie. Value "Auto" will - * be translated to "Lax" or "None" depending if Always Use HTTPS is enabled. Note: - * when using value "None", the secure attribute can not be set to "Never". - */ - samesite?: 'Auto' | 'Lax' | 'None' | 'Strict'; - - /** - * Configures the Secure attribute on session affinity cookie. Value "Always" - * indicates the Secure attribute will be set in the Set-Cookie header, "Never" - * indicates the Secure attribute will not be set, and "Auto" will set the Secure - * attribute depending if Always Use HTTPS is enabled. - */ - secure?: 'Auto' | 'Always' | 'Never'; - - /** - * Configures the zero-downtime failover between origins within a pool when session - * affinity is enabled. This feature is currently incompatible with Argo, Tiered - * Cache, and Bandwidth Alliance. The supported values are: - * - * - `"none"`: No failover takes place for sessions pinned to the origin (default). - * - `"temporary"`: Traffic will be sent to another other healthy origin until the - * originally pinned origin is available; note that this can potentially result - * in heavy origin flapping. - * - `"sticky"`: The session affinity cookie is updated and subsequent requests are - * sent to the new origin. Note: Zero-downtime failover with sticky sessions is - * currently not supported for session affinity by header. - */ - zero_downtime_failover?: 'none' | 'temporary' | 'sticky'; - } - } - } - - /** - * Configures attributes for session affinity. - */ - export interface SessionAffinityAttributes { - /** - * Configures the drain duration in seconds. This field is only used when session - * affinity is enabled on the load balancer. - */ - drain_duration?: number; - - /** - * Configures the names of HTTP headers to base session affinity on when header - * `session_affinity` is enabled. At least one HTTP header name must be provided. - * To specify the exact cookies to be used, include an item in the following - * format: `"cookie:,"` (example) where everything - * after the colon is a comma-separated list of cookie names. Providing only - * `"cookie"` will result in all cookies being used. The default max number of HTTP - * header names that can be provided depends on your plan: 5 for Enterprise, 1 for - * all other plans. - */ - headers?: Array; - - /** - * When header `session_affinity` is enabled, this option can be used to specify - * how HTTP headers on load balancing requests will be used. The supported values - * are: - * - * - `"true"`: Load balancing requests must contain _all_ of the HTTP headers - * specified by the `headers` session affinity attribute, otherwise sessions - * aren't created. - * - `"false"`: Load balancing requests must contain _at least one_ of the HTTP - * headers specified by the `headers` session affinity attribute, otherwise - * sessions aren't created. - */ - require_all_headers?: boolean; - - /** - * Configures the SameSite attribute on session affinity cookie. Value "Auto" will - * be translated to "Lax" or "None" depending if Always Use HTTPS is enabled. Note: - * when using value "None", the secure attribute can not be set to "Never". - */ - samesite?: 'Auto' | 'Lax' | 'None' | 'Strict'; - - /** - * Configures the Secure attribute on session affinity cookie. Value "Always" - * indicates the Secure attribute will be set in the Set-Cookie header, "Never" - * indicates the Secure attribute will not be set, and "Auto" will set the Secure - * attribute depending if Always Use HTTPS is enabled. - */ - secure?: 'Auto' | 'Always' | 'Never'; - - /** - * Configures the zero-downtime failover between origins within a pool when session - * affinity is enabled. This feature is currently incompatible with Argo, Tiered - * Cache, and Bandwidth Alliance. The supported values are: - * - * - `"none"`: No failover takes place for sessions pinned to the origin (default). - * - `"temporary"`: Traffic will be sent to another other healthy origin until the - * originally pinned origin is available; note that this can potentially result - * in heavy origin flapping. - * - `"sticky"`: The session affinity cookie is updated and subsequent requests are - * sent to the new origin. Note: Zero-downtime failover with sticky sessions is - * currently not supported for session affinity by header. - */ - zero_downtime_failover?: 'none' | 'temporary' | 'sticky'; - } -} - -export interface LoadBalancerDeleteResponse { - id?: string; -} - -export interface LoadBalancerCreateParams { - /** - * Path param: - */ - zone_id: string; - - /** - * Body param: A list of pool IDs ordered by their failover priority. Pools defined - * here are used by default, or when region_pools are not configured for a given - * region. - */ - default_pools: Array; - - /** - * Body param: The pool ID to use when all other pools are detected as unhealthy. - */ - fallback_pool: unknown; - - /** - * Body param: The DNS hostname to associate with your Load Balancer. If this - * hostname already exists as a DNS record in Cloudflare's DNS, the Load Balancer - * will take precedence and the DNS record will not be used. - */ - name: string; - - /** - * Body param: Controls features that modify the routing of requests to pools and - * origins in response to dynamic conditions, such as during the interval between - * active health monitoring requests. For example, zero-downtime failover occurs - * immediately when an origin becomes unavailable due to HTTP 521, 522, or 523 - * response codes. If there is another healthy origin in the same pool, the request - * is retried once against this alternate origin. - */ - adaptive_routing?: LoadBalancerCreateParams.AdaptiveRouting; - - /** - * Body param: A mapping of country codes to a list of pool IDs (ordered by their - * failover priority) for the given country. Any country not explicitly defined - * will fall back to using the corresponding region_pool mapping if it exists else - * to default_pools. - */ - country_pools?: unknown; - - /** - * Body param: Object description. - */ - description?: string; - - /** - * Body param: Controls location-based steering for non-proxied requests. See - * `steering_policy` to learn how steering is affected. - */ - location_strategy?: LoadBalancerCreateParams.LocationStrategy; - - /** - * Body param: (Enterprise only): A mapping of Cloudflare PoP identifiers to a list - * of pool IDs (ordered by their failover priority) for the PoP (datacenter). Any - * PoPs not explicitly defined will fall back to using the corresponding - * country_pool, then region_pool mapping if it exists else to default_pools. - */ - pop_pools?: unknown; - - /** - * Body param: Whether the hostname should be gray clouded (false) or orange - * clouded (true). - */ - proxied?: boolean; - - /** - * Body param: Configures pool weights. - * - * - `steering_policy="random"`: A random pool is selected with probability - * proportional to pool weights. - * - `steering_policy="least_outstanding_requests"`: Use pool weights to scale each - * pool's outstanding requests. - * - `steering_policy="least_connections"`: Use pool weights to scale each pool's - * open connections. - */ - random_steering?: LoadBalancerCreateParams.RandomSteering; + random_steering?: RandomSteering; /** * Body param: A mapping of region codes to a list of pool IDs (ordered by their @@ -1603,7 +1181,7 @@ export interface LoadBalancerCreateParams { * Body param: BETA Field Not General Access: A list of rules for this load * balancer to execute. */ - rules?: Array; + rules?: Array; /** * Body param: Specifies the type of session affinity the load balancer should use @@ -1635,7 +1213,7 @@ export interface LoadBalancerCreateParams { /** * Body param: Configures attributes for session affinity. */ - session_affinity_attributes?: LoadBalancerCreateParams.SessionAffinityAttributes; + session_affinity_attributes?: SessionAffinityAttributes; /** * Body param: Time, in seconds, until a client's session expires after being @@ -1694,521 +1272,6 @@ export interface LoadBalancerCreateParams { ttl?: number; } -export namespace LoadBalancerCreateParams { - /** - * Controls features that modify the routing of requests to pools and origins in - * response to dynamic conditions, such as during the interval between active - * health monitoring requests. For example, zero-downtime failover occurs - * immediately when an origin becomes unavailable due to HTTP 521, 522, or 523 - * response codes. If there is another healthy origin in the same pool, the request - * is retried once against this alternate origin. - */ - export interface AdaptiveRouting { - /** - * Extends zero-downtime failover of requests to healthy origins from alternate - * pools, when no healthy alternate exists in the same pool, according to the - * failover order defined by traffic and origin steering. When set false (the - * default) zero-downtime failover will only occur between origins within the same - * pool. See `session_affinity_attributes` for control over when sessions are - * broken or reassigned. - */ - failover_across_pools?: boolean; - } - - /** - * Controls location-based steering for non-proxied requests. See `steering_policy` - * to learn how steering is affected. - */ - export interface LocationStrategy { - /** - * Determines the authoritative location when ECS is not preferred, does not exist - * in the request, or its GeoIP lookup is unsuccessful. - * - * - `"pop"`: Use the Cloudflare PoP location. - * - `"resolver_ip"`: Use the DNS resolver GeoIP location. If the GeoIP lookup is - * unsuccessful, use the Cloudflare PoP location. - */ - mode?: 'pop' | 'resolver_ip'; - - /** - * Whether the EDNS Client Subnet (ECS) GeoIP should be preferred as the - * authoritative location. - * - * - `"always"`: Always prefer ECS. - * - `"never"`: Never prefer ECS. - * - `"proximity"`: Prefer ECS only when `steering_policy="proximity"`. - * - `"geo"`: Prefer ECS only when `steering_policy="geo"`. - */ - prefer_ecs?: 'always' | 'never' | 'proximity' | 'geo'; - } - - /** - * Configures pool weights. - * - * - `steering_policy="random"`: A random pool is selected with probability - * proportional to pool weights. - * - `steering_policy="least_outstanding_requests"`: Use pool weights to scale each - * pool's outstanding requests. - * - `steering_policy="least_connections"`: Use pool weights to scale each pool's - * open connections. - */ - export interface RandomSteering { - /** - * The default weight for pools in the load balancer that are not specified in the - * pool_weights map. - */ - default_weight?: number; - - /** - * A mapping of pool IDs to custom weights. The weight is relative to other pools - * in the load balancer. - */ - pool_weights?: unknown; - } - - /** - * A rule object containing conditions and overrides for this load balancer to - * evaluate. - */ - export interface Rule { - /** - * The condition expressions to evaluate. If the condition evaluates to true, the - * overrides or fixed_response in this rule will be applied. An empty condition is - * always true. For more details on condition expressions, please see - * https://developers.cloudflare.com/load-balancing/understand-basics/load-balancing-rules/expressions. - */ - condition?: string; - - /** - * Disable this specific rule. It will no longer be evaluated by this load - * balancer. - */ - disabled?: boolean; - - /** - * A collection of fields used to directly respond to the eyeball instead of - * routing to a pool. If a fixed_response is supplied the rule will be marked as - * terminates. - */ - fixed_response?: Rule.FixedResponse; - - /** - * Name of this rule. Only used for human readability. - */ - name?: string; - - /** - * A collection of overrides to apply to the load balancer when this rule's - * condition is true. All fields are optional. - */ - overrides?: Rule.Overrides; - - /** - * The order in which rules should be executed in relation to each other. Lower - * values are executed first. Values do not need to be sequential. If no value is - * provided for any rule the array order of the rules field will be used to assign - * a priority. - */ - priority?: number; - - /** - * If this rule's condition is true, this causes rule evaluation to stop after - * processing this rule. - */ - terminates?: boolean; - } - - export namespace Rule { - /** - * A collection of fields used to directly respond to the eyeball instead of - * routing to a pool. If a fixed_response is supplied the rule will be marked as - * terminates. - */ - export interface FixedResponse { - /** - * The http 'Content-Type' header to include in the response. - */ - content_type?: string; - - /** - * The http 'Location' header to include in the response. - */ - location?: string; - - /** - * Text to include as the http body. - */ - message_body?: string; - - /** - * The http status code to respond with. - */ - status_code?: number; - } - - /** - * A collection of overrides to apply to the load balancer when this rule's - * condition is true. All fields are optional. - */ - export interface Overrides { - /** - * Controls features that modify the routing of requests to pools and origins in - * response to dynamic conditions, such as during the interval between active - * health monitoring requests. For example, zero-downtime failover occurs - * immediately when an origin becomes unavailable due to HTTP 521, 522, or 523 - * response codes. If there is another healthy origin in the same pool, the request - * is retried once against this alternate origin. - */ - adaptive_routing?: Overrides.AdaptiveRouting; - - /** - * A mapping of country codes to a list of pool IDs (ordered by their failover - * priority) for the given country. Any country not explicitly defined will fall - * back to using the corresponding region_pool mapping if it exists else to - * default_pools. - */ - country_pools?: unknown; - - /** - * A list of pool IDs ordered by their failover priority. Pools defined here are - * used by default, or when region_pools are not configured for a given region. - */ - default_pools?: Array; - - /** - * The pool ID to use when all other pools are detected as unhealthy. - */ - fallback_pool?: unknown; - - /** - * Controls location-based steering for non-proxied requests. See `steering_policy` - * to learn how steering is affected. - */ - location_strategy?: Overrides.LocationStrategy; - - /** - * (Enterprise only): A mapping of Cloudflare PoP identifiers to a list of pool IDs - * (ordered by their failover priority) for the PoP (datacenter). Any PoPs not - * explicitly defined will fall back to using the corresponding country_pool, then - * region_pool mapping if it exists else to default_pools. - */ - pop_pools?: unknown; - - /** - * Configures pool weights. - * - * - `steering_policy="random"`: A random pool is selected with probability - * proportional to pool weights. - * - `steering_policy="least_outstanding_requests"`: Use pool weights to scale each - * pool's outstanding requests. - * - `steering_policy="least_connections"`: Use pool weights to scale each pool's - * open connections. - */ - random_steering?: Overrides.RandomSteering; - - /** - * A mapping of region codes to a list of pool IDs (ordered by their failover - * priority) for the given region. Any regions not explicitly defined will fall - * back to using default_pools. - */ - region_pools?: unknown; - - /** - * Specifies the type of session affinity the load balancer should use unless - * specified as `"none"` or "" (default). The supported types are: - * - * - `"cookie"`: On the first request to a proxied load balancer, a cookie is - * generated, encoding information of which origin the request will be forwarded - * to. Subsequent requests, by the same client to the same load balancer, will be - * sent to the origin server the cookie encodes, for the duration of the cookie - * and as long as the origin server remains healthy. If the cookie has expired or - * the origin server is unhealthy, then a new origin server is calculated and - * used. - * - `"ip_cookie"`: Behaves the same as `"cookie"` except the initial origin - * selection is stable and based on the client's ip address. - * - `"header"`: On the first request to a proxied load balancer, a session key - * based on the configured HTTP headers (see - * `session_affinity_attributes.headers`) is generated, encoding the request - * headers used for storing in the load balancer session state which origin the - * request will be forwarded to. Subsequent requests to the load balancer with - * the same headers will be sent to the same origin server, for the duration of - * the session and as long as the origin server remains healthy. If the session - * has been idle for the duration of `session_affinity_ttl` seconds or the origin - * server is unhealthy, then a new origin server is calculated and used. See - * `headers` in `session_affinity_attributes` for additional required - * configuration. - */ - session_affinity?: 'none' | 'cookie' | 'ip_cookie' | 'header' | '""'; - - /** - * Configures attributes for session affinity. - */ - session_affinity_attributes?: Overrides.SessionAffinityAttributes; - - /** - * Time, in seconds, until a client's session expires after being created. Once the - * expiry time has been reached, subsequent requests may get sent to a different - * origin server. The accepted ranges per `session_affinity` policy are: - * - * - `"cookie"` / `"ip_cookie"`: The current default of 23 hours will be used - * unless explicitly set. The accepted range of values is between [1800, 604800]. - * - `"header"`: The current default of 1800 seconds will be used unless explicitly - * set. The accepted range of values is between [30, 3600]. Note: With session - * affinity by header, sessions only expire after they haven't been used for the - * number of seconds specified. - */ - session_affinity_ttl?: number; - - /** - * Steering Policy for this load balancer. - * - * - `"off"`: Use `default_pools`. - * - `"geo"`: Use `region_pools`/`country_pools`/`pop_pools`. For non-proxied - * requests, the country for `country_pools` is determined by - * `location_strategy`. - * - `"random"`: Select a pool randomly. - * - `"dynamic_latency"`: Use round trip time to select the closest pool in - * default_pools (requires pool health checks). - * - `"proximity"`: Use the pools' latitude and longitude to select the closest - * pool using the Cloudflare PoP location for proxied requests or the location - * determined by `location_strategy` for non-proxied requests. - * - `"least_outstanding_requests"`: Select a pool by taking into consideration - * `random_steering` weights, as well as each pool's number of outstanding - * requests. Pools with more pending requests are weighted proportionately less - * relative to others. - * - `"least_connections"`: Select a pool by taking into consideration - * `random_steering` weights, as well as each pool's number of open connections. - * Pools with more open connections are weighted proportionately less relative to - * others. Supported for HTTP/1 and HTTP/2 connections. - * - `""`: Will map to `"geo"` if you use - * `region_pools`/`country_pools`/`pop_pools` otherwise `"off"`. - */ - steering_policy?: - | 'off' - | 'geo' - | 'random' - | 'dynamic_latency' - | 'proximity' - | 'least_outstanding_requests' - | 'least_connections' - | '""'; - - /** - * Time to live (TTL) of the DNS entry for the IP address returned by this load - * balancer. This only applies to gray-clouded (unproxied) load balancers. - */ - ttl?: number; - } - - export namespace Overrides { - /** - * Controls features that modify the routing of requests to pools and origins in - * response to dynamic conditions, such as during the interval between active - * health monitoring requests. For example, zero-downtime failover occurs - * immediately when an origin becomes unavailable due to HTTP 521, 522, or 523 - * response codes. If there is another healthy origin in the same pool, the request - * is retried once against this alternate origin. - */ - export interface AdaptiveRouting { - /** - * Extends zero-downtime failover of requests to healthy origins from alternate - * pools, when no healthy alternate exists in the same pool, according to the - * failover order defined by traffic and origin steering. When set false (the - * default) zero-downtime failover will only occur between origins within the same - * pool. See `session_affinity_attributes` for control over when sessions are - * broken or reassigned. - */ - failover_across_pools?: boolean; - } - - /** - * Controls location-based steering for non-proxied requests. See `steering_policy` - * to learn how steering is affected. - */ - export interface LocationStrategy { - /** - * Determines the authoritative location when ECS is not preferred, does not exist - * in the request, or its GeoIP lookup is unsuccessful. - * - * - `"pop"`: Use the Cloudflare PoP location. - * - `"resolver_ip"`: Use the DNS resolver GeoIP location. If the GeoIP lookup is - * unsuccessful, use the Cloudflare PoP location. - */ - mode?: 'pop' | 'resolver_ip'; - - /** - * Whether the EDNS Client Subnet (ECS) GeoIP should be preferred as the - * authoritative location. - * - * - `"always"`: Always prefer ECS. - * - `"never"`: Never prefer ECS. - * - `"proximity"`: Prefer ECS only when `steering_policy="proximity"`. - * - `"geo"`: Prefer ECS only when `steering_policy="geo"`. - */ - prefer_ecs?: 'always' | 'never' | 'proximity' | 'geo'; - } - - /** - * Configures pool weights. - * - * - `steering_policy="random"`: A random pool is selected with probability - * proportional to pool weights. - * - `steering_policy="least_outstanding_requests"`: Use pool weights to scale each - * pool's outstanding requests. - * - `steering_policy="least_connections"`: Use pool weights to scale each pool's - * open connections. - */ - export interface RandomSteering { - /** - * The default weight for pools in the load balancer that are not specified in the - * pool_weights map. - */ - default_weight?: number; - - /** - * A mapping of pool IDs to custom weights. The weight is relative to other pools - * in the load balancer. - */ - pool_weights?: unknown; - } - - /** - * Configures attributes for session affinity. - */ - export interface SessionAffinityAttributes { - /** - * Configures the drain duration in seconds. This field is only used when session - * affinity is enabled on the load balancer. - */ - drain_duration?: number; - - /** - * Configures the names of HTTP headers to base session affinity on when header - * `session_affinity` is enabled. At least one HTTP header name must be provided. - * To specify the exact cookies to be used, include an item in the following - * format: `"cookie:,"` (example) where everything - * after the colon is a comma-separated list of cookie names. Providing only - * `"cookie"` will result in all cookies being used. The default max number of HTTP - * header names that can be provided depends on your plan: 5 for Enterprise, 1 for - * all other plans. - */ - headers?: Array; - - /** - * When header `session_affinity` is enabled, this option can be used to specify - * how HTTP headers on load balancing requests will be used. The supported values - * are: - * - * - `"true"`: Load balancing requests must contain _all_ of the HTTP headers - * specified by the `headers` session affinity attribute, otherwise sessions - * aren't created. - * - `"false"`: Load balancing requests must contain _at least one_ of the HTTP - * headers specified by the `headers` session affinity attribute, otherwise - * sessions aren't created. - */ - require_all_headers?: boolean; - - /** - * Configures the SameSite attribute on session affinity cookie. Value "Auto" will - * be translated to "Lax" or "None" depending if Always Use HTTPS is enabled. Note: - * when using value "None", the secure attribute can not be set to "Never". - */ - samesite?: 'Auto' | 'Lax' | 'None' | 'Strict'; - - /** - * Configures the Secure attribute on session affinity cookie. Value "Always" - * indicates the Secure attribute will be set in the Set-Cookie header, "Never" - * indicates the Secure attribute will not be set, and "Auto" will set the Secure - * attribute depending if Always Use HTTPS is enabled. - */ - secure?: 'Auto' | 'Always' | 'Never'; - - /** - * Configures the zero-downtime failover between origins within a pool when session - * affinity is enabled. This feature is currently incompatible with Argo, Tiered - * Cache, and Bandwidth Alliance. The supported values are: - * - * - `"none"`: No failover takes place for sessions pinned to the origin (default). - * - `"temporary"`: Traffic will be sent to another other healthy origin until the - * originally pinned origin is available; note that this can potentially result - * in heavy origin flapping. - * - `"sticky"`: The session affinity cookie is updated and subsequent requests are - * sent to the new origin. Note: Zero-downtime failover with sticky sessions is - * currently not supported for session affinity by header. - */ - zero_downtime_failover?: 'none' | 'temporary' | 'sticky'; - } - } - } - - /** - * Configures attributes for session affinity. - */ - export interface SessionAffinityAttributes { - /** - * Configures the drain duration in seconds. This field is only used when session - * affinity is enabled on the load balancer. - */ - drain_duration?: number; - - /** - * Configures the names of HTTP headers to base session affinity on when header - * `session_affinity` is enabled. At least one HTTP header name must be provided. - * To specify the exact cookies to be used, include an item in the following - * format: `"cookie:,"` (example) where everything - * after the colon is a comma-separated list of cookie names. Providing only - * `"cookie"` will result in all cookies being used. The default max number of HTTP - * header names that can be provided depends on your plan: 5 for Enterprise, 1 for - * all other plans. - */ - headers?: Array; - - /** - * When header `session_affinity` is enabled, this option can be used to specify - * how HTTP headers on load balancing requests will be used. The supported values - * are: - * - * - `"true"`: Load balancing requests must contain _all_ of the HTTP headers - * specified by the `headers` session affinity attribute, otherwise sessions - * aren't created. - * - `"false"`: Load balancing requests must contain _at least one_ of the HTTP - * headers specified by the `headers` session affinity attribute, otherwise - * sessions aren't created. - */ - require_all_headers?: boolean; - - /** - * Configures the SameSite attribute on session affinity cookie. Value "Auto" will - * be translated to "Lax" or "None" depending if Always Use HTTPS is enabled. Note: - * when using value "None", the secure attribute can not be set to "Never". - */ - samesite?: 'Auto' | 'Lax' | 'None' | 'Strict'; - - /** - * Configures the Secure attribute on session affinity cookie. Value "Always" - * indicates the Secure attribute will be set in the Set-Cookie header, "Never" - * indicates the Secure attribute will not be set, and "Auto" will set the Secure - * attribute depending if Always Use HTTPS is enabled. - */ - secure?: 'Auto' | 'Always' | 'Never'; - - /** - * Configures the zero-downtime failover between origins within a pool when session - * affinity is enabled. This feature is currently incompatible with Argo, Tiered - * Cache, and Bandwidth Alliance. The supported values are: - * - * - `"none"`: No failover takes place for sessions pinned to the origin (default). - * - `"temporary"`: Traffic will be sent to another other healthy origin until the - * originally pinned origin is available; note that this can potentially result - * in heavy origin flapping. - * - `"sticky"`: The session affinity cookie is updated and subsequent requests are - * sent to the new origin. Note: Zero-downtime failover with sticky sessions is - * currently not supported for session affinity by header. - */ - zero_downtime_failover?: 'none' | 'temporary' | 'sticky'; - } -} - export interface LoadBalancerUpdateParams { /** * Path param: @@ -2220,7 +1283,7 @@ export interface LoadBalancerUpdateParams { * here are used by default, or when region_pools are not configured for a given * region. */ - default_pools: Array; + default_pools: Array; /** * Body param: The pool ID to use when all other pools are detected as unhealthy. @@ -2242,7 +1305,7 @@ export interface LoadBalancerUpdateParams { * response codes. If there is another healthy origin in the same pool, the request * is retried once against this alternate origin. */ - adaptive_routing?: LoadBalancerUpdateParams.AdaptiveRouting; + adaptive_routing?: AdaptiveRouting; /** * Body param: A mapping of country codes to a list of pool IDs (ordered by their @@ -2266,7 +1329,7 @@ export interface LoadBalancerUpdateParams { * Body param: Controls location-based steering for non-proxied requests. See * `steering_policy` to learn how steering is affected. */ - location_strategy?: LoadBalancerUpdateParams.LocationStrategy; + location_strategy?: LocationStrategy; /** * Body param: (Enterprise only): A mapping of Cloudflare PoP identifiers to a list @@ -2292,7 +1355,7 @@ export interface LoadBalancerUpdateParams { * - `steering_policy="least_connections"`: Use pool weights to scale each pool's * open connections. */ - random_steering?: LoadBalancerUpdateParams.RandomSteering; + random_steering?: RandomSteering; /** * Body param: A mapping of region codes to a list of pool IDs (ordered by their @@ -2305,7 +1368,7 @@ export interface LoadBalancerUpdateParams { * Body param: BETA Field Not General Access: A list of rules for this load * balancer to execute. */ - rules?: Array; + rules?: Array; /** * Body param: Specifies the type of session affinity the load balancer should use @@ -2337,7 +1400,7 @@ export interface LoadBalancerUpdateParams { /** * Body param: Configures attributes for session affinity. */ - session_affinity_attributes?: LoadBalancerUpdateParams.SessionAffinityAttributes; + session_affinity_attributes?: SessionAffinityAttributes; /** * Body param: Time, in seconds, until a client's session expires after being @@ -2396,521 +1459,6 @@ export interface LoadBalancerUpdateParams { ttl?: number; } -export namespace LoadBalancerUpdateParams { - /** - * Controls features that modify the routing of requests to pools and origins in - * response to dynamic conditions, such as during the interval between active - * health monitoring requests. For example, zero-downtime failover occurs - * immediately when an origin becomes unavailable due to HTTP 521, 522, or 523 - * response codes. If there is another healthy origin in the same pool, the request - * is retried once against this alternate origin. - */ - export interface AdaptiveRouting { - /** - * Extends zero-downtime failover of requests to healthy origins from alternate - * pools, when no healthy alternate exists in the same pool, according to the - * failover order defined by traffic and origin steering. When set false (the - * default) zero-downtime failover will only occur between origins within the same - * pool. See `session_affinity_attributes` for control over when sessions are - * broken or reassigned. - */ - failover_across_pools?: boolean; - } - - /** - * Controls location-based steering for non-proxied requests. See `steering_policy` - * to learn how steering is affected. - */ - export interface LocationStrategy { - /** - * Determines the authoritative location when ECS is not preferred, does not exist - * in the request, or its GeoIP lookup is unsuccessful. - * - * - `"pop"`: Use the Cloudflare PoP location. - * - `"resolver_ip"`: Use the DNS resolver GeoIP location. If the GeoIP lookup is - * unsuccessful, use the Cloudflare PoP location. - */ - mode?: 'pop' | 'resolver_ip'; - - /** - * Whether the EDNS Client Subnet (ECS) GeoIP should be preferred as the - * authoritative location. - * - * - `"always"`: Always prefer ECS. - * - `"never"`: Never prefer ECS. - * - `"proximity"`: Prefer ECS only when `steering_policy="proximity"`. - * - `"geo"`: Prefer ECS only when `steering_policy="geo"`. - */ - prefer_ecs?: 'always' | 'never' | 'proximity' | 'geo'; - } - - /** - * Configures pool weights. - * - * - `steering_policy="random"`: A random pool is selected with probability - * proportional to pool weights. - * - `steering_policy="least_outstanding_requests"`: Use pool weights to scale each - * pool's outstanding requests. - * - `steering_policy="least_connections"`: Use pool weights to scale each pool's - * open connections. - */ - export interface RandomSteering { - /** - * The default weight for pools in the load balancer that are not specified in the - * pool_weights map. - */ - default_weight?: number; - - /** - * A mapping of pool IDs to custom weights. The weight is relative to other pools - * in the load balancer. - */ - pool_weights?: unknown; - } - - /** - * A rule object containing conditions and overrides for this load balancer to - * evaluate. - */ - export interface Rule { - /** - * The condition expressions to evaluate. If the condition evaluates to true, the - * overrides or fixed_response in this rule will be applied. An empty condition is - * always true. For more details on condition expressions, please see - * https://developers.cloudflare.com/load-balancing/understand-basics/load-balancing-rules/expressions. - */ - condition?: string; - - /** - * Disable this specific rule. It will no longer be evaluated by this load - * balancer. - */ - disabled?: boolean; - - /** - * A collection of fields used to directly respond to the eyeball instead of - * routing to a pool. If a fixed_response is supplied the rule will be marked as - * terminates. - */ - fixed_response?: Rule.FixedResponse; - - /** - * Name of this rule. Only used for human readability. - */ - name?: string; - - /** - * A collection of overrides to apply to the load balancer when this rule's - * condition is true. All fields are optional. - */ - overrides?: Rule.Overrides; - - /** - * The order in which rules should be executed in relation to each other. Lower - * values are executed first. Values do not need to be sequential. If no value is - * provided for any rule the array order of the rules field will be used to assign - * a priority. - */ - priority?: number; - - /** - * If this rule's condition is true, this causes rule evaluation to stop after - * processing this rule. - */ - terminates?: boolean; - } - - export namespace Rule { - /** - * A collection of fields used to directly respond to the eyeball instead of - * routing to a pool. If a fixed_response is supplied the rule will be marked as - * terminates. - */ - export interface FixedResponse { - /** - * The http 'Content-Type' header to include in the response. - */ - content_type?: string; - - /** - * The http 'Location' header to include in the response. - */ - location?: string; - - /** - * Text to include as the http body. - */ - message_body?: string; - - /** - * The http status code to respond with. - */ - status_code?: number; - } - - /** - * A collection of overrides to apply to the load balancer when this rule's - * condition is true. All fields are optional. - */ - export interface Overrides { - /** - * Controls features that modify the routing of requests to pools and origins in - * response to dynamic conditions, such as during the interval between active - * health monitoring requests. For example, zero-downtime failover occurs - * immediately when an origin becomes unavailable due to HTTP 521, 522, or 523 - * response codes. If there is another healthy origin in the same pool, the request - * is retried once against this alternate origin. - */ - adaptive_routing?: Overrides.AdaptiveRouting; - - /** - * A mapping of country codes to a list of pool IDs (ordered by their failover - * priority) for the given country. Any country not explicitly defined will fall - * back to using the corresponding region_pool mapping if it exists else to - * default_pools. - */ - country_pools?: unknown; - - /** - * A list of pool IDs ordered by their failover priority. Pools defined here are - * used by default, or when region_pools are not configured for a given region. - */ - default_pools?: Array; - - /** - * The pool ID to use when all other pools are detected as unhealthy. - */ - fallback_pool?: unknown; - - /** - * Controls location-based steering for non-proxied requests. See `steering_policy` - * to learn how steering is affected. - */ - location_strategy?: Overrides.LocationStrategy; - - /** - * (Enterprise only): A mapping of Cloudflare PoP identifiers to a list of pool IDs - * (ordered by their failover priority) for the PoP (datacenter). Any PoPs not - * explicitly defined will fall back to using the corresponding country_pool, then - * region_pool mapping if it exists else to default_pools. - */ - pop_pools?: unknown; - - /** - * Configures pool weights. - * - * - `steering_policy="random"`: A random pool is selected with probability - * proportional to pool weights. - * - `steering_policy="least_outstanding_requests"`: Use pool weights to scale each - * pool's outstanding requests. - * - `steering_policy="least_connections"`: Use pool weights to scale each pool's - * open connections. - */ - random_steering?: Overrides.RandomSteering; - - /** - * A mapping of region codes to a list of pool IDs (ordered by their failover - * priority) for the given region. Any regions not explicitly defined will fall - * back to using default_pools. - */ - region_pools?: unknown; - - /** - * Specifies the type of session affinity the load balancer should use unless - * specified as `"none"` or "" (default). The supported types are: - * - * - `"cookie"`: On the first request to a proxied load balancer, a cookie is - * generated, encoding information of which origin the request will be forwarded - * to. Subsequent requests, by the same client to the same load balancer, will be - * sent to the origin server the cookie encodes, for the duration of the cookie - * and as long as the origin server remains healthy. If the cookie has expired or - * the origin server is unhealthy, then a new origin server is calculated and - * used. - * - `"ip_cookie"`: Behaves the same as `"cookie"` except the initial origin - * selection is stable and based on the client's ip address. - * - `"header"`: On the first request to a proxied load balancer, a session key - * based on the configured HTTP headers (see - * `session_affinity_attributes.headers`) is generated, encoding the request - * headers used for storing in the load balancer session state which origin the - * request will be forwarded to. Subsequent requests to the load balancer with - * the same headers will be sent to the same origin server, for the duration of - * the session and as long as the origin server remains healthy. If the session - * has been idle for the duration of `session_affinity_ttl` seconds or the origin - * server is unhealthy, then a new origin server is calculated and used. See - * `headers` in `session_affinity_attributes` for additional required - * configuration. - */ - session_affinity?: 'none' | 'cookie' | 'ip_cookie' | 'header' | '""'; - - /** - * Configures attributes for session affinity. - */ - session_affinity_attributes?: Overrides.SessionAffinityAttributes; - - /** - * Time, in seconds, until a client's session expires after being created. Once the - * expiry time has been reached, subsequent requests may get sent to a different - * origin server. The accepted ranges per `session_affinity` policy are: - * - * - `"cookie"` / `"ip_cookie"`: The current default of 23 hours will be used - * unless explicitly set. The accepted range of values is between [1800, 604800]. - * - `"header"`: The current default of 1800 seconds will be used unless explicitly - * set. The accepted range of values is between [30, 3600]. Note: With session - * affinity by header, sessions only expire after they haven't been used for the - * number of seconds specified. - */ - session_affinity_ttl?: number; - - /** - * Steering Policy for this load balancer. - * - * - `"off"`: Use `default_pools`. - * - `"geo"`: Use `region_pools`/`country_pools`/`pop_pools`. For non-proxied - * requests, the country for `country_pools` is determined by - * `location_strategy`. - * - `"random"`: Select a pool randomly. - * - `"dynamic_latency"`: Use round trip time to select the closest pool in - * default_pools (requires pool health checks). - * - `"proximity"`: Use the pools' latitude and longitude to select the closest - * pool using the Cloudflare PoP location for proxied requests or the location - * determined by `location_strategy` for non-proxied requests. - * - `"least_outstanding_requests"`: Select a pool by taking into consideration - * `random_steering` weights, as well as each pool's number of outstanding - * requests. Pools with more pending requests are weighted proportionately less - * relative to others. - * - `"least_connections"`: Select a pool by taking into consideration - * `random_steering` weights, as well as each pool's number of open connections. - * Pools with more open connections are weighted proportionately less relative to - * others. Supported for HTTP/1 and HTTP/2 connections. - * - `""`: Will map to `"geo"` if you use - * `region_pools`/`country_pools`/`pop_pools` otherwise `"off"`. - */ - steering_policy?: - | 'off' - | 'geo' - | 'random' - | 'dynamic_latency' - | 'proximity' - | 'least_outstanding_requests' - | 'least_connections' - | '""'; - - /** - * Time to live (TTL) of the DNS entry for the IP address returned by this load - * balancer. This only applies to gray-clouded (unproxied) load balancers. - */ - ttl?: number; - } - - export namespace Overrides { - /** - * Controls features that modify the routing of requests to pools and origins in - * response to dynamic conditions, such as during the interval between active - * health monitoring requests. For example, zero-downtime failover occurs - * immediately when an origin becomes unavailable due to HTTP 521, 522, or 523 - * response codes. If there is another healthy origin in the same pool, the request - * is retried once against this alternate origin. - */ - export interface AdaptiveRouting { - /** - * Extends zero-downtime failover of requests to healthy origins from alternate - * pools, when no healthy alternate exists in the same pool, according to the - * failover order defined by traffic and origin steering. When set false (the - * default) zero-downtime failover will only occur between origins within the same - * pool. See `session_affinity_attributes` for control over when sessions are - * broken or reassigned. - */ - failover_across_pools?: boolean; - } - - /** - * Controls location-based steering for non-proxied requests. See `steering_policy` - * to learn how steering is affected. - */ - export interface LocationStrategy { - /** - * Determines the authoritative location when ECS is not preferred, does not exist - * in the request, or its GeoIP lookup is unsuccessful. - * - * - `"pop"`: Use the Cloudflare PoP location. - * - `"resolver_ip"`: Use the DNS resolver GeoIP location. If the GeoIP lookup is - * unsuccessful, use the Cloudflare PoP location. - */ - mode?: 'pop' | 'resolver_ip'; - - /** - * Whether the EDNS Client Subnet (ECS) GeoIP should be preferred as the - * authoritative location. - * - * - `"always"`: Always prefer ECS. - * - `"never"`: Never prefer ECS. - * - `"proximity"`: Prefer ECS only when `steering_policy="proximity"`. - * - `"geo"`: Prefer ECS only when `steering_policy="geo"`. - */ - prefer_ecs?: 'always' | 'never' | 'proximity' | 'geo'; - } - - /** - * Configures pool weights. - * - * - `steering_policy="random"`: A random pool is selected with probability - * proportional to pool weights. - * - `steering_policy="least_outstanding_requests"`: Use pool weights to scale each - * pool's outstanding requests. - * - `steering_policy="least_connections"`: Use pool weights to scale each pool's - * open connections. - */ - export interface RandomSteering { - /** - * The default weight for pools in the load balancer that are not specified in the - * pool_weights map. - */ - default_weight?: number; - - /** - * A mapping of pool IDs to custom weights. The weight is relative to other pools - * in the load balancer. - */ - pool_weights?: unknown; - } - - /** - * Configures attributes for session affinity. - */ - export interface SessionAffinityAttributes { - /** - * Configures the drain duration in seconds. This field is only used when session - * affinity is enabled on the load balancer. - */ - drain_duration?: number; - - /** - * Configures the names of HTTP headers to base session affinity on when header - * `session_affinity` is enabled. At least one HTTP header name must be provided. - * To specify the exact cookies to be used, include an item in the following - * format: `"cookie:,"` (example) where everything - * after the colon is a comma-separated list of cookie names. Providing only - * `"cookie"` will result in all cookies being used. The default max number of HTTP - * header names that can be provided depends on your plan: 5 for Enterprise, 1 for - * all other plans. - */ - headers?: Array; - - /** - * When header `session_affinity` is enabled, this option can be used to specify - * how HTTP headers on load balancing requests will be used. The supported values - * are: - * - * - `"true"`: Load balancing requests must contain _all_ of the HTTP headers - * specified by the `headers` session affinity attribute, otherwise sessions - * aren't created. - * - `"false"`: Load balancing requests must contain _at least one_ of the HTTP - * headers specified by the `headers` session affinity attribute, otherwise - * sessions aren't created. - */ - require_all_headers?: boolean; - - /** - * Configures the SameSite attribute on session affinity cookie. Value "Auto" will - * be translated to "Lax" or "None" depending if Always Use HTTPS is enabled. Note: - * when using value "None", the secure attribute can not be set to "Never". - */ - samesite?: 'Auto' | 'Lax' | 'None' | 'Strict'; - - /** - * Configures the Secure attribute on session affinity cookie. Value "Always" - * indicates the Secure attribute will be set in the Set-Cookie header, "Never" - * indicates the Secure attribute will not be set, and "Auto" will set the Secure - * attribute depending if Always Use HTTPS is enabled. - */ - secure?: 'Auto' | 'Always' | 'Never'; - - /** - * Configures the zero-downtime failover between origins within a pool when session - * affinity is enabled. This feature is currently incompatible with Argo, Tiered - * Cache, and Bandwidth Alliance. The supported values are: - * - * - `"none"`: No failover takes place for sessions pinned to the origin (default). - * - `"temporary"`: Traffic will be sent to another other healthy origin until the - * originally pinned origin is available; note that this can potentially result - * in heavy origin flapping. - * - `"sticky"`: The session affinity cookie is updated and subsequent requests are - * sent to the new origin. Note: Zero-downtime failover with sticky sessions is - * currently not supported for session affinity by header. - */ - zero_downtime_failover?: 'none' | 'temporary' | 'sticky'; - } - } - } - - /** - * Configures attributes for session affinity. - */ - export interface SessionAffinityAttributes { - /** - * Configures the drain duration in seconds. This field is only used when session - * affinity is enabled on the load balancer. - */ - drain_duration?: number; - - /** - * Configures the names of HTTP headers to base session affinity on when header - * `session_affinity` is enabled. At least one HTTP header name must be provided. - * To specify the exact cookies to be used, include an item in the following - * format: `"cookie:,"` (example) where everything - * after the colon is a comma-separated list of cookie names. Providing only - * `"cookie"` will result in all cookies being used. The default max number of HTTP - * header names that can be provided depends on your plan: 5 for Enterprise, 1 for - * all other plans. - */ - headers?: Array; - - /** - * When header `session_affinity` is enabled, this option can be used to specify - * how HTTP headers on load balancing requests will be used. The supported values - * are: - * - * - `"true"`: Load balancing requests must contain _all_ of the HTTP headers - * specified by the `headers` session affinity attribute, otherwise sessions - * aren't created. - * - `"false"`: Load balancing requests must contain _at least one_ of the HTTP - * headers specified by the `headers` session affinity attribute, otherwise - * sessions aren't created. - */ - require_all_headers?: boolean; - - /** - * Configures the SameSite attribute on session affinity cookie. Value "Auto" will - * be translated to "Lax" or "None" depending if Always Use HTTPS is enabled. Note: - * when using value "None", the secure attribute can not be set to "Never". - */ - samesite?: 'Auto' | 'Lax' | 'None' | 'Strict'; - - /** - * Configures the Secure attribute on session affinity cookie. Value "Always" - * indicates the Secure attribute will be set in the Set-Cookie header, "Never" - * indicates the Secure attribute will not be set, and "Auto" will set the Secure - * attribute depending if Always Use HTTPS is enabled. - */ - secure?: 'Auto' | 'Always' | 'Never'; - - /** - * Configures the zero-downtime failover between origins within a pool when session - * affinity is enabled. This feature is currently incompatible with Argo, Tiered - * Cache, and Bandwidth Alliance. The supported values are: - * - * - `"none"`: No failover takes place for sessions pinned to the origin (default). - * - `"temporary"`: Traffic will be sent to another other healthy origin until the - * originally pinned origin is available; note that this can potentially result - * in heavy origin flapping. - * - `"sticky"`: The session affinity cookie is updated and subsequent requests are - * sent to the new origin. Note: Zero-downtime failover with sticky sessions is - * currently not supported for session affinity by header. - */ - zero_downtime_failover?: 'none' | 'temporary' | 'sticky'; - } -} - export interface LoadBalancerListParams { zone_id: string; } @@ -2941,7 +1489,7 @@ export interface LoadBalancerEditParams { * response codes. If there is another healthy origin in the same pool, the request * is retried once against this alternate origin. */ - adaptive_routing?: LoadBalancerEditParams.AdaptiveRouting; + adaptive_routing?: AdaptiveRouting; /** * Body param: A mapping of country codes to a list of pool IDs (ordered by their @@ -2956,7 +1504,7 @@ export interface LoadBalancerEditParams { * here are used by default, or when region_pools are not configured for a given * region. */ - default_pools?: Array; + default_pools?: Array; /** * Body param: Object description. @@ -2977,7 +1525,7 @@ export interface LoadBalancerEditParams { * Body param: Controls location-based steering for non-proxied requests. See * `steering_policy` to learn how steering is affected. */ - location_strategy?: LoadBalancerEditParams.LocationStrategy; + location_strategy?: LocationStrategy; /** * Body param: The DNS hostname to associate with your Load Balancer. If this @@ -3010,7 +1558,7 @@ export interface LoadBalancerEditParams { * - `steering_policy="least_connections"`: Use pool weights to scale each pool's * open connections. */ - random_steering?: LoadBalancerEditParams.RandomSteering; + random_steering?: RandomSteering; /** * Body param: A mapping of region codes to a list of pool IDs (ordered by their @@ -3023,7 +1571,7 @@ export interface LoadBalancerEditParams { * Body param: BETA Field Not General Access: A list of rules for this load * balancer to execute. */ - rules?: Array; + rules?: Array; /** * Body param: Specifies the type of session affinity the load balancer should use @@ -3055,7 +1603,7 @@ export interface LoadBalancerEditParams { /** * Body param: Configures attributes for session affinity. */ - session_affinity_attributes?: LoadBalancerEditParams.SessionAffinityAttributes; + session_affinity_attributes?: SessionAffinityAttributes; /** * Body param: Time, in seconds, until a client's session expires after being @@ -3114,536 +1662,11 @@ export interface LoadBalancerEditParams { ttl?: number; } -export namespace LoadBalancerEditParams { - /** - * Controls features that modify the routing of requests to pools and origins in - * response to dynamic conditions, such as during the interval between active - * health monitoring requests. For example, zero-downtime failover occurs - * immediately when an origin becomes unavailable due to HTTP 521, 522, or 523 - * response codes. If there is another healthy origin in the same pool, the request - * is retried once against this alternate origin. - */ - export interface AdaptiveRouting { - /** - * Extends zero-downtime failover of requests to healthy origins from alternate - * pools, when no healthy alternate exists in the same pool, according to the - * failover order defined by traffic and origin steering. When set false (the - * default) zero-downtime failover will only occur between origins within the same - * pool. See `session_affinity_attributes` for control over when sessions are - * broken or reassigned. - */ - failover_across_pools?: boolean; - } - - /** - * Controls location-based steering for non-proxied requests. See `steering_policy` - * to learn how steering is affected. - */ - export interface LocationStrategy { - /** - * Determines the authoritative location when ECS is not preferred, does not exist - * in the request, or its GeoIP lookup is unsuccessful. - * - * - `"pop"`: Use the Cloudflare PoP location. - * - `"resolver_ip"`: Use the DNS resolver GeoIP location. If the GeoIP lookup is - * unsuccessful, use the Cloudflare PoP location. - */ - mode?: 'pop' | 'resolver_ip'; - - /** - * Whether the EDNS Client Subnet (ECS) GeoIP should be preferred as the - * authoritative location. - * - * - `"always"`: Always prefer ECS. - * - `"never"`: Never prefer ECS. - * - `"proximity"`: Prefer ECS only when `steering_policy="proximity"`. - * - `"geo"`: Prefer ECS only when `steering_policy="geo"`. - */ - prefer_ecs?: 'always' | 'never' | 'proximity' | 'geo'; - } - - /** - * Configures pool weights. - * - * - `steering_policy="random"`: A random pool is selected with probability - * proportional to pool weights. - * - `steering_policy="least_outstanding_requests"`: Use pool weights to scale each - * pool's outstanding requests. - * - `steering_policy="least_connections"`: Use pool weights to scale each pool's - * open connections. - */ - export interface RandomSteering { - /** - * The default weight for pools in the load balancer that are not specified in the - * pool_weights map. - */ - default_weight?: number; - - /** - * A mapping of pool IDs to custom weights. The weight is relative to other pools - * in the load balancer. - */ - pool_weights?: unknown; - } - - /** - * A rule object containing conditions and overrides for this load balancer to - * evaluate. - */ - export interface Rule { - /** - * The condition expressions to evaluate. If the condition evaluates to true, the - * overrides or fixed_response in this rule will be applied. An empty condition is - * always true. For more details on condition expressions, please see - * https://developers.cloudflare.com/load-balancing/understand-basics/load-balancing-rules/expressions. - */ - condition?: string; - - /** - * Disable this specific rule. It will no longer be evaluated by this load - * balancer. - */ - disabled?: boolean; - - /** - * A collection of fields used to directly respond to the eyeball instead of - * routing to a pool. If a fixed_response is supplied the rule will be marked as - * terminates. - */ - fixed_response?: Rule.FixedResponse; - - /** - * Name of this rule. Only used for human readability. - */ - name?: string; - - /** - * A collection of overrides to apply to the load balancer when this rule's - * condition is true. All fields are optional. - */ - overrides?: Rule.Overrides; - - /** - * The order in which rules should be executed in relation to each other. Lower - * values are executed first. Values do not need to be sequential. If no value is - * provided for any rule the array order of the rules field will be used to assign - * a priority. - */ - priority?: number; - - /** - * If this rule's condition is true, this causes rule evaluation to stop after - * processing this rule. - */ - terminates?: boolean; - } - - export namespace Rule { - /** - * A collection of fields used to directly respond to the eyeball instead of - * routing to a pool. If a fixed_response is supplied the rule will be marked as - * terminates. - */ - export interface FixedResponse { - /** - * The http 'Content-Type' header to include in the response. - */ - content_type?: string; - - /** - * The http 'Location' header to include in the response. - */ - location?: string; - - /** - * Text to include as the http body. - */ - message_body?: string; - - /** - * The http status code to respond with. - */ - status_code?: number; - } - - /** - * A collection of overrides to apply to the load balancer when this rule's - * condition is true. All fields are optional. - */ - export interface Overrides { - /** - * Controls features that modify the routing of requests to pools and origins in - * response to dynamic conditions, such as during the interval between active - * health monitoring requests. For example, zero-downtime failover occurs - * immediately when an origin becomes unavailable due to HTTP 521, 522, or 523 - * response codes. If there is another healthy origin in the same pool, the request - * is retried once against this alternate origin. - */ - adaptive_routing?: Overrides.AdaptiveRouting; - - /** - * A mapping of country codes to a list of pool IDs (ordered by their failover - * priority) for the given country. Any country not explicitly defined will fall - * back to using the corresponding region_pool mapping if it exists else to - * default_pools. - */ - country_pools?: unknown; - - /** - * A list of pool IDs ordered by their failover priority. Pools defined here are - * used by default, or when region_pools are not configured for a given region. - */ - default_pools?: Array; - - /** - * The pool ID to use when all other pools are detected as unhealthy. - */ - fallback_pool?: unknown; - - /** - * Controls location-based steering for non-proxied requests. See `steering_policy` - * to learn how steering is affected. - */ - location_strategy?: Overrides.LocationStrategy; - - /** - * (Enterprise only): A mapping of Cloudflare PoP identifiers to a list of pool IDs - * (ordered by their failover priority) for the PoP (datacenter). Any PoPs not - * explicitly defined will fall back to using the corresponding country_pool, then - * region_pool mapping if it exists else to default_pools. - */ - pop_pools?: unknown; - - /** - * Configures pool weights. - * - * - `steering_policy="random"`: A random pool is selected with probability - * proportional to pool weights. - * - `steering_policy="least_outstanding_requests"`: Use pool weights to scale each - * pool's outstanding requests. - * - `steering_policy="least_connections"`: Use pool weights to scale each pool's - * open connections. - */ - random_steering?: Overrides.RandomSteering; - - /** - * A mapping of region codes to a list of pool IDs (ordered by their failover - * priority) for the given region. Any regions not explicitly defined will fall - * back to using default_pools. - */ - region_pools?: unknown; - - /** - * Specifies the type of session affinity the load balancer should use unless - * specified as `"none"` or "" (default). The supported types are: - * - * - `"cookie"`: On the first request to a proxied load balancer, a cookie is - * generated, encoding information of which origin the request will be forwarded - * to. Subsequent requests, by the same client to the same load balancer, will be - * sent to the origin server the cookie encodes, for the duration of the cookie - * and as long as the origin server remains healthy. If the cookie has expired or - * the origin server is unhealthy, then a new origin server is calculated and - * used. - * - `"ip_cookie"`: Behaves the same as `"cookie"` except the initial origin - * selection is stable and based on the client's ip address. - * - `"header"`: On the first request to a proxied load balancer, a session key - * based on the configured HTTP headers (see - * `session_affinity_attributes.headers`) is generated, encoding the request - * headers used for storing in the load balancer session state which origin the - * request will be forwarded to. Subsequent requests to the load balancer with - * the same headers will be sent to the same origin server, for the duration of - * the session and as long as the origin server remains healthy. If the session - * has been idle for the duration of `session_affinity_ttl` seconds or the origin - * server is unhealthy, then a new origin server is calculated and used. See - * `headers` in `session_affinity_attributes` for additional required - * configuration. - */ - session_affinity?: 'none' | 'cookie' | 'ip_cookie' | 'header' | '""'; - - /** - * Configures attributes for session affinity. - */ - session_affinity_attributes?: Overrides.SessionAffinityAttributes; - - /** - * Time, in seconds, until a client's session expires after being created. Once the - * expiry time has been reached, subsequent requests may get sent to a different - * origin server. The accepted ranges per `session_affinity` policy are: - * - * - `"cookie"` / `"ip_cookie"`: The current default of 23 hours will be used - * unless explicitly set. The accepted range of values is between [1800, 604800]. - * - `"header"`: The current default of 1800 seconds will be used unless explicitly - * set. The accepted range of values is between [30, 3600]. Note: With session - * affinity by header, sessions only expire after they haven't been used for the - * number of seconds specified. - */ - session_affinity_ttl?: number; - - /** - * Steering Policy for this load balancer. - * - * - `"off"`: Use `default_pools`. - * - `"geo"`: Use `region_pools`/`country_pools`/`pop_pools`. For non-proxied - * requests, the country for `country_pools` is determined by - * `location_strategy`. - * - `"random"`: Select a pool randomly. - * - `"dynamic_latency"`: Use round trip time to select the closest pool in - * default_pools (requires pool health checks). - * - `"proximity"`: Use the pools' latitude and longitude to select the closest - * pool using the Cloudflare PoP location for proxied requests or the location - * determined by `location_strategy` for non-proxied requests. - * - `"least_outstanding_requests"`: Select a pool by taking into consideration - * `random_steering` weights, as well as each pool's number of outstanding - * requests. Pools with more pending requests are weighted proportionately less - * relative to others. - * - `"least_connections"`: Select a pool by taking into consideration - * `random_steering` weights, as well as each pool's number of open connections. - * Pools with more open connections are weighted proportionately less relative to - * others. Supported for HTTP/1 and HTTP/2 connections. - * - `""`: Will map to `"geo"` if you use - * `region_pools`/`country_pools`/`pop_pools` otherwise `"off"`. - */ - steering_policy?: - | 'off' - | 'geo' - | 'random' - | 'dynamic_latency' - | 'proximity' - | 'least_outstanding_requests' - | 'least_connections' - | '""'; - - /** - * Time to live (TTL) of the DNS entry for the IP address returned by this load - * balancer. This only applies to gray-clouded (unproxied) load balancers. - */ - ttl?: number; - } - - export namespace Overrides { - /** - * Controls features that modify the routing of requests to pools and origins in - * response to dynamic conditions, such as during the interval between active - * health monitoring requests. For example, zero-downtime failover occurs - * immediately when an origin becomes unavailable due to HTTP 521, 522, or 523 - * response codes. If there is another healthy origin in the same pool, the request - * is retried once against this alternate origin. - */ - export interface AdaptiveRouting { - /** - * Extends zero-downtime failover of requests to healthy origins from alternate - * pools, when no healthy alternate exists in the same pool, according to the - * failover order defined by traffic and origin steering. When set false (the - * default) zero-downtime failover will only occur between origins within the same - * pool. See `session_affinity_attributes` for control over when sessions are - * broken or reassigned. - */ - failover_across_pools?: boolean; - } - - /** - * Controls location-based steering for non-proxied requests. See `steering_policy` - * to learn how steering is affected. - */ - export interface LocationStrategy { - /** - * Determines the authoritative location when ECS is not preferred, does not exist - * in the request, or its GeoIP lookup is unsuccessful. - * - * - `"pop"`: Use the Cloudflare PoP location. - * - `"resolver_ip"`: Use the DNS resolver GeoIP location. If the GeoIP lookup is - * unsuccessful, use the Cloudflare PoP location. - */ - mode?: 'pop' | 'resolver_ip'; - - /** - * Whether the EDNS Client Subnet (ECS) GeoIP should be preferred as the - * authoritative location. - * - * - `"always"`: Always prefer ECS. - * - `"never"`: Never prefer ECS. - * - `"proximity"`: Prefer ECS only when `steering_policy="proximity"`. - * - `"geo"`: Prefer ECS only when `steering_policy="geo"`. - */ - prefer_ecs?: 'always' | 'never' | 'proximity' | 'geo'; - } - - /** - * Configures pool weights. - * - * - `steering_policy="random"`: A random pool is selected with probability - * proportional to pool weights. - * - `steering_policy="least_outstanding_requests"`: Use pool weights to scale each - * pool's outstanding requests. - * - `steering_policy="least_connections"`: Use pool weights to scale each pool's - * open connections. - */ - export interface RandomSteering { - /** - * The default weight for pools in the load balancer that are not specified in the - * pool_weights map. - */ - default_weight?: number; - - /** - * A mapping of pool IDs to custom weights. The weight is relative to other pools - * in the load balancer. - */ - pool_weights?: unknown; - } - - /** - * Configures attributes for session affinity. - */ - export interface SessionAffinityAttributes { - /** - * Configures the drain duration in seconds. This field is only used when session - * affinity is enabled on the load balancer. - */ - drain_duration?: number; - - /** - * Configures the names of HTTP headers to base session affinity on when header - * `session_affinity` is enabled. At least one HTTP header name must be provided. - * To specify the exact cookies to be used, include an item in the following - * format: `"cookie:,"` (example) where everything - * after the colon is a comma-separated list of cookie names. Providing only - * `"cookie"` will result in all cookies being used. The default max number of HTTP - * header names that can be provided depends on your plan: 5 for Enterprise, 1 for - * all other plans. - */ - headers?: Array; - - /** - * When header `session_affinity` is enabled, this option can be used to specify - * how HTTP headers on load balancing requests will be used. The supported values - * are: - * - * - `"true"`: Load balancing requests must contain _all_ of the HTTP headers - * specified by the `headers` session affinity attribute, otherwise sessions - * aren't created. - * - `"false"`: Load balancing requests must contain _at least one_ of the HTTP - * headers specified by the `headers` session affinity attribute, otherwise - * sessions aren't created. - */ - require_all_headers?: boolean; - - /** - * Configures the SameSite attribute on session affinity cookie. Value "Auto" will - * be translated to "Lax" or "None" depending if Always Use HTTPS is enabled. Note: - * when using value "None", the secure attribute can not be set to "Never". - */ - samesite?: 'Auto' | 'Lax' | 'None' | 'Strict'; - - /** - * Configures the Secure attribute on session affinity cookie. Value "Always" - * indicates the Secure attribute will be set in the Set-Cookie header, "Never" - * indicates the Secure attribute will not be set, and "Auto" will set the Secure - * attribute depending if Always Use HTTPS is enabled. - */ - secure?: 'Auto' | 'Always' | 'Never'; - - /** - * Configures the zero-downtime failover between origins within a pool when session - * affinity is enabled. This feature is currently incompatible with Argo, Tiered - * Cache, and Bandwidth Alliance. The supported values are: - * - * - `"none"`: No failover takes place for sessions pinned to the origin (default). - * - `"temporary"`: Traffic will be sent to another other healthy origin until the - * originally pinned origin is available; note that this can potentially result - * in heavy origin flapping. - * - `"sticky"`: The session affinity cookie is updated and subsequent requests are - * sent to the new origin. Note: Zero-downtime failover with sticky sessions is - * currently not supported for session affinity by header. - */ - zero_downtime_failover?: 'none' | 'temporary' | 'sticky'; - } - } - } - - /** - * Configures attributes for session affinity. - */ - export interface SessionAffinityAttributes { - /** - * Configures the drain duration in seconds. This field is only used when session - * affinity is enabled on the load balancer. - */ - drain_duration?: number; - - /** - * Configures the names of HTTP headers to base session affinity on when header - * `session_affinity` is enabled. At least one HTTP header name must be provided. - * To specify the exact cookies to be used, include an item in the following - * format: `"cookie:,"` (example) where everything - * after the colon is a comma-separated list of cookie names. Providing only - * `"cookie"` will result in all cookies being used. The default max number of HTTP - * header names that can be provided depends on your plan: 5 for Enterprise, 1 for - * all other plans. - */ - headers?: Array; - - /** - * When header `session_affinity` is enabled, this option can be used to specify - * how HTTP headers on load balancing requests will be used. The supported values - * are: - * - * - `"true"`: Load balancing requests must contain _all_ of the HTTP headers - * specified by the `headers` session affinity attribute, otherwise sessions - * aren't created. - * - `"false"`: Load balancing requests must contain _at least one_ of the HTTP - * headers specified by the `headers` session affinity attribute, otherwise - * sessions aren't created. - */ - require_all_headers?: boolean; - - /** - * Configures the SameSite attribute on session affinity cookie. Value "Auto" will - * be translated to "Lax" or "None" depending if Always Use HTTPS is enabled. Note: - * when using value "None", the secure attribute can not be set to "Never". - */ - samesite?: 'Auto' | 'Lax' | 'None' | 'Strict'; - - /** - * Configures the Secure attribute on session affinity cookie. Value "Always" - * indicates the Secure attribute will be set in the Set-Cookie header, "Never" - * indicates the Secure attribute will not be set, and "Auto" will set the Secure - * attribute depending if Always Use HTTPS is enabled. - */ - secure?: 'Auto' | 'Always' | 'Never'; - - /** - * Configures the zero-downtime failover between origins within a pool when session - * affinity is enabled. This feature is currently incompatible with Argo, Tiered - * Cache, and Bandwidth Alliance. The supported values are: - * - * - `"none"`: No failover takes place for sessions pinned to the origin (default). - * - `"temporary"`: Traffic will be sent to another other healthy origin until the - * originally pinned origin is available; note that this can potentially result - * in heavy origin flapping. - * - `"sticky"`: The session affinity cookie is updated and subsequent requests are - * sent to the new origin. Note: Zero-downtime failover with sticky sessions is - * currently not supported for session affinity by header. - */ - zero_downtime_failover?: 'none' | 'temporary' | 'sticky'; - } -} - export interface LoadBalancerGetParams { zone_id: string; } export namespace LoadBalancers { - export import LoadBalancer = LoadBalancersAPI.LoadBalancer; - export import UnnamedSchemaRef06ba14ec7860c091efc98fd9af30f382 = LoadBalancersAPI.UnnamedSchemaRef06ba14ec7860c091efc98fd9af30f382; - export import LoadBalancerDeleteResponse = LoadBalancersAPI.LoadBalancerDeleteResponse; - export import LoadBalancersSinglePage = LoadBalancersAPI.LoadBalancersSinglePage; - export import LoadBalancerCreateParams = LoadBalancersAPI.LoadBalancerCreateParams; - export import LoadBalancerUpdateParams = LoadBalancersAPI.LoadBalancerUpdateParams; - export import LoadBalancerListParams = LoadBalancersAPI.LoadBalancerListParams; - export import LoadBalancerDeleteParams = LoadBalancersAPI.LoadBalancerDeleteParams; - export import LoadBalancerEditParams = LoadBalancersAPI.LoadBalancerEditParams; - export import LoadBalancerGetParams = LoadBalancersAPI.LoadBalancerGetParams; export import Monitors = MonitorsAPI.Monitors; export import MonitorDeleteResponse = MonitorsAPI.MonitorDeleteResponse; export import MonitorCreateParams = MonitorsAPI.MonitorCreateParams; diff --git a/src/resources/load-balancers/pools/pools.ts b/src/resources/load-balancers/pools/pools.ts index da4376b360..1f0aff7733 100644 --- a/src/resources/load-balancers/pools/pools.ts +++ b/src/resources/load-balancers/pools/pools.ts @@ -3,6 +3,7 @@ import * as Core from 'cloudflare/core'; import { APIResource } from 'cloudflare/resource'; import * as PoolsAPI from 'cloudflare/resources/load-balancers/pools/pools'; +import * as LoadBalancersAPI from 'cloudflare/resources/load-balancers/load-balancers'; import * as HealthAPI from 'cloudflare/resources/load-balancers/pools/health'; import * as ReferencesAPI from 'cloudflare/resources/load-balancers/pools/references'; import * as LoadBalancersPoolsAPI from 'cloudflare/resources/user/load-balancers/pools'; @@ -131,7 +132,7 @@ export interface PoolCreateParams { * is balanced across all currently healthy origins, provided the pool itself is * healthy. */ - origins: Array; + origins: Array; /** * Body param: A human-readable description of the pool. @@ -154,7 +155,7 @@ export interface PoolCreateParams { /** * Body param: Configures load shedding policies and percentages for the pool. */ - load_shedding?: PoolCreateParams.LoadShedding; + load_shedding?: LoadBalancersAPI.LoadShedding; /** * Body param: The longitude of the data center containing the origins used in this @@ -188,183 +189,13 @@ export interface PoolCreateParams { * Body param: Filter pool and origin health notifications by resource type or * health status. Use null to reset. */ - notification_filter?: PoolCreateParams.NotificationFilter | null; + notification_filter?: LoadBalancersAPI.NotificationFilter | null; /** * Body param: Configures origin steering for the pool. Controls how origins are * selected for new sessions and traffic without session affinity. */ - origin_steering?: PoolCreateParams.OriginSteering; -} - -export namespace PoolCreateParams { - export interface Origin { - /** - * The IP address (IPv4 or IPv6) of the origin, or its publicly addressable - * hostname. Hostnames entered here should resolve directly to the origin, and not - * be a hostname proxied by Cloudflare. To set an internal/reserved address, - * virtual_network_id must also be set. - */ - address?: string; - - /** - * Whether to enable (the default) this origin within the pool. Disabled origins - * will not receive traffic and are excluded from health checks. The origin will - * only be disabled for the current pool. - */ - enabled?: boolean; - - /** - * The request header is used to pass additional information with an HTTP request. - * Currently supported header is 'Host'. - */ - header?: Origin.Header; - - /** - * A human-identifiable name for the origin. - */ - name?: string; - - /** - * The virtual network subnet ID the origin belongs in. Virtual network must also - * belong to the account. - */ - virtual_network_id?: string; - - /** - * The weight of this origin relative to other origins in the pool. Based on the - * configured weight the total traffic is distributed among origins within the - * pool. - * - * - `origin_steering.policy="least_outstanding_requests"`: Use weight to scale the - * origin's outstanding requests. - * - `origin_steering.policy="least_connections"`: Use weight to scale the origin's - * open connections. - */ - weight?: number; - } - - export namespace Origin { - /** - * The request header is used to pass additional information with an HTTP request. - * Currently supported header is 'Host'. - */ - export interface Header { - /** - * The 'Host' header allows to override the hostname set in the HTTP request. - * Current support is 1 'Host' header override per origin. - */ - Host?: Array; - } - } - - /** - * Configures load shedding policies and percentages for the pool. - */ - export interface LoadShedding { - /** - * The percent of traffic to shed from the pool, according to the default policy. - * Applies to new sessions and traffic without session affinity. - */ - default_percent?: number; - - /** - * The default policy to use when load shedding. A random policy randomly sheds a - * given percent of requests. A hash policy computes a hash over the - * CF-Connecting-IP address and sheds all requests originating from a percent of - * IPs. - */ - default_policy?: 'random' | 'hash'; - - /** - * The percent of existing sessions to shed from the pool, according to the session - * policy. - */ - session_percent?: number; - - /** - * Only the hash policy is supported for existing sessions (to avoid exponential - * decay). - */ - session_policy?: 'hash'; - } - - /** - * Filter pool and origin health notifications by resource type or health status. - * Use null to reset. - */ - export interface NotificationFilter { - /** - * Filter options for a particular resource type (pool or origin). Use null to - * reset. - */ - origin?: NotificationFilter.Origin | null; - - /** - * Filter options for a particular resource type (pool or origin). Use null to - * reset. - */ - pool?: NotificationFilter.Pool | null; - } - - export namespace NotificationFilter { - /** - * Filter options for a particular resource type (pool or origin). Use null to - * reset. - */ - export interface Origin { - /** - * If set true, disable notifications for this type of resource (pool or origin). - */ - disable?: boolean; - - /** - * If present, send notifications only for this health status (e.g. false for only - * DOWN events). Use null to reset (all events). - */ - healthy?: boolean | null; - } - - /** - * Filter options for a particular resource type (pool or origin). Use null to - * reset. - */ - export interface Pool { - /** - * If set true, disable notifications for this type of resource (pool or origin). - */ - disable?: boolean; - - /** - * If present, send notifications only for this health status (e.g. false for only - * DOWN events). Use null to reset (all events). - */ - healthy?: boolean | null; - } - } - - /** - * Configures origin steering for the pool. Controls how origins are selected for - * new sessions and traffic without session affinity. - */ - export interface OriginSteering { - /** - * The type of origin steering policy to use. - * - * - `"random"`: Select an origin randomly. - * - `"hash"`: Select an origin by computing a hash over the CF-Connecting-IP - * address. - * - `"least_outstanding_requests"`: Select an origin by taking into consideration - * origin weights, as well as each origin's number of outstanding requests. - * Origins with more pending requests are weighted proportionately less relative - * to others. - * - `"least_connections"`: Select an origin by taking into consideration origin - * weights, as well as each origin's number of open connections. Origins with - * more open connections are weighted proportionately less relative to others. - * Supported for HTTP/1 and HTTP/2 connections. - */ - policy?: 'random' | 'hash' | 'least_outstanding_requests' | 'least_connections'; - } + origin_steering?: LoadBalancersAPI.OriginSteering; } export interface PoolUpdateParams { @@ -384,28 +215,13 @@ export interface PoolUpdateParams { * is balanced across all currently healthy origins, provided the pool itself is * healthy. */ - origins: Array; + origins: Array; /** * Body param: A list of regions from which to run health checks. Null means every * Cloudflare data center. */ - check_regions?: Array< - | 'WNAM' - | 'ENAM' - | 'WEU' - | 'EEU' - | 'NSAM' - | 'SSAM' - | 'OC' - | 'ME' - | 'NAF' - | 'SAF' - | 'SAS' - | 'SEAS' - | 'NEAS' - | 'ALL_REGIONS' - > | null; + check_regions?: Array | null; /** * Body param: A human-readable description of the pool. @@ -428,7 +244,7 @@ export interface PoolUpdateParams { /** * Body param: Configures load shedding policies and percentages for the pool. */ - load_shedding?: PoolUpdateParams.LoadShedding; + load_shedding?: LoadBalancersAPI.LoadShedding; /** * Body param: The longitude of the data center containing the origins used in this @@ -462,183 +278,13 @@ export interface PoolUpdateParams { * Body param: Filter pool and origin health notifications by resource type or * health status. Use null to reset. */ - notification_filter?: PoolUpdateParams.NotificationFilter | null; + notification_filter?: LoadBalancersAPI.NotificationFilter | null; /** * Body param: Configures origin steering for the pool. Controls how origins are * selected for new sessions and traffic without session affinity. */ - origin_steering?: PoolUpdateParams.OriginSteering; -} - -export namespace PoolUpdateParams { - export interface Origin { - /** - * The IP address (IPv4 or IPv6) of the origin, or its publicly addressable - * hostname. Hostnames entered here should resolve directly to the origin, and not - * be a hostname proxied by Cloudflare. To set an internal/reserved address, - * virtual_network_id must also be set. - */ - address?: string; - - /** - * Whether to enable (the default) this origin within the pool. Disabled origins - * will not receive traffic and are excluded from health checks. The origin will - * only be disabled for the current pool. - */ - enabled?: boolean; - - /** - * The request header is used to pass additional information with an HTTP request. - * Currently supported header is 'Host'. - */ - header?: Origin.Header; - - /** - * A human-identifiable name for the origin. - */ - name?: string; - - /** - * The virtual network subnet ID the origin belongs in. Virtual network must also - * belong to the account. - */ - virtual_network_id?: string; - - /** - * The weight of this origin relative to other origins in the pool. Based on the - * configured weight the total traffic is distributed among origins within the - * pool. - * - * - `origin_steering.policy="least_outstanding_requests"`: Use weight to scale the - * origin's outstanding requests. - * - `origin_steering.policy="least_connections"`: Use weight to scale the origin's - * open connections. - */ - weight?: number; - } - - export namespace Origin { - /** - * The request header is used to pass additional information with an HTTP request. - * Currently supported header is 'Host'. - */ - export interface Header { - /** - * The 'Host' header allows to override the hostname set in the HTTP request. - * Current support is 1 'Host' header override per origin. - */ - Host?: Array; - } - } - - /** - * Configures load shedding policies and percentages for the pool. - */ - export interface LoadShedding { - /** - * The percent of traffic to shed from the pool, according to the default policy. - * Applies to new sessions and traffic without session affinity. - */ - default_percent?: number; - - /** - * The default policy to use when load shedding. A random policy randomly sheds a - * given percent of requests. A hash policy computes a hash over the - * CF-Connecting-IP address and sheds all requests originating from a percent of - * IPs. - */ - default_policy?: 'random' | 'hash'; - - /** - * The percent of existing sessions to shed from the pool, according to the session - * policy. - */ - session_percent?: number; - - /** - * Only the hash policy is supported for existing sessions (to avoid exponential - * decay). - */ - session_policy?: 'hash'; - } - - /** - * Filter pool and origin health notifications by resource type or health status. - * Use null to reset. - */ - export interface NotificationFilter { - /** - * Filter options for a particular resource type (pool or origin). Use null to - * reset. - */ - origin?: NotificationFilter.Origin | null; - - /** - * Filter options for a particular resource type (pool or origin). Use null to - * reset. - */ - pool?: NotificationFilter.Pool | null; - } - - export namespace NotificationFilter { - /** - * Filter options for a particular resource type (pool or origin). Use null to - * reset. - */ - export interface Origin { - /** - * If set true, disable notifications for this type of resource (pool or origin). - */ - disable?: boolean; - - /** - * If present, send notifications only for this health status (e.g. false for only - * DOWN events). Use null to reset (all events). - */ - healthy?: boolean | null; - } - - /** - * Filter options for a particular resource type (pool or origin). Use null to - * reset. - */ - export interface Pool { - /** - * If set true, disable notifications for this type of resource (pool or origin). - */ - disable?: boolean; - - /** - * If present, send notifications only for this health status (e.g. false for only - * DOWN events). Use null to reset (all events). - */ - healthy?: boolean | null; - } - } - - /** - * Configures origin steering for the pool. Controls how origins are selected for - * new sessions and traffic without session affinity. - */ - export interface OriginSteering { - /** - * The type of origin steering policy to use. - * - * - `"random"`: Select an origin randomly. - * - `"hash"`: Select an origin by computing a hash over the CF-Connecting-IP - * address. - * - `"least_outstanding_requests"`: Select an origin by taking into consideration - * origin weights, as well as each origin's number of outstanding requests. - * Origins with more pending requests are weighted proportionately less relative - * to others. - * - `"least_connections"`: Select an origin by taking into consideration origin - * weights, as well as each origin's number of open connections. Origins with - * more open connections are weighted proportionately less relative to others. - * Supported for HTTP/1 and HTTP/2 connections. - */ - policy?: 'random' | 'hash' | 'least_outstanding_requests' | 'least_connections'; - } + origin_steering?: LoadBalancersAPI.OriginSteering; } export interface PoolListParams { @@ -676,22 +322,7 @@ export interface PoolEditParams { * Body param: A list of regions from which to run health checks. Null means every * Cloudflare data center. */ - check_regions?: Array< - | 'WNAM' - | 'ENAM' - | 'WEU' - | 'EEU' - | 'NSAM' - | 'SSAM' - | 'OC' - | 'ME' - | 'NAF' - | 'SAF' - | 'SAS' - | 'SEAS' - | 'NEAS' - | 'ALL_REGIONS' - > | null; + check_regions?: Array | null; /** * Body param: A human-readable description of the pool. @@ -714,7 +345,7 @@ export interface PoolEditParams { /** * Body param: Configures load shedding policies and percentages for the pool. */ - load_shedding?: PoolEditParams.LoadShedding; + load_shedding?: LoadBalancersAPI.LoadShedding; /** * Body param: The longitude of the data center containing the origins used in this @@ -754,190 +385,20 @@ export interface PoolEditParams { * Body param: Filter pool and origin health notifications by resource type or * health status. Use null to reset. */ - notification_filter?: PoolEditParams.NotificationFilter | null; + notification_filter?: LoadBalancersAPI.NotificationFilter | null; /** * Body param: Configures origin steering for the pool. Controls how origins are * selected for new sessions and traffic without session affinity. */ - origin_steering?: PoolEditParams.OriginSteering; + origin_steering?: LoadBalancersAPI.OriginSteering; /** * Body param: The list of origins within this pool. Traffic directed at this pool * is balanced across all currently healthy origins, provided the pool itself is * healthy. */ - origins?: Array; -} - -export namespace PoolEditParams { - /** - * Configures load shedding policies and percentages for the pool. - */ - export interface LoadShedding { - /** - * The percent of traffic to shed from the pool, according to the default policy. - * Applies to new sessions and traffic without session affinity. - */ - default_percent?: number; - - /** - * The default policy to use when load shedding. A random policy randomly sheds a - * given percent of requests. A hash policy computes a hash over the - * CF-Connecting-IP address and sheds all requests originating from a percent of - * IPs. - */ - default_policy?: 'random' | 'hash'; - - /** - * The percent of existing sessions to shed from the pool, according to the session - * policy. - */ - session_percent?: number; - - /** - * Only the hash policy is supported for existing sessions (to avoid exponential - * decay). - */ - session_policy?: 'hash'; - } - - /** - * Filter pool and origin health notifications by resource type or health status. - * Use null to reset. - */ - export interface NotificationFilter { - /** - * Filter options for a particular resource type (pool or origin). Use null to - * reset. - */ - origin?: NotificationFilter.Origin | null; - - /** - * Filter options for a particular resource type (pool or origin). Use null to - * reset. - */ - pool?: NotificationFilter.Pool | null; - } - - export namespace NotificationFilter { - /** - * Filter options for a particular resource type (pool or origin). Use null to - * reset. - */ - export interface Origin { - /** - * If set true, disable notifications for this type of resource (pool or origin). - */ - disable?: boolean; - - /** - * If present, send notifications only for this health status (e.g. false for only - * DOWN events). Use null to reset (all events). - */ - healthy?: boolean | null; - } - - /** - * Filter options for a particular resource type (pool or origin). Use null to - * reset. - */ - export interface Pool { - /** - * If set true, disable notifications for this type of resource (pool or origin). - */ - disable?: boolean; - - /** - * If present, send notifications only for this health status (e.g. false for only - * DOWN events). Use null to reset (all events). - */ - healthy?: boolean | null; - } - } - - /** - * Configures origin steering for the pool. Controls how origins are selected for - * new sessions and traffic without session affinity. - */ - export interface OriginSteering { - /** - * The type of origin steering policy to use. - * - * - `"random"`: Select an origin randomly. - * - `"hash"`: Select an origin by computing a hash over the CF-Connecting-IP - * address. - * - `"least_outstanding_requests"`: Select an origin by taking into consideration - * origin weights, as well as each origin's number of outstanding requests. - * Origins with more pending requests are weighted proportionately less relative - * to others. - * - `"least_connections"`: Select an origin by taking into consideration origin - * weights, as well as each origin's number of open connections. Origins with - * more open connections are weighted proportionately less relative to others. - * Supported for HTTP/1 and HTTP/2 connections. - */ - policy?: 'random' | 'hash' | 'least_outstanding_requests' | 'least_connections'; - } - - export interface Origin { - /** - * The IP address (IPv4 or IPv6) of the origin, or its publicly addressable - * hostname. Hostnames entered here should resolve directly to the origin, and not - * be a hostname proxied by Cloudflare. To set an internal/reserved address, - * virtual_network_id must also be set. - */ - address?: string; - - /** - * Whether to enable (the default) this origin within the pool. Disabled origins - * will not receive traffic and are excluded from health checks. The origin will - * only be disabled for the current pool. - */ - enabled?: boolean; - - /** - * The request header is used to pass additional information with an HTTP request. - * Currently supported header is 'Host'. - */ - header?: Origin.Header; - - /** - * A human-identifiable name for the origin. - */ - name?: string; - - /** - * The virtual network subnet ID the origin belongs in. Virtual network must also - * belong to the account. - */ - virtual_network_id?: string; - - /** - * The weight of this origin relative to other origins in the pool. Based on the - * configured weight the total traffic is distributed among origins within the - * pool. - * - * - `origin_steering.policy="least_outstanding_requests"`: Use weight to scale the - * origin's outstanding requests. - * - `origin_steering.policy="least_connections"`: Use weight to scale the origin's - * open connections. - */ - weight?: number; - } - - export namespace Origin { - /** - * The request header is used to pass additional information with an HTTP request. - * Currently supported header is 'Host'. - */ - export interface Header { - /** - * The 'Host' header allows to override the hostname set in the HTTP request. - * Current support is 1 'Host' header override per origin. - */ - Host?: Array; - } - } + origins?: Array; } export interface PoolGetParams { diff --git a/src/resources/load-balancers/previews.ts b/src/resources/load-balancers/previews.ts index 63ff3c31b1..83bc40f7d0 100644 --- a/src/resources/load-balancers/previews.ts +++ b/src/resources/load-balancers/previews.ts @@ -13,13 +13,13 @@ export class Previews extends APIResource { previewId: string, params: PreviewGetParams, options?: Core.RequestOptions, - ): Core.APIPromise { + ): Core.APIPromise { const { account_id } = params; return ( this._client.get( `/accounts/${account_id}/load_balancers/preview/${previewId}`, options, - ) as Core.APIPromise<{ result: PreviewAPI.LoadBalancingPreview }> + ) as Core.APIPromise<{ result: PreviewAPI.Preview }> )._thenUnwrap((obj) => obj.result); } } diff --git a/src/resources/logpush/datasets/datasets.ts b/src/resources/logpush/datasets/datasets.ts index 4bdbecdaae..b54c16cb64 100644 --- a/src/resources/logpush/datasets/datasets.ts +++ b/src/resources/logpush/datasets/datasets.ts @@ -14,7 +14,8 @@ export namespace Datasets { export import FieldGetResponse = FieldsAPI.FieldGetResponse; export import FieldGetParams = FieldsAPI.FieldGetParams; export import Jobs = JobsAPI.Jobs; - export import LogpushJob = JobsAPI.LogpushJob; + export import Job = JobsAPI.Job; + export import OutputOptions = JobsAPI.OutputOptions; export import JobGetResponse = JobsAPI.JobGetResponse; export import JobGetParams = JobsAPI.JobGetParams; } diff --git a/src/resources/logpush/datasets/index.ts b/src/resources/logpush/datasets/index.ts index f051e14d58..9906285cd1 100644 --- a/src/resources/logpush/datasets/index.ts +++ b/src/resources/logpush/datasets/index.ts @@ -2,4 +2,4 @@ export { Datasets } from './datasets'; export { FieldGetResponse, FieldGetParams, Fields } from './fields'; -export { LogpushJob, JobGetResponse, JobGetParams, LogpushJobsSinglePage, Jobs } from './jobs'; +export { Job, OutputOptions, JobGetResponse, JobGetParams, JobsSinglePage, Jobs } from './jobs'; diff --git a/src/resources/logpush/datasets/jobs.ts b/src/resources/logpush/datasets/jobs.ts index 26ed1fe67e..9e6c246086 100644 --- a/src/resources/logpush/datasets/jobs.ts +++ b/src/resources/logpush/datasets/jobs.ts @@ -51,9 +51,9 @@ export class Jobs extends APIResource { } } -export class LogpushJobsSinglePage extends SinglePage {} +export class JobsSinglePage extends SinglePage {} -export interface LogpushJob { +export interface Job { /** * Unique id of the job. */ @@ -126,88 +126,86 @@ export interface LogpushJob { * The structured replacement for `logpull_options`. When including this field, the * `logpull_option` field will be ignored. */ - output_options?: LogpushJob.OutputOptions | null; + output_options?: OutputOptions | null; } -export namespace LogpushJob { +/** + * The structured replacement for `logpull_options`. When including this field, the + * `logpull_option` field will be ignored. + */ +export interface OutputOptions { /** - * The structured replacement for `logpull_options`. When including this field, the - * `logpull_option` field will be ignored. + * String to be prepended before each batch. */ - export interface OutputOptions { - /** - * String to be prepended before each batch. - */ - batch_prefix?: string | null; - - /** - * String to be appended after each batch. - */ - batch_suffix?: string | null; - - /** - * If set to true, will cause all occurrences of `${` in the generated files to be - * replaced with `x{`. - */ - 'CVE-2021-4428'?: boolean | null; - - /** - * String to join fields. This field be ignored when `record_template` is set. - */ - field_delimiter?: string | null; - - /** - * List of field names to be included in the Logpush output. For the moment, there - * is no option to add all fields at once, so you must specify all the fields names - * you are interested in. - */ - field_names?: Array; - - /** - * Specifies the output type, such as `ndjson` or `csv`. This sets default values - * for the rest of the settings, depending on the chosen output type. Some - * formatting rules, like string quoting, are different between output types. - */ - output_type?: 'ndjson' | 'csv'; - - /** - * String to be inserted in-between the records as separator. - */ - record_delimiter?: string | null; - - /** - * String to be prepended before each record. - */ - record_prefix?: string | null; - - /** - * String to be appended after each record. - */ - record_suffix?: string | null; - - /** - * String to use as template for each record instead of the default comma-separated - * list. All fields used in the template must be present in `field_names` as well, - * otherwise they will end up as null. Format as a Go `text/template` without any - * standard functions, like conditionals, loops, sub-templates, etc. - */ - record_template?: string | null; - - /** - * Floating number to specify sampling rate. Sampling is applied on top of - * filtering, and regardless of the current `sample_interval` of the data. - */ - sample_rate?: number | null; - - /** - * String to specify the format for timestamps, such as `unixnano`, `unix`, or - * `rfc3339`. - */ - timestamp_format?: 'unixnano' | 'unix' | 'rfc3339'; - } + batch_prefix?: string | null; + + /** + * String to be appended after each batch. + */ + batch_suffix?: string | null; + + /** + * If set to true, will cause all occurrences of `${` in the generated files to be + * replaced with `x{`. + */ + 'CVE-2021-4428'?: boolean | null; + + /** + * String to join fields. This field be ignored when `record_template` is set. + */ + field_delimiter?: string | null; + + /** + * List of field names to be included in the Logpush output. For the moment, there + * is no option to add all fields at once, so you must specify all the fields names + * you are interested in. + */ + field_names?: Array; + + /** + * Specifies the output type, such as `ndjson` or `csv`. This sets default values + * for the rest of the settings, depending on the chosen output type. Some + * formatting rules, like string quoting, are different between output types. + */ + output_type?: 'ndjson' | 'csv'; + + /** + * String to be inserted in-between the records as separator. + */ + record_delimiter?: string | null; + + /** + * String to be prepended before each record. + */ + record_prefix?: string | null; + + /** + * String to be appended after each record. + */ + record_suffix?: string | null; + + /** + * String to use as template for each record instead of the default comma-separated + * list. All fields used in the template must be present in `field_names` as well, + * otherwise they will end up as null. Format as a Go `text/template` without any + * standard functions, like conditionals, loops, sub-templates, etc. + */ + record_template?: string | null; + + /** + * Floating number to specify sampling rate. Sampling is applied on top of + * filtering, and regardless of the current `sample_interval` of the data. + */ + sample_rate?: number | null; + + /** + * String to specify the format for timestamps, such as `unixnano`, `unix`, or + * `rfc3339`. + */ + timestamp_format?: 'unixnano' | 'unix' | 'rfc3339'; } -export type JobGetResponse = Array; +export type JobGetResponse = Array; export interface JobGetParams { /** @@ -222,7 +220,8 @@ export interface JobGetParams { } export namespace Jobs { - export import LogpushJob = JobsAPI.LogpushJob; + export import Job = JobsAPI.Job; + export import OutputOptions = JobsAPI.OutputOptions; export import JobGetResponse = JobsAPI.JobGetResponse; export import JobGetParams = JobsAPI.JobGetParams; } diff --git a/src/resources/logpush/jobs.ts b/src/resources/logpush/jobs.ts index 155d4c3f60..0d2306a1b4 100644 --- a/src/resources/logpush/jobs.ts +++ b/src/resources/logpush/jobs.ts @@ -7,7 +7,7 @@ import { CloudflareError } from 'cloudflare/error'; import * as JobsAPI from 'cloudflare/resources/logpush/jobs'; import * as Shared from 'cloudflare/resources/shared'; import * as DatasetsJobsAPI from 'cloudflare/resources/logpush/datasets/jobs'; -import { LogpushJobsSinglePage } from 'cloudflare/resources/logpush/datasets/jobs'; +import { JobsSinglePage } from 'cloudflare/resources/logpush/datasets/jobs'; export class Jobs extends APIResource { /** @@ -16,7 +16,7 @@ export class Jobs extends APIResource { create( params: JobCreateParams, options?: Core.RequestOptions, - ): Core.APIPromise { + ): Core.APIPromise { const { account_id, zone_id, ...body } = params; if (!account_id && !zone_id) { throw new CloudflareError('You must provide either account_id or zone_id.'); @@ -38,7 +38,7 @@ export class Jobs extends APIResource { this._client.post(`/${accountOrZone}/${accountOrZoneId}/logpush/jobs`, { body, ...options, - }) as Core.APIPromise<{ result: DatasetsJobsAPI.LogpushJob | null }> + }) as Core.APIPromise<{ result: DatasetsJobsAPI.Job | null }> )._thenUnwrap((obj) => obj.result); } @@ -49,7 +49,7 @@ export class Jobs extends APIResource { jobId: number, params: JobUpdateParams, options?: Core.RequestOptions, - ): Core.APIPromise { + ): Core.APIPromise { const { account_id, zone_id, ...body } = params; if (!account_id && !zone_id) { throw new CloudflareError('You must provide either account_id or zone_id.'); @@ -71,7 +71,7 @@ export class Jobs extends APIResource { this._client.put(`/${accountOrZone}/${accountOrZoneId}/logpush/jobs/${jobId}`, { body, ...options, - }) as Core.APIPromise<{ result: DatasetsJobsAPI.LogpushJob | null }> + }) as Core.APIPromise<{ result: DatasetsJobsAPI.Job | null }> )._thenUnwrap((obj) => obj.result); } @@ -81,14 +81,12 @@ export class Jobs extends APIResource { list( params?: JobListParams, options?: Core.RequestOptions, - ): Core.PagePromise; - list( - options?: Core.RequestOptions, - ): Core.PagePromise; + ): Core.PagePromise; + list(options?: Core.RequestOptions): Core.PagePromise; list( params: JobListParams | Core.RequestOptions = {}, options?: Core.RequestOptions, - ): Core.PagePromise { + ): Core.PagePromise { if (isRequestOptions(params)) { return this.list({}, params); } @@ -111,7 +109,7 @@ export class Jobs extends APIResource { }; return this._client.getAPIList( `/${accountOrZone}/${accountOrZoneId}/logpush/jobs`, - LogpushJobsSinglePage, + JobsSinglePage, options, ); } @@ -156,13 +154,13 @@ export class Jobs extends APIResource { jobId: number, params?: JobGetParams, options?: Core.RequestOptions, - ): Core.APIPromise; - get(jobId: number, options?: Core.RequestOptions): Core.APIPromise; + ): Core.APIPromise; + get(jobId: number, options?: Core.RequestOptions): Core.APIPromise; get( jobId: number, params: JobGetParams | Core.RequestOptions = {}, options?: Core.RequestOptions, - ): Core.APIPromise { + ): Core.APIPromise { if (isRequestOptions(params)) { return this.get(jobId, {}, params); } @@ -187,7 +185,7 @@ export class Jobs extends APIResource { this._client.get( `/${accountOrZone}/${accountOrZoneId}/logpush/jobs/${jobId}`, options, - ) as Core.APIPromise<{ result: DatasetsJobsAPI.LogpushJob | null }> + ) as Core.APIPromise<{ result: DatasetsJobsAPI.Job | null }> )._thenUnwrap((obj) => obj.result); } } @@ -265,85 +263,7 @@ export interface UnnamedSchemaRef2f2e9d7fbcc0e6856257a03a1dbbdfb5 { * The structured replacement for `logpull_options`. When including this field, the * `logpull_option` field will be ignored. */ - output_options?: UnnamedSchemaRef2f2e9d7fbcc0e6856257a03a1dbbdfb5.OutputOptions | null; -} - -export namespace UnnamedSchemaRef2f2e9d7fbcc0e6856257a03a1dbbdfb5 { - /** - * The structured replacement for `logpull_options`. When including this field, the - * `logpull_option` field will be ignored. - */ - export interface OutputOptions { - /** - * String to be prepended before each batch. - */ - batch_prefix?: string | null; - - /** - * String to be appended after each batch. - */ - batch_suffix?: string | null; - - /** - * If set to true, will cause all occurrences of `${` in the generated files to be - * replaced with `x{`. - */ - 'CVE-2021-4428'?: boolean | null; - - /** - * String to join fields. This field be ignored when `record_template` is set. - */ - field_delimiter?: string | null; - - /** - * List of field names to be included in the Logpush output. For the moment, there - * is no option to add all fields at once, so you must specify all the fields names - * you are interested in. - */ - field_names?: Array; - - /** - * Specifies the output type, such as `ndjson` or `csv`. This sets default values - * for the rest of the settings, depending on the chosen output type. Some - * formatting rules, like string quoting, are different between output types. - */ - output_type?: 'ndjson' | 'csv'; - - /** - * String to be inserted in-between the records as separator. - */ - record_delimiter?: string | null; - - /** - * String to be prepended before each record. - */ - record_prefix?: string | null; - - /** - * String to be appended after each record. - */ - record_suffix?: string | null; - - /** - * String to use as template for each record instead of the default comma-separated - * list. All fields used in the template must be present in `field_names` as well, - * otherwise they will end up as null. Format as a Go `text/template` without any - * standard functions, like conditionals, loops, sub-templates, etc. - */ - record_template?: string | null; - - /** - * Floating number to specify sampling rate. Sampling is applied on top of - * filtering, and regardless of the current `sample_interval` of the data. - */ - sample_rate?: number | null; - - /** - * String to specify the format for timestamps, such as `unixnano`, `unix`, or - * `rfc3339`. - */ - timestamp_format?: 'unixnano' | 'unix' | 'rfc3339'; - } + output_options?: DatasetsJobsAPI.OutputOptions | null; } export interface JobCreateParams { @@ -404,7 +324,7 @@ export interface JobCreateParams { * Body param: The structured replacement for `logpull_options`. When including * this field, the `logpull_option` field will be ignored. */ - output_options?: JobCreateParams.OutputOptions | null; + output_options?: DatasetsJobsAPI.OutputOptions | null; /** * Body param: Ownership challenge token to prove destination ownership. @@ -412,84 +332,6 @@ export interface JobCreateParams { ownership_challenge?: string; } -export namespace JobCreateParams { - /** - * The structured replacement for `logpull_options`. When including this field, the - * `logpull_option` field will be ignored. - */ - export interface OutputOptions { - /** - * String to be prepended before each batch. - */ - batch_prefix?: string | null; - - /** - * String to be appended after each batch. - */ - batch_suffix?: string | null; - - /** - * If set to true, will cause all occurrences of `${` in the generated files to be - * replaced with `x{`. - */ - 'CVE-2021-4428'?: boolean | null; - - /** - * String to join fields. This field be ignored when `record_template` is set. - */ - field_delimiter?: string | null; - - /** - * List of field names to be included in the Logpush output. For the moment, there - * is no option to add all fields at once, so you must specify all the fields names - * you are interested in. - */ - field_names?: Array; - - /** - * Specifies the output type, such as `ndjson` or `csv`. This sets default values - * for the rest of the settings, depending on the chosen output type. Some - * formatting rules, like string quoting, are different between output types. - */ - output_type?: 'ndjson' | 'csv'; - - /** - * String to be inserted in-between the records as separator. - */ - record_delimiter?: string | null; - - /** - * String to be prepended before each record. - */ - record_prefix?: string | null; - - /** - * String to be appended after each record. - */ - record_suffix?: string | null; - - /** - * String to use as template for each record instead of the default comma-separated - * list. All fields used in the template must be present in `field_names` as well, - * otherwise they will end up as null. Format as a Go `text/template` without any - * standard functions, like conditionals, loops, sub-templates, etc. - */ - record_template?: string | null; - - /** - * Floating number to specify sampling rate. Sampling is applied on top of - * filtering, and regardless of the current `sample_interval` of the data. - */ - sample_rate?: number | null; - - /** - * String to specify the format for timestamps, such as `unixnano`, `unix`, or - * `rfc3339`. - */ - timestamp_format?: 'unixnano' | 'unix' | 'rfc3339'; - } -} - export interface JobUpdateParams { /** * Path param: The Account ID to use for this endpoint. Mutually exclusive with the @@ -536,7 +378,7 @@ export interface JobUpdateParams { * Body param: The structured replacement for `logpull_options`. When including * this field, the `logpull_option` field will be ignored. */ - output_options?: JobUpdateParams.OutputOptions | null; + output_options?: DatasetsJobsAPI.OutputOptions | null; /** * Body param: Ownership challenge token to prove destination ownership. @@ -544,84 +386,6 @@ export interface JobUpdateParams { ownership_challenge?: string; } -export namespace JobUpdateParams { - /** - * The structured replacement for `logpull_options`. When including this field, the - * `logpull_option` field will be ignored. - */ - export interface OutputOptions { - /** - * String to be prepended before each batch. - */ - batch_prefix?: string | null; - - /** - * String to be appended after each batch. - */ - batch_suffix?: string | null; - - /** - * If set to true, will cause all occurrences of `${` in the generated files to be - * replaced with `x{`. - */ - 'CVE-2021-4428'?: boolean | null; - - /** - * String to join fields. This field be ignored when `record_template` is set. - */ - field_delimiter?: string | null; - - /** - * List of field names to be included in the Logpush output. For the moment, there - * is no option to add all fields at once, so you must specify all the fields names - * you are interested in. - */ - field_names?: Array; - - /** - * Specifies the output type, such as `ndjson` or `csv`. This sets default values - * for the rest of the settings, depending on the chosen output type. Some - * formatting rules, like string quoting, are different between output types. - */ - output_type?: 'ndjson' | 'csv'; - - /** - * String to be inserted in-between the records as separator. - */ - record_delimiter?: string | null; - - /** - * String to be prepended before each record. - */ - record_prefix?: string | null; - - /** - * String to be appended after each record. - */ - record_suffix?: string | null; - - /** - * String to use as template for each record instead of the default comma-separated - * list. All fields used in the template must be present in `field_names` as well, - * otherwise they will end up as null. Format as a Go `text/template` without any - * standard functions, like conditionals, loops, sub-templates, etc. - */ - record_template?: string | null; - - /** - * Floating number to specify sampling rate. Sampling is applied on top of - * filtering, and regardless of the current `sample_interval` of the data. - */ - sample_rate?: number | null; - - /** - * String to specify the format for timestamps, such as `unixnano`, `unix`, or - * `rfc3339`. - */ - timestamp_format?: 'unixnano' | 'unix' | 'rfc3339'; - } -} - export interface JobListParams { /** * The Account ID to use for this endpoint. Mutually exclusive with the Zone ID. @@ -674,4 +438,4 @@ export namespace Jobs { export import JobGetParams = JobsAPI.JobGetParams; } -export { LogpushJobsSinglePage }; +export { JobsSinglePage }; diff --git a/src/resources/magic-network-monitoring/configs/configs.ts b/src/resources/magic-network-monitoring/configs/configs.ts index 08f0d3feae..7503dfd51f 100644 --- a/src/resources/magic-network-monitoring/configs/configs.ts +++ b/src/resources/magic-network-monitoring/configs/configs.ts @@ -11,14 +11,11 @@ export class Configs extends APIResource { /** * Create a new network monitoring configuration. */ - create( - params: ConfigCreateParams, - options?: Core.RequestOptions, - ): Core.APIPromise { + create(params: ConfigCreateParams, options?: Core.RequestOptions): Core.APIPromise { const { account_id, body } = params; return ( this._client.post(`/accounts/${account_id}/mnm/config`, { body: body, ...options }) as Core.APIPromise<{ - result: MagicNetworkMonitoringConfig; + result: Configuration; }> )._thenUnwrap((obj) => obj.result); } @@ -27,14 +24,11 @@ export class Configs extends APIResource { * Update an existing network monitoring configuration, requires the entire * configuration to be updated at once. */ - update( - params: ConfigUpdateParams, - options?: Core.RequestOptions, - ): Core.APIPromise { + update(params: ConfigUpdateParams, options?: Core.RequestOptions): Core.APIPromise { const { account_id, body } = params; return ( this._client.put(`/accounts/${account_id}/mnm/config`, { body: body, ...options }) as Core.APIPromise<{ - result: MagicNetworkMonitoringConfig; + result: Configuration; }> )._thenUnwrap((obj) => obj.result); } @@ -42,49 +36,43 @@ export class Configs extends APIResource { /** * Delete an existing network monitoring configuration. */ - delete( - params: ConfigDeleteParams, - options?: Core.RequestOptions, - ): Core.APIPromise { + delete(params: ConfigDeleteParams, options?: Core.RequestOptions): Core.APIPromise { const { account_id, body } = params; return ( this._client.delete(`/accounts/${account_id}/mnm/config`, { body: body, ...options, - }) as Core.APIPromise<{ result: MagicNetworkMonitoringConfig }> + }) as Core.APIPromise<{ result: Configuration }> )._thenUnwrap((obj) => obj.result); } /** * Update fields in an existing network monitoring configuration. */ - edit( - params: ConfigEditParams, - options?: Core.RequestOptions, - ): Core.APIPromise { + edit(params: ConfigEditParams, options?: Core.RequestOptions): Core.APIPromise { const { account_id, body } = params; return ( this._client.patch(`/accounts/${account_id}/mnm/config`, { body: body, ...options, - }) as Core.APIPromise<{ result: MagicNetworkMonitoringConfig }> + }) as Core.APIPromise<{ result: Configuration }> )._thenUnwrap((obj) => obj.result); } /** * Lists default sampling and router IPs for account. */ - get(params: ConfigGetParams, options?: Core.RequestOptions): Core.APIPromise { + get(params: ConfigGetParams, options?: Core.RequestOptions): Core.APIPromise { const { account_id } = params; return ( this._client.get(`/accounts/${account_id}/mnm/config`, options) as Core.APIPromise<{ - result: MagicNetworkMonitoringConfig; + result: Configuration; }> )._thenUnwrap((obj) => obj.result); } } -export interface MagicNetworkMonitoringConfig { +export interface Configuration { /** * Fallback sampling rate of flow messages being sent in packets per second. This * should match the packet sampling rate configured on the router. @@ -167,7 +155,7 @@ export interface ConfigGetParams { } export namespace Configs { - export import MagicNetworkMonitoringConfig = ConfigsAPI.MagicNetworkMonitoringConfig; + export import Configuration = ConfigsAPI.Configuration; export import UnnamedSchemaRef621ca3f6ea9a96427c902b0d14279ff8 = ConfigsAPI.UnnamedSchemaRef621ca3f6ea9a96427c902b0d14279ff8; export import ConfigCreateParams = ConfigsAPI.ConfigCreateParams; export import ConfigUpdateParams = ConfigsAPI.ConfigUpdateParams; diff --git a/src/resources/magic-network-monitoring/configs/full.ts b/src/resources/magic-network-monitoring/configs/full.ts index 08ac4d2c9c..493ec68121 100644 --- a/src/resources/magic-network-monitoring/configs/full.ts +++ b/src/resources/magic-network-monitoring/configs/full.ts @@ -9,14 +9,11 @@ export class Full extends APIResource { /** * Lists default sampling, router IPs, and rules for account. */ - get( - params: FullGetParams, - options?: Core.RequestOptions, - ): Core.APIPromise { + get(params: FullGetParams, options?: Core.RequestOptions): Core.APIPromise { const { account_id } = params; return ( this._client.get(`/accounts/${account_id}/mnm/config/full`, options) as Core.APIPromise<{ - result: ConfigsAPI.MagicNetworkMonitoringConfig; + result: ConfigsAPI.Configuration; }> )._thenUnwrap((obj) => obj.result); } diff --git a/src/resources/magic-network-monitoring/configs/index.ts b/src/resources/magic-network-monitoring/configs/index.ts index dba61555b6..7371bcc681 100644 --- a/src/resources/magic-network-monitoring/configs/index.ts +++ b/src/resources/magic-network-monitoring/configs/index.ts @@ -1,8 +1,7 @@ // File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. -export { FullGetParams, Full } from './full'; export { - MagicNetworkMonitoringConfig, + Configuration, UnnamedSchemaRef621ca3f6ea9a96427c902b0d14279ff8, ConfigCreateParams, ConfigUpdateParams, @@ -11,3 +10,4 @@ export { ConfigGetParams, Configs, } from './configs'; +export { FullGetParams, Full } from './full'; diff --git a/src/resources/magic-network-monitoring/index.ts b/src/resources/magic-network-monitoring/index.ts index dc4d3556d6..2b34eae0db 100644 --- a/src/resources/magic-network-monitoring/index.ts +++ b/src/resources/magic-network-monitoring/index.ts @@ -1,8 +1,7 @@ // File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. -export { MagicNetworkMonitoring } from './magic-network-monitoring'; export { - MagicNetworkMonitoringConfig, + Configuration, UnnamedSchemaRef621ca3f6ea9a96427c902b0d14279ff8, ConfigCreateParams, ConfigUpdateParams, @@ -11,8 +10,9 @@ export { ConfigGetParams, Configs, } from './configs/index'; +export { MagicNetworkMonitoring } from './magic-network-monitoring'; export { - MagicNetworkMonitoringRule, + Rule, UnnamedSchemaRef99ba74ba6027c3c87ca03d4e81cfc16d, RuleCreateParams, RuleUpdateParams, @@ -20,6 +20,6 @@ export { RuleDeleteParams, RuleEditParams, RuleGetParams, - MagicNetworkMonitoringRulesSinglePage, + RulesSinglePage, Rules, } from './rules/index'; diff --git a/src/resources/magic-network-monitoring/magic-network-monitoring.ts b/src/resources/magic-network-monitoring/magic-network-monitoring.ts index 1f67a4a6ec..45320524bb 100644 --- a/src/resources/magic-network-monitoring/magic-network-monitoring.ts +++ b/src/resources/magic-network-monitoring/magic-network-monitoring.ts @@ -11,7 +11,7 @@ export class MagicNetworkMonitoring extends APIResource { export namespace MagicNetworkMonitoring { export import Configs = ConfigsAPI.Configs; - export import MagicNetworkMonitoringConfig = ConfigsAPI.MagicNetworkMonitoringConfig; + export import Configuration = ConfigsAPI.Configuration; export import UnnamedSchemaRef621ca3f6ea9a96427c902b0d14279ff8 = ConfigsAPI.UnnamedSchemaRef621ca3f6ea9a96427c902b0d14279ff8; export import ConfigCreateParams = ConfigsAPI.ConfigCreateParams; export import ConfigUpdateParams = ConfigsAPI.ConfigUpdateParams; @@ -19,9 +19,9 @@ export namespace MagicNetworkMonitoring { export import ConfigEditParams = ConfigsAPI.ConfigEditParams; export import ConfigGetParams = ConfigsAPI.ConfigGetParams; export import Rules = RulesAPI.Rules; - export import MagicNetworkMonitoringRule = RulesAPI.MagicNetworkMonitoringRule; + export import Rule = RulesAPI.Rule; export import UnnamedSchemaRef99ba74ba6027c3c87ca03d4e81cfc16d = RulesAPI.UnnamedSchemaRef99ba74ba6027c3c87ca03d4e81cfc16d; - export import MagicNetworkMonitoringRulesSinglePage = RulesAPI.MagicNetworkMonitoringRulesSinglePage; + export import RulesSinglePage = RulesAPI.RulesSinglePage; export import RuleCreateParams = RulesAPI.RuleCreateParams; export import RuleUpdateParams = RulesAPI.RuleUpdateParams; export import RuleListParams = RulesAPI.RuleListParams; diff --git a/src/resources/magic-network-monitoring/rules/advertisements.ts b/src/resources/magic-network-monitoring/rules/advertisements.ts index 722dc9df45..62cd5ab886 100644 --- a/src/resources/magic-network-monitoring/rules/advertisements.ts +++ b/src/resources/magic-network-monitoring/rules/advertisements.ts @@ -12,18 +12,18 @@ export class Advertisements extends APIResource { ruleId: string, params: AdvertisementEditParams, options?: Core.RequestOptions, - ): Core.APIPromise { + ): Core.APIPromise { const { account_id, body } = params; return ( this._client.patch(`/accounts/${account_id}/mnm/rules/${ruleId}/advertisement`, { body: body, ...options, - }) as Core.APIPromise<{ result: MagicNetworkMonitoringRuleAdvertisable | null }> + }) as Core.APIPromise<{ result: Advertisement | null }> )._thenUnwrap((obj) => obj.result); } } -export interface MagicNetworkMonitoringRuleAdvertisable { +export interface Advertisement { /** * Toggle on if you would like Cloudflare to automatically advertise the IP * Prefixes within the rule via Magic Transit when the rule is triggered. Only @@ -45,6 +45,6 @@ export interface AdvertisementEditParams { } export namespace Advertisements { - export import MagicNetworkMonitoringRuleAdvertisable = AdvertisementsAPI.MagicNetworkMonitoringRuleAdvertisable; + export import Advertisement = AdvertisementsAPI.Advertisement; export import AdvertisementEditParams = AdvertisementsAPI.AdvertisementEditParams; } diff --git a/src/resources/magic-network-monitoring/rules/index.ts b/src/resources/magic-network-monitoring/rules/index.ts index 96f1eda86b..9049110d4b 100644 --- a/src/resources/magic-network-monitoring/rules/index.ts +++ b/src/resources/magic-network-monitoring/rules/index.ts @@ -1,7 +1,8 @@ // File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. +export { Advertisement, AdvertisementEditParams, Advertisements } from './advertisements'; export { - MagicNetworkMonitoringRule, + Rule, UnnamedSchemaRef99ba74ba6027c3c87ca03d4e81cfc16d, RuleCreateParams, RuleUpdateParams, @@ -9,11 +10,6 @@ export { RuleDeleteParams, RuleEditParams, RuleGetParams, - MagicNetworkMonitoringRulesSinglePage, + RulesSinglePage, Rules, } from './rules'; -export { - MagicNetworkMonitoringRuleAdvertisable, - AdvertisementEditParams, - Advertisements, -} from './advertisements'; diff --git a/src/resources/magic-network-monitoring/rules/rules.ts b/src/resources/magic-network-monitoring/rules/rules.ts index ec5c42f267..a45100a824 100644 --- a/src/resources/magic-network-monitoring/rules/rules.ts +++ b/src/resources/magic-network-monitoring/rules/rules.ts @@ -13,14 +13,11 @@ export class Rules extends APIResource { * Create network monitoring rules for account. Currently only supports creating a * single rule per API request. */ - create( - params: RuleCreateParams, - options?: Core.RequestOptions, - ): Core.APIPromise { + create(params: RuleCreateParams, options?: Core.RequestOptions): Core.APIPromise { const { account_id, body } = params; return ( this._client.post(`/accounts/${account_id}/mnm/rules`, { body: body, ...options }) as Core.APIPromise<{ - result: MagicNetworkMonitoringRule | null; + result: Rule | null; }> )._thenUnwrap((obj) => obj.result); } @@ -28,14 +25,11 @@ export class Rules extends APIResource { /** * Update network monitoring rules for account. */ - update( - params: RuleUpdateParams, - options?: Core.RequestOptions, - ): Core.APIPromise { + update(params: RuleUpdateParams, options?: Core.RequestOptions): Core.APIPromise { const { account_id, body } = params; return ( this._client.put(`/accounts/${account_id}/mnm/rules`, { body: body, ...options }) as Core.APIPromise<{ - result: MagicNetworkMonitoringRule | null; + result: Rule | null; }> )._thenUnwrap((obj) => obj.result); } @@ -46,13 +40,9 @@ export class Rules extends APIResource { list( params: RuleListParams, options?: Core.RequestOptions, - ): Core.PagePromise { + ): Core.PagePromise { const { account_id } = params; - return this._client.getAPIList( - `/accounts/${account_id}/mnm/rules`, - MagicNetworkMonitoringRulesSinglePage, - options, - ); + return this._client.getAPIList(`/accounts/${account_id}/mnm/rules`, RulesSinglePage, options); } /** @@ -62,53 +52,45 @@ export class Rules extends APIResource { ruleId: string, params: RuleDeleteParams, options?: Core.RequestOptions, - ): Core.APIPromise { + ): Core.APIPromise { const { account_id, body } = params; return ( this._client.delete(`/accounts/${account_id}/mnm/rules/${ruleId}`, { body: body, ...options, - }) as Core.APIPromise<{ result: MagicNetworkMonitoringRule | null }> + }) as Core.APIPromise<{ result: Rule | null }> )._thenUnwrap((obj) => obj.result); } /** * Update a network monitoring rule for account. */ - edit( - ruleId: string, - params: RuleEditParams, - options?: Core.RequestOptions, - ): Core.APIPromise { + edit(ruleId: string, params: RuleEditParams, options?: Core.RequestOptions): Core.APIPromise { const { account_id, body } = params; return ( this._client.patch(`/accounts/${account_id}/mnm/rules/${ruleId}`, { body: body, ...options, - }) as Core.APIPromise<{ result: MagicNetworkMonitoringRule | null }> + }) as Core.APIPromise<{ result: Rule | null }> )._thenUnwrap((obj) => obj.result); } /** * List a single network monitoring rule for account. */ - get( - ruleId: string, - params: RuleGetParams, - options?: Core.RequestOptions, - ): Core.APIPromise { + get(ruleId: string, params: RuleGetParams, options?: Core.RequestOptions): Core.APIPromise { const { account_id } = params; return ( this._client.get(`/accounts/${account_id}/mnm/rules/${ruleId}`, options) as Core.APIPromise<{ - result: MagicNetworkMonitoringRule | null; + result: Rule | null; }> )._thenUnwrap((obj) => obj.result); } } -export class MagicNetworkMonitoringRulesSinglePage extends SinglePage {} +export class RulesSinglePage extends SinglePage {} -export interface MagicNetworkMonitoringRule { +export interface Rule { /** * Toggle on if you would like Cloudflare to automatically advertise the IP * Prefixes within the rule via Magic Transit when the rule is triggered. Only @@ -247,9 +229,9 @@ export interface RuleGetParams { } export namespace Rules { - export import MagicNetworkMonitoringRule = RulesAPI.MagicNetworkMonitoringRule; + export import Rule = RulesAPI.Rule; export import UnnamedSchemaRef99ba74ba6027c3c87ca03d4e81cfc16d = RulesAPI.UnnamedSchemaRef99ba74ba6027c3c87ca03d4e81cfc16d; - export import MagicNetworkMonitoringRulesSinglePage = RulesAPI.MagicNetworkMonitoringRulesSinglePage; + export import RulesSinglePage = RulesAPI.RulesSinglePage; export import RuleCreateParams = RulesAPI.RuleCreateParams; export import RuleUpdateParams = RulesAPI.RuleUpdateParams; export import RuleListParams = RulesAPI.RuleListParams; @@ -257,6 +239,6 @@ export namespace Rules { export import RuleEditParams = RulesAPI.RuleEditParams; export import RuleGetParams = RulesAPI.RuleGetParams; export import Advertisements = AdvertisementsAPI.Advertisements; - export import MagicNetworkMonitoringRuleAdvertisable = AdvertisementsAPI.MagicNetworkMonitoringRuleAdvertisable; + export import Advertisement = AdvertisementsAPI.Advertisement; export import AdvertisementEditParams = AdvertisementsAPI.AdvertisementEditParams; } diff --git a/src/resources/magic-transit/gre-tunnels.ts b/src/resources/magic-transit/gre-tunnels.ts index 5bb88c0c2f..52d5567661 100644 --- a/src/resources/magic-transit/gre-tunnels.ts +++ b/src/resources/magic-transit/gre-tunnels.ts @@ -133,7 +133,7 @@ export namespace GRETunnelCreateResponse { */ description?: string; - health_check?: GRETunnel.HealthCheck; + health_check?: MagicTransitAPI.HealthCheck; /** * The date and time the tunnel was last modified. @@ -151,44 +151,6 @@ export namespace GRETunnelCreateResponse { */ ttl?: number; } - - export namespace GRETunnel { - export interface HealthCheck { - /** - * The direction of the flow of the healthcheck. Either unidirectional, where the - * probe comes to you via the tunnel and the result comes back to Cloudflare via - * the open Internet, or bidirectional where both the probe and result come and go - * via the tunnel. Note in the case of bidirecitonal healthchecks, the target field - * in health_check is ignored as the interface_address is used to send traffic into - * the tunnel. - */ - direction?: 'unidirectional' | 'bidirectional'; - - /** - * Determines whether to run healthchecks for a tunnel. - */ - enabled?: boolean; - - /** - * How frequent the health check is run. The default value is `mid`. - */ - rate?: MagicTransitAPI.UnnamedSchemaRefEebdc868ce7f7ae92e23438caa84e7b5; - - /** - * The destination address in a request type health check. After the healthcheck is - * decapsulated at the customer end of the tunnel, the ICMP echo will be forwarded - * to this address. This field defaults to `customer_gre_endpoint address`. This - * field is ignored for bidirectional healthchecks as the interface_address (not - * assigned to the Cloudflare side of the tunnel) is used as the target. - */ - target?: string; - - /** - * The type of healthcheck to run, reply or request. The default value is `reply`. - */ - type?: MagicTransitAPI.UnnamedSchemaRef3b1a76a5e4a139b72ed7d93834773d39; - } - } } export interface GRETunnelUpdateResponse { @@ -241,7 +203,7 @@ export namespace GRETunnelListResponse { */ description?: string; - health_check?: GRETunnel.HealthCheck; + health_check?: MagicTransitAPI.HealthCheck; /** * The date and time the tunnel was last modified. @@ -259,44 +221,6 @@ export namespace GRETunnelListResponse { */ ttl?: number; } - - export namespace GRETunnel { - export interface HealthCheck { - /** - * The direction of the flow of the healthcheck. Either unidirectional, where the - * probe comes to you via the tunnel and the result comes back to Cloudflare via - * the open Internet, or bidirectional where both the probe and result come and go - * via the tunnel. Note in the case of bidirecitonal healthchecks, the target field - * in health_check is ignored as the interface_address is used to send traffic into - * the tunnel. - */ - direction?: 'unidirectional' | 'bidirectional'; - - /** - * Determines whether to run healthchecks for a tunnel. - */ - enabled?: boolean; - - /** - * How frequent the health check is run. The default value is `mid`. - */ - rate?: MagicTransitAPI.UnnamedSchemaRefEebdc868ce7f7ae92e23438caa84e7b5; - - /** - * The destination address in a request type health check. After the healthcheck is - * decapsulated at the customer end of the tunnel, the ICMP echo will be forwarded - * to this address. This field defaults to `customer_gre_endpoint address`. This - * field is ignored for bidirectional healthchecks as the interface_address (not - * assigned to the Cloudflare side of the tunnel) is used as the target. - */ - target?: string; - - /** - * The type of healthcheck to run, reply or request. The default value is `reply`. - */ - type?: MagicTransitAPI.UnnamedSchemaRef3b1a76a5e4a139b72ed7d93834773d39; - } - } } export interface GRETunnelDeleteResponse { @@ -359,7 +283,7 @@ export interface GRETunnelUpdateParams { /** * Body param: */ - health_check?: GRETunnelUpdateParams.HealthCheck; + health_check?: MagicTransitAPI.HealthCheck; /** * Body param: Maximum Transmission Unit (MTU) in bytes for the GRE tunnel. The @@ -373,44 +297,6 @@ export interface GRETunnelUpdateParams { ttl?: number; } -export namespace GRETunnelUpdateParams { - export interface HealthCheck { - /** - * The direction of the flow of the healthcheck. Either unidirectional, where the - * probe comes to you via the tunnel and the result comes back to Cloudflare via - * the open Internet, or bidirectional where both the probe and result come and go - * via the tunnel. Note in the case of bidirecitonal healthchecks, the target field - * in health_check is ignored as the interface_address is used to send traffic into - * the tunnel. - */ - direction?: 'unidirectional' | 'bidirectional'; - - /** - * Determines whether to run healthchecks for a tunnel. - */ - enabled?: boolean; - - /** - * How frequent the health check is run. The default value is `mid`. - */ - rate?: MagicTransitAPI.UnnamedSchemaRefEebdc868ce7f7ae92e23438caa84e7b5; - - /** - * The destination address in a request type health check. After the healthcheck is - * decapsulated at the customer end of the tunnel, the ICMP echo will be forwarded - * to this address. This field defaults to `customer_gre_endpoint address`. This - * field is ignored for bidirectional healthchecks as the interface_address (not - * assigned to the Cloudflare side of the tunnel) is used as the target. - */ - target?: string; - - /** - * The type of healthcheck to run, reply or request. The default value is `reply`. - */ - type?: MagicTransitAPI.UnnamedSchemaRef3b1a76a5e4a139b72ed7d93834773d39; - } -} - export interface GRETunnelListParams { /** * Identifier diff --git a/src/resources/magic-transit/index.ts b/src/resources/magic-transit/index.ts index ac24a2657d..c081fb6460 100644 --- a/src/resources/magic-transit/index.ts +++ b/src/resources/magic-transit/index.ts @@ -9,6 +9,24 @@ export { CfInterconnectGetParams, CfInterconnects, } from './cf-interconnects'; +export { + ColoNamesItem, + ColoRegionsItem, + Scope, + RouteCreateResponse, + RouteUpdateResponse, + RouteListResponse, + RouteDeleteResponse, + RouteEmptyResponse, + RouteGetResponse, + RouteCreateParams, + RouteUpdateParams, + RouteListParams, + RouteDeleteParams, + RouteEmptyParams, + RouteGetParams, + Routes, +} from './routes'; export { GRETunnelCreateResponse, GRETunnelUpdateResponse, @@ -22,7 +40,9 @@ export { GRETunnelGetParams, GRETunnels, } from './gre-tunnels'; +export { MagicTransit } from './magic-transit'; export { + PSKMetadata, IPSECTunnelCreateResponse, IPSECTunnelUpdateResponse, IPSECTunnelListResponse, @@ -38,21 +58,8 @@ export { IPSECTunnels, } from './ipsec-tunnels'; export { - RouteCreateResponse, - RouteUpdateResponse, - RouteListResponse, - RouteDeleteResponse, - RouteEmptyResponse, - RouteGetResponse, - RouteCreateParams, - RouteUpdateParams, - RouteListParams, - RouteDeleteParams, - RouteEmptyParams, - RouteGetParams, - Routes, -} from './routes'; -export { + Site, + SiteLocation, SiteCreateResponse, SiteUpdateResponse, SiteListResponse, @@ -65,8 +72,3 @@ export { SiteGetParams, Sites, } from './sites/index'; -export { - UnnamedSchemaRef3b1a76a5e4a139b72ed7d93834773d39, - UnnamedSchemaRefEebdc868ce7f7ae92e23438caa84e7b5, - MagicTransit, -} from './magic-transit'; diff --git a/src/resources/magic-transit/ipsec-tunnels.ts b/src/resources/magic-transit/ipsec-tunnels.ts index 3cda741701..749b3519bf 100644 --- a/src/resources/magic-transit/ipsec-tunnels.ts +++ b/src/resources/magic-transit/ipsec-tunnels.ts @@ -116,6 +116,16 @@ export class IPSECTunnels extends APIResource { } } +/** + * The PSK metadata that includes when the PSK was generated. + */ +export interface PSKMetadata { + /** + * The date and time the tunnel was last modified. + */ + last_generated_on?: string; +} + export interface IPSECTunnelCreateResponse { ipsec_tunnels?: Array; } @@ -174,7 +184,7 @@ export namespace IPSECTunnelCreateResponse { /** * The PSK metadata that includes when the PSK was generated. */ - psk_metadata?: IPSECTunnel.PSKMetadata; + psk_metadata?: IPSECTunnelsAPI.PSKMetadata; /** * If `true`, then IPsec replay protection will be supported in the @@ -186,16 +196,6 @@ export namespace IPSECTunnelCreateResponse { } export namespace IPSECTunnel { - /** - * The PSK metadata that includes when the PSK was generated. - */ - export interface PSKMetadata { - /** - * The date and time the tunnel was last modified. - */ - last_generated_on?: string; - } - export interface TunnelHealthCheck { /** * Determines whether to run healthchecks for a tunnel. @@ -286,7 +286,7 @@ export namespace IPSECTunnelListResponse { /** * The PSK metadata that includes when the PSK was generated. */ - psk_metadata?: IPSECTunnel.PSKMetadata; + psk_metadata?: IPSECTunnelsAPI.PSKMetadata; /** * If `true`, then IPsec replay protection will be supported in the @@ -298,16 +298,6 @@ export namespace IPSECTunnelListResponse { } export namespace IPSECTunnel { - /** - * The PSK metadata that includes when the PSK was generated. - */ - export interface PSKMetadata { - /** - * The date and time the tunnel was last modified. - */ - last_generated_on?: string; - } - export interface TunnelHealthCheck { /** * Determines whether to run healthchecks for a tunnel. @@ -358,19 +348,7 @@ export interface IPSECTunnelPSKGenerateResponse { /** * The PSK metadata that includes when the PSK was generated. */ - psk_metadata?: IPSECTunnelPSKGenerateResponse.PSKMetadata; -} - -export namespace IPSECTunnelPSKGenerateResponse { - /** - * The PSK metadata that includes when the PSK was generated. - */ - export interface PSKMetadata { - /** - * The date and time the tunnel was last modified. - */ - last_generated_on?: string; - } + psk_metadata?: PSKMetadata; } export interface IPSECTunnelCreateParams { @@ -411,7 +389,7 @@ export interface IPSECTunnelCreateParams { /** * Body param: */ - health_check?: IPSECTunnelCreateParams.HealthCheck; + health_check?: MagicTransitAPI.HealthCheck; /** * Body param: A randomly generated or provided string for use in the IPsec tunnel. @@ -425,44 +403,6 @@ export interface IPSECTunnelCreateParams { replay_protection?: boolean; } -export namespace IPSECTunnelCreateParams { - export interface HealthCheck { - /** - * The direction of the flow of the healthcheck. Either unidirectional, where the - * probe comes to you via the tunnel and the result comes back to Cloudflare via - * the open Internet, or bidirectional where both the probe and result come and go - * via the tunnel. Note in the case of bidirecitonal healthchecks, the target field - * in health_check is ignored as the interface_address is used to send traffic into - * the tunnel. - */ - direction?: 'unidirectional' | 'bidirectional'; - - /** - * Determines whether to run healthchecks for a tunnel. - */ - enabled?: boolean; - - /** - * How frequent the health check is run. The default value is `mid`. - */ - rate?: MagicTransitAPI.UnnamedSchemaRefEebdc868ce7f7ae92e23438caa84e7b5; - - /** - * The destination address in a request type health check. After the healthcheck is - * decapsulated at the customer end of the tunnel, the ICMP echo will be forwarded - * to this address. This field defaults to `customer_gre_endpoint address`. This - * field is ignored for bidirectional healthchecks as the interface_address (not - * assigned to the Cloudflare side of the tunnel) is used as the target. - */ - target?: string; - - /** - * The type of healthcheck to run, reply or request. The default value is `reply`. - */ - type?: MagicTransitAPI.UnnamedSchemaRef3b1a76a5e4a139b72ed7d93834773d39; - } -} - export interface IPSECTunnelUpdateParams { /** * Path param: Identifier @@ -501,7 +441,7 @@ export interface IPSECTunnelUpdateParams { /** * Body param: */ - health_check?: IPSECTunnelUpdateParams.HealthCheck; + health_check?: MagicTransitAPI.HealthCheck; /** * Body param: A randomly generated or provided string for use in the IPsec tunnel. @@ -515,44 +455,6 @@ export interface IPSECTunnelUpdateParams { replay_protection?: boolean; } -export namespace IPSECTunnelUpdateParams { - export interface HealthCheck { - /** - * The direction of the flow of the healthcheck. Either unidirectional, where the - * probe comes to you via the tunnel and the result comes back to Cloudflare via - * the open Internet, or bidirectional where both the probe and result come and go - * via the tunnel. Note in the case of bidirecitonal healthchecks, the target field - * in health_check is ignored as the interface_address is used to send traffic into - * the tunnel. - */ - direction?: 'unidirectional' | 'bidirectional'; - - /** - * Determines whether to run healthchecks for a tunnel. - */ - enabled?: boolean; - - /** - * How frequent the health check is run. The default value is `mid`. - */ - rate?: MagicTransitAPI.UnnamedSchemaRefEebdc868ce7f7ae92e23438caa84e7b5; - - /** - * The destination address in a request type health check. After the healthcheck is - * decapsulated at the customer end of the tunnel, the ICMP echo will be forwarded - * to this address. This field defaults to `customer_gre_endpoint address`. This - * field is ignored for bidirectional healthchecks as the interface_address (not - * assigned to the Cloudflare side of the tunnel) is used as the target. - */ - target?: string; - - /** - * The type of healthcheck to run, reply or request. The default value is `reply`. - */ - type?: MagicTransitAPI.UnnamedSchemaRef3b1a76a5e4a139b72ed7d93834773d39; - } -} - export interface IPSECTunnelListParams { /** * Identifier @@ -592,6 +494,7 @@ export interface IPSECTunnelPSKGenerateParams { } export namespace IPSECTunnels { + export import PSKMetadata = IPSECTunnelsAPI.PSKMetadata; export import IPSECTunnelCreateResponse = IPSECTunnelsAPI.IPSECTunnelCreateResponse; export import IPSECTunnelUpdateResponse = IPSECTunnelsAPI.IPSECTunnelUpdateResponse; export import IPSECTunnelListResponse = IPSECTunnelsAPI.IPSECTunnelListResponse; diff --git a/src/resources/magic-transit/magic-transit.ts b/src/resources/magic-transit/magic-transit.ts index e1332217d8..22c52b4b44 100644 --- a/src/resources/magic-transit/magic-transit.ts +++ b/src/resources/magic-transit/magic-transit.ts @@ -1,7 +1,6 @@ // File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. import { APIResource } from 'cloudflare/resource'; -import * as MagicTransitAPI from 'cloudflare/resources/magic-transit/magic-transit'; import * as CfInterconnectsAPI from 'cloudflare/resources/magic-transit/cf-interconnects'; import * as GRETunnelsAPI from 'cloudflare/resources/magic-transit/gre-tunnels'; import * as IPSECTunnelsAPI from 'cloudflare/resources/magic-transit/ipsec-tunnels'; @@ -16,6 +15,42 @@ export class MagicTransit extends APIResource { sites: SitesAPI.Sites = new SitesAPI.Sites(this._client); } +export interface HealthCheck { + /** + * The direction of the flow of the healthcheck. Either unidirectional, where the + * probe comes to you via the tunnel and the result comes back to Cloudflare via + * the open Internet, or bidirectional where both the probe and result come and go + * via the tunnel. Note in the case of bidirecitonal healthchecks, the target field + * in health_check is ignored as the interface_address is used to send traffic into + * the tunnel. + */ + direction?: 'unidirectional' | 'bidirectional'; + + /** + * Determines whether to run healthchecks for a tunnel. + */ + enabled?: boolean; + + /** + * How frequent the health check is run. The default value is `mid`. + */ + rate?: UnnamedSchemaRefEebdc868ce7f7ae92e23438caa84e7b5; + + /** + * The destination address in a request type health check. After the healthcheck is + * decapsulated at the customer end of the tunnel, the ICMP echo will be forwarded + * to this address. This field defaults to `customer_gre_endpoint address`. This + * field is ignored for bidirectional healthchecks as the interface_address (not + * assigned to the Cloudflare side of the tunnel) is used as the target. + */ + target?: string; + + /** + * The type of healthcheck to run, reply or request. The default value is `reply`. + */ + type?: UnnamedSchemaRef3b1a76a5e4a139b72ed7d93834773d39; +} + /** * The type of healthcheck to run, reply or request. The default value is `reply`. */ @@ -27,8 +62,6 @@ export type UnnamedSchemaRef3b1a76a5e4a139b72ed7d93834773d39 = 'reply' | 'reques export type UnnamedSchemaRefEebdc868ce7f7ae92e23438caa84e7b5 = 'low' | 'mid' | 'high'; export namespace MagicTransit { - export import UnnamedSchemaRef3b1a76a5e4a139b72ed7d93834773d39 = MagicTransitAPI.UnnamedSchemaRef3b1a76a5e4a139b72ed7d93834773d39; - export import UnnamedSchemaRefEebdc868ce7f7ae92e23438caa84e7b5 = MagicTransitAPI.UnnamedSchemaRefEebdc868ce7f7ae92e23438caa84e7b5; export import CfInterconnects = CfInterconnectsAPI.CfInterconnects; export import CfInterconnectUpdateResponse = CfInterconnectsAPI.CfInterconnectUpdateResponse; export import CfInterconnectListResponse = CfInterconnectsAPI.CfInterconnectListResponse; @@ -48,6 +81,7 @@ export namespace MagicTransit { export import GRETunnelDeleteParams = GRETunnelsAPI.GRETunnelDeleteParams; export import GRETunnelGetParams = GRETunnelsAPI.GRETunnelGetParams; export import IPSECTunnels = IPSECTunnelsAPI.IPSECTunnels; + export import PSKMetadata = IPSECTunnelsAPI.PSKMetadata; export import IPSECTunnelCreateResponse = IPSECTunnelsAPI.IPSECTunnelCreateResponse; export import IPSECTunnelUpdateResponse = IPSECTunnelsAPI.IPSECTunnelUpdateResponse; export import IPSECTunnelListResponse = IPSECTunnelsAPI.IPSECTunnelListResponse; @@ -61,6 +95,9 @@ export namespace MagicTransit { export import IPSECTunnelGetParams = IPSECTunnelsAPI.IPSECTunnelGetParams; export import IPSECTunnelPSKGenerateParams = IPSECTunnelsAPI.IPSECTunnelPSKGenerateParams; export import Routes = RoutesAPI.Routes; + export import ColoNamesItem = RoutesAPI.ColoNamesItem; + export import ColoRegionsItem = RoutesAPI.ColoRegionsItem; + export import Scope = RoutesAPI.Scope; export import RouteCreateResponse = RoutesAPI.RouteCreateResponse; export import RouteUpdateResponse = RoutesAPI.RouteUpdateResponse; export import RouteListResponse = RoutesAPI.RouteListResponse; @@ -74,6 +111,8 @@ export namespace MagicTransit { export import RouteEmptyParams = RoutesAPI.RouteEmptyParams; export import RouteGetParams = RoutesAPI.RouteGetParams; export import Sites = SitesAPI.Sites; + export import Site = SitesAPI.Site; + export import SiteLocation = SitesAPI.SiteLocation; export import SiteCreateResponse = SitesAPI.SiteCreateResponse; export import SiteUpdateResponse = SitesAPI.SiteUpdateResponse; export import SiteListResponse = SitesAPI.SiteListResponse; diff --git a/src/resources/magic-transit/routes.ts b/src/resources/magic-transit/routes.ts index 2d982295d0..241ff63848 100644 --- a/src/resources/magic-transit/routes.ts +++ b/src/resources/magic-transit/routes.ts @@ -96,6 +96,31 @@ export class Routes extends APIResource { } } +/** + * Scope colo name. + */ +export type ColoNamesItem = string; + +/** + * Scope colo region. + */ +export type ColoRegionsItem = string; + +/** + * Used only for ECMP routes. + */ +export interface Scope { + /** + * List of colo names for the ECMP scope. + */ + colo_names?: Array; + + /** + * List of colo regions for the ECMP scope. + */ + colo_regions?: Array; +} + export interface RouteCreateResponse { routes?: Array; } @@ -140,30 +165,13 @@ export namespace RouteCreateResponse { /** * Used only for ECMP routes. */ - scope?: Route.Scope; + scope?: RoutesAPI.Scope; /** * Optional weight of the ECMP scope - if provided. */ weight?: number; } - - export namespace Route { - /** - * Used only for ECMP routes. - */ - export interface Scope { - /** - * List of colo names for the ECMP scope. - */ - colo_names?: Array; - - /** - * List of colo regions for the ECMP scope. - */ - colo_regions?: Array; - } - } } export interface RouteUpdateResponse { @@ -216,30 +224,13 @@ export namespace RouteListResponse { /** * Used only for ECMP routes. */ - scope?: Route.Scope; + scope?: RoutesAPI.Scope; /** * Optional weight of the ECMP scope - if provided. */ weight?: number; } - - export namespace Route { - /** - * Used only for ECMP routes. - */ - export interface Scope { - /** - * List of colo names for the ECMP scope. - */ - colo_names?: Array; - - /** - * List of colo regions for the ECMP scope. - */ - colo_regions?: Array; - } - } } export interface RouteDeleteResponse { @@ -299,7 +290,7 @@ export interface RouteUpdateParams { /** * Body param: Used only for ECMP routes. */ - scope?: RouteUpdateParams.Scope; + scope?: Scope; /** * Body param: Optional weight of the ECMP scope - if provided. @@ -307,23 +298,6 @@ export interface RouteUpdateParams { weight?: number; } -export namespace RouteUpdateParams { - /** - * Used only for ECMP routes. - */ - export interface Scope { - /** - * List of colo names for the ECMP scope. - */ - colo_names?: Array; - - /** - * List of colo regions for the ECMP scope. - */ - colo_regions?: Array; - } -} - export interface RouteListParams { /** * Identifier @@ -367,6 +341,9 @@ export interface RouteGetParams { } export namespace Routes { + export import ColoNamesItem = RoutesAPI.ColoNamesItem; + export import ColoRegionsItem = RoutesAPI.ColoRegionsItem; + export import Scope = RoutesAPI.Scope; export import RouteCreateResponse = RoutesAPI.RouteCreateResponse; export import RouteUpdateResponse = RoutesAPI.RouteUpdateResponse; export import RouteListResponse = RoutesAPI.RouteListResponse; diff --git a/src/resources/magic-transit/sites/acls.ts b/src/resources/magic-transit/sites/acls.ts index 04e5bb373c..1a43c15303 100644 --- a/src/resources/magic-transit/sites/acls.ts +++ b/src/resources/magic-transit/sites/acls.ts @@ -94,282 +94,87 @@ export class ACLs extends APIResource { } /** - * Array of allowed communication protocols between configured LANs. If no - * protocols are provided, all protocols are allowed. + * Bidirectional ACL policy for network traffic within a site. */ -export type UnnamedSchemaRef87fa9e5fe9f6b8d607be1df57340d916 = 'tcp' | 'udp' | 'icmp'; - -export interface ACLCreateResponse { - acls?: Array; -} - -export namespace ACLCreateResponse { +export interface ACL { /** - * Bidirectional ACL policy for network traffic within a site. + * Identifier */ - export interface ACL { - /** - * Identifier - */ - id?: string; + id?: string; - /** - * Description for the ACL. - */ - description?: string; - - /** - * The desired forwarding action for this ACL policy. If set to "false", the policy - * will forward traffic to Cloudflare. If set to "true", the policy will forward - * traffic locally on the Magic WAN Connector. If not included in request, will - * default to false. - */ - forward_locally?: boolean; + /** + * Description for the ACL. + */ + description?: string; - lan_1?: ACL.LAN1; + /** + * The desired forwarding action for this ACL policy. If set to "false", the policy + * will forward traffic to Cloudflare. If set to "true", the policy will forward + * traffic locally on the Magic WAN Connector. If not included in request, will + * default to false. + */ + forward_locally?: boolean; - lan_2?: ACL.LAN2; + lan_1?: ACLConfiguration; - /** - * The name of the ACL. - */ - name?: string; + lan_2?: ACLConfiguration; - protocols?: Array; - } + /** + * The name of the ACL. + */ + name?: string; - export namespace ACL { - export interface LAN1 { - /** - * The identifier for the LAN you want to create an ACL policy with. - */ - lan_id: string; - - /** - * The name of the LAN based on the provided lan_id. - */ - lan_name?: string; - - /** - * Array of ports on the provided LAN that will be included in the ACL. If no ports - * are provided, communication on any port on this LAN is allowed. - */ - ports?: Array; - - /** - * Array of subnet IPs within the LAN that will be included in the ACL. If no - * subnets are provided, communication on any subnets on this LAN are allowed. - */ - subnets?: Array; - } - - export interface LAN2 { - /** - * The identifier for the LAN you want to create an ACL policy with. - */ - lan_id: string; - - /** - * The name of the LAN based on the provided lan_id. - */ - lan_name?: string; - - /** - * Array of ports on the provided LAN that will be included in the ACL. If no ports - * are provided, communication on any port on this LAN is allowed. - */ - ports?: Array; - - /** - * Array of subnet IPs within the LAN that will be included in the ACL. If no - * subnets are provided, communication on any subnets on this LAN are allowed. - */ - subnets?: Array; - } - } + protocols?: Array; } -export interface ACLUpdateResponse { +export interface ACLConfiguration { /** - * Bidirectional ACL policy for network traffic within a site. + * The identifier for the LAN you want to create an ACL policy with. */ - acl?: ACLUpdateResponse.ACL; -} + lan_id: string; -export namespace ACLUpdateResponse { /** - * Bidirectional ACL policy for network traffic within a site. + * The name of the LAN based on the provided lan_id. */ - export interface ACL { - /** - * Identifier - */ - id?: string; - - /** - * Description for the ACL. - */ - description?: string; - - /** - * The desired forwarding action for this ACL policy. If set to "false", the policy - * will forward traffic to Cloudflare. If set to "true", the policy will forward - * traffic locally on the Magic WAN Connector. If not included in request, will - * default to false. - */ - forward_locally?: boolean; + lan_name?: string; - lan_1?: ACL.LAN1; - - lan_2?: ACL.LAN2; + /** + * Array of ports on the provided LAN that will be included in the ACL. If no ports + * are provided, communication on any port on this LAN is allowed. + */ + ports?: Array; - /** - * The name of the ACL. - */ - name?: string; + /** + * Array of subnet IPs within the LAN that will be included in the ACL. If no + * subnets are provided, communication on any subnets on this LAN are allowed. + */ + subnets?: Array; +} - protocols?: Array; - } +/** + * A valid IPv4 address. + */ +export type Subnet = string | string; - export namespace ACL { - export interface LAN1 { - /** - * The identifier for the LAN you want to create an ACL policy with. - */ - lan_id: string; - - /** - * The name of the LAN based on the provided lan_id. - */ - lan_name?: string; - - /** - * Array of ports on the provided LAN that will be included in the ACL. If no ports - * are provided, communication on any port on this LAN is allowed. - */ - ports?: Array; - - /** - * Array of subnet IPs within the LAN that will be included in the ACL. If no - * subnets are provided, communication on any subnets on this LAN are allowed. - */ - subnets?: Array; - } - - export interface LAN2 { - /** - * The identifier for the LAN you want to create an ACL policy with. - */ - lan_id: string; - - /** - * The name of the LAN based on the provided lan_id. - */ - lan_name?: string; - - /** - * Array of ports on the provided LAN that will be included in the ACL. If no ports - * are provided, communication on any port on this LAN is allowed. - */ - ports?: Array; - - /** - * Array of subnet IPs within the LAN that will be included in the ACL. If no - * subnets are provided, communication on any subnets on this LAN are allowed. - */ - subnets?: Array; - } - } -} +/** + * Array of allowed communication protocols between configured LANs. If no + * protocols are provided, all protocols are allowed. + */ +export type UnnamedSchemaRef87fa9e5fe9f6b8d607be1df57340d916 = 'tcp' | 'udp' | 'icmp'; -export interface ACLListResponse { - acls?: Array; +export interface ACLCreateResponse { + acls?: Array; } -export namespace ACLListResponse { +export interface ACLUpdateResponse { /** * Bidirectional ACL policy for network traffic within a site. */ - export interface ACL { - /** - * Identifier - */ - id?: string; - - /** - * Description for the ACL. - */ - description?: string; - - /** - * The desired forwarding action for this ACL policy. If set to "false", the policy - * will forward traffic to Cloudflare. If set to "true", the policy will forward - * traffic locally on the Magic WAN Connector. If not included in request, will - * default to false. - */ - forward_locally?: boolean; - - lan_1?: ACL.LAN1; - - lan_2?: ACL.LAN2; - - /** - * The name of the ACL. - */ - name?: string; - - protocols?: Array; - } + acl?: ACL; +} - export namespace ACL { - export interface LAN1 { - /** - * The identifier for the LAN you want to create an ACL policy with. - */ - lan_id: string; - - /** - * The name of the LAN based on the provided lan_id. - */ - lan_name?: string; - - /** - * Array of ports on the provided LAN that will be included in the ACL. If no ports - * are provided, communication on any port on this LAN is allowed. - */ - ports?: Array; - - /** - * Array of subnet IPs within the LAN that will be included in the ACL. If no - * subnets are provided, communication on any subnets on this LAN are allowed. - */ - subnets?: Array; - } - - export interface LAN2 { - /** - * The identifier for the LAN you want to create an ACL policy with. - */ - lan_id: string; - - /** - * The name of the LAN based on the provided lan_id. - */ - lan_name?: string; - - /** - * Array of ports on the provided LAN that will be included in the ACL. If no ports - * are provided, communication on any port on this LAN is allowed. - */ - ports?: Array; - - /** - * Array of subnet IPs within the LAN that will be included in the ACL. If no - * subnets are provided, communication on any subnets on this LAN are allowed. - */ - subnets?: Array; - } - } +export interface ACLListResponse { + acls?: Array; } export interface ACLDeleteResponse { @@ -378,186 +183,14 @@ export interface ACLDeleteResponse { /** * Bidirectional ACL policy for network traffic within a site. */ - deleted_acl?: ACLDeleteResponse.DeletedACL; -} - -export namespace ACLDeleteResponse { - /** - * Bidirectional ACL policy for network traffic within a site. - */ - export interface DeletedACL { - /** - * Identifier - */ - id?: string; - - /** - * Description for the ACL. - */ - description?: string; - - /** - * The desired forwarding action for this ACL policy. If set to "false", the policy - * will forward traffic to Cloudflare. If set to "true", the policy will forward - * traffic locally on the Magic WAN Connector. If not included in request, will - * default to false. - */ - forward_locally?: boolean; - - lan_1?: DeletedACL.LAN1; - - lan_2?: DeletedACL.LAN2; - - /** - * The name of the ACL. - */ - name?: string; - - protocols?: Array; - } - - export namespace DeletedACL { - export interface LAN1 { - /** - * The identifier for the LAN you want to create an ACL policy with. - */ - lan_id: string; - - /** - * The name of the LAN based on the provided lan_id. - */ - lan_name?: string; - - /** - * Array of ports on the provided LAN that will be included in the ACL. If no ports - * are provided, communication on any port on this LAN is allowed. - */ - ports?: Array; - - /** - * Array of subnet IPs within the LAN that will be included in the ACL. If no - * subnets are provided, communication on any subnets on this LAN are allowed. - */ - subnets?: Array; - } - - export interface LAN2 { - /** - * The identifier for the LAN you want to create an ACL policy with. - */ - lan_id: string; - - /** - * The name of the LAN based on the provided lan_id. - */ - lan_name?: string; - - /** - * Array of ports on the provided LAN that will be included in the ACL. If no ports - * are provided, communication on any port on this LAN is allowed. - */ - ports?: Array; - - /** - * Array of subnet IPs within the LAN that will be included in the ACL. If no - * subnets are provided, communication on any subnets on this LAN are allowed. - */ - subnets?: Array; - } - } + deleted_acl?: ACL; } export interface ACLGetResponse { /** * Bidirectional ACL policy for network traffic within a site. */ - acl?: ACLGetResponse.ACL; -} - -export namespace ACLGetResponse { - /** - * Bidirectional ACL policy for network traffic within a site. - */ - export interface ACL { - /** - * Identifier - */ - id?: string; - - /** - * Description for the ACL. - */ - description?: string; - - /** - * The desired forwarding action for this ACL policy. If set to "false", the policy - * will forward traffic to Cloudflare. If set to "true", the policy will forward - * traffic locally on the Magic WAN Connector. If not included in request, will - * default to false. - */ - forward_locally?: boolean; - - lan_1?: ACL.LAN1; - - lan_2?: ACL.LAN2; - - /** - * The name of the ACL. - */ - name?: string; - - protocols?: Array; - } - - export namespace ACL { - export interface LAN1 { - /** - * The identifier for the LAN you want to create an ACL policy with. - */ - lan_id: string; - - /** - * The name of the LAN based on the provided lan_id. - */ - lan_name?: string; - - /** - * Array of ports on the provided LAN that will be included in the ACL. If no ports - * are provided, communication on any port on this LAN is allowed. - */ - ports?: Array; - - /** - * Array of subnet IPs within the LAN that will be included in the ACL. If no - * subnets are provided, communication on any subnets on this LAN are allowed. - */ - subnets?: Array; - } - - export interface LAN2 { - /** - * The identifier for the LAN you want to create an ACL policy with. - */ - lan_id: string; - - /** - * The name of the LAN based on the provided lan_id. - */ - lan_name?: string; - - /** - * Array of ports on the provided LAN that will be included in the ACL. If no ports - * are provided, communication on any port on this LAN is allowed. - */ - ports?: Array; - - /** - * Array of subnet IPs within the LAN that will be included in the ACL. If no - * subnets are provided, communication on any subnets on this LAN are allowed. - */ - subnets?: Array; - } - } + acl?: ACL; } export interface ACLCreateParams { @@ -574,9 +207,9 @@ export interface ACLCreateParams { export namespace ACLCreateParams { export interface ACL { - lan_1: ACL.LAN1; + lan_1: ACLsAPI.ACLConfiguration; - lan_2: ACL.LAN2; + lan_2: ACLsAPI.ACLConfiguration; /** * The name of the ACL. @@ -598,56 +231,6 @@ export namespace ACLCreateParams { protocols?: Array; } - - export namespace ACL { - export interface LAN1 { - /** - * The identifier for the LAN you want to create an ACL policy with. - */ - lan_id: string; - - /** - * The name of the LAN based on the provided lan_id. - */ - lan_name?: string; - - /** - * Array of ports on the provided LAN that will be included in the ACL. If no ports - * are provided, communication on any port on this LAN is allowed. - */ - ports?: Array; - - /** - * Array of subnet IPs within the LAN that will be included in the ACL. If no - * subnets are provided, communication on any subnets on this LAN are allowed. - */ - subnets?: Array; - } - - export interface LAN2 { - /** - * The identifier for the LAN you want to create an ACL policy with. - */ - lan_id: string; - - /** - * The name of the LAN based on the provided lan_id. - */ - lan_name?: string; - - /** - * Array of ports on the provided LAN that will be included in the ACL. If no ports - * are provided, communication on any port on this LAN is allowed. - */ - ports?: Array; - - /** - * Array of subnet IPs within the LAN that will be included in the ACL. If no - * subnets are provided, communication on any subnets on this LAN are allowed. - */ - subnets?: Array; - } - } } export interface ACLUpdateParams { @@ -677,9 +260,9 @@ export namespace ACLUpdateParams { */ forward_locally?: boolean; - lan_1?: ACL.LAN1; + lan_1?: ACLsAPI.ACLConfiguration; - lan_2?: ACL.LAN2; + lan_2?: ACLsAPI.ACLConfiguration; /** * The name of the ACL. @@ -688,56 +271,6 @@ export namespace ACLUpdateParams { protocols?: Array; } - - export namespace ACL { - export interface LAN1 { - /** - * The identifier for the LAN you want to create an ACL policy with. - */ - lan_id: string; - - /** - * The name of the LAN based on the provided lan_id. - */ - lan_name?: string; - - /** - * Array of ports on the provided LAN that will be included in the ACL. If no ports - * are provided, communication on any port on this LAN is allowed. - */ - ports?: Array; - - /** - * Array of subnet IPs within the LAN that will be included in the ACL. If no - * subnets are provided, communication on any subnets on this LAN are allowed. - */ - subnets?: Array; - } - - export interface LAN2 { - /** - * The identifier for the LAN you want to create an ACL policy with. - */ - lan_id: string; - - /** - * The name of the LAN based on the provided lan_id. - */ - lan_name?: string; - - /** - * Array of ports on the provided LAN that will be included in the ACL. If no ports - * are provided, communication on any port on this LAN is allowed. - */ - ports?: Array; - - /** - * Array of subnet IPs within the LAN that will be included in the ACL. If no - * subnets are provided, communication on any subnets on this LAN are allowed. - */ - subnets?: Array; - } - } } export interface ACLListParams { @@ -767,6 +300,9 @@ export interface ACLGetParams { } export namespace ACLs { + export import ACL = ACLsAPI.ACL; + export import ACLConfiguration = ACLsAPI.ACLConfiguration; + export import Subnet = ACLsAPI.Subnet; export import UnnamedSchemaRef87fa9e5fe9f6b8d607be1df57340d916 = ACLsAPI.UnnamedSchemaRef87fa9e5fe9f6b8d607be1df57340d916; export import ACLCreateResponse = ACLsAPI.ACLCreateResponse; export import ACLUpdateResponse = ACLsAPI.ACLUpdateResponse; diff --git a/src/resources/magic-transit/sites/index.ts b/src/resources/magic-transit/sites/index.ts index de8c2e9f7e..bfd6870efb 100644 --- a/src/resources/magic-transit/sites/index.ts +++ b/src/resources/magic-transit/sites/index.ts @@ -1,6 +1,29 @@ // File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. export { + ACL, + ACLConfiguration, + Subnet, + UnnamedSchemaRef87fa9e5fe9f6b8d607be1df57340d916, + ACLCreateResponse, + ACLUpdateResponse, + ACLListResponse, + ACLDeleteResponse, + ACLGetResponse, + ACLCreateParams, + ACLUpdateParams, + ACLListParams, + ACLDeleteParams, + ACLGetParams, + ACLs, +} from './acls'; +export { + DHCPRelay, + DHCPServer, + LAN, + Nat, + RoutedSubnet, + StaticAddressing, LANCreateResponse, LANUpdateResponse, LANListResponse, @@ -14,6 +37,8 @@ export { LANs, } from './lans'; export { + Site, + SiteLocation, SiteCreateResponse, SiteUpdateResponse, SiteListResponse, @@ -27,20 +52,8 @@ export { Sites, } from './sites'; export { - UnnamedSchemaRef87fa9e5fe9f6b8d607be1df57340d916, - ACLCreateResponse, - ACLUpdateResponse, - ACLListResponse, - ACLDeleteResponse, - ACLGetResponse, - ACLCreateParams, - ACLUpdateParams, - ACLListParams, - ACLDeleteParams, - ACLGetParams, - ACLs, -} from './acls'; -export { + StaticAddressing, + WAN, WANCreateResponse, WANUpdateResponse, WANListResponse, diff --git a/src/resources/magic-transit/sites/lans.ts b/src/resources/magic-transit/sites/lans.ts index 74d633bae5..b4c561af00 100644 --- a/src/resources/magic-transit/sites/lans.ts +++ b/src/resources/magic-transit/sites/lans.ts @@ -94,671 +94,140 @@ export class LANs extends APIResource { } } -export interface LANCreateResponse { - lans?: Array; +export interface DHCPRelay { + /** + * List of DHCP server IPs. + */ + server_addresses?: Array; } -export namespace LANCreateResponse { - export interface LAN { - /** - * Identifier - */ - id?: string; - - description?: string; - - /** - * mark true to use this LAN for HA probing. only works for site with HA turned on. - * only one LAN can be set as the ha_link. - */ - ha_link?: boolean; - - nat?: LAN.Nat; - - physport?: number; - - routed_subnets?: Array; - - /** - * Identifier - */ - site_id?: string; - - /** - * If the site is not configured in high availability mode, this configuration is - * optional (if omitted, use DHCP). However, if in high availability mode, - * static_address is required along with secondary and virtual address. - */ - static_addressing?: LAN.StaticAddressing; - - /** - * VLAN port number. - */ - vlan_tag?: number; - } - - export namespace LAN { - export interface Nat { - /** - * A valid CIDR notation representing an IP range. - */ - static_prefix?: string; - } - - export interface RoutedSubnet { - /** - * A valid IPv4 address. - */ - next_hop: string; - - /** - * A valid CIDR notation representing an IP range. - */ - prefix: string; +export interface DHCPServer { + /** + * A valid IPv4 address. + */ + dhcp_pool_end?: string; - nat?: RoutedSubnet.Nat; - } + /** + * A valid IPv4 address. + */ + dhcp_pool_start?: string; - export namespace RoutedSubnet { - export interface Nat { - /** - * A valid CIDR notation representing an IP range. - */ - static_prefix?: string; - } - } + /** + * A valid IPv4 address. + */ + dns_server?: string; - /** - * If the site is not configured in high availability mode, this configuration is - * optional (if omitted, use DHCP). However, if in high availability mode, - * static_address is required along with secondary and virtual address. - */ - export interface StaticAddressing { - /** - * A valid CIDR notation representing an IP range. - */ - address: string; + /** + * Mapping of MAC addresses to IP addresses + */ + reservations?: Record; +} - dhcp_relay?: StaticAddressing.DHCPRelay; +export interface LAN { + /** + * Identifier + */ + id?: string; - dhcp_server?: StaticAddressing.DHCPServer; + description?: string; - /** - * A valid CIDR notation representing an IP range. - */ - secondary_address?: string; + /** + * mark true to use this LAN for HA probing. only works for site with HA turned on. + * only one LAN can be set as the ha_link. + */ + ha_link?: boolean; - /** - * A valid CIDR notation representing an IP range. - */ - virtual_address?: string; - } + nat?: Nat; - export namespace StaticAddressing { - export interface DHCPRelay { - /** - * List of DHCP server IPs. - */ - server_addresses?: Array; - } + physport?: number; - export interface DHCPServer { - /** - * A valid IPv4 address. - */ - dhcp_pool_end?: string; + routed_subnets?: Array; - /** - * A valid IPv4 address. - */ - dhcp_pool_start?: string; + /** + * Identifier + */ + site_id?: string; - /** - * A valid IPv4 address. - */ - dns_server?: string; + /** + * If the site is not configured in high availability mode, this configuration is + * optional (if omitted, use DHCP). However, if in high availability mode, + * static_address is required along with secondary and virtual address. + */ + static_addressing?: StaticAddressing; - /** - * Mapping of MAC addresses to IP addresses - */ - reservations?: Record; - } - } - } + /** + * VLAN port number. + */ + vlan_tag?: number; } -export interface LANUpdateResponse { - lan?: LANUpdateResponse.LAN; +export interface Nat { + /** + * A valid CIDR notation representing an IP range. + */ + static_prefix?: string; } -export namespace LANUpdateResponse { - export interface LAN { - /** - * Identifier - */ - id?: string; - - description?: string; - - /** - * mark true to use this LAN for HA probing. only works for site with HA turned on. - * only one LAN can be set as the ha_link. - */ - ha_link?: boolean; - - nat?: LAN.Nat; - - physport?: number; - - routed_subnets?: Array; - - /** - * Identifier - */ - site_id?: string; - - /** - * If the site is not configured in high availability mode, this configuration is - * optional (if omitted, use DHCP). However, if in high availability mode, - * static_address is required along with secondary and virtual address. - */ - static_addressing?: LAN.StaticAddressing; - - /** - * VLAN port number. - */ - vlan_tag?: number; - } - - export namespace LAN { - export interface Nat { - /** - * A valid CIDR notation representing an IP range. - */ - static_prefix?: string; - } - - export interface RoutedSubnet { - /** - * A valid IPv4 address. - */ - next_hop: string; - - /** - * A valid CIDR notation representing an IP range. - */ - prefix: string; - - nat?: RoutedSubnet.Nat; - } - - export namespace RoutedSubnet { - export interface Nat { - /** - * A valid CIDR notation representing an IP range. - */ - static_prefix?: string; - } - } - - /** - * If the site is not configured in high availability mode, this configuration is - * optional (if omitted, use DHCP). However, if in high availability mode, - * static_address is required along with secondary and virtual address. - */ - export interface StaticAddressing { - /** - * A valid CIDR notation representing an IP range. - */ - address: string; - - dhcp_relay?: StaticAddressing.DHCPRelay; - - dhcp_server?: StaticAddressing.DHCPServer; +export interface RoutedSubnet { + /** + * A valid IPv4 address. + */ + next_hop: string; - /** - * A valid CIDR notation representing an IP range. - */ - secondary_address?: string; + /** + * A valid CIDR notation representing an IP range. + */ + prefix: string; - /** - * A valid CIDR notation representing an IP range. - */ - virtual_address?: string; - } + nat?: Nat; +} - export namespace StaticAddressing { - export interface DHCPRelay { - /** - * List of DHCP server IPs. - */ - server_addresses?: Array; - } +/** + * If the site is not configured in high availability mode, this configuration is + * optional (if omitted, use DHCP). However, if in high availability mode, + * static_address is required along with secondary and virtual address. + */ +export interface StaticAddressing { + /** + * A valid CIDR notation representing an IP range. + */ + address: string; - export interface DHCPServer { - /** - * A valid IPv4 address. - */ - dhcp_pool_end?: string; + dhcp_relay?: DHCPRelay; - /** - * A valid IPv4 address. - */ - dhcp_pool_start?: string; + dhcp_server?: DHCPServer; - /** - * A valid IPv4 address. - */ - dns_server?: string; + /** + * A valid CIDR notation representing an IP range. + */ + secondary_address?: string; - /** - * Mapping of MAC addresses to IP addresses - */ - reservations?: Record; - } - } - } + /** + * A valid CIDR notation representing an IP range. + */ + virtual_address?: string; } -export interface LANListResponse { - lans?: Array; +export interface LANCreateResponse { + lans?: Array; } -export namespace LANListResponse { - export interface LAN { - /** - * Identifier - */ - id?: string; - - description?: string; - - /** - * mark true to use this LAN for HA probing. only works for site with HA turned on. - * only one LAN can be set as the ha_link. - */ - ha_link?: boolean; - - nat?: LAN.Nat; - - physport?: number; - - routed_subnets?: Array; - - /** - * Identifier - */ - site_id?: string; - - /** - * If the site is not configured in high availability mode, this configuration is - * optional (if omitted, use DHCP). However, if in high availability mode, - * static_address is required along with secondary and virtual address. - */ - static_addressing?: LAN.StaticAddressing; - - /** - * VLAN port number. - */ - vlan_tag?: number; - } - - export namespace LAN { - export interface Nat { - /** - * A valid CIDR notation representing an IP range. - */ - static_prefix?: string; - } - - export interface RoutedSubnet { - /** - * A valid IPv4 address. - */ - next_hop: string; - - /** - * A valid CIDR notation representing an IP range. - */ - prefix: string; - - nat?: RoutedSubnet.Nat; - } - - export namespace RoutedSubnet { - export interface Nat { - /** - * A valid CIDR notation representing an IP range. - */ - static_prefix?: string; - } - } - - /** - * If the site is not configured in high availability mode, this configuration is - * optional (if omitted, use DHCP). However, if in high availability mode, - * static_address is required along with secondary and virtual address. - */ - export interface StaticAddressing { - /** - * A valid CIDR notation representing an IP range. - */ - address: string; - - dhcp_relay?: StaticAddressing.DHCPRelay; - - dhcp_server?: StaticAddressing.DHCPServer; - - /** - * A valid CIDR notation representing an IP range. - */ - secondary_address?: string; - - /** - * A valid CIDR notation representing an IP range. - */ - virtual_address?: string; - } - - export namespace StaticAddressing { - export interface DHCPRelay { - /** - * List of DHCP server IPs. - */ - server_addresses?: Array; - } - - export interface DHCPServer { - /** - * A valid IPv4 address. - */ - dhcp_pool_end?: string; - - /** - * A valid IPv4 address. - */ - dhcp_pool_start?: string; - - /** - * A valid IPv4 address. - */ - dns_server?: string; +export interface LANUpdateResponse { + lan?: LAN; +} - /** - * Mapping of MAC addresses to IP addresses - */ - reservations?: Record; - } - } - } +export interface LANListResponse { + lans?: Array; } export interface LANDeleteResponse { deleted?: boolean; - deleted_lan?: LANDeleteResponse.DeletedLAN; -} - -export namespace LANDeleteResponse { - export interface DeletedLAN { - /** - * Identifier - */ - id?: string; - - description?: string; - - /** - * mark true to use this LAN for HA probing. only works for site with HA turned on. - * only one LAN can be set as the ha_link. - */ - ha_link?: boolean; - - nat?: DeletedLAN.Nat; - - physport?: number; - - routed_subnets?: Array; - - /** - * Identifier - */ - site_id?: string; - - /** - * If the site is not configured in high availability mode, this configuration is - * optional (if omitted, use DHCP). However, if in high availability mode, - * static_address is required along with secondary and virtual address. - */ - static_addressing?: DeletedLAN.StaticAddressing; - - /** - * VLAN port number. - */ - vlan_tag?: number; - } - - export namespace DeletedLAN { - export interface Nat { - /** - * A valid CIDR notation representing an IP range. - */ - static_prefix?: string; - } - - export interface RoutedSubnet { - /** - * A valid IPv4 address. - */ - next_hop: string; - - /** - * A valid CIDR notation representing an IP range. - */ - prefix: string; - - nat?: RoutedSubnet.Nat; - } - - export namespace RoutedSubnet { - export interface Nat { - /** - * A valid CIDR notation representing an IP range. - */ - static_prefix?: string; - } - } - - /** - * If the site is not configured in high availability mode, this configuration is - * optional (if omitted, use DHCP). However, if in high availability mode, - * static_address is required along with secondary and virtual address. - */ - export interface StaticAddressing { - /** - * A valid CIDR notation representing an IP range. - */ - address: string; - - dhcp_relay?: StaticAddressing.DHCPRelay; - - dhcp_server?: StaticAddressing.DHCPServer; - - /** - * A valid CIDR notation representing an IP range. - */ - secondary_address?: string; - - /** - * A valid CIDR notation representing an IP range. - */ - virtual_address?: string; - } - - export namespace StaticAddressing { - export interface DHCPRelay { - /** - * List of DHCP server IPs. - */ - server_addresses?: Array; - } - - export interface DHCPServer { - /** - * A valid IPv4 address. - */ - dhcp_pool_end?: string; - - /** - * A valid IPv4 address. - */ - dhcp_pool_start?: string; - - /** - * A valid IPv4 address. - */ - dns_server?: string; - - /** - * Mapping of MAC addresses to IP addresses - */ - reservations?: Record; - } - } - } + deleted_lan?: LAN; } export interface LANGetResponse { - lan?: LANGetResponse.LAN; -} - -export namespace LANGetResponse { - export interface LAN { - /** - * Identifier - */ - id?: string; - - description?: string; - - /** - * mark true to use this LAN for HA probing. only works for site with HA turned on. - * only one LAN can be set as the ha_link. - */ - ha_link?: boolean; - - nat?: LAN.Nat; - - physport?: number; - - routed_subnets?: Array; - - /** - * Identifier - */ - site_id?: string; - - /** - * If the site is not configured in high availability mode, this configuration is - * optional (if omitted, use DHCP). However, if in high availability mode, - * static_address is required along with secondary and virtual address. - */ - static_addressing?: LAN.StaticAddressing; - - /** - * VLAN port number. - */ - vlan_tag?: number; - } - - export namespace LAN { - export interface Nat { - /** - * A valid CIDR notation representing an IP range. - */ - static_prefix?: string; - } - - export interface RoutedSubnet { - /** - * A valid IPv4 address. - */ - next_hop: string; - - /** - * A valid CIDR notation representing an IP range. - */ - prefix: string; - - nat?: RoutedSubnet.Nat; - } - - export namespace RoutedSubnet { - export interface Nat { - /** - * A valid CIDR notation representing an IP range. - */ - static_prefix?: string; - } - } - - /** - * If the site is not configured in high availability mode, this configuration is - * optional (if omitted, use DHCP). However, if in high availability mode, - * static_address is required along with secondary and virtual address. - */ - export interface StaticAddressing { - /** - * A valid CIDR notation representing an IP range. - */ - address: string; - - dhcp_relay?: StaticAddressing.DHCPRelay; - - dhcp_server?: StaticAddressing.DHCPServer; - - /** - * A valid CIDR notation representing an IP range. - */ - secondary_address?: string; - - /** - * A valid CIDR notation representing an IP range. - */ - virtual_address?: string; - } - - export namespace StaticAddressing { - export interface DHCPRelay { - /** - * List of DHCP server IPs. - */ - server_addresses?: Array; - } - - export interface DHCPServer { - /** - * A valid IPv4 address. - */ - dhcp_pool_end?: string; - - /** - * A valid IPv4 address. - */ - dhcp_pool_start?: string; - - /** - * A valid IPv4 address. - */ - dns_server?: string; - - /** - * Mapping of MAC addresses to IP addresses - */ - reservations?: Record; - } - } - } + lan?: LAN; } export interface LANCreateParams { @@ -790,105 +259,16 @@ export namespace LANCreateParams { */ ha_link?: boolean; - nat?: LAN.Nat; - - routed_subnets?: Array; - - /** - * If the site is not configured in high availability mode, this configuration is - * optional (if omitted, use DHCP). However, if in high availability mode, - * static_address is required along with secondary and virtual address. - */ - static_addressing?: LAN.StaticAddressing; - } - - export namespace LAN { - export interface Nat { - /** - * A valid CIDR notation representing an IP range. - */ - static_prefix?: string; - } - - export interface RoutedSubnet { - /** - * A valid IPv4 address. - */ - next_hop: string; - - /** - * A valid CIDR notation representing an IP range. - */ - prefix: string; - - nat?: RoutedSubnet.Nat; - } + nat?: LANsAPI.Nat; - export namespace RoutedSubnet { - export interface Nat { - /** - * A valid CIDR notation representing an IP range. - */ - static_prefix?: string; - } - } + routed_subnets?: Array; /** * If the site is not configured in high availability mode, this configuration is * optional (if omitted, use DHCP). However, if in high availability mode, * static_address is required along with secondary and virtual address. */ - export interface StaticAddressing { - /** - * A valid CIDR notation representing an IP range. - */ - address: string; - - dhcp_relay?: StaticAddressing.DHCPRelay; - - dhcp_server?: StaticAddressing.DHCPServer; - - /** - * A valid CIDR notation representing an IP range. - */ - secondary_address?: string; - - /** - * A valid CIDR notation representing an IP range. - */ - virtual_address?: string; - } - - export namespace StaticAddressing { - export interface DHCPRelay { - /** - * List of DHCP server IPs. - */ - server_addresses?: Array; - } - - export interface DHCPServer { - /** - * A valid IPv4 address. - */ - dhcp_pool_end?: string; - - /** - * A valid IPv4 address. - */ - dhcp_pool_start?: string; - - /** - * A valid IPv4 address. - */ - dns_server?: string; - - /** - * Mapping of MAC addresses to IP addresses - */ - reservations?: Record; - } - } + static_addressing?: LANsAPI.StaticAddressing; } } @@ -908,113 +288,24 @@ export namespace LANUpdateParams { export interface LAN { description?: string; - nat?: LAN.Nat; + nat?: LANsAPI.Nat; physport?: number; - routed_subnets?: Array; + routed_subnets?: Array; /** * If the site is not configured in high availability mode, this configuration is * optional (if omitted, use DHCP). However, if in high availability mode, * static_address is required along with secondary and virtual address. */ - static_addressing?: LAN.StaticAddressing; + static_addressing?: LANsAPI.StaticAddressing; /** * VLAN port number. */ vlan_tag?: number; } - - export namespace LAN { - export interface Nat { - /** - * A valid CIDR notation representing an IP range. - */ - static_prefix?: string; - } - - export interface RoutedSubnet { - /** - * A valid IPv4 address. - */ - next_hop: string; - - /** - * A valid CIDR notation representing an IP range. - */ - prefix: string; - - nat?: RoutedSubnet.Nat; - } - - export namespace RoutedSubnet { - export interface Nat { - /** - * A valid CIDR notation representing an IP range. - */ - static_prefix?: string; - } - } - - /** - * If the site is not configured in high availability mode, this configuration is - * optional (if omitted, use DHCP). However, if in high availability mode, - * static_address is required along with secondary and virtual address. - */ - export interface StaticAddressing { - /** - * A valid CIDR notation representing an IP range. - */ - address: string; - - dhcp_relay?: StaticAddressing.DHCPRelay; - - dhcp_server?: StaticAddressing.DHCPServer; - - /** - * A valid CIDR notation representing an IP range. - */ - secondary_address?: string; - - /** - * A valid CIDR notation representing an IP range. - */ - virtual_address?: string; - } - - export namespace StaticAddressing { - export interface DHCPRelay { - /** - * List of DHCP server IPs. - */ - server_addresses?: Array; - } - - export interface DHCPServer { - /** - * A valid IPv4 address. - */ - dhcp_pool_end?: string; - - /** - * A valid IPv4 address. - */ - dhcp_pool_start?: string; - - /** - * A valid IPv4 address. - */ - dns_server?: string; - - /** - * Mapping of MAC addresses to IP addresses - */ - reservations?: Record; - } - } - } } export interface LANListParams { @@ -1044,6 +335,12 @@ export interface LANGetParams { } export namespace LANs { + export import DHCPRelay = LANsAPI.DHCPRelay; + export import DHCPServer = LANsAPI.DHCPServer; + export import LAN = LANsAPI.LAN; + export import Nat = LANsAPI.Nat; + export import RoutedSubnet = LANsAPI.RoutedSubnet; + export import StaticAddressing = LANsAPI.StaticAddressing; export import LANCreateResponse = LANsAPI.LANCreateResponse; export import LANUpdateResponse = LANsAPI.LANUpdateResponse; export import LANListResponse = LANsAPI.LANListResponse; diff --git a/src/resources/magic-transit/sites/sites.ts b/src/resources/magic-transit/sites/sites.ts index 90d5d19a86..015c937ab9 100644 --- a/src/resources/magic-transit/sites/sites.ts +++ b/src/resources/magic-transit/sites/sites.ts @@ -89,296 +89,76 @@ export class Sites extends APIResource { } } -export interface SiteCreateResponse { - site?: SiteCreateResponse.Site; -} +export interface Site { + /** + * Identifier + */ + id?: string; -export namespace SiteCreateResponse { - export interface Site { - /** - * Identifier - */ - id?: string; + /** + * Magic WAN Connector identifier tag. + */ + connector_id?: string; - /** - * Magic WAN Connector identifier tag. - */ - connector_id?: string; + description?: string; - description?: string; + /** + * Site high availability mode. If set to true, the site can have two connectors + * and runs in high availability mode. + */ + ha_mode?: boolean; - /** - * Site high availability mode. If set to true, the site can have two connectors - * and runs in high availability mode. - */ - ha_mode?: boolean; + /** + * Location of site in latitude and longitude. + */ + location?: SiteLocation; - /** - * Location of site in latitude and longitude. - */ - location?: Site.Location; + /** + * The name of the site. + */ + name?: string; - /** - * The name of the site. - */ - name?: string; + /** + * Magic WAN Connector identifier tag. Used when high availability mode is on. + */ + secondary_connector_id?: string; +} - /** - * Magic WAN Connector identifier tag. Used when high availability mode is on. - */ - secondary_connector_id?: string; - } +/** + * Location of site in latitude and longitude. + */ +export interface SiteLocation { + /** + * Latitude + */ + lat?: string; - export namespace Site { - /** - * Location of site in latitude and longitude. - */ - export interface Location { - /** - * Latitude - */ - lat?: string; - - /** - * Longitude - */ - lon?: string; - } - } + /** + * Longitude + */ + lon?: string; } -export interface SiteUpdateResponse { - site?: SiteUpdateResponse.Site; +export interface SiteCreateResponse { + site?: Site; } -export namespace SiteUpdateResponse { - export interface Site { - /** - * Identifier - */ - id?: string; - - /** - * Magic WAN Connector identifier tag. - */ - connector_id?: string; - - description?: string; - - /** - * Site high availability mode. If set to true, the site can have two connectors - * and runs in high availability mode. - */ - ha_mode?: boolean; - - /** - * Location of site in latitude and longitude. - */ - location?: Site.Location; - - /** - * The name of the site. - */ - name?: string; - - /** - * Magic WAN Connector identifier tag. Used when high availability mode is on. - */ - secondary_connector_id?: string; - } - - export namespace Site { - /** - * Location of site in latitude and longitude. - */ - export interface Location { - /** - * Latitude - */ - lat?: string; - - /** - * Longitude - */ - lon?: string; - } - } +export interface SiteUpdateResponse { + site?: Site; } export interface SiteListResponse { - sites?: Array; -} - -export namespace SiteListResponse { - export interface Site { - /** - * Identifier - */ - id?: string; - - /** - * Magic WAN Connector identifier tag. - */ - connector_id?: string; - - description?: string; - - /** - * Site high availability mode. If set to true, the site can have two connectors - * and runs in high availability mode. - */ - ha_mode?: boolean; - - /** - * Location of site in latitude and longitude. - */ - location?: Site.Location; - - /** - * The name of the site. - */ - name?: string; - - /** - * Magic WAN Connector identifier tag. Used when high availability mode is on. - */ - secondary_connector_id?: string; - } - - export namespace Site { - /** - * Location of site in latitude and longitude. - */ - export interface Location { - /** - * Latitude - */ - lat?: string; - - /** - * Longitude - */ - lon?: string; - } - } + sites?: Array; } export interface SiteDeleteResponse { deleted?: boolean; - deleted_site?: SiteDeleteResponse.DeletedSite; -} - -export namespace SiteDeleteResponse { - export interface DeletedSite { - /** - * Identifier - */ - id?: string; - - /** - * Magic WAN Connector identifier tag. - */ - connector_id?: string; - - description?: string; - - /** - * Site high availability mode. If set to true, the site can have two connectors - * and runs in high availability mode. - */ - ha_mode?: boolean; - - /** - * Location of site in latitude and longitude. - */ - location?: DeletedSite.Location; - - /** - * The name of the site. - */ - name?: string; - - /** - * Magic WAN Connector identifier tag. Used when high availability mode is on. - */ - secondary_connector_id?: string; - } - - export namespace DeletedSite { - /** - * Location of site in latitude and longitude. - */ - export interface Location { - /** - * Latitude - */ - lat?: string; - - /** - * Longitude - */ - lon?: string; - } - } + deleted_site?: Site; } export interface SiteGetResponse { - site?: SiteGetResponse.Site; -} - -export namespace SiteGetResponse { - export interface Site { - /** - * Identifier - */ - id?: string; - - /** - * Magic WAN Connector identifier tag. - */ - connector_id?: string; - - description?: string; - - /** - * Site high availability mode. If set to true, the site can have two connectors - * and runs in high availability mode. - */ - ha_mode?: boolean; - - /** - * Location of site in latitude and longitude. - */ - location?: Site.Location; - - /** - * The name of the site. - */ - name?: string; - - /** - * Magic WAN Connector identifier tag. Used when high availability mode is on. - */ - secondary_connector_id?: string; - } - - export namespace Site { - /** - * Location of site in latitude and longitude. - */ - export interface Location { - /** - * Latitude - */ - lat?: string; - - /** - * Longitude - */ - lon?: string; - } - } + site?: Site; } export interface SiteCreateParams { @@ -416,30 +196,13 @@ export namespace SiteCreateParams { /** * Location of site in latitude and longitude. */ - location?: Site.Location; + location?: SitesAPI.SiteLocation; /** * Magic WAN Connector identifier tag. Used when high availability mode is on. */ secondary_connector_id?: string; } - - export namespace Site { - /** - * Location of site in latitude and longitude. - */ - export interface Location { - /** - * Latitude - */ - lat?: string; - - /** - * Longitude - */ - lon?: string; - } - } } export interface SiteUpdateParams { @@ -466,7 +229,7 @@ export namespace SiteUpdateParams { /** * Location of site in latitude and longitude. */ - location?: Site.Location; + location?: SitesAPI.SiteLocation; /** * The name of the site. @@ -478,23 +241,6 @@ export namespace SiteUpdateParams { */ secondary_connector_id?: string; } - - export namespace Site { - /** - * Location of site in latitude and longitude. - */ - export interface Location { - /** - * Latitude - */ - lat?: string; - - /** - * Longitude - */ - lon?: string; - } - } } export interface SiteListParams { @@ -529,6 +275,8 @@ export interface SiteGetParams { } export namespace Sites { + export import Site = SitesAPI.Site; + export import SiteLocation = SitesAPI.SiteLocation; export import SiteCreateResponse = SitesAPI.SiteCreateResponse; export import SiteUpdateResponse = SitesAPI.SiteUpdateResponse; export import SiteListResponse = SitesAPI.SiteListResponse; @@ -540,6 +288,9 @@ export namespace Sites { export import SiteDeleteParams = SitesAPI.SiteDeleteParams; export import SiteGetParams = SitesAPI.SiteGetParams; export import ACLs = ACLsAPI.ACLs; + export import ACL = ACLsAPI.ACL; + export import ACLConfiguration = ACLsAPI.ACLConfiguration; + export import Subnet = ACLsAPI.Subnet; export import UnnamedSchemaRef87fa9e5fe9f6b8d607be1df57340d916 = ACLsAPI.UnnamedSchemaRef87fa9e5fe9f6b8d607be1df57340d916; export import ACLCreateResponse = ACLsAPI.ACLCreateResponse; export import ACLUpdateResponse = ACLsAPI.ACLUpdateResponse; @@ -552,6 +303,12 @@ export namespace Sites { export import ACLDeleteParams = ACLsAPI.ACLDeleteParams; export import ACLGetParams = ACLsAPI.ACLGetParams; export import LANs = LANsAPI.LANs; + export import DHCPRelay = LANsAPI.DHCPRelay; + export import DHCPServer = LANsAPI.DHCPServer; + export import LAN = LANsAPI.LAN; + export import Nat = LANsAPI.Nat; + export import RoutedSubnet = LANsAPI.RoutedSubnet; + export import StaticAddressing = LANsAPI.StaticAddressing; export import LANCreateResponse = LANsAPI.LANCreateResponse; export import LANUpdateResponse = LANsAPI.LANUpdateResponse; export import LANListResponse = LANsAPI.LANListResponse; @@ -563,6 +320,7 @@ export namespace Sites { export import LANDeleteParams = LANsAPI.LANDeleteParams; export import LANGetParams = LANsAPI.LANGetParams; export import WANs = WANsAPI.WANs; + export import WAN = WANsAPI.WAN; export import WANCreateResponse = WANsAPI.WANCreateResponse; export import WANUpdateResponse = WANsAPI.WANUpdateResponse; export import WANListResponse = WANsAPI.WANListResponse; diff --git a/src/resources/magic-transit/sites/wans.ts b/src/resources/magic-transit/sites/wans.ts index 288d94a3b7..5e92f74266 100644 --- a/src/resources/magic-transit/sites/wans.ts +++ b/src/resources/magic-transit/sites/wans.ts @@ -93,311 +93,79 @@ export class WANs extends APIResource { } } -export interface WANCreateResponse { - wans?: Array; -} - -export namespace WANCreateResponse { - export interface WAN { - /** - * Identifier - */ - id?: string; - - description?: string; - - physport?: number; - - /** - * Priority of WAN for traffic loadbalancing. - */ - priority?: number; - - /** - * Identifier - */ - site_id?: string; - - /** - * (optional) if omitted, use DHCP. Submit secondary_address when site is in high - * availability mode. - */ - static_addressing?: WAN.StaticAddressing; - - /** - * VLAN port number. - */ - vlan_tag?: number; - } +/** + * (optional) if omitted, use DHCP. Submit secondary_address when site is in high + * availability mode. + */ +export interface StaticAddressing { + /** + * A valid CIDR notation representing an IP range. + */ + address: string; - export namespace WAN { - /** - * (optional) if omitted, use DHCP. Submit secondary_address when site is in high - * availability mode. - */ - export interface StaticAddressing { - /** - * A valid CIDR notation representing an IP range. - */ - address: string; - - /** - * A valid IPv4 address. - */ - gateway_address: string; - - /** - * A valid CIDR notation representing an IP range. - */ - secondary_address?: string; - } - } -} + /** + * A valid IPv4 address. + */ + gateway_address: string; -export interface WANUpdateResponse { - wan?: WANUpdateResponse.WAN; + /** + * A valid CIDR notation representing an IP range. + */ + secondary_address?: string; } -export namespace WANUpdateResponse { - export interface WAN { - /** - * Identifier - */ - id?: string; - - description?: string; +export interface WAN { + /** + * Identifier + */ + id?: string; - physport?: number; + description?: string; - /** - * Priority of WAN for traffic loadbalancing. - */ - priority?: number; + physport?: number; - /** - * Identifier - */ - site_id?: string; + /** + * Priority of WAN for traffic loadbalancing. + */ + priority?: number; - /** - * (optional) if omitted, use DHCP. Submit secondary_address when site is in high - * availability mode. - */ - static_addressing?: WAN.StaticAddressing; + /** + * Identifier + */ + site_id?: string; - /** - * VLAN port number. - */ - vlan_tag?: number; - } + /** + * (optional) if omitted, use DHCP. Submit secondary_address when site is in high + * availability mode. + */ + static_addressing?: StaticAddressing; - export namespace WAN { - /** - * (optional) if omitted, use DHCP. Submit secondary_address when site is in high - * availability mode. - */ - export interface StaticAddressing { - /** - * A valid CIDR notation representing an IP range. - */ - address: string; - - /** - * A valid IPv4 address. - */ - gateway_address: string; - - /** - * A valid CIDR notation representing an IP range. - */ - secondary_address?: string; - } - } + /** + * VLAN port number. + */ + vlan_tag?: number; } -export interface WANListResponse { - wans?: Array; +export interface WANCreateResponse { + wans?: Array; } -export namespace WANListResponse { - export interface WAN { - /** - * Identifier - */ - id?: string; - - description?: string; - - physport?: number; - - /** - * Priority of WAN for traffic loadbalancing. - */ - priority?: number; - - /** - * Identifier - */ - site_id?: string; - - /** - * (optional) if omitted, use DHCP. Submit secondary_address when site is in high - * availability mode. - */ - static_addressing?: WAN.StaticAddressing; - - /** - * VLAN port number. - */ - vlan_tag?: number; - } +export interface WANUpdateResponse { + wan?: WAN; +} - export namespace WAN { - /** - * (optional) if omitted, use DHCP. Submit secondary_address when site is in high - * availability mode. - */ - export interface StaticAddressing { - /** - * A valid CIDR notation representing an IP range. - */ - address: string; - - /** - * A valid IPv4 address. - */ - gateway_address: string; - - /** - * A valid CIDR notation representing an IP range. - */ - secondary_address?: string; - } - } +export interface WANListResponse { + wans?: Array; } export interface WANDeleteResponse { deleted?: boolean; - deleted_wan?: WANDeleteResponse.DeletedWAN; -} - -export namespace WANDeleteResponse { - export interface DeletedWAN { - /** - * Identifier - */ - id?: string; - - description?: string; - - physport?: number; - - /** - * Priority of WAN for traffic loadbalancing. - */ - priority?: number; - - /** - * Identifier - */ - site_id?: string; - - /** - * (optional) if omitted, use DHCP. Submit secondary_address when site is in high - * availability mode. - */ - static_addressing?: DeletedWAN.StaticAddressing; - - /** - * VLAN port number. - */ - vlan_tag?: number; - } - - export namespace DeletedWAN { - /** - * (optional) if omitted, use DHCP. Submit secondary_address when site is in high - * availability mode. - */ - export interface StaticAddressing { - /** - * A valid CIDR notation representing an IP range. - */ - address: string; - - /** - * A valid IPv4 address. - */ - gateway_address: string; - - /** - * A valid CIDR notation representing an IP range. - */ - secondary_address?: string; - } - } + deleted_wan?: WAN; } export interface WANGetResponse { - wan?: WANGetResponse.WAN; -} - -export namespace WANGetResponse { - export interface WAN { - /** - * Identifier - */ - id?: string; - - description?: string; - - physport?: number; - - /** - * Priority of WAN for traffic loadbalancing. - */ - priority?: number; - - /** - * Identifier - */ - site_id?: string; - - /** - * (optional) if omitted, use DHCP. Submit secondary_address when site is in high - * availability mode. - */ - static_addressing?: WAN.StaticAddressing; - - /** - * VLAN port number. - */ - vlan_tag?: number; - } - - export namespace WAN { - /** - * (optional) if omitted, use DHCP. Submit secondary_address when site is in high - * availability mode. - */ - export interface StaticAddressing { - /** - * A valid CIDR notation representing an IP range. - */ - address: string; - - /** - * A valid IPv4 address. - */ - gateway_address: string; - - /** - * A valid CIDR notation representing an IP range. - */ - secondary_address?: string; - } - } + wan?: WAN; } export interface WANCreateParams { @@ -429,30 +197,7 @@ export namespace WANCreateParams { * (optional) if omitted, use DHCP. Submit secondary_address when site is in high * availability mode. */ - static_addressing?: WAN.StaticAddressing; - } - - export namespace WAN { - /** - * (optional) if omitted, use DHCP. Submit secondary_address when site is in high - * availability mode. - */ - export interface StaticAddressing { - /** - * A valid CIDR notation representing an IP range. - */ - address: string; - - /** - * A valid IPv4 address. - */ - gateway_address: string; - - /** - * A valid CIDR notation representing an IP range. - */ - secondary_address?: string; - } + static_addressing?: WANsAPI.StaticAddressing; } } @@ -480,36 +225,13 @@ export namespace WANUpdateParams { * (optional) if omitted, use DHCP. Submit secondary_address when site is in high * availability mode. */ - static_addressing?: WAN.StaticAddressing; + static_addressing?: WANsAPI.StaticAddressing; /** * VLAN port number. */ vlan_tag?: number; } - - export namespace WAN { - /** - * (optional) if omitted, use DHCP. Submit secondary_address when site is in high - * availability mode. - */ - export interface StaticAddressing { - /** - * A valid CIDR notation representing an IP range. - */ - address: string; - - /** - * A valid IPv4 address. - */ - gateway_address: string; - - /** - * A valid CIDR notation representing an IP range. - */ - secondary_address?: string; - } - } } export interface WANListParams { @@ -539,6 +261,8 @@ export interface WANGetParams { } export namespace WANs { + export import StaticAddressing = WANsAPI.StaticAddressing; + export import WAN = WANsAPI.WAN; export import WANCreateResponse = WANsAPI.WANCreateResponse; export import WANUpdateResponse = WANsAPI.WANUpdateResponse; export import WANListResponse = WANsAPI.WANListResponse; diff --git a/src/resources/managed-headers.ts b/src/resources/managed-headers.ts index 0f3e60a933..9119b030d2 100644 --- a/src/resources/managed-headers.ts +++ b/src/resources/managed-headers.ts @@ -2,7 +2,6 @@ import * as Core from 'cloudflare/core'; import { APIResource } from 'cloudflare/resource'; -import * as ManagedHeadersAPI from 'cloudflare/resources/managed-headers'; export class ManagedHeaders extends APIResource { /** @@ -28,36 +27,34 @@ export class ManagedHeaders extends APIResource { } } -export interface ManagedHeaderListResponse { - managed_request_headers?: Array; +export interface RequestListItem { + /** + * Human-readable identifier of the Managed Transform. + */ + id?: string; - managed_response_headers?: Array; + /** + * When true, the Managed Transform is enabled. + */ + enabled?: boolean; } -export namespace ManagedHeaderListResponse { - export interface ManagedRequestHeader { - /** - * Human-readable identifier of the Managed Transform. - */ - id?: string; +export interface RequestModel { + /** + * Human-readable identifier of the Managed Transform. + */ + id?: string; - /** - * When true, the Managed Transform is enabled. - */ - enabled?: boolean; - } + /** + * When true, the Managed Transform is enabled. + */ + enabled?: boolean; +} - export interface ManagedResponseHeader { - /** - * Human-readable identifier of the Managed Transform. - */ - id?: string; +export interface ManagedHeaderListResponse { + managed_request_headers?: Array; - /** - * When true, the Managed Transform is enabled. - */ - enabled?: boolean; - } + managed_response_headers?: Array; } export interface ManagedHeaderEditResponse { @@ -118,43 +115,10 @@ export interface ManagedHeaderEditParams { /** * Body param: */ - managed_request_headers: Array; + managed_request_headers: Array; /** * Body param: */ - managed_response_headers: Array; -} - -export namespace ManagedHeaderEditParams { - export interface ManagedRequestHeader { - /** - * Human-readable identifier of the Managed Transform. - */ - id?: string; - - /** - * When true, the Managed Transform is enabled. - */ - enabled?: boolean; - } - - export interface ManagedResponseHeader { - /** - * Human-readable identifier of the Managed Transform. - */ - id?: string; - - /** - * When true, the Managed Transform is enabled. - */ - enabled?: boolean; - } -} - -export namespace ManagedHeaders { - export import ManagedHeaderListResponse = ManagedHeadersAPI.ManagedHeaderListResponse; - export import ManagedHeaderEditResponse = ManagedHeadersAPI.ManagedHeaderEditResponse; - export import ManagedHeaderListParams = ManagedHeadersAPI.ManagedHeaderListParams; - export import ManagedHeaderEditParams = ManagedHeadersAPI.ManagedHeaderEditParams; + managed_response_headers: Array; } diff --git a/src/resources/memberships.ts b/src/resources/memberships.ts index a30dc24e55..371bc7de47 100644 --- a/src/resources/memberships.ts +++ b/src/resources/memberships.ts @@ -3,10 +3,9 @@ import * as Core from 'cloudflare/core'; import { APIResource } from 'cloudflare/resource'; import { isRequestOptions } from 'cloudflare/core'; -import * as MembershipsAPI from 'cloudflare/resources/memberships'; import * as Shared from 'cloudflare/resources/shared'; import * as AccountsAPI from 'cloudflare/resources/accounts/accounts'; -import * as MembersAPI from 'cloudflare/resources/accounts/members'; +import * as PermissionGroupsAPI from 'cloudflare/resources/user/tokens/permission-groups'; import { V4PagePaginationArray, type V4PagePaginationArrayParams } from 'cloudflare/pagination'; export class Memberships extends APIResource { @@ -97,7 +96,7 @@ export interface Membership { /** * All access permissions for the user at the account. */ - permissions?: MembersAPI.MemberPermission; + permissions?: PermissionGroupsAPI.Permission; /** * List of role names for the user at the account. @@ -158,12 +157,3 @@ export namespace MembershipListParams { } export type MembershipDeleteParams = unknown; - -export namespace Memberships { - export import Membership = MembershipsAPI.Membership; - export import MembershipDeleteResponse = MembershipsAPI.MembershipDeleteResponse; - export import MembershipsV4PagePaginationArray = MembershipsAPI.MembershipsV4PagePaginationArray; - export import MembershipUpdateParams = MembershipsAPI.MembershipUpdateParams; - export import MembershipListParams = MembershipsAPI.MembershipListParams; - export import MembershipDeleteParams = MembershipsAPI.MembershipDeleteParams; -} diff --git a/src/resources/mtls-certificates/associations.ts b/src/resources/mtls-certificates/associations.ts index eebc5ee51c..f54e8486fe 100644 --- a/src/resources/mtls-certificates/associations.ts +++ b/src/resources/mtls-certificates/associations.ts @@ -23,7 +23,7 @@ export class Associations extends APIResource { } } -export interface MTLSCertificateAsssociation { +export interface CertificateAsssociation { /** * The service using the certificate. */ @@ -35,7 +35,7 @@ export interface MTLSCertificateAsssociation { status?: string; } -export type AssociationGetResponse = Array; +export type AssociationGetResponse = Array; export interface AssociationGetParams { /** @@ -45,7 +45,7 @@ export interface AssociationGetParams { } export namespace Associations { - export import MTLSCertificateAsssociation = AssociationsAPI.MTLSCertificateAsssociation; + export import CertificateAsssociation = AssociationsAPI.CertificateAsssociation; export import AssociationGetResponse = AssociationsAPI.AssociationGetResponse; export import AssociationGetParams = AssociationsAPI.AssociationGetParams; } diff --git a/src/resources/mtls-certificates/index.ts b/src/resources/mtls-certificates/index.ts index 325790d764..882977d36a 100644 --- a/src/resources/mtls-certificates/index.ts +++ b/src/resources/mtls-certificates/index.ts @@ -1,18 +1,9 @@ // File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. export { - MTLSCertificate, - MTLSCertificateUpdate, - MTLSCertificateCreateParams, - MTLSCertificateListParams, - MTLSCertificateDeleteParams, - MTLSCertificateGetParams, - MTLSCertificatesSinglePage, - MTLSCertificates, -} from './mtls-certificates'; -export { - MTLSCertificateAsssociation, + CertificateAsssociation, AssociationGetResponse, AssociationGetParams, Associations, } from './associations'; +export { MTLSCertificates } from './mtls-certificates'; diff --git a/src/resources/mtls-certificates/mtls-certificates.ts b/src/resources/mtls-certificates/mtls-certificates.ts index ba7a32275b..355bb811d1 100644 --- a/src/resources/mtls-certificates/mtls-certificates.ts +++ b/src/resources/mtls-certificates/mtls-certificates.ts @@ -2,7 +2,6 @@ import * as Core from 'cloudflare/core'; import { APIResource } from 'cloudflare/resource'; -import * as MTLSCertificatesAPI from 'cloudflare/resources/mtls-certificates/mtls-certificates'; import * as AssociationsAPI from 'cloudflare/resources/mtls-certificates/associations'; import { SinglePage } from 'cloudflare/pagination'; @@ -15,13 +14,13 @@ export class MTLSCertificates extends APIResource { create( params: MTLSCertificateCreateParams, options?: Core.RequestOptions, - ): Core.APIPromise { + ): Core.APIPromise { const { account_id, ...body } = params; return ( this._client.post(`/accounts/${account_id}/mtls_certificates`, { body, ...options, - }) as Core.APIPromise<{ result: MTLSCertificateUpdate }> + }) as Core.APIPromise<{ result: MTLSCertificateCreateResponse }> )._thenUnwrap((obj) => obj.result); } @@ -125,7 +124,7 @@ export interface MTLSCertificate { uploaded_on?: string; } -export interface MTLSCertificateUpdate { +export interface MTLSCertificateCreateResponse { /** * Identifier */ @@ -232,15 +231,8 @@ export interface MTLSCertificateGetParams { } export namespace MTLSCertificates { - export import MTLSCertificate = MTLSCertificatesAPI.MTLSCertificate; - export import MTLSCertificateUpdate = MTLSCertificatesAPI.MTLSCertificateUpdate; - export import MTLSCertificatesSinglePage = MTLSCertificatesAPI.MTLSCertificatesSinglePage; - export import MTLSCertificateCreateParams = MTLSCertificatesAPI.MTLSCertificateCreateParams; - export import MTLSCertificateListParams = MTLSCertificatesAPI.MTLSCertificateListParams; - export import MTLSCertificateDeleteParams = MTLSCertificatesAPI.MTLSCertificateDeleteParams; - export import MTLSCertificateGetParams = MTLSCertificatesAPI.MTLSCertificateGetParams; export import Associations = AssociationsAPI.Associations; - export import MTLSCertificateAsssociation = AssociationsAPI.MTLSCertificateAsssociation; + export import CertificateAsssociation = AssociationsAPI.CertificateAsssociation; export import AssociationGetResponse = AssociationsAPI.AssociationGetResponse; export import AssociationGetParams = AssociationsAPI.AssociationGetParams; } diff --git a/src/resources/origin-ca-certificates.ts b/src/resources/origin-ca-certificates.ts index eff6e21c6b..23a2dd835b 100644 --- a/src/resources/origin-ca-certificates.ts +++ b/src/resources/origin-ca-certificates.ts @@ -3,7 +3,6 @@ import * as Core from 'cloudflare/core'; import { APIResource } from 'cloudflare/resource'; import { isRequestOptions } from 'cloudflare/core'; -import * as OriginCACertificatesAPI from 'cloudflare/resources/origin-ca-certificates'; import * as Shared from 'cloudflare/resources/shared'; import { SinglePage } from 'cloudflare/pagination'; @@ -150,11 +149,3 @@ export interface OriginCACertificateListParams { } export type OriginCACertificateDeleteParams = unknown; - -export namespace OriginCACertificates { - export import OriginCACertificate = OriginCACertificatesAPI.OriginCACertificate; - export import OriginCACertificatesSinglePage = OriginCACertificatesAPI.OriginCACertificatesSinglePage; - export import OriginCACertificateCreateParams = OriginCACertificatesAPI.OriginCACertificateCreateParams; - export import OriginCACertificateListParams = OriginCACertificatesAPI.OriginCACertificateListParams; - export import OriginCACertificateDeleteParams = OriginCACertificatesAPI.OriginCACertificateDeleteParams; -} diff --git a/src/resources/origin-post-quantum-encryption.ts b/src/resources/origin-post-quantum-encryption.ts index 47bd4f58dc..63ca994350 100644 --- a/src/resources/origin-post-quantum-encryption.ts +++ b/src/resources/origin-post-quantum-encryption.ts @@ -2,7 +2,6 @@ import * as Core from 'cloudflare/core'; import { APIResource } from 'cloudflare/resource'; -import * as OriginPostQuantumEncryptionAPI from 'cloudflare/resources/origin-post-quantum-encryption'; import * as Shared from 'cloudflare/resources/shared'; export class OriginPostQuantumEncryption extends APIResource { @@ -66,8 +65,3 @@ export interface OriginPostQuantumEncryptionGetParams { */ zone_id: string; } - -export namespace OriginPostQuantumEncryption { - export import OriginPostQuantumEncryptionUpdateParams = OriginPostQuantumEncryptionAPI.OriginPostQuantumEncryptionUpdateParams; - export import OriginPostQuantumEncryptionGetParams = OriginPostQuantumEncryptionAPI.OriginPostQuantumEncryptionGetParams; -} diff --git a/src/resources/origin-tls-client-auth/hostnames/certificates.ts b/src/resources/origin-tls-client-auth/hostnames/certificates.ts index 64b19b33f7..378e31061c 100644 --- a/src/resources/origin-tls-client-auth/hostnames/certificates.ts +++ b/src/resources/origin-tls-client-auth/hostnames/certificates.ts @@ -4,23 +4,20 @@ import * as Core from 'cloudflare/core'; import { APIResource } from 'cloudflare/resource'; import * as CertificatesAPI from 'cloudflare/resources/origin-tls-client-auth/hostnames/certificates'; import * as HostnamesAPI from 'cloudflare/resources/origin-tls-client-auth/hostnames/hostnames'; -import { OriginTLSClientCertificateIDsSinglePage } from 'cloudflare/resources/origin-tls-client-auth/hostnames/hostnames'; +import { AuthenticatedOriginPullsSinglePage } from 'cloudflare/resources/origin-tls-client-auth/hostnames/hostnames'; export class Certificates extends APIResource { /** * Upload a certificate to be used for client authentication on a hostname. 10 * hostname certificates per zone are allowed. */ - create( - params: CertificateCreateParams, - options?: Core.RequestOptions, - ): Core.APIPromise { + create(params: CertificateCreateParams, options?: Core.RequestOptions): Core.APIPromise { const { zone_id, ...body } = params; return ( this._client.post(`/zones/${zone_id}/origin_tls_client_auth/hostnames/certificates`, { body, ...options, - }) as Core.APIPromise<{ result: OriginTLSClientCertificate }> + }) as Core.APIPromise<{ result: Certificate }> )._thenUnwrap((obj) => obj.result); } @@ -30,11 +27,11 @@ export class Certificates extends APIResource { list( params: CertificateListParams, options?: Core.RequestOptions, - ): Core.PagePromise { + ): Core.PagePromise { const { zone_id } = params; return this._client.getAPIList( `/zones/${zone_id}/origin_tls_client_auth/hostnames/certificates`, - OriginTLSClientCertificateIDsSinglePage, + AuthenticatedOriginPullsSinglePage, options, ); } @@ -46,13 +43,13 @@ export class Certificates extends APIResource { certificateId: string, params: CertificateDeleteParams, options?: Core.RequestOptions, - ): Core.APIPromise { + ): Core.APIPromise { const { zone_id, body } = params; return ( this._client.delete( `/zones/${zone_id}/origin_tls_client_auth/hostnames/certificates/${certificateId}`, { body: body, ...options }, - ) as Core.APIPromise<{ result: OriginTLSClientCertificate }> + ) as Core.APIPromise<{ result: Certificate }> )._thenUnwrap((obj) => obj.result); } @@ -63,18 +60,18 @@ export class Certificates extends APIResource { certificateId: string, params: CertificateGetParams, options?: Core.RequestOptions, - ): Core.APIPromise { + ): Core.APIPromise { const { zone_id } = params; return ( this._client.get( `/zones/${zone_id}/origin_tls_client_auth/hostnames/certificates/${certificateId}`, options, - ) as Core.APIPromise<{ result: OriginTLSClientCertificate }> + ) as Core.APIPromise<{ result: Certificate }> )._thenUnwrap((obj) => obj.result); } } -export interface OriginTLSClientCertificate { +export interface Certificate { /** * Identifier */ @@ -216,7 +213,7 @@ export interface CertificateGetParams { } export namespace Certificates { - export import OriginTLSClientCertificate = CertificatesAPI.OriginTLSClientCertificate; + export import Certificate = CertificatesAPI.Certificate; export import UnnamedSchemaRefD182888b36f93a765d9ce5aefa3009e9 = CertificatesAPI.UnnamedSchemaRefD182888b36f93a765d9ce5aefa3009e9; export import CertificateCreateParams = CertificatesAPI.CertificateCreateParams; export import CertificateListParams = CertificatesAPI.CertificateListParams; @@ -224,4 +221,4 @@ export namespace Certificates { export import CertificateGetParams = CertificatesAPI.CertificateGetParams; } -export { OriginTLSClientCertificateIDsSinglePage }; +export { AuthenticatedOriginPullsSinglePage }; diff --git a/src/resources/origin-tls-client-auth/hostnames/hostnames.ts b/src/resources/origin-tls-client-auth/hostnames/hostnames.ts index d7fa9eaa54..577392b886 100644 --- a/src/resources/origin-tls-client-auth/hostnames/hostnames.ts +++ b/src/resources/origin-tls-client-auth/hostnames/hostnames.ts @@ -32,24 +32,20 @@ export class Hostnames extends APIResource { /** * Get the Hostname Status for Client Authentication */ - get( - hostname: string, - params: HostnameGetParams, - options?: Core.RequestOptions, - ): Core.APIPromise { + get(hostname: string, params: HostnameGetParams, options?: Core.RequestOptions): Core.APIPromise { const { zone_id } = params; return ( this._client.get( `/zones/${zone_id}/origin_tls_client_auth/hostnames/${hostname}`, options, - ) as Core.APIPromise<{ result: OriginTLSClientCertificateID }> + ) as Core.APIPromise<{ result: ID }> )._thenUnwrap((obj) => obj.result); } } -export class OriginTLSClientCertificateIDsSinglePage extends SinglePage {} +export class AuthenticatedOriginPullsSinglePage extends SinglePage {} -export interface OriginTLSClientCertificateAuthenticatedOriginPull { +export interface AuthenticatedOriginPull { /** * Identifier */ @@ -83,7 +79,7 @@ export interface OriginTLSClientCertificateAuthenticatedOriginPull { private_key?: string; } -export interface OriginTLSClientCertificateID { +export interface ID { /** * Identifier */ @@ -171,7 +167,7 @@ export interface OriginTLSClientCertificateID { updated_at?: string; } -export type HostnameUpdateResponse = Array; +export type HostnameUpdateResponse = Array; export interface HostnameUpdateParams { /** @@ -214,13 +210,13 @@ export interface HostnameGetParams { } export namespace Hostnames { - export import OriginTLSClientCertificateAuthenticatedOriginPull = HostnamesAPI.OriginTLSClientCertificateAuthenticatedOriginPull; - export import OriginTLSClientCertificateID = HostnamesAPI.OriginTLSClientCertificateID; + export import AuthenticatedOriginPull = HostnamesAPI.AuthenticatedOriginPull; + export import ID = HostnamesAPI.ID; export import HostnameUpdateResponse = HostnamesAPI.HostnameUpdateResponse; export import HostnameUpdateParams = HostnamesAPI.HostnameUpdateParams; export import HostnameGetParams = HostnamesAPI.HostnameGetParams; export import Certificates = CertificatesAPI.Certificates; - export import OriginTLSClientCertificate = CertificatesAPI.OriginTLSClientCertificate; + export import Certificate = CertificatesAPI.Certificate; export import UnnamedSchemaRefD182888b36f93a765d9ce5aefa3009e9 = CertificatesAPI.UnnamedSchemaRefD182888b36f93a765d9ce5aefa3009e9; export import CertificateCreateParams = CertificatesAPI.CertificateCreateParams; export import CertificateListParams = CertificatesAPI.CertificateListParams; diff --git a/src/resources/origin-tls-client-auth/hostnames/index.ts b/src/resources/origin-tls-client-auth/hostnames/index.ts index ab80079ab0..eef250404a 100644 --- a/src/resources/origin-tls-client-auth/hostnames/index.ts +++ b/src/resources/origin-tls-client-auth/hostnames/index.ts @@ -1,7 +1,16 @@ // File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. export { - OriginTLSClientCertificate, + AuthenticatedOriginPull, + ID, + HostnameUpdateResponse, + HostnameUpdateParams, + HostnameGetParams, + AuthenticatedOriginPullsSinglePage, + Hostnames, +} from './hostnames'; +export { + Certificate, UnnamedSchemaRefD182888b36f93a765d9ce5aefa3009e9, CertificateCreateParams, CertificateListParams, @@ -9,12 +18,3 @@ export { CertificateGetParams, Certificates, } from './certificates'; -export { - OriginTLSClientCertificateAuthenticatedOriginPull, - OriginTLSClientCertificateID, - HostnameUpdateResponse, - HostnameUpdateParams, - HostnameGetParams, - OriginTLSClientCertificateIDsSinglePage, - Hostnames, -} from './hostnames'; diff --git a/src/resources/origin-tls-client-auth/index.ts b/src/resources/origin-tls-client-auth/index.ts index 73c60f9d9b..7ffb41dfdd 100644 --- a/src/resources/origin-tls-client-auth/index.ts +++ b/src/resources/origin-tls-client-auth/index.ts @@ -1,24 +1,15 @@ // File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. export { - OriginTLSClientCertificateAuthenticatedOriginPull, - OriginTLSClientCertificateID, + AuthenticatedOriginPull, + ID, HostnameUpdateResponse, HostnameUpdateParams, HostnameGetParams, - OriginTLSClientCertificateIDsSinglePage, + AuthenticatedOriginPullsSinglePage, Hostnames, } from './hostnames/index'; -export { - OriginTLSClientCertificateZoneAuthenticatedOriginPull, - OriginTLSClientAuthListResponse, - OriginTLSClientAuthCreateParams, - OriginTLSClientAuthListParams, - OriginTLSClientAuthDeleteParams, - OriginTLSClientAuthGetParams, - OriginTLSClientAuthListResponsesSinglePage, - OriginTLSClientAuth, -} from './origin-tls-client-auth'; +export { OriginTLSClientAuth } from './origin-tls-client-auth'; export { SettingUpdateResponse, SettingGetResponse, diff --git a/src/resources/origin-tls-client-auth/origin-tls-client-auth.ts b/src/resources/origin-tls-client-auth/origin-tls-client-auth.ts index bf8ad6b025..d4c7289eae 100644 --- a/src/resources/origin-tls-client-auth/origin-tls-client-auth.ts +++ b/src/resources/origin-tls-client-auth/origin-tls-client-auth.ts @@ -2,7 +2,6 @@ import * as Core from 'cloudflare/core'; import { APIResource } from 'cloudflare/resource'; -import * as OriginTLSClientAuthAPI from 'cloudflare/resources/origin-tls-client-auth/origin-tls-client-auth'; import * as Shared from 'cloudflare/resources/shared'; import * as SettingsAPI from 'cloudflare/resources/origin-tls-client-auth/settings'; import * as HostnamesAPI from 'cloudflare/resources/origin-tls-client-auth/hostnames/hostnames'; @@ -37,11 +36,11 @@ export class OriginTLSClientAuth extends APIResource { list( params: OriginTLSClientAuthListParams, options?: Core.RequestOptions, - ): Core.PagePromise { + ): Core.PagePromise { const { zone_id } = params; return this._client.getAPIList( `/zones/${zone_id}/origin_tls_client_auth`, - OriginTLSClientAuthListResponsesSinglePage, + ZoneAuthenticatedOriginPullsSinglePage, options, ); } @@ -81,31 +80,9 @@ export class OriginTLSClientAuth extends APIResource { } } -export class OriginTLSClientAuthListResponsesSinglePage extends SinglePage {} +export class ZoneAuthenticatedOriginPullsSinglePage extends SinglePage {} -export interface OriginTLSClientCertificateZoneAuthenticatedOriginPull { - /** - * Identifier - */ - id?: string; - - /** - * The zone's leaf certificate. - */ - certificate?: string; - - /** - * Indicates whether zone-level authenticated origin pulls is enabled. - */ - enabled?: boolean; - - /** - * The zone's private key. - */ - private_key?: string; -} - -export interface OriginTLSClientAuthListResponse { +export interface ZoneAuthenticatedOriginPull { /** * Identifier */ @@ -171,16 +148,9 @@ export interface OriginTLSClientAuthGetParams { } export namespace OriginTLSClientAuth { - export import OriginTLSClientCertificateZoneAuthenticatedOriginPull = OriginTLSClientAuthAPI.OriginTLSClientCertificateZoneAuthenticatedOriginPull; - export import OriginTLSClientAuthListResponse = OriginTLSClientAuthAPI.OriginTLSClientAuthListResponse; - export import OriginTLSClientAuthListResponsesSinglePage = OriginTLSClientAuthAPI.OriginTLSClientAuthListResponsesSinglePage; - export import OriginTLSClientAuthCreateParams = OriginTLSClientAuthAPI.OriginTLSClientAuthCreateParams; - export import OriginTLSClientAuthListParams = OriginTLSClientAuthAPI.OriginTLSClientAuthListParams; - export import OriginTLSClientAuthDeleteParams = OriginTLSClientAuthAPI.OriginTLSClientAuthDeleteParams; - export import OriginTLSClientAuthGetParams = OriginTLSClientAuthAPI.OriginTLSClientAuthGetParams; export import Hostnames = HostnamesAPI.Hostnames; - export import OriginTLSClientCertificateAuthenticatedOriginPull = HostnamesAPI.OriginTLSClientCertificateAuthenticatedOriginPull; - export import OriginTLSClientCertificateID = HostnamesAPI.OriginTLSClientCertificateID; + export import AuthenticatedOriginPull = HostnamesAPI.AuthenticatedOriginPull; + export import ID = HostnamesAPI.ID; export import HostnameUpdateResponse = HostnamesAPI.HostnameUpdateResponse; export import HostnameUpdateParams = HostnamesAPI.HostnameUpdateParams; export import HostnameGetParams = HostnamesAPI.HostnameGetParams; diff --git a/src/resources/page-shield/connections.ts b/src/resources/page-shield/connections.ts index 554790e5e5..a3b7ed1bc8 100644 --- a/src/resources/page-shield/connections.ts +++ b/src/resources/page-shield/connections.ts @@ -12,13 +12,12 @@ export class Connections extends APIResource { list( params: ConnectionListParams, options?: Core.RequestOptions, - ): Core.PagePromise { + ): Core.PagePromise { const { zone_id, ...query } = params; - return this._client.getAPIList( - `/zones/${zone_id}/page_shield/connections`, - PageShieldConnectionsSinglePage, - { query, ...options }, - ); + return this._client.getAPIList(`/zones/${zone_id}/page_shield/connections`, ConnectionsSinglePage, { + query, + ...options, + }); } /** @@ -28,15 +27,15 @@ export class Connections extends APIResource { connectionId: string, params: ConnectionGetParams, options?: Core.RequestOptions, - ): Core.APIPromise { + ): Core.APIPromise { const { zone_id } = params; return this._client.get(`/zones/${zone_id}/page_shield/connections/${connectionId}`, options); } } -export class PageShieldConnectionsSinglePage extends SinglePage {} +export class ConnectionsSinglePage extends SinglePage {} -export interface PageShieldConnection { +export interface Connection { id?: string; added_at?: string; @@ -156,8 +155,8 @@ export interface ConnectionGetParams { } export namespace Connections { - export import PageShieldConnection = ConnectionsAPI.PageShieldConnection; - export import PageShieldConnectionsSinglePage = ConnectionsAPI.PageShieldConnectionsSinglePage; + export import Connection = ConnectionsAPI.Connection; + export import ConnectionsSinglePage = ConnectionsAPI.ConnectionsSinglePage; export import ConnectionListParams = ConnectionsAPI.ConnectionListParams; export import ConnectionGetParams = ConnectionsAPI.ConnectionGetParams; } diff --git a/src/resources/page-shield/index.ts b/src/resources/page-shield/index.ts index 8e3bbd2d5a..960d7a7a4b 100644 --- a/src/resources/page-shield/index.ts +++ b/src/resources/page-shield/index.ts @@ -1,34 +1,28 @@ // File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. export { - PageShieldConnection, + Connection, ConnectionListParams, ConnectionGetParams, - PageShieldConnectionsSinglePage, + ConnectionsSinglePage, Connections, } from './connections'; +export { PageShield } from './page-shield'; export { - PageShieldPolicy, + Policy, PolicyCreateParams, PolicyUpdateParams, PolicyListParams, PolicyDeleteParams, PolicyGetParams, - PageShieldPoliciesSinglePage, + PoliciesSinglePage, Policies, } from './policies'; export { - PageShieldScript, + Script, ScriptGetResponse, ScriptListParams, ScriptGetParams, - PageShieldScriptsSinglePage, + ScriptsSinglePage, Scripts, } from './scripts'; -export { - PageShieldSetting, - PageShieldUpdateResponse, - PageShieldUpdateParams, - PageShieldGetParams, - PageShield, -} from './page-shield'; diff --git a/src/resources/page-shield/page-shield.ts b/src/resources/page-shield/page-shield.ts index fec59cb9ee..ae21a8e94a 100644 --- a/src/resources/page-shield/page-shield.ts +++ b/src/resources/page-shield/page-shield.ts @@ -2,7 +2,6 @@ import * as Core from 'cloudflare/core'; import { APIResource } from 'cloudflare/resource'; -import * as PageShieldAPI from 'cloudflare/resources/page-shield/page-shield'; import * as ConnectionsAPI from 'cloudflare/resources/page-shield/connections'; import * as PoliciesAPI from 'cloudflare/resources/page-shield/policies'; import * as ScriptsAPI from 'cloudflare/resources/page-shield/scripts'; @@ -30,17 +29,15 @@ export class PageShield extends APIResource { /** * Fetches the Page Shield settings. */ - get(params: PageShieldGetParams, options?: Core.RequestOptions): Core.APIPromise { + get(params: PageShieldGetParams, options?: Core.RequestOptions): Core.APIPromise { const { zone_id } = params; return ( - this._client.get(`/zones/${zone_id}/page_shield`, options) as Core.APIPromise<{ - result: PageShieldSetting; - }> + this._client.get(`/zones/${zone_id}/page_shield`, options) as Core.APIPromise<{ result: Setting }> )._thenUnwrap((obj) => obj.result); } } -export interface PageShieldSetting { +export interface Setting { /** * When true, indicates that Page Shield is enabled. */ @@ -118,27 +115,23 @@ export interface PageShieldGetParams { } export namespace PageShield { - export import PageShieldSetting = PageShieldAPI.PageShieldSetting; - export import PageShieldUpdateResponse = PageShieldAPI.PageShieldUpdateResponse; - export import PageShieldUpdateParams = PageShieldAPI.PageShieldUpdateParams; - export import PageShieldGetParams = PageShieldAPI.PageShieldGetParams; export import Policies = PoliciesAPI.Policies; - export import PageShieldPolicy = PoliciesAPI.PageShieldPolicy; - export import PageShieldPoliciesSinglePage = PoliciesAPI.PageShieldPoliciesSinglePage; + export import Policy = PoliciesAPI.Policy; + export import PoliciesSinglePage = PoliciesAPI.PoliciesSinglePage; export import PolicyCreateParams = PoliciesAPI.PolicyCreateParams; export import PolicyUpdateParams = PoliciesAPI.PolicyUpdateParams; export import PolicyListParams = PoliciesAPI.PolicyListParams; export import PolicyDeleteParams = PoliciesAPI.PolicyDeleteParams; export import PolicyGetParams = PoliciesAPI.PolicyGetParams; export import Connections = ConnectionsAPI.Connections; - export import PageShieldConnection = ConnectionsAPI.PageShieldConnection; - export import PageShieldConnectionsSinglePage = ConnectionsAPI.PageShieldConnectionsSinglePage; + export import Connection = ConnectionsAPI.Connection; + export import ConnectionsSinglePage = ConnectionsAPI.ConnectionsSinglePage; export import ConnectionListParams = ConnectionsAPI.ConnectionListParams; export import ConnectionGetParams = ConnectionsAPI.ConnectionGetParams; export import Scripts = ScriptsAPI.Scripts; - export import PageShieldScript = ScriptsAPI.PageShieldScript; + export import Script = ScriptsAPI.Script; export import ScriptGetResponse = ScriptsAPI.ScriptGetResponse; - export import PageShieldScriptsSinglePage = ScriptsAPI.PageShieldScriptsSinglePage; + export import ScriptsSinglePage = ScriptsAPI.ScriptsSinglePage; export import ScriptListParams = ScriptsAPI.ScriptListParams; export import ScriptGetParams = ScriptsAPI.ScriptGetParams; } diff --git a/src/resources/page-shield/policies.ts b/src/resources/page-shield/policies.ts index 4cc8376ec2..a2ee000052 100644 --- a/src/resources/page-shield/policies.ts +++ b/src/resources/page-shield/policies.ts @@ -9,7 +9,7 @@ export class Policies extends APIResource { /** * Create a Page Shield policy. */ - create(params: PolicyCreateParams, options?: Core.RequestOptions): Core.APIPromise { + create(params: PolicyCreateParams, options?: Core.RequestOptions): Core.APIPromise { const { zone_id, ...body } = params; return this._client.post(`/zones/${zone_id}/page_shield/policies`, { body, ...options }); } @@ -21,7 +21,7 @@ export class Policies extends APIResource { policyId: string, params: PolicyUpdateParams, options?: Core.RequestOptions, - ): Core.APIPromise { + ): Core.APIPromise { const { zone_id, ...body } = params; return this._client.put(`/zones/${zone_id}/page_shield/policies/${policyId}`, { body, ...options }); } @@ -32,13 +32,9 @@ export class Policies extends APIResource { list( params: PolicyListParams, options?: Core.RequestOptions, - ): Core.PagePromise { + ): Core.PagePromise { const { zone_id } = params; - return this._client.getAPIList( - `/zones/${zone_id}/page_shield/policies`, - PageShieldPoliciesSinglePage, - options, - ); + return this._client.getAPIList(`/zones/${zone_id}/page_shield/policies`, PoliciesSinglePage, options); } /** @@ -55,19 +51,15 @@ export class Policies extends APIResource { /** * Fetches a Page Shield policy by ID. */ - get( - policyId: string, - params: PolicyGetParams, - options?: Core.RequestOptions, - ): Core.APIPromise { + get(policyId: string, params: PolicyGetParams, options?: Core.RequestOptions): Core.APIPromise { const { zone_id } = params; return this._client.get(`/zones/${zone_id}/page_shield/policies/${policyId}`, options); } } -export class PageShieldPoliciesSinglePage extends SinglePage {} +export class PoliciesSinglePage extends SinglePage {} -export interface PageShieldPolicy { +export interface Policy { /** * The ID of the policy */ @@ -188,8 +180,8 @@ export interface PolicyGetParams { } export namespace Policies { - export import PageShieldPolicy = PoliciesAPI.PageShieldPolicy; - export import PageShieldPoliciesSinglePage = PoliciesAPI.PageShieldPoliciesSinglePage; + export import Policy = PoliciesAPI.Policy; + export import PoliciesSinglePage = PoliciesAPI.PoliciesSinglePage; export import PolicyCreateParams = PoliciesAPI.PolicyCreateParams; export import PolicyUpdateParams = PoliciesAPI.PolicyUpdateParams; export import PolicyListParams = PoliciesAPI.PolicyListParams; diff --git a/src/resources/page-shield/scripts.ts b/src/resources/page-shield/scripts.ts index 48ac5068a4..6f47575887 100644 --- a/src/resources/page-shield/scripts.ts +++ b/src/resources/page-shield/scripts.ts @@ -9,12 +9,9 @@ export class Scripts extends APIResource { /** * Lists all scripts detected by Page Shield. */ - list( - params: ScriptListParams, - options?: Core.RequestOptions, - ): Core.PagePromise { + list(params: ScriptListParams, options?: Core.RequestOptions): Core.PagePromise { const { zone_id, ...query } = params; - return this._client.getAPIList(`/zones/${zone_id}/page_shield/scripts`, PageShieldScriptsSinglePage, { + return this._client.getAPIList(`/zones/${zone_id}/page_shield/scripts`, ScriptsSinglePage, { query, ...options, }); @@ -33,9 +30,9 @@ export class Scripts extends APIResource { } } -export class PageShieldScriptsSinglePage extends SinglePage {} +export class ScriptsSinglePage extends SinglePage