diff --git a/.speakeasy/gen.lock b/.speakeasy/gen.lock index 506f7b0..4660263 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: fb1bc2946d2afe8e5a8160c0b606ae47 docVersion: 1.0.0 - speakeasyVersion: 1.399.0 - generationVersion: 2.415.8 - releaseVersion: 0.3.0 - configChecksum: e2a3f034034c8b68bbb6d9b34363d9f6 + speakeasyVersion: 1.434.0 + generationVersion: 2.452.0 + releaseVersion: 0.4.0 + configChecksum: 98111d295812d33d0bd0f5e01cd63a53 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.4 + core: 5.6.4 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,15 @@ 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 + tests: 1.6.0 + unions: 3.0.3 uploadStreams: 1.0.0 generatedFiles: - .gitattributes + - .python-version - .vscode/settings.json - CONTRIBUTING.md - USAGE.md @@ -63,6 +65,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 +85,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 +118,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 +128,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 +195,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,6 +239,7 @@ 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/genaudiototextgenerateresponse422responsebody.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", "videoOnly": false, "id": "PUSH123", "spec": {"name": "My target", "url": "rtmps://live.my-service.tv/channel/secretKey"}}]}} 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", "videoOnly": false, "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", "videoOnly": false, "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", "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": []}, "name": "test_stream"} 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,9 +1206,9 @@ examples: "400": application/json: {"": {}} "401": - application/json: {"detail": {"msg": ""}, "": {}} - "413": application/json: {"": {}} + "413": + application/json: {"detail": {"msg": ""}, "": {}} "422": application/json: {"": {}} "500": @@ -1207,6 +1228,23 @@ 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: diff --git a/.speakeasy/gen.yaml b/.speakeasy/gen.yaml index 4301118..15fe5e4 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: {} @@ -22,8 +23,11 @@ python: clientServerStatusCodesAsErrors: true 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..b5b1c21 100644 --- a/.speakeasy/workflow.lock +++ b/.speakeasy/workflow.lock @@ -1,9 +1,9 @@ -speakeasyVersion: 1.399.0 +speakeasyVersion: 1.434.0 sources: livepeer-studio-api: sourceNamespace: livepeer-studio-api - sourceRevisionDigest: sha256:05b8e6f32af10787d3e904f94a0924c304ec1dd8357de9351eebd75f8ea9c3ca - sourceBlobDigest: sha256:aa27f19cd706fdbc92320eea5ca4d28aefd20557554f78a6fa0393320d8ee1d6 + sourceRevisionDigest: sha256:8b1a8f7df796dc893e646e4b6678b39b4634783c064d30cc5eab1865604ef08d + sourceBlobDigest: sha256:8bdf57f7f10d5e51da7d611bfcc08b2c29912a6b9512de7ffcfaae90a0723183 tags: - latest - main @@ -11,8 +11,8 @@ targets: livepeer-python: source: livepeer-studio-api sourceNamespace: livepeer-studio-api - sourceRevisionDigest: sha256:05b8e6f32af10787d3e904f94a0924c304ec1dd8357de9351eebd75f8ea9c3ca - sourceBlobDigest: sha256:aa27f19cd706fdbc92320eea5ca4d28aefd20557554f78a6fa0393320d8ee1d6 + sourceRevisionDigest: sha256:8b1a8f7df796dc893e646e4b6678b39b4634783c064d30cc5eab1865604ef08d + sourceBlobDigest: sha256:8bdf57f7f10d5e51da7d611bfcc08b2c29912a6b9512de7ffcfaae90a0723183 my-first-target: source: livepeer-studio-api sourceNamespace: livepeer-studio-api diff --git a/README.md b/README.md index 04f41e3..cae5651 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) @@ -263,7 +264,7 @@ res = s.stream.create(request={ "multistream": { "targets": [ { - "profile": "720p", + "profile": "720p0", "video_only": False, "id": "PUSH123", "spec": { @@ -346,7 +347,7 @@ res = s.stream.create(request={ "multistream": { "targets": [ { - "profile": "720p", + "profile": "720p0", "video_only": False, "id": "PUSH123", "spec": { @@ -368,12 +369,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. -| Error Object | Status Code | Content Type | +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 | + +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 | */* | +| errors.SDKError | 4XX, 5XX | \*/\* | ### Example @@ -558,7 +570,7 @@ res = s.stream.create(request={ "multistream": { "targets": [ { - "profile": "720p", + "profile": "720p0", "video_only": False, "id": "PUSH123", "spec": { diff --git a/RELEASES.md b/RELEASES.md index f5c4cca..fb7743f 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-11-07 00:17:15 +### Changes +Based on: +- OpenAPI Doc +- Speakeasy CLI 1.434.0 (2.452.0) 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..84aea76 100644 --- a/USAGE.md +++ b/USAGE.md @@ -61,7 +61,7 @@ res = s.stream.create(request={ "multistream": { "targets": [ { - "profile": "720p", + "profile": "720p0", "video_only": False, "id": "PUSH123", "spec": { @@ -144,7 +144,7 @@ async def main(): "multistream": { "targets": [ { - "profile": "720p", + "profile": "720p0", "video_only": False, "id": "PUSH123", "spec": { diff --git a/codeSamples.yaml b/codeSamples.yaml index 71546ae..67d7953 100644 --- a/codeSamples.yaml +++ b/codeSamples.yaml @@ -49,7 +49,7 @@ actions: api_key="", ) - res = s.access_control.delete(key_id="") + res = s.access_control.delete(key_id="") if res is not None: # handle response @@ -66,7 +66,7 @@ actions: api_key="", ) - res = s.access_control.get(key_id="") + res = s.access_control.get(key_id="") if res.signing_key is not None: # handle response @@ -83,12 +83,12 @@ actions: api_key="", ) - res = s.access_control.update(key_id="", request_body={}) + res = s.access_control.update(key_id="", request_body={}) if res is not None: # handle response pass - - target: $["paths"]["/api/beta/generate/audio-to-text"]["post"] + - target: $["paths"]["/api/generate/audio-to-text"]["post"] update: x-codeSamples: - lang: python @@ -110,7 +110,7 @@ actions: if res.text_response is not None: # handle response pass - - target: $["paths"]["/api/beta/generate/image-to-image"]["post"] + - target: $["paths"]["/api/generate/image-to-image"]["post"] update: x-codeSamples: - lang: python @@ -133,7 +133,7 @@ actions: if res.image_response is not None: # handle response pass - - target: $["paths"]["/api/beta/generate/image-to-video"]["post"] + - target: $["paths"]["/api/generate/image-to-video"]["post"] update: x-codeSamples: - lang: python @@ -155,7 +155,26 @@ actions: if res.video_response is not None: # handle response pass - - target: $["paths"]["/api/beta/generate/segment-anything-2"]["post"] + - target: $["paths"]["/api/generate/llm"]["post"] + update: + x-codeSamples: + - lang: python + label: genLLM + source: |- + from livepeer import Livepeer + + s = Livepeer( + api_key="", + ) + + res = s.generate.llm(request={ + "prompt": "", + }) + + if res.llm_response is not None: + # handle response + pass + - target: $["paths"]["/api/generate/segment-anything-2"]["post"] update: x-codeSamples: - lang: python @@ -177,7 +196,7 @@ actions: if res.masks_response is not None: # handle response pass - - target: $["paths"]["/api/beta/generate/text-to-image"]["post"] + - target: $["paths"]["/api/generate/text-to-image"]["post"] update: x-codeSamples: - lang: python @@ -196,7 +215,7 @@ actions: if res.image_response is not None: # handle response pass - - target: $["paths"]["/api/beta/generate/upscale"]["post"] + - target: $["paths"]["/api/generate/upscale"]["post"] update: x-codeSamples: - lang: python @@ -317,6 +336,18 @@ actions: "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, + }, ], }) @@ -335,7 +366,7 @@ actions: api_key="", ) - res = s.asset.delete(asset_id="") + res = s.asset.delete(asset_id="") if res is not None: # handle response @@ -352,7 +383,7 @@ actions: api_key="", ) - res = s.asset.get(asset_id="") + res = s.asset.get(asset_id="") if res.asset is not None: # handle response @@ -370,7 +401,7 @@ actions: api_key="", ) - res = s.asset.update(asset_id="", asset_patch_payload={ + res = s.asset.update(asset_id="", asset_patch_payload={ "name": "filename.mp4", "playback_policy": { "type": components.Type.WEBHOOK, @@ -488,7 +519,7 @@ actions: api_key="", ) - res = s.metrics.get_public_viewership(playback_id="") + res = s.metrics.get_public_viewership(playback_id="") if res.data is not None: # handle response @@ -599,168 +630,6 @@ actions: 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( - 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 - - s = Livepeer( - api_key="", - ) - - res = s.room.update_user(id="", user_id="", room_user_update_payload={ - "can_publish": True, - "can_publish_data": True, - }) - - if res is not None: - # handle response - pass - target: $["paths"]["/session"]["get"] update: x-codeSamples: @@ -890,12 +759,24 @@ actions: "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": "720p", + "profile": "720p0", "video_only": False, "id": "PUSH123", "spec": { @@ -962,7 +843,7 @@ actions: "multistream": { "targets": [ { - "profile": "720p", + "profile": "720p0", "video_only": False, "id": "PUSH123", "spec": { @@ -992,6 +873,28 @@ actions: "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.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": [ @@ -1007,8 +910,21 @@ actions: "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", }) if res is not None: @@ -1068,7 +984,7 @@ actions: api_key="", ) - res = s.stream.remove_multistream_target(id="", target_id="") + res = s.stream.remove_multistream_target(id="", target_id="") if res is not None: # handle response @@ -1119,7 +1035,7 @@ actions: api_key="", ) - res = s.session.get_recorded(parent_id="", record=True) + res = s.session.get_recorded(parent_id="", record=True) if res.data is not None: # handle response @@ -1153,7 +1069,7 @@ actions: api_key="", ) - res = s.task.get(task_id="") + res = s.task.get(task_id="") if res.task is not None: # handle response @@ -1176,12 +1092,9 @@ actions: "url": "https://s3.amazonaws.com/bucket/file.mp4", }, "storage": { - "type": components.StorageType.S3, - "endpoint": "https://gateway.storjshare.io", - "bucket": "outputbucket", + "type": components.TranscodePayloadStorageType.WEB3_STORAGE, "credentials": { - "access_key_id": "AKIAIOSFODNN7EXAMPLE", - "secret_access_key": "wJalrXUtnFEMI/K7MDENG/bPxRfiCYEXAMPLEKEY", + "proof": "EaJlcm9vdHOAZ3ZlcnNpb24BmgIBcRIg2uxHpcPYSWNtifMKFkPC7IEDvFDCxCd3ADViv0coV7SnYXNYRO2hA0AnblHEW38s3lSlcwaDjPn", }, }, "outputs": { @@ -1350,7 +1263,7 @@ actions: api_key="", ) - res = s.webhook.get_log(id="", log_id="") + res = s.webhook.get_log(id="", log_id="") if res.webhook_log is not None: # handle response @@ -1367,7 +1280,7 @@ actions: api_key="", ) - res = s.webhook.resend_log(id="", log_id="") + res = s.webhook.resend_log(id="", log_id="") if res.webhook_log is not None: # handle response 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/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/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/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..804340b 100644 --- a/docs/sdks/accesscontrol/README.md +++ b/docs/sdks/accesscontrol/README.md @@ -48,10 +48,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 @@ -86,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 | \*/\* | ## delete @@ -125,10 +123,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 @@ -164,10 +161,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 @@ -204,6 +200,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..c922582 100644 --- a/docs/sdks/asset/README.md +++ b/docs/sdks/asset/README.md @@ -47,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 @@ -183,10 +182,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 @@ -249,10 +247,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 @@ -288,10 +285,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 @@ -339,10 +335,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 @@ -378,6 +373,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..2d9a04f 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 @@ -50,14 +51,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 @@ -99,14 +99,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 @@ -147,14 +146,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 @@ -196,14 +194,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 @@ -244,15 +241,14 @@ 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.GenAudioToTextGenerateResponse422ResponseBody | 422 | application/json | | errors.GenAudioToTextGenerateResponse500ResponseBody | 500 | application/json | -| errors.SDKError | 4xx-5xx | */* | - +| errors.SDKError | 4XX, 5XX | \*/\* | ## segment_anything2 @@ -293,10 +289,54 @@ 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 + +s = Livepeer( + api_key="", +) + +res = s.generate.llm(request={ + "prompt": "", +}) + +if res.llm_response is not None: + # handle response + pass + +``` + +### 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/metrics/README.md b/docs/sdks/metrics/README.md index 613fbe7..66bdfff 100644 --- a/docs/sdks/metrics/README.md +++ b/docs/sdks/metrics/README.md @@ -50,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 | \*/\* | ## get_viewership @@ -90,10 +89,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 @@ -130,10 +128,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 @@ -172,10 +169,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 @@ -211,6 +207,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..e2c5b2f 100644 --- a/docs/sdks/multistream/README.md +++ b/docs/sdks/multistream/README.md @@ -46,10 +46,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 @@ -87,10 +86,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 @@ -126,10 +124,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 @@ -168,10 +165,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 @@ -209,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/playback/README.md b/docs/sdks/playback/README.md index c8394df..197ec70 100644 --- a/docs/sdks/playback/README.md +++ b/docs/sdks/playback/README.md @@ -43,7 +43,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..d0016d7 100644 --- a/docs/sdks/room/README.md +++ b/docs/sdks/room/README.md @@ -53,10 +53,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~~ @@ -94,10 +93,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~~ @@ -135,10 +133,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~~ @@ -181,10 +178,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~~ @@ -222,10 +218,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~~ @@ -271,10 +266,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~~ @@ -313,10 +307,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~~ @@ -359,10 +352,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~~ @@ -401,6 +393,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..5ba35b8 100644 --- a/docs/sdks/session/README.md +++ b/docs/sdks/session/README.md @@ -46,10 +46,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 @@ -84,10 +83,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 @@ -123,10 +121,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 @@ -163,6 +160,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..544a932 100644 --- a/docs/sdks/stream/README.md +++ b/docs/sdks/stream/README.md @@ -99,7 +99,7 @@ res = s.stream.create(request={ "multistream": { "targets": [ { - "profile": "720p", + "profile": "720p0", "video_only": False, "id": "PUSH123", "spec": { @@ -130,10 +130,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 @@ -169,10 +168,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 @@ -208,10 +206,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 @@ -232,7 +229,7 @@ res = s.stream.update(id="", stream_patch_payload={ "multistream": { "targets": [ { - "profile": "720p", + "profile": "720p0", "video_only": False, "id": "PUSH123", "spec": { @@ -279,6 +276,7 @@ res = s.stream.update(id="", stream_patch_payload={ }, ], }, + "name": "test_stream", }) if res is not None: @@ -301,10 +299,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 @@ -344,10 +341,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 @@ -391,10 +387,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 @@ -437,10 +432,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 @@ -482,10 +476,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 @@ -521,10 +514,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 @@ -569,10 +561,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 @@ -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..eacd8d8 100644 --- a/docs/sdks/task/README.md +++ b/docs/sdks/task/README.md @@ -43,10 +43,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 @@ -82,6 +81,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..df085fb 100644 --- a/docs/sdks/transcode/README.md +++ b/docs/sdks/transcode/README.md @@ -203,6 +203,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..dda3386 100644 --- a/docs/sdks/webhook/README.md +++ b/docs/sdks/webhook/README.md @@ -49,10 +49,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 @@ -100,10 +99,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 @@ -139,10 +137,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 @@ -190,10 +187,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 @@ -229,10 +225,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 @@ -268,10 +263,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 @@ -308,10 +302,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 @@ -351,6 +344,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..5df06a6 100644 --- a/poetry.lock +++ b/poetry.lock @@ -548,4 +548,4 @@ typing-extensions = ">=3.7.4" [metadata] lock-version = "2.0" python-versions = "^3.8" -content-hash = "6bb5f77afb8fcbe7327ccd1fcc33f5c279c6a2582d43be73b69c2a94b836b85d" +content-hash = "9e57d395164aeb8637702f9d37b29cff9bdc5ebcbd44305b91808c122428bacb" diff --git a/pyproject.toml b/pyproject.toml index 0c2e12b..afd439e 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" @@ -21,7 +21,7 @@ python = "^3.8" eval-type-backport = "^0.2.0" httpx = "^0.27.0" jsonpath-python = "^1.0.6" -pydantic = "~2.9.0" +pydantic = "~2.9.2" python-dateutil = "2.8.2" typing-inspect = "^0.9.0" 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..c98523c 100644 --- a/src/livepeer/accesscontrol.py +++ b/src/livepeer/accesscontrol.py @@ -77,20 +77,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, ) @@ -160,20 +162,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, ) @@ -239,20 +243,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, ) @@ -318,20 +324,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, ) @@ -401,20 +409,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, ) @@ -484,20 +494,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, ) @@ -570,20 +582,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, ) @@ -656,20 +670,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, ) @@ -754,20 +770,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, ) @@ -852,19 +870,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..10d553f 100644 --- a/src/livepeer/asset.py +++ b/src/livepeer/asset.py @@ -73,20 +73,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, ) @@ -152,20 +154,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, ) @@ -314,20 +318,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, ) @@ -476,20 +482,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, ) @@ -575,20 +583,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, ) @@ -674,20 +684,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, ) @@ -758,20 +770,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, ) @@ -842,20 +856,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, ) @@ -940,20 +956,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, ) @@ -1038,20 +1056,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, ) @@ -1121,20 +1141,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, ) @@ -1204,19 +1226,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/generate.py b/src/livepeer/generate.py index 425b7fa..9634630 100644 --- a/src/livepeer/generate.py +++ b/src/livepeer/generate.py @@ -44,7 +44,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, @@ -112,22 +112,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, ) @@ -164,7 +166,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, @@ -232,22 +234,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, ) @@ -284,7 +288,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, @@ -353,8 +357,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 +370,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, ) @@ -405,7 +411,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, @@ -474,8 +480,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 +493,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, ) @@ -526,7 +534,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, @@ -595,8 +603,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 +616,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, ) @@ -647,7 +657,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, @@ -716,8 +726,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 +739,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, ) @@ -766,7 +778,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, @@ -834,8 +846,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 +859,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, ) @@ -884,7 +898,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, @@ -952,8 +966,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 +979,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, ) @@ -1004,7 +1020,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, @@ -1078,8 +1094,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 +1107,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, ) @@ -1130,7 +1148,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, @@ -1204,8 +1222,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 +1235,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, ) @@ -1257,7 +1277,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, @@ -1327,8 +1347,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 +1360,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, ) @@ -1380,7 +1402,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, @@ -1450,8 +1472,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 +1485,246 @@ 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, + ) -> 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 + """ + 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", + 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, + ) -> 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 + """ + 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", + 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/metrics.py b/src/livepeer/metrics.py index ec356e9..16947c7 100644 --- a/src/livepeer/metrics.py +++ b/src/livepeer/metrics.py @@ -89,20 +89,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, ) @@ -184,20 +186,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, ) @@ -276,20 +280,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, ) @@ -368,20 +374,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, ) @@ -462,20 +470,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, ) @@ -556,20 +566,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, ) @@ -647,20 +659,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, ) @@ -738,20 +752,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, ) @@ -827,20 +843,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, ) @@ -916,19 +934,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..ad6fb2d 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, TypedDict class AssetType(str, Enum): 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..e531a2d 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): 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..5b08194 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, TypedDict class ExportTaskParams2TypedDict(TypedDict): 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..8f15619 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 TypedDict class InputCreatorIDType(str, Enum): diff --git a/src/livepeer/models/components/ipfs_export_params.py b/src/livepeer/models/components/ipfs_export_params.py index e041a5f..6fa1b7a 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, TypedDict class Pinata2TypedDict(TypedDict): 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..11487ea 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, TypedDict class NewAssetPayloadIpfs1TypedDict(TypedDict): 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..276e45e 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, TypedDict class One(int, Enum): 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..eeca1db 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, TypedDict class Ipfs1TypedDict(TypedDict): 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..04995b3 100644 --- a/src/livepeer/models/components/stream.py +++ b/src/livepeer/models/components/stream.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, Union -from typing_extensions import Annotated, NotRequired +from typing import Dict, List, Optional, Union +from typing_extensions import Annotated, NotRequired, TypedDict ThreeTypedDict = Union[str, float] 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..b3a87b1 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, TypedDict class InputType(str, Enum): 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/validationerror.py b/src/livepeer/models/components/validationerror.py index 2ebec25..4800ac9 100644 --- a/src/livepeer/models/components/validationerror.py +++ b/src/livepeer/models/components/validationerror.py @@ -2,7 +2,8 @@ from __future__ import annotations from livepeer.types import BaseModel -from typing import List, TypedDict, Union +from typing import List, Union +from typing_extensions import TypedDict LocTypedDict = Union[str, int] 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..009b6d8 100644 --- a/src/livepeer/models/errors/__init__.py +++ b/src/livepeer/models/errors/__init__.py @@ -33,6 +33,16 @@ GenImageToVideoResponseBody, GenImageToVideoResponseBodyUnion, ) +from .genllm import ( + GenLLMGenerateResponse500ResponseBody, + GenLLMGenerateResponse500ResponseBodyUnion, + GenLLMGenerateResponseBody, + GenLLMGenerateResponseBodyUnion, + GenLLMGenerateResponseResponseBody, + GenLLMGenerateResponseResponseBodyUnion, + GenLLMResponseBody, + GenLLMResponseBodyUnion, +) from .gensegmentanything2 import ( GenSegmentAnything2GenerateResponse500ResponseBody, GenSegmentAnything2GenerateResponse500ResponseBodyUnion, @@ -97,6 +107,14 @@ "GenImageToVideoGenerateResponseResponseBodyUnion", "GenImageToVideoResponseBody", "GenImageToVideoResponseBodyUnion", + "GenLLMGenerateResponse500ResponseBody", + "GenLLMGenerateResponse500ResponseBodyUnion", + "GenLLMGenerateResponseBody", + "GenLLMGenerateResponseBodyUnion", + "GenLLMGenerateResponseResponseBody", + "GenLLMGenerateResponseResponseBodyUnion", + "GenLLMResponseBody", + "GenLLMResponseBodyUnion", "GenSegmentAnything2GenerateResponse500ResponseBody", "GenSegmentAnything2GenerateResponse500ResponseBodyUnion", "GenSegmentAnything2GenerateResponseBody", diff --git a/src/livepeer/models/errors/genllm.py b/src/livepeer/models/errors/genllm.py new file mode 100644 index 0000000..eeb18db --- /dev/null +++ b/src/livepeer/models/errors/genllm.py @@ -0,0 +1,74 @@ +"""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 + + +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 = 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 = 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 = 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/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..fe8deee 100644 --- a/src/livepeer/models/operations/getcreatorviewershipmetrics.py +++ b/src/livepeer/models/operations/getcreatorviewershipmetrics.py @@ -4,15 +4,15 @@ 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, TypedDict QueryParamFromTypedDict = Union[datetime, int] @@ -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..99ac45a 100644 --- a/src/livepeer/models/operations/getrecordedsessions.py +++ b/src/livepeer/models/operations/getrecordedsessions.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, 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, TypedDict RecordTypedDict = Union[bool, int] @@ -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..ac77f6d 100644 --- a/src/livepeer/models/operations/getviewershipmetrics.py +++ b/src/livepeer/models/operations/getviewershipmetrics.py @@ -4,15 +4,15 @@ 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, TypedDict FromTypedDict = Union[datetime, int] @@ -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..bd8bced 100644 --- a/src/livepeer/multistream.py +++ b/src/livepeer/multistream.py @@ -73,20 +73,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, ) @@ -152,20 +154,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, ) @@ -244,20 +248,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, ) @@ -336,20 +342,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, ) @@ -422,20 +430,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, ) @@ -508,20 +518,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, ) @@ -607,20 +619,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, ) @@ -706,20 +720,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, ) @@ -793,20 +809,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, ) @@ -880,19 +898,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..24769ad 100644 --- a/src/livepeer/playback.py +++ b/src/livepeer/playback.py @@ -84,20 +84,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, ) @@ -174,19 +176,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..9d278ae 100644 --- a/src/livepeer/room.py +++ b/src/livepeer/room.py @@ -80,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.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, ) @@ -165,20 +167,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, ) @@ -252,20 +256,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, ) @@ -339,20 +345,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, ) @@ -425,20 +433,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, ) @@ -511,20 +521,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, ) @@ -615,20 +627,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, ) @@ -719,20 +733,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, ) @@ -805,20 +821,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, ) @@ -891,20 +909,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, ) @@ -999,20 +1019,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, ) @@ -1107,20 +1129,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, ) @@ -1199,20 +1223,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, ) @@ -1291,20 +1317,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, ) @@ -1396,20 +1424,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, ) @@ -1501,20 +1531,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, ) @@ -1590,20 +1622,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, ) @@ -1679,19 +1713,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/sdkconfiguration.py b/src/livepeer/sdkconfiguration.py index beaa6e3..dc3d465 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.452.0" + user_agent: str = "speakeasy-sdk/python 0.4.0 2.452.0 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..da9a979 100644 --- a/src/livepeer/session.py +++ b/src/livepeer/session.py @@ -80,20 +80,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, ) @@ -166,20 +168,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, ) @@ -245,20 +249,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, ) @@ -324,20 +330,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, ) @@ -410,20 +418,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, ) @@ -496,20 +506,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, ) @@ -585,20 +597,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, ) @@ -674,19 +688,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..6c7d8f8 100644 --- a/src/livepeer/stream.py +++ b/src/livepeer/stream.py @@ -98,20 +98,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, ) @@ -202,20 +204,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, ) @@ -288,20 +292,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, ) @@ -374,20 +380,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, ) @@ -458,20 +466,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, ) @@ -542,20 +552,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, ) @@ -639,20 +651,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, ) @@ -736,20 +750,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, ) @@ -825,20 +841,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, ) @@ -914,20 +932,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, ) @@ -1007,20 +1027,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, ) @@ -1100,20 +1122,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, ) @@ -1192,20 +1216,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, ) @@ -1284,20 +1310,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, ) @@ -1373,20 +1401,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, ) @@ -1462,20 +1492,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, ) @@ -1548,20 +1580,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, ) @@ -1634,20 +1668,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, ) @@ -1731,20 +1767,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, ) @@ -1828,20 +1866,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, ) @@ -1914,20 +1954,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, ) @@ -2000,19 +2042,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..a6cd779 100644 --- a/src/livepeer/task.py +++ b/src/livepeer/task.py @@ -73,20 +73,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, ) @@ -152,20 +154,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, ) @@ -236,8 +240,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 +250,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, ) @@ -319,8 +325,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 +335,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..4616d98 100644 --- a/src/livepeer/transcode.py +++ b/src/livepeer/transcode.py @@ -206,20 +206,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, ) @@ -418,19 +420,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..5b3bbb0 100644 --- a/src/livepeer/utils/annotations.py +++ b/src/livepeer/utils/annotations.py @@ -1,5 +1,6 @@ """Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.""" +from enum import Enum from typing import Any def get_discriminator(model: Any, fieldname: str, key: str) -> str: @@ -10,10 +11,20 @@ def get_discriminator(model: Any, fieldname: str, key: str) -> str: raise ValueError(f'Could not find discriminator key {key} in {model}') from e if hasattr(model, fieldname): - return f'{getattr(model, fieldname)}' + attr = getattr(model, fieldname) + + if isinstance(attr, Enum): + return f'{attr.value}' + + return f'{attr}' fieldname = fieldname.upper() if hasattr(model, fieldname): - return f'{getattr(model, fieldname)}' + attr = getattr(model, fieldname) + + if isinstance(attr, Enum): + return f'{attr.value}' + + return f'{attr}' raise ValueError(f'Could not find discriminator field {fieldname} in {model}') 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..65b13eb 100644 --- a/src/livepeer/webhook.py +++ b/src/livepeer/webhook.py @@ -73,20 +73,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, ) @@ -152,20 +154,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, ) @@ -244,20 +248,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, ) @@ -336,20 +342,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, ) @@ -422,20 +430,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, ) @@ -508,20 +518,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, ) @@ -600,20 +612,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, ) @@ -692,20 +706,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, ) @@ -778,20 +794,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, ) @@ -864,20 +882,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, ) @@ -950,20 +970,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, ) @@ -1036,20 +1058,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, ) @@ -1125,20 +1149,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, ) @@ -1214,20 +1240,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, ) @@ -1308,20 +1336,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, ) @@ -1402,19 +1432,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, )