Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat(api): api update #2320

Merged
merged 1 commit into from
Jan 6, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .stats.yml
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
configured_endpoints: 1489
openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-6dadcd4e513c89328f85b769caf9ab478a927d302533e01ebf511a2965ec8cd5.yml
openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-d52d1344e2e65f3eda2fe8fff8c7d95cebf7cad134af21eaf9d6d5b6a04d783a.yml
102 changes: 102 additions & 0 deletions src/cloudflare/resources/waiting_rooms/waiting_rooms.py
Original file line number Diff line number Diff line change
Expand Up @@ -180,6 +180,9 @@ def create(
queueing_status_code: Literal[200, 202, 429] | NotGiven = NOT_GIVEN,
session_duration: int | NotGiven = NOT_GIVEN,
suspended: bool | NotGiven = NOT_GIVEN,
turnstile_action: Literal["log", "infinite_queue"] | NotGiven = NOT_GIVEN,
turnstile_mode: Literal["off", "invisible", "visible_non_interactive", "visible_managed"]
| NotGiven = NOT_GIVEN,
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
# The extra values given here take precedence over values defined on the client or passed to this method.
extra_headers: Headers | None = None,
Expand Down Expand Up @@ -451,6 +454,18 @@ def create(
suspended: Suspends or allows traffic going to the waiting room. If set to `true`, the
traffic will not go to the waiting room.

turnstile_action: Which action to take when a bot is detected using Turnstile. `log` will have no
impact on queueing behavior, simply keeping track of how many bots are detected
in Waiting Room Analytics. `infinite_queue` will send bots to a false queueing
state, where they will never reach your origin. `infinite_queue` requires
Advanced Waiting Room.

turnstile_mode: Which Turnstile widget type to use for detecting bot traffic. See
[the Turnstile documentation](https://developers.cloudflare.com/turnstile/concepts/widget/#widget-types)
for the definitions of these widget types. Set to `off` to disable the Turnstile
integration entirely. Setting this to anything other than `off` or `invisible`
requires Advanced Waiting Room.

extra_headers: Send extra headers

extra_query: Add additional query parameters to the request
Expand Down Expand Up @@ -484,6 +499,8 @@ def create(
"queueing_status_code": queueing_status_code,
"session_duration": session_duration,
"suspended": suspended,
"turnstile_action": turnstile_action,
"turnstile_mode": turnstile_mode,
},
waiting_room_create_params.WaitingRoomCreateParams,
),
Expand Down Expand Up @@ -561,6 +578,9 @@ def update(
queueing_status_code: Literal[200, 202, 429] | NotGiven = NOT_GIVEN,
session_duration: int | NotGiven = NOT_GIVEN,
suspended: bool | NotGiven = NOT_GIVEN,
turnstile_action: Literal["log", "infinite_queue"] | NotGiven = NOT_GIVEN,
turnstile_mode: Literal["off", "invisible", "visible_non_interactive", "visible_managed"]
| NotGiven = NOT_GIVEN,
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
# The extra values given here take precedence over values defined on the client or passed to this method.
extra_headers: Headers | None = None,
Expand Down Expand Up @@ -832,6 +852,18 @@ def update(
suspended: Suspends or allows traffic going to the waiting room. If set to `true`, the
traffic will not go to the waiting room.

turnstile_action: Which action to take when a bot is detected using Turnstile. `log` will have no
impact on queueing behavior, simply keeping track of how many bots are detected
in Waiting Room Analytics. `infinite_queue` will send bots to a false queueing
state, where they will never reach your origin. `infinite_queue` requires
Advanced Waiting Room.

turnstile_mode: Which Turnstile widget type to use for detecting bot traffic. See
[the Turnstile documentation](https://developers.cloudflare.com/turnstile/concepts/widget/#widget-types)
for the definitions of these widget types. Set to `off` to disable the Turnstile
integration entirely. Setting this to anything other than `off` or `invisible`
requires Advanced Waiting Room.

extra_headers: Send extra headers

extra_query: Add additional query parameters to the request
Expand Down Expand Up @@ -867,6 +899,8 @@ def update(
"queueing_status_code": queueing_status_code,
"session_duration": session_duration,
"suspended": suspended,
"turnstile_action": turnstile_action,
"turnstile_mode": turnstile_mode,
},
waiting_room_update_params.WaitingRoomUpdateParams,
),
Expand Down Expand Up @@ -1038,6 +1072,9 @@ def edit(
queueing_status_code: Literal[200, 202, 429] | NotGiven = NOT_GIVEN,
session_duration: int | NotGiven = NOT_GIVEN,
suspended: bool | NotGiven = NOT_GIVEN,
turnstile_action: Literal["log", "infinite_queue"] | NotGiven = NOT_GIVEN,
turnstile_mode: Literal["off", "invisible", "visible_non_interactive", "visible_managed"]
| NotGiven = NOT_GIVEN,
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
# The extra values given here take precedence over values defined on the client or passed to this method.
extra_headers: Headers | None = None,
Expand Down Expand Up @@ -1309,6 +1346,18 @@ def edit(
suspended: Suspends or allows traffic going to the waiting room. If set to `true`, the
traffic will not go to the waiting room.

turnstile_action: Which action to take when a bot is detected using Turnstile. `log` will have no
impact on queueing behavior, simply keeping track of how many bots are detected
in Waiting Room Analytics. `infinite_queue` will send bots to a false queueing
state, where they will never reach your origin. `infinite_queue` requires
Advanced Waiting Room.

turnstile_mode: Which Turnstile widget type to use for detecting bot traffic. See
[the Turnstile documentation](https://developers.cloudflare.com/turnstile/concepts/widget/#widget-types)
for the definitions of these widget types. Set to `off` to disable the Turnstile
integration entirely. Setting this to anything other than `off` or `invisible`
requires Advanced Waiting Room.

extra_headers: Send extra headers

extra_query: Add additional query parameters to the request
Expand Down Expand Up @@ -1344,6 +1393,8 @@ def edit(
"queueing_status_code": queueing_status_code,
"session_duration": session_duration,
"suspended": suspended,
"turnstile_action": turnstile_action,
"turnstile_mode": turnstile_mode,
},
waiting_room_edit_params.WaitingRoomEditParams,
),
Expand Down Expand Up @@ -1503,6 +1554,9 @@ async def create(
queueing_status_code: Literal[200, 202, 429] | NotGiven = NOT_GIVEN,
session_duration: int | NotGiven = NOT_GIVEN,
suspended: bool | NotGiven = NOT_GIVEN,
turnstile_action: Literal["log", "infinite_queue"] | NotGiven = NOT_GIVEN,
turnstile_mode: Literal["off", "invisible", "visible_non_interactive", "visible_managed"]
| NotGiven = NOT_GIVEN,
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
# The extra values given here take precedence over values defined on the client or passed to this method.
extra_headers: Headers | None = None,
Expand Down Expand Up @@ -1774,6 +1828,18 @@ async def create(
suspended: Suspends or allows traffic going to the waiting room. If set to `true`, the
traffic will not go to the waiting room.

turnstile_action: Which action to take when a bot is detected using Turnstile. `log` will have no
impact on queueing behavior, simply keeping track of how many bots are detected
in Waiting Room Analytics. `infinite_queue` will send bots to a false queueing
state, where they will never reach your origin. `infinite_queue` requires
Advanced Waiting Room.

turnstile_mode: Which Turnstile widget type to use for detecting bot traffic. See
[the Turnstile documentation](https://developers.cloudflare.com/turnstile/concepts/widget/#widget-types)
for the definitions of these widget types. Set to `off` to disable the Turnstile
integration entirely. Setting this to anything other than `off` or `invisible`
requires Advanced Waiting Room.

extra_headers: Send extra headers

extra_query: Add additional query parameters to the request
Expand Down Expand Up @@ -1807,6 +1873,8 @@ async def create(
"queueing_status_code": queueing_status_code,
"session_duration": session_duration,
"suspended": suspended,
"turnstile_action": turnstile_action,
"turnstile_mode": turnstile_mode,
},
waiting_room_create_params.WaitingRoomCreateParams,
),
Expand Down Expand Up @@ -1884,6 +1952,9 @@ async def update(
queueing_status_code: Literal[200, 202, 429] | NotGiven = NOT_GIVEN,
session_duration: int | NotGiven = NOT_GIVEN,
suspended: bool | NotGiven = NOT_GIVEN,
turnstile_action: Literal["log", "infinite_queue"] | NotGiven = NOT_GIVEN,
turnstile_mode: Literal["off", "invisible", "visible_non_interactive", "visible_managed"]
| NotGiven = NOT_GIVEN,
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
# The extra values given here take precedence over values defined on the client or passed to this method.
extra_headers: Headers | None = None,
Expand Down Expand Up @@ -2155,6 +2226,18 @@ async def update(
suspended: Suspends or allows traffic going to the waiting room. If set to `true`, the
traffic will not go to the waiting room.

turnstile_action: Which action to take when a bot is detected using Turnstile. `log` will have no
impact on queueing behavior, simply keeping track of how many bots are detected
in Waiting Room Analytics. `infinite_queue` will send bots to a false queueing
state, where they will never reach your origin. `infinite_queue` requires
Advanced Waiting Room.

turnstile_mode: Which Turnstile widget type to use for detecting bot traffic. See
[the Turnstile documentation](https://developers.cloudflare.com/turnstile/concepts/widget/#widget-types)
for the definitions of these widget types. Set to `off` to disable the Turnstile
integration entirely. Setting this to anything other than `off` or `invisible`
requires Advanced Waiting Room.

extra_headers: Send extra headers

extra_query: Add additional query parameters to the request
Expand Down Expand Up @@ -2190,6 +2273,8 @@ async def update(
"queueing_status_code": queueing_status_code,
"session_duration": session_duration,
"suspended": suspended,
"turnstile_action": turnstile_action,
"turnstile_mode": turnstile_mode,
},
waiting_room_update_params.WaitingRoomUpdateParams,
),
Expand Down Expand Up @@ -2361,6 +2446,9 @@ async def edit(
queueing_status_code: Literal[200, 202, 429] | NotGiven = NOT_GIVEN,
session_duration: int | NotGiven = NOT_GIVEN,
suspended: bool | NotGiven = NOT_GIVEN,
turnstile_action: Literal["log", "infinite_queue"] | NotGiven = NOT_GIVEN,
turnstile_mode: Literal["off", "invisible", "visible_non_interactive", "visible_managed"]
| NotGiven = NOT_GIVEN,
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
# The extra values given here take precedence over values defined on the client or passed to this method.
extra_headers: Headers | None = None,
Expand Down Expand Up @@ -2632,6 +2720,18 @@ async def edit(
suspended: Suspends or allows traffic going to the waiting room. If set to `true`, the
traffic will not go to the waiting room.

turnstile_action: Which action to take when a bot is detected using Turnstile. `log` will have no
impact on queueing behavior, simply keeping track of how many bots are detected
in Waiting Room Analytics. `infinite_queue` will send bots to a false queueing
state, where they will never reach your origin. `infinite_queue` requires
Advanced Waiting Room.

turnstile_mode: Which Turnstile widget type to use for detecting bot traffic. See
[the Turnstile documentation](https://developers.cloudflare.com/turnstile/concepts/widget/#widget-types)
for the definitions of these widget types. Set to `off` to disable the Turnstile
integration entirely. Setting this to anything other than `off` or `invisible`
requires Advanced Waiting Room.

extra_headers: Send extra headers

extra_query: Add additional query parameters to the request
Expand Down Expand Up @@ -2667,6 +2767,8 @@ async def edit(
"queueing_status_code": queueing_status_code,
"session_duration": session_duration,
"suspended": suspended,
"turnstile_action": turnstile_action,
"turnstile_mode": turnstile_mode,
},
waiting_room_edit_params.WaitingRoomEditParams,
),
Expand Down
19 changes: 19 additions & 0 deletions src/cloudflare/types/waiting_rooms/waiting_room.py
Original file line number Diff line number Diff line change
Expand Up @@ -376,3 +376,22 @@ class WaitingRoom(BaseModel):
active users sessions on the route based on the traffic patterns at that time
around the world.
"""

turnstile_action: Optional[Literal["log", "infinite_queue"]] = None
"""Which action to take when a bot is detected using Turnstile.

`log` will have no impact on queueing behavior, simply keeping track of how many
bots are detected in Waiting Room Analytics. `infinite_queue` will send bots to
a false queueing state, where they will never reach your origin.
`infinite_queue` requires Advanced Waiting Room.
"""

turnstile_mode: Optional[Literal["off", "invisible", "visible_non_interactive", "visible_managed"]] = None
"""Which Turnstile widget type to use for detecting bot traffic.

See
[the Turnstile documentation](https://developers.cloudflare.com/turnstile/concepts/widget/#widget-types)
for the definitions of these widget types. Set to `off` to disable the Turnstile
integration entirely. Setting this to anything other than `off` or `invisible`
requires Advanced Waiting Room.
"""
Original file line number Diff line number Diff line change
Expand Up @@ -365,3 +365,22 @@ class WaitingRoomCreateParams(TypedDict, total=False):

If set to `true`, the traffic will not go to the waiting room.
"""

turnstile_action: Literal["log", "infinite_queue"]
"""Which action to take when a bot is detected using Turnstile.

`log` will have no impact on queueing behavior, simply keeping track of how many
bots are detected in Waiting Room Analytics. `infinite_queue` will send bots to
a false queueing state, where they will never reach your origin.
`infinite_queue` requires Advanced Waiting Room.
"""

turnstile_mode: Literal["off", "invisible", "visible_non_interactive", "visible_managed"]
"""Which Turnstile widget type to use for detecting bot traffic.

See
[the Turnstile documentation](https://developers.cloudflare.com/turnstile/concepts/widget/#widget-types)
for the definitions of these widget types. Set to `off` to disable the Turnstile
integration entirely. Setting this to anything other than `off` or `invisible`
requires Advanced Waiting Room.
"""
19 changes: 19 additions & 0 deletions src/cloudflare/types/waiting_rooms/waiting_room_edit_params.py
Original file line number Diff line number Diff line change
Expand Up @@ -365,3 +365,22 @@ class WaitingRoomEditParams(TypedDict, total=False):

If set to `true`, the traffic will not go to the waiting room.
"""

turnstile_action: Literal["log", "infinite_queue"]
"""Which action to take when a bot is detected using Turnstile.

`log` will have no impact on queueing behavior, simply keeping track of how many
bots are detected in Waiting Room Analytics. `infinite_queue` will send bots to
a false queueing state, where they will never reach your origin.
`infinite_queue` requires Advanced Waiting Room.
"""

turnstile_mode: Literal["off", "invisible", "visible_non_interactive", "visible_managed"]
"""Which Turnstile widget type to use for detecting bot traffic.

See
[the Turnstile documentation](https://developers.cloudflare.com/turnstile/concepts/widget/#widget-types)
for the definitions of these widget types. Set to `off` to disable the Turnstile
integration entirely. Setting this to anything other than `off` or `invisible`
requires Advanced Waiting Room.
"""
Original file line number Diff line number Diff line change
Expand Up @@ -365,3 +365,22 @@ class WaitingRoomUpdateParams(TypedDict, total=False):

If set to `true`, the traffic will not go to the waiting room.
"""

turnstile_action: Literal["log", "infinite_queue"]
"""Which action to take when a bot is detected using Turnstile.

`log` will have no impact on queueing behavior, simply keeping track of how many
bots are detected in Waiting Room Analytics. `infinite_queue` will send bots to
a false queueing state, where they will never reach your origin.
`infinite_queue` requires Advanced Waiting Room.
"""

turnstile_mode: Literal["off", "invisible", "visible_non_interactive", "visible_managed"]
"""Which Turnstile widget type to use for detecting bot traffic.

See
[the Turnstile documentation](https://developers.cloudflare.com/turnstile/concepts/widget/#widget-types)
for the definitions of these widget types. Set to `off` to disable the Turnstile
integration entirely. Setting this to anything other than `off` or `invisible`
requires Advanced Waiting Room.
"""
Loading