55
66from ... import errors
77from ...client import AuthenticatedClient , Client
8+ from ...models .create_recording_files_body import CreateRecordingFilesBody
89from ...models .error import Error
910from ...models .recording_config import RecordingConfig
1011from ...models .recording_details_response import RecordingDetailsResponse
11- from ...types import Response
12+ from ...types import UNSET , Response , Unset
1213
1314
1415def _get_kwargs (
1516 * ,
16- body : RecordingConfig ,
17+ body : RecordingConfig | CreateRecordingFilesBody | Unset = UNSET ,
1718) -> dict [str , Any ]:
1819 headers : dict [str , Any ] = {}
1920
@@ -22,9 +23,12 @@ def _get_kwargs(
2223 "url" : "/recordings" ,
2324 }
2425
25- _kwargs ["json" ] = body .to_dict ()
26+ if isinstance (body , RecordingConfig ):
27+ _kwargs ["json" ] = body .to_dict ()
2628
27- headers ["Content-Type" ] = "application/json"
29+ headers ["Content-Type" ] = "application/json"
30+ if isinstance (body , CreateRecordingFilesBody ):
31+ _kwargs ["files" ] = body .to_multipart ()
2832
2933 _kwargs ["headers" ] = headers
3034 return _kwargs
@@ -78,14 +82,18 @@ def _build_response(
7882def sync_detailed (
7983 * ,
8084 client : AuthenticatedClient ,
81- body : RecordingConfig ,
85+ body : RecordingConfig | CreateRecordingFilesBody | Unset = UNSET ,
8286) -> Response [Error | RecordingDetailsResponse ]:
8387 """Create a recording
8488
8589 Create a recording resource. Capturing starts synchronously, so it is returned with status `active`.
90+ A source naming an `outputId` records an output the composition already has and is sent as JSON. A
91+ template source renders its own scene and has to be sent as `multipart/form-data`: the configuration
92+ in a `config` part, the React bundle in a `template` part.
8693
8794 Args:
8895 body (RecordingConfig): Recording configuration
96+ body (CreateRecordingFilesBody):
8997
9098 Raises:
9199 errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True.
@@ -109,14 +117,18 @@ def sync_detailed(
109117def sync (
110118 * ,
111119 client : AuthenticatedClient ,
112- body : RecordingConfig ,
120+ body : RecordingConfig | CreateRecordingFilesBody | Unset = UNSET ,
113121) -> Error | RecordingDetailsResponse | None :
114122 """Create a recording
115123
116124 Create a recording resource. Capturing starts synchronously, so it is returned with status `active`.
125+ A source naming an `outputId` records an output the composition already has and is sent as JSON. A
126+ template source renders its own scene and has to be sent as `multipart/form-data`: the configuration
127+ in a `config` part, the React bundle in a `template` part.
117128
118129 Args:
119130 body (RecordingConfig): Recording configuration
131+ body (CreateRecordingFilesBody):
120132
121133 Raises:
122134 errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True.
@@ -135,14 +147,18 @@ def sync(
135147async def asyncio_detailed (
136148 * ,
137149 client : AuthenticatedClient ,
138- body : RecordingConfig ,
150+ body : RecordingConfig | CreateRecordingFilesBody | Unset = UNSET ,
139151) -> Response [Error | RecordingDetailsResponse ]:
140152 """Create a recording
141153
142154 Create a recording resource. Capturing starts synchronously, so it is returned with status `active`.
155+ A source naming an `outputId` records an output the composition already has and is sent as JSON. A
156+ template source renders its own scene and has to be sent as `multipart/form-data`: the configuration
157+ in a `config` part, the React bundle in a `template` part.
143158
144159 Args:
145160 body (RecordingConfig): Recording configuration
161+ body (CreateRecordingFilesBody):
146162
147163 Raises:
148164 errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True.
@@ -164,14 +180,18 @@ async def asyncio_detailed(
164180async def asyncio (
165181 * ,
166182 client : AuthenticatedClient ,
167- body : RecordingConfig ,
183+ body : RecordingConfig | CreateRecordingFilesBody | Unset = UNSET ,
168184) -> Error | RecordingDetailsResponse | None :
169185 """Create a recording
170186
171187 Create a recording resource. Capturing starts synchronously, so it is returned with status `active`.
188+ A source naming an `outputId` records an output the composition already has and is sent as JSON. A
189+ template source renders its own scene and has to be sent as `multipart/form-data`: the configuration
190+ in a `config` part, the React bundle in a `template` part.
172191
173192 Args:
174193 body (RecordingConfig): Recording configuration
194+ body (CreateRecordingFilesBody):
175195
176196 Raises:
177197 errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True.
0 commit comments