From 336bd3a5e9c4f7546c733909fbaf7af98ab5d08e Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Tue, 1 Apr 2025 19:17:09 +0000 Subject: [PATCH] feat(api): api update --- .stats.yml | 4 +- src/resources/waiting-rooms/events/details.ts | 12 +++++ src/resources/waiting-rooms/events/events.ts | 51 +++++++++++++++++++ src/resources/zones/zones.ts | 4 +- .../waiting-rooms/events/events.test.ts | 6 +++ 5 files changed, 73 insertions(+), 4 deletions(-) diff --git a/.stats.yml b/.stats.yml index 0d40eeb913..ea1ce66616 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,4 +1,4 @@ configured_endpoints: 1664 -openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-4e988c584e8eacb13347475cb6ac38171cedd948f5101b03c37ec712341b9d7a.yml -openapi_spec_hash: c4e86fdb536ff8299ffc1faed7e3e573 +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-3f1027f7740afd5fbb6aa554575dd2fd7dd68c0d7c394c68b5515753860eaf8e.yml +openapi_spec_hash: fbe090182fbea3b046b951f6f4fb3b33 config_hash: af2dbb6a6332cef477c4697db6a78d79 diff --git a/src/resources/waiting-rooms/events/details.ts b/src/resources/waiting-rooms/events/details.ts index 220630457e..0a41349479 100644 --- a/src/resources/waiting-rooms/events/details.ts +++ b/src/resources/waiting-rooms/events/details.ts @@ -108,6 +108,18 @@ export interface EventQuery { * the event's `new_users_per_minute` property is also set. */ total_active_users?: number | null; + + /** + * If set, the event will override the waiting room's `turnstile_action` property + * while it is active. If null, the event will inherit it. + */ + turnstile_action?: 'log' | 'infinite_queue' | null; + + /** + * If set, the event will override the waiting room's `turnstile_mode` property + * while it is active. If null, the event will inherit it. + */ + turnstile_mode?: 'off' | 'invisible' | 'visible_non_interactive' | 'visible_managed' | null; } export interface DetailGetResponse { diff --git a/src/resources/waiting-rooms/events/events.ts b/src/resources/waiting-rooms/events/events.ts index f3fe0719e7..bbc3117654 100644 --- a/src/resources/waiting-rooms/events/events.ts +++ b/src/resources/waiting-rooms/events/events.ts @@ -212,6 +212,18 @@ export interface Event { * the event's `new_users_per_minute` property is also set. */ total_active_users?: number | null; + + /** + * If set, the event will override the waiting room's `turnstile_action` property + * while it is active. If null, the event will inherit it. + */ + turnstile_action?: 'log' | 'infinite_queue' | null; + + /** + * If set, the event will override the waiting room's `turnstile_mode` property + * while it is active. If null, the event will inherit it. + */ + turnstile_mode?: 'off' | 'invisible' | 'visible_non_interactive' | 'visible_managed' | null; } export interface EventDeleteResponse { @@ -312,6 +324,19 @@ export interface EventCreateParams { * is also set. */ total_active_users?: number | null; + + /** + * Body param: If set, the event will override the waiting room's + * `turnstile_action` property while it is active. If null, the event will inherit + * it. + */ + turnstile_action?: 'log' | 'infinite_queue' | null; + + /** + * Body param: If set, the event will override the waiting room's `turnstile_mode` + * property while it is active. If null, the event will inherit it. + */ + turnstile_mode?: 'off' | 'invisible' | 'visible_non_interactive' | 'visible_managed' | null; } export interface EventUpdateParams { @@ -408,6 +433,19 @@ export interface EventUpdateParams { * is also set. */ total_active_users?: number | null; + + /** + * Body param: If set, the event will override the waiting room's + * `turnstile_action` property while it is active. If null, the event will inherit + * it. + */ + turnstile_action?: 'log' | 'infinite_queue' | null; + + /** + * Body param: If set, the event will override the waiting room's `turnstile_mode` + * property while it is active. If null, the event will inherit it. + */ + turnstile_mode?: 'off' | 'invisible' | 'visible_non_interactive' | 'visible_managed' | null; } export interface EventListParams extends V4PagePaginationArrayParams { @@ -518,6 +556,19 @@ export interface EventEditParams { * is also set. */ total_active_users?: number | null; + + /** + * Body param: If set, the event will override the waiting room's + * `turnstile_action` property while it is active. If null, the event will inherit + * it. + */ + turnstile_action?: 'log' | 'infinite_queue' | null; + + /** + * Body param: If set, the event will override the waiting room's `turnstile_mode` + * property while it is active. If null, the event will inherit it. + */ + turnstile_mode?: 'off' | 'invisible' | 'visible_non_interactive' | 'visible_managed' | null; } export interface EventGetParams { diff --git a/src/resources/zones/zones.ts b/src/resources/zones/zones.ts index daaa1c1f00..b3e8afac73 100644 --- a/src/resources/zones/zones.ts +++ b/src/resources/zones/zones.ts @@ -185,13 +185,13 @@ export class ZonesV4PagePaginationArray extends V4PagePaginationArray {} * A full zone implies that DNS is hosted with Cloudflare. A partial zone is * typically a partner-hosted zone or a CNAME setup. */ -export type Type = 'full' | 'partial' | 'secondary'; +export type Type = 'full' | 'partial' | 'secondary' | 'internal'; /** * A full zone implies that DNS is hosted with Cloudflare. A partial zone is * typically a partner-hosted zone or a CNAME setup. */ -export type TypeParam = 'full' | 'partial' | 'secondary'; +export type TypeParam = 'full' | 'partial' | 'secondary' | 'internal'; export interface Zone { /** diff --git a/tests/api-resources/waiting-rooms/events/events.test.ts b/tests/api-resources/waiting-rooms/events/events.test.ts index 3c018c8e2f..597c01b339 100644 --- a/tests/api-resources/waiting-rooms/events/events.test.ts +++ b/tests/api-resources/waiting-rooms/events/events.test.ts @@ -43,6 +43,8 @@ describe('resource events', () => { shuffle_at_event_start: true, suspended: true, total_active_users: 200, + turnstile_action: 'log', + turnstile_mode: 'off', }); }); @@ -86,6 +88,8 @@ describe('resource events', () => { shuffle_at_event_start: true, suspended: true, total_active_users: 200, + turnstile_action: 'log', + turnstile_mode: 'off', }, ); }); @@ -174,6 +178,8 @@ describe('resource events', () => { shuffle_at_event_start: true, suspended: true, total_active_users: 200, + turnstile_action: 'log', + turnstile_mode: 'off', }, ); });