Skip to content

Commit cefb764

Browse files
feat(api): api update (#2568)
1 parent facb46c commit cefb764

File tree

5 files changed

+73
-4
lines changed

5 files changed

+73
-4
lines changed

.stats.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
11
configured_endpoints: 1664
2-
openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-4e988c584e8eacb13347475cb6ac38171cedd948f5101b03c37ec712341b9d7a.yml
3-
openapi_spec_hash: c4e86fdb536ff8299ffc1faed7e3e573
2+
openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-3f1027f7740afd5fbb6aa554575dd2fd7dd68c0d7c394c68b5515753860eaf8e.yml
3+
openapi_spec_hash: fbe090182fbea3b046b951f6f4fb3b33
44
config_hash: af2dbb6a6332cef477c4697db6a78d79

src/resources/waiting-rooms/events/details.ts

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -108,6 +108,18 @@ export interface EventQuery {
108108
* the event's `new_users_per_minute` property is also set.
109109
*/
110110
total_active_users?: number | null;
111+
112+
/**
113+
* If set, the event will override the waiting room's `turnstile_action` property
114+
* while it is active. If null, the event will inherit it.
115+
*/
116+
turnstile_action?: 'log' | 'infinite_queue' | null;
117+
118+
/**
119+
* If set, the event will override the waiting room's `turnstile_mode` property
120+
* while it is active. If null, the event will inherit it.
121+
*/
122+
turnstile_mode?: 'off' | 'invisible' | 'visible_non_interactive' | 'visible_managed' | null;
111123
}
112124

113125
export interface DetailGetResponse {

src/resources/waiting-rooms/events/events.ts

Lines changed: 51 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -212,6 +212,18 @@ export interface Event {
212212
* the event's `new_users_per_minute` property is also set.
213213
*/
214214
total_active_users?: number | null;
215+
216+
/**
217+
* If set, the event will override the waiting room's `turnstile_action` property
218+
* while it is active. If null, the event will inherit it.
219+
*/
220+
turnstile_action?: 'log' | 'infinite_queue' | null;
221+
222+
/**
223+
* If set, the event will override the waiting room's `turnstile_mode` property
224+
* while it is active. If null, the event will inherit it.
225+
*/
226+
turnstile_mode?: 'off' | 'invisible' | 'visible_non_interactive' | 'visible_managed' | null;
215227
}
216228

217229
export interface EventDeleteResponse {
@@ -312,6 +324,19 @@ export interface EventCreateParams {
312324
* is also set.
313325
*/
314326
total_active_users?: number | null;
327+
328+
/**
329+
* Body param: If set, the event will override the waiting room's
330+
* `turnstile_action` property while it is active. If null, the event will inherit
331+
* it.
332+
*/
333+
turnstile_action?: 'log' | 'infinite_queue' | null;
334+
335+
/**
336+
* Body param: If set, the event will override the waiting room's `turnstile_mode`
337+
* property while it is active. If null, the event will inherit it.
338+
*/
339+
turnstile_mode?: 'off' | 'invisible' | 'visible_non_interactive' | 'visible_managed' | null;
315340
}
316341

317342
export interface EventUpdateParams {
@@ -408,6 +433,19 @@ export interface EventUpdateParams {
408433
* is also set.
409434
*/
410435
total_active_users?: number | null;
436+
437+
/**
438+
* Body param: If set, the event will override the waiting room's
439+
* `turnstile_action` property while it is active. If null, the event will inherit
440+
* it.
441+
*/
442+
turnstile_action?: 'log' | 'infinite_queue' | null;
443+
444+
/**
445+
* Body param: If set, the event will override the waiting room's `turnstile_mode`
446+
* property while it is active. If null, the event will inherit it.
447+
*/
448+
turnstile_mode?: 'off' | 'invisible' | 'visible_non_interactive' | 'visible_managed' | null;
411449
}
412450

413451
export interface EventListParams extends V4PagePaginationArrayParams {
@@ -518,6 +556,19 @@ export interface EventEditParams {
518556
* is also set.
519557
*/
520558
total_active_users?: number | null;
559+
560+
/**
561+
* Body param: If set, the event will override the waiting room's
562+
* `turnstile_action` property while it is active. If null, the event will inherit
563+
* it.
564+
*/
565+
turnstile_action?: 'log' | 'infinite_queue' | null;
566+
567+
/**
568+
* Body param: If set, the event will override the waiting room's `turnstile_mode`
569+
* property while it is active. If null, the event will inherit it.
570+
*/
571+
turnstile_mode?: 'off' | 'invisible' | 'visible_non_interactive' | 'visible_managed' | null;
521572
}
522573

523574
export interface EventGetParams {

src/resources/zones/zones.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -185,13 +185,13 @@ export class ZonesV4PagePaginationArray extends V4PagePaginationArray<Zone> {}
185185
* A full zone implies that DNS is hosted with Cloudflare. A partial zone is
186186
* typically a partner-hosted zone or a CNAME setup.
187187
*/
188-
export type Type = 'full' | 'partial' | 'secondary';
188+
export type Type = 'full' | 'partial' | 'secondary' | 'internal';
189189

190190
/**
191191
* A full zone implies that DNS is hosted with Cloudflare. A partial zone is
192192
* typically a partner-hosted zone or a CNAME setup.
193193
*/
194-
export type TypeParam = 'full' | 'partial' | 'secondary';
194+
export type TypeParam = 'full' | 'partial' | 'secondary' | 'internal';
195195

196196
export interface Zone {
197197
/**

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

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -43,6 +43,8 @@ describe('resource events', () => {
4343
shuffle_at_event_start: true,
4444
suspended: true,
4545
total_active_users: 200,
46+
turnstile_action: 'log',
47+
turnstile_mode: 'off',
4648
});
4749
});
4850

@@ -86,6 +88,8 @@ describe('resource events', () => {
8688
shuffle_at_event_start: true,
8789
suspended: true,
8890
total_active_users: 200,
91+
turnstile_action: 'log',
92+
turnstile_mode: 'off',
8993
},
9094
);
9195
});
@@ -174,6 +178,8 @@ describe('resource events', () => {
174178
shuffle_at_event_start: true,
175179
suspended: true,
176180
total_active_users: 200,
181+
turnstile_action: 'log',
182+
turnstile_mode: 'off',
177183
},
178184
);
179185
});

0 commit comments

Comments
 (0)