diff --git a/.speakeasy/gen.lock b/.speakeasy/gen.lock index 506f7b0..05ba2c3 100755 --- a/.speakeasy/gen.lock +++ b/.speakeasy/gen.lock @@ -1,12 +1,12 @@ lockVersion: 2.0.0 id: 8c3ff122-1fb8-439c-8680-989f956dfd8d management: - docChecksum: a4f46cb330dd59f1f60caa6eaccdbd3b + docChecksum: d5178fea7af23529e09cd3b74d1d23c1 docVersion: 1.0.0 - speakeasyVersion: 1.399.0 - generationVersion: 2.415.8 - releaseVersion: 0.3.0 - configChecksum: e2a3f034034c8b68bbb6d9b34363d9f6 + speakeasyVersion: 1.455.3 + generationVersion: 2.479.3 + releaseVersion: 0.4.0 + configChecksum: 7718a2b8f6464a1da435ed1282d09f2d repoURL: https://github.com/livepeer/livepeer-python.git installationURL: https://github.com/livepeer/livepeer-python.git published: true @@ -14,14 +14,14 @@ features: python: additionalDependencies: 1.0.0 additionalProperties: 1.0.1 - constsAndDefaults: 1.0.2 - core: 5.5.3 + constsAndDefaults: 1.0.5 + core: 5.7.2 defaultEnabledRetries: 0.2.0 deprecations: 3.0.0 enumUnions: 0.1.0 - envVarSecurityUsage: 0.3.1 + envVarSecurityUsage: 0.3.2 errorUnions: 1.0.2 - flattening: 3.0.0 + flattening: 3.1.0 globalSecurity: 3.0.2 globalSecurityCallbacks: 1.0.0 globalSecurityFlattening: 1.0.0 @@ -30,13 +30,14 @@ features: multipartFileContentType: 1.0.0 nameOverrides: 3.0.0 nullables: 1.0.0 - responseFormat: 1.0.0 + responseFormat: 1.0.1 retries: 3.0.2 sdkHooks: 1.0.0 - unions: 3.0.2 + unions: 3.0.4 uploadStreams: 1.0.0 generatedFiles: - .gitattributes + - .python-version - .vscode/settings.json - CONTRIBUTING.md - USAGE.md @@ -63,6 +64,7 @@ generatedFiles: - docs/models/components/bodygenimagetoimage.md - docs/models/components/bodygenimagetovideo.md - docs/models/components/bodygenimagetovideoimage.md + - docs/models/components/bodygenllm.md - docs/models/components/bodygensegmentanything2.md - docs/models/components/bodygensegmentanything2image.md - docs/models/components/bodygenupscale.md @@ -82,7 +84,9 @@ generatedFiles: - docs/models/components/domain.md - docs/models/components/dvrplayback.md - docs/models/components/encoder.md + - docs/models/components/encryption.md - docs/models/components/encryptionoutput.md + - docs/models/components/error.md - docs/models/components/events.md - docs/models/components/export.md - docs/models/components/exportdata.md @@ -113,6 +117,7 @@ generatedFiles: - docs/models/components/ismobile1.md - docs/models/components/lastfailure.md - docs/models/components/live.md + - docs/models/components/llmresponse.md - docs/models/components/loc.md - docs/models/components/location.md - docs/models/components/masksresponse.md @@ -122,6 +127,7 @@ generatedFiles: - docs/models/components/mp4.md - docs/models/components/multistream.md - docs/models/components/multistreamtarget.md + - docs/models/components/multistreamtargetinput.md - docs/models/components/multistreamtargetpatchpayload.md - docs/models/components/name.md - docs/models/components/newassetfromurlpayload.md @@ -188,6 +194,8 @@ generatedFiles: - docs/models/components/streampull.md - docs/models/components/streamrecordingspec.md - docs/models/components/streamusertags.md + - docs/models/components/studioapierror.md + - docs/models/components/target.md - docs/models/components/targetaddpayload.md - docs/models/components/targetaddpayloadspec.md - docs/models/components/targetoutput.md @@ -230,8 +238,10 @@ generatedFiles: - docs/models/components/videospec.md - docs/models/components/viewershipmetric.md - docs/models/components/webhook.md + - docs/models/components/webhookinput.md - docs/models/components/webhooklog.md - docs/models/errors/error.md + - docs/models/errors/genaudiototextgenerateresponse415responsebody.md - docs/models/errors/genaudiototextgenerateresponse422responsebody.md - docs/models/errors/genaudiototextgenerateresponse500responsebody.md - docs/models/errors/genaudiototextgenerateresponsebody.md @@ -245,6 +255,10 @@ generatedFiles: - docs/models/errors/genimagetovideogenerateresponsebody.md - docs/models/errors/genimagetovideogenerateresponseresponsebody.md - docs/models/errors/genimagetovideoresponsebody.md + - docs/models/errors/genllmgenerateresponse500responsebody.md + - docs/models/errors/genllmgenerateresponsebody.md + - docs/models/errors/genllmgenerateresponseresponsebody.md + - docs/models/errors/genllmresponsebody.md - docs/models/errors/gensegmentanything2generateresponse500responsebody.md - docs/models/errors/gensegmentanything2generateresponsebody.md - docs/models/errors/gensegmentanything2generateresponseresponsebody.md @@ -291,6 +305,7 @@ generatedFiles: - docs/models/operations/genaudiototextresponse.md - docs/models/operations/genimagetoimageresponse.md - docs/models/operations/genimagetovideoresponse.md + - docs/models/operations/genllmresponse.md - docs/models/operations/gensegmentanything2response.md - docs/models/operations/gentexttoimageresponse.md - docs/models/operations/genupscaleresponse.md @@ -405,13 +420,13 @@ generatedFiles: - py.typed - pylintrc - pyproject.toml - - scripts/compile.sh - scripts/prepare-readme.py - scripts/publish.sh - src/livepeer/__init__.py - src/livepeer/_hooks/__init__.py - src/livepeer/_hooks/sdkhooks.py - src/livepeer/_hooks/types.py + - src/livepeer/_version.py - src/livepeer/accesscontrol.py - src/livepeer/asset.py - src/livepeer/basesdk.py @@ -426,6 +441,7 @@ generatedFiles: - src/livepeer/models/components/body_genaudiototext.py - src/livepeer/models/components/body_genimagetoimage.py - src/livepeer/models/components/body_genimagetovideo.py + - src/livepeer/models/components/body_genllm.py - src/livepeer/models/components/body_gensegmentanything2.py - src/livepeer/models/components/body_genupscale.py - src/livepeer/models/components/chunk.py @@ -434,6 +450,7 @@ generatedFiles: - src/livepeer/models/components/creator_id.py - src/livepeer/models/components/encryption.py - src/livepeer/models/components/encryption_output.py + - src/livepeer/models/components/error.py - src/livepeer/models/components/export_task_params.py - src/livepeer/models/components/ffmpeg_profile.py - src/livepeer/models/components/get_room_user_response.py @@ -442,6 +459,7 @@ generatedFiles: - src/livepeer/models/components/input_creator_id.py - src/livepeer/models/components/ipfs_export_params.py - src/livepeer/models/components/ipfs_file_info.py + - src/livepeer/models/components/llmresponse.py - src/livepeer/models/components/masksresponse.py - src/livepeer/models/components/media.py - src/livepeer/models/components/multistream.py @@ -469,6 +487,7 @@ generatedFiles: - src/livepeer/models/components/storage_status.py - src/livepeer/models/components/stream.py - src/livepeer/models/components/stream_patch_payload.py + - src/livepeer/models/components/studio_api_error.py - src/livepeer/models/components/target.py - src/livepeer/models/components/target_add_payload.py - src/livepeer/models/components/target_output.py @@ -489,6 +508,7 @@ generatedFiles: - src/livepeer/models/errors/genaudiototext.py - src/livepeer/models/errors/genimagetoimage.py - src/livepeer/models/errors/genimagetovideo.py + - src/livepeer/models/errors/genllm.py - src/livepeer/models/errors/gensegmentanything2.py - src/livepeer/models/errors/gentexttoimage.py - src/livepeer/models/errors/genupscale.py @@ -515,6 +535,7 @@ generatedFiles: - src/livepeer/models/operations/genaudiototext.py - src/livepeer/models/operations/genimagetoimage.py - src/livepeer/models/operations/genimagetovideo.py + - src/livepeer/models/operations/genllm.py - src/livepeer/models/operations/gensegmentanything2.py - src/livepeer/models/operations/gentexttoimage.py - src/livepeer/models/operations/genupscale.py @@ -592,10 +613,10 @@ examples: createStream: speakeasy-default-create-stream: requestBody: - application/json: {"name": "test_stream", "pull": {"source": "https://myservice.com/live/stream.flv", "headers": {"Authorization": "Bearer 123"}, "location": {"lat": 39.739, "lon": -104.988}}, "playbackPolicy": {"type": "webhook", "webhookId": "1bde4o2i6xycudoy", "webhookContext": {"streamerId": "my-custom-id"}, "refreshInterval": 600}, "profiles": [], "record": false, "recordingSpec": {"profiles": []}, "multistream": {"targets": [{"profile": "720p", "videoOnly": false, "id": "PUSH123", "spec": {"name": "My target", "url": "rtmps://live.my-service.tv/channel/secretKey"}}]}} + application/json: {"name": "test_stream", "pull": {"source": "https://myservice.com/live/stream.flv", "headers": {"Authorization": "Bearer 123"}, "location": {"lat": 39.739, "lon": -104.988}}, "playbackPolicy": {"type": "webhook", "webhookId": "1bde4o2i6xycudoy", "webhookContext": {"streamerId": "my-custom-id"}, "refreshInterval": 600}, "profiles": [], "record": false, "recordingSpec": {"profiles": []}, "multistream": {"targets": [{"profile": "720p0", "id": "PUSH123"}]}} responses: "201": - application/json: {"id": "de7818e7-610a-4057-8f6f-b785dc1e6f88", "name": "test_stream", "creatorId": {"type": "unverified", "value": "user123"}, "lastSeen": 1587667174725, "sourceSegments": 1, "transcodedSegments": 2, "sourceSegmentsDuration": 1, "transcodedSegmentsDuration": 2, "sourceBytes": 1, "transcodedBytes": 2, "ingestRate": 1, "outgoingRate": 2, "isActive": true, "createdByTokenName": "abc-123-xyz-456", "createdAt": 1587667174725, "parentId": "de7818e7-610a-4057-8f6f-b785dc1e6f88", "streamKey": "hgebdhhigq", "pull": {"source": "https://myservice.com/live/stream.flv", "headers": {"Authorization": "Bearer 123"}, "location": {"lat": 39.739, "lon": -104.988}}, "playbackId": "eaw4nk06ts2d0mzb", "playbackPolicy": {"type": "webhook", "webhookId": "1bde4o2i6xycudoy", "webhookContext": {"streamerId": "my-custom-id"}, "refreshInterval": 600}, "profiles": [], "projectId": "aac12556-4d65-4d34-9fb6-d1f0985eb0a9", "record": false, "recordingSpec": {"profiles": []}, "multistream": {"targets": [{"profile": "720p", "videoOnly": false, "id": "PUSH123"}]}, "lastTerminatedAt": 1713281212993} + application/json: {"id": "de7818e7-610a-4057-8f6f-b785dc1e6f88", "name": "test_stream", "creatorId": {"type": "unverified", "value": "user123"}, "lastSeen": 1587667174725, "sourceSegments": 1, "transcodedSegments": 2, "sourceSegmentsDuration": 1, "transcodedSegmentsDuration": 2, "sourceBytes": 1, "transcodedBytes": 2, "ingestRate": 1, "outgoingRate": 2, "isActive": true, "createdByTokenName": "abc-123-xyz-456", "createdAt": 1587667174725, "parentId": "de7818e7-610a-4057-8f6f-b785dc1e6f88", "streamKey": "hgebdhhigq", "pull": {"source": "https://myservice.com/live/stream.flv", "headers": {"Authorization": "Bearer 123"}, "location": {"lat": 39.739, "lon": -104.988}}, "playbackId": "eaw4nk06ts2d0mzb", "playbackPolicy": {"type": "webhook", "webhookId": "1bde4o2i6xycudoy", "webhookContext": {"streamerId": "my-custom-id"}, "refreshInterval": 600}, "profiles": [], "projectId": "aac12556-4d65-4d34-9fb6-d1f0985eb0a9", "record": false, "recordingSpec": {"profiles": []}, "multistream": {"targets": [{"profile": "720p0", "id": "PUSH123"}]}, "lastTerminatedAt": 1713281212993} default: application/json: {"errors": ["[\"id not provided\",\"Account not found\"]"]} getStreams: @@ -612,7 +633,7 @@ examples: id: "" responses: "200": - application/json: {"id": "de7818e7-610a-4057-8f6f-b785dc1e6f88", "name": "test_stream", "creatorId": {"type": "unverified", "value": "user123"}, "lastSeen": 1587667174725, "sourceSegments": 1, "transcodedSegments": 2, "sourceSegmentsDuration": 1, "transcodedSegmentsDuration": 2, "sourceBytes": 1, "transcodedBytes": 2, "ingestRate": 1, "outgoingRate": 2, "isActive": true, "createdByTokenName": "abc-123-xyz-456", "createdAt": 1587667174725, "parentId": "de7818e7-610a-4057-8f6f-b785dc1e6f88", "streamKey": "hgebdhhigq", "pull": {"source": "https://myservice.com/live/stream.flv", "headers": {"Authorization": "Bearer 123"}, "location": {"lat": 39.739, "lon": -104.988}}, "playbackId": "eaw4nk06ts2d0mzb", "playbackPolicy": {"type": "webhook", "webhookId": "1bde4o2i6xycudoy", "webhookContext": {"streamerId": "my-custom-id"}, "refreshInterval": 600}, "profiles": [], "projectId": "aac12556-4d65-4d34-9fb6-d1f0985eb0a9", "record": false, "recordingSpec": {"profiles": []}, "multistream": {"targets": [{"profile": "720p", "videoOnly": false, "id": "PUSH123"}]}, "lastTerminatedAt": 1713281212993} + application/json: {"id": "de7818e7-610a-4057-8f6f-b785dc1e6f88", "name": "test_stream", "creatorId": {"type": "unverified", "value": "user123"}, "lastSeen": 1587667174725, "sourceSegments": 1, "transcodedSegments": 2, "sourceSegmentsDuration": 1, "transcodedSegmentsDuration": 2, "sourceBytes": 1, "transcodedBytes": 2, "ingestRate": 1, "outgoingRate": 2, "isActive": true, "createdByTokenName": "abc-123-xyz-456", "createdAt": 1587667174725, "parentId": "de7818e7-610a-4057-8f6f-b785dc1e6f88", "streamKey": "hgebdhhigq", "pull": {"source": "https://myservice.com/live/stream.flv", "headers": {"Authorization": "Bearer 123"}, "location": {"lat": 39.739, "lon": -104.988}}, "playbackId": "eaw4nk06ts2d0mzb", "playbackPolicy": {"type": "webhook", "webhookId": "1bde4o2i6xycudoy", "webhookContext": {"streamerId": "my-custom-id"}, "refreshInterval": 600}, "profiles": [], "projectId": "aac12556-4d65-4d34-9fb6-d1f0985eb0a9", "record": false, "recordingSpec": {"profiles": []}, "multistream": {"targets": [{"profile": "720p0", "id": "PUSH123"}]}, "lastTerminatedAt": 1713281212993} default: application/json: {"errors": ["[\"id not provided\",\"Account not found\"]"]} updateStream: @@ -621,7 +642,7 @@ examples: path: id: "" requestBody: - application/json: {"record": false, "multistream": {"targets": [{"profile": "720p", "videoOnly": false, "id": "PUSH123", "spec": {"name": "My target", "url": "rtmps://live.my-service.tv/channel/secretKey"}}]}, "playbackPolicy": {"type": "webhook", "webhookId": "1bde4o2i6xycudoy", "webhookContext": {"streamerId": "my-custom-id"}, "refreshInterval": 600}, "profiles": [], "recordingSpec": {"profiles": []}} + application/json: {"record": false, "multistream": {"targets": [{"profile": "720p0", "id": "PUSH123"}]}, "playbackPolicy": {"type": "webhook", "webhookId": "1bde4o2i6xycudoy", "webhookContext": {"streamerId": "my-custom-id"}, "refreshInterval": 600}, "profiles": [], "recordingSpec": {"profiles": []}} responses: default: application/json: {"errors": ["[\"id not provided\",\"Account not found\"]"]} @@ -655,7 +676,7 @@ examples: application/json: {"playbackId": "eaw4nk06ts2d0mzb", "startTime": 1587667174725, "endTime": 1587667174725, "name": "My Clip", "sessionId": "de7818e7-610a-4057-8f6f-b785dc1e6f88"} responses: "200": - application/json: {"asset": {"id": "09F8B46C-61A0-4254-9875-F71F4C605BC7", "type": "video", "playbackId": "eaw4nk06ts2d0mzb", "playbackUrl": "https://livepeercdn.com/asset/ea03f37e-f861-4cdd-b495-0e60b6d753ad/index.m3u8", "downloadUrl": "https://livepeercdn.com/asset/eaw4nk06ts2d0mzb/video", "playbackPolicy": {"type": "webhook", "webhookId": "1bde4o2i6xycudoy", "webhookContext": {"streamerId": "my-custom-id"}, "refreshInterval": 600}, "source": {"type": "directUpload"}, "creatorId": {"type": "unverified", "value": "user123"}, "profiles": [], "storage": {"ipfs": {"updatedAt": 1587667174725}, "status": {"phase": "ready", "progress": 0.5, "errorMessage": "Failed to update storage", "tasks": {"pending": "09F8B46C-61A0-4254-9875-F71F4C605BC7", "last": "09F8B46C-61A0-4254-9875-F71F4C605BC7", "failed": "09F8B46C-61A0-4254-9875-F71F4C605BC7"}}}, "status": {"phase": "failed", "updatedAt": 1587667174725}, "name": "filename.mp4", "projectId": "aac12556-4d65-4d34-9fb6-d1f0985eb0a9", "createdAt": 1587667174725, "size": 84934509, "hash": [], "videoSpec": {"format": "mp4", "duration": 23.8328, "bitrate": 1000000, "tracks": []}}, "task": {"id": "34d7618e-fd42-4798-acf5-19504616a11e"}} + application/json: {"asset": {"id": "09F8B46C-61A0-4254-9875-F71F4C605BC7", "type": "video", "playbackId": "eaw4nk06ts2d0mzb", "playbackUrl": "https://livepeercdn.com/asset/ea03f37e-f861-4cdd-b495-0e60b6d753ad/index.m3u8", "downloadUrl": "https://livepeercdn.com/asset/eaw4nk06ts2d0mzb/video/download.mp4", "playbackPolicy": {"type": "webhook", "webhookId": "1bde4o2i6xycudoy", "webhookContext": {"streamerId": "my-custom-id"}, "refreshInterval": 600}, "source": {"type": "directUpload"}, "creatorId": {"type": "unverified", "value": "user123"}, "profiles": [], "storage": {"ipfs": {"updatedAt": 1587667174725}, "status": {"phase": "ready", "progress": 0.5, "errorMessage": "Failed to update storage", "tasks": {"pending": "09F8B46C-61A0-4254-9875-F71F4C605BC7", "last": "09F8B46C-61A0-4254-9875-F71F4C605BC7", "failed": "09F8B46C-61A0-4254-9875-F71F4C605BC7"}}}, "status": {"phase": "failed", "updatedAt": 1587667174725}, "name": "filename.mp4", "projectId": "aac12556-4d65-4d34-9fb6-d1f0985eb0a9", "createdAt": 1587667174725, "size": 84934509, "hash": [], "videoSpec": {"format": "mp4", "duration": 23.8328, "bitrate": 1000000, "tracks": []}}, "task": {"id": "34d7618e-fd42-4798-acf5-19504616a11e"}} default: application/json: {"errors": ["[\"id not provided\",\"Account not found\"]"]} getClips: @@ -824,7 +845,7 @@ examples: application/json: {"name": "filename.mp4", "staticMp4": true, "playbackPolicy": {"type": "webhook", "webhookId": "1bde4o2i6xycudoy", "webhookContext": {"streamerId": "my-custom-id"}, "refreshInterval": 600}, "profiles": []} responses: "200": - application/json: {"url": "https://origin.livepeer.com/api/asset/upload/direct?token=eyJhbGciOiJIUzI1NiJ9.eyJtc2ciOiJoZWxsbyBoYWNrZXIsIHRoZXJlJ3Mgbm90aGluZyBmb3IgeW91IGhlcmUg8J-YhiJ9.1YDjmXsqLcgNyMSzT4kXl_kIni46_EuGX_xfqmC7e0Q", "tusEndpoint": "https://origin.livepeer.com/api/asset/upload/tus?token=eyJhbGciOiJIUzI1NiJ9.eyJtc2ciOiJoZWxsbyBoYWNrZXIsIHRoZXJlJ3Mgbm90aGluZyBmb3IgeW91IGhlcmUg8J-YhiJ9.1YDjmXsqLcgNyMSzT4kXl_kIni46_EuGX_xfqmC7e0Q", "asset": {"id": "09F8B46C-61A0-4254-9875-F71F4C605BC7", "type": "video", "playbackId": "eaw4nk06ts2d0mzb", "playbackUrl": "https://livepeercdn.com/asset/ea03f37e-f861-4cdd-b495-0e60b6d753ad/index.m3u8", "downloadUrl": "https://livepeercdn.com/asset/eaw4nk06ts2d0mzb/video", "playbackPolicy": {"type": "webhook", "webhookId": "1bde4o2i6xycudoy", "webhookContext": {"streamerId": "my-custom-id"}, "refreshInterval": 600}, "source": {"type": "recording", "sessionId": ""}, "creatorId": {"type": "unverified", "value": "user123"}, "profiles": [], "storage": {"ipfs": {"updatedAt": 1587667174725}, "status": {"phase": "ready", "progress": 0.5, "errorMessage": "Failed to update storage", "tasks": {"pending": "09F8B46C-61A0-4254-9875-F71F4C605BC7", "last": "09F8B46C-61A0-4254-9875-F71F4C605BC7", "failed": "09F8B46C-61A0-4254-9875-F71F4C605BC7"}}}, "status": {"phase": "ready", "updatedAt": 1587667174725}, "name": "filename.mp4", "projectId": "aac12556-4d65-4d34-9fb6-d1f0985eb0a9", "createdAt": 1587667174725, "size": 84934509, "hash": [], "videoSpec": {"format": "mp4", "duration": 23.8328, "bitrate": 1000000, "tracks": []}}, "task": {"id": "34d7618e-fd42-4798-acf5-19504616a11e"}} + application/json: {"url": "https://origin.livepeer.com/api/asset/upload/direct?token=eyJhbGciOiJIUzI1NiJ9.eyJtc2ciOiJoZWxsbyBoYWNrZXIsIHRoZXJlJ3Mgbm90aGluZyBmb3IgeW91IGhlcmUg8J-YhiJ9.1YDjmXsqLcgNyMSzT4kXl_kIni46_EuGX_xfqmC7e0Q", "tusEndpoint": "https://origin.livepeer.com/api/asset/upload/tus?token=eyJhbGciOiJIUzI1NiJ9.eyJtc2ciOiJoZWxsbyBoYWNrZXIsIHRoZXJlJ3Mgbm90aGluZyBmb3IgeW91IGhlcmUg8J-YhiJ9.1YDjmXsqLcgNyMSzT4kXl_kIni46_EuGX_xfqmC7e0Q", "asset": {"id": "09F8B46C-61A0-4254-9875-F71F4C605BC7", "type": "video", "playbackId": "eaw4nk06ts2d0mzb", "playbackUrl": "https://livepeercdn.com/asset/ea03f37e-f861-4cdd-b495-0e60b6d753ad/index.m3u8", "downloadUrl": "https://livepeercdn.com/asset/eaw4nk06ts2d0mzb/video/download.mp4", "playbackPolicy": {"type": "webhook", "webhookId": "1bde4o2i6xycudoy", "webhookContext": {"streamerId": "my-custom-id"}, "refreshInterval": 600}, "source": {"type": "recording", "sessionId": ""}, "creatorId": {"type": "unverified", "value": "user123"}, "profiles": [], "storage": {"ipfs": {"updatedAt": 1587667174725}, "status": {"phase": "ready", "progress": 0.5, "errorMessage": "Failed to update storage", "tasks": {"pending": "09F8B46C-61A0-4254-9875-F71F4C605BC7", "last": "09F8B46C-61A0-4254-9875-F71F4C605BC7", "failed": "09F8B46C-61A0-4254-9875-F71F4C605BC7"}}}, "status": {"phase": "ready", "updatedAt": 1587667174725}, "name": "filename.mp4", "projectId": "aac12556-4d65-4d34-9fb6-d1f0985eb0a9", "createdAt": 1587667174725, "size": 84934509, "hash": [], "videoSpec": {"format": "mp4", "duration": 23.8328, "bitrate": 1000000, "tracks": []}}, "task": {"id": "34d7618e-fd42-4798-acf5-19504616a11e"}} default: application/json: {"errors": ["[\"id not provided\",\"Account not found\"]"]} uploadAsset: @@ -833,9 +854,9 @@ examples: application/json: {"name": "filename.mp4", "staticMp4": true, "playbackPolicy": {"type": "webhook", "webhookId": "1bde4o2i6xycudoy", "webhookContext": {"streamerId": "my-custom-id"}, "refreshInterval": 600}, "url": "https://s3.amazonaws.com/my-bucket/path/filename.mp4", "profiles": []} responses: "200": - application/json: {"asset": {"id": "09F8B46C-61A0-4254-9875-F71F4C605BC7", "type": "video", "playbackId": "eaw4nk06ts2d0mzb", "playbackUrl": "https://livepeercdn.com/asset/ea03f37e-f861-4cdd-b495-0e60b6d753ad/index.m3u8", "downloadUrl": "https://livepeercdn.com/asset/eaw4nk06ts2d0mzb/video", "playbackPolicy": {"type": "webhook", "webhookId": "1bde4o2i6xycudoy", "webhookContext": {"streamerId": "my-custom-id"}, "refreshInterval": 600}, "source": {"type": "recording", "sessionId": ""}, "creatorId": {"type": "unverified", "value": "user123"}, "profiles": [], "storage": {"ipfs": {"updatedAt": 1587667174725}, "status": {"phase": "ready", "progress": 0.5, "errorMessage": "Failed to update storage", "tasks": {"pending": "09F8B46C-61A0-4254-9875-F71F4C605BC7", "last": "09F8B46C-61A0-4254-9875-F71F4C605BC7", "failed": "09F8B46C-61A0-4254-9875-F71F4C605BC7"}}}, "status": {"phase": "waiting", "updatedAt": 1587667174725}, "name": "filename.mp4", "projectId": "aac12556-4d65-4d34-9fb6-d1f0985eb0a9", "createdAt": 1587667174725, "size": 84934509, "hash": [], "videoSpec": {"format": "mp4", "duration": 23.8328, "bitrate": 1000000, "tracks": []}}, "task": {"id": "34d7618e-fd42-4798-acf5-19504616a11e"}} + application/json: {"asset": {"id": "09F8B46C-61A0-4254-9875-F71F4C605BC7", "type": "video", "playbackId": "eaw4nk06ts2d0mzb", "playbackUrl": "https://livepeercdn.com/asset/ea03f37e-f861-4cdd-b495-0e60b6d753ad/index.m3u8", "downloadUrl": "https://livepeercdn.com/asset/eaw4nk06ts2d0mzb/video/download.mp4", "playbackPolicy": {"type": "webhook", "webhookId": "1bde4o2i6xycudoy", "webhookContext": {"streamerId": "my-custom-id"}, "refreshInterval": 600}, "source": {"type": "recording", "sessionId": ""}, "creatorId": {"type": "unverified", "value": "user123"}, "profiles": [], "storage": {"ipfs": {"updatedAt": 1587667174725}, "status": {"phase": "ready", "progress": 0.5, "errorMessage": "Failed to update storage", "tasks": {"pending": "09F8B46C-61A0-4254-9875-F71F4C605BC7", "last": "09F8B46C-61A0-4254-9875-F71F4C605BC7", "failed": "09F8B46C-61A0-4254-9875-F71F4C605BC7"}}}, "status": {"phase": "waiting", "updatedAt": 1587667174725}, "name": "filename.mp4", "projectId": "aac12556-4d65-4d34-9fb6-d1f0985eb0a9", "createdAt": 1587667174725, "size": 84934509, "hash": [], "videoSpec": {"format": "mp4", "duration": 23.8328, "bitrate": 1000000, "tracks": []}}, "task": {"id": "34d7618e-fd42-4798-acf5-19504616a11e"}} "201": - application/json: {"asset": {"id": "09F8B46C-61A0-4254-9875-F71F4C605BC7", "type": "video", "playbackId": "eaw4nk06ts2d0mzb", "playbackUrl": "https://livepeercdn.com/asset/ea03f37e-f861-4cdd-b495-0e60b6d753ad/index.m3u8", "downloadUrl": "https://livepeercdn.com/asset/eaw4nk06ts2d0mzb/video", "playbackPolicy": {"type": "webhook", "webhookId": "1bde4o2i6xycudoy", "webhookContext": {"streamerId": "my-custom-id"}, "refreshInterval": 600}, "source": {"type": "url", "url": "http://dutiful-colorlessness.com"}, "creatorId": {"type": "unverified", "value": "user123"}, "profiles": [], "storage": {"ipfs": {"updatedAt": 1587667174725}, "status": {"phase": "ready", "progress": 0.5, "errorMessage": "Failed to update storage", "tasks": {"pending": "09F8B46C-61A0-4254-9875-F71F4C605BC7", "last": "09F8B46C-61A0-4254-9875-F71F4C605BC7", "failed": "09F8B46C-61A0-4254-9875-F71F4C605BC7"}}}, "status": {"phase": "uploading", "updatedAt": 1587667174725}, "name": "filename.mp4", "projectId": "aac12556-4d65-4d34-9fb6-d1f0985eb0a9", "createdAt": 1587667174725, "size": 84934509, "hash": [], "videoSpec": {"format": "mp4", "duration": 23.8328, "bitrate": 1000000, "tracks": []}}, "task": {"id": "34d7618e-fd42-4798-acf5-19504616a11e"}} + application/json: {"asset": {"id": "09F8B46C-61A0-4254-9875-F71F4C605BC7", "type": "video", "playbackId": "eaw4nk06ts2d0mzb", "playbackUrl": "https://livepeercdn.com/asset/ea03f37e-f861-4cdd-b495-0e60b6d753ad/index.m3u8", "downloadUrl": "https://livepeercdn.com/asset/eaw4nk06ts2d0mzb/video/download.mp4", "playbackPolicy": {"type": "webhook", "webhookId": "1bde4o2i6xycudoy", "webhookContext": {"streamerId": "my-custom-id"}, "refreshInterval": 600}, "source": {"type": "url", "url": "http://dutiful-colorlessness.com"}, "creatorId": {"type": "unverified", "value": "user123"}, "profiles": [], "storage": {"ipfs": {"updatedAt": 1587667174725}, "status": {"phase": "ready", "progress": 0.5, "errorMessage": "Failed to update storage", "tasks": {"pending": "09F8B46C-61A0-4254-9875-F71F4C605BC7", "last": "09F8B46C-61A0-4254-9875-F71F4C605BC7", "failed": "09F8B46C-61A0-4254-9875-F71F4C605BC7"}}}, "status": {"phase": "uploading", "updatedAt": 1587667174725}, "name": "filename.mp4", "projectId": "aac12556-4d65-4d34-9fb6-d1f0985eb0a9", "createdAt": 1587667174725, "size": 84934509, "hash": [], "videoSpec": {"format": "mp4", "duration": 23.8328, "bitrate": 1000000, "tracks": []}}, "task": {"id": "34d7618e-fd42-4798-acf5-19504616a11e"}} default: application/json: {"errors": ["[\"id not provided\",\"Account not found\"]"]} getAsset: @@ -845,7 +866,7 @@ examples: assetId: "" responses: "200": - application/json: {"id": "09F8B46C-61A0-4254-9875-F71F4C605BC7", "type": "video", "playbackId": "eaw4nk06ts2d0mzb", "playbackUrl": "https://livepeercdn.com/asset/ea03f37e-f861-4cdd-b495-0e60b6d753ad/index.m3u8", "downloadUrl": "https://livepeercdn.com/asset/eaw4nk06ts2d0mzb/video", "playbackPolicy": {"type": "webhook", "webhookId": "1bde4o2i6xycudoy", "webhookContext": {"streamerId": "my-custom-id"}, "refreshInterval": 600}, "source": {"type": "directUpload"}, "creatorId": {"type": "unverified", "value": "user123"}, "profiles": [], "storage": {"ipfs": {"updatedAt": 1587667174725}, "status": {"phase": "ready", "progress": 0.5, "errorMessage": "Failed to update storage", "tasks": {"pending": "09F8B46C-61A0-4254-9875-F71F4C605BC7", "last": "09F8B46C-61A0-4254-9875-F71F4C605BC7", "failed": "09F8B46C-61A0-4254-9875-F71F4C605BC7"}}}, "status": {"phase": "ready", "updatedAt": 1587667174725}, "name": "filename.mp4", "projectId": "aac12556-4d65-4d34-9fb6-d1f0985eb0a9", "createdAt": 1587667174725, "size": 84934509, "hash": [], "videoSpec": {"format": "mp4", "duration": 23.8328, "bitrate": 1000000, "tracks": []}} + application/json: {"id": "09F8B46C-61A0-4254-9875-F71F4C605BC7", "type": "video", "playbackId": "eaw4nk06ts2d0mzb", "playbackUrl": "https://livepeercdn.com/asset/ea03f37e-f861-4cdd-b495-0e60b6d753ad/index.m3u8", "downloadUrl": "https://livepeercdn.com/asset/eaw4nk06ts2d0mzb/video/download.mp4", "playbackPolicy": {"type": "webhook", "webhookId": "1bde4o2i6xycudoy", "webhookContext": {"streamerId": "my-custom-id"}, "refreshInterval": 600}, "source": {"type": "directUpload"}, "creatorId": {"type": "unverified", "value": "user123"}, "profiles": [], "storage": {"ipfs": {"updatedAt": 1587667174725}, "status": {"phase": "ready", "progress": 0.5, "errorMessage": "Failed to update storage", "tasks": {"pending": "09F8B46C-61A0-4254-9875-F71F4C605BC7", "last": "09F8B46C-61A0-4254-9875-F71F4C605BC7", "failed": "09F8B46C-61A0-4254-9875-F71F4C605BC7"}}}, "status": {"phase": "ready", "updatedAt": 1587667174725}, "name": "filename.mp4", "projectId": "aac12556-4d65-4d34-9fb6-d1f0985eb0a9", "createdAt": 1587667174725, "size": 84934509, "hash": [], "videoSpec": {"format": "mp4", "duration": 23.8328, "bitrate": 1000000, "tracks": []}} default: application/json: {"errors": ["[\"id not provided\",\"Account not found\"]"]} updateAsset: @@ -857,7 +878,7 @@ examples: application/json: {"name": "filename.mp4", "playbackPolicy": {"type": "webhook", "webhookId": "1bde4o2i6xycudoy", "webhookContext": {"streamerId": "my-custom-id"}, "refreshInterval": 600}} responses: "200": - application/json: {"id": "09F8B46C-61A0-4254-9875-F71F4C605BC7", "type": "video", "playbackId": "eaw4nk06ts2d0mzb", "playbackUrl": "https://livepeercdn.com/asset/ea03f37e-f861-4cdd-b495-0e60b6d753ad/index.m3u8", "downloadUrl": "https://livepeercdn.com/asset/eaw4nk06ts2d0mzb/video", "playbackPolicy": {"type": "webhook", "webhookId": "1bde4o2i6xycudoy", "webhookContext": {"streamerId": "my-custom-id"}, "refreshInterval": 600}, "source": {"type": "directUpload"}, "creatorId": {"type": "unverified", "value": "user123"}, "profiles": [], "storage": {"ipfs": {"updatedAt": 1587667174725}, "status": {"phase": "ready", "progress": 0.5, "errorMessage": "Failed to update storage", "tasks": {"pending": "09F8B46C-61A0-4254-9875-F71F4C605BC7", "last": "09F8B46C-61A0-4254-9875-F71F4C605BC7", "failed": "09F8B46C-61A0-4254-9875-F71F4C605BC7"}}}, "status": {"phase": "failed", "updatedAt": 1587667174725}, "name": "filename.mp4", "projectId": "aac12556-4d65-4d34-9fb6-d1f0985eb0a9", "createdAt": 1587667174725, "size": 84934509, "hash": [], "videoSpec": {"format": "mp4", "duration": 23.8328, "bitrate": 1000000, "tracks": []}} + application/json: {"id": "09F8B46C-61A0-4254-9875-F71F4C605BC7", "type": "video", "playbackId": "eaw4nk06ts2d0mzb", "playbackUrl": "https://livepeercdn.com/asset/ea03f37e-f861-4cdd-b495-0e60b6d753ad/index.m3u8", "downloadUrl": "https://livepeercdn.com/asset/eaw4nk06ts2d0mzb/video/download.mp4", "playbackPolicy": {"type": "webhook", "webhookId": "1bde4o2i6xycudoy", "webhookContext": {"streamerId": "my-custom-id"}, "refreshInterval": 600}, "source": {"type": "directUpload"}, "creatorId": {"type": "unverified", "value": "user123"}, "profiles": [], "storage": {"ipfs": {"updatedAt": 1587667174725}, "status": {"phase": "ready", "progress": 0.5, "errorMessage": "Failed to update storage", "tasks": {"pending": "09F8B46C-61A0-4254-9875-F71F4C605BC7", "last": "09F8B46C-61A0-4254-9875-F71F4C605BC7", "failed": "09F8B46C-61A0-4254-9875-F71F4C605BC7"}}}, "status": {"phase": "failed", "updatedAt": 1587667174725}, "name": "filename.mp4", "projectId": "aac12556-4d65-4d34-9fb6-d1f0985eb0a9", "createdAt": 1587667174725, "size": 84934509, "hash": [], "videoSpec": {"format": "mp4", "duration": 23.8328, "bitrate": 1000000, "tracks": []}} default: application/json: {"errors": ["[\"id not provided\",\"Account not found\"]"]} deleteAsset: @@ -1085,14 +1106,14 @@ examples: taskId: "" responses: "200": - application/json: {"id": "09F8B46C-61A0-4254-9875-F71F4C605BC7", "type": "upload", "createdAt": 1587667174725, "scheduledAt": 1587667174725, "inputAssetId": "09F8B46C-61A0-4254-9875-F71F4C605BC7", "outputAssetId": "09F8B46C-61A0-4254-9875-F71F4C605BC7", "projectId": "09F8B46C-61A0-4254-9875-F71F4C605BC7", "requesterId": "09F8B46C-61A0-4254-9875-F71F4C605BC7", "params": {"upload": {"url": "https://cdn.livepeer.com/ABC123/filename.mp4", "c2pa": true, "profiles": [], "targetSegmentSizeSecs": 6}, "export": {"ipfs": {}}, "exportData": {"ipfs": {"pinata": {"apiKey": "1234567890"}}, "type": "text/plain", "id": "09F8B46C-61A0-4254-9875-F71F4C605BC7"}, "transcode-file": {"input": {"url": "https://cdn.livepeer.com/ABC123/filename.mp4"}, "storage": {"url": "s3+https://accessKeyId:secretAccessKey@s3Endpoint/bucket"}, "outputs": {"hls": {"path": "/samplevideo/hls"}, "mp4": {"path": "/samplevideo/mp4"}}, "profiles": [], "targetSegmentSizeSecs": 10, "c2pa": false}, "clip": {"url": "https://asset-cdn.lp-playback.monster/hls/1bde4o2i6xycudoy/static360p0.mp4", "clipStrategy": {"startTime": 1587667174725, "endTime": 1587667174725, "playbackId": "eaw4nk06ts2d0mzb"}, "catalystPipelineStrategy": "catalyst_ffmpeg", "sessionId": "d32ae9e6-c459-4931-9898-e86e2f5e7e16", "inputId": "09F8B46C-61A0-4254-9875-F71F4C605BC7"}}, "status": {"phase": "pending", "updatedAt": 1587667174725, "progress": 0.5, "errorMessage": "Failed to upload file", "retries": 3}, "output": {"upload": {"assetSpec": {"id": "09F8B46C-61A0-4254-9875-F71F4C605BC7", "type": "video", "playbackId": "eaw4nk06ts2d0mzb", "playbackUrl": "https://livepeercdn.com/asset/ea03f37e-f861-4cdd-b495-0e60b6d753ad/index.m3u8", "downloadUrl": "https://livepeercdn.com/asset/eaw4nk06ts2d0mzb/video", "playbackPolicy": {"type": "webhook", "webhookId": "1bde4o2i6xycudoy", "webhookContext": {"streamerId": "my-custom-id"}, "refreshInterval": 600}, "source": {"type": "clip"}, "creatorId": {"type": "unverified", "value": "user123"}, "profiles": [], "storage": {"ipfs": {"updatedAt": 1587667174725}, "status": {"phase": "ready", "progress": 0.5, "errorMessage": "Failed to update storage", "tasks": {"pending": "09F8B46C-61A0-4254-9875-F71F4C605BC7", "last": "09F8B46C-61A0-4254-9875-F71F4C605BC7", "failed": "09F8B46C-61A0-4254-9875-F71F4C605BC7"}}}, "status": {"phase": "deleting", "updatedAt": 1587667174725}, "name": "filename.mp4", "projectId": "aac12556-4d65-4d34-9fb6-d1f0985eb0a9", "createdAt": 1587667174725, "size": 84934509, "hash": [], "videoSpec": {"format": "mp4", "duration": 23.8328, "bitrate": 1000000, "tracks": []}}, "key": "", "key1": ""}, "export": {"ipfs": {"videoFileCid": "Qmabc123xyz341", "videoFileUrl": "ipfs://Qmabc123xyz341", "videoFileGatewayUrl": "https://gateway.ipfs.io/ipfs/Qmabc123xyz341", "nftMetadataCid": "Qmabc123xyz341", "nftMetadataUrl": "ipfs://Qmabc123xyz341", "nftMetadataGatewayUrl": "https://gateway.ipfs.io/ipfs/Qmabc123xyz341"}}, "exportData": {"ipfs": {"cid": "Qmabc123xyz341"}}}} + application/json: {"id": "09F8B46C-61A0-4254-9875-F71F4C605BC7", "type": "upload", "createdAt": 1587667174725, "scheduledAt": 1587667174725, "inputAssetId": "09F8B46C-61A0-4254-9875-F71F4C605BC7", "outputAssetId": "09F8B46C-61A0-4254-9875-F71F4C605BC7", "projectId": "09F8B46C-61A0-4254-9875-F71F4C605BC7", "requesterId": "09F8B46C-61A0-4254-9875-F71F4C605BC7", "params": {"upload": {"url": "https://cdn.livepeer.com/ABC123/filename.mp4", "c2pa": true, "profiles": [], "targetSegmentSizeSecs": 6}, "export": {"ipfs": {"pinata": {"apiKey": "1234567890"}}}, "exportData": {"ipfs": {"pinata": {"apiKey": "1234567890"}}, "type": "text/plain", "id": "09F8B46C-61A0-4254-9875-F71F4C605BC7"}, "transcode-file": {"input": {"url": "https://cdn.livepeer.com/ABC123/filename.mp4"}, "storage": {"url": "s3+https://accessKeyId:secretAccessKey@s3Endpoint/bucket"}, "outputs": {"hls": {"path": "/samplevideo/hls"}, "mp4": {"path": "/samplevideo/mp4"}}, "profiles": [], "targetSegmentSizeSecs": 10, "c2pa": false}, "clip": {"url": "https://asset-cdn.lp-playback.monster/hls/1bde4o2i6xycudoy/static360p0.mp4", "clipStrategy": {"startTime": 1587667174725, "endTime": 1587667174725, "playbackId": "eaw4nk06ts2d0mzb"}, "catalystPipelineStrategy": "catalyst_ffmpeg", "sessionId": "d32ae9e6-c459-4931-9898-e86e2f5e7e16", "inputId": "09F8B46C-61A0-4254-9875-F71F4C605BC7"}}, "status": {"phase": "pending", "updatedAt": 1587667174725, "progress": 0.5, "errorMessage": "Failed to upload file", "retries": 3}, "output": {"upload": {"assetSpec": {"id": "09F8B46C-61A0-4254-9875-F71F4C605BC7", "type": "video", "playbackId": "eaw4nk06ts2d0mzb", "playbackUrl": "https://livepeercdn.com/asset/ea03f37e-f861-4cdd-b495-0e60b6d753ad/index.m3u8", "downloadUrl": "https://livepeercdn.com/asset/eaw4nk06ts2d0mzb/video/download.mp4", "playbackPolicy": {"type": "webhook", "webhookId": "1bde4o2i6xycudoy", "webhookContext": {"streamerId": "my-custom-id"}, "refreshInterval": 600}, "source": {"type": "clip"}, "creatorId": {"type": "unverified", "value": "user123"}, "profiles": [], "storage": {"ipfs": {"updatedAt": 1587667174725}, "status": {"phase": "ready", "progress": 0.5, "errorMessage": "Failed to update storage", "tasks": {"pending": "09F8B46C-61A0-4254-9875-F71F4C605BC7", "last": "09F8B46C-61A0-4254-9875-F71F4C605BC7", "failed": "09F8B46C-61A0-4254-9875-F71F4C605BC7"}}}, "status": {"phase": "deleting", "updatedAt": 1587667174725}, "name": "filename.mp4", "projectId": "aac12556-4d65-4d34-9fb6-d1f0985eb0a9", "createdAt": 1587667174725, "size": 84934509, "hash": [], "videoSpec": {"format": "mp4", "duration": 23.8328, "bitrate": 1000000, "tracks": []}}, "key": "", "key1": ""}, "export": {"ipfs": {"videoFileCid": "Qmabc123xyz341", "videoFileUrl": "ipfs://Qmabc123xyz341", "videoFileGatewayUrl": "https://gateway.ipfs.io/ipfs/Qmabc123xyz341", "nftMetadataCid": "Qmabc123xyz341", "nftMetadataUrl": "ipfs://Qmabc123xyz341", "nftMetadataGatewayUrl": "https://gateway.ipfs.io/ipfs/Qmabc123xyz341"}}, "exportData": {"ipfs": {"cid": "Qmabc123xyz341"}}}} transcodeVideo: speakeasy-default-transcode-video: requestBody: application/json: {"input": {"url": "https://s3.amazonaws.com/bucket/file.mp4"}, "storage": {"type": "s3", "endpoint": "https://gateway.storjshare.io", "bucket": "outputbucket", "credentials": {"accessKeyId": "AKIAIOSFODNN7EXAMPLE", "secretAccessKey": "wJalrXUtnFEMI/K7MDENG/bPxRfiCYEXAMPLEKEY"}}, "outputs": {"hls": {"path": "/samplevideo/hls"}, "mp4": {"path": "/samplevideo/mp4"}, "fmp4": {"path": "/samplevideo/fmp4"}}, "profiles": []} responses: "200": - application/json: {"id": "09F8B46C-61A0-4254-9875-F71F4C605BC7", "type": "upload", "createdAt": 1587667174725, "scheduledAt": 1587667174725, "inputAssetId": "09F8B46C-61A0-4254-9875-F71F4C605BC7", "outputAssetId": "09F8B46C-61A0-4254-9875-F71F4C605BC7", "projectId": "09F8B46C-61A0-4254-9875-F71F4C605BC7", "requesterId": "09F8B46C-61A0-4254-9875-F71F4C605BC7", "params": {"upload": {"url": "https://cdn.livepeer.com/ABC123/filename.mp4", "c2pa": true, "profiles": [], "targetSegmentSizeSecs": 6}, "export": {"ipfs": {"pinata": {"apiKey": "1234567890"}}}, "exportData": {"ipfs": {}, "type": "text/plain", "id": "09F8B46C-61A0-4254-9875-F71F4C605BC7"}, "transcode-file": {"input": {"url": "https://cdn.livepeer.com/ABC123/filename.mp4"}, "storage": {"url": "s3+https://accessKeyId:secretAccessKey@s3Endpoint/bucket"}, "outputs": {"hls": {"path": "/samplevideo/hls"}, "mp4": {"path": "/samplevideo/mp4"}}, "profiles": [], "targetSegmentSizeSecs": 10, "c2pa": false}, "clip": {"url": "https://asset-cdn.lp-playback.monster/hls/1bde4o2i6xycudoy/static360p0.mp4", "clipStrategy": {"startTime": 1587667174725, "endTime": 1587667174725, "playbackId": "eaw4nk06ts2d0mzb"}, "catalystPipelineStrategy": "catalyst_ffmpeg", "sessionId": "d32ae9e6-c459-4931-9898-e86e2f5e7e16", "inputId": "09F8B46C-61A0-4254-9875-F71F4C605BC7"}}, "status": {"phase": "pending", "updatedAt": 1587667174725, "progress": 0.5, "errorMessage": "Failed to upload file", "retries": 3}, "output": {"upload": {"assetSpec": {"id": "09F8B46C-61A0-4254-9875-F71F4C605BC7", "type": "video", "playbackId": "eaw4nk06ts2d0mzb", "playbackUrl": "https://livepeercdn.com/asset/ea03f37e-f861-4cdd-b495-0e60b6d753ad/index.m3u8", "downloadUrl": "https://livepeercdn.com/asset/eaw4nk06ts2d0mzb/video", "playbackPolicy": {"type": "webhook", "webhookId": "1bde4o2i6xycudoy", "webhookContext": {"streamerId": "my-custom-id"}, "refreshInterval": 600}, "source": {"type": "url", "url": "http://speedy-basil.org"}, "creatorId": {"type": "unverified", "value": "user123"}, "profiles": [], "storage": {"ipfs": {"updatedAt": 1587667174725}, "status": {"phase": "ready", "progress": 0.5, "errorMessage": "Failed to update storage", "tasks": {"pending": "09F8B46C-61A0-4254-9875-F71F4C605BC7", "last": "09F8B46C-61A0-4254-9875-F71F4C605BC7", "failed": "09F8B46C-61A0-4254-9875-F71F4C605BC7"}}}, "status": {"phase": "deleting", "updatedAt": 1587667174725}, "name": "filename.mp4", "projectId": "aac12556-4d65-4d34-9fb6-d1f0985eb0a9", "createdAt": 1587667174725, "size": 84934509, "hash": [], "videoSpec": {"format": "mp4", "duration": 23.8328, "bitrate": 1000000, "tracks": []}}, "key": ""}, "export": {"ipfs": {"videoFileCid": "Qmabc123xyz341", "videoFileUrl": "ipfs://Qmabc123xyz341", "videoFileGatewayUrl": "https://gateway.ipfs.io/ipfs/Qmabc123xyz341", "nftMetadataCid": "Qmabc123xyz341", "nftMetadataUrl": "ipfs://Qmabc123xyz341", "nftMetadataGatewayUrl": "https://gateway.ipfs.io/ipfs/Qmabc123xyz341"}}, "exportData": {"ipfs": {"cid": "Qmabc123xyz341"}}}} + application/json: {"id": "09F8B46C-61A0-4254-9875-F71F4C605BC7", "type": "upload", "createdAt": 1587667174725, "scheduledAt": 1587667174725, "inputAssetId": "09F8B46C-61A0-4254-9875-F71F4C605BC7", "outputAssetId": "09F8B46C-61A0-4254-9875-F71F4C605BC7", "projectId": "09F8B46C-61A0-4254-9875-F71F4C605BC7", "requesterId": "09F8B46C-61A0-4254-9875-F71F4C605BC7", "params": {"upload": {"url": "https://cdn.livepeer.com/ABC123/filename.mp4", "c2pa": true, "profiles": [], "targetSegmentSizeSecs": 6}, "export": {"ipfs": {"pinata": {"apiKey": "1234567890"}}}, "exportData": {"ipfs": {}, "type": "text/plain", "id": "09F8B46C-61A0-4254-9875-F71F4C605BC7"}, "transcode-file": {"input": {"url": "https://cdn.livepeer.com/ABC123/filename.mp4"}, "storage": {"url": "s3+https://accessKeyId:secretAccessKey@s3Endpoint/bucket"}, "outputs": {"hls": {"path": "/samplevideo/hls"}, "mp4": {"path": "/samplevideo/mp4"}}, "profiles": [], "targetSegmentSizeSecs": 10, "c2pa": false}, "clip": {"url": "https://asset-cdn.lp-playback.monster/hls/1bde4o2i6xycudoy/static360p0.mp4", "clipStrategy": {"startTime": 1587667174725, "endTime": 1587667174725, "playbackId": "eaw4nk06ts2d0mzb"}, "catalystPipelineStrategy": "catalyst_ffmpeg", "sessionId": "d32ae9e6-c459-4931-9898-e86e2f5e7e16", "inputId": "09F8B46C-61A0-4254-9875-F71F4C605BC7"}}, "status": {"phase": "pending", "updatedAt": 1587667174725, "progress": 0.5, "errorMessage": "Failed to upload file", "retries": 3}, "output": {"upload": {"assetSpec": {"id": "09F8B46C-61A0-4254-9875-F71F4C605BC7", "type": "video", "playbackId": "eaw4nk06ts2d0mzb", "playbackUrl": "https://livepeercdn.com/asset/ea03f37e-f861-4cdd-b495-0e60b6d753ad/index.m3u8", "downloadUrl": "https://livepeercdn.com/asset/eaw4nk06ts2d0mzb/video/download.mp4", "playbackPolicy": {"type": "webhook", "webhookId": "1bde4o2i6xycudoy", "webhookContext": {"streamerId": "my-custom-id"}, "refreshInterval": 600}, "source": {"type": "url", "url": "http://speedy-basil.org"}, "creatorId": {"type": "unverified", "value": "user123"}, "profiles": [], "storage": {"ipfs": {"updatedAt": 1587667174725}, "status": {"phase": "ready", "progress": 0.5, "errorMessage": "Failed to update storage", "tasks": {"pending": "09F8B46C-61A0-4254-9875-F71F4C605BC7", "last": "09F8B46C-61A0-4254-9875-F71F4C605BC7", "failed": "09F8B46C-61A0-4254-9875-F71F4C605BC7"}}}, "status": {"phase": "deleting", "updatedAt": 1587667174725}, "name": "filename.mp4", "projectId": "aac12556-4d65-4d34-9fb6-d1f0985eb0a9", "createdAt": 1587667174725, "size": 84934509, "hash": [], "videoSpec": {"format": "mp4", "duration": 23.8328, "bitrate": 1000000, "tracks": []}}, "key": ""}, "export": {"ipfs": {"videoFileCid": "Qmabc123xyz341", "videoFileUrl": "ipfs://Qmabc123xyz341", "videoFileGatewayUrl": "https://gateway.ipfs.io/ipfs/Qmabc123xyz341", "nftMetadataCid": "Qmabc123xyz341", "nftMetadataUrl": "ipfs://Qmabc123xyz341", "nftMetadataGatewayUrl": "https://gateway.ipfs.io/ipfs/Qmabc123xyz341"}}, "exportData": {"ipfs": {"cid": "Qmabc123xyz341"}}}} default: application/json: {"errors": ["[\"id not provided\",\"Account not found\"]"]} getPlaybackInfo: @@ -1121,7 +1142,7 @@ examples: "422": application/json: {"": {}} "500": - application/json: {"": {}} + application/json: {"detail": {"msg": ""}, "": {}} default: application/json: {"": {}} genImageToImage: @@ -1138,7 +1159,7 @@ examples: "422": application/json: {"": {}} "500": - application/json: {"detail": {"msg": ""}, "": {}} + application/json: {"": {}} default: application/json: {"": {}} genImageToVideo: @@ -1155,7 +1176,7 @@ examples: "422": application/json: {"": {}} "500": - application/json: {"": {}} + application/json: {"detail": {"msg": ""}, "": {}} default: application/json: {"": {}} genUpscale: @@ -1172,7 +1193,7 @@ examples: "422": application/json: {"": {}} "500": - application/json: {"detail": {"msg": ""}, "": {}} + application/json: {"": {}} default: application/json: {"": {}} genAudioToText: @@ -1185,15 +1206,17 @@ examples: "400": application/json: {"": {}} "401": - application/json: {"detail": {"msg": ""}, "": {}} - "413": application/json: {"": {}} + "413": + application/json: {"detail": {"msg": ""}, "": {}} "422": application/json: {"": {}} "500": application/json: {"detail": {"msg": ""}, "": {}} default: application/json: {"": {}} + "415": + application/json: {"detail": {"msg": ""}, "": {}} genSegmentAnything2: speakeasy-default-gen-segment-anything2: requestBody: @@ -1207,7 +1230,25 @@ examples: application/json: {"detail": {"msg": ""}, "": {}} "422": application/json: {"": {}} + "500": + application/json: {"": {}} + default: + application/json: {"": {}} + genLLM: + speakeasy-default-gen-LLM: + requestBody: + application/x-www-form-urlencoded: {"prompt": ""} + responses: + "200": + application/json: {"response": "", "tokens_used": 60712} + "400": + application/json: {"detail": {"msg": ""}, "": {}} + "401": + application/json: {"": {}} + "422": + application/json: {"": {}} "500": application/json: {"detail": {"msg": ""}, "": {}} default: application/json: {"": {}} +generatedTests: {} diff --git a/.speakeasy/gen.yaml b/.speakeasy/gen.yaml index 4301118..5a03b49 100755 --- a/.speakeasy/gen.yaml +++ b/.speakeasy/gen.yaml @@ -11,8 +11,9 @@ generation: requestResponseComponentNamesFeb2024: true auth: oAuth2ClientCredentialsEnabled: true + oAuth2PasswordEnabled: false python: - version: 0.3.0 + version: 0.4.0 additionalDependencies: dev: {} main: {} @@ -20,10 +21,14 @@ python: authors: - Speakeasy clientServerStatusCodesAsErrors: true + defaultErrorName: SDKError description: Python Client SDK for Livepeer Studio enumFormat: enum + fixFlags: + responseRequiredSep2024: false flattenGlobalSecurity: true flattenRequests: false + flatteningOrder: parameters-first imports: option: openapi paths: diff --git a/.speakeasy/workflow.lock b/.speakeasy/workflow.lock index 4a9c227..373a75e 100644 --- a/.speakeasy/workflow.lock +++ b/.speakeasy/workflow.lock @@ -1,18 +1,21 @@ -speakeasyVersion: 1.399.0 +speakeasyVersion: 1.455.3 sources: livepeer-studio-api: sourceNamespace: livepeer-studio-api - sourceRevisionDigest: sha256:05b8e6f32af10787d3e904f94a0924c304ec1dd8357de9351eebd75f8ea9c3ca - sourceBlobDigest: sha256:aa27f19cd706fdbc92320eea5ca4d28aefd20557554f78a6fa0393320d8ee1d6 + sourceRevisionDigest: sha256:09b145c62b7b0bab3c33d3660fd31528607f09b43b29a5fcc7232c6a6a02d1cf + sourceBlobDigest: sha256:7592f82f485dd2968fd3b6015c1c8bef5cd90c1f5328aec93b56fbe288a6cd9d tags: - latest - - main + - speakeasy-sdk-regen-1731889163 + - 1.0.0 targets: livepeer-python: source: livepeer-studio-api sourceNamespace: livepeer-studio-api - sourceRevisionDigest: sha256:05b8e6f32af10787d3e904f94a0924c304ec1dd8357de9351eebd75f8ea9c3ca - sourceBlobDigest: sha256:aa27f19cd706fdbc92320eea5ca4d28aefd20557554f78a6fa0393320d8ee1d6 + sourceRevisionDigest: sha256:09b145c62b7b0bab3c33d3660fd31528607f09b43b29a5fcc7232c6a6a02d1cf + sourceBlobDigest: sha256:7592f82f485dd2968fd3b6015c1c8bef5cd90c1f5328aec93b56fbe288a6cd9d + codeSamplesNamespace: livepeer-studio-api-python-code-samples + codeSamplesRevisionDigest: sha256:4776bb9f65bfbd0bfbee1eac4a0f732735361d646ae6ff2f785775f748994f2c my-first-target: source: livepeer-studio-api sourceNamespace: livepeer-studio-api @@ -37,3 +40,5 @@ workflow: token: $pypi_token codeSamples: output: codeSamples.yaml + registry: + location: registry.speakeasyapi.dev/livepeer/livepeer-studio/livepeer-studio-api-python-code-samples diff --git a/.speakeasy/workflow.yaml b/.speakeasy/workflow.yaml index dd3ba38..a0faba1 100644 --- a/.speakeasy/workflow.yaml +++ b/.speakeasy/workflow.yaml @@ -16,3 +16,5 @@ targets: token: $pypi_token codeSamples: output: codeSamples.yaml + registry: + location: registry.speakeasyapi.dev/livepeer/livepeer-studio/livepeer-studio-api-python-code-samples diff --git a/README.md b/README.md index 04f41e3..a5d3bd5 100644 --- a/README.md +++ b/README.md @@ -85,6 +85,7 @@ if res.stream is not None: * [upscale](docs/sdks/generate/README.md#upscale) - Upscale * [audio_to_text](docs/sdks/generate/README.md#audio_to_text) - Audio To Text * [segment_anything2](docs/sdks/generate/README.md#segment_anything2) - Segment Anything 2 +* [llm](docs/sdks/generate/README.md#llm) - LLM ### [metrics](docs/sdks/metrics/README.md) @@ -176,21 +177,22 @@ Certain SDK methods accept file objects as part of a request body or multi-part ```python from livepeer import Livepeer -s = Livepeer( +with Livepeer( api_key="", -) +) as livepeer: -res = s.generate.image_to_image(request={ - "prompt": "", - "image": { - "file_name": "example.file", - "content": open("example.file", "rb"), - }, -}) + res = livepeer.generate.image_to_image(request={ + "prompt": "", + "image": { + "file_name": "example.file", + "content": open("example.file", "rb"), + }, + }) -if res.image_response is not None: - # handle response - pass + assert res.image_response is not None + + # Handle response + print(res.image_response) ``` @@ -206,79 +208,75 @@ from livepeer import Livepeer from livepeer.models import components from livepeer.utils import BackoffStrategy, RetryConfig -s = Livepeer( +with Livepeer( api_key="", -) - -res = s.stream.create(request={ - "name": "test_stream", - "pull": { - "source": "https://myservice.com/live/stream.flv", - "headers": { - "Authorization": "Bearer 123", - }, - "location": { - "lat": 39.739, - "lon": -104.988, - }, - }, - "playback_policy": { - "type": components.Type.WEBHOOK, - "webhook_id": "1bde4o2i6xycudoy", - "webhook_context": { - "streamerId": "my-custom-id", +) as livepeer: + + res = livepeer.stream.create(request={ + "name": "test_stream", + "pull": { + "source": "https://myservice.com/live/stream.flv", + "headers": { + "Authorization": "Bearer 123", + }, + "location": { + "lat": 39.739, + "lon": -104.988, + }, }, - "refresh_interval": 600, - }, - "profiles": [ - { - "width": 1280, - "name": "720p", - "height": 720, - "bitrate": 3000000, - "fps": 30, - "fps_den": 1, - "quality": 23, - "gop": "2", - "profile": components.Profile.H264_BASELINE, + "playback_policy": { + "type": components.Type.WEBHOOK, + "webhook_id": "1bde4o2i6xycudoy", + "webhook_context": { + "streamerId": "my-custom-id", + }, + "refresh_interval": 600, }, - ], - "record": False, - "recording_spec": { "profiles": [ { - "bitrate": 3000000, "width": 1280, "name": "720p", "height": 720, - "quality": 23, + "bitrate": 3000000, "fps": 30, "fps_den": 1, + "quality": 23, "gop": "2", - "profile": components.TranscodeProfileProfile.H264_BASELINE, - "encoder": components.TranscodeProfileEncoder.H_264, + "profile": components.Profile.H264_BASELINE, }, ], - }, - "multistream": { - "targets": [ - { - "profile": "720p", - "video_only": False, - "id": "PUSH123", - "spec": { - "url": "rtmps://live.my-service.tv/channel/secretKey", - "name": "My target", + "record": False, + "recording_spec": { + "profiles": [ + { + "bitrate": 3000000, + "width": 1280, + "name": "720p", + "height": 720, + "quality": 23, + "fps": 30, + "fps_den": 1, + "gop": "2", + "profile": components.TranscodeProfileProfile.H264_BASELINE, + "encoder": components.TranscodeProfileEncoder.H_264, }, - }, - ], + ], + }, + "multistream": { + "targets": [ + { + "profile": "720p0", + "id": "PUSH123", + }, + ], + }, }, -}, - RetryConfig("backoff", BackoffStrategy(1, 50, 1.1, 100), False)) + RetryConfig("backoff", BackoffStrategy(1, 50, 1.1, 100), False)) -if res.stream is not None: - # handle response - pass + assert res.stream is not None + + # Handle response + print(res.stream) ``` @@ -288,79 +286,75 @@ from livepeer import Livepeer from livepeer.models import components from livepeer.utils import BackoffStrategy, RetryConfig -s = Livepeer( +with Livepeer( retry_config=RetryConfig("backoff", BackoffStrategy(1, 50, 1.1, 100), False), api_key="", -) - -res = s.stream.create(request={ - "name": "test_stream", - "pull": { - "source": "https://myservice.com/live/stream.flv", - "headers": { - "Authorization": "Bearer 123", - }, - "location": { - "lat": 39.739, - "lon": -104.988, - }, - }, - "playback_policy": { - "type": components.Type.WEBHOOK, - "webhook_id": "1bde4o2i6xycudoy", - "webhook_context": { - "streamerId": "my-custom-id", +) as livepeer: + + res = livepeer.stream.create(request={ + "name": "test_stream", + "pull": { + "source": "https://myservice.com/live/stream.flv", + "headers": { + "Authorization": "Bearer 123", + }, + "location": { + "lat": 39.739, + "lon": -104.988, + }, }, - "refresh_interval": 600, - }, - "profiles": [ - { - "width": 1280, - "name": "720p", - "height": 720, - "bitrate": 3000000, - "fps": 30, - "fps_den": 1, - "quality": 23, - "gop": "2", - "profile": components.Profile.H264_BASELINE, + "playback_policy": { + "type": components.Type.WEBHOOK, + "webhook_id": "1bde4o2i6xycudoy", + "webhook_context": { + "streamerId": "my-custom-id", + }, + "refresh_interval": 600, }, - ], - "record": False, - "recording_spec": { "profiles": [ { - "bitrate": 3000000, "width": 1280, "name": "720p", "height": 720, - "quality": 23, + "bitrate": 3000000, "fps": 30, "fps_den": 1, + "quality": 23, "gop": "2", - "profile": components.TranscodeProfileProfile.H264_BASELINE, - "encoder": components.TranscodeProfileEncoder.H_264, + "profile": components.Profile.H264_BASELINE, }, ], - }, - "multistream": { - "targets": [ - { - "profile": "720p", - "video_only": False, - "id": "PUSH123", - "spec": { - "url": "rtmps://live.my-service.tv/channel/secretKey", - "name": "My target", + "record": False, + "recording_spec": { + "profiles": [ + { + "bitrate": 3000000, + "width": 1280, + "name": "720p", + "height": 720, + "quality": 23, + "fps": 30, + "fps_den": 1, + "gop": "2", + "profile": components.TranscodeProfileProfile.H264_BASELINE, + "encoder": components.TranscodeProfileEncoder.H_264, }, - }, - ], - }, -}) + ], + }, + "multistream": { + "targets": [ + { + "profile": "720p0", + "id": "PUSH123", + }, + ], + }, + }) -if res.stream is not None: - # handle response - pass + assert res.stream is not None + + # Handle response + print(res.stream) ``` @@ -368,12 +362,23 @@ if res.stream is not None: ## Error Handling -Handling errors in this SDK should largely match your expectations. All operations return a response object or raise an error. If Error objects are specified in your OpenAPI Spec, the SDK will raise the appropriate Error type. +Handling errors in this SDK should largely match your expectations. All operations return a response object or raise an exception. + +By default, an API error will raise a errors.SDKError exception, which has the following properties: + +| Property | Type | Description | +|-----------------|------------------|-----------------------| +| `.status_code` | *int* | The HTTP status code | +| `.message` | *str* | The error message | +| `.raw_response` | *httpx.Response* | The raw HTTP response | +| `.body` | *str* | The response content | -| Error Object | Status Code | Content Type | -| ---------------- | ---------------- | ---------------- | -| errors.Error | 404 | application/json | -| errors.SDKError | 4xx-5xx | */* | +When custom error responses are specified for an operation, the SDK may also raise their associated exceptions. You can refer to respective *Errors* tables in SDK docs for more details on possible exception types for each operation. For example, the `get_async` method may raise the following exceptions: + +| Error Type | Status Code | Content Type | +| --------------- | ----------- | ---------------- | +| errors.Error | 404 | application/json | +| errors.SDKError | 4XX, 5XX | \*/\* | ### Example @@ -381,24 +386,25 @@ Handling errors in this SDK should largely match your expectations. All operati from livepeer import Livepeer from livepeer.models import errors -s = Livepeer( +with Livepeer( api_key="", -) +) as livepeer: + res = None + try: -res = None -try: - res = s.playback.get(id="") + res = livepeer.playback.get(id="") - if res.playback_info is not None: - # handle response - pass + assert res.playback_info is not None -except errors.Error as e: - # handle e.data: errors.ErrorData - raise(e) -except errors.SDKError as e: - # handle exception - raise(e) + # Handle response + print(res.playback_info) + + except errors.Error as e: + # handle e.data: errors.ErrorData + raise(e) + except errors.SDKError as e: + # handle exception + raise(e) ``` @@ -492,87 +498,83 @@ s = Livepeer(async_client=CustomClient(httpx.AsyncClient())) This SDK supports the following security scheme globally: -| Name | Type | Scheme | -| ----------- | ----------- | ----------- | -| `api_key` | http | HTTP Bearer | +| Name | Type | Scheme | +| --------- | ---- | ----------- | +| `api_key` | http | HTTP Bearer | To authenticate with the API the `api_key` parameter must be set when initializing the SDK client instance. For example: ```python from livepeer import Livepeer from livepeer.models import components -s = Livepeer( +with Livepeer( api_key="", -) - -res = s.stream.create(request={ - "name": "test_stream", - "pull": { - "source": "https://myservice.com/live/stream.flv", - "headers": { - "Authorization": "Bearer 123", - }, - "location": { - "lat": 39.739, - "lon": -104.988, - }, - }, - "playback_policy": { - "type": components.Type.WEBHOOK, - "webhook_id": "1bde4o2i6xycudoy", - "webhook_context": { - "streamerId": "my-custom-id", +) as livepeer: + + res = livepeer.stream.create(request={ + "name": "test_stream", + "pull": { + "source": "https://myservice.com/live/stream.flv", + "headers": { + "Authorization": "Bearer 123", + }, + "location": { + "lat": 39.739, + "lon": -104.988, + }, }, - "refresh_interval": 600, - }, - "profiles": [ - { - "width": 1280, - "name": "720p", - "height": 720, - "bitrate": 3000000, - "fps": 30, - "fps_den": 1, - "quality": 23, - "gop": "2", - "profile": components.Profile.H264_BASELINE, + "playback_policy": { + "type": components.Type.WEBHOOK, + "webhook_id": "1bde4o2i6xycudoy", + "webhook_context": { + "streamerId": "my-custom-id", + }, + "refresh_interval": 600, }, - ], - "record": False, - "recording_spec": { "profiles": [ { - "bitrate": 3000000, "width": 1280, "name": "720p", "height": 720, - "quality": 23, + "bitrate": 3000000, "fps": 30, "fps_den": 1, + "quality": 23, "gop": "2", - "profile": components.TranscodeProfileProfile.H264_BASELINE, - "encoder": components.TranscodeProfileEncoder.H_264, + "profile": components.Profile.H264_BASELINE, }, ], - }, - "multistream": { - "targets": [ - { - "profile": "720p", - "video_only": False, - "id": "PUSH123", - "spec": { - "url": "rtmps://live.my-service.tv/channel/secretKey", - "name": "My target", + "record": False, + "recording_spec": { + "profiles": [ + { + "bitrate": 3000000, + "width": 1280, + "name": "720p", + "height": 720, + "quality": 23, + "fps": 30, + "fps_den": 1, + "gop": "2", + "profile": components.TranscodeProfileProfile.H264_BASELINE, + "encoder": components.TranscodeProfileEncoder.H_264, }, - }, - ], - }, -}) + ], + }, + "multistream": { + "targets": [ + { + "profile": "720p0", + "id": "PUSH123", + }, + ], + }, + }) -if res.stream is not None: - # handle response - pass + assert res.stream is not None + + # Handle response + print(res.stream) ``` @@ -587,18 +589,20 @@ what they return. ## Table of Contents + +* [Livepeer Python Library](#livepeer-python-library) + * [Documentation](#documentation) + * [SDK Installation](#sdk-installation) + * [SDK Example Usage](#sdk-example-usage) + * [Available Resources and Operations](#available-resources-and-operations) + * [File uploads](#file-uploads) + * [Retries](#retries) + * [Error Handling](#error-handling) + * [Custom HTTP Client](#custom-http-client) + * [Authentication](#authentication) + * [IDE Support](#ide-support) + * [Debugging](#debugging) -* [SDK Installation](#sdk-installation) -* [IDE Support](#ide-support) -* [SDK Example Usage](#sdk-example-usage) -* [Available Resources and Operations](#available-resources-and-operations) -* [File uploads](#file-uploads) -* [Retries](#retries) -* [Error Handling](#error-handling) -* [Server Selection](#server-selection) -* [Custom HTTP Client](#custom-http-client) -* [Authentication](#authentication) -* [Debugging](#debugging) diff --git a/RELEASES.md b/RELEASES.md index f5c4cca..df00989 100644 --- a/RELEASES.md +++ b/RELEASES.md @@ -104,4 +104,14 @@ Based on: ### Generated - [python v0.3.0] . ### Releases -- [PyPI v0.3.0] https://pypi.org/project/livepeer/0.3.0 - . \ No newline at end of file +- [PyPI v0.3.0] https://pypi.org/project/livepeer/0.3.0 - . + +## 2024-12-16 00:20:04 +### Changes +Based on: +- OpenAPI Doc +- Speakeasy CLI 1.455.3 (2.479.3) https://github.com/speakeasy-api/speakeasy +### Generated +- [python v0.4.0] . +### Releases +- [PyPI v0.4.0] https://pypi.org/project/livepeer/0.4.0 - . \ No newline at end of file diff --git a/USAGE.md b/USAGE.md index 9349b1d..2dbf4de 100644 --- a/USAGE.md +++ b/USAGE.md @@ -4,94 +4,11 @@ from livepeer import Livepeer from livepeer.models import components -s = Livepeer( +with Livepeer( api_key="", -) +) as livepeer: -res = s.stream.create(request={ - "name": "test_stream", - "pull": { - "source": "https://myservice.com/live/stream.flv", - "headers": { - "Authorization": "Bearer 123", - }, - "location": { - "lat": 39.739, - "lon": -104.988, - }, - }, - "playback_policy": { - "type": components.Type.WEBHOOK, - "webhook_id": "1bde4o2i6xycudoy", - "webhook_context": { - "streamerId": "my-custom-id", - }, - "refresh_interval": 600, - }, - "profiles": [ - { - "width": 1280, - "name": "720p", - "height": 720, - "bitrate": 3000000, - "fps": 30, - "fps_den": 1, - "quality": 23, - "gop": "2", - "profile": components.Profile.H264_BASELINE, - }, - ], - "record": False, - "recording_spec": { - "profiles": [ - { - "bitrate": 3000000, - "width": 1280, - "name": "720p", - "height": 720, - "quality": 23, - "fps": 30, - "fps_den": 1, - "gop": "2", - "profile": components.TranscodeProfileProfile.H264_BASELINE, - "encoder": components.TranscodeProfileEncoder.H_264, - }, - ], - }, - "multistream": { - "targets": [ - { - "profile": "720p", - "video_only": False, - "id": "PUSH123", - "spec": { - "url": "rtmps://live.my-service.tv/channel/secretKey", - "name": "My target", - }, - }, - ], - }, -}) - -if res.stream is not None: - # handle response - pass -``` - -
- -The same SDK client can also be used to make asychronous requests by importing asyncio. -```python -# Asynchronous Example -import asyncio -from livepeer import Livepeer -from livepeer.models import components - -async def main(): - s = Livepeer( - api_key="", - ) - res = await s.stream.create_async(request={ + res = livepeer.stream.create(request={ "name": "test_stream", "pull": { "source": "https://myservice.com/live/stream.flv", @@ -144,20 +61,97 @@ async def main(): "multistream": { "targets": [ { - "profile": "720p", - "video_only": False, + "profile": "720p0", "id": "PUSH123", - "spec": { - "url": "rtmps://live.my-service.tv/channel/secretKey", - "name": "My target", - }, }, ], }, }) - if res.stream is not None: - # handle response - pass + + assert res.stream is not None + + # Handle response + print(res.stream) +``` + +
+ +The same SDK client can also be used to make asychronous requests by importing asyncio. +```python +# Asynchronous Example +import asyncio +from livepeer import Livepeer +from livepeer.models import components + +async def main(): + async with Livepeer( + api_key="", + ) as livepeer: + + res = await livepeer.stream.create_async(request={ + "name": "test_stream", + "pull": { + "source": "https://myservice.com/live/stream.flv", + "headers": { + "Authorization": "Bearer 123", + }, + "location": { + "lat": 39.739, + "lon": -104.988, + }, + }, + "playback_policy": { + "type": components.Type.WEBHOOK, + "webhook_id": "1bde4o2i6xycudoy", + "webhook_context": { + "streamerId": "my-custom-id", + }, + "refresh_interval": 600, + }, + "profiles": [ + { + "width": 1280, + "name": "720p", + "height": 720, + "bitrate": 3000000, + "fps": 30, + "fps_den": 1, + "quality": 23, + "gop": "2", + "profile": components.Profile.H264_BASELINE, + }, + ], + "record": False, + "recording_spec": { + "profiles": [ + { + "bitrate": 3000000, + "width": 1280, + "name": "720p", + "height": 720, + "quality": 23, + "fps": 30, + "fps_den": 1, + "gop": "2", + "profile": components.TranscodeProfileProfile.H264_BASELINE, + "encoder": components.TranscodeProfileEncoder.H_264, + }, + ], + }, + "multistream": { + "targets": [ + { + "profile": "720p0", + "id": "PUSH123", + }, + ], + }, + }) + + assert res.stream is not None + + # Handle response + print(res.stream) asyncio.run(main()) ``` diff --git a/codeSamples.yaml b/codeSamples.yaml index 71546ae..ddd14ab 100644 --- a/codeSamples.yaml +++ b/codeSamples.yaml @@ -11,15 +11,16 @@ actions: source: |- from livepeer import Livepeer - s = Livepeer( + with Livepeer( api_key="", - ) + ) as livepeer: - res = s.access_control.get_all() + res = livepeer.access_control.get_all() - if res.data is not None: - # handle response - pass + assert res.data is not None + + # Handle response + print(res.data) - target: $["paths"]["/access-control/signing-key"]["post"] update: x-codeSamples: @@ -28,15 +29,16 @@ actions: source: |- from livepeer import Livepeer - s = Livepeer( + with Livepeer( api_key="", - ) + ) as livepeer: + + res = livepeer.access_control.create() - res = s.access_control.create() + assert res.signing_key is not None - if res.signing_key is not None: - # handle response - pass + # Handle response + print(res.signing_key) - target: $["paths"]["/access-control/signing-key/{keyId}"]["delete"] update: x-codeSamples: @@ -45,15 +47,16 @@ actions: source: |- from livepeer import Livepeer - s = Livepeer( + with Livepeer( api_key="", - ) + ) as livepeer: + + res = livepeer.access_control.delete(key_id="") - res = s.access_control.delete(key_id="") + assert res is not None - if res is not None: - # handle response - pass + # Handle response + print(res) - target: $["paths"]["/access-control/signing-key/{keyId}"]["get"] update: x-codeSamples: @@ -62,15 +65,16 @@ actions: source: |- from livepeer import Livepeer - s = Livepeer( + with Livepeer( api_key="", - ) + ) as livepeer: - res = s.access_control.get(key_id="") + res = livepeer.access_control.get(key_id="") - if res.signing_key is not None: - # handle response - pass + assert res.signing_key is not None + + # Handle response + print(res.signing_key) - target: $["paths"]["/access-control/signing-key/{keyId}"]["patch"] update: x-codeSamples: @@ -79,16 +83,17 @@ actions: source: |- from livepeer import Livepeer - s = Livepeer( + with Livepeer( api_key="", - ) + ) as livepeer: + + res = livepeer.access_control.update(key_id="", request_body={}) - res = s.access_control.update(key_id="", request_body={}) + assert res is not None - if res is not None: - # handle response - pass - - target: $["paths"]["/api/beta/generate/audio-to-text"]["post"] + # Handle response + print(res) + - target: $["paths"]["/api/generate/audio-to-text"]["post"] update: x-codeSamples: - lang: python @@ -96,21 +101,22 @@ actions: source: |- from livepeer import Livepeer - s = Livepeer( + with Livepeer( api_key="", - ) - - res = s.generate.audio_to_text(request={ - "audio": { - "file_name": "example.file", - "content": open("example.file", "rb"), - }, - }) - - if res.text_response is not None: - # handle response - pass - - target: $["paths"]["/api/beta/generate/image-to-image"]["post"] + ) as livepeer: + + res = livepeer.generate.audio_to_text(request={ + "audio": { + "file_name": "example.file", + "content": open("example.file", "rb"), + }, + }) + + assert res.text_response is not None + + # Handle response + print(res.text_response) + - target: $["paths"]["/api/generate/image-to-image"]["post"] update: x-codeSamples: - lang: python @@ -118,22 +124,23 @@ actions: source: |- from livepeer import Livepeer - s = Livepeer( + with Livepeer( api_key="", - ) - - res = s.generate.image_to_image(request={ - "prompt": "", - "image": { - "file_name": "example.file", - "content": open("example.file", "rb"), - }, - }) - - if res.image_response is not None: - # handle response - pass - - target: $["paths"]["/api/beta/generate/image-to-video"]["post"] + ) as livepeer: + + res = livepeer.generate.image_to_image(request={ + "prompt": "", + "image": { + "file_name": "example.file", + "content": open("example.file", "rb"), + }, + }) + + assert res.image_response is not None + + # Handle response + print(res.image_response) + - target: $["paths"]["/api/generate/image-to-video"]["post"] update: x-codeSamples: - lang: python @@ -141,21 +148,42 @@ actions: source: |- from livepeer import Livepeer - s = Livepeer( + with Livepeer( api_key="", - ) - - res = s.generate.image_to_video(request={ - "image": { - "file_name": "example.file", - "content": open("example.file", "rb"), - }, - }) - - if res.video_response is not None: - # handle response - pass - - target: $["paths"]["/api/beta/generate/segment-anything-2"]["post"] + ) as livepeer: + + res = livepeer.generate.image_to_video(request={ + "image": { + "file_name": "example.file", + "content": open("example.file", "rb"), + }, + }) + + assert res.video_response is not None + + # Handle response + print(res.video_response) + - target: $["paths"]["/api/generate/llm"]["post"] + update: + x-codeSamples: + - lang: python + label: genLLM + source: |- + from livepeer import Livepeer + + with Livepeer( + api_key="", + ) as livepeer: + + res = livepeer.generate.llm(request={ + "prompt": "", + }) + + assert res.llm_response is not None + + # Handle response + print(res.llm_response) + - target: $["paths"]["/api/generate/segment-anything-2"]["post"] update: x-codeSamples: - lang: python @@ -163,21 +191,22 @@ actions: source: |- from livepeer import Livepeer - s = Livepeer( + with Livepeer( api_key="", - ) - - res = s.generate.segment_anything2(request={ - "image": { - "file_name": "example.file", - "content": open("example.file", "rb"), - }, - }) - - if res.masks_response is not None: - # handle response - pass - - target: $["paths"]["/api/beta/generate/text-to-image"]["post"] + ) as livepeer: + + res = livepeer.generate.segment_anything2(request={ + "image": { + "file_name": "example.file", + "content": open("example.file", "rb"), + }, + }) + + assert res.masks_response is not None + + # Handle response + print(res.masks_response) + - target: $["paths"]["/api/generate/text-to-image"]["post"] update: x-codeSamples: - lang: python @@ -185,18 +214,19 @@ actions: source: |- from livepeer import Livepeer - s = Livepeer( + with Livepeer( api_key="", - ) + ) as livepeer: - res = s.generate.text_to_image(request={ - "prompt": "", - }) + res = livepeer.generate.text_to_image(request={ + "prompt": "", + }) - if res.image_response is not None: - # handle response - pass - - target: $["paths"]["/api/beta/generate/upscale"]["post"] + assert res.image_response is not None + + # Handle response + print(res.image_response) + - target: $["paths"]["/api/generate/upscale"]["post"] update: x-codeSamples: - lang: python @@ -204,21 +234,22 @@ actions: source: |- from livepeer import Livepeer - s = Livepeer( + with Livepeer( api_key="", - ) - - res = s.generate.upscale(request={ - "prompt": "", - "image": { - "file_name": "example.file", - "content": open("example.file", "rb"), - }, - }) - - if res.image_response is not None: - # handle response - pass + ) as livepeer: + + res = livepeer.generate.upscale(request={ + "prompt": "", + "image": { + "file_name": "example.file", + "content": open("example.file", "rb"), + }, + }) + + assert res.image_response is not None + + # Handle response + print(res.image_response) - target: $["paths"]["/asset"]["get"] update: x-codeSamples: @@ -227,15 +258,16 @@ actions: source: |- from livepeer import Livepeer - s = Livepeer( + with Livepeer( api_key="", - ) + ) as livepeer: + + res = livepeer.asset.get_all() - res = s.asset.get_all() + assert res.data is not None - if res.data is not None: - # handle response - pass + # Handle response + print(res.data) - target: $["paths"]["/asset/request-upload"]["post"] update: x-codeSamples: @@ -245,40 +277,41 @@ actions: from livepeer import Livepeer from livepeer.models import components - s = Livepeer( + with Livepeer( api_key="", - ) - - res = s.asset.create(request={ - "name": "filename.mp4", - "static_mp4": True, - "playback_policy": { - "type": components.Type.WEBHOOK, - "webhook_id": "1bde4o2i6xycudoy", - "webhook_context": { - "streamerId": "my-custom-id", - }, - "refresh_interval": 600, - }, - "profiles": [ - { - "width": 1280, - "name": "720p", - "height": 720, - "bitrate": 3000000, - "quality": 23, - "fps": 30, - "fps_den": 1, - "gop": "2", - "profile": components.TranscodeProfileProfile.H264_BASELINE, - "encoder": components.TranscodeProfileEncoder.H_264, + ) as livepeer: + + res = livepeer.asset.create(request={ + "name": "filename.mp4", + "static_mp4": True, + "playback_policy": { + "type": components.Type.WEBHOOK, + "webhook_id": "1bde4o2i6xycudoy", + "webhook_context": { + "streamerId": "my-custom-id", + }, + "refresh_interval": 600, }, - ], - }) + "profiles": [ + { + "width": 1280, + "name": "720p", + "height": 720, + "bitrate": 3000000, + "quality": 23, + "fps": 30, + "fps_den": 1, + "gop": "2", + "profile": components.TranscodeProfileProfile.H264_BASELINE, + "encoder": components.TranscodeProfileEncoder.H_264, + }, + ], + }) - if res.data is not None: - # handle response - pass + assert res.data is not None + + # Handle response + print(res.data) - target: $["paths"]["/asset/upload/url"]["post"] update: x-codeSamples: @@ -288,41 +321,54 @@ actions: from livepeer import Livepeer from livepeer.models import components - s = Livepeer( + with Livepeer( api_key="", - ) - - res = s.asset.create_via_url(request={ - "name": "filename.mp4", - "static_mp4": True, - "playback_policy": { - "type": components.Type.WEBHOOK, - "webhook_id": "1bde4o2i6xycudoy", - "webhook_context": { - "streamerId": "my-custom-id", - }, - "refresh_interval": 600, - }, - "url": "https://s3.amazonaws.com/my-bucket/path/filename.mp4", - "profiles": [ - { - "width": 1280, - "name": "720p", - "height": 720, - "bitrate": 3000000, - "quality": 23, - "fps": 30, - "fps_den": 1, - "gop": "2", - "profile": components.TranscodeProfileProfile.H264_BASELINE, - "encoder": components.TranscodeProfileEncoder.H_264, + ) as livepeer: + + res = livepeer.asset.create_via_url(request={ + "name": "filename.mp4", + "static_mp4": True, + "playback_policy": { + "type": components.Type.WEBHOOK, + "webhook_id": "1bde4o2i6xycudoy", + "webhook_context": { + "streamerId": "my-custom-id", + }, + "refresh_interval": 600, }, - ], - }) + "url": "https://s3.amazonaws.com/my-bucket/path/filename.mp4", + "profiles": [ + { + "width": 1280, + "name": "720p", + "height": 720, + "bitrate": 3000000, + "quality": 23, + "fps": 30, + "fps_den": 1, + "gop": "2", + "profile": components.TranscodeProfileProfile.H264_BASELINE, + "encoder": components.TranscodeProfileEncoder.H_264, + }, + { + "width": 1280, + "name": "720p", + "height": 720, + "bitrate": 3000000, + "quality": 23, + "fps": 30, + "fps_den": 1, + "gop": "2", + "profile": components.TranscodeProfileProfile.H264_BASELINE, + "encoder": components.TranscodeProfileEncoder.H_264, + }, + ], + }) - if res.two_hundred_application_json_data is not None: - # handle response - pass + assert res.two_hundred_application_json_data is not None + + # Handle response + print(res.two_hundred_application_json_data) - target: $["paths"]["/asset/{assetId}"]["delete"] update: x-codeSamples: @@ -331,15 +377,16 @@ actions: source: |- from livepeer import Livepeer - s = Livepeer( + with Livepeer( api_key="", - ) + ) as livepeer: + + res = livepeer.asset.delete(asset_id="") - res = s.asset.delete(asset_id="") + assert res is not None - if res is not None: - # handle response - pass + # Handle response + print(res) - target: $["paths"]["/asset/{assetId}"]["get"] update: x-codeSamples: @@ -348,15 +395,16 @@ actions: source: |- from livepeer import Livepeer - s = Livepeer( + with Livepeer( api_key="", - ) + ) as livepeer: - res = s.asset.get(asset_id="") + res = livepeer.asset.get(asset_id="") - if res.asset is not None: - # handle response - pass + assert res.asset is not None + + # Handle response + print(res.asset) - target: $["paths"]["/asset/{assetId}"]["patch"] update: x-codeSamples: @@ -366,25 +414,26 @@ actions: from livepeer import Livepeer from livepeer.models import components - s = Livepeer( + with Livepeer( api_key="", - ) - - res = s.asset.update(asset_id="", asset_patch_payload={ - "name": "filename.mp4", - "playback_policy": { - "type": components.Type.WEBHOOK, - "webhook_id": "1bde4o2i6xycudoy", - "webhook_context": { - "streamerId": "my-custom-id", + ) as livepeer: + + res = livepeer.asset.update(asset_id="", asset_patch_payload={ + "name": "filename.mp4", + "playback_policy": { + "type": components.Type.WEBHOOK, + "webhook_id": "1bde4o2i6xycudoy", + "webhook_context": { + "streamerId": "my-custom-id", + }, + "refresh_interval": 600, }, - "refresh_interval": 600, - }, - }) + }) - if res.asset is not None: - # handle response - pass + assert res.asset is not None + + # Handle response + print(res.asset) - target: $["paths"]["/clip"]["post"] update: x-codeSamples: @@ -393,21 +442,22 @@ actions: source: |- from livepeer import Livepeer - s = Livepeer( + with Livepeer( api_key="", - ) - - res = s.stream.create_clip(request={ - "playback_id": "eaw4nk06ts2d0mzb", - "start_time": 1587667174725, - "end_time": 1587667174725, - "name": "My Clip", - "session_id": "de7818e7-610a-4057-8f6f-b785dc1e6f88", - }) - - if res.data is not None: - # handle response - pass + ) as livepeer: + + res = livepeer.stream.create_clip(request={ + "playback_id": "eaw4nk06ts2d0mzb", + "start_time": 1587667174725, + "end_time": 1587667174725, + "name": "My Clip", + "session_id": "de7818e7-610a-4057-8f6f-b785dc1e6f88", + }) + + assert res.data is not None + + # Handle response + print(res.data) - target: $["paths"]["/data/usage/query"]["get"] update: x-codeSamples: @@ -416,15 +466,16 @@ actions: source: |- from livepeer import Livepeer - s = Livepeer( + with Livepeer( api_key="", - ) + ) as livepeer: + + res = livepeer.metrics.get_usage(request={}) - res = s.metrics.get_usage(request={}) + assert res.usage_metric is not None - if res.usage_metric is not None: - # handle response - pass + # Handle response + print(res.usage_metric) - target: $["paths"]["/data/views/now"]["get"] update: x-codeSamples: @@ -433,15 +484,16 @@ actions: source: |- from livepeer import Livepeer - s = Livepeer( + with Livepeer( api_key="", - ) + ) as livepeer: - res = s.metrics.get_realtime_viewership() + res = livepeer.metrics.get_realtime_viewership() - if res.data is not None: - # handle response - pass + assert res.data is not None + + # Handle response + print(res.data) - target: $["paths"]["/data/views/query"]["get"] update: x-codeSamples: @@ -450,15 +502,16 @@ actions: source: |- from livepeer import Livepeer - s = Livepeer( + with Livepeer( api_key="", - ) + ) as livepeer: + + res = livepeer.metrics.get_viewership(request={}) - res = s.metrics.get_viewership(request={}) + assert res.data is not None - if res.data is not None: - # handle response - pass + # Handle response + print(res.data) - target: $["paths"]["/data/views/query/creator"]["get"] update: x-codeSamples: @@ -467,15 +520,16 @@ actions: source: |- from livepeer import Livepeer - s = Livepeer( + with Livepeer( api_key="", - ) + ) as livepeer: - res = s.metrics.get_creator_viewership(request={}) + res = livepeer.metrics.get_creator_viewership(request={}) - if res.data is not None: - # handle response - pass + assert res.data is not None + + # Handle response + print(res.data) - target: $["paths"]["/data/views/query/total/{playbackId}"]["get"] update: x-codeSamples: @@ -484,15 +538,16 @@ actions: source: |- from livepeer import Livepeer - s = Livepeer( + with Livepeer( api_key="", - ) + ) as livepeer: + + res = livepeer.metrics.get_public_viewership(playback_id="") - res = s.metrics.get_public_viewership(playback_id="") + assert res.data is not None - if res.data is not None: - # handle response - pass + # Handle response + print(res.data) - target: $["paths"]["/multistream/target"]["get"] update: x-codeSamples: @@ -501,15 +556,16 @@ actions: source: |- from livepeer import Livepeer - s = Livepeer( + with Livepeer( api_key="", - ) + ) as livepeer: - res = s.multistream.get_all() + res = livepeer.multistream.get_all() - if res.data is not None: - # handle response - pass + assert res.data is not None + + # Handle response + print(res.data) - target: $["paths"]["/multistream/target"]["post"] update: x-codeSamples: @@ -518,17 +574,18 @@ actions: source: |- from livepeer import Livepeer - s = Livepeer( + with Livepeer( api_key="", - ) + ) as livepeer: - res = s.multistream.create(request={ - "url": "rtmps://live.my-service.tv/channel/secretKey", - }) + res = livepeer.multistream.create(request={ + "url": "rtmps://live.my-service.tv/channel/secretKey", + }) - if res.multistream_target is not None: - # handle response - pass + assert res.multistream_target is not None + + # Handle response + print(res.multistream_target) - target: $["paths"]["/multistream/target/{id}"]["delete"] update: x-codeSamples: @@ -537,15 +594,16 @@ actions: source: |- from livepeer import Livepeer - s = Livepeer( + with Livepeer( api_key="", - ) + ) as livepeer: + + res = livepeer.multistream.delete(id="") - res = s.multistream.delete(id="") + assert res is not None - if res is not None: - # handle response - pass + # Handle response + print(res) - target: $["paths"]["/multistream/target/{id}"]["get"] update: x-codeSamples: @@ -554,15 +612,16 @@ actions: source: |- from livepeer import Livepeer - s = Livepeer( + with Livepeer( api_key="", - ) + ) as livepeer: - res = s.multistream.get(id="") + res = livepeer.multistream.get(id="") - if res.multistream_target is not None: - # handle response - pass + assert res.multistream_target is not None + + # Handle response + print(res.multistream_target) - target: $["paths"]["/multistream/target/{id}"]["patch"] update: x-codeSamples: @@ -571,17 +630,18 @@ actions: source: |- from livepeer import Livepeer - s = Livepeer( + with Livepeer( api_key="", - ) + ) as livepeer: + + res = livepeer.multistream.update(id="", multistream_target_patch_payload={ + "url": "rtmps://live.my-service.tv/channel/secretKey", + }) - res = s.multistream.update(id="", multistream_target_patch_payload={ - "url": "rtmps://live.my-service.tv/channel/secretKey", - }) + assert res is not None - if res is not None: - # handle response - pass + # Handle response + print(res) - target: $["paths"]["/playback/{id}"]["get"] update: x-codeSamples: @@ -590,177 +650,16 @@ actions: source: |- from livepeer import Livepeer - s = Livepeer( - api_key="", - ) - - res = s.playback.get(id="") - - if res.playback_info is not None: - # handle response - pass - - target: $["paths"]["/room"]["post"] - update: - x-codeSamples: - - lang: python - label: createRoom - source: |- - from livepeer import Livepeer - - s = Livepeer( - api_key="", - ) - - res = s.room.create() - - if res.create_room_response is not None: - # handle response - pass - - target: $["paths"]["/room/{id}"]["delete"] - update: - x-codeSamples: - - lang: python - label: deleteRoom - source: |- - from livepeer import Livepeer - - s = Livepeer( - api_key="", - ) - - res = s.room.delete(id="") - - if res is not None: - # handle response - pass - - target: $["paths"]["/room/{id}"]["get"] - update: - x-codeSamples: - - lang: python - label: getRoom - source: |- - from livepeer import Livepeer - - s = Livepeer( - api_key="", - ) - - res = s.room.get(id="") - - if res.room is not None: - # handle response - pass - - target: $["paths"]["/room/{id}/egress"]["delete"] - update: - x-codeSamples: - - lang: python - label: stopRoomEgress - source: |- - from livepeer import Livepeer - - s = Livepeer( - api_key="", - ) - - res = s.room.stop_egress(id="") - - if res is not None: - # handle response - pass - - target: $["paths"]["/room/{id}/egress"]["post"] - update: - x-codeSamples: - - lang: python - label: startRoomEgress - source: |- - from livepeer import Livepeer - - s = Livepeer( - api_key="", - ) - - res = s.room.start_egress(id="", room_egress_payload={ - "stream_id": "aac12556-4d65-4d34-9fb6-d1f0985eb0a9", - }) - - if res is not None: - # handle response - pass - - target: $["paths"]["/room/{id}/user"]["post"] - update: - x-codeSamples: - - lang: python - label: createRoomUser - source: |- - from livepeer import Livepeer - - s = Livepeer( + with Livepeer( api_key="", - ) - - res = s.room.create_user(id="", room_user_payload={ - "name": "name", - "can_publish": True, - "can_publish_data": True, - }) - - if res.room_user_response is not None: - # handle response - pass - - target: $["paths"]["/room/{id}/user/{userId}"]["delete"] - update: - x-codeSamples: - - lang: python - label: deleteRoomUser - source: |- - from livepeer import Livepeer - - s = Livepeer( - api_key="", - ) - - res = s.room.delete_user(id="", user_id="") - - if res is not None: - # handle response - pass - - target: $["paths"]["/room/{id}/user/{userId}"]["get"] - update: - x-codeSamples: - - lang: python - label: getRoomUser - source: |- - from livepeer import Livepeer - - s = Livepeer( - api_key="", - ) - - res = s.room.get_user(id="", user_id="") - - if res.get_room_user_response is not None: - # handle response - pass - - target: $["paths"]["/room/{id}/user/{userId}"]["put"] - update: - x-codeSamples: - - lang: python - label: updateRoomUser - source: |- - from livepeer import Livepeer + ) as livepeer: - s = Livepeer( - api_key="", - ) + res = livepeer.playback.get(id="") - res = s.room.update_user(id="", user_id="", room_user_update_payload={ - "can_publish": True, - "can_publish_data": True, - }) + assert res.playback_info is not None - if res is not None: - # handle response - pass + # Handle response + print(res.playback_info) - target: $["paths"]["/session"]["get"] update: x-codeSamples: @@ -769,15 +668,16 @@ actions: source: |- from livepeer import Livepeer - s = Livepeer( + with Livepeer( api_key="", - ) + ) as livepeer: + + res = livepeer.session.get_all() - res = s.session.get_all() + assert res.data is not None - if res.data is not None: - # handle response - pass + # Handle response + print(res.data) - target: $["paths"]["/session/{id}"]["get"] update: x-codeSamples: @@ -786,15 +686,16 @@ actions: source: |- from livepeer import Livepeer - s = Livepeer( + with Livepeer( api_key="", - ) + ) as livepeer: - res = s.session.get(id="") + res = livepeer.session.get(id="") - if res.session is not None: - # handle response - pass + assert res.session is not None + + # Handle response + print(res.session) - target: $["paths"]["/session/{id}/clips"]["get"] update: x-codeSamples: @@ -803,15 +704,16 @@ actions: source: |- from livepeer import Livepeer - s = Livepeer( + with Livepeer( api_key="", - ) + ) as livepeer: + + res = livepeer.session.get_clips(id="") - res = s.session.get_clips(id="") + assert res.data is not None - if res.data is not None: - # handle response - pass + # Handle response + print(res.data) - target: $["paths"]["/stream"]["get"] update: x-codeSamples: @@ -820,15 +722,16 @@ actions: source: |- from livepeer import Livepeer - s = Livepeer( + with Livepeer( api_key="", - ) + ) as livepeer: - res = s.stream.get_all() + res = livepeer.stream.get_all() - if res.data is not None: - # handle response - pass + assert res.data is not None + + # Handle response + print(res.data) - target: $["paths"]["/stream"]["post"] update: x-codeSamples: @@ -838,78 +741,86 @@ actions: from livepeer import Livepeer from livepeer.models import components - s = Livepeer( + with Livepeer( api_key="", - ) - - res = s.stream.create(request={ - "name": "test_stream", - "pull": { - "source": "https://myservice.com/live/stream.flv", - "headers": { - "Authorization": "Bearer 123", - }, - "location": { - "lat": 39.739, - "lon": -104.988, - }, - }, - "playback_policy": { - "type": components.Type.WEBHOOK, - "webhook_id": "1bde4o2i6xycudoy", - "webhook_context": { - "streamerId": "my-custom-id", + ) as livepeer: + + res = livepeer.stream.create(request={ + "name": "test_stream", + "pull": { + "source": "https://myservice.com/live/stream.flv", + "headers": { + "Authorization": "Bearer 123", + }, + "location": { + "lat": 39.739, + "lon": -104.988, + }, }, - "refresh_interval": 600, - }, - "profiles": [ - { - "width": 1280, - "name": "720p", - "height": 720, - "bitrate": 3000000, - "fps": 30, - "fps_den": 1, - "quality": 23, - "gop": "2", - "profile": components.Profile.H264_BASELINE, + "playback_policy": { + "type": components.Type.WEBHOOK, + "webhook_id": "1bde4o2i6xycudoy", + "webhook_context": { + "streamerId": "my-custom-id", + }, + "refresh_interval": 600, }, - ], - "record": False, - "recording_spec": { "profiles": [ { "width": 1280, "name": "720p", "height": 720, "bitrate": 3000000, - "quality": 23, "fps": 30, "fps_den": 1, + "quality": 23, "gop": "2", - "profile": components.TranscodeProfileProfile.H264_BASELINE, - "encoder": components.TranscodeProfileEncoder.H_264, + "profile": components.Profile.H264_BASELINE, }, ], - }, - "multistream": { - "targets": [ - { - "profile": "720p", - "video_only": False, - "id": "PUSH123", - "spec": { - "name": "My target", - "url": "rtmps://live.my-service.tv/channel/secretKey", + "record": False, + "recording_spec": { + "profiles": [ + { + "width": 1280, + "name": "720p", + "height": 720, + "bitrate": 3000000, + "quality": 23, + "fps": 30, + "fps_den": 1, + "gop": "2", + "profile": components.TranscodeProfileProfile.H264_BASELINE, + "encoder": components.TranscodeProfileEncoder.H_264, }, - }, - ], - }, - }) + { + "width": 1280, + "name": "720p", + "height": 720, + "bitrate": 3000000, + "quality": 23, + "fps": 30, + "fps_den": 1, + "gop": "2", + "profile": components.TranscodeProfileProfile.H264_BASELINE, + "encoder": components.TranscodeProfileEncoder.H_264, + }, + ], + }, + "multistream": { + "targets": [ + { + "profile": "720p0", + "id": "PUSH123", + }, + ], + }, + }) + + assert res.stream is not None - if res.stream is not None: - # handle response - pass + # Handle response + print(res.stream) - target: $["paths"]["/stream/{id}"]["delete"] update: x-codeSamples: @@ -918,15 +829,16 @@ actions: source: |- from livepeer import Livepeer - s = Livepeer( + with Livepeer( api_key="", - ) + ) as livepeer: - res = s.stream.delete(id="") + res = livepeer.stream.delete(id="") - if res is not None: - # handle response - pass + assert res is not None + + # Handle response + print(res) - target: $["paths"]["/stream/{id}"]["get"] update: x-codeSamples: @@ -935,15 +847,16 @@ actions: source: |- from livepeer import Livepeer - s = Livepeer( + with Livepeer( api_key="", - ) + ) as livepeer: + + res = livepeer.stream.get(id="") - res = s.stream.get(id="") + assert res.stream is not None - if res.stream is not None: - # handle response - pass + # Handle response + print(res.stream) - target: $["paths"]["/stream/{id}"]["patch"] update: x-codeSamples: @@ -953,67 +866,98 @@ actions: from livepeer import Livepeer from livepeer.models import components - s = Livepeer( + with Livepeer( api_key="", - ) - - res = s.stream.update(id="", stream_patch_payload={ - "record": False, - "multistream": { - "targets": [ - { - "profile": "720p", - "video_only": False, - "id": "PUSH123", - "spec": { - "name": "My target", - "url": "rtmps://live.my-service.tv/channel/secretKey", + ) as livepeer: + + res = livepeer.stream.update(id="", stream_patch_payload={ + "record": False, + "multistream": { + "targets": [ + { + "profile": "720p0", + "id": "PUSH123", }, - }, - ], - }, - "playback_policy": { - "type": components.Type.WEBHOOK, - "webhook_id": "1bde4o2i6xycudoy", - "webhook_context": { - "streamerId": "my-custom-id", + ], }, - "refresh_interval": 600, - }, - "profiles": [ - { - "width": 1280, - "name": "720p", - "height": 720, - "bitrate": 3000000, - "fps": 30, - "fps_den": 1, - "quality": 23, - "gop": "2", - "profile": components.Profile.H264_BASELINE, + "playback_policy": { + "type": components.Type.WEBHOOK, + "webhook_id": "1bde4o2i6xycudoy", + "webhook_context": { + "streamerId": "my-custom-id", + }, + "refresh_interval": 600, }, - ], - "recording_spec": { "profiles": [ { "width": 1280, "name": "720p", "height": 720, "bitrate": 3000000, + "fps": 30, + "fps_den": 1, "quality": 23, + "gop": "2", + "profile": components.Profile.H264_BASELINE, + }, + { + "width": 1280, + "name": "720p", + "height": 720, + "bitrate": 3000000, "fps": 30, "fps_den": 1, + "quality": 23, "gop": "2", - "profile": components.TranscodeProfileProfile.H264_BASELINE, - "encoder": components.TranscodeProfileEncoder.H_264, + "profile": components.Profile.H264_BASELINE, + }, + { + "width": 1280, + "name": "720p", + "height": 720, + "bitrate": 3000000, + "fps": 30, + "fps_den": 1, + "quality": 23, + "gop": "2", + "profile": components.Profile.H264_BASELINE, }, ], - }, - }) + "recording_spec": { + "profiles": [ + { + "width": 1280, + "name": "720p", + "height": 720, + "bitrate": 3000000, + "quality": 23, + "fps": 30, + "fps_den": 1, + "gop": "2", + "profile": components.TranscodeProfileProfile.H264_BASELINE, + "encoder": components.TranscodeProfileEncoder.H_264, + }, + { + "width": 1280, + "name": "720p", + "height": 720, + "bitrate": 3000000, + "quality": 23, + "fps": 30, + "fps_den": 1, + "gop": "2", + "profile": components.TranscodeProfileProfile.H264_BASELINE, + "encoder": components.TranscodeProfileEncoder.H_264, + }, + ], + }, + "name": "test_stream", + }) + + assert res is not None - if res is not None: - # handle response - pass + # Handle response + print(res) - target: $["paths"]["/stream/{id}/clips"]["get"] update: x-codeSamples: @@ -1022,15 +966,16 @@ actions: source: |- from livepeer import Livepeer - s = Livepeer( + with Livepeer( api_key="", - ) + ) as livepeer: - res = s.stream.get_clips(id="") + res = livepeer.stream.get_clips(id="") - if res.data is not None: - # handle response - pass + assert res.data is not None + + # Handle response + print(res.data) - target: $["paths"]["/stream/{id}/create-multistream-target"]["post"] update: x-codeSamples: @@ -1039,23 +984,24 @@ actions: source: |- from livepeer import Livepeer - s = Livepeer( + with Livepeer( api_key="", - ) - - res = s.stream.add_multistream_target(id="", target_add_payload={ - "profile": "720p0", - "video_only": False, - "id": "PUSH123", - "spec": { - "name": "My target", - "url": "rtmps://live.my-service.tv/channel/secretKey", - }, - }) + ) as livepeer: + + res = livepeer.stream.add_multistream_target(id="", target_add_payload={ + "profile": "720p0", + "video_only": False, + "id": "PUSH123", + "spec": { + "name": "My target", + "url": "rtmps://live.my-service.tv/channel/secretKey", + }, + }) + + assert res is not None - if res is not None: - # handle response - pass + # Handle response + print(res) - target: $["paths"]["/stream/{id}/multistream/{targetId}"]["delete"] update: x-codeSamples: @@ -1064,15 +1010,16 @@ actions: source: |- from livepeer import Livepeer - s = Livepeer( + with Livepeer( api_key="", - ) + ) as livepeer: - res = s.stream.remove_multistream_target(id="", target_id="") + res = livepeer.stream.remove_multistream_target(id="", target_id="") - if res is not None: - # handle response - pass + assert res is not None + + # Handle response + print(res) - target: $["paths"]["/stream/{id}/start-pull"]["post"] update: x-codeSamples: @@ -1081,15 +1028,16 @@ actions: source: |- from livepeer import Livepeer - s = Livepeer( + with Livepeer( api_key="", - ) + ) as livepeer: + + res = livepeer.stream.start_pull(id="") - res = s.stream.start_pull(id="") + assert res is not None - if res is not None: - # handle response - pass + # Handle response + print(res) - target: $["paths"]["/stream/{id}/terminate"]["delete"] update: x-codeSamples: @@ -1098,15 +1046,16 @@ actions: source: |- from livepeer import Livepeer - s = Livepeer( + with Livepeer( api_key="", - ) + ) as livepeer: - res = s.stream.terminate(id="") + res = livepeer.stream.terminate(id="") - if res is not None: - # handle response - pass + assert res is not None + + # Handle response + print(res) - target: $["paths"]["/stream/{parentId}/sessions"]["get"] update: x-codeSamples: @@ -1115,15 +1064,16 @@ actions: source: |- from livepeer import Livepeer - s = Livepeer( + with Livepeer( api_key="", - ) + ) as livepeer: + + res = livepeer.session.get_recorded(parent_id="", record=True) - res = s.session.get_recorded(parent_id="", record=True) + assert res.data is not None - if res.data is not None: - # handle response - pass + # Handle response + print(res.data) - target: $["paths"]["/task"]["get"] update: x-codeSamples: @@ -1132,15 +1082,16 @@ actions: source: |- from livepeer import Livepeer - s = Livepeer( + with Livepeer( api_key="", - ) + ) as livepeer: - res = s.task.get_all() + res = livepeer.task.get_all() - if res.data is not None: - # handle response - pass + assert res.data is not None + + # Handle response + print(res.data) - target: $["paths"]["/task/{taskId}"]["get"] update: x-codeSamples: @@ -1149,15 +1100,16 @@ actions: source: |- from livepeer import Livepeer - s = Livepeer( + with Livepeer( api_key="", - ) + ) as livepeer: + + res = livepeer.task.get(task_id="") - res = s.task.get(task_id="") + assert res.task is not None - if res.task is not None: - # handle response - pass + # Handle response + print(res.task) - target: $["paths"]["/transcode"]["post"] update: x-codeSamples: @@ -1167,53 +1119,51 @@ actions: from livepeer import Livepeer from livepeer.models import components - s = Livepeer( + with Livepeer( api_key="", - ) - - res = s.transcode.create(request={ - "input": { - "url": "https://s3.amazonaws.com/bucket/file.mp4", - }, - "storage": { - "type": components.StorageType.S3, - "endpoint": "https://gateway.storjshare.io", - "bucket": "outputbucket", - "credentials": { - "access_key_id": "AKIAIOSFODNN7EXAMPLE", - "secret_access_key": "wJalrXUtnFEMI/K7MDENG/bPxRfiCYEXAMPLEKEY", - }, - }, - "outputs": { - "hls": { - "path": "/samplevideo/hls", - }, - "mp4": { - "path": "/samplevideo/mp4", + ) as livepeer: + + res = livepeer.transcode.create(request={ + "input": { + "url": "https://s3.amazonaws.com/bucket/file.mp4", }, - "fmp4": { - "path": "/samplevideo/fmp4", + "storage": { + "type": components.TranscodePayloadStorageType.WEB3_STORAGE, + "credentials": { + "proof": "EaJlcm9vdHOAZ3ZlcnNpb24BmgIBcRIg2uxHpcPYSWNtifMKFkPC7IEDvFDCxCd3ADViv0coV7SnYXNYRO2hA0AnblHEW38s3lSlcwaDjPn", + }, }, - }, - "profiles": [ - { - "width": 1280, - "name": "720p", - "height": 720, - "bitrate": 3000000, - "quality": 23, - "fps": 30, - "fps_den": 1, - "gop": "2", - "profile": components.TranscodeProfileProfile.H264_BASELINE, - "encoder": components.TranscodeProfileEncoder.H_264, + "outputs": { + "hls": { + "path": "/samplevideo/hls", + }, + "mp4": { + "path": "/samplevideo/mp4", + }, + "fmp4": { + "path": "/samplevideo/fmp4", + }, }, - ], - }) + "profiles": [ + { + "width": 1280, + "name": "720p", + "height": 720, + "bitrate": 3000000, + "quality": 23, + "fps": 30, + "fps_den": 1, + "gop": "2", + "profile": components.TranscodeProfileProfile.H264_BASELINE, + "encoder": components.TranscodeProfileEncoder.H_264, + }, + ], + }) + + assert res.task is not None - if res.task is not None: - # handle response - pass + # Handle response + print(res.task) - target: $["paths"]["/webhook"]["get"] update: x-codeSamples: @@ -1222,15 +1172,16 @@ actions: source: |- from livepeer import Livepeer - s = Livepeer( + with Livepeer( api_key="", - ) + ) as livepeer: - res = s.webhook.get_all() + res = livepeer.webhook.get_all() - if res.data is not None: - # handle response - pass + assert res.data is not None + + # Handle response + print(res.data) - target: $["paths"]["/webhook"]["post"] update: x-codeSamples: @@ -1240,25 +1191,26 @@ actions: from livepeer import Livepeer from livepeer.models import components - s = Livepeer( + with Livepeer( api_key="", - ) - - res = s.webhook.create(request={ - "name": "test_webhook", - "project_id": "aac12556-4d65-4d34-9fb6-d1f0985eb0a9", - "events": [ - components.Events.STREAM_STARTED, - components.Events.STREAM_IDLE, - ], - "url": "https://my-service.com/webhook", - "shared_secret": "my-secret", - "stream_id": "de7818e7-610a-4057-8f6f-b785dc1e6f88", - }) - - if res.webhook is not None: - # handle response - pass + ) as livepeer: + + res = livepeer.webhook.create(request={ + "name": "test_webhook", + "project_id": "aac12556-4d65-4d34-9fb6-d1f0985eb0a9", + "events": [ + components.Events.STREAM_STARTED, + components.Events.STREAM_IDLE, + ], + "url": "https://my-service.com/webhook", + "shared_secret": "my-secret", + "stream_id": "de7818e7-610a-4057-8f6f-b785dc1e6f88", + }) + + assert res.webhook is not None + + # Handle response + print(res.webhook) - target: $["paths"]["/webhook/{id}"]["delete"] update: x-codeSamples: @@ -1267,15 +1219,16 @@ actions: source: |- from livepeer import Livepeer - s = Livepeer( + with Livepeer( api_key="", - ) + ) as livepeer: - res = s.webhook.delete(id="") + res = livepeer.webhook.delete(id="") - if res.webhook is not None: - # handle response - pass + assert res.webhook is not None + + # Handle response + print(res.webhook) - target: $["paths"]["/webhook/{id}"]["get"] update: x-codeSamples: @@ -1284,15 +1237,16 @@ actions: source: |- from livepeer import Livepeer - s = Livepeer( + with Livepeer( api_key="", - ) + ) as livepeer: + + res = livepeer.webhook.get(id="") - res = s.webhook.get(id="") + assert res.webhook is not None - if res.webhook is not None: - # handle response - pass + # Handle response + print(res.webhook) - target: $["paths"]["/webhook/{id}"]["put"] update: x-codeSamples: @@ -1302,25 +1256,26 @@ actions: from livepeer import Livepeer from livepeer.models import components - s = Livepeer( + with Livepeer( api_key="", - ) - - res = s.webhook.update(id="", webhook={ - "name": "test_webhook", - "project_id": "aac12556-4d65-4d34-9fb6-d1f0985eb0a9", - "events": [ - components.Events.STREAM_STARTED, - components.Events.STREAM_IDLE, - ], - "url": "https://my-service.com/webhook", - "shared_secret": "my-secret", - "stream_id": "de7818e7-610a-4057-8f6f-b785dc1e6f88", - }) - - if res.webhook is not None: - # handle response - pass + ) as livepeer: + + res = livepeer.webhook.update(id="", webhook={ + "name": "test_webhook", + "project_id": "aac12556-4d65-4d34-9fb6-d1f0985eb0a9", + "events": [ + components.Events.STREAM_STARTED, + components.Events.STREAM_IDLE, + ], + "url": "https://my-service.com/webhook", + "shared_secret": "my-secret", + "stream_id": "de7818e7-610a-4057-8f6f-b785dc1e6f88", + }) + + assert res.webhook is not None + + # Handle response + print(res.webhook) - target: $["paths"]["/webhook/{id}/log"]["get"] update: x-codeSamples: @@ -1329,15 +1284,16 @@ actions: source: |- from livepeer import Livepeer - s = Livepeer( + with Livepeer( api_key="", - ) + ) as livepeer: + + res = livepeer.webhook.get_logs(id="") - res = s.webhook.get_logs(id="") + assert res.data is not None - if res.data is not None: - # handle response - pass + # Handle response + print(res.data) - target: $["paths"]["/webhook/{id}/log/{logId}"]["get"] update: x-codeSamples: @@ -1346,15 +1302,16 @@ actions: source: |- from livepeer import Livepeer - s = Livepeer( + with Livepeer( api_key="", - ) + ) as livepeer: - res = s.webhook.get_log(id="", log_id="") + res = livepeer.webhook.get_log(id="", log_id="") - if res.webhook_log is not None: - # handle response - pass + assert res.webhook_log is not None + + # Handle response + print(res.webhook_log) - target: $["paths"]["/webhook/{id}/log/{logId}/resend"]["post"] update: x-codeSamples: @@ -1363,12 +1320,13 @@ actions: source: |- from livepeer import Livepeer - s = Livepeer( + with Livepeer( api_key="", - ) + ) as livepeer: + + res = livepeer.webhook.resend_log(id="", log_id="") - res = s.webhook.resend_log(id="", log_id="") + assert res.webhook_log is not None - if res.webhook_log is not None: - # handle response - pass + # Handle response + print(res.webhook_log) diff --git a/docs/models/components/asset.md b/docs/models/components/asset.md index 272ffc6..f5b43db 100644 --- a/docs/models/components/asset.md +++ b/docs/models/components/asset.md @@ -12,7 +12,7 @@ | `playback_id` | *Optional[str]* | :heavy_minus_sign: | The playback ID to use with the Playback Info endpoint to retrieve playback URLs. | eaw4nk06ts2d0mzb | | ~~`user_id`~~ | *Optional[str]* | :heavy_minus_sign: | : warning: ** DEPRECATED **: This will be removed in a future release, please migrate away from it as soon as possible. | 66E2161C-7670-4D05-B71D-DA2D6979556F | | `playback_url` | *Optional[str]* | :heavy_minus_sign: | URL for HLS playback. **It is recommended to not use this URL**, and instead use playback IDs with the Playback Info endpoint to retrieve the playback URLs - this URL format is subject to change (e.g. https://livepeercdn.com/asset/ea03f37e-f861-4cdd-b495-0e60b6d753ad/index.m3u8). | https://livepeercdn.com/asset/ea03f37e-f861-4cdd-b495-0e60b6d753ad/index.m3u8 | -| `download_url` | *Optional[str]* | :heavy_minus_sign: | The URL to directly download the asset, e.g. `https://livepeercdn.com/asset/eawrrk06ts2d0mzb/video`. It is not recommended to use this for playback. | https://livepeercdn.com/asset/eaw4nk06ts2d0mzb/video | +| `download_url` | *Optional[str]* | :heavy_minus_sign: | The URL to directly download the asset, e.g. `https://livepeercdn.com/asset/eawrrk06ts2d0mzb/video`. It is not recommended to use this for playback. | https://livepeercdn.com/asset/eaw4nk06ts2d0mzb/video/download.mp4 | | `playback_policy` | [OptionalNullable[components.PlaybackPolicy]](../../models/components/playbackpolicy.md) | :heavy_minus_sign: | Whether the playback policy for an asset or stream is public or signed | | | `creator_id` | [Optional[components.CreatorID]](../../models/components/creatorid.md) | :heavy_minus_sign: | N/A | | | `profiles` | List[[components.TranscodeProfile](../../models/components/transcodeprofile.md)] | :heavy_minus_sign: | Requested profiles for the asset to be transcoded into. Configured
on the upload APIs payload or through the `stream.recordingSpec`
field for recordings. If not specified, default profiles are derived
based on the source input. If this is a recording, the source will
not be present in this list but will be available for playback.
| | diff --git a/docs/models/components/bodygenaudiototext.md b/docs/models/components/bodygenaudiototext.md index 4282b46..a8b04bf 100644 --- a/docs/models/components/bodygenaudiototext.md +++ b/docs/models/components/bodygenaudiototext.md @@ -3,7 +3,8 @@ ## Fields -| Field | Type | Required | Description | -| ---------------------------------------------------- | ---------------------------------------------------- | ---------------------------------------------------- | ---------------------------------------------------- | -| `audio` | [components.Audio](../../models/components/audio.md) | :heavy_check_mark: | Uploaded audio file to be transcribed. | -| `model_id` | *Optional[str]* | :heavy_minus_sign: | Hugging Face model ID used for transcription. | \ No newline at end of file +| Field | Type | Required | Description | +| --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| `audio` | [components.Audio](../../models/components/audio.md) | :heavy_check_mark: | Uploaded audio file to be transcribed. | +| `model_id` | *Optional[str]* | :heavy_minus_sign: | Hugging Face model ID used for transcription. | +| `return_timestamps` | *Optional[str]* | :heavy_minus_sign: | Return timestamps for the transcribed text. Supported values: 'sentence', 'word', or a string boolean ('true' or 'false'). Default is 'true' ('sentence'). 'false' means no timestamps. 'word' means word-based timestamps. | \ No newline at end of file diff --git a/docs/models/components/bodygenimagetoimage.md b/docs/models/components/bodygenimagetoimage.md index d79dc25..b285c88 100644 --- a/docs/models/components/bodygenimagetoimage.md +++ b/docs/models/components/bodygenimagetoimage.md @@ -3,16 +3,17 @@ ## Fields -| Field | Type | Required | Description | -| ------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------ | -| `prompt` | *str* | :heavy_check_mark: | Text prompt(s) to guide image generation. | -| `image` | [components.Image](../../models/components/image.md) | :heavy_check_mark: | Uploaded image to modify with the pipeline. | -| `model_id` | *Optional[str]* | :heavy_minus_sign: | Hugging Face model ID used for image generation. | -| `strength` | *Optional[float]* | :heavy_minus_sign: | Degree of transformation applied to the reference image (0 to 1). | -| `guidance_scale` | *Optional[float]* | :heavy_minus_sign: | Encourages model to generate images closely linked to the text prompt (higher values may reduce image quality). | -| `image_guidance_scale` | *Optional[float]* | :heavy_minus_sign: | Degree to which the generated image is pushed towards the initial image. | -| `negative_prompt` | *Optional[str]* | :heavy_minus_sign: | Text prompt(s) to guide what to exclude from image generation. Ignored if guidance_scale < 1. | -| `safety_check` | *Optional[bool]* | :heavy_minus_sign: | Perform a safety check to estimate if generated images could be offensive or harmful. | -| `seed` | *Optional[int]* | :heavy_minus_sign: | Seed for random number generation. | -| `num_inference_steps` | *Optional[int]* | :heavy_minus_sign: | Number of denoising steps. More steps usually lead to higher quality images but slower inference. Modulated by strength. | -| `num_images_per_prompt` | *Optional[int]* | :heavy_minus_sign: | Number of images to generate per prompt. | \ No newline at end of file +| Field | Type | Required | Description | +| ---------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| `prompt` | *str* | :heavy_check_mark: | Text prompt(s) to guide image generation. | +| `image` | [components.Image](../../models/components/image.md) | :heavy_check_mark: | Uploaded image to modify with the pipeline. | +| `model_id` | *Optional[str]* | :heavy_minus_sign: | Hugging Face model ID used for image generation. | +| `loras` | *Optional[str]* | :heavy_minus_sign: | A LoRA (Low-Rank Adaptation) model and its corresponding weight for image generation. Example: { "latent-consistency/lcm-lora-sdxl": 1.0, "nerijs/pixel-art-xl": 1.2}. | +| `strength` | *Optional[float]* | :heavy_minus_sign: | Degree of transformation applied to the reference image (0 to 1). | +| `guidance_scale` | *Optional[float]* | :heavy_minus_sign: | Encourages model to generate images closely linked to the text prompt (higher values may reduce image quality). | +| `image_guidance_scale` | *Optional[float]* | :heavy_minus_sign: | Degree to which the generated image is pushed towards the initial image. | +| `negative_prompt` | *Optional[str]* | :heavy_minus_sign: | Text prompt(s) to guide what to exclude from image generation. Ignored if guidance_scale < 1. | +| `safety_check` | *Optional[bool]* | :heavy_minus_sign: | Perform a safety check to estimate if generated images could be offensive or harmful. | +| `seed` | *Optional[int]* | :heavy_minus_sign: | Seed for random number generation. | +| `num_inference_steps` | *Optional[int]* | :heavy_minus_sign: | Number of denoising steps. More steps usually lead to higher quality images but slower inference. Modulated by strength. | +| `num_images_per_prompt` | *Optional[int]* | :heavy_minus_sign: | Number of images to generate per prompt. | \ No newline at end of file diff --git a/docs/models/components/bodygenllm.md b/docs/models/components/bodygenllm.md new file mode 100644 index 0000000..5bbdda0 --- /dev/null +++ b/docs/models/components/bodygenllm.md @@ -0,0 +1,14 @@ +# BodyGenLLM + + +## Fields + +| Field | Type | Required | Description | +| ------------------ | ------------------ | ------------------ | ------------------ | +| `prompt` | *str* | :heavy_check_mark: | N/A | +| `model_id` | *Optional[str]* | :heavy_minus_sign: | N/A | +| `system_msg` | *Optional[str]* | :heavy_minus_sign: | N/A | +| `temperature` | *Optional[float]* | :heavy_minus_sign: | N/A | +| `max_tokens` | *Optional[int]* | :heavy_minus_sign: | N/A | +| `history` | *Optional[str]* | :heavy_minus_sign: | N/A | +| `stream` | *Optional[bool]* | :heavy_minus_sign: | N/A | \ No newline at end of file diff --git a/docs/models/components/encryption.md b/docs/models/components/encryption.md new file mode 100644 index 0000000..842a353 --- /dev/null +++ b/docs/models/components/encryption.md @@ -0,0 +1,8 @@ +# Encryption + + +## Fields + +| Field | Type | Required | Description | +| ------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------- | +| `encrypted_key` | *str* | :heavy_check_mark: | Encryption key used to encrypt the asset. Only writable in the upload asset endpoints and cannot be retrieved back. | \ No newline at end of file diff --git a/docs/models/components/error.md b/docs/models/components/error.md new file mode 100644 index 0000000..729723b --- /dev/null +++ b/docs/models/components/error.md @@ -0,0 +1,8 @@ +# Error + + +## Fields + +| Field | Type | Required | Description | +| ------------------ | ------------------ | ------------------ | ------------------ | +| `errors` | List[*str*] | :heavy_minus_sign: | N/A | \ No newline at end of file diff --git a/docs/models/components/llmresponse.md b/docs/models/components/llmresponse.md new file mode 100644 index 0000000..d7c47f6 --- /dev/null +++ b/docs/models/components/llmresponse.md @@ -0,0 +1,9 @@ +# LLMResponse + + +## Fields + +| Field | Type | Required | Description | +| ------------------ | ------------------ | ------------------ | ------------------ | +| `response` | *str* | :heavy_check_mark: | N/A | +| `tokens_used` | *int* | :heavy_check_mark: | N/A | \ No newline at end of file diff --git a/docs/models/components/multistreamtargetinput.md b/docs/models/components/multistreamtargetinput.md new file mode 100644 index 0000000..5b56627 --- /dev/null +++ b/docs/models/components/multistreamtargetinput.md @@ -0,0 +1,10 @@ +# MultistreamTargetInput + + +## Fields + +| Field | Type | Required | Description | Example | +| --------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------- | +| `url` | *str* | :heavy_check_mark: | Livepeer-compatible multistream target URL (RTMP(S) or SRT) | rtmps://live.my-service.tv/channel/secretKey | +| `name` | *Optional[str]* | :heavy_minus_sign: | N/A | | +| `disabled` | *Optional[bool]* | :heavy_minus_sign: | If true then this multistream target will not be used for pushing
even if it is configured in a stream object.
| | \ No newline at end of file diff --git a/docs/models/components/streampatchpayload.md b/docs/models/components/streampatchpayload.md index 224d447..0ecaa73 100644 --- a/docs/models/components/streampatchpayload.md +++ b/docs/models/components/streampatchpayload.md @@ -12,4 +12,5 @@ | `playback_policy` | [OptionalNullable[components.PlaybackPolicy]](../../models/components/playbackpolicy.md) | :heavy_minus_sign: | Whether the playback policy for an asset or stream is public or signed | | | `profiles` | List[[components.FfmpegProfile](../../models/components/ffmpegprofile.md)] | :heavy_minus_sign: | N/A | | | `recording_spec` | [Optional[components.RecordingSpec]](../../models/components/recordingspec.md) | :heavy_minus_sign: | N/A | | -| `user_tags` | Dict[str, [components.UserTags](../../models/components/usertags.md)] | :heavy_minus_sign: | User input tags associated with the stream | | \ No newline at end of file +| `user_tags` | Dict[str, [components.UserTags](../../models/components/usertags.md)] | :heavy_minus_sign: | User input tags associated with the stream | | +| `name` | *Optional[str]* | :heavy_minus_sign: | N/A | test_stream | \ No newline at end of file diff --git a/docs/models/components/studioapierror.md b/docs/models/components/studioapierror.md new file mode 100644 index 0000000..78fcb46 --- /dev/null +++ b/docs/models/components/studioapierror.md @@ -0,0 +1,9 @@ +# StudioAPIError + + +## Fields + +| Field | Type | Required | Description | +| ------------------------------------------------------------------ | ------------------------------------------------------------------ | ------------------------------------------------------------------ | ------------------------------------------------------------------ | +| `http_meta` | [components.HTTPMetadata](../../models/components/httpmetadata.md) | :heavy_check_mark: | N/A | +| `errors` | List[*str*] | :heavy_minus_sign: | N/A | \ No newline at end of file diff --git a/docs/models/components/target.md b/docs/models/components/target.md new file mode 100644 index 0000000..6538f8c --- /dev/null +++ b/docs/models/components/target.md @@ -0,0 +1,11 @@ +# Target + + +## Fields + +| Field | Type | Required | Description | Example | +| ------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------ | +| `profile` | *str* | :heavy_check_mark: | Name of transcoding profile that should be sent. Use
"source" for pushing source stream data
| 720p0 | +| `video_only` | *Optional[bool]* | :heavy_minus_sign: | If true, the stream audio will be muted and only silent
video will be pushed to the target.
| false | +| `id` | *Optional[str]* | :heavy_minus_sign: | ID of multistream target object where to push this stream | PUSH123 | +| `spec` | [Optional[components.TargetSpec]](../../models/components/targetspec.md) | :heavy_minus_sign: | Inline multistream target object. Will automatically
create the target resource to be used by the created
stream.
| | \ No newline at end of file diff --git a/docs/models/components/texttoimageparams.md b/docs/models/components/texttoimageparams.md index 4f55bb0..7abc04d 100644 --- a/docs/models/components/texttoimageparams.md +++ b/docs/models/components/texttoimageparams.md @@ -3,15 +3,16 @@ ## Fields -| Field | Type | Required | Description | -| ------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------ | -| `prompt` | *str* | :heavy_check_mark: | Text prompt(s) to guide image generation. Separate multiple prompts with '\|' if supported by the model. | -| `model_id` | *Optional[str]* | :heavy_minus_sign: | Hugging Face model ID used for image generation. | -| `height` | *Optional[int]* | :heavy_minus_sign: | The height in pixels of the generated image. | -| `width` | *Optional[int]* | :heavy_minus_sign: | The width in pixels of the generated image. | -| `guidance_scale` | *Optional[float]* | :heavy_minus_sign: | Encourages model to generate images closely linked to the text prompt (higher values may reduce image quality). | -| `negative_prompt` | *Optional[str]* | :heavy_minus_sign: | Text prompt(s) to guide what to exclude from image generation. Ignored if guidance_scale < 1. | -| `safety_check` | *Optional[bool]* | :heavy_minus_sign: | Perform a safety check to estimate if generated images could be offensive or harmful. | -| `seed` | *Optional[int]* | :heavy_minus_sign: | Seed for random number generation. | -| `num_inference_steps` | *Optional[int]* | :heavy_minus_sign: | Number of denoising steps. More steps usually lead to higher quality images but slower inference. Modulated by strength. | -| `num_images_per_prompt` | *Optional[int]* | :heavy_minus_sign: | Number of images to generate per prompt. | \ No newline at end of file +| Field | Type | Required | Description | +| ---------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| `prompt` | *str* | :heavy_check_mark: | Text prompt(s) to guide image generation. Separate multiple prompts with '\|' if supported by the model. | +| `model_id` | *Optional[str]* | :heavy_minus_sign: | Hugging Face model ID used for image generation. | +| `loras` | *Optional[str]* | :heavy_minus_sign: | A LoRA (Low-Rank Adaptation) model and its corresponding weight for image generation. Example: { "latent-consistency/lcm-lora-sdxl": 1.0, "nerijs/pixel-art-xl": 1.2}. | +| `height` | *Optional[int]* | :heavy_minus_sign: | The height in pixels of the generated image. | +| `width` | *Optional[int]* | :heavy_minus_sign: | The width in pixels of the generated image. | +| `guidance_scale` | *Optional[float]* | :heavy_minus_sign: | Encourages model to generate images closely linked to the text prompt (higher values may reduce image quality). | +| `negative_prompt` | *Optional[str]* | :heavy_minus_sign: | Text prompt(s) to guide what to exclude from image generation. Ignored if guidance_scale < 1. | +| `safety_check` | *Optional[bool]* | :heavy_minus_sign: | Perform a safety check to estimate if generated images could be offensive or harmful. | +| `seed` | *Optional[int]* | :heavy_minus_sign: | Seed for random number generation. | +| `num_inference_steps` | *Optional[int]* | :heavy_minus_sign: | Number of denoising steps. More steps usually lead to higher quality images but slower inference. Modulated by strength. | +| `num_images_per_prompt` | *Optional[int]* | :heavy_minus_sign: | Number of images to generate per prompt. | \ No newline at end of file diff --git a/docs/models/components/videospec.md b/docs/models/components/videospec.md index 656075c..a0f70b7 100644 --- a/docs/models/components/videospec.md +++ b/docs/models/components/videospec.md @@ -7,7 +7,7 @@ Video metadata | Field | Type | Required | Description | Example | | -------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------- | -| `format` | *Optional[str]* | :heavy_minus_sign: | Format of the asset | mp4 | +| `format_` | *Optional[str]* | :heavy_minus_sign: | Format of the asset | mp4 | | `duration` | *Optional[float]* | :heavy_minus_sign: | Duration of the asset in seconds (float) | 23.8328 | | `bitrate` | *Optional[float]* | :heavy_minus_sign: | Bitrate of the video in bits per second | 1000000 | | `tracks` | List[[components.Tracks](../../models/components/tracks.md)] | :heavy_minus_sign: | List of tracks associated with the asset when the format
contemplates them (e.g. mp4)
| | \ No newline at end of file diff --git a/docs/models/components/webhookinput.md b/docs/models/components/webhookinput.md new file mode 100644 index 0000000..6333279 --- /dev/null +++ b/docs/models/components/webhookinput.md @@ -0,0 +1,13 @@ +# WebhookInput + + +## Fields + +| Field | Type | Required | Description | Example | +| ------------------------------------------------------------ | ------------------------------------------------------------ | ------------------------------------------------------------ | ------------------------------------------------------------ | ------------------------------------------------------------ | +| `name` | *str* | :heavy_check_mark: | N/A | test_webhook | +| `url` | *str* | :heavy_check_mark: | N/A | https://my-service.com/webhook | +| `project_id` | *Optional[str]* | :heavy_minus_sign: | The ID of the project | aac12556-4d65-4d34-9fb6-d1f0985eb0a9 | +| `events` | List[[components.Events](../../models/components/events.md)] | :heavy_minus_sign: | N/A | [
"stream.started",
"stream.idle"
] | +| `shared_secret` | *Optional[str]* | :heavy_minus_sign: | shared secret used to sign the webhook payload | my-secret | +| `stream_id` | *Optional[str]* | :heavy_minus_sign: | streamId of the stream on which the webhook is applied | de7818e7-610a-4057-8f6f-b785dc1e6f88 | \ No newline at end of file diff --git a/docs/models/errors/genaudiototextgenerateresponse415responsebody.md b/docs/models/errors/genaudiototextgenerateresponse415responsebody.md new file mode 100644 index 0000000..afc456d --- /dev/null +++ b/docs/models/errors/genaudiototextgenerateresponse415responsebody.md @@ -0,0 +1,19 @@ +# GenAudioToTextGenerateResponse415ResponseBody + +Unsupported Media Type + + +## Supported Types + +### `errors.HTTPError` + +```python +value: errors.HTTPError = /* values here */ +``` + +### `errors.StudioAPIError` + +```python +value: errors.StudioAPIError = /* values here */ +``` + diff --git a/docs/models/errors/genllmgenerateresponse500responsebody.md b/docs/models/errors/genllmgenerateresponse500responsebody.md new file mode 100644 index 0000000..235175c --- /dev/null +++ b/docs/models/errors/genllmgenerateresponse500responsebody.md @@ -0,0 +1,19 @@ +# GenLLMGenerateResponse500ResponseBody + +Internal Server Error + + +## Supported Types + +### `errors.HTTPError` + +```python +value: errors.HTTPError = /* values here */ +``` + +### `errors.StudioAPIError` + +```python +value: errors.StudioAPIError = /* values here */ +``` + diff --git a/docs/models/errors/genllmgenerateresponsebody.md b/docs/models/errors/genllmgenerateresponsebody.md new file mode 100644 index 0000000..281a7c3 --- /dev/null +++ b/docs/models/errors/genllmgenerateresponsebody.md @@ -0,0 +1,19 @@ +# GenLLMGenerateResponseBody + +Unauthorized + + +## Supported Types + +### `errors.HTTPError` + +```python +value: errors.HTTPError = /* values here */ +``` + +### `errors.StudioAPIError` + +```python +value: errors.StudioAPIError = /* values here */ +``` + diff --git a/docs/models/errors/genllmgenerateresponseresponsebody.md b/docs/models/errors/genllmgenerateresponseresponsebody.md new file mode 100644 index 0000000..d429c4e --- /dev/null +++ b/docs/models/errors/genllmgenerateresponseresponsebody.md @@ -0,0 +1,19 @@ +# GenLLMGenerateResponseResponseBody + +Validation Error + + +## Supported Types + +### `errors.HTTPValidationError` + +```python +value: errors.HTTPValidationError = /* values here */ +``` + +### `errors.StudioAPIError` + +```python +value: errors.StudioAPIError = /* values here */ +``` + diff --git a/docs/models/errors/genllmresponsebody.md b/docs/models/errors/genllmresponsebody.md new file mode 100644 index 0000000..7b9455f --- /dev/null +++ b/docs/models/errors/genllmresponsebody.md @@ -0,0 +1,19 @@ +# GenLLMResponseBody + +Bad Request + + +## Supported Types + +### `errors.HTTPError` + +```python +value: errors.HTTPError = /* values here */ +``` + +### `errors.StudioAPIError` + +```python +value: errors.StudioAPIError = /* values here */ +``` + diff --git a/docs/models/errors/httperror.md b/docs/models/errors/httperror.md index 41b434c..824e580 100644 --- a/docs/models/errors/httperror.md +++ b/docs/models/errors/httperror.md @@ -8,22 +8,4 @@ HTTP error response model. | Field | Type | Required | Description | | ------------------------------------------------------------------ | ------------------------------------------------------------------ | ------------------------------------------------------------------ | ------------------------------------------------------------------ | | `detail` | [components.APIError](../../models/components/apierror.md) | :heavy_check_mark: | Detailed error information. | -| `http_meta` | [components.HTTPMetadata](../../models/components/httpmetadata.md) | :heavy_check_mark: | N/A | -| `http_meta1` | [components.HTTPMetadata](../../models/components/httpmetadata.md) | :heavy_check_mark: | N/A | -| `http_meta2` | [components.HTTPMetadata](../../models/components/httpmetadata.md) | :heavy_check_mark: | N/A | -| `http_meta3` | [components.HTTPMetadata](../../models/components/httpmetadata.md) | :heavy_check_mark: | N/A | -| `http_meta4` | [components.HTTPMetadata](../../models/components/httpmetadata.md) | :heavy_check_mark: | N/A | -| `http_meta5` | [components.HTTPMetadata](../../models/components/httpmetadata.md) | :heavy_check_mark: | N/A | -| `http_meta6` | [components.HTTPMetadata](../../models/components/httpmetadata.md) | :heavy_check_mark: | N/A | -| `http_meta7` | [components.HTTPMetadata](../../models/components/httpmetadata.md) | :heavy_check_mark: | N/A | -| `http_meta8` | [components.HTTPMetadata](../../models/components/httpmetadata.md) | :heavy_check_mark: | N/A | -| `http_meta9` | [components.HTTPMetadata](../../models/components/httpmetadata.md) | :heavy_check_mark: | N/A | -| `http_meta10` | [components.HTTPMetadata](../../models/components/httpmetadata.md) | :heavy_check_mark: | N/A | -| `http_meta11` | [components.HTTPMetadata](../../models/components/httpmetadata.md) | :heavy_check_mark: | N/A | -| `http_meta12` | [components.HTTPMetadata](../../models/components/httpmetadata.md) | :heavy_check_mark: | N/A | -| `http_meta13` | [components.HTTPMetadata](../../models/components/httpmetadata.md) | :heavy_check_mark: | N/A | -| `http_meta14` | [components.HTTPMetadata](../../models/components/httpmetadata.md) | :heavy_check_mark: | N/A | -| `http_meta15` | [components.HTTPMetadata](../../models/components/httpmetadata.md) | :heavy_check_mark: | N/A | -| `http_meta16` | [components.HTTPMetadata](../../models/components/httpmetadata.md) | :heavy_check_mark: | N/A | -| `http_meta17` | [components.HTTPMetadata](../../models/components/httpmetadata.md) | :heavy_check_mark: | N/A | -| `http_meta18` | [components.HTTPMetadata](../../models/components/httpmetadata.md) | :heavy_check_mark: | N/A | \ No newline at end of file +| `http_meta` | [components.HTTPMetadata](../../models/components/httpmetadata.md) | :heavy_check_mark: | N/A | \ No newline at end of file diff --git a/docs/models/errors/httpvalidationerror.md b/docs/models/errors/httpvalidationerror.md index cdabf14..b94283a 100644 --- a/docs/models/errors/httpvalidationerror.md +++ b/docs/models/errors/httpvalidationerror.md @@ -6,9 +6,4 @@ | Field | Type | Required | Description | | ------------------------------------------------------------------------------ | ------------------------------------------------------------------------------ | ------------------------------------------------------------------------------ | ------------------------------------------------------------------------------ | | `http_meta` | [components.HTTPMetadata](../../models/components/httpmetadata.md) | :heavy_check_mark: | N/A | -| `http_meta1` | [components.HTTPMetadata](../../models/components/httpmetadata.md) | :heavy_check_mark: | N/A | -| `http_meta2` | [components.HTTPMetadata](../../models/components/httpmetadata.md) | :heavy_check_mark: | N/A | -| `http_meta3` | [components.HTTPMetadata](../../models/components/httpmetadata.md) | :heavy_check_mark: | N/A | -| `http_meta4` | [components.HTTPMetadata](../../models/components/httpmetadata.md) | :heavy_check_mark: | N/A | -| `http_meta5` | [components.HTTPMetadata](../../models/components/httpmetadata.md) | :heavy_check_mark: | N/A | | `detail` | List[[components.ValidationError](../../models/components/validationerror.md)] | :heavy_minus_sign: | N/A | \ No newline at end of file diff --git a/docs/models/errors/studioapierror.md b/docs/models/errors/studioapierror.md index cfab96a..78fcb46 100644 --- a/docs/models/errors/studioapierror.md +++ b/docs/models/errors/studioapierror.md @@ -1,35 +1,9 @@ # StudioAPIError -Error - ## Fields | Field | Type | Required | Description | | ------------------------------------------------------------------ | ------------------------------------------------------------------ | ------------------------------------------------------------------ | ------------------------------------------------------------------ | | `http_meta` | [components.HTTPMetadata](../../models/components/httpmetadata.md) | :heavy_check_mark: | N/A | -| `http_meta1` | [components.HTTPMetadata](../../models/components/httpmetadata.md) | :heavy_check_mark: | N/A | -| `http_meta2` | [components.HTTPMetadata](../../models/components/httpmetadata.md) | :heavy_check_mark: | N/A | -| `http_meta3` | [components.HTTPMetadata](../../models/components/httpmetadata.md) | :heavy_check_mark: | N/A | -| `http_meta4` | [components.HTTPMetadata](../../models/components/httpmetadata.md) | :heavy_check_mark: | N/A | -| `http_meta5` | [components.HTTPMetadata](../../models/components/httpmetadata.md) | :heavy_check_mark: | N/A | -| `http_meta6` | [components.HTTPMetadata](../../models/components/httpmetadata.md) | :heavy_check_mark: | N/A | -| `http_meta7` | [components.HTTPMetadata](../../models/components/httpmetadata.md) | :heavy_check_mark: | N/A | -| `http_meta8` | [components.HTTPMetadata](../../models/components/httpmetadata.md) | :heavy_check_mark: | N/A | -| `http_meta9` | [components.HTTPMetadata](../../models/components/httpmetadata.md) | :heavy_check_mark: | N/A | -| `http_meta10` | [components.HTTPMetadata](../../models/components/httpmetadata.md) | :heavy_check_mark: | N/A | -| `http_meta11` | [components.HTTPMetadata](../../models/components/httpmetadata.md) | :heavy_check_mark: | N/A | -| `http_meta12` | [components.HTTPMetadata](../../models/components/httpmetadata.md) | :heavy_check_mark: | N/A | -| `http_meta13` | [components.HTTPMetadata](../../models/components/httpmetadata.md) | :heavy_check_mark: | N/A | -| `http_meta14` | [components.HTTPMetadata](../../models/components/httpmetadata.md) | :heavy_check_mark: | N/A | -| `http_meta15` | [components.HTTPMetadata](../../models/components/httpmetadata.md) | :heavy_check_mark: | N/A | -| `http_meta16` | [components.HTTPMetadata](../../models/components/httpmetadata.md) | :heavy_check_mark: | N/A | -| `http_meta17` | [components.HTTPMetadata](../../models/components/httpmetadata.md) | :heavy_check_mark: | N/A | -| `http_meta18` | [components.HTTPMetadata](../../models/components/httpmetadata.md) | :heavy_check_mark: | N/A | -| `http_meta19` | [components.HTTPMetadata](../../models/components/httpmetadata.md) | :heavy_check_mark: | N/A | -| `http_meta20` | [components.HTTPMetadata](../../models/components/httpmetadata.md) | :heavy_check_mark: | N/A | -| `http_meta21` | [components.HTTPMetadata](../../models/components/httpmetadata.md) | :heavy_check_mark: | N/A | -| `http_meta22` | [components.HTTPMetadata](../../models/components/httpmetadata.md) | :heavy_check_mark: | N/A | -| `http_meta23` | [components.HTTPMetadata](../../models/components/httpmetadata.md) | :heavy_check_mark: | N/A | -| `http_meta24` | [components.HTTPMetadata](../../models/components/httpmetadata.md) | :heavy_check_mark: | N/A | | `errors` | List[*str*] | :heavy_minus_sign: | N/A | \ No newline at end of file diff --git a/docs/models/operations/addmultistreamtargetresponse.md b/docs/models/operations/addmultistreamtargetresponse.md index cd8014c..3a7717f 100644 --- a/docs/models/operations/addmultistreamtargetresponse.md +++ b/docs/models/operations/addmultistreamtargetresponse.md @@ -6,4 +6,4 @@ | Field | Type | Required | Description | | ------------------------------------------------------------------ | ------------------------------------------------------------------ | ------------------------------------------------------------------ | ------------------------------------------------------------------ | | `http_meta` | [components.HTTPMetadata](../../models/components/httpmetadata.md) | :heavy_check_mark: | N/A | -| `error` | *Optional[errors.Error]* | :heavy_minus_sign: | Error | \ No newline at end of file +| `error` | [Optional[components.Error]](../../models/components/error.md) | :heavy_minus_sign: | Error | \ No newline at end of file diff --git a/docs/models/operations/createclipresponse.md b/docs/models/operations/createclipresponse.md index 612da92..b7a6f19 100644 --- a/docs/models/operations/createclipresponse.md +++ b/docs/models/operations/createclipresponse.md @@ -7,4 +7,4 @@ | -------------------------------------------------------------------------------- | -------------------------------------------------------------------------------- | -------------------------------------------------------------------------------- | -------------------------------------------------------------------------------- | | `http_meta` | [components.HTTPMetadata](../../models/components/httpmetadata.md) | :heavy_check_mark: | N/A | | `data` | [Optional[operations.CreateClipData]](../../models/operations/createclipdata.md) | :heavy_minus_sign: | Success | -| `error` | *Optional[errors.Error]* | :heavy_minus_sign: | Error | \ No newline at end of file +| `error` | [Optional[components.Error]](../../models/components/error.md) | :heavy_minus_sign: | Error | \ No newline at end of file diff --git a/docs/models/operations/createmultistreamtargetresponse.md b/docs/models/operations/createmultistreamtargetresponse.md index 3897522..7b5d2b9 100644 --- a/docs/models/operations/createmultistreamtargetresponse.md +++ b/docs/models/operations/createmultistreamtargetresponse.md @@ -7,4 +7,4 @@ | -------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------- | | `http_meta` | [components.HTTPMetadata](../../models/components/httpmetadata.md) | :heavy_check_mark: | N/A | | `multistream_target` | [Optional[components.MultistreamTarget]](../../models/components/multistreamtarget.md) | :heavy_minus_sign: | Success | -| `error` | *Optional[errors.Error]* | :heavy_minus_sign: | Error | \ No newline at end of file +| `error` | [Optional[components.Error]](../../models/components/error.md) | :heavy_minus_sign: | Error | \ No newline at end of file diff --git a/docs/models/operations/createroomresponse.md b/docs/models/operations/createroomresponse.md index 9d49675..740fa23 100644 --- a/docs/models/operations/createroomresponse.md +++ b/docs/models/operations/createroomresponse.md @@ -7,4 +7,4 @@ | ---------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------- | | `http_meta` | [components.HTTPMetadata](../../models/components/httpmetadata.md) | :heavy_check_mark: | N/A | | `create_room_response` | [Optional[components.CreateRoomResponse]](../../models/components/createroomresponse.md) | :heavy_minus_sign: | Success | -| `error` | *Optional[errors.Error]* | :heavy_minus_sign: | Error | \ No newline at end of file +| `error` | [Optional[components.Error]](../../models/components/error.md) | :heavy_minus_sign: | Error | \ No newline at end of file diff --git a/docs/models/operations/createroomuserresponse.md b/docs/models/operations/createroomuserresponse.md index 461d902..5b24a0a 100644 --- a/docs/models/operations/createroomuserresponse.md +++ b/docs/models/operations/createroomuserresponse.md @@ -7,4 +7,4 @@ | ------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------ | | `http_meta` | [components.HTTPMetadata](../../models/components/httpmetadata.md) | :heavy_check_mark: | N/A | | `room_user_response` | [Optional[components.RoomUserResponse]](../../models/components/roomuserresponse.md) | :heavy_minus_sign: | Success | -| `error` | *Optional[errors.Error]* | :heavy_minus_sign: | Error | \ No newline at end of file +| `error` | [Optional[components.Error]](../../models/components/error.md) | :heavy_minus_sign: | Error | \ No newline at end of file diff --git a/docs/models/operations/createsigningkeyresponse.md b/docs/models/operations/createsigningkeyresponse.md index 4e018a3..b9973e7 100644 --- a/docs/models/operations/createsigningkeyresponse.md +++ b/docs/models/operations/createsigningkeyresponse.md @@ -7,4 +7,4 @@ | ------------------------------------------------------------------------ | ------------------------------------------------------------------------ | ------------------------------------------------------------------------ | ------------------------------------------------------------------------ | | `http_meta` | [components.HTTPMetadata](../../models/components/httpmetadata.md) | :heavy_check_mark: | N/A | | `signing_key` | [Optional[components.SigningKey]](../../models/components/signingkey.md) | :heavy_minus_sign: | Success | -| `error` | *Optional[errors.Error]* | :heavy_minus_sign: | Error | \ No newline at end of file +| `error` | [Optional[components.Error]](../../models/components/error.md) | :heavy_minus_sign: | Error | \ No newline at end of file diff --git a/docs/models/operations/createstreamresponse.md b/docs/models/operations/createstreamresponse.md index 1482751..76b164e 100644 --- a/docs/models/operations/createstreamresponse.md +++ b/docs/models/operations/createstreamresponse.md @@ -7,4 +7,4 @@ | ------------------------------------------------------------------ | ------------------------------------------------------------------ | ------------------------------------------------------------------ | ------------------------------------------------------------------ | | `http_meta` | [components.HTTPMetadata](../../models/components/httpmetadata.md) | :heavy_check_mark: | N/A | | `stream` | [Optional[components.Stream]](../../models/components/stream.md) | :heavy_minus_sign: | Success | -| `error` | *Optional[errors.Error]* | :heavy_minus_sign: | Error | \ No newline at end of file +| `error` | [Optional[components.Error]](../../models/components/error.md) | :heavy_minus_sign: | Error | \ No newline at end of file diff --git a/docs/models/operations/createwebhookresponse.md b/docs/models/operations/createwebhookresponse.md index 08542a4..00f69bb 100644 --- a/docs/models/operations/createwebhookresponse.md +++ b/docs/models/operations/createwebhookresponse.md @@ -7,4 +7,4 @@ | ------------------------------------------------------------------ | ------------------------------------------------------------------ | ------------------------------------------------------------------ | ------------------------------------------------------------------ | | `http_meta` | [components.HTTPMetadata](../../models/components/httpmetadata.md) | :heavy_check_mark: | N/A | | `webhook` | [Optional[components.Webhook]](../../models/components/webhook.md) | :heavy_minus_sign: | Success | -| `error` | *Optional[errors.Error]* | :heavy_minus_sign: | Error | \ No newline at end of file +| `error` | [Optional[components.Error]](../../models/components/error.md) | :heavy_minus_sign: | Error | \ No newline at end of file diff --git a/docs/models/operations/deleteassetresponse.md b/docs/models/operations/deleteassetresponse.md index 90e5945..a18c72a 100644 --- a/docs/models/operations/deleteassetresponse.md +++ b/docs/models/operations/deleteassetresponse.md @@ -6,4 +6,4 @@ | Field | Type | Required | Description | | ------------------------------------------------------------------ | ------------------------------------------------------------------ | ------------------------------------------------------------------ | ------------------------------------------------------------------ | | `http_meta` | [components.HTTPMetadata](../../models/components/httpmetadata.md) | :heavy_check_mark: | N/A | -| `error` | *Optional[errors.Error]* | :heavy_minus_sign: | Error | \ No newline at end of file +| `error` | [Optional[components.Error]](../../models/components/error.md) | :heavy_minus_sign: | Error | \ No newline at end of file diff --git a/docs/models/operations/deletemultistreamtargetresponse.md b/docs/models/operations/deletemultistreamtargetresponse.md index d0dcf8b..281d88c 100644 --- a/docs/models/operations/deletemultistreamtargetresponse.md +++ b/docs/models/operations/deletemultistreamtargetresponse.md @@ -6,4 +6,4 @@ | Field | Type | Required | Description | | ------------------------------------------------------------------ | ------------------------------------------------------------------ | ------------------------------------------------------------------ | ------------------------------------------------------------------ | | `http_meta` | [components.HTTPMetadata](../../models/components/httpmetadata.md) | :heavy_check_mark: | N/A | -| `error` | *Optional[errors.Error]* | :heavy_minus_sign: | Error | \ No newline at end of file +| `error` | [Optional[components.Error]](../../models/components/error.md) | :heavy_minus_sign: | Error | \ No newline at end of file diff --git a/docs/models/operations/deleteroomresponse.md b/docs/models/operations/deleteroomresponse.md index a3a9298..03808e0 100644 --- a/docs/models/operations/deleteroomresponse.md +++ b/docs/models/operations/deleteroomresponse.md @@ -6,4 +6,4 @@ | Field | Type | Required | Description | | ------------------------------------------------------------------ | ------------------------------------------------------------------ | ------------------------------------------------------------------ | ------------------------------------------------------------------ | | `http_meta` | [components.HTTPMetadata](../../models/components/httpmetadata.md) | :heavy_check_mark: | N/A | -| `error` | *Optional[errors.Error]* | :heavy_minus_sign: | Error | \ No newline at end of file +| `error` | [Optional[components.Error]](../../models/components/error.md) | :heavy_minus_sign: | Error | \ No newline at end of file diff --git a/docs/models/operations/deleteroomuserresponse.md b/docs/models/operations/deleteroomuserresponse.md index 9e8085d..587064c 100644 --- a/docs/models/operations/deleteroomuserresponse.md +++ b/docs/models/operations/deleteroomuserresponse.md @@ -6,4 +6,4 @@ | Field | Type | Required | Description | | ------------------------------------------------------------------ | ------------------------------------------------------------------ | ------------------------------------------------------------------ | ------------------------------------------------------------------ | | `http_meta` | [components.HTTPMetadata](../../models/components/httpmetadata.md) | :heavy_check_mark: | N/A | -| `error` | *Optional[errors.Error]* | :heavy_minus_sign: | Error | \ No newline at end of file +| `error` | [Optional[components.Error]](../../models/components/error.md) | :heavy_minus_sign: | Error | \ No newline at end of file diff --git a/docs/models/operations/deletesigningkeyresponse.md b/docs/models/operations/deletesigningkeyresponse.md index e1758fe..2638362 100644 --- a/docs/models/operations/deletesigningkeyresponse.md +++ b/docs/models/operations/deletesigningkeyresponse.md @@ -6,4 +6,4 @@ | Field | Type | Required | Description | | ------------------------------------------------------------------ | ------------------------------------------------------------------ | ------------------------------------------------------------------ | ------------------------------------------------------------------ | | `http_meta` | [components.HTTPMetadata](../../models/components/httpmetadata.md) | :heavy_check_mark: | N/A | -| `error` | *Optional[errors.Error]* | :heavy_minus_sign: | Error | \ No newline at end of file +| `error` | [Optional[components.Error]](../../models/components/error.md) | :heavy_minus_sign: | Error | \ No newline at end of file diff --git a/docs/models/operations/deletestreamresponse.md b/docs/models/operations/deletestreamresponse.md index 3fd0726..6f57f2c 100644 --- a/docs/models/operations/deletestreamresponse.md +++ b/docs/models/operations/deletestreamresponse.md @@ -6,4 +6,4 @@ | Field | Type | Required | Description | | ------------------------------------------------------------------ | ------------------------------------------------------------------ | ------------------------------------------------------------------ | ------------------------------------------------------------------ | | `http_meta` | [components.HTTPMetadata](../../models/components/httpmetadata.md) | :heavy_check_mark: | N/A | -| `error` | *Optional[errors.Error]* | :heavy_minus_sign: | Error | \ No newline at end of file +| `error` | [Optional[components.Error]](../../models/components/error.md) | :heavy_minus_sign: | Error | \ No newline at end of file diff --git a/docs/models/operations/deletewebhookresponse.md b/docs/models/operations/deletewebhookresponse.md index 04ff0b6..7282e3f 100644 --- a/docs/models/operations/deletewebhookresponse.md +++ b/docs/models/operations/deletewebhookresponse.md @@ -7,4 +7,4 @@ | ------------------------------------------------------------------ | ------------------------------------------------------------------ | ------------------------------------------------------------------ | ------------------------------------------------------------------ | | `http_meta` | [components.HTTPMetadata](../../models/components/httpmetadata.md) | :heavy_check_mark: | N/A | | `webhook` | [Optional[components.Webhook]](../../models/components/webhook.md) | :heavy_minus_sign: | Success | -| `error` | *Optional[errors.Error]* | :heavy_minus_sign: | Error | \ No newline at end of file +| `error` | [Optional[components.Error]](../../models/components/error.md) | :heavy_minus_sign: | Error | \ No newline at end of file diff --git a/docs/models/operations/genllmresponse.md b/docs/models/operations/genllmresponse.md new file mode 100644 index 0000000..b72751b --- /dev/null +++ b/docs/models/operations/genllmresponse.md @@ -0,0 +1,10 @@ +# GenLLMResponse + + +## Fields + +| Field | Type | Required | Description | +| -------------------------------------------------------------------------- | -------------------------------------------------------------------------- | -------------------------------------------------------------------------- | -------------------------------------------------------------------------- | +| `http_meta` | [components.HTTPMetadata](../../models/components/httpmetadata.md) | :heavy_check_mark: | N/A | +| `llm_response` | [Optional[components.LLMResponse]](../../models/components/llmresponse.md) | :heavy_minus_sign: | Successful Response | +| `studio_api_error` | *Optional[errors.StudioAPIError]* | :heavy_minus_sign: | Error | \ No newline at end of file diff --git a/docs/models/operations/gentexttoimageresponse.md b/docs/models/operations/gentexttoimageresponse.md index df754f0..7c32825 100644 --- a/docs/models/operations/gentexttoimageresponse.md +++ b/docs/models/operations/gentexttoimageresponse.md @@ -3,8 +3,8 @@ ## Fields -| Field | Type | Required | Description | -| ------------------------------------------------------------------------------ | ------------------------------------------------------------------------------ | ------------------------------------------------------------------------------ | ------------------------------------------------------------------------------ | -| `http_meta` | [components.HTTPMetadata](../../models/components/httpmetadata.md) | :heavy_check_mark: | N/A | -| `image_response` | [Optional[components.ImageResponse]](../../models/components/imageresponse.md) | :heavy_minus_sign: | Successful Response | -| `studio_api_error` | *Optional[errors.StudioAPIError]* | :heavy_minus_sign: | Error | \ No newline at end of file +| Field | Type | Required | Description | +| -------------------------------------------------------------------------------- | -------------------------------------------------------------------------------- | -------------------------------------------------------------------------------- | -------------------------------------------------------------------------------- | +| `http_meta` | [components.HTTPMetadata](../../models/components/httpmetadata.md) | :heavy_check_mark: | N/A | +| `image_response` | [Optional[components.ImageResponse]](../../models/components/imageresponse.md) | :heavy_minus_sign: | Successful Response | +| `studio_api_error` | [Optional[components.StudioAPIError]](../../models/components/studioapierror.md) | :heavy_minus_sign: | Error | \ No newline at end of file diff --git a/docs/models/operations/getassetresponse.md b/docs/models/operations/getassetresponse.md index 27c1eba..85b4db7 100644 --- a/docs/models/operations/getassetresponse.md +++ b/docs/models/operations/getassetresponse.md @@ -7,4 +7,4 @@ | ------------------------------------------------------------------ | ------------------------------------------------------------------ | ------------------------------------------------------------------ | ------------------------------------------------------------------ | | `http_meta` | [components.HTTPMetadata](../../models/components/httpmetadata.md) | :heavy_check_mark: | N/A | | `asset` | [Optional[components.Asset]](../../models/components/asset.md) | :heavy_minus_sign: | Success | -| `error` | *Optional[errors.Error]* | :heavy_minus_sign: | Error | \ No newline at end of file +| `error` | [Optional[components.Error]](../../models/components/error.md) | :heavy_minus_sign: | Error | \ No newline at end of file diff --git a/docs/models/operations/getassetsresponse.md b/docs/models/operations/getassetsresponse.md index 4572c43..63db5b6 100644 --- a/docs/models/operations/getassetsresponse.md +++ b/docs/models/operations/getassetsresponse.md @@ -7,4 +7,4 @@ | ------------------------------------------------------------------ | ------------------------------------------------------------------ | ------------------------------------------------------------------ | ------------------------------------------------------------------ | | `http_meta` | [components.HTTPMetadata](../../models/components/httpmetadata.md) | :heavy_check_mark: | N/A | | `data` | List[[components.Asset](../../models/components/asset.md)] | :heavy_minus_sign: | Success | -| `error` | *Optional[errors.Error]* | :heavy_minus_sign: | Error | \ No newline at end of file +| `error` | [Optional[components.Error]](../../models/components/error.md) | :heavy_minus_sign: | Error | \ No newline at end of file diff --git a/docs/models/operations/getclipsresponse.md b/docs/models/operations/getclipsresponse.md index f1d7034..d27e6d3 100644 --- a/docs/models/operations/getclipsresponse.md +++ b/docs/models/operations/getclipsresponse.md @@ -7,4 +7,4 @@ | ------------------------------------------------------------------ | ------------------------------------------------------------------ | ------------------------------------------------------------------ | ------------------------------------------------------------------ | | `http_meta` | [components.HTTPMetadata](../../models/components/httpmetadata.md) | :heavy_check_mark: | N/A | | `data` | List[[components.Asset](../../models/components/asset.md)] | :heavy_minus_sign: | Success | -| `error` | *Optional[errors.Error]* | :heavy_minus_sign: | Error | \ No newline at end of file +| `error` | [Optional[components.Error]](../../models/components/error.md) | :heavy_minus_sign: | Error | \ No newline at end of file diff --git a/docs/models/operations/getcreatorviewershipmetricsresponse.md b/docs/models/operations/getcreatorviewershipmetricsresponse.md index 1ae4d50..8891181 100644 --- a/docs/models/operations/getcreatorviewershipmetricsresponse.md +++ b/docs/models/operations/getcreatorviewershipmetricsresponse.md @@ -7,4 +7,4 @@ | -------------------------------------------------------------------------------- | -------------------------------------------------------------------------------- | -------------------------------------------------------------------------------- | -------------------------------------------------------------------------------- | | `http_meta` | [components.HTTPMetadata](../../models/components/httpmetadata.md) | :heavy_check_mark: | N/A | | `data` | List[[components.ViewershipMetric](../../models/components/viewershipmetric.md)] | :heavy_minus_sign: | A list of Metric objects | -| `error` | *Optional[errors.Error]* | :heavy_minus_sign: | Error | \ No newline at end of file +| `error` | [Optional[components.Error]](../../models/components/error.md) | :heavy_minus_sign: | Error | \ No newline at end of file diff --git a/docs/models/operations/getmultistreamtargetresponse.md b/docs/models/operations/getmultistreamtargetresponse.md index 05f5d8d..7c8ec6d 100644 --- a/docs/models/operations/getmultistreamtargetresponse.md +++ b/docs/models/operations/getmultistreamtargetresponse.md @@ -7,4 +7,4 @@ | -------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------- | | `http_meta` | [components.HTTPMetadata](../../models/components/httpmetadata.md) | :heavy_check_mark: | N/A | | `multistream_target` | [Optional[components.MultistreamTarget]](../../models/components/multistreamtarget.md) | :heavy_minus_sign: | Success | -| `error` | *Optional[errors.Error]* | :heavy_minus_sign: | Error | \ No newline at end of file +| `error` | [Optional[components.Error]](../../models/components/error.md) | :heavy_minus_sign: | Error | \ No newline at end of file diff --git a/docs/models/operations/getmultistreamtargetsresponse.md b/docs/models/operations/getmultistreamtargetsresponse.md index 0d930c7..3648e72 100644 --- a/docs/models/operations/getmultistreamtargetsresponse.md +++ b/docs/models/operations/getmultistreamtargetsresponse.md @@ -7,4 +7,4 @@ | ---------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------- | | `http_meta` | [components.HTTPMetadata](../../models/components/httpmetadata.md) | :heavy_check_mark: | N/A | | `data` | List[[components.MultistreamTarget](../../models/components/multistreamtarget.md)] | :heavy_minus_sign: | Success | -| `error` | *Optional[errors.Error]* | :heavy_minus_sign: | Error | \ No newline at end of file +| `error` | [Optional[components.Error]](../../models/components/error.md) | :heavy_minus_sign: | Error | \ No newline at end of file diff --git a/docs/models/operations/getplaybackinforesponse.md b/docs/models/operations/getplaybackinforesponse.md index 5769c1d..8095cae 100644 --- a/docs/models/operations/getplaybackinforesponse.md +++ b/docs/models/operations/getplaybackinforesponse.md @@ -7,4 +7,4 @@ | ---------------------------------------------------------------------------- | ---------------------------------------------------------------------------- | ---------------------------------------------------------------------------- | ---------------------------------------------------------------------------- | | `http_meta` | [components.HTTPMetadata](../../models/components/httpmetadata.md) | :heavy_check_mark: | N/A | | `playback_info` | [Optional[components.PlaybackInfo]](../../models/components/playbackinfo.md) | :heavy_minus_sign: | Successful response | -| `error` | *Optional[errors.Error]* | :heavy_minus_sign: | Playback not found | \ No newline at end of file +| `error` | [Optional[components.Error]](../../models/components/error.md) | :heavy_minus_sign: | Playback not found | \ No newline at end of file diff --git a/docs/models/operations/getpublicviewershipmetricsresponse.md b/docs/models/operations/getpublicviewershipmetricsresponse.md index bd66d2e..e1d502a 100644 --- a/docs/models/operations/getpublicviewershipmetricsresponse.md +++ b/docs/models/operations/getpublicviewershipmetricsresponse.md @@ -7,4 +7,4 @@ | ---------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------- | | `http_meta` | [components.HTTPMetadata](../../models/components/httpmetadata.md) | :heavy_check_mark: | N/A | | `data` | [Optional[operations.GetPublicViewershipMetricsData]](../../models/operations/getpublicviewershipmetricsdata.md) | :heavy_minus_sign: | A single Metric object with the viewCount and playtimeMins metrics. | -| `error` | *Optional[errors.Error]* | :heavy_minus_sign: | Error | \ No newline at end of file +| `error` | [Optional[components.Error]](../../models/components/error.md) | :heavy_minus_sign: | Error | \ No newline at end of file diff --git a/docs/models/operations/getrealtimeviewershipnowresponse.md b/docs/models/operations/getrealtimeviewershipnowresponse.md index 603dafe..406d59b 100644 --- a/docs/models/operations/getrealtimeviewershipnowresponse.md +++ b/docs/models/operations/getrealtimeviewershipnowresponse.md @@ -7,4 +7,4 @@ | ------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------ | | `http_meta` | [components.HTTPMetadata](../../models/components/httpmetadata.md) | :heavy_check_mark: | N/A | | `data` | List[[components.RealtimeViewershipMetric](../../models/components/realtimeviewershipmetric.md)] | :heavy_minus_sign: | A list of Metric objects | -| `error` | *Optional[errors.Error]* | :heavy_minus_sign: | Error | \ No newline at end of file +| `error` | [Optional[components.Error]](../../models/components/error.md) | :heavy_minus_sign: | Error | \ No newline at end of file diff --git a/docs/models/operations/getrecordedsessionsresponse.md b/docs/models/operations/getrecordedsessionsresponse.md index 89363ad..d13f1b3 100644 --- a/docs/models/operations/getrecordedsessionsresponse.md +++ b/docs/models/operations/getrecordedsessionsresponse.md @@ -7,4 +7,4 @@ | ------------------------------------------------------------------ | ------------------------------------------------------------------ | ------------------------------------------------------------------ | ------------------------------------------------------------------ | | `http_meta` | [components.HTTPMetadata](../../models/components/httpmetadata.md) | :heavy_check_mark: | N/A | | `data` | List[[components.Session](../../models/components/session.md)] | :heavy_minus_sign: | Success | -| `error` | *Optional[errors.Error]* | :heavy_minus_sign: | Error | \ No newline at end of file +| `error` | [Optional[components.Error]](../../models/components/error.md) | :heavy_minus_sign: | Error | \ No newline at end of file diff --git a/docs/models/operations/getroomresponse.md b/docs/models/operations/getroomresponse.md index 21bf5f8..0b82c04 100644 --- a/docs/models/operations/getroomresponse.md +++ b/docs/models/operations/getroomresponse.md @@ -7,4 +7,4 @@ | ------------------------------------------------------------------ | ------------------------------------------------------------------ | ------------------------------------------------------------------ | ------------------------------------------------------------------ | | `http_meta` | [components.HTTPMetadata](../../models/components/httpmetadata.md) | :heavy_check_mark: | N/A | | `room` | [Optional[components.Room]](../../models/components/room.md) | :heavy_minus_sign: | Success | -| `error` | *Optional[errors.Error]* | :heavy_minus_sign: | Error | \ No newline at end of file +| `error` | [Optional[components.Error]](../../models/components/error.md) | :heavy_minus_sign: | Error | \ No newline at end of file diff --git a/docs/models/operations/getroomuserresponse.md b/docs/models/operations/getroomuserresponse.md index e14cda5..abed0cf 100644 --- a/docs/models/operations/getroomuserresponse.md +++ b/docs/models/operations/getroomuserresponse.md @@ -7,4 +7,4 @@ | ------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------ | | `http_meta` | [components.HTTPMetadata](../../models/components/httpmetadata.md) | :heavy_check_mark: | N/A | | `get_room_user_response` | [Optional[components.GetRoomUserResponse]](../../models/components/getroomuserresponse.md) | :heavy_minus_sign: | Success | -| `error` | *Optional[errors.Error]* | :heavy_minus_sign: | Error | \ No newline at end of file +| `error` | [Optional[components.Error]](../../models/components/error.md) | :heavy_minus_sign: | Error | \ No newline at end of file diff --git a/docs/models/operations/getsessionclipsresponse.md b/docs/models/operations/getsessionclipsresponse.md index 24b68af..76cc86a 100644 --- a/docs/models/operations/getsessionclipsresponse.md +++ b/docs/models/operations/getsessionclipsresponse.md @@ -7,4 +7,4 @@ | ------------------------------------------------------------------ | ------------------------------------------------------------------ | ------------------------------------------------------------------ | ------------------------------------------------------------------ | | `http_meta` | [components.HTTPMetadata](../../models/components/httpmetadata.md) | :heavy_check_mark: | N/A | | `data` | List[[components.Asset](../../models/components/asset.md)] | :heavy_minus_sign: | Success | -| `error` | *Optional[errors.Error]* | :heavy_minus_sign: | Error | \ No newline at end of file +| `error` | [Optional[components.Error]](../../models/components/error.md) | :heavy_minus_sign: | Error | \ No newline at end of file diff --git a/docs/models/operations/getsessionresponse.md b/docs/models/operations/getsessionresponse.md index ce3b8c7..f87d8e3 100644 --- a/docs/models/operations/getsessionresponse.md +++ b/docs/models/operations/getsessionresponse.md @@ -7,4 +7,4 @@ | ------------------------------------------------------------------ | ------------------------------------------------------------------ | ------------------------------------------------------------------ | ------------------------------------------------------------------ | | `http_meta` | [components.HTTPMetadata](../../models/components/httpmetadata.md) | :heavy_check_mark: | N/A | | `session` | [Optional[components.Session]](../../models/components/session.md) | :heavy_minus_sign: | Success | -| `error` | *Optional[errors.Error]* | :heavy_minus_sign: | Error | \ No newline at end of file +| `error` | [Optional[components.Error]](../../models/components/error.md) | :heavy_minus_sign: | Error | \ No newline at end of file diff --git a/docs/models/operations/getsessionsresponse.md b/docs/models/operations/getsessionsresponse.md index a50e6ff..8982d77 100644 --- a/docs/models/operations/getsessionsresponse.md +++ b/docs/models/operations/getsessionsresponse.md @@ -7,4 +7,4 @@ | ------------------------------------------------------------------ | ------------------------------------------------------------------ | ------------------------------------------------------------------ | ------------------------------------------------------------------ | | `http_meta` | [components.HTTPMetadata](../../models/components/httpmetadata.md) | :heavy_check_mark: | N/A | | `data` | List[[components.Session](../../models/components/session.md)] | :heavy_minus_sign: | Success | -| `error` | *Optional[errors.Error]* | :heavy_minus_sign: | Error | \ No newline at end of file +| `error` | [Optional[components.Error]](../../models/components/error.md) | :heavy_minus_sign: | Error | \ No newline at end of file diff --git a/docs/models/operations/getsigningkeyresponse.md b/docs/models/operations/getsigningkeyresponse.md index ab7547a..b4085dc 100644 --- a/docs/models/operations/getsigningkeyresponse.md +++ b/docs/models/operations/getsigningkeyresponse.md @@ -7,4 +7,4 @@ | ------------------------------------------------------------------------ | ------------------------------------------------------------------------ | ------------------------------------------------------------------------ | ------------------------------------------------------------------------ | | `http_meta` | [components.HTTPMetadata](../../models/components/httpmetadata.md) | :heavy_check_mark: | N/A | | `signing_key` | [Optional[components.SigningKey]](../../models/components/signingkey.md) | :heavy_minus_sign: | Success | -| `error` | *Optional[errors.Error]* | :heavy_minus_sign: | Error | \ No newline at end of file +| `error` | [Optional[components.Error]](../../models/components/error.md) | :heavy_minus_sign: | Error | \ No newline at end of file diff --git a/docs/models/operations/getsigningkeysresponse.md b/docs/models/operations/getsigningkeysresponse.md index 578a77d..90b5ab5 100644 --- a/docs/models/operations/getsigningkeysresponse.md +++ b/docs/models/operations/getsigningkeysresponse.md @@ -7,4 +7,4 @@ | -------------------------------------------------------------------- | -------------------------------------------------------------------- | -------------------------------------------------------------------- | -------------------------------------------------------------------- | | `http_meta` | [components.HTTPMetadata](../../models/components/httpmetadata.md) | :heavy_check_mark: | N/A | | `data` | List[[components.SigningKey](../../models/components/signingkey.md)] | :heavy_minus_sign: | Success | -| `error` | *Optional[errors.Error]* | :heavy_minus_sign: | Error | \ No newline at end of file +| `error` | [Optional[components.Error]](../../models/components/error.md) | :heavy_minus_sign: | Error | \ No newline at end of file diff --git a/docs/models/operations/getstreamresponse.md b/docs/models/operations/getstreamresponse.md index 084772d..3ae8aae 100644 --- a/docs/models/operations/getstreamresponse.md +++ b/docs/models/operations/getstreamresponse.md @@ -7,4 +7,4 @@ | ------------------------------------------------------------------ | ------------------------------------------------------------------ | ------------------------------------------------------------------ | ------------------------------------------------------------------ | | `http_meta` | [components.HTTPMetadata](../../models/components/httpmetadata.md) | :heavy_check_mark: | N/A | | `stream` | [Optional[components.Stream]](../../models/components/stream.md) | :heavy_minus_sign: | Success | -| `error` | *Optional[errors.Error]* | :heavy_minus_sign: | Error | \ No newline at end of file +| `error` | [Optional[components.Error]](../../models/components/error.md) | :heavy_minus_sign: | Error | \ No newline at end of file diff --git a/docs/models/operations/getstreamsresponse.md b/docs/models/operations/getstreamsresponse.md index 527c651..c0515b0 100644 --- a/docs/models/operations/getstreamsresponse.md +++ b/docs/models/operations/getstreamsresponse.md @@ -7,4 +7,4 @@ | ------------------------------------------------------------------ | ------------------------------------------------------------------ | ------------------------------------------------------------------ | ------------------------------------------------------------------ | | `http_meta` | [components.HTTPMetadata](../../models/components/httpmetadata.md) | :heavy_check_mark: | N/A | | `data` | List[[components.Stream](../../models/components/stream.md)] | :heavy_minus_sign: | Success | -| `error` | *Optional[errors.Error]* | :heavy_minus_sign: | Error | \ No newline at end of file +| `error` | [Optional[components.Error]](../../models/components/error.md) | :heavy_minus_sign: | Error | \ No newline at end of file diff --git a/docs/models/operations/gettasksresponse.md b/docs/models/operations/gettasksresponse.md index dcd2aff..7d438dc 100644 --- a/docs/models/operations/gettasksresponse.md +++ b/docs/models/operations/gettasksresponse.md @@ -7,4 +7,4 @@ | ------------------------------------------------------------------ | ------------------------------------------------------------------ | ------------------------------------------------------------------ | ------------------------------------------------------------------ | | `http_meta` | [components.HTTPMetadata](../../models/components/httpmetadata.md) | :heavy_check_mark: | N/A | | `data` | List[[components.Task](../../models/components/task.md)] | :heavy_minus_sign: | Success | -| `error` | *Optional[errors.Error]* | :heavy_minus_sign: | Error | \ No newline at end of file +| `error` | [Optional[components.Error]](../../models/components/error.md) | :heavy_minus_sign: | Error | \ No newline at end of file diff --git a/docs/models/operations/getusagemetricsresponse.md b/docs/models/operations/getusagemetricsresponse.md index a0db105..b62ca84 100644 --- a/docs/models/operations/getusagemetricsresponse.md +++ b/docs/models/operations/getusagemetricsresponse.md @@ -7,4 +7,4 @@ | -------------------------------------------------------------------------- | -------------------------------------------------------------------------- | -------------------------------------------------------------------------- | -------------------------------------------------------------------------- | | `http_meta` | [components.HTTPMetadata](../../models/components/httpmetadata.md) | :heavy_check_mark: | N/A | | `usage_metric` | [Optional[components.UsageMetric]](../../models/components/usagemetric.md) | :heavy_minus_sign: | A Usage Metric object | -| `error` | *Optional[errors.Error]* | :heavy_minus_sign: | Error | \ No newline at end of file +| `error` | [Optional[components.Error]](../../models/components/error.md) | :heavy_minus_sign: | Error | \ No newline at end of file diff --git a/docs/models/operations/getviewershipmetricsresponse.md b/docs/models/operations/getviewershipmetricsresponse.md index 8f796d1..62c5417 100644 --- a/docs/models/operations/getviewershipmetricsresponse.md +++ b/docs/models/operations/getviewershipmetricsresponse.md @@ -7,4 +7,4 @@ | -------------------------------------------------------------------------------- | -------------------------------------------------------------------------------- | -------------------------------------------------------------------------------- | -------------------------------------------------------------------------------- | | `http_meta` | [components.HTTPMetadata](../../models/components/httpmetadata.md) | :heavy_check_mark: | N/A | | `data` | List[[components.ViewershipMetric](../../models/components/viewershipmetric.md)] | :heavy_minus_sign: | A list of Metric objects | -| `error` | *Optional[errors.Error]* | :heavy_minus_sign: | Error | \ No newline at end of file +| `error` | [Optional[components.Error]](../../models/components/error.md) | :heavy_minus_sign: | Error | \ No newline at end of file diff --git a/docs/models/operations/getwebhooklogresponse.md b/docs/models/operations/getwebhooklogresponse.md index fdcef2c..b2d2217 100644 --- a/docs/models/operations/getwebhooklogresponse.md +++ b/docs/models/operations/getwebhooklogresponse.md @@ -7,4 +7,4 @@ | ------------------------------------------------------------------------ | ------------------------------------------------------------------------ | ------------------------------------------------------------------------ | ------------------------------------------------------------------------ | | `http_meta` | [components.HTTPMetadata](../../models/components/httpmetadata.md) | :heavy_check_mark: | N/A | | `webhook_log` | [Optional[components.WebhookLog]](../../models/components/webhooklog.md) | :heavy_minus_sign: | Success | -| `error` | *Optional[errors.Error]* | :heavy_minus_sign: | Error | \ No newline at end of file +| `error` | [Optional[components.Error]](../../models/components/error.md) | :heavy_minus_sign: | Error | \ No newline at end of file diff --git a/docs/models/operations/getwebhooklogsresponse.md b/docs/models/operations/getwebhooklogsresponse.md index 88c8a3f..11c6c32 100644 --- a/docs/models/operations/getwebhooklogsresponse.md +++ b/docs/models/operations/getwebhooklogsresponse.md @@ -7,4 +7,4 @@ | -------------------------------------------------------------------- | -------------------------------------------------------------------- | -------------------------------------------------------------------- | -------------------------------------------------------------------- | | `http_meta` | [components.HTTPMetadata](../../models/components/httpmetadata.md) | :heavy_check_mark: | N/A | | `data` | List[[components.WebhookLog](../../models/components/webhooklog.md)] | :heavy_minus_sign: | Success | -| `error` | *Optional[errors.Error]* | :heavy_minus_sign: | Error | \ No newline at end of file +| `error` | [Optional[components.Error]](../../models/components/error.md) | :heavy_minus_sign: | Error | \ No newline at end of file diff --git a/docs/models/operations/getwebhookresponse.md b/docs/models/operations/getwebhookresponse.md index 99ebd10..ad97a10 100644 --- a/docs/models/operations/getwebhookresponse.md +++ b/docs/models/operations/getwebhookresponse.md @@ -7,4 +7,4 @@ | ------------------------------------------------------------------ | ------------------------------------------------------------------ | ------------------------------------------------------------------ | ------------------------------------------------------------------ | | `http_meta` | [components.HTTPMetadata](../../models/components/httpmetadata.md) | :heavy_check_mark: | N/A | | `webhook` | [Optional[components.Webhook]](../../models/components/webhook.md) | :heavy_minus_sign: | Success | -| `error` | *Optional[errors.Error]* | :heavy_minus_sign: | Error | \ No newline at end of file +| `error` | [Optional[components.Error]](../../models/components/error.md) | :heavy_minus_sign: | Error | \ No newline at end of file diff --git a/docs/models/operations/getwebhooksresponse.md b/docs/models/operations/getwebhooksresponse.md index 4ef11fd..40dd3f5 100644 --- a/docs/models/operations/getwebhooksresponse.md +++ b/docs/models/operations/getwebhooksresponse.md @@ -7,4 +7,4 @@ | ------------------------------------------------------------------ | ------------------------------------------------------------------ | ------------------------------------------------------------------ | ------------------------------------------------------------------ | | `http_meta` | [components.HTTPMetadata](../../models/components/httpmetadata.md) | :heavy_check_mark: | N/A | | `data` | List[[components.Webhook](../../models/components/webhook.md)] | :heavy_minus_sign: | Success | -| `error` | *Optional[errors.Error]* | :heavy_minus_sign: | Error | \ No newline at end of file +| `error` | [Optional[components.Error]](../../models/components/error.md) | :heavy_minus_sign: | Error | \ No newline at end of file diff --git a/docs/models/operations/removemultistreamtargetresponse.md b/docs/models/operations/removemultistreamtargetresponse.md index b102046..18be702 100644 --- a/docs/models/operations/removemultistreamtargetresponse.md +++ b/docs/models/operations/removemultistreamtargetresponse.md @@ -6,4 +6,4 @@ | Field | Type | Required | Description | | ------------------------------------------------------------------ | ------------------------------------------------------------------ | ------------------------------------------------------------------ | ------------------------------------------------------------------ | | `http_meta` | [components.HTTPMetadata](../../models/components/httpmetadata.md) | :heavy_check_mark: | N/A | -| `error` | *Optional[errors.Error]* | :heavy_minus_sign: | Error | \ No newline at end of file +| `error` | [Optional[components.Error]](../../models/components/error.md) | :heavy_minus_sign: | Error | \ No newline at end of file diff --git a/docs/models/operations/requestuploadresponse.md b/docs/models/operations/requestuploadresponse.md index 7d5c9ac..c0908de 100644 --- a/docs/models/operations/requestuploadresponse.md +++ b/docs/models/operations/requestuploadresponse.md @@ -7,4 +7,4 @@ | -------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------- | | `http_meta` | [components.HTTPMetadata](../../models/components/httpmetadata.md) | :heavy_check_mark: | N/A | | `data` | [Optional[operations.RequestUploadData]](../../models/operations/requestuploaddata.md) | :heavy_minus_sign: | Success | -| `error` | *Optional[errors.Error]* | :heavy_minus_sign: | Error | \ No newline at end of file +| `error` | [Optional[components.Error]](../../models/components/error.md) | :heavy_minus_sign: | Error | \ No newline at end of file diff --git a/docs/models/operations/resendwebhookresponse.md b/docs/models/operations/resendwebhookresponse.md index 483c4d3..1159ed9 100644 --- a/docs/models/operations/resendwebhookresponse.md +++ b/docs/models/operations/resendwebhookresponse.md @@ -7,4 +7,4 @@ | ------------------------------------------------------------------------ | ------------------------------------------------------------------------ | ------------------------------------------------------------------------ | ------------------------------------------------------------------------ | | `http_meta` | [components.HTTPMetadata](../../models/components/httpmetadata.md) | :heavy_check_mark: | N/A | | `webhook_log` | [Optional[components.WebhookLog]](../../models/components/webhooklog.md) | :heavy_minus_sign: | Success | -| `error` | *Optional[errors.Error]* | :heavy_minus_sign: | Error | \ No newline at end of file +| `error` | [Optional[components.Error]](../../models/components/error.md) | :heavy_minus_sign: | Error | \ No newline at end of file diff --git a/docs/models/operations/startpullstreamresponse.md b/docs/models/operations/startpullstreamresponse.md index 64554d2..775e44d 100644 --- a/docs/models/operations/startpullstreamresponse.md +++ b/docs/models/operations/startpullstreamresponse.md @@ -6,4 +6,4 @@ | Field | Type | Required | Description | | ------------------------------------------------------------------ | ------------------------------------------------------------------ | ------------------------------------------------------------------ | ------------------------------------------------------------------ | | `http_meta` | [components.HTTPMetadata](../../models/components/httpmetadata.md) | :heavy_check_mark: | N/A | -| `error` | *Optional[errors.Error]* | :heavy_minus_sign: | Error | \ No newline at end of file +| `error` | [Optional[components.Error]](../../models/components/error.md) | :heavy_minus_sign: | Error | \ No newline at end of file diff --git a/docs/models/operations/startroomegressresponse.md b/docs/models/operations/startroomegressresponse.md index 06ce886..c86bc7b 100644 --- a/docs/models/operations/startroomegressresponse.md +++ b/docs/models/operations/startroomegressresponse.md @@ -6,4 +6,4 @@ | Field | Type | Required | Description | | ------------------------------------------------------------------ | ------------------------------------------------------------------ | ------------------------------------------------------------------ | ------------------------------------------------------------------ | | `http_meta` | [components.HTTPMetadata](../../models/components/httpmetadata.md) | :heavy_check_mark: | N/A | -| `error` | *Optional[errors.Error]* | :heavy_minus_sign: | Error | \ No newline at end of file +| `error` | [Optional[components.Error]](../../models/components/error.md) | :heavy_minus_sign: | Error | \ No newline at end of file diff --git a/docs/models/operations/stoproomegressresponse.md b/docs/models/operations/stoproomegressresponse.md index 1b1ffd0..2899db1 100644 --- a/docs/models/operations/stoproomegressresponse.md +++ b/docs/models/operations/stoproomegressresponse.md @@ -6,4 +6,4 @@ | Field | Type | Required | Description | | ------------------------------------------------------------------ | ------------------------------------------------------------------ | ------------------------------------------------------------------ | ------------------------------------------------------------------ | | `http_meta` | [components.HTTPMetadata](../../models/components/httpmetadata.md) | :heavy_check_mark: | N/A | -| `error` | *Optional[errors.Error]* | :heavy_minus_sign: | Error | \ No newline at end of file +| `error` | [Optional[components.Error]](../../models/components/error.md) | :heavy_minus_sign: | Error | \ No newline at end of file diff --git a/docs/models/operations/terminatestreamresponse.md b/docs/models/operations/terminatestreamresponse.md index b1c1779..1705cc0 100644 --- a/docs/models/operations/terminatestreamresponse.md +++ b/docs/models/operations/terminatestreamresponse.md @@ -6,4 +6,4 @@ | Field | Type | Required | Description | | ------------------------------------------------------------------ | ------------------------------------------------------------------ | ------------------------------------------------------------------ | ------------------------------------------------------------------ | | `http_meta` | [components.HTTPMetadata](../../models/components/httpmetadata.md) | :heavy_check_mark: | N/A | -| `error` | *Optional[errors.Error]* | :heavy_minus_sign: | Error | \ No newline at end of file +| `error` | [Optional[components.Error]](../../models/components/error.md) | :heavy_minus_sign: | Error | \ No newline at end of file diff --git a/docs/models/operations/transcodevideoresponse.md b/docs/models/operations/transcodevideoresponse.md index 4b16179..3ad7f5d 100644 --- a/docs/models/operations/transcodevideoresponse.md +++ b/docs/models/operations/transcodevideoresponse.md @@ -7,4 +7,4 @@ | ------------------------------------------------------------------ | ------------------------------------------------------------------ | ------------------------------------------------------------------ | ------------------------------------------------------------------ | | `http_meta` | [components.HTTPMetadata](../../models/components/httpmetadata.md) | :heavy_check_mark: | N/A | | `task` | [Optional[components.Task]](../../models/components/task.md) | :heavy_minus_sign: | Success | -| `error` | *Optional[errors.Error]* | :heavy_minus_sign: | Error | \ No newline at end of file +| `error` | [Optional[components.Error]](../../models/components/error.md) | :heavy_minus_sign: | Error | \ No newline at end of file diff --git a/docs/models/operations/updateassetresponse.md b/docs/models/operations/updateassetresponse.md index 59a0840..49bda4e 100644 --- a/docs/models/operations/updateassetresponse.md +++ b/docs/models/operations/updateassetresponse.md @@ -7,4 +7,4 @@ | ------------------------------------------------------------------ | ------------------------------------------------------------------ | ------------------------------------------------------------------ | ------------------------------------------------------------------ | | `http_meta` | [components.HTTPMetadata](../../models/components/httpmetadata.md) | :heavy_check_mark: | N/A | | `asset` | [Optional[components.Asset]](../../models/components/asset.md) | :heavy_minus_sign: | Success | -| `error` | *Optional[errors.Error]* | :heavy_minus_sign: | Error | \ No newline at end of file +| `error` | [Optional[components.Error]](../../models/components/error.md) | :heavy_minus_sign: | Error | \ No newline at end of file diff --git a/docs/models/operations/updatemultistreamtargetresponse.md b/docs/models/operations/updatemultistreamtargetresponse.md index 1ab6ed4..596d6a8 100644 --- a/docs/models/operations/updatemultistreamtargetresponse.md +++ b/docs/models/operations/updatemultistreamtargetresponse.md @@ -6,4 +6,4 @@ | Field | Type | Required | Description | | ------------------------------------------------------------------ | ------------------------------------------------------------------ | ------------------------------------------------------------------ | ------------------------------------------------------------------ | | `http_meta` | [components.HTTPMetadata](../../models/components/httpmetadata.md) | :heavy_check_mark: | N/A | -| `error` | *Optional[errors.Error]* | :heavy_minus_sign: | Error | \ No newline at end of file +| `error` | [Optional[components.Error]](../../models/components/error.md) | :heavy_minus_sign: | Error | \ No newline at end of file diff --git a/docs/models/operations/updateroomuserresponse.md b/docs/models/operations/updateroomuserresponse.md index 307fc84..3a0bc18 100644 --- a/docs/models/operations/updateroomuserresponse.md +++ b/docs/models/operations/updateroomuserresponse.md @@ -6,4 +6,4 @@ | Field | Type | Required | Description | | ------------------------------------------------------------------ | ------------------------------------------------------------------ | ------------------------------------------------------------------ | ------------------------------------------------------------------ | | `http_meta` | [components.HTTPMetadata](../../models/components/httpmetadata.md) | :heavy_check_mark: | N/A | -| `error` | *Optional[errors.Error]* | :heavy_minus_sign: | Error | \ No newline at end of file +| `error` | [Optional[components.Error]](../../models/components/error.md) | :heavy_minus_sign: | Error | \ No newline at end of file diff --git a/docs/models/operations/updatesigningkeyresponse.md b/docs/models/operations/updatesigningkeyresponse.md index 6391b44..a91570d 100644 --- a/docs/models/operations/updatesigningkeyresponse.md +++ b/docs/models/operations/updatesigningkeyresponse.md @@ -6,4 +6,4 @@ | Field | Type | Required | Description | | ------------------------------------------------------------------ | ------------------------------------------------------------------ | ------------------------------------------------------------------ | ------------------------------------------------------------------ | | `http_meta` | [components.HTTPMetadata](../../models/components/httpmetadata.md) | :heavy_check_mark: | N/A | -| `error` | *Optional[errors.Error]* | :heavy_minus_sign: | Error | \ No newline at end of file +| `error` | [Optional[components.Error]](../../models/components/error.md) | :heavy_minus_sign: | Error | \ No newline at end of file diff --git a/docs/models/operations/updatestreamresponse.md b/docs/models/operations/updatestreamresponse.md index 7813ea0..03d9155 100644 --- a/docs/models/operations/updatestreamresponse.md +++ b/docs/models/operations/updatestreamresponse.md @@ -6,4 +6,4 @@ | Field | Type | Required | Description | | ------------------------------------------------------------------ | ------------------------------------------------------------------ | ------------------------------------------------------------------ | ------------------------------------------------------------------ | | `http_meta` | [components.HTTPMetadata](../../models/components/httpmetadata.md) | :heavy_check_mark: | N/A | -| `error` | *Optional[errors.Error]* | :heavy_minus_sign: | Error | \ No newline at end of file +| `error` | [Optional[components.Error]](../../models/components/error.md) | :heavy_minus_sign: | Error | \ No newline at end of file diff --git a/docs/models/operations/updatewebhookresponse.md b/docs/models/operations/updatewebhookresponse.md index 29ba655..551625b 100644 --- a/docs/models/operations/updatewebhookresponse.md +++ b/docs/models/operations/updatewebhookresponse.md @@ -7,4 +7,4 @@ | ------------------------------------------------------------------ | ------------------------------------------------------------------ | ------------------------------------------------------------------ | ------------------------------------------------------------------ | | `http_meta` | [components.HTTPMetadata](../../models/components/httpmetadata.md) | :heavy_check_mark: | N/A | | `webhook` | [Optional[components.Webhook]](../../models/components/webhook.md) | :heavy_minus_sign: | Success | -| `error` | *Optional[errors.Error]* | :heavy_minus_sign: | Error | \ No newline at end of file +| `error` | [Optional[components.Error]](../../models/components/error.md) | :heavy_minus_sign: | Error | \ No newline at end of file diff --git a/docs/models/operations/uploadassetresponse.md b/docs/models/operations/uploadassetresponse.md index a512e4a..daec12b 100644 --- a/docs/models/operations/uploadassetresponse.md +++ b/docs/models/operations/uploadassetresponse.md @@ -8,4 +8,4 @@ | `http_meta` | [components.HTTPMetadata](../../models/components/httpmetadata.md) | :heavy_check_mark: | N/A | | `two_hundred_application_json_data` | [Optional[operations.UploadAssetData]](../../models/operations/uploadassetdata.md) | :heavy_minus_sign: | Upload in progress | | `two_hundred_and_one_application_json_data` | [Optional[operations.UploadAssetDataOutput]](../../models/operations/uploadassetdataoutput.md) | :heavy_minus_sign: | Upload started | -| `error` | *Optional[errors.Error]* | :heavy_minus_sign: | Error | \ No newline at end of file +| `error` | [Optional[components.Error]](../../models/components/error.md) | :heavy_minus_sign: | Error | \ No newline at end of file diff --git a/docs/sdks/accesscontrol/README.md b/docs/sdks/accesscontrol/README.md index a4cd301..9a1eec5 100644 --- a/docs/sdks/accesscontrol/README.md +++ b/docs/sdks/accesscontrol/README.md @@ -24,15 +24,16 @@ Up to 10 signing keys can be generated, after that you must delete at least one ```python from livepeer import Livepeer -s = Livepeer( +with Livepeer( api_key="", -) +) as livepeer: -res = s.access_control.create() + res = livepeer.access_control.create() -if res.signing_key is not None: - # handle response - pass + assert res.signing_key is not None + + # Handle response + print(res.signing_key) ``` @@ -48,10 +49,9 @@ if res.signing_key is not None: ### Errors -| Error Object | Status Code | Content Type | +| Error Type | Status Code | Content Type | | --------------- | --------------- | --------------- | -| errors.SDKError | 4xx-5xx | */* | - +| errors.SDKError | 4XX, 5XX | \*/\* | ## get_all @@ -62,15 +62,16 @@ Retrieves signing keys ```python from livepeer import Livepeer -s = Livepeer( +with Livepeer( api_key="", -) +) as livepeer: + + res = livepeer.access_control.get_all() -res = s.access_control.get_all() + assert res.data is not None -if res.data is not None: - # handle response - pass + # Handle response + print(res.data) ``` @@ -86,10 +87,9 @@ if res.data is not None: ### Errors -| Error Object | Status Code | Content Type | +| Error Type | Status Code | Content Type | | --------------- | --------------- | --------------- | -| errors.SDKError | 4xx-5xx | */* | - +| errors.SDKError | 4XX, 5XX | \*/\* | ## delete @@ -100,15 +100,16 @@ Delete Signing Key ```python from livepeer import Livepeer -s = Livepeer( +with Livepeer( api_key="", -) +) as livepeer: + + res = livepeer.access_control.delete(key_id="") -res = s.access_control.delete(key_id="") + assert res is not None -if res is not None: - # handle response - pass + # Handle response + print(res) ``` @@ -125,10 +126,9 @@ if res is not None: ### Errors -| Error Object | Status Code | Content Type | +| Error Type | Status Code | Content Type | | --------------- | --------------- | --------------- | -| errors.SDKError | 4xx-5xx | */* | - +| errors.SDKError | 4XX, 5XX | \*/\* | ## get @@ -139,15 +139,16 @@ Retrieves a signing key ```python from livepeer import Livepeer -s = Livepeer( +with Livepeer( api_key="", -) +) as livepeer: + + res = livepeer.access_control.get(key_id="") -res = s.access_control.get(key_id="") + assert res.signing_key is not None -if res.signing_key is not None: - # handle response - pass + # Handle response + print(res.signing_key) ``` @@ -164,10 +165,9 @@ if res.signing_key is not None: ### Errors -| Error Object | Status Code | Content Type | +| Error Type | Status Code | Content Type | | --------------- | --------------- | --------------- | -| errors.SDKError | 4xx-5xx | */* | - +| errors.SDKError | 4XX, 5XX | \*/\* | ## update @@ -178,15 +178,16 @@ Update a signing key ```python from livepeer import Livepeer -s = Livepeer( +with Livepeer( api_key="", -) +) as livepeer: + + res = livepeer.access_control.update(key_id="", request_body={}) -res = s.access_control.update(key_id="", request_body={}) + assert res is not None -if res is not None: - # handle response - pass + # Handle response + print(res) ``` @@ -204,6 +205,6 @@ if res is not None: ### Errors -| Error Object | Status Code | Content Type | +| Error Type | Status Code | Content Type | | --------------- | --------------- | --------------- | -| errors.SDKError | 4xx-5xx | */* | +| errors.SDKError | 4XX, 5XX | \*/\* | \ No newline at end of file diff --git a/docs/sdks/asset/README.md b/docs/sdks/asset/README.md index f1b540e..fe54893 100644 --- a/docs/sdks/asset/README.md +++ b/docs/sdks/asset/README.md @@ -23,15 +23,16 @@ Retrieve assets ```python from livepeer import Livepeer -s = Livepeer( +with Livepeer( api_key="", -) +) as livepeer: -res = s.asset.get_all() + res = livepeer.asset.get_all() -if res.data is not None: - # handle response - pass + assert res.data is not None + + # Handle response + print(res.data) ``` @@ -47,10 +48,9 @@ if res.data is not None: ### Errors -| Error Object | Status Code | Content Type | +| Error Type | Status Code | Content Type | | --------------- | --------------- | --------------- | -| errors.SDKError | 4xx-5xx | */* | - +| errors.SDKError | 4XX, 5XX | \*/\* | ## create @@ -133,40 +133,41 @@ definition above. from livepeer import Livepeer from livepeer.models import components -s = Livepeer( +with Livepeer( api_key="", -) - -res = s.asset.create(request={ - "name": "filename.mp4", - "static_mp4": True, - "playback_policy": { - "type": components.Type.WEBHOOK, - "webhook_id": "1bde4o2i6xycudoy", - "webhook_context": { - "streamerId": "my-custom-id", +) as livepeer: + + res = livepeer.asset.create(request={ + "name": "filename.mp4", + "static_mp4": True, + "playback_policy": { + "type": components.Type.WEBHOOK, + "webhook_id": "1bde4o2i6xycudoy", + "webhook_context": { + "streamerId": "my-custom-id", + }, + "refresh_interval": 600, }, - "refresh_interval": 600, - }, - "profiles": [ - { - "bitrate": 3000000, - "width": 1280, - "name": "720p", - "height": 720, - "quality": 23, - "fps": 30, - "fps_den": 1, - "gop": "2", - "profile": components.TranscodeProfileProfile.H264_BASELINE, - "encoder": components.TranscodeProfileEncoder.H_264, - }, - ], -}) - -if res.data is not None: - # handle response - pass + "profiles": [ + { + "bitrate": 3000000, + "width": 1280, + "name": "720p", + "height": 720, + "quality": 23, + "fps": 30, + "fps_den": 1, + "gop": "2", + "profile": components.TranscodeProfileProfile.H264_BASELINE, + "encoder": components.TranscodeProfileEncoder.H_264, + }, + ], + }) + + assert res.data is not None + + # Handle response + print(res.data) ``` @@ -183,10 +184,9 @@ if res.data is not None: ### Errors -| Error Object | Status Code | Content Type | +| Error Type | Status Code | Content Type | | --------------- | --------------- | --------------- | -| errors.SDKError | 4xx-5xx | */* | - +| errors.SDKError | 4XX, 5XX | \*/\* | ## create_via_url @@ -198,41 +198,42 @@ Upload asset via URL from livepeer import Livepeer from livepeer.models import components -s = Livepeer( +with Livepeer( api_key="", -) - -res = s.asset.create_via_url(request={ - "name": "filename.mp4", - "url": "https://s3.amazonaws.com/my-bucket/path/filename.mp4", - "static_mp4": True, - "playback_policy": { - "type": components.Type.WEBHOOK, - "webhook_id": "1bde4o2i6xycudoy", - "webhook_context": { - "streamerId": "my-custom-id", - }, - "refresh_interval": 600, - }, - "profiles": [ - { - "bitrate": 3000000, - "width": 1280, - "name": "720p", - "height": 720, - "quality": 23, - "fps": 30, - "fps_den": 1, - "gop": "2", - "profile": components.TranscodeProfileProfile.H264_BASELINE, - "encoder": components.TranscodeProfileEncoder.H_264, +) as livepeer: + + res = livepeer.asset.create_via_url(request={ + "name": "filename.mp4", + "url": "https://s3.amazonaws.com/my-bucket/path/filename.mp4", + "static_mp4": True, + "playback_policy": { + "type": components.Type.WEBHOOK, + "webhook_id": "1bde4o2i6xycudoy", + "webhook_context": { + "streamerId": "my-custom-id", + }, + "refresh_interval": 600, }, - ], -}) - -if res.two_hundred_application_json_data is not None: - # handle response - pass + "profiles": [ + { + "bitrate": 3000000, + "width": 1280, + "name": "720p", + "height": 720, + "quality": 23, + "fps": 30, + "fps_den": 1, + "gop": "2", + "profile": components.TranscodeProfileProfile.H264_BASELINE, + "encoder": components.TranscodeProfileEncoder.H_264, + }, + ], + }) + + assert res.two_hundred_application_json_data is not None + + # Handle response + print(res.two_hundred_application_json_data) ``` @@ -249,10 +250,9 @@ if res.two_hundred_application_json_data is not None: ### Errors -| Error Object | Status Code | Content Type | +| Error Type | Status Code | Content Type | | --------------- | --------------- | --------------- | -| errors.SDKError | 4xx-5xx | */* | - +| errors.SDKError | 4XX, 5XX | \*/\* | ## get @@ -263,15 +263,16 @@ Retrieves an asset ```python from livepeer import Livepeer -s = Livepeer( +with Livepeer( api_key="", -) +) as livepeer: + + res = livepeer.asset.get(asset_id="") -res = s.asset.get(asset_id="") + assert res.asset is not None -if res.asset is not None: - # handle response - pass + # Handle response + print(res.asset) ``` @@ -288,10 +289,9 @@ if res.asset is not None: ### Errors -| Error Object | Status Code | Content Type | +| Error Type | Status Code | Content Type | | --------------- | --------------- | --------------- | -| errors.SDKError | 4xx-5xx | */* | - +| errors.SDKError | 4XX, 5XX | \*/\* | ## update @@ -303,25 +303,26 @@ Patch an asset from livepeer import Livepeer from livepeer.models import components -s = Livepeer( +with Livepeer( api_key="", -) - -res = s.asset.update(asset_id="", asset_patch_payload={ - "name": "filename.mp4", - "playback_policy": { - "type": components.Type.WEBHOOK, - "webhook_id": "1bde4o2i6xycudoy", - "webhook_context": { - "streamerId": "my-custom-id", +) as livepeer: + + res = livepeer.asset.update(asset_id="", asset_patch_payload={ + "name": "filename.mp4", + "playback_policy": { + "type": components.Type.WEBHOOK, + "webhook_id": "1bde4o2i6xycudoy", + "webhook_context": { + "streamerId": "my-custom-id", + }, + "refresh_interval": 600, }, - "refresh_interval": 600, - }, -}) + }) -if res.asset is not None: - # handle response - pass + assert res.asset is not None + + # Handle response + print(res.asset) ``` @@ -339,10 +340,9 @@ if res.asset is not None: ### Errors -| Error Object | Status Code | Content Type | +| Error Type | Status Code | Content Type | | --------------- | --------------- | --------------- | -| errors.SDKError | 4xx-5xx | */* | - +| errors.SDKError | 4XX, 5XX | \*/\* | ## delete @@ -353,15 +353,16 @@ Delete an asset ```python from livepeer import Livepeer -s = Livepeer( +with Livepeer( api_key="", -) +) as livepeer: + + res = livepeer.asset.delete(asset_id="") -res = s.asset.delete(asset_id="") + assert res is not None -if res is not None: - # handle response - pass + # Handle response + print(res) ``` @@ -378,6 +379,6 @@ if res is not None: ### Errors -| Error Object | Status Code | Content Type | +| Error Type | Status Code | Content Type | | --------------- | --------------- | --------------- | -| errors.SDKError | 4xx-5xx | */* | +| errors.SDKError | 4XX, 5XX | \*/\* | \ No newline at end of file diff --git a/docs/sdks/generate/README.md b/docs/sdks/generate/README.md index 90da4a1..ba9f25d 100644 --- a/docs/sdks/generate/README.md +++ b/docs/sdks/generate/README.md @@ -13,6 +13,7 @@ Operations related to AI generate api * [upscale](#upscale) - Upscale * [audio_to_text](#audio_to_text) - Audio To Text * [segment_anything2](#segment_anything2) - Segment Anything 2 +* [llm](#llm) - LLM ## text_to_image @@ -23,17 +24,18 @@ Generate images from text prompts. ```python from livepeer import Livepeer -s = Livepeer( +with Livepeer( api_key="", -) +) as livepeer: -res = s.generate.text_to_image(request={ - "prompt": "", -}) + res = livepeer.generate.text_to_image(request={ + "prompt": "", + }) -if res.image_response is not None: - # handle response - pass + assert res.image_response is not None + + # Handle response + print(res.image_response) ``` @@ -50,14 +52,13 @@ if res.image_response is not None: ### Errors -| Error Object | Status Code | Content Type | +| Error Type | Status Code | Content Type | | ---------------------------------------------------- | ---------------------------------------------------- | ---------------------------------------------------- | | errors.GenTextToImageResponseBody | 400 | application/json | | errors.GenTextToImageGenerateResponseBody | 401 | application/json | | errors.GenTextToImageGenerateResponseResponseBody | 422 | application/json | | errors.GenTextToImageGenerateResponse500ResponseBody | 500 | application/json | -| errors.SDKError | 4xx-5xx | */* | - +| errors.SDKError | 4XX, 5XX | \*/\* | ## image_to_image @@ -68,21 +69,22 @@ Apply image transformations to a provided image. ```python from livepeer import Livepeer -s = Livepeer( +with Livepeer( api_key="", -) +) as livepeer: + + res = livepeer.generate.image_to_image(request={ + "prompt": "", + "image": { + "file_name": "example.file", + "content": open("example.file", "rb"), + }, + }) -res = s.generate.image_to_image(request={ - "prompt": "", - "image": { - "file_name": "example.file", - "content": open("example.file", "rb"), - }, -}) + assert res.image_response is not None -if res.image_response is not None: - # handle response - pass + # Handle response + print(res.image_response) ``` @@ -99,14 +101,13 @@ if res.image_response is not None: ### Errors -| Error Object | Status Code | Content Type | +| Error Type | Status Code | Content Type | | ----------------------------------------------------- | ----------------------------------------------------- | ----------------------------------------------------- | | errors.GenImageToImageResponseBody | 400 | application/json | | errors.GenImageToImageGenerateResponseBody | 401 | application/json | | errors.GenImageToImageGenerateResponseResponseBody | 422 | application/json | | errors.GenImageToImageGenerateResponse500ResponseBody | 500 | application/json | -| errors.SDKError | 4xx-5xx | */* | - +| errors.SDKError | 4XX, 5XX | \*/\* | ## image_to_video @@ -117,20 +118,21 @@ Generate a video from a provided image. ```python from livepeer import Livepeer -s = Livepeer( +with Livepeer( api_key="", -) +) as livepeer: + + res = livepeer.generate.image_to_video(request={ + "image": { + "file_name": "example.file", + "content": open("example.file", "rb"), + }, + }) -res = s.generate.image_to_video(request={ - "image": { - "file_name": "example.file", - "content": open("example.file", "rb"), - }, -}) + assert res.video_response is not None -if res.video_response is not None: - # handle response - pass + # Handle response + print(res.video_response) ``` @@ -147,14 +149,13 @@ if res.video_response is not None: ### Errors -| Error Object | Status Code | Content Type | +| Error Type | Status Code | Content Type | | ----------------------------------------------------- | ----------------------------------------------------- | ----------------------------------------------------- | | errors.GenImageToVideoResponseBody | 400 | application/json | | errors.GenImageToVideoGenerateResponseBody | 401 | application/json | | errors.GenImageToVideoGenerateResponseResponseBody | 422 | application/json | | errors.GenImageToVideoGenerateResponse500ResponseBody | 500 | application/json | -| errors.SDKError | 4xx-5xx | */* | - +| errors.SDKError | 4XX, 5XX | \*/\* | ## upscale @@ -165,21 +166,22 @@ Upscale an image by increasing its resolution. ```python from livepeer import Livepeer -s = Livepeer( +with Livepeer( api_key="", -) +) as livepeer: + + res = livepeer.generate.upscale(request={ + "prompt": "", + "image": { + "file_name": "example.file", + "content": open("example.file", "rb"), + }, + }) -res = s.generate.upscale(request={ - "prompt": "", - "image": { - "file_name": "example.file", - "content": open("example.file", "rb"), - }, -}) + assert res.image_response is not None -if res.image_response is not None: - # handle response - pass + # Handle response + print(res.image_response) ``` @@ -196,14 +198,13 @@ if res.image_response is not None: ### Errors -| Error Object | Status Code | Content Type | +| Error Type | Status Code | Content Type | | ------------------------------------------------ | ------------------------------------------------ | ------------------------------------------------ | | errors.GenUpscaleResponseBody | 400 | application/json | | errors.GenUpscaleGenerateResponseBody | 401 | application/json | | errors.GenUpscaleGenerateResponseResponseBody | 422 | application/json | | errors.GenUpscaleGenerateResponse500ResponseBody | 500 | application/json | -| errors.SDKError | 4xx-5xx | */* | - +| errors.SDKError | 4XX, 5XX | \*/\* | ## audio_to_text @@ -214,20 +215,21 @@ Transcribe audio files to text. ```python from livepeer import Livepeer -s = Livepeer( +with Livepeer( api_key="", -) +) as livepeer: + + res = livepeer.generate.audio_to_text(request={ + "audio": { + "file_name": "example.file", + "content": open("example.file", "rb"), + }, + }) -res = s.generate.audio_to_text(request={ - "audio": { - "file_name": "example.file", - "content": open("example.file", "rb"), - }, -}) + assert res.text_response is not None -if res.text_response is not None: - # handle response - pass + # Handle response + print(res.text_response) ``` @@ -244,15 +246,15 @@ if res.text_response is not None: ### Errors -| Error Object | Status Code | Content Type | +| Error Type | Status Code | Content Type | | ---------------------------------------------------- | ---------------------------------------------------- | ---------------------------------------------------- | | errors.GenAudioToTextResponseBody | 400 | application/json | | errors.GenAudioToTextGenerateResponseBody | 401 | application/json | | errors.GenAudioToTextGenerateResponseResponseBody | 413 | application/json | +| errors.GenAudioToTextGenerateResponse415ResponseBody | 415 | application/json | | errors.GenAudioToTextGenerateResponse422ResponseBody | 422 | application/json | | errors.GenAudioToTextGenerateResponse500ResponseBody | 500 | application/json | -| errors.SDKError | 4xx-5xx | */* | - +| errors.SDKError | 4XX, 5XX | \*/\* | ## segment_anything2 @@ -263,20 +265,21 @@ Segment objects in an image. ```python from livepeer import Livepeer -s = Livepeer( +with Livepeer( api_key="", -) +) as livepeer: + + res = livepeer.generate.segment_anything2(request={ + "image": { + "file_name": "example.file", + "content": open("example.file", "rb"), + }, + }) -res = s.generate.segment_anything2(request={ - "image": { - "file_name": "example.file", - "content": open("example.file", "rb"), - }, -}) + assert res.masks_response is not None -if res.masks_response is not None: - # handle response - pass + # Handle response + print(res.masks_response) ``` @@ -293,10 +296,55 @@ if res.masks_response is not None: ### Errors -| Error Object | Status Code | Content Type | +| Error Type | Status Code | Content Type | | --------------------------------------------------------- | --------------------------------------------------------- | --------------------------------------------------------- | | errors.GenSegmentAnything2ResponseBody | 400 | application/json | | errors.GenSegmentAnything2GenerateResponseBody | 401 | application/json | | errors.GenSegmentAnything2GenerateResponseResponseBody | 422 | application/json | | errors.GenSegmentAnything2GenerateResponse500ResponseBody | 500 | application/json | -| errors.SDKError | 4xx-5xx | */* | +| errors.SDKError | 4XX, 5XX | \*/\* | + +## llm + +Generate text using a language model. + +### Example Usage + +```python +from livepeer import Livepeer + +with Livepeer( + api_key="", +) as livepeer: + + res = livepeer.generate.llm(request={ + "prompt": "", + }) + + assert res.llm_response is not None + + # Handle response + print(res.llm_response) + +``` + +### Parameters + +| Parameter | Type | Required | Description | +| ------------------------------------------------------------------- | ------------------------------------------------------------------- | ------------------------------------------------------------------- | ------------------------------------------------------------------- | +| `request` | [components.BodyGenLLM](../../models/components/bodygenllm.md) | :heavy_check_mark: | The request object to use for the request. | +| `retries` | [Optional[utils.RetryConfig]](../../models/utils/retryconfig.md) | :heavy_minus_sign: | Configuration to override the default retry behavior of the client. | + +### Response + +**[operations.GenLLMResponse](../../models/operations/genllmresponse.md)** + +### Errors + +| Error Type | Status Code | Content Type | +| -------------------------------------------- | -------------------------------------------- | -------------------------------------------- | +| errors.GenLLMResponseBody | 400 | application/json | +| errors.GenLLMGenerateResponseBody | 401 | application/json | +| errors.GenLLMGenerateResponseResponseBody | 422 | application/json | +| errors.GenLLMGenerateResponse500ResponseBody | 500 | application/json | +| errors.SDKError | 4XX, 5XX | \*/\* | \ No newline at end of file diff --git a/docs/sdks/livepeer/README.md b/docs/sdks/livepeer/README.md index 808685b..912df69 100644 --- a/docs/sdks/livepeer/README.md +++ b/docs/sdks/livepeer/README.md @@ -5,3 +5,6 @@ Livepeer API Reference: Welcome to the Livepeer API reference docs. Here you will find all the endpoints exposed on the standard Livepeer API, learn how to use them and what they return. + + +### Available Operations diff --git a/docs/sdks/metrics/README.md b/docs/sdks/metrics/README.md index 613fbe7..6a7adc6 100644 --- a/docs/sdks/metrics/README.md +++ b/docs/sdks/metrics/README.md @@ -23,15 +23,16 @@ Requires a private (non-CORS) API key to be used. ```python from livepeer import Livepeer -s = Livepeer( +with Livepeer( api_key="", -) +) as livepeer: -res = s.metrics.get_realtime_viewership() + res = livepeer.metrics.get_realtime_viewership() -if res.data is not None: - # handle response - pass + assert res.data is not None + + # Handle response + print(res.data) ``` @@ -50,10 +51,9 @@ if res.data is not None: ### Errors -| Error Object | Status Code | Content Type | +| Error Type | Status Code | Content Type | | --------------- | --------------- | --------------- | -| errors.SDKError | 4xx-5xx | */* | - +| errors.SDKError | 4XX, 5XX | \*/\* | ## get_viewership @@ -65,15 +65,16 @@ Requires a private (non-CORS) API key to be used. ```python from livepeer import Livepeer -s = Livepeer( +with Livepeer( api_key="", -) +) as livepeer: + + res = livepeer.metrics.get_viewership(request={}) -res = s.metrics.get_viewership(request={}) + assert res.data is not None -if res.data is not None: - # handle response - pass + # Handle response + print(res.data) ``` @@ -90,10 +91,9 @@ if res.data is not None: ### Errors -| Error Object | Status Code | Content Type | +| Error Type | Status Code | Content Type | | --------------- | --------------- | --------------- | -| errors.SDKError | 4xx-5xx | */* | - +| errors.SDKError | 4XX, 5XX | \*/\* | ## get_creator_viewership @@ -105,15 +105,16 @@ Requires a proof of ownership to be sent in the request, which for now is just t ```python from livepeer import Livepeer -s = Livepeer( +with Livepeer( api_key="", -) +) as livepeer: + + res = livepeer.metrics.get_creator_viewership(request={}) -res = s.metrics.get_creator_viewership(request={}) + assert res.data is not None -if res.data is not None: - # handle response - pass + # Handle response + print(res.data) ``` @@ -130,10 +131,9 @@ if res.data is not None: ### Errors -| Error Object | Status Code | Content Type | +| Error Type | Status Code | Content Type | | --------------- | --------------- | --------------- | -| errors.SDKError | 4xx-5xx | */* | - +| errors.SDKError | 4XX, 5XX | \*/\* | ## get_public_viewership @@ -147,15 +147,16 @@ unauthenticated. ```python from livepeer import Livepeer -s = Livepeer( +with Livepeer( api_key="", -) +) as livepeer: + + res = livepeer.metrics.get_public_viewership(playback_id="") -res = s.metrics.get_public_viewership(playback_id="") + assert res.data is not None -if res.data is not None: - # handle response - pass + # Handle response + print(res.data) ``` @@ -172,10 +173,9 @@ if res.data is not None: ### Errors -| Error Object | Status Code | Content Type | +| Error Type | Status Code | Content Type | | --------------- | --------------- | --------------- | -| errors.SDKError | 4xx-5xx | */* | - +| errors.SDKError | 4XX, 5XX | \*/\* | ## get_usage @@ -186,15 +186,16 @@ Query usage metrics ```python from livepeer import Livepeer -s = Livepeer( +with Livepeer( api_key="", -) +) as livepeer: + + res = livepeer.metrics.get_usage(request={}) -res = s.metrics.get_usage(request={}) + assert res.usage_metric is not None -if res.usage_metric is not None: - # handle response - pass + # Handle response + print(res.usage_metric) ``` @@ -211,6 +212,6 @@ if res.usage_metric is not None: ### Errors -| Error Object | Status Code | Content Type | +| Error Type | Status Code | Content Type | | --------------- | --------------- | --------------- | -| errors.SDKError | 4xx-5xx | */* | +| errors.SDKError | 4XX, 5XX | \*/\* | \ No newline at end of file diff --git a/docs/sdks/multistream/README.md b/docs/sdks/multistream/README.md index de9a910..182367c 100644 --- a/docs/sdks/multistream/README.md +++ b/docs/sdks/multistream/README.md @@ -22,15 +22,16 @@ Retrieve Multistream Targets ```python from livepeer import Livepeer -s = Livepeer( +with Livepeer( api_key="", -) +) as livepeer: -res = s.multistream.get_all() + res = livepeer.multistream.get_all() -if res.data is not None: - # handle response - pass + assert res.data is not None + + # Handle response + print(res.data) ``` @@ -46,10 +47,9 @@ if res.data is not None: ### Errors -| Error Object | Status Code | Content Type | +| Error Type | Status Code | Content Type | | --------------- | --------------- | --------------- | -| errors.SDKError | 4xx-5xx | */* | - +| errors.SDKError | 4XX, 5XX | \*/\* | ## create @@ -60,17 +60,18 @@ Create a multistream target ```python from livepeer import Livepeer -s = Livepeer( +with Livepeer( api_key="", -) +) as livepeer: + + res = livepeer.multistream.create(request={ + "url": "rtmps://live.my-service.tv/channel/secretKey", + }) -res = s.multistream.create(request={ - "url": "rtmps://live.my-service.tv/channel/secretKey", -}) + assert res.multistream_target is not None -if res.multistream_target is not None: - # handle response - pass + # Handle response + print(res.multistream_target) ``` @@ -87,10 +88,9 @@ if res.multistream_target is not None: ### Errors -| Error Object | Status Code | Content Type | +| Error Type | Status Code | Content Type | | --------------- | --------------- | --------------- | -| errors.SDKError | 4xx-5xx | */* | - +| errors.SDKError | 4XX, 5XX | \*/\* | ## get @@ -101,15 +101,16 @@ Retrieve a multistream target ```python from livepeer import Livepeer -s = Livepeer( +with Livepeer( api_key="", -) +) as livepeer: + + res = livepeer.multistream.get(id="") -res = s.multistream.get(id="") + assert res.multistream_target is not None -if res.multistream_target is not None: - # handle response - pass + # Handle response + print(res.multistream_target) ``` @@ -126,10 +127,9 @@ if res.multistream_target is not None: ### Errors -| Error Object | Status Code | Content Type | +| Error Type | Status Code | Content Type | | --------------- | --------------- | --------------- | -| errors.SDKError | 4xx-5xx | */* | - +| errors.SDKError | 4XX, 5XX | \*/\* | ## update @@ -140,17 +140,18 @@ Update Multistream Target ```python from livepeer import Livepeer -s = Livepeer( +with Livepeer( api_key="", -) +) as livepeer: + + res = livepeer.multistream.update(id="", multistream_target_patch_payload={ + "url": "rtmps://live.my-service.tv/channel/secretKey", + }) -res = s.multistream.update(id="", multistream_target_patch_payload={ - "url": "rtmps://live.my-service.tv/channel/secretKey", -}) + assert res is not None -if res is not None: - # handle response - pass + # Handle response + print(res) ``` @@ -168,10 +169,9 @@ if res is not None: ### Errors -| Error Object | Status Code | Content Type | +| Error Type | Status Code | Content Type | | --------------- | --------------- | --------------- | -| errors.SDKError | 4xx-5xx | */* | - +| errors.SDKError | 4XX, 5XX | \*/\* | ## delete @@ -184,15 +184,16 @@ streams before actually deleting it from the API. ```python from livepeer import Livepeer -s = Livepeer( +with Livepeer( api_key="", -) +) as livepeer: + + res = livepeer.multistream.delete(id="") -res = s.multistream.delete(id="") + assert res is not None -if res is not None: - # handle response - pass + # Handle response + print(res) ``` @@ -209,6 +210,6 @@ if res is not None: ### Errors -| Error Object | Status Code | Content Type | +| Error Type | Status Code | Content Type | | --------------- | --------------- | --------------- | -| errors.SDKError | 4xx-5xx | */* | +| errors.SDKError | 4XX, 5XX | \*/\* | \ No newline at end of file diff --git a/docs/sdks/playback/README.md b/docs/sdks/playback/README.md index c8394df..fb4f1b9 100644 --- a/docs/sdks/playback/README.md +++ b/docs/sdks/playback/README.md @@ -18,15 +18,16 @@ Retrieve Playback Info ```python from livepeer import Livepeer -s = Livepeer( +with Livepeer( api_key="", -) +) as livepeer: -res = s.playback.get(id="") + res = livepeer.playback.get(id="") -if res.playback_info is not None: - # handle response - pass + assert res.playback_info is not None + + # Handle response + print(res.playback_info) ``` @@ -43,7 +44,7 @@ if res.playback_info is not None: ### Errors -| Error Object | Status Code | Content Type | +| Error Type | Status Code | Content Type | | ---------------- | ---------------- | ---------------- | | errors.Error | 404 | application/json | -| errors.SDKError | 4xx-5xx | */* | +| errors.SDKError | 4XX, 5XX | \*/\* | \ No newline at end of file diff --git a/docs/sdks/room/README.md b/docs/sdks/room/README.md index ce586f5..91f131b 100644 --- a/docs/sdks/room/README.md +++ b/docs/sdks/room/README.md @@ -29,15 +29,16 @@ Create a multiparticipant livestreaming room. ```python from livepeer import Livepeer -s = Livepeer( +with Livepeer( api_key="", -) +) as livepeer: -res = s.room.create() + res = livepeer.room.create() -if res.create_room_response is not None: - # handle response - pass + assert res.create_room_response is not None + + # Handle response + print(res.create_room_response) ``` @@ -53,10 +54,9 @@ if res.create_room_response is not None: ### Errors -| Error Object | Status Code | Content Type | +| Error Type | Status Code | Content Type | | --------------- | --------------- | --------------- | -| errors.SDKError | 4xx-5xx | */* | - +| errors.SDKError | 4XX, 5XX | \*/\* | ## ~~get~~ @@ -69,15 +69,16 @@ Retrieve a room ```python from livepeer import Livepeer -s = Livepeer( +with Livepeer( api_key="", -) +) as livepeer: + + res = livepeer.room.get(id="") -res = s.room.get(id="") + assert res.room is not None -if res.room is not None: - # handle response - pass + # Handle response + print(res.room) ``` @@ -94,10 +95,9 @@ if res.room is not None: ### Errors -| Error Object | Status Code | Content Type | +| Error Type | Status Code | Content Type | | --------------- | --------------- | --------------- | -| errors.SDKError | 4xx-5xx | */* | - +| errors.SDKError | 4XX, 5XX | \*/\* | ## ~~delete~~ @@ -110,15 +110,16 @@ Delete a room ```python from livepeer import Livepeer -s = Livepeer( +with Livepeer( api_key="", -) +) as livepeer: + + res = livepeer.room.delete(id="") -res = s.room.delete(id="") + assert res is not None -if res is not None: - # handle response - pass + # Handle response + print(res) ``` @@ -135,10 +136,9 @@ if res is not None: ### Errors -| Error Object | Status Code | Content Type | +| Error Type | Status Code | Content Type | | --------------- | --------------- | --------------- | -| errors.SDKError | 4xx-5xx | */* | - +| errors.SDKError | 4XX, 5XX | \*/\* | ## ~~start_egress~~ @@ -153,17 +153,18 @@ This allows you to leverage livestreaming features like recording and HLS output ```python from livepeer import Livepeer -s = Livepeer( +with Livepeer( api_key="", -) +) as livepeer: + + res = livepeer.room.start_egress(id="", room_egress_payload={ + "stream_id": "aac12556-4d65-4d34-9fb6-d1f0985eb0a9", + }) -res = s.room.start_egress(id="", room_egress_payload={ - "stream_id": "aac12556-4d65-4d34-9fb6-d1f0985eb0a9", -}) + assert res is not None -if res is not None: - # handle response - pass + # Handle response + print(res) ``` @@ -181,10 +182,9 @@ if res is not None: ### Errors -| Error Object | Status Code | Content Type | +| Error Type | Status Code | Content Type | | --------------- | --------------- | --------------- | -| errors.SDKError | 4xx-5xx | */* | - +| errors.SDKError | 4XX, 5XX | \*/\* | ## ~~stop_egress~~ @@ -197,15 +197,16 @@ Stop room RTMP egress ```python from livepeer import Livepeer -s = Livepeer( +with Livepeer( api_key="", -) +) as livepeer: + + res = livepeer.room.stop_egress(id="") -res = s.room.stop_egress(id="") + assert res is not None -if res is not None: - # handle response - pass + # Handle response + print(res) ``` @@ -222,10 +223,9 @@ if res is not None: ### Errors -| Error Object | Status Code | Content Type | +| Error Type | Status Code | Content Type | | --------------- | --------------- | --------------- | -| errors.SDKError | 4xx-5xx | */* | - +| errors.SDKError | 4XX, 5XX | \*/\* | ## ~~create_user~~ @@ -241,19 +241,20 @@ Alternatively the joining token can be used with a custom app. ```python from livepeer import Livepeer -s = Livepeer( +with Livepeer( api_key="", -) +) as livepeer: + + res = livepeer.room.create_user(id="", room_user_payload={ + "name": "name", + "can_publish": True, + "can_publish_data": True, + }) -res = s.room.create_user(id="", room_user_payload={ - "name": "name", - "can_publish": True, - "can_publish_data": True, -}) + assert res.room_user_response is not None -if res.room_user_response is not None: - # handle response - pass + # Handle response + print(res.room_user_response) ``` @@ -271,10 +272,9 @@ if res.room_user_response is not None: ### Errors -| Error Object | Status Code | Content Type | +| Error Type | Status Code | Content Type | | --------------- | --------------- | --------------- | -| errors.SDKError | 4xx-5xx | */* | - +| errors.SDKError | 4XX, 5XX | \*/\* | ## ~~get_user~~ @@ -287,15 +287,16 @@ Get user details ```python from livepeer import Livepeer -s = Livepeer( +with Livepeer( api_key="", -) +) as livepeer: + + res = livepeer.room.get_user(id="", user_id="") -res = s.room.get_user(id="", user_id="") + assert res.get_room_user_response is not None -if res.get_room_user_response is not None: - # handle response - pass + # Handle response + print(res.get_room_user_response) ``` @@ -313,10 +314,9 @@ if res.get_room_user_response is not None: ### Errors -| Error Object | Status Code | Content Type | +| Error Type | Status Code | Content Type | | --------------- | --------------- | --------------- | -| errors.SDKError | 4xx-5xx | */* | - +| errors.SDKError | 4XX, 5XX | \*/\* | ## ~~update_user~~ @@ -329,18 +329,19 @@ Update properties for a user. ```python from livepeer import Livepeer -s = Livepeer( +with Livepeer( api_key="", -) +) as livepeer: + + res = livepeer.room.update_user(id="", user_id="", room_user_update_payload={ + "can_publish": True, + "can_publish_data": True, + }) -res = s.room.update_user(id="", user_id="", room_user_update_payload={ - "can_publish": True, - "can_publish_data": True, -}) + assert res is not None -if res is not None: - # handle response - pass + # Handle response + print(res) ``` @@ -359,10 +360,9 @@ if res is not None: ### Errors -| Error Object | Status Code | Content Type | +| Error Type | Status Code | Content Type | | --------------- | --------------- | --------------- | -| errors.SDKError | 4xx-5xx | */* | - +| errors.SDKError | 4XX, 5XX | \*/\* | ## ~~delete_user~~ @@ -375,15 +375,16 @@ Remove a user from the room ```python from livepeer import Livepeer -s = Livepeer( +with Livepeer( api_key="", -) +) as livepeer: + + res = livepeer.room.delete_user(id="", user_id="") -res = s.room.delete_user(id="", user_id="") + assert res is not None -if res is not None: - # handle response - pass + # Handle response + print(res) ``` @@ -401,6 +402,6 @@ if res is not None: ### Errors -| Error Object | Status Code | Content Type | +| Error Type | Status Code | Content Type | | --------------- | --------------- | --------------- | -| errors.SDKError | 4xx-5xx | */* | +| errors.SDKError | 4XX, 5XX | \*/\* | \ No newline at end of file diff --git a/docs/sdks/session/README.md b/docs/sdks/session/README.md index f47a93f..20b36ac 100644 --- a/docs/sdks/session/README.md +++ b/docs/sdks/session/README.md @@ -21,15 +21,16 @@ Retrieve clips of a session ```python from livepeer import Livepeer -s = Livepeer( +with Livepeer( api_key="", -) +) as livepeer: -res = s.session.get_clips(id="") + res = livepeer.session.get_clips(id="") -if res.data is not None: - # handle response - pass + assert res.data is not None + + # Handle response + print(res.data) ``` @@ -46,10 +47,9 @@ if res.data is not None: ### Errors -| Error Object | Status Code | Content Type | +| Error Type | Status Code | Content Type | | --------------- | --------------- | --------------- | -| errors.SDKError | 4xx-5xx | */* | - +| errors.SDKError | 4XX, 5XX | \*/\* | ## get_all @@ -60,15 +60,16 @@ Retrieve sessions ```python from livepeer import Livepeer -s = Livepeer( +with Livepeer( api_key="", -) +) as livepeer: -res = s.session.get_all() + res = livepeer.session.get_all() -if res.data is not None: - # handle response - pass + assert res.data is not None + + # Handle response + print(res.data) ``` @@ -84,10 +85,9 @@ if res.data is not None: ### Errors -| Error Object | Status Code | Content Type | +| Error Type | Status Code | Content Type | | --------------- | --------------- | --------------- | -| errors.SDKError | 4xx-5xx | */* | - +| errors.SDKError | 4XX, 5XX | \*/\* | ## get @@ -98,15 +98,16 @@ Retrieve a session ```python from livepeer import Livepeer -s = Livepeer( +with Livepeer( api_key="", -) +) as livepeer: -res = s.session.get(id="") + res = livepeer.session.get(id="") -if res.session is not None: - # handle response - pass + assert res.session is not None + + # Handle response + print(res.session) ``` @@ -123,10 +124,9 @@ if res.session is not None: ### Errors -| Error Object | Status Code | Content Type | +| Error Type | Status Code | Content Type | | --------------- | --------------- | --------------- | -| errors.SDKError | 4xx-5xx | */* | - +| errors.SDKError | 4XX, 5XX | \*/\* | ## get_recorded @@ -137,15 +137,16 @@ Retrieve Recorded Sessions ```python from livepeer import Livepeer -s = Livepeer( +with Livepeer( api_key="", -) +) as livepeer: + + res = livepeer.session.get_recorded(parent_id="", record=True) -res = s.session.get_recorded(parent_id="", record=True) + assert res.data is not None -if res.data is not None: - # handle response - pass + # Handle response + print(res.data) ``` @@ -163,6 +164,6 @@ if res.data is not None: ### Errors -| Error Object | Status Code | Content Type | +| Error Type | Status Code | Content Type | | --------------- | --------------- | --------------- | -| errors.SDKError | 4xx-5xx | */* | +| errors.SDKError | 4XX, 5XX | \*/\* | \ No newline at end of file diff --git a/docs/sdks/stream/README.md b/docs/sdks/stream/README.md index ef5e778..24900b7 100644 --- a/docs/sdks/stream/README.md +++ b/docs/sdks/stream/README.md @@ -42,78 +42,74 @@ also be added upon the creation of a new stream by adding from livepeer import Livepeer from livepeer.models import components -s = Livepeer( +with Livepeer( api_key="", -) - -res = s.stream.create(request={ - "name": "test_stream", - "pull": { - "source": "https://myservice.com/live/stream.flv", - "headers": { - "Authorization": "Bearer 123", - }, - "location": { - "lat": 39.739, - "lon": -104.988, - }, - }, - "playback_policy": { - "type": components.Type.WEBHOOK, - "webhook_id": "1bde4o2i6xycudoy", - "webhook_context": { - "streamerId": "my-custom-id", +) as livepeer: + + res = livepeer.stream.create(request={ + "name": "test_stream", + "pull": { + "source": "https://myservice.com/live/stream.flv", + "headers": { + "Authorization": "Bearer 123", + }, + "location": { + "lat": 39.739, + "lon": -104.988, + }, }, - "refresh_interval": 600, - }, - "profiles": [ - { - "width": 1280, - "name": "720p", - "height": 720, - "bitrate": 3000000, - "fps": 30, - "fps_den": 1, - "quality": 23, - "gop": "2", - "profile": components.Profile.H264_BASELINE, + "playback_policy": { + "type": components.Type.WEBHOOK, + "webhook_id": "1bde4o2i6xycudoy", + "webhook_context": { + "streamerId": "my-custom-id", + }, + "refresh_interval": 600, }, - ], - "record": False, - "recording_spec": { "profiles": [ { - "bitrate": 3000000, "width": 1280, "name": "720p", "height": 720, - "quality": 23, + "bitrate": 3000000, "fps": 30, "fps_den": 1, + "quality": 23, "gop": "2", - "profile": components.TranscodeProfileProfile.H264_BASELINE, - "encoder": components.TranscodeProfileEncoder.H_264, + "profile": components.Profile.H264_BASELINE, }, ], - }, - "multistream": { - "targets": [ - { - "profile": "720p", - "video_only": False, - "id": "PUSH123", - "spec": { - "url": "rtmps://live.my-service.tv/channel/secretKey", - "name": "My target", + "record": False, + "recording_spec": { + "profiles": [ + { + "bitrate": 3000000, + "width": 1280, + "name": "720p", + "height": 720, + "quality": 23, + "fps": 30, + "fps_den": 1, + "gop": "2", + "profile": components.TranscodeProfileProfile.H264_BASELINE, + "encoder": components.TranscodeProfileEncoder.H_264, }, - }, - ], - }, -}) + ], + }, + "multistream": { + "targets": [ + { + "profile": "720p0", + "id": "PUSH123", + }, + ], + }, + }) + + assert res.stream is not None -if res.stream is not None: - # handle response - pass + # Handle response + print(res.stream) ``` @@ -130,10 +126,9 @@ if res.stream is not None: ### Errors -| Error Object | Status Code | Content Type | +| Error Type | Status Code | Content Type | | --------------- | --------------- | --------------- | -| errors.SDKError | 4xx-5xx | */* | - +| errors.SDKError | 4XX, 5XX | \*/\* | ## get_all @@ -144,15 +139,16 @@ Retrieve streams ```python from livepeer import Livepeer -s = Livepeer( +with Livepeer( api_key="", -) +) as livepeer: + + res = livepeer.stream.get_all() -res = s.stream.get_all() + assert res.data is not None -if res.data is not None: - # handle response - pass + # Handle response + print(res.data) ``` @@ -169,10 +165,9 @@ if res.data is not None: ### Errors -| Error Object | Status Code | Content Type | +| Error Type | Status Code | Content Type | | --------------- | --------------- | --------------- | -| errors.SDKError | 4xx-5xx | */* | - +| errors.SDKError | 4XX, 5XX | \*/\* | ## get @@ -183,15 +178,16 @@ Retrieve a stream ```python from livepeer import Livepeer -s = Livepeer( +with Livepeer( api_key="", -) +) as livepeer: -res = s.stream.get(id="") + res = livepeer.stream.get(id="") -if res.stream is not None: - # handle response - pass + assert res.stream is not None + + # Handle response + print(res.stream) ``` @@ -208,10 +204,9 @@ if res.stream is not None: ### Errors -| Error Object | Status Code | Content Type | +| Error Type | Status Code | Content Type | | --------------- | --------------- | --------------- | -| errors.SDKError | 4xx-5xx | */* | - +| errors.SDKError | 4XX, 5XX | \*/\* | ## update @@ -223,67 +218,63 @@ Update a stream from livepeer import Livepeer from livepeer.models import components -s = Livepeer( +with Livepeer( api_key="", -) - -res = s.stream.update(id="", stream_patch_payload={ - "record": False, - "multistream": { - "targets": [ - { - "profile": "720p", - "video_only": False, - "id": "PUSH123", - "spec": { - "url": "rtmps://live.my-service.tv/channel/secretKey", - "name": "My target", +) as livepeer: + + res = livepeer.stream.update(id="", stream_patch_payload={ + "record": False, + "multistream": { + "targets": [ + { + "profile": "720p0", + "id": "PUSH123", }, - }, - ], - }, - "playback_policy": { - "type": components.Type.WEBHOOK, - "webhook_id": "1bde4o2i6xycudoy", - "webhook_context": { - "streamerId": "my-custom-id", + ], }, - "refresh_interval": 600, - }, - "profiles": [ - { - "width": 1280, - "name": "720p", - "height": 720, - "bitrate": 3000000, - "fps": 30, - "fps_den": 1, - "quality": 23, - "gop": "2", - "profile": components.Profile.H264_BASELINE, + "playback_policy": { + "type": components.Type.WEBHOOK, + "webhook_id": "1bde4o2i6xycudoy", + "webhook_context": { + "streamerId": "my-custom-id", + }, + "refresh_interval": 600, }, - ], - "recording_spec": { "profiles": [ { - "bitrate": 3000000, "width": 1280, "name": "720p", "height": 720, - "quality": 23, + "bitrate": 3000000, "fps": 30, "fps_den": 1, + "quality": 23, "gop": "2", - "profile": components.TranscodeProfileProfile.H264_BASELINE, - "encoder": components.TranscodeProfileEncoder.H_264, + "profile": components.Profile.H264_BASELINE, }, ], - }, -}) + "recording_spec": { + "profiles": [ + { + "bitrate": 3000000, + "width": 1280, + "name": "720p", + "height": 720, + "quality": 23, + "fps": 30, + "fps_den": 1, + "gop": "2", + "profile": components.TranscodeProfileProfile.H264_BASELINE, + "encoder": components.TranscodeProfileEncoder.H_264, + }, + ], + }, + }) + + assert res is not None -if res is not None: - # handle response - pass + # Handle response + print(res) ``` @@ -301,10 +292,9 @@ if res is not None: ### Errors -| Error Object | Status Code | Content Type | +| Error Type | Status Code | Content Type | | --------------- | --------------- | --------------- | -| errors.SDKError | 4xx-5xx | */* | - +| errors.SDKError | 4XX, 5XX | \*/\* | ## delete @@ -319,15 +309,16 @@ using the PATCH stream API. ```python from livepeer import Livepeer -s = Livepeer( +with Livepeer( api_key="", -) +) as livepeer: -res = s.stream.delete(id="") + res = livepeer.stream.delete(id="") -if res is not None: - # handle response - pass + assert res is not None + + # Handle response + print(res) ``` @@ -344,10 +335,9 @@ if res is not None: ### Errors -| Error Object | Status Code | Content Type | +| Error Type | Status Code | Content Type | | --------------- | --------------- | --------------- | -| errors.SDKError | 4xx-5xx | */* | - +| errors.SDKError | 4XX, 5XX | \*/\* | ## terminate @@ -366,15 +356,16 @@ terminated. ```python from livepeer import Livepeer -s = Livepeer( +with Livepeer( api_key="", -) +) as livepeer: + + res = livepeer.stream.terminate(id="") -res = s.stream.terminate(id="") + assert res is not None -if res is not None: - # handle response - pass + # Handle response + print(res) ``` @@ -391,10 +382,9 @@ if res is not None: ### Errors -| Error Object | Status Code | Content Type | +| Error Type | Status Code | Content Type | | --------------- | --------------- | --------------- | -| errors.SDKError | 4xx-5xx | */* | - +| errors.SDKError | 4XX, 5XX | \*/\* | ## start_pull @@ -412,15 +402,16 @@ started. ```python from livepeer import Livepeer -s = Livepeer( +with Livepeer( api_key="", -) +) as livepeer: + + res = livepeer.stream.start_pull(id="") -res = s.stream.start_pull(id="") + assert res is not None -if res is not None: - # handle response - pass + # Handle response + print(res) ``` @@ -437,10 +428,9 @@ if res is not None: ### Errors -| Error Object | Status Code | Content Type | +| Error Type | Status Code | Content Type | | --------------- | --------------- | --------------- | -| errors.SDKError | 4xx-5xx | */* | - +| errors.SDKError | 4XX, 5XX | \*/\* | ## create_clip @@ -451,21 +441,22 @@ Create a clip ```python from livepeer import Livepeer -s = Livepeer( +with Livepeer( api_key="", -) +) as livepeer: -res = s.stream.create_clip(request={ - "playback_id": "eaw4nk06ts2d0mzb", - "start_time": 1587667174725, - "end_time": 1587667174725, - "name": "My Clip", - "session_id": "de7818e7-610a-4057-8f6f-b785dc1e6f88", -}) + res = livepeer.stream.create_clip(request={ + "playback_id": "eaw4nk06ts2d0mzb", + "start_time": 1587667174725, + "end_time": 1587667174725, + "name": "My Clip", + "session_id": "de7818e7-610a-4057-8f6f-b785dc1e6f88", + }) -if res.data is not None: - # handle response - pass + assert res.data is not None + + # Handle response + print(res.data) ``` @@ -482,10 +473,9 @@ if res.data is not None: ### Errors -| Error Object | Status Code | Content Type | +| Error Type | Status Code | Content Type | | --------------- | --------------- | --------------- | -| errors.SDKError | 4xx-5xx | */* | - +| errors.SDKError | 4XX, 5XX | \*/\* | ## get_clips @@ -496,15 +486,16 @@ Retrieve clips of a livestream ```python from livepeer import Livepeer -s = Livepeer( +with Livepeer( api_key="", -) +) as livepeer: + + res = livepeer.stream.get_clips(id="") -res = s.stream.get_clips(id="") + assert res.data is not None -if res.data is not None: - # handle response - pass + # Handle response + print(res.data) ``` @@ -521,10 +512,9 @@ if res.data is not None: ### Errors -| Error Object | Status Code | Content Type | +| Error Type | Status Code | Content Type | | --------------- | --------------- | --------------- | -| errors.SDKError | 4xx-5xx | */* | - +| errors.SDKError | 4XX, 5XX | \*/\* | ## add_multistream_target @@ -535,23 +525,24 @@ Add a multistream target ```python from livepeer import Livepeer -s = Livepeer( +with Livepeer( api_key="", -) - -res = s.stream.add_multistream_target(id="", target_add_payload={ - "profile": "720p0", - "video_only": False, - "id": "PUSH123", - "spec": { - "url": "rtmps://live.my-service.tv/channel/secretKey", - "name": "My target", - }, -}) - -if res is not None: - # handle response - pass +) as livepeer: + + res = livepeer.stream.add_multistream_target(id="", target_add_payload={ + "profile": "720p0", + "video_only": False, + "id": "PUSH123", + "spec": { + "url": "rtmps://live.my-service.tv/channel/secretKey", + "name": "My target", + }, + }) + + assert res is not None + + # Handle response + print(res) ``` @@ -569,10 +560,9 @@ if res is not None: ### Errors -| Error Object | Status Code | Content Type | +| Error Type | Status Code | Content Type | | --------------- | --------------- | --------------- | -| errors.SDKError | 4xx-5xx | */* | - +| errors.SDKError | 4XX, 5XX | \*/\* | ## remove_multistream_target @@ -583,15 +573,16 @@ Remove a multistream target ```python from livepeer import Livepeer -s = Livepeer( +with Livepeer( api_key="", -) +) as livepeer: + + res = livepeer.stream.remove_multistream_target(id="", target_id="") -res = s.stream.remove_multistream_target(id="", target_id="") + assert res is not None -if res is not None: - # handle response - pass + # Handle response + print(res) ``` @@ -609,6 +600,6 @@ if res is not None: ### Errors -| Error Object | Status Code | Content Type | +| Error Type | Status Code | Content Type | | --------------- | --------------- | --------------- | -| errors.SDKError | 4xx-5xx | */* | +| errors.SDKError | 4XX, 5XX | \*/\* | \ No newline at end of file diff --git a/docs/sdks/task/README.md b/docs/sdks/task/README.md index f0e7056..d4ae538 100644 --- a/docs/sdks/task/README.md +++ b/docs/sdks/task/README.md @@ -19,15 +19,16 @@ Retrieve Tasks ```python from livepeer import Livepeer -s = Livepeer( +with Livepeer( api_key="", -) +) as livepeer: -res = s.task.get_all() + res = livepeer.task.get_all() -if res.data is not None: - # handle response - pass + assert res.data is not None + + # Handle response + print(res.data) ``` @@ -43,10 +44,9 @@ if res.data is not None: ### Errors -| Error Object | Status Code | Content Type | +| Error Type | Status Code | Content Type | | --------------- | --------------- | --------------- | -| errors.SDKError | 4xx-5xx | */* | - +| errors.SDKError | 4XX, 5XX | \*/\* | ## get @@ -57,15 +57,16 @@ Retrieve a Task ```python from livepeer import Livepeer -s = Livepeer( +with Livepeer( api_key="", -) +) as livepeer: + + res = livepeer.task.get(task_id="") -res = s.task.get(task_id="") + assert res.task is not None -if res.task is not None: - # handle response - pass + # Handle response + print(res.task) ``` @@ -82,6 +83,6 @@ if res.task is not None: ### Errors -| Error Object | Status Code | Content Type | +| Error Type | Status Code | Content Type | | --------------- | --------------- | --------------- | -| errors.SDKError | 4xx-5xx | */* | +| errors.SDKError | 4XX, 5XX | \*/\* | \ No newline at end of file diff --git a/docs/sdks/transcode/README.md b/docs/sdks/transcode/README.md index 0f9cd64..f8a5bbe 100644 --- a/docs/sdks/transcode/README.md +++ b/docs/sdks/transcode/README.md @@ -140,53 +140,54 @@ This endpoint currently supports the following output types: from livepeer import Livepeer from livepeer.models import components -s = Livepeer( +with Livepeer( api_key="", -) +) as livepeer: -res = s.transcode.create(request={ - "input": { - "url": "https://s3.amazonaws.com/bucket/file.mp4", - }, - "storage": { - "type": components.StorageType.S3, - "endpoint": "https://gateway.storjshare.io", - "bucket": "outputbucket", - "credentials": { - "access_key_id": "AKIAIOSFODNN7EXAMPLE", - "secret_access_key": "wJalrXUtnFEMI/K7MDENG/bPxRfiCYEXAMPLEKEY", - }, - }, - "outputs": { - "hls": { - "path": "/samplevideo/hls", + res = livepeer.transcode.create(request={ + "input": { + "url": "https://s3.amazonaws.com/bucket/file.mp4", }, - "mp4": { - "path": "/samplevideo/mp4", + "storage": { + "type": components.StorageType.S3, + "endpoint": "https://gateway.storjshare.io", + "bucket": "outputbucket", + "credentials": { + "access_key_id": "AKIAIOSFODNN7EXAMPLE", + "secret_access_key": "wJalrXUtnFEMI/K7MDENG/bPxRfiCYEXAMPLEKEY", + }, }, - "fmp4": { - "path": "/samplevideo/fmp4", + "outputs": { + "hls": { + "path": "/samplevideo/hls", + }, + "mp4": { + "path": "/samplevideo/mp4", + }, + "fmp4": { + "path": "/samplevideo/fmp4", + }, }, - }, - "profiles": [ - { - "bitrate": 3000000, - "width": 1280, - "name": "720p", - "height": 720, - "quality": 23, - "fps": 30, - "fps_den": 1, - "gop": "2", - "profile": components.TranscodeProfileProfile.H264_BASELINE, - "encoder": components.TranscodeProfileEncoder.H_264, - }, - ], -}) - -if res.task is not None: - # handle response - pass + "profiles": [ + { + "bitrate": 3000000, + "width": 1280, + "name": "720p", + "height": 720, + "quality": 23, + "fps": 30, + "fps_den": 1, + "gop": "2", + "profile": components.TranscodeProfileProfile.H264_BASELINE, + "encoder": components.TranscodeProfileEncoder.H_264, + }, + ], + }) + + assert res.task is not None + + # Handle response + print(res.task) ``` @@ -203,6 +204,6 @@ if res.task is not None: ### Errors -| Error Object | Status Code | Content Type | +| Error Type | Status Code | Content Type | | --------------- | --------------- | --------------- | -| errors.SDKError | 4xx-5xx | */* | +| errors.SDKError | 4XX, 5XX | \*/\* | \ No newline at end of file diff --git a/docs/sdks/webhook/README.md b/docs/sdks/webhook/README.md index 957dcb9..24e0fd0 100644 --- a/docs/sdks/webhook/README.md +++ b/docs/sdks/webhook/README.md @@ -25,15 +25,16 @@ Retrieve a Webhook ```python from livepeer import Livepeer -s = Livepeer( +with Livepeer( api_key="", -) +) as livepeer: -res = s.webhook.get_all() + res = livepeer.webhook.get_all() -if res.data is not None: - # handle response - pass + assert res.data is not None + + # Handle response + print(res.data) ``` @@ -49,10 +50,9 @@ if res.data is not None: ### Errors -| Error Object | Status Code | Content Type | +| Error Type | Status Code | Content Type | | --------------- | --------------- | --------------- | -| errors.SDKError | 4xx-5xx | */* | - +| errors.SDKError | 4XX, 5XX | \*/\* | ## create @@ -65,25 +65,26 @@ To create a new webhook, you need to make an API call with the events you want t from livepeer import Livepeer from livepeer.models import components -s = Livepeer( +with Livepeer( api_key="", -) - -res = s.webhook.create(request={ - "name": "test_webhook", - "url": "https://my-service.com/webhook", - "project_id": "aac12556-4d65-4d34-9fb6-d1f0985eb0a9", - "events": [ - components.Events.STREAM_STARTED, - components.Events.STREAM_IDLE, - ], - "shared_secret": "my-secret", - "stream_id": "de7818e7-610a-4057-8f6f-b785dc1e6f88", -}) - -if res.webhook is not None: - # handle response - pass +) as livepeer: + + res = livepeer.webhook.create(request={ + "name": "test_webhook", + "url": "https://my-service.com/webhook", + "project_id": "aac12556-4d65-4d34-9fb6-d1f0985eb0a9", + "events": [ + components.Events.STREAM_STARTED, + components.Events.STREAM_IDLE, + ], + "shared_secret": "my-secret", + "stream_id": "de7818e7-610a-4057-8f6f-b785dc1e6f88", + }) + + assert res.webhook is not None + + # Handle response + print(res.webhook) ``` @@ -100,10 +101,9 @@ if res.webhook is not None: ### Errors -| Error Object | Status Code | Content Type | +| Error Type | Status Code | Content Type | | --------------- | --------------- | --------------- | -| errors.SDKError | 4xx-5xx | */* | - +| errors.SDKError | 4XX, 5XX | \*/\* | ## get @@ -114,15 +114,16 @@ Retrieve a webhook ```python from livepeer import Livepeer -s = Livepeer( +with Livepeer( api_key="", -) +) as livepeer: + + res = livepeer.webhook.get(id="") -res = s.webhook.get(id="") + assert res.webhook is not None -if res.webhook is not None: - # handle response - pass + # Handle response + print(res.webhook) ``` @@ -139,10 +140,9 @@ if res.webhook is not None: ### Errors -| Error Object | Status Code | Content Type | +| Error Type | Status Code | Content Type | | --------------- | --------------- | --------------- | -| errors.SDKError | 4xx-5xx | */* | - +| errors.SDKError | 4XX, 5XX | \*/\* | ## update @@ -154,25 +154,26 @@ Update a webhook from livepeer import Livepeer from livepeer.models import components -s = Livepeer( +with Livepeer( api_key="", -) - -res = s.webhook.update(id="", webhook={ - "name": "test_webhook", - "url": "https://my-service.com/webhook", - "project_id": "aac12556-4d65-4d34-9fb6-d1f0985eb0a9", - "events": [ - components.Events.STREAM_STARTED, - components.Events.STREAM_IDLE, - ], - "shared_secret": "my-secret", - "stream_id": "de7818e7-610a-4057-8f6f-b785dc1e6f88", -}) - -if res.webhook is not None: - # handle response - pass +) as livepeer: + + res = livepeer.webhook.update(id="", webhook={ + "name": "test_webhook", + "url": "https://my-service.com/webhook", + "project_id": "aac12556-4d65-4d34-9fb6-d1f0985eb0a9", + "events": [ + components.Events.STREAM_STARTED, + components.Events.STREAM_IDLE, + ], + "shared_secret": "my-secret", + "stream_id": "de7818e7-610a-4057-8f6f-b785dc1e6f88", + }) + + assert res.webhook is not None + + # Handle response + print(res.webhook) ``` @@ -190,10 +191,9 @@ if res.webhook is not None: ### Errors -| Error Object | Status Code | Content Type | +| Error Type | Status Code | Content Type | | --------------- | --------------- | --------------- | -| errors.SDKError | 4xx-5xx | */* | - +| errors.SDKError | 4XX, 5XX | \*/\* | ## delete @@ -204,15 +204,16 @@ Delete a webhook ```python from livepeer import Livepeer -s = Livepeer( +with Livepeer( api_key="", -) +) as livepeer: + + res = livepeer.webhook.delete(id="") -res = s.webhook.delete(id="") + assert res.webhook is not None -if res.webhook is not None: - # handle response - pass + # Handle response + print(res.webhook) ``` @@ -229,10 +230,9 @@ if res.webhook is not None: ### Errors -| Error Object | Status Code | Content Type | +| Error Type | Status Code | Content Type | | --------------- | --------------- | --------------- | -| errors.SDKError | 4xx-5xx | */* | - +| errors.SDKError | 4XX, 5XX | \*/\* | ## get_logs @@ -243,15 +243,16 @@ Retrieve webhook logs ```python from livepeer import Livepeer -s = Livepeer( +with Livepeer( api_key="", -) +) as livepeer: + + res = livepeer.webhook.get_logs(id="") -res = s.webhook.get_logs(id="") + assert res.data is not None -if res.data is not None: - # handle response - pass + # Handle response + print(res.data) ``` @@ -268,10 +269,9 @@ if res.data is not None: ### Errors -| Error Object | Status Code | Content Type | +| Error Type | Status Code | Content Type | | --------------- | --------------- | --------------- | -| errors.SDKError | 4xx-5xx | */* | - +| errors.SDKError | 4XX, 5XX | \*/\* | ## get_log @@ -282,15 +282,16 @@ Retrieve a webhook log ```python from livepeer import Livepeer -s = Livepeer( +with Livepeer( api_key="", -) +) as livepeer: + + res = livepeer.webhook.get_log(id="", log_id="") -res = s.webhook.get_log(id="", log_id="") + assert res.webhook_log is not None -if res.webhook_log is not None: - # handle response - pass + # Handle response + print(res.webhook_log) ``` @@ -308,10 +309,9 @@ if res.webhook_log is not None: ### Errors -| Error Object | Status Code | Content Type | +| Error Type | Status Code | Content Type | | --------------- | --------------- | --------------- | -| errors.SDKError | 4xx-5xx | */* | - +| errors.SDKError | 4XX, 5XX | \*/\* | ## resend_log @@ -325,15 +325,16 @@ to check or fix the behaviour in your handler. ```python from livepeer import Livepeer -s = Livepeer( +with Livepeer( api_key="", -) +) as livepeer: + + res = livepeer.webhook.resend_log(id="", log_id="") -res = s.webhook.resend_log(id="", log_id="") + assert res.webhook_log is not None -if res.webhook_log is not None: - # handle response - pass + # Handle response + print(res.webhook_log) ``` @@ -351,6 +352,6 @@ if res.webhook_log is not None: ### Errors -| Error Object | Status Code | Content Type | +| Error Type | Status Code | Content Type | | --------------- | --------------- | --------------- | -| errors.SDKError | 4xx-5xx | */* | +| errors.SDKError | 4XX, 5XX | \*/\* | \ No newline at end of file diff --git a/poetry.lock b/poetry.lock index 9b22df1..6c89f52 100644 --- a/poetry.lock +++ b/poetry.lock @@ -149,13 +149,13 @@ trio = ["trio (>=0.22.0,<0.26.0)"] [[package]] name = "httpx" -version = "0.27.2" +version = "0.28.1" description = "The next generation HTTP client." optional = false python-versions = ">=3.8" files = [ - {file = "httpx-0.27.2-py3-none-any.whl", hash = "sha256:7bb2708e112d8fdd7829cd4243970f0c223274051cb35ee80c03301ee29a3df0"}, - {file = "httpx-0.27.2.tar.gz", hash = "sha256:f7c2be1d2f3c3c3160d441802406b206c2b76f5947b11115e6df10c6c65e66c2"}, + {file = "httpx-0.28.1-py3-none-any.whl", hash = "sha256:d909fcccc110f8c7faf814ca82a9a4d816bc5a6dbfea25d6591d6985b8ba59ad"}, + {file = "httpx-0.28.1.tar.gz", hash = "sha256:75e98c5f16b0f35b567856f597f06ff2270a374470a5c2392242528e3e3e42fc"}, ] [package.dependencies] @@ -163,7 +163,6 @@ anyio = "*" certifi = "*" httpcore = "==1.*" idna = "*" -sniffio = "*" [package.extras] brotli = ["brotli", "brotlicffi"] @@ -224,47 +223,53 @@ files = [ [[package]] name = "mypy" -version = "1.10.1" +version = "1.13.0" description = "Optional static typing for Python" optional = false python-versions = ">=3.8" files = [ - {file = "mypy-1.10.1-cp310-cp310-macosx_10_9_x86_64.whl", hash = "sha256:e36f229acfe250dc660790840916eb49726c928e8ce10fbdf90715090fe4ae02"}, - {file = "mypy-1.10.1-cp310-cp310-macosx_11_0_arm64.whl", hash = "sha256:51a46974340baaa4145363b9e051812a2446cf583dfaeba124af966fa44593f7"}, - {file = "mypy-1.10.1-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:901c89c2d67bba57aaaca91ccdb659aa3a312de67f23b9dfb059727cce2e2e0a"}, - {file = "mypy-1.10.1-cp310-cp310-musllinux_1_1_x86_64.whl", hash = "sha256:0cd62192a4a32b77ceb31272d9e74d23cd88c8060c34d1d3622db3267679a5d9"}, - {file = "mypy-1.10.1-cp310-cp310-win_amd64.whl", hash = "sha256:a2cbc68cb9e943ac0814c13e2452d2046c2f2b23ff0278e26599224cf164e78d"}, - {file = "mypy-1.10.1-cp311-cp311-macosx_10_9_x86_64.whl", hash = "sha256:bd6f629b67bb43dc0d9211ee98b96d8dabc97b1ad38b9b25f5e4c4d7569a0c6a"}, - {file = "mypy-1.10.1-cp311-cp311-macosx_11_0_arm64.whl", hash = "sha256:a1bbb3a6f5ff319d2b9d40b4080d46cd639abe3516d5a62c070cf0114a457d84"}, - {file = "mypy-1.10.1-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:b8edd4e9bbbc9d7b79502eb9592cab808585516ae1bcc1446eb9122656c6066f"}, - {file = "mypy-1.10.1-cp311-cp311-musllinux_1_1_x86_64.whl", hash = "sha256:6166a88b15f1759f94a46fa474c7b1b05d134b1b61fca627dd7335454cc9aa6b"}, - {file = "mypy-1.10.1-cp311-cp311-win_amd64.whl", hash = "sha256:5bb9cd11c01c8606a9d0b83ffa91d0b236a0e91bc4126d9ba9ce62906ada868e"}, - {file = "mypy-1.10.1-cp312-cp312-macosx_10_9_x86_64.whl", hash = "sha256:d8681909f7b44d0b7b86e653ca152d6dff0eb5eb41694e163c6092124f8246d7"}, - {file = "mypy-1.10.1-cp312-cp312-macosx_11_0_arm64.whl", hash = "sha256:378c03f53f10bbdd55ca94e46ec3ba255279706a6aacaecac52ad248f98205d3"}, - {file = "mypy-1.10.1-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:6bacf8f3a3d7d849f40ca6caea5c055122efe70e81480c8328ad29c55c69e93e"}, - {file = "mypy-1.10.1-cp312-cp312-musllinux_1_1_x86_64.whl", hash = "sha256:701b5f71413f1e9855566a34d6e9d12624e9e0a8818a5704d74d6b0402e66c04"}, - {file = "mypy-1.10.1-cp312-cp312-win_amd64.whl", hash = "sha256:3c4c2992f6ea46ff7fce0072642cfb62af7a2484efe69017ed8b095f7b39ef31"}, - {file = "mypy-1.10.1-cp38-cp38-macosx_10_9_x86_64.whl", hash = "sha256:604282c886497645ffb87b8f35a57ec773a4a2721161e709a4422c1636ddde5c"}, - {file = "mypy-1.10.1-cp38-cp38-macosx_11_0_arm64.whl", hash = "sha256:37fd87cab83f09842653f08de066ee68f1182b9b5282e4634cdb4b407266bade"}, - {file = "mypy-1.10.1-cp38-cp38-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:8addf6313777dbb92e9564c5d32ec122bf2c6c39d683ea64de6a1fd98b90fe37"}, - {file = "mypy-1.10.1-cp38-cp38-musllinux_1_1_x86_64.whl", hash = "sha256:5cc3ca0a244eb9a5249c7c583ad9a7e881aa5d7b73c35652296ddcdb33b2b9c7"}, - {file = "mypy-1.10.1-cp38-cp38-win_amd64.whl", hash = "sha256:1b3a2ffce52cc4dbaeee4df762f20a2905aa171ef157b82192f2e2f368eec05d"}, - {file = "mypy-1.10.1-cp39-cp39-macosx_10_9_x86_64.whl", hash = "sha256:fe85ed6836165d52ae8b88f99527d3d1b2362e0cb90b005409b8bed90e9059b3"}, - {file = "mypy-1.10.1-cp39-cp39-macosx_11_0_arm64.whl", hash = "sha256:c2ae450d60d7d020d67ab440c6e3fae375809988119817214440033f26ddf7bf"}, - {file = "mypy-1.10.1-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:6be84c06e6abd72f960ba9a71561c14137a583093ffcf9bbfaf5e613d63fa531"}, - {file = "mypy-1.10.1-cp39-cp39-musllinux_1_1_x86_64.whl", hash = "sha256:2189ff1e39db399f08205e22a797383613ce1cb0cb3b13d8bcf0170e45b96cc3"}, - {file = "mypy-1.10.1-cp39-cp39-win_amd64.whl", hash = "sha256:97a131ee36ac37ce9581f4220311247ab6cba896b4395b9c87af0675a13a755f"}, - {file = "mypy-1.10.1-py3-none-any.whl", hash = "sha256:71d8ac0b906354ebda8ef1673e5fde785936ac1f29ff6987c7483cfbd5a4235a"}, - {file = "mypy-1.10.1.tar.gz", hash = "sha256:1f8f492d7db9e3593ef42d4f115f04e556130f2819ad33ab84551403e97dd4c0"}, + {file = "mypy-1.13.0-cp310-cp310-macosx_10_9_x86_64.whl", hash = "sha256:6607e0f1dd1fb7f0aca14d936d13fd19eba5e17e1cd2a14f808fa5f8f6d8f60a"}, + {file = "mypy-1.13.0-cp310-cp310-macosx_11_0_arm64.whl", hash = "sha256:8a21be69bd26fa81b1f80a61ee7ab05b076c674d9b18fb56239d72e21d9f4c80"}, + {file = "mypy-1.13.0-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.manylinux_2_28_x86_64.whl", hash = "sha256:7b2353a44d2179846a096e25691d54d59904559f4232519d420d64da6828a3a7"}, + {file = "mypy-1.13.0-cp310-cp310-musllinux_1_1_x86_64.whl", hash = "sha256:0730d1c6a2739d4511dc4253f8274cdd140c55c32dfb0a4cf8b7a43f40abfa6f"}, + {file = "mypy-1.13.0-cp310-cp310-win_amd64.whl", hash = "sha256:c5fc54dbb712ff5e5a0fca797e6e0aa25726c7e72c6a5850cfd2adbc1eb0a372"}, + {file = "mypy-1.13.0-cp311-cp311-macosx_10_9_x86_64.whl", hash = "sha256:581665e6f3a8a9078f28d5502f4c334c0c8d802ef55ea0e7276a6e409bc0d82d"}, + {file = "mypy-1.13.0-cp311-cp311-macosx_11_0_arm64.whl", hash = "sha256:3ddb5b9bf82e05cc9a627e84707b528e5c7caaa1c55c69e175abb15a761cec2d"}, + {file = "mypy-1.13.0-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.manylinux_2_28_x86_64.whl", hash = "sha256:20c7ee0bc0d5a9595c46f38beb04201f2620065a93755704e141fcac9f59db2b"}, + {file = "mypy-1.13.0-cp311-cp311-musllinux_1_1_x86_64.whl", hash = "sha256:3790ded76f0b34bc9c8ba4def8f919dd6a46db0f5a6610fb994fe8efdd447f73"}, + {file = "mypy-1.13.0-cp311-cp311-win_amd64.whl", hash = "sha256:51f869f4b6b538229c1d1bcc1dd7d119817206e2bc54e8e374b3dfa202defcca"}, + {file = "mypy-1.13.0-cp312-cp312-macosx_10_13_x86_64.whl", hash = "sha256:5c7051a3461ae84dfb5dd15eff5094640c61c5f22257c8b766794e6dd85e72d5"}, + {file = "mypy-1.13.0-cp312-cp312-macosx_11_0_arm64.whl", hash = "sha256:39bb21c69a5d6342f4ce526e4584bc5c197fd20a60d14a8624d8743fffb9472e"}, + {file = "mypy-1.13.0-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.manylinux_2_28_x86_64.whl", hash = "sha256:164f28cb9d6367439031f4c81e84d3ccaa1e19232d9d05d37cb0bd880d3f93c2"}, + {file = "mypy-1.13.0-cp312-cp312-musllinux_1_1_x86_64.whl", hash = "sha256:a4c1bfcdbce96ff5d96fc9b08e3831acb30dc44ab02671eca5953eadad07d6d0"}, + {file = "mypy-1.13.0-cp312-cp312-win_amd64.whl", hash = "sha256:a0affb3a79a256b4183ba09811e3577c5163ed06685e4d4b46429a271ba174d2"}, + {file = "mypy-1.13.0-cp313-cp313-macosx_10_13_x86_64.whl", hash = "sha256:a7b44178c9760ce1a43f544e595d35ed61ac2c3de306599fa59b38a6048e1aa7"}, + {file = "mypy-1.13.0-cp313-cp313-macosx_11_0_arm64.whl", hash = "sha256:5d5092efb8516d08440e36626f0153b5006d4088c1d663d88bf79625af3d1d62"}, + {file = "mypy-1.13.0-cp313-cp313-manylinux_2_17_x86_64.manylinux2014_x86_64.manylinux_2_28_x86_64.whl", hash = "sha256:de2904956dac40ced10931ac967ae63c5089bd498542194b436eb097a9f77bc8"}, + {file = "mypy-1.13.0-cp313-cp313-musllinux_1_1_x86_64.whl", hash = "sha256:7bfd8836970d33c2105562650656b6846149374dc8ed77d98424b40b09340ba7"}, + {file = "mypy-1.13.0-cp313-cp313-win_amd64.whl", hash = "sha256:9f73dba9ec77acb86457a8fc04b5239822df0c14a082564737833d2963677dbc"}, + {file = "mypy-1.13.0-cp38-cp38-macosx_10_9_x86_64.whl", hash = "sha256:100fac22ce82925f676a734af0db922ecfea991e1d7ec0ceb1e115ebe501301a"}, + {file = "mypy-1.13.0-cp38-cp38-macosx_11_0_arm64.whl", hash = "sha256:7bcb0bb7f42a978bb323a7c88f1081d1b5dee77ca86f4100735a6f541299d8fb"}, + {file = "mypy-1.13.0-cp38-cp38-manylinux_2_17_x86_64.manylinux2014_x86_64.manylinux_2_28_x86_64.whl", hash = "sha256:bde31fc887c213e223bbfc34328070996061b0833b0a4cfec53745ed61f3519b"}, + {file = "mypy-1.13.0-cp38-cp38-musllinux_1_1_x86_64.whl", hash = "sha256:07de989f89786f62b937851295ed62e51774722e5444a27cecca993fc3f9cd74"}, + {file = "mypy-1.13.0-cp38-cp38-win_amd64.whl", hash = "sha256:4bde84334fbe19bad704b3f5b78c4abd35ff1026f8ba72b29de70dda0916beb6"}, + {file = "mypy-1.13.0-cp39-cp39-macosx_10_9_x86_64.whl", hash = "sha256:0246bcb1b5de7f08f2826451abd947bf656945209b140d16ed317f65a17dc7dc"}, + {file = "mypy-1.13.0-cp39-cp39-macosx_11_0_arm64.whl", hash = "sha256:7f5b7deae912cf8b77e990b9280f170381fdfbddf61b4ef80927edd813163732"}, + {file = "mypy-1.13.0-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.manylinux_2_28_x86_64.whl", hash = "sha256:7029881ec6ffb8bc233a4fa364736789582c738217b133f1b55967115288a2bc"}, + {file = "mypy-1.13.0-cp39-cp39-musllinux_1_1_x86_64.whl", hash = "sha256:3e38b980e5681f28f033f3be86b099a247b13c491f14bb8b1e1e134d23bb599d"}, + {file = "mypy-1.13.0-cp39-cp39-win_amd64.whl", hash = "sha256:a6789be98a2017c912ae6ccb77ea553bbaf13d27605d2ca20a76dfbced631b24"}, + {file = "mypy-1.13.0-py3-none-any.whl", hash = "sha256:9c250883f9fd81d212e0952c92dbfcc96fc237f4b7c92f56ac81fd48460b3e5a"}, + {file = "mypy-1.13.0.tar.gz", hash = "sha256:0291a61b6fbf3e6673e3405cfcc0e7650bebc7939659fdca2702958038bd835e"}, ] [package.dependencies] mypy-extensions = ">=1.0.0" tomli = {version = ">=1.1.0", markers = "python_version < \"3.11\""} -typing-extensions = ">=4.1.0" +typing-extensions = ">=4.6.0" [package.extras] dmypy = ["psutil (>=4.0)"] +faster-cache = ["orjson"] install-types = ["pip"] mypyc = ["setuptools (>=50)"] reports = ["lxml"] @@ -298,22 +303,19 @@ type = ["mypy (>=1.11.2)"] [[package]] name = "pydantic" -version = "2.9.2" +version = "2.10.3" description = "Data validation using Python type hints" optional = false python-versions = ">=3.8" files = [ - {file = "pydantic-2.9.2-py3-none-any.whl", hash = "sha256:f048cec7b26778210e28a0459867920654d48e5e62db0958433636cde4254f12"}, - {file = "pydantic-2.9.2.tar.gz", hash = "sha256:d155cef71265d1e9807ed1c32b4c8deec042a44a50a4188b25ac67ecd81a9c0f"}, + {file = "pydantic-2.10.3-py3-none-any.whl", hash = "sha256:be04d85bbc7b65651c5f8e6b9976ed9c6f41782a55524cef079a34a0bb82144d"}, + {file = "pydantic-2.10.3.tar.gz", hash = "sha256:cb5ac360ce894ceacd69c403187900a02c4b20b693a9dd1d643e1effab9eadf9"}, ] [package.dependencies] annotated-types = ">=0.6.0" -pydantic-core = "2.23.4" -typing-extensions = [ - {version = ">=4.6.1", markers = "python_version < \"3.13\""}, - {version = ">=4.12.2", markers = "python_version >= \"3.13\""}, -] +pydantic-core = "2.27.1" +typing-extensions = ">=4.12.2" [package.extras] email = ["email-validator (>=2.0.0)"] @@ -321,100 +323,111 @@ timezone = ["tzdata"] [[package]] name = "pydantic-core" -version = "2.23.4" +version = "2.27.1" description = "Core functionality for Pydantic validation and serialization" optional = false python-versions = ">=3.8" files = [ - {file = "pydantic_core-2.23.4-cp310-cp310-macosx_10_12_x86_64.whl", hash = "sha256:b10bd51f823d891193d4717448fab065733958bdb6a6b351967bd349d48d5c9b"}, - {file = "pydantic_core-2.23.4-cp310-cp310-macosx_11_0_arm64.whl", hash = "sha256:4fc714bdbfb534f94034efaa6eadd74e5b93c8fa6315565a222f7b6f42ca1166"}, - {file = "pydantic_core-2.23.4-cp310-cp310-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:63e46b3169866bd62849936de036f901a9356e36376079b05efa83caeaa02ceb"}, - {file = "pydantic_core-2.23.4-cp310-cp310-manylinux_2_17_armv7l.manylinux2014_armv7l.whl", hash = "sha256:ed1a53de42fbe34853ba90513cea21673481cd81ed1be739f7f2efb931b24916"}, - {file = "pydantic_core-2.23.4-cp310-cp310-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:cfdd16ab5e59fc31b5e906d1a3f666571abc367598e3e02c83403acabc092e07"}, - {file = "pydantic_core-2.23.4-cp310-cp310-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:255a8ef062cbf6674450e668482456abac99a5583bbafb73f9ad469540a3a232"}, - {file = "pydantic_core-2.23.4-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:4a7cd62e831afe623fbb7aabbb4fe583212115b3ef38a9f6b71869ba644624a2"}, - {file = "pydantic_core-2.23.4-cp310-cp310-manylinux_2_5_i686.manylinux1_i686.whl", hash = "sha256:f09e2ff1f17c2b51f2bc76d1cc33da96298f0a036a137f5440ab3ec5360b624f"}, - {file = "pydantic_core-2.23.4-cp310-cp310-musllinux_1_1_aarch64.whl", hash = "sha256:e38e63e6f3d1cec5a27e0afe90a085af8b6806ee208b33030e65b6516353f1a3"}, - {file = "pydantic_core-2.23.4-cp310-cp310-musllinux_1_1_x86_64.whl", hash = "sha256:0dbd8dbed2085ed23b5c04afa29d8fd2771674223135dc9bc937f3c09284d071"}, - {file = "pydantic_core-2.23.4-cp310-none-win32.whl", hash = "sha256:6531b7ca5f951d663c339002e91aaebda765ec7d61b7d1e3991051906ddde119"}, - {file = "pydantic_core-2.23.4-cp310-none-win_amd64.whl", hash = "sha256:7c9129eb40958b3d4500fa2467e6a83356b3b61bfff1b414c7361d9220f9ae8f"}, - {file = "pydantic_core-2.23.4-cp311-cp311-macosx_10_12_x86_64.whl", hash = "sha256:77733e3892bb0a7fa797826361ce8a9184d25c8dffaec60b7ffe928153680ba8"}, - {file = "pydantic_core-2.23.4-cp311-cp311-macosx_11_0_arm64.whl", hash = "sha256:1b84d168f6c48fabd1f2027a3d1bdfe62f92cade1fb273a5d68e621da0e44e6d"}, - {file = "pydantic_core-2.23.4-cp311-cp311-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:df49e7a0861a8c36d089c1ed57d308623d60416dab2647a4a17fe050ba85de0e"}, - {file = "pydantic_core-2.23.4-cp311-cp311-manylinux_2_17_armv7l.manylinux2014_armv7l.whl", hash = "sha256:ff02b6d461a6de369f07ec15e465a88895f3223eb75073ffea56b84d9331f607"}, - {file = "pydantic_core-2.23.4-cp311-cp311-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:996a38a83508c54c78a5f41456b0103c30508fed9abcad0a59b876d7398f25fd"}, - {file = "pydantic_core-2.23.4-cp311-cp311-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:d97683ddee4723ae8c95d1eddac7c192e8c552da0c73a925a89fa8649bf13eea"}, - {file = "pydantic_core-2.23.4-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:216f9b2d7713eb98cb83c80b9c794de1f6b7e3145eef40400c62e86cee5f4e1e"}, - {file = "pydantic_core-2.23.4-cp311-cp311-manylinux_2_5_i686.manylinux1_i686.whl", hash = "sha256:6f783e0ec4803c787bcea93e13e9932edab72068f68ecffdf86a99fd5918878b"}, - {file = "pydantic_core-2.23.4-cp311-cp311-musllinux_1_1_aarch64.whl", hash = "sha256:d0776dea117cf5272382634bd2a5c1b6eb16767c223c6a5317cd3e2a757c61a0"}, - {file = "pydantic_core-2.23.4-cp311-cp311-musllinux_1_1_x86_64.whl", hash = "sha256:d5f7a395a8cf1621939692dba2a6b6a830efa6b3cee787d82c7de1ad2930de64"}, - {file = "pydantic_core-2.23.4-cp311-none-win32.whl", hash = "sha256:74b9127ffea03643e998e0c5ad9bd3811d3dac8c676e47db17b0ee7c3c3bf35f"}, - {file = "pydantic_core-2.23.4-cp311-none-win_amd64.whl", hash = "sha256:98d134c954828488b153d88ba1f34e14259284f256180ce659e8d83e9c05eaa3"}, - {file = "pydantic_core-2.23.4-cp312-cp312-macosx_10_12_x86_64.whl", hash = "sha256:f3e0da4ebaef65158d4dfd7d3678aad692f7666877df0002b8a522cdf088f231"}, - {file = "pydantic_core-2.23.4-cp312-cp312-macosx_11_0_arm64.whl", hash = "sha256:f69a8e0b033b747bb3e36a44e7732f0c99f7edd5cea723d45bc0d6e95377ffee"}, - {file = "pydantic_core-2.23.4-cp312-cp312-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:723314c1d51722ab28bfcd5240d858512ffd3116449c557a1336cbe3919beb87"}, - {file = "pydantic_core-2.23.4-cp312-cp312-manylinux_2_17_armv7l.manylinux2014_armv7l.whl", hash = "sha256:bb2802e667b7051a1bebbfe93684841cc9351004e2badbd6411bf357ab8d5ac8"}, - {file = "pydantic_core-2.23.4-cp312-cp312-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:d18ca8148bebe1b0a382a27a8ee60350091a6ddaf475fa05ef50dc35b5df6327"}, - {file = "pydantic_core-2.23.4-cp312-cp312-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:33e3d65a85a2a4a0dc3b092b938a4062b1a05f3a9abde65ea93b233bca0e03f2"}, - {file = "pydantic_core-2.23.4-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:128585782e5bfa515c590ccee4b727fb76925dd04a98864182b22e89a4e6ed36"}, - {file = "pydantic_core-2.23.4-cp312-cp312-manylinux_2_5_i686.manylinux1_i686.whl", hash = "sha256:68665f4c17edcceecc112dfed5dbe6f92261fb9d6054b47d01bf6371a6196126"}, - {file = "pydantic_core-2.23.4-cp312-cp312-musllinux_1_1_aarch64.whl", hash = "sha256:20152074317d9bed6b7a95ade3b7d6054845d70584216160860425f4fbd5ee9e"}, - {file = "pydantic_core-2.23.4-cp312-cp312-musllinux_1_1_x86_64.whl", hash = "sha256:9261d3ce84fa1d38ed649c3638feefeae23d32ba9182963e465d58d62203bd24"}, - {file = "pydantic_core-2.23.4-cp312-none-win32.whl", hash = "sha256:4ba762ed58e8d68657fc1281e9bb72e1c3e79cc5d464be146e260c541ec12d84"}, - {file = "pydantic_core-2.23.4-cp312-none-win_amd64.whl", hash = "sha256:97df63000f4fea395b2824da80e169731088656d1818a11b95f3b173747b6cd9"}, - {file = "pydantic_core-2.23.4-cp313-cp313-macosx_10_12_x86_64.whl", hash = "sha256:7530e201d10d7d14abce4fb54cfe5b94a0aefc87da539d0346a484ead376c3cc"}, - {file = "pydantic_core-2.23.4-cp313-cp313-macosx_11_0_arm64.whl", hash = "sha256:df933278128ea1cd77772673c73954e53a1c95a4fdf41eef97c2b779271bd0bd"}, - {file = "pydantic_core-2.23.4-cp313-cp313-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:0cb3da3fd1b6a5d0279a01877713dbda118a2a4fc6f0d821a57da2e464793f05"}, - {file = "pydantic_core-2.23.4-cp313-cp313-manylinux_2_17_armv7l.manylinux2014_armv7l.whl", hash = "sha256:42c6dcb030aefb668a2b7009c85b27f90e51e6a3b4d5c9bc4c57631292015b0d"}, - {file = "pydantic_core-2.23.4-cp313-cp313-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:696dd8d674d6ce621ab9d45b205df149399e4bb9aa34102c970b721554828510"}, - {file = "pydantic_core-2.23.4-cp313-cp313-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:2971bb5ffe72cc0f555c13e19b23c85b654dd2a8f7ab493c262071377bfce9f6"}, - {file = "pydantic_core-2.23.4-cp313-cp313-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:8394d940e5d400d04cad4f75c0598665cbb81aecefaca82ca85bd28264af7f9b"}, - {file = "pydantic_core-2.23.4-cp313-cp313-manylinux_2_5_i686.manylinux1_i686.whl", hash = "sha256:0dff76e0602ca7d4cdaacc1ac4c005e0ce0dcfe095d5b5259163a80d3a10d327"}, - {file = "pydantic_core-2.23.4-cp313-cp313-musllinux_1_1_aarch64.whl", hash = "sha256:7d32706badfe136888bdea71c0def994644e09fff0bfe47441deaed8e96fdbc6"}, - {file = "pydantic_core-2.23.4-cp313-cp313-musllinux_1_1_x86_64.whl", hash = "sha256:ed541d70698978a20eb63d8c5d72f2cc6d7079d9d90f6b50bad07826f1320f5f"}, - {file = "pydantic_core-2.23.4-cp313-none-win32.whl", hash = "sha256:3d5639516376dce1940ea36edf408c554475369f5da2abd45d44621cb616f769"}, - {file = "pydantic_core-2.23.4-cp313-none-win_amd64.whl", hash = "sha256:5a1504ad17ba4210df3a045132a7baeeba5a200e930f57512ee02909fc5c4cb5"}, - {file = "pydantic_core-2.23.4-cp38-cp38-macosx_10_12_x86_64.whl", hash = "sha256:d4488a93b071c04dc20f5cecc3631fc78b9789dd72483ba15d423b5b3689b555"}, - {file = "pydantic_core-2.23.4-cp38-cp38-macosx_11_0_arm64.whl", hash = "sha256:81965a16b675b35e1d09dd14df53f190f9129c0202356ed44ab2728b1c905658"}, - {file = "pydantic_core-2.23.4-cp38-cp38-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:4ffa2ebd4c8530079140dd2d7f794a9d9a73cbb8e9d59ffe24c63436efa8f271"}, - {file = "pydantic_core-2.23.4-cp38-cp38-manylinux_2_17_armv7l.manylinux2014_armv7l.whl", hash = "sha256:61817945f2fe7d166e75fbfb28004034b48e44878177fc54d81688e7b85a3665"}, - {file = "pydantic_core-2.23.4-cp38-cp38-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:29d2c342c4bc01b88402d60189f3df065fb0dda3654744d5a165a5288a657368"}, - {file = "pydantic_core-2.23.4-cp38-cp38-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:5e11661ce0fd30a6790e8bcdf263b9ec5988e95e63cf901972107efc49218b13"}, - {file = "pydantic_core-2.23.4-cp38-cp38-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:9d18368b137c6295db49ce7218b1a9ba15c5bc254c96d7c9f9e924a9bc7825ad"}, - {file = "pydantic_core-2.23.4-cp38-cp38-manylinux_2_5_i686.manylinux1_i686.whl", hash = "sha256:ec4e55f79b1c4ffb2eecd8a0cfba9955a2588497d96851f4c8f99aa4a1d39b12"}, - {file = "pydantic_core-2.23.4-cp38-cp38-musllinux_1_1_aarch64.whl", hash = "sha256:374a5e5049eda9e0a44c696c7ade3ff355f06b1fe0bb945ea3cac2bc336478a2"}, - {file = "pydantic_core-2.23.4-cp38-cp38-musllinux_1_1_x86_64.whl", hash = "sha256:5c364564d17da23db1106787675fc7af45f2f7b58b4173bfdd105564e132e6fb"}, - {file = "pydantic_core-2.23.4-cp38-none-win32.whl", hash = "sha256:d7a80d21d613eec45e3d41eb22f8f94ddc758a6c4720842dc74c0581f54993d6"}, - {file = "pydantic_core-2.23.4-cp38-none-win_amd64.whl", hash = "sha256:5f5ff8d839f4566a474a969508fe1c5e59c31c80d9e140566f9a37bba7b8d556"}, - {file = "pydantic_core-2.23.4-cp39-cp39-macosx_10_12_x86_64.whl", hash = "sha256:a4fa4fc04dff799089689f4fd502ce7d59de529fc2f40a2c8836886c03e0175a"}, - {file = "pydantic_core-2.23.4-cp39-cp39-macosx_11_0_arm64.whl", hash = "sha256:0a7df63886be5e270da67e0966cf4afbae86069501d35c8c1b3b6c168f42cb36"}, - {file = "pydantic_core-2.23.4-cp39-cp39-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:dcedcd19a557e182628afa1d553c3895a9f825b936415d0dbd3cd0bbcfd29b4b"}, - {file = "pydantic_core-2.23.4-cp39-cp39-manylinux_2_17_armv7l.manylinux2014_armv7l.whl", hash = "sha256:5f54b118ce5de9ac21c363d9b3caa6c800341e8c47a508787e5868c6b79c9323"}, - {file = "pydantic_core-2.23.4-cp39-cp39-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:86d2f57d3e1379a9525c5ab067b27dbb8a0642fb5d454e17a9ac434f9ce523e3"}, - {file = "pydantic_core-2.23.4-cp39-cp39-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:de6d1d1b9e5101508cb37ab0d972357cac5235f5c6533d1071964c47139257df"}, - {file = "pydantic_core-2.23.4-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:1278e0d324f6908e872730c9102b0112477a7f7cf88b308e4fc36ce1bdb6d58c"}, - {file = "pydantic_core-2.23.4-cp39-cp39-manylinux_2_5_i686.manylinux1_i686.whl", hash = "sha256:9a6b5099eeec78827553827f4c6b8615978bb4b6a88e5d9b93eddf8bb6790f55"}, - {file = "pydantic_core-2.23.4-cp39-cp39-musllinux_1_1_aarch64.whl", hash = "sha256:e55541f756f9b3ee346b840103f32779c695a19826a4c442b7954550a0972040"}, - {file = "pydantic_core-2.23.4-cp39-cp39-musllinux_1_1_x86_64.whl", hash = "sha256:a5c7ba8ffb6d6f8f2ab08743be203654bb1aaa8c9dcb09f82ddd34eadb695605"}, - {file = "pydantic_core-2.23.4-cp39-none-win32.whl", hash = "sha256:37b0fe330e4a58d3c58b24d91d1eb102aeec675a3db4c292ec3928ecd892a9a6"}, - {file = "pydantic_core-2.23.4-cp39-none-win_amd64.whl", hash = "sha256:1498bec4c05c9c787bde9125cfdcc63a41004ff167f495063191b863399b1a29"}, - {file = "pydantic_core-2.23.4-pp310-pypy310_pp73-macosx_10_12_x86_64.whl", hash = "sha256:f455ee30a9d61d3e1a15abd5068827773d6e4dc513e795f380cdd59932c782d5"}, - {file = "pydantic_core-2.23.4-pp310-pypy310_pp73-macosx_11_0_arm64.whl", hash = "sha256:1e90d2e3bd2c3863d48525d297cd143fe541be8bbf6f579504b9712cb6b643ec"}, - {file = "pydantic_core-2.23.4-pp310-pypy310_pp73-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:2e203fdf807ac7e12ab59ca2bfcabb38c7cf0b33c41efeb00f8e5da1d86af480"}, - {file = "pydantic_core-2.23.4-pp310-pypy310_pp73-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:e08277a400de01bc72436a0ccd02bdf596631411f592ad985dcee21445bd0068"}, - {file = "pydantic_core-2.23.4-pp310-pypy310_pp73-manylinux_2_5_i686.manylinux1_i686.whl", hash = "sha256:f220b0eea5965dec25480b6333c788fb72ce5f9129e8759ef876a1d805d00801"}, - {file = "pydantic_core-2.23.4-pp310-pypy310_pp73-musllinux_1_1_aarch64.whl", hash = "sha256:d06b0c8da4f16d1d1e352134427cb194a0a6e19ad5db9161bf32b2113409e728"}, - {file = "pydantic_core-2.23.4-pp310-pypy310_pp73-musllinux_1_1_x86_64.whl", hash = "sha256:ba1a0996f6c2773bd83e63f18914c1de3c9dd26d55f4ac302a7efe93fb8e7433"}, - {file = "pydantic_core-2.23.4-pp310-pypy310_pp73-win_amd64.whl", hash = "sha256:9a5bce9d23aac8f0cf0836ecfc033896aa8443b501c58d0602dbfd5bd5b37753"}, - {file = "pydantic_core-2.23.4-pp39-pypy39_pp73-macosx_10_12_x86_64.whl", hash = "sha256:78ddaaa81421a29574a682b3179d4cf9e6d405a09b99d93ddcf7e5239c742e21"}, - {file = "pydantic_core-2.23.4-pp39-pypy39_pp73-macosx_11_0_arm64.whl", hash = "sha256:883a91b5dd7d26492ff2f04f40fbb652de40fcc0afe07e8129e8ae779c2110eb"}, - {file = "pydantic_core-2.23.4-pp39-pypy39_pp73-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:88ad334a15b32a791ea935af224b9de1bf99bcd62fabf745d5f3442199d86d59"}, - {file = "pydantic_core-2.23.4-pp39-pypy39_pp73-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:233710f069d251feb12a56da21e14cca67994eab08362207785cf8c598e74577"}, - {file = "pydantic_core-2.23.4-pp39-pypy39_pp73-manylinux_2_5_i686.manylinux1_i686.whl", hash = "sha256:19442362866a753485ba5e4be408964644dd6a09123d9416c54cd49171f50744"}, - {file = "pydantic_core-2.23.4-pp39-pypy39_pp73-musllinux_1_1_aarch64.whl", hash = "sha256:624e278a7d29b6445e4e813af92af37820fafb6dcc55c012c834f9e26f9aaaef"}, - {file = "pydantic_core-2.23.4-pp39-pypy39_pp73-musllinux_1_1_x86_64.whl", hash = "sha256:f5ef8f42bec47f21d07668a043f077d507e5bf4e668d5c6dfe6aaba89de1a5b8"}, - {file = "pydantic_core-2.23.4-pp39-pypy39_pp73-win_amd64.whl", hash = "sha256:aea443fffa9fbe3af1a9ba721a87f926fe548d32cab71d188a6ede77d0ff244e"}, - {file = "pydantic_core-2.23.4.tar.gz", hash = "sha256:2584f7cf844ac4d970fba483a717dbe10c1c1c96a969bf65d61ffe94df1b2863"}, + {file = "pydantic_core-2.27.1-cp310-cp310-macosx_10_12_x86_64.whl", hash = "sha256:71a5e35c75c021aaf400ac048dacc855f000bdfed91614b4a726f7432f1f3d6a"}, + {file = "pydantic_core-2.27.1-cp310-cp310-macosx_11_0_arm64.whl", hash = "sha256:f82d068a2d6ecfc6e054726080af69a6764a10015467d7d7b9f66d6ed5afa23b"}, + {file = "pydantic_core-2.27.1-cp310-cp310-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:121ceb0e822f79163dd4699e4c54f5ad38b157084d97b34de8b232bcaad70278"}, + {file = "pydantic_core-2.27.1-cp310-cp310-manylinux_2_17_armv7l.manylinux2014_armv7l.whl", hash = "sha256:4603137322c18eaf2e06a4495f426aa8d8388940f3c457e7548145011bb68e05"}, + {file = "pydantic_core-2.27.1-cp310-cp310-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:a33cd6ad9017bbeaa9ed78a2e0752c5e250eafb9534f308e7a5f7849b0b1bfb4"}, + {file = "pydantic_core-2.27.1-cp310-cp310-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:15cc53a3179ba0fcefe1e3ae50beb2784dede4003ad2dfd24f81bba4b23a454f"}, + {file = "pydantic_core-2.27.1-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:45d9c5eb9273aa50999ad6adc6be5e0ecea7e09dbd0d31bd0c65a55a2592ca08"}, + {file = "pydantic_core-2.27.1-cp310-cp310-manylinux_2_5_i686.manylinux1_i686.whl", hash = "sha256:8bf7b66ce12a2ac52d16f776b31d16d91033150266eb796967a7e4621707e4f6"}, + {file = "pydantic_core-2.27.1-cp310-cp310-musllinux_1_1_aarch64.whl", hash = "sha256:655d7dd86f26cb15ce8a431036f66ce0318648f8853d709b4167786ec2fa4807"}, + {file = "pydantic_core-2.27.1-cp310-cp310-musllinux_1_1_armv7l.whl", hash = "sha256:5556470f1a2157031e676f776c2bc20acd34c1990ca5f7e56f1ebf938b9ab57c"}, + {file = "pydantic_core-2.27.1-cp310-cp310-musllinux_1_1_x86_64.whl", hash = "sha256:f69ed81ab24d5a3bd93861c8c4436f54afdf8e8cc421562b0c7504cf3be58206"}, + {file = "pydantic_core-2.27.1-cp310-none-win32.whl", hash = "sha256:f5a823165e6d04ccea61a9f0576f345f8ce40ed533013580e087bd4d7442b52c"}, + {file = "pydantic_core-2.27.1-cp310-none-win_amd64.whl", hash = "sha256:57866a76e0b3823e0b56692d1a0bf722bffb324839bb5b7226a7dbd6c9a40b17"}, + {file = "pydantic_core-2.27.1-cp311-cp311-macosx_10_12_x86_64.whl", hash = "sha256:ac3b20653bdbe160febbea8aa6c079d3df19310d50ac314911ed8cc4eb7f8cb8"}, + {file = "pydantic_core-2.27.1-cp311-cp311-macosx_11_0_arm64.whl", hash = "sha256:a5a8e19d7c707c4cadb8c18f5f60c843052ae83c20fa7d44f41594c644a1d330"}, + {file = "pydantic_core-2.27.1-cp311-cp311-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:7f7059ca8d64fea7f238994c97d91f75965216bcbe5f695bb44f354893f11d52"}, + {file = "pydantic_core-2.27.1-cp311-cp311-manylinux_2_17_armv7l.manylinux2014_armv7l.whl", hash = "sha256:bed0f8a0eeea9fb72937ba118f9db0cb7e90773462af7962d382445f3005e5a4"}, + {file = "pydantic_core-2.27.1-cp311-cp311-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:a3cb37038123447cf0f3ea4c74751f6a9d7afef0eb71aa07bf5f652b5e6a132c"}, + {file = "pydantic_core-2.27.1-cp311-cp311-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:84286494f6c5d05243456e04223d5a9417d7f443c3b76065e75001beb26f88de"}, + {file = "pydantic_core-2.27.1-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:acc07b2cfc5b835444b44a9956846b578d27beeacd4b52e45489e93276241025"}, + {file = "pydantic_core-2.27.1-cp311-cp311-manylinux_2_5_i686.manylinux1_i686.whl", hash = "sha256:4fefee876e07a6e9aad7a8c8c9f85b0cdbe7df52b8a9552307b09050f7512c7e"}, + {file = "pydantic_core-2.27.1-cp311-cp311-musllinux_1_1_aarch64.whl", hash = "sha256:258c57abf1188926c774a4c94dd29237e77eda19462e5bb901d88adcab6af919"}, + {file = "pydantic_core-2.27.1-cp311-cp311-musllinux_1_1_armv7l.whl", hash = "sha256:35c14ac45fcfdf7167ca76cc80b2001205a8d5d16d80524e13508371fb8cdd9c"}, + {file = "pydantic_core-2.27.1-cp311-cp311-musllinux_1_1_x86_64.whl", hash = "sha256:d1b26e1dff225c31897696cab7d4f0a315d4c0d9e8666dbffdb28216f3b17fdc"}, + {file = "pydantic_core-2.27.1-cp311-none-win32.whl", hash = "sha256:2cdf7d86886bc6982354862204ae3b2f7f96f21a3eb0ba5ca0ac42c7b38598b9"}, + {file = "pydantic_core-2.27.1-cp311-none-win_amd64.whl", hash = "sha256:3af385b0cee8df3746c3f406f38bcbfdc9041b5c2d5ce3e5fc6637256e60bbc5"}, + {file = "pydantic_core-2.27.1-cp311-none-win_arm64.whl", hash = "sha256:81f2ec23ddc1b476ff96563f2e8d723830b06dceae348ce02914a37cb4e74b89"}, + {file = "pydantic_core-2.27.1-cp312-cp312-macosx_10_12_x86_64.whl", hash = "sha256:9cbd94fc661d2bab2bc702cddd2d3370bbdcc4cd0f8f57488a81bcce90c7a54f"}, + {file = "pydantic_core-2.27.1-cp312-cp312-macosx_11_0_arm64.whl", hash = "sha256:5f8c4718cd44ec1580e180cb739713ecda2bdee1341084c1467802a417fe0f02"}, + {file = "pydantic_core-2.27.1-cp312-cp312-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:15aae984e46de8d376df515f00450d1522077254ef6b7ce189b38ecee7c9677c"}, + {file = "pydantic_core-2.27.1-cp312-cp312-manylinux_2_17_armv7l.manylinux2014_armv7l.whl", hash = "sha256:1ba5e3963344ff25fc8c40da90f44b0afca8cfd89d12964feb79ac1411a260ac"}, + {file = "pydantic_core-2.27.1-cp312-cp312-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:992cea5f4f3b29d6b4f7f1726ed8ee46c8331c6b4eed6db5b40134c6fe1768bb"}, + {file = "pydantic_core-2.27.1-cp312-cp312-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:0325336f348dbee6550d129b1627cb8f5351a9dc91aad141ffb96d4937bd9529"}, + {file = "pydantic_core-2.27.1-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:7597c07fbd11515f654d6ece3d0e4e5093edc30a436c63142d9a4b8e22f19c35"}, + {file = "pydantic_core-2.27.1-cp312-cp312-manylinux_2_5_i686.manylinux1_i686.whl", hash = "sha256:3bbd5d8cc692616d5ef6fbbbd50dbec142c7e6ad9beb66b78a96e9c16729b089"}, + {file = "pydantic_core-2.27.1-cp312-cp312-musllinux_1_1_aarch64.whl", hash = "sha256:dc61505e73298a84a2f317255fcc72b710b72980f3a1f670447a21efc88f8381"}, + {file = "pydantic_core-2.27.1-cp312-cp312-musllinux_1_1_armv7l.whl", hash = "sha256:e1f735dc43da318cad19b4173dd1ffce1d84aafd6c9b782b3abc04a0d5a6f5bb"}, + {file = "pydantic_core-2.27.1-cp312-cp312-musllinux_1_1_x86_64.whl", hash = "sha256:f4e5658dbffe8843a0f12366a4c2d1c316dbe09bb4dfbdc9d2d9cd6031de8aae"}, + {file = "pydantic_core-2.27.1-cp312-none-win32.whl", hash = "sha256:672ebbe820bb37988c4d136eca2652ee114992d5d41c7e4858cdd90ea94ffe5c"}, + {file = "pydantic_core-2.27.1-cp312-none-win_amd64.whl", hash = "sha256:66ff044fd0bb1768688aecbe28b6190f6e799349221fb0de0e6f4048eca14c16"}, + {file = "pydantic_core-2.27.1-cp312-none-win_arm64.whl", hash = "sha256:9a3b0793b1bbfd4146304e23d90045f2a9b5fd5823aa682665fbdaf2a6c28f3e"}, + {file = "pydantic_core-2.27.1-cp313-cp313-macosx_10_12_x86_64.whl", hash = "sha256:f216dbce0e60e4d03e0c4353c7023b202d95cbaeff12e5fd2e82ea0a66905073"}, + {file = "pydantic_core-2.27.1-cp313-cp313-macosx_11_0_arm64.whl", hash = "sha256:a2e02889071850bbfd36b56fd6bc98945e23670773bc7a76657e90e6b6603c08"}, + {file = "pydantic_core-2.27.1-cp313-cp313-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:42b0e23f119b2b456d07ca91b307ae167cc3f6c846a7b169fca5326e32fdc6cf"}, + {file = "pydantic_core-2.27.1-cp313-cp313-manylinux_2_17_armv7l.manylinux2014_armv7l.whl", hash = "sha256:764be71193f87d460a03f1f7385a82e226639732214b402f9aa61f0d025f0737"}, + {file = "pydantic_core-2.27.1-cp313-cp313-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:1c00666a3bd2f84920a4e94434f5974d7bbc57e461318d6bb34ce9cdbbc1f6b2"}, + {file = "pydantic_core-2.27.1-cp313-cp313-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:3ccaa88b24eebc0f849ce0a4d09e8a408ec5a94afff395eb69baf868f5183107"}, + {file = "pydantic_core-2.27.1-cp313-cp313-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:c65af9088ac534313e1963443d0ec360bb2b9cba6c2909478d22c2e363d98a51"}, + {file = "pydantic_core-2.27.1-cp313-cp313-manylinux_2_5_i686.manylinux1_i686.whl", hash = "sha256:206b5cf6f0c513baffaeae7bd817717140770c74528f3e4c3e1cec7871ddd61a"}, + {file = "pydantic_core-2.27.1-cp313-cp313-musllinux_1_1_aarch64.whl", hash = "sha256:062f60e512fc7fff8b8a9d680ff0ddaaef0193dba9fa83e679c0c5f5fbd018bc"}, + {file = "pydantic_core-2.27.1-cp313-cp313-musllinux_1_1_armv7l.whl", hash = "sha256:a0697803ed7d4af5e4c1adf1670af078f8fcab7a86350e969f454daf598c4960"}, + {file = "pydantic_core-2.27.1-cp313-cp313-musllinux_1_1_x86_64.whl", hash = "sha256:58ca98a950171f3151c603aeea9303ef6c235f692fe555e883591103da709b23"}, + {file = "pydantic_core-2.27.1-cp313-none-win32.whl", hash = "sha256:8065914ff79f7eab1599bd80406681f0ad08f8e47c880f17b416c9f8f7a26d05"}, + {file = "pydantic_core-2.27.1-cp313-none-win_amd64.whl", hash = "sha256:ba630d5e3db74c79300d9a5bdaaf6200172b107f263c98a0539eeecb857b2337"}, + {file = "pydantic_core-2.27.1-cp313-none-win_arm64.whl", hash = "sha256:45cf8588c066860b623cd11c4ba687f8d7175d5f7ef65f7129df8a394c502de5"}, + {file = "pydantic_core-2.27.1-cp38-cp38-macosx_10_12_x86_64.whl", hash = "sha256:5897bec80a09b4084aee23f9b73a9477a46c3304ad1d2d07acca19723fb1de62"}, + {file = "pydantic_core-2.27.1-cp38-cp38-macosx_11_0_arm64.whl", hash = "sha256:d0165ab2914379bd56908c02294ed8405c252250668ebcb438a55494c69f44ab"}, + {file = "pydantic_core-2.27.1-cp38-cp38-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:6b9af86e1d8e4cfc82c2022bfaa6f459381a50b94a29e95dcdda8442d6d83864"}, + {file = "pydantic_core-2.27.1-cp38-cp38-manylinux_2_17_armv7l.manylinux2014_armv7l.whl", hash = "sha256:5f6c8a66741c5f5447e047ab0ba7a1c61d1e95580d64bce852e3df1f895c4067"}, + {file = "pydantic_core-2.27.1-cp38-cp38-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:9a42d6a8156ff78981f8aa56eb6394114e0dedb217cf8b729f438f643608cbcd"}, + {file = "pydantic_core-2.27.1-cp38-cp38-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:64c65f40b4cd8b0e049a8edde07e38b476da7e3aaebe63287c899d2cff253fa5"}, + {file = "pydantic_core-2.27.1-cp38-cp38-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:9fdcf339322a3fae5cbd504edcefddd5a50d9ee00d968696846f089b4432cf78"}, + {file = "pydantic_core-2.27.1-cp38-cp38-manylinux_2_5_i686.manylinux1_i686.whl", hash = "sha256:bf99c8404f008750c846cb4ac4667b798a9f7de673ff719d705d9b2d6de49c5f"}, + {file = "pydantic_core-2.27.1-cp38-cp38-musllinux_1_1_aarch64.whl", hash = "sha256:8f1edcea27918d748c7e5e4d917297b2a0ab80cad10f86631e488b7cddf76a36"}, + {file = "pydantic_core-2.27.1-cp38-cp38-musllinux_1_1_armv7l.whl", hash = "sha256:159cac0a3d096f79ab6a44d77a961917219707e2a130739c64d4dd46281f5c2a"}, + {file = "pydantic_core-2.27.1-cp38-cp38-musllinux_1_1_x86_64.whl", hash = "sha256:029d9757eb621cc6e1848fa0b0310310de7301057f623985698ed7ebb014391b"}, + {file = "pydantic_core-2.27.1-cp38-none-win32.whl", hash = "sha256:a28af0695a45f7060e6f9b7092558a928a28553366519f64083c63a44f70e618"}, + {file = "pydantic_core-2.27.1-cp38-none-win_amd64.whl", hash = "sha256:2d4567c850905d5eaaed2f7a404e61012a51caf288292e016360aa2b96ff38d4"}, + {file = "pydantic_core-2.27.1-cp39-cp39-macosx_10_12_x86_64.whl", hash = "sha256:e9386266798d64eeb19dd3677051f5705bf873e98e15897ddb7d76f477131967"}, + {file = "pydantic_core-2.27.1-cp39-cp39-macosx_11_0_arm64.whl", hash = "sha256:4228b5b646caa73f119b1ae756216b59cc6e2267201c27d3912b592c5e323b60"}, + {file = "pydantic_core-2.27.1-cp39-cp39-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:0b3dfe500de26c52abe0477dde16192ac39c98f05bf2d80e76102d394bd13854"}, + {file = "pydantic_core-2.27.1-cp39-cp39-manylinux_2_17_armv7l.manylinux2014_armv7l.whl", hash = "sha256:aee66be87825cdf72ac64cb03ad4c15ffef4143dbf5c113f64a5ff4f81477bf9"}, + {file = "pydantic_core-2.27.1-cp39-cp39-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:3b748c44bb9f53031c8cbc99a8a061bc181c1000c60a30f55393b6e9c45cc5bd"}, + {file = "pydantic_core-2.27.1-cp39-cp39-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:5ca038c7f6a0afd0b2448941b6ef9d5e1949e999f9e5517692eb6da58e9d44be"}, + {file = "pydantic_core-2.27.1-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:6e0bd57539da59a3e4671b90a502da9a28c72322a4f17866ba3ac63a82c4498e"}, + {file = "pydantic_core-2.27.1-cp39-cp39-manylinux_2_5_i686.manylinux1_i686.whl", hash = "sha256:ac6c2c45c847bbf8f91930d88716a0fb924b51e0c6dad329b793d670ec5db792"}, + {file = "pydantic_core-2.27.1-cp39-cp39-musllinux_1_1_aarch64.whl", hash = "sha256:b94d4ba43739bbe8b0ce4262bcc3b7b9f31459ad120fb595627eaeb7f9b9ca01"}, + {file = "pydantic_core-2.27.1-cp39-cp39-musllinux_1_1_armv7l.whl", hash = "sha256:00e6424f4b26fe82d44577b4c842d7df97c20be6439e8e685d0d715feceb9fb9"}, + {file = "pydantic_core-2.27.1-cp39-cp39-musllinux_1_1_x86_64.whl", hash = "sha256:38de0a70160dd97540335b7ad3a74571b24f1dc3ed33f815f0880682e6880131"}, + {file = "pydantic_core-2.27.1-cp39-none-win32.whl", hash = "sha256:7ccebf51efc61634f6c2344da73e366c75e735960b5654b63d7e6f69a5885fa3"}, + {file = "pydantic_core-2.27.1-cp39-none-win_amd64.whl", hash = "sha256:a57847b090d7892f123726202b7daa20df6694cbd583b67a592e856bff603d6c"}, + {file = "pydantic_core-2.27.1-pp310-pypy310_pp73-macosx_10_12_x86_64.whl", hash = "sha256:3fa80ac2bd5856580e242dbc202db873c60a01b20309c8319b5c5986fbe53ce6"}, + {file = "pydantic_core-2.27.1-pp310-pypy310_pp73-macosx_11_0_arm64.whl", hash = "sha256:d950caa237bb1954f1b8c9227b5065ba6875ac9771bb8ec790d956a699b78676"}, + {file = "pydantic_core-2.27.1-pp310-pypy310_pp73-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:0e4216e64d203e39c62df627aa882f02a2438d18a5f21d7f721621f7a5d3611d"}, + {file = "pydantic_core-2.27.1-pp310-pypy310_pp73-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:02a3d637bd387c41d46b002f0e49c52642281edacd2740e5a42f7017feea3f2c"}, + {file = "pydantic_core-2.27.1-pp310-pypy310_pp73-manylinux_2_5_i686.manylinux1_i686.whl", hash = "sha256:161c27ccce13b6b0c8689418da3885d3220ed2eae2ea5e9b2f7f3d48f1d52c27"}, + {file = "pydantic_core-2.27.1-pp310-pypy310_pp73-musllinux_1_1_aarch64.whl", hash = "sha256:19910754e4cc9c63bc1c7f6d73aa1cfee82f42007e407c0f413695c2f7ed777f"}, + {file = "pydantic_core-2.27.1-pp310-pypy310_pp73-musllinux_1_1_armv7l.whl", hash = "sha256:e173486019cc283dc9778315fa29a363579372fe67045e971e89b6365cc035ed"}, + {file = "pydantic_core-2.27.1-pp310-pypy310_pp73-musllinux_1_1_x86_64.whl", hash = "sha256:af52d26579b308921b73b956153066481f064875140ccd1dfd4e77db89dbb12f"}, + {file = "pydantic_core-2.27.1-pp310-pypy310_pp73-win_amd64.whl", hash = "sha256:981fb88516bd1ae8b0cbbd2034678a39dedc98752f264ac9bc5839d3923fa04c"}, + {file = "pydantic_core-2.27.1-pp39-pypy39_pp73-macosx_10_12_x86_64.whl", hash = "sha256:5fde892e6c697ce3e30c61b239330fc5d569a71fefd4eb6512fc6caec9dd9e2f"}, + {file = "pydantic_core-2.27.1-pp39-pypy39_pp73-macosx_11_0_arm64.whl", hash = "sha256:816f5aa087094099fff7edabb5e01cc370eb21aa1a1d44fe2d2aefdfb5599b31"}, + {file = "pydantic_core-2.27.1-pp39-pypy39_pp73-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:9c10c309e18e443ddb108f0ef64e8729363adbfd92d6d57beec680f6261556f3"}, + {file = "pydantic_core-2.27.1-pp39-pypy39_pp73-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:98476c98b02c8e9b2eec76ac4156fd006628b1b2d0ef27e548ffa978393fd154"}, + {file = "pydantic_core-2.27.1-pp39-pypy39_pp73-manylinux_2_5_i686.manylinux1_i686.whl", hash = "sha256:c3027001c28434e7ca5a6e1e527487051136aa81803ac812be51802150d880dd"}, + {file = "pydantic_core-2.27.1-pp39-pypy39_pp73-musllinux_1_1_aarch64.whl", hash = "sha256:7699b1df36a48169cdebda7ab5a2bac265204003f153b4bd17276153d997670a"}, + {file = "pydantic_core-2.27.1-pp39-pypy39_pp73-musllinux_1_1_armv7l.whl", hash = "sha256:1c39b07d90be6b48968ddc8c19e7585052088fd7ec8d568bb31ff64c70ae3c97"}, + {file = "pydantic_core-2.27.1-pp39-pypy39_pp73-musllinux_1_1_x86_64.whl", hash = "sha256:46ccfe3032b3915586e469d4972973f893c0a2bb65669194a5bdea9bacc088c2"}, + {file = "pydantic_core-2.27.1-pp39-pypy39_pp73-win_amd64.whl", hash = "sha256:62ba45e21cf6571d7f716d903b5b7b6d2617e2d5d67c0923dc47b9d41369f840"}, + {file = "pydantic_core-2.27.1.tar.gz", hash = "sha256:62a763352879b84aa31058fc931884055fd75089cccbd9d58bb6afd01141b235"}, ] [package.dependencies] @@ -548,4 +561,4 @@ typing-extensions = ">=3.7.4" [metadata] lock-version = "2.0" python-versions = "^3.8" -content-hash = "6bb5f77afb8fcbe7327ccd1fcc33f5c279c6a2582d43be73b69c2a94b836b85d" +content-hash = "231d09484040ca8e2e4ea801ceedb0b672113dd483caa7cb13d217c3e92d7655" diff --git a/pyproject.toml b/pyproject.toml index 0c2e12b..496fd67 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,6 +1,6 @@ [tool.poetry] name = "livepeer" -version = "0.3.0" +version = "0.4.0" description = "Python Client SDK for Livepeer Studio" authors = ["Speakeasy",] readme = "README-PYPI.md" @@ -19,14 +19,14 @@ in-project = true [tool.poetry.dependencies] python = "^3.8" eval-type-backport = "^0.2.0" -httpx = "^0.27.0" +httpx = "^0.28.1" jsonpath-python = "^1.0.6" -pydantic = "~2.9.0" -python-dateutil = "2.8.2" +pydantic = "~2.10.3" +python-dateutil = "^2.8.2" typing-inspect = "^0.9.0" [tool.poetry.group.dev.dependencies] -mypy = "==1.10.1" +mypy = "==1.13.0" pylint = "==3.2.3" types-python-dateutil = "^2.9.0.20240316" diff --git a/scripts/compile.sh b/scripts/compile.sh deleted file mode 100755 index fafe635..0000000 --- a/scripts/compile.sh +++ /dev/null @@ -1,85 +0,0 @@ -#!/usr/bin/env bash - -set -o pipefail # Ensure pipeline failures are propagated - -# Use temporary files to store outputs and exit statuses -declare -A output_files -declare -A status_files - -# Function to run a command with temporary output and status files -run_command() { - local cmd="$1" - local key="$2" - local output_file="$3" - local status_file="$4" - - # Run the command and store output and exit status - { - eval "$cmd" - echo $? > "$status_file" - } &> "$output_file" & -} - -poetry run python scripts/prepare-readme.py - -# Create temporary files for outputs and statuses -for cmd in compileall pylint mypy pyright; do - output_files[$cmd]=$(mktemp) - status_files[$cmd]=$(mktemp) -done - -# Collect PIDs for background processes -declare -a pids - -# Run commands in parallel using temporary files -echo "Running python -m compileall" -run_command 'poetry run python -m compileall -q . && echo "Success"' 'compileall' "${output_files[compileall]}" "${status_files[compileall]}" -pids+=($!) - -echo "Running pylint" -run_command 'poetry run pylint src' 'pylint' "${output_files[pylint]}" "${status_files[pylint]}" -pids+=($!) - -echo "Running mypy" -run_command 'poetry run mypy src' 'mypy' "${output_files[mypy]}" "${status_files[mypy]}" -pids+=($!) - -echo "Running pyright (optional)" -run_command 'if command -v pyright > /dev/null 2>&1; then pyright src; else echo "pyright not found, skipping"; fi' 'pyright' "${output_files[pyright]}" "${status_files[pyright]}" -pids+=($!) - -# Wait for all processes to complete -echo "Waiting for processes to complete" -for pid in "${pids[@]}"; do - wait "$pid" -done - -# Print output sequentially and check for failures -failed=false -for key in "${!output_files[@]}"; do - echo "--- Output from Command: $key ---" - echo - cat "${output_files[$key]}" - echo # Empty line for separation - echo "--- End of Output from Command: $key ---" - echo - - exit_status=$(cat "${status_files[$key]}") - if [ "$exit_status" -ne 0 ]; then - echo "Command $key failed with exit status $exit_status" >&2 - failed=true - fi -done - -# Clean up temporary files -for tmp_file in "${output_files[@]}" "${status_files[@]}"; do - rm -f "$tmp_file" -done - -if $failed; then - echo "One or more commands failed." >&2 - exit 1 -else - echo "All commands completed successfully." - exit 0 -fi diff --git a/src/livepeer/__init__.py b/src/livepeer/__init__.py index d8d60c4..5c34917 100644 --- a/src/livepeer/__init__.py +++ b/src/livepeer/__init__.py @@ -1,4 +1,8 @@ """Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.""" +from ._version import __title__, __version__ from .sdk import * from .sdkconfiguration import * + + +VERSION: str = __version__ diff --git a/src/livepeer/_version.py b/src/livepeer/_version.py new file mode 100644 index 0000000..2f6f2f2 --- /dev/null +++ b/src/livepeer/_version.py @@ -0,0 +1,12 @@ +"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.""" + +import importlib.metadata + +__title__: str = "livepeer" +__version__: str = "0.4.0" + +try: + if __package__ is not None: + __version__ = importlib.metadata.version(__package__) +except importlib.metadata.PackageNotFoundError: + pass diff --git a/src/livepeer/accesscontrol.py b/src/livepeer/accesscontrol.py index 1a1c360..ce406e2 100644 --- a/src/livepeer/accesscontrol.py +++ b/src/livepeer/accesscontrol.py @@ -5,7 +5,7 @@ from livepeer._hooks import HookContext from livepeer.models import components, errors, operations from livepeer.types import OptionalNullable, UNSET -from typing import List, Optional, Union +from typing import List, Mapping, Optional, Union class AccessControl(BaseSDK): @@ -17,6 +17,7 @@ def create( retries: OptionalNullable[utils.RetryConfig] = UNSET, server_url: Optional[str] = None, timeout_ms: Optional[int] = None, + http_headers: Optional[Mapping[str, str]] = None, ) -> operations.CreateSigningKeyResponse: r"""Create a signing key @@ -27,6 +28,7 @@ def create( :param retries: Override the default retry configuration for this method :param server_url: Override the default server URL for this method :param timeout_ms: Override the default request timeout configuration for this method in milliseconds + :param http_headers: Additional headers to set or replace on requests. """ base_url = None url_variables = None @@ -46,6 +48,7 @@ def create( request_has_query_params=True, user_agent_header="user-agent", accept_header_value="application/json", + http_headers=http_headers, security=self.sdk_configuration.security, timeout_ms=timeout_ms, ) @@ -77,20 +80,22 @@ def create( http_meta=components.HTTPMetadata(request=req, response=http_res), ) if utils.match_response(http_res, ["4XX", "5XX"], "*"): + http_res_text = utils.stream_to_text(http_res) raise errors.SDKError( - "API error occurred", http_res.status_code, http_res.text, http_res + "API error occurred", http_res.status_code, http_res_text, http_res ) if utils.match_response(http_res, "default", "application/json"): return operations.CreateSigningKeyResponse( - error=utils.unmarshal_json(http_res.text, Optional[errors.Error]), + error=utils.unmarshal_json(http_res.text, Optional[components.Error]), http_meta=components.HTTPMetadata(request=req, response=http_res), ) content_type = http_res.headers.get("Content-Type") + http_res_text = utils.stream_to_text(http_res) raise errors.SDKError( f"Unexpected response received (code: {http_res.status_code}, type: {content_type})", http_res.status_code, - http_res.text, + http_res_text, http_res, ) @@ -100,6 +105,7 @@ async def create_async( retries: OptionalNullable[utils.RetryConfig] = UNSET, server_url: Optional[str] = None, timeout_ms: Optional[int] = None, + http_headers: Optional[Mapping[str, str]] = None, ) -> operations.CreateSigningKeyResponse: r"""Create a signing key @@ -110,6 +116,7 @@ async def create_async( :param retries: Override the default retry configuration for this method :param server_url: Override the default server URL for this method :param timeout_ms: Override the default request timeout configuration for this method in milliseconds + :param http_headers: Additional headers to set or replace on requests. """ base_url = None url_variables = None @@ -129,6 +136,7 @@ async def create_async( request_has_query_params=True, user_agent_header="user-agent", accept_header_value="application/json", + http_headers=http_headers, security=self.sdk_configuration.security, timeout_ms=timeout_ms, ) @@ -160,20 +168,22 @@ async def create_async( http_meta=components.HTTPMetadata(request=req, response=http_res), ) if utils.match_response(http_res, ["4XX", "5XX"], "*"): + http_res_text = await utils.stream_to_text_async(http_res) raise errors.SDKError( - "API error occurred", http_res.status_code, http_res.text, http_res + "API error occurred", http_res.status_code, http_res_text, http_res ) if utils.match_response(http_res, "default", "application/json"): return operations.CreateSigningKeyResponse( - error=utils.unmarshal_json(http_res.text, Optional[errors.Error]), + error=utils.unmarshal_json(http_res.text, Optional[components.Error]), http_meta=components.HTTPMetadata(request=req, response=http_res), ) content_type = http_res.headers.get("Content-Type") + http_res_text = await utils.stream_to_text_async(http_res) raise errors.SDKError( f"Unexpected response received (code: {http_res.status_code}, type: {content_type})", http_res.status_code, - http_res.text, + http_res_text, http_res, ) @@ -183,12 +193,14 @@ def get_all( retries: OptionalNullable[utils.RetryConfig] = UNSET, server_url: Optional[str] = None, timeout_ms: Optional[int] = None, + http_headers: Optional[Mapping[str, str]] = None, ) -> operations.GetSigningKeysResponse: r"""Retrieves signing keys :param retries: Override the default retry configuration for this method :param server_url: Override the default server URL for this method :param timeout_ms: Override the default request timeout configuration for this method in milliseconds + :param http_headers: Additional headers to set or replace on requests. """ base_url = None url_variables = None @@ -208,6 +220,7 @@ def get_all( request_has_query_params=True, user_agent_header="user-agent", accept_header_value="application/json", + http_headers=http_headers, security=self.sdk_configuration.security, timeout_ms=timeout_ms, ) @@ -239,20 +252,22 @@ def get_all( http_meta=components.HTTPMetadata(request=req, response=http_res), ) if utils.match_response(http_res, ["4XX", "5XX"], "*"): + http_res_text = utils.stream_to_text(http_res) raise errors.SDKError( - "API error occurred", http_res.status_code, http_res.text, http_res + "API error occurred", http_res.status_code, http_res_text, http_res ) if utils.match_response(http_res, "default", "application/json"): return operations.GetSigningKeysResponse( - error=utils.unmarshal_json(http_res.text, Optional[errors.Error]), + error=utils.unmarshal_json(http_res.text, Optional[components.Error]), http_meta=components.HTTPMetadata(request=req, response=http_res), ) content_type = http_res.headers.get("Content-Type") + http_res_text = utils.stream_to_text(http_res) raise errors.SDKError( f"Unexpected response received (code: {http_res.status_code}, type: {content_type})", http_res.status_code, - http_res.text, + http_res_text, http_res, ) @@ -262,12 +277,14 @@ async def get_all_async( retries: OptionalNullable[utils.RetryConfig] = UNSET, server_url: Optional[str] = None, timeout_ms: Optional[int] = None, + http_headers: Optional[Mapping[str, str]] = None, ) -> operations.GetSigningKeysResponse: r"""Retrieves signing keys :param retries: Override the default retry configuration for this method :param server_url: Override the default server URL for this method :param timeout_ms: Override the default request timeout configuration for this method in milliseconds + :param http_headers: Additional headers to set or replace on requests. """ base_url = None url_variables = None @@ -287,6 +304,7 @@ async def get_all_async( request_has_query_params=True, user_agent_header="user-agent", accept_header_value="application/json", + http_headers=http_headers, security=self.sdk_configuration.security, timeout_ms=timeout_ms, ) @@ -318,20 +336,22 @@ async def get_all_async( http_meta=components.HTTPMetadata(request=req, response=http_res), ) if utils.match_response(http_res, ["4XX", "5XX"], "*"): + http_res_text = await utils.stream_to_text_async(http_res) raise errors.SDKError( - "API error occurred", http_res.status_code, http_res.text, http_res + "API error occurred", http_res.status_code, http_res_text, http_res ) if utils.match_response(http_res, "default", "application/json"): return operations.GetSigningKeysResponse( - error=utils.unmarshal_json(http_res.text, Optional[errors.Error]), + error=utils.unmarshal_json(http_res.text, Optional[components.Error]), http_meta=components.HTTPMetadata(request=req, response=http_res), ) content_type = http_res.headers.get("Content-Type") + http_res_text = await utils.stream_to_text_async(http_res) raise errors.SDKError( f"Unexpected response received (code: {http_res.status_code}, type: {content_type})", http_res.status_code, - http_res.text, + http_res_text, http_res, ) @@ -342,6 +362,7 @@ def delete( retries: OptionalNullable[utils.RetryConfig] = UNSET, server_url: Optional[str] = None, timeout_ms: Optional[int] = None, + http_headers: Optional[Mapping[str, str]] = None, ) -> operations.DeleteSigningKeyResponse: r"""Delete Signing Key @@ -349,6 +370,7 @@ def delete( :param retries: Override the default retry configuration for this method :param server_url: Override the default server URL for this method :param timeout_ms: Override the default request timeout configuration for this method in milliseconds + :param http_headers: Additional headers to set or replace on requests. """ base_url = None url_variables = None @@ -373,6 +395,7 @@ def delete( request_has_query_params=True, user_agent_header="user-agent", accept_header_value="application/json", + http_headers=http_headers, security=self.sdk_configuration.security, timeout_ms=timeout_ms, ) @@ -401,20 +424,22 @@ def delete( http_meta=components.HTTPMetadata(request=req, response=http_res) ) if utils.match_response(http_res, ["4XX", "5XX"], "*"): + http_res_text = utils.stream_to_text(http_res) raise errors.SDKError( - "API error occurred", http_res.status_code, http_res.text, http_res + "API error occurred", http_res.status_code, http_res_text, http_res ) if utils.match_response(http_res, "default", "application/json"): return operations.DeleteSigningKeyResponse( - error=utils.unmarshal_json(http_res.text, Optional[errors.Error]), + error=utils.unmarshal_json(http_res.text, Optional[components.Error]), http_meta=components.HTTPMetadata(request=req, response=http_res), ) content_type = http_res.headers.get("Content-Type") + http_res_text = utils.stream_to_text(http_res) raise errors.SDKError( f"Unexpected response received (code: {http_res.status_code}, type: {content_type})", http_res.status_code, - http_res.text, + http_res_text, http_res, ) @@ -425,6 +450,7 @@ async def delete_async( retries: OptionalNullable[utils.RetryConfig] = UNSET, server_url: Optional[str] = None, timeout_ms: Optional[int] = None, + http_headers: Optional[Mapping[str, str]] = None, ) -> operations.DeleteSigningKeyResponse: r"""Delete Signing Key @@ -432,6 +458,7 @@ async def delete_async( :param retries: Override the default retry configuration for this method :param server_url: Override the default server URL for this method :param timeout_ms: Override the default request timeout configuration for this method in milliseconds + :param http_headers: Additional headers to set or replace on requests. """ base_url = None url_variables = None @@ -456,6 +483,7 @@ async def delete_async( request_has_query_params=True, user_agent_header="user-agent", accept_header_value="application/json", + http_headers=http_headers, security=self.sdk_configuration.security, timeout_ms=timeout_ms, ) @@ -484,20 +512,22 @@ async def delete_async( http_meta=components.HTTPMetadata(request=req, response=http_res) ) if utils.match_response(http_res, ["4XX", "5XX"], "*"): + http_res_text = await utils.stream_to_text_async(http_res) raise errors.SDKError( - "API error occurred", http_res.status_code, http_res.text, http_res + "API error occurred", http_res.status_code, http_res_text, http_res ) if utils.match_response(http_res, "default", "application/json"): return operations.DeleteSigningKeyResponse( - error=utils.unmarshal_json(http_res.text, Optional[errors.Error]), + error=utils.unmarshal_json(http_res.text, Optional[components.Error]), http_meta=components.HTTPMetadata(request=req, response=http_res), ) content_type = http_res.headers.get("Content-Type") + http_res_text = await utils.stream_to_text_async(http_res) raise errors.SDKError( f"Unexpected response received (code: {http_res.status_code}, type: {content_type})", http_res.status_code, - http_res.text, + http_res_text, http_res, ) @@ -508,6 +538,7 @@ def get( retries: OptionalNullable[utils.RetryConfig] = UNSET, server_url: Optional[str] = None, timeout_ms: Optional[int] = None, + http_headers: Optional[Mapping[str, str]] = None, ) -> operations.GetSigningKeyResponse: r"""Retrieves a signing key @@ -515,6 +546,7 @@ def get( :param retries: Override the default retry configuration for this method :param server_url: Override the default server URL for this method :param timeout_ms: Override the default request timeout configuration for this method in milliseconds + :param http_headers: Additional headers to set or replace on requests. """ base_url = None url_variables = None @@ -539,6 +571,7 @@ def get( request_has_query_params=True, user_agent_header="user-agent", accept_header_value="application/json", + http_headers=http_headers, security=self.sdk_configuration.security, timeout_ms=timeout_ms, ) @@ -570,20 +603,22 @@ def get( http_meta=components.HTTPMetadata(request=req, response=http_res), ) if utils.match_response(http_res, ["4XX", "5XX"], "*"): + http_res_text = utils.stream_to_text(http_res) raise errors.SDKError( - "API error occurred", http_res.status_code, http_res.text, http_res + "API error occurred", http_res.status_code, http_res_text, http_res ) if utils.match_response(http_res, "default", "application/json"): return operations.GetSigningKeyResponse( - error=utils.unmarshal_json(http_res.text, Optional[errors.Error]), + error=utils.unmarshal_json(http_res.text, Optional[components.Error]), http_meta=components.HTTPMetadata(request=req, response=http_res), ) content_type = http_res.headers.get("Content-Type") + http_res_text = utils.stream_to_text(http_res) raise errors.SDKError( f"Unexpected response received (code: {http_res.status_code}, type: {content_type})", http_res.status_code, - http_res.text, + http_res_text, http_res, ) @@ -594,6 +629,7 @@ async def get_async( retries: OptionalNullable[utils.RetryConfig] = UNSET, server_url: Optional[str] = None, timeout_ms: Optional[int] = None, + http_headers: Optional[Mapping[str, str]] = None, ) -> operations.GetSigningKeyResponse: r"""Retrieves a signing key @@ -601,6 +637,7 @@ async def get_async( :param retries: Override the default retry configuration for this method :param server_url: Override the default server URL for this method :param timeout_ms: Override the default request timeout configuration for this method in milliseconds + :param http_headers: Additional headers to set or replace on requests. """ base_url = None url_variables = None @@ -625,6 +662,7 @@ async def get_async( request_has_query_params=True, user_agent_header="user-agent", accept_header_value="application/json", + http_headers=http_headers, security=self.sdk_configuration.security, timeout_ms=timeout_ms, ) @@ -656,20 +694,22 @@ async def get_async( http_meta=components.HTTPMetadata(request=req, response=http_res), ) if utils.match_response(http_res, ["4XX", "5XX"], "*"): + http_res_text = await utils.stream_to_text_async(http_res) raise errors.SDKError( - "API error occurred", http_res.status_code, http_res.text, http_res + "API error occurred", http_res.status_code, http_res_text, http_res ) if utils.match_response(http_res, "default", "application/json"): return operations.GetSigningKeyResponse( - error=utils.unmarshal_json(http_res.text, Optional[errors.Error]), + error=utils.unmarshal_json(http_res.text, Optional[components.Error]), http_meta=components.HTTPMetadata(request=req, response=http_res), ) content_type = http_res.headers.get("Content-Type") + http_res_text = await utils.stream_to_text_async(http_res) raise errors.SDKError( f"Unexpected response received (code: {http_res.status_code}, type: {content_type})", http_res.status_code, - http_res.text, + http_res_text, http_res, ) @@ -684,6 +724,7 @@ def update( retries: OptionalNullable[utils.RetryConfig] = UNSET, server_url: Optional[str] = None, timeout_ms: Optional[int] = None, + http_headers: Optional[Mapping[str, str]] = None, ) -> operations.UpdateSigningKeyResponse: r"""Update a signing key @@ -692,6 +733,7 @@ def update( :param retries: Override the default retry configuration for this method :param server_url: Override the default server URL for this method :param timeout_ms: Override the default request timeout configuration for this method in milliseconds + :param http_headers: Additional headers to set or replace on requests. """ base_url = None url_variables = None @@ -719,6 +761,7 @@ def update( request_has_query_params=True, user_agent_header="user-agent", accept_header_value="application/json", + http_headers=http_headers, security=self.sdk_configuration.security, get_serialized_body=lambda: utils.serialize_request_body( request.request_body, @@ -754,20 +797,22 @@ def update( http_meta=components.HTTPMetadata(request=req, response=http_res) ) if utils.match_response(http_res, ["4XX", "5XX"], "*"): + http_res_text = utils.stream_to_text(http_res) raise errors.SDKError( - "API error occurred", http_res.status_code, http_res.text, http_res + "API error occurred", http_res.status_code, http_res_text, http_res ) if utils.match_response(http_res, "default", "application/json"): return operations.UpdateSigningKeyResponse( - error=utils.unmarshal_json(http_res.text, Optional[errors.Error]), + error=utils.unmarshal_json(http_res.text, Optional[components.Error]), http_meta=components.HTTPMetadata(request=req, response=http_res), ) content_type = http_res.headers.get("Content-Type") + http_res_text = utils.stream_to_text(http_res) raise errors.SDKError( f"Unexpected response received (code: {http_res.status_code}, type: {content_type})", http_res.status_code, - http_res.text, + http_res_text, http_res, ) @@ -782,6 +827,7 @@ async def update_async( retries: OptionalNullable[utils.RetryConfig] = UNSET, server_url: Optional[str] = None, timeout_ms: Optional[int] = None, + http_headers: Optional[Mapping[str, str]] = None, ) -> operations.UpdateSigningKeyResponse: r"""Update a signing key @@ -790,6 +836,7 @@ async def update_async( :param retries: Override the default retry configuration for this method :param server_url: Override the default server URL for this method :param timeout_ms: Override the default request timeout configuration for this method in milliseconds + :param http_headers: Additional headers to set or replace on requests. """ base_url = None url_variables = None @@ -817,6 +864,7 @@ async def update_async( request_has_query_params=True, user_agent_header="user-agent", accept_header_value="application/json", + http_headers=http_headers, security=self.sdk_configuration.security, get_serialized_body=lambda: utils.serialize_request_body( request.request_body, @@ -852,19 +900,21 @@ async def update_async( http_meta=components.HTTPMetadata(request=req, response=http_res) ) if utils.match_response(http_res, ["4XX", "5XX"], "*"): + http_res_text = await utils.stream_to_text_async(http_res) raise errors.SDKError( - "API error occurred", http_res.status_code, http_res.text, http_res + "API error occurred", http_res.status_code, http_res_text, http_res ) if utils.match_response(http_res, "default", "application/json"): return operations.UpdateSigningKeyResponse( - error=utils.unmarshal_json(http_res.text, Optional[errors.Error]), + error=utils.unmarshal_json(http_res.text, Optional[components.Error]), http_meta=components.HTTPMetadata(request=req, response=http_res), ) content_type = http_res.headers.get("Content-Type") + http_res_text = await utils.stream_to_text_async(http_res) raise errors.SDKError( f"Unexpected response received (code: {http_res.status_code}, type: {content_type})", http_res.status_code, - http_res.text, + http_res_text, http_res, ) diff --git a/src/livepeer/asset.py b/src/livepeer/asset.py index 540cbd0..bba54c1 100644 --- a/src/livepeer/asset.py +++ b/src/livepeer/asset.py @@ -5,7 +5,7 @@ from livepeer._hooks import HookContext from livepeer.models import components, errors, operations from livepeer.types import BaseModel, OptionalNullable, UNSET -from typing import List, Optional, Union, cast +from typing import List, Mapping, Optional, Union, cast class Asset(BaseSDK): @@ -17,12 +17,14 @@ def get_all( retries: OptionalNullable[utils.RetryConfig] = UNSET, server_url: Optional[str] = None, timeout_ms: Optional[int] = None, + http_headers: Optional[Mapping[str, str]] = None, ) -> operations.GetAssetsResponse: r"""Retrieve assets :param retries: Override the default retry configuration for this method :param server_url: Override the default server URL for this method :param timeout_ms: Override the default request timeout configuration for this method in milliseconds + :param http_headers: Additional headers to set or replace on requests. """ base_url = None url_variables = None @@ -42,6 +44,7 @@ def get_all( request_has_query_params=True, user_agent_header="user-agent", accept_header_value="application/json", + http_headers=http_headers, security=self.sdk_configuration.security, timeout_ms=timeout_ms, ) @@ -73,20 +76,22 @@ def get_all( http_meta=components.HTTPMetadata(request=req, response=http_res), ) if utils.match_response(http_res, ["4XX", "5XX"], "*"): + http_res_text = utils.stream_to_text(http_res) raise errors.SDKError( - "API error occurred", http_res.status_code, http_res.text, http_res + "API error occurred", http_res.status_code, http_res_text, http_res ) if utils.match_response(http_res, "default", "application/json"): return operations.GetAssetsResponse( - error=utils.unmarshal_json(http_res.text, Optional[errors.Error]), + error=utils.unmarshal_json(http_res.text, Optional[components.Error]), http_meta=components.HTTPMetadata(request=req, response=http_res), ) content_type = http_res.headers.get("Content-Type") + http_res_text = utils.stream_to_text(http_res) raise errors.SDKError( f"Unexpected response received (code: {http_res.status_code}, type: {content_type})", http_res.status_code, - http_res.text, + http_res_text, http_res, ) @@ -96,12 +101,14 @@ async def get_all_async( retries: OptionalNullable[utils.RetryConfig] = UNSET, server_url: Optional[str] = None, timeout_ms: Optional[int] = None, + http_headers: Optional[Mapping[str, str]] = None, ) -> operations.GetAssetsResponse: r"""Retrieve assets :param retries: Override the default retry configuration for this method :param server_url: Override the default server URL for this method :param timeout_ms: Override the default request timeout configuration for this method in milliseconds + :param http_headers: Additional headers to set or replace on requests. """ base_url = None url_variables = None @@ -121,6 +128,7 @@ async def get_all_async( request_has_query_params=True, user_agent_header="user-agent", accept_header_value="application/json", + http_headers=http_headers, security=self.sdk_configuration.security, timeout_ms=timeout_ms, ) @@ -152,20 +160,22 @@ async def get_all_async( http_meta=components.HTTPMetadata(request=req, response=http_res), ) if utils.match_response(http_res, ["4XX", "5XX"], "*"): + http_res_text = await utils.stream_to_text_async(http_res) raise errors.SDKError( - "API error occurred", http_res.status_code, http_res.text, http_res + "API error occurred", http_res.status_code, http_res_text, http_res ) if utils.match_response(http_res, "default", "application/json"): return operations.GetAssetsResponse( - error=utils.unmarshal_json(http_res.text, Optional[errors.Error]), + error=utils.unmarshal_json(http_res.text, Optional[components.Error]), http_meta=components.HTTPMetadata(request=req, response=http_res), ) content_type = http_res.headers.get("Content-Type") + http_res_text = await utils.stream_to_text_async(http_res) raise errors.SDKError( f"Unexpected response received (code: {http_res.status_code}, type: {content_type})", http_res.status_code, - http_res.text, + http_res_text, http_res, ) @@ -176,6 +186,7 @@ def create( retries: OptionalNullable[utils.RetryConfig] = UNSET, server_url: Optional[str] = None, timeout_ms: Optional[int] = None, + http_headers: Optional[Mapping[str, str]] = None, ) -> operations.RequestUploadResponse: r"""Upload an asset @@ -256,6 +267,7 @@ def create( :param retries: Override the default retry configuration for this method :param server_url: Override the default server URL for this method :param timeout_ms: Override the default request timeout configuration for this method in milliseconds + :param http_headers: Additional headers to set or replace on requests. """ base_url = None url_variables = None @@ -280,6 +292,7 @@ def create( request_has_query_params=True, user_agent_header="user-agent", accept_header_value="application/json", + http_headers=http_headers, security=self.sdk_configuration.security, get_serialized_body=lambda: utils.serialize_request_body( request, False, False, "json", components.NewAssetPayload @@ -314,20 +327,22 @@ def create( http_meta=components.HTTPMetadata(request=req, response=http_res), ) if utils.match_response(http_res, ["4XX", "5XX"], "*"): + http_res_text = utils.stream_to_text(http_res) raise errors.SDKError( - "API error occurred", http_res.status_code, http_res.text, http_res + "API error occurred", http_res.status_code, http_res_text, http_res ) if utils.match_response(http_res, "default", "application/json"): return operations.RequestUploadResponse( - error=utils.unmarshal_json(http_res.text, Optional[errors.Error]), + error=utils.unmarshal_json(http_res.text, Optional[components.Error]), http_meta=components.HTTPMetadata(request=req, response=http_res), ) content_type = http_res.headers.get("Content-Type") + http_res_text = utils.stream_to_text(http_res) raise errors.SDKError( f"Unexpected response received (code: {http_res.status_code}, type: {content_type})", http_res.status_code, - http_res.text, + http_res_text, http_res, ) @@ -338,6 +353,7 @@ async def create_async( retries: OptionalNullable[utils.RetryConfig] = UNSET, server_url: Optional[str] = None, timeout_ms: Optional[int] = None, + http_headers: Optional[Mapping[str, str]] = None, ) -> operations.RequestUploadResponse: r"""Upload an asset @@ -418,6 +434,7 @@ async def create_async( :param retries: Override the default retry configuration for this method :param server_url: Override the default server URL for this method :param timeout_ms: Override the default request timeout configuration for this method in milliseconds + :param http_headers: Additional headers to set or replace on requests. """ base_url = None url_variables = None @@ -442,6 +459,7 @@ async def create_async( request_has_query_params=True, user_agent_header="user-agent", accept_header_value="application/json", + http_headers=http_headers, security=self.sdk_configuration.security, get_serialized_body=lambda: utils.serialize_request_body( request, False, False, "json", components.NewAssetPayload @@ -476,20 +494,22 @@ async def create_async( http_meta=components.HTTPMetadata(request=req, response=http_res), ) if utils.match_response(http_res, ["4XX", "5XX"], "*"): + http_res_text = await utils.stream_to_text_async(http_res) raise errors.SDKError( - "API error occurred", http_res.status_code, http_res.text, http_res + "API error occurred", http_res.status_code, http_res_text, http_res ) if utils.match_response(http_res, "default", "application/json"): return operations.RequestUploadResponse( - error=utils.unmarshal_json(http_res.text, Optional[errors.Error]), + error=utils.unmarshal_json(http_res.text, Optional[components.Error]), http_meta=components.HTTPMetadata(request=req, response=http_res), ) content_type = http_res.headers.get("Content-Type") + http_res_text = await utils.stream_to_text_async(http_res) raise errors.SDKError( f"Unexpected response received (code: {http_res.status_code}, type: {content_type})", http_res.status_code, - http_res.text, + http_res_text, http_res, ) @@ -503,6 +523,7 @@ def create_via_url( retries: OptionalNullable[utils.RetryConfig] = UNSET, server_url: Optional[str] = None, timeout_ms: Optional[int] = None, + http_headers: Optional[Mapping[str, str]] = None, ) -> operations.UploadAssetResponse: r"""Upload asset via URL @@ -510,6 +531,7 @@ def create_via_url( :param retries: Override the default retry configuration for this method :param server_url: Override the default server URL for this method :param timeout_ms: Override the default request timeout configuration for this method in milliseconds + :param http_headers: Additional headers to set or replace on requests. """ base_url = None url_variables = None @@ -534,6 +556,7 @@ def create_via_url( request_has_query_params=True, user_agent_header="user-agent", accept_header_value="application/json", + http_headers=http_headers, security=self.sdk_configuration.security, get_serialized_body=lambda: utils.serialize_request_body( request, False, False, "json", components.NewAssetFromURLPayload @@ -575,20 +598,22 @@ def create_via_url( http_meta=components.HTTPMetadata(request=req, response=http_res), ) if utils.match_response(http_res, ["4XX", "5XX"], "*"): + http_res_text = utils.stream_to_text(http_res) raise errors.SDKError( - "API error occurred", http_res.status_code, http_res.text, http_res + "API error occurred", http_res.status_code, http_res_text, http_res ) if utils.match_response(http_res, "default", "application/json"): return operations.UploadAssetResponse( - error=utils.unmarshal_json(http_res.text, Optional[errors.Error]), + error=utils.unmarshal_json(http_res.text, Optional[components.Error]), http_meta=components.HTTPMetadata(request=req, response=http_res), ) content_type = http_res.headers.get("Content-Type") + http_res_text = utils.stream_to_text(http_res) raise errors.SDKError( f"Unexpected response received (code: {http_res.status_code}, type: {content_type})", http_res.status_code, - http_res.text, + http_res_text, http_res, ) @@ -602,6 +627,7 @@ async def create_via_url_async( retries: OptionalNullable[utils.RetryConfig] = UNSET, server_url: Optional[str] = None, timeout_ms: Optional[int] = None, + http_headers: Optional[Mapping[str, str]] = None, ) -> operations.UploadAssetResponse: r"""Upload asset via URL @@ -609,6 +635,7 @@ async def create_via_url_async( :param retries: Override the default retry configuration for this method :param server_url: Override the default server URL for this method :param timeout_ms: Override the default request timeout configuration for this method in milliseconds + :param http_headers: Additional headers to set or replace on requests. """ base_url = None url_variables = None @@ -633,6 +660,7 @@ async def create_via_url_async( request_has_query_params=True, user_agent_header="user-agent", accept_header_value="application/json", + http_headers=http_headers, security=self.sdk_configuration.security, get_serialized_body=lambda: utils.serialize_request_body( request, False, False, "json", components.NewAssetFromURLPayload @@ -674,20 +702,22 @@ async def create_via_url_async( http_meta=components.HTTPMetadata(request=req, response=http_res), ) if utils.match_response(http_res, ["4XX", "5XX"], "*"): + http_res_text = await utils.stream_to_text_async(http_res) raise errors.SDKError( - "API error occurred", http_res.status_code, http_res.text, http_res + "API error occurred", http_res.status_code, http_res_text, http_res ) if utils.match_response(http_res, "default", "application/json"): return operations.UploadAssetResponse( - error=utils.unmarshal_json(http_res.text, Optional[errors.Error]), + error=utils.unmarshal_json(http_res.text, Optional[components.Error]), http_meta=components.HTTPMetadata(request=req, response=http_res), ) content_type = http_res.headers.get("Content-Type") + http_res_text = await utils.stream_to_text_async(http_res) raise errors.SDKError( f"Unexpected response received (code: {http_res.status_code}, type: {content_type})", http_res.status_code, - http_res.text, + http_res_text, http_res, ) @@ -698,6 +728,7 @@ def get( retries: OptionalNullable[utils.RetryConfig] = UNSET, server_url: Optional[str] = None, timeout_ms: Optional[int] = None, + http_headers: Optional[Mapping[str, str]] = None, ) -> operations.GetAssetResponse: r"""Retrieves an asset @@ -705,6 +736,7 @@ def get( :param retries: Override the default retry configuration for this method :param server_url: Override the default server URL for this method :param timeout_ms: Override the default request timeout configuration for this method in milliseconds + :param http_headers: Additional headers to set or replace on requests. """ base_url = None url_variables = None @@ -729,6 +761,7 @@ def get( request_has_query_params=True, user_agent_header="user-agent", accept_header_value="application/json", + http_headers=http_headers, security=self.sdk_configuration.security, timeout_ms=timeout_ms, ) @@ -758,20 +791,22 @@ def get( http_meta=components.HTTPMetadata(request=req, response=http_res), ) if utils.match_response(http_res, ["4XX", "5XX"], "*"): + http_res_text = utils.stream_to_text(http_res) raise errors.SDKError( - "API error occurred", http_res.status_code, http_res.text, http_res + "API error occurred", http_res.status_code, http_res_text, http_res ) if utils.match_response(http_res, "default", "application/json"): return operations.GetAssetResponse( - error=utils.unmarshal_json(http_res.text, Optional[errors.Error]), + error=utils.unmarshal_json(http_res.text, Optional[components.Error]), http_meta=components.HTTPMetadata(request=req, response=http_res), ) content_type = http_res.headers.get("Content-Type") + http_res_text = utils.stream_to_text(http_res) raise errors.SDKError( f"Unexpected response received (code: {http_res.status_code}, type: {content_type})", http_res.status_code, - http_res.text, + http_res_text, http_res, ) @@ -782,6 +817,7 @@ async def get_async( retries: OptionalNullable[utils.RetryConfig] = UNSET, server_url: Optional[str] = None, timeout_ms: Optional[int] = None, + http_headers: Optional[Mapping[str, str]] = None, ) -> operations.GetAssetResponse: r"""Retrieves an asset @@ -789,6 +825,7 @@ async def get_async( :param retries: Override the default retry configuration for this method :param server_url: Override the default server URL for this method :param timeout_ms: Override the default request timeout configuration for this method in milliseconds + :param http_headers: Additional headers to set or replace on requests. """ base_url = None url_variables = None @@ -813,6 +850,7 @@ async def get_async( request_has_query_params=True, user_agent_header="user-agent", accept_header_value="application/json", + http_headers=http_headers, security=self.sdk_configuration.security, timeout_ms=timeout_ms, ) @@ -842,20 +880,22 @@ async def get_async( http_meta=components.HTTPMetadata(request=req, response=http_res), ) if utils.match_response(http_res, ["4XX", "5XX"], "*"): + http_res_text = await utils.stream_to_text_async(http_res) raise errors.SDKError( - "API error occurred", http_res.status_code, http_res.text, http_res + "API error occurred", http_res.status_code, http_res_text, http_res ) if utils.match_response(http_res, "default", "application/json"): return operations.GetAssetResponse( - error=utils.unmarshal_json(http_res.text, Optional[errors.Error]), + error=utils.unmarshal_json(http_res.text, Optional[components.Error]), http_meta=components.HTTPMetadata(request=req, response=http_res), ) content_type = http_res.headers.get("Content-Type") + http_res_text = await utils.stream_to_text_async(http_res) raise errors.SDKError( f"Unexpected response received (code: {http_res.status_code}, type: {content_type})", http_res.status_code, - http_res.text, + http_res_text, http_res, ) @@ -869,6 +909,7 @@ def update( retries: OptionalNullable[utils.RetryConfig] = UNSET, server_url: Optional[str] = None, timeout_ms: Optional[int] = None, + http_headers: Optional[Mapping[str, str]] = None, ) -> operations.UpdateAssetResponse: r"""Patch an asset @@ -877,6 +918,7 @@ def update( :param retries: Override the default retry configuration for this method :param server_url: Override the default server URL for this method :param timeout_ms: Override the default request timeout configuration for this method in milliseconds + :param http_headers: Additional headers to set or replace on requests. """ base_url = None url_variables = None @@ -904,6 +946,7 @@ def update( request_has_query_params=True, user_agent_header="user-agent", accept_header_value="application/json", + http_headers=http_headers, security=self.sdk_configuration.security, get_serialized_body=lambda: utils.serialize_request_body( request.asset_patch_payload, @@ -940,20 +983,22 @@ def update( http_meta=components.HTTPMetadata(request=req, response=http_res), ) if utils.match_response(http_res, ["4XX", "5XX"], "*"): + http_res_text = utils.stream_to_text(http_res) raise errors.SDKError( - "API error occurred", http_res.status_code, http_res.text, http_res + "API error occurred", http_res.status_code, http_res_text, http_res ) if utils.match_response(http_res, "default", "application/json"): return operations.UpdateAssetResponse( - error=utils.unmarshal_json(http_res.text, Optional[errors.Error]), + error=utils.unmarshal_json(http_res.text, Optional[components.Error]), http_meta=components.HTTPMetadata(request=req, response=http_res), ) content_type = http_res.headers.get("Content-Type") + http_res_text = utils.stream_to_text(http_res) raise errors.SDKError( f"Unexpected response received (code: {http_res.status_code}, type: {content_type})", http_res.status_code, - http_res.text, + http_res_text, http_res, ) @@ -967,6 +1012,7 @@ async def update_async( retries: OptionalNullable[utils.RetryConfig] = UNSET, server_url: Optional[str] = None, timeout_ms: Optional[int] = None, + http_headers: Optional[Mapping[str, str]] = None, ) -> operations.UpdateAssetResponse: r"""Patch an asset @@ -975,6 +1021,7 @@ async def update_async( :param retries: Override the default retry configuration for this method :param server_url: Override the default server URL for this method :param timeout_ms: Override the default request timeout configuration for this method in milliseconds + :param http_headers: Additional headers to set or replace on requests. """ base_url = None url_variables = None @@ -1002,6 +1049,7 @@ async def update_async( request_has_query_params=True, user_agent_header="user-agent", accept_header_value="application/json", + http_headers=http_headers, security=self.sdk_configuration.security, get_serialized_body=lambda: utils.serialize_request_body( request.asset_patch_payload, @@ -1038,20 +1086,22 @@ async def update_async( http_meta=components.HTTPMetadata(request=req, response=http_res), ) if utils.match_response(http_res, ["4XX", "5XX"], "*"): + http_res_text = await utils.stream_to_text_async(http_res) raise errors.SDKError( - "API error occurred", http_res.status_code, http_res.text, http_res + "API error occurred", http_res.status_code, http_res_text, http_res ) if utils.match_response(http_res, "default", "application/json"): return operations.UpdateAssetResponse( - error=utils.unmarshal_json(http_res.text, Optional[errors.Error]), + error=utils.unmarshal_json(http_res.text, Optional[components.Error]), http_meta=components.HTTPMetadata(request=req, response=http_res), ) content_type = http_res.headers.get("Content-Type") + http_res_text = await utils.stream_to_text_async(http_res) raise errors.SDKError( f"Unexpected response received (code: {http_res.status_code}, type: {content_type})", http_res.status_code, - http_res.text, + http_res_text, http_res, ) @@ -1062,6 +1112,7 @@ def delete( retries: OptionalNullable[utils.RetryConfig] = UNSET, server_url: Optional[str] = None, timeout_ms: Optional[int] = None, + http_headers: Optional[Mapping[str, str]] = None, ) -> operations.DeleteAssetResponse: r"""Delete an asset @@ -1069,6 +1120,7 @@ def delete( :param retries: Override the default retry configuration for this method :param server_url: Override the default server URL for this method :param timeout_ms: Override the default request timeout configuration for this method in milliseconds + :param http_headers: Additional headers to set or replace on requests. """ base_url = None url_variables = None @@ -1093,6 +1145,7 @@ def delete( request_has_query_params=True, user_agent_header="user-agent", accept_header_value="application/json", + http_headers=http_headers, security=self.sdk_configuration.security, timeout_ms=timeout_ms, ) @@ -1121,20 +1174,22 @@ def delete( http_meta=components.HTTPMetadata(request=req, response=http_res) ) if utils.match_response(http_res, ["4XX", "5XX"], "*"): + http_res_text = utils.stream_to_text(http_res) raise errors.SDKError( - "API error occurred", http_res.status_code, http_res.text, http_res + "API error occurred", http_res.status_code, http_res_text, http_res ) if utils.match_response(http_res, "default", "application/json"): return operations.DeleteAssetResponse( - error=utils.unmarshal_json(http_res.text, Optional[errors.Error]), + error=utils.unmarshal_json(http_res.text, Optional[components.Error]), http_meta=components.HTTPMetadata(request=req, response=http_res), ) content_type = http_res.headers.get("Content-Type") + http_res_text = utils.stream_to_text(http_res) raise errors.SDKError( f"Unexpected response received (code: {http_res.status_code}, type: {content_type})", http_res.status_code, - http_res.text, + http_res_text, http_res, ) @@ -1145,6 +1200,7 @@ async def delete_async( retries: OptionalNullable[utils.RetryConfig] = UNSET, server_url: Optional[str] = None, timeout_ms: Optional[int] = None, + http_headers: Optional[Mapping[str, str]] = None, ) -> operations.DeleteAssetResponse: r"""Delete an asset @@ -1152,6 +1208,7 @@ async def delete_async( :param retries: Override the default retry configuration for this method :param server_url: Override the default server URL for this method :param timeout_ms: Override the default request timeout configuration for this method in milliseconds + :param http_headers: Additional headers to set or replace on requests. """ base_url = None url_variables = None @@ -1176,6 +1233,7 @@ async def delete_async( request_has_query_params=True, user_agent_header="user-agent", accept_header_value="application/json", + http_headers=http_headers, security=self.sdk_configuration.security, timeout_ms=timeout_ms, ) @@ -1204,19 +1262,21 @@ async def delete_async( http_meta=components.HTTPMetadata(request=req, response=http_res) ) if utils.match_response(http_res, ["4XX", "5XX"], "*"): + http_res_text = await utils.stream_to_text_async(http_res) raise errors.SDKError( - "API error occurred", http_res.status_code, http_res.text, http_res + "API error occurred", http_res.status_code, http_res_text, http_res ) if utils.match_response(http_res, "default", "application/json"): return operations.DeleteAssetResponse( - error=utils.unmarshal_json(http_res.text, Optional[errors.Error]), + error=utils.unmarshal_json(http_res.text, Optional[components.Error]), http_meta=components.HTTPMetadata(request=req, response=http_res), ) content_type = http_res.headers.get("Content-Type") + http_res_text = await utils.stream_to_text_async(http_res) raise errors.SDKError( f"Unexpected response received (code: {http_res.status_code}, type: {content_type})", http_res.status_code, - http_res.text, + http_res_text, http_res, ) diff --git a/src/livepeer/basesdk.py b/src/livepeer/basesdk.py index b5cc177..2d923f3 100644 --- a/src/livepeer/basesdk.py +++ b/src/livepeer/basesdk.py @@ -6,7 +6,8 @@ from livepeer._hooks import AfterErrorContext, AfterSuccessContext, BeforeRequestContext from livepeer.models import errors from livepeer.utils import RetryConfig, SerializedRequestBody, get_body_content -from typing import Callable, List, Optional, Tuple +from typing import Callable, List, Mapping, Optional, Tuple +from urllib.parse import parse_qs, urlparse class BaseSDK: @@ -45,6 +46,7 @@ def build_request_async( Callable[[], Optional[SerializedRequestBody]] ] = None, url_override: Optional[str] = None, + http_headers: Optional[Mapping[str, str]] = None, ) -> httpx.Request: client = self.sdk_configuration.async_client return self.build_request_with_client( @@ -64,6 +66,7 @@ def build_request_async( timeout_ms, get_serialized_body, url_override, + http_headers, ) def build_request( @@ -85,6 +88,7 @@ def build_request( Callable[[], Optional[SerializedRequestBody]] ] = None, url_override: Optional[str] = None, + http_headers: Optional[Mapping[str, str]] = None, ) -> httpx.Request: client = self.sdk_configuration.client return self.build_request_with_client( @@ -104,6 +108,7 @@ def build_request( timeout_ms, get_serialized_body, url_override, + http_headers, ) def build_request_with_client( @@ -126,6 +131,7 @@ def build_request_with_client( Callable[[], Optional[SerializedRequestBody]] ] = None, url_override: Optional[str] = None, + http_headers: Optional[Mapping[str, str]] = None, ) -> httpx.Request: query_params = {} @@ -142,6 +148,12 @@ def build_request_with_client( request if request_has_query_params else None, _globals if request_has_query_params else None, ) + else: + # Pick up the query parameter from the override so they can be + # preserved when building the request later on (necessary as of + # httpx 0.28). + parsed_override = urlparse(str(url_override)) + query_params = parse_qs(parsed_override.query, keep_blank_values=True) headers = utils.get_headers(request, _globals) headers["Accept"] = accept_header_value @@ -156,7 +168,7 @@ def build_request_with_client( headers = {**headers, **security_headers} query_params = {**query_params, **security_query_params} - serialized_request_body = SerializedRequestBody("application/octet-stream") + serialized_request_body = SerializedRequestBody() if get_serialized_body is not None: rb = get_serialized_body() if request_body_required and rb is None: @@ -175,6 +187,10 @@ def build_request_with_client( ): headers["content-type"] = serialized_request_body.media_type + if http_headers is not None: + for header, value in http_headers.items(): + headers[header] = value + timeout = timeout_ms / 1000 if timeout_ms is not None else None return client.build_request( diff --git a/src/livepeer/generate.py b/src/livepeer/generate.py index 425b7fa..e930b43 100644 --- a/src/livepeer/generate.py +++ b/src/livepeer/generate.py @@ -5,7 +5,7 @@ from livepeer._hooks import HookContext from livepeer.models import components, errors, operations from livepeer.types import BaseModel, OptionalNullable, UNSET -from typing import Any, Optional, Union, cast +from typing import Any, Mapping, Optional, Union, cast class Generate(BaseSDK): @@ -20,6 +20,7 @@ def text_to_image( retries: OptionalNullable[utils.RetryConfig] = UNSET, server_url: Optional[str] = None, timeout_ms: Optional[int] = None, + http_headers: Optional[Mapping[str, str]] = None, ) -> operations.GenTextToImageResponse: r"""Text To Image @@ -29,6 +30,7 @@ def text_to_image( :param retries: Override the default retry configuration for this method :param server_url: Override the default server URL for this method :param timeout_ms: Override the default request timeout configuration for this method in milliseconds + :param http_headers: Additional headers to set or replace on requests. """ base_url = None url_variables = None @@ -44,7 +46,7 @@ def text_to_image( req = self.build_request( method="POST", - path="/api/beta/generate/text-to-image", + path="/api/generate/text-to-image", base_url=base_url, url_variables=url_variables, request=request, @@ -53,6 +55,7 @@ def text_to_image( request_has_query_params=True, user_agent_header="user-agent", accept_header_value="application/json", + http_headers=http_headers, security=self.sdk_configuration.security, get_serialized_body=lambda: utils.serialize_request_body( request, False, False, "json", components.TextToImageParams @@ -112,22 +115,24 @@ def text_to_image( data.http_meta = components.HTTPMetadata(request=req, response=http_res) raise errors.GenTextToImageGenerateResponse500ResponseBody(data=data) if utils.match_response(http_res, ["4XX", "5XX"], "*"): + http_res_text = utils.stream_to_text(http_res) raise errors.SDKError( - "API error occurred", http_res.status_code, http_res.text, http_res + "API error occurred", http_res.status_code, http_res_text, http_res ) if utils.match_response(http_res, "default", "application/json"): return operations.GenTextToImageResponse( studio_api_error=utils.unmarshal_json( - http_res.text, Optional[errors.StudioAPIError] + http_res.text, Optional[components.StudioAPIError] ), http_meta=components.HTTPMetadata(request=req, response=http_res), ) content_type = http_res.headers.get("Content-Type") + http_res_text = utils.stream_to_text(http_res) raise errors.SDKError( f"Unexpected response received (code: {http_res.status_code}, type: {content_type})", http_res.status_code, - http_res.text, + http_res_text, http_res, ) @@ -140,6 +145,7 @@ async def text_to_image_async( retries: OptionalNullable[utils.RetryConfig] = UNSET, server_url: Optional[str] = None, timeout_ms: Optional[int] = None, + http_headers: Optional[Mapping[str, str]] = None, ) -> operations.GenTextToImageResponse: r"""Text To Image @@ -149,6 +155,7 @@ async def text_to_image_async( :param retries: Override the default retry configuration for this method :param server_url: Override the default server URL for this method :param timeout_ms: Override the default request timeout configuration for this method in milliseconds + :param http_headers: Additional headers to set or replace on requests. """ base_url = None url_variables = None @@ -164,7 +171,7 @@ async def text_to_image_async( req = self.build_request_async( method="POST", - path="/api/beta/generate/text-to-image", + path="/api/generate/text-to-image", base_url=base_url, url_variables=url_variables, request=request, @@ -173,6 +180,7 @@ async def text_to_image_async( request_has_query_params=True, user_agent_header="user-agent", accept_header_value="application/json", + http_headers=http_headers, security=self.sdk_configuration.security, get_serialized_body=lambda: utils.serialize_request_body( request, False, False, "json", components.TextToImageParams @@ -232,22 +240,24 @@ async def text_to_image_async( data.http_meta = components.HTTPMetadata(request=req, response=http_res) raise errors.GenTextToImageGenerateResponse500ResponseBody(data=data) if utils.match_response(http_res, ["4XX", "5XX"], "*"): + http_res_text = await utils.stream_to_text_async(http_res) raise errors.SDKError( - "API error occurred", http_res.status_code, http_res.text, http_res + "API error occurred", http_res.status_code, http_res_text, http_res ) if utils.match_response(http_res, "default", "application/json"): return operations.GenTextToImageResponse( studio_api_error=utils.unmarshal_json( - http_res.text, Optional[errors.StudioAPIError] + http_res.text, Optional[components.StudioAPIError] ), http_meta=components.HTTPMetadata(request=req, response=http_res), ) content_type = http_res.headers.get("Content-Type") + http_res_text = await utils.stream_to_text_async(http_res) raise errors.SDKError( f"Unexpected response received (code: {http_res.status_code}, type: {content_type})", http_res.status_code, - http_res.text, + http_res_text, http_res, ) @@ -260,6 +270,7 @@ def image_to_image( retries: OptionalNullable[utils.RetryConfig] = UNSET, server_url: Optional[str] = None, timeout_ms: Optional[int] = None, + http_headers: Optional[Mapping[str, str]] = None, ) -> operations.GenImageToImageResponse: r"""Image To Image @@ -269,6 +280,7 @@ def image_to_image( :param retries: Override the default retry configuration for this method :param server_url: Override the default server URL for this method :param timeout_ms: Override the default request timeout configuration for this method in milliseconds + :param http_headers: Additional headers to set or replace on requests. """ base_url = None url_variables = None @@ -284,7 +296,7 @@ def image_to_image( req = self.build_request( method="POST", - path="/api/beta/generate/image-to-image", + path="/api/generate/image-to-image", base_url=base_url, url_variables=url_variables, request=request, @@ -293,6 +305,7 @@ def image_to_image( request_has_query_params=True, user_agent_header="user-agent", accept_header_value="application/json", + http_headers=http_headers, security=self.sdk_configuration.security, get_serialized_body=lambda: utils.serialize_request_body( request, False, False, "multipart", components.BodyGenImageToImage @@ -353,8 +366,9 @@ def image_to_image( data.http_meta = components.HTTPMetadata(request=req, response=http_res) raise errors.GenImageToImageGenerateResponse500ResponseBody(data=data) if utils.match_response(http_res, ["4XX", "5XX"], "*"): + http_res_text = utils.stream_to_text(http_res) raise errors.SDKError( - "API error occurred", http_res.status_code, http_res.text, http_res + "API error occurred", http_res.status_code, http_res_text, http_res ) if utils.match_response(http_res, "default", "application/json"): return operations.GenImageToImageResponse( @@ -365,10 +379,11 @@ def image_to_image( ) content_type = http_res.headers.get("Content-Type") + http_res_text = utils.stream_to_text(http_res) raise errors.SDKError( f"Unexpected response received (code: {http_res.status_code}, type: {content_type})", http_res.status_code, - http_res.text, + http_res_text, http_res, ) @@ -381,6 +396,7 @@ async def image_to_image_async( retries: OptionalNullable[utils.RetryConfig] = UNSET, server_url: Optional[str] = None, timeout_ms: Optional[int] = None, + http_headers: Optional[Mapping[str, str]] = None, ) -> operations.GenImageToImageResponse: r"""Image To Image @@ -390,6 +406,7 @@ async def image_to_image_async( :param retries: Override the default retry configuration for this method :param server_url: Override the default server URL for this method :param timeout_ms: Override the default request timeout configuration for this method in milliseconds + :param http_headers: Additional headers to set or replace on requests. """ base_url = None url_variables = None @@ -405,7 +422,7 @@ async def image_to_image_async( req = self.build_request_async( method="POST", - path="/api/beta/generate/image-to-image", + path="/api/generate/image-to-image", base_url=base_url, url_variables=url_variables, request=request, @@ -414,6 +431,7 @@ async def image_to_image_async( request_has_query_params=True, user_agent_header="user-agent", accept_header_value="application/json", + http_headers=http_headers, security=self.sdk_configuration.security, get_serialized_body=lambda: utils.serialize_request_body( request, False, False, "multipart", components.BodyGenImageToImage @@ -474,8 +492,9 @@ async def image_to_image_async( data.http_meta = components.HTTPMetadata(request=req, response=http_res) raise errors.GenImageToImageGenerateResponse500ResponseBody(data=data) if utils.match_response(http_res, ["4XX", "5XX"], "*"): + http_res_text = await utils.stream_to_text_async(http_res) raise errors.SDKError( - "API error occurred", http_res.status_code, http_res.text, http_res + "API error occurred", http_res.status_code, http_res_text, http_res ) if utils.match_response(http_res, "default", "application/json"): return operations.GenImageToImageResponse( @@ -486,10 +505,11 @@ async def image_to_image_async( ) content_type = http_res.headers.get("Content-Type") + http_res_text = await utils.stream_to_text_async(http_res) raise errors.SDKError( f"Unexpected response received (code: {http_res.status_code}, type: {content_type})", http_res.status_code, - http_res.text, + http_res_text, http_res, ) @@ -502,6 +522,7 @@ def image_to_video( retries: OptionalNullable[utils.RetryConfig] = UNSET, server_url: Optional[str] = None, timeout_ms: Optional[int] = None, + http_headers: Optional[Mapping[str, str]] = None, ) -> operations.GenImageToVideoResponse: r"""Image To Video @@ -511,6 +532,7 @@ def image_to_video( :param retries: Override the default retry configuration for this method :param server_url: Override the default server URL for this method :param timeout_ms: Override the default request timeout configuration for this method in milliseconds + :param http_headers: Additional headers to set or replace on requests. """ base_url = None url_variables = None @@ -526,7 +548,7 @@ def image_to_video( req = self.build_request( method="POST", - path="/api/beta/generate/image-to-video", + path="/api/generate/image-to-video", base_url=base_url, url_variables=url_variables, request=request, @@ -535,6 +557,7 @@ def image_to_video( request_has_query_params=True, user_agent_header="user-agent", accept_header_value="application/json", + http_headers=http_headers, security=self.sdk_configuration.security, get_serialized_body=lambda: utils.serialize_request_body( request, False, False, "multipart", components.BodyGenImageToVideo @@ -595,8 +618,9 @@ def image_to_video( data.http_meta = components.HTTPMetadata(request=req, response=http_res) raise errors.GenImageToVideoGenerateResponse500ResponseBody(data=data) if utils.match_response(http_res, ["4XX", "5XX"], "*"): + http_res_text = utils.stream_to_text(http_res) raise errors.SDKError( - "API error occurred", http_res.status_code, http_res.text, http_res + "API error occurred", http_res.status_code, http_res_text, http_res ) if utils.match_response(http_res, "default", "application/json"): return operations.GenImageToVideoResponse( @@ -607,10 +631,11 @@ def image_to_video( ) content_type = http_res.headers.get("Content-Type") + http_res_text = utils.stream_to_text(http_res) raise errors.SDKError( f"Unexpected response received (code: {http_res.status_code}, type: {content_type})", http_res.status_code, - http_res.text, + http_res_text, http_res, ) @@ -623,6 +648,7 @@ async def image_to_video_async( retries: OptionalNullable[utils.RetryConfig] = UNSET, server_url: Optional[str] = None, timeout_ms: Optional[int] = None, + http_headers: Optional[Mapping[str, str]] = None, ) -> operations.GenImageToVideoResponse: r"""Image To Video @@ -632,6 +658,7 @@ async def image_to_video_async( :param retries: Override the default retry configuration for this method :param server_url: Override the default server URL for this method :param timeout_ms: Override the default request timeout configuration for this method in milliseconds + :param http_headers: Additional headers to set or replace on requests. """ base_url = None url_variables = None @@ -647,7 +674,7 @@ async def image_to_video_async( req = self.build_request_async( method="POST", - path="/api/beta/generate/image-to-video", + path="/api/generate/image-to-video", base_url=base_url, url_variables=url_variables, request=request, @@ -656,6 +683,7 @@ async def image_to_video_async( request_has_query_params=True, user_agent_header="user-agent", accept_header_value="application/json", + http_headers=http_headers, security=self.sdk_configuration.security, get_serialized_body=lambda: utils.serialize_request_body( request, False, False, "multipart", components.BodyGenImageToVideo @@ -716,8 +744,9 @@ async def image_to_video_async( data.http_meta = components.HTTPMetadata(request=req, response=http_res) raise errors.GenImageToVideoGenerateResponse500ResponseBody(data=data) if utils.match_response(http_res, ["4XX", "5XX"], "*"): + http_res_text = await utils.stream_to_text_async(http_res) raise errors.SDKError( - "API error occurred", http_res.status_code, http_res.text, http_res + "API error occurred", http_res.status_code, http_res_text, http_res ) if utils.match_response(http_res, "default", "application/json"): return operations.GenImageToVideoResponse( @@ -728,10 +757,11 @@ async def image_to_video_async( ) content_type = http_res.headers.get("Content-Type") + http_res_text = await utils.stream_to_text_async(http_res) raise errors.SDKError( f"Unexpected response received (code: {http_res.status_code}, type: {content_type})", http_res.status_code, - http_res.text, + http_res_text, http_res, ) @@ -742,6 +772,7 @@ def upscale( retries: OptionalNullable[utils.RetryConfig] = UNSET, server_url: Optional[str] = None, timeout_ms: Optional[int] = None, + http_headers: Optional[Mapping[str, str]] = None, ) -> operations.GenUpscaleResponse: r"""Upscale @@ -751,6 +782,7 @@ def upscale( :param retries: Override the default retry configuration for this method :param server_url: Override the default server URL for this method :param timeout_ms: Override the default request timeout configuration for this method in milliseconds + :param http_headers: Additional headers to set or replace on requests. """ base_url = None url_variables = None @@ -766,7 +798,7 @@ def upscale( req = self.build_request( method="POST", - path="/api/beta/generate/upscale", + path="/api/generate/upscale", base_url=base_url, url_variables=url_variables, request=request, @@ -775,6 +807,7 @@ def upscale( request_has_query_params=True, user_agent_header="user-agent", accept_header_value="application/json", + http_headers=http_headers, security=self.sdk_configuration.security, get_serialized_body=lambda: utils.serialize_request_body( request, False, False, "multipart", components.BodyGenUpscale @@ -834,8 +867,9 @@ def upscale( data.http_meta = components.HTTPMetadata(request=req, response=http_res) raise errors.GenUpscaleGenerateResponse500ResponseBody(data=data) if utils.match_response(http_res, ["4XX", "5XX"], "*"): + http_res_text = utils.stream_to_text(http_res) raise errors.SDKError( - "API error occurred", http_res.status_code, http_res.text, http_res + "API error occurred", http_res.status_code, http_res_text, http_res ) if utils.match_response(http_res, "default", "application/json"): return operations.GenUpscaleResponse( @@ -846,10 +880,11 @@ def upscale( ) content_type = http_res.headers.get("Content-Type") + http_res_text = utils.stream_to_text(http_res) raise errors.SDKError( f"Unexpected response received (code: {http_res.status_code}, type: {content_type})", http_res.status_code, - http_res.text, + http_res_text, http_res, ) @@ -860,6 +895,7 @@ async def upscale_async( retries: OptionalNullable[utils.RetryConfig] = UNSET, server_url: Optional[str] = None, timeout_ms: Optional[int] = None, + http_headers: Optional[Mapping[str, str]] = None, ) -> operations.GenUpscaleResponse: r"""Upscale @@ -869,6 +905,7 @@ async def upscale_async( :param retries: Override the default retry configuration for this method :param server_url: Override the default server URL for this method :param timeout_ms: Override the default request timeout configuration for this method in milliseconds + :param http_headers: Additional headers to set or replace on requests. """ base_url = None url_variables = None @@ -884,7 +921,7 @@ async def upscale_async( req = self.build_request_async( method="POST", - path="/api/beta/generate/upscale", + path="/api/generate/upscale", base_url=base_url, url_variables=url_variables, request=request, @@ -893,6 +930,7 @@ async def upscale_async( request_has_query_params=True, user_agent_header="user-agent", accept_header_value="application/json", + http_headers=http_headers, security=self.sdk_configuration.security, get_serialized_body=lambda: utils.serialize_request_body( request, False, False, "multipart", components.BodyGenUpscale @@ -952,8 +990,9 @@ async def upscale_async( data.http_meta = components.HTTPMetadata(request=req, response=http_res) raise errors.GenUpscaleGenerateResponse500ResponseBody(data=data) if utils.match_response(http_res, ["4XX", "5XX"], "*"): + http_res_text = await utils.stream_to_text_async(http_res) raise errors.SDKError( - "API error occurred", http_res.status_code, http_res.text, http_res + "API error occurred", http_res.status_code, http_res_text, http_res ) if utils.match_response(http_res, "default", "application/json"): return operations.GenUpscaleResponse( @@ -964,10 +1003,11 @@ async def upscale_async( ) content_type = http_res.headers.get("Content-Type") + http_res_text = await utils.stream_to_text_async(http_res) raise errors.SDKError( f"Unexpected response received (code: {http_res.status_code}, type: {content_type})", http_res.status_code, - http_res.text, + http_res_text, http_res, ) @@ -980,6 +1020,7 @@ def audio_to_text( retries: OptionalNullable[utils.RetryConfig] = UNSET, server_url: Optional[str] = None, timeout_ms: Optional[int] = None, + http_headers: Optional[Mapping[str, str]] = None, ) -> operations.GenAudioToTextResponse: r"""Audio To Text @@ -989,6 +1030,7 @@ def audio_to_text( :param retries: Override the default retry configuration for this method :param server_url: Override the default server URL for this method :param timeout_ms: Override the default request timeout configuration for this method in milliseconds + :param http_headers: Additional headers to set or replace on requests. """ base_url = None url_variables = None @@ -1004,7 +1046,7 @@ def audio_to_text( req = self.build_request( method="POST", - path="/api/beta/generate/audio-to-text", + path="/api/generate/audio-to-text", base_url=base_url, url_variables=url_variables, request=request, @@ -1013,6 +1055,7 @@ def audio_to_text( request_has_query_params=True, user_agent_header="user-agent", accept_header_value="application/json", + http_headers=http_headers, security=self.sdk_configuration.security, get_serialized_body=lambda: utils.serialize_request_body( request, False, False, "multipart", components.BodyGenAudioToText @@ -1035,7 +1078,7 @@ def audio_to_text( security_source=self.sdk_configuration.security, ), request=req, - error_status_codes=["400", "401", "413", "422", "4XX", "500", "5XX"], + error_status_codes=["400", "401", "413", "415", "422", "4XX", "500", "5XX"], retry_config=retry_config, ) @@ -1065,6 +1108,12 @@ def audio_to_text( ) data.http_meta = components.HTTPMetadata(request=req, response=http_res) raise errors.GenAudioToTextGenerateResponseResponseBody(data=data) + if utils.match_response(http_res, "415", "application/json"): + data = utils.unmarshal_json( + http_res.text, errors.GenAudioToTextGenerateResponse415ResponseBodyUnion + ) + data.http_meta = components.HTTPMetadata(request=req, response=http_res) + raise errors.GenAudioToTextGenerateResponse415ResponseBody(data=data) if utils.match_response(http_res, "422", "application/json"): data = utils.unmarshal_json( http_res.text, errors.GenAudioToTextGenerateResponse422ResponseBodyUnion @@ -1078,8 +1127,9 @@ def audio_to_text( data.http_meta = components.HTTPMetadata(request=req, response=http_res) raise errors.GenAudioToTextGenerateResponse500ResponseBody(data=data) if utils.match_response(http_res, ["4XX", "5XX"], "*"): + http_res_text = utils.stream_to_text(http_res) raise errors.SDKError( - "API error occurred", http_res.status_code, http_res.text, http_res + "API error occurred", http_res.status_code, http_res_text, http_res ) if utils.match_response(http_res, "default", "application/json"): return operations.GenAudioToTextResponse( @@ -1090,10 +1140,11 @@ def audio_to_text( ) content_type = http_res.headers.get("Content-Type") + http_res_text = utils.stream_to_text(http_res) raise errors.SDKError( f"Unexpected response received (code: {http_res.status_code}, type: {content_type})", http_res.status_code, - http_res.text, + http_res_text, http_res, ) @@ -1106,6 +1157,7 @@ async def audio_to_text_async( retries: OptionalNullable[utils.RetryConfig] = UNSET, server_url: Optional[str] = None, timeout_ms: Optional[int] = None, + http_headers: Optional[Mapping[str, str]] = None, ) -> operations.GenAudioToTextResponse: r"""Audio To Text @@ -1115,6 +1167,7 @@ async def audio_to_text_async( :param retries: Override the default retry configuration for this method :param server_url: Override the default server URL for this method :param timeout_ms: Override the default request timeout configuration for this method in milliseconds + :param http_headers: Additional headers to set or replace on requests. """ base_url = None url_variables = None @@ -1130,7 +1183,7 @@ async def audio_to_text_async( req = self.build_request_async( method="POST", - path="/api/beta/generate/audio-to-text", + path="/api/generate/audio-to-text", base_url=base_url, url_variables=url_variables, request=request, @@ -1139,6 +1192,7 @@ async def audio_to_text_async( request_has_query_params=True, user_agent_header="user-agent", accept_header_value="application/json", + http_headers=http_headers, security=self.sdk_configuration.security, get_serialized_body=lambda: utils.serialize_request_body( request, False, False, "multipart", components.BodyGenAudioToText @@ -1161,7 +1215,7 @@ async def audio_to_text_async( security_source=self.sdk_configuration.security, ), request=req, - error_status_codes=["400", "401", "413", "422", "4XX", "500", "5XX"], + error_status_codes=["400", "401", "413", "415", "422", "4XX", "500", "5XX"], retry_config=retry_config, ) @@ -1191,6 +1245,12 @@ async def audio_to_text_async( ) data.http_meta = components.HTTPMetadata(request=req, response=http_res) raise errors.GenAudioToTextGenerateResponseResponseBody(data=data) + if utils.match_response(http_res, "415", "application/json"): + data = utils.unmarshal_json( + http_res.text, errors.GenAudioToTextGenerateResponse415ResponseBodyUnion + ) + data.http_meta = components.HTTPMetadata(request=req, response=http_res) + raise errors.GenAudioToTextGenerateResponse415ResponseBody(data=data) if utils.match_response(http_res, "422", "application/json"): data = utils.unmarshal_json( http_res.text, errors.GenAudioToTextGenerateResponse422ResponseBodyUnion @@ -1204,8 +1264,9 @@ async def audio_to_text_async( data.http_meta = components.HTTPMetadata(request=req, response=http_res) raise errors.GenAudioToTextGenerateResponse500ResponseBody(data=data) if utils.match_response(http_res, ["4XX", "5XX"], "*"): + http_res_text = await utils.stream_to_text_async(http_res) raise errors.SDKError( - "API error occurred", http_res.status_code, http_res.text, http_res + "API error occurred", http_res.status_code, http_res_text, http_res ) if utils.match_response(http_res, "default", "application/json"): return operations.GenAudioToTextResponse( @@ -1216,10 +1277,11 @@ async def audio_to_text_async( ) content_type = http_res.headers.get("Content-Type") + http_res_text = await utils.stream_to_text_async(http_res) raise errors.SDKError( f"Unexpected response received (code: {http_res.status_code}, type: {content_type})", http_res.status_code, - http_res.text, + http_res_text, http_res, ) @@ -1233,6 +1295,7 @@ def segment_anything2( retries: OptionalNullable[utils.RetryConfig] = UNSET, server_url: Optional[str] = None, timeout_ms: Optional[int] = None, + http_headers: Optional[Mapping[str, str]] = None, ) -> operations.GenSegmentAnything2Response: r"""Segment Anything 2 @@ -1242,6 +1305,7 @@ def segment_anything2( :param retries: Override the default retry configuration for this method :param server_url: Override the default server URL for this method :param timeout_ms: Override the default request timeout configuration for this method in milliseconds + :param http_headers: Additional headers to set or replace on requests. """ base_url = None url_variables = None @@ -1257,7 +1321,7 @@ def segment_anything2( req = self.build_request( method="POST", - path="/api/beta/generate/segment-anything-2", + path="/api/generate/segment-anything-2", base_url=base_url, url_variables=url_variables, request=request, @@ -1266,6 +1330,7 @@ def segment_anything2( request_has_query_params=True, user_agent_header="user-agent", accept_header_value="application/json", + http_headers=http_headers, security=self.sdk_configuration.security, get_serialized_body=lambda: utils.serialize_request_body( request, False, False, "multipart", components.BodyGenSegmentAnything2 @@ -1327,8 +1392,9 @@ def segment_anything2( data.http_meta = components.HTTPMetadata(request=req, response=http_res) raise errors.GenSegmentAnything2GenerateResponse500ResponseBody(data=data) if utils.match_response(http_res, ["4XX", "5XX"], "*"): + http_res_text = utils.stream_to_text(http_res) raise errors.SDKError( - "API error occurred", http_res.status_code, http_res.text, http_res + "API error occurred", http_res.status_code, http_res_text, http_res ) if utils.match_response(http_res, "default", "application/json"): return operations.GenSegmentAnything2Response( @@ -1339,10 +1405,11 @@ def segment_anything2( ) content_type = http_res.headers.get("Content-Type") + http_res_text = utils.stream_to_text(http_res) raise errors.SDKError( f"Unexpected response received (code: {http_res.status_code}, type: {content_type})", http_res.status_code, - http_res.text, + http_res_text, http_res, ) @@ -1356,6 +1423,7 @@ async def segment_anything2_async( retries: OptionalNullable[utils.RetryConfig] = UNSET, server_url: Optional[str] = None, timeout_ms: Optional[int] = None, + http_headers: Optional[Mapping[str, str]] = None, ) -> operations.GenSegmentAnything2Response: r"""Segment Anything 2 @@ -1365,6 +1433,7 @@ async def segment_anything2_async( :param retries: Override the default retry configuration for this method :param server_url: Override the default server URL for this method :param timeout_ms: Override the default request timeout configuration for this method in milliseconds + :param http_headers: Additional headers to set or replace on requests. """ base_url = None url_variables = None @@ -1380,7 +1449,7 @@ async def segment_anything2_async( req = self.build_request_async( method="POST", - path="/api/beta/generate/segment-anything-2", + path="/api/generate/segment-anything-2", base_url=base_url, url_variables=url_variables, request=request, @@ -1389,6 +1458,7 @@ async def segment_anything2_async( request_has_query_params=True, user_agent_header="user-agent", accept_header_value="application/json", + http_headers=http_headers, security=self.sdk_configuration.security, get_serialized_body=lambda: utils.serialize_request_body( request, False, False, "multipart", components.BodyGenSegmentAnything2 @@ -1450,8 +1520,9 @@ async def segment_anything2_async( data.http_meta = components.HTTPMetadata(request=req, response=http_res) raise errors.GenSegmentAnything2GenerateResponse500ResponseBody(data=data) if utils.match_response(http_res, ["4XX", "5XX"], "*"): + http_res_text = await utils.stream_to_text_async(http_res) raise errors.SDKError( - "API error occurred", http_res.status_code, http_res.text, http_res + "API error occurred", http_res.status_code, http_res_text, http_res ) if utils.match_response(http_res, "default", "application/json"): return operations.GenSegmentAnything2Response( @@ -1462,9 +1533,252 @@ async def segment_anything2_async( ) content_type = http_res.headers.get("Content-Type") + http_res_text = await utils.stream_to_text_async(http_res) + raise errors.SDKError( + f"Unexpected response received (code: {http_res.status_code}, type: {content_type})", + http_res.status_code, + http_res_text, + http_res, + ) + + def llm( + self, + *, + request: Union[components.BodyGenLLM, components.BodyGenLLMTypedDict], + retries: OptionalNullable[utils.RetryConfig] = UNSET, + server_url: Optional[str] = None, + timeout_ms: Optional[int] = None, + http_headers: Optional[Mapping[str, str]] = None, + ) -> operations.GenLLMResponse: + r"""LLM + + Generate text using a language model. + + :param request: The request object to send. + :param retries: Override the default retry configuration for this method + :param server_url: Override the default server URL for this method + :param timeout_ms: Override the default request timeout configuration for this method in milliseconds + :param http_headers: Additional headers to set or replace on requests. + """ + base_url = None + url_variables = None + if timeout_ms is None: + timeout_ms = self.sdk_configuration.timeout_ms + + if server_url is not None: + base_url = server_url + + if not isinstance(request, BaseModel): + request = utils.unmarshal(request, components.BodyGenLLM) + request = cast(components.BodyGenLLM, request) + + req = self.build_request( + method="POST", + path="/api/generate/llm", + base_url=base_url, + url_variables=url_variables, + request=request, + request_body_required=True, + request_has_path_params=False, + request_has_query_params=True, + user_agent_header="user-agent", + accept_header_value="application/json", + http_headers=http_headers, + security=self.sdk_configuration.security, + get_serialized_body=lambda: utils.serialize_request_body( + request, False, False, "form", components.BodyGenLLM + ), + timeout_ms=timeout_ms, + ) + + if retries == UNSET: + if self.sdk_configuration.retry_config is not UNSET: + retries = self.sdk_configuration.retry_config + + retry_config = None + if isinstance(retries, utils.RetryConfig): + retry_config = (retries, ["429", "500", "502", "503", "504"]) + + http_res = self.do_request( + hook_ctx=HookContext( + operation_id="genLLM", + oauth2_scopes=[], + security_source=self.sdk_configuration.security, + ), + request=req, + error_status_codes=["400", "401", "422", "4XX", "500", "5XX"], + retry_config=retry_config, + ) + + data: Any = None + if utils.match_response(http_res, "200", "application/json"): + return operations.GenLLMResponse( + llm_response=utils.unmarshal_json( + http_res.text, Optional[components.LLMResponse] + ), + http_meta=components.HTTPMetadata(request=req, response=http_res), + ) + if utils.match_response(http_res, "400", "application/json"): + data = utils.unmarshal_json(http_res.text, errors.GenLLMResponseBodyUnion) + data.http_meta = components.HTTPMetadata(request=req, response=http_res) + raise errors.GenLLMResponseBody(data=data) + if utils.match_response(http_res, "401", "application/json"): + data = utils.unmarshal_json( + http_res.text, errors.GenLLMGenerateResponseBodyUnion + ) + data.http_meta = components.HTTPMetadata(request=req, response=http_res) + raise errors.GenLLMGenerateResponseBody(data=data) + if utils.match_response(http_res, "422", "application/json"): + data = utils.unmarshal_json( + http_res.text, errors.GenLLMGenerateResponseResponseBodyUnion + ) + data.http_meta = components.HTTPMetadata(request=req, response=http_res) + raise errors.GenLLMGenerateResponseResponseBody(data=data) + if utils.match_response(http_res, "500", "application/json"): + data = utils.unmarshal_json( + http_res.text, errors.GenLLMGenerateResponse500ResponseBodyUnion + ) + data.http_meta = components.HTTPMetadata(request=req, response=http_res) + raise errors.GenLLMGenerateResponse500ResponseBody(data=data) + if utils.match_response(http_res, ["4XX", "5XX"], "*"): + http_res_text = utils.stream_to_text(http_res) + raise errors.SDKError( + "API error occurred", http_res.status_code, http_res_text, http_res + ) + if utils.match_response(http_res, "default", "application/json"): + return operations.GenLLMResponse( + studio_api_error=utils.unmarshal_json( + http_res.text, Optional[errors.StudioAPIError] + ), + http_meta=components.HTTPMetadata(request=req, response=http_res), + ) + + content_type = http_res.headers.get("Content-Type") + http_res_text = utils.stream_to_text(http_res) + raise errors.SDKError( + f"Unexpected response received (code: {http_res.status_code}, type: {content_type})", + http_res.status_code, + http_res_text, + http_res, + ) + + async def llm_async( + self, + *, + request: Union[components.BodyGenLLM, components.BodyGenLLMTypedDict], + retries: OptionalNullable[utils.RetryConfig] = UNSET, + server_url: Optional[str] = None, + timeout_ms: Optional[int] = None, + http_headers: Optional[Mapping[str, str]] = None, + ) -> operations.GenLLMResponse: + r"""LLM + + Generate text using a language model. + + :param request: The request object to send. + :param retries: Override the default retry configuration for this method + :param server_url: Override the default server URL for this method + :param timeout_ms: Override the default request timeout configuration for this method in milliseconds + :param http_headers: Additional headers to set or replace on requests. + """ + base_url = None + url_variables = None + if timeout_ms is None: + timeout_ms = self.sdk_configuration.timeout_ms + + if server_url is not None: + base_url = server_url + + if not isinstance(request, BaseModel): + request = utils.unmarshal(request, components.BodyGenLLM) + request = cast(components.BodyGenLLM, request) + + req = self.build_request_async( + method="POST", + path="/api/generate/llm", + base_url=base_url, + url_variables=url_variables, + request=request, + request_body_required=True, + request_has_path_params=False, + request_has_query_params=True, + user_agent_header="user-agent", + accept_header_value="application/json", + http_headers=http_headers, + security=self.sdk_configuration.security, + get_serialized_body=lambda: utils.serialize_request_body( + request, False, False, "form", components.BodyGenLLM + ), + timeout_ms=timeout_ms, + ) + + if retries == UNSET: + if self.sdk_configuration.retry_config is not UNSET: + retries = self.sdk_configuration.retry_config + + retry_config = None + if isinstance(retries, utils.RetryConfig): + retry_config = (retries, ["429", "500", "502", "503", "504"]) + + http_res = await self.do_request_async( + hook_ctx=HookContext( + operation_id="genLLM", + oauth2_scopes=[], + security_source=self.sdk_configuration.security, + ), + request=req, + error_status_codes=["400", "401", "422", "4XX", "500", "5XX"], + retry_config=retry_config, + ) + + data: Any = None + if utils.match_response(http_res, "200", "application/json"): + return operations.GenLLMResponse( + llm_response=utils.unmarshal_json( + http_res.text, Optional[components.LLMResponse] + ), + http_meta=components.HTTPMetadata(request=req, response=http_res), + ) + if utils.match_response(http_res, "400", "application/json"): + data = utils.unmarshal_json(http_res.text, errors.GenLLMResponseBodyUnion) + data.http_meta = components.HTTPMetadata(request=req, response=http_res) + raise errors.GenLLMResponseBody(data=data) + if utils.match_response(http_res, "401", "application/json"): + data = utils.unmarshal_json( + http_res.text, errors.GenLLMGenerateResponseBodyUnion + ) + data.http_meta = components.HTTPMetadata(request=req, response=http_res) + raise errors.GenLLMGenerateResponseBody(data=data) + if utils.match_response(http_res, "422", "application/json"): + data = utils.unmarshal_json( + http_res.text, errors.GenLLMGenerateResponseResponseBodyUnion + ) + data.http_meta = components.HTTPMetadata(request=req, response=http_res) + raise errors.GenLLMGenerateResponseResponseBody(data=data) + if utils.match_response(http_res, "500", "application/json"): + data = utils.unmarshal_json( + http_res.text, errors.GenLLMGenerateResponse500ResponseBodyUnion + ) + data.http_meta = components.HTTPMetadata(request=req, response=http_res) + raise errors.GenLLMGenerateResponse500ResponseBody(data=data) + if utils.match_response(http_res, ["4XX", "5XX"], "*"): + http_res_text = await utils.stream_to_text_async(http_res) + raise errors.SDKError( + "API error occurred", http_res.status_code, http_res_text, http_res + ) + if utils.match_response(http_res, "default", "application/json"): + return operations.GenLLMResponse( + studio_api_error=utils.unmarshal_json( + http_res.text, Optional[errors.StudioAPIError] + ), + http_meta=components.HTTPMetadata(request=req, response=http_res), + ) + + content_type = http_res.headers.get("Content-Type") + http_res_text = await utils.stream_to_text_async(http_res) raise errors.SDKError( f"Unexpected response received (code: {http_res.status_code}, type: {content_type})", http_res.status_code, - http_res.text, + http_res_text, http_res, ) diff --git a/src/livepeer/httpclient.py b/src/livepeer/httpclient.py index 36b642a..167cea4 100644 --- a/src/livepeer/httpclient.py +++ b/src/livepeer/httpclient.py @@ -41,6 +41,9 @@ def build_request( ) -> httpx.Request: pass + def close(self) -> None: + pass + @runtime_checkable class AsyncHttpClient(Protocol): @@ -76,3 +79,6 @@ def build_request( extensions: Optional[httpx._types.RequestExtensions] = None, ) -> httpx.Request: pass + + async def aclose(self) -> None: + pass diff --git a/src/livepeer/metrics.py b/src/livepeer/metrics.py index ec356e9..febcd2a 100644 --- a/src/livepeer/metrics.py +++ b/src/livepeer/metrics.py @@ -5,7 +5,7 @@ from livepeer._hooks import HookContext from livepeer.models import components, errors, operations from livepeer.types import BaseModel, OptionalNullable, UNSET -from typing import List, Optional, Union, cast +from typing import List, Mapping, Optional, Union, cast class Metrics(BaseSDK): @@ -20,6 +20,7 @@ def get_realtime_viewership( retries: OptionalNullable[utils.RetryConfig] = UNSET, server_url: Optional[str] = None, timeout_ms: Optional[int] = None, + http_headers: Optional[Mapping[str, str]] = None, ) -> operations.GetRealtimeViewershipNowResponse: r"""Query realtime viewership @@ -32,6 +33,7 @@ def get_realtime_viewership( :param retries: Override the default retry configuration for this method :param server_url: Override the default server URL for this method :param timeout_ms: Override the default request timeout configuration for this method in milliseconds + :param http_headers: Additional headers to set or replace on requests. """ base_url = None url_variables = None @@ -58,6 +60,7 @@ def get_realtime_viewership( request_has_query_params=True, user_agent_header="user-agent", accept_header_value="application/json", + http_headers=http_headers, security=self.sdk_configuration.security, timeout_ms=timeout_ms, ) @@ -89,20 +92,22 @@ def get_realtime_viewership( http_meta=components.HTTPMetadata(request=req, response=http_res), ) if utils.match_response(http_res, ["4XX", "5XX"], "*"): + http_res_text = utils.stream_to_text(http_res) raise errors.SDKError( - "API error occurred", http_res.status_code, http_res.text, http_res + "API error occurred", http_res.status_code, http_res_text, http_res ) if utils.match_response(http_res, "default", "application/json"): return operations.GetRealtimeViewershipNowResponse( - error=utils.unmarshal_json(http_res.text, Optional[errors.Error]), + error=utils.unmarshal_json(http_res.text, Optional[components.Error]), http_meta=components.HTTPMetadata(request=req, response=http_res), ) content_type = http_res.headers.get("Content-Type") + http_res_text = utils.stream_to_text(http_res) raise errors.SDKError( f"Unexpected response received (code: {http_res.status_code}, type: {content_type})", http_res.status_code, - http_res.text, + http_res_text, http_res, ) @@ -115,6 +120,7 @@ async def get_realtime_viewership_async( retries: OptionalNullable[utils.RetryConfig] = UNSET, server_url: Optional[str] = None, timeout_ms: Optional[int] = None, + http_headers: Optional[Mapping[str, str]] = None, ) -> operations.GetRealtimeViewershipNowResponse: r"""Query realtime viewership @@ -127,6 +133,7 @@ async def get_realtime_viewership_async( :param retries: Override the default retry configuration for this method :param server_url: Override the default server URL for this method :param timeout_ms: Override the default request timeout configuration for this method in milliseconds + :param http_headers: Additional headers to set or replace on requests. """ base_url = None url_variables = None @@ -153,6 +160,7 @@ async def get_realtime_viewership_async( request_has_query_params=True, user_agent_header="user-agent", accept_header_value="application/json", + http_headers=http_headers, security=self.sdk_configuration.security, timeout_ms=timeout_ms, ) @@ -184,20 +192,22 @@ async def get_realtime_viewership_async( http_meta=components.HTTPMetadata(request=req, response=http_res), ) if utils.match_response(http_res, ["4XX", "5XX"], "*"): + http_res_text = await utils.stream_to_text_async(http_res) raise errors.SDKError( - "API error occurred", http_res.status_code, http_res.text, http_res + "API error occurred", http_res.status_code, http_res_text, http_res ) if utils.match_response(http_res, "default", "application/json"): return operations.GetRealtimeViewershipNowResponse( - error=utils.unmarshal_json(http_res.text, Optional[errors.Error]), + error=utils.unmarshal_json(http_res.text, Optional[components.Error]), http_meta=components.HTTPMetadata(request=req, response=http_res), ) content_type = http_res.headers.get("Content-Type") + http_res_text = await utils.stream_to_text_async(http_res) raise errors.SDKError( f"Unexpected response received (code: {http_res.status_code}, type: {content_type})", http_res.status_code, - http_res.text, + http_res_text, http_res, ) @@ -211,6 +221,7 @@ def get_viewership( retries: OptionalNullable[utils.RetryConfig] = UNSET, server_url: Optional[str] = None, timeout_ms: Optional[int] = None, + http_headers: Optional[Mapping[str, str]] = None, ) -> operations.GetViewershipMetricsResponse: r"""Query viewership metrics @@ -221,6 +232,7 @@ def get_viewership( :param retries: Override the default retry configuration for this method :param server_url: Override the default server URL for this method :param timeout_ms: Override the default request timeout configuration for this method in milliseconds + :param http_headers: Additional headers to set or replace on requests. """ base_url = None url_variables = None @@ -245,6 +257,7 @@ def get_viewership( request_has_query_params=True, user_agent_header="user-agent", accept_header_value="application/json", + http_headers=http_headers, security=self.sdk_configuration.security, timeout_ms=timeout_ms, ) @@ -276,20 +289,22 @@ def get_viewership( http_meta=components.HTTPMetadata(request=req, response=http_res), ) if utils.match_response(http_res, ["4XX", "5XX"], "*"): + http_res_text = utils.stream_to_text(http_res) raise errors.SDKError( - "API error occurred", http_res.status_code, http_res.text, http_res + "API error occurred", http_res.status_code, http_res_text, http_res ) if utils.match_response(http_res, "default", "application/json"): return operations.GetViewershipMetricsResponse( - error=utils.unmarshal_json(http_res.text, Optional[errors.Error]), + error=utils.unmarshal_json(http_res.text, Optional[components.Error]), http_meta=components.HTTPMetadata(request=req, response=http_res), ) content_type = http_res.headers.get("Content-Type") + http_res_text = utils.stream_to_text(http_res) raise errors.SDKError( f"Unexpected response received (code: {http_res.status_code}, type: {content_type})", http_res.status_code, - http_res.text, + http_res_text, http_res, ) @@ -303,6 +318,7 @@ async def get_viewership_async( retries: OptionalNullable[utils.RetryConfig] = UNSET, server_url: Optional[str] = None, timeout_ms: Optional[int] = None, + http_headers: Optional[Mapping[str, str]] = None, ) -> operations.GetViewershipMetricsResponse: r"""Query viewership metrics @@ -313,6 +329,7 @@ async def get_viewership_async( :param retries: Override the default retry configuration for this method :param server_url: Override the default server URL for this method :param timeout_ms: Override the default request timeout configuration for this method in milliseconds + :param http_headers: Additional headers to set or replace on requests. """ base_url = None url_variables = None @@ -337,6 +354,7 @@ async def get_viewership_async( request_has_query_params=True, user_agent_header="user-agent", accept_header_value="application/json", + http_headers=http_headers, security=self.sdk_configuration.security, timeout_ms=timeout_ms, ) @@ -368,20 +386,22 @@ async def get_viewership_async( http_meta=components.HTTPMetadata(request=req, response=http_res), ) if utils.match_response(http_res, ["4XX", "5XX"], "*"): + http_res_text = await utils.stream_to_text_async(http_res) raise errors.SDKError( - "API error occurred", http_res.status_code, http_res.text, http_res + "API error occurred", http_res.status_code, http_res_text, http_res ) if utils.match_response(http_res, "default", "application/json"): return operations.GetViewershipMetricsResponse( - error=utils.unmarshal_json(http_res.text, Optional[errors.Error]), + error=utils.unmarshal_json(http_res.text, Optional[components.Error]), http_meta=components.HTTPMetadata(request=req, response=http_res), ) content_type = http_res.headers.get("Content-Type") + http_res_text = await utils.stream_to_text_async(http_res) raise errors.SDKError( f"Unexpected response received (code: {http_res.status_code}, type: {content_type})", http_res.status_code, - http_res.text, + http_res_text, http_res, ) @@ -395,6 +415,7 @@ def get_creator_viewership( retries: OptionalNullable[utils.RetryConfig] = UNSET, server_url: Optional[str] = None, timeout_ms: Optional[int] = None, + http_headers: Optional[Mapping[str, str]] = None, ) -> operations.GetCreatorViewershipMetricsResponse: r"""Query creator viewership metrics @@ -405,6 +426,7 @@ def get_creator_viewership( :param retries: Override the default retry configuration for this method :param server_url: Override the default server URL for this method :param timeout_ms: Override the default request timeout configuration for this method in milliseconds + :param http_headers: Additional headers to set or replace on requests. """ base_url = None url_variables = None @@ -431,6 +453,7 @@ def get_creator_viewership( request_has_query_params=True, user_agent_header="user-agent", accept_header_value="application/json", + http_headers=http_headers, security=self.sdk_configuration.security, timeout_ms=timeout_ms, ) @@ -462,20 +485,22 @@ def get_creator_viewership( http_meta=components.HTTPMetadata(request=req, response=http_res), ) if utils.match_response(http_res, ["4XX", "5XX"], "*"): + http_res_text = utils.stream_to_text(http_res) raise errors.SDKError( - "API error occurred", http_res.status_code, http_res.text, http_res + "API error occurred", http_res.status_code, http_res_text, http_res ) if utils.match_response(http_res, "default", "application/json"): return operations.GetCreatorViewershipMetricsResponse( - error=utils.unmarshal_json(http_res.text, Optional[errors.Error]), + error=utils.unmarshal_json(http_res.text, Optional[components.Error]), http_meta=components.HTTPMetadata(request=req, response=http_res), ) content_type = http_res.headers.get("Content-Type") + http_res_text = utils.stream_to_text(http_res) raise errors.SDKError( f"Unexpected response received (code: {http_res.status_code}, type: {content_type})", http_res.status_code, - http_res.text, + http_res_text, http_res, ) @@ -489,6 +514,7 @@ async def get_creator_viewership_async( retries: OptionalNullable[utils.RetryConfig] = UNSET, server_url: Optional[str] = None, timeout_ms: Optional[int] = None, + http_headers: Optional[Mapping[str, str]] = None, ) -> operations.GetCreatorViewershipMetricsResponse: r"""Query creator viewership metrics @@ -499,6 +525,7 @@ async def get_creator_viewership_async( :param retries: Override the default retry configuration for this method :param server_url: Override the default server URL for this method :param timeout_ms: Override the default request timeout configuration for this method in milliseconds + :param http_headers: Additional headers to set or replace on requests. """ base_url = None url_variables = None @@ -525,6 +552,7 @@ async def get_creator_viewership_async( request_has_query_params=True, user_agent_header="user-agent", accept_header_value="application/json", + http_headers=http_headers, security=self.sdk_configuration.security, timeout_ms=timeout_ms, ) @@ -556,20 +584,22 @@ async def get_creator_viewership_async( http_meta=components.HTTPMetadata(request=req, response=http_res), ) if utils.match_response(http_res, ["4XX", "5XX"], "*"): + http_res_text = await utils.stream_to_text_async(http_res) raise errors.SDKError( - "API error occurred", http_res.status_code, http_res.text, http_res + "API error occurred", http_res.status_code, http_res_text, http_res ) if utils.match_response(http_res, "default", "application/json"): return operations.GetCreatorViewershipMetricsResponse( - error=utils.unmarshal_json(http_res.text, Optional[errors.Error]), + error=utils.unmarshal_json(http_res.text, Optional[components.Error]), http_meta=components.HTTPMetadata(request=req, response=http_res), ) content_type = http_res.headers.get("Content-Type") + http_res_text = await utils.stream_to_text_async(http_res) raise errors.SDKError( f"Unexpected response received (code: {http_res.status_code}, type: {content_type})", http_res.status_code, - http_res.text, + http_res_text, http_res, ) @@ -580,6 +610,7 @@ def get_public_viewership( retries: OptionalNullable[utils.RetryConfig] = UNSET, server_url: Optional[str] = None, timeout_ms: Optional[int] = None, + http_headers: Optional[Mapping[str, str]] = None, ) -> operations.GetPublicViewershipMetricsResponse: r"""Query public total views metrics @@ -592,6 +623,7 @@ def get_public_viewership( :param retries: Override the default retry configuration for this method :param server_url: Override the default server URL for this method :param timeout_ms: Override the default request timeout configuration for this method in milliseconds + :param http_headers: Additional headers to set or replace on requests. """ base_url = None url_variables = None @@ -616,6 +648,7 @@ def get_public_viewership( request_has_query_params=True, user_agent_header="user-agent", accept_header_value="application/json", + http_headers=http_headers, security=self.sdk_configuration.security, timeout_ms=timeout_ms, ) @@ -647,20 +680,22 @@ def get_public_viewership( http_meta=components.HTTPMetadata(request=req, response=http_res), ) if utils.match_response(http_res, ["4XX", "5XX"], "*"): + http_res_text = utils.stream_to_text(http_res) raise errors.SDKError( - "API error occurred", http_res.status_code, http_res.text, http_res + "API error occurred", http_res.status_code, http_res_text, http_res ) if utils.match_response(http_res, "default", "application/json"): return operations.GetPublicViewershipMetricsResponse( - error=utils.unmarshal_json(http_res.text, Optional[errors.Error]), + error=utils.unmarshal_json(http_res.text, Optional[components.Error]), http_meta=components.HTTPMetadata(request=req, response=http_res), ) content_type = http_res.headers.get("Content-Type") + http_res_text = utils.stream_to_text(http_res) raise errors.SDKError( f"Unexpected response received (code: {http_res.status_code}, type: {content_type})", http_res.status_code, - http_res.text, + http_res_text, http_res, ) @@ -671,6 +706,7 @@ async def get_public_viewership_async( retries: OptionalNullable[utils.RetryConfig] = UNSET, server_url: Optional[str] = None, timeout_ms: Optional[int] = None, + http_headers: Optional[Mapping[str, str]] = None, ) -> operations.GetPublicViewershipMetricsResponse: r"""Query public total views metrics @@ -683,6 +719,7 @@ async def get_public_viewership_async( :param retries: Override the default retry configuration for this method :param server_url: Override the default server URL for this method :param timeout_ms: Override the default request timeout configuration for this method in milliseconds + :param http_headers: Additional headers to set or replace on requests. """ base_url = None url_variables = None @@ -707,6 +744,7 @@ async def get_public_viewership_async( request_has_query_params=True, user_agent_header="user-agent", accept_header_value="application/json", + http_headers=http_headers, security=self.sdk_configuration.security, timeout_ms=timeout_ms, ) @@ -738,20 +776,22 @@ async def get_public_viewership_async( http_meta=components.HTTPMetadata(request=req, response=http_res), ) if utils.match_response(http_res, ["4XX", "5XX"], "*"): + http_res_text = await utils.stream_to_text_async(http_res) raise errors.SDKError( - "API error occurred", http_res.status_code, http_res.text, http_res + "API error occurred", http_res.status_code, http_res_text, http_res ) if utils.match_response(http_res, "default", "application/json"): return operations.GetPublicViewershipMetricsResponse( - error=utils.unmarshal_json(http_res.text, Optional[errors.Error]), + error=utils.unmarshal_json(http_res.text, Optional[components.Error]), http_meta=components.HTTPMetadata(request=req, response=http_res), ) content_type = http_res.headers.get("Content-Type") + http_res_text = await utils.stream_to_text_async(http_res) raise errors.SDKError( f"Unexpected response received (code: {http_res.status_code}, type: {content_type})", http_res.status_code, - http_res.text, + http_res_text, http_res, ) @@ -765,6 +805,7 @@ def get_usage( retries: OptionalNullable[utils.RetryConfig] = UNSET, server_url: Optional[str] = None, timeout_ms: Optional[int] = None, + http_headers: Optional[Mapping[str, str]] = None, ) -> operations.GetUsageMetricsResponse: r"""Query usage metrics @@ -772,6 +813,7 @@ def get_usage( :param retries: Override the default retry configuration for this method :param server_url: Override the default server URL for this method :param timeout_ms: Override the default request timeout configuration for this method in milliseconds + :param http_headers: Additional headers to set or replace on requests. """ base_url = None url_variables = None @@ -796,6 +838,7 @@ def get_usage( request_has_query_params=True, user_agent_header="user-agent", accept_header_value="application/json", + http_headers=http_headers, security=self.sdk_configuration.security, timeout_ms=timeout_ms, ) @@ -827,20 +870,22 @@ def get_usage( http_meta=components.HTTPMetadata(request=req, response=http_res), ) if utils.match_response(http_res, ["4XX", "5XX"], "*"): + http_res_text = utils.stream_to_text(http_res) raise errors.SDKError( - "API error occurred", http_res.status_code, http_res.text, http_res + "API error occurred", http_res.status_code, http_res_text, http_res ) if utils.match_response(http_res, "default", "application/json"): return operations.GetUsageMetricsResponse( - error=utils.unmarshal_json(http_res.text, Optional[errors.Error]), + error=utils.unmarshal_json(http_res.text, Optional[components.Error]), http_meta=components.HTTPMetadata(request=req, response=http_res), ) content_type = http_res.headers.get("Content-Type") + http_res_text = utils.stream_to_text(http_res) raise errors.SDKError( f"Unexpected response received (code: {http_res.status_code}, type: {content_type})", http_res.status_code, - http_res.text, + http_res_text, http_res, ) @@ -854,6 +899,7 @@ async def get_usage_async( retries: OptionalNullable[utils.RetryConfig] = UNSET, server_url: Optional[str] = None, timeout_ms: Optional[int] = None, + http_headers: Optional[Mapping[str, str]] = None, ) -> operations.GetUsageMetricsResponse: r"""Query usage metrics @@ -861,6 +907,7 @@ async def get_usage_async( :param retries: Override the default retry configuration for this method :param server_url: Override the default server URL for this method :param timeout_ms: Override the default request timeout configuration for this method in milliseconds + :param http_headers: Additional headers to set or replace on requests. """ base_url = None url_variables = None @@ -885,6 +932,7 @@ async def get_usage_async( request_has_query_params=True, user_agent_header="user-agent", accept_header_value="application/json", + http_headers=http_headers, security=self.sdk_configuration.security, timeout_ms=timeout_ms, ) @@ -916,19 +964,21 @@ async def get_usage_async( http_meta=components.HTTPMetadata(request=req, response=http_res), ) if utils.match_response(http_res, ["4XX", "5XX"], "*"): + http_res_text = await utils.stream_to_text_async(http_res) raise errors.SDKError( - "API error occurred", http_res.status_code, http_res.text, http_res + "API error occurred", http_res.status_code, http_res_text, http_res ) if utils.match_response(http_res, "default", "application/json"): return operations.GetUsageMetricsResponse( - error=utils.unmarshal_json(http_res.text, Optional[errors.Error]), + error=utils.unmarshal_json(http_res.text, Optional[components.Error]), http_meta=components.HTTPMetadata(request=req, response=http_res), ) content_type = http_res.headers.get("Content-Type") + http_res_text = await utils.stream_to_text_async(http_res) raise errors.SDKError( f"Unexpected response received (code: {http_res.status_code}, type: {content_type})", http_res.status_code, - http_res.text, + http_res_text, http_res, ) diff --git a/src/livepeer/models/components/__init__.py b/src/livepeer/models/components/__init__.py index dac556e..3961982 100644 --- a/src/livepeer/models/components/__init__.py +++ b/src/livepeer/models/components/__init__.py @@ -73,6 +73,7 @@ BodyGenImageToVideoImageTypedDict, BodyGenImageToVideoTypedDict, ) +from .body_genllm import BodyGenLLM, BodyGenLLMTypedDict from .body_gensegmentanything2 import ( BodyGenSegmentAnything2, BodyGenSegmentAnything2Image, @@ -97,6 +98,7 @@ ) from .encryption import Encryption, EncryptionTypedDict from .encryption_output import EncryptionOutput, EncryptionOutputTypedDict +from .error import Error, ErrorTypedDict from .export_task_params import ( Custom, CustomTypedDict, @@ -129,6 +131,7 @@ PinataTypedDict, ) from .ipfs_file_info import IpfsFileInfo, IpfsFileInfoTypedDict +from .llmresponse import LLMResponse, LLMResponseTypedDict from .masksresponse import MasksResponse, MasksResponseTypedDict from .media import Media, MediaTypedDict from .multistream import Multistream, MultistreamTypedDict @@ -249,6 +252,7 @@ ThreeTypedDict, ) from .stream_patch_payload import StreamPatchPayload, StreamPatchPayloadTypedDict +from .studio_api_error import StudioAPIError, StudioAPIErrorTypedDict from .target import Target, TargetSpec, TargetSpecTypedDict, TargetTypedDict from .target_add_payload import ( TargetAddPayload, @@ -414,6 +418,8 @@ "BodyGenImageToVideoImage", "BodyGenImageToVideoImageTypedDict", "BodyGenImageToVideoTypedDict", + "BodyGenLLM", + "BodyGenLLMTypedDict", "BodyGenSegmentAnything2", "BodyGenSegmentAnything2Image", "BodyGenSegmentAnything2ImageTypedDict", @@ -453,6 +459,8 @@ "EncryptionOutput", "EncryptionOutputTypedDict", "EncryptionTypedDict", + "Error", + "ErrorTypedDict", "Events", "Export", "ExportData", @@ -504,6 +512,8 @@ "IsMobile", "IsMobile1", "IsMobileTypedDict", + "LLMResponse", + "LLMResponseTypedDict", "LastFailure", "LastFailureTypedDict", "Live", @@ -645,6 +655,8 @@ "StreamTypedDict", "StreamUserTags", "StreamUserTagsTypedDict", + "StudioAPIError", + "StudioAPIErrorTypedDict", "Target", "TargetAddPayload", "TargetAddPayloadSpec", diff --git a/src/livepeer/models/components/apierror.py b/src/livepeer/models/components/apierror.py index dbf12f7..309edce 100644 --- a/src/livepeer/models/components/apierror.py +++ b/src/livepeer/models/components/apierror.py @@ -2,7 +2,7 @@ from __future__ import annotations from livepeer.types import BaseModel -from typing import TypedDict +from typing_extensions import TypedDict class APIErrorTypedDict(TypedDict): diff --git a/src/livepeer/models/components/asset.py b/src/livepeer/models/components/asset.py index 02ab84d..0c6a078 100644 --- a/src/livepeer/models/components/asset.py +++ b/src/livepeer/models/components/asset.py @@ -11,8 +11,8 @@ from livepeer.types import BaseModel, Nullable, OptionalNullable, UNSET, UNSET_SENTINEL import pydantic from pydantic import model_serializer -from typing import Any, List, Optional, TypedDict, Union -from typing_extensions import Annotated, NotRequired +from typing import Any, List, Optional, Union +from typing_extensions import Annotated, NotRequired, TypeAliasType, TypedDict class AssetType(str, Enum): @@ -105,10 +105,12 @@ class Source1(BaseModel): encryption: Optional[EncryptionOutput] = None -SourceTypedDict = Union[TwoTypedDict, Source1TypedDict, Source3TypedDict] +SourceTypedDict = TypeAliasType( + "SourceTypedDict", Union[TwoTypedDict, Source1TypedDict, Source3TypedDict] +) -Source = Union[Two, Source1, Source3] +Source = TypeAliasType("Source", Union[Two, Source1, Source3]) class AssetNftMetadataTemplate(str, Enum): @@ -348,7 +350,7 @@ class Tracks(BaseModel): class VideoSpecTypedDict(TypedDict): r"""Video metadata""" - format: NotRequired[str] + format_: NotRequired[str] r"""Format of the asset""" duration: NotRequired[float] r"""Duration of the asset in seconds (float)""" @@ -364,7 +366,7 @@ class VideoSpecTypedDict(TypedDict): class VideoSpec(BaseModel): r"""Video metadata""" - format: Optional[str] = None + format_: Annotated[Optional[str], pydantic.Field(alias="format")] = None r"""Format of the asset""" duration: Optional[float] = None diff --git a/src/livepeer/models/components/asset_patch_payload.py b/src/livepeer/models/components/asset_patch_payload.py index 775db0d..eb7b319 100644 --- a/src/livepeer/models/components/asset_patch_payload.py +++ b/src/livepeer/models/components/asset_patch_payload.py @@ -7,8 +7,8 @@ from livepeer.types import BaseModel, Nullable, OptionalNullable, UNSET, UNSET_SENTINEL import pydantic from pydantic import model_serializer -from typing import Optional, TypedDict -from typing_extensions import Annotated, NotRequired +from typing import Optional +from typing_extensions import Annotated, NotRequired, TypedDict class AssetPatchPayloadTypedDict(TypedDict): diff --git a/src/livepeer/models/components/attestation.py b/src/livepeer/models/components/attestation.py index bdae319..7d30c40 100644 --- a/src/livepeer/models/components/attestation.py +++ b/src/livepeer/models/components/attestation.py @@ -5,8 +5,8 @@ from enum import Enum from livepeer.types import BaseModel import pydantic -from typing import Any, List, Optional, TypedDict -from typing_extensions import Annotated, NotRequired +from typing import Any, List, Optional +from typing_extensions import Annotated, NotRequired, TypedDict class PrimaryType(str, Enum): diff --git a/src/livepeer/models/components/body_genaudiototext.py b/src/livepeer/models/components/body_genaudiototext.py index 3859ca4..3fc4bd2 100644 --- a/src/livepeer/models/components/body_genaudiototext.py +++ b/src/livepeer/models/components/body_genaudiototext.py @@ -5,8 +5,8 @@ from livepeer.types import BaseModel from livepeer.utils import FieldMetadata, MultipartFormMetadata import pydantic -from typing import IO, Optional, TypedDict, Union -from typing_extensions import Annotated, NotRequired +from typing import IO, Optional, Union +from typing_extensions import Annotated, NotRequired, TypedDict class AudioTypedDict(TypedDict): @@ -38,6 +38,8 @@ class BodyGenAudioToTextTypedDict(TypedDict): r"""Uploaded audio file to be transcribed.""" model_id: NotRequired[str] r"""Hugging Face model ID used for transcription.""" + return_timestamps: NotRequired[str] + r"""Return timestamps for the transcribed text. Supported values: 'sentence', 'word', or a string boolean ('true' or 'false'). Default is 'true' ('sentence'). 'false' means no timestamps. 'word' means word-based timestamps.""" class BodyGenAudioToText(BaseModel): @@ -52,3 +54,6 @@ class BodyGenAudioToText(BaseModel): "openai/whisper-large-v3" ) r"""Hugging Face model ID used for transcription.""" + + return_timestamps: Annotated[Optional[str], FieldMetadata(multipart=True)] = "true" + r"""Return timestamps for the transcribed text. Supported values: 'sentence', 'word', or a string boolean ('true' or 'false'). Default is 'true' ('sentence'). 'false' means no timestamps. 'word' means word-based timestamps.""" diff --git a/src/livepeer/models/components/body_genimagetoimage.py b/src/livepeer/models/components/body_genimagetoimage.py index 425f2bf..a93de89 100644 --- a/src/livepeer/models/components/body_genimagetoimage.py +++ b/src/livepeer/models/components/body_genimagetoimage.py @@ -5,8 +5,8 @@ from livepeer.types import BaseModel from livepeer.utils import FieldMetadata, MultipartFormMetadata import pydantic -from typing import IO, Optional, TypedDict, Union -from typing_extensions import Annotated, NotRequired +from typing import IO, Optional, Union +from typing_extensions import Annotated, NotRequired, TypedDict class ImageTypedDict(TypedDict): @@ -40,6 +40,8 @@ class BodyGenImageToImageTypedDict(TypedDict): r"""Uploaded image to modify with the pipeline.""" model_id: NotRequired[str] r"""Hugging Face model ID used for image generation.""" + loras: NotRequired[str] + r"""A LoRA (Low-Rank Adaptation) model and its corresponding weight for image generation. Example: { \"latent-consistency/lcm-lora-sdxl\": 1.0, \"nerijs/pixel-art-xl\": 1.2}.""" strength: NotRequired[float] r"""Degree of transformation applied to the reference image (0 to 1).""" guidance_scale: NotRequired[float] @@ -74,6 +76,9 @@ class BodyGenImageToImage(BaseModel): ) r"""Hugging Face model ID used for image generation.""" + loras: Annotated[Optional[str], FieldMetadata(multipart=True)] = "" + r"""A LoRA (Low-Rank Adaptation) model and its corresponding weight for image generation. Example: { \"latent-consistency/lcm-lora-sdxl\": 1.0, \"nerijs/pixel-art-xl\": 1.2}.""" + strength: Annotated[Optional[float], FieldMetadata(multipart=True)] = 0.8 r"""Degree of transformation applied to the reference image (0 to 1).""" diff --git a/src/livepeer/models/components/body_genimagetovideo.py b/src/livepeer/models/components/body_genimagetovideo.py index 73a0a47..9f4980a 100644 --- a/src/livepeer/models/components/body_genimagetovideo.py +++ b/src/livepeer/models/components/body_genimagetovideo.py @@ -5,8 +5,8 @@ from livepeer.types import BaseModel from livepeer.utils import FieldMetadata, MultipartFormMetadata import pydantic -from typing import IO, Optional, TypedDict, Union -from typing_extensions import Annotated, NotRequired +from typing import IO, Optional, Union +from typing_extensions import Annotated, NotRequired, TypedDict class BodyGenImageToVideoImageTypedDict(TypedDict): diff --git a/src/livepeer/models/components/body_genllm.py b/src/livepeer/models/components/body_genllm.py new file mode 100644 index 0000000..f740e0d --- /dev/null +++ b/src/livepeer/models/components/body_genllm.py @@ -0,0 +1,35 @@ +"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.""" + +from __future__ import annotations +from livepeer.types import BaseModel +from livepeer.utils import FieldMetadata +from typing import Optional +from typing_extensions import Annotated, NotRequired, TypedDict + + +class BodyGenLLMTypedDict(TypedDict): + prompt: str + model_id: NotRequired[str] + system_msg: NotRequired[str] + temperature: NotRequired[float] + max_tokens: NotRequired[int] + history: NotRequired[str] + stream: NotRequired[bool] + + +class BodyGenLLM(BaseModel): + prompt: Annotated[str, FieldMetadata(form=True)] + + model_id: Annotated[Optional[str], FieldMetadata(form=True)] = ( + "meta-llama/Meta-Llama-3.1-8B-Instruct" + ) + + system_msg: Annotated[Optional[str], FieldMetadata(form=True)] = "" + + temperature: Annotated[Optional[float], FieldMetadata(form=True)] = 0.7 + + max_tokens: Annotated[Optional[int], FieldMetadata(form=True)] = 256 + + history: Annotated[Optional[str], FieldMetadata(form=True)] = "[]" + + stream: Annotated[Optional[bool], FieldMetadata(form=True)] = False diff --git a/src/livepeer/models/components/body_gensegmentanything2.py b/src/livepeer/models/components/body_gensegmentanything2.py index 077d36f..32860ac 100644 --- a/src/livepeer/models/components/body_gensegmentanything2.py +++ b/src/livepeer/models/components/body_gensegmentanything2.py @@ -5,8 +5,8 @@ from livepeer.types import BaseModel from livepeer.utils import FieldMetadata, MultipartFormMetadata import pydantic -from typing import IO, Optional, TypedDict, Union -from typing_extensions import Annotated, NotRequired +from typing import IO, Optional, Union +from typing_extensions import Annotated, NotRequired, TypedDict class BodyGenSegmentAnything2ImageTypedDict(TypedDict): @@ -63,7 +63,7 @@ class BodyGenSegmentAnything2(BaseModel): r"""Image to segment.""" model_id: Annotated[Optional[str], FieldMetadata(multipart=True)] = ( - "facebook/sam2-hiera-large:" + "facebook/sam2-hiera-large" ) r"""Hugging Face model ID used for image generation.""" diff --git a/src/livepeer/models/components/body_genupscale.py b/src/livepeer/models/components/body_genupscale.py index cded583..d71436d 100644 --- a/src/livepeer/models/components/body_genupscale.py +++ b/src/livepeer/models/components/body_genupscale.py @@ -5,8 +5,8 @@ from livepeer.types import BaseModel from livepeer.utils import FieldMetadata, MultipartFormMetadata import pydantic -from typing import IO, Optional, TypedDict, Union -from typing_extensions import Annotated, NotRequired +from typing import IO, Optional, Union +from typing_extensions import Annotated, NotRequired, TypedDict class BodyGenUpscaleImageTypedDict(TypedDict): diff --git a/src/livepeer/models/components/chunk.py b/src/livepeer/models/components/chunk.py index a450067..6d3a0bd 100644 --- a/src/livepeer/models/components/chunk.py +++ b/src/livepeer/models/components/chunk.py @@ -2,7 +2,8 @@ from __future__ import annotations from livepeer.types import BaseModel -from typing import Any, List, TypedDict +from typing import Any, List +from typing_extensions import TypedDict class ChunkTypedDict(TypedDict): diff --git a/src/livepeer/models/components/clip_payload.py b/src/livepeer/models/components/clip_payload.py index 43aa718..f27ed40 100644 --- a/src/livepeer/models/components/clip_payload.py +++ b/src/livepeer/models/components/clip_payload.py @@ -3,8 +3,8 @@ from __future__ import annotations from livepeer.types import BaseModel import pydantic -from typing import Optional, TypedDict -from typing_extensions import Annotated, NotRequired +from typing import Optional +from typing_extensions import Annotated, NotRequired, TypedDict class ClipPayloadTypedDict(TypedDict): diff --git a/src/livepeer/models/components/create_room_response.py b/src/livepeer/models/components/create_room_response.py index daec7f1..20f8b48 100644 --- a/src/livepeer/models/components/create_room_response.py +++ b/src/livepeer/models/components/create_room_response.py @@ -2,8 +2,8 @@ from __future__ import annotations from livepeer.types import BaseModel -from typing import Optional, TypedDict -from typing_extensions import NotRequired +from typing import Optional +from typing_extensions import NotRequired, TypedDict class CreateRoomResponseTypedDict(TypedDict): diff --git a/src/livepeer/models/components/creator_id.py b/src/livepeer/models/components/creator_id.py index 960ea49..2660125 100644 --- a/src/livepeer/models/components/creator_id.py +++ b/src/livepeer/models/components/creator_id.py @@ -3,7 +3,7 @@ from __future__ import annotations from enum import Enum from livepeer.types import BaseModel -from typing import TypedDict +from typing_extensions import TypedDict class CreatorIDType(str, Enum): diff --git a/src/livepeer/models/components/encryption.py b/src/livepeer/models/components/encryption.py index 002b979..a518c48 100644 --- a/src/livepeer/models/components/encryption.py +++ b/src/livepeer/models/components/encryption.py @@ -3,8 +3,7 @@ from __future__ import annotations from livepeer.types import BaseModel import pydantic -from typing import TypedDict -from typing_extensions import Annotated +from typing_extensions import Annotated, TypedDict class EncryptionTypedDict(TypedDict): diff --git a/src/livepeer/models/components/encryption_output.py b/src/livepeer/models/components/encryption_output.py index c73b2ea..90a2648 100644 --- a/src/livepeer/models/components/encryption_output.py +++ b/src/livepeer/models/components/encryption_output.py @@ -2,7 +2,7 @@ from __future__ import annotations from livepeer.types import BaseModel -from typing import TypedDict +from typing_extensions import TypedDict class EncryptionOutputTypedDict(TypedDict): diff --git a/src/livepeer/models/components/error.py b/src/livepeer/models/components/error.py new file mode 100644 index 0000000..e18b793 --- /dev/null +++ b/src/livepeer/models/components/error.py @@ -0,0 +1,14 @@ +"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.""" + +from __future__ import annotations +from livepeer.types import BaseModel +from typing import List, Optional +from typing_extensions import NotRequired, TypedDict + + +class ErrorTypedDict(TypedDict): + errors: NotRequired[List[str]] + + +class Error(BaseModel): + errors: Optional[List[str]] = None diff --git a/src/livepeer/models/components/export_task_params.py b/src/livepeer/models/components/export_task_params.py index aacfb40..86265d2 100644 --- a/src/livepeer/models/components/export_task_params.py +++ b/src/livepeer/models/components/export_task_params.py @@ -3,8 +3,8 @@ from __future__ import annotations from .ipfs_export_params import IpfsExportParams, IpfsExportParamsTypedDict from livepeer.types import BaseModel -from typing import Dict, Optional, TypedDict, Union -from typing_extensions import NotRequired +from typing import Dict, Optional, Union +from typing_extensions import NotRequired, TypeAliasType, TypedDict class ExportTaskParams2TypedDict(TypedDict): @@ -49,11 +49,14 @@ class ExportTaskParams1(BaseModel): r"""custom URL parameters for the export task""" -ExportTaskParamsTypedDict = Union[ - ExportTaskParams1TypedDict, ExportTaskParams2TypedDict -] +ExportTaskParamsTypedDict = TypeAliasType( + "ExportTaskParamsTypedDict", + Union[ExportTaskParams1TypedDict, ExportTaskParams2TypedDict], +) r"""Parameters for the export task""" -ExportTaskParams = Union[ExportTaskParams1, ExportTaskParams2] +ExportTaskParams = TypeAliasType( + "ExportTaskParams", Union[ExportTaskParams1, ExportTaskParams2] +) r"""Parameters for the export task""" diff --git a/src/livepeer/models/components/ffmpeg_profile.py b/src/livepeer/models/components/ffmpeg_profile.py index 68abd4d..18b1385 100644 --- a/src/livepeer/models/components/ffmpeg_profile.py +++ b/src/livepeer/models/components/ffmpeg_profile.py @@ -4,8 +4,8 @@ from enum import Enum from livepeer.types import BaseModel import pydantic -from typing import Optional, TypedDict -from typing_extensions import Annotated, NotRequired +from typing import Optional +from typing_extensions import Annotated, NotRequired, TypedDict class Profile(str, Enum): diff --git a/src/livepeer/models/components/get_room_user_response.py b/src/livepeer/models/components/get_room_user_response.py index bb8f1a0..08f3c24 100644 --- a/src/livepeer/models/components/get_room_user_response.py +++ b/src/livepeer/models/components/get_room_user_response.py @@ -3,8 +3,8 @@ from __future__ import annotations from livepeer.types import BaseModel import pydantic -from typing import Optional, TypedDict -from typing_extensions import Annotated, NotRequired +from typing import Optional +from typing_extensions import Annotated, NotRequired, TypedDict class GetRoomUserResponseTypedDict(TypedDict): diff --git a/src/livepeer/models/components/httpmetadata.py b/src/livepeer/models/components/httpmetadata.py index 35a6a40..4b5d154 100644 --- a/src/livepeer/models/components/httpmetadata.py +++ b/src/livepeer/models/components/httpmetadata.py @@ -4,8 +4,8 @@ import httpx from livepeer.types import BaseModel import pydantic -from typing import Optional, TypedDict -from typing_extensions import Annotated +from typing import Optional +from typing_extensions import Annotated, TypedDict class HTTPMetadataTypedDict(TypedDict): diff --git a/src/livepeer/models/components/imageresponse.py b/src/livepeer/models/components/imageresponse.py index 1e32456..256c65e 100644 --- a/src/livepeer/models/components/imageresponse.py +++ b/src/livepeer/models/components/imageresponse.py @@ -3,7 +3,8 @@ from __future__ import annotations from .media import Media, MediaTypedDict from livepeer.types import BaseModel -from typing import List, TypedDict +from typing import List +from typing_extensions import TypedDict class ImageResponseTypedDict(TypedDict): diff --git a/src/livepeer/models/components/input_creator_id.py b/src/livepeer/models/components/input_creator_id.py index 6f3e7bc..1d63efc 100644 --- a/src/livepeer/models/components/input_creator_id.py +++ b/src/livepeer/models/components/input_creator_id.py @@ -3,7 +3,8 @@ from __future__ import annotations from enum import Enum from livepeer.types import BaseModel -from typing import TypedDict, Union +from typing import Union +from typing_extensions import TypeAliasType, TypedDict class InputCreatorIDType(str, Enum): @@ -21,7 +22,9 @@ class InputCreatorID1(BaseModel): value: str -InputCreatorIDTypedDict = Union[InputCreatorID1TypedDict, str] +InputCreatorIDTypedDict = TypeAliasType( + "InputCreatorIDTypedDict", Union[InputCreatorID1TypedDict, str] +) -InputCreatorID = Union[InputCreatorID1, str] +InputCreatorID = TypeAliasType("InputCreatorID", Union[InputCreatorID1, str]) diff --git a/src/livepeer/models/components/ipfs_export_params.py b/src/livepeer/models/components/ipfs_export_params.py index e041a5f..a7a1625 100644 --- a/src/livepeer/models/components/ipfs_export_params.py +++ b/src/livepeer/models/components/ipfs_export_params.py @@ -3,8 +3,8 @@ from __future__ import annotations from livepeer.types import BaseModel import pydantic -from typing import Any, Optional, TypedDict, Union -from typing_extensions import Annotated, NotRequired +from typing import Any, Optional, Union +from typing_extensions import Annotated, NotRequired, TypeAliasType, TypedDict class Pinata2TypedDict(TypedDict): @@ -25,14 +25,16 @@ class Pinata1(BaseModel): pass -PinataTypedDict = Union[Pinata1TypedDict, Pinata2TypedDict] +PinataTypedDict = TypeAliasType( + "PinataTypedDict", Union[Pinata1TypedDict, Pinata2TypedDict] +) r"""Custom credentials for the Piñata service. Must have either a JWT or an API key and an API secret. """ -Pinata = Union[Pinata1, Pinata2] +Pinata = TypeAliasType("Pinata", Union[Pinata1, Pinata2]) r"""Custom credentials for the Piñata service. Must have either a JWT or an API key and an API secret. diff --git a/src/livepeer/models/components/ipfs_file_info.py b/src/livepeer/models/components/ipfs_file_info.py index a2b9363..6006713 100644 --- a/src/livepeer/models/components/ipfs_file_info.py +++ b/src/livepeer/models/components/ipfs_file_info.py @@ -3,8 +3,8 @@ from __future__ import annotations from livepeer.types import BaseModel import pydantic -from typing import Optional, TypedDict -from typing_extensions import Annotated, NotRequired +from typing import Optional +from typing_extensions import Annotated, NotRequired, TypedDict class IpfsFileInfoTypedDict(TypedDict): diff --git a/src/livepeer/models/components/llmresponse.py b/src/livepeer/models/components/llmresponse.py new file mode 100644 index 0000000..17bd39d --- /dev/null +++ b/src/livepeer/models/components/llmresponse.py @@ -0,0 +1,16 @@ +"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.""" + +from __future__ import annotations +from livepeer.types import BaseModel +from typing_extensions import TypedDict + + +class LLMResponseTypedDict(TypedDict): + response: str + tokens_used: int + + +class LLMResponse(BaseModel): + response: str + + tokens_used: int diff --git a/src/livepeer/models/components/masksresponse.py b/src/livepeer/models/components/masksresponse.py index 148d6ac..89b9b7d 100644 --- a/src/livepeer/models/components/masksresponse.py +++ b/src/livepeer/models/components/masksresponse.py @@ -2,7 +2,7 @@ from __future__ import annotations from livepeer.types import BaseModel -from typing import TypedDict +from typing_extensions import TypedDict class MasksResponseTypedDict(TypedDict): diff --git a/src/livepeer/models/components/media.py b/src/livepeer/models/components/media.py index f2c9164..b883b23 100644 --- a/src/livepeer/models/components/media.py +++ b/src/livepeer/models/components/media.py @@ -2,7 +2,7 @@ from __future__ import annotations from livepeer.types import BaseModel -from typing import TypedDict +from typing_extensions import TypedDict class MediaTypedDict(TypedDict): diff --git a/src/livepeer/models/components/multistream.py b/src/livepeer/models/components/multistream.py index 59005ff..9a43a04 100644 --- a/src/livepeer/models/components/multistream.py +++ b/src/livepeer/models/components/multistream.py @@ -3,8 +3,8 @@ from __future__ import annotations from .target import Target, TargetTypedDict from livepeer.types import BaseModel -from typing import List, Optional, TypedDict -from typing_extensions import NotRequired +from typing import List, Optional +from typing_extensions import NotRequired, TypedDict class MultistreamTypedDict(TypedDict): diff --git a/src/livepeer/models/components/multistream_target.py b/src/livepeer/models/components/multistream_target.py index b616abb..530d3bb 100644 --- a/src/livepeer/models/components/multistream_target.py +++ b/src/livepeer/models/components/multistream_target.py @@ -3,8 +3,8 @@ from __future__ import annotations from livepeer.types import BaseModel import pydantic -from typing import Optional, TypedDict -from typing_extensions import Annotated, NotRequired +from typing import Optional +from typing_extensions import Annotated, NotRequired, TypedDict class MultistreamTargetTypedDict(TypedDict): diff --git a/src/livepeer/models/components/multistream_target_input.py b/src/livepeer/models/components/multistream_target_input.py index 8b0db2a..50d3a7f 100644 --- a/src/livepeer/models/components/multistream_target_input.py +++ b/src/livepeer/models/components/multistream_target_input.py @@ -2,8 +2,8 @@ from __future__ import annotations from livepeer.types import BaseModel -from typing import Optional, TypedDict -from typing_extensions import NotRequired +from typing import Optional +from typing_extensions import NotRequired, TypedDict class MultistreamTargetInputTypedDict(TypedDict): diff --git a/src/livepeer/models/components/multistream_target_patch_payload.py b/src/livepeer/models/components/multistream_target_patch_payload.py index 624711b..b8b5531 100644 --- a/src/livepeer/models/components/multistream_target_patch_payload.py +++ b/src/livepeer/models/components/multistream_target_patch_payload.py @@ -2,8 +2,8 @@ from __future__ import annotations from livepeer.types import BaseModel -from typing import Optional, TypedDict -from typing_extensions import NotRequired +from typing import Optional +from typing_extensions import NotRequired, TypedDict class MultistreamTargetPatchPayloadTypedDict(TypedDict): diff --git a/src/livepeer/models/components/new_asset_from_url_payload.py b/src/livepeer/models/components/new_asset_from_url_payload.py index 50441c7..83a1c90 100644 --- a/src/livepeer/models/components/new_asset_from_url_payload.py +++ b/src/livepeer/models/components/new_asset_from_url_payload.py @@ -9,8 +9,8 @@ from livepeer.types import BaseModel, Nullable, OptionalNullable, UNSET, UNSET_SENTINEL import pydantic from pydantic import model_serializer -from typing import List, Optional, TypedDict -from typing_extensions import Annotated, NotRequired +from typing import List, Optional +from typing_extensions import Annotated, NotRequired, TypedDict class NewAssetFromURLPayloadTypedDict(TypedDict): diff --git a/src/livepeer/models/components/new_asset_payload.py b/src/livepeer/models/components/new_asset_payload.py index e063378..1384714 100644 --- a/src/livepeer/models/components/new_asset_payload.py +++ b/src/livepeer/models/components/new_asset_payload.py @@ -8,8 +8,8 @@ from livepeer.types import BaseModel, Nullable, OptionalNullable, UNSET, UNSET_SENTINEL import pydantic from pydantic import model_serializer -from typing import List, Optional, TypedDict, Union -from typing_extensions import Annotated, NotRequired +from typing import List, Optional, Union +from typing_extensions import Annotated, NotRequired, TypeAliasType, TypedDict class NewAssetPayloadIpfs1TypedDict(TypedDict): @@ -50,7 +50,9 @@ def serialize_model(self, handler): return m -NewAssetPayloadIpfsTypedDict = Union[NewAssetPayloadIpfs1TypedDict, bool] +NewAssetPayloadIpfsTypedDict = TypeAliasType( + "NewAssetPayloadIpfsTypedDict", Union[NewAssetPayloadIpfs1TypedDict, bool] +) r"""Set to true to make default export to IPFS. To customize the pinned files, specify an object with a spec field. False or null means to unpin from IPFS, but it's unsupported right now. @@ -58,7 +60,9 @@ def serialize_model(self, handler): """ -NewAssetPayloadIpfs = Union[NewAssetPayloadIpfs1, bool] +NewAssetPayloadIpfs = TypeAliasType( + "NewAssetPayloadIpfs", Union[NewAssetPayloadIpfs1, bool] +) r"""Set to true to make default export to IPFS. To customize the pinned files, specify an object with a spec field. False or null means to unpin from IPFS, but it's unsupported right now. diff --git a/src/livepeer/models/components/new_stream_payload.py b/src/livepeer/models/components/new_stream_payload.py index 497165a..f23b0f2 100644 --- a/src/livepeer/models/components/new_stream_payload.py +++ b/src/livepeer/models/components/new_stream_payload.py @@ -11,8 +11,8 @@ from livepeer.types import BaseModel, Nullable, OptionalNullable, UNSET, UNSET_SENTINEL import pydantic from pydantic import model_serializer -from typing import Dict, List, Optional, TypedDict -from typing_extensions import Annotated, NotRequired +from typing import Dict, List, Optional +from typing_extensions import Annotated, NotRequired, TypedDict class NewStreamPayloadRecordingSpecTypedDict(TypedDict): diff --git a/src/livepeer/models/components/playback_info.py b/src/livepeer/models/components/playback_info.py index ccc599d..0bed572 100644 --- a/src/livepeer/models/components/playback_info.py +++ b/src/livepeer/models/components/playback_info.py @@ -7,8 +7,8 @@ from livepeer.types import BaseModel, Nullable, OptionalNullable, UNSET, UNSET_SENTINEL import pydantic from pydantic import model_serializer -from typing import List, Optional, TypedDict -from typing_extensions import Annotated, NotRequired +from typing import List, Optional +from typing_extensions import Annotated, NotRequired, TypedDict class PlaybackInfoType(str, Enum): diff --git a/src/livepeer/models/components/playback_policy.py b/src/livepeer/models/components/playback_policy.py index 2935e0f..87bb143 100644 --- a/src/livepeer/models/components/playback_policy.py +++ b/src/livepeer/models/components/playback_policy.py @@ -4,8 +4,8 @@ from enum import Enum from livepeer.types import BaseModel import pydantic -from typing import Any, Dict, List, Optional, TypedDict -from typing_extensions import Annotated, NotRequired +from typing import Any, Dict, List, Optional +from typing_extensions import Annotated, NotRequired, TypedDict class Type(str, Enum): diff --git a/src/livepeer/models/components/pull.py b/src/livepeer/models/components/pull.py index 8ff8877..dc0172f 100644 --- a/src/livepeer/models/components/pull.py +++ b/src/livepeer/models/components/pull.py @@ -4,8 +4,8 @@ from enum import Enum from livepeer.types import BaseModel import pydantic -from typing import Dict, Optional, TypedDict, Union -from typing_extensions import Annotated, NotRequired +from typing import Dict, Optional, Union +from typing_extensions import Annotated, NotRequired, TypeAliasType, TypedDict class One(int, Enum): @@ -16,11 +16,11 @@ class One(int, Enum): TWO = 2 -IsMobileTypedDict = Union[One, bool] +IsMobileTypedDict = TypeAliasType("IsMobileTypedDict", Union[One, bool]) r"""Indicates whether the stream will be pulled from a mobile source.""" -IsMobile = Union[One, bool] +IsMobile = TypeAliasType("IsMobile", Union[One, bool]) r"""Indicates whether the stream will be pulled from a mobile source.""" diff --git a/src/livepeer/models/components/realtime_viewership_metric.py b/src/livepeer/models/components/realtime_viewership_metric.py index 27a0372..2c95a05 100644 --- a/src/livepeer/models/components/realtime_viewership_metric.py +++ b/src/livepeer/models/components/realtime_viewership_metric.py @@ -3,8 +3,8 @@ from __future__ import annotations from livepeer.types import BaseModel import pydantic -from typing import Optional, TypedDict -from typing_extensions import Annotated, NotRequired +from typing import Optional +from typing_extensions import Annotated, NotRequired, TypedDict class RealtimeViewershipMetricTypedDict(TypedDict): diff --git a/src/livepeer/models/components/recordingspec.py b/src/livepeer/models/components/recordingspec.py index 39a7cb8..09691b1 100644 --- a/src/livepeer/models/components/recordingspec.py +++ b/src/livepeer/models/components/recordingspec.py @@ -4,8 +4,8 @@ from .transcode_profile import TranscodeProfile, TranscodeProfileTypedDict from livepeer.types import BaseModel, Nullable, OptionalNullable, UNSET, UNSET_SENTINEL from pydantic import model_serializer -from typing import List, TypedDict -from typing_extensions import NotRequired +from typing import List +from typing_extensions import NotRequired, TypedDict class RecordingSpecTypedDict(TypedDict): diff --git a/src/livepeer/models/components/room.py b/src/livepeer/models/components/room.py index c4b09bc..f85251a 100644 --- a/src/livepeer/models/components/room.py +++ b/src/livepeer/models/components/room.py @@ -3,8 +3,8 @@ from __future__ import annotations from livepeer.types import BaseModel import pydantic -from typing import Dict, Optional, TypedDict -from typing_extensions import Annotated, NotRequired +from typing import Dict, Optional +from typing_extensions import Annotated, NotRequired, TypedDict class ParticipantsTypedDict(TypedDict): diff --git a/src/livepeer/models/components/room_egress_payload.py b/src/livepeer/models/components/room_egress_payload.py index d9fcf79..72adce3 100644 --- a/src/livepeer/models/components/room_egress_payload.py +++ b/src/livepeer/models/components/room_egress_payload.py @@ -3,8 +3,7 @@ from __future__ import annotations from livepeer.types import BaseModel import pydantic -from typing import TypedDict -from typing_extensions import Annotated +from typing_extensions import Annotated, TypedDict class RoomEgressPayloadTypedDict(TypedDict): diff --git a/src/livepeer/models/components/room_user_payload.py b/src/livepeer/models/components/room_user_payload.py index 62f7111..4cdee7c 100644 --- a/src/livepeer/models/components/room_user_payload.py +++ b/src/livepeer/models/components/room_user_payload.py @@ -3,8 +3,8 @@ from __future__ import annotations from livepeer.types import BaseModel import pydantic -from typing import Optional, TypedDict -from typing_extensions import Annotated, NotRequired +from typing import Optional +from typing_extensions import Annotated, NotRequired, TypedDict class RoomUserPayloadTypedDict(TypedDict): diff --git a/src/livepeer/models/components/room_user_response.py b/src/livepeer/models/components/room_user_response.py index 37d3109..138e050 100644 --- a/src/livepeer/models/components/room_user_response.py +++ b/src/livepeer/models/components/room_user_response.py @@ -3,8 +3,8 @@ from __future__ import annotations from livepeer.types import BaseModel import pydantic -from typing import Optional, TypedDict -from typing_extensions import Annotated, NotRequired +from typing import Optional +from typing_extensions import Annotated, NotRequired, TypedDict class RoomUserResponseTypedDict(TypedDict): diff --git a/src/livepeer/models/components/room_user_update_payload.py b/src/livepeer/models/components/room_user_update_payload.py index 13b0e1d..396a89e 100644 --- a/src/livepeer/models/components/room_user_update_payload.py +++ b/src/livepeer/models/components/room_user_update_payload.py @@ -3,8 +3,8 @@ from __future__ import annotations from livepeer.types import BaseModel import pydantic -from typing import Optional, TypedDict -from typing_extensions import Annotated, NotRequired +from typing import Optional +from typing_extensions import Annotated, NotRequired, TypedDict class RoomUserUpdatePayloadTypedDict(TypedDict): diff --git a/src/livepeer/models/components/security.py b/src/livepeer/models/components/security.py index 690666d..8c8cb8c 100644 --- a/src/livepeer/models/components/security.py +++ b/src/livepeer/models/components/security.py @@ -3,8 +3,7 @@ from __future__ import annotations from livepeer.types import BaseModel from livepeer.utils import FieldMetadata, SecurityMetadata -from typing import TypedDict -from typing_extensions import Annotated +from typing_extensions import Annotated, TypedDict class SecurityTypedDict(TypedDict): diff --git a/src/livepeer/models/components/session.py b/src/livepeer/models/components/session.py index 100346f..dccee0b 100644 --- a/src/livepeer/models/components/session.py +++ b/src/livepeer/models/components/session.py @@ -7,8 +7,8 @@ from livepeer.types import BaseModel, Nullable, OptionalNullable, UNSET, UNSET_SENTINEL import pydantic from pydantic import model_serializer -from typing import List, Optional, TypedDict -from typing_extensions import Annotated, NotRequired +from typing import List, Optional +from typing_extensions import Annotated, NotRequired, TypedDict class RecordingStatus(str, Enum): diff --git a/src/livepeer/models/components/signing_key.py b/src/livepeer/models/components/signing_key.py index 2e2609c..3f7eef0 100644 --- a/src/livepeer/models/components/signing_key.py +++ b/src/livepeer/models/components/signing_key.py @@ -3,8 +3,8 @@ from __future__ import annotations from livepeer.types import BaseModel import pydantic -from typing import Optional, TypedDict -from typing_extensions import Annotated, NotRequired +from typing import Optional +from typing_extensions import Annotated, NotRequired, TypedDict class SigningKeyTypedDict(TypedDict): diff --git a/src/livepeer/models/components/spec.py b/src/livepeer/models/components/spec.py index 69cede9..27a3dd2 100644 --- a/src/livepeer/models/components/spec.py +++ b/src/livepeer/models/components/spec.py @@ -4,8 +4,8 @@ from enum import Enum from livepeer.types import BaseModel import pydantic -from typing import Optional, TypedDict -from typing_extensions import Annotated, NotRequired +from typing import Optional +from typing_extensions import Annotated, NotRequired, TypedDict class NftMetadataTemplate(str, Enum): diff --git a/src/livepeer/models/components/storage.py b/src/livepeer/models/components/storage.py index 227f688..33989fa 100644 --- a/src/livepeer/models/components/storage.py +++ b/src/livepeer/models/components/storage.py @@ -4,8 +4,8 @@ from .spec import Spec, SpecTypedDict from livepeer.types import BaseModel, Nullable, OptionalNullable, UNSET, UNSET_SENTINEL from pydantic import model_serializer -from typing import TypedDict, Union -from typing_extensions import NotRequired +from typing import Union +from typing_extensions import NotRequired, TypeAliasType, TypedDict class Ipfs1TypedDict(TypedDict): @@ -46,7 +46,7 @@ def serialize_model(self, handler): return m -IpfsTypedDict = Union[Ipfs1TypedDict, bool] +IpfsTypedDict = TypeAliasType("IpfsTypedDict", Union[Ipfs1TypedDict, bool]) r"""Set to true to make default export to IPFS. To customize the pinned files, specify an object with a spec field. False or null means to unpin from IPFS, but it's unsupported right now. @@ -54,7 +54,7 @@ def serialize_model(self, handler): """ -Ipfs = Union[Ipfs1, bool] +Ipfs = TypeAliasType("Ipfs", Union[Ipfs1, bool]) r"""Set to true to make default export to IPFS. To customize the pinned files, specify an object with a spec field. False or null means to unpin from IPFS, but it's unsupported right now. diff --git a/src/livepeer/models/components/storage_status.py b/src/livepeer/models/components/storage_status.py index 467d281..a26274e 100644 --- a/src/livepeer/models/components/storage_status.py +++ b/src/livepeer/models/components/storage_status.py @@ -4,8 +4,8 @@ from enum import Enum from livepeer.types import BaseModel import pydantic -from typing import Optional, TypedDict -from typing_extensions import Annotated, NotRequired +from typing import Optional +from typing_extensions import Annotated, NotRequired, TypedDict class Phase(str, Enum): diff --git a/src/livepeer/models/components/stream.py b/src/livepeer/models/components/stream.py index d369cf5..337b642 100644 --- a/src/livepeer/models/components/stream.py +++ b/src/livepeer/models/components/stream.py @@ -10,20 +10,22 @@ from livepeer.types import BaseModel, Nullable, OptionalNullable, UNSET, UNSET_SENTINEL import pydantic from pydantic import model_serializer -from typing import Dict, List, Optional, TypedDict, Union -from typing_extensions import Annotated, NotRequired +from typing import Dict, List, Optional, Union +from typing_extensions import Annotated, NotRequired, TypeAliasType, TypedDict -ThreeTypedDict = Union[str, float] +ThreeTypedDict = TypeAliasType("ThreeTypedDict", Union[str, float]) -Three = Union[str, float] +Three = TypeAliasType("Three", Union[str, float]) -StreamUserTagsTypedDict = Union[str, float, List[ThreeTypedDict]] +StreamUserTagsTypedDict = TypeAliasType( + "StreamUserTagsTypedDict", Union[str, float, List[ThreeTypedDict]] +) -StreamUserTags = Union[str, float, List[Three]] +StreamUserTags = TypeAliasType("StreamUserTags", Union[str, float, List[Three]]) class IsMobile1(int, Enum): @@ -34,11 +36,13 @@ class IsMobile1(int, Enum): TWO = 2 -StreamIsMobileTypedDict = Union[IsMobile1, bool] +StreamIsMobileTypedDict = TypeAliasType( + "StreamIsMobileTypedDict", Union[IsMobile1, bool] +) r"""Indicates whether the stream will be pulled from a mobile source.""" -StreamIsMobile = Union[IsMobile1, bool] +StreamIsMobile = TypeAliasType("StreamIsMobile", Union[IsMobile1, bool]) r"""Indicates whether the stream will be pulled from a mobile source.""" diff --git a/src/livepeer/models/components/stream_patch_payload.py b/src/livepeer/models/components/stream_patch_payload.py index 47669d9..e82c5a6 100644 --- a/src/livepeer/models/components/stream_patch_payload.py +++ b/src/livepeer/models/components/stream_patch_payload.py @@ -10,8 +10,8 @@ from livepeer.types import BaseModel, Nullable, OptionalNullable, UNSET, UNSET_SENTINEL import pydantic from pydantic import model_serializer -from typing import Dict, List, Optional, TypedDict -from typing_extensions import Annotated, NotRequired +from typing import Dict, List, Optional +from typing_extensions import Annotated, NotRequired, TypedDict class StreamPatchPayloadTypedDict(TypedDict): @@ -30,6 +30,7 @@ class StreamPatchPayloadTypedDict(TypedDict): recording_spec: NotRequired[RecordingSpecTypedDict] user_tags: NotRequired[Dict[str, UserTagsTypedDict]] r"""User input tags associated with the stream""" + name: NotRequired[str] class StreamPatchPayload(BaseModel): @@ -64,6 +65,8 @@ class StreamPatchPayload(BaseModel): ] = None r"""User input tags associated with the stream""" + name: Optional[str] = None + @model_serializer(mode="wrap") def serialize_model(self, handler): optional_fields = [ @@ -75,6 +78,7 @@ def serialize_model(self, handler): "profiles", "recordingSpec", "userTags", + "name", ] nullable_fields = ["playbackPolicy", "profiles"] null_default_fields = [] diff --git a/src/livepeer/models/components/studio_api_error.py b/src/livepeer/models/components/studio_api_error.py new file mode 100644 index 0000000..d66f809 --- /dev/null +++ b/src/livepeer/models/components/studio_api_error.py @@ -0,0 +1,19 @@ +"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.""" + +from __future__ import annotations +from .httpmetadata import HTTPMetadata, HTTPMetadataTypedDict +from livepeer.types import BaseModel +import pydantic +from typing import List, Optional +from typing_extensions import Annotated, NotRequired, TypedDict + + +class StudioAPIErrorTypedDict(TypedDict): + http_meta: HTTPMetadataTypedDict + errors: NotRequired[List[str]] + + +class StudioAPIError(BaseModel): + http_meta: Annotated[Optional[HTTPMetadata], pydantic.Field(exclude=True)] = None + + errors: Optional[List[str]] = None diff --git a/src/livepeer/models/components/target.py b/src/livepeer/models/components/target.py index 1352b96..0a9f2da 100644 --- a/src/livepeer/models/components/target.py +++ b/src/livepeer/models/components/target.py @@ -3,8 +3,8 @@ from __future__ import annotations from livepeer.types import BaseModel import pydantic -from typing import Optional, TypedDict -from typing_extensions import Annotated, NotRequired +from typing import Optional +from typing_extensions import Annotated, NotRequired, TypedDict class TargetSpecTypedDict(TypedDict): diff --git a/src/livepeer/models/components/target_add_payload.py b/src/livepeer/models/components/target_add_payload.py index e07460d..8c0b7e2 100644 --- a/src/livepeer/models/components/target_add_payload.py +++ b/src/livepeer/models/components/target_add_payload.py @@ -3,8 +3,8 @@ from __future__ import annotations from livepeer.types import BaseModel import pydantic -from typing import Optional, TypedDict -from typing_extensions import Annotated, NotRequired +from typing import Optional +from typing_extensions import Annotated, NotRequired, TypedDict class TargetAddPayloadSpecTypedDict(TypedDict): diff --git a/src/livepeer/models/components/target_output.py b/src/livepeer/models/components/target_output.py index dc2d0c3..6f0ac3b 100644 --- a/src/livepeer/models/components/target_output.py +++ b/src/livepeer/models/components/target_output.py @@ -3,8 +3,8 @@ from __future__ import annotations from livepeer.types import BaseModel import pydantic -from typing import Optional, TypedDict -from typing_extensions import Annotated, NotRequired +from typing import Optional +from typing_extensions import Annotated, NotRequired, TypedDict class TargetOutputTypedDict(TypedDict): diff --git a/src/livepeer/models/components/task.py b/src/livepeer/models/components/task.py index 7b4b8e0..e8361d3 100644 --- a/src/livepeer/models/components/task.py +++ b/src/livepeer/models/components/task.py @@ -11,8 +11,8 @@ from livepeer.types import BaseModel import pydantic from pydantic import ConfigDict -from typing import Any, Dict, List, Optional, TypedDict -from typing_extensions import Annotated, NotRequired +from typing import Any, Dict, List, Optional +from typing_extensions import Annotated, NotRequired, TypedDict class TaskType(str, Enum): diff --git a/src/livepeer/models/components/textresponse.py b/src/livepeer/models/components/textresponse.py index a7e2636..5842e20 100644 --- a/src/livepeer/models/components/textresponse.py +++ b/src/livepeer/models/components/textresponse.py @@ -3,7 +3,8 @@ from __future__ import annotations from .chunk import Chunk, ChunkTypedDict from livepeer.types import BaseModel -from typing import List, TypedDict +from typing import List +from typing_extensions import TypedDict class TextResponseTypedDict(TypedDict): diff --git a/src/livepeer/models/components/texttoimageparams.py b/src/livepeer/models/components/texttoimageparams.py index fe0ef94..6da9554 100644 --- a/src/livepeer/models/components/texttoimageparams.py +++ b/src/livepeer/models/components/texttoimageparams.py @@ -2,8 +2,8 @@ from __future__ import annotations from livepeer.types import BaseModel -from typing import Optional, TypedDict -from typing_extensions import NotRequired +from typing import Optional +from typing_extensions import NotRequired, TypedDict class TextToImageParamsTypedDict(TypedDict): @@ -11,6 +11,8 @@ class TextToImageParamsTypedDict(TypedDict): r"""Text prompt(s) to guide image generation. Separate multiple prompts with '|' if supported by the model.""" model_id: NotRequired[str] r"""Hugging Face model ID used for image generation.""" + loras: NotRequired[str] + r"""A LoRA (Low-Rank Adaptation) model and its corresponding weight for image generation. Example: { \"latent-consistency/lcm-lora-sdxl\": 1.0, \"nerijs/pixel-art-xl\": 1.2}.""" height: NotRequired[int] r"""The height in pixels of the generated image.""" width: NotRequired[int] @@ -36,6 +38,9 @@ class TextToImageParams(BaseModel): model_id: Optional[str] = "SG161222/RealVisXL_V4.0_Lightning" r"""Hugging Face model ID used for image generation.""" + loras: Optional[str] = "" + r"""A LoRA (Low-Rank Adaptation) model and its corresponding weight for image generation. Example: { \"latent-consistency/lcm-lora-sdxl\": 1.0, \"nerijs/pixel-art-xl\": 1.2}.""" + height: Optional[int] = 576 r"""The height in pixels of the generated image.""" diff --git a/src/livepeer/models/components/transcode_payload.py b/src/livepeer/models/components/transcode_payload.py index c9e91a0..3f33016 100644 --- a/src/livepeer/models/components/transcode_payload.py +++ b/src/livepeer/models/components/transcode_payload.py @@ -6,8 +6,8 @@ from enum import Enum from livepeer.types import BaseModel import pydantic -from typing import List, Optional, TypedDict, Union -from typing_extensions import Annotated, NotRequired +from typing import List, Optional, Union +from typing_extensions import Annotated, NotRequired, TypeAliasType, TypedDict class InputType(str, Enum): @@ -92,10 +92,12 @@ class Input1(BaseModel): r"""URL of the video to transcode""" -InputTypedDict = Union[Input1TypedDict, Input2TypedDict] +InputTypedDict = TypeAliasType( + "InputTypedDict", Union[Input1TypedDict, Input2TypedDict] +) -Input = Union[Input1, Input2] +Input = TypeAliasType("Input", Union[Input1, Input2]) class TranscodePayloadStorageType(str, Enum): @@ -203,10 +205,14 @@ class Storage1(BaseModel): r"""Credentials for the output video storage""" -TranscodePayloadStorageTypedDict = Union[Storage2TypedDict, Storage1TypedDict] +TranscodePayloadStorageTypedDict = TypeAliasType( + "TranscodePayloadStorageTypedDict", Union[Storage2TypedDict, Storage1TypedDict] +) -TranscodePayloadStorage = Union[Storage2, Storage1] +TranscodePayloadStorage = TypeAliasType( + "TranscodePayloadStorage", Union[Storage2, Storage1] +) class HlsTypedDict(TypedDict): diff --git a/src/livepeer/models/components/transcode_profile.py b/src/livepeer/models/components/transcode_profile.py index 9ac5785..7e70089 100644 --- a/src/livepeer/models/components/transcode_profile.py +++ b/src/livepeer/models/components/transcode_profile.py @@ -4,8 +4,8 @@ from enum import Enum from livepeer.types import BaseModel import pydantic -from typing import Optional, TypedDict -from typing_extensions import Annotated, NotRequired +from typing import Optional +from typing_extensions import Annotated, NotRequired, TypedDict class TranscodeProfileProfile(str, Enum): diff --git a/src/livepeer/models/components/usage_metric.py b/src/livepeer/models/components/usage_metric.py index 36e37ce..581c2a2 100644 --- a/src/livepeer/models/components/usage_metric.py +++ b/src/livepeer/models/components/usage_metric.py @@ -3,8 +3,8 @@ from __future__ import annotations from livepeer.types import BaseModel import pydantic -from typing import Optional, TypedDict -from typing_extensions import Annotated, NotRequired +from typing import Optional +from typing_extensions import Annotated, NotRequired, TypedDict class UsageMetricTypedDict(TypedDict): diff --git a/src/livepeer/models/components/usertags.py b/src/livepeer/models/components/usertags.py index 0235cf4..596608f 100644 --- a/src/livepeer/models/components/usertags.py +++ b/src/livepeer/models/components/usertags.py @@ -2,15 +2,18 @@ from __future__ import annotations from typing import List, Union +from typing_extensions import TypeAliasType -UserTags3TypedDict = Union[str, float] +UserTags3TypedDict = TypeAliasType("UserTags3TypedDict", Union[str, float]) -UserTags3 = Union[str, float] +UserTags3 = TypeAliasType("UserTags3", Union[str, float]) -UserTagsTypedDict = Union[str, float, List[UserTags3TypedDict]] +UserTagsTypedDict = TypeAliasType( + "UserTagsTypedDict", Union[str, float, List[UserTags3TypedDict]] +) -UserTags = Union[str, float, List[UserTags3]] +UserTags = TypeAliasType("UserTags", Union[str, float, List[UserTags3]]) diff --git a/src/livepeer/models/components/validationerror.py b/src/livepeer/models/components/validationerror.py index 2ebec25..baa0c5e 100644 --- a/src/livepeer/models/components/validationerror.py +++ b/src/livepeer/models/components/validationerror.py @@ -2,13 +2,14 @@ from __future__ import annotations from livepeer.types import BaseModel -from typing import List, TypedDict, Union +from typing import List, Union +from typing_extensions import TypeAliasType, TypedDict -LocTypedDict = Union[str, int] +LocTypedDict = TypeAliasType("LocTypedDict", Union[str, int]) -Loc = Union[str, int] +Loc = TypeAliasType("Loc", Union[str, int]) class ValidationErrorTypedDict(TypedDict): diff --git a/src/livepeer/models/components/videoresponse.py b/src/livepeer/models/components/videoresponse.py index 354a073..d463eb4 100644 --- a/src/livepeer/models/components/videoresponse.py +++ b/src/livepeer/models/components/videoresponse.py @@ -3,7 +3,8 @@ from __future__ import annotations from .media import Media, MediaTypedDict from livepeer.types import BaseModel -from typing import List, TypedDict +from typing import List +from typing_extensions import TypedDict class VideoResponseTypedDict(TypedDict): diff --git a/src/livepeer/models/components/viewership_metric.py b/src/livepeer/models/components/viewership_metric.py index 6016ac4..c3435be 100644 --- a/src/livepeer/models/components/viewership_metric.py +++ b/src/livepeer/models/components/viewership_metric.py @@ -3,8 +3,8 @@ from __future__ import annotations from livepeer.types import BaseModel import pydantic -from typing import Optional, TypedDict -from typing_extensions import Annotated, NotRequired +from typing import Optional +from typing_extensions import Annotated, NotRequired, TypedDict class ViewershipMetricTypedDict(TypedDict): diff --git a/src/livepeer/models/components/webhook.py b/src/livepeer/models/components/webhook.py index 23d198d..55cb1b3 100644 --- a/src/livepeer/models/components/webhook.py +++ b/src/livepeer/models/components/webhook.py @@ -4,8 +4,8 @@ from enum import Enum from livepeer.types import BaseModel import pydantic -from typing import List, Optional, TypedDict -from typing_extensions import Annotated, NotRequired +from typing import List, Optional +from typing_extensions import Annotated, NotRequired, TypedDict class Events(str, Enum): diff --git a/src/livepeer/models/components/webhook_log.py b/src/livepeer/models/components/webhook_log.py index e7f744a..1f023b3 100644 --- a/src/livepeer/models/components/webhook_log.py +++ b/src/livepeer/models/components/webhook_log.py @@ -3,8 +3,8 @@ from __future__ import annotations from livepeer.types import BaseModel import pydantic -from typing import Dict, Optional, TypedDict -from typing_extensions import Annotated, NotRequired +from typing import Dict, Optional +from typing_extensions import Annotated, NotRequired, TypedDict class RequestTypedDict(TypedDict): diff --git a/src/livepeer/models/errors/__init__.py b/src/livepeer/models/errors/__init__.py index 152cd5f..6bef585 100644 --- a/src/livepeer/models/errors/__init__.py +++ b/src/livepeer/models/errors/__init__.py @@ -2,6 +2,8 @@ from .error import Error, ErrorData from .genaudiototext import ( + GenAudioToTextGenerateResponse415ResponseBody, + GenAudioToTextGenerateResponse415ResponseBodyUnion, GenAudioToTextGenerateResponse422ResponseBody, GenAudioToTextGenerateResponse422ResponseBodyUnion, GenAudioToTextGenerateResponse500ResponseBody, @@ -33,6 +35,16 @@ GenImageToVideoResponseBody, GenImageToVideoResponseBodyUnion, ) +from .genllm import ( + GenLLMGenerateResponse500ResponseBody, + GenLLMGenerateResponse500ResponseBodyUnion, + GenLLMGenerateResponseBody, + GenLLMGenerateResponseBodyUnion, + GenLLMGenerateResponseResponseBody, + GenLLMGenerateResponseResponseBodyUnion, + GenLLMResponseBody, + GenLLMResponseBodyUnion, +) from .gensegmentanything2 import ( GenSegmentAnything2GenerateResponse500ResponseBody, GenSegmentAnything2GenerateResponse500ResponseBodyUnion, @@ -71,6 +83,8 @@ __all__ = [ "Error", "ErrorData", + "GenAudioToTextGenerateResponse415ResponseBody", + "GenAudioToTextGenerateResponse415ResponseBodyUnion", "GenAudioToTextGenerateResponse422ResponseBody", "GenAudioToTextGenerateResponse422ResponseBodyUnion", "GenAudioToTextGenerateResponse500ResponseBody", @@ -97,6 +111,14 @@ "GenImageToVideoGenerateResponseResponseBodyUnion", "GenImageToVideoResponseBody", "GenImageToVideoResponseBodyUnion", + "GenLLMGenerateResponse500ResponseBody", + "GenLLMGenerateResponse500ResponseBodyUnion", + "GenLLMGenerateResponseBody", + "GenLLMGenerateResponseBodyUnion", + "GenLLMGenerateResponseResponseBody", + "GenLLMGenerateResponseResponseBodyUnion", + "GenLLMResponseBody", + "GenLLMResponseBodyUnion", "GenSegmentAnything2GenerateResponse500ResponseBody", "GenSegmentAnything2GenerateResponse500ResponseBodyUnion", "GenSegmentAnything2GenerateResponseBody", diff --git a/src/livepeer/models/errors/genaudiototext.py b/src/livepeer/models/errors/genaudiototext.py index 0e158e9..71e9750 100644 --- a/src/livepeer/models/errors/genaudiototext.py +++ b/src/livepeer/models/errors/genaudiototext.py @@ -6,11 +6,13 @@ from .studio_api_error import StudioAPIErrorData from livepeer import utils from typing import Union +from typing_extensions import TypeAliasType -GenAudioToTextGenerateResponse500ResponseBodyUnion = Union[ - HTTPErrorData, StudioAPIErrorData -] +GenAudioToTextGenerateResponse500ResponseBodyUnion = TypeAliasType( + "GenAudioToTextGenerateResponse500ResponseBodyUnion", + Union[HTTPErrorData, StudioAPIErrorData], +) r"""Internal Server Error""" @@ -28,9 +30,10 @@ def __str__(self) -> str: ) -GenAudioToTextGenerateResponse422ResponseBodyUnion = Union[ - HTTPValidationErrorData, StudioAPIErrorData -] +GenAudioToTextGenerateResponse422ResponseBodyUnion = TypeAliasType( + "GenAudioToTextGenerateResponse422ResponseBodyUnion", + Union[HTTPValidationErrorData, StudioAPIErrorData], +) r"""Validation Error""" @@ -48,9 +51,31 @@ def __str__(self) -> str: ) -GenAudioToTextGenerateResponseResponseBodyUnion = Union[ - HTTPErrorData, StudioAPIErrorData -] +GenAudioToTextGenerateResponse415ResponseBodyUnion = TypeAliasType( + "GenAudioToTextGenerateResponse415ResponseBodyUnion", + Union[HTTPErrorData, StudioAPIErrorData], +) +r"""Unsupported Media Type""" + + +class GenAudioToTextGenerateResponse415ResponseBody(Exception): + r"""Unsupported Media Type""" + + data: GenAudioToTextGenerateResponse415ResponseBodyUnion + + def __init__(self, data: GenAudioToTextGenerateResponse415ResponseBodyUnion): + self.data = data + + def __str__(self) -> str: + return utils.marshal_json( + self.data, GenAudioToTextGenerateResponse415ResponseBodyUnion + ) + + +GenAudioToTextGenerateResponseResponseBodyUnion = TypeAliasType( + "GenAudioToTextGenerateResponseResponseBodyUnion", + Union[HTTPErrorData, StudioAPIErrorData], +) r"""Request Entity Too Large""" @@ -68,7 +93,9 @@ def __str__(self) -> str: ) -GenAudioToTextGenerateResponseBodyUnion = Union[HTTPErrorData, StudioAPIErrorData] +GenAudioToTextGenerateResponseBodyUnion = TypeAliasType( + "GenAudioToTextGenerateResponseBodyUnion", Union[HTTPErrorData, StudioAPIErrorData] +) r"""Unauthorized""" @@ -84,7 +111,9 @@ def __str__(self) -> str: return utils.marshal_json(self.data, GenAudioToTextGenerateResponseBodyUnion) -GenAudioToTextResponseBodyUnion = Union[HTTPErrorData, StudioAPIErrorData] +GenAudioToTextResponseBodyUnion = TypeAliasType( + "GenAudioToTextResponseBodyUnion", Union[HTTPErrorData, StudioAPIErrorData] +) r"""Bad Request""" diff --git a/src/livepeer/models/errors/genimagetoimage.py b/src/livepeer/models/errors/genimagetoimage.py index f32552f..7523ec8 100644 --- a/src/livepeer/models/errors/genimagetoimage.py +++ b/src/livepeer/models/errors/genimagetoimage.py @@ -6,11 +6,13 @@ from .studio_api_error import StudioAPIErrorData from livepeer import utils from typing import Union +from typing_extensions import TypeAliasType -GenImageToImageGenerateResponse500ResponseBodyUnion = Union[ - HTTPErrorData, StudioAPIErrorData -] +GenImageToImageGenerateResponse500ResponseBodyUnion = TypeAliasType( + "GenImageToImageGenerateResponse500ResponseBodyUnion", + Union[HTTPErrorData, StudioAPIErrorData], +) r"""Internal Server Error""" @@ -28,9 +30,10 @@ def __str__(self) -> str: ) -GenImageToImageGenerateResponseResponseBodyUnion = Union[ - HTTPValidationErrorData, StudioAPIErrorData -] +GenImageToImageGenerateResponseResponseBodyUnion = TypeAliasType( + "GenImageToImageGenerateResponseResponseBodyUnion", + Union[HTTPValidationErrorData, StudioAPIErrorData], +) r"""Validation Error""" @@ -48,7 +51,9 @@ def __str__(self) -> str: ) -GenImageToImageGenerateResponseBodyUnion = Union[HTTPErrorData, StudioAPIErrorData] +GenImageToImageGenerateResponseBodyUnion = TypeAliasType( + "GenImageToImageGenerateResponseBodyUnion", Union[HTTPErrorData, StudioAPIErrorData] +) r"""Unauthorized""" @@ -64,7 +69,9 @@ def __str__(self) -> str: return utils.marshal_json(self.data, GenImageToImageGenerateResponseBodyUnion) -GenImageToImageResponseBodyUnion = Union[HTTPErrorData, StudioAPIErrorData] +GenImageToImageResponseBodyUnion = TypeAliasType( + "GenImageToImageResponseBodyUnion", Union[HTTPErrorData, StudioAPIErrorData] +) r"""Bad Request""" diff --git a/src/livepeer/models/errors/genimagetovideo.py b/src/livepeer/models/errors/genimagetovideo.py index b376258..7274c44 100644 --- a/src/livepeer/models/errors/genimagetovideo.py +++ b/src/livepeer/models/errors/genimagetovideo.py @@ -6,11 +6,13 @@ from .studio_api_error import StudioAPIErrorData from livepeer import utils from typing import Union +from typing_extensions import TypeAliasType -GenImageToVideoGenerateResponse500ResponseBodyUnion = Union[ - HTTPErrorData, StudioAPIErrorData -] +GenImageToVideoGenerateResponse500ResponseBodyUnion = TypeAliasType( + "GenImageToVideoGenerateResponse500ResponseBodyUnion", + Union[HTTPErrorData, StudioAPIErrorData], +) r"""Internal Server Error""" @@ -28,9 +30,10 @@ def __str__(self) -> str: ) -GenImageToVideoGenerateResponseResponseBodyUnion = Union[ - HTTPValidationErrorData, StudioAPIErrorData -] +GenImageToVideoGenerateResponseResponseBodyUnion = TypeAliasType( + "GenImageToVideoGenerateResponseResponseBodyUnion", + Union[HTTPValidationErrorData, StudioAPIErrorData], +) r"""Validation Error""" @@ -48,7 +51,9 @@ def __str__(self) -> str: ) -GenImageToVideoGenerateResponseBodyUnion = Union[HTTPErrorData, StudioAPIErrorData] +GenImageToVideoGenerateResponseBodyUnion = TypeAliasType( + "GenImageToVideoGenerateResponseBodyUnion", Union[HTTPErrorData, StudioAPIErrorData] +) r"""Unauthorized""" @@ -64,7 +69,9 @@ def __str__(self) -> str: return utils.marshal_json(self.data, GenImageToVideoGenerateResponseBodyUnion) -GenImageToVideoResponseBodyUnion = Union[HTTPErrorData, StudioAPIErrorData] +GenImageToVideoResponseBodyUnion = TypeAliasType( + "GenImageToVideoResponseBodyUnion", Union[HTTPErrorData, StudioAPIErrorData] +) r"""Bad Request""" diff --git a/src/livepeer/models/errors/genllm.py b/src/livepeer/models/errors/genllm.py new file mode 100644 index 0000000..3296bf2 --- /dev/null +++ b/src/livepeer/models/errors/genllm.py @@ -0,0 +1,83 @@ +"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.""" + +from __future__ import annotations +from .httperror import HTTPErrorData +from .httpvalidationerror import HTTPValidationErrorData +from .studio_api_error import StudioAPIErrorData +from livepeer import utils +from typing import Union +from typing_extensions import TypeAliasType + + +GenLLMGenerateResponse500ResponseBodyUnion = TypeAliasType( + "GenLLMGenerateResponse500ResponseBodyUnion", + Union[HTTPErrorData, StudioAPIErrorData], +) +r"""Internal Server Error""" + + +class GenLLMGenerateResponse500ResponseBody(Exception): + r"""Internal Server Error""" + + data: GenLLMGenerateResponse500ResponseBodyUnion + + def __init__(self, data: GenLLMGenerateResponse500ResponseBodyUnion): + self.data = data + + def __str__(self) -> str: + return utils.marshal_json(self.data, GenLLMGenerateResponse500ResponseBodyUnion) + + +GenLLMGenerateResponseResponseBodyUnion = TypeAliasType( + "GenLLMGenerateResponseResponseBodyUnion", + Union[HTTPValidationErrorData, StudioAPIErrorData], +) +r"""Validation Error""" + + +class GenLLMGenerateResponseResponseBody(Exception): + r"""Validation Error""" + + data: GenLLMGenerateResponseResponseBodyUnion + + def __init__(self, data: GenLLMGenerateResponseResponseBodyUnion): + self.data = data + + def __str__(self) -> str: + return utils.marshal_json(self.data, GenLLMGenerateResponseResponseBodyUnion) + + +GenLLMGenerateResponseBodyUnion = TypeAliasType( + "GenLLMGenerateResponseBodyUnion", Union[HTTPErrorData, StudioAPIErrorData] +) +r"""Unauthorized""" + + +class GenLLMGenerateResponseBody(Exception): + r"""Unauthorized""" + + data: GenLLMGenerateResponseBodyUnion + + def __init__(self, data: GenLLMGenerateResponseBodyUnion): + self.data = data + + def __str__(self) -> str: + return utils.marshal_json(self.data, GenLLMGenerateResponseBodyUnion) + + +GenLLMResponseBodyUnion = TypeAliasType( + "GenLLMResponseBodyUnion", Union[HTTPErrorData, StudioAPIErrorData] +) +r"""Bad Request""" + + +class GenLLMResponseBody(Exception): + r"""Bad Request""" + + data: GenLLMResponseBodyUnion + + def __init__(self, data: GenLLMResponseBodyUnion): + self.data = data + + def __str__(self) -> str: + return utils.marshal_json(self.data, GenLLMResponseBodyUnion) diff --git a/src/livepeer/models/errors/gensegmentanything2.py b/src/livepeer/models/errors/gensegmentanything2.py index b11392b..a42ad7b 100644 --- a/src/livepeer/models/errors/gensegmentanything2.py +++ b/src/livepeer/models/errors/gensegmentanything2.py @@ -6,11 +6,13 @@ from .studio_api_error import StudioAPIErrorData from livepeer import utils from typing import Union +from typing_extensions import TypeAliasType -GenSegmentAnything2GenerateResponse500ResponseBodyUnion = Union[ - HTTPErrorData, StudioAPIErrorData -] +GenSegmentAnything2GenerateResponse500ResponseBodyUnion = TypeAliasType( + "GenSegmentAnything2GenerateResponse500ResponseBodyUnion", + Union[HTTPErrorData, StudioAPIErrorData], +) r"""Internal Server Error""" @@ -28,9 +30,10 @@ def __str__(self) -> str: ) -GenSegmentAnything2GenerateResponseResponseBodyUnion = Union[ - HTTPValidationErrorData, StudioAPIErrorData -] +GenSegmentAnything2GenerateResponseResponseBodyUnion = TypeAliasType( + "GenSegmentAnything2GenerateResponseResponseBodyUnion", + Union[HTTPValidationErrorData, StudioAPIErrorData], +) r"""Validation Error""" @@ -48,7 +51,10 @@ def __str__(self) -> str: ) -GenSegmentAnything2GenerateResponseBodyUnion = Union[HTTPErrorData, StudioAPIErrorData] +GenSegmentAnything2GenerateResponseBodyUnion = TypeAliasType( + "GenSegmentAnything2GenerateResponseBodyUnion", + Union[HTTPErrorData, StudioAPIErrorData], +) r"""Unauthorized""" @@ -66,7 +72,9 @@ def __str__(self) -> str: ) -GenSegmentAnything2ResponseBodyUnion = Union[HTTPErrorData, StudioAPIErrorData] +GenSegmentAnything2ResponseBodyUnion = TypeAliasType( + "GenSegmentAnything2ResponseBodyUnion", Union[HTTPErrorData, StudioAPIErrorData] +) r"""Bad Request""" diff --git a/src/livepeer/models/errors/gentexttoimage.py b/src/livepeer/models/errors/gentexttoimage.py index c3d005b..3ce036b 100644 --- a/src/livepeer/models/errors/gentexttoimage.py +++ b/src/livepeer/models/errors/gentexttoimage.py @@ -6,11 +6,13 @@ from .studio_api_error import StudioAPIErrorData from livepeer import utils from typing import Union +from typing_extensions import TypeAliasType -GenTextToImageGenerateResponse500ResponseBodyUnion = Union[ - HTTPErrorData, StudioAPIErrorData -] +GenTextToImageGenerateResponse500ResponseBodyUnion = TypeAliasType( + "GenTextToImageGenerateResponse500ResponseBodyUnion", + Union[HTTPErrorData, StudioAPIErrorData], +) r"""Internal Server Error""" @@ -28,9 +30,10 @@ def __str__(self) -> str: ) -GenTextToImageGenerateResponseResponseBodyUnion = Union[ - HTTPValidationErrorData, StudioAPIErrorData -] +GenTextToImageGenerateResponseResponseBodyUnion = TypeAliasType( + "GenTextToImageGenerateResponseResponseBodyUnion", + Union[HTTPValidationErrorData, StudioAPIErrorData], +) r"""Validation Error""" @@ -48,7 +51,9 @@ def __str__(self) -> str: ) -GenTextToImageGenerateResponseBodyUnion = Union[HTTPErrorData, StudioAPIErrorData] +GenTextToImageGenerateResponseBodyUnion = TypeAliasType( + "GenTextToImageGenerateResponseBodyUnion", Union[HTTPErrorData, StudioAPIErrorData] +) r"""Unauthorized""" @@ -64,7 +69,9 @@ def __str__(self) -> str: return utils.marshal_json(self.data, GenTextToImageGenerateResponseBodyUnion) -GenTextToImageResponseBodyUnion = Union[HTTPErrorData, StudioAPIErrorData] +GenTextToImageResponseBodyUnion = TypeAliasType( + "GenTextToImageResponseBodyUnion", Union[HTTPErrorData, StudioAPIErrorData] +) r"""Bad Request""" diff --git a/src/livepeer/models/errors/genupscale.py b/src/livepeer/models/errors/genupscale.py index 0686b0f..4c09f5c 100644 --- a/src/livepeer/models/errors/genupscale.py +++ b/src/livepeer/models/errors/genupscale.py @@ -6,11 +6,13 @@ from .studio_api_error import StudioAPIErrorData from livepeer import utils from typing import Union +from typing_extensions import TypeAliasType -GenUpscaleGenerateResponse500ResponseBodyUnion = Union[ - HTTPErrorData, StudioAPIErrorData -] +GenUpscaleGenerateResponse500ResponseBodyUnion = TypeAliasType( + "GenUpscaleGenerateResponse500ResponseBodyUnion", + Union[HTTPErrorData, StudioAPIErrorData], +) r"""Internal Server Error""" @@ -28,9 +30,10 @@ def __str__(self) -> str: ) -GenUpscaleGenerateResponseResponseBodyUnion = Union[ - HTTPValidationErrorData, StudioAPIErrorData -] +GenUpscaleGenerateResponseResponseBodyUnion = TypeAliasType( + "GenUpscaleGenerateResponseResponseBodyUnion", + Union[HTTPValidationErrorData, StudioAPIErrorData], +) r"""Validation Error""" @@ -48,7 +51,9 @@ def __str__(self) -> str: ) -GenUpscaleGenerateResponseBodyUnion = Union[HTTPErrorData, StudioAPIErrorData] +GenUpscaleGenerateResponseBodyUnion = TypeAliasType( + "GenUpscaleGenerateResponseBodyUnion", Union[HTTPErrorData, StudioAPIErrorData] +) r"""Unauthorized""" @@ -64,7 +69,9 @@ def __str__(self) -> str: return utils.marshal_json(self.data, GenUpscaleGenerateResponseBodyUnion) -GenUpscaleResponseBodyUnion = Union[HTTPErrorData, StudioAPIErrorData] +GenUpscaleResponseBodyUnion = TypeAliasType( + "GenUpscaleResponseBodyUnion", Union[HTTPErrorData, StudioAPIErrorData] +) r"""Bad Request""" diff --git a/src/livepeer/models/errors/httperror.py b/src/livepeer/models/errors/httperror.py index 4b5b3d4..9e61525 100644 --- a/src/livepeer/models/errors/httperror.py +++ b/src/livepeer/models/errors/httperror.py @@ -20,78 +20,6 @@ class HTTPErrorData(BaseModel): Optional[components_httpmetadata.HTTPMetadata], pydantic.Field(exclude=True) ] = None - http_meta1: Annotated[ - Optional[components_httpmetadata.HTTPMetadata], pydantic.Field(exclude=True) - ] = None - - http_meta2: Annotated[ - Optional[components_httpmetadata.HTTPMetadata], pydantic.Field(exclude=True) - ] = None - - http_meta3: Annotated[ - Optional[components_httpmetadata.HTTPMetadata], pydantic.Field(exclude=True) - ] = None - - http_meta4: Annotated[ - Optional[components_httpmetadata.HTTPMetadata], pydantic.Field(exclude=True) - ] = None - - http_meta5: Annotated[ - Optional[components_httpmetadata.HTTPMetadata], pydantic.Field(exclude=True) - ] = None - - http_meta6: Annotated[ - Optional[components_httpmetadata.HTTPMetadata], pydantic.Field(exclude=True) - ] = None - - http_meta7: Annotated[ - Optional[components_httpmetadata.HTTPMetadata], pydantic.Field(exclude=True) - ] = None - - http_meta8: Annotated[ - Optional[components_httpmetadata.HTTPMetadata], pydantic.Field(exclude=True) - ] = None - - http_meta9: Annotated[ - Optional[components_httpmetadata.HTTPMetadata], pydantic.Field(exclude=True) - ] = None - - http_meta10: Annotated[ - Optional[components_httpmetadata.HTTPMetadata], pydantic.Field(exclude=True) - ] = None - - http_meta11: Annotated[ - Optional[components_httpmetadata.HTTPMetadata], pydantic.Field(exclude=True) - ] = None - - http_meta12: Annotated[ - Optional[components_httpmetadata.HTTPMetadata], pydantic.Field(exclude=True) - ] = None - - http_meta13: Annotated[ - Optional[components_httpmetadata.HTTPMetadata], pydantic.Field(exclude=True) - ] = None - - http_meta14: Annotated[ - Optional[components_httpmetadata.HTTPMetadata], pydantic.Field(exclude=True) - ] = None - - http_meta15: Annotated[ - Optional[components_httpmetadata.HTTPMetadata], pydantic.Field(exclude=True) - ] = None - - http_meta16: Annotated[ - Optional[components_httpmetadata.HTTPMetadata], pydantic.Field(exclude=True) - ] = None - - http_meta17: Annotated[ - Optional[components_httpmetadata.HTTPMetadata], pydantic.Field(exclude=True) - ] = None - - http_meta18: Annotated[ - Optional[components_httpmetadata.HTTPMetadata], pydantic.Field(exclude=True) - ] = None - class HTTPError(Exception): r"""HTTP error response model.""" diff --git a/src/livepeer/models/errors/httpvalidationerror.py b/src/livepeer/models/errors/httpvalidationerror.py index 9be3435..941be9f 100644 --- a/src/livepeer/models/errors/httpvalidationerror.py +++ b/src/livepeer/models/errors/httpvalidationerror.py @@ -17,26 +17,6 @@ class HTTPValidationErrorData(BaseModel): Optional[components_httpmetadata.HTTPMetadata], pydantic.Field(exclude=True) ] = None - http_meta1: Annotated[ - Optional[components_httpmetadata.HTTPMetadata], pydantic.Field(exclude=True) - ] = None - - http_meta2: Annotated[ - Optional[components_httpmetadata.HTTPMetadata], pydantic.Field(exclude=True) - ] = None - - http_meta3: Annotated[ - Optional[components_httpmetadata.HTTPMetadata], pydantic.Field(exclude=True) - ] = None - - http_meta4: Annotated[ - Optional[components_httpmetadata.HTTPMetadata], pydantic.Field(exclude=True) - ] = None - - http_meta5: Annotated[ - Optional[components_httpmetadata.HTTPMetadata], pydantic.Field(exclude=True) - ] = None - detail: Optional[List[components_validationerror.ValidationError]] = None diff --git a/src/livepeer/models/errors/studio_api_error.py b/src/livepeer/models/errors/studio_api_error.py index 598efaa..4d47a8f 100644 --- a/src/livepeer/models/errors/studio_api_error.py +++ b/src/livepeer/models/errors/studio_api_error.py @@ -14,108 +14,10 @@ class StudioAPIErrorData(BaseModel): Optional[components_httpmetadata.HTTPMetadata], pydantic.Field(exclude=True) ] = None - http_meta1: Annotated[ - Optional[components_httpmetadata.HTTPMetadata], pydantic.Field(exclude=True) - ] = None - - http_meta2: Annotated[ - Optional[components_httpmetadata.HTTPMetadata], pydantic.Field(exclude=True) - ] = None - - http_meta3: Annotated[ - Optional[components_httpmetadata.HTTPMetadata], pydantic.Field(exclude=True) - ] = None - - http_meta4: Annotated[ - Optional[components_httpmetadata.HTTPMetadata], pydantic.Field(exclude=True) - ] = None - - http_meta5: Annotated[ - Optional[components_httpmetadata.HTTPMetadata], pydantic.Field(exclude=True) - ] = None - - http_meta6: Annotated[ - Optional[components_httpmetadata.HTTPMetadata], pydantic.Field(exclude=True) - ] = None - - http_meta7: Annotated[ - Optional[components_httpmetadata.HTTPMetadata], pydantic.Field(exclude=True) - ] = None - - http_meta8: Annotated[ - Optional[components_httpmetadata.HTTPMetadata], pydantic.Field(exclude=True) - ] = None - - http_meta9: Annotated[ - Optional[components_httpmetadata.HTTPMetadata], pydantic.Field(exclude=True) - ] = None - - http_meta10: Annotated[ - Optional[components_httpmetadata.HTTPMetadata], pydantic.Field(exclude=True) - ] = None - - http_meta11: Annotated[ - Optional[components_httpmetadata.HTTPMetadata], pydantic.Field(exclude=True) - ] = None - - http_meta12: Annotated[ - Optional[components_httpmetadata.HTTPMetadata], pydantic.Field(exclude=True) - ] = None - - http_meta13: Annotated[ - Optional[components_httpmetadata.HTTPMetadata], pydantic.Field(exclude=True) - ] = None - - http_meta14: Annotated[ - Optional[components_httpmetadata.HTTPMetadata], pydantic.Field(exclude=True) - ] = None - - http_meta15: Annotated[ - Optional[components_httpmetadata.HTTPMetadata], pydantic.Field(exclude=True) - ] = None - - http_meta16: Annotated[ - Optional[components_httpmetadata.HTTPMetadata], pydantic.Field(exclude=True) - ] = None - - http_meta17: Annotated[ - Optional[components_httpmetadata.HTTPMetadata], pydantic.Field(exclude=True) - ] = None - - http_meta18: Annotated[ - Optional[components_httpmetadata.HTTPMetadata], pydantic.Field(exclude=True) - ] = None - - http_meta19: Annotated[ - Optional[components_httpmetadata.HTTPMetadata], pydantic.Field(exclude=True) - ] = None - - http_meta20: Annotated[ - Optional[components_httpmetadata.HTTPMetadata], pydantic.Field(exclude=True) - ] = None - - http_meta21: Annotated[ - Optional[components_httpmetadata.HTTPMetadata], pydantic.Field(exclude=True) - ] = None - - http_meta22: Annotated[ - Optional[components_httpmetadata.HTTPMetadata], pydantic.Field(exclude=True) - ] = None - - http_meta23: Annotated[ - Optional[components_httpmetadata.HTTPMetadata], pydantic.Field(exclude=True) - ] = None - - http_meta24: Annotated[ - Optional[components_httpmetadata.HTTPMetadata], pydantic.Field(exclude=True) - ] = None - errors: Optional[List[str]] = None class StudioAPIError(Exception): - r"""Error""" - data: StudioAPIErrorData def __init__(self, data: StudioAPIErrorData): diff --git a/src/livepeer/models/operations/__init__.py b/src/livepeer/models/operations/__init__.py index 6a7c8da..1f2c2f3 100644 --- a/src/livepeer/models/operations/__init__.py +++ b/src/livepeer/models/operations/__init__.py @@ -76,6 +76,7 @@ from .genaudiototext import GenAudioToTextResponse, GenAudioToTextResponseTypedDict from .genimagetoimage import GenImageToImageResponse, GenImageToImageResponseTypedDict from .genimagetovideo import GenImageToVideoResponse, GenImageToVideoResponseTypedDict +from .genllm import GenLLMResponse, GenLLMResponseTypedDict from .gensegmentanything2 import ( GenSegmentAnything2Response, GenSegmentAnything2ResponseTypedDict, @@ -394,6 +395,8 @@ "GenImageToImageResponseTypedDict", "GenImageToVideoResponse", "GenImageToVideoResponseTypedDict", + "GenLLMResponse", + "GenLLMResponseTypedDict", "GenSegmentAnything2Response", "GenSegmentAnything2ResponseTypedDict", "GenTextToImageResponse", diff --git a/src/livepeer/models/operations/addmultistreamtarget.py b/src/livepeer/models/operations/addmultistreamtarget.py index fc35651..124480e 100644 --- a/src/livepeer/models/operations/addmultistreamtarget.py +++ b/src/livepeer/models/operations/addmultistreamtarget.py @@ -2,15 +2,15 @@ from __future__ import annotations from livepeer.models.components import ( + error as components_error, httpmetadata as components_httpmetadata, target_add_payload as components_target_add_payload, ) -from livepeer.models.errors import error as errors_error from livepeer.types import BaseModel from livepeer.utils import FieldMetadata, PathParamMetadata, RequestMetadata import pydantic -from typing import Optional, TypedDict -from typing_extensions import Annotated, NotRequired +from typing import Optional +from typing_extensions import Annotated, NotRequired, TypedDict class AddMultistreamTargetRequestTypedDict(TypedDict): @@ -33,7 +33,7 @@ class AddMultistreamTargetRequest(BaseModel): class AddMultistreamTargetResponseTypedDict(TypedDict): http_meta: components_httpmetadata.HTTPMetadataTypedDict - error: NotRequired[errors_error.Error] + error: NotRequired[components_error.ErrorTypedDict] r"""Error""" @@ -42,5 +42,5 @@ class AddMultistreamTargetResponse(BaseModel): Optional[components_httpmetadata.HTTPMetadata], pydantic.Field(exclude=True) ] = None - error: Optional[errors_error.Error] = None + error: Optional[components_error.Error] = None r"""Error""" diff --git a/src/livepeer/models/operations/createclip.py b/src/livepeer/models/operations/createclip.py index 8989800..95ffe2a 100644 --- a/src/livepeer/models/operations/createclip.py +++ b/src/livepeer/models/operations/createclip.py @@ -3,13 +3,13 @@ from __future__ import annotations from livepeer.models.components import ( asset as components_asset, + error as components_error, httpmetadata as components_httpmetadata, ) -from livepeer.models.errors import error as errors_error from livepeer.types import BaseModel import pydantic -from typing import Optional, TypedDict -from typing_extensions import Annotated, NotRequired +from typing import Optional +from typing_extensions import Annotated, NotRequired, TypedDict class CreateClipTaskTypedDict(TypedDict): @@ -39,7 +39,7 @@ class CreateClipResponseTypedDict(TypedDict): http_meta: components_httpmetadata.HTTPMetadataTypedDict data: NotRequired[CreateClipDataTypedDict] r"""Success""" - error: NotRequired[errors_error.Error] + error: NotRequired[components_error.ErrorTypedDict] r"""Error""" @@ -51,5 +51,5 @@ class CreateClipResponse(BaseModel): data: Optional[CreateClipData] = None r"""Success""" - error: Optional[errors_error.Error] = None + error: Optional[components_error.Error] = None r"""Error""" diff --git a/src/livepeer/models/operations/createmultistreamtarget.py b/src/livepeer/models/operations/createmultistreamtarget.py index 2a0be18..8f8e5f6 100644 --- a/src/livepeer/models/operations/createmultistreamtarget.py +++ b/src/livepeer/models/operations/createmultistreamtarget.py @@ -2,14 +2,14 @@ from __future__ import annotations from livepeer.models.components import ( + error as components_error, httpmetadata as components_httpmetadata, multistream_target as components_multistream_target, ) -from livepeer.models.errors import error as errors_error from livepeer.types import BaseModel import pydantic -from typing import Optional, TypedDict -from typing_extensions import Annotated, NotRequired +from typing import Optional +from typing_extensions import Annotated, NotRequired, TypedDict class CreateMultistreamTargetResponseTypedDict(TypedDict): @@ -18,7 +18,7 @@ class CreateMultistreamTargetResponseTypedDict(TypedDict): components_multistream_target.MultistreamTargetTypedDict ] r"""Success""" - error: NotRequired[errors_error.Error] + error: NotRequired[components_error.ErrorTypedDict] r"""Error""" @@ -30,5 +30,5 @@ class CreateMultistreamTargetResponse(BaseModel): multistream_target: Optional[components_multistream_target.MultistreamTarget] = None r"""Success""" - error: Optional[errors_error.Error] = None + error: Optional[components_error.Error] = None r"""Error""" diff --git a/src/livepeer/models/operations/createroom.py b/src/livepeer/models/operations/createroom.py index 5c7e595..c60619f 100644 --- a/src/livepeer/models/operations/createroom.py +++ b/src/livepeer/models/operations/createroom.py @@ -3,13 +3,13 @@ from __future__ import annotations from livepeer.models.components import ( create_room_response as components_create_room_response, + error as components_error, httpmetadata as components_httpmetadata, ) -from livepeer.models.errors import error as errors_error from livepeer.types import BaseModel import pydantic -from typing import Optional, TypedDict -from typing_extensions import Annotated, NotRequired +from typing import Optional +from typing_extensions import Annotated, NotRequired, TypedDict class CreateRoomResponseTypedDict(TypedDict): @@ -18,7 +18,7 @@ class CreateRoomResponseTypedDict(TypedDict): components_create_room_response.CreateRoomResponseTypedDict ] r"""Success""" - error: NotRequired[errors_error.Error] + error: NotRequired[components_error.ErrorTypedDict] r"""Error""" @@ -32,5 +32,5 @@ class CreateRoomResponse(BaseModel): ] = None r"""Success""" - error: Optional[errors_error.Error] = None + error: Optional[components_error.Error] = None r"""Error""" diff --git a/src/livepeer/models/operations/createroomuser.py b/src/livepeer/models/operations/createroomuser.py index e38329f..47d151e 100644 --- a/src/livepeer/models/operations/createroomuser.py +++ b/src/livepeer/models/operations/createroomuser.py @@ -2,16 +2,16 @@ from __future__ import annotations from livepeer.models.components import ( + error as components_error, httpmetadata as components_httpmetadata, room_user_payload as components_room_user_payload, room_user_response as components_room_user_response, ) -from livepeer.models.errors import error as errors_error from livepeer.types import BaseModel from livepeer.utils import FieldMetadata, PathParamMetadata, RequestMetadata import pydantic -from typing import Optional, TypedDict -from typing_extensions import Annotated, NotRequired +from typing import Optional +from typing_extensions import Annotated, NotRequired, TypedDict class CreateRoomUserRequestTypedDict(TypedDict): @@ -36,7 +36,7 @@ class CreateRoomUserResponseTypedDict(TypedDict): components_room_user_response.RoomUserResponseTypedDict ] r"""Success""" - error: NotRequired[errors_error.Error] + error: NotRequired[components_error.ErrorTypedDict] r"""Error""" @@ -48,5 +48,5 @@ class CreateRoomUserResponse(BaseModel): room_user_response: Optional[components_room_user_response.RoomUserResponse] = None r"""Success""" - error: Optional[errors_error.Error] = None + error: Optional[components_error.Error] = None r"""Error""" diff --git a/src/livepeer/models/operations/createsigningkey.py b/src/livepeer/models/operations/createsigningkey.py index bee649a..8929cc1 100644 --- a/src/livepeer/models/operations/createsigningkey.py +++ b/src/livepeer/models/operations/createsigningkey.py @@ -2,21 +2,21 @@ from __future__ import annotations from livepeer.models.components import ( + error as components_error, httpmetadata as components_httpmetadata, signing_key as components_signing_key, ) -from livepeer.models.errors import error as errors_error from livepeer.types import BaseModel import pydantic -from typing import Optional, TypedDict -from typing_extensions import Annotated, NotRequired +from typing import Optional +from typing_extensions import Annotated, NotRequired, TypedDict class CreateSigningKeyResponseTypedDict(TypedDict): http_meta: components_httpmetadata.HTTPMetadataTypedDict signing_key: NotRequired[components_signing_key.SigningKeyTypedDict] r"""Success""" - error: NotRequired[errors_error.Error] + error: NotRequired[components_error.ErrorTypedDict] r"""Error""" @@ -28,5 +28,5 @@ class CreateSigningKeyResponse(BaseModel): signing_key: Optional[components_signing_key.SigningKey] = None r"""Success""" - error: Optional[errors_error.Error] = None + error: Optional[components_error.Error] = None r"""Error""" diff --git a/src/livepeer/models/operations/createstream.py b/src/livepeer/models/operations/createstream.py index 41cf22c..7dcc8b5 100644 --- a/src/livepeer/models/operations/createstream.py +++ b/src/livepeer/models/operations/createstream.py @@ -2,21 +2,21 @@ from __future__ import annotations from livepeer.models.components import ( + error as components_error, httpmetadata as components_httpmetadata, stream as components_stream, ) -from livepeer.models.errors import error as errors_error from livepeer.types import BaseModel import pydantic -from typing import Optional, TypedDict -from typing_extensions import Annotated, NotRequired +from typing import Optional +from typing_extensions import Annotated, NotRequired, TypedDict class CreateStreamResponseTypedDict(TypedDict): http_meta: components_httpmetadata.HTTPMetadataTypedDict stream: NotRequired[components_stream.StreamTypedDict] r"""Success""" - error: NotRequired[errors_error.Error] + error: NotRequired[components_error.ErrorTypedDict] r"""Error""" @@ -28,5 +28,5 @@ class CreateStreamResponse(BaseModel): stream: Optional[components_stream.Stream] = None r"""Success""" - error: Optional[errors_error.Error] = None + error: Optional[components_error.Error] = None r"""Error""" diff --git a/src/livepeer/models/operations/createwebhook.py b/src/livepeer/models/operations/createwebhook.py index d6f2586..365506d 100644 --- a/src/livepeer/models/operations/createwebhook.py +++ b/src/livepeer/models/operations/createwebhook.py @@ -2,21 +2,21 @@ from __future__ import annotations from livepeer.models.components import ( + error as components_error, httpmetadata as components_httpmetadata, webhook as components_webhook, ) -from livepeer.models.errors import error as errors_error from livepeer.types import BaseModel import pydantic -from typing import Optional, TypedDict -from typing_extensions import Annotated, NotRequired +from typing import Optional +from typing_extensions import Annotated, NotRequired, TypedDict class CreateWebhookResponseTypedDict(TypedDict): http_meta: components_httpmetadata.HTTPMetadataTypedDict webhook: NotRequired[components_webhook.WebhookTypedDict] r"""Success""" - error: NotRequired[errors_error.Error] + error: NotRequired[components_error.ErrorTypedDict] r"""Error""" @@ -28,5 +28,5 @@ class CreateWebhookResponse(BaseModel): webhook: Optional[components_webhook.Webhook] = None r"""Success""" - error: Optional[errors_error.Error] = None + error: Optional[components_error.Error] = None r"""Error""" diff --git a/src/livepeer/models/operations/deleteasset.py b/src/livepeer/models/operations/deleteasset.py index c9f2480..f38c7df 100644 --- a/src/livepeer/models/operations/deleteasset.py +++ b/src/livepeer/models/operations/deleteasset.py @@ -1,13 +1,15 @@ """Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.""" from __future__ import annotations -from livepeer.models.components import httpmetadata as components_httpmetadata -from livepeer.models.errors import error as errors_error +from livepeer.models.components import ( + error as components_error, + httpmetadata as components_httpmetadata, +) from livepeer.types import BaseModel from livepeer.utils import FieldMetadata, PathParamMetadata import pydantic -from typing import Optional, TypedDict -from typing_extensions import Annotated, NotRequired +from typing import Optional +from typing_extensions import Annotated, NotRequired, TypedDict class DeleteAssetRequestTypedDict(TypedDict): @@ -26,7 +28,7 @@ class DeleteAssetRequest(BaseModel): class DeleteAssetResponseTypedDict(TypedDict): http_meta: components_httpmetadata.HTTPMetadataTypedDict - error: NotRequired[errors_error.Error] + error: NotRequired[components_error.ErrorTypedDict] r"""Error""" @@ -35,5 +37,5 @@ class DeleteAssetResponse(BaseModel): Optional[components_httpmetadata.HTTPMetadata], pydantic.Field(exclude=True) ] = None - error: Optional[errors_error.Error] = None + error: Optional[components_error.Error] = None r"""Error""" diff --git a/src/livepeer/models/operations/deletemultistreamtarget.py b/src/livepeer/models/operations/deletemultistreamtarget.py index 396b3de..0ad9977 100644 --- a/src/livepeer/models/operations/deletemultistreamtarget.py +++ b/src/livepeer/models/operations/deletemultistreamtarget.py @@ -1,13 +1,15 @@ """Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.""" from __future__ import annotations -from livepeer.models.components import httpmetadata as components_httpmetadata -from livepeer.models.errors import error as errors_error +from livepeer.models.components import ( + error as components_error, + httpmetadata as components_httpmetadata, +) from livepeer.types import BaseModel from livepeer.utils import FieldMetadata, PathParamMetadata import pydantic -from typing import Optional, TypedDict -from typing_extensions import Annotated, NotRequired +from typing import Optional +from typing_extensions import Annotated, NotRequired, TypedDict class DeleteMultistreamTargetRequestTypedDict(TypedDict): @@ -24,7 +26,7 @@ class DeleteMultistreamTargetRequest(BaseModel): class DeleteMultistreamTargetResponseTypedDict(TypedDict): http_meta: components_httpmetadata.HTTPMetadataTypedDict - error: NotRequired[errors_error.Error] + error: NotRequired[components_error.ErrorTypedDict] r"""Error""" @@ -33,5 +35,5 @@ class DeleteMultistreamTargetResponse(BaseModel): Optional[components_httpmetadata.HTTPMetadata], pydantic.Field(exclude=True) ] = None - error: Optional[errors_error.Error] = None + error: Optional[components_error.Error] = None r"""Error""" diff --git a/src/livepeer/models/operations/deleteroom.py b/src/livepeer/models/operations/deleteroom.py index 1a3134c..525fa07 100644 --- a/src/livepeer/models/operations/deleteroom.py +++ b/src/livepeer/models/operations/deleteroom.py @@ -1,13 +1,15 @@ """Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.""" from __future__ import annotations -from livepeer.models.components import httpmetadata as components_httpmetadata -from livepeer.models.errors import error as errors_error +from livepeer.models.components import ( + error as components_error, + httpmetadata as components_httpmetadata, +) from livepeer.types import BaseModel from livepeer.utils import FieldMetadata, PathParamMetadata import pydantic -from typing import Optional, TypedDict -from typing_extensions import Annotated, NotRequired +from typing import Optional +from typing_extensions import Annotated, NotRequired, TypedDict class DeleteRoomRequestTypedDict(TypedDict): @@ -22,7 +24,7 @@ class DeleteRoomRequest(BaseModel): class DeleteRoomResponseTypedDict(TypedDict): http_meta: components_httpmetadata.HTTPMetadataTypedDict - error: NotRequired[errors_error.Error] + error: NotRequired[components_error.ErrorTypedDict] r"""Error""" @@ -31,5 +33,5 @@ class DeleteRoomResponse(BaseModel): Optional[components_httpmetadata.HTTPMetadata], pydantic.Field(exclude=True) ] = None - error: Optional[errors_error.Error] = None + error: Optional[components_error.Error] = None r"""Error""" diff --git a/src/livepeer/models/operations/deleteroomuser.py b/src/livepeer/models/operations/deleteroomuser.py index 47ddd58..e181942 100644 --- a/src/livepeer/models/operations/deleteroomuser.py +++ b/src/livepeer/models/operations/deleteroomuser.py @@ -1,13 +1,15 @@ """Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.""" from __future__ import annotations -from livepeer.models.components import httpmetadata as components_httpmetadata -from livepeer.models.errors import error as errors_error +from livepeer.models.components import ( + error as components_error, + httpmetadata as components_httpmetadata, +) from livepeer.types import BaseModel from livepeer.utils import FieldMetadata, PathParamMetadata import pydantic -from typing import Optional, TypedDict -from typing_extensions import Annotated, NotRequired +from typing import Optional +from typing_extensions import Annotated, NotRequired, TypedDict class DeleteRoomUserRequestTypedDict(TypedDict): @@ -29,7 +31,7 @@ class DeleteRoomUserRequest(BaseModel): class DeleteRoomUserResponseTypedDict(TypedDict): http_meta: components_httpmetadata.HTTPMetadataTypedDict - error: NotRequired[errors_error.Error] + error: NotRequired[components_error.ErrorTypedDict] r"""Error""" @@ -38,5 +40,5 @@ class DeleteRoomUserResponse(BaseModel): Optional[components_httpmetadata.HTTPMetadata], pydantic.Field(exclude=True) ] = None - error: Optional[errors_error.Error] = None + error: Optional[components_error.Error] = None r"""Error""" diff --git a/src/livepeer/models/operations/deletesigningkey.py b/src/livepeer/models/operations/deletesigningkey.py index d64fb3c..25aa7cf 100644 --- a/src/livepeer/models/operations/deletesigningkey.py +++ b/src/livepeer/models/operations/deletesigningkey.py @@ -1,13 +1,15 @@ """Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.""" from __future__ import annotations -from livepeer.models.components import httpmetadata as components_httpmetadata -from livepeer.models.errors import error as errors_error +from livepeer.models.components import ( + error as components_error, + httpmetadata as components_httpmetadata, +) from livepeer.types import BaseModel from livepeer.utils import FieldMetadata, PathParamMetadata import pydantic -from typing import Optional, TypedDict -from typing_extensions import Annotated, NotRequired +from typing import Optional +from typing_extensions import Annotated, NotRequired, TypedDict class DeleteSigningKeyRequestTypedDict(TypedDict): @@ -26,7 +28,7 @@ class DeleteSigningKeyRequest(BaseModel): class DeleteSigningKeyResponseTypedDict(TypedDict): http_meta: components_httpmetadata.HTTPMetadataTypedDict - error: NotRequired[errors_error.Error] + error: NotRequired[components_error.ErrorTypedDict] r"""Error""" @@ -35,5 +37,5 @@ class DeleteSigningKeyResponse(BaseModel): Optional[components_httpmetadata.HTTPMetadata], pydantic.Field(exclude=True) ] = None - error: Optional[errors_error.Error] = None + error: Optional[components_error.Error] = None r"""Error""" diff --git a/src/livepeer/models/operations/deletestream.py b/src/livepeer/models/operations/deletestream.py index fab2c83..cdfa5de 100644 --- a/src/livepeer/models/operations/deletestream.py +++ b/src/livepeer/models/operations/deletestream.py @@ -1,13 +1,15 @@ """Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.""" from __future__ import annotations -from livepeer.models.components import httpmetadata as components_httpmetadata -from livepeer.models.errors import error as errors_error +from livepeer.models.components import ( + error as components_error, + httpmetadata as components_httpmetadata, +) from livepeer.types import BaseModel from livepeer.utils import FieldMetadata, PathParamMetadata import pydantic -from typing import Optional, TypedDict -from typing_extensions import Annotated, NotRequired +from typing import Optional +from typing_extensions import Annotated, NotRequired, TypedDict class DeleteStreamRequestTypedDict(TypedDict): @@ -24,7 +26,7 @@ class DeleteStreamRequest(BaseModel): class DeleteStreamResponseTypedDict(TypedDict): http_meta: components_httpmetadata.HTTPMetadataTypedDict - error: NotRequired[errors_error.Error] + error: NotRequired[components_error.ErrorTypedDict] r"""Error""" @@ -33,5 +35,5 @@ class DeleteStreamResponse(BaseModel): Optional[components_httpmetadata.HTTPMetadata], pydantic.Field(exclude=True) ] = None - error: Optional[errors_error.Error] = None + error: Optional[components_error.Error] = None r"""Error""" diff --git a/src/livepeer/models/operations/deletewebhook.py b/src/livepeer/models/operations/deletewebhook.py index fba91e2..aadfc0d 100644 --- a/src/livepeer/models/operations/deletewebhook.py +++ b/src/livepeer/models/operations/deletewebhook.py @@ -2,15 +2,15 @@ from __future__ import annotations from livepeer.models.components import ( + error as components_error, httpmetadata as components_httpmetadata, webhook as components_webhook, ) -from livepeer.models.errors import error as errors_error from livepeer.types import BaseModel from livepeer.utils import FieldMetadata, PathParamMetadata import pydantic -from typing import Optional, TypedDict -from typing_extensions import Annotated, NotRequired +from typing import Optional +from typing_extensions import Annotated, NotRequired, TypedDict class DeleteWebhookRequestTypedDict(TypedDict): @@ -27,7 +27,7 @@ class DeleteWebhookResponseTypedDict(TypedDict): http_meta: components_httpmetadata.HTTPMetadataTypedDict webhook: NotRequired[components_webhook.WebhookTypedDict] r"""Success""" - error: NotRequired[errors_error.Error] + error: NotRequired[components_error.ErrorTypedDict] r"""Error""" @@ -39,5 +39,5 @@ class DeleteWebhookResponse(BaseModel): webhook: Optional[components_webhook.Webhook] = None r"""Success""" - error: Optional[errors_error.Error] = None + error: Optional[components_error.Error] = None r"""Error""" diff --git a/src/livepeer/models/operations/genaudiototext.py b/src/livepeer/models/operations/genaudiototext.py index 8fbeab6..e339a3e 100644 --- a/src/livepeer/models/operations/genaudiototext.py +++ b/src/livepeer/models/operations/genaudiototext.py @@ -8,8 +8,8 @@ from livepeer.models.errors import studio_api_error as errors_studio_api_error from livepeer.types import BaseModel import pydantic -from typing import Optional, TypedDict -from typing_extensions import Annotated, NotRequired +from typing import Optional +from typing_extensions import Annotated, NotRequired, TypedDict class GenAudioToTextResponseTypedDict(TypedDict): diff --git a/src/livepeer/models/operations/genimagetoimage.py b/src/livepeer/models/operations/genimagetoimage.py index b70cc0e..c7edba5 100644 --- a/src/livepeer/models/operations/genimagetoimage.py +++ b/src/livepeer/models/operations/genimagetoimage.py @@ -8,8 +8,8 @@ from livepeer.models.errors import studio_api_error as errors_studio_api_error from livepeer.types import BaseModel import pydantic -from typing import Optional, TypedDict -from typing_extensions import Annotated, NotRequired +from typing import Optional +from typing_extensions import Annotated, NotRequired, TypedDict class GenImageToImageResponseTypedDict(TypedDict): diff --git a/src/livepeer/models/operations/genimagetovideo.py b/src/livepeer/models/operations/genimagetovideo.py index 7b3e8bd..2fb809f 100644 --- a/src/livepeer/models/operations/genimagetovideo.py +++ b/src/livepeer/models/operations/genimagetovideo.py @@ -8,8 +8,8 @@ from livepeer.models.errors import studio_api_error as errors_studio_api_error from livepeer.types import BaseModel import pydantic -from typing import Optional, TypedDict -from typing_extensions import Annotated, NotRequired +from typing import Optional +from typing_extensions import Annotated, NotRequired, TypedDict class GenImageToVideoResponseTypedDict(TypedDict): diff --git a/src/livepeer/models/operations/genllm.py b/src/livepeer/models/operations/genllm.py new file mode 100644 index 0000000..8e84dd0 --- /dev/null +++ b/src/livepeer/models/operations/genllm.py @@ -0,0 +1,32 @@ +"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.""" + +from __future__ import annotations +from livepeer.models.components import ( + httpmetadata as components_httpmetadata, + llmresponse as components_llmresponse, +) +from livepeer.models.errors import studio_api_error as errors_studio_api_error +from livepeer.types import BaseModel +import pydantic +from typing import Optional +from typing_extensions import Annotated, NotRequired, TypedDict + + +class GenLLMResponseTypedDict(TypedDict): + http_meta: components_httpmetadata.HTTPMetadataTypedDict + llm_response: NotRequired[components_llmresponse.LLMResponseTypedDict] + r"""Successful Response""" + studio_api_error: NotRequired[errors_studio_api_error.StudioAPIError] + r"""Error""" + + +class GenLLMResponse(BaseModel): + http_meta: Annotated[ + Optional[components_httpmetadata.HTTPMetadata], pydantic.Field(exclude=True) + ] = None + + llm_response: Optional[components_llmresponse.LLMResponse] = None + r"""Successful Response""" + + studio_api_error: Optional[errors_studio_api_error.StudioAPIError] = None + r"""Error""" diff --git a/src/livepeer/models/operations/gensegmentanything2.py b/src/livepeer/models/operations/gensegmentanything2.py index d2eb36d..6770784 100644 --- a/src/livepeer/models/operations/gensegmentanything2.py +++ b/src/livepeer/models/operations/gensegmentanything2.py @@ -8,8 +8,8 @@ from livepeer.models.errors import studio_api_error as errors_studio_api_error from livepeer.types import BaseModel import pydantic -from typing import Optional, TypedDict -from typing_extensions import Annotated, NotRequired +from typing import Optional +from typing_extensions import Annotated, NotRequired, TypedDict class GenSegmentAnything2ResponseTypedDict(TypedDict): diff --git a/src/livepeer/models/operations/gentexttoimage.py b/src/livepeer/models/operations/gentexttoimage.py index a9d3376..a5b1ae2 100644 --- a/src/livepeer/models/operations/gentexttoimage.py +++ b/src/livepeer/models/operations/gentexttoimage.py @@ -4,19 +4,19 @@ from livepeer.models.components import ( httpmetadata as components_httpmetadata, imageresponse as components_imageresponse, + studio_api_error as components_studio_api_error, ) -from livepeer.models.errors import studio_api_error as errors_studio_api_error from livepeer.types import BaseModel import pydantic -from typing import Optional, TypedDict -from typing_extensions import Annotated, NotRequired +from typing import Optional +from typing_extensions import Annotated, NotRequired, TypedDict class GenTextToImageResponseTypedDict(TypedDict): http_meta: components_httpmetadata.HTTPMetadataTypedDict image_response: NotRequired[components_imageresponse.ImageResponseTypedDict] r"""Successful Response""" - studio_api_error: NotRequired[errors_studio_api_error.StudioAPIError] + studio_api_error: NotRequired[components_studio_api_error.StudioAPIErrorTypedDict] r"""Error""" @@ -28,5 +28,5 @@ class GenTextToImageResponse(BaseModel): image_response: Optional[components_imageresponse.ImageResponse] = None r"""Successful Response""" - studio_api_error: Optional[errors_studio_api_error.StudioAPIError] = None + studio_api_error: Optional[components_studio_api_error.StudioAPIError] = None r"""Error""" diff --git a/src/livepeer/models/operations/genupscale.py b/src/livepeer/models/operations/genupscale.py index 30252fd..2a68722 100644 --- a/src/livepeer/models/operations/genupscale.py +++ b/src/livepeer/models/operations/genupscale.py @@ -8,8 +8,8 @@ from livepeer.models.errors import studio_api_error as errors_studio_api_error from livepeer.types import BaseModel import pydantic -from typing import Optional, TypedDict -from typing_extensions import Annotated, NotRequired +from typing import Optional +from typing_extensions import Annotated, NotRequired, TypedDict class GenUpscaleResponseTypedDict(TypedDict): diff --git a/src/livepeer/models/operations/getasset.py b/src/livepeer/models/operations/getasset.py index dcdedc7..28e3caa 100644 --- a/src/livepeer/models/operations/getasset.py +++ b/src/livepeer/models/operations/getasset.py @@ -3,14 +3,14 @@ from __future__ import annotations from livepeer.models.components import ( asset as components_asset, + error as components_error, httpmetadata as components_httpmetadata, ) -from livepeer.models.errors import error as errors_error from livepeer.types import BaseModel from livepeer.utils import FieldMetadata, PathParamMetadata import pydantic -from typing import Optional, TypedDict -from typing_extensions import Annotated, NotRequired +from typing import Optional +from typing_extensions import Annotated, NotRequired, TypedDict class GetAssetRequestTypedDict(TypedDict): @@ -31,7 +31,7 @@ class GetAssetResponseTypedDict(TypedDict): http_meta: components_httpmetadata.HTTPMetadataTypedDict asset: NotRequired[components_asset.AssetTypedDict] r"""Success""" - error: NotRequired[errors_error.Error] + error: NotRequired[components_error.ErrorTypedDict] r"""Error""" @@ -43,5 +43,5 @@ class GetAssetResponse(BaseModel): asset: Optional[components_asset.Asset] = None r"""Success""" - error: Optional[errors_error.Error] = None + error: Optional[components_error.Error] = None r"""Error""" diff --git a/src/livepeer/models/operations/getassets.py b/src/livepeer/models/operations/getassets.py index ce9be55..9f2a63b 100644 --- a/src/livepeer/models/operations/getassets.py +++ b/src/livepeer/models/operations/getassets.py @@ -3,20 +3,20 @@ from __future__ import annotations from livepeer.models.components import ( asset as components_asset, + error as components_error, httpmetadata as components_httpmetadata, ) -from livepeer.models.errors import error as errors_error from livepeer.types import BaseModel import pydantic -from typing import List, Optional, TypedDict -from typing_extensions import Annotated, NotRequired +from typing import List, Optional +from typing_extensions import Annotated, NotRequired, TypedDict class GetAssetsResponseTypedDict(TypedDict): http_meta: components_httpmetadata.HTTPMetadataTypedDict data: NotRequired[List[components_asset.AssetTypedDict]] r"""Success""" - error: NotRequired[errors_error.Error] + error: NotRequired[components_error.ErrorTypedDict] r"""Error""" @@ -28,5 +28,5 @@ class GetAssetsResponse(BaseModel): data: Optional[List[components_asset.Asset]] = None r"""Success""" - error: Optional[errors_error.Error] = None + error: Optional[components_error.Error] = None r"""Error""" diff --git a/src/livepeer/models/operations/getclips.py b/src/livepeer/models/operations/getclips.py index cbeb34f..00697c0 100644 --- a/src/livepeer/models/operations/getclips.py +++ b/src/livepeer/models/operations/getclips.py @@ -3,14 +3,14 @@ from __future__ import annotations from livepeer.models.components import ( asset as components_asset, + error as components_error, httpmetadata as components_httpmetadata, ) -from livepeer.models.errors import error as errors_error from livepeer.types import BaseModel from livepeer.utils import FieldMetadata, PathParamMetadata import pydantic -from typing import List, Optional, TypedDict -from typing_extensions import Annotated, NotRequired +from typing import List, Optional +from typing_extensions import Annotated, NotRequired, TypedDict class GetClipsRequestTypedDict(TypedDict): @@ -29,7 +29,7 @@ class GetClipsResponseTypedDict(TypedDict): http_meta: components_httpmetadata.HTTPMetadataTypedDict data: NotRequired[List[components_asset.AssetTypedDict]] r"""Success""" - error: NotRequired[errors_error.Error] + error: NotRequired[components_error.ErrorTypedDict] r"""Error""" @@ -41,5 +41,5 @@ class GetClipsResponse(BaseModel): data: Optional[List[components_asset.Asset]] = None r"""Success""" - error: Optional[errors_error.Error] = None + error: Optional[components_error.Error] = None r"""Error""" diff --git a/src/livepeer/models/operations/getcreatorviewershipmetrics.py b/src/livepeer/models/operations/getcreatorviewershipmetrics.py index 4900288..a2d24db 100644 --- a/src/livepeer/models/operations/getcreatorviewershipmetrics.py +++ b/src/livepeer/models/operations/getcreatorviewershipmetrics.py @@ -4,30 +4,30 @@ from datetime import datetime from enum import Enum from livepeer.models.components import ( + error as components_error, httpmetadata as components_httpmetadata, viewership_metric as components_viewership_metric, ) -from livepeer.models.errors import error as errors_error from livepeer.types import BaseModel from livepeer.utils import FieldMetadata, QueryParamMetadata import pydantic -from typing import List, Optional, TypedDict, Union -from typing_extensions import Annotated, NotRequired +from typing import List, Optional, Union +from typing_extensions import Annotated, NotRequired, TypeAliasType, TypedDict -QueryParamFromTypedDict = Union[datetime, int] +QueryParamFromTypedDict = TypeAliasType("QueryParamFromTypedDict", Union[datetime, int]) r"""Start timestamp for the query range (inclusive)""" -QueryParamFrom = Union[datetime, int] +QueryParamFrom = TypeAliasType("QueryParamFrom", Union[datetime, int]) r"""Start timestamp for the query range (inclusive)""" -QueryParamToTypedDict = Union[datetime, int] +QueryParamToTypedDict = TypeAliasType("QueryParamToTypedDict", Union[datetime, int]) r"""End timestamp for the query range (exclusive)""" -QueryParamTo = Union[datetime, int] +QueryParamTo = TypeAliasType("QueryParamTo", Union[datetime, int]) r"""End timestamp for the query range (exclusive)""" @@ -132,7 +132,7 @@ class GetCreatorViewershipMetricsResponseTypedDict(TypedDict): http_meta: components_httpmetadata.HTTPMetadataTypedDict data: NotRequired[List[components_viewership_metric.ViewershipMetricTypedDict]] r"""A list of Metric objects""" - error: NotRequired[errors_error.Error] + error: NotRequired[components_error.ErrorTypedDict] r"""Error""" @@ -144,5 +144,5 @@ class GetCreatorViewershipMetricsResponse(BaseModel): data: Optional[List[components_viewership_metric.ViewershipMetric]] = None r"""A list of Metric objects""" - error: Optional[errors_error.Error] = None + error: Optional[components_error.Error] = None r"""Error""" diff --git a/src/livepeer/models/operations/getmultistreamtarget.py b/src/livepeer/models/operations/getmultistreamtarget.py index 4e09a82..759b56f 100644 --- a/src/livepeer/models/operations/getmultistreamtarget.py +++ b/src/livepeer/models/operations/getmultistreamtarget.py @@ -2,15 +2,15 @@ from __future__ import annotations from livepeer.models.components import ( + error as components_error, httpmetadata as components_httpmetadata, multistream_target as components_multistream_target, ) -from livepeer.models.errors import error as errors_error from livepeer.types import BaseModel from livepeer.utils import FieldMetadata, PathParamMetadata import pydantic -from typing import Optional, TypedDict -from typing_extensions import Annotated, NotRequired +from typing import Optional +from typing_extensions import Annotated, NotRequired, TypedDict class GetMultistreamTargetRequestTypedDict(TypedDict): @@ -31,7 +31,7 @@ class GetMultistreamTargetResponseTypedDict(TypedDict): components_multistream_target.MultistreamTargetTypedDict ] r"""Success""" - error: NotRequired[errors_error.Error] + error: NotRequired[components_error.ErrorTypedDict] r"""Error""" @@ -43,5 +43,5 @@ class GetMultistreamTargetResponse(BaseModel): multistream_target: Optional[components_multistream_target.MultistreamTarget] = None r"""Success""" - error: Optional[errors_error.Error] = None + error: Optional[components_error.Error] = None r"""Error""" diff --git a/src/livepeer/models/operations/getmultistreamtargets.py b/src/livepeer/models/operations/getmultistreamtargets.py index 6686848..353a40a 100644 --- a/src/livepeer/models/operations/getmultistreamtargets.py +++ b/src/livepeer/models/operations/getmultistreamtargets.py @@ -2,21 +2,21 @@ from __future__ import annotations from livepeer.models.components import ( + error as components_error, httpmetadata as components_httpmetadata, multistream_target as components_multistream_target, ) -from livepeer.models.errors import error as errors_error from livepeer.types import BaseModel import pydantic -from typing import List, Optional, TypedDict -from typing_extensions import Annotated, NotRequired +from typing import List, Optional +from typing_extensions import Annotated, NotRequired, TypedDict class GetMultistreamTargetsResponseTypedDict(TypedDict): http_meta: components_httpmetadata.HTTPMetadataTypedDict data: NotRequired[List[components_multistream_target.MultistreamTargetTypedDict]] r"""Success""" - error: NotRequired[errors_error.Error] + error: NotRequired[components_error.ErrorTypedDict] r"""Error""" @@ -28,5 +28,5 @@ class GetMultistreamTargetsResponse(BaseModel): data: Optional[List[components_multistream_target.MultistreamTarget]] = None r"""Success""" - error: Optional[errors_error.Error] = None + error: Optional[components_error.Error] = None r"""Error""" diff --git a/src/livepeer/models/operations/getplaybackinfo.py b/src/livepeer/models/operations/getplaybackinfo.py index 357ce8b..967af0d 100644 --- a/src/livepeer/models/operations/getplaybackinfo.py +++ b/src/livepeer/models/operations/getplaybackinfo.py @@ -2,15 +2,15 @@ from __future__ import annotations from livepeer.models.components import ( + error as components_error, httpmetadata as components_httpmetadata, playback_info as components_playback_info, ) -from livepeer.models.errors import error as errors_error from livepeer.types import BaseModel from livepeer.utils import FieldMetadata, PathParamMetadata import pydantic -from typing import Optional, TypedDict -from typing_extensions import Annotated, NotRequired +from typing import Optional +from typing_extensions import Annotated, NotRequired, TypedDict class GetPlaybackInfoRequestTypedDict(TypedDict): @@ -29,7 +29,7 @@ class GetPlaybackInfoResponseTypedDict(TypedDict): http_meta: components_httpmetadata.HTTPMetadataTypedDict playback_info: NotRequired[components_playback_info.PlaybackInfoTypedDict] r"""Successful response""" - error: NotRequired[errors_error.Error] + error: NotRequired[components_error.ErrorTypedDict] r"""Playback not found""" @@ -41,5 +41,5 @@ class GetPlaybackInfoResponse(BaseModel): playback_info: Optional[components_playback_info.PlaybackInfo] = None r"""Successful response""" - error: Optional[errors_error.Error] = None + error: Optional[components_error.Error] = None r"""Playback not found""" diff --git a/src/livepeer/models/operations/getpublicviewershipmetrics.py b/src/livepeer/models/operations/getpublicviewershipmetrics.py index fbd3975..e076a13 100644 --- a/src/livepeer/models/operations/getpublicviewershipmetrics.py +++ b/src/livepeer/models/operations/getpublicviewershipmetrics.py @@ -1,13 +1,15 @@ """Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.""" from __future__ import annotations -from livepeer.models.components import httpmetadata as components_httpmetadata -from livepeer.models.errors import error as errors_error +from livepeer.models.components import ( + error as components_error, + httpmetadata as components_httpmetadata, +) from livepeer.types import BaseModel from livepeer.utils import FieldMetadata, PathParamMetadata import pydantic -from typing import Optional, TypedDict -from typing_extensions import Annotated, NotRequired +from typing import Optional +from typing_extensions import Annotated, NotRequired, TypedDict class GetPublicViewershipMetricsRequestTypedDict(TypedDict): @@ -73,7 +75,7 @@ class GetPublicViewershipMetricsResponseTypedDict(TypedDict): http_meta: components_httpmetadata.HTTPMetadataTypedDict data: NotRequired[GetPublicViewershipMetricsDataTypedDict] r"""A single Metric object with the viewCount and playtimeMins metrics.""" - error: NotRequired[errors_error.Error] + error: NotRequired[components_error.ErrorTypedDict] r"""Error""" @@ -85,5 +87,5 @@ class GetPublicViewershipMetricsResponse(BaseModel): data: Optional[GetPublicViewershipMetricsData] = None r"""A single Metric object with the viewCount and playtimeMins metrics.""" - error: Optional[errors_error.Error] = None + error: Optional[components_error.Error] = None r"""Error""" diff --git a/src/livepeer/models/operations/getrealtimeviewershipnow.py b/src/livepeer/models/operations/getrealtimeviewershipnow.py index 939d9cd..1c160b7 100644 --- a/src/livepeer/models/operations/getrealtimeviewershipnow.py +++ b/src/livepeer/models/operations/getrealtimeviewershipnow.py @@ -3,15 +3,15 @@ from __future__ import annotations from enum import Enum from livepeer.models.components import ( + error as components_error, httpmetadata as components_httpmetadata, realtime_viewership_metric as components_realtime_viewership_metric, ) -from livepeer.models.errors import error as errors_error from livepeer.types import BaseModel from livepeer.utils import FieldMetadata, QueryParamMetadata import pydantic -from typing import List, Optional, TypedDict -from typing_extensions import Annotated, NotRequired +from typing import List, Optional +from typing_extensions import Annotated, NotRequired, TypedDict class BreakdownBy(str, Enum): @@ -73,7 +73,7 @@ class GetRealtimeViewershipNowResponseTypedDict(TypedDict): List[components_realtime_viewership_metric.RealtimeViewershipMetricTypedDict] ] r"""A list of Metric objects""" - error: NotRequired[errors_error.Error] + error: NotRequired[components_error.ErrorTypedDict] r"""Error""" @@ -87,5 +87,5 @@ class GetRealtimeViewershipNowResponse(BaseModel): ] = None r"""A list of Metric objects""" - error: Optional[errors_error.Error] = None + error: Optional[components_error.Error] = None r"""Error""" diff --git a/src/livepeer/models/operations/getrecordedsessions.py b/src/livepeer/models/operations/getrecordedsessions.py index 039433d..a70f355 100644 --- a/src/livepeer/models/operations/getrecordedsessions.py +++ b/src/livepeer/models/operations/getrecordedsessions.py @@ -2,25 +2,25 @@ from __future__ import annotations from livepeer.models.components import ( + error as components_error, httpmetadata as components_httpmetadata, session as components_session, ) -from livepeer.models.errors import error as errors_error from livepeer.types import BaseModel from livepeer.utils import FieldMetadata, PathParamMetadata, QueryParamMetadata import pydantic -from typing import List, Optional, TypedDict, Union -from typing_extensions import Annotated, NotRequired +from typing import List, Optional, Union +from typing_extensions import Annotated, NotRequired, TypeAliasType, TypedDict -RecordTypedDict = Union[bool, int] +RecordTypedDict = TypeAliasType("RecordTypedDict", Union[bool, int]) r"""Flag indicating if the response should only include recorded sessions """ -Record = Union[bool, int] +Record = TypeAliasType("Record", Union[bool, int]) r"""Flag indicating if the response should only include recorded sessions @@ -59,7 +59,7 @@ class GetRecordedSessionsResponseTypedDict(TypedDict): http_meta: components_httpmetadata.HTTPMetadataTypedDict data: NotRequired[List[components_session.SessionTypedDict]] r"""Success""" - error: NotRequired[errors_error.Error] + error: NotRequired[components_error.ErrorTypedDict] r"""Error""" @@ -71,5 +71,5 @@ class GetRecordedSessionsResponse(BaseModel): data: Optional[List[components_session.Session]] = None r"""Success""" - error: Optional[errors_error.Error] = None + error: Optional[components_error.Error] = None r"""Error""" diff --git a/src/livepeer/models/operations/getroom.py b/src/livepeer/models/operations/getroom.py index d96d5e1..f961f97 100644 --- a/src/livepeer/models/operations/getroom.py +++ b/src/livepeer/models/operations/getroom.py @@ -2,15 +2,15 @@ from __future__ import annotations from livepeer.models.components import ( + error as components_error, httpmetadata as components_httpmetadata, room as components_room, ) -from livepeer.models.errors import error as errors_error from livepeer.types import BaseModel from livepeer.utils import FieldMetadata, PathParamMetadata import pydantic -from typing import Optional, TypedDict -from typing_extensions import Annotated, NotRequired +from typing import Optional +from typing_extensions import Annotated, NotRequired, TypedDict class GetRoomRequestTypedDict(TypedDict): @@ -27,7 +27,7 @@ class GetRoomResponseTypedDict(TypedDict): http_meta: components_httpmetadata.HTTPMetadataTypedDict room: NotRequired[components_room.RoomTypedDict] r"""Success""" - error: NotRequired[errors_error.Error] + error: NotRequired[components_error.ErrorTypedDict] r"""Error""" @@ -39,5 +39,5 @@ class GetRoomResponse(BaseModel): room: Optional[components_room.Room] = None r"""Success""" - error: Optional[errors_error.Error] = None + error: Optional[components_error.Error] = None r"""Error""" diff --git a/src/livepeer/models/operations/getroomuser.py b/src/livepeer/models/operations/getroomuser.py index b558577..047ac0a 100644 --- a/src/livepeer/models/operations/getroomuser.py +++ b/src/livepeer/models/operations/getroomuser.py @@ -2,15 +2,15 @@ from __future__ import annotations from livepeer.models.components import ( + error as components_error, get_room_user_response as components_get_room_user_response, httpmetadata as components_httpmetadata, ) -from livepeer.models.errors import error as errors_error from livepeer.types import BaseModel from livepeer.utils import FieldMetadata, PathParamMetadata import pydantic -from typing import Optional, TypedDict -from typing_extensions import Annotated, NotRequired +from typing import Optional +from typing_extensions import Annotated, NotRequired, TypedDict class GetRoomUserRequestTypedDict(TypedDict): @@ -36,7 +36,7 @@ class GetRoomUserResponseTypedDict(TypedDict): components_get_room_user_response.GetRoomUserResponseTypedDict ] r"""Success""" - error: NotRequired[errors_error.Error] + error: NotRequired[components_error.ErrorTypedDict] r"""Error""" @@ -50,5 +50,5 @@ class GetRoomUserResponse(BaseModel): ] = None r"""Success""" - error: Optional[errors_error.Error] = None + error: Optional[components_error.Error] = None r"""Error""" diff --git a/src/livepeer/models/operations/getsession.py b/src/livepeer/models/operations/getsession.py index 0c51649..a7256dd 100644 --- a/src/livepeer/models/operations/getsession.py +++ b/src/livepeer/models/operations/getsession.py @@ -2,15 +2,15 @@ from __future__ import annotations from livepeer.models.components import ( + error as components_error, httpmetadata as components_httpmetadata, session as components_session, ) -from livepeer.models.errors import error as errors_error from livepeer.types import BaseModel from livepeer.utils import FieldMetadata, PathParamMetadata import pydantic -from typing import Optional, TypedDict -from typing_extensions import Annotated, NotRequired +from typing import Optional +from typing_extensions import Annotated, NotRequired, TypedDict class GetSessionRequestTypedDict(TypedDict): @@ -29,7 +29,7 @@ class GetSessionResponseTypedDict(TypedDict): http_meta: components_httpmetadata.HTTPMetadataTypedDict session: NotRequired[components_session.SessionTypedDict] r"""Success""" - error: NotRequired[errors_error.Error] + error: NotRequired[components_error.ErrorTypedDict] r"""Error""" @@ -41,5 +41,5 @@ class GetSessionResponse(BaseModel): session: Optional[components_session.Session] = None r"""Success""" - error: Optional[errors_error.Error] = None + error: Optional[components_error.Error] = None r"""Error""" diff --git a/src/livepeer/models/operations/getsessionclips.py b/src/livepeer/models/operations/getsessionclips.py index 679032d..576c51b 100644 --- a/src/livepeer/models/operations/getsessionclips.py +++ b/src/livepeer/models/operations/getsessionclips.py @@ -3,14 +3,14 @@ from __future__ import annotations from livepeer.models.components import ( asset as components_asset, + error as components_error, httpmetadata as components_httpmetadata, ) -from livepeer.models.errors import error as errors_error from livepeer.types import BaseModel from livepeer.utils import FieldMetadata, PathParamMetadata import pydantic -from typing import List, Optional, TypedDict -from typing_extensions import Annotated, NotRequired +from typing import List, Optional +from typing_extensions import Annotated, NotRequired, TypedDict class GetSessionClipsRequestTypedDict(TypedDict): @@ -29,7 +29,7 @@ class GetSessionClipsResponseTypedDict(TypedDict): http_meta: components_httpmetadata.HTTPMetadataTypedDict data: NotRequired[List[components_asset.AssetTypedDict]] r"""Success""" - error: NotRequired[errors_error.Error] + error: NotRequired[components_error.ErrorTypedDict] r"""Error""" @@ -41,5 +41,5 @@ class GetSessionClipsResponse(BaseModel): data: Optional[List[components_asset.Asset]] = None r"""Success""" - error: Optional[errors_error.Error] = None + error: Optional[components_error.Error] = None r"""Error""" diff --git a/src/livepeer/models/operations/getsessions.py b/src/livepeer/models/operations/getsessions.py index 43f0dca..cb9d351 100644 --- a/src/livepeer/models/operations/getsessions.py +++ b/src/livepeer/models/operations/getsessions.py @@ -2,21 +2,21 @@ from __future__ import annotations from livepeer.models.components import ( + error as components_error, httpmetadata as components_httpmetadata, session as components_session, ) -from livepeer.models.errors import error as errors_error from livepeer.types import BaseModel import pydantic -from typing import List, Optional, TypedDict -from typing_extensions import Annotated, NotRequired +from typing import List, Optional +from typing_extensions import Annotated, NotRequired, TypedDict class GetSessionsResponseTypedDict(TypedDict): http_meta: components_httpmetadata.HTTPMetadataTypedDict data: NotRequired[List[components_session.SessionTypedDict]] r"""Success""" - error: NotRequired[errors_error.Error] + error: NotRequired[components_error.ErrorTypedDict] r"""Error""" @@ -28,5 +28,5 @@ class GetSessionsResponse(BaseModel): data: Optional[List[components_session.Session]] = None r"""Success""" - error: Optional[errors_error.Error] = None + error: Optional[components_error.Error] = None r"""Error""" diff --git a/src/livepeer/models/operations/getsigningkey.py b/src/livepeer/models/operations/getsigningkey.py index ae6fbc7..f256530 100644 --- a/src/livepeer/models/operations/getsigningkey.py +++ b/src/livepeer/models/operations/getsigningkey.py @@ -2,15 +2,15 @@ from __future__ import annotations from livepeer.models.components import ( + error as components_error, httpmetadata as components_httpmetadata, signing_key as components_signing_key, ) -from livepeer.models.errors import error as errors_error from livepeer.types import BaseModel from livepeer.utils import FieldMetadata, PathParamMetadata import pydantic -from typing import Optional, TypedDict -from typing_extensions import Annotated, NotRequired +from typing import Optional +from typing_extensions import Annotated, NotRequired, TypedDict class GetSigningKeyRequestTypedDict(TypedDict): @@ -31,7 +31,7 @@ class GetSigningKeyResponseTypedDict(TypedDict): http_meta: components_httpmetadata.HTTPMetadataTypedDict signing_key: NotRequired[components_signing_key.SigningKeyTypedDict] r"""Success""" - error: NotRequired[errors_error.Error] + error: NotRequired[components_error.ErrorTypedDict] r"""Error""" @@ -43,5 +43,5 @@ class GetSigningKeyResponse(BaseModel): signing_key: Optional[components_signing_key.SigningKey] = None r"""Success""" - error: Optional[errors_error.Error] = None + error: Optional[components_error.Error] = None r"""Error""" diff --git a/src/livepeer/models/operations/getsigningkeys.py b/src/livepeer/models/operations/getsigningkeys.py index f1de1b1..d48bdaa 100644 --- a/src/livepeer/models/operations/getsigningkeys.py +++ b/src/livepeer/models/operations/getsigningkeys.py @@ -2,21 +2,21 @@ from __future__ import annotations from livepeer.models.components import ( + error as components_error, httpmetadata as components_httpmetadata, signing_key as components_signing_key, ) -from livepeer.models.errors import error as errors_error from livepeer.types import BaseModel import pydantic -from typing import List, Optional, TypedDict -from typing_extensions import Annotated, NotRequired +from typing import List, Optional +from typing_extensions import Annotated, NotRequired, TypedDict class GetSigningKeysResponseTypedDict(TypedDict): http_meta: components_httpmetadata.HTTPMetadataTypedDict data: NotRequired[List[components_signing_key.SigningKeyTypedDict]] r"""Success""" - error: NotRequired[errors_error.Error] + error: NotRequired[components_error.ErrorTypedDict] r"""Error""" @@ -28,5 +28,5 @@ class GetSigningKeysResponse(BaseModel): data: Optional[List[components_signing_key.SigningKey]] = None r"""Success""" - error: Optional[errors_error.Error] = None + error: Optional[components_error.Error] = None r"""Error""" diff --git a/src/livepeer/models/operations/getstream.py b/src/livepeer/models/operations/getstream.py index 4c54047..9cd55cf 100644 --- a/src/livepeer/models/operations/getstream.py +++ b/src/livepeer/models/operations/getstream.py @@ -2,15 +2,15 @@ from __future__ import annotations from livepeer.models.components import ( + error as components_error, httpmetadata as components_httpmetadata, stream as components_stream, ) -from livepeer.models.errors import error as errors_error from livepeer.types import BaseModel from livepeer.utils import FieldMetadata, PathParamMetadata import pydantic -from typing import Optional, TypedDict -from typing_extensions import Annotated, NotRequired +from typing import Optional +from typing_extensions import Annotated, NotRequired, TypedDict class GetStreamRequestTypedDict(TypedDict): @@ -29,7 +29,7 @@ class GetStreamResponseTypedDict(TypedDict): http_meta: components_httpmetadata.HTTPMetadataTypedDict stream: NotRequired[components_stream.StreamTypedDict] r"""Success""" - error: NotRequired[errors_error.Error] + error: NotRequired[components_error.ErrorTypedDict] r"""Error""" @@ -41,5 +41,5 @@ class GetStreamResponse(BaseModel): stream: Optional[components_stream.Stream] = None r"""Success""" - error: Optional[errors_error.Error] = None + error: Optional[components_error.Error] = None r"""Error""" diff --git a/src/livepeer/models/operations/getstreams.py b/src/livepeer/models/operations/getstreams.py index cc811f8..05ba3a3 100644 --- a/src/livepeer/models/operations/getstreams.py +++ b/src/livepeer/models/operations/getstreams.py @@ -2,15 +2,15 @@ from __future__ import annotations from livepeer.models.components import ( + error as components_error, httpmetadata as components_httpmetadata, stream as components_stream, ) -from livepeer.models.errors import error as errors_error from livepeer.types import BaseModel from livepeer.utils import FieldMetadata, QueryParamMetadata import pydantic -from typing import List, Optional, TypedDict -from typing_extensions import Annotated, NotRequired +from typing import List, Optional +from typing_extensions import Annotated, NotRequired, TypedDict class GetStreamsRequestTypedDict(TypedDict): @@ -28,7 +28,7 @@ class GetStreamsResponseTypedDict(TypedDict): http_meta: components_httpmetadata.HTTPMetadataTypedDict data: NotRequired[List[components_stream.StreamTypedDict]] r"""Success""" - error: NotRequired[errors_error.Error] + error: NotRequired[components_error.ErrorTypedDict] r"""Error""" @@ -40,5 +40,5 @@ class GetStreamsResponse(BaseModel): data: Optional[List[components_stream.Stream]] = None r"""Success""" - error: Optional[errors_error.Error] = None + error: Optional[components_error.Error] = None r"""Error""" diff --git a/src/livepeer/models/operations/gettask.py b/src/livepeer/models/operations/gettask.py index 22ce115..d518f37 100644 --- a/src/livepeer/models/operations/gettask.py +++ b/src/livepeer/models/operations/gettask.py @@ -8,8 +8,8 @@ from livepeer.types import BaseModel from livepeer.utils import FieldMetadata, PathParamMetadata import pydantic -from typing import Optional, TypedDict -from typing_extensions import Annotated, NotRequired +from typing import Optional +from typing_extensions import Annotated, NotRequired, TypedDict class GetTaskRequestTypedDict(TypedDict): diff --git a/src/livepeer/models/operations/gettasks.py b/src/livepeer/models/operations/gettasks.py index 61de40e..183ba9f 100644 --- a/src/livepeer/models/operations/gettasks.py +++ b/src/livepeer/models/operations/gettasks.py @@ -2,21 +2,21 @@ from __future__ import annotations from livepeer.models.components import ( + error as components_error, httpmetadata as components_httpmetadata, task as components_task, ) -from livepeer.models.errors import error as errors_error from livepeer.types import BaseModel import pydantic -from typing import List, Optional, TypedDict -from typing_extensions import Annotated, NotRequired +from typing import List, Optional +from typing_extensions import Annotated, NotRequired, TypedDict class GetTasksResponseTypedDict(TypedDict): http_meta: components_httpmetadata.HTTPMetadataTypedDict data: NotRequired[List[components_task.TaskTypedDict]] r"""Success""" - error: NotRequired[errors_error.Error] + error: NotRequired[components_error.ErrorTypedDict] r"""Error""" @@ -28,5 +28,5 @@ class GetTasksResponse(BaseModel): data: Optional[List[components_task.Task]] = None r"""Success""" - error: Optional[errors_error.Error] = None + error: Optional[components_error.Error] = None r"""Error""" diff --git a/src/livepeer/models/operations/getusagemetrics.py b/src/livepeer/models/operations/getusagemetrics.py index 9b7476d..4cf5b98 100644 --- a/src/livepeer/models/operations/getusagemetrics.py +++ b/src/livepeer/models/operations/getusagemetrics.py @@ -3,15 +3,15 @@ from __future__ import annotations from enum import Enum from livepeer.models.components import ( + error as components_error, httpmetadata as components_httpmetadata, usage_metric as components_usage_metric, ) -from livepeer.models.errors import error as errors_error from livepeer.types import BaseModel from livepeer.utils import FieldMetadata, QueryParamMetadata import pydantic -from typing import List, Optional, TypedDict -from typing_extensions import Annotated, NotRequired +from typing import List, Optional +from typing_extensions import Annotated, NotRequired, TypedDict class GetUsageMetricsQueryParamTimeStep(str, Enum): @@ -100,7 +100,7 @@ class GetUsageMetricsResponseTypedDict(TypedDict): http_meta: components_httpmetadata.HTTPMetadataTypedDict usage_metric: NotRequired[components_usage_metric.UsageMetricTypedDict] r"""A Usage Metric object""" - error: NotRequired[errors_error.Error] + error: NotRequired[components_error.ErrorTypedDict] r"""Error""" @@ -112,5 +112,5 @@ class GetUsageMetricsResponse(BaseModel): usage_metric: Optional[components_usage_metric.UsageMetric] = None r"""A Usage Metric object""" - error: Optional[errors_error.Error] = None + error: Optional[components_error.Error] = None r"""Error""" diff --git a/src/livepeer/models/operations/getviewershipmetrics.py b/src/livepeer/models/operations/getviewershipmetrics.py index 1aeb84f..3571b92 100644 --- a/src/livepeer/models/operations/getviewershipmetrics.py +++ b/src/livepeer/models/operations/getviewershipmetrics.py @@ -4,30 +4,30 @@ from datetime import datetime from enum import Enum from livepeer.models.components import ( + error as components_error, httpmetadata as components_httpmetadata, viewership_metric as components_viewership_metric, ) -from livepeer.models.errors import error as errors_error from livepeer.types import BaseModel from livepeer.utils import FieldMetadata, QueryParamMetadata import pydantic -from typing import List, Optional, TypedDict, Union -from typing_extensions import Annotated, NotRequired +from typing import List, Optional, Union +from typing_extensions import Annotated, NotRequired, TypeAliasType, TypedDict -FromTypedDict = Union[datetime, int] +FromTypedDict = TypeAliasType("FromTypedDict", Union[datetime, int]) r"""Start timestamp for the query range (inclusive)""" -From = Union[datetime, int] +From = TypeAliasType("From", Union[datetime, int]) r"""Start timestamp for the query range (inclusive)""" -ToTypedDict = Union[datetime, int] +ToTypedDict = TypeAliasType("ToTypedDict", Union[datetime, int]) r"""End timestamp for the query range (exclusive)""" -To = Union[datetime, int] +To = TypeAliasType("To", Union[datetime, int]) r"""End timestamp for the query range (exclusive)""" @@ -152,7 +152,7 @@ class GetViewershipMetricsResponseTypedDict(TypedDict): http_meta: components_httpmetadata.HTTPMetadataTypedDict data: NotRequired[List[components_viewership_metric.ViewershipMetricTypedDict]] r"""A list of Metric objects""" - error: NotRequired[errors_error.Error] + error: NotRequired[components_error.ErrorTypedDict] r"""Error""" @@ -164,5 +164,5 @@ class GetViewershipMetricsResponse(BaseModel): data: Optional[List[components_viewership_metric.ViewershipMetric]] = None r"""A list of Metric objects""" - error: Optional[errors_error.Error] = None + error: Optional[components_error.Error] = None r"""Error""" diff --git a/src/livepeer/models/operations/getwebhook.py b/src/livepeer/models/operations/getwebhook.py index cca629d..8e263f5 100644 --- a/src/livepeer/models/operations/getwebhook.py +++ b/src/livepeer/models/operations/getwebhook.py @@ -2,15 +2,15 @@ from __future__ import annotations from livepeer.models.components import ( + error as components_error, httpmetadata as components_httpmetadata, webhook as components_webhook, ) -from livepeer.models.errors import error as errors_error from livepeer.types import BaseModel from livepeer.utils import FieldMetadata, PathParamMetadata import pydantic -from typing import Optional, TypedDict -from typing_extensions import Annotated, NotRequired +from typing import Optional +from typing_extensions import Annotated, NotRequired, TypedDict class GetWebhookRequestTypedDict(TypedDict): @@ -27,7 +27,7 @@ class GetWebhookResponseTypedDict(TypedDict): http_meta: components_httpmetadata.HTTPMetadataTypedDict webhook: NotRequired[components_webhook.WebhookTypedDict] r"""Success""" - error: NotRequired[errors_error.Error] + error: NotRequired[components_error.ErrorTypedDict] r"""Error""" @@ -39,5 +39,5 @@ class GetWebhookResponse(BaseModel): webhook: Optional[components_webhook.Webhook] = None r"""Success""" - error: Optional[errors_error.Error] = None + error: Optional[components_error.Error] = None r"""Error""" diff --git a/src/livepeer/models/operations/getwebhooklog.py b/src/livepeer/models/operations/getwebhooklog.py index 958866c..f83923d 100644 --- a/src/livepeer/models/operations/getwebhooklog.py +++ b/src/livepeer/models/operations/getwebhooklog.py @@ -2,15 +2,15 @@ from __future__ import annotations from livepeer.models.components import ( + error as components_error, httpmetadata as components_httpmetadata, webhook_log as components_webhook_log, ) -from livepeer.models.errors import error as errors_error from livepeer.types import BaseModel from livepeer.utils import FieldMetadata, PathParamMetadata import pydantic -from typing import Optional, TypedDict -from typing_extensions import Annotated, NotRequired +from typing import Optional +from typing_extensions import Annotated, NotRequired, TypedDict class GetWebhookLogRequestTypedDict(TypedDict): @@ -34,7 +34,7 @@ class GetWebhookLogResponseTypedDict(TypedDict): http_meta: components_httpmetadata.HTTPMetadataTypedDict webhook_log: NotRequired[components_webhook_log.WebhookLogTypedDict] r"""Success""" - error: NotRequired[errors_error.Error] + error: NotRequired[components_error.ErrorTypedDict] r"""Error""" @@ -46,5 +46,5 @@ class GetWebhookLogResponse(BaseModel): webhook_log: Optional[components_webhook_log.WebhookLog] = None r"""Success""" - error: Optional[errors_error.Error] = None + error: Optional[components_error.Error] = None r"""Error""" diff --git a/src/livepeer/models/operations/getwebhooklogs.py b/src/livepeer/models/operations/getwebhooklogs.py index d1bd080..3e4ee21 100644 --- a/src/livepeer/models/operations/getwebhooklogs.py +++ b/src/livepeer/models/operations/getwebhooklogs.py @@ -2,15 +2,15 @@ from __future__ import annotations from livepeer.models.components import ( + error as components_error, httpmetadata as components_httpmetadata, webhook_log as components_webhook_log, ) -from livepeer.models.errors import error as errors_error from livepeer.types import BaseModel from livepeer.utils import FieldMetadata, PathParamMetadata import pydantic -from typing import List, Optional, TypedDict -from typing_extensions import Annotated, NotRequired +from typing import List, Optional +from typing_extensions import Annotated, NotRequired, TypedDict class GetWebhookLogsRequestTypedDict(TypedDict): @@ -27,7 +27,7 @@ class GetWebhookLogsResponseTypedDict(TypedDict): http_meta: components_httpmetadata.HTTPMetadataTypedDict data: NotRequired[List[components_webhook_log.WebhookLogTypedDict]] r"""Success""" - error: NotRequired[errors_error.Error] + error: NotRequired[components_error.ErrorTypedDict] r"""Error""" @@ -39,5 +39,5 @@ class GetWebhookLogsResponse(BaseModel): data: Optional[List[components_webhook_log.WebhookLog]] = None r"""Success""" - error: Optional[errors_error.Error] = None + error: Optional[components_error.Error] = None r"""Error""" diff --git a/src/livepeer/models/operations/getwebhooks.py b/src/livepeer/models/operations/getwebhooks.py index c321324..c2d7707 100644 --- a/src/livepeer/models/operations/getwebhooks.py +++ b/src/livepeer/models/operations/getwebhooks.py @@ -2,21 +2,21 @@ from __future__ import annotations from livepeer.models.components import ( + error as components_error, httpmetadata as components_httpmetadata, webhook as components_webhook, ) -from livepeer.models.errors import error as errors_error from livepeer.types import BaseModel import pydantic -from typing import List, Optional, TypedDict -from typing_extensions import Annotated, NotRequired +from typing import List, Optional +from typing_extensions import Annotated, NotRequired, TypedDict class GetWebhooksResponseTypedDict(TypedDict): http_meta: components_httpmetadata.HTTPMetadataTypedDict data: NotRequired[List[components_webhook.WebhookTypedDict]] r"""Success""" - error: NotRequired[errors_error.Error] + error: NotRequired[components_error.ErrorTypedDict] r"""Error""" @@ -28,5 +28,5 @@ class GetWebhooksResponse(BaseModel): data: Optional[List[components_webhook.Webhook]] = None r"""Success""" - error: Optional[errors_error.Error] = None + error: Optional[components_error.Error] = None r"""Error""" diff --git a/src/livepeer/models/operations/removemultistreamtarget.py b/src/livepeer/models/operations/removemultistreamtarget.py index 485af16..a4d0ed4 100644 --- a/src/livepeer/models/operations/removemultistreamtarget.py +++ b/src/livepeer/models/operations/removemultistreamtarget.py @@ -1,13 +1,15 @@ """Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.""" from __future__ import annotations -from livepeer.models.components import httpmetadata as components_httpmetadata -from livepeer.models.errors import error as errors_error +from livepeer.models.components import ( + error as components_error, + httpmetadata as components_httpmetadata, +) from livepeer.types import BaseModel from livepeer.utils import FieldMetadata, PathParamMetadata import pydantic -from typing import Optional, TypedDict -from typing_extensions import Annotated, NotRequired +from typing import Optional +from typing_extensions import Annotated, NotRequired, TypedDict class RemoveMultistreamTargetRequestTypedDict(TypedDict): @@ -33,7 +35,7 @@ class RemoveMultistreamTargetRequest(BaseModel): class RemoveMultistreamTargetResponseTypedDict(TypedDict): http_meta: components_httpmetadata.HTTPMetadataTypedDict - error: NotRequired[errors_error.Error] + error: NotRequired[components_error.ErrorTypedDict] r"""Error""" @@ -42,5 +44,5 @@ class RemoveMultistreamTargetResponse(BaseModel): Optional[components_httpmetadata.HTTPMetadata], pydantic.Field(exclude=True) ] = None - error: Optional[errors_error.Error] = None + error: Optional[components_error.Error] = None r"""Error""" diff --git a/src/livepeer/models/operations/requestupload.py b/src/livepeer/models/operations/requestupload.py index 25ee9ba..69267c8 100644 --- a/src/livepeer/models/operations/requestupload.py +++ b/src/livepeer/models/operations/requestupload.py @@ -3,13 +3,13 @@ from __future__ import annotations from livepeer.models.components import ( asset as components_asset, + error as components_error, httpmetadata as components_httpmetadata, ) -from livepeer.models.errors import error as errors_error from livepeer.types import BaseModel import pydantic -from typing import Optional, TypedDict -from typing_extensions import Annotated, NotRequired +from typing import Optional +from typing_extensions import Annotated, NotRequired, TypedDict class TaskTypedDict(TypedDict): @@ -49,7 +49,7 @@ class RequestUploadResponseTypedDict(TypedDict): http_meta: components_httpmetadata.HTTPMetadataTypedDict data: NotRequired[RequestUploadDataTypedDict] r"""Success""" - error: NotRequired[errors_error.Error] + error: NotRequired[components_error.ErrorTypedDict] r"""Error""" @@ -61,5 +61,5 @@ class RequestUploadResponse(BaseModel): data: Optional[RequestUploadData] = None r"""Success""" - error: Optional[errors_error.Error] = None + error: Optional[components_error.Error] = None r"""Error""" diff --git a/src/livepeer/models/operations/resendwebhook.py b/src/livepeer/models/operations/resendwebhook.py index 4cd4e91..d3d4e9a 100644 --- a/src/livepeer/models/operations/resendwebhook.py +++ b/src/livepeer/models/operations/resendwebhook.py @@ -2,15 +2,15 @@ from __future__ import annotations from livepeer.models.components import ( + error as components_error, httpmetadata as components_httpmetadata, webhook_log as components_webhook_log, ) -from livepeer.models.errors import error as errors_error from livepeer.types import BaseModel from livepeer.utils import FieldMetadata, PathParamMetadata import pydantic -from typing import Optional, TypedDict -from typing_extensions import Annotated, NotRequired +from typing import Optional +from typing_extensions import Annotated, NotRequired, TypedDict class ResendWebhookRequestTypedDict(TypedDict): @@ -34,7 +34,7 @@ class ResendWebhookResponseTypedDict(TypedDict): http_meta: components_httpmetadata.HTTPMetadataTypedDict webhook_log: NotRequired[components_webhook_log.WebhookLogTypedDict] r"""Success""" - error: NotRequired[errors_error.Error] + error: NotRequired[components_error.ErrorTypedDict] r"""Error""" @@ -46,5 +46,5 @@ class ResendWebhookResponse(BaseModel): webhook_log: Optional[components_webhook_log.WebhookLog] = None r"""Success""" - error: Optional[errors_error.Error] = None + error: Optional[components_error.Error] = None r"""Error""" diff --git a/src/livepeer/models/operations/startpullstream.py b/src/livepeer/models/operations/startpullstream.py index 530ba72..6f4d4ab 100644 --- a/src/livepeer/models/operations/startpullstream.py +++ b/src/livepeer/models/operations/startpullstream.py @@ -1,13 +1,15 @@ """Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.""" from __future__ import annotations -from livepeer.models.components import httpmetadata as components_httpmetadata -from livepeer.models.errors import error as errors_error +from livepeer.models.components import ( + error as components_error, + httpmetadata as components_httpmetadata, +) from livepeer.types import BaseModel from livepeer.utils import FieldMetadata, PathParamMetadata import pydantic -from typing import Optional, TypedDict -from typing_extensions import Annotated, NotRequired +from typing import Optional +from typing_extensions import Annotated, NotRequired, TypedDict class StartPullStreamRequestTypedDict(TypedDict): @@ -24,7 +26,7 @@ class StartPullStreamRequest(BaseModel): class StartPullStreamResponseTypedDict(TypedDict): http_meta: components_httpmetadata.HTTPMetadataTypedDict - error: NotRequired[errors_error.Error] + error: NotRequired[components_error.ErrorTypedDict] r"""Error""" @@ -33,5 +35,5 @@ class StartPullStreamResponse(BaseModel): Optional[components_httpmetadata.HTTPMetadata], pydantic.Field(exclude=True) ] = None - error: Optional[errors_error.Error] = None + error: Optional[components_error.Error] = None r"""Error""" diff --git a/src/livepeer/models/operations/startroomegress.py b/src/livepeer/models/operations/startroomegress.py index b8540a4..b93c7a9 100644 --- a/src/livepeer/models/operations/startroomegress.py +++ b/src/livepeer/models/operations/startroomegress.py @@ -2,15 +2,15 @@ from __future__ import annotations from livepeer.models.components import ( + error as components_error, httpmetadata as components_httpmetadata, room_egress_payload as components_room_egress_payload, ) -from livepeer.models.errors import error as errors_error from livepeer.types import BaseModel from livepeer.utils import FieldMetadata, PathParamMetadata, RequestMetadata import pydantic -from typing import Optional, TypedDict -from typing_extensions import Annotated, NotRequired +from typing import Optional +from typing_extensions import Annotated, NotRequired, TypedDict class StartRoomEgressRequestTypedDict(TypedDict): @@ -31,7 +31,7 @@ class StartRoomEgressRequest(BaseModel): class StartRoomEgressResponseTypedDict(TypedDict): http_meta: components_httpmetadata.HTTPMetadataTypedDict - error: NotRequired[errors_error.Error] + error: NotRequired[components_error.ErrorTypedDict] r"""Error""" @@ -40,5 +40,5 @@ class StartRoomEgressResponse(BaseModel): Optional[components_httpmetadata.HTTPMetadata], pydantic.Field(exclude=True) ] = None - error: Optional[errors_error.Error] = None + error: Optional[components_error.Error] = None r"""Error""" diff --git a/src/livepeer/models/operations/stoproomegress.py b/src/livepeer/models/operations/stoproomegress.py index cb25bc1..c7f492c 100644 --- a/src/livepeer/models/operations/stoproomegress.py +++ b/src/livepeer/models/operations/stoproomegress.py @@ -1,13 +1,15 @@ """Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.""" from __future__ import annotations -from livepeer.models.components import httpmetadata as components_httpmetadata -from livepeer.models.errors import error as errors_error +from livepeer.models.components import ( + error as components_error, + httpmetadata as components_httpmetadata, +) from livepeer.types import BaseModel from livepeer.utils import FieldMetadata, PathParamMetadata import pydantic -from typing import Optional, TypedDict -from typing_extensions import Annotated, NotRequired +from typing import Optional +from typing_extensions import Annotated, NotRequired, TypedDict class StopRoomEgressRequestTypedDict(TypedDict): @@ -22,7 +24,7 @@ class StopRoomEgressRequest(BaseModel): class StopRoomEgressResponseTypedDict(TypedDict): http_meta: components_httpmetadata.HTTPMetadataTypedDict - error: NotRequired[errors_error.Error] + error: NotRequired[components_error.ErrorTypedDict] r"""Error""" @@ -31,5 +33,5 @@ class StopRoomEgressResponse(BaseModel): Optional[components_httpmetadata.HTTPMetadata], pydantic.Field(exclude=True) ] = None - error: Optional[errors_error.Error] = None + error: Optional[components_error.Error] = None r"""Error""" diff --git a/src/livepeer/models/operations/terminatestream.py b/src/livepeer/models/operations/terminatestream.py index b64897e..25c65fb 100644 --- a/src/livepeer/models/operations/terminatestream.py +++ b/src/livepeer/models/operations/terminatestream.py @@ -1,13 +1,15 @@ """Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.""" from __future__ import annotations -from livepeer.models.components import httpmetadata as components_httpmetadata -from livepeer.models.errors import error as errors_error +from livepeer.models.components import ( + error as components_error, + httpmetadata as components_httpmetadata, +) from livepeer.types import BaseModel from livepeer.utils import FieldMetadata, PathParamMetadata import pydantic -from typing import Optional, TypedDict -from typing_extensions import Annotated, NotRequired +from typing import Optional +from typing_extensions import Annotated, NotRequired, TypedDict class TerminateStreamRequestTypedDict(TypedDict): @@ -24,7 +26,7 @@ class TerminateStreamRequest(BaseModel): class TerminateStreamResponseTypedDict(TypedDict): http_meta: components_httpmetadata.HTTPMetadataTypedDict - error: NotRequired[errors_error.Error] + error: NotRequired[components_error.ErrorTypedDict] r"""Error""" @@ -33,5 +35,5 @@ class TerminateStreamResponse(BaseModel): Optional[components_httpmetadata.HTTPMetadata], pydantic.Field(exclude=True) ] = None - error: Optional[errors_error.Error] = None + error: Optional[components_error.Error] = None r"""Error""" diff --git a/src/livepeer/models/operations/transcodevideo.py b/src/livepeer/models/operations/transcodevideo.py index 12cb79f..83ff50c 100644 --- a/src/livepeer/models/operations/transcodevideo.py +++ b/src/livepeer/models/operations/transcodevideo.py @@ -2,21 +2,21 @@ from __future__ import annotations from livepeer.models.components import ( + error as components_error, httpmetadata as components_httpmetadata, task as components_task, ) -from livepeer.models.errors import error as errors_error from livepeer.types import BaseModel import pydantic -from typing import Optional, TypedDict -from typing_extensions import Annotated, NotRequired +from typing import Optional +from typing_extensions import Annotated, NotRequired, TypedDict class TranscodeVideoResponseTypedDict(TypedDict): http_meta: components_httpmetadata.HTTPMetadataTypedDict task: NotRequired[components_task.TaskTypedDict] r"""Success""" - error: NotRequired[errors_error.Error] + error: NotRequired[components_error.ErrorTypedDict] r"""Error""" @@ -28,5 +28,5 @@ class TranscodeVideoResponse(BaseModel): task: Optional[components_task.Task] = None r"""Success""" - error: Optional[errors_error.Error] = None + error: Optional[components_error.Error] = None r"""Error""" diff --git a/src/livepeer/models/operations/updateasset.py b/src/livepeer/models/operations/updateasset.py index bd781e7..98e5459 100644 --- a/src/livepeer/models/operations/updateasset.py +++ b/src/livepeer/models/operations/updateasset.py @@ -4,14 +4,14 @@ from livepeer.models.components import ( asset as components_asset, asset_patch_payload as components_asset_patch_payload, + error as components_error, httpmetadata as components_httpmetadata, ) -from livepeer.models.errors import error as errors_error from livepeer.types import BaseModel from livepeer.utils import FieldMetadata, PathParamMetadata, RequestMetadata import pydantic -from typing import Optional, TypedDict -from typing_extensions import Annotated, NotRequired +from typing import Optional +from typing_extensions import Annotated, NotRequired, TypedDict class UpdateAssetRequestTypedDict(TypedDict): @@ -38,7 +38,7 @@ class UpdateAssetResponseTypedDict(TypedDict): http_meta: components_httpmetadata.HTTPMetadataTypedDict asset: NotRequired[components_asset.AssetTypedDict] r"""Success""" - error: NotRequired[errors_error.Error] + error: NotRequired[components_error.ErrorTypedDict] r"""Error""" @@ -50,5 +50,5 @@ class UpdateAssetResponse(BaseModel): asset: Optional[components_asset.Asset] = None r"""Success""" - error: Optional[errors_error.Error] = None + error: Optional[components_error.Error] = None r"""Error""" diff --git a/src/livepeer/models/operations/updatemultistreamtarget.py b/src/livepeer/models/operations/updatemultistreamtarget.py index f10ce78..1f49300 100644 --- a/src/livepeer/models/operations/updatemultistreamtarget.py +++ b/src/livepeer/models/operations/updatemultistreamtarget.py @@ -2,15 +2,15 @@ from __future__ import annotations from livepeer.models.components import ( + error as components_error, httpmetadata as components_httpmetadata, multistream_target_patch_payload as components_multistream_target_patch_payload, ) -from livepeer.models.errors import error as errors_error from livepeer.types import BaseModel from livepeer.utils import FieldMetadata, PathParamMetadata, RequestMetadata import pydantic -from typing import Optional, TypedDict -from typing_extensions import Annotated, NotRequired +from typing import Optional +from typing_extensions import Annotated, NotRequired, TypedDict class UpdateMultistreamTargetRequestTypedDict(TypedDict): @@ -33,7 +33,7 @@ class UpdateMultistreamTargetRequest(BaseModel): class UpdateMultistreamTargetResponseTypedDict(TypedDict): http_meta: components_httpmetadata.HTTPMetadataTypedDict - error: NotRequired[errors_error.Error] + error: NotRequired[components_error.ErrorTypedDict] r"""Error""" @@ -42,5 +42,5 @@ class UpdateMultistreamTargetResponse(BaseModel): Optional[components_httpmetadata.HTTPMetadata], pydantic.Field(exclude=True) ] = None - error: Optional[errors_error.Error] = None + error: Optional[components_error.Error] = None r"""Error""" diff --git a/src/livepeer/models/operations/updateroomuser.py b/src/livepeer/models/operations/updateroomuser.py index 10de7d6..0492614 100644 --- a/src/livepeer/models/operations/updateroomuser.py +++ b/src/livepeer/models/operations/updateroomuser.py @@ -2,15 +2,15 @@ from __future__ import annotations from livepeer.models.components import ( + error as components_error, httpmetadata as components_httpmetadata, room_user_update_payload as components_room_user_update_payload, ) -from livepeer.models.errors import error as errors_error from livepeer.types import BaseModel from livepeer.utils import FieldMetadata, PathParamMetadata, RequestMetadata import pydantic -from typing import Optional, TypedDict -from typing_extensions import Annotated, NotRequired +from typing import Optional +from typing_extensions import Annotated, NotRequired, TypedDict class UpdateRoomUserRequestTypedDict(TypedDict): @@ -40,7 +40,7 @@ class UpdateRoomUserRequest(BaseModel): class UpdateRoomUserResponseTypedDict(TypedDict): http_meta: components_httpmetadata.HTTPMetadataTypedDict - error: NotRequired[errors_error.Error] + error: NotRequired[components_error.ErrorTypedDict] r"""Error""" @@ -49,5 +49,5 @@ class UpdateRoomUserResponse(BaseModel): Optional[components_httpmetadata.HTTPMetadata], pydantic.Field(exclude=True) ] = None - error: Optional[errors_error.Error] = None + error: Optional[components_error.Error] = None r"""Error""" diff --git a/src/livepeer/models/operations/updatesigningkey.py b/src/livepeer/models/operations/updatesigningkey.py index 542019a..ebec5eb 100644 --- a/src/livepeer/models/operations/updatesigningkey.py +++ b/src/livepeer/models/operations/updatesigningkey.py @@ -1,13 +1,15 @@ """Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.""" from __future__ import annotations -from livepeer.models.components import httpmetadata as components_httpmetadata -from livepeer.models.errors import error as errors_error +from livepeer.models.components import ( + error as components_error, + httpmetadata as components_httpmetadata, +) from livepeer.types import BaseModel from livepeer.utils import FieldMetadata, PathParamMetadata, RequestMetadata import pydantic -from typing import Optional, TypedDict -from typing_extensions import Annotated, NotRequired +from typing import Optional +from typing_extensions import Annotated, NotRequired, TypedDict class UpdateSigningKeyRequestBodyTypedDict(TypedDict): @@ -43,7 +45,7 @@ class UpdateSigningKeyRequest(BaseModel): class UpdateSigningKeyResponseTypedDict(TypedDict): http_meta: components_httpmetadata.HTTPMetadataTypedDict - error: NotRequired[errors_error.Error] + error: NotRequired[components_error.ErrorTypedDict] r"""Error""" @@ -52,5 +54,5 @@ class UpdateSigningKeyResponse(BaseModel): Optional[components_httpmetadata.HTTPMetadata], pydantic.Field(exclude=True) ] = None - error: Optional[errors_error.Error] = None + error: Optional[components_error.Error] = None r"""Error""" diff --git a/src/livepeer/models/operations/updatestream.py b/src/livepeer/models/operations/updatestream.py index cedfc9a..3489152 100644 --- a/src/livepeer/models/operations/updatestream.py +++ b/src/livepeer/models/operations/updatestream.py @@ -2,15 +2,15 @@ from __future__ import annotations from livepeer.models.components import ( + error as components_error, httpmetadata as components_httpmetadata, stream_patch_payload as components_stream_patch_payload, ) -from livepeer.models.errors import error as errors_error from livepeer.types import BaseModel from livepeer.utils import FieldMetadata, PathParamMetadata, RequestMetadata import pydantic -from typing import Optional, TypedDict -from typing_extensions import Annotated, NotRequired +from typing import Optional +from typing_extensions import Annotated, NotRequired, TypedDict class UpdateStreamRequestTypedDict(TypedDict): @@ -33,7 +33,7 @@ class UpdateStreamRequest(BaseModel): class UpdateStreamResponseTypedDict(TypedDict): http_meta: components_httpmetadata.HTTPMetadataTypedDict - error: NotRequired[errors_error.Error] + error: NotRequired[components_error.ErrorTypedDict] r"""Error""" @@ -42,5 +42,5 @@ class UpdateStreamResponse(BaseModel): Optional[components_httpmetadata.HTTPMetadata], pydantic.Field(exclude=True) ] = None - error: Optional[errors_error.Error] = None + error: Optional[components_error.Error] = None r"""Error""" diff --git a/src/livepeer/models/operations/updatewebhook.py b/src/livepeer/models/operations/updatewebhook.py index 057f4d8..5828267 100644 --- a/src/livepeer/models/operations/updatewebhook.py +++ b/src/livepeer/models/operations/updatewebhook.py @@ -2,15 +2,15 @@ from __future__ import annotations from livepeer.models.components import ( + error as components_error, httpmetadata as components_httpmetadata, webhook as components_webhook, ) -from livepeer.models.errors import error as errors_error from livepeer.types import BaseModel from livepeer.utils import FieldMetadata, PathParamMetadata, RequestMetadata import pydantic -from typing import Optional, TypedDict -from typing_extensions import Annotated, NotRequired +from typing import Optional +from typing_extensions import Annotated, NotRequired, TypedDict class UpdateWebhookRequestTypedDict(TypedDict): @@ -33,7 +33,7 @@ class UpdateWebhookResponseTypedDict(TypedDict): http_meta: components_httpmetadata.HTTPMetadataTypedDict webhook: NotRequired[components_webhook.WebhookTypedDict] r"""Success""" - error: NotRequired[errors_error.Error] + error: NotRequired[components_error.ErrorTypedDict] r"""Error""" @@ -45,5 +45,5 @@ class UpdateWebhookResponse(BaseModel): webhook: Optional[components_webhook.Webhook] = None r"""Success""" - error: Optional[errors_error.Error] = None + error: Optional[components_error.Error] = None r"""Error""" diff --git a/src/livepeer/models/operations/uploadasset.py b/src/livepeer/models/operations/uploadasset.py index f2ce95d..b2f5211 100644 --- a/src/livepeer/models/operations/uploadasset.py +++ b/src/livepeer/models/operations/uploadasset.py @@ -3,13 +3,13 @@ from __future__ import annotations from livepeer.models.components import ( asset as components_asset, + error as components_error, httpmetadata as components_httpmetadata, ) -from livepeer.models.errors import error as errors_error from livepeer.types import BaseModel import pydantic -from typing import Optional, TypedDict -from typing_extensions import Annotated, NotRequired +from typing import Optional +from typing_extensions import Annotated, NotRequired, TypedDict class UploadAssetAssetTaskTypedDict(TypedDict): @@ -66,7 +66,7 @@ class UploadAssetResponseTypedDict(TypedDict): UploadAssetDataOutputTypedDict ] r"""Upload started""" - error: NotRequired[errors_error.Error] + error: NotRequired[components_error.ErrorTypedDict] r"""Error""" @@ -81,5 +81,5 @@ class UploadAssetResponse(BaseModel): two_hundred_and_one_application_json_data: Optional[UploadAssetDataOutput] = None r"""Upload started""" - error: Optional[errors_error.Error] = None + error: Optional[components_error.Error] = None r"""Error""" diff --git a/src/livepeer/multistream.py b/src/livepeer/multistream.py index 0a14f06..ed34f76 100644 --- a/src/livepeer/multistream.py +++ b/src/livepeer/multistream.py @@ -5,7 +5,7 @@ from livepeer._hooks import HookContext from livepeer.models import components, errors, operations from livepeer.types import BaseModel, OptionalNullable, UNSET -from typing import List, Optional, Union, cast +from typing import List, Mapping, Optional, Union, cast class Multistream(BaseSDK): @@ -17,12 +17,14 @@ def get_all( retries: OptionalNullable[utils.RetryConfig] = UNSET, server_url: Optional[str] = None, timeout_ms: Optional[int] = None, + http_headers: Optional[Mapping[str, str]] = None, ) -> operations.GetMultistreamTargetsResponse: r"""Retrieve Multistream Targets :param retries: Override the default retry configuration for this method :param server_url: Override the default server URL for this method :param timeout_ms: Override the default request timeout configuration for this method in milliseconds + :param http_headers: Additional headers to set or replace on requests. """ base_url = None url_variables = None @@ -42,6 +44,7 @@ def get_all( request_has_query_params=True, user_agent_header="user-agent", accept_header_value="application/json", + http_headers=http_headers, security=self.sdk_configuration.security, timeout_ms=timeout_ms, ) @@ -73,20 +76,22 @@ def get_all( http_meta=components.HTTPMetadata(request=req, response=http_res), ) if utils.match_response(http_res, ["4XX", "5XX"], "*"): + http_res_text = utils.stream_to_text(http_res) raise errors.SDKError( - "API error occurred", http_res.status_code, http_res.text, http_res + "API error occurred", http_res.status_code, http_res_text, http_res ) if utils.match_response(http_res, "default", "application/json"): return operations.GetMultistreamTargetsResponse( - error=utils.unmarshal_json(http_res.text, Optional[errors.Error]), + error=utils.unmarshal_json(http_res.text, Optional[components.Error]), http_meta=components.HTTPMetadata(request=req, response=http_res), ) content_type = http_res.headers.get("Content-Type") + http_res_text = utils.stream_to_text(http_res) raise errors.SDKError( f"Unexpected response received (code: {http_res.status_code}, type: {content_type})", http_res.status_code, - http_res.text, + http_res_text, http_res, ) @@ -96,12 +101,14 @@ async def get_all_async( retries: OptionalNullable[utils.RetryConfig] = UNSET, server_url: Optional[str] = None, timeout_ms: Optional[int] = None, + http_headers: Optional[Mapping[str, str]] = None, ) -> operations.GetMultistreamTargetsResponse: r"""Retrieve Multistream Targets :param retries: Override the default retry configuration for this method :param server_url: Override the default server URL for this method :param timeout_ms: Override the default request timeout configuration for this method in milliseconds + :param http_headers: Additional headers to set or replace on requests. """ base_url = None url_variables = None @@ -121,6 +128,7 @@ async def get_all_async( request_has_query_params=True, user_agent_header="user-agent", accept_header_value="application/json", + http_headers=http_headers, security=self.sdk_configuration.security, timeout_ms=timeout_ms, ) @@ -152,20 +160,22 @@ async def get_all_async( http_meta=components.HTTPMetadata(request=req, response=http_res), ) if utils.match_response(http_res, ["4XX", "5XX"], "*"): + http_res_text = await utils.stream_to_text_async(http_res) raise errors.SDKError( - "API error occurred", http_res.status_code, http_res.text, http_res + "API error occurred", http_res.status_code, http_res_text, http_res ) if utils.match_response(http_res, "default", "application/json"): return operations.GetMultistreamTargetsResponse( - error=utils.unmarshal_json(http_res.text, Optional[errors.Error]), + error=utils.unmarshal_json(http_res.text, Optional[components.Error]), http_meta=components.HTTPMetadata(request=req, response=http_res), ) content_type = http_res.headers.get("Content-Type") + http_res_text = await utils.stream_to_text_async(http_res) raise errors.SDKError( f"Unexpected response received (code: {http_res.status_code}, type: {content_type})", http_res.status_code, - http_res.text, + http_res_text, http_res, ) @@ -179,6 +189,7 @@ def create( retries: OptionalNullable[utils.RetryConfig] = UNSET, server_url: Optional[str] = None, timeout_ms: Optional[int] = None, + http_headers: Optional[Mapping[str, str]] = None, ) -> operations.CreateMultistreamTargetResponse: r"""Create a multistream target @@ -186,6 +197,7 @@ def create( :param retries: Override the default retry configuration for this method :param server_url: Override the default server URL for this method :param timeout_ms: Override the default request timeout configuration for this method in milliseconds + :param http_headers: Additional headers to set or replace on requests. """ base_url = None url_variables = None @@ -210,6 +222,7 @@ def create( request_has_query_params=True, user_agent_header="user-agent", accept_header_value="application/json", + http_headers=http_headers, security=self.sdk_configuration.security, get_serialized_body=lambda: utils.serialize_request_body( request, False, False, "json", components.MultistreamTargetInput @@ -244,20 +257,22 @@ def create( http_meta=components.HTTPMetadata(request=req, response=http_res), ) if utils.match_response(http_res, ["4XX", "5XX"], "*"): + http_res_text = utils.stream_to_text(http_res) raise errors.SDKError( - "API error occurred", http_res.status_code, http_res.text, http_res + "API error occurred", http_res.status_code, http_res_text, http_res ) if utils.match_response(http_res, "default", "application/json"): return operations.CreateMultistreamTargetResponse( - error=utils.unmarshal_json(http_res.text, Optional[errors.Error]), + error=utils.unmarshal_json(http_res.text, Optional[components.Error]), http_meta=components.HTTPMetadata(request=req, response=http_res), ) content_type = http_res.headers.get("Content-Type") + http_res_text = utils.stream_to_text(http_res) raise errors.SDKError( f"Unexpected response received (code: {http_res.status_code}, type: {content_type})", http_res.status_code, - http_res.text, + http_res_text, http_res, ) @@ -271,6 +286,7 @@ async def create_async( retries: OptionalNullable[utils.RetryConfig] = UNSET, server_url: Optional[str] = None, timeout_ms: Optional[int] = None, + http_headers: Optional[Mapping[str, str]] = None, ) -> operations.CreateMultistreamTargetResponse: r"""Create a multistream target @@ -278,6 +294,7 @@ async def create_async( :param retries: Override the default retry configuration for this method :param server_url: Override the default server URL for this method :param timeout_ms: Override the default request timeout configuration for this method in milliseconds + :param http_headers: Additional headers to set or replace on requests. """ base_url = None url_variables = None @@ -302,6 +319,7 @@ async def create_async( request_has_query_params=True, user_agent_header="user-agent", accept_header_value="application/json", + http_headers=http_headers, security=self.sdk_configuration.security, get_serialized_body=lambda: utils.serialize_request_body( request, False, False, "json", components.MultistreamTargetInput @@ -336,20 +354,22 @@ async def create_async( http_meta=components.HTTPMetadata(request=req, response=http_res), ) if utils.match_response(http_res, ["4XX", "5XX"], "*"): + http_res_text = await utils.stream_to_text_async(http_res) raise errors.SDKError( - "API error occurred", http_res.status_code, http_res.text, http_res + "API error occurred", http_res.status_code, http_res_text, http_res ) if utils.match_response(http_res, "default", "application/json"): return operations.CreateMultistreamTargetResponse( - error=utils.unmarshal_json(http_res.text, Optional[errors.Error]), + error=utils.unmarshal_json(http_res.text, Optional[components.Error]), http_meta=components.HTTPMetadata(request=req, response=http_res), ) content_type = http_res.headers.get("Content-Type") + http_res_text = await utils.stream_to_text_async(http_res) raise errors.SDKError( f"Unexpected response received (code: {http_res.status_code}, type: {content_type})", http_res.status_code, - http_res.text, + http_res_text, http_res, ) @@ -360,6 +380,7 @@ def get( retries: OptionalNullable[utils.RetryConfig] = UNSET, server_url: Optional[str] = None, timeout_ms: Optional[int] = None, + http_headers: Optional[Mapping[str, str]] = None, ) -> operations.GetMultistreamTargetResponse: r"""Retrieve a multistream target @@ -367,6 +388,7 @@ def get( :param retries: Override the default retry configuration for this method :param server_url: Override the default server URL for this method :param timeout_ms: Override the default request timeout configuration for this method in milliseconds + :param http_headers: Additional headers to set or replace on requests. """ base_url = None url_variables = None @@ -391,6 +413,7 @@ def get( request_has_query_params=True, user_agent_header="user-agent", accept_header_value="application/json", + http_headers=http_headers, security=self.sdk_configuration.security, timeout_ms=timeout_ms, ) @@ -422,20 +445,22 @@ def get( http_meta=components.HTTPMetadata(request=req, response=http_res), ) if utils.match_response(http_res, ["4XX", "5XX"], "*"): + http_res_text = utils.stream_to_text(http_res) raise errors.SDKError( - "API error occurred", http_res.status_code, http_res.text, http_res + "API error occurred", http_res.status_code, http_res_text, http_res ) if utils.match_response(http_res, "default", "application/json"): return operations.GetMultistreamTargetResponse( - error=utils.unmarshal_json(http_res.text, Optional[errors.Error]), + error=utils.unmarshal_json(http_res.text, Optional[components.Error]), http_meta=components.HTTPMetadata(request=req, response=http_res), ) content_type = http_res.headers.get("Content-Type") + http_res_text = utils.stream_to_text(http_res) raise errors.SDKError( f"Unexpected response received (code: {http_res.status_code}, type: {content_type})", http_res.status_code, - http_res.text, + http_res_text, http_res, ) @@ -446,6 +471,7 @@ async def get_async( retries: OptionalNullable[utils.RetryConfig] = UNSET, server_url: Optional[str] = None, timeout_ms: Optional[int] = None, + http_headers: Optional[Mapping[str, str]] = None, ) -> operations.GetMultistreamTargetResponse: r"""Retrieve a multistream target @@ -453,6 +479,7 @@ async def get_async( :param retries: Override the default retry configuration for this method :param server_url: Override the default server URL for this method :param timeout_ms: Override the default request timeout configuration for this method in milliseconds + :param http_headers: Additional headers to set or replace on requests. """ base_url = None url_variables = None @@ -477,6 +504,7 @@ async def get_async( request_has_query_params=True, user_agent_header="user-agent", accept_header_value="application/json", + http_headers=http_headers, security=self.sdk_configuration.security, timeout_ms=timeout_ms, ) @@ -508,20 +536,22 @@ async def get_async( http_meta=components.HTTPMetadata(request=req, response=http_res), ) if utils.match_response(http_res, ["4XX", "5XX"], "*"): + http_res_text = await utils.stream_to_text_async(http_res) raise errors.SDKError( - "API error occurred", http_res.status_code, http_res.text, http_res + "API error occurred", http_res.status_code, http_res_text, http_res ) if utils.match_response(http_res, "default", "application/json"): return operations.GetMultistreamTargetResponse( - error=utils.unmarshal_json(http_res.text, Optional[errors.Error]), + error=utils.unmarshal_json(http_res.text, Optional[components.Error]), http_meta=components.HTTPMetadata(request=req, response=http_res), ) content_type = http_res.headers.get("Content-Type") + http_res_text = await utils.stream_to_text_async(http_res) raise errors.SDKError( f"Unexpected response received (code: {http_res.status_code}, type: {content_type})", http_res.status_code, - http_res.text, + http_res_text, http_res, ) @@ -536,6 +566,7 @@ def update( retries: OptionalNullable[utils.RetryConfig] = UNSET, server_url: Optional[str] = None, timeout_ms: Optional[int] = None, + http_headers: Optional[Mapping[str, str]] = None, ) -> operations.UpdateMultistreamTargetResponse: r"""Update Multistream Target @@ -544,6 +575,7 @@ def update( :param retries: Override the default retry configuration for this method :param server_url: Override the default server URL for this method :param timeout_ms: Override the default request timeout configuration for this method in milliseconds + :param http_headers: Additional headers to set or replace on requests. """ base_url = None url_variables = None @@ -572,6 +604,7 @@ def update( request_has_query_params=True, user_agent_header="user-agent", accept_header_value="application/json", + http_headers=http_headers, security=self.sdk_configuration.security, get_serialized_body=lambda: utils.serialize_request_body( request.multistream_target_patch_payload, @@ -607,20 +640,22 @@ def update( http_meta=components.HTTPMetadata(request=req, response=http_res) ) if utils.match_response(http_res, ["4XX", "5XX"], "*"): + http_res_text = utils.stream_to_text(http_res) raise errors.SDKError( - "API error occurred", http_res.status_code, http_res.text, http_res + "API error occurred", http_res.status_code, http_res_text, http_res ) if utils.match_response(http_res, "default", "application/json"): return operations.UpdateMultistreamTargetResponse( - error=utils.unmarshal_json(http_res.text, Optional[errors.Error]), + error=utils.unmarshal_json(http_res.text, Optional[components.Error]), http_meta=components.HTTPMetadata(request=req, response=http_res), ) content_type = http_res.headers.get("Content-Type") + http_res_text = utils.stream_to_text(http_res) raise errors.SDKError( f"Unexpected response received (code: {http_res.status_code}, type: {content_type})", http_res.status_code, - http_res.text, + http_res_text, http_res, ) @@ -635,6 +670,7 @@ async def update_async( retries: OptionalNullable[utils.RetryConfig] = UNSET, server_url: Optional[str] = None, timeout_ms: Optional[int] = None, + http_headers: Optional[Mapping[str, str]] = None, ) -> operations.UpdateMultistreamTargetResponse: r"""Update Multistream Target @@ -643,6 +679,7 @@ async def update_async( :param retries: Override the default retry configuration for this method :param server_url: Override the default server URL for this method :param timeout_ms: Override the default request timeout configuration for this method in milliseconds + :param http_headers: Additional headers to set or replace on requests. """ base_url = None url_variables = None @@ -671,6 +708,7 @@ async def update_async( request_has_query_params=True, user_agent_header="user-agent", accept_header_value="application/json", + http_headers=http_headers, security=self.sdk_configuration.security, get_serialized_body=lambda: utils.serialize_request_body( request.multistream_target_patch_payload, @@ -706,20 +744,22 @@ async def update_async( http_meta=components.HTTPMetadata(request=req, response=http_res) ) if utils.match_response(http_res, ["4XX", "5XX"], "*"): + http_res_text = await utils.stream_to_text_async(http_res) raise errors.SDKError( - "API error occurred", http_res.status_code, http_res.text, http_res + "API error occurred", http_res.status_code, http_res_text, http_res ) if utils.match_response(http_res, "default", "application/json"): return operations.UpdateMultistreamTargetResponse( - error=utils.unmarshal_json(http_res.text, Optional[errors.Error]), + error=utils.unmarshal_json(http_res.text, Optional[components.Error]), http_meta=components.HTTPMetadata(request=req, response=http_res), ) content_type = http_res.headers.get("Content-Type") + http_res_text = await utils.stream_to_text_async(http_res) raise errors.SDKError( f"Unexpected response received (code: {http_res.status_code}, type: {content_type})", http_res.status_code, - http_res.text, + http_res_text, http_res, ) @@ -730,6 +770,7 @@ def delete( retries: OptionalNullable[utils.RetryConfig] = UNSET, server_url: Optional[str] = None, timeout_ms: Optional[int] = None, + http_headers: Optional[Mapping[str, str]] = None, ) -> operations.DeleteMultistreamTargetResponse: r"""Delete a multistream target @@ -741,6 +782,7 @@ def delete( :param retries: Override the default retry configuration for this method :param server_url: Override the default server URL for this method :param timeout_ms: Override the default request timeout configuration for this method in milliseconds + :param http_headers: Additional headers to set or replace on requests. """ base_url = None url_variables = None @@ -765,6 +807,7 @@ def delete( request_has_query_params=True, user_agent_header="user-agent", accept_header_value="application/json", + http_headers=http_headers, security=self.sdk_configuration.security, timeout_ms=timeout_ms, ) @@ -793,20 +836,22 @@ def delete( http_meta=components.HTTPMetadata(request=req, response=http_res) ) if utils.match_response(http_res, ["4XX", "5XX"], "*"): + http_res_text = utils.stream_to_text(http_res) raise errors.SDKError( - "API error occurred", http_res.status_code, http_res.text, http_res + "API error occurred", http_res.status_code, http_res_text, http_res ) if utils.match_response(http_res, "default", "application/json"): return operations.DeleteMultistreamTargetResponse( - error=utils.unmarshal_json(http_res.text, Optional[errors.Error]), + error=utils.unmarshal_json(http_res.text, Optional[components.Error]), http_meta=components.HTTPMetadata(request=req, response=http_res), ) content_type = http_res.headers.get("Content-Type") + http_res_text = utils.stream_to_text(http_res) raise errors.SDKError( f"Unexpected response received (code: {http_res.status_code}, type: {content_type})", http_res.status_code, - http_res.text, + http_res_text, http_res, ) @@ -817,6 +862,7 @@ async def delete_async( retries: OptionalNullable[utils.RetryConfig] = UNSET, server_url: Optional[str] = None, timeout_ms: Optional[int] = None, + http_headers: Optional[Mapping[str, str]] = None, ) -> operations.DeleteMultistreamTargetResponse: r"""Delete a multistream target @@ -828,6 +874,7 @@ async def delete_async( :param retries: Override the default retry configuration for this method :param server_url: Override the default server URL for this method :param timeout_ms: Override the default request timeout configuration for this method in milliseconds + :param http_headers: Additional headers to set or replace on requests. """ base_url = None url_variables = None @@ -852,6 +899,7 @@ async def delete_async( request_has_query_params=True, user_agent_header="user-agent", accept_header_value="application/json", + http_headers=http_headers, security=self.sdk_configuration.security, timeout_ms=timeout_ms, ) @@ -880,19 +928,21 @@ async def delete_async( http_meta=components.HTTPMetadata(request=req, response=http_res) ) if utils.match_response(http_res, ["4XX", "5XX"], "*"): + http_res_text = await utils.stream_to_text_async(http_res) raise errors.SDKError( - "API error occurred", http_res.status_code, http_res.text, http_res + "API error occurred", http_res.status_code, http_res_text, http_res ) if utils.match_response(http_res, "default", "application/json"): return operations.DeleteMultistreamTargetResponse( - error=utils.unmarshal_json(http_res.text, Optional[errors.Error]), + error=utils.unmarshal_json(http_res.text, Optional[components.Error]), http_meta=components.HTTPMetadata(request=req, response=http_res), ) content_type = http_res.headers.get("Content-Type") + http_res_text = await utils.stream_to_text_async(http_res) raise errors.SDKError( f"Unexpected response received (code: {http_res.status_code}, type: {content_type})", http_res.status_code, - http_res.text, + http_res_text, http_res, ) diff --git a/src/livepeer/playback.py b/src/livepeer/playback.py index 51f7010..642e494 100644 --- a/src/livepeer/playback.py +++ b/src/livepeer/playback.py @@ -5,7 +5,7 @@ from livepeer._hooks import HookContext from livepeer.models import components, errors, operations from livepeer.types import OptionalNullable, UNSET -from typing import Any, Optional +from typing import Any, Mapping, Optional class Playback(BaseSDK): @@ -18,6 +18,7 @@ def get( retries: OptionalNullable[utils.RetryConfig] = UNSET, server_url: Optional[str] = None, timeout_ms: Optional[int] = None, + http_headers: Optional[Mapping[str, str]] = None, ) -> operations.GetPlaybackInfoResponse: r"""Retrieve Playback Info @@ -25,6 +26,7 @@ def get( :param retries: Override the default retry configuration for this method :param server_url: Override the default server URL for this method :param timeout_ms: Override the default request timeout configuration for this method in milliseconds + :param http_headers: Additional headers to set or replace on requests. """ base_url = None url_variables = None @@ -49,6 +51,7 @@ def get( request_has_query_params=True, user_agent_header="user-agent", accept_header_value="application/json", + http_headers=http_headers, security=self.sdk_configuration.security, timeout_ms=timeout_ms, ) @@ -84,20 +87,22 @@ def get( data = utils.unmarshal_json(http_res.text, errors.ErrorData) raise errors.Error(data=data) if utils.match_response(http_res, ["4XX", "5XX"], "*"): + http_res_text = utils.stream_to_text(http_res) raise errors.SDKError( - "API error occurred", http_res.status_code, http_res.text, http_res + "API error occurred", http_res.status_code, http_res_text, http_res ) if utils.match_response(http_res, "default", "application/json"): return operations.GetPlaybackInfoResponse( - error=utils.unmarshal_json(http_res.text, Optional[errors.Error]), + error=utils.unmarshal_json(http_res.text, Optional[components.Error]), http_meta=components.HTTPMetadata(request=req, response=http_res), ) content_type = http_res.headers.get("Content-Type") + http_res_text = utils.stream_to_text(http_res) raise errors.SDKError( f"Unexpected response received (code: {http_res.status_code}, type: {content_type})", http_res.status_code, - http_res.text, + http_res_text, http_res, ) @@ -108,6 +113,7 @@ async def get_async( retries: OptionalNullable[utils.RetryConfig] = UNSET, server_url: Optional[str] = None, timeout_ms: Optional[int] = None, + http_headers: Optional[Mapping[str, str]] = None, ) -> operations.GetPlaybackInfoResponse: r"""Retrieve Playback Info @@ -115,6 +121,7 @@ async def get_async( :param retries: Override the default retry configuration for this method :param server_url: Override the default server URL for this method :param timeout_ms: Override the default request timeout configuration for this method in milliseconds + :param http_headers: Additional headers to set or replace on requests. """ base_url = None url_variables = None @@ -139,6 +146,7 @@ async def get_async( request_has_query_params=True, user_agent_header="user-agent", accept_header_value="application/json", + http_headers=http_headers, security=self.sdk_configuration.security, timeout_ms=timeout_ms, ) @@ -174,19 +182,21 @@ async def get_async( data = utils.unmarshal_json(http_res.text, errors.ErrorData) raise errors.Error(data=data) if utils.match_response(http_res, ["4XX", "5XX"], "*"): + http_res_text = await utils.stream_to_text_async(http_res) raise errors.SDKError( - "API error occurred", http_res.status_code, http_res.text, http_res + "API error occurred", http_res.status_code, http_res_text, http_res ) if utils.match_response(http_res, "default", "application/json"): return operations.GetPlaybackInfoResponse( - error=utils.unmarshal_json(http_res.text, Optional[errors.Error]), + error=utils.unmarshal_json(http_res.text, Optional[components.Error]), http_meta=components.HTTPMetadata(request=req, response=http_res), ) content_type = http_res.headers.get("Content-Type") + http_res_text = await utils.stream_to_text_async(http_res) raise errors.SDKError( f"Unexpected response received (code: {http_res.status_code}, type: {content_type})", http_res.status_code, - http_res.text, + http_res_text, http_res, ) diff --git a/src/livepeer/room.py b/src/livepeer/room.py index 77486bc..f591b88 100644 --- a/src/livepeer/room.py +++ b/src/livepeer/room.py @@ -5,7 +5,7 @@ from livepeer._hooks import HookContext from livepeer.models import components, errors, operations from livepeer.types import OptionalNullable, UNSET -from typing import Optional, Union +from typing import Mapping, Optional, Union from typing_extensions import deprecated @@ -21,6 +21,7 @@ def create( retries: OptionalNullable[utils.RetryConfig] = UNSET, server_url: Optional[str] = None, timeout_ms: Optional[int] = None, + http_headers: Optional[Mapping[str, str]] = None, ) -> operations.CreateRoomResponse: r"""Create a room @@ -30,6 +31,7 @@ def create( :param retries: Override the default retry configuration for this method :param server_url: Override the default server URL for this method :param timeout_ms: Override the default request timeout configuration for this method in milliseconds + :param http_headers: Additional headers to set or replace on requests. """ base_url = None url_variables = None @@ -49,6 +51,7 @@ def create( request_has_query_params=True, user_agent_header="user-agent", accept_header_value="application/json", + http_headers=http_headers, security=self.sdk_configuration.security, timeout_ms=timeout_ms, ) @@ -80,20 +83,22 @@ def create( http_meta=components.HTTPMetadata(request=req, response=http_res), ) if utils.match_response(http_res, ["4XX", "5XX"], "*"): + http_res_text = utils.stream_to_text(http_res) raise errors.SDKError( - "API error occurred", http_res.status_code, http_res.text, http_res + "API error occurred", http_res.status_code, http_res_text, http_res ) if utils.match_response(http_res, "default", "application/json"): return operations.CreateRoomResponse( - error=utils.unmarshal_json(http_res.text, Optional[errors.Error]), + error=utils.unmarshal_json(http_res.text, Optional[components.Error]), http_meta=components.HTTPMetadata(request=req, response=http_res), ) content_type = http_res.headers.get("Content-Type") + http_res_text = utils.stream_to_text(http_res) raise errors.SDKError( f"Unexpected response received (code: {http_res.status_code}, type: {content_type})", http_res.status_code, - http_res.text, + http_res_text, http_res, ) @@ -106,6 +111,7 @@ async def create_async( retries: OptionalNullable[utils.RetryConfig] = UNSET, server_url: Optional[str] = None, timeout_ms: Optional[int] = None, + http_headers: Optional[Mapping[str, str]] = None, ) -> operations.CreateRoomResponse: r"""Create a room @@ -115,6 +121,7 @@ async def create_async( :param retries: Override the default retry configuration for this method :param server_url: Override the default server URL for this method :param timeout_ms: Override the default request timeout configuration for this method in milliseconds + :param http_headers: Additional headers to set or replace on requests. """ base_url = None url_variables = None @@ -134,6 +141,7 @@ async def create_async( request_has_query_params=True, user_agent_header="user-agent", accept_header_value="application/json", + http_headers=http_headers, security=self.sdk_configuration.security, timeout_ms=timeout_ms, ) @@ -165,20 +173,22 @@ async def create_async( http_meta=components.HTTPMetadata(request=req, response=http_res), ) if utils.match_response(http_res, ["4XX", "5XX"], "*"): + http_res_text = await utils.stream_to_text_async(http_res) raise errors.SDKError( - "API error occurred", http_res.status_code, http_res.text, http_res + "API error occurred", http_res.status_code, http_res_text, http_res ) if utils.match_response(http_res, "default", "application/json"): return operations.CreateRoomResponse( - error=utils.unmarshal_json(http_res.text, Optional[errors.Error]), + error=utils.unmarshal_json(http_res.text, Optional[components.Error]), http_meta=components.HTTPMetadata(request=req, response=http_res), ) content_type = http_res.headers.get("Content-Type") + http_res_text = await utils.stream_to_text_async(http_res) raise errors.SDKError( f"Unexpected response received (code: {http_res.status_code}, type: {content_type})", http_res.status_code, - http_res.text, + http_res_text, http_res, ) @@ -192,6 +202,7 @@ def get( retries: OptionalNullable[utils.RetryConfig] = UNSET, server_url: Optional[str] = None, timeout_ms: Optional[int] = None, + http_headers: Optional[Mapping[str, str]] = None, ) -> operations.GetRoomResponse: r"""Retrieve a room @@ -199,6 +210,7 @@ def get( :param retries: Override the default retry configuration for this method :param server_url: Override the default server URL for this method :param timeout_ms: Override the default request timeout configuration for this method in milliseconds + :param http_headers: Additional headers to set or replace on requests. """ base_url = None url_variables = None @@ -223,6 +235,7 @@ def get( request_has_query_params=True, user_agent_header="user-agent", accept_header_value="application/json", + http_headers=http_headers, security=self.sdk_configuration.security, timeout_ms=timeout_ms, ) @@ -252,20 +265,22 @@ def get( http_meta=components.HTTPMetadata(request=req, response=http_res), ) if utils.match_response(http_res, ["4XX", "5XX"], "*"): + http_res_text = utils.stream_to_text(http_res) raise errors.SDKError( - "API error occurred", http_res.status_code, http_res.text, http_res + "API error occurred", http_res.status_code, http_res_text, http_res ) if utils.match_response(http_res, "default", "application/json"): return operations.GetRoomResponse( - error=utils.unmarshal_json(http_res.text, Optional[errors.Error]), + error=utils.unmarshal_json(http_res.text, Optional[components.Error]), http_meta=components.HTTPMetadata(request=req, response=http_res), ) content_type = http_res.headers.get("Content-Type") + http_res_text = utils.stream_to_text(http_res) raise errors.SDKError( f"Unexpected response received (code: {http_res.status_code}, type: {content_type})", http_res.status_code, - http_res.text, + http_res_text, http_res, ) @@ -279,6 +294,7 @@ async def get_async( retries: OptionalNullable[utils.RetryConfig] = UNSET, server_url: Optional[str] = None, timeout_ms: Optional[int] = None, + http_headers: Optional[Mapping[str, str]] = None, ) -> operations.GetRoomResponse: r"""Retrieve a room @@ -286,6 +302,7 @@ async def get_async( :param retries: Override the default retry configuration for this method :param server_url: Override the default server URL for this method :param timeout_ms: Override the default request timeout configuration for this method in milliseconds + :param http_headers: Additional headers to set or replace on requests. """ base_url = None url_variables = None @@ -310,6 +327,7 @@ async def get_async( request_has_query_params=True, user_agent_header="user-agent", accept_header_value="application/json", + http_headers=http_headers, security=self.sdk_configuration.security, timeout_ms=timeout_ms, ) @@ -339,20 +357,22 @@ async def get_async( http_meta=components.HTTPMetadata(request=req, response=http_res), ) if utils.match_response(http_res, ["4XX", "5XX"], "*"): + http_res_text = await utils.stream_to_text_async(http_res) raise errors.SDKError( - "API error occurred", http_res.status_code, http_res.text, http_res + "API error occurred", http_res.status_code, http_res_text, http_res ) if utils.match_response(http_res, "default", "application/json"): return operations.GetRoomResponse( - error=utils.unmarshal_json(http_res.text, Optional[errors.Error]), + error=utils.unmarshal_json(http_res.text, Optional[components.Error]), http_meta=components.HTTPMetadata(request=req, response=http_res), ) content_type = http_res.headers.get("Content-Type") + http_res_text = await utils.stream_to_text_async(http_res) raise errors.SDKError( f"Unexpected response received (code: {http_res.status_code}, type: {content_type})", http_res.status_code, - http_res.text, + http_res_text, http_res, ) @@ -366,6 +386,7 @@ def delete( retries: OptionalNullable[utils.RetryConfig] = UNSET, server_url: Optional[str] = None, timeout_ms: Optional[int] = None, + http_headers: Optional[Mapping[str, str]] = None, ) -> operations.DeleteRoomResponse: r"""Delete a room @@ -373,6 +394,7 @@ def delete( :param retries: Override the default retry configuration for this method :param server_url: Override the default server URL for this method :param timeout_ms: Override the default request timeout configuration for this method in milliseconds + :param http_headers: Additional headers to set or replace on requests. """ base_url = None url_variables = None @@ -397,6 +419,7 @@ def delete( request_has_query_params=True, user_agent_header="user-agent", accept_header_value="application/json", + http_headers=http_headers, security=self.sdk_configuration.security, timeout_ms=timeout_ms, ) @@ -425,20 +448,22 @@ def delete( http_meta=components.HTTPMetadata(request=req, response=http_res) ) if utils.match_response(http_res, ["4XX", "5XX"], "*"): + http_res_text = utils.stream_to_text(http_res) raise errors.SDKError( - "API error occurred", http_res.status_code, http_res.text, http_res + "API error occurred", http_res.status_code, http_res_text, http_res ) if utils.match_response(http_res, "default", "application/json"): return operations.DeleteRoomResponse( - error=utils.unmarshal_json(http_res.text, Optional[errors.Error]), + error=utils.unmarshal_json(http_res.text, Optional[components.Error]), http_meta=components.HTTPMetadata(request=req, response=http_res), ) content_type = http_res.headers.get("Content-Type") + http_res_text = utils.stream_to_text(http_res) raise errors.SDKError( f"Unexpected response received (code: {http_res.status_code}, type: {content_type})", http_res.status_code, - http_res.text, + http_res_text, http_res, ) @@ -452,6 +477,7 @@ async def delete_async( retries: OptionalNullable[utils.RetryConfig] = UNSET, server_url: Optional[str] = None, timeout_ms: Optional[int] = None, + http_headers: Optional[Mapping[str, str]] = None, ) -> operations.DeleteRoomResponse: r"""Delete a room @@ -459,6 +485,7 @@ async def delete_async( :param retries: Override the default retry configuration for this method :param server_url: Override the default server URL for this method :param timeout_ms: Override the default request timeout configuration for this method in milliseconds + :param http_headers: Additional headers to set or replace on requests. """ base_url = None url_variables = None @@ -483,6 +510,7 @@ async def delete_async( request_has_query_params=True, user_agent_header="user-agent", accept_header_value="application/json", + http_headers=http_headers, security=self.sdk_configuration.security, timeout_ms=timeout_ms, ) @@ -511,20 +539,22 @@ async def delete_async( http_meta=components.HTTPMetadata(request=req, response=http_res) ) if utils.match_response(http_res, ["4XX", "5XX"], "*"): + http_res_text = await utils.stream_to_text_async(http_res) raise errors.SDKError( - "API error occurred", http_res.status_code, http_res.text, http_res + "API error occurred", http_res.status_code, http_res_text, http_res ) if utils.match_response(http_res, "default", "application/json"): return operations.DeleteRoomResponse( - error=utils.unmarshal_json(http_res.text, Optional[errors.Error]), + error=utils.unmarshal_json(http_res.text, Optional[components.Error]), http_meta=components.HTTPMetadata(request=req, response=http_res), ) content_type = http_res.headers.get("Content-Type") + http_res_text = await utils.stream_to_text_async(http_res) raise errors.SDKError( f"Unexpected response received (code: {http_res.status_code}, type: {content_type})", http_res.status_code, - http_res.text, + http_res_text, http_res, ) @@ -541,6 +571,7 @@ def start_egress( retries: OptionalNullable[utils.RetryConfig] = UNSET, server_url: Optional[str] = None, timeout_ms: Optional[int] = None, + http_headers: Optional[Mapping[str, str]] = None, ) -> operations.StartRoomEgressResponse: r"""Start room RTMP egress @@ -553,6 +584,7 @@ def start_egress( :param retries: Override the default retry configuration for this method :param server_url: Override the default server URL for this method :param timeout_ms: Override the default request timeout configuration for this method in milliseconds + :param http_headers: Additional headers to set or replace on requests. """ base_url = None url_variables = None @@ -580,6 +612,7 @@ def start_egress( request_has_query_params=True, user_agent_header="user-agent", accept_header_value="application/json", + http_headers=http_headers, security=self.sdk_configuration.security, get_serialized_body=lambda: utils.serialize_request_body( request.room_egress_payload, @@ -615,20 +648,22 @@ def start_egress( http_meta=components.HTTPMetadata(request=req, response=http_res) ) if utils.match_response(http_res, ["4XX", "5XX"], "*"): + http_res_text = utils.stream_to_text(http_res) raise errors.SDKError( - "API error occurred", http_res.status_code, http_res.text, http_res + "API error occurred", http_res.status_code, http_res_text, http_res ) if utils.match_response(http_res, "default", "application/json"): return operations.StartRoomEgressResponse( - error=utils.unmarshal_json(http_res.text, Optional[errors.Error]), + error=utils.unmarshal_json(http_res.text, Optional[components.Error]), http_meta=components.HTTPMetadata(request=req, response=http_res), ) content_type = http_res.headers.get("Content-Type") + http_res_text = utils.stream_to_text(http_res) raise errors.SDKError( f"Unexpected response received (code: {http_res.status_code}, type: {content_type})", http_res.status_code, - http_res.text, + http_res_text, http_res, ) @@ -645,6 +680,7 @@ async def start_egress_async( retries: OptionalNullable[utils.RetryConfig] = UNSET, server_url: Optional[str] = None, timeout_ms: Optional[int] = None, + http_headers: Optional[Mapping[str, str]] = None, ) -> operations.StartRoomEgressResponse: r"""Start room RTMP egress @@ -657,6 +693,7 @@ async def start_egress_async( :param retries: Override the default retry configuration for this method :param server_url: Override the default server URL for this method :param timeout_ms: Override the default request timeout configuration for this method in milliseconds + :param http_headers: Additional headers to set or replace on requests. """ base_url = None url_variables = None @@ -684,6 +721,7 @@ async def start_egress_async( request_has_query_params=True, user_agent_header="user-agent", accept_header_value="application/json", + http_headers=http_headers, security=self.sdk_configuration.security, get_serialized_body=lambda: utils.serialize_request_body( request.room_egress_payload, @@ -719,20 +757,22 @@ async def start_egress_async( http_meta=components.HTTPMetadata(request=req, response=http_res) ) if utils.match_response(http_res, ["4XX", "5XX"], "*"): + http_res_text = await utils.stream_to_text_async(http_res) raise errors.SDKError( - "API error occurred", http_res.status_code, http_res.text, http_res + "API error occurred", http_res.status_code, http_res_text, http_res ) if utils.match_response(http_res, "default", "application/json"): return operations.StartRoomEgressResponse( - error=utils.unmarshal_json(http_res.text, Optional[errors.Error]), + error=utils.unmarshal_json(http_res.text, Optional[components.Error]), http_meta=components.HTTPMetadata(request=req, response=http_res), ) content_type = http_res.headers.get("Content-Type") + http_res_text = await utils.stream_to_text_async(http_res) raise errors.SDKError( f"Unexpected response received (code: {http_res.status_code}, type: {content_type})", http_res.status_code, - http_res.text, + http_res_text, http_res, ) @@ -746,6 +786,7 @@ def stop_egress( retries: OptionalNullable[utils.RetryConfig] = UNSET, server_url: Optional[str] = None, timeout_ms: Optional[int] = None, + http_headers: Optional[Mapping[str, str]] = None, ) -> operations.StopRoomEgressResponse: r"""Stop room RTMP egress @@ -753,6 +794,7 @@ def stop_egress( :param retries: Override the default retry configuration for this method :param server_url: Override the default server URL for this method :param timeout_ms: Override the default request timeout configuration for this method in milliseconds + :param http_headers: Additional headers to set or replace on requests. """ base_url = None url_variables = None @@ -777,6 +819,7 @@ def stop_egress( request_has_query_params=True, user_agent_header="user-agent", accept_header_value="application/json", + http_headers=http_headers, security=self.sdk_configuration.security, timeout_ms=timeout_ms, ) @@ -805,20 +848,22 @@ def stop_egress( http_meta=components.HTTPMetadata(request=req, response=http_res) ) if utils.match_response(http_res, ["4XX", "5XX"], "*"): + http_res_text = utils.stream_to_text(http_res) raise errors.SDKError( - "API error occurred", http_res.status_code, http_res.text, http_res + "API error occurred", http_res.status_code, http_res_text, http_res ) if utils.match_response(http_res, "default", "application/json"): return operations.StopRoomEgressResponse( - error=utils.unmarshal_json(http_res.text, Optional[errors.Error]), + error=utils.unmarshal_json(http_res.text, Optional[components.Error]), http_meta=components.HTTPMetadata(request=req, response=http_res), ) content_type = http_res.headers.get("Content-Type") + http_res_text = utils.stream_to_text(http_res) raise errors.SDKError( f"Unexpected response received (code: {http_res.status_code}, type: {content_type})", http_res.status_code, - http_res.text, + http_res_text, http_res, ) @@ -832,6 +877,7 @@ async def stop_egress_async( retries: OptionalNullable[utils.RetryConfig] = UNSET, server_url: Optional[str] = None, timeout_ms: Optional[int] = None, + http_headers: Optional[Mapping[str, str]] = None, ) -> operations.StopRoomEgressResponse: r"""Stop room RTMP egress @@ -839,6 +885,7 @@ async def stop_egress_async( :param retries: Override the default retry configuration for this method :param server_url: Override the default server URL for this method :param timeout_ms: Override the default request timeout configuration for this method in milliseconds + :param http_headers: Additional headers to set or replace on requests. """ base_url = None url_variables = None @@ -863,6 +910,7 @@ async def stop_egress_async( request_has_query_params=True, user_agent_header="user-agent", accept_header_value="application/json", + http_headers=http_headers, security=self.sdk_configuration.security, timeout_ms=timeout_ms, ) @@ -891,20 +939,22 @@ async def stop_egress_async( http_meta=components.HTTPMetadata(request=req, response=http_res) ) if utils.match_response(http_res, ["4XX", "5XX"], "*"): + http_res_text = await utils.stream_to_text_async(http_res) raise errors.SDKError( - "API error occurred", http_res.status_code, http_res.text, http_res + "API error occurred", http_res.status_code, http_res_text, http_res ) if utils.match_response(http_res, "default", "application/json"): return operations.StopRoomEgressResponse( - error=utils.unmarshal_json(http_res.text, Optional[errors.Error]), + error=utils.unmarshal_json(http_res.text, Optional[components.Error]), http_meta=components.HTTPMetadata(request=req, response=http_res), ) content_type = http_res.headers.get("Content-Type") + http_res_text = await utils.stream_to_text_async(http_res) raise errors.SDKError( f"Unexpected response received (code: {http_res.status_code}, type: {content_type})", http_res.status_code, - http_res.text, + http_res_text, http_res, ) @@ -921,6 +971,7 @@ def create_user( retries: OptionalNullable[utils.RetryConfig] = UNSET, server_url: Optional[str] = None, timeout_ms: Optional[int] = None, + http_headers: Optional[Mapping[str, str]] = None, ) -> operations.CreateRoomUserResponse: r"""Create a room user @@ -934,6 +985,7 @@ def create_user( :param retries: Override the default retry configuration for this method :param server_url: Override the default server URL for this method :param timeout_ms: Override the default request timeout configuration for this method in milliseconds + :param http_headers: Additional headers to set or replace on requests. """ base_url = None url_variables = None @@ -961,6 +1013,7 @@ def create_user( request_has_query_params=True, user_agent_header="user-agent", accept_header_value="application/json", + http_headers=http_headers, security=self.sdk_configuration.security, get_serialized_body=lambda: utils.serialize_request_body( request.room_user_payload, @@ -999,20 +1052,22 @@ def create_user( http_meta=components.HTTPMetadata(request=req, response=http_res), ) if utils.match_response(http_res, ["4XX", "5XX"], "*"): + http_res_text = utils.stream_to_text(http_res) raise errors.SDKError( - "API error occurred", http_res.status_code, http_res.text, http_res + "API error occurred", http_res.status_code, http_res_text, http_res ) if utils.match_response(http_res, "default", "application/json"): return operations.CreateRoomUserResponse( - error=utils.unmarshal_json(http_res.text, Optional[errors.Error]), + error=utils.unmarshal_json(http_res.text, Optional[components.Error]), http_meta=components.HTTPMetadata(request=req, response=http_res), ) content_type = http_res.headers.get("Content-Type") + http_res_text = utils.stream_to_text(http_res) raise errors.SDKError( f"Unexpected response received (code: {http_res.status_code}, type: {content_type})", http_res.status_code, - http_res.text, + http_res_text, http_res, ) @@ -1029,6 +1084,7 @@ async def create_user_async( retries: OptionalNullable[utils.RetryConfig] = UNSET, server_url: Optional[str] = None, timeout_ms: Optional[int] = None, + http_headers: Optional[Mapping[str, str]] = None, ) -> operations.CreateRoomUserResponse: r"""Create a room user @@ -1042,6 +1098,7 @@ async def create_user_async( :param retries: Override the default retry configuration for this method :param server_url: Override the default server URL for this method :param timeout_ms: Override the default request timeout configuration for this method in milliseconds + :param http_headers: Additional headers to set or replace on requests. """ base_url = None url_variables = None @@ -1069,6 +1126,7 @@ async def create_user_async( request_has_query_params=True, user_agent_header="user-agent", accept_header_value="application/json", + http_headers=http_headers, security=self.sdk_configuration.security, get_serialized_body=lambda: utils.serialize_request_body( request.room_user_payload, @@ -1107,20 +1165,22 @@ async def create_user_async( http_meta=components.HTTPMetadata(request=req, response=http_res), ) if utils.match_response(http_res, ["4XX", "5XX"], "*"): + http_res_text = await utils.stream_to_text_async(http_res) raise errors.SDKError( - "API error occurred", http_res.status_code, http_res.text, http_res + "API error occurred", http_res.status_code, http_res_text, http_res ) if utils.match_response(http_res, "default", "application/json"): return operations.CreateRoomUserResponse( - error=utils.unmarshal_json(http_res.text, Optional[errors.Error]), + error=utils.unmarshal_json(http_res.text, Optional[components.Error]), http_meta=components.HTTPMetadata(request=req, response=http_res), ) content_type = http_res.headers.get("Content-Type") + http_res_text = await utils.stream_to_text_async(http_res) raise errors.SDKError( f"Unexpected response received (code: {http_res.status_code}, type: {content_type})", http_res.status_code, - http_res.text, + http_res_text, http_res, ) @@ -1135,6 +1195,7 @@ def get_user( retries: OptionalNullable[utils.RetryConfig] = UNSET, server_url: Optional[str] = None, timeout_ms: Optional[int] = None, + http_headers: Optional[Mapping[str, str]] = None, ) -> operations.GetRoomUserResponse: r"""Get user details @@ -1143,6 +1204,7 @@ def get_user( :param retries: Override the default retry configuration for this method :param server_url: Override the default server URL for this method :param timeout_ms: Override the default request timeout configuration for this method in milliseconds + :param http_headers: Additional headers to set or replace on requests. """ base_url = None url_variables = None @@ -1168,6 +1230,7 @@ def get_user( request_has_query_params=True, user_agent_header="user-agent", accept_header_value="application/json", + http_headers=http_headers, security=self.sdk_configuration.security, timeout_ms=timeout_ms, ) @@ -1199,20 +1262,22 @@ def get_user( http_meta=components.HTTPMetadata(request=req, response=http_res), ) if utils.match_response(http_res, ["4XX", "5XX"], "*"): + http_res_text = utils.stream_to_text(http_res) raise errors.SDKError( - "API error occurred", http_res.status_code, http_res.text, http_res + "API error occurred", http_res.status_code, http_res_text, http_res ) if utils.match_response(http_res, "default", "application/json"): return operations.GetRoomUserResponse( - error=utils.unmarshal_json(http_res.text, Optional[errors.Error]), + error=utils.unmarshal_json(http_res.text, Optional[components.Error]), http_meta=components.HTTPMetadata(request=req, response=http_res), ) content_type = http_res.headers.get("Content-Type") + http_res_text = utils.stream_to_text(http_res) raise errors.SDKError( f"Unexpected response received (code: {http_res.status_code}, type: {content_type})", http_res.status_code, - http_res.text, + http_res_text, http_res, ) @@ -1227,6 +1292,7 @@ async def get_user_async( retries: OptionalNullable[utils.RetryConfig] = UNSET, server_url: Optional[str] = None, timeout_ms: Optional[int] = None, + http_headers: Optional[Mapping[str, str]] = None, ) -> operations.GetRoomUserResponse: r"""Get user details @@ -1235,6 +1301,7 @@ async def get_user_async( :param retries: Override the default retry configuration for this method :param server_url: Override the default server URL for this method :param timeout_ms: Override the default request timeout configuration for this method in milliseconds + :param http_headers: Additional headers to set or replace on requests. """ base_url = None url_variables = None @@ -1260,6 +1327,7 @@ async def get_user_async( request_has_query_params=True, user_agent_header="user-agent", accept_header_value="application/json", + http_headers=http_headers, security=self.sdk_configuration.security, timeout_ms=timeout_ms, ) @@ -1291,20 +1359,22 @@ async def get_user_async( http_meta=components.HTTPMetadata(request=req, response=http_res), ) if utils.match_response(http_res, ["4XX", "5XX"], "*"): + http_res_text = await utils.stream_to_text_async(http_res) raise errors.SDKError( - "API error occurred", http_res.status_code, http_res.text, http_res + "API error occurred", http_res.status_code, http_res_text, http_res ) if utils.match_response(http_res, "default", "application/json"): return operations.GetRoomUserResponse( - error=utils.unmarshal_json(http_res.text, Optional[errors.Error]), + error=utils.unmarshal_json(http_res.text, Optional[components.Error]), http_meta=components.HTTPMetadata(request=req, response=http_res), ) content_type = http_res.headers.get("Content-Type") + http_res_text = await utils.stream_to_text_async(http_res) raise errors.SDKError( f"Unexpected response received (code: {http_res.status_code}, type: {content_type})", http_res.status_code, - http_res.text, + http_res_text, http_res, ) @@ -1322,6 +1392,7 @@ def update_user( retries: OptionalNullable[utils.RetryConfig] = UNSET, server_url: Optional[str] = None, timeout_ms: Optional[int] = None, + http_headers: Optional[Mapping[str, str]] = None, ) -> operations.UpdateRoomUserResponse: r"""Update a room user @@ -1333,6 +1404,7 @@ def update_user( :param retries: Override the default retry configuration for this method :param server_url: Override the default server URL for this method :param timeout_ms: Override the default request timeout configuration for this method in milliseconds + :param http_headers: Additional headers to set or replace on requests. """ base_url = None url_variables = None @@ -1361,6 +1433,7 @@ def update_user( request_has_query_params=True, user_agent_header="user-agent", accept_header_value="application/json", + http_headers=http_headers, security=self.sdk_configuration.security, get_serialized_body=lambda: utils.serialize_request_body( request.room_user_update_payload, @@ -1396,20 +1469,22 @@ def update_user( http_meta=components.HTTPMetadata(request=req, response=http_res) ) if utils.match_response(http_res, ["4XX", "5XX"], "*"): + http_res_text = utils.stream_to_text(http_res) raise errors.SDKError( - "API error occurred", http_res.status_code, http_res.text, http_res + "API error occurred", http_res.status_code, http_res_text, http_res ) if utils.match_response(http_res, "default", "application/json"): return operations.UpdateRoomUserResponse( - error=utils.unmarshal_json(http_res.text, Optional[errors.Error]), + error=utils.unmarshal_json(http_res.text, Optional[components.Error]), http_meta=components.HTTPMetadata(request=req, response=http_res), ) content_type = http_res.headers.get("Content-Type") + http_res_text = utils.stream_to_text(http_res) raise errors.SDKError( f"Unexpected response received (code: {http_res.status_code}, type: {content_type})", http_res.status_code, - http_res.text, + http_res_text, http_res, ) @@ -1427,6 +1502,7 @@ async def update_user_async( retries: OptionalNullable[utils.RetryConfig] = UNSET, server_url: Optional[str] = None, timeout_ms: Optional[int] = None, + http_headers: Optional[Mapping[str, str]] = None, ) -> operations.UpdateRoomUserResponse: r"""Update a room user @@ -1438,6 +1514,7 @@ async def update_user_async( :param retries: Override the default retry configuration for this method :param server_url: Override the default server URL for this method :param timeout_ms: Override the default request timeout configuration for this method in milliseconds + :param http_headers: Additional headers to set or replace on requests. """ base_url = None url_variables = None @@ -1466,6 +1543,7 @@ async def update_user_async( request_has_query_params=True, user_agent_header="user-agent", accept_header_value="application/json", + http_headers=http_headers, security=self.sdk_configuration.security, get_serialized_body=lambda: utils.serialize_request_body( request.room_user_update_payload, @@ -1501,20 +1579,22 @@ async def update_user_async( http_meta=components.HTTPMetadata(request=req, response=http_res) ) if utils.match_response(http_res, ["4XX", "5XX"], "*"): + http_res_text = await utils.stream_to_text_async(http_res) raise errors.SDKError( - "API error occurred", http_res.status_code, http_res.text, http_res + "API error occurred", http_res.status_code, http_res_text, http_res ) if utils.match_response(http_res, "default", "application/json"): return operations.UpdateRoomUserResponse( - error=utils.unmarshal_json(http_res.text, Optional[errors.Error]), + error=utils.unmarshal_json(http_res.text, Optional[components.Error]), http_meta=components.HTTPMetadata(request=req, response=http_res), ) content_type = http_res.headers.get("Content-Type") + http_res_text = await utils.stream_to_text_async(http_res) raise errors.SDKError( f"Unexpected response received (code: {http_res.status_code}, type: {content_type})", http_res.status_code, - http_res.text, + http_res_text, http_res, ) @@ -1529,6 +1609,7 @@ def delete_user( retries: OptionalNullable[utils.RetryConfig] = UNSET, server_url: Optional[str] = None, timeout_ms: Optional[int] = None, + http_headers: Optional[Mapping[str, str]] = None, ) -> operations.DeleteRoomUserResponse: r"""Remove a user from the room @@ -1537,6 +1618,7 @@ def delete_user( :param retries: Override the default retry configuration for this method :param server_url: Override the default server URL for this method :param timeout_ms: Override the default request timeout configuration for this method in milliseconds + :param http_headers: Additional headers to set or replace on requests. """ base_url = None url_variables = None @@ -1562,6 +1644,7 @@ def delete_user( request_has_query_params=True, user_agent_header="user-agent", accept_header_value="application/json", + http_headers=http_headers, security=self.sdk_configuration.security, timeout_ms=timeout_ms, ) @@ -1590,20 +1673,22 @@ def delete_user( http_meta=components.HTTPMetadata(request=req, response=http_res) ) if utils.match_response(http_res, ["4XX", "5XX"], "*"): + http_res_text = utils.stream_to_text(http_res) raise errors.SDKError( - "API error occurred", http_res.status_code, http_res.text, http_res + "API error occurred", http_res.status_code, http_res_text, http_res ) if utils.match_response(http_res, "default", "application/json"): return operations.DeleteRoomUserResponse( - error=utils.unmarshal_json(http_res.text, Optional[errors.Error]), + error=utils.unmarshal_json(http_res.text, Optional[components.Error]), http_meta=components.HTTPMetadata(request=req, response=http_res), ) content_type = http_res.headers.get("Content-Type") + http_res_text = utils.stream_to_text(http_res) raise errors.SDKError( f"Unexpected response received (code: {http_res.status_code}, type: {content_type})", http_res.status_code, - http_res.text, + http_res_text, http_res, ) @@ -1618,6 +1703,7 @@ async def delete_user_async( retries: OptionalNullable[utils.RetryConfig] = UNSET, server_url: Optional[str] = None, timeout_ms: Optional[int] = None, + http_headers: Optional[Mapping[str, str]] = None, ) -> operations.DeleteRoomUserResponse: r"""Remove a user from the room @@ -1626,6 +1712,7 @@ async def delete_user_async( :param retries: Override the default retry configuration for this method :param server_url: Override the default server URL for this method :param timeout_ms: Override the default request timeout configuration for this method in milliseconds + :param http_headers: Additional headers to set or replace on requests. """ base_url = None url_variables = None @@ -1651,6 +1738,7 @@ async def delete_user_async( request_has_query_params=True, user_agent_header="user-agent", accept_header_value="application/json", + http_headers=http_headers, security=self.sdk_configuration.security, timeout_ms=timeout_ms, ) @@ -1679,19 +1767,21 @@ async def delete_user_async( http_meta=components.HTTPMetadata(request=req, response=http_res) ) if utils.match_response(http_res, ["4XX", "5XX"], "*"): + http_res_text = await utils.stream_to_text_async(http_res) raise errors.SDKError( - "API error occurred", http_res.status_code, http_res.text, http_res + "API error occurred", http_res.status_code, http_res_text, http_res ) if utils.match_response(http_res, "default", "application/json"): return operations.DeleteRoomUserResponse( - error=utils.unmarshal_json(http_res.text, Optional[errors.Error]), + error=utils.unmarshal_json(http_res.text, Optional[components.Error]), http_meta=components.HTTPMetadata(request=req, response=http_res), ) content_type = http_res.headers.get("Content-Type") + http_res_text = await utils.stream_to_text_async(http_res) raise errors.SDKError( f"Unexpected response received (code: {http_res.status_code}, type: {content_type})", http_res.status_code, - http_res.text, + http_res_text, http_res, ) diff --git a/src/livepeer/sdk.py b/src/livepeer/sdk.py index faf0ec6..01c2cf7 100644 --- a/src/livepeer/sdk.py +++ b/src/livepeer/sdk.py @@ -148,3 +148,17 @@ def _init_sdks(self): self.transcode = Transcode(self.sdk_configuration) self.playback = Playback(self.sdk_configuration) self.generate = Generate(self.sdk_configuration) + + def __enter__(self): + return self + + async def __aenter__(self): + return self + + def __exit__(self, exc_type, exc_val, exc_tb): + if self.sdk_configuration.client is not None: + self.sdk_configuration.client.close() + + async def __aexit__(self, exc_type, exc_val, exc_tb): + if self.sdk_configuration.async_client is not None: + await self.sdk_configuration.async_client.aclose() diff --git a/src/livepeer/sdkconfiguration.py b/src/livepeer/sdkconfiguration.py index beaa6e3..0f0845f 100644 --- a/src/livepeer/sdkconfiguration.py +++ b/src/livepeer/sdkconfiguration.py @@ -28,9 +28,9 @@ class SDKConfiguration: server_idx: Optional[int] = 0 language: str = "python" openapi_doc_version: str = "1.0.0" - sdk_version: str = "0.3.0" - gen_version: str = "2.415.8" - user_agent: str = "speakeasy-sdk/python 0.3.0 2.415.8 1.0.0 livepeer" + sdk_version: str = "0.4.0" + gen_version: str = "2.479.3" + user_agent: str = "speakeasy-sdk/python 0.4.0 2.479.3 1.0.0 livepeer" retry_config: OptionalNullable[RetryConfig] = Field(default_factory=lambda: UNSET) timeout_ms: Optional[int] = None diff --git a/src/livepeer/session.py b/src/livepeer/session.py index 114b844..33ab1b7 100644 --- a/src/livepeer/session.py +++ b/src/livepeer/session.py @@ -5,7 +5,7 @@ from livepeer._hooks import HookContext from livepeer.models import components, errors, operations from livepeer.types import OptionalNullable, UNSET -from typing import List, Optional, Union +from typing import List, Mapping, Optional, Union class Session(BaseSDK): @@ -18,6 +18,7 @@ def get_clips( retries: OptionalNullable[utils.RetryConfig] = UNSET, server_url: Optional[str] = None, timeout_ms: Optional[int] = None, + http_headers: Optional[Mapping[str, str]] = None, ) -> operations.GetSessionClipsResponse: r"""Retrieve clips of a session @@ -25,6 +26,7 @@ def get_clips( :param retries: Override the default retry configuration for this method :param server_url: Override the default server URL for this method :param timeout_ms: Override the default request timeout configuration for this method in milliseconds + :param http_headers: Additional headers to set or replace on requests. """ base_url = None url_variables = None @@ -49,6 +51,7 @@ def get_clips( request_has_query_params=True, user_agent_header="user-agent", accept_header_value="application/json", + http_headers=http_headers, security=self.sdk_configuration.security, timeout_ms=timeout_ms, ) @@ -80,20 +83,22 @@ def get_clips( http_meta=components.HTTPMetadata(request=req, response=http_res), ) if utils.match_response(http_res, ["4XX", "5XX"], "*"): + http_res_text = utils.stream_to_text(http_res) raise errors.SDKError( - "API error occurred", http_res.status_code, http_res.text, http_res + "API error occurred", http_res.status_code, http_res_text, http_res ) if utils.match_response(http_res, "default", "application/json"): return operations.GetSessionClipsResponse( - error=utils.unmarshal_json(http_res.text, Optional[errors.Error]), + error=utils.unmarshal_json(http_res.text, Optional[components.Error]), http_meta=components.HTTPMetadata(request=req, response=http_res), ) content_type = http_res.headers.get("Content-Type") + http_res_text = utils.stream_to_text(http_res) raise errors.SDKError( f"Unexpected response received (code: {http_res.status_code}, type: {content_type})", http_res.status_code, - http_res.text, + http_res_text, http_res, ) @@ -104,6 +109,7 @@ async def get_clips_async( retries: OptionalNullable[utils.RetryConfig] = UNSET, server_url: Optional[str] = None, timeout_ms: Optional[int] = None, + http_headers: Optional[Mapping[str, str]] = None, ) -> operations.GetSessionClipsResponse: r"""Retrieve clips of a session @@ -111,6 +117,7 @@ async def get_clips_async( :param retries: Override the default retry configuration for this method :param server_url: Override the default server URL for this method :param timeout_ms: Override the default request timeout configuration for this method in milliseconds + :param http_headers: Additional headers to set or replace on requests. """ base_url = None url_variables = None @@ -135,6 +142,7 @@ async def get_clips_async( request_has_query_params=True, user_agent_header="user-agent", accept_header_value="application/json", + http_headers=http_headers, security=self.sdk_configuration.security, timeout_ms=timeout_ms, ) @@ -166,20 +174,22 @@ async def get_clips_async( http_meta=components.HTTPMetadata(request=req, response=http_res), ) if utils.match_response(http_res, ["4XX", "5XX"], "*"): + http_res_text = await utils.stream_to_text_async(http_res) raise errors.SDKError( - "API error occurred", http_res.status_code, http_res.text, http_res + "API error occurred", http_res.status_code, http_res_text, http_res ) if utils.match_response(http_res, "default", "application/json"): return operations.GetSessionClipsResponse( - error=utils.unmarshal_json(http_res.text, Optional[errors.Error]), + error=utils.unmarshal_json(http_res.text, Optional[components.Error]), http_meta=components.HTTPMetadata(request=req, response=http_res), ) content_type = http_res.headers.get("Content-Type") + http_res_text = await utils.stream_to_text_async(http_res) raise errors.SDKError( f"Unexpected response received (code: {http_res.status_code}, type: {content_type})", http_res.status_code, - http_res.text, + http_res_text, http_res, ) @@ -189,12 +199,14 @@ def get_all( retries: OptionalNullable[utils.RetryConfig] = UNSET, server_url: Optional[str] = None, timeout_ms: Optional[int] = None, + http_headers: Optional[Mapping[str, str]] = None, ) -> operations.GetSessionsResponse: r"""Retrieve sessions :param retries: Override the default retry configuration for this method :param server_url: Override the default server URL for this method :param timeout_ms: Override the default request timeout configuration for this method in milliseconds + :param http_headers: Additional headers to set or replace on requests. """ base_url = None url_variables = None @@ -214,6 +226,7 @@ def get_all( request_has_query_params=True, user_agent_header="user-agent", accept_header_value="application/json", + http_headers=http_headers, security=self.sdk_configuration.security, timeout_ms=timeout_ms, ) @@ -245,20 +258,22 @@ def get_all( http_meta=components.HTTPMetadata(request=req, response=http_res), ) if utils.match_response(http_res, ["4XX", "5XX"], "*"): + http_res_text = utils.stream_to_text(http_res) raise errors.SDKError( - "API error occurred", http_res.status_code, http_res.text, http_res + "API error occurred", http_res.status_code, http_res_text, http_res ) if utils.match_response(http_res, "default", "application/json"): return operations.GetSessionsResponse( - error=utils.unmarshal_json(http_res.text, Optional[errors.Error]), + error=utils.unmarshal_json(http_res.text, Optional[components.Error]), http_meta=components.HTTPMetadata(request=req, response=http_res), ) content_type = http_res.headers.get("Content-Type") + http_res_text = utils.stream_to_text(http_res) raise errors.SDKError( f"Unexpected response received (code: {http_res.status_code}, type: {content_type})", http_res.status_code, - http_res.text, + http_res_text, http_res, ) @@ -268,12 +283,14 @@ async def get_all_async( retries: OptionalNullable[utils.RetryConfig] = UNSET, server_url: Optional[str] = None, timeout_ms: Optional[int] = None, + http_headers: Optional[Mapping[str, str]] = None, ) -> operations.GetSessionsResponse: r"""Retrieve sessions :param retries: Override the default retry configuration for this method :param server_url: Override the default server URL for this method :param timeout_ms: Override the default request timeout configuration for this method in milliseconds + :param http_headers: Additional headers to set or replace on requests. """ base_url = None url_variables = None @@ -293,6 +310,7 @@ async def get_all_async( request_has_query_params=True, user_agent_header="user-agent", accept_header_value="application/json", + http_headers=http_headers, security=self.sdk_configuration.security, timeout_ms=timeout_ms, ) @@ -324,20 +342,22 @@ async def get_all_async( http_meta=components.HTTPMetadata(request=req, response=http_res), ) if utils.match_response(http_res, ["4XX", "5XX"], "*"): + http_res_text = await utils.stream_to_text_async(http_res) raise errors.SDKError( - "API error occurred", http_res.status_code, http_res.text, http_res + "API error occurred", http_res.status_code, http_res_text, http_res ) if utils.match_response(http_res, "default", "application/json"): return operations.GetSessionsResponse( - error=utils.unmarshal_json(http_res.text, Optional[errors.Error]), + error=utils.unmarshal_json(http_res.text, Optional[components.Error]), http_meta=components.HTTPMetadata(request=req, response=http_res), ) content_type = http_res.headers.get("Content-Type") + http_res_text = await utils.stream_to_text_async(http_res) raise errors.SDKError( f"Unexpected response received (code: {http_res.status_code}, type: {content_type})", http_res.status_code, - http_res.text, + http_res_text, http_res, ) @@ -348,6 +368,7 @@ def get( retries: OptionalNullable[utils.RetryConfig] = UNSET, server_url: Optional[str] = None, timeout_ms: Optional[int] = None, + http_headers: Optional[Mapping[str, str]] = None, ) -> operations.GetSessionResponse: r"""Retrieve a session @@ -355,6 +376,7 @@ def get( :param retries: Override the default retry configuration for this method :param server_url: Override the default server URL for this method :param timeout_ms: Override the default request timeout configuration for this method in milliseconds + :param http_headers: Additional headers to set or replace on requests. """ base_url = None url_variables = None @@ -379,6 +401,7 @@ def get( request_has_query_params=True, user_agent_header="user-agent", accept_header_value="application/json", + http_headers=http_headers, security=self.sdk_configuration.security, timeout_ms=timeout_ms, ) @@ -410,20 +433,22 @@ def get( http_meta=components.HTTPMetadata(request=req, response=http_res), ) if utils.match_response(http_res, ["4XX", "5XX"], "*"): + http_res_text = utils.stream_to_text(http_res) raise errors.SDKError( - "API error occurred", http_res.status_code, http_res.text, http_res + "API error occurred", http_res.status_code, http_res_text, http_res ) if utils.match_response(http_res, "default", "application/json"): return operations.GetSessionResponse( - error=utils.unmarshal_json(http_res.text, Optional[errors.Error]), + error=utils.unmarshal_json(http_res.text, Optional[components.Error]), http_meta=components.HTTPMetadata(request=req, response=http_res), ) content_type = http_res.headers.get("Content-Type") + http_res_text = utils.stream_to_text(http_res) raise errors.SDKError( f"Unexpected response received (code: {http_res.status_code}, type: {content_type})", http_res.status_code, - http_res.text, + http_res_text, http_res, ) @@ -434,6 +459,7 @@ async def get_async( retries: OptionalNullable[utils.RetryConfig] = UNSET, server_url: Optional[str] = None, timeout_ms: Optional[int] = None, + http_headers: Optional[Mapping[str, str]] = None, ) -> operations.GetSessionResponse: r"""Retrieve a session @@ -441,6 +467,7 @@ async def get_async( :param retries: Override the default retry configuration for this method :param server_url: Override the default server URL for this method :param timeout_ms: Override the default request timeout configuration for this method in milliseconds + :param http_headers: Additional headers to set or replace on requests. """ base_url = None url_variables = None @@ -465,6 +492,7 @@ async def get_async( request_has_query_params=True, user_agent_header="user-agent", accept_header_value="application/json", + http_headers=http_headers, security=self.sdk_configuration.security, timeout_ms=timeout_ms, ) @@ -496,20 +524,22 @@ async def get_async( http_meta=components.HTTPMetadata(request=req, response=http_res), ) if utils.match_response(http_res, ["4XX", "5XX"], "*"): + http_res_text = await utils.stream_to_text_async(http_res) raise errors.SDKError( - "API error occurred", http_res.status_code, http_res.text, http_res + "API error occurred", http_res.status_code, http_res_text, http_res ) if utils.match_response(http_res, "default", "application/json"): return operations.GetSessionResponse( - error=utils.unmarshal_json(http_res.text, Optional[errors.Error]), + error=utils.unmarshal_json(http_res.text, Optional[components.Error]), http_meta=components.HTTPMetadata(request=req, response=http_res), ) content_type = http_res.headers.get("Content-Type") + http_res_text = await utils.stream_to_text_async(http_res) raise errors.SDKError( f"Unexpected response received (code: {http_res.status_code}, type: {content_type})", http_res.status_code, - http_res.text, + http_res_text, http_res, ) @@ -521,6 +551,7 @@ def get_recorded( retries: OptionalNullable[utils.RetryConfig] = UNSET, server_url: Optional[str] = None, timeout_ms: Optional[int] = None, + http_headers: Optional[Mapping[str, str]] = None, ) -> operations.GetRecordedSessionsResponse: r"""Retrieve Recorded Sessions @@ -529,6 +560,7 @@ def get_recorded( :param retries: Override the default retry configuration for this method :param server_url: Override the default server URL for this method :param timeout_ms: Override the default request timeout configuration for this method in milliseconds + :param http_headers: Additional headers to set or replace on requests. """ base_url = None url_variables = None @@ -554,6 +586,7 @@ def get_recorded( request_has_query_params=True, user_agent_header="user-agent", accept_header_value="application/json", + http_headers=http_headers, security=self.sdk_configuration.security, timeout_ms=timeout_ms, ) @@ -585,20 +618,22 @@ def get_recorded( http_meta=components.HTTPMetadata(request=req, response=http_res), ) if utils.match_response(http_res, ["4XX", "5XX"], "*"): + http_res_text = utils.stream_to_text(http_res) raise errors.SDKError( - "API error occurred", http_res.status_code, http_res.text, http_res + "API error occurred", http_res.status_code, http_res_text, http_res ) if utils.match_response(http_res, "default", "application/json"): return operations.GetRecordedSessionsResponse( - error=utils.unmarshal_json(http_res.text, Optional[errors.Error]), + error=utils.unmarshal_json(http_res.text, Optional[components.Error]), http_meta=components.HTTPMetadata(request=req, response=http_res), ) content_type = http_res.headers.get("Content-Type") + http_res_text = utils.stream_to_text(http_res) raise errors.SDKError( f"Unexpected response received (code: {http_res.status_code}, type: {content_type})", http_res.status_code, - http_res.text, + http_res_text, http_res, ) @@ -610,6 +645,7 @@ async def get_recorded_async( retries: OptionalNullable[utils.RetryConfig] = UNSET, server_url: Optional[str] = None, timeout_ms: Optional[int] = None, + http_headers: Optional[Mapping[str, str]] = None, ) -> operations.GetRecordedSessionsResponse: r"""Retrieve Recorded Sessions @@ -618,6 +654,7 @@ async def get_recorded_async( :param retries: Override the default retry configuration for this method :param server_url: Override the default server URL for this method :param timeout_ms: Override the default request timeout configuration for this method in milliseconds + :param http_headers: Additional headers to set or replace on requests. """ base_url = None url_variables = None @@ -643,6 +680,7 @@ async def get_recorded_async( request_has_query_params=True, user_agent_header="user-agent", accept_header_value="application/json", + http_headers=http_headers, security=self.sdk_configuration.security, timeout_ms=timeout_ms, ) @@ -674,19 +712,21 @@ async def get_recorded_async( http_meta=components.HTTPMetadata(request=req, response=http_res), ) if utils.match_response(http_res, ["4XX", "5XX"], "*"): + http_res_text = await utils.stream_to_text_async(http_res) raise errors.SDKError( - "API error occurred", http_res.status_code, http_res.text, http_res + "API error occurred", http_res.status_code, http_res_text, http_res ) if utils.match_response(http_res, "default", "application/json"): return operations.GetRecordedSessionsResponse( - error=utils.unmarshal_json(http_res.text, Optional[errors.Error]), + error=utils.unmarshal_json(http_res.text, Optional[components.Error]), http_meta=components.HTTPMetadata(request=req, response=http_res), ) content_type = http_res.headers.get("Content-Type") + http_res_text = await utils.stream_to_text_async(http_res) raise errors.SDKError( f"Unexpected response received (code: {http_res.status_code}, type: {content_type})", http_res.status_code, - http_res.text, + http_res_text, http_res, ) diff --git a/src/livepeer/stream.py b/src/livepeer/stream.py index 973ca46..0dc581d 100644 --- a/src/livepeer/stream.py +++ b/src/livepeer/stream.py @@ -5,7 +5,7 @@ from livepeer._hooks import HookContext from livepeer.models import components, errors, operations from livepeer.types import BaseModel, OptionalNullable, UNSET -from typing import List, Optional, Union, cast +from typing import List, Mapping, Optional, Union, cast class Stream(BaseSDK): @@ -20,6 +20,7 @@ def create( retries: OptionalNullable[utils.RetryConfig] = UNSET, server_url: Optional[str] = None, timeout_ms: Optional[int] = None, + http_headers: Optional[Mapping[str, str]] = None, ) -> operations.CreateStreamResponse: r"""Create a stream @@ -42,6 +43,7 @@ def create( :param retries: Override the default retry configuration for this method :param server_url: Override the default server URL for this method :param timeout_ms: Override the default request timeout configuration for this method in milliseconds + :param http_headers: Additional headers to set or replace on requests. """ base_url = None url_variables = None @@ -66,6 +68,7 @@ def create( request_has_query_params=True, user_agent_header="user-agent", accept_header_value="application/json", + http_headers=http_headers, security=self.sdk_configuration.security, get_serialized_body=lambda: utils.serialize_request_body( request, False, False, "json", components.NewStreamPayload @@ -98,20 +101,22 @@ def create( http_meta=components.HTTPMetadata(request=req, response=http_res), ) if utils.match_response(http_res, ["4XX", "5XX"], "*"): + http_res_text = utils.stream_to_text(http_res) raise errors.SDKError( - "API error occurred", http_res.status_code, http_res.text, http_res + "API error occurred", http_res.status_code, http_res_text, http_res ) if utils.match_response(http_res, "default", "application/json"): return operations.CreateStreamResponse( - error=utils.unmarshal_json(http_res.text, Optional[errors.Error]), + error=utils.unmarshal_json(http_res.text, Optional[components.Error]), http_meta=components.HTTPMetadata(request=req, response=http_res), ) content_type = http_res.headers.get("Content-Type") + http_res_text = utils.stream_to_text(http_res) raise errors.SDKError( f"Unexpected response received (code: {http_res.status_code}, type: {content_type})", http_res.status_code, - http_res.text, + http_res_text, http_res, ) @@ -124,6 +129,7 @@ async def create_async( retries: OptionalNullable[utils.RetryConfig] = UNSET, server_url: Optional[str] = None, timeout_ms: Optional[int] = None, + http_headers: Optional[Mapping[str, str]] = None, ) -> operations.CreateStreamResponse: r"""Create a stream @@ -146,6 +152,7 @@ async def create_async( :param retries: Override the default retry configuration for this method :param server_url: Override the default server URL for this method :param timeout_ms: Override the default request timeout configuration for this method in milliseconds + :param http_headers: Additional headers to set or replace on requests. """ base_url = None url_variables = None @@ -170,6 +177,7 @@ async def create_async( request_has_query_params=True, user_agent_header="user-agent", accept_header_value="application/json", + http_headers=http_headers, security=self.sdk_configuration.security, get_serialized_body=lambda: utils.serialize_request_body( request, False, False, "json", components.NewStreamPayload @@ -202,20 +210,22 @@ async def create_async( http_meta=components.HTTPMetadata(request=req, response=http_res), ) if utils.match_response(http_res, ["4XX", "5XX"], "*"): + http_res_text = await utils.stream_to_text_async(http_res) raise errors.SDKError( - "API error occurred", http_res.status_code, http_res.text, http_res + "API error occurred", http_res.status_code, http_res_text, http_res ) if utils.match_response(http_res, "default", "application/json"): return operations.CreateStreamResponse( - error=utils.unmarshal_json(http_res.text, Optional[errors.Error]), + error=utils.unmarshal_json(http_res.text, Optional[components.Error]), http_meta=components.HTTPMetadata(request=req, response=http_res), ) content_type = http_res.headers.get("Content-Type") + http_res_text = await utils.stream_to_text_async(http_res) raise errors.SDKError( f"Unexpected response received (code: {http_res.status_code}, type: {content_type})", http_res.status_code, - http_res.text, + http_res_text, http_res, ) @@ -226,6 +236,7 @@ def get_all( retries: OptionalNullable[utils.RetryConfig] = UNSET, server_url: Optional[str] = None, timeout_ms: Optional[int] = None, + http_headers: Optional[Mapping[str, str]] = None, ) -> operations.GetStreamsResponse: r"""Retrieve streams @@ -233,6 +244,7 @@ def get_all( :param retries: Override the default retry configuration for this method :param server_url: Override the default server URL for this method :param timeout_ms: Override the default request timeout configuration for this method in milliseconds + :param http_headers: Additional headers to set or replace on requests. """ base_url = None url_variables = None @@ -257,6 +269,7 @@ def get_all( request_has_query_params=True, user_agent_header="user-agent", accept_header_value="application/json", + http_headers=http_headers, security=self.sdk_configuration.security, timeout_ms=timeout_ms, ) @@ -288,20 +301,22 @@ def get_all( http_meta=components.HTTPMetadata(request=req, response=http_res), ) if utils.match_response(http_res, ["4XX", "5XX"], "*"): + http_res_text = utils.stream_to_text(http_res) raise errors.SDKError( - "API error occurred", http_res.status_code, http_res.text, http_res + "API error occurred", http_res.status_code, http_res_text, http_res ) if utils.match_response(http_res, "default", "application/json"): return operations.GetStreamsResponse( - error=utils.unmarshal_json(http_res.text, Optional[errors.Error]), + error=utils.unmarshal_json(http_res.text, Optional[components.Error]), http_meta=components.HTTPMetadata(request=req, response=http_res), ) content_type = http_res.headers.get("Content-Type") + http_res_text = utils.stream_to_text(http_res) raise errors.SDKError( f"Unexpected response received (code: {http_res.status_code}, type: {content_type})", http_res.status_code, - http_res.text, + http_res_text, http_res, ) @@ -312,6 +327,7 @@ async def get_all_async( retries: OptionalNullable[utils.RetryConfig] = UNSET, server_url: Optional[str] = None, timeout_ms: Optional[int] = None, + http_headers: Optional[Mapping[str, str]] = None, ) -> operations.GetStreamsResponse: r"""Retrieve streams @@ -319,6 +335,7 @@ async def get_all_async( :param retries: Override the default retry configuration for this method :param server_url: Override the default server URL for this method :param timeout_ms: Override the default request timeout configuration for this method in milliseconds + :param http_headers: Additional headers to set or replace on requests. """ base_url = None url_variables = None @@ -343,6 +360,7 @@ async def get_all_async( request_has_query_params=True, user_agent_header="user-agent", accept_header_value="application/json", + http_headers=http_headers, security=self.sdk_configuration.security, timeout_ms=timeout_ms, ) @@ -374,20 +392,22 @@ async def get_all_async( http_meta=components.HTTPMetadata(request=req, response=http_res), ) if utils.match_response(http_res, ["4XX", "5XX"], "*"): + http_res_text = await utils.stream_to_text_async(http_res) raise errors.SDKError( - "API error occurred", http_res.status_code, http_res.text, http_res + "API error occurred", http_res.status_code, http_res_text, http_res ) if utils.match_response(http_res, "default", "application/json"): return operations.GetStreamsResponse( - error=utils.unmarshal_json(http_res.text, Optional[errors.Error]), + error=utils.unmarshal_json(http_res.text, Optional[components.Error]), http_meta=components.HTTPMetadata(request=req, response=http_res), ) content_type = http_res.headers.get("Content-Type") + http_res_text = await utils.stream_to_text_async(http_res) raise errors.SDKError( f"Unexpected response received (code: {http_res.status_code}, type: {content_type})", http_res.status_code, - http_res.text, + http_res_text, http_res, ) @@ -398,6 +418,7 @@ def get( retries: OptionalNullable[utils.RetryConfig] = UNSET, server_url: Optional[str] = None, timeout_ms: Optional[int] = None, + http_headers: Optional[Mapping[str, str]] = None, ) -> operations.GetStreamResponse: r"""Retrieve a stream @@ -405,6 +426,7 @@ def get( :param retries: Override the default retry configuration for this method :param server_url: Override the default server URL for this method :param timeout_ms: Override the default request timeout configuration for this method in milliseconds + :param http_headers: Additional headers to set or replace on requests. """ base_url = None url_variables = None @@ -429,6 +451,7 @@ def get( request_has_query_params=True, user_agent_header="user-agent", accept_header_value="application/json", + http_headers=http_headers, security=self.sdk_configuration.security, timeout_ms=timeout_ms, ) @@ -458,20 +481,22 @@ def get( http_meta=components.HTTPMetadata(request=req, response=http_res), ) if utils.match_response(http_res, ["4XX", "5XX"], "*"): + http_res_text = utils.stream_to_text(http_res) raise errors.SDKError( - "API error occurred", http_res.status_code, http_res.text, http_res + "API error occurred", http_res.status_code, http_res_text, http_res ) if utils.match_response(http_res, "default", "application/json"): return operations.GetStreamResponse( - error=utils.unmarshal_json(http_res.text, Optional[errors.Error]), + error=utils.unmarshal_json(http_res.text, Optional[components.Error]), http_meta=components.HTTPMetadata(request=req, response=http_res), ) content_type = http_res.headers.get("Content-Type") + http_res_text = utils.stream_to_text(http_res) raise errors.SDKError( f"Unexpected response received (code: {http_res.status_code}, type: {content_type})", http_res.status_code, - http_res.text, + http_res_text, http_res, ) @@ -482,6 +507,7 @@ async def get_async( retries: OptionalNullable[utils.RetryConfig] = UNSET, server_url: Optional[str] = None, timeout_ms: Optional[int] = None, + http_headers: Optional[Mapping[str, str]] = None, ) -> operations.GetStreamResponse: r"""Retrieve a stream @@ -489,6 +515,7 @@ async def get_async( :param retries: Override the default retry configuration for this method :param server_url: Override the default server URL for this method :param timeout_ms: Override the default request timeout configuration for this method in milliseconds + :param http_headers: Additional headers to set or replace on requests. """ base_url = None url_variables = None @@ -513,6 +540,7 @@ async def get_async( request_has_query_params=True, user_agent_header="user-agent", accept_header_value="application/json", + http_headers=http_headers, security=self.sdk_configuration.security, timeout_ms=timeout_ms, ) @@ -542,20 +570,22 @@ async def get_async( http_meta=components.HTTPMetadata(request=req, response=http_res), ) if utils.match_response(http_res, ["4XX", "5XX"], "*"): + http_res_text = await utils.stream_to_text_async(http_res) raise errors.SDKError( - "API error occurred", http_res.status_code, http_res.text, http_res + "API error occurred", http_res.status_code, http_res_text, http_res ) if utils.match_response(http_res, "default", "application/json"): return operations.GetStreamResponse( - error=utils.unmarshal_json(http_res.text, Optional[errors.Error]), + error=utils.unmarshal_json(http_res.text, Optional[components.Error]), http_meta=components.HTTPMetadata(request=req, response=http_res), ) content_type = http_res.headers.get("Content-Type") + http_res_text = await utils.stream_to_text_async(http_res) raise errors.SDKError( f"Unexpected response received (code: {http_res.status_code}, type: {content_type})", http_res.status_code, - http_res.text, + http_res_text, http_res, ) @@ -569,6 +599,7 @@ def update( retries: OptionalNullable[utils.RetryConfig] = UNSET, server_url: Optional[str] = None, timeout_ms: Optional[int] = None, + http_headers: Optional[Mapping[str, str]] = None, ) -> operations.UpdateStreamResponse: r"""Update a stream @@ -577,6 +608,7 @@ def update( :param retries: Override the default retry configuration for this method :param server_url: Override the default server URL for this method :param timeout_ms: Override the default request timeout configuration for this method in milliseconds + :param http_headers: Additional headers to set or replace on requests. """ base_url = None url_variables = None @@ -604,6 +636,7 @@ def update( request_has_query_params=True, user_agent_header="user-agent", accept_header_value="application/json", + http_headers=http_headers, security=self.sdk_configuration.security, get_serialized_body=lambda: utils.serialize_request_body( request.stream_patch_payload, @@ -639,20 +672,22 @@ def update( http_meta=components.HTTPMetadata(request=req, response=http_res) ) if utils.match_response(http_res, ["4XX", "5XX"], "*"): + http_res_text = utils.stream_to_text(http_res) raise errors.SDKError( - "API error occurred", http_res.status_code, http_res.text, http_res + "API error occurred", http_res.status_code, http_res_text, http_res ) if utils.match_response(http_res, "default", "application/json"): return operations.UpdateStreamResponse( - error=utils.unmarshal_json(http_res.text, Optional[errors.Error]), + error=utils.unmarshal_json(http_res.text, Optional[components.Error]), http_meta=components.HTTPMetadata(request=req, response=http_res), ) content_type = http_res.headers.get("Content-Type") + http_res_text = utils.stream_to_text(http_res) raise errors.SDKError( f"Unexpected response received (code: {http_res.status_code}, type: {content_type})", http_res.status_code, - http_res.text, + http_res_text, http_res, ) @@ -666,6 +701,7 @@ async def update_async( retries: OptionalNullable[utils.RetryConfig] = UNSET, server_url: Optional[str] = None, timeout_ms: Optional[int] = None, + http_headers: Optional[Mapping[str, str]] = None, ) -> operations.UpdateStreamResponse: r"""Update a stream @@ -674,6 +710,7 @@ async def update_async( :param retries: Override the default retry configuration for this method :param server_url: Override the default server URL for this method :param timeout_ms: Override the default request timeout configuration for this method in milliseconds + :param http_headers: Additional headers to set or replace on requests. """ base_url = None url_variables = None @@ -701,6 +738,7 @@ async def update_async( request_has_query_params=True, user_agent_header="user-agent", accept_header_value="application/json", + http_headers=http_headers, security=self.sdk_configuration.security, get_serialized_body=lambda: utils.serialize_request_body( request.stream_patch_payload, @@ -736,20 +774,22 @@ async def update_async( http_meta=components.HTTPMetadata(request=req, response=http_res) ) if utils.match_response(http_res, ["4XX", "5XX"], "*"): + http_res_text = await utils.stream_to_text_async(http_res) raise errors.SDKError( - "API error occurred", http_res.status_code, http_res.text, http_res + "API error occurred", http_res.status_code, http_res_text, http_res ) if utils.match_response(http_res, "default", "application/json"): return operations.UpdateStreamResponse( - error=utils.unmarshal_json(http_res.text, Optional[errors.Error]), + error=utils.unmarshal_json(http_res.text, Optional[components.Error]), http_meta=components.HTTPMetadata(request=req, response=http_res), ) content_type = http_res.headers.get("Content-Type") + http_res_text = await utils.stream_to_text_async(http_res) raise errors.SDKError( f"Unexpected response received (code: {http_res.status_code}, type: {content_type})", http_res.status_code, - http_res.text, + http_res_text, http_res, ) @@ -760,6 +800,7 @@ def delete( retries: OptionalNullable[utils.RetryConfig] = UNSET, server_url: Optional[str] = None, timeout_ms: Optional[int] = None, + http_headers: Optional[Mapping[str, str]] = None, ) -> operations.DeleteStreamResponse: r"""Delete a stream @@ -773,6 +814,7 @@ def delete( :param retries: Override the default retry configuration for this method :param server_url: Override the default server URL for this method :param timeout_ms: Override the default request timeout configuration for this method in milliseconds + :param http_headers: Additional headers to set or replace on requests. """ base_url = None url_variables = None @@ -797,6 +839,7 @@ def delete( request_has_query_params=True, user_agent_header="user-agent", accept_header_value="application/json", + http_headers=http_headers, security=self.sdk_configuration.security, timeout_ms=timeout_ms, ) @@ -825,20 +868,22 @@ def delete( http_meta=components.HTTPMetadata(request=req, response=http_res) ) if utils.match_response(http_res, ["4XX", "5XX"], "*"): + http_res_text = utils.stream_to_text(http_res) raise errors.SDKError( - "API error occurred", http_res.status_code, http_res.text, http_res + "API error occurred", http_res.status_code, http_res_text, http_res ) if utils.match_response(http_res, "default", "application/json"): return operations.DeleteStreamResponse( - error=utils.unmarshal_json(http_res.text, Optional[errors.Error]), + error=utils.unmarshal_json(http_res.text, Optional[components.Error]), http_meta=components.HTTPMetadata(request=req, response=http_res), ) content_type = http_res.headers.get("Content-Type") + http_res_text = utils.stream_to_text(http_res) raise errors.SDKError( f"Unexpected response received (code: {http_res.status_code}, type: {content_type})", http_res.status_code, - http_res.text, + http_res_text, http_res, ) @@ -849,6 +894,7 @@ async def delete_async( retries: OptionalNullable[utils.RetryConfig] = UNSET, server_url: Optional[str] = None, timeout_ms: Optional[int] = None, + http_headers: Optional[Mapping[str, str]] = None, ) -> operations.DeleteStreamResponse: r"""Delete a stream @@ -862,6 +908,7 @@ async def delete_async( :param retries: Override the default retry configuration for this method :param server_url: Override the default server URL for this method :param timeout_ms: Override the default request timeout configuration for this method in milliseconds + :param http_headers: Additional headers to set or replace on requests. """ base_url = None url_variables = None @@ -886,6 +933,7 @@ async def delete_async( request_has_query_params=True, user_agent_header="user-agent", accept_header_value="application/json", + http_headers=http_headers, security=self.sdk_configuration.security, timeout_ms=timeout_ms, ) @@ -914,20 +962,22 @@ async def delete_async( http_meta=components.HTTPMetadata(request=req, response=http_res) ) if utils.match_response(http_res, ["4XX", "5XX"], "*"): + http_res_text = await utils.stream_to_text_async(http_res) raise errors.SDKError( - "API error occurred", http_res.status_code, http_res.text, http_res + "API error occurred", http_res.status_code, http_res_text, http_res ) if utils.match_response(http_res, "default", "application/json"): return operations.DeleteStreamResponse( - error=utils.unmarshal_json(http_res.text, Optional[errors.Error]), + error=utils.unmarshal_json(http_res.text, Optional[components.Error]), http_meta=components.HTTPMetadata(request=req, response=http_res), ) content_type = http_res.headers.get("Content-Type") + http_res_text = await utils.stream_to_text_async(http_res) raise errors.SDKError( f"Unexpected response received (code: {http_res.status_code}, type: {content_type})", http_res.status_code, - http_res.text, + http_res_text, http_res, ) @@ -938,6 +988,7 @@ def terminate( retries: OptionalNullable[utils.RetryConfig] = UNSET, server_url: Optional[str] = None, timeout_ms: Optional[int] = None, + http_headers: Optional[Mapping[str, str]] = None, ) -> operations.TerminateStreamResponse: r"""Terminates a live stream @@ -955,6 +1006,7 @@ def terminate( :param retries: Override the default retry configuration for this method :param server_url: Override the default server URL for this method :param timeout_ms: Override the default request timeout configuration for this method in milliseconds + :param http_headers: Additional headers to set or replace on requests. """ base_url = None url_variables = None @@ -979,6 +1031,7 @@ def terminate( request_has_query_params=True, user_agent_header="user-agent", accept_header_value="application/json", + http_headers=http_headers, security=self.sdk_configuration.security, timeout_ms=timeout_ms, ) @@ -1007,20 +1060,22 @@ def terminate( http_meta=components.HTTPMetadata(request=req, response=http_res) ) if utils.match_response(http_res, ["4XX", "5XX"], "*"): + http_res_text = utils.stream_to_text(http_res) raise errors.SDKError( - "API error occurred", http_res.status_code, http_res.text, http_res + "API error occurred", http_res.status_code, http_res_text, http_res ) if utils.match_response(http_res, "default", "application/json"): return operations.TerminateStreamResponse( - error=utils.unmarshal_json(http_res.text, Optional[errors.Error]), + error=utils.unmarshal_json(http_res.text, Optional[components.Error]), http_meta=components.HTTPMetadata(request=req, response=http_res), ) content_type = http_res.headers.get("Content-Type") + http_res_text = utils.stream_to_text(http_res) raise errors.SDKError( f"Unexpected response received (code: {http_res.status_code}, type: {content_type})", http_res.status_code, - http_res.text, + http_res_text, http_res, ) @@ -1031,6 +1086,7 @@ async def terminate_async( retries: OptionalNullable[utils.RetryConfig] = UNSET, server_url: Optional[str] = None, timeout_ms: Optional[int] = None, + http_headers: Optional[Mapping[str, str]] = None, ) -> operations.TerminateStreamResponse: r"""Terminates a live stream @@ -1048,6 +1104,7 @@ async def terminate_async( :param retries: Override the default retry configuration for this method :param server_url: Override the default server URL for this method :param timeout_ms: Override the default request timeout configuration for this method in milliseconds + :param http_headers: Additional headers to set or replace on requests. """ base_url = None url_variables = None @@ -1072,6 +1129,7 @@ async def terminate_async( request_has_query_params=True, user_agent_header="user-agent", accept_header_value="application/json", + http_headers=http_headers, security=self.sdk_configuration.security, timeout_ms=timeout_ms, ) @@ -1100,20 +1158,22 @@ async def terminate_async( http_meta=components.HTTPMetadata(request=req, response=http_res) ) if utils.match_response(http_res, ["4XX", "5XX"], "*"): + http_res_text = await utils.stream_to_text_async(http_res) raise errors.SDKError( - "API error occurred", http_res.status_code, http_res.text, http_res + "API error occurred", http_res.status_code, http_res_text, http_res ) if utils.match_response(http_res, "default", "application/json"): return operations.TerminateStreamResponse( - error=utils.unmarshal_json(http_res.text, Optional[errors.Error]), + error=utils.unmarshal_json(http_res.text, Optional[components.Error]), http_meta=components.HTTPMetadata(request=req, response=http_res), ) content_type = http_res.headers.get("Content-Type") + http_res_text = await utils.stream_to_text_async(http_res) raise errors.SDKError( f"Unexpected response received (code: {http_res.status_code}, type: {content_type})", http_res.status_code, - http_res.text, + http_res_text, http_res, ) @@ -1124,6 +1184,7 @@ def start_pull( retries: OptionalNullable[utils.RetryConfig] = UNSET, server_url: Optional[str] = None, timeout_ms: Optional[int] = None, + http_headers: Optional[Mapping[str, str]] = None, ) -> operations.StartPullStreamResponse: r"""Start ingest for a pull stream @@ -1140,6 +1201,7 @@ def start_pull( :param retries: Override the default retry configuration for this method :param server_url: Override the default server URL for this method :param timeout_ms: Override the default request timeout configuration for this method in milliseconds + :param http_headers: Additional headers to set or replace on requests. """ base_url = None url_variables = None @@ -1164,6 +1226,7 @@ def start_pull( request_has_query_params=True, user_agent_header="user-agent", accept_header_value="application/json", + http_headers=http_headers, security=self.sdk_configuration.security, timeout_ms=timeout_ms, ) @@ -1192,20 +1255,22 @@ def start_pull( http_meta=components.HTTPMetadata(request=req, response=http_res) ) if utils.match_response(http_res, ["4XX", "5XX"], "*"): + http_res_text = utils.stream_to_text(http_res) raise errors.SDKError( - "API error occurred", http_res.status_code, http_res.text, http_res + "API error occurred", http_res.status_code, http_res_text, http_res ) if utils.match_response(http_res, "default", "application/json"): return operations.StartPullStreamResponse( - error=utils.unmarshal_json(http_res.text, Optional[errors.Error]), + error=utils.unmarshal_json(http_res.text, Optional[components.Error]), http_meta=components.HTTPMetadata(request=req, response=http_res), ) content_type = http_res.headers.get("Content-Type") + http_res_text = utils.stream_to_text(http_res) raise errors.SDKError( f"Unexpected response received (code: {http_res.status_code}, type: {content_type})", http_res.status_code, - http_res.text, + http_res_text, http_res, ) @@ -1216,6 +1281,7 @@ async def start_pull_async( retries: OptionalNullable[utils.RetryConfig] = UNSET, server_url: Optional[str] = None, timeout_ms: Optional[int] = None, + http_headers: Optional[Mapping[str, str]] = None, ) -> operations.StartPullStreamResponse: r"""Start ingest for a pull stream @@ -1232,6 +1298,7 @@ async def start_pull_async( :param retries: Override the default retry configuration for this method :param server_url: Override the default server URL for this method :param timeout_ms: Override the default request timeout configuration for this method in milliseconds + :param http_headers: Additional headers to set or replace on requests. """ base_url = None url_variables = None @@ -1256,6 +1323,7 @@ async def start_pull_async( request_has_query_params=True, user_agent_header="user-agent", accept_header_value="application/json", + http_headers=http_headers, security=self.sdk_configuration.security, timeout_ms=timeout_ms, ) @@ -1284,20 +1352,22 @@ async def start_pull_async( http_meta=components.HTTPMetadata(request=req, response=http_res) ) if utils.match_response(http_res, ["4XX", "5XX"], "*"): + http_res_text = await utils.stream_to_text_async(http_res) raise errors.SDKError( - "API error occurred", http_res.status_code, http_res.text, http_res + "API error occurred", http_res.status_code, http_res_text, http_res ) if utils.match_response(http_res, "default", "application/json"): return operations.StartPullStreamResponse( - error=utils.unmarshal_json(http_res.text, Optional[errors.Error]), + error=utils.unmarshal_json(http_res.text, Optional[components.Error]), http_meta=components.HTTPMetadata(request=req, response=http_res), ) content_type = http_res.headers.get("Content-Type") + http_res_text = await utils.stream_to_text_async(http_res) raise errors.SDKError( f"Unexpected response received (code: {http_res.status_code}, type: {content_type})", http_res.status_code, - http_res.text, + http_res_text, http_res, ) @@ -1308,6 +1378,7 @@ def create_clip( retries: OptionalNullable[utils.RetryConfig] = UNSET, server_url: Optional[str] = None, timeout_ms: Optional[int] = None, + http_headers: Optional[Mapping[str, str]] = None, ) -> operations.CreateClipResponse: r"""Create a clip @@ -1315,6 +1386,7 @@ def create_clip( :param retries: Override the default retry configuration for this method :param server_url: Override the default server URL for this method :param timeout_ms: Override the default request timeout configuration for this method in milliseconds + :param http_headers: Additional headers to set or replace on requests. """ base_url = None url_variables = None @@ -1339,6 +1411,7 @@ def create_clip( request_has_query_params=True, user_agent_header="user-agent", accept_header_value="application/json", + http_headers=http_headers, security=self.sdk_configuration.security, get_serialized_body=lambda: utils.serialize_request_body( request, False, False, "json", components.ClipPayload @@ -1373,20 +1446,22 @@ def create_clip( http_meta=components.HTTPMetadata(request=req, response=http_res), ) if utils.match_response(http_res, ["4XX", "5XX"], "*"): + http_res_text = utils.stream_to_text(http_res) raise errors.SDKError( - "API error occurred", http_res.status_code, http_res.text, http_res + "API error occurred", http_res.status_code, http_res_text, http_res ) if utils.match_response(http_res, "default", "application/json"): return operations.CreateClipResponse( - error=utils.unmarshal_json(http_res.text, Optional[errors.Error]), + error=utils.unmarshal_json(http_res.text, Optional[components.Error]), http_meta=components.HTTPMetadata(request=req, response=http_res), ) content_type = http_res.headers.get("Content-Type") + http_res_text = utils.stream_to_text(http_res) raise errors.SDKError( f"Unexpected response received (code: {http_res.status_code}, type: {content_type})", http_res.status_code, - http_res.text, + http_res_text, http_res, ) @@ -1397,6 +1472,7 @@ async def create_clip_async( retries: OptionalNullable[utils.RetryConfig] = UNSET, server_url: Optional[str] = None, timeout_ms: Optional[int] = None, + http_headers: Optional[Mapping[str, str]] = None, ) -> operations.CreateClipResponse: r"""Create a clip @@ -1404,6 +1480,7 @@ async def create_clip_async( :param retries: Override the default retry configuration for this method :param server_url: Override the default server URL for this method :param timeout_ms: Override the default request timeout configuration for this method in milliseconds + :param http_headers: Additional headers to set or replace on requests. """ base_url = None url_variables = None @@ -1428,6 +1505,7 @@ async def create_clip_async( request_has_query_params=True, user_agent_header="user-agent", accept_header_value="application/json", + http_headers=http_headers, security=self.sdk_configuration.security, get_serialized_body=lambda: utils.serialize_request_body( request, False, False, "json", components.ClipPayload @@ -1462,20 +1540,22 @@ async def create_clip_async( http_meta=components.HTTPMetadata(request=req, response=http_res), ) if utils.match_response(http_res, ["4XX", "5XX"], "*"): + http_res_text = await utils.stream_to_text_async(http_res) raise errors.SDKError( - "API error occurred", http_res.status_code, http_res.text, http_res + "API error occurred", http_res.status_code, http_res_text, http_res ) if utils.match_response(http_res, "default", "application/json"): return operations.CreateClipResponse( - error=utils.unmarshal_json(http_res.text, Optional[errors.Error]), + error=utils.unmarshal_json(http_res.text, Optional[components.Error]), http_meta=components.HTTPMetadata(request=req, response=http_res), ) content_type = http_res.headers.get("Content-Type") + http_res_text = await utils.stream_to_text_async(http_res) raise errors.SDKError( f"Unexpected response received (code: {http_res.status_code}, type: {content_type})", http_res.status_code, - http_res.text, + http_res_text, http_res, ) @@ -1486,6 +1566,7 @@ def get_clips( retries: OptionalNullable[utils.RetryConfig] = UNSET, server_url: Optional[str] = None, timeout_ms: Optional[int] = None, + http_headers: Optional[Mapping[str, str]] = None, ) -> operations.GetClipsResponse: r"""Retrieve clips of a livestream @@ -1493,6 +1574,7 @@ def get_clips( :param retries: Override the default retry configuration for this method :param server_url: Override the default server URL for this method :param timeout_ms: Override the default request timeout configuration for this method in milliseconds + :param http_headers: Additional headers to set or replace on requests. """ base_url = None url_variables = None @@ -1517,6 +1599,7 @@ def get_clips( request_has_query_params=True, user_agent_header="user-agent", accept_header_value="application/json", + http_headers=http_headers, security=self.sdk_configuration.security, timeout_ms=timeout_ms, ) @@ -1548,20 +1631,22 @@ def get_clips( http_meta=components.HTTPMetadata(request=req, response=http_res), ) if utils.match_response(http_res, ["4XX", "5XX"], "*"): + http_res_text = utils.stream_to_text(http_res) raise errors.SDKError( - "API error occurred", http_res.status_code, http_res.text, http_res + "API error occurred", http_res.status_code, http_res_text, http_res ) if utils.match_response(http_res, "default", "application/json"): return operations.GetClipsResponse( - error=utils.unmarshal_json(http_res.text, Optional[errors.Error]), + error=utils.unmarshal_json(http_res.text, Optional[components.Error]), http_meta=components.HTTPMetadata(request=req, response=http_res), ) content_type = http_res.headers.get("Content-Type") + http_res_text = utils.stream_to_text(http_res) raise errors.SDKError( f"Unexpected response received (code: {http_res.status_code}, type: {content_type})", http_res.status_code, - http_res.text, + http_res_text, http_res, ) @@ -1572,6 +1657,7 @@ async def get_clips_async( retries: OptionalNullable[utils.RetryConfig] = UNSET, server_url: Optional[str] = None, timeout_ms: Optional[int] = None, + http_headers: Optional[Mapping[str, str]] = None, ) -> operations.GetClipsResponse: r"""Retrieve clips of a livestream @@ -1579,6 +1665,7 @@ async def get_clips_async( :param retries: Override the default retry configuration for this method :param server_url: Override the default server URL for this method :param timeout_ms: Override the default request timeout configuration for this method in milliseconds + :param http_headers: Additional headers to set or replace on requests. """ base_url = None url_variables = None @@ -1603,6 +1690,7 @@ async def get_clips_async( request_has_query_params=True, user_agent_header="user-agent", accept_header_value="application/json", + http_headers=http_headers, security=self.sdk_configuration.security, timeout_ms=timeout_ms, ) @@ -1634,20 +1722,22 @@ async def get_clips_async( http_meta=components.HTTPMetadata(request=req, response=http_res), ) if utils.match_response(http_res, ["4XX", "5XX"], "*"): + http_res_text = await utils.stream_to_text_async(http_res) raise errors.SDKError( - "API error occurred", http_res.status_code, http_res.text, http_res + "API error occurred", http_res.status_code, http_res_text, http_res ) if utils.match_response(http_res, "default", "application/json"): return operations.GetClipsResponse( - error=utils.unmarshal_json(http_res.text, Optional[errors.Error]), + error=utils.unmarshal_json(http_res.text, Optional[components.Error]), http_meta=components.HTTPMetadata(request=req, response=http_res), ) content_type = http_res.headers.get("Content-Type") + http_res_text = await utils.stream_to_text_async(http_res) raise errors.SDKError( f"Unexpected response received (code: {http_res.status_code}, type: {content_type})", http_res.status_code, - http_res.text, + http_res_text, http_res, ) @@ -1661,6 +1751,7 @@ def add_multistream_target( retries: OptionalNullable[utils.RetryConfig] = UNSET, server_url: Optional[str] = None, timeout_ms: Optional[int] = None, + http_headers: Optional[Mapping[str, str]] = None, ) -> operations.AddMultistreamTargetResponse: r"""Add a multistream target @@ -1669,6 +1760,7 @@ def add_multistream_target( :param retries: Override the default retry configuration for this method :param server_url: Override the default server URL for this method :param timeout_ms: Override the default request timeout configuration for this method in milliseconds + :param http_headers: Additional headers to set or replace on requests. """ base_url = None url_variables = None @@ -1696,6 +1788,7 @@ def add_multistream_target( request_has_query_params=True, user_agent_header="user-agent", accept_header_value="application/json", + http_headers=http_headers, security=self.sdk_configuration.security, get_serialized_body=lambda: utils.serialize_request_body( request.target_add_payload, @@ -1731,20 +1824,22 @@ def add_multistream_target( http_meta=components.HTTPMetadata(request=req, response=http_res) ) if utils.match_response(http_res, ["4XX", "5XX"], "*"): + http_res_text = utils.stream_to_text(http_res) raise errors.SDKError( - "API error occurred", http_res.status_code, http_res.text, http_res + "API error occurred", http_res.status_code, http_res_text, http_res ) if utils.match_response(http_res, "default", "application/json"): return operations.AddMultistreamTargetResponse( - error=utils.unmarshal_json(http_res.text, Optional[errors.Error]), + error=utils.unmarshal_json(http_res.text, Optional[components.Error]), http_meta=components.HTTPMetadata(request=req, response=http_res), ) content_type = http_res.headers.get("Content-Type") + http_res_text = utils.stream_to_text(http_res) raise errors.SDKError( f"Unexpected response received (code: {http_res.status_code}, type: {content_type})", http_res.status_code, - http_res.text, + http_res_text, http_res, ) @@ -1758,6 +1853,7 @@ async def add_multistream_target_async( retries: OptionalNullable[utils.RetryConfig] = UNSET, server_url: Optional[str] = None, timeout_ms: Optional[int] = None, + http_headers: Optional[Mapping[str, str]] = None, ) -> operations.AddMultistreamTargetResponse: r"""Add a multistream target @@ -1766,6 +1862,7 @@ async def add_multistream_target_async( :param retries: Override the default retry configuration for this method :param server_url: Override the default server URL for this method :param timeout_ms: Override the default request timeout configuration for this method in milliseconds + :param http_headers: Additional headers to set or replace on requests. """ base_url = None url_variables = None @@ -1793,6 +1890,7 @@ async def add_multistream_target_async( request_has_query_params=True, user_agent_header="user-agent", accept_header_value="application/json", + http_headers=http_headers, security=self.sdk_configuration.security, get_serialized_body=lambda: utils.serialize_request_body( request.target_add_payload, @@ -1828,20 +1926,22 @@ async def add_multistream_target_async( http_meta=components.HTTPMetadata(request=req, response=http_res) ) if utils.match_response(http_res, ["4XX", "5XX"], "*"): + http_res_text = await utils.stream_to_text_async(http_res) raise errors.SDKError( - "API error occurred", http_res.status_code, http_res.text, http_res + "API error occurred", http_res.status_code, http_res_text, http_res ) if utils.match_response(http_res, "default", "application/json"): return operations.AddMultistreamTargetResponse( - error=utils.unmarshal_json(http_res.text, Optional[errors.Error]), + error=utils.unmarshal_json(http_res.text, Optional[components.Error]), http_meta=components.HTTPMetadata(request=req, response=http_res), ) content_type = http_res.headers.get("Content-Type") + http_res_text = await utils.stream_to_text_async(http_res) raise errors.SDKError( f"Unexpected response received (code: {http_res.status_code}, type: {content_type})", http_res.status_code, - http_res.text, + http_res_text, http_res, ) @@ -1853,6 +1953,7 @@ def remove_multistream_target( retries: OptionalNullable[utils.RetryConfig] = UNSET, server_url: Optional[str] = None, timeout_ms: Optional[int] = None, + http_headers: Optional[Mapping[str, str]] = None, ) -> operations.RemoveMultistreamTargetResponse: r"""Remove a multistream target @@ -1861,6 +1962,7 @@ def remove_multistream_target( :param retries: Override the default retry configuration for this method :param server_url: Override the default server URL for this method :param timeout_ms: Override the default request timeout configuration for this method in milliseconds + :param http_headers: Additional headers to set or replace on requests. """ base_url = None url_variables = None @@ -1886,6 +1988,7 @@ def remove_multistream_target( request_has_query_params=True, user_agent_header="user-agent", accept_header_value="application/json", + http_headers=http_headers, security=self.sdk_configuration.security, timeout_ms=timeout_ms, ) @@ -1914,20 +2017,22 @@ def remove_multistream_target( http_meta=components.HTTPMetadata(request=req, response=http_res) ) if utils.match_response(http_res, ["4XX", "5XX"], "*"): + http_res_text = utils.stream_to_text(http_res) raise errors.SDKError( - "API error occurred", http_res.status_code, http_res.text, http_res + "API error occurred", http_res.status_code, http_res_text, http_res ) if utils.match_response(http_res, "default", "application/json"): return operations.RemoveMultistreamTargetResponse( - error=utils.unmarshal_json(http_res.text, Optional[errors.Error]), + error=utils.unmarshal_json(http_res.text, Optional[components.Error]), http_meta=components.HTTPMetadata(request=req, response=http_res), ) content_type = http_res.headers.get("Content-Type") + http_res_text = utils.stream_to_text(http_res) raise errors.SDKError( f"Unexpected response received (code: {http_res.status_code}, type: {content_type})", http_res.status_code, - http_res.text, + http_res_text, http_res, ) @@ -1939,6 +2044,7 @@ async def remove_multistream_target_async( retries: OptionalNullable[utils.RetryConfig] = UNSET, server_url: Optional[str] = None, timeout_ms: Optional[int] = None, + http_headers: Optional[Mapping[str, str]] = None, ) -> operations.RemoveMultistreamTargetResponse: r"""Remove a multistream target @@ -1947,6 +2053,7 @@ async def remove_multistream_target_async( :param retries: Override the default retry configuration for this method :param server_url: Override the default server URL for this method :param timeout_ms: Override the default request timeout configuration for this method in milliseconds + :param http_headers: Additional headers to set or replace on requests. """ base_url = None url_variables = None @@ -1972,6 +2079,7 @@ async def remove_multistream_target_async( request_has_query_params=True, user_agent_header="user-agent", accept_header_value="application/json", + http_headers=http_headers, security=self.sdk_configuration.security, timeout_ms=timeout_ms, ) @@ -2000,19 +2108,21 @@ async def remove_multistream_target_async( http_meta=components.HTTPMetadata(request=req, response=http_res) ) if utils.match_response(http_res, ["4XX", "5XX"], "*"): + http_res_text = await utils.stream_to_text_async(http_res) raise errors.SDKError( - "API error occurred", http_res.status_code, http_res.text, http_res + "API error occurred", http_res.status_code, http_res_text, http_res ) if utils.match_response(http_res, "default", "application/json"): return operations.RemoveMultistreamTargetResponse( - error=utils.unmarshal_json(http_res.text, Optional[errors.Error]), + error=utils.unmarshal_json(http_res.text, Optional[components.Error]), http_meta=components.HTTPMetadata(request=req, response=http_res), ) content_type = http_res.headers.get("Content-Type") + http_res_text = await utils.stream_to_text_async(http_res) raise errors.SDKError( f"Unexpected response received (code: {http_res.status_code}, type: {content_type})", http_res.status_code, - http_res.text, + http_res_text, http_res, ) diff --git a/src/livepeer/task.py b/src/livepeer/task.py index e3f2636..7650aba 100644 --- a/src/livepeer/task.py +++ b/src/livepeer/task.py @@ -5,7 +5,7 @@ from livepeer._hooks import HookContext from livepeer.models import components, errors, operations from livepeer.types import OptionalNullable, UNSET -from typing import List, Optional +from typing import List, Mapping, Optional class Task(BaseSDK): @@ -17,12 +17,14 @@ def get_all( retries: OptionalNullable[utils.RetryConfig] = UNSET, server_url: Optional[str] = None, timeout_ms: Optional[int] = None, + http_headers: Optional[Mapping[str, str]] = None, ) -> operations.GetTasksResponse: r"""Retrieve Tasks :param retries: Override the default retry configuration for this method :param server_url: Override the default server URL for this method :param timeout_ms: Override the default request timeout configuration for this method in milliseconds + :param http_headers: Additional headers to set or replace on requests. """ base_url = None url_variables = None @@ -42,6 +44,7 @@ def get_all( request_has_query_params=True, user_agent_header="user-agent", accept_header_value="application/json", + http_headers=http_headers, security=self.sdk_configuration.security, timeout_ms=timeout_ms, ) @@ -73,20 +76,22 @@ def get_all( http_meta=components.HTTPMetadata(request=req, response=http_res), ) if utils.match_response(http_res, ["4XX", "5XX"], "*"): + http_res_text = utils.stream_to_text(http_res) raise errors.SDKError( - "API error occurred", http_res.status_code, http_res.text, http_res + "API error occurred", http_res.status_code, http_res_text, http_res ) if utils.match_response(http_res, "default", "application/json"): return operations.GetTasksResponse( - error=utils.unmarshal_json(http_res.text, Optional[errors.Error]), + error=utils.unmarshal_json(http_res.text, Optional[components.Error]), http_meta=components.HTTPMetadata(request=req, response=http_res), ) content_type = http_res.headers.get("Content-Type") + http_res_text = utils.stream_to_text(http_res) raise errors.SDKError( f"Unexpected response received (code: {http_res.status_code}, type: {content_type})", http_res.status_code, - http_res.text, + http_res_text, http_res, ) @@ -96,12 +101,14 @@ async def get_all_async( retries: OptionalNullable[utils.RetryConfig] = UNSET, server_url: Optional[str] = None, timeout_ms: Optional[int] = None, + http_headers: Optional[Mapping[str, str]] = None, ) -> operations.GetTasksResponse: r"""Retrieve Tasks :param retries: Override the default retry configuration for this method :param server_url: Override the default server URL for this method :param timeout_ms: Override the default request timeout configuration for this method in milliseconds + :param http_headers: Additional headers to set or replace on requests. """ base_url = None url_variables = None @@ -121,6 +128,7 @@ async def get_all_async( request_has_query_params=True, user_agent_header="user-agent", accept_header_value="application/json", + http_headers=http_headers, security=self.sdk_configuration.security, timeout_ms=timeout_ms, ) @@ -152,20 +160,22 @@ async def get_all_async( http_meta=components.HTTPMetadata(request=req, response=http_res), ) if utils.match_response(http_res, ["4XX", "5XX"], "*"): + http_res_text = await utils.stream_to_text_async(http_res) raise errors.SDKError( - "API error occurred", http_res.status_code, http_res.text, http_res + "API error occurred", http_res.status_code, http_res_text, http_res ) if utils.match_response(http_res, "default", "application/json"): return operations.GetTasksResponse( - error=utils.unmarshal_json(http_res.text, Optional[errors.Error]), + error=utils.unmarshal_json(http_res.text, Optional[components.Error]), http_meta=components.HTTPMetadata(request=req, response=http_res), ) content_type = http_res.headers.get("Content-Type") + http_res_text = await utils.stream_to_text_async(http_res) raise errors.SDKError( f"Unexpected response received (code: {http_res.status_code}, type: {content_type})", http_res.status_code, - http_res.text, + http_res_text, http_res, ) @@ -176,6 +186,7 @@ def get( retries: OptionalNullable[utils.RetryConfig] = UNSET, server_url: Optional[str] = None, timeout_ms: Optional[int] = None, + http_headers: Optional[Mapping[str, str]] = None, ) -> operations.GetTaskResponse: r"""Retrieve a Task @@ -183,6 +194,7 @@ def get( :param retries: Override the default retry configuration for this method :param server_url: Override the default server URL for this method :param timeout_ms: Override the default request timeout configuration for this method in milliseconds + :param http_headers: Additional headers to set or replace on requests. """ base_url = None url_variables = None @@ -207,6 +219,7 @@ def get( request_has_query_params=True, user_agent_header="user-agent", accept_header_value="application/json", + http_headers=http_headers, security=self.sdk_configuration.security, timeout_ms=timeout_ms, ) @@ -236,8 +249,9 @@ def get( http_meta=components.HTTPMetadata(request=req, response=http_res), ) if utils.match_response(http_res, ["4XX", "5XX"], "*"): + http_res_text = utils.stream_to_text(http_res) raise errors.SDKError( - "API error occurred", http_res.status_code, http_res.text, http_res + "API error occurred", http_res.status_code, http_res_text, http_res ) if utils.match_response(http_res, "default", "*"): return operations.GetTaskResponse( @@ -245,10 +259,11 @@ def get( ) content_type = http_res.headers.get("Content-Type") + http_res_text = utils.stream_to_text(http_res) raise errors.SDKError( f"Unexpected response received (code: {http_res.status_code}, type: {content_type})", http_res.status_code, - http_res.text, + http_res_text, http_res, ) @@ -259,6 +274,7 @@ async def get_async( retries: OptionalNullable[utils.RetryConfig] = UNSET, server_url: Optional[str] = None, timeout_ms: Optional[int] = None, + http_headers: Optional[Mapping[str, str]] = None, ) -> operations.GetTaskResponse: r"""Retrieve a Task @@ -266,6 +282,7 @@ async def get_async( :param retries: Override the default retry configuration for this method :param server_url: Override the default server URL for this method :param timeout_ms: Override the default request timeout configuration for this method in milliseconds + :param http_headers: Additional headers to set or replace on requests. """ base_url = None url_variables = None @@ -290,6 +307,7 @@ async def get_async( request_has_query_params=True, user_agent_header="user-agent", accept_header_value="application/json", + http_headers=http_headers, security=self.sdk_configuration.security, timeout_ms=timeout_ms, ) @@ -319,8 +337,9 @@ async def get_async( http_meta=components.HTTPMetadata(request=req, response=http_res), ) if utils.match_response(http_res, ["4XX", "5XX"], "*"): + http_res_text = await utils.stream_to_text_async(http_res) raise errors.SDKError( - "API error occurred", http_res.status_code, http_res.text, http_res + "API error occurred", http_res.status_code, http_res_text, http_res ) if utils.match_response(http_res, "default", "*"): return operations.GetTaskResponse( @@ -328,9 +347,10 @@ async def get_async( ) content_type = http_res.headers.get("Content-Type") + http_res_text = await utils.stream_to_text_async(http_res) raise errors.SDKError( f"Unexpected response received (code: {http_res.status_code}, type: {content_type})", http_res.status_code, - http_res.text, + http_res_text, http_res, ) diff --git a/src/livepeer/transcode.py b/src/livepeer/transcode.py index 6de7605..9501797 100644 --- a/src/livepeer/transcode.py +++ b/src/livepeer/transcode.py @@ -5,7 +5,7 @@ from livepeer._hooks import HookContext from livepeer.models import components, errors, operations from livepeer.types import BaseModel, OptionalNullable, UNSET -from typing import Optional, Union, cast +from typing import Mapping, Optional, Union, cast class Transcode(BaseSDK): @@ -20,6 +20,7 @@ def create( retries: OptionalNullable[utils.RetryConfig] = UNSET, server_url: Optional[str] = None, timeout_ms: Optional[int] = None, + http_headers: Optional[Mapping[str, str]] = None, ) -> operations.TranscodeVideoResponse: r"""Transcode a video @@ -150,6 +151,7 @@ def create( :param retries: Override the default retry configuration for this method :param server_url: Override the default server URL for this method :param timeout_ms: Override the default request timeout configuration for this method in milliseconds + :param http_headers: Additional headers to set or replace on requests. """ base_url = None url_variables = None @@ -174,6 +176,7 @@ def create( request_has_query_params=True, user_agent_header="user-agent", accept_header_value="application/json", + http_headers=http_headers, security=self.sdk_configuration.security, get_serialized_body=lambda: utils.serialize_request_body( request, False, False, "json", components.TranscodePayload @@ -206,20 +209,22 @@ def create( http_meta=components.HTTPMetadata(request=req, response=http_res), ) if utils.match_response(http_res, ["4XX", "5XX"], "*"): + http_res_text = utils.stream_to_text(http_res) raise errors.SDKError( - "API error occurred", http_res.status_code, http_res.text, http_res + "API error occurred", http_res.status_code, http_res_text, http_res ) if utils.match_response(http_res, "default", "application/json"): return operations.TranscodeVideoResponse( - error=utils.unmarshal_json(http_res.text, Optional[errors.Error]), + error=utils.unmarshal_json(http_res.text, Optional[components.Error]), http_meta=components.HTTPMetadata(request=req, response=http_res), ) content_type = http_res.headers.get("Content-Type") + http_res_text = utils.stream_to_text(http_res) raise errors.SDKError( f"Unexpected response received (code: {http_res.status_code}, type: {content_type})", http_res.status_code, - http_res.text, + http_res_text, http_res, ) @@ -232,6 +237,7 @@ async def create_async( retries: OptionalNullable[utils.RetryConfig] = UNSET, server_url: Optional[str] = None, timeout_ms: Optional[int] = None, + http_headers: Optional[Mapping[str, str]] = None, ) -> operations.TranscodeVideoResponse: r"""Transcode a video @@ -362,6 +368,7 @@ async def create_async( :param retries: Override the default retry configuration for this method :param server_url: Override the default server URL for this method :param timeout_ms: Override the default request timeout configuration for this method in milliseconds + :param http_headers: Additional headers to set or replace on requests. """ base_url = None url_variables = None @@ -386,6 +393,7 @@ async def create_async( request_has_query_params=True, user_agent_header="user-agent", accept_header_value="application/json", + http_headers=http_headers, security=self.sdk_configuration.security, get_serialized_body=lambda: utils.serialize_request_body( request, False, False, "json", components.TranscodePayload @@ -418,19 +426,21 @@ async def create_async( http_meta=components.HTTPMetadata(request=req, response=http_res), ) if utils.match_response(http_res, ["4XX", "5XX"], "*"): + http_res_text = await utils.stream_to_text_async(http_res) raise errors.SDKError( - "API error occurred", http_res.status_code, http_res.text, http_res + "API error occurred", http_res.status_code, http_res_text, http_res ) if utils.match_response(http_res, "default", "application/json"): return operations.TranscodeVideoResponse( - error=utils.unmarshal_json(http_res.text, Optional[errors.Error]), + error=utils.unmarshal_json(http_res.text, Optional[components.Error]), http_meta=components.HTTPMetadata(request=req, response=http_res), ) content_type = http_res.headers.get("Content-Type") + http_res_text = await utils.stream_to_text_async(http_res) raise errors.SDKError( f"Unexpected response received (code: {http_res.status_code}, type: {content_type})", http_res.status_code, - http_res.text, + http_res_text, http_res, ) diff --git a/src/livepeer/utils/__init__.py b/src/livepeer/utils/__init__.py index 6c26aeb..26d51ae 100644 --- a/src/livepeer/utils/__init__.py +++ b/src/livepeer/utils/__init__.py @@ -27,6 +27,10 @@ serialize_float, serialize_int, stream_to_text, + stream_to_text_async, + stream_to_bytes, + stream_to_bytes_async, + validate_const, validate_decimal, validate_float, validate_int, @@ -79,10 +83,14 @@ "serialize_request_body", "SerializedRequestBody", "stream_to_text", + "stream_to_text_async", + "stream_to_bytes", + "stream_to_bytes_async", "template_url", "unmarshal", "unmarshal_json", "validate_decimal", + "validate_const", "validate_float", "validate_int", "validate_open_enum", diff --git a/src/livepeer/utils/annotations.py b/src/livepeer/utils/annotations.py index 0d17472..387874e 100644 --- a/src/livepeer/utils/annotations.py +++ b/src/livepeer/utils/annotations.py @@ -1,19 +1,55 @@ """Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.""" -from typing import Any +from enum import Enum +from typing import Any, Optional def get_discriminator(model: Any, fieldname: str, key: str) -> str: - if isinstance(model, dict): - try: - return f'{model.get(key)}' - except AttributeError as e: - raise ValueError(f'Could not find discriminator key {key} in {model}') from e - - if hasattr(model, fieldname): - return f'{getattr(model, fieldname)}' - - fieldname = fieldname.upper() - if hasattr(model, fieldname): - return f'{getattr(model, fieldname)}' + """ + Recursively search for the discriminator attribute in a model. + + Args: + model (Any): The model to search within. + fieldname (str): The name of the field to search for. + key (str): The key to search for in dictionaries. + + Returns: + str: The name of the discriminator attribute. + + Raises: + ValueError: If the discriminator attribute is not found. + """ + upper_fieldname = fieldname.upper() + + def get_field_discriminator(field: Any) -> Optional[str]: + """Search for the discriminator attribute in a given field.""" + + if isinstance(field, dict): + if key in field: + return f'{field[key]}' + + if hasattr(field, fieldname): + attr = getattr(field, fieldname) + if isinstance(attr, Enum): + return f'{attr.value}' + return f'{attr}' + + if hasattr(field, upper_fieldname): + attr = getattr(field, upper_fieldname) + if isinstance(attr, Enum): + return f'{attr.value}' + return f'{attr}' + + return None + + + if isinstance(model, list): + for field in model: + discriminator = get_field_discriminator(field) + if discriminator is not None: + return discriminator + + discriminator = get_field_discriminator(model) + if discriminator is not None: + return discriminator raise ValueError(f'Could not find discriminator field {fieldname} in {model}') diff --git a/src/livepeer/utils/eventstreaming.py b/src/livepeer/utils/eventstreaming.py index 553b386..74a63f7 100644 --- a/src/livepeer/utils/eventstreaming.py +++ b/src/livepeer/utils/eventstreaming.py @@ -2,12 +2,72 @@ import re import json -from typing import Callable, TypeVar, Optional, Generator, AsyncGenerator, Tuple +from typing import ( + Callable, + Generic, + TypeVar, + Optional, + Generator, + AsyncGenerator, + Tuple, +) import httpx T = TypeVar("T") +class EventStream(Generic[T]): + response: httpx.Response + generator: Generator[T, None, None] + + def __init__( + self, + response: httpx.Response, + decoder: Callable[[str], T], + sentinel: Optional[str] = None, + ): + self.response = response + self.generator = stream_events(response, decoder, sentinel) + + def __iter__(self): + return self + + def __next__(self): + return next(self.generator) + + def __enter__(self): + return self + + def __exit__(self, exc_type, exc_val, exc_tb): + self.response.close() + + +class EventStreamAsync(Generic[T]): + response: httpx.Response + generator: AsyncGenerator[T, None] + + def __init__( + self, + response: httpx.Response, + decoder: Callable[[str], T], + sentinel: Optional[str] = None, + ): + self.response = response + self.generator = stream_events_async(response, decoder, sentinel) + + def __aiter__(self): + return self + + async def __anext__(self): + return await self.generator.__anext__() + + async def __aenter__(self): + return self + + async def __aexit__(self, exc_type, exc_val, exc_tb): + await self.response.aclose() + + class ServerEvent: id: Optional[str] = None event: Optional[str] = None diff --git a/src/livepeer/utils/requestbodies.py b/src/livepeer/utils/requestbodies.py index 4f586ae..d5240dd 100644 --- a/src/livepeer/utils/requestbodies.py +++ b/src/livepeer/utils/requestbodies.py @@ -23,7 +23,7 @@ @dataclass class SerializedRequestBody: - media_type: str + media_type: Optional[str] = None content: Optional[Any] = None data: Optional[Any] = None files: Optional[Any] = None diff --git a/src/livepeer/utils/serializers.py b/src/livepeer/utils/serializers.py index 85d57f4..c5eb365 100644 --- a/src/livepeer/utils/serializers.py +++ b/src/livepeer/utils/serializers.py @@ -116,6 +116,19 @@ def validate(e): return validate +def validate_const(v): + def validate(c): + if is_optional_type(type(c)) and c is None: + return None + + if v != c: + raise ValueError(f"Expected {v}") + + return c + + return validate + + def unmarshal_json(raw, typ: Any) -> Any: return unmarshal(from_json(raw), typ) @@ -172,6 +185,18 @@ def stream_to_text(stream: httpx.Response) -> str: return "".join(stream.iter_text()) +async def stream_to_text_async(stream: httpx.Response) -> str: + return "".join([chunk async for chunk in stream.aiter_text()]) + + +def stream_to_bytes(stream: httpx.Response) -> bytes: + return stream.content + + +async def stream_to_bytes_async(stream: httpx.Response) -> bytes: + return await stream.aread() + + def get_pydantic_model(data: Any, typ: Any) -> Any: if not _contains_pydantic_model(data): return unmarshal(data, typ) diff --git a/src/livepeer/webhook.py b/src/livepeer/webhook.py index 352ec08..f99873d 100644 --- a/src/livepeer/webhook.py +++ b/src/livepeer/webhook.py @@ -5,7 +5,7 @@ from livepeer._hooks import HookContext from livepeer.models import components, errors, operations from livepeer.types import BaseModel, OptionalNullable, UNSET -from typing import List, Optional, Union, cast +from typing import List, Mapping, Optional, Union, cast class Webhook(BaseSDK): @@ -17,12 +17,14 @@ def get_all( retries: OptionalNullable[utils.RetryConfig] = UNSET, server_url: Optional[str] = None, timeout_ms: Optional[int] = None, + http_headers: Optional[Mapping[str, str]] = None, ) -> operations.GetWebhooksResponse: r"""Retrieve a Webhook :param retries: Override the default retry configuration for this method :param server_url: Override the default server URL for this method :param timeout_ms: Override the default request timeout configuration for this method in milliseconds + :param http_headers: Additional headers to set or replace on requests. """ base_url = None url_variables = None @@ -42,6 +44,7 @@ def get_all( request_has_query_params=True, user_agent_header="user-agent", accept_header_value="application/json", + http_headers=http_headers, security=self.sdk_configuration.security, timeout_ms=timeout_ms, ) @@ -73,20 +76,22 @@ def get_all( http_meta=components.HTTPMetadata(request=req, response=http_res), ) if utils.match_response(http_res, ["4XX", "5XX"], "*"): + http_res_text = utils.stream_to_text(http_res) raise errors.SDKError( - "API error occurred", http_res.status_code, http_res.text, http_res + "API error occurred", http_res.status_code, http_res_text, http_res ) if utils.match_response(http_res, "default", "application/json"): return operations.GetWebhooksResponse( - error=utils.unmarshal_json(http_res.text, Optional[errors.Error]), + error=utils.unmarshal_json(http_res.text, Optional[components.Error]), http_meta=components.HTTPMetadata(request=req, response=http_res), ) content_type = http_res.headers.get("Content-Type") + http_res_text = utils.stream_to_text(http_res) raise errors.SDKError( f"Unexpected response received (code: {http_res.status_code}, type: {content_type})", http_res.status_code, - http_res.text, + http_res_text, http_res, ) @@ -96,12 +101,14 @@ async def get_all_async( retries: OptionalNullable[utils.RetryConfig] = UNSET, server_url: Optional[str] = None, timeout_ms: Optional[int] = None, + http_headers: Optional[Mapping[str, str]] = None, ) -> operations.GetWebhooksResponse: r"""Retrieve a Webhook :param retries: Override the default retry configuration for this method :param server_url: Override the default server URL for this method :param timeout_ms: Override the default request timeout configuration for this method in milliseconds + :param http_headers: Additional headers to set or replace on requests. """ base_url = None url_variables = None @@ -121,6 +128,7 @@ async def get_all_async( request_has_query_params=True, user_agent_header="user-agent", accept_header_value="application/json", + http_headers=http_headers, security=self.sdk_configuration.security, timeout_ms=timeout_ms, ) @@ -152,20 +160,22 @@ async def get_all_async( http_meta=components.HTTPMetadata(request=req, response=http_res), ) if utils.match_response(http_res, ["4XX", "5XX"], "*"): + http_res_text = await utils.stream_to_text_async(http_res) raise errors.SDKError( - "API error occurred", http_res.status_code, http_res.text, http_res + "API error occurred", http_res.status_code, http_res_text, http_res ) if utils.match_response(http_res, "default", "application/json"): return operations.GetWebhooksResponse( - error=utils.unmarshal_json(http_res.text, Optional[errors.Error]), + error=utils.unmarshal_json(http_res.text, Optional[components.Error]), http_meta=components.HTTPMetadata(request=req, response=http_res), ) content_type = http_res.headers.get("Content-Type") + http_res_text = await utils.stream_to_text_async(http_res) raise errors.SDKError( f"Unexpected response received (code: {http_res.status_code}, type: {content_type})", http_res.status_code, - http_res.text, + http_res_text, http_res, ) @@ -176,6 +186,7 @@ def create( retries: OptionalNullable[utils.RetryConfig] = UNSET, server_url: Optional[str] = None, timeout_ms: Optional[int] = None, + http_headers: Optional[Mapping[str, str]] = None, ) -> operations.CreateWebhookResponse: r"""Create a webhook @@ -186,6 +197,7 @@ def create( :param retries: Override the default retry configuration for this method :param server_url: Override the default server URL for this method :param timeout_ms: Override the default request timeout configuration for this method in milliseconds + :param http_headers: Additional headers to set or replace on requests. """ base_url = None url_variables = None @@ -210,6 +222,7 @@ def create( request_has_query_params=True, user_agent_header="user-agent", accept_header_value="application/json", + http_headers=http_headers, security=self.sdk_configuration.security, get_serialized_body=lambda: utils.serialize_request_body( request, False, False, "json", components.WebhookInput @@ -244,20 +257,22 @@ def create( http_meta=components.HTTPMetadata(request=req, response=http_res), ) if utils.match_response(http_res, ["4XX", "5XX"], "*"): + http_res_text = utils.stream_to_text(http_res) raise errors.SDKError( - "API error occurred", http_res.status_code, http_res.text, http_res + "API error occurred", http_res.status_code, http_res_text, http_res ) if utils.match_response(http_res, "default", "application/json"): return operations.CreateWebhookResponse( - error=utils.unmarshal_json(http_res.text, Optional[errors.Error]), + error=utils.unmarshal_json(http_res.text, Optional[components.Error]), http_meta=components.HTTPMetadata(request=req, response=http_res), ) content_type = http_res.headers.get("Content-Type") + http_res_text = utils.stream_to_text(http_res) raise errors.SDKError( f"Unexpected response received (code: {http_res.status_code}, type: {content_type})", http_res.status_code, - http_res.text, + http_res_text, http_res, ) @@ -268,6 +283,7 @@ async def create_async( retries: OptionalNullable[utils.RetryConfig] = UNSET, server_url: Optional[str] = None, timeout_ms: Optional[int] = None, + http_headers: Optional[Mapping[str, str]] = None, ) -> operations.CreateWebhookResponse: r"""Create a webhook @@ -278,6 +294,7 @@ async def create_async( :param retries: Override the default retry configuration for this method :param server_url: Override the default server URL for this method :param timeout_ms: Override the default request timeout configuration for this method in milliseconds + :param http_headers: Additional headers to set or replace on requests. """ base_url = None url_variables = None @@ -302,6 +319,7 @@ async def create_async( request_has_query_params=True, user_agent_header="user-agent", accept_header_value="application/json", + http_headers=http_headers, security=self.sdk_configuration.security, get_serialized_body=lambda: utils.serialize_request_body( request, False, False, "json", components.WebhookInput @@ -336,20 +354,22 @@ async def create_async( http_meta=components.HTTPMetadata(request=req, response=http_res), ) if utils.match_response(http_res, ["4XX", "5XX"], "*"): + http_res_text = await utils.stream_to_text_async(http_res) raise errors.SDKError( - "API error occurred", http_res.status_code, http_res.text, http_res + "API error occurred", http_res.status_code, http_res_text, http_res ) if utils.match_response(http_res, "default", "application/json"): return operations.CreateWebhookResponse( - error=utils.unmarshal_json(http_res.text, Optional[errors.Error]), + error=utils.unmarshal_json(http_res.text, Optional[components.Error]), http_meta=components.HTTPMetadata(request=req, response=http_res), ) content_type = http_res.headers.get("Content-Type") + http_res_text = await utils.stream_to_text_async(http_res) raise errors.SDKError( f"Unexpected response received (code: {http_res.status_code}, type: {content_type})", http_res.status_code, - http_res.text, + http_res_text, http_res, ) @@ -360,6 +380,7 @@ def get( retries: OptionalNullable[utils.RetryConfig] = UNSET, server_url: Optional[str] = None, timeout_ms: Optional[int] = None, + http_headers: Optional[Mapping[str, str]] = None, ) -> operations.GetWebhookResponse: r"""Retrieve a webhook @@ -367,6 +388,7 @@ def get( :param retries: Override the default retry configuration for this method :param server_url: Override the default server URL for this method :param timeout_ms: Override the default request timeout configuration for this method in milliseconds + :param http_headers: Additional headers to set or replace on requests. """ base_url = None url_variables = None @@ -391,6 +413,7 @@ def get( request_has_query_params=True, user_agent_header="user-agent", accept_header_value="application/json", + http_headers=http_headers, security=self.sdk_configuration.security, timeout_ms=timeout_ms, ) @@ -422,20 +445,22 @@ def get( http_meta=components.HTTPMetadata(request=req, response=http_res), ) if utils.match_response(http_res, ["4XX", "5XX"], "*"): + http_res_text = utils.stream_to_text(http_res) raise errors.SDKError( - "API error occurred", http_res.status_code, http_res.text, http_res + "API error occurred", http_res.status_code, http_res_text, http_res ) if utils.match_response(http_res, "default", "application/json"): return operations.GetWebhookResponse( - error=utils.unmarshal_json(http_res.text, Optional[errors.Error]), + error=utils.unmarshal_json(http_res.text, Optional[components.Error]), http_meta=components.HTTPMetadata(request=req, response=http_res), ) content_type = http_res.headers.get("Content-Type") + http_res_text = utils.stream_to_text(http_res) raise errors.SDKError( f"Unexpected response received (code: {http_res.status_code}, type: {content_type})", http_res.status_code, - http_res.text, + http_res_text, http_res, ) @@ -446,6 +471,7 @@ async def get_async( retries: OptionalNullable[utils.RetryConfig] = UNSET, server_url: Optional[str] = None, timeout_ms: Optional[int] = None, + http_headers: Optional[Mapping[str, str]] = None, ) -> operations.GetWebhookResponse: r"""Retrieve a webhook @@ -453,6 +479,7 @@ async def get_async( :param retries: Override the default retry configuration for this method :param server_url: Override the default server URL for this method :param timeout_ms: Override the default request timeout configuration for this method in milliseconds + :param http_headers: Additional headers to set or replace on requests. """ base_url = None url_variables = None @@ -477,6 +504,7 @@ async def get_async( request_has_query_params=True, user_agent_header="user-agent", accept_header_value="application/json", + http_headers=http_headers, security=self.sdk_configuration.security, timeout_ms=timeout_ms, ) @@ -508,20 +536,22 @@ async def get_async( http_meta=components.HTTPMetadata(request=req, response=http_res), ) if utils.match_response(http_res, ["4XX", "5XX"], "*"): + http_res_text = await utils.stream_to_text_async(http_res) raise errors.SDKError( - "API error occurred", http_res.status_code, http_res.text, http_res + "API error occurred", http_res.status_code, http_res_text, http_res ) if utils.match_response(http_res, "default", "application/json"): return operations.GetWebhookResponse( - error=utils.unmarshal_json(http_res.text, Optional[errors.Error]), + error=utils.unmarshal_json(http_res.text, Optional[components.Error]), http_meta=components.HTTPMetadata(request=req, response=http_res), ) content_type = http_res.headers.get("Content-Type") + http_res_text = await utils.stream_to_text_async(http_res) raise errors.SDKError( f"Unexpected response received (code: {http_res.status_code}, type: {content_type})", http_res.status_code, - http_res.text, + http_res_text, http_res, ) @@ -533,6 +563,7 @@ def update( retries: OptionalNullable[utils.RetryConfig] = UNSET, server_url: Optional[str] = None, timeout_ms: Optional[int] = None, + http_headers: Optional[Mapping[str, str]] = None, ) -> operations.UpdateWebhookResponse: r"""Update a webhook @@ -541,6 +572,7 @@ def update( :param retries: Override the default retry configuration for this method :param server_url: Override the default server URL for this method :param timeout_ms: Override the default request timeout configuration for this method in milliseconds + :param http_headers: Additional headers to set or replace on requests. """ base_url = None url_variables = None @@ -566,6 +598,7 @@ def update( request_has_query_params=True, user_agent_header="user-agent", accept_header_value="application/json", + http_headers=http_headers, security=self.sdk_configuration.security, get_serialized_body=lambda: utils.serialize_request_body( request.webhook, False, False, "json", components.WebhookInput @@ -600,20 +633,22 @@ def update( http_meta=components.HTTPMetadata(request=req, response=http_res), ) if utils.match_response(http_res, ["4XX", "5XX"], "*"): + http_res_text = utils.stream_to_text(http_res) raise errors.SDKError( - "API error occurred", http_res.status_code, http_res.text, http_res + "API error occurred", http_res.status_code, http_res_text, http_res ) if utils.match_response(http_res, "default", "application/json"): return operations.UpdateWebhookResponse( - error=utils.unmarshal_json(http_res.text, Optional[errors.Error]), + error=utils.unmarshal_json(http_res.text, Optional[components.Error]), http_meta=components.HTTPMetadata(request=req, response=http_res), ) content_type = http_res.headers.get("Content-Type") + http_res_text = utils.stream_to_text(http_res) raise errors.SDKError( f"Unexpected response received (code: {http_res.status_code}, type: {content_type})", http_res.status_code, - http_res.text, + http_res_text, http_res, ) @@ -625,6 +660,7 @@ async def update_async( retries: OptionalNullable[utils.RetryConfig] = UNSET, server_url: Optional[str] = None, timeout_ms: Optional[int] = None, + http_headers: Optional[Mapping[str, str]] = None, ) -> operations.UpdateWebhookResponse: r"""Update a webhook @@ -633,6 +669,7 @@ async def update_async( :param retries: Override the default retry configuration for this method :param server_url: Override the default server URL for this method :param timeout_ms: Override the default request timeout configuration for this method in milliseconds + :param http_headers: Additional headers to set or replace on requests. """ base_url = None url_variables = None @@ -658,6 +695,7 @@ async def update_async( request_has_query_params=True, user_agent_header="user-agent", accept_header_value="application/json", + http_headers=http_headers, security=self.sdk_configuration.security, get_serialized_body=lambda: utils.serialize_request_body( request.webhook, False, False, "json", components.WebhookInput @@ -692,20 +730,22 @@ async def update_async( http_meta=components.HTTPMetadata(request=req, response=http_res), ) if utils.match_response(http_res, ["4XX", "5XX"], "*"): + http_res_text = await utils.stream_to_text_async(http_res) raise errors.SDKError( - "API error occurred", http_res.status_code, http_res.text, http_res + "API error occurred", http_res.status_code, http_res_text, http_res ) if utils.match_response(http_res, "default", "application/json"): return operations.UpdateWebhookResponse( - error=utils.unmarshal_json(http_res.text, Optional[errors.Error]), + error=utils.unmarshal_json(http_res.text, Optional[components.Error]), http_meta=components.HTTPMetadata(request=req, response=http_res), ) content_type = http_res.headers.get("Content-Type") + http_res_text = await utils.stream_to_text_async(http_res) raise errors.SDKError( f"Unexpected response received (code: {http_res.status_code}, type: {content_type})", http_res.status_code, - http_res.text, + http_res_text, http_res, ) @@ -716,6 +756,7 @@ def delete( retries: OptionalNullable[utils.RetryConfig] = UNSET, server_url: Optional[str] = None, timeout_ms: Optional[int] = None, + http_headers: Optional[Mapping[str, str]] = None, ) -> operations.DeleteWebhookResponse: r"""Delete a webhook @@ -723,6 +764,7 @@ def delete( :param retries: Override the default retry configuration for this method :param server_url: Override the default server URL for this method :param timeout_ms: Override the default request timeout configuration for this method in milliseconds + :param http_headers: Additional headers to set or replace on requests. """ base_url = None url_variables = None @@ -747,6 +789,7 @@ def delete( request_has_query_params=True, user_agent_header="user-agent", accept_header_value="application/json", + http_headers=http_headers, security=self.sdk_configuration.security, timeout_ms=timeout_ms, ) @@ -778,20 +821,22 @@ def delete( http_meta=components.HTTPMetadata(request=req, response=http_res), ) if utils.match_response(http_res, ["4XX", "5XX"], "*"): + http_res_text = utils.stream_to_text(http_res) raise errors.SDKError( - "API error occurred", http_res.status_code, http_res.text, http_res + "API error occurred", http_res.status_code, http_res_text, http_res ) if utils.match_response(http_res, "default", "application/json"): return operations.DeleteWebhookResponse( - error=utils.unmarshal_json(http_res.text, Optional[errors.Error]), + error=utils.unmarshal_json(http_res.text, Optional[components.Error]), http_meta=components.HTTPMetadata(request=req, response=http_res), ) content_type = http_res.headers.get("Content-Type") + http_res_text = utils.stream_to_text(http_res) raise errors.SDKError( f"Unexpected response received (code: {http_res.status_code}, type: {content_type})", http_res.status_code, - http_res.text, + http_res_text, http_res, ) @@ -802,6 +847,7 @@ async def delete_async( retries: OptionalNullable[utils.RetryConfig] = UNSET, server_url: Optional[str] = None, timeout_ms: Optional[int] = None, + http_headers: Optional[Mapping[str, str]] = None, ) -> operations.DeleteWebhookResponse: r"""Delete a webhook @@ -809,6 +855,7 @@ async def delete_async( :param retries: Override the default retry configuration for this method :param server_url: Override the default server URL for this method :param timeout_ms: Override the default request timeout configuration for this method in milliseconds + :param http_headers: Additional headers to set or replace on requests. """ base_url = None url_variables = None @@ -833,6 +880,7 @@ async def delete_async( request_has_query_params=True, user_agent_header="user-agent", accept_header_value="application/json", + http_headers=http_headers, security=self.sdk_configuration.security, timeout_ms=timeout_ms, ) @@ -864,20 +912,22 @@ async def delete_async( http_meta=components.HTTPMetadata(request=req, response=http_res), ) if utils.match_response(http_res, ["4XX", "5XX"], "*"): + http_res_text = await utils.stream_to_text_async(http_res) raise errors.SDKError( - "API error occurred", http_res.status_code, http_res.text, http_res + "API error occurred", http_res.status_code, http_res_text, http_res ) if utils.match_response(http_res, "default", "application/json"): return operations.DeleteWebhookResponse( - error=utils.unmarshal_json(http_res.text, Optional[errors.Error]), + error=utils.unmarshal_json(http_res.text, Optional[components.Error]), http_meta=components.HTTPMetadata(request=req, response=http_res), ) content_type = http_res.headers.get("Content-Type") + http_res_text = await utils.stream_to_text_async(http_res) raise errors.SDKError( f"Unexpected response received (code: {http_res.status_code}, type: {content_type})", http_res.status_code, - http_res.text, + http_res_text, http_res, ) @@ -888,6 +938,7 @@ def get_logs( retries: OptionalNullable[utils.RetryConfig] = UNSET, server_url: Optional[str] = None, timeout_ms: Optional[int] = None, + http_headers: Optional[Mapping[str, str]] = None, ) -> operations.GetWebhookLogsResponse: r"""Retrieve webhook logs @@ -895,6 +946,7 @@ def get_logs( :param retries: Override the default retry configuration for this method :param server_url: Override the default server URL for this method :param timeout_ms: Override the default request timeout configuration for this method in milliseconds + :param http_headers: Additional headers to set or replace on requests. """ base_url = None url_variables = None @@ -919,6 +971,7 @@ def get_logs( request_has_query_params=True, user_agent_header="user-agent", accept_header_value="application/json", + http_headers=http_headers, security=self.sdk_configuration.security, timeout_ms=timeout_ms, ) @@ -950,20 +1003,22 @@ def get_logs( http_meta=components.HTTPMetadata(request=req, response=http_res), ) if utils.match_response(http_res, ["4XX", "5XX"], "*"): + http_res_text = utils.stream_to_text(http_res) raise errors.SDKError( - "API error occurred", http_res.status_code, http_res.text, http_res + "API error occurred", http_res.status_code, http_res_text, http_res ) if utils.match_response(http_res, "default", "application/json"): return operations.GetWebhookLogsResponse( - error=utils.unmarshal_json(http_res.text, Optional[errors.Error]), + error=utils.unmarshal_json(http_res.text, Optional[components.Error]), http_meta=components.HTTPMetadata(request=req, response=http_res), ) content_type = http_res.headers.get("Content-Type") + http_res_text = utils.stream_to_text(http_res) raise errors.SDKError( f"Unexpected response received (code: {http_res.status_code}, type: {content_type})", http_res.status_code, - http_res.text, + http_res_text, http_res, ) @@ -974,6 +1029,7 @@ async def get_logs_async( retries: OptionalNullable[utils.RetryConfig] = UNSET, server_url: Optional[str] = None, timeout_ms: Optional[int] = None, + http_headers: Optional[Mapping[str, str]] = None, ) -> operations.GetWebhookLogsResponse: r"""Retrieve webhook logs @@ -981,6 +1037,7 @@ async def get_logs_async( :param retries: Override the default retry configuration for this method :param server_url: Override the default server URL for this method :param timeout_ms: Override the default request timeout configuration for this method in milliseconds + :param http_headers: Additional headers to set or replace on requests. """ base_url = None url_variables = None @@ -1005,6 +1062,7 @@ async def get_logs_async( request_has_query_params=True, user_agent_header="user-agent", accept_header_value="application/json", + http_headers=http_headers, security=self.sdk_configuration.security, timeout_ms=timeout_ms, ) @@ -1036,20 +1094,22 @@ async def get_logs_async( http_meta=components.HTTPMetadata(request=req, response=http_res), ) if utils.match_response(http_res, ["4XX", "5XX"], "*"): + http_res_text = await utils.stream_to_text_async(http_res) raise errors.SDKError( - "API error occurred", http_res.status_code, http_res.text, http_res + "API error occurred", http_res.status_code, http_res_text, http_res ) if utils.match_response(http_res, "default", "application/json"): return operations.GetWebhookLogsResponse( - error=utils.unmarshal_json(http_res.text, Optional[errors.Error]), + error=utils.unmarshal_json(http_res.text, Optional[components.Error]), http_meta=components.HTTPMetadata(request=req, response=http_res), ) content_type = http_res.headers.get("Content-Type") + http_res_text = await utils.stream_to_text_async(http_res) raise errors.SDKError( f"Unexpected response received (code: {http_res.status_code}, type: {content_type})", http_res.status_code, - http_res.text, + http_res_text, http_res, ) @@ -1061,6 +1121,7 @@ def get_log( retries: OptionalNullable[utils.RetryConfig] = UNSET, server_url: Optional[str] = None, timeout_ms: Optional[int] = None, + http_headers: Optional[Mapping[str, str]] = None, ) -> operations.GetWebhookLogResponse: r"""Retrieve a webhook log @@ -1069,6 +1130,7 @@ def get_log( :param retries: Override the default retry configuration for this method :param server_url: Override the default server URL for this method :param timeout_ms: Override the default request timeout configuration for this method in milliseconds + :param http_headers: Additional headers to set or replace on requests. """ base_url = None url_variables = None @@ -1094,6 +1156,7 @@ def get_log( request_has_query_params=True, user_agent_header="user-agent", accept_header_value="application/json", + http_headers=http_headers, security=self.sdk_configuration.security, timeout_ms=timeout_ms, ) @@ -1125,20 +1188,22 @@ def get_log( http_meta=components.HTTPMetadata(request=req, response=http_res), ) if utils.match_response(http_res, ["4XX", "5XX"], "*"): + http_res_text = utils.stream_to_text(http_res) raise errors.SDKError( - "API error occurred", http_res.status_code, http_res.text, http_res + "API error occurred", http_res.status_code, http_res_text, http_res ) if utils.match_response(http_res, "default", "application/json"): return operations.GetWebhookLogResponse( - error=utils.unmarshal_json(http_res.text, Optional[errors.Error]), + error=utils.unmarshal_json(http_res.text, Optional[components.Error]), http_meta=components.HTTPMetadata(request=req, response=http_res), ) content_type = http_res.headers.get("Content-Type") + http_res_text = utils.stream_to_text(http_res) raise errors.SDKError( f"Unexpected response received (code: {http_res.status_code}, type: {content_type})", http_res.status_code, - http_res.text, + http_res_text, http_res, ) @@ -1150,6 +1215,7 @@ async def get_log_async( retries: OptionalNullable[utils.RetryConfig] = UNSET, server_url: Optional[str] = None, timeout_ms: Optional[int] = None, + http_headers: Optional[Mapping[str, str]] = None, ) -> operations.GetWebhookLogResponse: r"""Retrieve a webhook log @@ -1158,6 +1224,7 @@ async def get_log_async( :param retries: Override the default retry configuration for this method :param server_url: Override the default server URL for this method :param timeout_ms: Override the default request timeout configuration for this method in milliseconds + :param http_headers: Additional headers to set or replace on requests. """ base_url = None url_variables = None @@ -1183,6 +1250,7 @@ async def get_log_async( request_has_query_params=True, user_agent_header="user-agent", accept_header_value="application/json", + http_headers=http_headers, security=self.sdk_configuration.security, timeout_ms=timeout_ms, ) @@ -1214,20 +1282,22 @@ async def get_log_async( http_meta=components.HTTPMetadata(request=req, response=http_res), ) if utils.match_response(http_res, ["4XX", "5XX"], "*"): + http_res_text = await utils.stream_to_text_async(http_res) raise errors.SDKError( - "API error occurred", http_res.status_code, http_res.text, http_res + "API error occurred", http_res.status_code, http_res_text, http_res ) if utils.match_response(http_res, "default", "application/json"): return operations.GetWebhookLogResponse( - error=utils.unmarshal_json(http_res.text, Optional[errors.Error]), + error=utils.unmarshal_json(http_res.text, Optional[components.Error]), http_meta=components.HTTPMetadata(request=req, response=http_res), ) content_type = http_res.headers.get("Content-Type") + http_res_text = await utils.stream_to_text_async(http_res) raise errors.SDKError( f"Unexpected response received (code: {http_res.status_code}, type: {content_type})", http_res.status_code, - http_res.text, + http_res_text, http_res, ) @@ -1239,6 +1309,7 @@ def resend_log( retries: OptionalNullable[utils.RetryConfig] = UNSET, server_url: Optional[str] = None, timeout_ms: Optional[int] = None, + http_headers: Optional[Mapping[str, str]] = None, ) -> operations.ResendWebhookResponse: r"""Resend a webhook @@ -1252,6 +1323,7 @@ def resend_log( :param retries: Override the default retry configuration for this method :param server_url: Override the default server URL for this method :param timeout_ms: Override the default request timeout configuration for this method in milliseconds + :param http_headers: Additional headers to set or replace on requests. """ base_url = None url_variables = None @@ -1277,6 +1349,7 @@ def resend_log( request_has_query_params=True, user_agent_header="user-agent", accept_header_value="application/json", + http_headers=http_headers, security=self.sdk_configuration.security, timeout_ms=timeout_ms, ) @@ -1308,20 +1381,22 @@ def resend_log( http_meta=components.HTTPMetadata(request=req, response=http_res), ) if utils.match_response(http_res, ["4XX", "5XX"], "*"): + http_res_text = utils.stream_to_text(http_res) raise errors.SDKError( - "API error occurred", http_res.status_code, http_res.text, http_res + "API error occurred", http_res.status_code, http_res_text, http_res ) if utils.match_response(http_res, "default", "application/json"): return operations.ResendWebhookResponse( - error=utils.unmarshal_json(http_res.text, Optional[errors.Error]), + error=utils.unmarshal_json(http_res.text, Optional[components.Error]), http_meta=components.HTTPMetadata(request=req, response=http_res), ) content_type = http_res.headers.get("Content-Type") + http_res_text = utils.stream_to_text(http_res) raise errors.SDKError( f"Unexpected response received (code: {http_res.status_code}, type: {content_type})", http_res.status_code, - http_res.text, + http_res_text, http_res, ) @@ -1333,6 +1408,7 @@ async def resend_log_async( retries: OptionalNullable[utils.RetryConfig] = UNSET, server_url: Optional[str] = None, timeout_ms: Optional[int] = None, + http_headers: Optional[Mapping[str, str]] = None, ) -> operations.ResendWebhookResponse: r"""Resend a webhook @@ -1346,6 +1422,7 @@ async def resend_log_async( :param retries: Override the default retry configuration for this method :param server_url: Override the default server URL for this method :param timeout_ms: Override the default request timeout configuration for this method in milliseconds + :param http_headers: Additional headers to set or replace on requests. """ base_url = None url_variables = None @@ -1371,6 +1448,7 @@ async def resend_log_async( request_has_query_params=True, user_agent_header="user-agent", accept_header_value="application/json", + http_headers=http_headers, security=self.sdk_configuration.security, timeout_ms=timeout_ms, ) @@ -1402,19 +1480,21 @@ async def resend_log_async( http_meta=components.HTTPMetadata(request=req, response=http_res), ) if utils.match_response(http_res, ["4XX", "5XX"], "*"): + http_res_text = await utils.stream_to_text_async(http_res) raise errors.SDKError( - "API error occurred", http_res.status_code, http_res.text, http_res + "API error occurred", http_res.status_code, http_res_text, http_res ) if utils.match_response(http_res, "default", "application/json"): return operations.ResendWebhookResponse( - error=utils.unmarshal_json(http_res.text, Optional[errors.Error]), + error=utils.unmarshal_json(http_res.text, Optional[components.Error]), http_meta=components.HTTPMetadata(request=req, response=http_res), ) content_type = http_res.headers.get("Content-Type") + http_res_text = await utils.stream_to_text_async(http_res) raise errors.SDKError( f"Unexpected response received (code: {http_res.status_code}, type: {content_type})", http_res.status_code, - http_res.text, + http_res_text, http_res, )