Skip to content

Commit 6cd86a9

Browse files
chore(api): update composite API spec
1 parent a1f6dde commit 6cd86a9

22 files changed

Lines changed: 1629 additions & 877 deletions

.stats.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
11
configured_endpoints: 2307
2-
openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare/cloudflare-f6629caeed7e751f69e45ec2e7255e7a22ee26f53737b282515b2528cbebf29f.yml
3-
openapi_spec_hash: 1adc1563086648ac63a225ef4fea374d
2+
openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare/cloudflare-30cc72a59aa7c6decd41d038b42249617e6713a08a4f375bb6f0e904d08c01f5.yml
3+
openapi_spec_hash: 57bb0cb8db5b803654160bc4451ea9be
44
config_hash: aed7aa51410f7a92236320eb8c9040f1

src/cloudflare/resources/realtime_kit/api.md

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -75,6 +75,7 @@ Types:
7575

7676
```python
7777
from cloudflare.types.realtime_kit import (
78+
SessionGenerateSummaryOfTranscriptsResponse,
7879
SessionGetParticipantDataFromPeerIDResponse,
7980
SessionGetSessionChatResponse,
8081
SessionGetSessionDetailsResponse,
@@ -88,14 +89,14 @@ from cloudflare.types.realtime_kit import (
8889

8990
Methods:
9091

91-
- <code title="post /accounts/{account_id}/realtime/kit/{app_id}/sessions/{session_id}/summary">client.realtime_kit.sessions.<a href="./src/cloudflare/resources/realtime_kit/sessions.py">generate_summary_of_transcripts</a>(session_id, \*, account_id, app_id) -> None</code>
92+
- <code title="post /accounts/{account_id}/realtime/kit/{app_id}/sessions/{session_id}/summary">client.realtime_kit.sessions.<a href="./src/cloudflare/resources/realtime_kit/sessions.py">generate_summary_of_transcripts</a>(session_id, \*, account_id, app_id) -> <a href="./src/cloudflare/types/realtime_kit/session_generate_summary_of_transcripts_response.py">SessionGenerateSummaryOfTranscriptsResponse</a></code>
9293
- <code title="get /accounts/{account_id}/realtime/kit/{app_id}/sessions/peer-report/{peer_id}">client.realtime_kit.sessions.<a href="./src/cloudflare/resources/realtime_kit/sessions.py">get_participant_data_from_peer_id</a>(peer_id, \*, account_id, app_id, \*\*<a href="src/cloudflare/types/realtime_kit/session_get_participant_data_from_peer_id_params.py">params</a>) -> <a href="./src/cloudflare/types/realtime_kit/session_get_participant_data_from_peer_id_response.py">SessionGetParticipantDataFromPeerIDResponse</a></code>
9394
- <code title="get /accounts/{account_id}/realtime/kit/{app_id}/sessions/{session_id}/chat">client.realtime_kit.sessions.<a href="./src/cloudflare/resources/realtime_kit/sessions.py">get_session_chat</a>(session_id, \*, account_id, app_id) -> <a href="./src/cloudflare/types/realtime_kit/session_get_session_chat_response.py">SessionGetSessionChatResponse</a></code>
9495
- <code title="get /accounts/{account_id}/realtime/kit/{app_id}/sessions/{session_id}">client.realtime_kit.sessions.<a href="./src/cloudflare/resources/realtime_kit/sessions.py">get_session_details</a>(session_id, \*, account_id, app_id, \*\*<a href="src/cloudflare/types/realtime_kit/session_get_session_details_params.py">params</a>) -> <a href="./src/cloudflare/types/realtime_kit/session_get_session_details_response.py">SessionGetSessionDetailsResponse</a></code>
9596
- <code title="get /accounts/{account_id}/realtime/kit/{app_id}/sessions/{session_id}/participants/{participant_id}">client.realtime_kit.sessions.<a href="./src/cloudflare/resources/realtime_kit/sessions.py">get_session_participant_details</a>(participant_id, \*, account_id, app_id, session_id, \*\*<a href="src/cloudflare/types/realtime_kit/session_get_session_participant_details_params.py">params</a>) -> <a href="./src/cloudflare/types/realtime_kit/session_get_session_participant_details_response.py">SessionGetSessionParticipantDetailsResponse</a></code>
9697
- <code title="get /accounts/{account_id}/realtime/kit/{app_id}/sessions/{session_id}/participants">client.realtime_kit.sessions.<a href="./src/cloudflare/resources/realtime_kit/sessions.py">get_session_participants</a>(session_id, \*, account_id, app_id, \*\*<a href="src/cloudflare/types/realtime_kit/session_get_session_participants_params.py">params</a>) -> <a href="./src/cloudflare/types/realtime_kit/session_get_session_participants_response.py">SessionGetSessionParticipantsResponse</a></code>
9798
- <code title="get /accounts/{account_id}/realtime/kit/{app_id}/sessions/{session_id}/summary">client.realtime_kit.sessions.<a href="./src/cloudflare/resources/realtime_kit/sessions.py">get_session_summary</a>(session_id, \*, account_id, app_id) -> <a href="./src/cloudflare/types/realtime_kit/session_get_session_summary_response.py">SessionGetSessionSummaryResponse</a></code>
98-
- <code title="get /accounts/{account_id}/realtime/kit/{app_id}/sessions/{session_id}/transcript">client.realtime_kit.sessions.<a href="./src/cloudflare/resources/realtime_kit/sessions.py">get_session_transcripts</a>(session_id, \*, account_id, app_id) -> <a href="./src/cloudflare/types/realtime_kit/session_get_session_transcripts_response.py">SessionGetSessionTranscriptsResponse</a></code>
99+
- <code title="get /accounts/{account_id}/realtime/kit/{app_id}/sessions/{session_id}/transcript">client.realtime_kit.sessions.<a href="./src/cloudflare/resources/realtime_kit/sessions.py">get_session_transcripts</a>(session_id, \*, account_id, app_id, \*\*<a href="src/cloudflare/types/realtime_kit/session_get_session_transcripts_params.py">params</a>) -> <a href="./src/cloudflare/types/realtime_kit/session_get_session_transcripts_response.py">SessionGetSessionTranscriptsResponse</a></code>
99100
- <code title="get /accounts/{account_id}/realtime/kit/{app_id}/sessions">client.realtime_kit.sessions.<a href="./src/cloudflare/resources/realtime_kit/sessions.py">get_sessions</a>(app_id, \*, account_id, \*\*<a href="src/cloudflare/types/realtime_kit/session_get_sessions_params.py">params</a>) -> <a href="./src/cloudflare/types/realtime_kit/session_get_sessions_response.py">SessionGetSessionsResponse</a></code>
100101

101102
## Recordings
@@ -109,6 +110,7 @@ from cloudflare.types.realtime_kit import (
109110
RecordingGetRecordingsResponse,
110111
RecordingPauseResumeStopRecordingResponse,
111112
RecordingStartRecordingsResponse,
113+
RecordingStartTrackRecordingResponse,
112114
)
113115
```
114116

