syncsdk 0.3.0__tar.gz → 0.4.0__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- {syncsdk-0.3.0 → syncsdk-0.4.0}/PKG-INFO +1 -1
- {syncsdk-0.3.0 → syncsdk-0.4.0}/pyproject.toml +1 -1
- syncsdk-0.4.0/src/sync/__init__.py +377 -0
- syncsdk-0.4.0/src/sync/account/__init__.py +31 -0
- syncsdk-0.4.0/src/sync/account/client.py +101 -0
- syncsdk-0.4.0/src/sync/account/raw_client.py +135 -0
- syncsdk-0.4.0/src/sync/account/types/__init__.py +29 -0
- syncsdk-0.4.0/src/sync/account/types/account_active_jobs.py +27 -0
- syncsdk-0.4.0/src/sync/account/types/account_allowance_usage.py +32 -0
- syncsdk-0.4.0/src/sync/account/types/account_billing_model.py +5 -0
- syncsdk-0.4.0/src/sync/account/types/account_billing_period.py +21 -0
- syncsdk-0.4.0/src/sync/account/types/account_credential_type.py +5 -0
- syncsdk-0.4.0/src/sync/account/types/account_credits.py +34 -0
- syncsdk-0.4.0/src/sync/account/types/account_free_allowance.py +36 -0
- syncsdk-0.4.0/src/sync/account/types/account_limits.py +41 -0
- syncsdk-0.4.0/src/sync/account/types/account_organization.py +24 -0
- syncsdk-0.4.0/src/sync/account/types/account_overview.py +96 -0
- syncsdk-0.4.0/src/sync/account/types/account_plan.py +27 -0
- syncsdk-0.4.0/src/sync/account/types/account_user.py +21 -0
- syncsdk-0.4.0/src/sync/assets/client.py +783 -0
- syncsdk-0.4.0/src/sync/assets/raw_client.py +1258 -0
- syncsdk-0.4.0/src/sync/batch/client.py +986 -0
- {syncsdk-0.3.0 → syncsdk-0.4.0}/src/sync/batch/raw_client.py +250 -6
- {syncsdk-0.3.0 → syncsdk-0.4.0}/src/sync/client.py +36 -0
- syncsdk-0.4.0/src/sync/common/__init__.py +291 -0
- syncsdk-0.4.0/src/sync/common/errors/__init__.py +35 -0
- syncsdk-0.4.0/src/sync/common/errors/conflict_error.py +9 -0
- syncsdk-0.4.0/src/sync/common/errors/forbidden_error.py +9 -0
- syncsdk-0.4.0/src/sync/common/errors/gateway_timeout_error.py +9 -0
- syncsdk-0.4.0/src/sync/common/errors/generation_deleted_error.py +9 -0
- syncsdk-0.4.0/src/sync/common/errors/generation_too_many_requests_error.py +9 -0
- syncsdk-0.4.0/src/sync/common/errors/payload_too_large_error.py +9 -0
- syncsdk-0.4.0/src/sync/common/errors/service_unavailable_error.py +9 -0
- {syncsdk-0.3.0 → syncsdk-0.4.0}/src/sync/common/errors/too_many_requests_error.py +2 -2
- syncsdk-0.4.0/src/sync/common/errors/unprocessable_entity_error.py +9 -0
- syncsdk-0.4.0/src/sync/common/errors/voice_clone_too_many_requests_error.py +9 -0
- syncsdk-0.4.0/src/sync/common/types/__init__.py +255 -0
- {syncsdk-0.3.0 → syncsdk-0.4.0}/src/sync/common/types/active_speaker.py +16 -1
- {syncsdk-0.3.0 → syncsdk-0.4.0}/src/sync/common/types/asset.py +15 -0
- syncsdk-0.4.0/src/sync/common/types/asset_input_type.py +22 -0
- syncsdk-0.4.0/src/sync/common/types/asset_upload_response.py +38 -0
- syncsdk-0.3.0/src/sync/common/types/generation_error.py → syncsdk-0.4.0/src/sync/common/types/attach_project_asset_request.py +6 -7
- syncsdk-0.4.0/src/sync/common/types/batch_concurrency_error.py +69 -0
- {syncsdk-0.3.0 → syncsdk-0.4.0}/src/sync/common/types/batch_response.py +2 -2
- syncsdk-0.4.0/src/sync/common/types/batch_row.py +37 -0
- syncsdk-0.4.0/src/sync/common/types/blending_mode.py +5 -0
- syncsdk-0.4.0/src/sync/common/types/cloned_voice_response.py +38 -0
- syncsdk-0.4.0/src/sync/common/types/create_asset_request.py +95 -0
- syncsdk-0.4.0/src/sync/common/types/create_asset_upload_request.py +38 -0
- syncsdk-0.4.0/src/sync/common/types/create_dialogue_edit_dto.py +85 -0
- syncsdk-0.4.0/src/sync/common/types/create_generation_dto.py +89 -0
- syncsdk-0.4.0/src/sync/common/types/create_project_request.py +58 -0
- syncsdk-0.4.0/src/sync/common/types/create_transcription_dto.py +66 -0
- syncsdk-0.4.0/src/sync/common/types/create_tts_request.py +51 -0
- syncsdk-0.4.0/src/sync/common/types/create_voice_request.py +53 -0
- syncsdk-0.4.0/src/sync/common/types/creator_workflow.py +10 -0
- syncsdk-0.4.0/src/sync/common/types/delete_asset_response.py +27 -0
- syncsdk-0.4.0/src/sync/common/types/delete_project_response.py +27 -0
- syncsdk-0.4.0/src/sync/common/types/dialogue_edit_change.py +38 -0
- syncsdk-0.4.0/src/sync/common/types/dialogue_edit_error.py +41 -0
- syncsdk-0.4.0/src/sync/common/types/dialogue_edit_error_code.py +18 -0
- syncsdk-0.4.0/src/sync/common/types/dialogue_edit_failed_slot.py +29 -0
- syncsdk-0.4.0/src/sync/common/types/dialogue_edit_job.py +158 -0
- syncsdk-0.4.0/src/sync/common/types/dialogue_edit_job_id.py +3 -0
- syncsdk-0.4.0/src/sync/common/types/dialogue_edit_job_status.py +7 -0
- syncsdk-0.4.0/src/sync/common/types/dialogue_edit_operation.py +53 -0
- syncsdk-0.4.0/src/sync/common/types/dialogue_edit_partial_detail.py +46 -0
- syncsdk-0.4.0/src/sync/common/types/dialogue_edit_reference.py +27 -0
- syncsdk-0.4.0/src/sync/common/types/dialogue_edit_removal.py +28 -0
- syncsdk-0.4.0/src/sync/common/types/dialogue_edit_result_slot.py +53 -0
- syncsdk-0.4.0/src/sync/common/types/dialogue_edit_result_slot_kind.py +5 -0
- syncsdk-0.4.0/src/sync/common/types/dialogue_edit_retime_failure_section.py +42 -0
- syncsdk-0.4.0/src/sync/common/types/dub_dto.py +50 -0
- syncsdk-0.4.0/src/sync/common/types/dub_language.py +102 -0
- syncsdk-0.3.0/src/sync/common/types/model_type.py → syncsdk-0.4.0/src/sync/common/types/dub_provider_name.py +1 -1
- syncsdk-0.4.0/src/sync/common/types/dub_source_language.py +103 -0
- syncsdk-0.4.0/src/sync/common/types/error_catalog_entry.py +36 -0
- syncsdk-0.4.0/src/sync/common/types/estimate_breakdown.py +34 -0
- syncsdk-0.4.0/src/sync/common/types/estimate_cost_request.py +47 -0
- syncsdk-0.4.0/src/sync/common/types/estimate_dubbing_billing.py +5 -0
- syncsdk-0.4.0/src/sync/common/types/estimate_dubbing_part.py +39 -0
- syncsdk-0.4.0/src/sync/common/types/estimate_duration_check.py +66 -0
- syncsdk-0.3.0/src/sync/common/types/estimated_generation_cost.py → syncsdk-0.4.0/src/sync/common/types/estimate_lipsync_part.py +7 -7
- syncsdk-0.4.0/src/sync/common/types/estimate_workflow.py +5 -0
- syncsdk-0.4.0/src/sync/common/types/estimated_generation_cost.py +54 -0
- {syncsdk-0.3.0 → syncsdk-0.4.0}/src/sync/common/types/generation.py +39 -2
- syncsdk-0.4.0/src/sync/common/types/generation_concurrency_error.py +62 -0
- syncsdk-0.4.0/src/sync/common/types/generation_error.py +84 -0
- syncsdk-0.4.0/src/sync/common/types/generation_estimate.py +111 -0
- syncsdk-0.4.0/src/sync/common/types/generation_estimate_confidence.py +5 -0
- syncsdk-0.4.0/src/sync/common/types/generation_estimate_resolution_source.py +5 -0
- syncsdk-0.4.0/src/sync/common/types/generation_estimate_scope.py +5 -0
- syncsdk-0.4.0/src/sync/common/types/generation_estimate_source.py +8 -0
- syncsdk-0.4.0/src/sync/common/types/generation_options.py +97 -0
- syncsdk-0.4.0/src/sync/common/types/generation_segment.py +72 -0
- syncsdk-0.4.0/src/sync/common/types/image.py +44 -0
- {syncsdk-0.3.0 → syncsdk-0.4.0}/src/sync/common/types/input.py +2 -1
- {syncsdk-0.3.0 → syncsdk-0.4.0}/src/sync/common/types/model.py +1 -1
- {syncsdk-0.3.0 → syncsdk-0.4.0}/src/sync/common/types/model_info.py +6 -2
- syncsdk-0.4.0/src/sync/common/types/output_audio.py +28 -0
- syncsdk-0.4.0/src/sync/common/types/output_format.py +5 -0
- syncsdk-0.4.0/src/sync/common/types/paginated_projects_response.py +36 -0
- syncsdk-0.4.0/src/sync/common/types/project.py +66 -0
- syncsdk-0.4.0/src/sync/common/types/project_generation.py +83 -0
- syncsdk-0.4.0/src/sync/common/types/project_generation_error.py +24 -0
- syncsdk-0.4.0/src/sync/common/types/project_generation_input.py +37 -0
- syncsdk-0.4.0/src/sync/common/types/project_generation_model.py +28 -0
- syncsdk-0.4.0/src/sync/common/types/project_generation_provider.py +25 -0
- syncsdk-0.4.0/src/sync/common/types/project_generation_segment.py +35 -0
- syncsdk-0.4.0/src/sync/common/types/project_id.py +3 -0
- syncsdk-0.4.0/src/sync/common/types/project_list_item.py +78 -0
- syncsdk-0.4.0/src/sync/common/types/project_mode.py +5 -0
- syncsdk-0.4.0/src/sync/common/types/project_sort.py +5 -0
- syncsdk-0.4.0/src/sync/common/types/project_visibility.py +5 -0
- {syncsdk-0.3.0 → syncsdk-0.4.0}/src/sync/common/types/segment_audio_input.py +2 -2
- syncsdk-0.4.0/src/sync/common/types/segment_options_override.py +43 -0
- syncsdk-0.4.0/src/sync/common/types/transcript.py +34 -0
- syncsdk-0.4.0/src/sync/common/types/transcript_segment.py +32 -0
- syncsdk-0.4.0/src/sync/common/types/transcript_word.py +43 -0
- syncsdk-0.4.0/src/sync/common/types/transcription_difficulty.py +33 -0
- syncsdk-0.4.0/src/sync/common/types/transcription_difficulty_reason.py +17 -0
- syncsdk-0.4.0/src/sync/common/types/transcription_difficulty_tier.py +5 -0
- syncsdk-0.4.0/src/sync/common/types/transcription_error.py +32 -0
- syncsdk-0.4.0/src/sync/common/types/transcription_error_code.py +10 -0
- syncsdk-0.4.0/src/sync/common/types/transcription_job.py +104 -0
- syncsdk-0.4.0/src/sync/common/types/transcription_job_id.py +3 -0
- syncsdk-0.4.0/src/sync/common/types/transcription_job_status.py +5 -0
- syncsdk-0.4.0/src/sync/common/types/tts_generation_response.py +36 -0
- syncsdk-0.4.0/src/sync/common/types/tts_job.py +70 -0
- syncsdk-0.4.0/src/sync/common/types/tts_job_error.py +32 -0
- syncsdk-0.4.0/src/sync/common/types/tts_job_error_code.py +16 -0
- syncsdk-0.4.0/src/sync/common/types/tts_job_status.py +5 -0
- syncsdk-0.4.0/src/sync/common/types/update_asset_request.py +61 -0
- syncsdk-0.4.0/src/sync/common/types/update_project_request.py +43 -0
- {syncsdk-0.3.0 → syncsdk-0.4.0}/src/sync/common/types/video.py +9 -2
- syncsdk-0.4.0/src/sync/common/types/voice.py +66 -0
- syncsdk-0.4.0/src/sync/common/types/voice_clone_rate_limit_error.py +51 -0
- syncsdk-0.4.0/src/sync/common/types/voice_provider.py +5 -0
- syncsdk-0.4.0/src/sync/common/types/voice_restriction.py +5 -0
- {syncsdk-0.3.0 → syncsdk-0.4.0}/src/sync/core/client_wrapper.py +2 -2
- syncsdk-0.4.0/src/sync/dialogue_edits/client.py +367 -0
- syncsdk-0.4.0/src/sync/dialogue_edits/raw_client.py +500 -0
- {syncsdk-0.3.0 → syncsdk-0.4.0}/src/sync/environment.py +1 -0
- syncsdk-0.4.0/src/sync/errors/client.py +101 -0
- syncsdk-0.4.0/src/sync/errors/raw_client.py +116 -0
- syncsdk-0.4.0/src/sync/feedback/__init__.py +21 -0
- syncsdk-0.4.0/src/sync/feedback/client.py +242 -0
- syncsdk-0.4.0/src/sync/feedback/errors/__init__.py +5 -0
- syncsdk-0.4.0/src/sync/feedback/errors/feedback_too_many_requests_error.py +9 -0
- syncsdk-0.4.0/src/sync/feedback/raw_client.py +303 -0
- syncsdk-0.4.0/src/sync/feedback/types/__init__.py +17 -0
- syncsdk-0.4.0/src/sync/feedback/types/feedback_client.py +27 -0
- syncsdk-0.4.0/src/sync/feedback/types/feedback_kind.py +7 -0
- syncsdk-0.4.0/src/sync/feedback/types/feedback_rate_limit_error.py +51 -0
- syncsdk-0.4.0/src/sync/feedback/types/feedback_receipt.py +28 -0
- syncsdk-0.4.0/src/sync/feedback/types/feedback_severity.py +5 -0
- syncsdk-0.4.0/src/sync/feedback/types/feedback_source.py +5 -0
- syncsdk-0.4.0/src/sync/generations/__init__.py +2 -0
- syncsdk-0.4.0/src/sync/generations/client.py +1092 -0
- syncsdk-0.4.0/src/sync/generations/raw_client.py +1922 -0
- syncsdk-0.4.0/src/sync/models/__init__.py +2 -0
- syncsdk-0.4.0/src/sync/organizations/__init__.py +5 -0
- syncsdk-0.4.0/src/sync/organizations/client.py +111 -0
- syncsdk-0.4.0/src/sync/organizations/raw_client.py +149 -0
- syncsdk-0.4.0/src/sync/organizations/types/__init__.py +5 -0
- syncsdk-0.4.0/src/sync/organizations/types/webhook_secret_response.py +26 -0
- syncsdk-0.4.0/src/sync/projects/__init__.py +2 -0
- syncsdk-0.4.0/src/sync/projects/client.py +710 -0
- syncsdk-0.4.0/src/sync/projects/raw_client.py +1319 -0
- syncsdk-0.4.0/src/sync/transcriptions/__init__.py +2 -0
- syncsdk-0.4.0/src/sync/transcriptions/client.py +258 -0
- syncsdk-0.4.0/src/sync/transcriptions/raw_client.py +416 -0
- syncsdk-0.4.0/src/sync/tts/__init__.py +2 -0
- syncsdk-0.4.0/src/sync/tts/client.py +390 -0
- syncsdk-0.4.0/src/sync/tts/raw_client.py +698 -0
- syncsdk-0.4.0/src/sync/voices/__init__.py +2 -0
- syncsdk-0.4.0/src/sync/voices/client.py +418 -0
- syncsdk-0.4.0/src/sync/voices/raw_client.py +805 -0
- syncsdk-0.4.0/src/sync/webhooks/__init__.py +5 -0
- syncsdk-0.4.0/src/sync/webhooks/types/__init__.py +8 -0
- syncsdk-0.4.0/src/sync/webhooks/types/batch_notification.py +56 -0
- syncsdk-0.4.0/src/sync/webhooks/types/batch_notification_metrics.py +39 -0
- {syncsdk-0.3.0 → syncsdk-0.4.0}/src/sync/webhooks/types/generation_notification.py +24 -29
- {syncsdk-0.3.0 → syncsdk-0.4.0}/src/sync/webhooks/types/webhook_status.py +1 -1
- syncsdk-0.3.0/src/sync/__init__.py +0 -112
- syncsdk-0.3.0/src/sync/assets/client.py +0 -251
- syncsdk-0.3.0/src/sync/assets/raw_client.py +0 -345
- syncsdk-0.3.0/src/sync/batch/client.py +0 -311
- syncsdk-0.3.0/src/sync/common/__init__.py +0 -97
- syncsdk-0.3.0/src/sync/common/errors/__init__.py +0 -17
- syncsdk-0.3.0/src/sync/common/types/__init__.py +0 -81
- syncsdk-0.3.0/src/sync/common/types/asset_input_type.py +0 -7
- syncsdk-0.3.0/src/sync/common/types/create_generation_dto.py +0 -57
- syncsdk-0.3.0/src/sync/common/types/generation_options.py +0 -51
- syncsdk-0.3.0/src/sync/common/types/generation_segment.py +0 -39
- syncsdk-0.3.0/src/sync/generations/client.py +0 -634
- syncsdk-0.3.0/src/sync/generations/raw_client.py +0 -904
- syncsdk-0.3.0/src/sync/webhooks/__init__.py +0 -5
- syncsdk-0.3.0/src/sync/webhooks/types/__init__.py +0 -6
- {syncsdk-0.3.0 → syncsdk-0.4.0}/README.md +0 -0
- {syncsdk-0.3.0 → syncsdk-0.4.0}/src/sync/assets/__init__.py +0 -0
- {syncsdk-0.3.0 → syncsdk-0.4.0}/src/sync/batch/__init__.py +0 -0
- {syncsdk-0.3.0 → syncsdk-0.4.0}/src/sync/common/errors/bad_request_error.py +0 -0
- {syncsdk-0.3.0 → syncsdk-0.4.0}/src/sync/common/errors/internal_server_error.py +0 -0
- {syncsdk-0.3.0 → syncsdk-0.4.0}/src/sync/common/errors/not_found_error.py +0 -0
- {syncsdk-0.3.0 → syncsdk-0.4.0}/src/sync/common/errors/payment_required_error.py +0 -0
- {syncsdk-0.3.0 → syncsdk-0.4.0}/src/sync/common/errors/unauthorized_error.py +0 -0
- {syncsdk-0.3.0 → syncsdk-0.4.0}/src/sync/common/types/asset_id.py +0 -0
- {syncsdk-0.3.0 → syncsdk-0.4.0}/src/sync/common/types/asset_sort.py +0 -0
- {syncsdk-0.3.0 → syncsdk-0.4.0}/src/sync/common/types/asset_type.py +0 -0
- {syncsdk-0.3.0 → syncsdk-0.4.0}/src/sync/common/types/asset_visibility.py +0 -0
- {syncsdk-0.3.0 → syncsdk-0.4.0}/src/sync/common/types/audio.py +0 -0
- {syncsdk-0.3.0 → syncsdk-0.4.0}/src/sync/common/types/batch_id.py +0 -0
- {syncsdk-0.3.0 → syncsdk-0.4.0}/src/sync/common/types/batch_metrics.py +0 -0
- {syncsdk-0.3.0 → syncsdk-0.4.0}/src/sync/common/types/batch_status.py +0 -0
- {syncsdk-0.3.0 → syncsdk-0.4.0}/src/sync/common/types/create_batch_response.py +0 -0
- {syncsdk-0.3.0 → syncsdk-0.4.0}/src/sync/common/types/eleven_labs.py +0 -0
- {syncsdk-0.3.0 → syncsdk-0.4.0}/src/sync/common/types/emotion.py +0 -0
- {syncsdk-0.3.0 → syncsdk-0.4.0}/src/sync/common/types/generation_error_message.py +0 -0
- {syncsdk-0.3.0 → syncsdk-0.4.0}/src/sync/common/types/generation_id.py +0 -0
- {syncsdk-0.3.0 → syncsdk-0.4.0}/src/sync/common/types/generation_status.py +0 -0
- {syncsdk-0.3.0 → syncsdk-0.4.0}/src/sync/common/types/model_mode.py +0 -0
- {syncsdk-0.3.0 → syncsdk-0.4.0}/src/sync/common/types/paginated_assets_response.py +0 -0
- {syncsdk-0.3.0 → syncsdk-0.4.0}/src/sync/common/types/segment_frames.py +0 -0
- {syncsdk-0.3.0 → syncsdk-0.4.0}/src/sync/common/types/segment_secs.py +0 -0
- {syncsdk-0.3.0 → syncsdk-0.4.0}/src/sync/common/types/sync_mode.py +0 -0
- {syncsdk-0.3.0 → syncsdk-0.4.0}/src/sync/common/types/tts.py +0 -0
- {syncsdk-0.3.0 → syncsdk-0.4.0}/src/sync/common/types/tts_provider_config.py +0 -0
- {syncsdk-0.3.0 → syncsdk-0.4.0}/src/sync/common/types/validation_response.py +0 -0
- {syncsdk-0.3.0 → syncsdk-0.4.0}/src/sync/core/__init__.py +0 -0
- {syncsdk-0.3.0 → syncsdk-0.4.0}/src/sync/core/api_error.py +0 -0
- {syncsdk-0.3.0 → syncsdk-0.4.0}/src/sync/core/datetime_utils.py +0 -0
- {syncsdk-0.3.0 → syncsdk-0.4.0}/src/sync/core/file.py +0 -0
- {syncsdk-0.3.0 → syncsdk-0.4.0}/src/sync/core/http_client.py +0 -0
- {syncsdk-0.3.0 → syncsdk-0.4.0}/src/sync/core/http_response.py +0 -0
- {syncsdk-0.3.0 → syncsdk-0.4.0}/src/sync/core/jsonable_encoder.py +0 -0
- {syncsdk-0.3.0 → syncsdk-0.4.0}/src/sync/core/pydantic_utilities.py +0 -0
- {syncsdk-0.3.0 → syncsdk-0.4.0}/src/sync/core/query_encoder.py +0 -0
- {syncsdk-0.3.0 → syncsdk-0.4.0}/src/sync/core/remove_none_from_dict.py +0 -0
- {syncsdk-0.3.0 → syncsdk-0.4.0}/src/sync/core/request_options.py +0 -0
- {syncsdk-0.3.0 → syncsdk-0.4.0}/src/sync/core/serialization.py +0 -0
- {syncsdk-0.3.0 → syncsdk-0.4.0}/src/sync/core/unchecked_base_model.py +0 -0
- {syncsdk-0.3.0/src/sync/generations → syncsdk-0.4.0/src/sync/dialogue_edits}/__init__.py +0 -0
- {syncsdk-0.3.0/src/sync/models → syncsdk-0.4.0/src/sync/errors}/__init__.py +0 -0
- {syncsdk-0.3.0 → syncsdk-0.4.0}/src/sync/models/client.py +0 -0
- {syncsdk-0.3.0 → syncsdk-0.4.0}/src/sync/models/raw_client.py +0 -0
- {syncsdk-0.3.0 → syncsdk-0.4.0}/src/sync/py.typed +0 -0
- {syncsdk-0.3.0 → syncsdk-0.4.0}/src/sync/version.py +0 -0
|
@@ -0,0 +1,377 @@
|
|
|
1
|
+
# This file was auto-generated by Fern from our API Definition.
|
|
2
|
+
|
|
3
|
+
from . import (
|
|
4
|
+
account,
|
|
5
|
+
assets,
|
|
6
|
+
batch,
|
|
7
|
+
common,
|
|
8
|
+
dialogue_edits,
|
|
9
|
+
errors,
|
|
10
|
+
feedback,
|
|
11
|
+
generations,
|
|
12
|
+
models,
|
|
13
|
+
organizations,
|
|
14
|
+
projects,
|
|
15
|
+
transcriptions,
|
|
16
|
+
tts,
|
|
17
|
+
voices,
|
|
18
|
+
webhooks,
|
|
19
|
+
)
|
|
20
|
+
from .account import (
|
|
21
|
+
AccountActiveJobs,
|
|
22
|
+
AccountAllowanceUsage,
|
|
23
|
+
AccountBillingModel,
|
|
24
|
+
AccountBillingPeriod,
|
|
25
|
+
AccountCredentialType,
|
|
26
|
+
AccountCredits,
|
|
27
|
+
AccountFreeAllowance,
|
|
28
|
+
AccountLimits,
|
|
29
|
+
AccountOrganization,
|
|
30
|
+
AccountOverview,
|
|
31
|
+
AccountPlan,
|
|
32
|
+
AccountUser,
|
|
33
|
+
)
|
|
34
|
+
from .client import AsyncSync, Sync
|
|
35
|
+
from .common import (
|
|
36
|
+
ActiveSpeaker,
|
|
37
|
+
Asset,
|
|
38
|
+
AssetId,
|
|
39
|
+
AssetInputType,
|
|
40
|
+
AssetSort,
|
|
41
|
+
AssetType,
|
|
42
|
+
AssetUploadResponse,
|
|
43
|
+
AssetVisibility,
|
|
44
|
+
AttachProjectAssetRequest,
|
|
45
|
+
Audio,
|
|
46
|
+
BadRequestError,
|
|
47
|
+
BatchConcurrencyError,
|
|
48
|
+
BatchId,
|
|
49
|
+
BatchMetrics,
|
|
50
|
+
BatchResponse,
|
|
51
|
+
BatchRow,
|
|
52
|
+
BatchStatus,
|
|
53
|
+
BlendingMode,
|
|
54
|
+
ClonedVoiceResponse,
|
|
55
|
+
ConflictError,
|
|
56
|
+
CreateAssetRequest,
|
|
57
|
+
CreateAssetUploadRequest,
|
|
58
|
+
CreateBatchResponse,
|
|
59
|
+
CreateDialogueEditDto,
|
|
60
|
+
CreateGenerationDto,
|
|
61
|
+
CreateProjectRequest,
|
|
62
|
+
CreateTranscriptionDto,
|
|
63
|
+
CreateTtsRequest,
|
|
64
|
+
CreateVoiceRequest,
|
|
65
|
+
CreatorWorkflow,
|
|
66
|
+
DeleteAssetResponse,
|
|
67
|
+
DeleteProjectResponse,
|
|
68
|
+
DialogueEditChange,
|
|
69
|
+
DialogueEditError,
|
|
70
|
+
DialogueEditErrorCode,
|
|
71
|
+
DialogueEditFailedSlot,
|
|
72
|
+
DialogueEditJob,
|
|
73
|
+
DialogueEditJobId,
|
|
74
|
+
DialogueEditJobStatus,
|
|
75
|
+
DialogueEditOperation,
|
|
76
|
+
DialogueEditOperation_Change,
|
|
77
|
+
DialogueEditOperation_Remove,
|
|
78
|
+
DialogueEditPartialDetail,
|
|
79
|
+
DialogueEditReference,
|
|
80
|
+
DialogueEditRemoval,
|
|
81
|
+
DialogueEditResultSlot,
|
|
82
|
+
DialogueEditResultSlotKind,
|
|
83
|
+
DialogueEditRetimeFailureSection,
|
|
84
|
+
DubDto,
|
|
85
|
+
DubLanguage,
|
|
86
|
+
DubProviderName,
|
|
87
|
+
DubSourceLanguage,
|
|
88
|
+
ElevenLabs,
|
|
89
|
+
Emotion,
|
|
90
|
+
ErrorCatalogEntry,
|
|
91
|
+
EstimateBreakdown,
|
|
92
|
+
EstimateCostRequest,
|
|
93
|
+
EstimateDubbingBilling,
|
|
94
|
+
EstimateDubbingPart,
|
|
95
|
+
EstimateDurationCheck,
|
|
96
|
+
EstimateLipsyncPart,
|
|
97
|
+
EstimateWorkflow,
|
|
98
|
+
EstimatedGenerationCost,
|
|
99
|
+
ForbiddenError,
|
|
100
|
+
GatewayTimeoutError,
|
|
101
|
+
Generation,
|
|
102
|
+
GenerationConcurrencyError,
|
|
103
|
+
GenerationDeletedError,
|
|
104
|
+
GenerationError,
|
|
105
|
+
GenerationErrorMessage,
|
|
106
|
+
GenerationEstimate,
|
|
107
|
+
GenerationEstimateConfidence,
|
|
108
|
+
GenerationEstimateResolutionSource,
|
|
109
|
+
GenerationEstimateScope,
|
|
110
|
+
GenerationEstimateSource,
|
|
111
|
+
GenerationId,
|
|
112
|
+
GenerationOptions,
|
|
113
|
+
GenerationSegment,
|
|
114
|
+
GenerationStatus,
|
|
115
|
+
GenerationTooManyRequestsError,
|
|
116
|
+
Image,
|
|
117
|
+
Input,
|
|
118
|
+
InternalServerError,
|
|
119
|
+
Model,
|
|
120
|
+
ModelInfo,
|
|
121
|
+
ModelMode,
|
|
122
|
+
NotFoundError,
|
|
123
|
+
OutputAudio,
|
|
124
|
+
OutputFormat,
|
|
125
|
+
PaginatedAssetsResponse,
|
|
126
|
+
PaginatedProjectsResponse,
|
|
127
|
+
PayloadTooLargeError,
|
|
128
|
+
PaymentRequiredError,
|
|
129
|
+
Project,
|
|
130
|
+
ProjectGeneration,
|
|
131
|
+
ProjectGenerationError,
|
|
132
|
+
ProjectGenerationInput,
|
|
133
|
+
ProjectGenerationModel,
|
|
134
|
+
ProjectGenerationProvider,
|
|
135
|
+
ProjectGenerationSegment,
|
|
136
|
+
ProjectId,
|
|
137
|
+
ProjectListItem,
|
|
138
|
+
ProjectMode,
|
|
139
|
+
ProjectSort,
|
|
140
|
+
ProjectVisibility,
|
|
141
|
+
SegmentAudioInput,
|
|
142
|
+
SegmentFrames,
|
|
143
|
+
SegmentOptionsOverride,
|
|
144
|
+
SegmentSecs,
|
|
145
|
+
ServiceUnavailableError,
|
|
146
|
+
SyncMode,
|
|
147
|
+
TooManyRequestsError,
|
|
148
|
+
Transcript,
|
|
149
|
+
TranscriptSegment,
|
|
150
|
+
TranscriptWord,
|
|
151
|
+
TranscriptionDifficulty,
|
|
152
|
+
TranscriptionDifficultyReason,
|
|
153
|
+
TranscriptionDifficultyTier,
|
|
154
|
+
TranscriptionError,
|
|
155
|
+
TranscriptionErrorCode,
|
|
156
|
+
TranscriptionJob,
|
|
157
|
+
TranscriptionJobId,
|
|
158
|
+
TranscriptionJobStatus,
|
|
159
|
+
Tts,
|
|
160
|
+
TtsGenerationResponse,
|
|
161
|
+
TtsJob,
|
|
162
|
+
TtsJobError,
|
|
163
|
+
TtsJobErrorCode,
|
|
164
|
+
TtsJobStatus,
|
|
165
|
+
TtsProviderConfig,
|
|
166
|
+
UnauthorizedError,
|
|
167
|
+
UnprocessableEntityError,
|
|
168
|
+
UpdateAssetRequest,
|
|
169
|
+
UpdateProjectRequest,
|
|
170
|
+
ValidationResponse,
|
|
171
|
+
Video,
|
|
172
|
+
Voice,
|
|
173
|
+
VoiceCloneRateLimitError,
|
|
174
|
+
VoiceCloneTooManyRequestsError,
|
|
175
|
+
VoiceProvider,
|
|
176
|
+
VoiceRestriction,
|
|
177
|
+
)
|
|
178
|
+
from .environment import SyncEnvironment
|
|
179
|
+
from .feedback import (
|
|
180
|
+
FeedbackClient,
|
|
181
|
+
FeedbackKind,
|
|
182
|
+
FeedbackRateLimitError,
|
|
183
|
+
FeedbackReceipt,
|
|
184
|
+
FeedbackSeverity,
|
|
185
|
+
FeedbackSource,
|
|
186
|
+
FeedbackTooManyRequestsError,
|
|
187
|
+
)
|
|
188
|
+
from .organizations import WebhookSecretResponse
|
|
189
|
+
from .version import __version__
|
|
190
|
+
from .webhooks import BatchNotification, BatchNotificationMetrics, GenerationNotification, WebhookStatus
|
|
191
|
+
|
|
192
|
+
__all__ = [
|
|
193
|
+
"AccountActiveJobs",
|
|
194
|
+
"AccountAllowanceUsage",
|
|
195
|
+
"AccountBillingModel",
|
|
196
|
+
"AccountBillingPeriod",
|
|
197
|
+
"AccountCredentialType",
|
|
198
|
+
"AccountCredits",
|
|
199
|
+
"AccountFreeAllowance",
|
|
200
|
+
"AccountLimits",
|
|
201
|
+
"AccountOrganization",
|
|
202
|
+
"AccountOverview",
|
|
203
|
+
"AccountPlan",
|
|
204
|
+
"AccountUser",
|
|
205
|
+
"ActiveSpeaker",
|
|
206
|
+
"Asset",
|
|
207
|
+
"AssetId",
|
|
208
|
+
"AssetInputType",
|
|
209
|
+
"AssetSort",
|
|
210
|
+
"AssetType",
|
|
211
|
+
"AssetUploadResponse",
|
|
212
|
+
"AssetVisibility",
|
|
213
|
+
"AsyncSync",
|
|
214
|
+
"AttachProjectAssetRequest",
|
|
215
|
+
"Audio",
|
|
216
|
+
"BadRequestError",
|
|
217
|
+
"BatchConcurrencyError",
|
|
218
|
+
"BatchId",
|
|
219
|
+
"BatchMetrics",
|
|
220
|
+
"BatchNotification",
|
|
221
|
+
"BatchNotificationMetrics",
|
|
222
|
+
"BatchResponse",
|
|
223
|
+
"BatchRow",
|
|
224
|
+
"BatchStatus",
|
|
225
|
+
"BlendingMode",
|
|
226
|
+
"ClonedVoiceResponse",
|
|
227
|
+
"ConflictError",
|
|
228
|
+
"CreateAssetRequest",
|
|
229
|
+
"CreateAssetUploadRequest",
|
|
230
|
+
"CreateBatchResponse",
|
|
231
|
+
"CreateDialogueEditDto",
|
|
232
|
+
"CreateGenerationDto",
|
|
233
|
+
"CreateProjectRequest",
|
|
234
|
+
"CreateTranscriptionDto",
|
|
235
|
+
"CreateTtsRequest",
|
|
236
|
+
"CreateVoiceRequest",
|
|
237
|
+
"CreatorWorkflow",
|
|
238
|
+
"DeleteAssetResponse",
|
|
239
|
+
"DeleteProjectResponse",
|
|
240
|
+
"DialogueEditChange",
|
|
241
|
+
"DialogueEditError",
|
|
242
|
+
"DialogueEditErrorCode",
|
|
243
|
+
"DialogueEditFailedSlot",
|
|
244
|
+
"DialogueEditJob",
|
|
245
|
+
"DialogueEditJobId",
|
|
246
|
+
"DialogueEditJobStatus",
|
|
247
|
+
"DialogueEditOperation",
|
|
248
|
+
"DialogueEditOperation_Change",
|
|
249
|
+
"DialogueEditOperation_Remove",
|
|
250
|
+
"DialogueEditPartialDetail",
|
|
251
|
+
"DialogueEditReference",
|
|
252
|
+
"DialogueEditRemoval",
|
|
253
|
+
"DialogueEditResultSlot",
|
|
254
|
+
"DialogueEditResultSlotKind",
|
|
255
|
+
"DialogueEditRetimeFailureSection",
|
|
256
|
+
"DubDto",
|
|
257
|
+
"DubLanguage",
|
|
258
|
+
"DubProviderName",
|
|
259
|
+
"DubSourceLanguage",
|
|
260
|
+
"ElevenLabs",
|
|
261
|
+
"Emotion",
|
|
262
|
+
"ErrorCatalogEntry",
|
|
263
|
+
"EstimateBreakdown",
|
|
264
|
+
"EstimateCostRequest",
|
|
265
|
+
"EstimateDubbingBilling",
|
|
266
|
+
"EstimateDubbingPart",
|
|
267
|
+
"EstimateDurationCheck",
|
|
268
|
+
"EstimateLipsyncPart",
|
|
269
|
+
"EstimateWorkflow",
|
|
270
|
+
"EstimatedGenerationCost",
|
|
271
|
+
"FeedbackClient",
|
|
272
|
+
"FeedbackKind",
|
|
273
|
+
"FeedbackRateLimitError",
|
|
274
|
+
"FeedbackReceipt",
|
|
275
|
+
"FeedbackSeverity",
|
|
276
|
+
"FeedbackSource",
|
|
277
|
+
"FeedbackTooManyRequestsError",
|
|
278
|
+
"ForbiddenError",
|
|
279
|
+
"GatewayTimeoutError",
|
|
280
|
+
"Generation",
|
|
281
|
+
"GenerationConcurrencyError",
|
|
282
|
+
"GenerationDeletedError",
|
|
283
|
+
"GenerationError",
|
|
284
|
+
"GenerationErrorMessage",
|
|
285
|
+
"GenerationEstimate",
|
|
286
|
+
"GenerationEstimateConfidence",
|
|
287
|
+
"GenerationEstimateResolutionSource",
|
|
288
|
+
"GenerationEstimateScope",
|
|
289
|
+
"GenerationEstimateSource",
|
|
290
|
+
"GenerationId",
|
|
291
|
+
"GenerationNotification",
|
|
292
|
+
"GenerationOptions",
|
|
293
|
+
"GenerationSegment",
|
|
294
|
+
"GenerationStatus",
|
|
295
|
+
"GenerationTooManyRequestsError",
|
|
296
|
+
"Image",
|
|
297
|
+
"Input",
|
|
298
|
+
"InternalServerError",
|
|
299
|
+
"Model",
|
|
300
|
+
"ModelInfo",
|
|
301
|
+
"ModelMode",
|
|
302
|
+
"NotFoundError",
|
|
303
|
+
"OutputAudio",
|
|
304
|
+
"OutputFormat",
|
|
305
|
+
"PaginatedAssetsResponse",
|
|
306
|
+
"PaginatedProjectsResponse",
|
|
307
|
+
"PayloadTooLargeError",
|
|
308
|
+
"PaymentRequiredError",
|
|
309
|
+
"Project",
|
|
310
|
+
"ProjectGeneration",
|
|
311
|
+
"ProjectGenerationError",
|
|
312
|
+
"ProjectGenerationInput",
|
|
313
|
+
"ProjectGenerationModel",
|
|
314
|
+
"ProjectGenerationProvider",
|
|
315
|
+
"ProjectGenerationSegment",
|
|
316
|
+
"ProjectId",
|
|
317
|
+
"ProjectListItem",
|
|
318
|
+
"ProjectMode",
|
|
319
|
+
"ProjectSort",
|
|
320
|
+
"ProjectVisibility",
|
|
321
|
+
"SegmentAudioInput",
|
|
322
|
+
"SegmentFrames",
|
|
323
|
+
"SegmentOptionsOverride",
|
|
324
|
+
"SegmentSecs",
|
|
325
|
+
"ServiceUnavailableError",
|
|
326
|
+
"Sync",
|
|
327
|
+
"SyncEnvironment",
|
|
328
|
+
"SyncMode",
|
|
329
|
+
"TooManyRequestsError",
|
|
330
|
+
"Transcript",
|
|
331
|
+
"TranscriptSegment",
|
|
332
|
+
"TranscriptWord",
|
|
333
|
+
"TranscriptionDifficulty",
|
|
334
|
+
"TranscriptionDifficultyReason",
|
|
335
|
+
"TranscriptionDifficultyTier",
|
|
336
|
+
"TranscriptionError",
|
|
337
|
+
"TranscriptionErrorCode",
|
|
338
|
+
"TranscriptionJob",
|
|
339
|
+
"TranscriptionJobId",
|
|
340
|
+
"TranscriptionJobStatus",
|
|
341
|
+
"Tts",
|
|
342
|
+
"TtsGenerationResponse",
|
|
343
|
+
"TtsJob",
|
|
344
|
+
"TtsJobError",
|
|
345
|
+
"TtsJobErrorCode",
|
|
346
|
+
"TtsJobStatus",
|
|
347
|
+
"TtsProviderConfig",
|
|
348
|
+
"UnauthorizedError",
|
|
349
|
+
"UnprocessableEntityError",
|
|
350
|
+
"UpdateAssetRequest",
|
|
351
|
+
"UpdateProjectRequest",
|
|
352
|
+
"ValidationResponse",
|
|
353
|
+
"Video",
|
|
354
|
+
"Voice",
|
|
355
|
+
"VoiceCloneRateLimitError",
|
|
356
|
+
"VoiceCloneTooManyRequestsError",
|
|
357
|
+
"VoiceProvider",
|
|
358
|
+
"VoiceRestriction",
|
|
359
|
+
"WebhookSecretResponse",
|
|
360
|
+
"WebhookStatus",
|
|
361
|
+
"__version__",
|
|
362
|
+
"account",
|
|
363
|
+
"assets",
|
|
364
|
+
"batch",
|
|
365
|
+
"common",
|
|
366
|
+
"dialogue_edits",
|
|
367
|
+
"errors",
|
|
368
|
+
"feedback",
|
|
369
|
+
"generations",
|
|
370
|
+
"models",
|
|
371
|
+
"organizations",
|
|
372
|
+
"projects",
|
|
373
|
+
"transcriptions",
|
|
374
|
+
"tts",
|
|
375
|
+
"voices",
|
|
376
|
+
"webhooks",
|
|
377
|
+
]
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
# This file was auto-generated by Fern from our API Definition.
|
|
2
|
+
|
|
3
|
+
from .types import (
|
|
4
|
+
AccountActiveJobs,
|
|
5
|
+
AccountAllowanceUsage,
|
|
6
|
+
AccountBillingModel,
|
|
7
|
+
AccountBillingPeriod,
|
|
8
|
+
AccountCredentialType,
|
|
9
|
+
AccountCredits,
|
|
10
|
+
AccountFreeAllowance,
|
|
11
|
+
AccountLimits,
|
|
12
|
+
AccountOrganization,
|
|
13
|
+
AccountOverview,
|
|
14
|
+
AccountPlan,
|
|
15
|
+
AccountUser,
|
|
16
|
+
)
|
|
17
|
+
|
|
18
|
+
__all__ = [
|
|
19
|
+
"AccountActiveJobs",
|
|
20
|
+
"AccountAllowanceUsage",
|
|
21
|
+
"AccountBillingModel",
|
|
22
|
+
"AccountBillingPeriod",
|
|
23
|
+
"AccountCredentialType",
|
|
24
|
+
"AccountCredits",
|
|
25
|
+
"AccountFreeAllowance",
|
|
26
|
+
"AccountLimits",
|
|
27
|
+
"AccountOrganization",
|
|
28
|
+
"AccountOverview",
|
|
29
|
+
"AccountPlan",
|
|
30
|
+
"AccountUser",
|
|
31
|
+
]
|
|
@@ -0,0 +1,101 @@
|
|
|
1
|
+
# This file was auto-generated by Fern from our API Definition.
|
|
2
|
+
|
|
3
|
+
from ..core.client_wrapper import SyncClientWrapper
|
|
4
|
+
from .raw_client import RawAccountClient
|
|
5
|
+
import typing
|
|
6
|
+
from ..core.request_options import RequestOptions
|
|
7
|
+
from .types.account_overview import AccountOverview
|
|
8
|
+
from ..core.client_wrapper import AsyncClientWrapper
|
|
9
|
+
from .raw_client import AsyncRawAccountClient
|
|
10
|
+
|
|
11
|
+
|
|
12
|
+
class AccountClient:
|
|
13
|
+
def __init__(self, *, client_wrapper: SyncClientWrapper):
|
|
14
|
+
self._raw_client = RawAccountClient(client_wrapper=client_wrapper)
|
|
15
|
+
|
|
16
|
+
@property
|
|
17
|
+
def with_raw_response(self) -> RawAccountClient:
|
|
18
|
+
"""
|
|
19
|
+
Retrieves a raw implementation of this client that returns raw responses.
|
|
20
|
+
|
|
21
|
+
Returns
|
|
22
|
+
-------
|
|
23
|
+
RawAccountClient
|
|
24
|
+
"""
|
|
25
|
+
return self._raw_client
|
|
26
|
+
|
|
27
|
+
def get(self, *, request_options: typing.Optional[RequestOptions] = None) -> AccountOverview:
|
|
28
|
+
"""
|
|
29
|
+
Get the account, plan, limits and balance behind these credentials. Call it before submitting work to check plan limits and remaining credits or free allowance, and after a 402, 403 or 429 to decide how to recover: `billingModel` says whether to top up credits (`credits`), pay or update the payment method (`usage`), upgrade (`free`) or contact sync. (`enterprise`). Send people to `billingUrl` for anything that needs a payment.
|
|
30
|
+
|
|
31
|
+
Parameters
|
|
32
|
+
----------
|
|
33
|
+
request_options : typing.Optional[RequestOptions]
|
|
34
|
+
Request-specific configuration.
|
|
35
|
+
|
|
36
|
+
Returns
|
|
37
|
+
-------
|
|
38
|
+
AccountOverview
|
|
39
|
+
Account, organization, plan, limits and balance
|
|
40
|
+
|
|
41
|
+
Examples
|
|
42
|
+
--------
|
|
43
|
+
from sync import Sync
|
|
44
|
+
|
|
45
|
+
client = Sync(
|
|
46
|
+
api_key="YOUR_API_KEY",
|
|
47
|
+
)
|
|
48
|
+
client.account.get()
|
|
49
|
+
"""
|
|
50
|
+
response = self._raw_client.get(request_options=request_options)
|
|
51
|
+
return response.data
|
|
52
|
+
|
|
53
|
+
|
|
54
|
+
class AsyncAccountClient:
|
|
55
|
+
def __init__(self, *, client_wrapper: AsyncClientWrapper):
|
|
56
|
+
self._raw_client = AsyncRawAccountClient(client_wrapper=client_wrapper)
|
|
57
|
+
|
|
58
|
+
@property
|
|
59
|
+
def with_raw_response(self) -> AsyncRawAccountClient:
|
|
60
|
+
"""
|
|
61
|
+
Retrieves a raw implementation of this client that returns raw responses.
|
|
62
|
+
|
|
63
|
+
Returns
|
|
64
|
+
-------
|
|
65
|
+
AsyncRawAccountClient
|
|
66
|
+
"""
|
|
67
|
+
return self._raw_client
|
|
68
|
+
|
|
69
|
+
async def get(self, *, request_options: typing.Optional[RequestOptions] = None) -> AccountOverview:
|
|
70
|
+
"""
|
|
71
|
+
Get the account, plan, limits and balance behind these credentials. Call it before submitting work to check plan limits and remaining credits or free allowance, and after a 402, 403 or 429 to decide how to recover: `billingModel` says whether to top up credits (`credits`), pay or update the payment method (`usage`), upgrade (`free`) or contact sync. (`enterprise`). Send people to `billingUrl` for anything that needs a payment.
|
|
72
|
+
|
|
73
|
+
Parameters
|
|
74
|
+
----------
|
|
75
|
+
request_options : typing.Optional[RequestOptions]
|
|
76
|
+
Request-specific configuration.
|
|
77
|
+
|
|
78
|
+
Returns
|
|
79
|
+
-------
|
|
80
|
+
AccountOverview
|
|
81
|
+
Account, organization, plan, limits and balance
|
|
82
|
+
|
|
83
|
+
Examples
|
|
84
|
+
--------
|
|
85
|
+
import asyncio
|
|
86
|
+
|
|
87
|
+
from sync import AsyncSync
|
|
88
|
+
|
|
89
|
+
client = AsyncSync(
|
|
90
|
+
api_key="YOUR_API_KEY",
|
|
91
|
+
)
|
|
92
|
+
|
|
93
|
+
|
|
94
|
+
async def main() -> None:
|
|
95
|
+
await client.account.get()
|
|
96
|
+
|
|
97
|
+
|
|
98
|
+
asyncio.run(main())
|
|
99
|
+
"""
|
|
100
|
+
response = await self._raw_client.get(request_options=request_options)
|
|
101
|
+
return response.data
|
|
@@ -0,0 +1,135 @@
|
|
|
1
|
+
# This file was auto-generated by Fern from our API Definition.
|
|
2
|
+
|
|
3
|
+
from ..core.client_wrapper import SyncClientWrapper
|
|
4
|
+
import typing
|
|
5
|
+
from ..core.request_options import RequestOptions
|
|
6
|
+
from ..core.http_response import HttpResponse
|
|
7
|
+
from .types.account_overview import AccountOverview
|
|
8
|
+
from ..core.unchecked_base_model import construct_type
|
|
9
|
+
from ..common.errors.unauthorized_error import UnauthorizedError
|
|
10
|
+
from ..common.types.generation_error import GenerationError
|
|
11
|
+
from ..common.errors.internal_server_error import InternalServerError
|
|
12
|
+
from json.decoder import JSONDecodeError
|
|
13
|
+
from ..core.api_error import ApiError
|
|
14
|
+
from ..core.client_wrapper import AsyncClientWrapper
|
|
15
|
+
from ..core.http_response import AsyncHttpResponse
|
|
16
|
+
|
|
17
|
+
|
|
18
|
+
class RawAccountClient:
|
|
19
|
+
def __init__(self, *, client_wrapper: SyncClientWrapper):
|
|
20
|
+
self._client_wrapper = client_wrapper
|
|
21
|
+
|
|
22
|
+
def get(self, *, request_options: typing.Optional[RequestOptions] = None) -> HttpResponse[AccountOverview]:
|
|
23
|
+
"""
|
|
24
|
+
Get the account, plan, limits and balance behind these credentials. Call it before submitting work to check plan limits and remaining credits or free allowance, and after a 402, 403 or 429 to decide how to recover: `billingModel` says whether to top up credits (`credits`), pay or update the payment method (`usage`), upgrade (`free`) or contact sync. (`enterprise`). Send people to `billingUrl` for anything that needs a payment.
|
|
25
|
+
|
|
26
|
+
Parameters
|
|
27
|
+
----------
|
|
28
|
+
request_options : typing.Optional[RequestOptions]
|
|
29
|
+
Request-specific configuration.
|
|
30
|
+
|
|
31
|
+
Returns
|
|
32
|
+
-------
|
|
33
|
+
HttpResponse[AccountOverview]
|
|
34
|
+
Account, organization, plan, limits and balance
|
|
35
|
+
"""
|
|
36
|
+
_response = self._client_wrapper.httpx_client.request(
|
|
37
|
+
"v2/account",
|
|
38
|
+
method="GET",
|
|
39
|
+
request_options=request_options,
|
|
40
|
+
)
|
|
41
|
+
try:
|
|
42
|
+
if 200 <= _response.status_code < 300:
|
|
43
|
+
_data = typing.cast(
|
|
44
|
+
AccountOverview,
|
|
45
|
+
construct_type(
|
|
46
|
+
type_=AccountOverview, # type: ignore
|
|
47
|
+
object_=_response.json(),
|
|
48
|
+
),
|
|
49
|
+
)
|
|
50
|
+
return HttpResponse(response=_response, data=_data)
|
|
51
|
+
if _response.status_code == 401:
|
|
52
|
+
raise UnauthorizedError(
|
|
53
|
+
typing.cast(
|
|
54
|
+
GenerationError,
|
|
55
|
+
construct_type(
|
|
56
|
+
type_=GenerationError, # type: ignore
|
|
57
|
+
object_=_response.json(),
|
|
58
|
+
),
|
|
59
|
+
)
|
|
60
|
+
)
|
|
61
|
+
if _response.status_code == 500:
|
|
62
|
+
raise InternalServerError(
|
|
63
|
+
typing.cast(
|
|
64
|
+
GenerationError,
|
|
65
|
+
construct_type(
|
|
66
|
+
type_=GenerationError, # type: ignore
|
|
67
|
+
object_=_response.json(),
|
|
68
|
+
),
|
|
69
|
+
)
|
|
70
|
+
)
|
|
71
|
+
_response_json = _response.json()
|
|
72
|
+
except JSONDecodeError:
|
|
73
|
+
raise ApiError(status_code=_response.status_code, body=_response.text)
|
|
74
|
+
raise ApiError(status_code=_response.status_code, body=_response_json)
|
|
75
|
+
|
|
76
|
+
|
|
77
|
+
class AsyncRawAccountClient:
|
|
78
|
+
def __init__(self, *, client_wrapper: AsyncClientWrapper):
|
|
79
|
+
self._client_wrapper = client_wrapper
|
|
80
|
+
|
|
81
|
+
async def get(
|
|
82
|
+
self, *, request_options: typing.Optional[RequestOptions] = None
|
|
83
|
+
) -> AsyncHttpResponse[AccountOverview]:
|
|
84
|
+
"""
|
|
85
|
+
Get the account, plan, limits and balance behind these credentials. Call it before submitting work to check plan limits and remaining credits or free allowance, and after a 402, 403 or 429 to decide how to recover: `billingModel` says whether to top up credits (`credits`), pay or update the payment method (`usage`), upgrade (`free`) or contact sync. (`enterprise`). Send people to `billingUrl` for anything that needs a payment.
|
|
86
|
+
|
|
87
|
+
Parameters
|
|
88
|
+
----------
|
|
89
|
+
request_options : typing.Optional[RequestOptions]
|
|
90
|
+
Request-specific configuration.
|
|
91
|
+
|
|
92
|
+
Returns
|
|
93
|
+
-------
|
|
94
|
+
AsyncHttpResponse[AccountOverview]
|
|
95
|
+
Account, organization, plan, limits and balance
|
|
96
|
+
"""
|
|
97
|
+
_response = await self._client_wrapper.httpx_client.request(
|
|
98
|
+
"v2/account",
|
|
99
|
+
method="GET",
|
|
100
|
+
request_options=request_options,
|
|
101
|
+
)
|
|
102
|
+
try:
|
|
103
|
+
if 200 <= _response.status_code < 300:
|
|
104
|
+
_data = typing.cast(
|
|
105
|
+
AccountOverview,
|
|
106
|
+
construct_type(
|
|
107
|
+
type_=AccountOverview, # type: ignore
|
|
108
|
+
object_=_response.json(),
|
|
109
|
+
),
|
|
110
|
+
)
|
|
111
|
+
return AsyncHttpResponse(response=_response, data=_data)
|
|
112
|
+
if _response.status_code == 401:
|
|
113
|
+
raise UnauthorizedError(
|
|
114
|
+
typing.cast(
|
|
115
|
+
GenerationError,
|
|
116
|
+
construct_type(
|
|
117
|
+
type_=GenerationError, # type: ignore
|
|
118
|
+
object_=_response.json(),
|
|
119
|
+
),
|
|
120
|
+
)
|
|
121
|
+
)
|
|
122
|
+
if _response.status_code == 500:
|
|
123
|
+
raise InternalServerError(
|
|
124
|
+
typing.cast(
|
|
125
|
+
GenerationError,
|
|
126
|
+
construct_type(
|
|
127
|
+
type_=GenerationError, # type: ignore
|
|
128
|
+
object_=_response.json(),
|
|
129
|
+
),
|
|
130
|
+
)
|
|
131
|
+
)
|
|
132
|
+
_response_json = _response.json()
|
|
133
|
+
except JSONDecodeError:
|
|
134
|
+
raise ApiError(status_code=_response.status_code, body=_response.text)
|
|
135
|
+
raise ApiError(status_code=_response.status_code, body=_response_json)
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
# This file was auto-generated by Fern from our API Definition.
|
|
2
|
+
|
|
3
|
+
from .account_active_jobs import AccountActiveJobs
|
|
4
|
+
from .account_allowance_usage import AccountAllowanceUsage
|
|
5
|
+
from .account_billing_model import AccountBillingModel
|
|
6
|
+
from .account_billing_period import AccountBillingPeriod
|
|
7
|
+
from .account_credential_type import AccountCredentialType
|
|
8
|
+
from .account_credits import AccountCredits
|
|
9
|
+
from .account_free_allowance import AccountFreeAllowance
|
|
10
|
+
from .account_limits import AccountLimits
|
|
11
|
+
from .account_organization import AccountOrganization
|
|
12
|
+
from .account_overview import AccountOverview
|
|
13
|
+
from .account_plan import AccountPlan
|
|
14
|
+
from .account_user import AccountUser
|
|
15
|
+
|
|
16
|
+
__all__ = [
|
|
17
|
+
"AccountActiveJobs",
|
|
18
|
+
"AccountAllowanceUsage",
|
|
19
|
+
"AccountBillingModel",
|
|
20
|
+
"AccountBillingPeriod",
|
|
21
|
+
"AccountCredentialType",
|
|
22
|
+
"AccountCredits",
|
|
23
|
+
"AccountFreeAllowance",
|
|
24
|
+
"AccountLimits",
|
|
25
|
+
"AccountOrganization",
|
|
26
|
+
"AccountOverview",
|
|
27
|
+
"AccountPlan",
|
|
28
|
+
"AccountUser",
|
|
29
|
+
]
|