Skip to content

Commit 3aa2efc

Browse files
feat(api): api update (#2320)
1 parent cede425 commit 3aa2efc

File tree

7 files changed

+191
-1
lines changed

7 files changed

+191
-1
lines changed

.stats.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,2 @@
11
configured_endpoints: 1489
2-
openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-6dadcd4e513c89328f85b769caf9ab478a927d302533e01ebf511a2965ec8cd5.yml
2+
openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-d52d1344e2e65f3eda2fe8fff8c7d95cebf7cad134af21eaf9d6d5b6a04d783a.yml

src/cloudflare/resources/waiting_rooms/waiting_rooms.py

+102
Original file line numberDiff line numberDiff line change
@@ -180,6 +180,9 @@ def create(
180180
queueing_status_code: Literal[200, 202, 429] | NotGiven = NOT_GIVEN,
181181
session_duration: int | NotGiven = NOT_GIVEN,
182182
suspended: bool | NotGiven = NOT_GIVEN,
183+
turnstile_action: Literal["log", "infinite_queue"] | NotGiven = NOT_GIVEN,
184+
turnstile_mode: Literal["off", "invisible", "visible_non_interactive", "visible_managed"]
185+
| NotGiven = NOT_GIVEN,
183186
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
184187
# The extra values given here take precedence over values defined on the client or passed to this method.
185188
extra_headers: Headers | None = None,
@@ -451,6 +454,18 @@ def create(
451454
suspended: Suspends or allows traffic going to the waiting room. If set to `true`, the
452455
traffic will not go to the waiting room.
453456
457+
turnstile_action: Which action to take when a bot is detected using Turnstile. `log` will have no
458+
impact on queueing behavior, simply keeping track of how many bots are detected
459+
in Waiting Room Analytics. `infinite_queue` will send bots to a false queueing
460+
state, where they will never reach your origin. `infinite_queue` requires
461+
Advanced Waiting Room.
462+
463+
turnstile_mode: Which Turnstile widget type to use for detecting bot traffic. See
464+
[the Turnstile documentation](https://developers.cloudflare.com/turnstile/concepts/widget/#widget-types)
465+
for the definitions of these widget types. Set to `off` to disable the Turnstile
466+
integration entirely. Setting this to anything other than `off` or `invisible`
467+
requires Advanced Waiting Room.
468+
454469
extra_headers: Send extra headers
455470
456471
extra_query: Add additional query parameters to the request
@@ -484,6 +499,8 @@ def create(
484499
"queueing_status_code": queueing_status_code,
485500
"session_duration": session_duration,
486501
"suspended": suspended,
502+
"turnstile_action": turnstile_action,
503+
"turnstile_mode": turnstile_mode,
487504
},
488505
waiting_room_create_params.WaitingRoomCreateParams,
489506
),
@@ -561,6 +578,9 @@ def update(
561578
queueing_status_code: Literal[200, 202, 429] | NotGiven = NOT_GIVEN,
562579
session_duration: int | NotGiven = NOT_GIVEN,
563580
suspended: bool | NotGiven = NOT_GIVEN,
581+
turnstile_action: Literal["log", "infinite_queue"] | NotGiven = NOT_GIVEN,
582+
turnstile_mode: Literal["off", "invisible", "visible_non_interactive", "visible_managed"]
583+
| NotGiven = NOT_GIVEN,
564584
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
565585
# The extra values given here take precedence over values defined on the client or passed to this method.
566586
extra_headers: Headers | None = None,
@@ -832,6 +852,18 @@ def update(
832852
suspended: Suspends or allows traffic going to the waiting room. If set to `true`, the
833853
traffic will not go to the waiting room.
834854
855+
turnstile_action: Which action to take when a bot is detected using Turnstile. `log` will have no
856+
impact on queueing behavior, simply keeping track of how many bots are detected
857+
in Waiting Room Analytics. `infinite_queue` will send bots to a false queueing
858+
state, where they will never reach your origin. `infinite_queue` requires
859+
Advanced Waiting Room.
860+
861+
turnstile_mode: Which Turnstile widget type to use for detecting bot traffic. See
862+
[the Turnstile documentation](https://developers.cloudflare.com/turnstile/concepts/widget/#widget-types)
863+
for the definitions of these widget types. Set to `off` to disable the Turnstile
864+
integration entirely. Setting this to anything other than `off` or `invisible`
865+
requires Advanced Waiting Room.
866+
835867
extra_headers: Send extra headers
836868
837869
extra_query: Add additional query parameters to the request
@@ -867,6 +899,8 @@ def update(
867899
"queueing_status_code": queueing_status_code,
868900
"session_duration": session_duration,
869901
"suspended": suspended,
902+
"turnstile_action": turnstile_action,
903+
"turnstile_mode": turnstile_mode,
870904
},
871905
waiting_room_update_params.WaitingRoomUpdateParams,
872906
),
@@ -1038,6 +1072,9 @@ def edit(
10381072
queueing_status_code: Literal[200, 202, 429] | NotGiven = NOT_GIVEN,
10391073
session_duration: int | NotGiven = NOT_GIVEN,
10401074
suspended: bool | NotGiven = NOT_GIVEN,
1075+
turnstile_action: Literal["log", "infinite_queue"] | NotGiven = NOT_GIVEN,
1076+
turnstile_mode: Literal["off", "invisible", "visible_non_interactive", "visible_managed"]
1077+
| NotGiven = NOT_GIVEN,
10411078
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
10421079
# The extra values given here take precedence over values defined on the client or passed to this method.
10431080
extra_headers: Headers | None = None,
@@ -1309,6 +1346,18 @@ def edit(
13091346
suspended: Suspends or allows traffic going to the waiting room. If set to `true`, the
13101347
traffic will not go to the waiting room.
13111348
1349+
turnstile_action: Which action to take when a bot is detected using Turnstile. `log` will have no
1350+
impact on queueing behavior, simply keeping track of how many bots are detected
1351+
in Waiting Room Analytics. `infinite_queue` will send bots to a false queueing
1352+
state, where they will never reach your origin. `infinite_queue` requires
1353+
Advanced Waiting Room.
1354+
1355+
turnstile_mode: Which Turnstile widget type to use for detecting bot traffic. See
1356+
[the Turnstile documentation](https://developers.cloudflare.com/turnstile/concepts/widget/#widget-types)
1357+
for the definitions of these widget types. Set to `off` to disable the Turnstile
1358+
integration entirely. Setting this to anything other than `off` or `invisible`
1359+
requires Advanced Waiting Room.
1360+
13121361
extra_headers: Send extra headers
13131362
13141363
extra_query: Add additional query parameters to the request
@@ -1344,6 +1393,8 @@ def edit(
13441393
"queueing_status_code": queueing_status_code,
13451394
"session_duration": session_duration,
13461395
"suspended": suspended,
1396+
"turnstile_action": turnstile_action,
1397+
"turnstile_mode": turnstile_mode,
13471398
},
13481399
waiting_room_edit_params.WaitingRoomEditParams,
13491400
),
@@ -1503,6 +1554,9 @@ async def create(
15031554
queueing_status_code: Literal[200, 202, 429] | NotGiven = NOT_GIVEN,
15041555
session_duration: int | NotGiven = NOT_GIVEN,
15051556
suspended: bool | NotGiven = NOT_GIVEN,
1557+
turnstile_action: Literal["log", "infinite_queue"] | NotGiven = NOT_GIVEN,
1558+
turnstile_mode: Literal["off", "invisible", "visible_non_interactive", "visible_managed"]
1559+
| NotGiven = NOT_GIVEN,
15061560
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
15071561
# The extra values given here take precedence over values defined on the client or passed to this method.
15081562
extra_headers: Headers | None = None,
@@ -1774,6 +1828,18 @@ async def create(
17741828
suspended: Suspends or allows traffic going to the waiting room. If set to `true`, the
17751829
traffic will not go to the waiting room.
17761830
1831+
turnstile_action: Which action to take when a bot is detected using Turnstile. `log` will have no
1832+
impact on queueing behavior, simply keeping track of how many bots are detected
1833+
in Waiting Room Analytics. `infinite_queue` will send bots to a false queueing
1834+
state, where they will never reach your origin. `infinite_queue` requires
1835+
Advanced Waiting Room.
1836+
1837+
turnstile_mode: Which Turnstile widget type to use for detecting bot traffic. See
1838+
[the Turnstile documentation](https://developers.cloudflare.com/turnstile/concepts/widget/#widget-types)
1839+
for the definitions of these widget types. Set to `off` to disable the Turnstile
1840+
integration entirely. Setting this to anything other than `off` or `invisible`
1841+
requires Advanced Waiting Room.
1842+
17771843
extra_headers: Send extra headers
17781844
17791845
extra_query: Add additional query parameters to the request
@@ -1807,6 +1873,8 @@ async def create(
18071873
"queueing_status_code": queueing_status_code,
18081874
"session_duration": session_duration,
18091875
"suspended": suspended,
1876+
"turnstile_action": turnstile_action,
1877+
"turnstile_mode": turnstile_mode,
18101878
},
18111879
waiting_room_create_params.WaitingRoomCreateParams,
18121880
),
@@ -1884,6 +1952,9 @@ async def update(
18841952
queueing_status_code: Literal[200, 202, 429] | NotGiven = NOT_GIVEN,
18851953
session_duration: int | NotGiven = NOT_GIVEN,
18861954
suspended: bool | NotGiven = NOT_GIVEN,
1955+
turnstile_action: Literal["log", "infinite_queue"] | NotGiven = NOT_GIVEN,
1956+
turnstile_mode: Literal["off", "invisible", "visible_non_interactive", "visible_managed"]
1957+
| NotGiven = NOT_GIVEN,
18871958
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
18881959
# The extra values given here take precedence over values defined on the client or passed to this method.
18891960
extra_headers: Headers | None = None,
@@ -2155,6 +2226,18 @@ async def update(
21552226
suspended: Suspends or allows traffic going to the waiting room. If set to `true`, the
21562227
traffic will not go to the waiting room.
21572228
2229+
turnstile_action: Which action to take when a bot is detected using Turnstile. `log` will have no
2230+
impact on queueing behavior, simply keeping track of how many bots are detected
2231+
in Waiting Room Analytics. `infinite_queue` will send bots to a false queueing
2232+
state, where they will never reach your origin. `infinite_queue` requires
2233+
Advanced Waiting Room.
2234+
2235+
turnstile_mode: Which Turnstile widget type to use for detecting bot traffic. See
2236+
[the Turnstile documentation](https://developers.cloudflare.com/turnstile/concepts/widget/#widget-types)
2237+
for the definitions of these widget types. Set to `off` to disable the Turnstile
2238+
integration entirely. Setting this to anything other than `off` or `invisible`
2239+
requires Advanced Waiting Room.
2240+
21582241
extra_headers: Send extra headers
21592242
21602243
extra_query: Add additional query parameters to the request
@@ -2190,6 +2273,8 @@ async def update(
21902273
"queueing_status_code": queueing_status_code,
21912274
"session_duration": session_duration,
21922275
"suspended": suspended,
2276+
"turnstile_action": turnstile_action,
2277+
"turnstile_mode": turnstile_mode,
21932278
},
21942279
waiting_room_update_params.WaitingRoomUpdateParams,
21952280
),
@@ -2361,6 +2446,9 @@ async def edit(
23612446
queueing_status_code: Literal[200, 202, 429] | NotGiven = NOT_GIVEN,
23622447
session_duration: int | NotGiven = NOT_GIVEN,
23632448
suspended: bool | NotGiven = NOT_GIVEN,
2449+
turnstile_action: Literal["log", "infinite_queue"] | NotGiven = NOT_GIVEN,
2450+
turnstile_mode: Literal["off", "invisible", "visible_non_interactive", "visible_managed"]
2451+
| NotGiven = NOT_GIVEN,
23642452
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
23652453
# The extra values given here take precedence over values defined on the client or passed to this method.
23662454
extra_headers: Headers | None = None,
@@ -2632,6 +2720,18 @@ async def edit(
26322720
suspended: Suspends or allows traffic going to the waiting room. If set to `true`, the
26332721
traffic will not go to the waiting room.
26342722
2723+
turnstile_action: Which action to take when a bot is detected using Turnstile. `log` will have no
2724+
impact on queueing behavior, simply keeping track of how many bots are detected
2725+
in Waiting Room Analytics. `infinite_queue` will send bots to a false queueing
2726+
state, where they will never reach your origin. `infinite_queue` requires
2727+
Advanced Waiting Room.
2728+
2729+
turnstile_mode: Which Turnstile widget type to use for detecting bot traffic. See
2730+
[the Turnstile documentation](https://developers.cloudflare.com/turnstile/concepts/widget/#widget-types)
2731+
for the definitions of these widget types. Set to `off` to disable the Turnstile
2732+
integration entirely. Setting this to anything other than `off` or `invisible`
2733+
requires Advanced Waiting Room.
2734+
26352735
extra_headers: Send extra headers
26362736
26372737
extra_query: Add additional query parameters to the request
@@ -2667,6 +2767,8 @@ async def edit(
26672767
"queueing_status_code": queueing_status_code,
26682768
"session_duration": session_duration,
26692769
"suspended": suspended,
2770+
"turnstile_action": turnstile_action,
2771+
"turnstile_mode": turnstile_mode,
26702772
},
26712773
waiting_room_edit_params.WaitingRoomEditParams,
26722774
),

src/cloudflare/types/waiting_rooms/waiting_room.py

+19
Original file line numberDiff line numberDiff line change
@@ -376,3 +376,22 @@ class WaitingRoom(BaseModel):
376376
active users sessions on the route based on the traffic patterns at that time
377377
around the world.
378378
"""
379+
380+
turnstile_action: Optional[Literal["log", "infinite_queue"]] = None
381+
"""Which action to take when a bot is detected using Turnstile.
382+
383+
`log` will have no impact on queueing behavior, simply keeping track of how many
384+
bots are detected in Waiting Room Analytics. `infinite_queue` will send bots to
385+
a false queueing state, where they will never reach your origin.
386+
`infinite_queue` requires Advanced Waiting Room.
387+
"""
388+
389+
turnstile_mode: Optional[Literal["off", "invisible", "visible_non_interactive", "visible_managed"]] = None
390+
"""Which Turnstile widget type to use for detecting bot traffic.
391+
392+
See
393+
[the Turnstile documentation](https://developers.cloudflare.com/turnstile/concepts/widget/#widget-types)
394+
for the definitions of these widget types. Set to `off` to disable the Turnstile
395+
integration entirely. Setting this to anything other than `off` or `invisible`
396+
requires Advanced Waiting Room.
397+
"""

src/cloudflare/types/waiting_rooms/waiting_room_create_params.py

+19
Original file line numberDiff line numberDiff line change
@@ -365,3 +365,22 @@ class WaitingRoomCreateParams(TypedDict, total=False):
365365
366366
If set to `true`, the traffic will not go to the waiting room.
367367
"""
368+
369+
turnstile_action: Literal["log", "infinite_queue"]
370+
"""Which action to take when a bot is detected using Turnstile.
371+
372+
`log` will have no impact on queueing behavior, simply keeping track of how many
373+
bots are detected in Waiting Room Analytics. `infinite_queue` will send bots to
374+
a false queueing state, where they will never reach your origin.
375+
`infinite_queue` requires Advanced Waiting Room.
376+
"""
377+
378+
turnstile_mode: Literal["off", "invisible", "visible_non_interactive", "visible_managed"]
379+
"""Which Turnstile widget type to use for detecting bot traffic.
380+
381+
See
382+
[the Turnstile documentation](https://developers.cloudflare.com/turnstile/concepts/widget/#widget-types)
383+
for the definitions of these widget types. Set to `off` to disable the Turnstile
384+
integration entirely. Setting this to anything other than `off` or `invisible`
385+
requires Advanced Waiting Room.
386+
"""

src/cloudflare/types/waiting_rooms/waiting_room_edit_params.py

+19
Original file line numberDiff line numberDiff line change
@@ -365,3 +365,22 @@ class WaitingRoomEditParams(TypedDict, total=False):
365365
366366
If set to `true`, the traffic will not go to the waiting room.
367367
"""
368+
369+
turnstile_action: Literal["log", "infinite_queue"]
370+
"""Which action to take when a bot is detected using Turnstile.
371+
372+
`log` will have no impact on queueing behavior, simply keeping track of how many
373+
bots are detected in Waiting Room Analytics. `infinite_queue` will send bots to
374+
a false queueing state, where they will never reach your origin.
375+
`infinite_queue` requires Advanced Waiting Room.
376+
"""
377+
378+
turnstile_mode: Literal["off", "invisible", "visible_non_interactive", "visible_managed"]
379+
"""Which Turnstile widget type to use for detecting bot traffic.
380+
381+
See
382+
[the Turnstile documentation](https://developers.cloudflare.com/turnstile/concepts/widget/#widget-types)
383+
for the definitions of these widget types. Set to `off` to disable the Turnstile
384+
integration entirely. Setting this to anything other than `off` or `invisible`
385+
requires Advanced Waiting Room.
386+
"""

src/cloudflare/types/waiting_rooms/waiting_room_update_params.py

+19
Original file line numberDiff line numberDiff line change
@@ -365,3 +365,22 @@ class WaitingRoomUpdateParams(TypedDict, total=False):
365365
366366
If set to `true`, the traffic will not go to the waiting room.
367367
"""
368+
369+
turnstile_action: Literal["log", "infinite_queue"]
370+
"""Which action to take when a bot is detected using Turnstile.
371+
372+
`log` will have no impact on queueing behavior, simply keeping track of how many
373+
bots are detected in Waiting Room Analytics. `infinite_queue` will send bots to
374+
a false queueing state, where they will never reach your origin.
375+
`infinite_queue` requires Advanced Waiting Room.
376+
"""
377+
378+
turnstile_mode: Literal["off", "invisible", "visible_non_interactive", "visible_managed"]
379+
"""Which Turnstile widget type to use for detecting bot traffic.
380+
381+
See
382+
[the Turnstile documentation](https://developers.cloudflare.com/turnstile/concepts/widget/#widget-types)
383+
for the definitions of these widget types. Set to `off` to disable the Turnstile
384+
integration entirely. Setting this to anything other than `off` or `invisible`
385+
requires Advanced Waiting Room.
386+
"""

0 commit comments

Comments
 (0)