jaxl-python 0.0.16__tar.gz → 0.0.19__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.
- {jaxl_python-0.0.16 → jaxl_python-0.0.19}/PKG-INFO +1 -1
- {jaxl_python-0.0.16 → jaxl_python-0.0.19}/examples/streaming_aiagent.py +1 -1
- {jaxl_python-0.0.16 → jaxl_python-0.0.19}/examples/streaming_speech_segments.py +1 -1
- {jaxl_python-0.0.16 → jaxl_python-0.0.19}/examples/streaming_transcriptions.py +1 -1
- {jaxl_python-0.0.16 → jaxl_python-0.0.19}/jaxl/api/base.py +21 -1
- {jaxl_python-0.0.16 → jaxl_python-0.0.19}/jaxl/api/client/_scm_version.py +2 -2
- jaxl_python-0.0.19/jaxl/api/client/api/v1/v1_calls_hangup_retrieve.py +118 -0
- jaxl_python-0.0.19/jaxl/api/client/api/v1/v1_calls_tags_create.py +194 -0
- {jaxl_python-0.0.16 → jaxl_python-0.0.19}/jaxl/api/client/models/__init__.py +2 -0
- jaxl_python-0.0.19/jaxl/api/client/models/call_tag_request.py +66 -0
- {jaxl_python-0.0.16 → jaxl_python-0.0.19}/jaxl/api/resources/apps.py +43 -2
- {jaxl_python-0.0.16 → jaxl_python-0.0.19}/jaxl/api/resources/calls.py +55 -7
- {jaxl_python-0.0.16 → jaxl_python-0.0.19}/jaxl/api/resources/ivrs.py +1 -1
- {jaxl_python-0.0.16 → jaxl_python-0.0.19}/jaxl_python.egg-info/PKG-INFO +1 -1
- {jaxl_python-0.0.16 → jaxl_python-0.0.19}/jaxl_python.egg-info/SOURCES.txt +3 -0
- {jaxl_python-0.0.16 → jaxl_python-0.0.19}/.github/workflows/sdk.yml +0 -0
- {jaxl_python-0.0.16 → jaxl_python-0.0.19}/.gitignore +0 -0
- {jaxl_python-0.0.16 → jaxl_python-0.0.19}/.isort.cfg +0 -0
- {jaxl_python-0.0.16 → jaxl_python-0.0.19}/.pylintrc +0 -0
- {jaxl_python-0.0.16 → jaxl_python-0.0.19}/.vscode/settings.json +0 -0
- {jaxl_python-0.0.16 → jaxl_python-0.0.19}/LICENSE.md +0 -0
- {jaxl_python-0.0.16 → jaxl_python-0.0.19}/README.md +0 -0
- {jaxl_python-0.0.16 → jaxl_python-0.0.19}/SPECIFICATION.md +0 -0
- {jaxl_python-0.0.16 → jaxl_python-0.0.19}/docs.sh +0 -0
- {jaxl_python-0.0.16 → jaxl_python-0.0.19}/examples/README.md +0 -0
- {jaxl_python-0.0.16 → jaxl_python-0.0.19}/examples/__init__.py +0 -0
- {jaxl_python-0.0.16 → jaxl_python-0.0.19}/examples/prompts/example.txt +0 -0
- {jaxl_python-0.0.16 → jaxl_python-0.0.19}/examples/py.typed +0 -0
- {jaxl_python-0.0.16 → jaxl_python-0.0.19}/examples/request_and_confirm_code_then_send_to_phone.py +0 -0
- {jaxl_python-0.0.16 → jaxl_python-0.0.19}/examples/request_code_and_send_to_phone.py +0 -0
- {jaxl_python-0.0.16 → jaxl_python-0.0.19}/examples/send_to_phone.py +0 -0
- {jaxl_python-0.0.16 → jaxl_python-0.0.19}/examples/streaming_audio_chunks.py +0 -0
- {jaxl_python-0.0.16 → jaxl_python-0.0.19}/index.md +0 -0
- {jaxl_python-0.0.16 → jaxl_python-0.0.19}/jaxl/api/__init__.py +0 -0
- {jaxl_python-0.0.16 → jaxl_python-0.0.19}/jaxl/api/_client.py +0 -0
- {jaxl_python-0.0.16 → jaxl_python-0.0.19}/jaxl/api/_sdk.py +0 -0
- {jaxl_python-0.0.16 → jaxl_python-0.0.19}/jaxl/api/cli.py +0 -0
- {jaxl_python-0.0.16 → jaxl_python-0.0.19}/jaxl/api/client/__init__.py +0 -0
- {jaxl_python-0.0.16 → jaxl_python-0.0.19}/jaxl/api/client/api/__init__.py +0 -0
- {jaxl_python-0.0.16 → jaxl_python-0.0.19}/jaxl/api/client/api/v1/__init__.py +0 -0
- {jaxl_python-0.0.16 → jaxl_python-0.0.19}/jaxl/api/client/api/v1/v1_app_organizations_list.py +0 -0
- {jaxl_python-0.0.16 → jaxl_python-0.0.19}/jaxl/api/client/api/v1/v1_app_organizations_providers_list.py +0 -0
- {jaxl_python-0.0.16 → jaxl_python-0.0.19}/jaxl/api/client/api/v1/v1_appusers_me_retrieve.py +0 -0
- {jaxl_python-0.0.16 → jaxl_python-0.0.19}/jaxl/api/client/api/v1/v1_calls_add_create.py +0 -0
- {jaxl_python-0.0.16 → jaxl_python-0.0.19}/jaxl/api/client/api/v1/v1_calls_list.py +0 -0
- {jaxl_python-0.0.16 → jaxl_python-0.0.19}/jaxl/api/client/api/v1/v1_calls_retrieve.py +0 -0
- {jaxl_python-0.0.16 → jaxl_python-0.0.19}/jaxl/api/client/api/v1/v1_calls_token_create.py +0 -0
- {jaxl_python-0.0.16 → jaxl_python-0.0.19}/jaxl/api/client/api/v1/v1_calls_tts_create.py +0 -0
- {jaxl_python-0.0.16 → jaxl_python-0.0.19}/jaxl/api/client/api/v1/v1_calls_usage_retrieve.py +0 -0
- {jaxl_python-0.0.16 → jaxl_python-0.0.19}/jaxl/api/client/api/v1/v1_campaign_list.py +0 -0
- {jaxl_python-0.0.16 → jaxl_python-0.0.19}/jaxl/api/client/api/v1/v1_customer_consumables_retrieve.py +0 -0
- {jaxl_python-0.0.16 → jaxl_python-0.0.19}/jaxl/api/client/api/v1/v1_devices_attest_create.py +0 -0
- {jaxl_python-0.0.16 → jaxl_python-0.0.19}/jaxl/api/client/api/v1/v1_devices_list.py +0 -0
- {jaxl_python-0.0.16 → jaxl_python-0.0.19}/jaxl/api/client/api/v1/v1_integrations_create.py +0 -0
- {jaxl_python-0.0.16 → jaxl_python-0.0.19}/jaxl/api/client/api/v1/v1_ivr_create.py +0 -0
- {jaxl_python-0.0.16 → jaxl_python-0.0.19}/jaxl/api/client/api/v1/v1_ivr_list.py +0 -0
- {jaxl_python-0.0.16 → jaxl_python-0.0.19}/jaxl/api/client/api/v1/v1_ivr_options_create.py +0 -0
- {jaxl_python-0.0.16 → jaxl_python-0.0.19}/jaxl/api/client/api/v1/v1_ivr_options_list.py +0 -0
- {jaxl_python-0.0.16 → jaxl_python-0.0.19}/jaxl/api/client/api/v1/v1_ivr_options_partial_update.py +0 -0
- {jaxl_python-0.0.16 → jaxl_python-0.0.19}/jaxl/api/client/api/v1/v1_kyc_list.py +0 -0
- {jaxl_python-0.0.16 → jaxl_python-0.0.19}/jaxl/api/client/api/v1/v1_messages_list.py +0 -0
- {jaxl_python-0.0.16 → jaxl_python-0.0.19}/jaxl/api/client/api/v1/v1_phonenumbers_list.py +0 -0
- {jaxl_python-0.0.16 → jaxl_python-0.0.19}/jaxl/api/client/api/v1/v1_phonenumbers_partial_update.py +0 -0
- {jaxl_python-0.0.16 → jaxl_python-0.0.19}/jaxl/api/client/api/v1/v1_phonenumbers_search_retrieve.py +0 -0
- {jaxl_python-0.0.16 → jaxl_python-0.0.19}/jaxl/api/client/api/v2/__init__.py +0 -0
- {jaxl_python-0.0.16 → jaxl_python-0.0.19}/jaxl/api/client/api/v2/v2_app_organizations_employees_list.py +0 -0
- {jaxl_python-0.0.16 → jaxl_python-0.0.19}/jaxl/api/client/api/v2/v2_app_organizations_groups_list.py +0 -0
- {jaxl_python-0.0.16 → jaxl_python-0.0.19}/jaxl/api/client/api/v3/__init__.py +0 -0
- {jaxl_python-0.0.16 → jaxl_python-0.0.19}/jaxl/api/client/api/v3/v3_orders_subscriptions_list.py +0 -0
- {jaxl_python-0.0.16 → jaxl_python-0.0.19}/jaxl/api/client/client.py +0 -0
- {jaxl_python-0.0.16 → jaxl_python-0.0.19}/jaxl/api/client/errors.py +0 -0
- {jaxl_python-0.0.16 → jaxl_python-0.0.19}/jaxl/api/client/models/address_provider.py +0 -0
- {jaxl_python-0.0.16 → jaxl_python-0.0.19}/jaxl/api/client/models/address_provider_status_enum.py +0 -0
- {jaxl_python-0.0.16 → jaxl_python-0.0.19}/jaxl/api/client/models/analytic.py +0 -0
- {jaxl_python-0.0.16 → jaxl_python-0.0.19}/jaxl/api/client/models/app_price.py +0 -0
- {jaxl_python-0.0.16 → jaxl_python-0.0.19}/jaxl/api/client/models/app_user.py +0 -0
- {jaxl_python-0.0.16 → jaxl_python-0.0.19}/jaxl/api/client/models/available_phone_number.py +0 -0
- {jaxl_python-0.0.16 → jaxl_python-0.0.19}/jaxl/api/client/models/available_phone_number_capabilities.py +0 -0
- {jaxl_python-0.0.16 → jaxl_python-0.0.19}/jaxl/api/client/models/available_phone_number_provider_enum.py +0 -0
- {jaxl_python-0.0.16 → jaxl_python-0.0.19}/jaxl/api/client/models/call.py +0 -0
- {jaxl_python-0.0.16 → jaxl_python-0.0.19}/jaxl/api/client/models/call_add_request_request.py +0 -0
- {jaxl_python-0.0.16 → jaxl_python-0.0.19}/jaxl/api/client/models/call_cost.py +0 -0
- {jaxl_python-0.0.16 → jaxl_python-0.0.19}/jaxl/api/client/models/call_location_epoch.py +0 -0
- {jaxl_python-0.0.16 → jaxl_python-0.0.19}/jaxl/api/client/models/call_metadata.py +0 -0
- {jaxl_python-0.0.16 → jaxl_python-0.0.19}/jaxl/api/client/models/call_tag_response.py +0 -0
- {jaxl_python-0.0.16 → jaxl_python-0.0.19}/jaxl/api/client/models/call_token_request.py +0 -0
- {jaxl_python-0.0.16 → jaxl_python-0.0.19}/jaxl/api/client/models/call_token_response.py +0 -0
- {jaxl_python-0.0.16 → jaxl_python-0.0.19}/jaxl/api/client/models/call_tts_request_request.py +0 -0
- {jaxl_python-0.0.16 → jaxl_python-0.0.19}/jaxl/api/client/models/call_type_enum.py +0 -0
- {jaxl_python-0.0.16 → jaxl_python-0.0.19}/jaxl/api/client/models/call_usage_by_currency_response.py +0 -0
- {jaxl_python-0.0.16 → jaxl_python-0.0.19}/jaxl/api/client/models/call_usage_response.py +0 -0
- {jaxl_python-0.0.16 → jaxl_python-0.0.19}/jaxl/api/client/models/call_usage_stats_response.py +0 -0
- {jaxl_python-0.0.16 → jaxl_python-0.0.19}/jaxl/api/client/models/campaign_metadata.py +0 -0
- {jaxl_python-0.0.16 → jaxl_python-0.0.19}/jaxl/api/client/models/campaign_metadata_metadata.py +0 -0
- {jaxl_python-0.0.16 → jaxl_python-0.0.19}/jaxl/api/client/models/campaign_response.py +0 -0
- {jaxl_python-0.0.16 → jaxl_python-0.0.19}/jaxl/api/client/models/campaign_response_status_enum.py +0 -0
- {jaxl_python-0.0.16 → jaxl_python-0.0.19}/jaxl/api/client/models/campaign_stats.py +0 -0
- {jaxl_python-0.0.16 → jaxl_python-0.0.19}/jaxl/api/client/models/campaign_tag.py +0 -0
- {jaxl_python-0.0.16 → jaxl_python-0.0.19}/jaxl/api/client/models/can_user_resubscribe_plan.py +0 -0
- {jaxl_python-0.0.16 → jaxl_python-0.0.19}/jaxl/api/client/models/canceled_by_enum.py +0 -0
- {jaxl_python-0.0.16 → jaxl_python-0.0.19}/jaxl/api/client/models/capabilities.py +0 -0
- {jaxl_python-0.0.16 → jaxl_python-0.0.19}/jaxl/api/client/models/connection.py +0 -0
- {jaxl_python-0.0.16 → jaxl_python-0.0.19}/jaxl/api/client/models/country.py +0 -0
- {jaxl_python-0.0.16 → jaxl_python-0.0.19}/jaxl/api/client/models/cta.py +0 -0
- {jaxl_python-0.0.16 → jaxl_python-0.0.19}/jaxl/api/client/models/cta_request.py +0 -0
- {jaxl_python-0.0.16 → jaxl_python-0.0.19}/jaxl/api/client/models/currency_enum.py +0 -0
- {jaxl_python-0.0.16 → jaxl_python-0.0.19}/jaxl/api/client/models/customer_consumable_total.py +0 -0
- {jaxl_python-0.0.16 → jaxl_python-0.0.19}/jaxl/api/client/models/customer_order_subscriptions_serializer_v2.py +0 -0
- {jaxl_python-0.0.16 → jaxl_python-0.0.19}/jaxl/api/client/models/customer_order_subscriptions_serializer_v2_status_enum.py +0 -0
- {jaxl_python-0.0.16 → jaxl_python-0.0.19}/jaxl/api/client/models/customer_provider_serializer_v2.py +0 -0
- {jaxl_python-0.0.16 → jaxl_python-0.0.19}/jaxl/api/client/models/device.py +0 -0
- {jaxl_python-0.0.16 → jaxl_python-0.0.19}/jaxl/api/client/models/device_attestation_error.py +0 -0
- {jaxl_python-0.0.16 → jaxl_python-0.0.19}/jaxl/api/client/models/device_attestation_error_reason_enum.py +0 -0
- {jaxl_python-0.0.16 → jaxl_python-0.0.19}/jaxl/api/client/models/device_attestation_response.py +0 -0
- {jaxl_python-0.0.16 → jaxl_python-0.0.19}/jaxl/api/client/models/dh_message.py +0 -0
- {jaxl_python-0.0.16 → jaxl_python-0.0.19}/jaxl/api/client/models/dh_message_attachment.py +0 -0
- {jaxl_python-0.0.16 → jaxl_python-0.0.19}/jaxl/api/client/models/dh_message_reaction.py +0 -0
- {jaxl_python-0.0.16 → jaxl_python-0.0.19}/jaxl/api/client/models/dh_message_type_enum.py +0 -0
- {jaxl_python-0.0.16 → jaxl_python-0.0.19}/jaxl/api/client/models/direction_enum.py +0 -0
- {jaxl_python-0.0.16 → jaxl_python-0.0.19}/jaxl/api/client/models/emoji.py +0 -0
- {jaxl_python-0.0.16 → jaxl_python-0.0.19}/jaxl/api/client/models/emoji_reaction.py +0 -0
- {jaxl_python-0.0.16 → jaxl_python-0.0.19}/jaxl/api/client/models/exotel_auth_request_request.py +0 -0
- {jaxl_python-0.0.16 → jaxl_python-0.0.19}/jaxl/api/client/models/id_enum.py +0 -0
- {jaxl_python-0.0.16 → jaxl_python-0.0.19}/jaxl/api/client/models/integrations_error_response.py +0 -0
- {jaxl_python-0.0.16 → jaxl_python-0.0.19}/jaxl/api/client/models/integrations_properties_request.py +0 -0
- {jaxl_python-0.0.16 → jaxl_python-0.0.19}/jaxl/api/client/models/integrations_request_provider_enum.py +0 -0
- {jaxl_python-0.0.16 → jaxl_python-0.0.19}/jaxl/api/client/models/integrations_request_request.py +0 -0
- {jaxl_python-0.0.16 → jaxl_python-0.0.19}/jaxl/api/client/models/integrations_response.py +0 -0
- {jaxl_python-0.0.16 → jaxl_python-0.0.19}/jaxl/api/client/models/intent_enum.py +0 -0
- {jaxl_python-0.0.16 → jaxl_python-0.0.19}/jaxl/api/client/models/invalid_provider_request.py +0 -0
- {jaxl_python-0.0.16 → jaxl_python-0.0.19}/jaxl/api/client/models/iso_country_enum.py +0 -0
- {jaxl_python-0.0.16 → jaxl_python-0.0.19}/jaxl/api/client/models/item.py +0 -0
- {jaxl_python-0.0.16 → jaxl_python-0.0.19}/jaxl/api/client/models/ivr_collection.py +0 -0
- {jaxl_python-0.0.16 → jaxl_python-0.0.19}/jaxl/api/client/models/ivr_collection_request.py +0 -0
- {jaxl_python-0.0.16 → jaxl_python-0.0.19}/jaxl/api/client/models/ivr_menu_request.py +0 -0
- {jaxl_python-0.0.16 → jaxl_python-0.0.19}/jaxl/api/client/models/ivr_menu_response.py +0 -0
- {jaxl_python-0.0.16 → jaxl_python-0.0.19}/jaxl/api/client/models/ivr_menu_response_status_enum.py +0 -0
- {jaxl_python-0.0.16 → jaxl_python-0.0.19}/jaxl/api/client/models/ivr_options_invalid_response.py +0 -0
- {jaxl_python-0.0.16 → jaxl_python-0.0.19}/jaxl/api/client/models/ivr_options_request.py +0 -0
- {jaxl_python-0.0.16 → jaxl_python-0.0.19}/jaxl/api/client/models/ivr_options_response.py +0 -0
- {jaxl_python-0.0.16 → jaxl_python-0.0.19}/jaxl/api/client/models/kyc.py +0 -0
- {jaxl_python-0.0.16 → jaxl_python-0.0.19}/jaxl/api/client/models/kyc_status_enum.py +0 -0
- {jaxl_python-0.0.16 → jaxl_python-0.0.19}/jaxl/api/client/models/kyc_upload_metadata.py +0 -0
- {jaxl_python-0.0.16 → jaxl_python-0.0.19}/jaxl/api/client/models/location.py +0 -0
- {jaxl_python-0.0.16 → jaxl_python-0.0.19}/jaxl/api/client/models/next_or_cta_request.py +0 -0
- {jaxl_python-0.0.16 → jaxl_python-0.0.19}/jaxl/api/client/models/order_status_enum.py +0 -0
- {jaxl_python-0.0.16 → jaxl_python-0.0.19}/jaxl/api/client/models/organization.py +0 -0
- {jaxl_python-0.0.16 → jaxl_python-0.0.19}/jaxl/api/client/models/organization_employee.py +0 -0
- {jaxl_python-0.0.16 → jaxl_python-0.0.19}/jaxl/api/client/models/organization_employee_preferences.py +0 -0
- {jaxl_python-0.0.16 → jaxl_python-0.0.19}/jaxl/api/client/models/organization_employee_status_enum.py +0 -0
- {jaxl_python-0.0.16 → jaxl_python-0.0.19}/jaxl/api/client/models/organization_group_inline.py +0 -0
- {jaxl_python-0.0.16 → jaxl_python-0.0.19}/jaxl/api/client/models/organization_group_response.py +0 -0
- {jaxl_python-0.0.16 → jaxl_python-0.0.19}/jaxl/api/client/models/organization_preferences.py +0 -0
- {jaxl_python-0.0.16 → jaxl_python-0.0.19}/jaxl/api/client/models/organization_provider.py +0 -0
- {jaxl_python-0.0.16 → jaxl_python-0.0.19}/jaxl/api/client/models/paginated_call_list.py +0 -0
- {jaxl_python-0.0.16 → jaxl_python-0.0.19}/jaxl/api/client/models/paginated_campaign_response_list.py +0 -0
- {jaxl_python-0.0.16 → jaxl_python-0.0.19}/jaxl/api/client/models/paginated_customer_order_subscriptions_serializer_v2_list.py +0 -0
- {jaxl_python-0.0.16 → jaxl_python-0.0.19}/jaxl/api/client/models/paginated_device_list.py +0 -0
- {jaxl_python-0.0.16 → jaxl_python-0.0.19}/jaxl/api/client/models/paginated_dh_message_list.py +0 -0
- {jaxl_python-0.0.16 → jaxl_python-0.0.19}/jaxl/api/client/models/paginated_ivr_menu_response_list.py +0 -0
- {jaxl_python-0.0.16 → jaxl_python-0.0.19}/jaxl/api/client/models/paginated_ivr_options_response_list.py +0 -0
- {jaxl_python-0.0.16 → jaxl_python-0.0.19}/jaxl/api/client/models/paginated_kyc_list.py +0 -0
- {jaxl_python-0.0.16 → jaxl_python-0.0.19}/jaxl/api/client/models/paginated_organization_employee_list.py +0 -0
- {jaxl_python-0.0.16 → jaxl_python-0.0.19}/jaxl/api/client/models/paginated_organization_group_response_list.py +0 -0
- {jaxl_python-0.0.16 → jaxl_python-0.0.19}/jaxl/api/client/models/paginated_organization_list.py +0 -0
- {jaxl_python-0.0.16 → jaxl_python-0.0.19}/jaxl/api/client/models/paginated_organization_provider_list.py +0 -0
- {jaxl_python-0.0.16 → jaxl_python-0.0.19}/jaxl/api/client/models/paginated_phone_number_list.py +0 -0
- {jaxl_python-0.0.16 → jaxl_python-0.0.19}/jaxl/api/client/models/patched_ivr_options_update_request.py +0 -0
- {jaxl_python-0.0.16 → jaxl_python-0.0.19}/jaxl/api/client/models/patched_phone_number_request.py +0 -0
- {jaxl_python-0.0.16 → jaxl_python-0.0.19}/jaxl/api/client/models/payment_gateway_fees_info.py +0 -0
- {jaxl_python-0.0.16 → jaxl_python-0.0.19}/jaxl/api/client/models/period_enum.py +0 -0
- {jaxl_python-0.0.16 → jaxl_python-0.0.19}/jaxl/api/client/models/phone_number.py +0 -0
- {jaxl_python-0.0.16 → jaxl_python-0.0.19}/jaxl/api/client/models/phone_number_attributes.py +0 -0
- {jaxl_python-0.0.16 → jaxl_python-0.0.19}/jaxl/api/client/models/phone_number_capabilities.py +0 -0
- {jaxl_python-0.0.16 → jaxl_python-0.0.19}/jaxl/api/client/models/phone_number_provider_enum.py +0 -0
- {jaxl_python-0.0.16 → jaxl_python-0.0.19}/jaxl/api/client/models/phone_number_search_response.py +0 -0
- {jaxl_python-0.0.16 → jaxl_python-0.0.19}/jaxl/api/client/models/phone_number_status_enum.py +0 -0
- {jaxl_python-0.0.16 → jaxl_python-0.0.19}/jaxl/api/client/models/plan.py +0 -0
- {jaxl_python-0.0.16 → jaxl_python-0.0.19}/jaxl/api/client/models/plan_cancel_info.py +0 -0
- {jaxl_python-0.0.16 → jaxl_python-0.0.19}/jaxl/api/client/models/plan_expiry_timestamp.py +0 -0
- {jaxl_python-0.0.16 → jaxl_python-0.0.19}/jaxl/api/client/models/plan_expiry_timestamp_type_enum.py +0 -0
- {jaxl_python-0.0.16 → jaxl_python-0.0.19}/jaxl/api/client/models/plan_extra_details.py +0 -0
- {jaxl_python-0.0.16 → jaxl_python-0.0.19}/jaxl/api/client/models/plan_item.py +0 -0
- {jaxl_python-0.0.16 → jaxl_python-0.0.19}/jaxl/api/client/models/plan_type.py +0 -0
- {jaxl_python-0.0.16 → jaxl_python-0.0.19}/jaxl/api/client/models/plan_type_cycle.py +0 -0
- {jaxl_python-0.0.16 → jaxl_python-0.0.19}/jaxl/api/client/models/platform_enum.py +0 -0
- {jaxl_python-0.0.16 → jaxl_python-0.0.19}/jaxl/api/client/models/product_group.py +0 -0
- {jaxl_python-0.0.16 → jaxl_python-0.0.19}/jaxl/api/client/models/proof.py +0 -0
- {jaxl_python-0.0.16 → jaxl_python-0.0.19}/jaxl/api/client/models/proof_status_enum.py +0 -0
- {jaxl_python-0.0.16 → jaxl_python-0.0.19}/jaxl/api/client/models/provider_status_enum.py +0 -0
- {jaxl_python-0.0.16 → jaxl_python-0.0.19}/jaxl/api/client/models/reaction_by.py +0 -0
- {jaxl_python-0.0.16 → jaxl_python-0.0.19}/jaxl/api/client/models/rental_currency_enum.py +0 -0
- {jaxl_python-0.0.16 → jaxl_python-0.0.19}/jaxl/api/client/models/resource_enum.py +0 -0
- {jaxl_python-0.0.16 → jaxl_python-0.0.19}/jaxl/api/client/models/shopify_auth_request_request.py +0 -0
- {jaxl_python-0.0.16 → jaxl_python-0.0.19}/jaxl/api/client/models/user_agent.py +0 -0
- {jaxl_python-0.0.16 → jaxl_python-0.0.19}/jaxl/api/client/models/user_agent_browser.py +0 -0
- {jaxl_python-0.0.16 → jaxl_python-0.0.19}/jaxl/api/client/models/user_agent_device.py +0 -0
- {jaxl_python-0.0.16 → jaxl_python-0.0.19}/jaxl/api/client/models/user_agent_operating_system.py +0 -0
- {jaxl_python-0.0.16 → jaxl_python-0.0.19}/jaxl/api/client/models/user_agent_platform.py +0 -0
- {jaxl_python-0.0.16 → jaxl_python-0.0.19}/jaxl/api/client/models/user_identity.py +0 -0
- {jaxl_python-0.0.16 → jaxl_python-0.0.19}/jaxl/api/client/models/v1_app_organizations_list_status_item.py +0 -0
- {jaxl_python-0.0.16 → jaxl_python-0.0.19}/jaxl/api/client/models/v1_calls_list_direction.py +0 -0
- {jaxl_python-0.0.16 → jaxl_python-0.0.19}/jaxl/api/client/models/v1_campaign_list_status_item.py +0 -0
- {jaxl_python-0.0.16 → jaxl_python-0.0.19}/jaxl/api/client/models/v1_customer_consumables_retrieve_currency.py +0 -0
- {jaxl_python-0.0.16 → jaxl_python-0.0.19}/jaxl/api/client/models/v1_ivr_list_duration.py +0 -0
- {jaxl_python-0.0.16 → jaxl_python-0.0.19}/jaxl/api/client/models/v1_kyc_list_iso_country.py +0 -0
- {jaxl_python-0.0.16 → jaxl_python-0.0.19}/jaxl/api/client/models/v1_kyc_list_provider_status_item.py +0 -0
- {jaxl_python-0.0.16 → jaxl_python-0.0.19}/jaxl/api/client/models/v1_kyc_list_resource.py +0 -0
- {jaxl_python-0.0.16 → jaxl_python-0.0.19}/jaxl/api/client/models/v1_kyc_list_status.py +0 -0
- {jaxl_python-0.0.16 → jaxl_python-0.0.19}/jaxl/api/client/models/v1_phonenumbers_list_additional_status_item.py +0 -0
- {jaxl_python-0.0.16 → jaxl_python-0.0.19}/jaxl/api/client/models/v1_phonenumbers_list_provider.py +0 -0
- {jaxl_python-0.0.16 → jaxl_python-0.0.19}/jaxl/api/client/models/v1_phonenumbers_list_status.py +0 -0
- {jaxl_python-0.0.16 → jaxl_python-0.0.19}/jaxl/api/client/models/v1_phonenumbers_search_retrieve_intent.py +0 -0
- {jaxl_python-0.0.16 → jaxl_python-0.0.19}/jaxl/api/client/models/v1_phonenumbers_search_retrieve_iso_country_code.py +0 -0
- {jaxl_python-0.0.16 → jaxl_python-0.0.19}/jaxl/api/client/models/v1_phonenumbers_search_retrieve_resource.py +0 -0
- {jaxl_python-0.0.16 → jaxl_python-0.0.19}/jaxl/api/client/models/v2_app_organizations_employees_list_status_item.py +0 -0
- {jaxl_python-0.0.16 → jaxl_python-0.0.19}/jaxl/api/client/models/v3_orders_subscriptions_list_currency.py +0 -0
- {jaxl_python-0.0.16 → jaxl_python-0.0.19}/jaxl/api/client/models/v3_orders_subscriptions_list_status_item.py +0 -0
- {jaxl_python-0.0.16 → jaxl_python-0.0.19}/jaxl/api/client/types.py +0 -0
- {jaxl_python-0.0.16 → jaxl_python-0.0.19}/jaxl/api/py.typed +0 -0
- {jaxl_python-0.0.16 → jaxl_python-0.0.19}/jaxl/api/resources/__init__.py +0 -0
- {jaxl_python-0.0.16 → jaxl_python-0.0.19}/jaxl/api/resources/_constants.py +0 -0
- {jaxl_python-0.0.16 → jaxl_python-0.0.19}/jaxl/api/resources/accounts.py +0 -0
- {jaxl_python-0.0.16 → jaxl_python-0.0.19}/jaxl/api/resources/campaigns.py +0 -0
- {jaxl_python-0.0.16 → jaxl_python-0.0.19}/jaxl/api/resources/devices.py +0 -0
- {jaxl_python-0.0.16 → jaxl_python-0.0.19}/jaxl/api/resources/kycs.py +0 -0
- {jaxl_python-0.0.16 → jaxl_python-0.0.19}/jaxl/api/resources/members.py +0 -0
- {jaxl_python-0.0.16 → jaxl_python-0.0.19}/jaxl/api/resources/messages.py +0 -0
- {jaxl_python-0.0.16 → jaxl_python-0.0.19}/jaxl/api/resources/notifications.py +0 -0
- {jaxl_python-0.0.16 → jaxl_python-0.0.19}/jaxl/api/resources/orgs.py +0 -0
- {jaxl_python-0.0.16 → jaxl_python-0.0.19}/jaxl/api/resources/payments.py +0 -0
- {jaxl_python-0.0.16 → jaxl_python-0.0.19}/jaxl/api/resources/phones.py +0 -0
- {jaxl_python-0.0.16 → jaxl_python-0.0.19}/jaxl/api/resources/silence.py +0 -0
- {jaxl_python-0.0.16 → jaxl_python-0.0.19}/jaxl/api/resources/teams.py +0 -0
- {jaxl_python-0.0.16 → jaxl_python-0.0.19}/jaxl_python.egg-info/dependency_links.txt +0 -0
- {jaxl_python-0.0.16 → jaxl_python-0.0.19}/jaxl_python.egg-info/entry_points.txt +0 -0
- {jaxl_python-0.0.16 → jaxl_python-0.0.19}/jaxl_python.egg-info/not-zip-safe +0 -0
- {jaxl_python-0.0.16 → jaxl_python-0.0.19}/jaxl_python.egg-info/requires.txt +0 -0
- {jaxl_python-0.0.16 → jaxl_python-0.0.19}/jaxl_python.egg-info/top_level.txt +0 -0
- {jaxl_python-0.0.16 → jaxl_python-0.0.19}/mkdocs.yml +0 -0
- {jaxl_python-0.0.16 → jaxl_python-0.0.19}/pyproject.toml +0 -0
- {jaxl_python-0.0.16 → jaxl_python-0.0.19}/setup.cfg +0 -0
- {jaxl_python-0.0.16 → jaxl_python-0.0.19}/setup.gif +0 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: jaxl-python
|
|
3
|
-
Version: 0.0.
|
|
3
|
+
Version: 0.0.19
|
|
4
4
|
Summary: Official Python SDK and CLI for interfacing with the Jaxl API. Manage calls, messages, IVRs, devices, teams, payments, campaigns, streaming transcriptions and AI Agents. Built on OpenAPI, it offers both generated API clients and Pythonic wrappers for ease of use.
|
|
5
5
|
Home-page: https://github.com/jaxl-innovations-private-limited/jaxl-python
|
|
6
6
|
Download-URL: https://github.com/jaxl-innovations-private-limited/jaxl-python/archive/main.zip
|
|
@@ -80,7 +80,7 @@ class JaxlAppStreamingAIAgent(BaseJaxlApp):
|
|
|
80
80
|
del self._states[req.state.call_id]
|
|
81
81
|
return None
|
|
82
82
|
|
|
83
|
-
async def handle_speech_detection(self, speaking: bool) -> None:
|
|
83
|
+
async def handle_speech_detection(self, call_id: int, speaking: bool) -> None:
|
|
84
84
|
print("🎙️" if speaking else "🤐")
|
|
85
85
|
|
|
86
86
|
async def handle_transcription(
|
|
@@ -27,7 +27,7 @@ class JaxlAppStreamingSpeechSegment(BaseJaxlApp):
|
|
|
27
27
|
num_characters=-1,
|
|
28
28
|
)
|
|
29
29
|
|
|
30
|
-
async def handle_speech_detection(self, speaking: bool) -> None:
|
|
30
|
+
async def handle_speech_detection(self, call_id: int, speaking: bool) -> None:
|
|
31
31
|
print("🎙️" if speaking else "🤐")
|
|
32
32
|
|
|
33
33
|
async def handle_speech_segment(
|
|
@@ -27,7 +27,7 @@ class JaxlAppStreamingTranscription(BaseJaxlApp):
|
|
|
27
27
|
num_characters=-1,
|
|
28
28
|
)
|
|
29
29
|
|
|
30
|
-
async def handle_speech_detection(self, speaking: bool) -> None:
|
|
30
|
+
async def handle_speech_detection(self, call_id: int, speaking: bool) -> None:
|
|
31
31
|
print("🎙️" if speaking else "🤐")
|
|
32
32
|
|
|
33
33
|
async def handle_transcription(
|
|
@@ -27,6 +27,7 @@ from fastapi import WebSocket
|
|
|
27
27
|
from fastapi.responses import Response as FastApiResponse
|
|
28
28
|
from pydantic import BaseModel, model_validator
|
|
29
29
|
|
|
30
|
+
from jaxl.api.client.models.call_tag_response import CallTagResponse
|
|
30
31
|
from jaxl.api.client.types import Response
|
|
31
32
|
from jaxl.api.resources.calls import calls_tts
|
|
32
33
|
from jaxl.api.resources.ivrs import IVR_CTA_KEYS
|
|
@@ -173,7 +174,7 @@ class BaseJaxlApp:
|
|
|
173
174
|
"""Invoked when a call ends."""
|
|
174
175
|
return None
|
|
175
176
|
|
|
176
|
-
async def handle_speech_detection(self, speaking: bool) -> None:
|
|
177
|
+
async def handle_speech_detection(self, call_id: int, speaking: bool) -> None:
|
|
177
178
|
"""Invoked when speech starts and ends."""
|
|
178
179
|
return None
|
|
179
180
|
|
|
@@ -261,3 +262,22 @@ class BaseJaxlApp:
|
|
|
261
262
|
**kwargs: Any,
|
|
262
263
|
) -> Response[Any]:
|
|
263
264
|
return calls_tts({"call_id": call_id, "prompt": prompt, "mark": mark})
|
|
265
|
+
|
|
266
|
+
async def send_audio(self, call_id: int, slin16: bytes) -> None:
|
|
267
|
+
"""Send raw audio.
|
|
268
|
+
|
|
269
|
+
Only available with bidirectional streams.
|
|
270
|
+
"""
|
|
271
|
+
|
|
272
|
+
async def clear_audio(self, call_id: int) -> None:
|
|
273
|
+
"""Clear any buffered audio."""
|
|
274
|
+
|
|
275
|
+
async def hangup(self, call_id: int) -> Optional[Response[Any]]:
|
|
276
|
+
"""Hangup call by ID"""
|
|
277
|
+
return None
|
|
278
|
+
|
|
279
|
+
async def add_tag(
|
|
280
|
+
self, call_id: int, tag: str
|
|
281
|
+
) -> Optional[Response[CallTagResponse]]:
|
|
282
|
+
"""Add tag to a call by ID."""
|
|
283
|
+
return None
|
|
@@ -0,0 +1,118 @@
|
|
|
1
|
+
"""
|
|
2
|
+
Copyright (c) 2010-present by Jaxl Innovations Private Limited.
|
|
3
|
+
|
|
4
|
+
All rights reserved.
|
|
5
|
+
|
|
6
|
+
Redistribution and use in source and binary forms,
|
|
7
|
+
with or without modification, is strictly prohibited.
|
|
8
|
+
"""
|
|
9
|
+
|
|
10
|
+
from http import HTTPStatus
|
|
11
|
+
from typing import Any, Dict, Optional
|
|
12
|
+
|
|
13
|
+
import httpx
|
|
14
|
+
|
|
15
|
+
from ... import errors
|
|
16
|
+
from ...client import AuthenticatedClient, Client
|
|
17
|
+
from ...types import Response
|
|
18
|
+
|
|
19
|
+
|
|
20
|
+
def _get_kwargs(
|
|
21
|
+
id: int,
|
|
22
|
+
*,
|
|
23
|
+
client: AuthenticatedClient,
|
|
24
|
+
) -> Dict[str, Any]:
|
|
25
|
+
url = "{}/v1/calls/{id}/hangup/".format(client.base_url, id=id)
|
|
26
|
+
|
|
27
|
+
headers: Dict[str, str] = client.get_headers()
|
|
28
|
+
cookies: Dict[str, Any] = client.get_cookies()
|
|
29
|
+
|
|
30
|
+
return {
|
|
31
|
+
"method": "get",
|
|
32
|
+
"url": url,
|
|
33
|
+
"headers": headers,
|
|
34
|
+
"cookies": cookies,
|
|
35
|
+
"timeout": client.get_timeout(),
|
|
36
|
+
}
|
|
37
|
+
|
|
38
|
+
|
|
39
|
+
def _parse_response(*, client: Client, response: httpx.Response) -> Optional[Any]:
|
|
40
|
+
if response.status_code == HTTPStatus.OK:
|
|
41
|
+
return None
|
|
42
|
+
if response.status_code == HTTPStatus.BAD_REQUEST:
|
|
43
|
+
return None
|
|
44
|
+
if response.status_code == HTTPStatus.NOT_FOUND:
|
|
45
|
+
return None
|
|
46
|
+
if client.raise_on_unexpected_status:
|
|
47
|
+
raise errors.UnexpectedStatus(f"Unexpected status code: {response.status_code}")
|
|
48
|
+
else:
|
|
49
|
+
return None
|
|
50
|
+
|
|
51
|
+
|
|
52
|
+
def _build_response(*, client: Client, response: httpx.Response) -> Response[Any]:
|
|
53
|
+
return Response(
|
|
54
|
+
status_code=HTTPStatus(response.status_code),
|
|
55
|
+
content=response.content,
|
|
56
|
+
headers=response.headers,
|
|
57
|
+
parsed=_parse_response(client=client, response=response),
|
|
58
|
+
)
|
|
59
|
+
|
|
60
|
+
|
|
61
|
+
def sync_detailed(
|
|
62
|
+
id: int,
|
|
63
|
+
*,
|
|
64
|
+
client: AuthenticatedClient,
|
|
65
|
+
) -> Response[Any]:
|
|
66
|
+
"""API view set for Call model.
|
|
67
|
+
|
|
68
|
+
Args:
|
|
69
|
+
id (int):
|
|
70
|
+
|
|
71
|
+
Raises:
|
|
72
|
+
errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True.
|
|
73
|
+
httpx.TimeoutException: If the request takes longer than Client.timeout.
|
|
74
|
+
|
|
75
|
+
Returns:
|
|
76
|
+
Response[Any]
|
|
77
|
+
"""
|
|
78
|
+
|
|
79
|
+
kwargs = _get_kwargs(
|
|
80
|
+
id=id,
|
|
81
|
+
client=client,
|
|
82
|
+
)
|
|
83
|
+
|
|
84
|
+
response = httpx.request(
|
|
85
|
+
verify=client.verify_ssl,
|
|
86
|
+
**kwargs,
|
|
87
|
+
)
|
|
88
|
+
|
|
89
|
+
return _build_response(client=client, response=response)
|
|
90
|
+
|
|
91
|
+
|
|
92
|
+
async def asyncio_detailed(
|
|
93
|
+
id: int,
|
|
94
|
+
*,
|
|
95
|
+
client: AuthenticatedClient,
|
|
96
|
+
) -> Response[Any]:
|
|
97
|
+
"""API view set for Call model.
|
|
98
|
+
|
|
99
|
+
Args:
|
|
100
|
+
id (int):
|
|
101
|
+
|
|
102
|
+
Raises:
|
|
103
|
+
errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True.
|
|
104
|
+
httpx.TimeoutException: If the request takes longer than Client.timeout.
|
|
105
|
+
|
|
106
|
+
Returns:
|
|
107
|
+
Response[Any]
|
|
108
|
+
"""
|
|
109
|
+
|
|
110
|
+
kwargs = _get_kwargs(
|
|
111
|
+
id=id,
|
|
112
|
+
client=client,
|
|
113
|
+
)
|
|
114
|
+
|
|
115
|
+
async with httpx.AsyncClient(verify=client.verify_ssl) as _client:
|
|
116
|
+
response = await _client.request(**kwargs)
|
|
117
|
+
|
|
118
|
+
return _build_response(client=client, response=response)
|
|
@@ -0,0 +1,194 @@
|
|
|
1
|
+
"""
|
|
2
|
+
Copyright (c) 2010-present by Jaxl Innovations Private Limited.
|
|
3
|
+
|
|
4
|
+
All rights reserved.
|
|
5
|
+
|
|
6
|
+
Redistribution and use in source and binary forms,
|
|
7
|
+
with or without modification, is strictly prohibited.
|
|
8
|
+
"""
|
|
9
|
+
|
|
10
|
+
from http import HTTPStatus
|
|
11
|
+
from typing import Any, Dict, Optional, Union, cast
|
|
12
|
+
|
|
13
|
+
import httpx
|
|
14
|
+
|
|
15
|
+
from ... import errors
|
|
16
|
+
from ...client import AuthenticatedClient, Client
|
|
17
|
+
from ...models.call_tag_request import CallTagRequest
|
|
18
|
+
from ...models.call_tag_response import CallTagResponse
|
|
19
|
+
from ...types import Response
|
|
20
|
+
|
|
21
|
+
|
|
22
|
+
def _get_kwargs(
|
|
23
|
+
call_id: str,
|
|
24
|
+
*,
|
|
25
|
+
client: AuthenticatedClient,
|
|
26
|
+
json_body: CallTagRequest,
|
|
27
|
+
) -> Dict[str, Any]:
|
|
28
|
+
url = "{}/v1/calls/{call_id}/tags/".format(client.base_url, call_id=call_id)
|
|
29
|
+
|
|
30
|
+
headers: Dict[str, str] = client.get_headers()
|
|
31
|
+
cookies: Dict[str, Any] = client.get_cookies()
|
|
32
|
+
|
|
33
|
+
json_json_body = json_body.to_dict()
|
|
34
|
+
|
|
35
|
+
return {
|
|
36
|
+
"method": "post",
|
|
37
|
+
"url": url,
|
|
38
|
+
"headers": headers,
|
|
39
|
+
"cookies": cookies,
|
|
40
|
+
"timeout": client.get_timeout(),
|
|
41
|
+
"json": json_json_body,
|
|
42
|
+
}
|
|
43
|
+
|
|
44
|
+
|
|
45
|
+
def _parse_response(
|
|
46
|
+
*, client: Client, response: httpx.Response
|
|
47
|
+
) -> Optional[Union[Any, CallTagResponse]]:
|
|
48
|
+
if response.status_code == HTTPStatus.OK:
|
|
49
|
+
response_200 = CallTagResponse.from_dict(response.json())
|
|
50
|
+
|
|
51
|
+
return response_200
|
|
52
|
+
if response.status_code == HTTPStatus.BAD_REQUEST:
|
|
53
|
+
response_400 = cast(Any, None)
|
|
54
|
+
return response_400
|
|
55
|
+
if response.status_code == HTTPStatus.PRECONDITION_FAILED:
|
|
56
|
+
response_412 = cast(Any, None)
|
|
57
|
+
return response_412
|
|
58
|
+
if client.raise_on_unexpected_status:
|
|
59
|
+
raise errors.UnexpectedStatus(f"Unexpected status code: {response.status_code}")
|
|
60
|
+
else:
|
|
61
|
+
return None
|
|
62
|
+
|
|
63
|
+
|
|
64
|
+
def _build_response(
|
|
65
|
+
*, client: Client, response: httpx.Response
|
|
66
|
+
) -> Response[Union[Any, CallTagResponse]]:
|
|
67
|
+
return Response(
|
|
68
|
+
status_code=HTTPStatus(response.status_code),
|
|
69
|
+
content=response.content,
|
|
70
|
+
headers=response.headers,
|
|
71
|
+
parsed=_parse_response(client=client, response=response),
|
|
72
|
+
)
|
|
73
|
+
|
|
74
|
+
|
|
75
|
+
def sync_detailed(
|
|
76
|
+
call_id: str,
|
|
77
|
+
*,
|
|
78
|
+
client: AuthenticatedClient,
|
|
79
|
+
json_body: CallTagRequest,
|
|
80
|
+
) -> Response[Union[Any, CallTagResponse]]:
|
|
81
|
+
"""Create call tag
|
|
82
|
+
|
|
83
|
+
Args:
|
|
84
|
+
call_id (str):
|
|
85
|
+
json_body (CallTagRequest):
|
|
86
|
+
|
|
87
|
+
Raises:
|
|
88
|
+
errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True.
|
|
89
|
+
httpx.TimeoutException: If the request takes longer than Client.timeout.
|
|
90
|
+
|
|
91
|
+
Returns:
|
|
92
|
+
Response[Union[Any, CallTagResponse]]
|
|
93
|
+
"""
|
|
94
|
+
|
|
95
|
+
kwargs = _get_kwargs(
|
|
96
|
+
call_id=call_id,
|
|
97
|
+
client=client,
|
|
98
|
+
json_body=json_body,
|
|
99
|
+
)
|
|
100
|
+
|
|
101
|
+
response = httpx.request(
|
|
102
|
+
verify=client.verify_ssl,
|
|
103
|
+
**kwargs,
|
|
104
|
+
)
|
|
105
|
+
|
|
106
|
+
return _build_response(client=client, response=response)
|
|
107
|
+
|
|
108
|
+
|
|
109
|
+
def sync(
|
|
110
|
+
call_id: str,
|
|
111
|
+
*,
|
|
112
|
+
client: AuthenticatedClient,
|
|
113
|
+
json_body: CallTagRequest,
|
|
114
|
+
) -> Optional[Union[Any, CallTagResponse]]:
|
|
115
|
+
"""Create call tag
|
|
116
|
+
|
|
117
|
+
Args:
|
|
118
|
+
call_id (str):
|
|
119
|
+
json_body (CallTagRequest):
|
|
120
|
+
|
|
121
|
+
Raises:
|
|
122
|
+
errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True.
|
|
123
|
+
httpx.TimeoutException: If the request takes longer than Client.timeout.
|
|
124
|
+
|
|
125
|
+
Returns:
|
|
126
|
+
Response[Union[Any, CallTagResponse]]
|
|
127
|
+
"""
|
|
128
|
+
|
|
129
|
+
return sync_detailed(
|
|
130
|
+
call_id=call_id,
|
|
131
|
+
client=client,
|
|
132
|
+
json_body=json_body,
|
|
133
|
+
).parsed
|
|
134
|
+
|
|
135
|
+
|
|
136
|
+
async def asyncio_detailed(
|
|
137
|
+
call_id: str,
|
|
138
|
+
*,
|
|
139
|
+
client: AuthenticatedClient,
|
|
140
|
+
json_body: CallTagRequest,
|
|
141
|
+
) -> Response[Union[Any, CallTagResponse]]:
|
|
142
|
+
"""Create call tag
|
|
143
|
+
|
|
144
|
+
Args:
|
|
145
|
+
call_id (str):
|
|
146
|
+
json_body (CallTagRequest):
|
|
147
|
+
|
|
148
|
+
Raises:
|
|
149
|
+
errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True.
|
|
150
|
+
httpx.TimeoutException: If the request takes longer than Client.timeout.
|
|
151
|
+
|
|
152
|
+
Returns:
|
|
153
|
+
Response[Union[Any, CallTagResponse]]
|
|
154
|
+
"""
|
|
155
|
+
|
|
156
|
+
kwargs = _get_kwargs(
|
|
157
|
+
call_id=call_id,
|
|
158
|
+
client=client,
|
|
159
|
+
json_body=json_body,
|
|
160
|
+
)
|
|
161
|
+
|
|
162
|
+
async with httpx.AsyncClient(verify=client.verify_ssl) as _client:
|
|
163
|
+
response = await _client.request(**kwargs)
|
|
164
|
+
|
|
165
|
+
return _build_response(client=client, response=response)
|
|
166
|
+
|
|
167
|
+
|
|
168
|
+
async def asyncio(
|
|
169
|
+
call_id: str,
|
|
170
|
+
*,
|
|
171
|
+
client: AuthenticatedClient,
|
|
172
|
+
json_body: CallTagRequest,
|
|
173
|
+
) -> Optional[Union[Any, CallTagResponse]]:
|
|
174
|
+
"""Create call tag
|
|
175
|
+
|
|
176
|
+
Args:
|
|
177
|
+
call_id (str):
|
|
178
|
+
json_body (CallTagRequest):
|
|
179
|
+
|
|
180
|
+
Raises:
|
|
181
|
+
errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True.
|
|
182
|
+
httpx.TimeoutException: If the request takes longer than Client.timeout.
|
|
183
|
+
|
|
184
|
+
Returns:
|
|
185
|
+
Response[Union[Any, CallTagResponse]]
|
|
186
|
+
"""
|
|
187
|
+
|
|
188
|
+
return (
|
|
189
|
+
await asyncio_detailed(
|
|
190
|
+
call_id=call_id,
|
|
191
|
+
client=client,
|
|
192
|
+
json_body=json_body,
|
|
193
|
+
)
|
|
194
|
+
).parsed
|
|
@@ -22,6 +22,7 @@ from .call_add_request_request import CallAddRequestRequest
|
|
|
22
22
|
from .call_cost import CallCost
|
|
23
23
|
from .call_location_epoch import CallLocationEpoch
|
|
24
24
|
from .call_metadata import CallMetadata
|
|
25
|
+
from .call_tag_request import CallTagRequest
|
|
25
26
|
from .call_tag_response import CallTagResponse
|
|
26
27
|
from .call_token_request import CallTokenRequest
|
|
27
28
|
from .call_token_response import CallTokenResponse
|
|
@@ -191,6 +192,7 @@ __all__ = (
|
|
|
191
192
|
"CallCost",
|
|
192
193
|
"CallLocationEpoch",
|
|
193
194
|
"CallMetadata",
|
|
195
|
+
"CallTagRequest",
|
|
194
196
|
"CallTagResponse",
|
|
195
197
|
"CallTokenRequest",
|
|
196
198
|
"CallTokenResponse",
|
|
@@ -0,0 +1,66 @@
|
|
|
1
|
+
"""
|
|
2
|
+
Copyright (c) 2010-present by Jaxl Innovations Private Limited.
|
|
3
|
+
|
|
4
|
+
All rights reserved.
|
|
5
|
+
|
|
6
|
+
Redistribution and use in source and binary forms,
|
|
7
|
+
with or without modification, is strictly prohibited.
|
|
8
|
+
"""
|
|
9
|
+
|
|
10
|
+
from typing import Any, Dict, List, Type, TypeVar
|
|
11
|
+
|
|
12
|
+
import attr
|
|
13
|
+
|
|
14
|
+
T = TypeVar("T", bound="CallTagRequest")
|
|
15
|
+
|
|
16
|
+
|
|
17
|
+
@attr.s(auto_attribs=True)
|
|
18
|
+
class CallTagRequest:
|
|
19
|
+
"""
|
|
20
|
+
Attributes:
|
|
21
|
+
name (str):
|
|
22
|
+
"""
|
|
23
|
+
|
|
24
|
+
name: str
|
|
25
|
+
additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict)
|
|
26
|
+
|
|
27
|
+
def to_dict(self) -> Dict[str, Any]:
|
|
28
|
+
name = self.name
|
|
29
|
+
|
|
30
|
+
field_dict: Dict[str, Any] = {}
|
|
31
|
+
field_dict.update(self.additional_properties)
|
|
32
|
+
field_dict.update(
|
|
33
|
+
{
|
|
34
|
+
"name": name,
|
|
35
|
+
}
|
|
36
|
+
)
|
|
37
|
+
|
|
38
|
+
return field_dict
|
|
39
|
+
|
|
40
|
+
@classmethod
|
|
41
|
+
def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T:
|
|
42
|
+
d = src_dict.copy()
|
|
43
|
+
name = d.pop("name")
|
|
44
|
+
|
|
45
|
+
call_tag_request = cls(
|
|
46
|
+
name=name,
|
|
47
|
+
)
|
|
48
|
+
|
|
49
|
+
call_tag_request.additional_properties = d
|
|
50
|
+
return call_tag_request
|
|
51
|
+
|
|
52
|
+
@property
|
|
53
|
+
def additional_keys(self) -> List[str]:
|
|
54
|
+
return list(self.additional_properties.keys())
|
|
55
|
+
|
|
56
|
+
def __getitem__(self, key: str) -> Any:
|
|
57
|
+
return self.additional_properties[key]
|
|
58
|
+
|
|
59
|
+
def __setitem__(self, key: str, value: Any) -> None:
|
|
60
|
+
self.additional_properties[key] = value
|
|
61
|
+
|
|
62
|
+
def __delitem__(self, key: str) -> None:
|
|
63
|
+
del self.additional_properties[key]
|
|
64
|
+
|
|
65
|
+
def __contains__(self, key: str) -> bool:
|
|
66
|
+
return key in self.additional_properties
|
|
@@ -34,7 +34,10 @@ from jaxl.api.base import (
|
|
|
34
34
|
JaxlWebhookRequest,
|
|
35
35
|
JaxlWebhookResponse,
|
|
36
36
|
)
|
|
37
|
+
from jaxl.api.client.models.call_tag_response import CallTagResponse
|
|
38
|
+
from jaxl.api.client.types import Response
|
|
37
39
|
from jaxl.api.resources.accounts import accounts_me
|
|
40
|
+
from jaxl.api.resources.calls import calls_hangup, calls_tag_add
|
|
38
41
|
from jaxl.api.resources.silence import SilenceDetector
|
|
39
42
|
|
|
40
43
|
|
|
@@ -129,6 +132,42 @@ def _start_server(
|
|
|
129
132
|
) -> None:
|
|
130
133
|
asyncio.create_task(_ttask_done_callback_async(req, task, tsid))
|
|
131
134
|
|
|
135
|
+
wss: Dict[int, WebSocket] = {}
|
|
136
|
+
|
|
137
|
+
async def _add_tag(call_id: int, tag: str) -> Response[CallTagResponse]:
|
|
138
|
+
return calls_tag_add({"call_id": call_id, "tag": tag})
|
|
139
|
+
|
|
140
|
+
async def _hangup(call_id: int) -> Response[Any]:
|
|
141
|
+
return calls_hangup({"call_id": call_id})
|
|
142
|
+
|
|
143
|
+
async def _clear_audio(call_id: int) -> None:
|
|
144
|
+
try:
|
|
145
|
+
await wss[call_id].send_text(json.dumps({"event": "clear"}))
|
|
146
|
+
# pylint: disable=broad-exception-caught
|
|
147
|
+
except Exception as exc:
|
|
148
|
+
logger.warning(f"⚠️ clear_audio failure: {exc}")
|
|
149
|
+
|
|
150
|
+
async def _send_audio(call_id: int, slin16: bytes) -> None:
|
|
151
|
+
try:
|
|
152
|
+
await wss[call_id].send_text(
|
|
153
|
+
json.dumps(
|
|
154
|
+
{
|
|
155
|
+
"event": "media",
|
|
156
|
+
"media": {
|
|
157
|
+
"payload": base64.b64encode(slin16).decode("ascii"),
|
|
158
|
+
},
|
|
159
|
+
}
|
|
160
|
+
)
|
|
161
|
+
)
|
|
162
|
+
# pylint: disable=broad-exception-caught
|
|
163
|
+
except Exception as exc:
|
|
164
|
+
logger.warning(f"⚠️ send_audio failure: {exc}")
|
|
165
|
+
|
|
166
|
+
app.send_audio = _send_audio # type: ignore[method-assign]
|
|
167
|
+
app.clear_audio = _clear_audio # type: ignore[method-assign]
|
|
168
|
+
app.add_tag = _add_tag # type: ignore[method-assign]
|
|
169
|
+
app.hangup = _hangup # type: ignore[method-assign]
|
|
170
|
+
|
|
132
171
|
@server.api_route(
|
|
133
172
|
"/webhook/",
|
|
134
173
|
methods=["POST", "DELETE"],
|
|
@@ -193,6 +232,7 @@ def _start_server(
|
|
|
193
232
|
slin16s: List[bytes] = []
|
|
194
233
|
|
|
195
234
|
await ws.accept()
|
|
235
|
+
wss[state["call_id"]] = ws
|
|
196
236
|
|
|
197
237
|
# pylint: disable=too-many-nested-blocks
|
|
198
238
|
try:
|
|
@@ -210,7 +250,7 @@ def _start_server(
|
|
|
210
250
|
# Manage speech segments
|
|
211
251
|
if change is True:
|
|
212
252
|
speaking = change
|
|
213
|
-
await app.handle_speech_detection(speaking)
|
|
253
|
+
await app.handle_speech_detection(state["call_id"], speaking)
|
|
214
254
|
if len(slin16s) == 0:
|
|
215
255
|
# Silence just got detected, copy over
|
|
216
256
|
# last speech_frame_threshold of frames
|
|
@@ -220,7 +260,7 @@ def _start_server(
|
|
|
220
260
|
slin16s.append(slin16)
|
|
221
261
|
elif change is False:
|
|
222
262
|
speaking = change
|
|
223
|
-
await app.handle_speech_detection(speaking)
|
|
263
|
+
await app.handle_speech_detection(state["call_id"], speaking)
|
|
224
264
|
# print("🤐")
|
|
225
265
|
if len(slin16s) > 0:
|
|
226
266
|
# Invoke speech segment handlers
|
|
@@ -250,6 +290,7 @@ def _start_server(
|
|
|
250
290
|
except WebSocketDisconnect:
|
|
251
291
|
pass
|
|
252
292
|
finally:
|
|
293
|
+
del wss[state["call_id"]]
|
|
253
294
|
if ws.client_state != WebSocketState.DISCONNECTED:
|
|
254
295
|
await ws.close()
|
|
255
296
|
|
|
@@ -9,13 +9,15 @@ with or without modification, is strictly prohibited.
|
|
|
9
9
|
|
|
10
10
|
import argparse
|
|
11
11
|
import uuid
|
|
12
|
-
from typing import Any, Dict, List, Optional, Tuple, cast
|
|
12
|
+
from typing import Any, Dict, List, Optional, Tuple, Union, cast
|
|
13
13
|
|
|
14
14
|
from jaxl.api._client import JaxlApiModule, jaxl_api_client
|
|
15
15
|
from jaxl.api.client.api.v1 import (
|
|
16
16
|
v1_calls_add_create,
|
|
17
|
+
v1_calls_hangup_retrieve,
|
|
17
18
|
v1_calls_list,
|
|
18
19
|
v1_calls_retrieve,
|
|
20
|
+
v1_calls_tags_create,
|
|
19
21
|
v1_calls_token_create,
|
|
20
22
|
v1_calls_tts_create,
|
|
21
23
|
v1_calls_usage_retrieve,
|
|
@@ -24,6 +26,8 @@ from jaxl.api.client.models.call import Call
|
|
|
24
26
|
from jaxl.api.client.models.call_add_request_request import (
|
|
25
27
|
CallAddRequestRequest,
|
|
26
28
|
)
|
|
29
|
+
from jaxl.api.client.models.call_tag_request import CallTagRequest
|
|
30
|
+
from jaxl.api.client.models.call_tag_response import CallTagResponse
|
|
27
31
|
from jaxl.api.client.models.call_token_request import CallTokenRequest
|
|
28
32
|
from jaxl.api.client.models.call_token_response import CallTokenResponse
|
|
29
33
|
from jaxl.api.client.models.call_tts_request_request import (
|
|
@@ -56,7 +60,7 @@ def calls_usage(args: Dict[str, Any]) -> Response[CallUsageResponse]:
|
|
|
56
60
|
|
|
57
61
|
def ivrs_create_adhoc(
|
|
58
62
|
message: str,
|
|
59
|
-
inputs: Optional[Dict[str, Tuple[str, str, str]]] = None,
|
|
63
|
+
inputs: Optional[Dict[str, Tuple[str, str, Union[List[str], str]]]] = None,
|
|
60
64
|
hangup: bool = False,
|
|
61
65
|
) -> int:
|
|
62
66
|
if (hangup is True and inputs is not None) or (hangup is False and inputs is None):
|
|
@@ -128,7 +132,20 @@ def calls_create(args: Dict[str, Any]) -> Response[CallTokenResponse]:
|
|
|
128
132
|
cta, value = parts[1].split("=", 1)
|
|
129
133
|
if cta not in IVR_CTA_KEYS or input_ not in IVR_INPUTS:
|
|
130
134
|
raise ValueError(f"Invalid CTA key {cta} or input {input_}")
|
|
131
|
-
inputs[input_] = (
|
|
135
|
+
inputs[input_] = (
|
|
136
|
+
name,
|
|
137
|
+
cta,
|
|
138
|
+
(
|
|
139
|
+
value.split(",")
|
|
140
|
+
if cta
|
|
141
|
+
in (
|
|
142
|
+
"devices",
|
|
143
|
+
"appusers",
|
|
144
|
+
"teams",
|
|
145
|
+
)
|
|
146
|
+
else value
|
|
147
|
+
),
|
|
148
|
+
)
|
|
132
149
|
ivr_id = ivrs_create_adhoc(message, inputs)
|
|
133
150
|
if ivr_id is None:
|
|
134
151
|
raise ValueError("Unable to create ad-hoc IVR")
|
|
@@ -213,8 +230,27 @@ def calls_tts(args: Dict[str, Any]) -> Response[Any]:
|
|
|
213
230
|
)
|
|
214
231
|
|
|
215
232
|
|
|
216
|
-
|
|
217
|
-
|
|
233
|
+
def calls_tag_add(args: Dict[str, Any]) -> Response[CallTagResponse]:
|
|
234
|
+
return v1_calls_tags_create.sync_detailed(
|
|
235
|
+
call_id=args["call_id"],
|
|
236
|
+
client=jaxl_api_client(
|
|
237
|
+
JaxlApiModule.CALL,
|
|
238
|
+
credentials=args.get("credentials", None),
|
|
239
|
+
auth_token=args.get("auth_token", None),
|
|
240
|
+
),
|
|
241
|
+
json_body=CallTagRequest(name=args["tag"]),
|
|
242
|
+
)
|
|
243
|
+
|
|
244
|
+
|
|
245
|
+
def calls_hangup(args: Dict[str, Any]) -> Response[Any]:
|
|
246
|
+
return v1_calls_hangup_retrieve.sync_detailed(
|
|
247
|
+
id=args["call_id"],
|
|
248
|
+
client=jaxl_api_client(
|
|
249
|
+
JaxlApiModule.CALL,
|
|
250
|
+
credentials=args.get("credentials", None),
|
|
251
|
+
auth_token=args.get("auth_token", None),
|
|
252
|
+
),
|
|
253
|
+
)
|
|
218
254
|
|
|
219
255
|
|
|
220
256
|
def _subparser(parser: argparse.ArgumentParser) -> None:
|
|
@@ -350,8 +386,14 @@ def _subparser(parser: argparse.ArgumentParser) -> None:
|
|
|
350
386
|
calls_get_parser.set_defaults(func=calls_get, _arg_keys=["call_id"])
|
|
351
387
|
|
|
352
388
|
# hangup
|
|
353
|
-
|
|
354
|
-
|
|
389
|
+
calls_hangup_parser = subparsers.add_parser("hangup", help="Hangup call")
|
|
390
|
+
calls_hangup_parser.add_argument(
|
|
391
|
+
"--call-id",
|
|
392
|
+
type=int,
|
|
393
|
+
required=True,
|
|
394
|
+
help="Call ID",
|
|
395
|
+
)
|
|
396
|
+
calls_hangup_parser.set_defaults(func=calls_hangup, _arg_keys=["call_id"])
|
|
355
397
|
|
|
356
398
|
# transfer
|
|
357
399
|
|
|
@@ -403,3 +445,9 @@ class JaxlCallsSDK:
|
|
|
403
445
|
|
|
404
446
|
def get(self, **kwargs: Any) -> Response[Call]:
|
|
405
447
|
return calls_get(kwargs)
|
|
448
|
+
|
|
449
|
+
def add_tag(self, **kwargs: Any) -> Response[CallTagResponse]:
|
|
450
|
+
return calls_tag_add(kwargs)
|
|
451
|
+
|
|
452
|
+
def hangup(self, **kwargs: Any) -> Response[Any]:
|
|
453
|
+
return calls_hangup(kwargs)
|