@@ -119,7 +121,7 @@ Methods:
119121
- <code title="get /accounts/{account_id}/realtime/kit/{app_id}/recordings">client.realtime_kit.recordings.<a href="./src/cloudflare/resources/realtime_kit/recordings.py">get_recordings</a>(app_id, \*, account_id, \*\*<a href="src/cloudflare/types/realtime_kit/recording_get_recordings_params.py">params</a>) -> <a href="./src/cloudflare/types/realtime_kit/recording_get_recordings_response.py">RecordingGetRecordingsResponse</a></code>
120122
- <code title="put /accounts/{account_id}/realtime/kit/{app_id}/recordings/{recording_id}">client.realtime_kit.recordings.<a href="./src/cloudflare/resources/realtime_kit/recordings.py">pause_resume_stop_recording</a>(recording_id, \*, account_id, app_id, \*\*<a href="src/cloudflare/types/realtime_kit/recording_pause_resume_stop_recording_params.py">params</a>) -> <a href="./src/cloudflare/types/realtime_kit/recording_pause_resume_stop_recording_response.py">RecordingPauseResumeStopRecordingResponse</a></code>
121123
- <code title="post /accounts/{account_id}/realtime/kit/{app_id}/recordings">client.realtime_kit.recordings.<a href="./src/cloudflare/resources/realtime_kit/recordings.py">start_recordings</a>(app_id, \*, account_id, \*\*<a href="src/cloudflare/types/realtime_kit/recording_start_recordings_params.py">params</a>) -> <a href="./src/cloudflare/types/realtime_kit/recording_start_recordings_response.py">RecordingStartRecordingsResponse</a></code>
122-
- <code title="post /accounts/{account_id}/realtime/kit/{app_id}/recordings/track">client.realtime_kit.recordings.<a href="./src/cloudflare/resources/realtime_kit/recordings.py">start_track_recording</a>(app_id, \*, account_id, \*\*<a href="src/cloudflare/types/realtime_kit/recording_start_track_recording_params.py">params</a>) -> None</code>
124+
- <code title="post /accounts/{account_id}/realtime/kit/{app_id}/recordings/track">client.realtime_kit.recordings.<a href="./src/cloudflare/resources/realtime_kit/recordings.py">start_track_recording</a>(app_id, \*, account_id, \*\*<a href="src/cloudflare/types/realtime_kit/recording_start_track_recording_params.py">params</a>) -> <a href="./src/cloudflare/types/realtime_kit/recording_start_track_recording_response.py">RecordingStartTrackRecordingResponse</a></code>
123125

