docu-devs-api-client 1.6.1__tar.gz → 1.7.1__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.
- {docu_devs_api_client-1.6.1 → docu_devs_api_client-1.7.1}/PKG-INFO +1 -1
- {docu_devs_api_client-1.6.1 → docu_devs_api_client-1.7.1}/cli.py +156 -0
- {docu_devs_api_client-1.6.1 → docu_devs_api_client-1.7.1}/docudevs/__init__.py +3 -0
- docu_devs_api_client-1.7.1/docudevs/api/billing/get_recent_ledger.py +175 -0
- docu_devs_api_client-1.7.1/docudevs/api/billing/get_usage_by_jobs.py +109 -0
- docu_devs_api_client-1.7.1/docudevs/api/billing/get_usage_summary.py +155 -0
- docu_devs_api_client-1.7.1/docudevs/api/configuration/upload_excel_template.py +106 -0
- {docu_devs_api_client-1.6.1 → docu_devs_api_client-1.7.1}/docudevs/api/job/result_excel.py +21 -1
- {docu_devs_api_client-1.6.1 → docu_devs_api_client-1.7.1}/docudevs/cli.py +156 -0
- {docu_devs_api_client-1.6.1 → docu_devs_api_client-1.7.1}/docudevs/docudevs_client.py +108 -12
- {docu_devs_api_client-1.6.1 → docu_devs_api_client-1.7.1}/docudevs/models/__init__.py +12 -0
- {docu_devs_api_client-1.6.1 → docu_devs_api_client-1.7.1}/docudevs/models/agent_response_content.py +31 -0
- docu_devs_api_client-1.7.1/docudevs/models/daily_usage_entry.py +67 -0
- docu_devs_api_client-1.7.1/docudevs/models/excel_template_config.py +97 -0
- {docu_devs_api_client-1.6.1 → docu_devs_api_client-1.7.1}/docudevs/models/extraction_mode.py +2 -2
- docu_devs_api_client-1.7.1/docudevs/models/ledger_entry_response.py +97 -0
- {docu_devs_api_client-1.6.1 → docu_devs_api_client-1.7.1}/docudevs/models/map_reduce_command.py +37 -0
- docu_devs_api_client-1.7.1/docudevs/models/map_reduce_split_type.py +14 -0
- {docu_devs_api_client-1.6.1 → docu_devs_api_client-1.7.1}/docudevs/models/process_batch_body.py +38 -0
- {docu_devs_api_client-1.6.1 → docu_devs_api_client-1.7.1}/docudevs/models/upload_command.py +38 -0
- docu_devs_api_client-1.7.1/docudevs/models/upload_excel_template_body.py +73 -0
- docu_devs_api_client-1.7.1/docudevs/models/usage_summary_response.py +97 -0
- docu_devs_api_client-1.7.1/docudevs/schema.py +46 -0
- {docu_devs_api_client-1.6.1 → docu_devs_api_client-1.7.1}/docudevs_client.py +122 -12
- {docu_devs_api_client-1.6.1 → docu_devs_api_client-1.7.1}/pyproject.toml +1 -1
- {docu_devs_api_client-1.6.1 → docu_devs_api_client-1.7.1}/.gitignore +0 -0
- {docu_devs_api_client-1.6.1 → docu_devs_api_client-1.7.1}/README.md +0 -0
- {docu_devs_api_client-1.6.1 → docu_devs_api_client-1.7.1}/docudevs/api/__init__.py +0 -0
- {docu_devs_api_client-1.6.1 → docu_devs_api_client-1.7.1}/docudevs/api/agent/__init__.py +0 -0
- {docu_devs_api_client-1.6.1 → docu_devs_api_client-1.7.1}/docudevs/api/agent/chat.py +0 -0
- {docu_devs_api_client-1.6.1 → docu_devs_api_client-1.7.1}/docudevs/api/agent/get_agent_status.py +0 -0
- {docu_devs_api_client-1.6.1 → docu_devs_api_client-1.7.1}/docudevs/api/azure_ocr_providers/__init__.py +0 -0
- {docu_devs_api_client-1.6.1 → docu_devs_api_client-1.7.1}/docudevs/api/azure_ocr_providers/create_ocr_provider.py +0 -0
- {docu_devs_api_client-1.6.1 → docu_devs_api_client-1.7.1}/docudevs/api/azure_ocr_providers/delete_ocr_provider.py +0 -0
- {docu_devs_api_client-1.6.1 → docu_devs_api_client-1.7.1}/docudevs/api/azure_ocr_providers/get_ocr_provider.py +0 -0
- {docu_devs_api_client-1.6.1 → docu_devs_api_client-1.7.1}/docudevs/api/azure_ocr_providers/list_ocr_keys.py +0 -0
- {docu_devs_api_client-1.6.1 → docu_devs_api_client-1.7.1}/docudevs/api/azure_ocr_providers/list_ocr_providers.py +0 -0
- {docu_devs_api_client-1.6.1 → docu_devs_api_client-1.7.1}/docudevs/api/azure_ocr_providers/update_ocr_key.py +0 -0
- {docu_devs_api_client-1.6.1 → docu_devs_api_client-1.7.1}/docudevs/api/azure_ocr_providers/update_ocr_provider.py +0 -0
- {docu_devs_api_client-1.6.1 → docu_devs_api_client-1.7.1}/docudevs/api/batch/__init__.py +0 -0
- {docu_devs_api_client-1.6.1 → docu_devs_api_client-1.7.1}/docudevs/api/batch/create_batch.py +0 -0
- {docu_devs_api_client-1.6.1 → docu_devs_api_client-1.7.1}/docudevs/api/batch/process_batch.py +0 -0
- {docu_devs_api_client-1.6.1 → docu_devs_api_client-1.7.1}/docudevs/api/batch/schedule_batch.py +0 -0
- {docu_devs_api_client-1.6.1 → docu_devs_api_client-1.7.1}/docudevs/api/batch/upload_batch_document.py +0 -0
- {docu_devs_api_client-1.6.1 → docu_devs_api_client-1.7.1}/docudevs/api/billing/__init__.py +0 -0
- {docu_devs_api_client-1.6.1 → docu_devs_api_client-1.7.1}/docudevs/api/billing/create_checkout_session.py +0 -0
- {docu_devs_api_client-1.6.1 → docu_devs_api_client-1.7.1}/docudevs/api/billing/get_balance.py +0 -0
- {docu_devs_api_client-1.6.1 → docu_devs_api_client-1.7.1}/docudevs/api/billing/handle_webhook.py +0 -0
- {docu_devs_api_client-1.6.1 → docu_devs_api_client-1.7.1}/docudevs/api/billing/list_prices.py +0 -0
- {docu_devs_api_client-1.6.1 → docu_devs_api_client-1.7.1}/docudevs/api/cases/__init__.py +0 -0
- {docu_devs_api_client-1.6.1 → docu_devs_api_client-1.7.1}/docudevs/api/cases/create_case.py +0 -0
- {docu_devs_api_client-1.6.1 → docu_devs_api_client-1.7.1}/docudevs/api/cases/delete_case.py +0 -0
- {docu_devs_api_client-1.6.1 → docu_devs_api_client-1.7.1}/docudevs/api/cases/delete_case_document.py +0 -0
- {docu_devs_api_client-1.6.1 → docu_devs_api_client-1.7.1}/docudevs/api/cases/get_case.py +0 -0
- {docu_devs_api_client-1.6.1 → docu_devs_api_client-1.7.1}/docudevs/api/cases/get_case_document.py +0 -0
- {docu_devs_api_client-1.6.1 → docu_devs_api_client-1.7.1}/docudevs/api/cases/list_case_documents.py +0 -0
- {docu_devs_api_client-1.6.1 → docu_devs_api_client-1.7.1}/docudevs/api/cases/list_cases.py +0 -0
- {docu_devs_api_client-1.6.1 → docu_devs_api_client-1.7.1}/docudevs/api/cases/update_case.py +0 -0
- {docu_devs_api_client-1.6.1 → docu_devs_api_client-1.7.1}/docudevs/api/cases/upload_case_document.py +0 -0
- {docu_devs_api_client-1.6.1 → docu_devs_api_client-1.7.1}/docudevs/api/cases/upload_case_document_legacy.py +0 -0
- {docu_devs_api_client-1.6.1 → docu_devs_api_client-1.7.1}/docudevs/api/configuration/__init__.py +0 -0
- {docu_devs_api_client-1.6.1 → docu_devs_api_client-1.7.1}/docudevs/api/configuration/delete_configuration.py +0 -0
- {docu_devs_api_client-1.6.1 → docu_devs_api_client-1.7.1}/docudevs/api/configuration/get_configuration.py +0 -0
- {docu_devs_api_client-1.6.1 → docu_devs_api_client-1.7.1}/docudevs/api/configuration/list_configurations.py +0 -0
- {docu_devs_api_client-1.6.1 → docu_devs_api_client-1.7.1}/docudevs/api/configuration/save_configuration.py +0 -0
- {docu_devs_api_client-1.6.1 → docu_devs_api_client-1.7.1}/docudevs/api/default/__init__.py +0 -0
- {docu_devs_api_client-1.6.1 → docu_devs_api_client-1.7.1}/docudevs/api/default/get_current_user.py +0 -0
- {docu_devs_api_client-1.6.1 → docu_devs_api_client-1.7.1}/docudevs/api/default/resolve_ocr_provider.py +0 -0
- {docu_devs_api_client-1.6.1 → docu_devs_api_client-1.7.1}/docudevs/api/document/__init__.py +0 -0
- {docu_devs_api_client-1.6.1 → docu_devs_api_client-1.7.1}/docudevs/api/document/analyze_document.py +0 -0
- {docu_devs_api_client-1.6.1 → docu_devs_api_client-1.7.1}/docudevs/api/document/generate_schema.py +0 -0
- {docu_devs_api_client-1.6.1 → docu_devs_api_client-1.7.1}/docudevs/api/document/ocr_document.py +0 -0
- {docu_devs_api_client-1.6.1 → docu_devs_api_client-1.7.1}/docudevs/api/document/ocr_document_sync.py +0 -0
- {docu_devs_api_client-1.6.1 → docu_devs_api_client-1.7.1}/docudevs/api/document/process_document.py +0 -0
- {docu_devs_api_client-1.6.1 → docu_devs_api_client-1.7.1}/docudevs/api/document/process_document_with_configuration.py +0 -0
- {docu_devs_api_client-1.6.1 → docu_devs_api_client-1.7.1}/docudevs/api/document/upload_document.py +0 -0
- {docu_devs_api_client-1.6.1 → docu_devs_api_client-1.7.1}/docudevs/api/document/upload_files.py +0 -0
- {docu_devs_api_client-1.6.1 → docu_devs_api_client-1.7.1}/docudevs/api/document/upload_files_sync.py +0 -0
- {docu_devs_api_client-1.6.1 → docu_devs_api_client-1.7.1}/docudevs/api/document/upload_template.py +0 -0
- {docu_devs_api_client-1.6.1 → docu_devs_api_client-1.7.1}/docudevs/api/internal_llm/__init__.py +0 -0
- {docu_devs_api_client-1.6.1 → docu_devs_api_client-1.7.1}/docudevs/api/internal_llm/resolve_llm_provider.py +0 -0
- {docu_devs_api_client-1.6.1 → docu_devs_api_client-1.7.1}/docudevs/api/job/__init__.py +0 -0
- {docu_devs_api_client-1.6.1 → docu_devs_api_client-1.7.1}/docudevs/api/job/delete_job.py +0 -0
- {docu_devs_api_client-1.6.1 → docu_devs_api_client-1.7.1}/docudevs/api/job/get_dependencies.py +0 -0
- {docu_devs_api_client-1.6.1 → docu_devs_api_client-1.7.1}/docudevs/api/job/get_figure_image.py +0 -0
- {docu_devs_api_client-1.6.1 → docu_devs_api_client-1.7.1}/docudevs/api/job/get_figures_metadata.py +0 -0
- {docu_devs_api_client-1.6.1 → docu_devs_api_client-1.7.1}/docudevs/api/job/get_image.py +0 -0
- {docu_devs_api_client-1.6.1 → docu_devs_api_client-1.7.1}/docudevs/api/job/get_job_status.py +0 -0
- {docu_devs_api_client-1.6.1 → docu_devs_api_client-1.7.1}/docudevs/api/job/get_trace.py +0 -0
- {docu_devs_api_client-1.6.1 → docu_devs_api_client-1.7.1}/docudevs/api/job/list_jobs.py +0 -0
- {docu_devs_api_client-1.6.1 → docu_devs_api_client-1.7.1}/docudevs/api/job/result.py +0 -0
- {docu_devs_api_client-1.6.1 → docu_devs_api_client-1.7.1}/docudevs/api/job/result_csv.py +0 -0
- {docu_devs_api_client-1.6.1 → docu_devs_api_client-1.7.1}/docudevs/api/job/result_json.py +0 -0
- {docu_devs_api_client-1.6.1 → docu_devs_api_client-1.7.1}/docudevs/api/knowledge_bases/__init__.py +0 -0
- {docu_devs_api_client-1.6.1 → docu_devs_api_client-1.7.1}/docudevs/api/knowledge_bases/demote_knowledge_base.py +0 -0
- {docu_devs_api_client-1.6.1 → docu_devs_api_client-1.7.1}/docudevs/api/knowledge_bases/get_knowledge_base.py +0 -0
- {docu_devs_api_client-1.6.1 → docu_devs_api_client-1.7.1}/docudevs/api/knowledge_bases/list_knowledge_bases.py +0 -0
- {docu_devs_api_client-1.6.1 → docu_devs_api_client-1.7.1}/docudevs/api/knowledge_bases/promote_knowledge_base.py +0 -0
- {docu_devs_api_client-1.6.1 → docu_devs_api_client-1.7.1}/docudevs/api/llm_providers/__init__.py +0 -0
- {docu_devs_api_client-1.6.1 → docu_devs_api_client-1.7.1}/docudevs/api/llm_providers/create_llm_provider.py +0 -0
- {docu_devs_api_client-1.6.1 → docu_devs_api_client-1.7.1}/docudevs/api/llm_providers/delete_llm_provider.py +0 -0
- {docu_devs_api_client-1.6.1 → docu_devs_api_client-1.7.1}/docudevs/api/llm_providers/get_llm_provider.py +0 -0
- {docu_devs_api_client-1.6.1 → docu_devs_api_client-1.7.1}/docudevs/api/llm_providers/list_llm_keys.py +0 -0
- {docu_devs_api_client-1.6.1 → docu_devs_api_client-1.7.1}/docudevs/api/llm_providers/list_llm_providers.py +0 -0
- {docu_devs_api_client-1.6.1 → docu_devs_api_client-1.7.1}/docudevs/api/llm_providers/update_llm_key.py +0 -0
- {docu_devs_api_client-1.6.1 → docu_devs_api_client-1.7.1}/docudevs/api/llm_providers/update_llm_provider.py +0 -0
- {docu_devs_api_client-1.6.1 → docu_devs_api_client-1.7.1}/docudevs/api/operations/__init__.py +0 -0
- {docu_devs_api_client-1.6.1 → docu_devs_api_client-1.7.1}/docudevs/api/operations/create_generative_task.py +0 -0
- {docu_devs_api_client-1.6.1 → docu_devs_api_client-1.7.1}/docudevs/api/operations/get_operation_result.py +0 -0
- {docu_devs_api_client-1.6.1 → docu_devs_api_client-1.7.1}/docudevs/api/operations/get_operation_status.py +0 -0
- {docu_devs_api_client-1.6.1 → docu_devs_api_client-1.7.1}/docudevs/api/operations/submit_operation.py +0 -0
- {docu_devs_api_client-1.6.1 → docu_devs_api_client-1.7.1}/docudevs/api/settings/__init__.py +0 -0
- {docu_devs_api_client-1.6.1 → docu_devs_api_client-1.7.1}/docudevs/api/settings/settings.py +0 -0
- {docu_devs_api_client-1.6.1 → docu_devs_api_client-1.7.1}/docudevs/api/template/__init__.py +0 -0
- {docu_devs_api_client-1.6.1 → docu_devs_api_client-1.7.1}/docudevs/api/template/delete_template.py +0 -0
- {docu_devs_api_client-1.6.1 → docu_devs_api_client-1.7.1}/docudevs/api/template/fill.py +0 -0
- {docu_devs_api_client-1.6.1 → docu_devs_api_client-1.7.1}/docudevs/api/template/list_templates.py +0 -0
- {docu_devs_api_client-1.6.1 → docu_devs_api_client-1.7.1}/docudevs/api/template/metadata.py +0 -0
- {docu_devs_api_client-1.6.1 → docu_devs_api_client-1.7.1}/docudevs/api/template/upload_template_images.py +0 -0
- {docu_devs_api_client-1.6.1 → docu_devs_api_client-1.7.1}/docudevs/client.py +0 -0
- {docu_devs_api_client-1.6.1 → docu_devs_api_client-1.7.1}/docudevs/errors.py +0 -0
- {docu_devs_api_client-1.6.1 → docu_devs_api_client-1.7.1}/docudevs/models/agent_action.py +0 -0
- {docu_devs_api_client-1.6.1 → docu_devs_api_client-1.7.1}/docudevs/models/agent_action_data_type_1.py +0 -0
- {docu_devs_api_client-1.6.1 → docu_devs_api_client-1.7.1}/docudevs/models/agent_chat_request.py +0 -0
- {docu_devs_api_client-1.6.1 → docu_devs_api_client-1.7.1}/docudevs/models/agent_chat_response.py +0 -0
- {docu_devs_api_client-1.6.1 → docu_devs_api_client-1.7.1}/docudevs/models/agent_response_content_suggested_config_type_1.py +0 -0
- {docu_devs_api_client-1.6.1 → docu_devs_api_client-1.7.1}/docudevs/models/agent_status_response.py +0 -0
- {docu_devs_api_client-1.6.1 → docu_devs_api_client-1.7.1}/docudevs/models/analyze_document_body.py +0 -0
- {docu_devs_api_client-1.6.1 → docu_devs_api_client-1.7.1}/docudevs/models/batch_create_request.py +0 -0
- {docu_devs_api_client-1.6.1 → docu_devs_api_client-1.7.1}/docudevs/models/batch_create_response.py +0 -0
- {docu_devs_api_client-1.6.1 → docu_devs_api_client-1.7.1}/docudevs/models/batch_schedule_response.py +0 -0
- {docu_devs_api_client-1.6.1 → docu_devs_api_client-1.7.1}/docudevs/models/batch_upload_response.py +0 -0
- {docu_devs_api_client-1.6.1 → docu_devs_api_client-1.7.1}/docudevs/models/billing_balance_response.py +0 -0
- {docu_devs_api_client-1.6.1 → docu_devs_api_client-1.7.1}/docudevs/models/billing_checkout_request.py +0 -0
- {docu_devs_api_client-1.6.1 → docu_devs_api_client-1.7.1}/docudevs/models/billing_checkout_response.py +0 -0
- {docu_devs_api_client-1.6.1 → docu_devs_api_client-1.7.1}/docudevs/models/billing_price.py +0 -0
- {docu_devs_api_client-1.6.1 → docu_devs_api_client-1.7.1}/docudevs/models/case.py +0 -0
- {docu_devs_api_client-1.6.1 → docu_devs_api_client-1.7.1}/docudevs/models/case_document.py +0 -0
- {docu_devs_api_client-1.6.1 → docu_devs_api_client-1.7.1}/docudevs/models/case_document_metadata_type_1.py +0 -0
- {docu_devs_api_client-1.6.1 → docu_devs_api_client-1.7.1}/docudevs/models/cases_controller_create_case_request.py +0 -0
- {docu_devs_api_client-1.6.1 → docu_devs_api_client-1.7.1}/docudevs/models/cases_controller_update_case_request.py +0 -0
- {docu_devs_api_client-1.6.1 → docu_devs_api_client-1.7.1}/docudevs/models/chat_message.py +0 -0
- {docu_devs_api_client-1.6.1 → docu_devs_api_client-1.7.1}/docudevs/models/create_batch_body.py +0 -0
- {docu_devs_api_client-1.6.1 → docu_devs_api_client-1.7.1}/docudevs/models/create_checkout_session_body.py +0 -0
- {docu_devs_api_client-1.6.1 → docu_devs_api_client-1.7.1}/docudevs/models/create_llm_provider_request.py +0 -0
- {docu_devs_api_client-1.6.1 → docu_devs_api_client-1.7.1}/docudevs/models/create_llm_provider_request_kwargs_type_1.py +0 -0
- {docu_devs_api_client-1.6.1 → docu_devs_api_client-1.7.1}/docudevs/models/create_ocr_provider_request.py +0 -0
- {docu_devs_api_client-1.6.1 → docu_devs_api_client-1.7.1}/docudevs/models/create_ocr_provider_request_features_type_1.py +0 -0
- {docu_devs_api_client-1.6.1 → docu_devs_api_client-1.7.1}/docudevs/models/dependency_info.py +0 -0
- {docu_devs_api_client-1.6.1 → docu_devs_api_client-1.7.1}/docudevs/models/document_status.py +0 -0
- {docu_devs_api_client-1.6.1 → docu_devs_api_client-1.7.1}/docudevs/models/document_template.py +0 -0
- {docu_devs_api_client-1.6.1 → docu_devs_api_client-1.7.1}/docudevs/models/generate_schema_body.py +0 -0
- {docu_devs_api_client-1.6.1 → docu_devs_api_client-1.7.1}/docudevs/models/generative_task_request.py +0 -0
- {docu_devs_api_client-1.6.1 → docu_devs_api_client-1.7.1}/docudevs/models/knowledge_bases_controller_promote_knowledge_base_request.py +0 -0
- {docu_devs_api_client-1.6.1 → docu_devs_api_client-1.7.1}/docudevs/models/llm_key_binding_dto.py +0 -0
- {docu_devs_api_client-1.6.1 → docu_devs_api_client-1.7.1}/docudevs/models/llm_provider_dto.py +0 -0
- {docu_devs_api_client-1.6.1 → docu_devs_api_client-1.7.1}/docudevs/models/llm_type.py +0 -0
- {docu_devs_api_client-1.6.1 → docu_devs_api_client-1.7.1}/docudevs/models/map_reduce_header_command.py +0 -0
- {docu_devs_api_client-1.6.1 → docu_devs_api_client-1.7.1}/docudevs/models/map_reduce_runtime_status.py +0 -0
- {docu_devs_api_client-1.6.1 → docu_devs_api_client-1.7.1}/docudevs/models/named_configuration.py +0 -0
- {docu_devs_api_client-1.6.1 → docu_devs_api_client-1.7.1}/docudevs/models/ocr_command.py +0 -0
- {docu_devs_api_client-1.6.1 → docu_devs_api_client-1.7.1}/docudevs/models/ocr_document_sync_body.py +0 -0
- {docu_devs_api_client-1.6.1 → docu_devs_api_client-1.7.1}/docudevs/models/ocr_key_binding_dto.py +0 -0
- {docu_devs_api_client-1.6.1 → docu_devs_api_client-1.7.1}/docudevs/models/ocr_provider_dto.py +0 -0
- {docu_devs_api_client-1.6.1 → docu_devs_api_client-1.7.1}/docudevs/models/ocr_type.py +0 -0
- {docu_devs_api_client-1.6.1 → docu_devs_api_client-1.7.1}/docudevs/models/operation_info.py +0 -0
- {docu_devs_api_client-1.6.1 → docu_devs_api_client-1.7.1}/docudevs/models/operation_parameters.py +0 -0
- {docu_devs_api_client-1.6.1 → docu_devs_api_client-1.7.1}/docudevs/models/operation_parameters_custom_parameters_type_1.py +0 -0
- {docu_devs_api_client-1.6.1 → docu_devs_api_client-1.7.1}/docudevs/models/operation_result_response.py +0 -0
- {docu_devs_api_client-1.6.1 → docu_devs_api_client-1.7.1}/docudevs/models/operation_status_response.py +0 -0
- {docu_devs_api_client-1.6.1 → docu_devs_api_client-1.7.1}/docudevs/models/organization.py +0 -0
- {docu_devs_api_client-1.6.1 → docu_devs_api_client-1.7.1}/docudevs/models/page_case_document.py +0 -0
- {docu_devs_api_client-1.6.1 → docu_devs_api_client-1.7.1}/docudevs/models/page_processing_job.py +0 -0
- {docu_devs_api_client-1.6.1 → docu_devs_api_client-1.7.1}/docudevs/models/pageable.py +0 -0
- {docu_devs_api_client-1.6.1 → docu_devs_api_client-1.7.1}/docudevs/models/pageable_mode.py +0 -0
- {docu_devs_api_client-1.6.1 → docu_devs_api_client-1.7.1}/docudevs/models/pdf_field.py +0 -0
- {docu_devs_api_client-1.6.1 → docu_devs_api_client-1.7.1}/docudevs/models/processing_job.py +0 -0
- {docu_devs_api_client-1.6.1 → docu_devs_api_client-1.7.1}/docudevs/models/processing_job_batch_metadata_type_1.py +0 -0
- {docu_devs_api_client-1.6.1 → docu_devs_api_client-1.7.1}/docudevs/models/purge_result.py +0 -0
- {docu_devs_api_client-1.6.1 → docu_devs_api_client-1.7.1}/docudevs/models/resolve_llm_request.py +0 -0
- {docu_devs_api_client-1.6.1 → docu_devs_api_client-1.7.1}/docudevs/models/resolve_ocr_request.py +0 -0
- {docu_devs_api_client-1.6.1 → docu_devs_api_client-1.7.1}/docudevs/models/resolved_llm_provider_dto.py +0 -0
- {docu_devs_api_client-1.6.1 → docu_devs_api_client-1.7.1}/docudevs/models/resolved_ocr_provider_dto.py +0 -0
- {docu_devs_api_client-1.6.1 → docu_devs_api_client-1.7.1}/docudevs/models/schedule_batch_body.py +0 -0
- {docu_devs_api_client-1.6.1 → docu_devs_api_client-1.7.1}/docudevs/models/settings.py +0 -0
- {docu_devs_api_client-1.6.1 → docu_devs_api_client-1.7.1}/docudevs/models/slice_case_document.py +0 -0
- {docu_devs_api_client-1.6.1 → docu_devs_api_client-1.7.1}/docudevs/models/slice_processing_job.py +0 -0
- {docu_devs_api_client-1.6.1 → docu_devs_api_client-1.7.1}/docudevs/models/sort.py +0 -0
- {docu_devs_api_client-1.6.1 → docu_devs_api_client-1.7.1}/docudevs/models/sort_order.py +0 -0
- {docu_devs_api_client-1.6.1 → docu_devs_api_client-1.7.1}/docudevs/models/sort_order_direction.py +0 -0
- {docu_devs_api_client-1.6.1 → docu_devs_api_client-1.7.1}/docudevs/models/submit_operation_request.py +0 -0
- {docu_devs_api_client-1.6.1 → docu_devs_api_client-1.7.1}/docudevs/models/submit_operation_response.py +0 -0
- {docu_devs_api_client-1.6.1 → docu_devs_api_client-1.7.1}/docudevs/models/template_fill_request.py +0 -0
- {docu_devs_api_client-1.6.1 → docu_devs_api_client-1.7.1}/docudevs/models/tool_descriptor.py +0 -0
- {docu_devs_api_client-1.6.1 → docu_devs_api_client-1.7.1}/docudevs/models/tool_descriptor_config_type_1.py +0 -0
- {docu_devs_api_client-1.6.1 → docu_devs_api_client-1.7.1}/docudevs/models/tool_type.py +0 -0
- {docu_devs_api_client-1.6.1 → docu_devs_api_client-1.7.1}/docudevs/models/update_key_binding_request_dto.py +0 -0
- {docu_devs_api_client-1.6.1 → docu_devs_api_client-1.7.1}/docudevs/models/update_llm_provider_request.py +0 -0
- {docu_devs_api_client-1.6.1 → docu_devs_api_client-1.7.1}/docudevs/models/update_llm_provider_request_kwargs_type_1.py +0 -0
- {docu_devs_api_client-1.6.1 → docu_devs_api_client-1.7.1}/docudevs/models/update_ocr_key_binding_request_dto.py +0 -0
- {docu_devs_api_client-1.6.1 → docu_devs_api_client-1.7.1}/docudevs/models/update_ocr_provider_request.py +0 -0
- {docu_devs_api_client-1.6.1 → docu_devs_api_client-1.7.1}/docudevs/models/update_ocr_provider_request_features_type_1.py +0 -0
- {docu_devs_api_client-1.6.1 → docu_devs_api_client-1.7.1}/docudevs/models/upload_batch_document_body.py +0 -0
- {docu_devs_api_client-1.6.1 → docu_devs_api_client-1.7.1}/docudevs/models/upload_case_document_body.py +0 -0
- {docu_devs_api_client-1.6.1 → docu_devs_api_client-1.7.1}/docudevs/models/upload_case_document_legacy_body.py +0 -0
- {docu_devs_api_client-1.6.1 → docu_devs_api_client-1.7.1}/docudevs/models/upload_document_body.py +0 -0
- {docu_devs_api_client-1.6.1 → docu_devs_api_client-1.7.1}/docudevs/models/upload_files_body.py +0 -0
- {docu_devs_api_client-1.6.1 → docu_devs_api_client-1.7.1}/docudevs/models/upload_files_sync_body.py +0 -0
- {docu_devs_api_client-1.6.1 → docu_devs_api_client-1.7.1}/docudevs/models/upload_response.py +0 -0
- {docu_devs_api_client-1.6.1 → docu_devs_api_client-1.7.1}/docudevs/models/upload_template_body.py +0 -0
- {docu_devs_api_client-1.6.1 → docu_devs_api_client-1.7.1}/docudevs/models/upload_template_images_body.py +0 -0
- {docu_devs_api_client-1.6.1 → docu_devs_api_client-1.7.1}/docudevs/models/user_info.py +0 -0
- {docu_devs_api_client-1.6.1 → docu_devs_api_client-1.7.1}/docudevs/py.typed +0 -0
- {docu_devs_api_client-1.6.1 → docu_devs_api_client-1.7.1}/docudevs/types.py +0 -0
|
@@ -294,6 +294,18 @@ async def process(
|
|
|
294
294
|
@click.option("--pages-per-chunk", type=int, default=1, show_default=True, help="Pages per chunk for map-reduce")
|
|
295
295
|
@click.option("--overlap", type=int, default=0, show_default=True, help="Overlapping pages between chunks")
|
|
296
296
|
@click.option("--dedup-key", help="JSON path to deduplicate rows across chunks")
|
|
297
|
+
@click.option(
|
|
298
|
+
"--split-type",
|
|
299
|
+
type=click.Choice(["page", "markdown-header"]),
|
|
300
|
+
default="page",
|
|
301
|
+
show_default=True,
|
|
302
|
+
help="Chunk split strategy",
|
|
303
|
+
)
|
|
304
|
+
@click.option(
|
|
305
|
+
"--split-header-level",
|
|
306
|
+
type=click.IntRange(1, 2),
|
|
307
|
+
help="Markdown header level for --split-type markdown-header",
|
|
308
|
+
)
|
|
297
309
|
@click.option("--header-page-limit", type=int, help="Number of pages reserved for header extraction")
|
|
298
310
|
@click.option("--header-include-in-rows", is_flag=True, default=False, help="Include header pages in row processing")
|
|
299
311
|
@click.option("--header-row-prompt-augmentation", help="Additional context added to each chunk prompt")
|
|
@@ -329,6 +341,8 @@ async def process_map_reduce(
|
|
|
329
341
|
pages_per_chunk: int,
|
|
330
342
|
overlap: int,
|
|
331
343
|
dedup_key: Optional[str],
|
|
344
|
+
split_type: str,
|
|
345
|
+
split_header_level: Optional[int],
|
|
332
346
|
header_page_limit: Optional[int],
|
|
333
347
|
header_include_in_rows: bool,
|
|
334
348
|
header_row_prompt_augmentation: Optional[str],
|
|
@@ -386,6 +400,7 @@ async def process_map_reduce(
|
|
|
386
400
|
header_options["row_prompt_augmentation"] = header_row_prompt_augmentation
|
|
387
401
|
if header_page_indices:
|
|
388
402
|
header_options["page_indices"] = list(header_page_indices)
|
|
403
|
+
normalized_split_type = split_type.replace("-", "_")
|
|
389
404
|
|
|
390
405
|
client: DocuDevsClient = ctx.obj["client"]
|
|
391
406
|
try:
|
|
@@ -402,6 +417,8 @@ async def process_map_reduce(
|
|
|
402
417
|
pages_per_chunk=pages_per_chunk,
|
|
403
418
|
overlap_pages=overlap,
|
|
404
419
|
dedup_key=dedup_key,
|
|
420
|
+
split_type=normalized_split_type,
|
|
421
|
+
split_header_level=split_header_level,
|
|
405
422
|
header_options=header_options or None,
|
|
406
423
|
header_schema=header_schema_text,
|
|
407
424
|
header_prompt=header_prompt,
|
|
@@ -1186,5 +1203,144 @@ async def bind_ocr_key(ctx, key, provider_id):
|
|
|
1186
1203
|
click.echo(resp.status_code)
|
|
1187
1204
|
|
|
1188
1205
|
|
|
1206
|
+
# ---------------- Batch Processing ----------------
|
|
1207
|
+
@cli.group()
|
|
1208
|
+
@click.pass_context
|
|
1209
|
+
def batch(ctx):
|
|
1210
|
+
"""Batch processing for multiple documents."""
|
|
1211
|
+
pass
|
|
1212
|
+
|
|
1213
|
+
|
|
1214
|
+
@batch.command("process")
|
|
1215
|
+
@click.argument("files", nargs=-1, required=True, type=click.Path(exists=True))
|
|
1216
|
+
@click.option("--prompt", default="", help="Extraction prompt")
|
|
1217
|
+
@click.option("--prompt-file", type=click.Path(exists=True), help="Path to a text file containing extraction instructions")
|
|
1218
|
+
@click.option("--schema", default="", help="JSON schema for extraction")
|
|
1219
|
+
@click.option("--schema-file", type=click.Path(exists=True), help="Path to a JSON schema file")
|
|
1220
|
+
@click.option("--mime-type", help="Explicit MIME type for all documents")
|
|
1221
|
+
@click.option("--ocr", type=click.Choice(["DEFAULT", "NONE", "PREMIUM", "AUTO", "EXCEL"]), default=None, help="OCR type")
|
|
1222
|
+
@click.option("--llm", type=click.Choice(["DEFAULT", "MINI", "HIGH"]), default=None, help="LLM type")
|
|
1223
|
+
@click.option("--barcodes", is_flag=True, default=False, help="Enable barcode and QR code detection")
|
|
1224
|
+
@click.option("--extraction-mode", type=click.Choice(["OCR", "SIMPLE", "STEPS"]), default=None, help="Extraction mode override")
|
|
1225
|
+
@click.option("--describe-figures", is_flag=True, default=False, help="Request figure descriptions when supported")
|
|
1226
|
+
@click.option("--max-concurrency", type=int, default=None, help="Maximum concurrent document processing")
|
|
1227
|
+
@click.option("--format", "result_format", type=click.Choice(["json", "csv", "excel"]), default=None, help="Output format for results (implies --wait)")
|
|
1228
|
+
@click.option("--output", type=click.Path(), help="Save results to file (auto-generated if --format is set without --output)")
|
|
1229
|
+
@click.option("--configuration", default=None, help="Named configuration for Excel template injection")
|
|
1230
|
+
@click.option("--timeout", default=300, help="Timeout in seconds")
|
|
1231
|
+
@click.option("--wait/--no-wait", default=True, help="Wait for processing to complete")
|
|
1232
|
+
@click.pass_context
|
|
1233
|
+
@async_command
|
|
1234
|
+
async def batch_process(
|
|
1235
|
+
ctx,
|
|
1236
|
+
files: tuple[str, ...],
|
|
1237
|
+
prompt: str,
|
|
1238
|
+
prompt_file: Optional[str],
|
|
1239
|
+
schema: str,
|
|
1240
|
+
schema_file: Optional[str],
|
|
1241
|
+
mime_type: Optional[str],
|
|
1242
|
+
ocr: Optional[str],
|
|
1243
|
+
llm: Optional[str],
|
|
1244
|
+
barcodes: bool,
|
|
1245
|
+
extraction_mode: Optional[str],
|
|
1246
|
+
describe_figures: bool,
|
|
1247
|
+
max_concurrency: Optional[int],
|
|
1248
|
+
result_format: Optional[str],
|
|
1249
|
+
output: Optional[str],
|
|
1250
|
+
configuration: Optional[str],
|
|
1251
|
+
timeout: int,
|
|
1252
|
+
wait: bool,
|
|
1253
|
+
):
|
|
1254
|
+
"""Upload and process multiple documents as a batch."""
|
|
1255
|
+
import mimetypes
|
|
1256
|
+
|
|
1257
|
+
prompt_text = prompt
|
|
1258
|
+
if prompt_file:
|
|
1259
|
+
if prompt:
|
|
1260
|
+
raise click.BadParameter("Use either --prompt or --prompt-file, not both.", param_hint="--prompt-file")
|
|
1261
|
+
prompt_text = Path(prompt_file).read_text()
|
|
1262
|
+
|
|
1263
|
+
schema_text = schema
|
|
1264
|
+
if schema_file:
|
|
1265
|
+
if schema:
|
|
1266
|
+
raise click.BadParameter("Use either --schema or --schema-file, not both.", param_hint="--schema-file")
|
|
1267
|
+
schema_text = Path(schema_file).read_text()
|
|
1268
|
+
|
|
1269
|
+
barcodes_value: Optional[bool] = True if barcodes else None
|
|
1270
|
+
describe_value: Optional[bool] = True if describe_figures else None
|
|
1271
|
+
|
|
1272
|
+
first_file = Path(files[0])
|
|
1273
|
+
effective_mime = mime_type or mimetypes.guess_type(first_file.name)[0] or "application/octet-stream"
|
|
1274
|
+
|
|
1275
|
+
client: DocuDevsClient = ctx.obj["client"]
|
|
1276
|
+
|
|
1277
|
+
try:
|
|
1278
|
+
batch_guid = await client.create_batch(max_concurrency=max_concurrency)
|
|
1279
|
+
click.echo(f"Batch created. GUID: {batch_guid}")
|
|
1280
|
+
|
|
1281
|
+
for file_path_str in files:
|
|
1282
|
+
file_path = Path(file_path_str)
|
|
1283
|
+
doc_mime = mime_type or mimetypes.guess_type(file_path.name)[0] or effective_mime
|
|
1284
|
+
with open(file_path, "rb") as f:
|
|
1285
|
+
document_data = f.read()
|
|
1286
|
+
upload_result = await client.upload_batch_document(
|
|
1287
|
+
batch_guid,
|
|
1288
|
+
document_data,
|
|
1289
|
+
doc_mime,
|
|
1290
|
+
file_name=file_path.name,
|
|
1291
|
+
)
|
|
1292
|
+
click.echo(f" Uploaded {file_path.name} (index {upload_result.get('index', '?')})")
|
|
1293
|
+
|
|
1294
|
+
await client.process_batch(
|
|
1295
|
+
batch_guid,
|
|
1296
|
+
prompt=prompt_text,
|
|
1297
|
+
schema=schema_text,
|
|
1298
|
+
mime_type=effective_mime,
|
|
1299
|
+
ocr=ocr,
|
|
1300
|
+
barcodes=barcodes_value,
|
|
1301
|
+
llm=llm,
|
|
1302
|
+
extraction_mode=extraction_mode,
|
|
1303
|
+
describe_figures=describe_value,
|
|
1304
|
+
)
|
|
1305
|
+
click.echo(f"Batch processing started. GUID: {batch_guid}")
|
|
1306
|
+
|
|
1307
|
+
should_wait = wait or result_format is not None
|
|
1308
|
+
if should_wait:
|
|
1309
|
+
click.echo("Waiting for batch to complete...")
|
|
1310
|
+
|
|
1311
|
+
format_extensions = {"json": ".json", "csv": ".csv", "excel": ".xlsx"}
|
|
1312
|
+
output_path = output
|
|
1313
|
+
if result_format and not output_path:
|
|
1314
|
+
output_path = f"batch-{batch_guid}{format_extensions.get(result_format, '')}"
|
|
1315
|
+
|
|
1316
|
+
excel_save_to = output_path if result_format == "excel" else None
|
|
1317
|
+
|
|
1318
|
+
result = await client.wait_until_ready(
|
|
1319
|
+
batch_guid,
|
|
1320
|
+
timeout=timeout,
|
|
1321
|
+
result_format=result_format,
|
|
1322
|
+
excel_save_to=excel_save_to,
|
|
1323
|
+
excel_configuration=configuration,
|
|
1324
|
+
)
|
|
1325
|
+
|
|
1326
|
+
if output_path and result_format != "excel":
|
|
1327
|
+
if isinstance(result, (bytes, bytearray)):
|
|
1328
|
+
Path(output_path).write_bytes(result)
|
|
1329
|
+
elif isinstance(result, str):
|
|
1330
|
+
Path(output_path).write_text(result)
|
|
1331
|
+
else:
|
|
1332
|
+
Path(output_path).write_text(json.dumps(_as_serializable(result), indent=2))
|
|
1333
|
+
|
|
1334
|
+
if output_path:
|
|
1335
|
+
click.echo(f"Saved to {output_path}")
|
|
1336
|
+
else:
|
|
1337
|
+
_echo_response(result)
|
|
1338
|
+
else:
|
|
1339
|
+
click.echo("Use 'status' and 'result' commands to check progress and get results.")
|
|
1340
|
+
except Exception as e:
|
|
1341
|
+
click.echo(f"Error: {e}", err=True)
|
|
1342
|
+
return 1
|
|
1343
|
+
|
|
1344
|
+
|
|
1189
1345
|
if __name__ == "__main__":
|
|
1190
1346
|
cli()
|
|
@@ -2,6 +2,7 @@
|
|
|
2
2
|
|
|
3
3
|
from .client import AuthenticatedClient, Client
|
|
4
4
|
from .docudevs_client import DocuDevsClient, UploadDocumentBody, UploadCommand, File, UploadFilesBody, TemplateFillRequest
|
|
5
|
+
from .schema import array_schema, json_schema
|
|
5
6
|
|
|
6
7
|
__all__ = (
|
|
7
8
|
"AuthenticatedClient",
|
|
@@ -12,4 +13,6 @@ __all__ = (
|
|
|
12
13
|
"File",
|
|
13
14
|
"UploadFilesBody",
|
|
14
15
|
"TemplateFillRequest",
|
|
16
|
+
"array_schema",
|
|
17
|
+
"json_schema",
|
|
15
18
|
)
|
|
@@ -0,0 +1,175 @@
|
|
|
1
|
+
from http import HTTPStatus
|
|
2
|
+
from typing import Any, Optional, Union
|
|
3
|
+
|
|
4
|
+
import httpx
|
|
5
|
+
|
|
6
|
+
from ... import errors
|
|
7
|
+
from ...client import AuthenticatedClient, Client
|
|
8
|
+
from ...models.ledger_entry_response import LedgerEntryResponse
|
|
9
|
+
from ...types import UNSET, Response
|
|
10
|
+
|
|
11
|
+
|
|
12
|
+
def _get_kwargs(
|
|
13
|
+
*,
|
|
14
|
+
org_id: str,
|
|
15
|
+
limit: int = 50,
|
|
16
|
+
) -> dict[str, Any]:
|
|
17
|
+
params: dict[str, Any] = {}
|
|
18
|
+
|
|
19
|
+
params["orgId"] = org_id
|
|
20
|
+
|
|
21
|
+
params["limit"] = limit
|
|
22
|
+
|
|
23
|
+
params = {k: v for k, v in params.items() if v is not UNSET and v is not None}
|
|
24
|
+
|
|
25
|
+
_kwargs: dict[str, Any] = {
|
|
26
|
+
"method": "get",
|
|
27
|
+
"url": "/billing/usage/ledger",
|
|
28
|
+
"params": params,
|
|
29
|
+
}
|
|
30
|
+
|
|
31
|
+
return _kwargs
|
|
32
|
+
|
|
33
|
+
|
|
34
|
+
def _parse_response(
|
|
35
|
+
*, client: Union[AuthenticatedClient, Client], response: httpx.Response
|
|
36
|
+
) -> Optional[list["LedgerEntryResponse"]]:
|
|
37
|
+
if response.status_code == 200:
|
|
38
|
+
response_200 = []
|
|
39
|
+
_response_200 = response.json()
|
|
40
|
+
for response_200_item_data in _response_200:
|
|
41
|
+
response_200_item = LedgerEntryResponse.from_dict(response_200_item_data)
|
|
42
|
+
|
|
43
|
+
response_200.append(response_200_item)
|
|
44
|
+
|
|
45
|
+
return response_200
|
|
46
|
+
|
|
47
|
+
if client.raise_on_unexpected_status:
|
|
48
|
+
raise errors.UnexpectedStatus(response.status_code, response.content)
|
|
49
|
+
else:
|
|
50
|
+
return None
|
|
51
|
+
|
|
52
|
+
|
|
53
|
+
def _build_response(
|
|
54
|
+
*, client: Union[AuthenticatedClient, Client], response: httpx.Response
|
|
55
|
+
) -> Response[list["LedgerEntryResponse"]]:
|
|
56
|
+
return Response(
|
|
57
|
+
status_code=HTTPStatus(response.status_code),
|
|
58
|
+
content=response.content,
|
|
59
|
+
headers=response.headers,
|
|
60
|
+
parsed=_parse_response(client=client, response=response),
|
|
61
|
+
)
|
|
62
|
+
|
|
63
|
+
|
|
64
|
+
def sync_detailed(
|
|
65
|
+
*,
|
|
66
|
+
client: Union[AuthenticatedClient, Client],
|
|
67
|
+
org_id: str,
|
|
68
|
+
limit: int = 50,
|
|
69
|
+
) -> Response[list["LedgerEntryResponse"]]:
|
|
70
|
+
"""
|
|
71
|
+
Args:
|
|
72
|
+
org_id (str):
|
|
73
|
+
limit (int): Default: 50.
|
|
74
|
+
|
|
75
|
+
Raises:
|
|
76
|
+
errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True.
|
|
77
|
+
httpx.TimeoutException: If the request takes longer than Client.timeout.
|
|
78
|
+
|
|
79
|
+
Returns:
|
|
80
|
+
Response[list['LedgerEntryResponse']]
|
|
81
|
+
"""
|
|
82
|
+
|
|
83
|
+
kwargs = _get_kwargs(
|
|
84
|
+
org_id=org_id,
|
|
85
|
+
limit=limit,
|
|
86
|
+
)
|
|
87
|
+
|
|
88
|
+
response = client.get_httpx_client().request(
|
|
89
|
+
**kwargs,
|
|
90
|
+
)
|
|
91
|
+
|
|
92
|
+
return _build_response(client=client, response=response)
|
|
93
|
+
|
|
94
|
+
|
|
95
|
+
def sync(
|
|
96
|
+
*,
|
|
97
|
+
client: Union[AuthenticatedClient, Client],
|
|
98
|
+
org_id: str,
|
|
99
|
+
limit: int = 50,
|
|
100
|
+
) -> Optional[list["LedgerEntryResponse"]]:
|
|
101
|
+
"""
|
|
102
|
+
Args:
|
|
103
|
+
org_id (str):
|
|
104
|
+
limit (int): Default: 50.
|
|
105
|
+
|
|
106
|
+
Raises:
|
|
107
|
+
errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True.
|
|
108
|
+
httpx.TimeoutException: If the request takes longer than Client.timeout.
|
|
109
|
+
|
|
110
|
+
Returns:
|
|
111
|
+
list['LedgerEntryResponse']
|
|
112
|
+
"""
|
|
113
|
+
|
|
114
|
+
return sync_detailed(
|
|
115
|
+
client=client,
|
|
116
|
+
org_id=org_id,
|
|
117
|
+
limit=limit,
|
|
118
|
+
).parsed
|
|
119
|
+
|
|
120
|
+
|
|
121
|
+
async def asyncio_detailed(
|
|
122
|
+
*,
|
|
123
|
+
client: Union[AuthenticatedClient, Client],
|
|
124
|
+
org_id: str,
|
|
125
|
+
limit: int = 50,
|
|
126
|
+
) -> Response[list["LedgerEntryResponse"]]:
|
|
127
|
+
"""
|
|
128
|
+
Args:
|
|
129
|
+
org_id (str):
|
|
130
|
+
limit (int): Default: 50.
|
|
131
|
+
|
|
132
|
+
Raises:
|
|
133
|
+
errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True.
|
|
134
|
+
httpx.TimeoutException: If the request takes longer than Client.timeout.
|
|
135
|
+
|
|
136
|
+
Returns:
|
|
137
|
+
Response[list['LedgerEntryResponse']]
|
|
138
|
+
"""
|
|
139
|
+
|
|
140
|
+
kwargs = _get_kwargs(
|
|
141
|
+
org_id=org_id,
|
|
142
|
+
limit=limit,
|
|
143
|
+
)
|
|
144
|
+
|
|
145
|
+
response = await client.get_async_httpx_client().request(**kwargs)
|
|
146
|
+
|
|
147
|
+
return _build_response(client=client, response=response)
|
|
148
|
+
|
|
149
|
+
|
|
150
|
+
async def asyncio(
|
|
151
|
+
*,
|
|
152
|
+
client: Union[AuthenticatedClient, Client],
|
|
153
|
+
org_id: str,
|
|
154
|
+
limit: int = 50,
|
|
155
|
+
) -> Optional[list["LedgerEntryResponse"]]:
|
|
156
|
+
"""
|
|
157
|
+
Args:
|
|
158
|
+
org_id (str):
|
|
159
|
+
limit (int): Default: 50.
|
|
160
|
+
|
|
161
|
+
Raises:
|
|
162
|
+
errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True.
|
|
163
|
+
httpx.TimeoutException: If the request takes longer than Client.timeout.
|
|
164
|
+
|
|
165
|
+
Returns:
|
|
166
|
+
list['LedgerEntryResponse']
|
|
167
|
+
"""
|
|
168
|
+
|
|
169
|
+
return (
|
|
170
|
+
await asyncio_detailed(
|
|
171
|
+
client=client,
|
|
172
|
+
org_id=org_id,
|
|
173
|
+
limit=limit,
|
|
174
|
+
)
|
|
175
|
+
).parsed
|
|
@@ -0,0 +1,109 @@
|
|
|
1
|
+
from http import HTTPStatus
|
|
2
|
+
from typing import Any, Optional, Union
|
|
3
|
+
|
|
4
|
+
import httpx
|
|
5
|
+
|
|
6
|
+
from ... import errors
|
|
7
|
+
from ...client import AuthenticatedClient, Client
|
|
8
|
+
from ...types import UNSET, Response
|
|
9
|
+
|
|
10
|
+
|
|
11
|
+
def _get_kwargs(
|
|
12
|
+
*,
|
|
13
|
+
org_id: str,
|
|
14
|
+
guids: str,
|
|
15
|
+
) -> dict[str, Any]:
|
|
16
|
+
params: dict[str, Any] = {}
|
|
17
|
+
|
|
18
|
+
params["orgId"] = org_id
|
|
19
|
+
|
|
20
|
+
params["guids"] = guids
|
|
21
|
+
|
|
22
|
+
params = {k: v for k, v in params.items() if v is not UNSET and v is not None}
|
|
23
|
+
|
|
24
|
+
_kwargs: dict[str, Any] = {
|
|
25
|
+
"method": "get",
|
|
26
|
+
"url": "/billing/usage/by-jobs",
|
|
27
|
+
"params": params,
|
|
28
|
+
}
|
|
29
|
+
|
|
30
|
+
return _kwargs
|
|
31
|
+
|
|
32
|
+
|
|
33
|
+
def _parse_response(*, client: Union[AuthenticatedClient, Client], response: httpx.Response) -> Optional[Any]:
|
|
34
|
+
if response.status_code == 200:
|
|
35
|
+
return None
|
|
36
|
+
|
|
37
|
+
if client.raise_on_unexpected_status:
|
|
38
|
+
raise errors.UnexpectedStatus(response.status_code, response.content)
|
|
39
|
+
else:
|
|
40
|
+
return None
|
|
41
|
+
|
|
42
|
+
|
|
43
|
+
def _build_response(*, client: Union[AuthenticatedClient, Client], response: httpx.Response) -> Response[Any]:
|
|
44
|
+
return Response(
|
|
45
|
+
status_code=HTTPStatus(response.status_code),
|
|
46
|
+
content=response.content,
|
|
47
|
+
headers=response.headers,
|
|
48
|
+
parsed=_parse_response(client=client, response=response),
|
|
49
|
+
)
|
|
50
|
+
|
|
51
|
+
|
|
52
|
+
def sync_detailed(
|
|
53
|
+
*,
|
|
54
|
+
client: Union[AuthenticatedClient, Client],
|
|
55
|
+
org_id: str,
|
|
56
|
+
guids: str,
|
|
57
|
+
) -> Response[Any]:
|
|
58
|
+
"""
|
|
59
|
+
Args:
|
|
60
|
+
org_id (str):
|
|
61
|
+
guids (str):
|
|
62
|
+
|
|
63
|
+
Raises:
|
|
64
|
+
errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True.
|
|
65
|
+
httpx.TimeoutException: If the request takes longer than Client.timeout.
|
|
66
|
+
|
|
67
|
+
Returns:
|
|
68
|
+
Response[Any]
|
|
69
|
+
"""
|
|
70
|
+
|
|
71
|
+
kwargs = _get_kwargs(
|
|
72
|
+
org_id=org_id,
|
|
73
|
+
guids=guids,
|
|
74
|
+
)
|
|
75
|
+
|
|
76
|
+
response = client.get_httpx_client().request(
|
|
77
|
+
**kwargs,
|
|
78
|
+
)
|
|
79
|
+
|
|
80
|
+
return _build_response(client=client, response=response)
|
|
81
|
+
|
|
82
|
+
|
|
83
|
+
async def asyncio_detailed(
|
|
84
|
+
*,
|
|
85
|
+
client: Union[AuthenticatedClient, Client],
|
|
86
|
+
org_id: str,
|
|
87
|
+
guids: str,
|
|
88
|
+
) -> Response[Any]:
|
|
89
|
+
"""
|
|
90
|
+
Args:
|
|
91
|
+
org_id (str):
|
|
92
|
+
guids (str):
|
|
93
|
+
|
|
94
|
+
Raises:
|
|
95
|
+
errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True.
|
|
96
|
+
httpx.TimeoutException: If the request takes longer than Client.timeout.
|
|
97
|
+
|
|
98
|
+
Returns:
|
|
99
|
+
Response[Any]
|
|
100
|
+
"""
|
|
101
|
+
|
|
102
|
+
kwargs = _get_kwargs(
|
|
103
|
+
org_id=org_id,
|
|
104
|
+
guids=guids,
|
|
105
|
+
)
|
|
106
|
+
|
|
107
|
+
response = await client.get_async_httpx_client().request(**kwargs)
|
|
108
|
+
|
|
109
|
+
return _build_response(client=client, response=response)
|
|
@@ -0,0 +1,155 @@
|
|
|
1
|
+
from http import HTTPStatus
|
|
2
|
+
from typing import Any, Optional, Union
|
|
3
|
+
|
|
4
|
+
import httpx
|
|
5
|
+
|
|
6
|
+
from ... import errors
|
|
7
|
+
from ...client import AuthenticatedClient, Client
|
|
8
|
+
from ...models.usage_summary_response import UsageSummaryResponse
|
|
9
|
+
from ...types import UNSET, Response
|
|
10
|
+
|
|
11
|
+
|
|
12
|
+
def _get_kwargs(
|
|
13
|
+
*,
|
|
14
|
+
org_id: str,
|
|
15
|
+
) -> dict[str, Any]:
|
|
16
|
+
params: dict[str, Any] = {}
|
|
17
|
+
|
|
18
|
+
params["orgId"] = org_id
|
|
19
|
+
|
|
20
|
+
params = {k: v for k, v in params.items() if v is not UNSET and v is not None}
|
|
21
|
+
|
|
22
|
+
_kwargs: dict[str, Any] = {
|
|
23
|
+
"method": "get",
|
|
24
|
+
"url": "/billing/usage/summary",
|
|
25
|
+
"params": params,
|
|
26
|
+
}
|
|
27
|
+
|
|
28
|
+
return _kwargs
|
|
29
|
+
|
|
30
|
+
|
|
31
|
+
def _parse_response(
|
|
32
|
+
*, client: Union[AuthenticatedClient, Client], response: httpx.Response
|
|
33
|
+
) -> Optional[UsageSummaryResponse]:
|
|
34
|
+
if response.status_code == 200:
|
|
35
|
+
response_200 = UsageSummaryResponse.from_dict(response.json())
|
|
36
|
+
|
|
37
|
+
return response_200
|
|
38
|
+
|
|
39
|
+
if client.raise_on_unexpected_status:
|
|
40
|
+
raise errors.UnexpectedStatus(response.status_code, response.content)
|
|
41
|
+
else:
|
|
42
|
+
return None
|
|
43
|
+
|
|
44
|
+
|
|
45
|
+
def _build_response(
|
|
46
|
+
*, client: Union[AuthenticatedClient, Client], response: httpx.Response
|
|
47
|
+
) -> Response[UsageSummaryResponse]:
|
|
48
|
+
return Response(
|
|
49
|
+
status_code=HTTPStatus(response.status_code),
|
|
50
|
+
content=response.content,
|
|
51
|
+
headers=response.headers,
|
|
52
|
+
parsed=_parse_response(client=client, response=response),
|
|
53
|
+
)
|
|
54
|
+
|
|
55
|
+
|
|
56
|
+
def sync_detailed(
|
|
57
|
+
*,
|
|
58
|
+
client: Union[AuthenticatedClient, Client],
|
|
59
|
+
org_id: str,
|
|
60
|
+
) -> Response[UsageSummaryResponse]:
|
|
61
|
+
"""
|
|
62
|
+
Args:
|
|
63
|
+
org_id (str):
|
|
64
|
+
|
|
65
|
+
Raises:
|
|
66
|
+
errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True.
|
|
67
|
+
httpx.TimeoutException: If the request takes longer than Client.timeout.
|
|
68
|
+
|
|
69
|
+
Returns:
|
|
70
|
+
Response[UsageSummaryResponse]
|
|
71
|
+
"""
|
|
72
|
+
|
|
73
|
+
kwargs = _get_kwargs(
|
|
74
|
+
org_id=org_id,
|
|
75
|
+
)
|
|
76
|
+
|
|
77
|
+
response = client.get_httpx_client().request(
|
|
78
|
+
**kwargs,
|
|
79
|
+
)
|
|
80
|
+
|
|
81
|
+
return _build_response(client=client, response=response)
|
|
82
|
+
|
|
83
|
+
|
|
84
|
+
def sync(
|
|
85
|
+
*,
|
|
86
|
+
client: Union[AuthenticatedClient, Client],
|
|
87
|
+
org_id: str,
|
|
88
|
+
) -> Optional[UsageSummaryResponse]:
|
|
89
|
+
"""
|
|
90
|
+
Args:
|
|
91
|
+
org_id (str):
|
|
92
|
+
|
|
93
|
+
Raises:
|
|
94
|
+
errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True.
|
|
95
|
+
httpx.TimeoutException: If the request takes longer than Client.timeout.
|
|
96
|
+
|
|
97
|
+
Returns:
|
|
98
|
+
UsageSummaryResponse
|
|
99
|
+
"""
|
|
100
|
+
|
|
101
|
+
return sync_detailed(
|
|
102
|
+
client=client,
|
|
103
|
+
org_id=org_id,
|
|
104
|
+
).parsed
|
|
105
|
+
|
|
106
|
+
|
|
107
|
+
async def asyncio_detailed(
|
|
108
|
+
*,
|
|
109
|
+
client: Union[AuthenticatedClient, Client],
|
|
110
|
+
org_id: str,
|
|
111
|
+
) -> Response[UsageSummaryResponse]:
|
|
112
|
+
"""
|
|
113
|
+
Args:
|
|
114
|
+
org_id (str):
|
|
115
|
+
|
|
116
|
+
Raises:
|
|
117
|
+
errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True.
|
|
118
|
+
httpx.TimeoutException: If the request takes longer than Client.timeout.
|
|
119
|
+
|
|
120
|
+
Returns:
|
|
121
|
+
Response[UsageSummaryResponse]
|
|
122
|
+
"""
|
|
123
|
+
|
|
124
|
+
kwargs = _get_kwargs(
|
|
125
|
+
org_id=org_id,
|
|
126
|
+
)
|
|
127
|
+
|
|
128
|
+
response = await client.get_async_httpx_client().request(**kwargs)
|
|
129
|
+
|
|
130
|
+
return _build_response(client=client, response=response)
|
|
131
|
+
|
|
132
|
+
|
|
133
|
+
async def asyncio(
|
|
134
|
+
*,
|
|
135
|
+
client: Union[AuthenticatedClient, Client],
|
|
136
|
+
org_id: str,
|
|
137
|
+
) -> Optional[UsageSummaryResponse]:
|
|
138
|
+
"""
|
|
139
|
+
Args:
|
|
140
|
+
org_id (str):
|
|
141
|
+
|
|
142
|
+
Raises:
|
|
143
|
+
errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True.
|
|
144
|
+
httpx.TimeoutException: If the request takes longer than Client.timeout.
|
|
145
|
+
|
|
146
|
+
Returns:
|
|
147
|
+
UsageSummaryResponse
|
|
148
|
+
"""
|
|
149
|
+
|
|
150
|
+
return (
|
|
151
|
+
await asyncio_detailed(
|
|
152
|
+
client=client,
|
|
153
|
+
org_id=org_id,
|
|
154
|
+
)
|
|
155
|
+
).parsed
|