Skip to content

Commit cc2ec85

Browse files
stainless-app[bot]meorphis
authored andcommitted
feat(api): api update (#2288)
1 parent fc1c802 commit cc2ec85

File tree

3 files changed

+97
-1
lines changed

3 files changed

+97
-1
lines changed

.stats.yml

Lines changed: 1 addition & 1 deletion
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/resources/waiting-rooms/waiting-rooms.ts

Lines changed: 90 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -580,6 +580,24 @@ export interface Query {
580580
* traffic will not go to the waiting room.
581581
*/
582582
suspended?: boolean;
583+
584+
/**
585+
* Which action to take when a bot is detected using Turnstile. `log` will have no
586+
* impact on queueing behavior, simply keeping track of how many bots are detected
587+
* in Waiting Room Analytics. `infinite_queue` will send bots to a false queueing
588+
* state, where they will never reach your origin. `infinite_queue` requires
589+
* Advanced Waiting Room.
590+
*/
591+
turnstile_action?: 'log' | 'infinite_queue';
592+
593+
/**
594+
* Which Turnstile widget type to use for detecting bot traffic. See
595+
* [the Turnstile documentation](https://developers.cloudflare.com/turnstile/concepts/widget/#widget-types)
596+
* for the definitions of these widget types. Set to `off` to disable the Turnstile
597+
* integration entirely. Setting this to anything other than `off` or `invisible`
598+
* requires Advanced Waiting Room.
599+
*/
600+
turnstile_mode?: 'off' | 'invisible' | 'visible_non_interactive' | 'visible_managed';
583601
}
584602

585603
export interface WaitingRoom {
@@ -951,6 +969,24 @@ export interface WaitingRoom {
951969
* around the world.
952970
*/
953971
total_active_users?: number;
972+
973+
/**
974+
* Which action to take when a bot is detected using Turnstile. `log` will have no
975+
* impact on queueing behavior, simply keeping track of how many bots are detected
976+
* in Waiting Room Analytics. `infinite_queue` will send bots to a false queueing
977+
* state, where they will never reach your origin. `infinite_queue` requires
978+
* Advanced Waiting Room.
979+
*/
980+
turnstile_action?: 'log' | 'infinite_queue';
981+
982+
/**
983+
* Which Turnstile widget type to use for detecting bot traffic. See
984+
* [the Turnstile documentation](https://developers.cloudflare.com/turnstile/concepts/widget/#widget-types)
985+
* for the definitions of these widget types. Set to `off` to disable the Turnstile
986+
* integration entirely. Setting this to anything other than `off` or `invisible`
987+
* requires Advanced Waiting Room.
988+
*/
989+
turnstile_mode?: 'off' | 'invisible' | 'visible_non_interactive' | 'visible_managed';
954990
}
955991

956992
export interface WaitingRoomDeleteResponse {
@@ -1318,6 +1354,24 @@ export interface WaitingRoomCreateParams {
13181354
* `true`, the traffic will not go to the waiting room.
13191355
*/
13201356
suspended?: boolean;
1357+
1358+
/**
1359+
* Body param: Which action to take when a bot is detected using Turnstile. `log`
1360+
* will have no impact on queueing behavior, simply keeping track of how many bots
1361+
* are detected in Waiting Room Analytics. `infinite_queue` will send bots to a
1362+
* false queueing state, where they will never reach your origin. `infinite_queue`
1363+
* requires Advanced Waiting Room.
1364+
*/
1365+
turnstile_action?: 'log' | 'infinite_queue';
1366+
1367+
/**
1368+
* Body param: Which Turnstile widget type to use for detecting bot traffic. See
1369+
* [the Turnstile documentation](https://developers.cloudflare.com/turnstile/concepts/widget/#widget-types)
1370+
* for the definitions of these widget types. Set to `off` to disable the Turnstile
1371+
* integration entirely. Setting this to anything other than `off` or `invisible`
1372+
* requires Advanced Waiting Room.
1373+
*/
1374+
turnstile_mode?: 'off' | 'invisible' | 'visible_non_interactive' | 'visible_managed';
13211375
}
13221376

13231377
export interface WaitingRoomUpdateParams {
@@ -1681,6 +1735,24 @@ export interface WaitingRoomUpdateParams {
16811735
* `true`, the traffic will not go to the waiting room.
16821736
*/
16831737
suspended?: boolean;
1738+
1739+
/**
1740+
* Body param: Which action to take when a bot is detected using Turnstile. `log`
1741+
* will have no impact on queueing behavior, simply keeping track of how many bots
1742+
* are detected in Waiting Room Analytics. `infinite_queue` will send bots to a
1743+
* false queueing state, where they will never reach your origin. `infinite_queue`
1744+
* requires Advanced Waiting Room.
1745+
*/
1746+
turnstile_action?: 'log' | 'infinite_queue';
1747+
1748+
/**
1749+
* Body param: Which Turnstile widget type to use for detecting bot traffic. See
1750+
* [the Turnstile documentation](https://developers.cloudflare.com/turnstile/concepts/widget/#widget-types)
1751+
* for the definitions of these widget types. Set to `off` to disable the Turnstile
1752+
* integration entirely. Setting this to anything other than `off` or `invisible`
1753+
* requires Advanced Waiting Room.
1754+
*/
1755+
turnstile_mode?: 'off' | 'invisible' | 'visible_non_interactive' | 'visible_managed';
16841756
}
16851757

16861758
export interface WaitingRoomListParams extends V4PagePaginationArrayParams {
@@ -2058,6 +2130,24 @@ export interface WaitingRoomEditParams {
20582130
* `true`, the traffic will not go to the waiting room.
20592131
*/
20602132
suspended?: boolean;
2133+
2134+
/**
2135+
* Body param: Which action to take when a bot is detected using Turnstile. `log`
2136+
* will have no impact on queueing behavior, simply keeping track of how many bots
2137+
* are detected in Waiting Room Analytics. `infinite_queue` will send bots to a
2138+
* false queueing state, where they will never reach your origin. `infinite_queue`
2139+
* requires Advanced Waiting Room.
2140+
*/
2141+
turnstile_action?: 'log' | 'infinite_queue';
2142+
2143+
/**
2144+
* Body param: Which Turnstile widget type to use for detecting bot traffic. See
2145+
* [the Turnstile documentation](https://developers.cloudflare.com/turnstile/concepts/widget/#widget-types)
2146+
* for the definitions of these widget types. Set to `off` to disable the Turnstile
2147+
* integration entirely. Setting this to anything other than `off` or `invisible`
2148+
* requires Advanced Waiting Room.
2149+
*/
2150+
turnstile_mode?: 'off' | 'invisible' | 'visible_non_interactive' | 'visible_managed';
20612151
}
20622152

20632153
export interface WaitingRoomGetParams {

tests/api-resources/waiting-rooms/waiting-rooms.test.ts

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -50,6 +50,8 @@ describe('resource waitingRooms', () => {
5050
queueing_status_code: 200,
5151
session_duration: 1,
5252
suspended: true,
53+
turnstile_action: 'log',
54+
turnstile_mode: 'off',
5355
});
5456
});
5557

@@ -93,6 +95,8 @@ describe('resource waitingRooms', () => {
9395
queueing_status_code: 200,
9496
session_duration: 1,
9597
suspended: true,
98+
turnstile_action: 'log',
99+
turnstile_mode: 'off',
96100
});
97101
});
98102

@@ -174,6 +178,8 @@ describe('resource waitingRooms', () => {
174178
queueing_status_code: 200,
175179
session_duration: 1,
176180
suspended: true,
181+
turnstile_action: 'log',
182+
turnstile_mode: 'off',
177183
});
178184
});
179185

0 commit comments

Comments
 (0)