From 1255730306cffc038645c21c20f38af5e9bc7984 Mon Sep 17 00:00:00 2001
From: "stainless-app[bot]"
<142633134+stainless-app[bot]@users.noreply.github.com>
Date: Tue, 9 Apr 2024 07:27:09 +0000
Subject: [PATCH] feat(api): update via SDK Studio (#258)
---
api.md | 55 +-
src/index.ts | 4 -
src/resources/cache/cache-reserve.ts | 14 +-
src/resources/cache/cache.ts | 4 +-
src/resources/cache/index.ts | 26 +-
src/resources/dns/dns.ts | 1 -
src/resources/dns/firewall/firewall.ts | 64 --
src/resources/dns/firewall/index.ts | 1 -
src/resources/dns/index.ts | 1 -
src/resources/load-balancers/index.ts | 7 +-
.../load-balancers/load-balancers.ts | 191 +-----
.../load-balancers/monitors/index.ts | 6 +
.../load-balancers/monitors/monitors.ts | 561 +++++++++++++++++-
src/resources/load-balancers/pools/index.ts | 1 -
src/resources/load-balancers/pools/pools.ts | 44 +-
src/resources/logpush/index.ts | 1 +
src/resources/logpush/logpush.ts | 1 +
src/resources/logpush/ownership.ts | 10 +-
src/resources/radar/attacks/layer3/top/top.ts | 20 +-
src/resources/radar/attacks/layer7/top/top.ts | 20 +-
.../email/security/top/tlds/malicious.ts | 4 +-
.../radar/email/security/top/tlds/spam.ts | 4 +-
.../radar/email/security/top/tlds/spoof.ts | 4 +-
.../radar/email/security/top/tlds/tlds.ts | 4 +-
src/resources/radar/http/http.ts | 1 +
src/resources/radar/http/index.ts | 15 +-
src/resources/radar/http/top.ts | 12 +-
src/resources/secondary-dns/acls.ts | 19 -
src/resources/secondary-dns/index.ts | 2 -
src/resources/secondary-dns/secondary-dns.ts | 2 -
src/resources/secondary-dns/tsigs.ts | 20 -
src/resources/shared.ts | 118 ----
src/resources/url-scanner/scans.ts | 8 +-
src/resources/user/load-balancers/index.ts | 10 +-
.../user/load-balancers/load-balancers.ts | 10 +-
src/resources/user/load-balancers/monitors.ts | 456 +++++++++++++-
src/resources/user/load-balancers/pools.ts | 157 +++--
src/resources/waiting-rooms/index.ts | 4 +-
src/resources/waiting-rooms/settings.ts | 4 +-
src/resources/waiting-rooms/waiting-rooms.ts | 347 +----------
src/resources/workers/scripts/deployments.ts | 10 +-
src/resources/workers/scripts/index.ts | 16 +-
src/resources/workers/scripts/scripts.ts | 2 +-
src/resources/zero-trust/dlp/patterns.ts | 6 +-
src/resources/zero-trust/gateway/gateway.ts | 2 -
src/resources/zero-trust/gateway/index.ts | 2 -
.../zero-trust/gateway/lists/index.ts | 1 -
.../zero-trust/gateway/lists/lists.ts | 32 -
src/resources/zero-trust/gateway/rules.ts | 92 ---
49 files changed, 1304 insertions(+), 1092 deletions(-)
diff --git a/api.md b/api.md
index 0017e2a9f8..fff96ca1bc 100644
--- a/api.md
+++ b/api.md
@@ -8,15 +8,11 @@ Types:
- ResponseInfo
- Result
- UnnamedSchemaRef025497b7e63379c31929636b5186e45c
-- UnnamedSchemaRef2173d81a0b2d332c9e2ac46900fe8bb9
- UnnamedSchemaRef23001f1f0b697900e282236466a95fa3
- UnnamedSchemaRef33f2e3917f3fe46ad98af0acbb1d9a19
- UnnamedSchemaRef619309774d07ec6904f1e354560d6028
- UnnamedSchemaRef70f2c6ccd8a405358ac7ef8fc3d6751c
- UnnamedSchemaRef9444735ca60712dbcf8afd832eb5716a
-- UnnamedSchemaRefB0ec5cc02c98b665099a5707a2db4ea6
-- UnnamedSchemaRefB52ad7cf99890d19f16edcd84d16ef5b
-- UnnamedSchemaRefCc2ac1a037e5d6702fc77b3bcb527854
- UnnamedSchemaRefEe1e79edcb234d14c4dd266880f2fd24
# Accounts
@@ -172,19 +168,23 @@ Methods:
Types:
-- Monitor
+- MonitorCreateResponse
+- MonitorUpdateResponse
+- MonitorListResponse
- MonitorDeleteResponse
+- MonitorEditResponse
+- MonitorGetResponse
- MonitorPreviewResponse
- MonitorReferencesResponse
Methods:
-- client.user.loadBalancers.monitors.create({ ...params }) -> Monitor
-- client.user.loadBalancers.monitors.update(monitorId, { ...params }) -> Monitor
-- client.user.loadBalancers.monitors.list() -> MonitorsSinglePage
+- client.user.loadBalancers.monitors.create({ ...params }) -> MonitorCreateResponse
+- client.user.loadBalancers.monitors.update(monitorId, { ...params }) -> MonitorUpdateResponse
+- client.user.loadBalancers.monitors.list() -> MonitorListResponsesSinglePage
- client.user.loadBalancers.monitors.delete(monitorId, { ...params }) -> MonitorDeleteResponse
-- client.user.loadBalancers.monitors.edit(monitorId, { ...params }) -> Monitor
-- client.user.loadBalancers.monitors.get(monitorId) -> Monitor
+- client.user.loadBalancers.monitors.edit(monitorId, { ...params }) -> MonitorEditResponse
+- client.user.loadBalancers.monitors.get(monitorId) -> MonitorGetResponse
- client.user.loadBalancers.monitors.preview(monitorId, { ...params }) -> MonitorPreviewResponse
- client.user.loadBalancers.monitors.references(monitorId) -> MonitorReferencesResponse | null
@@ -192,6 +192,7 @@ Methods:
Types:
+- Pool
- PoolDeleteResponse
- PoolHealthResponse
- PoolPreviewResponse
@@ -953,7 +954,6 @@ Types:
- RandomSteering
- RulesItem
- SessionAffinityAttributes
-- UnnamedSchemaRef06ba14ec7860c091efc98fd9af30f382
- LoadBalancerDeleteResponse
Methods:
@@ -969,16 +969,21 @@ Methods:
Types:
+- MonitorCreateResponse
+- MonitorUpdateResponse
+- MonitorListResponse
- MonitorDeleteResponse
+- MonitorEditResponse
+- MonitorGetResponse
Methods:
-- client.loadBalancers.monitors.create({ ...params }) -> Monitor
-- client.loadBalancers.monitors.update(monitorId, { ...params }) -> Monitor
-- client.loadBalancers.monitors.list({ ...params }) -> MonitorsSinglePage
+- client.loadBalancers.monitors.create({ ...params }) -> MonitorCreateResponse
+- client.loadBalancers.monitors.update(monitorId, { ...params }) -> MonitorUpdateResponse
+- client.loadBalancers.monitors.list({ ...params }) -> MonitorListResponsesSinglePage
- client.loadBalancers.monitors.delete(monitorId, { ...params }) -> MonitorDeleteResponse
-- client.loadBalancers.monitors.edit(monitorId, { ...params }) -> Monitor
-- client.loadBalancers.monitors.get(monitorId, { ...params }) -> Monitor
+- client.loadBalancers.monitors.edit(monitorId, { ...params }) -> MonitorEditResponse
+- client.loadBalancers.monitors.get(monitorId, { ...params }) -> MonitorGetResponse
### Previews
@@ -1079,8 +1084,8 @@ Methods:
Types:
+- CacheReserve
- UnnamedSchemaRef2b5e755404a4bfd7892291ce97c4968d
-- UnnamedSchemaRef37c385b4ebac5c7a6475b3f81ef9a7ad
- CacheReserveClearResponse
- CacheReserveEditResponse
- CacheReserveGetResponse
@@ -1462,7 +1467,6 @@ Types:
- AttackMitigation
- Firewall
- FirewallIPsItem
-- UnnamedSchemaRef7a0f93d9e1afc3221d2a57b7bab16955
- UpstreamIPs
- FirewallDeleteResponse
@@ -1824,12 +1828,13 @@ Methods:
Types:
+- OwnershipValidation
- OwnershipCreateResponse
Methods:
- client.logpush.ownership.create({ ...params }) -> OwnershipCreateResponse | null
-- client.logpush.ownership.validate({ ...params }) -> UnnamedSchemaRefCc2ac1a037e5d6702fc77b3bcb527854 | null
+- client.logpush.ownership.validate({ ...params }) -> OwnershipValidation | null
## Validate
@@ -2069,7 +2074,6 @@ Methods:
Types:
- ACL
-- UnnamedSchemaRef08eaa2f22bb9ce0f80063d710d4edafd
- ACLDeleteResponse
Methods:
@@ -2101,7 +2105,6 @@ Methods:
Types:
- TSIG
-- UnnamedSchemaRefC3d6ffaf5dde0c570eaa72462c2ee738
- TSIGDeleteResponse
Methods:
@@ -2119,7 +2122,6 @@ Types:
- AdditionalRoutesItem
- CookieAttributes
- Query
-- UnnamedSchemaRefA282afe149b2cf60a204505bd4c53324
- WaitingRoom
- WaitingRoomDeleteResponse
@@ -2203,7 +2205,7 @@ Methods:
Types:
-- UnnamedSchemaRef59ecd22a3d62548e441274daec82ee7a
+- Setting
- SettingUpdateResponse
- SettingEditResponse
- SettingGetResponse
@@ -2350,7 +2352,7 @@ Methods:
Types:
-- UnnamedSchemaRefFda1c6f6758e763ae3b2964521f2fdd8
+- Deployment
- DeploymentCreateResponse
- DeploymentGetResponse
@@ -4792,7 +4794,7 @@ Methods:
Methods:
-- client.zeroTrust.dlp.patterns.validate({ ...params }) -> UnnamedSchemaRefCc2ac1a037e5d6702fc77b3bcb527854 | null
+- client.zeroTrust.dlp.patterns.validate({ ...params }) -> OwnershipValidation | null
### PayloadLogs
@@ -4923,7 +4925,6 @@ Methods:
Types:
- Lists
-- UnnamedSchemaRef30ecd0f5ce68fc07dbb7760deda3d707
- ListCreateResponse
Methods:
@@ -5000,7 +5001,6 @@ Types:
- Rule
- RuleSetting
- Schedule
-- UnnamedSchemaRef0b0764cdb06aad66b555fd74c8c78b2a
Methods:
@@ -5791,6 +5791,7 @@ Methods:
Types:
+- Browser
- TopBrowserFamiliesResponse
- TopBrowsersResponse
diff --git a/src/index.ts b/src/index.ts
index 3e68587efd..3386885836 100644
--- a/src/index.ts
+++ b/src/index.ts
@@ -555,15 +555,11 @@ export namespace Cloudflare {
export import ResponseInfo = API.ResponseInfo;
export import Result = API.Result;
export import UnnamedSchemaRef025497b7e63379c31929636b5186e45c = API.UnnamedSchemaRef025497b7e63379c31929636b5186e45c;
- export import UnnamedSchemaRef2173d81a0b2d332c9e2ac46900fe8bb9 = API.UnnamedSchemaRef2173d81a0b2d332c9e2ac46900fe8bb9;
export import UnnamedSchemaRef23001f1f0b697900e282236466a95fa3 = API.UnnamedSchemaRef23001f1f0b697900e282236466a95fa3;
export import UnnamedSchemaRef33f2e3917f3fe46ad98af0acbb1d9a19 = API.UnnamedSchemaRef33f2e3917f3fe46ad98af0acbb1d9a19;
export import UnnamedSchemaRef619309774d07ec6904f1e354560d6028 = API.UnnamedSchemaRef619309774d07ec6904f1e354560d6028;
export import UnnamedSchemaRef70f2c6ccd8a405358ac7ef8fc3d6751c = API.UnnamedSchemaRef70f2c6ccd8a405358ac7ef8fc3d6751c;
export import UnnamedSchemaRef9444735ca60712dbcf8afd832eb5716a = API.UnnamedSchemaRef9444735ca60712dbcf8afd832eb5716a;
- export import UnnamedSchemaRefB0ec5cc02c98b665099a5707a2db4ea6 = API.UnnamedSchemaRefB0ec5cc02c98b665099a5707a2db4ea6;
- export import UnnamedSchemaRefB52ad7cf99890d19f16edcd84d16ef5b = API.UnnamedSchemaRefB52ad7cf99890d19f16edcd84d16ef5b;
- export import UnnamedSchemaRefCc2ac1a037e5d6702fc77b3bcb527854 = API.UnnamedSchemaRefCc2ac1a037e5d6702fc77b3bcb527854;
export import UnnamedSchemaRefEe1e79edcb234d14c4dd266880f2fd24 = API.UnnamedSchemaRefEe1e79edcb234d14c4dd266880f2fd24;
}
diff --git a/src/resources/cache/cache-reserve.ts b/src/resources/cache/cache-reserve.ts
index 01be2e56cc..5046bb67b6 100644
--- a/src/resources/cache/cache-reserve.ts
+++ b/src/resources/cache/cache-reserve.ts
@@ -4,7 +4,7 @@ import * as Core from 'cloudflare/core';
import { APIResource } from 'cloudflare/resource';
import * as CacheReserveAPI from 'cloudflare/resources/cache/cache-reserve';
-export class CacheReserve extends APIResource {
+export class CacheReserveResource extends APIResource {
/**
* You can use Cache Reserve Clear to clear your Cache Reserve, but you must first
* disable Cache Reserve. In most cases, this will be accomplished within 24 hours.
@@ -86,12 +86,12 @@ export class CacheReserve extends APIResource {
/**
* ID of the zone setting.
*/
-export type UnnamedSchemaRef2b5e755404a4bfd7892291ce97c4968d = 'cache_reserve_clear';
+export type CacheReserve = 'cache_reserve';
/**
* ID of the zone setting.
*/
-export type UnnamedSchemaRef37c385b4ebac5c7a6475b3f81ef9a7ad = 'cache_reserve';
+export type UnnamedSchemaRef2b5e755404a4bfd7892291ce97c4968d = 'cache_reserve_clear';
/**
* You can use Cache Reserve Clear to clear your Cache Reserve, but you must first
@@ -138,7 +138,7 @@ export interface CacheReserveEditResponse {
/**
* ID of the zone setting.
*/
- id: UnnamedSchemaRef37c385b4ebac5c7a6475b3f81ef9a7ad;
+ id: CacheReserve;
/**
* last time this setting was modified.
@@ -163,7 +163,7 @@ export interface CacheReserveGetResponse {
/**
* ID of the zone setting.
*/
- id: UnnamedSchemaRef37c385b4ebac5c7a6475b3f81ef9a7ad;
+ id: CacheReserve;
/**
* last time this setting was modified.
@@ -247,9 +247,9 @@ export interface CacheReserveStatusParams {
zone_id: string;
}
-export namespace CacheReserve {
+export namespace CacheReserveResource {
+ export import CacheReserve = CacheReserveAPI.CacheReserve;
export import UnnamedSchemaRef2b5e755404a4bfd7892291ce97c4968d = CacheReserveAPI.UnnamedSchemaRef2b5e755404a4bfd7892291ce97c4968d;
- export import UnnamedSchemaRef37c385b4ebac5c7a6475b3f81ef9a7ad = CacheReserveAPI.UnnamedSchemaRef37c385b4ebac5c7a6475b3f81ef9a7ad;
export import CacheReserveClearResponse = CacheReserveAPI.CacheReserveClearResponse;
export import CacheReserveEditResponse = CacheReserveAPI.CacheReserveEditResponse;
export import CacheReserveGetResponse = CacheReserveAPI.CacheReserveGetResponse;
diff --git a/src/resources/cache/cache.ts b/src/resources/cache/cache.ts
index b80a5371b4..96e85f697d 100644
--- a/src/resources/cache/cache.ts
+++ b/src/resources/cache/cache.ts
@@ -8,7 +8,7 @@ import * as SmartTieredCacheAPI from 'cloudflare/resources/cache/smart-tiered-ca
import * as VariantsAPI from 'cloudflare/resources/cache/variants';
export class Cache extends APIResource {
- cacheReserve: CacheReserveAPI.CacheReserve = new CacheReserveAPI.CacheReserve(this._client);
+ cacheReserve: CacheReserveAPI.CacheReserveResource = new CacheReserveAPI.CacheReserveResource(this._client);
smartTieredCache: SmartTieredCacheAPI.SmartTieredCache = new SmartTieredCacheAPI.SmartTieredCache(
this._client,
);
@@ -143,9 +143,9 @@ export namespace CachePurgeParams {
}
export namespace Cache {
+ export import CacheReserveResource = CacheReserveAPI.CacheReserveResource;
export import CacheReserve = CacheReserveAPI.CacheReserve;
export import UnnamedSchemaRef2b5e755404a4bfd7892291ce97c4968d = CacheReserveAPI.UnnamedSchemaRef2b5e755404a4bfd7892291ce97c4968d;
- export import UnnamedSchemaRef37c385b4ebac5c7a6475b3f81ef9a7ad = CacheReserveAPI.UnnamedSchemaRef37c385b4ebac5c7a6475b3f81ef9a7ad;
export import CacheReserveClearResponse = CacheReserveAPI.CacheReserveClearResponse;
export import CacheReserveEditResponse = CacheReserveAPI.CacheReserveEditResponse;
export import CacheReserveGetResponse = CacheReserveAPI.CacheReserveGetResponse;
diff --git a/src/resources/cache/index.ts b/src/resources/cache/index.ts
index fdd4c76d42..4276198805 100644
--- a/src/resources/cache/index.ts
+++ b/src/resources/cache/index.ts
@@ -1,6 +1,19 @@
// File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
export { Cache } from './cache';
+export {
+ CacheReserve,
+ UnnamedSchemaRef2b5e755404a4bfd7892291ce97c4968d,
+ CacheReserveClearResponse,
+ CacheReserveEditResponse,
+ CacheReserveGetResponse,
+ CacheReserveStatusResponse,
+ CacheReserveClearParams,
+ CacheReserveEditParams,
+ CacheReserveGetParams,
+ CacheReserveStatusParams,
+ CacheReserveResource,
+} from './cache-reserve';
export {
CacheVariants,
UnnamedSchemaRef669bfbb16c0913af7077c3c194fbfcd0,
@@ -25,16 +38,3 @@ export {
SmartTieredCacheGetParams,
SmartTieredCache,
} from './smart-tiered-cache';
-export {
- UnnamedSchemaRef2b5e755404a4bfd7892291ce97c4968d,
- UnnamedSchemaRef37c385b4ebac5c7a6475b3f81ef9a7ad,
- CacheReserveClearResponse,
- CacheReserveEditResponse,
- CacheReserveGetResponse,
- CacheReserveStatusResponse,
- CacheReserveClearParams,
- CacheReserveEditParams,
- CacheReserveGetParams,
- CacheReserveStatusParams,
- CacheReserve,
-} from './cache-reserve';
diff --git a/src/resources/dns/dns.ts b/src/resources/dns/dns.ts
index 5a352ba0df..514d97d514 100644
--- a/src/resources/dns/dns.ts
+++ b/src/resources/dns/dns.ts
@@ -129,7 +129,6 @@ export namespace DNS {
export import AttackMitigation = FirewallAPI.AttackMitigation;
export import Firewall = FirewallAPI.Firewall;
export import FirewallIPsItem = FirewallAPI.FirewallIPsItem;
- export import UnnamedSchemaRef7a0f93d9e1afc3221d2a57b7bab16955 = FirewallAPI.UnnamedSchemaRef7a0f93d9e1afc3221d2a57b7bab16955;
export import UpstreamIPs = FirewallAPI.UpstreamIPs;
export import FirewallDeleteResponse = FirewallAPI.FirewallDeleteResponse;
export import FirewallsV4PagePaginationArray = FirewallAPI.FirewallsV4PagePaginationArray;
diff --git a/src/resources/dns/firewall/firewall.ts b/src/resources/dns/firewall/firewall.ts
index a4a414658e..e6faa98286 100644
--- a/src/resources/dns/firewall/firewall.ts
+++ b/src/resources/dns/firewall/firewall.ts
@@ -172,69 +172,6 @@ export interface Firewall {
*/
export type FirewallIPsItem = string | string;
-export interface UnnamedSchemaRef7a0f93d9e1afc3221d2a57b7bab16955 {
- /**
- * Identifier
- */
- id: string;
-
- /**
- * Deprecate the response to ANY requests.
- */
- deprecate_any_requests: boolean;
-
- dns_firewall_ips: Array;
-
- /**
- * Forward client IP (resolver) subnet if no EDNS Client Subnet is sent.
- */
- ecs_fallback: boolean;
-
- /**
- * Maximum DNS Cache TTL.
- */
- maximum_cache_ttl: number;
-
- /**
- * Minimum DNS Cache TTL.
- */
- minimum_cache_ttl: number;
-
- /**
- * Last modification of DNS Firewall cluster.
- */
- modified_on: string;
-
- /**
- * DNS Firewall Cluster Name.
- */
- name: string;
-
- upstream_ips: Array;
-
- /**
- * Attack mitigation settings.
- */
- attack_mitigation?: AttackMitigation | null;
-
- /**
- * Negative DNS Cache TTL.
- */
- negative_cache_ttl?: number | null;
-
- /**
- * Ratelimit in queries per second per datacenter (applies to DNS queries sent to
- * the upstream nameservers configured on the cluster).
- */
- ratelimit?: number | null;
-
- /**
- * Number of retries for fetching DNS responses from upstream nameservers (not
- * counting the initial attempt).
- */
- retries?: number;
-}
-
/**
* Upstream DNS Server IPv4 Address.
*/
@@ -402,7 +339,6 @@ 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 UpstreamIPs = FirewallAPI.UpstreamIPs;
export import FirewallDeleteResponse = FirewallAPI.FirewallDeleteResponse;
export import FirewallsV4PagePaginationArray = FirewallAPI.FirewallsV4PagePaginationArray;
diff --git a/src/resources/dns/firewall/index.ts b/src/resources/dns/firewall/index.ts
index d4bc800393..1c8bb5f12b 100644
--- a/src/resources/dns/firewall/index.ts
+++ b/src/resources/dns/firewall/index.ts
@@ -5,7 +5,6 @@ export {
AttackMitigation,
Firewall,
FirewallIPsItem,
- UnnamedSchemaRef7a0f93d9e1afc3221d2a57b7bab16955,
UpstreamIPs,
FirewallDeleteResponse,
FirewallCreateParams,
diff --git a/src/resources/dns/index.ts b/src/resources/dns/index.ts
index 8ac13a0d4a..f481205f3a 100644
--- a/src/resources/dns/index.ts
+++ b/src/resources/dns/index.ts
@@ -48,7 +48,6 @@ export {
AttackMitigation,
Firewall,
FirewallIPsItem,
- UnnamedSchemaRef7a0f93d9e1afc3221d2a57b7bab16955,
UpstreamIPs,
FirewallDeleteResponse,
FirewallCreateParams,
diff --git a/src/resources/load-balancers/index.ts b/src/resources/load-balancers/index.ts
index 55d5c9a12c..97395540ad 100644
--- a/src/resources/load-balancers/index.ts
+++ b/src/resources/load-balancers/index.ts
@@ -2,13 +2,19 @@
export { LoadBalancers } from './load-balancers';
export {
+ MonitorCreateResponse,
+ MonitorUpdateResponse,
+ MonitorListResponse,
MonitorDeleteResponse,
+ MonitorEditResponse,
+ MonitorGetResponse,
MonitorCreateParams,
MonitorUpdateParams,
MonitorListParams,
MonitorDeleteParams,
MonitorEditParams,
MonitorGetParams,
+ MonitorListResponsesSinglePage,
Monitors,
} from './monitors/index';
export {
@@ -20,7 +26,6 @@ export {
PoolDeleteParams,
PoolEditParams,
PoolGetParams,
- PoolsSinglePage,
Pools,
} from './pools/index';
export { PreviewGetParams, Previews } from './previews';
diff --git a/src/resources/load-balancers/load-balancers.ts b/src/resources/load-balancers/load-balancers.ts
index efc61e1150..61a9ee9bd3 100644
--- a/src/resources/load-balancers/load-balancers.ts
+++ b/src/resources/load-balancers/load-balancers.ts
@@ -850,190 +850,6 @@ export interface SessionAffinityAttributes {
zero_downtime_failover?: 'none' | 'temporary' | 'sticky';
}
-export interface UnnamedSchemaRef06ba14ec7860c091efc98fd9af30f382 {
- id?: string;
-
- /**
- * 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?: 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;
-
- created_on?: string;
-
- /**
- * 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;
-
- /**
- * Object description.
- */
- description?: string;
-
- /**
- * Whether to enable (the default) this load balancer.
- */
- enabled?: boolean;
-
- /**
- * 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?: LocationStrategy;
-
- modified_on?: string;
-
- /**
- * 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;
-
- /**
- * (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;
-
- /**
- * Whether the hostname should be gray clouded (false) or orange clouded (true).
- */
- proxied?: boolean;
-
- /**
- * 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?: 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;
-
- /**
- * BETA Field Not General Access: A list of rules for this load balancer to
- * execute.
- */
- rules?: Array;
-
- /**
- * 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?: 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 interface LoadBalancerDeleteResponse {
id?: string;
}
@@ -1616,7 +1432,13 @@ export interface LoadBalancerGetParams {
export namespace LoadBalancers {
export import Monitors = MonitorsAPI.Monitors;
+ export import MonitorCreateResponse = MonitorsAPI.MonitorCreateResponse;
+ export import MonitorUpdateResponse = MonitorsAPI.MonitorUpdateResponse;
+ export import MonitorListResponse = MonitorsAPI.MonitorListResponse;
export import MonitorDeleteResponse = MonitorsAPI.MonitorDeleteResponse;
+ export import MonitorEditResponse = MonitorsAPI.MonitorEditResponse;
+ export import MonitorGetResponse = MonitorsAPI.MonitorGetResponse;
+ export import MonitorListResponsesSinglePage = MonitorsAPI.MonitorListResponsesSinglePage;
export import MonitorCreateParams = MonitorsAPI.MonitorCreateParams;
export import MonitorUpdateParams = MonitorsAPI.MonitorUpdateParams;
export import MonitorListParams = MonitorsAPI.MonitorListParams;
@@ -1626,7 +1448,6 @@ export namespace LoadBalancers {
export import Pools = PoolsAPI.Pools;
export import Pool = PoolsAPI.Pool;
export import PoolDeleteResponse = PoolsAPI.PoolDeleteResponse;
- export import PoolsSinglePage = PoolsAPI.PoolsSinglePage;
export import PoolCreateParams = PoolsAPI.PoolCreateParams;
export import PoolUpdateParams = PoolsAPI.PoolUpdateParams;
export import PoolListParams = PoolsAPI.PoolListParams;
diff --git a/src/resources/load-balancers/monitors/index.ts b/src/resources/load-balancers/monitors/index.ts
index af9930221e..4aa2b5ed77 100644
--- a/src/resources/load-balancers/monitors/index.ts
+++ b/src/resources/load-balancers/monitors/index.ts
@@ -1,13 +1,19 @@
// File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
export {
+ MonitorCreateResponse,
+ MonitorUpdateResponse,
+ MonitorListResponse,
MonitorDeleteResponse,
+ MonitorEditResponse,
+ MonitorGetResponse,
MonitorCreateParams,
MonitorUpdateParams,
MonitorListParams,
MonitorDeleteParams,
MonitorEditParams,
MonitorGetParams,
+ MonitorListResponsesSinglePage,
Monitors,
} from './monitors';
export { PreviewCreateResponse, PreviewCreateParams, Previews } from './previews';
diff --git a/src/resources/load-balancers/monitors/monitors.ts b/src/resources/load-balancers/monitors/monitors.ts
index a9c0ec1da6..77d25ca257 100644
--- a/src/resources/load-balancers/monitors/monitors.ts
+++ b/src/resources/load-balancers/monitors/monitors.ts
@@ -5,8 +5,7 @@ import { APIResource } from 'cloudflare/resource';
import * as MonitorsAPI from 'cloudflare/resources/load-balancers/monitors/monitors';
import * as PreviewsAPI from 'cloudflare/resources/load-balancers/monitors/previews';
import * as ReferencesAPI from 'cloudflare/resources/load-balancers/monitors/references';
-import * as LoadBalancersMonitorsAPI from 'cloudflare/resources/user/load-balancers/monitors';
-import { MonitorsSinglePage } from 'cloudflare/resources/user/load-balancers/monitors';
+import { SinglePage } from 'cloudflare/pagination';
export class Monitors extends APIResource {
previews: PreviewsAPI.Previews = new PreviewsAPI.Previews(this._client);
@@ -15,16 +14,13 @@ export class Monitors extends APIResource {
/**
* Create a configured monitor.
*/
- create(
- params: MonitorCreateParams,
- options?: Core.RequestOptions,
- ): Core.APIPromise {
+ create(params: MonitorCreateParams, options?: Core.RequestOptions): Core.APIPromise {
const { account_id, ...body } = params;
return (
this._client.post(`/accounts/${account_id}/load_balancers/monitors`, {
body,
...options,
- }) as Core.APIPromise<{ result: LoadBalancersMonitorsAPI.Monitor }>
+ }) as Core.APIPromise<{ result: MonitorCreateResponse }>
)._thenUnwrap((obj) => obj.result);
}
@@ -35,13 +31,13 @@ export class Monitors extends APIResource {
monitorId: string,
params: MonitorUpdateParams,
options?: Core.RequestOptions,
- ): Core.APIPromise {
+ ): Core.APIPromise {
const { account_id, ...body } = params;
return (
this._client.put(`/accounts/${account_id}/load_balancers/monitors/${monitorId}`, {
body,
...options,
- }) as Core.APIPromise<{ result: LoadBalancersMonitorsAPI.Monitor }>
+ }) as Core.APIPromise<{ result: MonitorUpdateResponse }>
)._thenUnwrap((obj) => obj.result);
}
@@ -51,11 +47,11 @@ export class Monitors extends APIResource {
list(
params: MonitorListParams,
options?: Core.RequestOptions,
- ): Core.PagePromise {
+ ): Core.PagePromise {
const { account_id } = params;
return this._client.getAPIList(
`/accounts/${account_id}/load_balancers/monitors`,
- MonitorsSinglePage,
+ MonitorListResponsesSinglePage,
options,
);
}
@@ -84,13 +80,13 @@ export class Monitors extends APIResource {
monitorId: string,
params: MonitorEditParams,
options?: Core.RequestOptions,
- ): Core.APIPromise {
+ ): Core.APIPromise {
const { account_id, ...body } = params;
return (
this._client.patch(`/accounts/${account_id}/load_balancers/monitors/${monitorId}`, {
body,
...options,
- }) as Core.APIPromise<{ result: LoadBalancersMonitorsAPI.Monitor }>
+ }) as Core.APIPromise<{ result: MonitorEditResponse }>
)._thenUnwrap((obj) => obj.result);
}
@@ -101,21 +97,548 @@ export class Monitors extends APIResource {
monitorId: string,
params: MonitorGetParams,
options?: Core.RequestOptions,
- ): Core.APIPromise {
+ ): Core.APIPromise {
const { account_id } = params;
return (
this._client.get(
`/accounts/${account_id}/load_balancers/monitors/${monitorId}`,
options,
- ) as Core.APIPromise<{ result: LoadBalancersMonitorsAPI.Monitor }>
+ ) as Core.APIPromise<{ result: MonitorGetResponse }>
)._thenUnwrap((obj) => obj.result);
}
}
+export class MonitorListResponsesSinglePage extends SinglePage {}
+
+export interface MonitorCreateResponse {
+ id?: string;
+
+ /**
+ * Do not validate the certificate when monitor use HTTPS. This parameter is
+ * currently only valid for HTTP and HTTPS monitors.
+ */
+ allow_insecure?: boolean;
+
+ /**
+ * To be marked unhealthy the monitored origin must fail this healthcheck N
+ * consecutive times.
+ */
+ consecutive_down?: number;
+
+ /**
+ * To be marked healthy the monitored origin must pass this healthcheck N
+ * consecutive times.
+ */
+ consecutive_up?: number;
+
+ created_on?: string;
+
+ /**
+ * Object description.
+ */
+ description?: string;
+
+ /**
+ * 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. This parameter is only
+ * valid for HTTP and HTTPS monitors.
+ */
+ expected_body?: string;
+
+ /**
+ * The expected HTTP response code or code range of the health check. This
+ * parameter is only valid for HTTP and HTTPS monitors.
+ */
+ expected_codes?: string;
+
+ /**
+ * Follow redirects if returned by the origin. This parameter is only valid for
+ * HTTP and HTTPS monitors.
+ */
+ 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. This
+ * parameter is only valid for HTTP and HTTPS monitors.
+ */
+ header?: unknown;
+
+ /**
+ * The interval between each health check. Shorter intervals may improve failover
+ * time, but will increase load on the origins as we check from multiple locations.
+ */
+ interval?: number;
+
+ /**
+ * The method to use for the health check. This defaults to 'GET' for HTTP/HTTPS
+ * based checks and 'connection_established' for TCP based health checks.
+ */
+ method?: string;
+
+ modified_on?: string;
+
+ /**
+ * The endpoint path you want to conduct a health check against. This parameter is
+ * only valid for HTTP and HTTPS monitors.
+ */
+ path?: string;
+
+ /**
+ * The port number to connect to for the health check. Required for TCP, UDP, and
+ * SMTP checks. HTTP and HTTPS checks should only define the port when using a
+ * non-standard port (HTTP: default 80, HTTPS: default 443).
+ */
+ port?: number;
+
+ /**
+ * Assign this monitor to emulate the specified zone while probing. This parameter
+ * is only valid for HTTP and HTTPS monitors.
+ */
+ probe_zone?: string;
+
+ /**
+ * The number of retries to attempt in case of a timeout before marking the origin
+ * as unhealthy. Retries are attempted immediately.
+ */
+ retries?: 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', 'TCP', 'ICMP-PING', 'UDP-ICMP', and 'SMTP'.
+ */
+ type?: 'http' | 'https' | 'tcp' | 'udp_icmp' | 'icmp_ping' | 'smtp';
+}
+
+export interface MonitorUpdateResponse {
+ id?: string;
+
+ /**
+ * Do not validate the certificate when monitor use HTTPS. This parameter is
+ * currently only valid for HTTP and HTTPS monitors.
+ */
+ allow_insecure?: boolean;
+
+ /**
+ * To be marked unhealthy the monitored origin must fail this healthcheck N
+ * consecutive times.
+ */
+ consecutive_down?: number;
+
+ /**
+ * To be marked healthy the monitored origin must pass this healthcheck N
+ * consecutive times.
+ */
+ consecutive_up?: number;
+
+ created_on?: string;
+
+ /**
+ * Object description.
+ */
+ description?: string;
+
+ /**
+ * 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. This parameter is only
+ * valid for HTTP and HTTPS monitors.
+ */
+ expected_body?: string;
+
+ /**
+ * The expected HTTP response code or code range of the health check. This
+ * parameter is only valid for HTTP and HTTPS monitors.
+ */
+ expected_codes?: string;
+
+ /**
+ * Follow redirects if returned by the origin. This parameter is only valid for
+ * HTTP and HTTPS monitors.
+ */
+ 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. This
+ * parameter is only valid for HTTP and HTTPS monitors.
+ */
+ header?: unknown;
+
+ /**
+ * The interval between each health check. Shorter intervals may improve failover
+ * time, but will increase load on the origins as we check from multiple locations.
+ */
+ interval?: number;
+
+ /**
+ * The method to use for the health check. This defaults to 'GET' for HTTP/HTTPS
+ * based checks and 'connection_established' for TCP based health checks.
+ */
+ method?: string;
+
+ modified_on?: string;
+
+ /**
+ * The endpoint path you want to conduct a health check against. This parameter is
+ * only valid for HTTP and HTTPS monitors.
+ */
+ path?: string;
+
+ /**
+ * The port number to connect to for the health check. Required for TCP, UDP, and
+ * SMTP checks. HTTP and HTTPS checks should only define the port when using a
+ * non-standard port (HTTP: default 80, HTTPS: default 443).
+ */
+ port?: number;
+
+ /**
+ * Assign this monitor to emulate the specified zone while probing. This parameter
+ * is only valid for HTTP and HTTPS monitors.
+ */
+ probe_zone?: string;
+
+ /**
+ * The number of retries to attempt in case of a timeout before marking the origin
+ * as unhealthy. Retries are attempted immediately.
+ */
+ retries?: 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', 'TCP', 'ICMP-PING', 'UDP-ICMP', and 'SMTP'.
+ */
+ type?: 'http' | 'https' | 'tcp' | 'udp_icmp' | 'icmp_ping' | 'smtp';
+}
+
+export interface MonitorListResponse {
+ id?: string;
+
+ /**
+ * Do not validate the certificate when monitor use HTTPS. This parameter is
+ * currently only valid for HTTP and HTTPS monitors.
+ */
+ allow_insecure?: boolean;
+
+ /**
+ * To be marked unhealthy the monitored origin must fail this healthcheck N
+ * consecutive times.
+ */
+ consecutive_down?: number;
+
+ /**
+ * To be marked healthy the monitored origin must pass this healthcheck N
+ * consecutive times.
+ */
+ consecutive_up?: number;
+
+ created_on?: string;
+
+ /**
+ * Object description.
+ */
+ description?: string;
+
+ /**
+ * 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. This parameter is only
+ * valid for HTTP and HTTPS monitors.
+ */
+ expected_body?: string;
+
+ /**
+ * The expected HTTP response code or code range of the health check. This
+ * parameter is only valid for HTTP and HTTPS monitors.
+ */
+ expected_codes?: string;
+
+ /**
+ * Follow redirects if returned by the origin. This parameter is only valid for
+ * HTTP and HTTPS monitors.
+ */
+ 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. This
+ * parameter is only valid for HTTP and HTTPS monitors.
+ */
+ header?: unknown;
+
+ /**
+ * The interval between each health check. Shorter intervals may improve failover
+ * time, but will increase load on the origins as we check from multiple locations.
+ */
+ interval?: number;
+
+ /**
+ * The method to use for the health check. This defaults to 'GET' for HTTP/HTTPS
+ * based checks and 'connection_established' for TCP based health checks.
+ */
+ method?: string;
+
+ modified_on?: string;
+
+ /**
+ * The endpoint path you want to conduct a health check against. This parameter is
+ * only valid for HTTP and HTTPS monitors.
+ */
+ path?: string;
+
+ /**
+ * The port number to connect to for the health check. Required for TCP, UDP, and
+ * SMTP checks. HTTP and HTTPS checks should only define the port when using a
+ * non-standard port (HTTP: default 80, HTTPS: default 443).
+ */
+ port?: number;
+
+ /**
+ * Assign this monitor to emulate the specified zone while probing. This parameter
+ * is only valid for HTTP and HTTPS monitors.
+ */
+ probe_zone?: string;
+
+ /**
+ * The number of retries to attempt in case of a timeout before marking the origin
+ * as unhealthy. Retries are attempted immediately.
+ */
+ retries?: 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', 'TCP', 'ICMP-PING', 'UDP-ICMP', and 'SMTP'.
+ */
+ type?: 'http' | 'https' | 'tcp' | 'udp_icmp' | 'icmp_ping' | 'smtp';
+}
+
export interface MonitorDeleteResponse {
id?: string;
}
+export interface MonitorEditResponse {
+ id?: string;
+
+ /**
+ * Do not validate the certificate when monitor use HTTPS. This parameter is
+ * currently only valid for HTTP and HTTPS monitors.
+ */
+ allow_insecure?: boolean;
+
+ /**
+ * To be marked unhealthy the monitored origin must fail this healthcheck N
+ * consecutive times.
+ */
+ consecutive_down?: number;
+
+ /**
+ * To be marked healthy the monitored origin must pass this healthcheck N
+ * consecutive times.
+ */
+ consecutive_up?: number;
+
+ created_on?: string;
+
+ /**
+ * Object description.
+ */
+ description?: string;
+
+ /**
+ * 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. This parameter is only
+ * valid for HTTP and HTTPS monitors.
+ */
+ expected_body?: string;
+
+ /**
+ * The expected HTTP response code or code range of the health check. This
+ * parameter is only valid for HTTP and HTTPS monitors.
+ */
+ expected_codes?: string;
+
+ /**
+ * Follow redirects if returned by the origin. This parameter is only valid for
+ * HTTP and HTTPS monitors.
+ */
+ 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. This
+ * parameter is only valid for HTTP and HTTPS monitors.
+ */
+ header?: unknown;
+
+ /**
+ * The interval between each health check. Shorter intervals may improve failover
+ * time, but will increase load on the origins as we check from multiple locations.
+ */
+ interval?: number;
+
+ /**
+ * The method to use for the health check. This defaults to 'GET' for HTTP/HTTPS
+ * based checks and 'connection_established' for TCP based health checks.
+ */
+ method?: string;
+
+ modified_on?: string;
+
+ /**
+ * The endpoint path you want to conduct a health check against. This parameter is
+ * only valid for HTTP and HTTPS monitors.
+ */
+ path?: string;
+
+ /**
+ * The port number to connect to for the health check. Required for TCP, UDP, and
+ * SMTP checks. HTTP and HTTPS checks should only define the port when using a
+ * non-standard port (HTTP: default 80, HTTPS: default 443).
+ */
+ port?: number;
+
+ /**
+ * Assign this monitor to emulate the specified zone while probing. This parameter
+ * is only valid for HTTP and HTTPS monitors.
+ */
+ probe_zone?: string;
+
+ /**
+ * The number of retries to attempt in case of a timeout before marking the origin
+ * as unhealthy. Retries are attempted immediately.
+ */
+ retries?: 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', 'TCP', 'ICMP-PING', 'UDP-ICMP', and 'SMTP'.
+ */
+ type?: 'http' | 'https' | 'tcp' | 'udp_icmp' | 'icmp_ping' | 'smtp';
+}
+
+export interface MonitorGetResponse {
+ id?: string;
+
+ /**
+ * Do not validate the certificate when monitor use HTTPS. This parameter is
+ * currently only valid for HTTP and HTTPS monitors.
+ */
+ allow_insecure?: boolean;
+
+ /**
+ * To be marked unhealthy the monitored origin must fail this healthcheck N
+ * consecutive times.
+ */
+ consecutive_down?: number;
+
+ /**
+ * To be marked healthy the monitored origin must pass this healthcheck N
+ * consecutive times.
+ */
+ consecutive_up?: number;
+
+ created_on?: string;
+
+ /**
+ * Object description.
+ */
+ description?: string;
+
+ /**
+ * 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. This parameter is only
+ * valid for HTTP and HTTPS monitors.
+ */
+ expected_body?: string;
+
+ /**
+ * The expected HTTP response code or code range of the health check. This
+ * parameter is only valid for HTTP and HTTPS monitors.
+ */
+ expected_codes?: string;
+
+ /**
+ * Follow redirects if returned by the origin. This parameter is only valid for
+ * HTTP and HTTPS monitors.
+ */
+ 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. This
+ * parameter is only valid for HTTP and HTTPS monitors.
+ */
+ header?: unknown;
+
+ /**
+ * The interval between each health check. Shorter intervals may improve failover
+ * time, but will increase load on the origins as we check from multiple locations.
+ */
+ interval?: number;
+
+ /**
+ * The method to use for the health check. This defaults to 'GET' for HTTP/HTTPS
+ * based checks and 'connection_established' for TCP based health checks.
+ */
+ method?: string;
+
+ modified_on?: string;
+
+ /**
+ * The endpoint path you want to conduct a health check against. This parameter is
+ * only valid for HTTP and HTTPS monitors.
+ */
+ path?: string;
+
+ /**
+ * The port number to connect to for the health check. Required for TCP, UDP, and
+ * SMTP checks. HTTP and HTTPS checks should only define the port when using a
+ * non-standard port (HTTP: default 80, HTTPS: default 443).
+ */
+ port?: number;
+
+ /**
+ * Assign this monitor to emulate the specified zone while probing. This parameter
+ * is only valid for HTTP and HTTPS monitors.
+ */
+ probe_zone?: string;
+
+ /**
+ * The number of retries to attempt in case of a timeout before marking the origin
+ * as unhealthy. Retries are attempted immediately.
+ */
+ retries?: 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', 'TCP', 'ICMP-PING', 'UDP-ICMP', and 'SMTP'.
+ */
+ type?: 'http' | 'https' | 'tcp' | 'udp_icmp' | 'icmp_ping' | 'smtp';
+}
+
export interface MonitorCreateParams {
/**
* Path param: Identifier
@@ -461,7 +984,13 @@ export interface MonitorGetParams {
}
export namespace Monitors {
+ export import MonitorCreateResponse = MonitorsAPI.MonitorCreateResponse;
+ export import MonitorUpdateResponse = MonitorsAPI.MonitorUpdateResponse;
+ export import MonitorListResponse = MonitorsAPI.MonitorListResponse;
export import MonitorDeleteResponse = MonitorsAPI.MonitorDeleteResponse;
+ export import MonitorEditResponse = MonitorsAPI.MonitorEditResponse;
+ export import MonitorGetResponse = MonitorsAPI.MonitorGetResponse;
+ export import MonitorListResponsesSinglePage = MonitorsAPI.MonitorListResponsesSinglePage;
export import MonitorCreateParams = MonitorsAPI.MonitorCreateParams;
export import MonitorUpdateParams = MonitorsAPI.MonitorUpdateParams;
export import MonitorListParams = MonitorsAPI.MonitorListParams;
@@ -475,5 +1004,3 @@ export namespace Monitors {
export import ReferenceGetResponse = ReferencesAPI.ReferenceGetResponse;
export import ReferenceGetParams = ReferencesAPI.ReferenceGetParams;
}
-
-export { MonitorsSinglePage };
diff --git a/src/resources/load-balancers/pools/index.ts b/src/resources/load-balancers/pools/index.ts
index 095568cc74..e372279ce3 100644
--- a/src/resources/load-balancers/pools/index.ts
+++ b/src/resources/load-balancers/pools/index.ts
@@ -16,7 +16,6 @@ export {
PoolDeleteParams,
PoolEditParams,
PoolGetParams,
- PoolsSinglePage,
Pools,
} from './pools';
export { ReferenceGetResponse, ReferenceGetParams, References } from './references';
diff --git a/src/resources/load-balancers/pools/pools.ts b/src/resources/load-balancers/pools/pools.ts
index ede6cdcbea..02f0db5786 100644
--- a/src/resources/load-balancers/pools/pools.ts
+++ b/src/resources/load-balancers/pools/pools.ts
@@ -3,10 +3,11 @@
import * as Core from 'cloudflare/core';
import { APIResource } from 'cloudflare/resource';
import * as PoolsAPI from 'cloudflare/resources/load-balancers/pools/pools';
+import * as LoadBalancersPoolsAPI from 'cloudflare/resources/user/load-balancers/pools';
+import { Pool, PoolsSinglePage } from 'cloudflare/resources/user/load-balancers/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 { SinglePage } from 'cloudflare/pagination';
export class Pools extends APIResource {
health: HealthAPI.Health = new HealthAPI.Health(this._client);
@@ -15,33 +16,43 @@ export class Pools extends APIResource {
/**
* Create a new pool.
*/
- create(params: PoolCreateParams, options?: Core.RequestOptions): Core.APIPromise {
+ create(
+ params: PoolCreateParams,
+ options?: Core.RequestOptions,
+ ): Core.APIPromise {
const { account_id, ...body } = params;
return (
this._client.post(`/accounts/${account_id}/load_balancers/pools`, {
body,
...options,
- }) as Core.APIPromise<{ result: Pool }>
+ }) as Core.APIPromise<{ result: LoadBalancersPoolsAPI.Pool }>
)._thenUnwrap((obj) => obj.result);
}
/**
* Modify a configured pool.
*/
- update(poolId: string, params: PoolUpdateParams, options?: Core.RequestOptions): Core.APIPromise {
+ update(
+ poolId: string,
+ params: PoolUpdateParams,
+ options?: Core.RequestOptions,
+ ): Core.APIPromise {
const { account_id, ...body } = params;
return (
this._client.put(`/accounts/${account_id}/load_balancers/pools/${poolId}`, {
body,
...options,
- }) as Core.APIPromise<{ result: Pool }>
+ }) as Core.APIPromise<{ result: LoadBalancersPoolsAPI.Pool }>
)._thenUnwrap((obj) => obj.result);
}
/**
* List configured pools.
*/
- list(params: PoolListParams, options?: Core.RequestOptions): Core.PagePromise {
+ list(
+ params: PoolListParams,
+ options?: Core.RequestOptions,
+ ): Core.PagePromise {
const { account_id, ...query } = params;
return this._client.getAPIList(`/accounts/${account_id}/load_balancers/pools`, PoolsSinglePage, {
query,
@@ -69,31 +80,37 @@ export class Pools extends APIResource {
/**
* Apply changes to an existing pool, overwriting the supplied properties.
*/
- edit(poolId: string, params: PoolEditParams, options?: Core.RequestOptions): Core.APIPromise {
+ edit(
+ poolId: string,
+ params: PoolEditParams,
+ options?: Core.RequestOptions,
+ ): Core.APIPromise {
const { account_id, ...body } = params;
return (
this._client.patch(`/accounts/${account_id}/load_balancers/pools/${poolId}`, {
body,
...options,
- }) as Core.APIPromise<{ result: Pool }>
+ }) as Core.APIPromise<{ result: LoadBalancersPoolsAPI.Pool }>
)._thenUnwrap((obj) => obj.result);
}
/**
* Fetch a single configured pool.
*/
- get(poolId: string, params: PoolGetParams, options?: Core.RequestOptions): Core.APIPromise {
+ get(
+ poolId: string,
+ params: PoolGetParams,
+ options?: Core.RequestOptions,
+ ): Core.APIPromise {
const { account_id } = params;
return (
this._client.get(`/accounts/${account_id}/load_balancers/pools/${poolId}`, options) as Core.APIPromise<{
- result: Pool;
+ result: LoadBalancersPoolsAPI.Pool;
}>
)._thenUnwrap((obj) => obj.result);
}
}
-export class PoolsSinglePage extends SinglePage {}
-
export interface Pool {
id?: string;
@@ -489,7 +506,6 @@ export interface PoolGetParams {
export namespace Pools {
export import Pool = PoolsAPI.Pool;
export import PoolDeleteResponse = PoolsAPI.PoolDeleteResponse;
- export import PoolsSinglePage = PoolsAPI.PoolsSinglePage;
export import PoolCreateParams = PoolsAPI.PoolCreateParams;
export import PoolUpdateParams = PoolsAPI.PoolUpdateParams;
export import PoolListParams = PoolsAPI.PoolListParams;
@@ -505,3 +521,5 @@ export namespace Pools {
export import ReferenceGetResponse = ReferencesAPI.ReferenceGetResponse;
export import ReferenceGetParams = ReferencesAPI.ReferenceGetParams;
}
+
+export { PoolsSinglePage };
diff --git a/src/resources/logpush/index.ts b/src/resources/logpush/index.ts
index a1314332c1..9f7e80a27a 100644
--- a/src/resources/logpush/index.ts
+++ b/src/resources/logpush/index.ts
@@ -4,6 +4,7 @@ export { Datasets } from './datasets/index';
export { InstantLogpushJob, EdgeGetResponse, EdgeCreateParams, EdgeGetParams, Edge } from './edge';
export { Logpush } from './logpush';
export {
+ OwnershipValidation,
OwnershipCreateResponse,
OwnershipCreateParams,
OwnershipValidateParams,
diff --git a/src/resources/logpush/logpush.ts b/src/resources/logpush/logpush.ts
index 40b38ccffe..a5aa768d0b 100644
--- a/src/resources/logpush/logpush.ts
+++ b/src/resources/logpush/logpush.ts
@@ -31,6 +31,7 @@ export namespace Logpush {
export import JobDeleteParams = JobsAPI.JobDeleteParams;
export import JobGetParams = JobsAPI.JobGetParams;
export import Ownership = OwnershipAPI.Ownership;
+ export import OwnershipValidation = OwnershipAPI.OwnershipValidation;
export import OwnershipCreateResponse = OwnershipAPI.OwnershipCreateResponse;
export import OwnershipCreateParams = OwnershipAPI.OwnershipCreateParams;
export import OwnershipValidateParams = OwnershipAPI.OwnershipValidateParams;
diff --git a/src/resources/logpush/ownership.ts b/src/resources/logpush/ownership.ts
index 2a6bd5e130..cb0c76e08e 100644
--- a/src/resources/logpush/ownership.ts
+++ b/src/resources/logpush/ownership.ts
@@ -4,7 +4,6 @@ import * as Core from 'cloudflare/core';
import { APIResource } from 'cloudflare/resource';
import { CloudflareError } from 'cloudflare/error';
import * as OwnershipAPI from 'cloudflare/resources/logpush/ownership';
-import * as Shared from 'cloudflare/resources/shared';
export class Ownership extends APIResource {
/**
@@ -45,7 +44,7 @@ export class Ownership extends APIResource {
validate(
params: OwnershipValidateParams,
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.');
@@ -67,11 +66,15 @@ export class Ownership extends APIResource {
this._client.post(`/${accountOrZone}/${accountOrZoneId}/logpush/ownership/validate`, {
body,
...options,
- }) as Core.APIPromise<{ result: Shared.UnnamedSchemaRefCc2ac1a037e5d6702fc77b3bcb527854 | null }>
+ }) as Core.APIPromise<{ result: OwnershipValidation | null }>
)._thenUnwrap((obj) => obj.result);
}
}
+export interface OwnershipValidation {
+ valid?: boolean;
+}
+
export interface OwnershipCreateResponse {
filename?: string;
@@ -128,6 +131,7 @@ export interface OwnershipValidateParams {
}
export namespace Ownership {
+ export import OwnershipValidation = OwnershipAPI.OwnershipValidation;
export import OwnershipCreateResponse = OwnershipAPI.OwnershipCreateResponse;
export import OwnershipCreateParams = OwnershipAPI.OwnershipCreateParams;
export import OwnershipValidateParams = OwnershipAPI.OwnershipValidateParams;
diff --git a/src/resources/radar/attacks/layer3/top/top.ts b/src/resources/radar/attacks/layer3/top/top.ts
index e8dfdccd2b..9e1f4d02ae 100644
--- a/src/resources/radar/attacks/layer3/top/top.ts
+++ b/src/resources/radar/attacks/layer3/top/top.ts
@@ -3,9 +3,9 @@
import * as Core from 'cloudflare/core';
import { APIResource } from 'cloudflare/resource';
import { isRequestOptions } from 'cloudflare/core';
-import * as TopAPI from 'cloudflare/resources/radar/attacks/layer3/top/top';
-import * as Shared from 'cloudflare/resources/shared';
+import * as TopTopAPI from 'cloudflare/resources/radar/attacks/layer3/top/top';
import * as RadarAPI from 'cloudflare/resources/radar/radar';
+import * as TopAPI from 'cloudflare/resources/radar/http/top';
import * as LocationsAPI from 'cloudflare/resources/radar/attacks/layer3/top/locations';
export class Top extends APIResource {
@@ -107,7 +107,7 @@ export namespace TopAttacksResponse {
export interface TopIndustryResponse {
meta: TopIndustryResponse.Meta;
- top_0: Array;
+ top_0: Array;
}
export namespace TopIndustryResponse {
@@ -131,7 +131,7 @@ export namespace TopIndustryResponse {
export interface TopVerticalResponse {
meta: TopVerticalResponse.Meta;
- top_0: Array;
+ top_0: Array;
}
export namespace TopVerticalResponse {
@@ -388,12 +388,12 @@ export interface TopVerticalParams {
}
export namespace Top {
- export import TopAttacksResponse = TopAPI.TopAttacksResponse;
- export import TopIndustryResponse = TopAPI.TopIndustryResponse;
- export import TopVerticalResponse = TopAPI.TopVerticalResponse;
- export import TopAttacksParams = TopAPI.TopAttacksParams;
- export import TopIndustryParams = TopAPI.TopIndustryParams;
- export import TopVerticalParams = TopAPI.TopVerticalParams;
+ export import TopAttacksResponse = TopTopAPI.TopAttacksResponse;
+ export import TopIndustryResponse = TopTopAPI.TopIndustryResponse;
+ export import TopVerticalResponse = TopTopAPI.TopVerticalResponse;
+ export import TopAttacksParams = TopTopAPI.TopAttacksParams;
+ export import TopIndustryParams = TopTopAPI.TopIndustryParams;
+ export import TopVerticalParams = TopTopAPI.TopVerticalParams;
export import Locations = LocationsAPI.Locations;
export import LocationOriginResponse = LocationsAPI.LocationOriginResponse;
export import LocationTargetResponse = LocationsAPI.LocationTargetResponse;
diff --git a/src/resources/radar/attacks/layer7/top/top.ts b/src/resources/radar/attacks/layer7/top/top.ts
index bfccfac926..435c5efa2a 100644
--- a/src/resources/radar/attacks/layer7/top/top.ts
+++ b/src/resources/radar/attacks/layer7/top/top.ts
@@ -3,9 +3,9 @@
import * as Core from 'cloudflare/core';
import { APIResource } from 'cloudflare/resource';
import { isRequestOptions } from 'cloudflare/core';
-import * as TopAPI from 'cloudflare/resources/radar/attacks/layer7/top/top';
-import * as Shared from 'cloudflare/resources/shared';
+import * as TopTopAPI from 'cloudflare/resources/radar/attacks/layer7/top/top';
import * as RadarAPI from 'cloudflare/resources/radar/radar';
+import * as TopAPI from 'cloudflare/resources/radar/http/top';
import * as AsesAPI from 'cloudflare/resources/radar/attacks/layer7/top/ases';
import * as LocationsAPI from 'cloudflare/resources/radar/attacks/layer7/top/locations';
@@ -114,7 +114,7 @@ export namespace TopAttacksResponse {
export interface TopIndustryResponse {
meta: TopIndustryResponse.Meta;
- top_0: Array;
+ top_0: Array;
}
export namespace TopIndustryResponse {
@@ -138,7 +138,7 @@ export namespace TopIndustryResponse {
export interface TopVerticalResponse {
meta: TopVerticalResponse.Meta;
- top_0: Array;
+ top_0: Array;
}
export namespace TopVerticalResponse {
@@ -392,12 +392,12 @@ export interface TopVerticalParams {
}
export namespace Top {
- export import TopAttacksResponse = TopAPI.TopAttacksResponse;
- export import TopIndustryResponse = TopAPI.TopIndustryResponse;
- export import TopVerticalResponse = TopAPI.TopVerticalResponse;
- export import TopAttacksParams = TopAPI.TopAttacksParams;
- export import TopIndustryParams = TopAPI.TopIndustryParams;
- export import TopVerticalParams = TopAPI.TopVerticalParams;
+ export import TopAttacksResponse = TopTopAPI.TopAttacksResponse;
+ export import TopIndustryResponse = TopTopAPI.TopIndustryResponse;
+ export import TopVerticalResponse = TopTopAPI.TopVerticalResponse;
+ export import TopAttacksParams = TopTopAPI.TopAttacksParams;
+ export import TopIndustryParams = TopTopAPI.TopIndustryParams;
+ export import TopVerticalParams = TopTopAPI.TopVerticalParams;
export import Locations = LocationsAPI.Locations;
export import LocationOriginResponse = LocationsAPI.LocationOriginResponse;
export import LocationTargetResponse = LocationsAPI.LocationTargetResponse;
diff --git a/src/resources/radar/email/security/top/tlds/malicious.ts b/src/resources/radar/email/security/top/tlds/malicious.ts
index af8f9d00fa..885b3662da 100644
--- a/src/resources/radar/email/security/top/tlds/malicious.ts
+++ b/src/resources/radar/email/security/top/tlds/malicious.ts
@@ -4,8 +4,8 @@ import * as Core from 'cloudflare/core';
import { APIResource } from 'cloudflare/resource';
import { isRequestOptions } from 'cloudflare/core';
import * as MaliciousAPI from 'cloudflare/resources/radar/email/security/top/tlds/malicious';
-import * as Shared from 'cloudflare/resources/shared';
import * as RadarAPI from 'cloudflare/resources/radar/radar';
+import * as TopAPI from 'cloudflare/resources/radar/http/top';
export class Malicious extends APIResource {
/**
@@ -40,7 +40,7 @@ export class Malicious extends APIResource {
export interface MaliciousGetResponse {
meta: MaliciousGetResponse.Meta;
- top_0: Array;
+ top_0: Array;
}
export namespace MaliciousGetResponse {
diff --git a/src/resources/radar/email/security/top/tlds/spam.ts b/src/resources/radar/email/security/top/tlds/spam.ts
index 39f0279f18..49dca1686f 100644
--- a/src/resources/radar/email/security/top/tlds/spam.ts
+++ b/src/resources/radar/email/security/top/tlds/spam.ts
@@ -4,8 +4,8 @@ import * as Core from 'cloudflare/core';
import { APIResource } from 'cloudflare/resource';
import { isRequestOptions } from 'cloudflare/core';
import * as SpamAPI from 'cloudflare/resources/radar/email/security/top/tlds/spam';
-import * as Shared from 'cloudflare/resources/shared';
import * as RadarAPI from 'cloudflare/resources/radar/radar';
+import * as TopAPI from 'cloudflare/resources/radar/http/top';
export class Spam extends APIResource {
/**
@@ -37,7 +37,7 @@ export class Spam extends APIResource {
export interface SpamGetResponse {
meta: SpamGetResponse.Meta;
- top_0: Array;
+ top_0: Array;
}
export namespace SpamGetResponse {
diff --git a/src/resources/radar/email/security/top/tlds/spoof.ts b/src/resources/radar/email/security/top/tlds/spoof.ts
index 8af14c4001..a32c180c64 100644
--- a/src/resources/radar/email/security/top/tlds/spoof.ts
+++ b/src/resources/radar/email/security/top/tlds/spoof.ts
@@ -4,8 +4,8 @@ import * as Core from 'cloudflare/core';
import { APIResource } from 'cloudflare/resource';
import { isRequestOptions } from 'cloudflare/core';
import * as SpoofAPI from 'cloudflare/resources/radar/email/security/top/tlds/spoof';
-import * as Shared from 'cloudflare/resources/shared';
import * as RadarAPI from 'cloudflare/resources/radar/radar';
+import * as TopAPI from 'cloudflare/resources/radar/http/top';
export class Spoof extends APIResource {
/**
@@ -37,7 +37,7 @@ export class Spoof extends APIResource {
export interface SpoofGetResponse {
meta: SpoofGetResponse.Meta;
- top_0: Array;
+ top_0: Array;
}
export namespace SpoofGetResponse {
diff --git a/src/resources/radar/email/security/top/tlds/tlds.ts b/src/resources/radar/email/security/top/tlds/tlds.ts
index 8c613b6f4d..2aa71f90ba 100644
--- a/src/resources/radar/email/security/top/tlds/tlds.ts
+++ b/src/resources/radar/email/security/top/tlds/tlds.ts
@@ -4,8 +4,8 @@ import * as Core from 'cloudflare/core';
import { APIResource } from 'cloudflare/resource';
import { isRequestOptions } from 'cloudflare/core';
import * as TldsAPI from 'cloudflare/resources/radar/email/security/top/tlds/tlds';
-import * as Shared from 'cloudflare/resources/shared';
import * as RadarAPI from 'cloudflare/resources/radar/radar';
+import * as TopAPI from 'cloudflare/resources/radar/http/top';
import * as MaliciousAPI from 'cloudflare/resources/radar/email/security/top/tlds/malicious';
import * as SpamAPI from 'cloudflare/resources/radar/email/security/top/tlds/spam';
import * as SpoofAPI from 'cloudflare/resources/radar/email/security/top/tlds/spoof';
@@ -39,7 +39,7 @@ export class Tlds extends APIResource {
export interface TldGetResponse {
meta: TldGetResponse.Meta;
- top_0: Array;
+ top_0: Array;
}
export namespace TldGetResponse {
diff --git a/src/resources/radar/http/http.ts b/src/resources/radar/http/http.ts
index 932f4b2f4e..23b8c64d04 100644
--- a/src/resources/radar/http/http.ts
+++ b/src/resources/radar/http/http.ts
@@ -19,6 +19,7 @@ export class HTTP extends APIResource {
export namespace HTTP {
export import Top = TopAPI.Top;
+ export import Browser = TopAPI.Browser;
export import TopBrowserFamiliesResponse = TopAPI.TopBrowserFamiliesResponse;
export import TopBrowsersResponse = TopAPI.TopBrowsersResponse;
export import TopBrowserFamiliesParams = TopAPI.TopBrowserFamiliesParams;
diff --git a/src/resources/radar/http/index.ts b/src/resources/radar/http/index.ts
index 24ebd47eba..d0f430b2c6 100644
--- a/src/resources/radar/http/index.ts
+++ b/src/resources/radar/http/index.ts
@@ -1,6 +1,14 @@
// File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
export { AseGetResponse, AseGetParams, Ases } from './ases/index';
+export {
+ Browser,
+ TopBrowserFamiliesResponse,
+ TopBrowsersResponse,
+ TopBrowserFamiliesParams,
+ TopBrowsersParams,
+ Top,
+} from './top';
export { HTTP } from './http';
export { LocationGetResponse, LocationGetParams, Locations } from './locations/index';
export {
@@ -41,10 +49,3 @@ export {
TimeseriesGroupTLSVersionParams,
TimeseriesGroups,
} from './timeseries-groups';
-export {
- TopBrowserFamiliesResponse,
- TopBrowsersResponse,
- TopBrowserFamiliesParams,
- TopBrowsersParams,
- Top,
-} from './top';
diff --git a/src/resources/radar/http/top.ts b/src/resources/radar/http/top.ts
index ea667dbf1c..607ec262b3 100644
--- a/src/resources/radar/http/top.ts
+++ b/src/resources/radar/http/top.ts
@@ -4,7 +4,6 @@ import * as Core from 'cloudflare/core';
import { APIResource } from 'cloudflare/resource';
import { isRequestOptions } from 'cloudflare/core';
import * as TopAPI from 'cloudflare/resources/radar/http/top';
-import * as Shared from 'cloudflare/resources/shared';
import * as RadarAPI from 'cloudflare/resources/radar/radar';
export class Top extends APIResource {
@@ -52,10 +51,16 @@ export class Top extends APIResource {
}
}
+export interface Browser {
+ name: string;
+
+ value: string;
+}
+
export interface TopBrowserFamiliesResponse {
meta: TopBrowserFamiliesResponse.Meta;
- top_0: Array;
+ top_0: Array;
}
export namespace TopBrowserFamiliesResponse {
@@ -79,7 +84,7 @@ export namespace TopBrowserFamiliesResponse {
export interface TopBrowsersResponse {
meta: TopBrowsersResponse.Meta;
- top_0: Array;
+ top_0: Array;
}
export namespace TopBrowsersResponse {
@@ -315,6 +320,7 @@ export interface TopBrowsersParams {
}
export namespace Top {
+ export import Browser = TopAPI.Browser;
export import TopBrowserFamiliesResponse = TopAPI.TopBrowserFamiliesResponse;
export import TopBrowsersResponse = TopAPI.TopBrowsersResponse;
export import TopBrowserFamiliesParams = TopAPI.TopBrowserFamiliesParams;
diff --git a/src/resources/secondary-dns/acls.ts b/src/resources/secondary-dns/acls.ts
index 4322b12134..5c641262ff 100644
--- a/src/resources/secondary-dns/acls.ts
+++ b/src/resources/secondary-dns/acls.ts
@@ -90,24 +90,6 @@ export interface ACL {
name: string;
}
-export interface UnnamedSchemaRef08eaa2f22bb9ce0f80063d710d4edafd {
- id: string;
-
- /**
- * Allowed IPv4/IPv6 address range of primary or secondary nameservers. This will
- * be applied for the entire account. The IP range is used to allow additional
- * NOTIFY IPs for secondary zones and IPs Cloudflare allows AXFR/IXFR requests from
- * for primary zones. CIDRs are limited to a maximum of /24 for IPv4 and /64 for
- * IPv6 respectively.
- */
- ip_range: string;
-
- /**
- * The name of the acl.
- */
- name: string;
-}
-
export interface ACLDeleteResponse {
id?: string;
}
@@ -167,7 +149,6 @@ export interface ACLGetParams {
export namespace ACLs {
export import ACL = ACLsAPI.ACL;
- export import UnnamedSchemaRef08eaa2f22bb9ce0f80063d710d4edafd = ACLsAPI.UnnamedSchemaRef08eaa2f22bb9ce0f80063d710d4edafd;
export import ACLDeleteResponse = ACLsAPI.ACLDeleteResponse;
export import ACLsSinglePage = ACLsAPI.ACLsSinglePage;
export import ACLCreateParams = ACLsAPI.ACLCreateParams;
diff --git a/src/resources/secondary-dns/index.ts b/src/resources/secondary-dns/index.ts
index 8f7b6ffe44..d86999b96f 100644
--- a/src/resources/secondary-dns/index.ts
+++ b/src/resources/secondary-dns/index.ts
@@ -2,7 +2,6 @@
export {
ACL,
- UnnamedSchemaRef08eaa2f22bb9ce0f80063d710d4edafd,
ACLDeleteResponse,
ACLCreateParams,
ACLUpdateParams,
@@ -47,7 +46,6 @@ export {
export { SecondaryDNS } from './secondary-dns';
export {
TSIG,
- UnnamedSchemaRefC3d6ffaf5dde0c570eaa72462c2ee738,
TSIGDeleteResponse,
TSIGCreateParams,
TSIGUpdateParams,
diff --git a/src/resources/secondary-dns/secondary-dns.ts b/src/resources/secondary-dns/secondary-dns.ts
index 58e9b74ce6..5ac461d468 100644
--- a/src/resources/secondary-dns/secondary-dns.ts
+++ b/src/resources/secondary-dns/secondary-dns.ts
@@ -50,7 +50,6 @@ export namespace SecondaryDNS {
export import OutgoingGetParams = OutgoingAPI.OutgoingGetParams;
export import ACLs = ACLsAPI.ACLs;
export import ACL = ACLsAPI.ACL;
- export import UnnamedSchemaRef08eaa2f22bb9ce0f80063d710d4edafd = ACLsAPI.UnnamedSchemaRef08eaa2f22bb9ce0f80063d710d4edafd;
export import ACLDeleteResponse = ACLsAPI.ACLDeleteResponse;
export import ACLsSinglePage = ACLsAPI.ACLsSinglePage;
export import ACLCreateParams = ACLsAPI.ACLCreateParams;
@@ -70,7 +69,6 @@ export namespace SecondaryDNS {
export import PeerGetParams = PeersAPI.PeerGetParams;
export import TSIGs = TSIGsAPI.TSIGs;
export import TSIG = TSIGsAPI.TSIG;
- export import UnnamedSchemaRefC3d6ffaf5dde0c570eaa72462c2ee738 = TSIGsAPI.UnnamedSchemaRefC3d6ffaf5dde0c570eaa72462c2ee738;
export import TSIGDeleteResponse = TSIGsAPI.TSIGDeleteResponse;
export import TSIGsSinglePage = TSIGsAPI.TSIGsSinglePage;
export import TSIGCreateParams = TSIGsAPI.TSIGCreateParams;
diff --git a/src/resources/secondary-dns/tsigs.ts b/src/resources/secondary-dns/tsigs.ts
index 3b875ff8fa..b9ba67972f 100644
--- a/src/resources/secondary-dns/tsigs.ts
+++ b/src/resources/secondary-dns/tsigs.ts
@@ -91,25 +91,6 @@ export interface TSIG {
secret: string;
}
-export interface UnnamedSchemaRefC3d6ffaf5dde0c570eaa72462c2ee738 {
- id: string;
-
- /**
- * TSIG algorithm.
- */
- algo: string;
-
- /**
- * TSIG key name.
- */
- name: string;
-
- /**
- * TSIG secret.
- */
- secret: string;
-}
-
export interface TSIGDeleteResponse {
id?: string;
}
@@ -180,7 +161,6 @@ export interface TSIGGetParams {
export namespace TSIGs {
export import TSIG = TSIGsAPI.TSIG;
- export import UnnamedSchemaRefC3d6ffaf5dde0c570eaa72462c2ee738 = TSIGsAPI.UnnamedSchemaRefC3d6ffaf5dde0c570eaa72462c2ee738;
export import TSIGDeleteResponse = TSIGsAPI.TSIGDeleteResponse;
export import TSIGsSinglePage = TSIGsAPI.TSIGsSinglePage;
export import TSIGCreateParams = TSIGsAPI.TSIGCreateParams;
diff --git a/src/resources/shared.ts b/src/resources/shared.ts
index 10f001035d..baf4b50332 100644
--- a/src/resources/shared.ts
+++ b/src/resources/shared.ts
@@ -1,7 +1,6 @@
// File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
import * as Shared from 'cloudflare/resources/shared';
-import * as PoolsAPI from 'cloudflare/resources/load-balancers/pools/pools';
import * as TunnelsAPI from 'cloudflare/resources/zero-trust/tunnels/tunnels';
export interface ErrorData {
@@ -180,12 +179,6 @@ export interface UnnamedSchemaRef025497b7e63379c31929636b5186e45c {
preview_id?: string;
}
-export interface UnnamedSchemaRef2173d81a0b2d332c9e2ac46900fe8bb9 {
- name: string;
-
- value: string;
-}
-
export interface UnnamedSchemaRef23001f1f0b697900e282236466a95fa3 {
batch_size?: number;
@@ -336,117 +329,6 @@ export interface UnnamedSchemaRef70f2c6ccd8a405358ac7ef8fc3d6751c {
export type UnnamedSchemaRef9444735ca60712dbcf8afd832eb5716a = unknown | string | null;
-export type UnnamedSchemaRefB0ec5cc02c98b665099a5707a2db4ea6 = Array;
-
-export interface UnnamedSchemaRefB52ad7cf99890d19f16edcd84d16ef5b {
- id?: string;
-
- /**
- * Do not validate the certificate when monitor use HTTPS. This parameter is
- * currently only valid for HTTP and HTTPS monitors.
- */
- allow_insecure?: boolean;
-
- /**
- * To be marked unhealthy the monitored origin must fail this healthcheck N
- * consecutive times.
- */
- consecutive_down?: number;
-
- /**
- * To be marked healthy the monitored origin must pass this healthcheck N
- * consecutive times.
- */
- consecutive_up?: number;
-
- created_on?: string;
-
- /**
- * Object description.
- */
- description?: string;
-
- /**
- * 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. This parameter is only
- * valid for HTTP and HTTPS monitors.
- */
- expected_body?: string;
-
- /**
- * The expected HTTP response code or code range of the health check. This
- * parameter is only valid for HTTP and HTTPS monitors.
- */
- expected_codes?: string;
-
- /**
- * Follow redirects if returned by the origin. This parameter is only valid for
- * HTTP and HTTPS monitors.
- */
- 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. This
- * parameter is only valid for HTTP and HTTPS monitors.
- */
- header?: unknown;
-
- /**
- * The interval between each health check. Shorter intervals may improve failover
- * time, but will increase load on the origins as we check from multiple locations.
- */
- interval?: number;
-
- /**
- * The method to use for the health check. This defaults to 'GET' for HTTP/HTTPS
- * based checks and 'connection_established' for TCP based health checks.
- */
- method?: string;
-
- modified_on?: string;
-
- /**
- * The endpoint path you want to conduct a health check against. This parameter is
- * only valid for HTTP and HTTPS monitors.
- */
- path?: string;
-
- /**
- * The port number to connect to for the health check. Required for TCP, UDP, and
- * SMTP checks. HTTP and HTTPS checks should only define the port when using a
- * non-standard port (HTTP: default 80, HTTPS: default 443).
- */
- port?: number;
-
- /**
- * Assign this monitor to emulate the specified zone while probing. This parameter
- * is only valid for HTTP and HTTPS monitors.
- */
- probe_zone?: string;
-
- /**
- * The number of retries to attempt in case of a timeout before marking the origin
- * as unhealthy. Retries are attempted immediately.
- */
- retries?: 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', 'TCP', 'ICMP-PING', 'UDP-ICMP', and 'SMTP'.
- */
- type?: 'http' | 'https' | 'tcp' | 'udp_icmp' | 'icmp_ping' | 'smtp';
-}
-
-export interface UnnamedSchemaRefCc2ac1a037e5d6702fc77b3bcb527854 {
- valid?: boolean;
-}
-
/**
* JSON encoded metadata about the uploaded parts and Worker configuration.
*/
diff --git a/src/resources/url-scanner/scans.ts b/src/resources/url-scanner/scans.ts
index a38956ea51..26c822fefe 100644
--- a/src/resources/url-scanner/scans.ts
+++ b/src/resources/url-scanner/scans.ts
@@ -5,7 +5,7 @@ import { APIResource } from 'cloudflare/resource';
import { isRequestOptions } from 'cloudflare/core';
import { type Response } from 'cloudflare/_shims/index';
import * as ScansAPI from 'cloudflare/resources/url-scanner/scans';
-import * as Shared from 'cloudflare/resources/shared';
+import * as TopAPI from 'cloudflare/resources/radar/http/top';
export class Scans extends APIResource {
/**
@@ -314,7 +314,7 @@ export namespace ScanGetResponse {
domain: string;
- headers: Array;
+ headers: Array;
ip: string;
@@ -739,7 +739,7 @@ export namespace ScanHarResponse {
export interface Request {
bodySize: number;
- headers: Array;
+ headers: Array;
headersSize: number;
@@ -757,7 +757,7 @@ export namespace ScanHarResponse {
content: Response.Content;
- headers: Array;
+ headers: Array;
headersSize: number;
diff --git a/src/resources/user/load-balancers/index.ts b/src/resources/user/load-balancers/index.ts
index f9e9cf4990..5070d1d5f3 100644
--- a/src/resources/user/load-balancers/index.ts
+++ b/src/resources/user/load-balancers/index.ts
@@ -3,8 +3,12 @@
export { Analytics, AnalyticsSinglePage } from './analytics/index';
export { LoadBalancers } from './load-balancers';
export {
- Monitor,
+ MonitorCreateResponse,
+ MonitorUpdateResponse,
+ MonitorListResponse,
MonitorDeleteResponse,
+ MonitorEditResponse,
+ MonitorGetResponse,
MonitorPreviewResponse,
MonitorReferencesResponse,
MonitorCreateParams,
@@ -12,10 +16,11 @@ export {
MonitorDeleteParams,
MonitorEditParams,
MonitorPreviewParams,
- MonitorsSinglePage,
+ MonitorListResponsesSinglePage,
Monitors,
} from './monitors';
export {
+ Pool,
PoolDeleteResponse,
PoolHealthResponse,
PoolPreviewResponse,
@@ -26,6 +31,7 @@ export {
PoolDeleteParams,
PoolEditParams,
PoolPreviewParams,
+ PoolsSinglePage,
Pools,
} from './pools';
export { Preview, PreviewResource } from './preview';
diff --git a/src/resources/user/load-balancers/load-balancers.ts b/src/resources/user/load-balancers/load-balancers.ts
index 3896094c02..769981735f 100644
--- a/src/resources/user/load-balancers/load-balancers.ts
+++ b/src/resources/user/load-balancers/load-balancers.ts
@@ -15,21 +15,27 @@ export class LoadBalancers extends APIResource {
export namespace LoadBalancers {
export import Monitors = MonitorsAPI.Monitors;
- export import Monitor = MonitorsAPI.Monitor;
+ export import MonitorCreateResponse = MonitorsAPI.MonitorCreateResponse;
+ export import MonitorUpdateResponse = MonitorsAPI.MonitorUpdateResponse;
+ export import MonitorListResponse = MonitorsAPI.MonitorListResponse;
export import MonitorDeleteResponse = MonitorsAPI.MonitorDeleteResponse;
+ export import MonitorEditResponse = MonitorsAPI.MonitorEditResponse;
+ export import MonitorGetResponse = MonitorsAPI.MonitorGetResponse;
export import MonitorPreviewResponse = MonitorsAPI.MonitorPreviewResponse;
export import MonitorReferencesResponse = MonitorsAPI.MonitorReferencesResponse;
- export import MonitorsSinglePage = MonitorsAPI.MonitorsSinglePage;
+ export import MonitorListResponsesSinglePage = MonitorsAPI.MonitorListResponsesSinglePage;
export import MonitorCreateParams = MonitorsAPI.MonitorCreateParams;
export import MonitorUpdateParams = MonitorsAPI.MonitorUpdateParams;
export import MonitorDeleteParams = MonitorsAPI.MonitorDeleteParams;
export import MonitorEditParams = MonitorsAPI.MonitorEditParams;
export import MonitorPreviewParams = MonitorsAPI.MonitorPreviewParams;
export import Pools = PoolsAPI.Pools;
+ export import Pool = PoolsAPI.Pool;
export import PoolDeleteResponse = PoolsAPI.PoolDeleteResponse;
export import PoolHealthResponse = PoolsAPI.PoolHealthResponse;
export import PoolPreviewResponse = PoolsAPI.PoolPreviewResponse;
export import PoolReferencesResponse = PoolsAPI.PoolReferencesResponse;
+ export import PoolsSinglePage = PoolsAPI.PoolsSinglePage;
export import PoolCreateParams = PoolsAPI.PoolCreateParams;
export import PoolUpdateParams = PoolsAPI.PoolUpdateParams;
export import PoolListParams = PoolsAPI.PoolListParams;
diff --git a/src/resources/user/load-balancers/monitors.ts b/src/resources/user/load-balancers/monitors.ts
index 3d9a8314e5..dcdba6412f 100644
--- a/src/resources/user/load-balancers/monitors.ts
+++ b/src/resources/user/load-balancers/monitors.ts
@@ -9,10 +9,10 @@ export class Monitors extends APIResource {
/**
* Create a configured monitor.
*/
- create(body: MonitorCreateParams, options?: Core.RequestOptions): Core.APIPromise {
+ create(body: MonitorCreateParams, options?: Core.RequestOptions): Core.APIPromise {
return (
this._client.post('/user/load_balancers/monitors', { body, ...options }) as Core.APIPromise<{
- result: Monitor;
+ result: MonitorCreateResponse;
}>
)._thenUnwrap((obj) => obj.result);
}
@@ -24,20 +24,20 @@ export class Monitors extends APIResource {
monitorId: string,
body: MonitorUpdateParams,
options?: Core.RequestOptions,
- ): Core.APIPromise {
+ ): Core.APIPromise {
return (
this._client.put(`/user/load_balancers/monitors/${monitorId}`, {
body,
...options,
- }) as Core.APIPromise<{ result: Monitor }>
+ }) as Core.APIPromise<{ result: MonitorUpdateResponse }>
)._thenUnwrap((obj) => obj.result);
}
/**
* List configured monitors for a user.
*/
- list(options?: Core.RequestOptions): Core.PagePromise {
- return this._client.getAPIList('/user/load_balancers/monitors', MonitorsSinglePage, options);
+ list(options?: Core.RequestOptions): Core.PagePromise {
+ return this._client.getAPIList('/user/load_balancers/monitors', MonitorListResponsesSinglePage, options);
}
/**
@@ -59,22 +59,26 @@ export class Monitors extends APIResource {
/**
* Apply changes to an existing monitor, overwriting the supplied properties.
*/
- edit(monitorId: string, body: MonitorEditParams, options?: Core.RequestOptions): Core.APIPromise {
+ edit(
+ monitorId: string,
+ body: MonitorEditParams,
+ options?: Core.RequestOptions,
+ ): Core.APIPromise {
return (
this._client.patch(`/user/load_balancers/monitors/${monitorId}`, {
body,
...options,
- }) as Core.APIPromise<{ result: Monitor }>
+ }) as Core.APIPromise<{ result: MonitorEditResponse }>
)._thenUnwrap((obj) => obj.result);
}
/**
* List a single configured monitor for a user.
*/
- get(monitorId: string, options?: Core.RequestOptions): Core.APIPromise {
+ get(monitorId: string, options?: Core.RequestOptions): Core.APIPromise {
return (
this._client.get(`/user/load_balancers/monitors/${monitorId}`, options) as Core.APIPromise<{
- result: Monitor;
+ result: MonitorGetResponse;
}>
)._thenUnwrap((obj) => obj.result);
}
@@ -111,9 +115,219 @@ export class Monitors extends APIResource {
}
}
-export class MonitorsSinglePage extends SinglePage {}
+export class MonitorListResponsesSinglePage extends SinglePage {}
+
+export interface MonitorCreateResponse {
+ id?: string;
+
+ /**
+ * Do not validate the certificate when monitor use HTTPS. This parameter is
+ * currently only valid for HTTP and HTTPS monitors.
+ */
+ allow_insecure?: boolean;
+
+ /**
+ * To be marked unhealthy the monitored origin must fail this healthcheck N
+ * consecutive times.
+ */
+ consecutive_down?: number;
+
+ /**
+ * To be marked healthy the monitored origin must pass this healthcheck N
+ * consecutive times.
+ */
+ consecutive_up?: number;
+
+ created_on?: string;
+
+ /**
+ * Object description.
+ */
+ description?: string;
+
+ /**
+ * 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. This parameter is only
+ * valid for HTTP and HTTPS monitors.
+ */
+ expected_body?: string;
+
+ /**
+ * The expected HTTP response code or code range of the health check. This
+ * parameter is only valid for HTTP and HTTPS monitors.
+ */
+ expected_codes?: string;
+
+ /**
+ * Follow redirects if returned by the origin. This parameter is only valid for
+ * HTTP and HTTPS monitors.
+ */
+ 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. This
+ * parameter is only valid for HTTP and HTTPS monitors.
+ */
+ header?: unknown;
+
+ /**
+ * The interval between each health check. Shorter intervals may improve failover
+ * time, but will increase load on the origins as we check from multiple locations.
+ */
+ interval?: number;
+
+ /**
+ * The method to use for the health check. This defaults to 'GET' for HTTP/HTTPS
+ * based checks and 'connection_established' for TCP based health checks.
+ */
+ method?: string;
+
+ modified_on?: string;
+
+ /**
+ * The endpoint path you want to conduct a health check against. This parameter is
+ * only valid for HTTP and HTTPS monitors.
+ */
+ path?: string;
+
+ /**
+ * The port number to connect to for the health check. Required for TCP, UDP, and
+ * SMTP checks. HTTP and HTTPS checks should only define the port when using a
+ * non-standard port (HTTP: default 80, HTTPS: default 443).
+ */
+ port?: number;
+
+ /**
+ * Assign this monitor to emulate the specified zone while probing. This parameter
+ * is only valid for HTTP and HTTPS monitors.
+ */
+ probe_zone?: string;
+
+ /**
+ * The number of retries to attempt in case of a timeout before marking the origin
+ * as unhealthy. Retries are attempted immediately.
+ */
+ retries?: 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', 'TCP', 'ICMP-PING', 'UDP-ICMP', and 'SMTP'.
+ */
+ type?: 'http' | 'https' | 'tcp' | 'udp_icmp' | 'icmp_ping' | 'smtp';
+}
+
+export interface MonitorUpdateResponse {
+ id?: string;
+
+ /**
+ * Do not validate the certificate when monitor use HTTPS. This parameter is
+ * currently only valid for HTTP and HTTPS monitors.
+ */
+ allow_insecure?: boolean;
+
+ /**
+ * To be marked unhealthy the monitored origin must fail this healthcheck N
+ * consecutive times.
+ */
+ consecutive_down?: number;
+
+ /**
+ * To be marked healthy the monitored origin must pass this healthcheck N
+ * consecutive times.
+ */
+ consecutive_up?: number;
+
+ created_on?: string;
+
+ /**
+ * Object description.
+ */
+ description?: string;
+
+ /**
+ * 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. This parameter is only
+ * valid for HTTP and HTTPS monitors.
+ */
+ expected_body?: string;
+
+ /**
+ * The expected HTTP response code or code range of the health check. This
+ * parameter is only valid for HTTP and HTTPS monitors.
+ */
+ expected_codes?: string;
+
+ /**
+ * Follow redirects if returned by the origin. This parameter is only valid for
+ * HTTP and HTTPS monitors.
+ */
+ 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. This
+ * parameter is only valid for HTTP and HTTPS monitors.
+ */
+ header?: unknown;
+
+ /**
+ * The interval between each health check. Shorter intervals may improve failover
+ * time, but will increase load on the origins as we check from multiple locations.
+ */
+ interval?: number;
+
+ /**
+ * The method to use for the health check. This defaults to 'GET' for HTTP/HTTPS
+ * based checks and 'connection_established' for TCP based health checks.
+ */
+ method?: string;
+
+ modified_on?: string;
+
+ /**
+ * The endpoint path you want to conduct a health check against. This parameter is
+ * only valid for HTTP and HTTPS monitors.
+ */
+ path?: string;
+
+ /**
+ * The port number to connect to for the health check. Required for TCP, UDP, and
+ * SMTP checks. HTTP and HTTPS checks should only define the port when using a
+ * non-standard port (HTTP: default 80, HTTPS: default 443).
+ */
+ port?: number;
+
+ /**
+ * Assign this monitor to emulate the specified zone while probing. This parameter
+ * is only valid for HTTP and HTTPS monitors.
+ */
+ probe_zone?: string;
+
+ /**
+ * The number of retries to attempt in case of a timeout before marking the origin
+ * as unhealthy. Retries are attempted immediately.
+ */
+ retries?: 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', 'TCP', 'ICMP-PING', 'UDP-ICMP', and 'SMTP'.
+ */
+ type?: 'http' | 'https' | 'tcp' | 'udp_icmp' | 'icmp_ping' | 'smtp';
+}
-export interface Monitor {
+export interface MonitorListResponse {
id?: string;
/**
@@ -222,6 +436,216 @@ export interface MonitorDeleteResponse {
id?: string;
}
+export interface MonitorEditResponse {
+ id?: string;
+
+ /**
+ * Do not validate the certificate when monitor use HTTPS. This parameter is
+ * currently only valid for HTTP and HTTPS monitors.
+ */
+ allow_insecure?: boolean;
+
+ /**
+ * To be marked unhealthy the monitored origin must fail this healthcheck N
+ * consecutive times.
+ */
+ consecutive_down?: number;
+
+ /**
+ * To be marked healthy the monitored origin must pass this healthcheck N
+ * consecutive times.
+ */
+ consecutive_up?: number;
+
+ created_on?: string;
+
+ /**
+ * Object description.
+ */
+ description?: string;
+
+ /**
+ * 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. This parameter is only
+ * valid for HTTP and HTTPS monitors.
+ */
+ expected_body?: string;
+
+ /**
+ * The expected HTTP response code or code range of the health check. This
+ * parameter is only valid for HTTP and HTTPS monitors.
+ */
+ expected_codes?: string;
+
+ /**
+ * Follow redirects if returned by the origin. This parameter is only valid for
+ * HTTP and HTTPS monitors.
+ */
+ 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. This
+ * parameter is only valid for HTTP and HTTPS monitors.
+ */
+ header?: unknown;
+
+ /**
+ * The interval between each health check. Shorter intervals may improve failover
+ * time, but will increase load on the origins as we check from multiple locations.
+ */
+ interval?: number;
+
+ /**
+ * The method to use for the health check. This defaults to 'GET' for HTTP/HTTPS
+ * based checks and 'connection_established' for TCP based health checks.
+ */
+ method?: string;
+
+ modified_on?: string;
+
+ /**
+ * The endpoint path you want to conduct a health check against. This parameter is
+ * only valid for HTTP and HTTPS monitors.
+ */
+ path?: string;
+
+ /**
+ * The port number to connect to for the health check. Required for TCP, UDP, and
+ * SMTP checks. HTTP and HTTPS checks should only define the port when using a
+ * non-standard port (HTTP: default 80, HTTPS: default 443).
+ */
+ port?: number;
+
+ /**
+ * Assign this monitor to emulate the specified zone while probing. This parameter
+ * is only valid for HTTP and HTTPS monitors.
+ */
+ probe_zone?: string;
+
+ /**
+ * The number of retries to attempt in case of a timeout before marking the origin
+ * as unhealthy. Retries are attempted immediately.
+ */
+ retries?: 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', 'TCP', 'ICMP-PING', 'UDP-ICMP', and 'SMTP'.
+ */
+ type?: 'http' | 'https' | 'tcp' | 'udp_icmp' | 'icmp_ping' | 'smtp';
+}
+
+export interface MonitorGetResponse {
+ id?: string;
+
+ /**
+ * Do not validate the certificate when monitor use HTTPS. This parameter is
+ * currently only valid for HTTP and HTTPS monitors.
+ */
+ allow_insecure?: boolean;
+
+ /**
+ * To be marked unhealthy the monitored origin must fail this healthcheck N
+ * consecutive times.
+ */
+ consecutive_down?: number;
+
+ /**
+ * To be marked healthy the monitored origin must pass this healthcheck N
+ * consecutive times.
+ */
+ consecutive_up?: number;
+
+ created_on?: string;
+
+ /**
+ * Object description.
+ */
+ description?: string;
+
+ /**
+ * 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. This parameter is only
+ * valid for HTTP and HTTPS monitors.
+ */
+ expected_body?: string;
+
+ /**
+ * The expected HTTP response code or code range of the health check. This
+ * parameter is only valid for HTTP and HTTPS monitors.
+ */
+ expected_codes?: string;
+
+ /**
+ * Follow redirects if returned by the origin. This parameter is only valid for
+ * HTTP and HTTPS monitors.
+ */
+ 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. This
+ * parameter is only valid for HTTP and HTTPS monitors.
+ */
+ header?: unknown;
+
+ /**
+ * The interval between each health check. Shorter intervals may improve failover
+ * time, but will increase load on the origins as we check from multiple locations.
+ */
+ interval?: number;
+
+ /**
+ * The method to use for the health check. This defaults to 'GET' for HTTP/HTTPS
+ * based checks and 'connection_established' for TCP based health checks.
+ */
+ method?: string;
+
+ modified_on?: string;
+
+ /**
+ * The endpoint path you want to conduct a health check against. This parameter is
+ * only valid for HTTP and HTTPS monitors.
+ */
+ path?: string;
+
+ /**
+ * The port number to connect to for the health check. Required for TCP, UDP, and
+ * SMTP checks. HTTP and HTTPS checks should only define the port when using a
+ * non-standard port (HTTP: default 80, HTTPS: default 443).
+ */
+ port?: number;
+
+ /**
+ * Assign this monitor to emulate the specified zone while probing. This parameter
+ * is only valid for HTTP and HTTPS monitors.
+ */
+ probe_zone?: string;
+
+ /**
+ * The number of retries to attempt in case of a timeout before marking the origin
+ * as unhealthy. Retries are attempted immediately.
+ */
+ retries?: 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', 'TCP', 'ICMP-PING', 'UDP-ICMP', and 'SMTP'.
+ */
+ type?: 'http' | 'https' | 'tcp' | 'udp_icmp' | 'icmp_ping' | 'smtp';
+}
+
export interface MonitorPreviewResponse {
/**
* Monitored pool IDs mapped to their respective names.
@@ -647,11 +1071,15 @@ export interface MonitorPreviewParams {
}
export namespace Monitors {
- export import Monitor = MonitorsAPI.Monitor;
+ export import MonitorCreateResponse = MonitorsAPI.MonitorCreateResponse;
+ export import MonitorUpdateResponse = MonitorsAPI.MonitorUpdateResponse;
+ export import MonitorListResponse = MonitorsAPI.MonitorListResponse;
export import MonitorDeleteResponse = MonitorsAPI.MonitorDeleteResponse;
+ export import MonitorEditResponse = MonitorsAPI.MonitorEditResponse;
+ export import MonitorGetResponse = MonitorsAPI.MonitorGetResponse;
export import MonitorPreviewResponse = MonitorsAPI.MonitorPreviewResponse;
export import MonitorReferencesResponse = MonitorsAPI.MonitorReferencesResponse;
- export import MonitorsSinglePage = MonitorsAPI.MonitorsSinglePage;
+ export import MonitorListResponsesSinglePage = MonitorsAPI.MonitorListResponsesSinglePage;
export import MonitorCreateParams = MonitorsAPI.MonitorCreateParams;
export import MonitorUpdateParams = MonitorsAPI.MonitorUpdateParams;
export import MonitorDeleteParams = MonitorsAPI.MonitorDeleteParams;
diff --git a/src/resources/user/load-balancers/pools.ts b/src/resources/user/load-balancers/pools.ts
index 470e776542..63cc5ba6ec 100644
--- a/src/resources/user/load-balancers/pools.ts
+++ b/src/resources/user/load-balancers/pools.ts
@@ -3,19 +3,18 @@
import * as Core from 'cloudflare/core';
import { APIResource } from 'cloudflare/resource';
import { isRequestOptions } from 'cloudflare/core';
-import * as LoadBalancersPoolsAPI from 'cloudflare/resources/user/load-balancers/pools';
+import * as PoolsAPI from 'cloudflare/resources/user/load-balancers/pools';
import * as LoadBalancersAPI from 'cloudflare/resources/load-balancers/load-balancers';
-import * as PoolsAPI from 'cloudflare/resources/load-balancers/pools/pools';
-import { PoolsSinglePage } from 'cloudflare/resources/load-balancers/pools/pools';
+import { SinglePage } from 'cloudflare/pagination';
export class Pools extends APIResource {
/**
* Create a new pool.
*/
- create(body: PoolCreateParams, options?: Core.RequestOptions): Core.APIPromise {
+ create(body: PoolCreateParams, options?: Core.RequestOptions): Core.APIPromise {
return (
this._client.post('/user/load_balancers/pools', { body, ...options }) as Core.APIPromise<{
- result: PoolsAPI.Pool;
+ result: Pool;
}>
)._thenUnwrap((obj) => obj.result);
}
@@ -23,14 +22,10 @@ export class Pools extends APIResource {
/**
* Modify a configured pool.
*/
- update(
- poolId: string,
- body: PoolUpdateParams,
- options?: Core.RequestOptions,
- ): Core.APIPromise {
+ update(poolId: string, body: PoolUpdateParams, options?: Core.RequestOptions): Core.APIPromise {
return (
this._client.put(`/user/load_balancers/pools/${poolId}`, { body, ...options }) as Core.APIPromise<{
- result: PoolsAPI.Pool;
+ result: Pool;
}>
)._thenUnwrap((obj) => obj.result);
}
@@ -38,15 +33,12 @@ export class Pools extends APIResource {
/**
* List configured pools.
*/
- list(
- query?: PoolListParams,
- options?: Core.RequestOptions,
- ): Core.PagePromise;
- list(options?: Core.RequestOptions): Core.PagePromise;
+ list(query?: PoolListParams, options?: Core.RequestOptions): Core.PagePromise;
+ list(options?: Core.RequestOptions): Core.PagePromise;
list(
query: PoolListParams | Core.RequestOptions = {},
options?: Core.RequestOptions,
- ): Core.PagePromise {
+ ): Core.PagePromise {
if (isRequestOptions(query)) {
return this.list({}, query);
}
@@ -71,10 +63,10 @@ export class Pools extends APIResource {
/**
* Apply changes to an existing pool, overwriting the supplied properties.
*/
- edit(poolId: string, body: PoolEditParams, options?: Core.RequestOptions): Core.APIPromise {
+ edit(poolId: string, body: PoolEditParams, options?: Core.RequestOptions): Core.APIPromise {
return (
this._client.patch(`/user/load_balancers/pools/${poolId}`, { body, ...options }) as Core.APIPromise<{
- result: PoolsAPI.Pool;
+ result: Pool;
}>
)._thenUnwrap((obj) => obj.result);
}
@@ -82,11 +74,9 @@ export class Pools extends APIResource {
/**
* Fetch a single configured pool.
*/
- get(poolId: string, options?: Core.RequestOptions): Core.APIPromise {
+ get(poolId: string, options?: Core.RequestOptions): Core.APIPromise {
return (
- this._client.get(`/user/load_balancers/pools/${poolId}`, options) as Core.APIPromise<{
- result: PoolsAPI.Pool;
- }>
+ this._client.get(`/user/load_balancers/pools/${poolId}`, options) as Core.APIPromise<{ result: Pool }>
)._thenUnwrap((obj) => obj.result);
}
@@ -130,6 +120,103 @@ export class Pools extends APIResource {
}
}
+export class PoolsSinglePage extends SinglePage {}
+
+export interface Pool {
+ id?: string;
+
+ /**
+ * A list of regions from which to run health checks. Null means every Cloudflare
+ * data center.
+ */
+ check_regions?: Array | null;
+
+ created_on?: string;
+
+ /**
+ * A human-readable description of the pool.
+ */
+ description?: string;
+
+ /**
+ * This field shows up only if the pool is disabled. This field is set with the
+ * time the pool was disabled at.
+ */
+ disabled_at?: string;
+
+ /**
+ * Whether to enable (the default) or disable this pool. Disabled pools will not
+ * receive traffic and are excluded from health checks. Disabling a pool will cause
+ * any load balancers using it to failover to the next pool (if any).
+ */
+ enabled?: boolean;
+
+ /**
+ * The latitude of the data center containing the origins used in this pool in
+ * decimal degrees. If this is set, longitude must also be set.
+ */
+ latitude?: number;
+
+ /**
+ * Configures load shedding policies and percentages for the pool.
+ */
+ load_shedding?: LoadBalancersAPI.LoadShedding;
+
+ /**
+ * The longitude of the data center containing the origins used in this pool in
+ * decimal degrees. If this is set, latitude must also be set.
+ */
+ longitude?: number;
+
+ /**
+ * The minimum number of origins that must be healthy for this pool to serve
+ * traffic. If the number of healthy origins falls below this number, the pool will
+ * be marked unhealthy and will failover to the next available pool.
+ */
+ minimum_origins?: number;
+
+ modified_on?: string;
+
+ /**
+ * The ID of the Monitor to use for checking the health of origins within this
+ * pool.
+ */
+ monitor?: unknown;
+
+ /**
+ * A short name (tag) for the pool. Only alphanumeric characters, hyphens, and
+ * underscores are allowed.
+ */
+ name?: string;
+
+ /**
+ * This field is now deprecated. It has been moved to Cloudflare's Centralized
+ * Notification service
+ * https://developers.cloudflare.com/fundamentals/notifications/. The email address
+ * to send health status notifications to. This can be an individual mailbox or a
+ * mailing list. Multiple emails can be supplied as a comma delimited list.
+ */
+ notification_email?: string;
+
+ /**
+ * Filter pool and origin health notifications by resource type or health status.
+ * Use null to reset.
+ */
+ notification_filter?: LoadBalancersAPI.NotificationFilter | null;
+
+ /**
+ * Configures origin steering for the pool. Controls how origins are selected for
+ * new sessions and traffic without session affinity.
+ */
+ origin_steering?: LoadBalancersAPI.OriginSteering;
+
+ /**
+ * 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 interface PoolDeleteResponse {
id?: string;
}
@@ -525,16 +612,16 @@ export interface PoolPreviewParams {
}
export namespace Pools {
- export import PoolDeleteResponse = LoadBalancersPoolsAPI.PoolDeleteResponse;
- export import PoolHealthResponse = LoadBalancersPoolsAPI.PoolHealthResponse;
- export import PoolPreviewResponse = LoadBalancersPoolsAPI.PoolPreviewResponse;
- export import PoolReferencesResponse = LoadBalancersPoolsAPI.PoolReferencesResponse;
- export import PoolCreateParams = LoadBalancersPoolsAPI.PoolCreateParams;
- export import PoolUpdateParams = LoadBalancersPoolsAPI.PoolUpdateParams;
- export import PoolListParams = LoadBalancersPoolsAPI.PoolListParams;
- export import PoolDeleteParams = LoadBalancersPoolsAPI.PoolDeleteParams;
- export import PoolEditParams = LoadBalancersPoolsAPI.PoolEditParams;
- export import PoolPreviewParams = LoadBalancersPoolsAPI.PoolPreviewParams;
+ export import Pool = PoolsAPI.Pool;
+ export import PoolDeleteResponse = PoolsAPI.PoolDeleteResponse;
+ export import PoolHealthResponse = PoolsAPI.PoolHealthResponse;
+ export import PoolPreviewResponse = PoolsAPI.PoolPreviewResponse;
+ export import PoolReferencesResponse = PoolsAPI.PoolReferencesResponse;
+ export import PoolsSinglePage = PoolsAPI.PoolsSinglePage;
+ export import PoolCreateParams = PoolsAPI.PoolCreateParams;
+ export import PoolUpdateParams = PoolsAPI.PoolUpdateParams;
+ export import PoolListParams = PoolsAPI.PoolListParams;
+ export import PoolDeleteParams = PoolsAPI.PoolDeleteParams;
+ export import PoolEditParams = PoolsAPI.PoolEditParams;
+ export import PoolPreviewParams = PoolsAPI.PoolPreviewParams;
}
-
-export { PoolsSinglePage };
diff --git a/src/resources/waiting-rooms/index.ts b/src/resources/waiting-rooms/index.ts
index 9aa1aa46b4..4efa54c818 100644
--- a/src/resources/waiting-rooms/index.ts
+++ b/src/resources/waiting-rooms/index.ts
@@ -29,9 +29,8 @@ export {
RulesSinglePage,
Rules,
} from './rules';
-export { StatusGetResponse, StatusGetParams, Statuses } from './statuses';
export {
- UnnamedSchemaRef59ecd22a3d62548e441274daec82ee7a,
+ Setting,
SettingUpdateResponse,
SettingEditResponse,
SettingGetResponse,
@@ -40,4 +39,5 @@ export {
SettingGetParams,
Settings,
} from './settings';
+export { StatusGetResponse, StatusGetParams, Statuses } from './statuses';
export { WaitingRooms } from './waiting-rooms';
diff --git a/src/resources/waiting-rooms/settings.ts b/src/resources/waiting-rooms/settings.ts
index 77c0f20d48..72f069839c 100644
--- a/src/resources/waiting-rooms/settings.ts
+++ b/src/resources/waiting-rooms/settings.ts
@@ -43,7 +43,7 @@ export class Settings extends APIResource {
}
}
-export interface UnnamedSchemaRef59ecd22a3d62548e441274daec82ee7a {
+export interface Setting {
/**
* Whether to allow verified search engine crawlers to bypass all waiting rooms on
* this zone. Verified search engine crawlers will not be tracked or counted by the
@@ -117,7 +117,7 @@ export interface SettingGetParams {
}
export namespace Settings {
- export import UnnamedSchemaRef59ecd22a3d62548e441274daec82ee7a = SettingsAPI.UnnamedSchemaRef59ecd22a3d62548e441274daec82ee7a;
+ export import Setting = SettingsAPI.Setting;
export import SettingUpdateResponse = SettingsAPI.SettingUpdateResponse;
export import SettingEditResponse = SettingsAPI.SettingEditResponse;
export import SettingGetResponse = SettingsAPI.SettingGetResponse;
diff --git a/src/resources/waiting-rooms/waiting-rooms.ts b/src/resources/waiting-rooms/waiting-rooms.ts
index 9e37435ea0..72db09742a 100644
--- a/src/resources/waiting-rooms/waiting-rooms.ts
+++ b/src/resources/waiting-rooms/waiting-rooms.ts
@@ -477,351 +477,6 @@ export interface Query {
suspended?: boolean;
}
-export interface UnnamedSchemaRefA282afe149b2cf60a204505bd4c53324 {
- id?: string;
-
- /**
- * Only available for the Waiting Room Advanced subscription. Additional hostname
- * and path combinations to which this waiting room will be applied. There is an
- * implied wildcard at the end of the path. The hostname and path combination must
- * be unique to this and all other waiting rooms.
- */
- additional_routes?: Array;
-
- /**
- * Configures cookie attributes for the waiting room cookie. This encrypted cookie
- * stores a user's status in the waiting room, such as queue position.
- */
- cookie_attributes?: CookieAttributes;
-
- /**
- * Appends a '\_' + a custom suffix to the end of Cloudflare Waiting Room's cookie
- * name(**cf_waitingroom). If `cookie_suffix` is "abcd", the cookie name will be
- * `**cf_waitingroom_abcd`. This field is required if using `additional_routes`.
- */
- cookie_suffix?: string;
-
- created_on?: string;
-
- /**
- * Only available for the Waiting Room Advanced subscription. This is a template
- * html file that will be rendered at the edge. If no custom_page_html is provided,
- * the default waiting room will be used. The template is based on mustache (
- * https://mustache.github.io/ ). There are several variables that are evaluated by
- * the Cloudflare edge:
- *
- * 1. {{`waitTimeKnown`}} Acts like a boolean value that indicates the behavior to
- * take when wait time is not available, for instance when queue_all is
- * **true**.
- * 2. {{`waitTimeFormatted`}} Estimated wait time for the user. For example, five
- * minutes. Alternatively, you can use:
- * 3. {{`waitTime`}} Number of minutes of estimated wait for a user.
- * 4. {{`waitTimeHours`}} Number of hours of estimated wait for a user
- * (`Math.floor(waitTime/60)`).
- * 5. {{`waitTimeHourMinutes`}} Number of minutes above the `waitTimeHours` value
- * (`waitTime%60`).
- * 6. {{`queueIsFull`}} Changes to **true** when no more people can be added to the
- * queue.
- *
- * To view the full list of variables, look at the `cfWaitingRoom` object described
- * under the `json_response_enabled` property in other Waiting Room API calls.
- */
- custom_page_html?: string;
-
- /**
- * The language of the default page template. If no default_template_language is
- * provided, then `en-US` (English) will be used.
- */
- default_template_language?:
- | 'en-US'
- | 'es-ES'
- | 'de-DE'
- | 'fr-FR'
- | 'it-IT'
- | 'ja-JP'
- | 'ko-KR'
- | 'pt-BR'
- | 'zh-CN'
- | 'zh-TW'
- | 'nl-NL'
- | 'pl-PL'
- | 'id-ID'
- | 'tr-TR'
- | 'ar-EG'
- | 'ru-RU'
- | 'fa-IR';
-
- /**
- * A note that you can use to add more details about the waiting room.
- */
- description?: string;
-
- /**
- * Only available for the Waiting Room Advanced subscription. Disables automatic
- * renewal of session cookies. If `true`, an accepted user will have
- * session_duration minutes to browse the site. After that, they will have to go
- * through the waiting room again. If `false`, a user's session cookie will be
- * automatically renewed on every request.
- */
- disable_session_renewal?: boolean;
-
- /**
- * The host name to which the waiting room will be applied (no wildcards). Please
- * do not include the scheme (http:// or https://). The host and path combination
- * must be unique.
- */
- host?: string;
-
- /**
- * Only available for the Waiting Room Advanced subscription. If `true`, requests
- * to the waiting room with the header `Accept: application/json` will receive a
- * JSON response object with information on the user's status in the waiting room
- * as opposed to the configured static HTML page. This JSON response object has one
- * property `cfWaitingRoom` which is an object containing the following fields:
- *
- * 1. `inWaitingRoom`: Boolean indicating if the user is in the waiting room
- * (always **true**).
- * 2. `waitTimeKnown`: Boolean indicating if the current estimated wait times are
- * accurate. If **false**, they are not available.
- * 3. `waitTime`: Valid only when `waitTimeKnown` is **true**. Integer indicating
- * the current estimated time in minutes the user will wait in the waiting room.
- * When `queueingMethod` is **random**, this is set to `waitTime50Percentile`.
- * 4. `waitTime25Percentile`: Valid only when `queueingMethod` is **random** and
- * `waitTimeKnown` is **true**. Integer indicating the current estimated maximum
- * wait time for the 25% of users that gain entry the fastest (25th percentile).
- * 5. `waitTime50Percentile`: Valid only when `queueingMethod` is **random** and
- * `waitTimeKnown` is **true**. Integer indicating the current estimated maximum
- * wait time for the 50% of users that gain entry the fastest (50th percentile).
- * In other words, half of the queued users are expected to let into the origin
- * website before `waitTime50Percentile` and half are expected to be let in
- * after it.
- * 6. `waitTime75Percentile`: Valid only when `queueingMethod` is **random** and
- * `waitTimeKnown` is **true**. Integer indicating the current estimated maximum
- * wait time for the 75% of users that gain entry the fastest (75th percentile).
- * 7. `waitTimeFormatted`: String displaying the `waitTime` formatted in English
- * for users. If `waitTimeKnown` is **false**, `waitTimeFormatted` will display
- * **unavailable**.
- * 8. `queueIsFull`: Boolean indicating if the waiting room's queue is currently
- * full and not accepting new users at the moment.
- * 9. `queueAll`: Boolean indicating if all users will be queued in the waiting
- * room and no one will be let into the origin website.
- * 10. `lastUpdated`: String displaying the timestamp as an ISO 8601 string of the
- * user's last attempt to leave the waiting room and be let into the origin
- * website. The user is able to make another attempt after
- * `refreshIntervalSeconds` past this time. If the user makes a request too
- * soon, it will be ignored and `lastUpdated` will not change.
- * 11. `refreshIntervalSeconds`: Integer indicating the number of seconds after
- * `lastUpdated` until the user is able to make another attempt to leave the
- * waiting room and be let into the origin website. When the `queueingMethod`
- * is `reject`, there is no specified refresh time — it will always be
- * **zero**.
- * 12. `queueingMethod`: The queueing method currently used by the waiting room. It
- * is either **fifo**, **random**, **passthrough**, or **reject**.
- * 13. `isFIFOQueue`: Boolean indicating if the waiting room uses a FIFO
- * (First-In-First-Out) queue.
- * 14. `isRandomQueue`: Boolean indicating if the waiting room uses a Random queue
- * where users gain access randomly.
- * 15. `isPassthroughQueue`: Boolean indicating if the waiting room uses a
- * passthrough queue. Keep in mind that when passthrough is enabled, this JSON
- * response will only exist when `queueAll` is **true** or `isEventPrequeueing`
- * is **true** because in all other cases requests will go directly to the
- * origin.
- * 16. `isRejectQueue`: Boolean indicating if the waiting room uses a reject queue.
- * 17. `isEventActive`: Boolean indicating if an event is currently occurring.
- * Events are able to change a waiting room's behavior during a specified
- * period of time. For additional information, look at the event properties
- * `prequeue_start_time`, `event_start_time`, and `event_end_time` in the
- * documentation for creating waiting room events. Events are considered active
- * between these start and end times, as well as during the prequeueing period
- * if it exists.
- * 18. `isEventPrequeueing`: Valid only when `isEventActive` is **true**. Boolean
- * indicating if an event is currently prequeueing users before it starts.
- * 19. `timeUntilEventStart`: Valid only when `isEventPrequeueing` is **true**.
- * Integer indicating the number of minutes until the event starts.
- * 20. `timeUntilEventStartFormatted`: String displaying the `timeUntilEventStart`
- * formatted in English for users. If `isEventPrequeueing` is **false**,
- * `timeUntilEventStartFormatted` will display **unavailable**.
- * 21. `timeUntilEventEnd`: Valid only when `isEventActive` is **true**. Integer
- * indicating the number of minutes until the event ends.
- * 22. `timeUntilEventEndFormatted`: String displaying the `timeUntilEventEnd`
- * formatted in English for users. If `isEventActive` is **false**,
- * `timeUntilEventEndFormatted` will display **unavailable**.
- * 23. `shuffleAtEventStart`: Valid only when `isEventActive` is **true**. Boolean
- * indicating if the users in the prequeue are shuffled randomly when the event
- * starts.
- *
- * An example cURL to a waiting room could be:
- *
- * curl -X GET "https://example.com/waitingroom" \
- * -H "Accept: application/json"
- *
- * If `json_response_enabled` is **true** and the request hits the waiting room, an
- * example JSON response when `queueingMethod` is **fifo** and no event is active
- * could be:
- *
- * {
- * "cfWaitingRoom": {
- * "inWaitingRoom": true,
- * "waitTimeKnown": true,
- * "waitTime": 10,
- * "waitTime25Percentile": 0,
- * "waitTime50Percentile": 0,
- * "waitTime75Percentile": 0,
- * "waitTimeFormatted": "10 minutes",
- * "queueIsFull": false,
- * "queueAll": false,
- * "lastUpdated": "2020-08-03T23:46:00.000Z",
- * "refreshIntervalSeconds": 20,
- * "queueingMethod": "fifo",
- * "isFIFOQueue": true,
- * "isRandomQueue": false,
- * "isPassthroughQueue": false,
- * "isRejectQueue": false,
- * "isEventActive": false,
- * "isEventPrequeueing": false,
- * "timeUntilEventStart": 0,
- * "timeUntilEventStartFormatted": "unavailable",
- * "timeUntilEventEnd": 0,
- * "timeUntilEventEndFormatted": "unavailable",
- * "shuffleAtEventStart": false
- * }
- * }
- *
- * If `json_response_enabled` is **true** and the request hits the waiting room, an
- * example JSON response when `queueingMethod` is **random** and an event is active
- * could be:
- *
- * {
- * "cfWaitingRoom": {
- * "inWaitingRoom": true,
- * "waitTimeKnown": true,
- * "waitTime": 10,
- * "waitTime25Percentile": 5,
- * "waitTime50Percentile": 10,
- * "waitTime75Percentile": 15,
- * "waitTimeFormatted": "5 minutes to 15 minutes",
- * "queueIsFull": false,
- * "queueAll": false,
- * "lastUpdated": "2020-08-03T23:46:00.000Z",
- * "refreshIntervalSeconds": 20,
- * "queueingMethod": "random",
- * "isFIFOQueue": false,
- * "isRandomQueue": true,
- * "isPassthroughQueue": false,
- * "isRejectQueue": false,
- * "isEventActive": true,
- * "isEventPrequeueing": false,
- * "timeUntilEventStart": 0,
- * "timeUntilEventStartFormatted": "unavailable",
- * "timeUntilEventEnd": 15,
- * "timeUntilEventEndFormatted": "15 minutes",
- * "shuffleAtEventStart": true
- * }
- * }.
- */
- json_response_enabled?: boolean;
-
- modified_on?: string;
-
- /**
- * A unique name to identify the waiting room. Only alphanumeric characters,
- * hyphens and underscores are allowed.
- */
- name?: string;
-
- /**
- * Sets the number of new users that will be let into the route every minute. This
- * value is used as baseline for the number of users that are let in per minute. So
- * it is possible that there is a little more or little less traffic coming to the
- * route based on the traffic patterns at that time around the world.
- */
- new_users_per_minute?: number;
-
- /**
- * An ISO 8601 timestamp that marks when the next event will begin queueing.
- */
- next_event_prequeue_start_time?: string | null;
-
- /**
- * An ISO 8601 timestamp that marks when the next event will start.
- */
- next_event_start_time?: string | null;
-
- /**
- * Sets the path within the host to enable the waiting room on. The waiting room
- * will be enabled for all subpaths as well. If there are two waiting rooms on the
- * same subpath, the waiting room for the most specific path will be chosen.
- * Wildcards and query parameters are not supported.
- */
- path?: string;
-
- /**
- * If queue_all is `true`, all the traffic that is coming to a route will be sent
- * to the waiting room. No new traffic can get to the route once this field is set
- * and estimated time will become unavailable.
- */
- queue_all?: boolean;
-
- /**
- * Sets the queueing method used by the waiting room. Changing this parameter from
- * the **default** queueing method is only available for the Waiting Room Advanced
- * subscription. Regardless of the queueing method, if `queue_all` is enabled or an
- * event is prequeueing, users in the waiting room will not be accepted to the
- * origin. These users will always see a waiting room page that refreshes
- * automatically. The valid queueing methods are:
- *
- * 1. `fifo` **(default)**: First-In-First-Out queue where customers gain access in
- * the order they arrived.
- * 2. `random`: Random queue where customers gain access randomly, regardless of
- * arrival time.
- * 3. `passthrough`: Users will pass directly through the waiting room and into the
- * origin website. As a result, any configured limits will not be respected
- * while this is enabled. This method can be used as an alternative to disabling
- * a waiting room (with `suspended`) so that analytics are still reported. This
- * can be used if you wish to allow all traffic normally, but want to restrict
- * traffic during a waiting room event, or vice versa.
- * 4. `reject`: Users will be immediately rejected from the waiting room. As a
- * result, no users will reach the origin website while this is enabled. This
- * can be used if you wish to reject all traffic while performing maintenance,
- * block traffic during a specified period of time (an event), or block traffic
- * while events are not occurring. Consider a waiting room used for vaccine
- * distribution that only allows traffic during sign-up events, and otherwise
- * blocks all traffic. For this case, the waiting room uses `reject`, and its
- * events override this with `fifo`, `random`, or `passthrough`. When this
- * queueing method is enabled and neither `queueAll` is enabled nor an event is
- * prequeueing, the waiting room page **will not refresh automatically**.
- */
- queueing_method?: 'fifo' | 'random' | 'passthrough' | 'reject';
-
- /**
- * HTTP status code returned to a user while in the queue.
- */
- queueing_status_code?: 200 | 202 | 429;
-
- /**
- * Lifetime of a cookie (in minutes) set by Cloudflare for users who get access to
- * the route. If a user is not seen by Cloudflare again in that time period, they
- * will be treated as a new user that visits the route.
- */
- session_duration?: number;
-
- /**
- * Suspends or allows traffic going to the waiting room. If set to `true`, the
- * traffic will not go to the waiting room.
- */
- suspended?: boolean;
-
- /**
- * Sets the total number of active user sessions on the route at a point in time. A
- * route is a combination of host and path on which a waiting room is available.
- * This value is used as a baseline for the total number of active user sessions on
- * the route. It is possible to have a situation where there are more or less
- * active users sessions on the route based on the traffic patterns at that time
- * around the world.
- */
- total_active_users?: number;
-}
-
export interface WaitingRoom {
id?: string;
@@ -2240,7 +1895,7 @@ export namespace WaitingRooms {
export import StatusGetResponse = StatusesAPI.StatusGetResponse;
export import StatusGetParams = StatusesAPI.StatusGetParams;
export import Settings = SettingsAPI.Settings;
- export import UnnamedSchemaRef59ecd22a3d62548e441274daec82ee7a = SettingsAPI.UnnamedSchemaRef59ecd22a3d62548e441274daec82ee7a;
+ export import Setting = SettingsAPI.Setting;
export import SettingUpdateResponse = SettingsAPI.SettingUpdateResponse;
export import SettingEditResponse = SettingsAPI.SettingEditResponse;
export import SettingGetResponse = SettingsAPI.SettingGetResponse;
diff --git a/src/resources/workers/scripts/deployments.ts b/src/resources/workers/scripts/deployments.ts
index 4a010d5566..5550ec011c 100644
--- a/src/resources/workers/scripts/deployments.ts
+++ b/src/resources/workers/scripts/deployments.ts
@@ -44,7 +44,7 @@ export class Deployments extends APIResource {
}
}
-export interface UnnamedSchemaRefFda1c6f6758e763ae3b2964521f2fdd8 {
+export interface Deployment {
/**
* Human-readable message about the deployment.
*/
@@ -54,7 +54,7 @@ export interface UnnamedSchemaRefFda1c6f6758e763ae3b2964521f2fdd8 {
export interface DeploymentCreateResponse {
id?: string;
- annotations?: UnnamedSchemaRefFda1c6f6758e763ae3b2964521f2fdd8;
+ annotations?: Deployment;
author_email?: string;
@@ -73,7 +73,7 @@ export namespace DeploymentGetResponse {
export interface Deployment {
id?: string;
- annotations?: DeploymentsAPI.UnnamedSchemaRefFda1c6f6758e763ae3b2964521f2fdd8;
+ annotations?: DeploymentsAPI.Deployment;
author_email?: string;
@@ -94,7 +94,7 @@ export interface DeploymentCreateParams {
/**
* Body param:
*/
- annotations?: UnnamedSchemaRefFda1c6f6758e763ae3b2964521f2fdd8;
+ annotations?: Deployment;
/**
* Body param:
@@ -110,7 +110,7 @@ export interface DeploymentGetParams {
}
export namespace Deployments {
- export import UnnamedSchemaRefFda1c6f6758e763ae3b2964521f2fdd8 = DeploymentsAPI.UnnamedSchemaRefFda1c6f6758e763ae3b2964521f2fdd8;
+ export import Deployment = DeploymentsAPI.Deployment;
export import DeploymentCreateResponse = DeploymentsAPI.DeploymentCreateResponse;
export import DeploymentGetResponse = DeploymentsAPI.DeploymentGetResponse;
export import DeploymentCreateParams = DeploymentsAPI.DeploymentCreateParams;
diff --git a/src/resources/workers/scripts/index.ts b/src/resources/workers/scripts/index.ts
index 3d766b1545..e3eff45964 100644
--- a/src/resources/workers/scripts/index.ts
+++ b/src/resources/workers/scripts/index.ts
@@ -12,6 +12,14 @@ export {
Tail,
} from './tail';
export { ContentUpdateParams, ContentGetParams, Content } from './content';
+export {
+ Deployment,
+ DeploymentCreateResponse,
+ DeploymentGetResponse,
+ DeploymentCreateParams,
+ DeploymentGetParams,
+ Deployments,
+} from './deployments';
export {
Script,
ScriptSetting,
@@ -31,14 +39,6 @@ export {
ScheduleGetParams,
Schedules,
} from './schedules';
-export {
- UnnamedSchemaRefFda1c6f6758e763ae3b2964521f2fdd8,
- DeploymentCreateResponse,
- DeploymentGetResponse,
- DeploymentCreateParams,
- DeploymentGetParams,
- Deployments,
-} from './deployments';
export {
VersionCreateResponse,
VersionListResponse,
diff --git a/src/resources/workers/scripts/scripts.ts b/src/resources/workers/scripts/scripts.ts
index 177475d3d7..c66c4f6446 100644
--- a/src/resources/workers/scripts/scripts.ts
+++ b/src/resources/workers/scripts/scripts.ts
@@ -328,7 +328,7 @@ export namespace Scripts {
export import SettingEditParams = SettingsAPI.SettingEditParams;
export import SettingGetParams = SettingsAPI.SettingGetParams;
export import Deployments = DeploymentsAPI.Deployments;
- export import UnnamedSchemaRefFda1c6f6758e763ae3b2964521f2fdd8 = DeploymentsAPI.UnnamedSchemaRefFda1c6f6758e763ae3b2964521f2fdd8;
+ export import Deployment = DeploymentsAPI.Deployment;
export import DeploymentCreateResponse = DeploymentsAPI.DeploymentCreateResponse;
export import DeploymentGetResponse = DeploymentsAPI.DeploymentGetResponse;
export import DeploymentCreateParams = DeploymentsAPI.DeploymentCreateParams;
diff --git a/src/resources/zero-trust/dlp/patterns.ts b/src/resources/zero-trust/dlp/patterns.ts
index f2aeb69b5d..5546d7ceca 100644
--- a/src/resources/zero-trust/dlp/patterns.ts
+++ b/src/resources/zero-trust/dlp/patterns.ts
@@ -3,7 +3,7 @@
import * as Core from 'cloudflare/core';
import { APIResource } from 'cloudflare/resource';
import * as PatternsAPI from 'cloudflare/resources/zero-trust/dlp/patterns';
-import * as Shared from 'cloudflare/resources/shared';
+import * as OwnershipAPI from 'cloudflare/resources/logpush/ownership';
export class Patterns extends APIResource {
/**
@@ -15,13 +15,13 @@ export class Patterns extends APIResource {
validate(
params: PatternValidateParams,
options?: Core.RequestOptions,
- ): Core.APIPromise {
+ ): Core.APIPromise {
const { account_id, ...body } = params;
return (
this._client.post(`/accounts/${account_id}/dlp/patterns/validate`, {
body,
...options,
- }) as Core.APIPromise<{ result: Shared.UnnamedSchemaRefCc2ac1a037e5d6702fc77b3bcb527854 | null }>
+ }) as Core.APIPromise<{ result: OwnershipAPI.OwnershipValidation | null }>
)._thenUnwrap((obj) => obj.result);
}
}
diff --git a/src/resources/zero-trust/gateway/gateway.ts b/src/resources/zero-trust/gateway/gateway.ts
index a62761b3d6..d348001f47 100644
--- a/src/resources/zero-trust/gateway/gateway.ts
+++ b/src/resources/zero-trust/gateway/gateway.ts
@@ -130,7 +130,6 @@ export namespace Gateway {
export import ConfigurationEditParams = ConfigurationsAPI.ConfigurationEditParams;
export import ConfigurationGetParams = ConfigurationsAPI.ConfigurationGetParams;
export import Lists = ListsAPI.Lists;
- export import UnnamedSchemaRef30ecd0f5ce68fc07dbb7760deda3d707 = ListsAPI.UnnamedSchemaRef30ecd0f5ce68fc07dbb7760deda3d707;
export import ListCreateResponse = ListsAPI.ListCreateResponse;
export import ListsSinglePage = ListsAPI.ListsSinglePage;
export import ListCreateParams = ListsAPI.ListCreateParams;
@@ -171,7 +170,6 @@ export namespace Gateway {
export import Rule = RulesAPI.Rule;
export import RuleSetting = RulesAPI.RuleSetting;
export import Schedule = RulesAPI.Schedule;
- export import UnnamedSchemaRef0b0764cdb06aad66b555fd74c8c78b2a = RulesAPI.UnnamedSchemaRef0b0764cdb06aad66b555fd74c8c78b2a;
export import RulesSinglePage = RulesAPI.RulesSinglePage;
export import RuleCreateParams = RulesAPI.RuleCreateParams;
export import RuleUpdateParams = RulesAPI.RuleUpdateParams;
diff --git a/src/resources/zero-trust/gateway/index.ts b/src/resources/zero-trust/gateway/index.ts
index d39bb8f417..df7f20f8bb 100644
--- a/src/resources/zero-trust/gateway/index.ts
+++ b/src/resources/zero-trust/gateway/index.ts
@@ -30,7 +30,6 @@ export {
Rule,
RuleSetting,
Schedule,
- UnnamedSchemaRef0b0764cdb06aad66b555fd74c8c78b2a,
RuleCreateParams,
RuleUpdateParams,
RuleListParams,
@@ -66,7 +65,6 @@ export {
} from './audit-ssh-settings';
export {
Lists,
- UnnamedSchemaRef30ecd0f5ce68fc07dbb7760deda3d707,
ListCreateResponse,
ListCreateParams,
ListUpdateParams,
diff --git a/src/resources/zero-trust/gateway/lists/index.ts b/src/resources/zero-trust/gateway/lists/index.ts
index 536fc4fba2..40c36190f6 100644
--- a/src/resources/zero-trust/gateway/lists/index.ts
+++ b/src/resources/zero-trust/gateway/lists/index.ts
@@ -2,7 +2,6 @@
export {
Lists,
- UnnamedSchemaRef30ecd0f5ce68fc07dbb7760deda3d707,
ListCreateResponse,
ListCreateParams,
ListUpdateParams,
diff --git a/src/resources/zero-trust/gateway/lists/lists.ts b/src/resources/zero-trust/gateway/lists/lists.ts
index 4e7e4cb973..fea5bb0457 100644
--- a/src/resources/zero-trust/gateway/lists/lists.ts
+++ b/src/resources/zero-trust/gateway/lists/lists.ts
@@ -119,37 +119,6 @@ export interface Lists {
updated_at?: string;
}
-export interface UnnamedSchemaRef30ecd0f5ce68fc07dbb7760deda3d707 {
- /**
- * API Resource UUID tag.
- */
- id?: string;
-
- /**
- * The number of items in the list.
- */
- count?: number;
-
- created_at?: string;
-
- /**
- * The description of the list.
- */
- description?: string;
-
- /**
- * The name of the list.
- */
- name?: string;
-
- /**
- * The type of list.
- */
- type?: 'SERIAL' | 'URL' | 'DOMAIN' | 'EMAIL' | 'IP';
-
- updated_at?: string;
-}
-
export interface ListCreateResponse {
/**
* API Resource UUID tag.
@@ -264,7 +233,6 @@ export interface ListGetParams {
export namespace Lists {
export import Lists = ListsAPI.Lists;
- export import UnnamedSchemaRef30ecd0f5ce68fc07dbb7760deda3d707 = ListsAPI.UnnamedSchemaRef30ecd0f5ce68fc07dbb7760deda3d707;
export import ListCreateResponse = ListsAPI.ListCreateResponse;
export import ListsSinglePage = ListsAPI.ListsSinglePage;
export import ListCreateParams = ListsAPI.ListCreateParams;
diff --git a/src/resources/zero-trust/gateway/rules.ts b/src/resources/zero-trust/gateway/rules.ts
index 0a1db6054c..71b3c5a67a 100644
--- a/src/resources/zero-trust/gateway/rules.ts
+++ b/src/resources/zero-trust/gateway/rules.ts
@@ -550,97 +550,6 @@ export interface Schedule {
wed?: string;
}
-export interface UnnamedSchemaRef0b0764cdb06aad66b555fd74c8c78b2a {
- /**
- * The API resource UUID.
- */
- id?: string;
-
- /**
- * The action to preform when the associated traffic, identity, and device posture
- * expressions are either absent or evaluate to `true`.
- */
- action?:
- | 'on'
- | 'off'
- | 'allow'
- | 'block'
- | 'scan'
- | 'noscan'
- | 'safesearch'
- | 'ytrestricted'
- | 'isolate'
- | 'noisolate'
- | 'override'
- | 'l4_override'
- | 'egress'
- | 'audit_ssh'
- | 'resolve';
-
- created_at?: string;
-
- /**
- * Date of deletion, if any.
- */
- deleted_at?: string | null;
-
- /**
- * The description of the rule.
- */
- description?: string;
-
- /**
- * The wirefilter expression used for device posture check matching.
- */
- device_posture?: string;
-
- /**
- * True if the rule is enabled.
- */
- enabled?: boolean;
-
- /**
- * The protocol or layer to evaluate the traffic, identity, and device posture
- * expressions.
- */
- filters?: Array;
-
- /**
- * The wirefilter expression used for identity matching.
- */
- identity?: string;
-
- /**
- * The name of the rule.
- */
- name?: string;
-
- /**
- * Precedence sets the order of your rules. Lower values indicate higher
- * precedence. At each processing phase, applicable rules are evaluated in
- * ascending order of this value.
- */
- precedence?: number;
-
- /**
- * Additional settings that modify the rule's action.
- */
- rule_settings?: RuleSetting;
-
- /**
- * The schedule for activating DNS policies. This does not apply to HTTP or network
- * policies.
- */
- schedule?: Schedule;
-
- /**
- * The wirefilter expression used for traffic matching.
- */
- traffic?: string;
-
- updated_at?: string;
-}
-
export interface RuleCreateParams {
/**
* Path param:
@@ -832,7 +741,6 @@ export namespace Rules {
export import Rule = RulesAPI.Rule;
export import RuleSetting = RulesAPI.RuleSetting;
export import Schedule = RulesAPI.Schedule;
- export import UnnamedSchemaRef0b0764cdb06aad66b555fd74c8c78b2a = RulesAPI.UnnamedSchemaRef0b0764cdb06aad66b555fd74c8c78b2a;
export import RulesSinglePage = RulesAPI.RulesSinglePage;
export import RuleCreateParams = RulesAPI.RuleCreateParams;
export import RuleUpdateParams = RulesAPI.RuleUpdateParams;