124126
## Webhooks
125127

src/cloudflare/resources/realtime_kit/presets.py

Lines changed: 12 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -52,8 +52,8 @@ def create(
5252
account_id: str,
5353
config: preset_create_params.Config,
5454
name: str,
55+
permissions: preset_create_params.Permissions,
5556
ui: preset_create_params.UI,
56-
permissions: preset_create_params.Permissions | Omit = omit,
5757
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
5858
# The extra values given here take precedence over values defined on the client or passed to this method.
5959
extra_headers: Headers | None = None,
@@ -89,8 +89,8 @@ def create(
8989
{
9090
"config": config,
9191
"name": name,
92-
"ui": ui,
9392
"permissions": permissions,
93+
"ui": ui,
9494
},
9595
preset_create_params.PresetCreateParams,
9696
),
@@ -218,6 +218,7 @@ def get(
218218
account_id: str,
219219
page_no: float | Omit = omit,
220220
per_page: float | Omit = omit,
221+
search: str | Omit = omit,
221222
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
222223
# The extra values given here take precedence over values defined on the client or passed to this method.
223224
extra_headers: Headers | None = None,
@@ -237,6 +238,8 @@ def get(
237238
238239
per_page: Number of results per page
239240
241+
search: Search presets by name.
242+
240243
extra_headers: Send extra headers
241244
242245
extra_query: Add additional query parameters to the request
@@ -260,6 +263,7 @@ def get(
260263
{
261264
"page_no": page_no,
262265
"per_page": per_page,
266+
"search": search,
263267
},
264268
preset_get_params.PresetGetParams,
265269
),
@@ -343,8 +347,8 @@ async def create(
343347
account_id: str,
344348
config: preset_create_params.Config,
345349
name: str,
350+
permissions: preset_create_params.Permissions,
346351
ui: preset_create_params.UI,
347-
permissions: preset_create_params.Permissions | Omit = omit,
348352
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
349353
# The extra values given here take precedence over values defined on the client or passed to this method.
350354
extra_headers: Headers | None = None,
@@ -380,8 +384,8 @@ async def create(
380384
{
381385
"config": config,
382386
"name": name,
383-
"ui": ui,
384387
"permissions": permissions,
388+
"ui": ui,
385389
},
386390
preset_create_params.PresetCreateParams,
387391
),
@@ -509,6 +513,7 @@ async def get(
509513
account_id: str,
510514
page_no: float | Omit = omit,
511515
per_page: float | Omit = omit,
516+
search: str | Omit = omit,
512517
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
513518
# The extra values given here take precedence over values defined on the client or passed to this method.
514519
extra_headers: Headers | None = None,
@@ -528,6 +533,8 @@ async def get(
528533
529534
per_page: Number of results per page
530535
536+
search: Search presets by name.
537+
531538
extra_headers: Send extra headers
532539
533540
extra_query: Add additional query parameters to the request
@@ -551,6 +558,7 @@ async def get(
551558
{
552559
"page_no": page_no,
553560
"per_page": per_page,
561+
"search": search,
554562
},
555563
preset_get_params.PresetGetParams,
556564
),

src/cloudflare/resources/realtime_kit/recordings.py

Lines changed: 34 additions & 27 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88

99
import httpx
1010

11-
from ..._types import Body, Omit, Query, Headers, NoneType, NotGiven, omit, not_given
11+
from ..._types import Body, Omit, Query, Headers, NotGiven, SequenceNotStr, omit, not_given
1212
from ..._utils import path_template, maybe_transform, async_maybe_transform
1313
from ..._compat import cached_property
1414
from ..._resource import SyncAPIResource, AsyncAPIResource
@@ -29,6 +29,7 @@
2929
from ...types.realtime_kit.recording_start_recordings_response import RecordingStartRecordingsResponse
3030
from ...types.realtime_kit.recording_get_one_recording_response import RecordingGetOneRecordingResponse
3131
from ...types.realtime_kit.recording_get_active_recordings_response import RecordingGetActiveRecordingsResponse
32+
from ...types.realtime_kit.recording_start_track_recording_response import RecordingStartTrackRecordingResponse
3233
from ...types.realtime_kit.recording_pause_resume_stop_recording_response import (
3334
RecordingPauseResumeStopRecordingResponse,
3435
)
@@ -392,22 +393,22 @@ def start_track_recording(
392393
app_id: str,
393394
*,
394395
account_id: str,
395-
layers: Dict[str, recording_start_track_recording_params.Layers],
396396
meeting_id: str,
397-
max_seconds: float | Omit = omit,
397+
layers: Dict[str, recording_start_track_recording_params.Layers] | Omit = omit,
398+
user_ids: SequenceNotStr[str] | Omit = omit,
398399
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
399400
# The extra values given here take precedence over values defined on the client or passed to this method.
400401
extra_headers: Headers | None = None,
401402
extra_query: Query | None = None,
402403
extra_body: Body | None = None,
403404
timeout: float | httpx.Timeout | None | NotGiven = not_given,
404-
) -> None:
405-
"""Starts a track recording in a meeting.
405+
) -> RecordingStartTrackRecordingResponse:
406+
"""Starts track recording for a meeting.
406407
407-
Track recordings consist of "layers".
408-
Layers are used to map audio/video tracks in a meeting to output destinations.
409-
More information about track recordings is available in the
410-
[Track Recordings Guide Page](https://docs.realtime.cloudflare.com/guides/capabilities/recording/recording-overview).
408+
Track recording currently records separate
409+
participant audio tracks as WebM files in the RealtimeKit bucket. Video track
410+
recording is in development. For more information, refer to
411+
[Track recording](/realtime/realtimekit/recording-guide/track-recording/).
411412
412413
Args:
413414
account_id: The account identifier tag.
@@ -416,7 +417,11 @@ def start_track_recording(
416417
417418
meeting_id: ID of the meeting to record.
418419
419-
max_seconds: Maximum seconds this recording should be active for (beta)
420+
layers: Optional audio layer configuration. If omitted, RealtimeKit records all
421+
participant audio using the default file name prefix.
422+
423+
user_ids: Optional list of participant user IDs to record. Selective track recording
424+
(`user_ids`) is in early beta contact support to use this feature.
420425
421426
extra_headers: Send extra headers
422427
@@ -430,23 +435,22 @@ def start_track_recording(
430435
raise ValueError(f"Expected a non-empty value for `account_id` but received {account_id!r}")
431436
if not app_id:
432437
raise ValueError(f"Expected a non-empty value for `app_id` but received {app_id!r}")
433-
extra_headers = {"Accept": "*/*", **(extra_headers or {})}
434438
return self._post(
435439
path_template(
436440
"/accounts/{account_id}/realtime/kit/{app_id}/recordings/track", account_id=account_id, app_id=app_id
437441
),
438442
body=maybe_transform(
439443
{
440-
"layers": layers,
441444
"meeting_id": meeting_id,
442-
"max_seconds": max_seconds,
445+
"layers": layers,
446+
"user_ids": user_ids,
443447
},
444448
recording_start_track_recording_params.RecordingStartTrackRecordingParams,
445449
),
446450
options=make_request_options(
447451
extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout
448452
),
449-
cast_to=NoneType,
453+
cast_to=RecordingStartTrackRecordingResponse,
450454
)
451455

452456

@@ -806,22 +810,22 @@ async def start_track_recording(
806810
app_id: str,
807811
*,
808812
account_id: str,
809-
layers: Dict[str, recording_start_track_recording_params.Layers],
810813
meeting_id: str,
811-
max_seconds: float | Omit = omit,
814+
layers: Dict[str, recording_start_track_recording_params.Layers] | Omit = omit,
815+
user_ids: SequenceNotStr[str] | Omit = omit,
812816
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
813817
# The extra values given here take precedence over values defined on the client or passed to this method.
814818
extra_headers: Headers | None = None,
815819
extra_query: Query | None = None,
816820
extra_body: Body | None = None,
817821
timeout: float | httpx.Timeout | None | NotGiven = not_given,
818-
) -> None:
819-
"""Starts a track recording in a meeting.
822+
) -> RecordingStartTrackRecordingResponse:
823+
"""Starts track recording for a meeting.
820824
821-
Track recordings consist of "layers".
822-
Layers are used to map audio/video tracks in a meeting to output destinations.
823-
More information about track recordings is available in the
824-
[Track Recordings Guide Page](https://docs.realtime.cloudflare.com/guides/capabilities/recording/recording-overview).
825+
Track recording currently records separate
826+
participant audio tracks as WebM files in the RealtimeKit bucket. Video track
827+
recording is in development. For more information, refer to
828+
[Track recording](/realtime/realtimekit/recording-guide/track-recording/).
825829
826830
Args:
827831
account_id: The account identifier tag.
@@ -830,7 +834,11 @@ async def start_track_recording(
830834
831835
meeting_id: ID of the meeting to record.
832836
833-
max_seconds: Maximum seconds this recording should be active for (beta)
837+
layers: Optional audio layer configuration. If omitted, RealtimeKit records all
838+
participant audio using the default file name prefix.
839+
840+
user_ids: Optional list of participant user IDs to record. Selective track recording
841+
(`user_ids`) is in early beta contact support to use this feature.
834842
835843
extra_headers: Send extra headers
836844
@@ -844,23 +852,22 @@ async def start_track_recording(
844852
raise ValueError(f"Expected a non-empty value for `account_id` but received {account_id!r}")
845853
if not app_id:
846854
raise ValueError(f"Expected a non-empty value for `app_id` but received {app_id!r}")
847-
extra_headers = {"Accept": "*/*", **(extra_headers or {})}
848855
return await self._post(
849856
path_template(
850857
"/accounts/{account_id}/realtime/kit/{app_id}/recordings/track", account_id=account_id, app_id=app_id
851858
),
852859
body=await async_maybe_transform(
853860
{
854-
"layers": layers,
855861
"meeting_id": meeting_id,
856-
"max_seconds": max_seconds,
862+
"layers": layers,
863+
"user_ids": user_ids,
857864
},
858865
recording_start_track_recording_params.RecordingStartTrackRecordingParams,
859866
),
860867
options=make_request_options(
861868
extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout
862869
),
863-
cast_to=NoneType,
870+
cast_to=RecordingStartTrackRecordingResponse,
864871
)
865872

866873

0 commit comments

Comments
 (0)