jaxl-python 0.0.1__py3-none-any.whl
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/api/__init__.py +85 -0
- jaxl/api/_client.py +588 -0
- jaxl/api/cli.py +53 -0
- jaxl/api/client/__init__.py +18 -0
- jaxl/api/client/_scm_version.py +21 -0
- jaxl/api/client/_scm_version.pyi +7 -0
- jaxl/api/client/api/__init__.py +10 -0
- jaxl/api/client/api/schema/__init__.py +9 -0
- jaxl/api/client/api/schema/schema_retrieve.py +214 -0
- jaxl/api/client/api/v1/__init__.py +9 -0
- jaxl/api/client/api/v1/v1_accounts_logout_create.py +120 -0
- jaxl/api/client/api/v1/v1_accounts_otp_create.py +186 -0
- jaxl/api/client/api/v1/v1_accounts_remove_create.py +122 -0
- jaxl/api/client/api/v1/v1_accounts_verify_create.py +183 -0
- jaxl/api/client/api/v1/v1_analytics_data_retrieve.py +349 -0
- jaxl/api/client/api/v1/v1_analytics_list.py +234 -0
- jaxl/api/client/api/v1/v1_app_countries_list.py +192 -0
- jaxl/api/client/api/v1/v1_app_domains_list.py +207 -0
- jaxl/api/client/api/v1/v1_app_organizations_create.py +178 -0
- jaxl/api/client/api/v1/v1_app_organizations_credentials_retrieve.py +152 -0
- jaxl/api/client/api/v1/v1_app_organizations_devices_list.py +205 -0
- jaxl/api/client/api/v1/v1_app_organizations_list.py +221 -0
- jaxl/api/client/api/v1/v1_app_organizations_me_retrieve.py +178 -0
- jaxl/api/client/api/v1/v1_app_organizations_retrieve.py +171 -0
- jaxl/api/client/api/v1/v1_app_referrals_create.py +175 -0
- jaxl/api/client/api/v1/v1_apps_contact_create.py +124 -0
- jaxl/api/client/api/v1/v1_apps_context_create.py +178 -0
- jaxl/api/client/api/v1/v1_apps_retrieve.py +167 -0
- jaxl/api/client/api/v1/v1_appusers_me_retrieve.py +146 -0
- jaxl/api/client/api/v1/v1_appusers_preferences_create.py +175 -0
- jaxl/api/client/api/v1/v1_appusers_retrieve.py +167 -0
- jaxl/api/client/api/v1/v1_appusers_sdds_create.py +171 -0
- jaxl/api/client/api/v1/v1_call_recording_retrieve.py +188 -0
- jaxl/api/client/api/v1/v1_call_tags_list.py +207 -0
- jaxl/api/client/api/v1/v1_calls_accept_create.py +188 -0
- jaxl/api/client/api/v1/v1_calls_act_create.py +137 -0
- jaxl/api/client/api/v1/v1_calls_dates_retrieve.py +177 -0
- jaxl/api/client/api/v1/v1_calls_destroy.py +114 -0
- jaxl/api/client/api/v1/v1_calls_hangup_retrieve.py +118 -0
- jaxl/api/client/api/v1/v1_calls_list.py +436 -0
- jaxl/api/client/api/v1/v1_calls_record_create.py +129 -0
- jaxl/api/client/api/v1/v1_calls_recording_retrieve.py +177 -0
- jaxl/api/client/api/v1/v1_calls_retrieve.py +186 -0
- jaxl/api/client/api/v1/v1_calls_search_list.py +286 -0
- jaxl/api/client/api/v1/v1_calls_share_create.py +197 -0
- jaxl/api/client/api/v1/v1_calls_tags_create.py +194 -0
- jaxl/api/client/api/v1/v1_calls_tags_destroy.py +127 -0
- jaxl/api/client/api/v1/v1_calls_tags_list.py +188 -0
- jaxl/api/client/api/v1/v1_calls_token_create.py +175 -0
- jaxl/api/client/api/v1/v1_calls_transcribe_create.py +200 -0
- jaxl/api/client/api/v1/v1_calls_transcriptions_list.py +201 -0
- jaxl/api/client/api/v1/v1_calls_usage_retrieve.py +219 -0
- jaxl/api/client/api/v1/v1_campaign_clone_create.py +191 -0
- jaxl/api/client/api/v1/v1_campaign_export_retrieve.py +128 -0
- jaxl/api/client/api/v1/v1_campaign_list.py +217 -0
- jaxl/api/client/api/v1/v1_campaign_partial_update.py +196 -0
- jaxl/api/client/api/v1/v1_campaign_upload_create.py +171 -0
- jaxl/api/client/api/v1/v1_clients_verify_create.py +175 -0
- jaxl/api/client/api/v1/v1_contacts_list.py +188 -0
- jaxl/api/client/api/v1/v1_conversation_ack_retrieve.py +173 -0
- jaxl/api/client/api/v1/v1_conversation_add_members_create.py +209 -0
- jaxl/api/client/api/v1/v1_conversation_create.py +175 -0
- jaxl/api/client/api/v1/v1_conversation_list.py +192 -0
- jaxl/api/client/api/v1/v1_conversation_members_list.py +207 -0
- jaxl/api/client/api/v1/v1_conversation_messages_list.py +222 -0
- jaxl/api/client/api/v1/v1_conversation_remove_member_retrieve.py +192 -0
- jaxl/api/client/api/v1/v1_conversation_update_name_partial_update.py +120 -0
- jaxl/api/client/api/v1/v1_credit_list.py +188 -0
- jaxl/api/client/api/v1/v1_customer_consumables_retrieve.py +194 -0
- jaxl/api/client/api/v1/v1_customer_invoice_retrieve.py +120 -0
- jaxl/api/client/api/v1/v1_customer_subscription_cancel_create.py +177 -0
- jaxl/api/client/api/v1/v1_customer_subscription_resume_create.py +180 -0
- jaxl/api/client/api/v1/v1_device_keys_get_create.py +174 -0
- jaxl/api/client/api/v1/v1_device_keys_multiget_list.py +214 -0
- jaxl/api/client/api/v1/v1_device_keys_multiset_create.py +118 -0
- jaxl/api/client/api/v1/v1_device_keys_remove_create.py +118 -0
- jaxl/api/client/api/v1/v1_device_keys_set_create.py +120 -0
- jaxl/api/client/api/v1/v1_device_keys_wget_create.py +182 -0
- jaxl/api/client/api/v1/v1_device_transport_create.py +175 -0
- jaxl/api/client/api/v1/v1_devices_attest_create.py +231 -0
- jaxl/api/client/api/v1/v1_devices_link_create.py +150 -0
- jaxl/api/client/api/v1/v1_devices_list.py +222 -0
- jaxl/api/client/api/v1/v1_devices_parent_retrieve.py +175 -0
- jaxl/api/client/api/v1/v1_devices_retrieve.py +174 -0
- jaxl/api/client/api/v1/v1_devices_sdds_create.py +177 -0
- jaxl/api/client/api/v1/v1_devices_sdds_retrieve.py +171 -0
- jaxl/api/client/api/v1/v1_devices_token_create.py +188 -0
- jaxl/api/client/api/v1/v1_devices_unlink_create.py +114 -0
- jaxl/api/client/api/v1/v1_devices_update.py +193 -0
- jaxl/api/client/api/v1/v1_families_invite_update.py +175 -0
- jaxl/api/client/api/v1/v1_families_list.py +192 -0
- jaxl/api/client/api/v1/v1_families_membership_create.py +188 -0
- jaxl/api/client/api/v1/v1_families_retrieve.py +167 -0
- jaxl/api/client/api/v1/v1_greeting_audio_create.py +171 -0
- jaxl/api/client/api/v1/v1_greeting_deactivate_partial_update.py +172 -0
- jaxl/api/client/api/v1/v1_greeting_disable_create.py +173 -0
- jaxl/api/client/api/v1/v1_greeting_latest_create.py +176 -0
- jaxl/api/client/api/v1/v1_greeting_list.py +275 -0
- jaxl/api/client/api/v1/v1_greeting_new_create.py +173 -0
- jaxl/api/client/api/v1/v1_greeting_resolve_create.py +174 -0
- jaxl/api/client/api/v1/v1_greeting_retrieve.py +169 -0
- jaxl/api/client/api/v1/v1_greeting_upload_create.py +173 -0
- jaxl/api/client/api/v1/v1_ivr_create.py +175 -0
- jaxl/api/client/api/v1/v1_ivr_list.py +229 -0
- jaxl/api/client/api/v1/v1_ivr_options_create.py +199 -0
- jaxl/api/client/api/v1/v1_ivr_options_list.py +207 -0
- jaxl/api/client/api/v1/v1_ivr_options_partial_update.py +216 -0
- jaxl/api/client/api/v1/v1_ivr_options_retrieve.py +189 -0
- jaxl/api/client/api/v1/v1_ivr_partial_update.py +188 -0
- jaxl/api/client/api/v1/v1_ivr_retrieve.py +209 -0
- jaxl/api/client/api/v1/v1_ivr_try_create.py +236 -0
- jaxl/api/client/api/v1/v1_ivr_try_retrieve.py +219 -0
- jaxl/api/client/api/v1/v1_kyc_aadhar_create.py +199 -0
- jaxl/api/client/api/v1/v1_kyc_address_create.py +239 -0
- jaxl/api/client/api/v1/v1_kyc_address_list.py +302 -0
- jaxl/api/client/api/v1/v1_kyc_address_retrieve.py +167 -0
- jaxl/api/client/api/v1/v1_kyc_address_url_create.py +191 -0
- jaxl/api/client/api/v1/v1_kyc_countries_list.py +188 -0
- jaxl/api/client/api/v1/v1_kyc_create.py +176 -0
- jaxl/api/client/api/v1/v1_kyc_identity_create.py +211 -0
- jaxl/api/client/api/v1/v1_kyc_identity_list.py +210 -0
- jaxl/api/client/api/v1/v1_kyc_identity_retrieve.py +167 -0
- jaxl/api/client/api/v1/v1_kyc_identity_url_create.py +191 -0
- jaxl/api/client/api/v1/v1_kyc_list.py +277 -0
- jaxl/api/client/api/v1/v1_kyc_otp_create.py +180 -0
- jaxl/api/client/api/v1/v1_kyc_partial_update.py +180 -0
- jaxl/api/client/api/v1/v1_kyc_proof_list.py +188 -0
- jaxl/api/client/api/v1/v1_kyc_proof_ocr_list.py +190 -0
- jaxl/api/client/api/v1/v1_kyc_proof_retrieve.py +163 -0
- jaxl/api/client/api/v1/v1_kyc_proof_url_create.py +189 -0
- jaxl/api/client/api/v1/v1_kyc_requirements_retrieve.py +224 -0
- jaxl/api/client/api/v1/v1_kyc_retrieve.py +163 -0
- jaxl/api/client/api/v1/v1_kyc_summary_list.py +289 -0
- jaxl/api/client/api/v1/v1_kyc_upload_create.py +178 -0
- jaxl/api/client/api/v1/v1_kyc_verify_create.py +180 -0
- jaxl/api/client/api/v1/v1_library_create.py +171 -0
- jaxl/api/client/api/v1/v1_library_default_retrieve.py +178 -0
- jaxl/api/client/api/v1/v1_library_list.py +215 -0
- jaxl/api/client/api/v1/v1_live_create.py +181 -0
- jaxl/api/client/api/v1/v1_message_create.py +175 -0
- jaxl/api/client/api/v1/v1_message_destroy.py +114 -0
- jaxl/api/client/api/v1/v1_message_search_list.py +235 -0
- jaxl/api/client/api/v1/v1_messages_destroy.py +118 -0
- jaxl/api/client/api/v1/v1_messages_list.py +229 -0
- jaxl/api/client/api/v1/v1_messages_reactions_create.py +196 -0
- jaxl/api/client/api/v1/v1_messages_reactions_destroy.py +190 -0
- jaxl/api/client/api/v1/v1_messages_receipt_partial_update.py +198 -0
- jaxl/api/client/api/v1/v1_messages_retrieve.py +193 -0
- jaxl/api/client/api/v1/v1_notifications_ack_create.py +118 -0
- jaxl/api/client/api/v1/v1_orders_attributes_partial_update.py +205 -0
- jaxl/api/client/api/v1/v1_orders_attributes_retrieve.py +186 -0
- jaxl/api/client/api/v1/v1_orders_checkout_create.py +233 -0
- jaxl/api/client/api/v1/v1_orders_checkout_destroy.py +177 -0
- jaxl/api/client/api/v1/v1_orders_receipt_validate_create.py +202 -0
- jaxl/api/client/api/v1/v1_payments_list.py +292 -0
- jaxl/api/client/api/v1/v1_pdf_convert_create.py +177 -0
- jaxl/api/client/api/v1/v1_phonenumbers_check_create.py +178 -0
- jaxl/api/client/api/v1/v1_phonenumbers_checkout_create.py +120 -0
- jaxl/api/client/api/v1/v1_phonenumbers_list.py +301 -0
- jaxl/api/client/api/v1/v1_phonenumbers_partial_update.py +192 -0
- jaxl/api/client/api/v1/v1_phonenumbers_retrieve.py +171 -0
- jaxl/api/client/api/v1/v1_phonenumbers_search_retrieve.py +319 -0
- jaxl/api/client/api/v1/v1_plans_bundle_create.py +176 -0
- jaxl/api/client/api/v1/v1_plans_countries_list.py +241 -0
- jaxl/api/client/api/v1/v1_plans_create.py +180 -0
- jaxl/api/client/api/v1/v1_plans_list.py +304 -0
- jaxl/api/client/api/v1/v1_plans_resources_list.py +221 -0
- jaxl/api/client/api/v1/v1_plans_retrieve.py +226 -0
- jaxl/api/client/api/v1/v1_plans_summary_list.py +283 -0
- jaxl/api/client/api/v1/v1_pricing_data_retrieve.py +231 -0
- jaxl/api/client/api/v1/v1_sim_command_create.py +123 -0
- jaxl/api/client/api/v1/v1_sim_create.py +174 -0
- jaxl/api/client/api/v1/v1_sim_destroy.py +112 -0
- jaxl/api/client/api/v1/v1_sim_heartbeart_create.py +112 -0
- jaxl/api/client/api/v1/v1_sim_sms_create.py +123 -0
- jaxl/api/client/api/v1/v1_sms_create.py +174 -0
- jaxl/api/client/api/v1/v1_thread_create.py +167 -0
- jaxl/api/client/api/v1/v1_thread_list.py +207 -0
- jaxl/api/client/api/v1/v1_ticket_create.py +175 -0
- jaxl/api/client/api/v1/v1_transcription_locale_retrieve.py +146 -0
- jaxl/api/client/api/v1/v1_transcription_result_retrieve.py +146 -0
- jaxl/api/client/api/v1/v1_transcription_search_list.py +237 -0
- jaxl/api/client/api/v1/v1_transcription_url_retrieve.py +194 -0
- jaxl/api/client/api/v1/v1_tts_create.py +171 -0
- jaxl/api/client/api/v1/v1_users_me_retrieve.py +146 -0
- jaxl/api/client/api/v1/v1_users_retrieve.py +167 -0
- jaxl/api/client/api/v2/__init__.py +9 -0
- jaxl/api/client/api/v2/v2_app_organizations_employees_invite_create.py +194 -0
- jaxl/api/client/api/v2/v2_app_organizations_employees_list.py +282 -0
- jaxl/api/client/api/v2/v2_app_organizations_employees_membership_create.py +205 -0
- jaxl/api/client/api/v2/v2_app_organizations_employees_partial_update.py +136 -0
- jaxl/api/client/api/v2/v2_app_organizations_employees_retrieve.py +189 -0
- jaxl/api/client/api/v2/v2_app_organizations_groups_create.py +194 -0
- jaxl/api/client/api/v2/v2_app_organizations_groups_list.py +224 -0
- jaxl/api/client/api/v2/v2_app_organizations_groups_members_partial_update.py +141 -0
- jaxl/api/client/api/v2/v2_app_organizations_groups_members_retrieve.py +197 -0
- jaxl/api/client/api/v2/v2_app_organizations_groups_partial_update.py +205 -0
- jaxl/api/client/api/v2/v2_app_organizations_groups_phone_number_partial_update.py +136 -0
- jaxl/api/client/api/v2/v2_app_organizations_groups_retrieve.py +186 -0
- jaxl/api/client/api/v2/v2_campaign_clone_create.py +191 -0
- jaxl/api/client/api/v2/v2_campaign_export_retrieve.py +128 -0
- jaxl/api/client/api/v2/v2_campaign_list.py +215 -0
- jaxl/api/client/api/v2/v2_campaign_partial_update.py +196 -0
- jaxl/api/client/api/v2/v2_customer_orders_notification_retrieve.py +148 -0
- jaxl/api/client/api/v2/v2_orders_receipt_validate_create.py +204 -0
- jaxl/api/client/api/v2/v2_transcription_search_list.py +237 -0
- jaxl/api/client/api/v2/v2_users_me_retrieve.py +150 -0
- jaxl/api/client/api/v3/__init__.py +9 -0
- jaxl/api/client/api/v3/v3_orders_consumables_list.py +228 -0
- jaxl/api/client/api/v3/v3_orders_consumables_retrieve.py +209 -0
- jaxl/api/client/api/v3/v3_orders_skus_list.py +205 -0
- jaxl/api/client/api/v3/v3_orders_subscriptions_list.py +287 -0
- jaxl/api/client/api/v3/v3_orders_subscriptions_retrieve.py +209 -0
- jaxl/api/client/client.py +73 -0
- jaxl/api/client/errors.py +19 -0
- jaxl/api/client/models/__init__.py +1191 -0
- jaxl/api/client/models/aadhar_attributes_request.py +106 -0
- jaxl/api/client/models/aadhar_invalid_document_response.py +75 -0
- jaxl/api/client/models/aadhar_otp_invalid_response.py +67 -0
- jaxl/api/client/models/aadhar_otp_request_request.py +74 -0
- jaxl/api/client/models/aadhar_otp_response.py +74 -0
- jaxl/api/client/models/aadhar_otp_verification_request_request.py +74 -0
- jaxl/api/client/models/aadhar_otp_verification_response.py +80 -0
- jaxl/api/client/models/aadhar_upload_request.py +121 -0
- jaxl/api/client/models/ack.py +67 -0
- jaxl/api/client/models/act_enum.py +20 -0
- jaxl/api/client/models/action_enum.py +20 -0
- jaxl/api/client/models/additional_fields.py +115 -0
- jaxl/api/client/models/additional_fields_type_enum.py +19 -0
- jaxl/api/client/models/address_creation_request.py +111 -0
- jaxl/api/client/models/address_provider.py +182 -0
- jaxl/api/client/models/address_provider_status_enum.py +20 -0
- jaxl/api/client/models/address_requirement.py +77 -0
- jaxl/api/client/models/analytic.py +91 -0
- jaxl/api/client/models/analytics_slug_response.py +83 -0
- jaxl/api/client/models/app.py +89 -0
- jaxl/api/client/models/app_contact_request.py +74 -0
- jaxl/api/client/models/app_context_response.py +165 -0
- jaxl/api/client/models/app_country.py +96 -0
- jaxl/api/client/models/app_domain.py +83 -0
- jaxl/api/client/models/app_price.py +107 -0
- jaxl/api/client/models/app_user.py +110 -0
- jaxl/api/client/models/app_user_preferences.py +85 -0
- jaxl/api/client/models/app_user_preferences_preferences.py +54 -0
- jaxl/api/client/models/app_user_preferences_request.py +85 -0
- jaxl/api/client/models/app_user_preferences_request_preferences.py +54 -0
- jaxl/api/client/models/app_user_sdds_response.py +67 -0
- jaxl/api/client/models/available_phone_number.py +159 -0
- jaxl/api/client/models/available_phone_number_capabilities.py +83 -0
- jaxl/api/client/models/available_phone_number_provider_enum.py +20 -0
- jaxl/api/client/models/bundle_create_request.py +109 -0
- jaxl/api/client/models/business_attributes_request.py +81 -0
- jaxl/api/client/models/call.py +447 -0
- jaxl/api/client/models/call_accept_request.py +76 -0
- jaxl/api/client/models/call_accept_response.py +123 -0
- jaxl/api/client/models/call_accept_response_reason_enum.py +18 -0
- jaxl/api/client/models/call_act_request.py +75 -0
- jaxl/api/client/models/call_cost.py +75 -0
- jaxl/api/client/models/call_date_response.py +69 -0
- jaxl/api/client/models/call_dates_response.py +82 -0
- jaxl/api/client/models/call_location_epoch.py +74 -0
- jaxl/api/client/models/call_metadata.py +54 -0
- jaxl/api/client/models/call_recording_response.py +67 -0
- jaxl/api/client/models/call_recording_share_response.py +67 -0
- jaxl/api/client/models/call_recording_status_request.py +71 -0
- jaxl/api/client/models/call_recording_status_status_enum.py +19 -0
- jaxl/api/client/models/call_search_response.py +97 -0
- jaxl/api/client/models/call_tag_count.py +81 -0
- jaxl/api/client/models/call_tag_request.py +67 -0
- jaxl/api/client/models/call_tag_response.py +74 -0
- jaxl/api/client/models/call_token_request.py +138 -0
- jaxl/api/client/models/call_token_response.py +147 -0
- jaxl/api/client/models/call_transcribe_request.py +92 -0
- jaxl/api/client/models/call_type_enum.py +20 -0
- jaxl/api/client/models/call_usage_by_currency_response.py +133 -0
- jaxl/api/client/models/call_usage_response.py +97 -0
- jaxl/api/client/models/call_usage_stats_response.py +91 -0
- jaxl/api/client/models/campaign.py +104 -0
- jaxl/api/client/models/campaign_clone_request_request.py +74 -0
- jaxl/api/client/models/campaign_invalid_update_response.py +67 -0
- jaxl/api/client/models/campaign_metadata.py +104 -0
- jaxl/api/client/models/campaign_metadata_metadata.py +54 -0
- jaxl/api/client/models/campaign_response.py +141 -0
- jaxl/api/client/models/campaign_response_status_enum.py +25 -0
- jaxl/api/client/models/campaign_stats.py +95 -0
- jaxl/api/client/models/campaign_stats_v2.py +105 -0
- jaxl/api/client/models/campaign_tag.py +74 -0
- jaxl/api/client/models/campaign_update_status_enum.py +18 -0
- jaxl/api/client/models/campaign_upload_request.py +248 -0
- jaxl/api/client/models/campaign_upload_request.py.orig +239 -0
- jaxl/api/client/models/campaign_upload_type_enum.py +22 -0
- jaxl/api/client/models/campaign_usage_summary.py +88 -0
- jaxl/api/client/models/campaign_v2.py +141 -0
- jaxl/api/client/models/campaign_v2_status_enum.py +26 -0
- jaxl/api/client/models/campaign_window_request.py +81 -0
- jaxl/api/client/models/can_user_resubscribe_plan.py +74 -0
- jaxl/api/client/models/cancel_subscription_response.py +67 -0
- jaxl/api/client/models/canceled_by_enum.py +21 -0
- jaxl/api/client/models/cannot_create_plan.py +67 -0
- jaxl/api/client/models/cannot_create_user_identity_response.py +67 -0
- jaxl/api/client/models/cannot_resume_subscription_response.py +67 -0
- jaxl/api/client/models/capabilities.py +115 -0
- jaxl/api/client/models/chart_type_enum.py +20 -0
- jaxl/api/client/models/checkout_options.py +106 -0
- jaxl/api/client/models/checkout_session_expired_response.py +67 -0
- jaxl/api/client/models/cmd_enum.py +18 -0
- jaxl/api/client/models/connection.py +123 -0
- jaxl/api/client/models/contact.py +145 -0
- jaxl/api/client/models/contact_address.py +102 -0
- jaxl/api/client/models/contact_email.py +81 -0
- jaxl/api/client/models/contact_phone.py +74 -0
- jaxl/api/client/models/content_type_enum.py +19 -0
- jaxl/api/client/models/conversation.py +135 -0
- jaxl/api/client/models/conversation_create_request.py +92 -0
- jaxl/api/client/models/conversation_type_enum.py +20 -0
- jaxl/api/client/models/country.py +128 -0
- jaxl/api/client/models/create_thread_request.py +67 -0
- jaxl/api/client/models/credit.py +108 -0
- jaxl/api/client/models/cta.py +127 -0
- jaxl/api/client/models/cta_request.py +127 -0
- jaxl/api/client/models/cta_type_enum.py +22 -0
- jaxl/api/client/models/currency_enum.py +56 -0
- jaxl/api/client/models/current_status_enum.py +22 -0
- jaxl/api/client/models/customer_cannot_checkout_due_to_ongoing_checkout.py +75 -0
- jaxl/api/client/models/customer_cannot_purchase_item.py +83 -0
- jaxl/api/client/models/customer_consumable_total.py +81 -0
- jaxl/api/client/models/customer_order_consumables_serializer_v2.py +133 -0
- jaxl/api/client/models/customer_order_sku.py +87 -0
- jaxl/api/client/models/customer_order_status_changed_notification.py +244 -0
- jaxl/api/client/models/customer_order_status_changed_notification_attributes.py +54 -0
- jaxl/api/client/models/customer_order_status_changed_notification_order_attributes.py +56 -0
- jaxl/api/client/models/customer_order_status_changed_notification_type_enum.py +25 -0
- jaxl/api/client/models/customer_order_subscriptions_serializer_v2.py +286 -0
- jaxl/api/client/models/customer_order_subscriptions_serializer_v2_status_enum.py +24 -0
- jaxl/api/client/models/customer_provider_serializer_v2.py +104 -0
- jaxl/api/client/models/device.py +249 -0
- jaxl/api/client/models/device_attestation_error.py +71 -0
- jaxl/api/client/models/device_attestation_error_reason_enum.py +40 -0
- jaxl/api/client/models/device_attestation_response.py +67 -0
- jaxl/api/client/models/device_attestation_response_request.py +67 -0
- jaxl/api/client/models/device_link_response.py +67 -0
- jaxl/api/client/models/device_token_provider_enum.py +19 -0
- jaxl/api/client/models/device_token_request.py +77 -0
- jaxl/api/client/models/device_token_response.py +67 -0
- jaxl/api/client/models/device_transport_request.py +113 -0
- jaxl/api/client/models/device_transport_response.py +118 -0
- jaxl/api/client/models/device_update_request.py +67 -0
- jaxl/api/client/models/dh_message.py +249 -0
- jaxl/api/client/models/dh_message_attachment.py +110 -0
- jaxl/api/client/models/dh_message_reaction.py +92 -0
- jaxl/api/client/models/dh_message_reaction_request_request.py +67 -0
- jaxl/api/client/models/dh_message_type_enum.py +27 -0
- jaxl/api/client/models/dh_public_key_read_receipt_response.py +67 -0
- jaxl/api/client/models/direction_enum.py +19 -0
- jaxl/api/client/models/download_response.py +102 -0
- jaxl/api/client/models/download_response_headers.py +54 -0
- jaxl/api/client/models/duration_enum.py +21 -0
- jaxl/api/client/models/emoji.py +74 -0
- jaxl/api/client/models/emoji_reaction.py +92 -0
- jaxl/api/client/models/environment_enum.py +20 -0
- jaxl/api/client/models/family.py +129 -0
- jaxl/api/client/models/family_invite.py +67 -0
- jaxl/api/client/models/family_invite_request.py +67 -0
- jaxl/api/client/models/family_membership.py +92 -0
- jaxl/api/client/models/family_status.py +69 -0
- jaxl/api/client/models/family_status_request.py +69 -0
- jaxl/api/client/models/family_status_status_enum.py +21 -0
- jaxl/api/client/models/format_enum.py +18 -0
- jaxl/api/client/models/gateway_enum.py +25 -0
- jaxl/api/client/models/greeting.py +132 -0
- jaxl/api/client/models/greeting_configuration_response.py +185 -0
- jaxl/api/client/models/greeting_creation_request_request.py +245 -0
- jaxl/api/client/models/greeting_creation_response.py +89 -0
- jaxl/api/client/models/greeting_type_enum.py +19 -0
- jaxl/api/client/models/id_enum.py +18 -0
- jaxl/api/client/models/identity_requirement.py +67 -0
- jaxl/api/client/models/improper_user_identity_attributes.py +77 -0
- jaxl/api/client/models/improper_user_identity_attributes_errors.py +54 -0
- jaxl/api/client/models/inbound.py +142 -0
- jaxl/api/client/models/incorrect_pdf_image_conversion.py +67 -0
- jaxl/api/client/models/individual_plan_request.py +67 -0
- jaxl/api/client/models/information.py +93 -0
- jaxl/api/client/models/invalid_call_search_response.py +67 -0
- jaxl/api/client/models/invalid_request.py +67 -0
- jaxl/api/client/models/invalid_sms_response.py +67 -0
- jaxl/api/client/models/iso_country_enum.py +185 -0
- jaxl/api/client/models/item.py +125 -0
- jaxl/api/client/models/ivr.py +81 -0
- jaxl/api/client/models/ivr_collection.py +77 -0
- jaxl/api/client/models/ivr_collection_request.py +77 -0
- jaxl/api/client/models/ivr_menu_request.py +77 -0
- jaxl/api/client/models/ivr_menu_response.py +140 -0
- jaxl/api/client/models/ivr_menu_response_status_enum.py +20 -0
- jaxl/api/client/models/ivr_options_invalid_response.py +67 -0
- jaxl/api/client/models/ivr_options_request.py +116 -0
- jaxl/api/client/models/ivr_options_response.py +145 -0
- jaxl/api/client/models/ivr_simulation_state_request.py +81 -0
- jaxl/api/client/models/ivr_state.py +117 -0
- jaxl/api/client/models/ivr_try_request.py +74 -0
- jaxl/api/client/models/jaxl_app_context_context.py +117 -0
- jaxl/api/client/models/jaxl_app_context_context_app.py +147 -0
- jaxl/api/client/models/jaxl_app_context_context_app_type_enum.py +20 -0
- jaxl/api/client/models/jaxl_app_context_context_config.py +82 -0
- jaxl/api/client/models/jaxl_app_context_context_config_firebase.py +109 -0
- jaxl/api/client/models/jaxl_app_context_context_device.py +74 -0
- jaxl/api/client/models/jaxl_app_context_context_user.py +81 -0
- jaxl/api/client/models/jaxl_app_detail_context.py +89 -0
- jaxl/api/client/models/jaxl_app_detail_context_app.py +88 -0
- jaxl/api/client/models/jaxl_app_detail_context_endpoints.py +67 -0
- jaxl/api/client/models/jaxl_app_messaging_context.py +67 -0
- jaxl/api/client/models/jaxl_app_organization_context.py +91 -0
- jaxl/api/client/models/jaxl_app_pay_context.py +67 -0
- jaxl/api/client/models/jaxl_app_transport_context.py +81 -0
- jaxl/api/client/models/jaxl_call_recording_response.py +67 -0
- jaxl/api/client/models/key_chain_get_request.py +67 -0
- jaxl/api/client/models/key_chain_get_response.py +85 -0
- jaxl/api/client/models/key_chain_multi_get_response.py +92 -0
- jaxl/api/client/models/key_chain_multi_set_request.py +82 -0
- jaxl/api/client/models/key_chain_remove_request.py +67 -0
- jaxl/api/client/models/key_chain_set_request.py +81 -0
- jaxl/api/client/models/key_chain_wget_request.py +82 -0
- jaxl/api/client/models/key_chain_wget_response.py +82 -0
- jaxl/api/client/models/key_info.py +90 -0
- jaxl/api/client/models/key_info_type_enum.py +20 -0
- jaxl/api/client/models/kyc.py +239 -0
- jaxl/api/client/models/kyc_address_creation_request.py +138 -0
- jaxl/api/client/models/kyc_component_download_request.py +67 -0
- jaxl/api/client/models/kyc_component_download_response.py +80 -0
- jaxl/api/client/models/kyc_countries.py +92 -0
- jaxl/api/client/models/kyc_creation_request.py +172 -0
- jaxl/api/client/models/kyc_document_response.py +102 -0
- jaxl/api/client/models/kyc_improper_address_response.py +77 -0
- jaxl/api/client/models/kyc_improper_address_response_errors.py +54 -0
- jaxl/api/client/models/kyc_invalid_response.py +67 -0
- jaxl/api/client/models/kyc_invalidated_address_response.py +67 -0
- jaxl/api/client/models/kyc_invalidated_address_with_suggestion_response.py +88 -0
- jaxl/api/client/models/kyc_invalidated_address_with_suggestion_response_suggested_address.py +56 -0
- jaxl/api/client/models/kyc_proof_upload_data_request.py +164 -0
- jaxl/api/client/models/kyc_proof_upload_request.py +142 -0
- jaxl/api/client/models/kyc_requirements_response.py +114 -0
- jaxl/api/client/models/kyc_status_enum.py +18 -0
- jaxl/api/client/models/kyc_summary.py +115 -0
- jaxl/api/client/models/kyc_upload_metadata.py +81 -0
- jaxl/api/client/models/language_enum.py +75 -0
- jaxl/api/client/models/library_response.py +110 -0
- jaxl/api/client/models/line_chart_response.py +92 -0
- jaxl/api/client/models/list_member.py +104 -0
- jaxl/api/client/models/live_request.py +101 -0
- jaxl/api/client/models/live_response.py +67 -0
- jaxl/api/client/models/locale_enum.py +43 -0
- jaxl/api/client/models/location.py +74 -0
- jaxl/api/client/models/location_enum.py +20 -0
- jaxl/api/client/models/logout_account_request.py +67 -0
- jaxl/api/client/models/member_request.py +74 -0
- jaxl/api/client/models/message.py +130 -0
- jaxl/api/client/models/message_create_request.py +92 -0
- jaxl/api/client/models/message_search_response.py +115 -0
- jaxl/api/client/models/message_word_position_response.py +67 -0
- jaxl/api/client/models/message_word_search_response.py +93 -0
- jaxl/api/client/models/next_or_cta_request.py +90 -0
- jaxl/api/client/models/non_compliant_kyc.py +94 -0
- jaxl/api/client/models/non_compliant_kyc_response.py +95 -0
- jaxl/api/client/models/notification_request.py +67 -0
- jaxl/api/client/models/number_type.py +154 -0
- jaxl/api/client/models/order_attributes.py +100 -0
- jaxl/api/client/models/order_attributes_attributes.py +54 -0
- jaxl/api/client/models/order_checkout_response.py +88 -0
- jaxl/api/client/models/order_status_enum.py +22 -0
- jaxl/api/client/models/organization.py +123 -0
- jaxl/api/client/models/organization_create_request.py +77 -0
- jaxl/api/client/models/organization_employee.py +188 -0
- jaxl/api/client/models/organization_employee_invitation_request.py +86 -0
- jaxl/api/client/models/organization_employee_invite_request.py +77 -0
- jaxl/api/client/models/organization_employee_invite_response.py +93 -0
- jaxl/api/client/models/organization_employee_membership_request.py +69 -0
- jaxl/api/client/models/organization_employee_preferences.py +54 -0
- jaxl/api/client/models/organization_employee_status_enum.py +21 -0
- jaxl/api/client/models/organization_group_inline.py +74 -0
- jaxl/api/client/models/organization_group_member_response.py +78 -0
- jaxl/api/client/models/organization_group_request.py +68 -0
- jaxl/api/client/models/organization_group_response.py +106 -0
- jaxl/api/client/models/organization_preferences.py +54 -0
- jaxl/api/client/models/otp_provider_enum.py +20 -0
- jaxl/api/client/models/otp_request.py +85 -0
- jaxl/api/client/models/otp_response.py +74 -0
- jaxl/api/client/models/outbound.py +88 -0
- jaxl/api/client/models/paginated_address_provider_list.py +108 -0
- jaxl/api/client/models/paginated_analytics_slug_response_list.py +108 -0
- jaxl/api/client/models/paginated_app_country_list.py +108 -0
- jaxl/api/client/models/paginated_app_domain_list.py +108 -0
- jaxl/api/client/models/paginated_call_list.py +108 -0
- jaxl/api/client/models/paginated_call_search_response_list.py +108 -0
- jaxl/api/client/models/paginated_call_tag_count_list.py +108 -0
- jaxl/api/client/models/paginated_call_tag_response_list.py +108 -0
- jaxl/api/client/models/paginated_campaign_response_list.py +108 -0
- jaxl/api/client/models/paginated_campaign_v2_list.py +108 -0
- jaxl/api/client/models/paginated_contact_list.py +108 -0
- jaxl/api/client/models/paginated_conversation_list.py +108 -0
- jaxl/api/client/models/paginated_country_list.py +108 -0
- jaxl/api/client/models/paginated_credit_list.py +108 -0
- jaxl/api/client/models/paginated_customer_order_consumables_serializer_v2_list.py +116 -0
- jaxl/api/client/models/paginated_customer_order_sku_list.py +108 -0
- jaxl/api/client/models/paginated_customer_order_subscriptions_serializer_v2_list.py +116 -0
- jaxl/api/client/models/paginated_device_list.py +108 -0
- jaxl/api/client/models/paginated_dh_message_list.py +108 -0
- jaxl/api/client/models/paginated_family_list.py +108 -0
- jaxl/api/client/models/paginated_greeting_configuration_response_list.py +112 -0
- jaxl/api/client/models/paginated_ivr_menu_response_list.py +108 -0
- jaxl/api/client/models/paginated_ivr_options_response_list.py +108 -0
- jaxl/api/client/models/paginated_key_chain_multi_get_response_list.py +110 -0
- jaxl/api/client/models/paginated_kyc_countries_list.py +108 -0
- jaxl/api/client/models/paginated_kyc_list.py +108 -0
- jaxl/api/client/models/paginated_kyc_summary_list.py +108 -0
- jaxl/api/client/models/paginated_library_response_list.py +108 -0
- jaxl/api/client/models/paginated_list_member_list.py +108 -0
- jaxl/api/client/models/paginated_message_list.py +108 -0
- jaxl/api/client/models/paginated_message_search_response_list.py +108 -0
- jaxl/api/client/models/paginated_organization_employee_list.py +108 -0
- jaxl/api/client/models/paginated_organization_group_response_list.py +110 -0
- jaxl/api/client/models/paginated_organization_list.py +108 -0
- jaxl/api/client/models/paginated_payment_list.py +108 -0
- jaxl/api/client/models/paginated_phone_number_list.py +108 -0
- jaxl/api/client/models/paginated_plan_country_number_types_list.py +108 -0
- jaxl/api/client/models/paginated_plan_list.py +108 -0
- jaxl/api/client/models/paginated_plan_summary_response_list.py +108 -0
- jaxl/api/client/models/paginated_proof_list.py +108 -0
- jaxl/api/client/models/paginated_thread_list.py +108 -0
- jaxl/api/client/models/paginated_transcription_list.py +108 -0
- jaxl/api/client/models/paginated_transcription_search_response_list.py +112 -0
- jaxl/api/client/models/paginated_transcription_search_response_serializer_v2_list.py +116 -0
- jaxl/api/client/models/paginated_unmatched_fields_list.py +108 -0
- jaxl/api/client/models/paginated_user_identity_list.py +108 -0
- jaxl/api/client/models/patched_campaign_update_request.py +92 -0
- jaxl/api/client/models/patched_conversation_name_request.py +75 -0
- jaxl/api/client/models/patched_dh_public_key_read_receipt_request.py +87 -0
- jaxl/api/client/models/patched_ivr_menu_request.py +75 -0
- jaxl/api/client/models/patched_ivr_options_update_request.py +115 -0
- jaxl/api/client/models/patched_kyc_detail_request.py +67 -0
- jaxl/api/client/models/patched_order_attributes_request.py +102 -0
- jaxl/api/client/models/patched_order_attributes_request_attributes.py +54 -0
- jaxl/api/client/models/patched_organization_group_member_update_request.py +88 -0
- jaxl/api/client/models/patched_organization_group_phone_number_update_request.py +75 -0
- jaxl/api/client/models/patched_organization_group_update_request.py +88 -0
- jaxl/api/client/models/patched_organization_member_update_request.py +88 -0
- jaxl/api/client/models/patched_phone_number_request.py +68 -0
- jaxl/api/client/models/payment.py +183 -0
- jaxl/api/client/models/payment_gateway_fees_info.py +74 -0
- jaxl/api/client/models/pdf_image_conversion_request.py +126 -0
- jaxl/api/client/models/period_enum.py +21 -0
- jaxl/api/client/models/phone_number.py +175 -0
- jaxl/api/client/models/phone_number_capabilities.py +81 -0
- jaxl/api/client/models/phone_number_check_request.py +67 -0
- jaxl/api/client/models/phone_number_check_response.py +83 -0
- jaxl/api/client/models/phone_number_checkout_request.py +78 -0
- jaxl/api/client/models/phone_number_provider_enum.py +23 -0
- jaxl/api/client/models/phone_number_search_response.py +100 -0
- jaxl/api/client/models/phone_number_status_enum.py +25 -0
- jaxl/api/client/models/pie_chart_response.py +82 -0
- jaxl/api/client/models/plan.py +225 -0
- jaxl/api/client/models/plan_cancel_info.py +97 -0
- jaxl/api/client/models/plan_country_number_types.py +74 -0
- jaxl/api/client/models/plan_create_request.py +215 -0
- jaxl/api/client/models/plan_create_request_item_attributes.py +54 -0
- jaxl/api/client/models/plan_create_type_enum.py +18 -0
- jaxl/api/client/models/plan_expiry_timestamp.py +101 -0
- jaxl/api/client/models/plan_expiry_timestamp_type_enum.py +19 -0
- jaxl/api/client/models/plan_extra_details.py +54 -0
- jaxl/api/client/models/plan_item.py +116 -0
- jaxl/api/client/models/plan_price_gateway_request.py +140 -0
- jaxl/api/client/models/plan_price_gateway_request_attributes.py +54 -0
- jaxl/api/client/models/plan_response.py +67 -0
- jaxl/api/client/models/plan_summary_response.py +240 -0
- jaxl/api/client/models/plan_summary_response_extra_details.py +54 -0
- jaxl/api/client/models/plan_type.py +92 -0
- jaxl/api/client/models/plan_type_cycle.py +84 -0
- jaxl/api/client/models/platform_enum.py +23 -0
- jaxl/api/client/models/point_response.py +92 -0
- jaxl/api/client/models/pricing_error.py +67 -0
- jaxl/api/client/models/pricing_response.py +101 -0
- jaxl/api/client/models/product_group.py +74 -0
- jaxl/api/client/models/proof.py +151 -0
- jaxl/api/client/models/proof_document.py +114 -0
- jaxl/api/client/models/proof_download_response.py +85 -0
- jaxl/api/client/models/proof_field.py +92 -0
- jaxl/api/client/models/proof_field_request.py +92 -0
- jaxl/api/client/models/proof_id_request.py +67 -0
- jaxl/api/client/models/proof_status_enum.py +21 -0
- jaxl/api/client/models/proofs_requirement.py +89 -0
- jaxl/api/client/models/provider_notes.py +67 -0
- jaxl/api/client/models/provider_pricing.py +83 -0
- jaxl/api/client/models/provider_status_enum.py +22 -0
- jaxl/api/client/models/purpose_enum.py +20 -0
- jaxl/api/client/models/quoted.py +81 -0
- jaxl/api/client/models/razor_pay_checkout_options.py +197 -0
- jaxl/api/client/models/razor_pay_config.py +73 -0
- jaxl/api/client/models/razor_pay_config_display.py +54 -0
- jaxl/api/client/models/razor_pay_model.py +99 -0
- jaxl/api/client/models/razor_pay_read_only.py +67 -0
- jaxl/api/client/models/razor_pay_retry.py +75 -0
- jaxl/api/client/models/reaction_by.py +74 -0
- jaxl/api/client/models/receipt_validate_request.py +74 -0
- jaxl/api/client/models/receipt_validate_response.py +67 -0
- jaxl/api/client/models/receipt_validate_serializer_v2_request.py +95 -0
- jaxl/api/client/models/referral_request.py +67 -0
- jaxl/api/client/models/referral_response.py +67 -0
- jaxl/api/client/models/remove_account_request.py +74 -0
- jaxl/api/client/models/rental_currency_enum.py +18 -0
- jaxl/api/client/models/requirement_enum.py +20 -0
- jaxl/api/client/models/resolution_enum.py +21 -0
- jaxl/api/client/models/resolve_greeting_response.py +89 -0
- jaxl/api/client/models/resource_enum.py +19 -0
- jaxl/api/client/models/resume_subscription_response.py +81 -0
- jaxl/api/client/models/role_enum.py +18 -0
- jaxl/api/client/models/roles_enum.py +21 -0
- jaxl/api/client/models/scenario.py +79 -0
- jaxl/api/client/models/scenario_enum.py +23 -0
- jaxl/api/client/models/scenario_request.py +79 -0
- jaxl/api/client/models/schema_retrieve_format.py +18 -0
- jaxl/api/client/models/schema_retrieve_lang.py +115 -0
- jaxl/api/client/models/schema_retrieve_response_200.py +54 -0
- jaxl/api/client/models/sim.py +184 -0
- jaxl/api/client/models/sim_command_request_request.py +77 -0
- jaxl/api/client/models/sim_create_request.py +161 -0
- jaxl/api/client/models/sim_create_request_metadata.py +54 -0
- jaxl/api/client/models/sim_metadata.py +54 -0
- jaxl/api/client/models/sim_sms_create_request.py +74 -0
- jaxl/api/client/models/sms_request_request.py +88 -0
- jaxl/api/client/models/state_enum.py +18 -0
- jaxl/api/client/models/t_enum.py +20 -0
- jaxl/api/client/models/table_chart_response.py +91 -0
- jaxl/api/client/models/thread.py +92 -0
- jaxl/api/client/models/ticket_create_request.py +74 -0
- jaxl/api/client/models/ticket_id.py +67 -0
- jaxl/api/client/models/transcription.py +84 -0
- jaxl/api/client/models/transcription_alternatives.py +101 -0
- jaxl/api/client/models/transcription_download_response.py +104 -0
- jaxl/api/client/models/transcription_locale.py +75 -0
- jaxl/api/client/models/transcription_result.py +113 -0
- jaxl/api/client/models/transcription_results.py +82 -0
- jaxl/api/client/models/transcription_search_response.py +107 -0
- jaxl/api/client/models/transcription_search_response_serializer_v2.py +124 -0
- jaxl/api/client/models/transcription_word.py +81 -0
- jaxl/api/client/models/transcription_word_position_response.py +81 -0
- jaxl/api/client/models/transcription_word_search_response.py +121 -0
- jaxl/api/client/models/transport_packet.py +131 -0
- jaxl/api/client/models/transport_packet_d.py +54 -0
- jaxl/api/client/models/transport_packet_request.py +131 -0
- jaxl/api/client/models/transport_packet_request_d.py +54 -0
- jaxl/api/client/models/transport_token.py +74 -0
- jaxl/api/client/models/tts_request_request.py +102 -0
- jaxl/api/client/models/tts_response.py +67 -0
- jaxl/api/client/models/unable_to_clone_campaign.py +67 -0
- jaxl/api/client/models/unable_to_fetch_library_files.py +67 -0
- jaxl/api/client/models/unable_to_transcribe_call.py +67 -0
- jaxl/api/client/models/unit_enum.py +27 -0
- jaxl/api/client/models/unmatched_fields.py +92 -0
- jaxl/api/client/models/upload.py +110 -0
- jaxl/api/client/models/upload_request_request.py +67 -0
- jaxl/api/client/models/user.py +99 -0
- jaxl/api/client/models/user_agent.py +117 -0
- jaxl/api/client/models/user_agent_browser.py +74 -0
- jaxl/api/client/models/user_agent_device.py +74 -0
- jaxl/api/client/models/user_agent_operating_system.py +67 -0
- jaxl/api/client/models/user_agent_platform.py +85 -0
- jaxl/api/client/models/user_identity.py +119 -0
- jaxl/api/client/models/user_identity_attributes_request.py +139 -0
- jaxl/api/client/models/user_identity_creation_request.py +96 -0
- jaxl/api/client/models/user_identity_uploaded_data_request.py +124 -0
- jaxl/api/client/models/user_identity_uploaded_data_request_additional_attributes.py +56 -0
- jaxl/api/client/models/user_serializer_v2.py +75 -0
- jaxl/api/client/models/v1_analytics_data_retrieve_date_range.py +46 -0
- jaxl/api/client/models/v1_analytics_data_retrieve_resolution.py +21 -0
- jaxl/api/client/models/v1_app_organizations_credentials_retrieve_os.py +18 -0
- jaxl/api/client/models/v1_app_organizations_credentials_retrieve_platform.py +19 -0
- jaxl/api/client/models/v1_app_organizations_list_status_item.py +21 -0
- jaxl/api/client/models/v1_calls_list_direction.py +19 -0
- jaxl/api/client/models/v1_campaign_export_retrieve_as.py +22 -0
- jaxl/api/client/models/v1_campaign_list_status_item.py +25 -0
- jaxl/api/client/models/v1_customer_consumables_retrieve_currency.py +55 -0
- jaxl/api/client/models/v1_greeting_list_greeting_type_item.py +19 -0
- jaxl/api/client/models/v1_greeting_list_language_item.py +75 -0
- jaxl/api/client/models/v1_greeting_list_scenario_item.py +23 -0
- jaxl/api/client/models/v1_ivr_list_duration.py +23 -0
- jaxl/api/client/models/v1_ivr_retrieve_duration.py +23 -0
- jaxl/api/client/models/v1_ivr_try_create_lang.py +75 -0
- jaxl/api/client/models/v1_ivr_try_retrieve_lang.py +75 -0
- jaxl/api/client/models/v1_kyc_address_list_exclude.py +185 -0
- jaxl/api/client/models/v1_kyc_address_list_iso_country.py +185 -0
- jaxl/api/client/models/v1_kyc_address_list_resource.py +19 -0
- jaxl/api/client/models/v1_kyc_address_list_status.py +20 -0
- jaxl/api/client/models/v1_kyc_identity_list_iso_country.py +185 -0
- jaxl/api/client/models/v1_kyc_list_iso_country.py +185 -0
- jaxl/api/client/models/v1_kyc_list_provider_status_item.py +22 -0
- jaxl/api/client/models/v1_kyc_list_resource.py +19 -0
- jaxl/api/client/models/v1_kyc_list_status.py +18 -0
- jaxl/api/client/models/v1_kyc_requirements_retrieve_iso_country.py +185 -0
- jaxl/api/client/models/v1_kyc_requirements_retrieve_resource.py +19 -0
- jaxl/api/client/models/v1_kyc_summary_list_iso_country.py +185 -0
- jaxl/api/client/models/v1_kyc_summary_list_provider_status_item.py +22 -0
- jaxl/api/client/models/v1_kyc_summary_list_resource.py +19 -0
- jaxl/api/client/models/v1_kyc_summary_list_status.py +18 -0
- jaxl/api/client/models/v1_library_default_retrieve_scenario.py +19 -0
- jaxl/api/client/models/v1_library_list_scenario.py +21 -0
- jaxl/api/client/models/v1_payments_list_currency.py +55 -0
- jaxl/api/client/models/v1_payments_list_subscription_type.py +18 -0
- jaxl/api/client/models/v1_phonenumbers_list_additional_status_item.py +25 -0
- jaxl/api/client/models/v1_phonenumbers_list_provider.py +23 -0
- jaxl/api/client/models/v1_phonenumbers_list_status.py +25 -0
- jaxl/api/client/models/v1_phonenumbers_search_retrieve_iso_country_code.py +185 -0
- jaxl/api/client/models/v1_phonenumbers_search_retrieve_resource.py +19 -0
- jaxl/api/client/models/v1_plans_countries_list_type.py +18 -0
- jaxl/api/client/models/v1_plans_list_currency.py +55 -0
- jaxl/api/client/models/v1_plans_list_type.py +18 -0
- jaxl/api/client/models/v1_plans_resources_list_type.py +18 -0
- jaxl/api/client/models/v1_plans_retrieve_currency.py +55 -0
- jaxl/api/client/models/v1_plans_summary_list_currency.py +55 -0
- jaxl/api/client/models/v1_plans_summary_list_gateway.py +25 -0
- jaxl/api/client/models/v1_plans_summary_list_type.py +18 -0
- jaxl/api/client/models/v2_app_organizations_employees_list_status_item.py +21 -0
- jaxl/api/client/models/v2_campaign_export_retrieve_as.py +22 -0
- jaxl/api/client/models/v2_campaign_list_status_item.py +25 -0
- jaxl/api/client/models/v3_orders_consumables_list_currency.py +55 -0
- jaxl/api/client/models/v3_orders_consumables_retrieve_currency.py +55 -0
- jaxl/api/client/models/v3_orders_subscriptions_list_currency.py +55 -0
- jaxl/api/client/models/v3_orders_subscriptions_list_status_item.py +24 -0
- jaxl/api/client/models/v3_orders_subscriptions_retrieve_currency.py +55 -0
- jaxl/api/client/models/verify_request.py +74 -0
- jaxl/api/client/models/verify_response.py +117 -0
- jaxl/api/client/models/verify_token_request.py +85 -0
- jaxl/api/client/models/verify_token_response.py +67 -0
- jaxl/api/client/models/voice_enum.py +18 -0
- jaxl/api/client/py.typed +1 -0
- jaxl/api/client/types.py +54 -0
- jaxl/api/py.typed +0 -0
- jaxl/api/resources/__init__.py +8 -0
- jaxl/api/resources/_constants.py +11 -0
- jaxl/api/resources/accounts.py +66 -0
- jaxl/api/resources/calls.py +141 -0
- jaxl/api/resources/campaigns.py +44 -0
- jaxl/api/resources/devices.py +28 -0
- jaxl/api/resources/ivrs.py +199 -0
- jaxl/api/resources/kycs.py +45 -0
- jaxl/api/resources/members.py +50 -0
- jaxl/api/resources/messages.py +61 -0
- jaxl/api/resources/notifications.py +15 -0
- jaxl/api/resources/payments.py +110 -0
- jaxl/api/resources/phones.py +140 -0
- jaxl/api/resources/teams.py +42 -0
- jaxl_python-0.0.1.dist-info/METADATA +174 -0
- jaxl_python-0.0.1.dist-info/RECORD +754 -0
- jaxl_python-0.0.1.dist-info/WHEEL +5 -0
- jaxl_python-0.0.1.dist-info/entry_points.txt +2 -0
- jaxl_python-0.0.1.dist-info/licenses/LICENSE.md +6 -0
- jaxl_python-0.0.1.dist-info/top_level.txt +1 -0
jaxl/api/__init__.py
ADDED
|
@@ -0,0 +1,85 @@
|
|
|
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
|
+
## Install
|
|
10
|
+
|
|
11
|
+
Use Jaxl from Python code or directly via the jaxl command-line tool.
|
|
12
|
+
|
|
13
|
+
`pip install jaxl-python`
|
|
14
|
+
|
|
15
|
+
## JAXL CLI
|
|
16
|
+
|
|
17
|
+
```bash
|
|
18
|
+
jaxl -h
|
|
19
|
+
usage: jaxl [-h] {calls} ...
|
|
20
|
+
|
|
21
|
+
Jaxl CLI
|
|
22
|
+
|
|
23
|
+
positional arguments:
|
|
24
|
+
{phones,calls,members,teams,ivrs,devices,payments,accounts,kycs,messages,campaigns,notifications}
|
|
25
|
+
phones Manage Phones
|
|
26
|
+
calls Manage Calls (Domestic & International Cellular, VoIP audio/video)
|
|
27
|
+
members Manage Members
|
|
28
|
+
teams Manage Teams
|
|
29
|
+
ivrs Manage IVRs (Interactive Voice Response)
|
|
30
|
+
devices Manage Devices
|
|
31
|
+
payments Manage Payments
|
|
32
|
+
accounts Manage Accounts
|
|
33
|
+
kycs Manage KYCs
|
|
34
|
+
messages Manage Messages (SMS, WA, RCS, Email, App-to-App)
|
|
35
|
+
campaigns Manage Campaigns
|
|
36
|
+
notifications Manage Notifications (iOS, Android, Web)
|
|
37
|
+
|
|
38
|
+
options:
|
|
39
|
+
-h, --help show this help message and exit
|
|
40
|
+
```
|
|
41
|
+
|
|
42
|
+
### Example Usage
|
|
43
|
+
|
|
44
|
+
```bash
|
|
45
|
+
export JAXL_API_CREDENTIALS=/path/to/jaxl-api-credentials.json
|
|
46
|
+
|
|
47
|
+
export JAXL_API_AUTH_TOKEN="....authentication token..."
|
|
48
|
+
|
|
49
|
+
jaxl calls list
|
|
50
|
+
|
|
51
|
+
Response(status_code=<HTTPStatus.OK: 200>, content=b'... [redacted] ...')
|
|
52
|
+
```
|
|
53
|
+
|
|
54
|
+
## Jaxl Python SDK
|
|
55
|
+
|
|
56
|
+
- Jaxl APIs is built upon [OpenAPI specification](https://www.openapis.org/)
|
|
57
|
+
- `jaxl-python` contains following Python modules:
|
|
58
|
+
- `jaxl.api.client`: Generated OpenAPI SDK
|
|
59
|
+
- `jaxl.api.resources`: Wrapper methods written to support `jaxl` CLI
|
|
60
|
+
- `jaxl_api_client`: Helper function to retrieve an instance of `JaxlApiClient`
|
|
61
|
+
|
|
62
|
+
### Example Usage:
|
|
63
|
+
|
|
64
|
+
```python
|
|
65
|
+
from jaxl.api import JaxlApiModule, jaxl_api_client
|
|
66
|
+
from jaxl.api.client.api.v1 import v1_calls_list
|
|
67
|
+
|
|
68
|
+
os.environ.setdefault("JAXL_API_CREDENTIALS", "/path/to/jaxl-api-credentials.json")
|
|
69
|
+
|
|
70
|
+
os.environ.setdefault("JAXL_API_AUTH_TOKEN", "....authentication token...")
|
|
71
|
+
|
|
72
|
+
response = v1_calls_list.sync_detailed(
|
|
73
|
+
client=jaxl_api_client(JaxlApiModule.CALL),
|
|
74
|
+
currency=2, # 1=USD, 2=INR
|
|
75
|
+
)
|
|
76
|
+
```
|
|
77
|
+
"""
|
|
78
|
+
|
|
79
|
+
from ._client import JaxlApiModule, jaxl_api_client
|
|
80
|
+
|
|
81
|
+
|
|
82
|
+
__all__ = [
|
|
83
|
+
"JaxlApiModule",
|
|
84
|
+
"jaxl_api_client",
|
|
85
|
+
]
|
jaxl/api/_client.py
ADDED
|
@@ -0,0 +1,588 @@
|
|
|
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
|
+
import base64
|
|
11
|
+
import functools
|
|
12
|
+
import getpass
|
|
13
|
+
import json
|
|
14
|
+
import logging
|
|
15
|
+
import os
|
|
16
|
+
import pathlib
|
|
17
|
+
import platform as pyplatform
|
|
18
|
+
import socket
|
|
19
|
+
import time
|
|
20
|
+
import uuid
|
|
21
|
+
from datetime import datetime, timedelta, timezone
|
|
22
|
+
from enum import Enum
|
|
23
|
+
from http import HTTPStatus
|
|
24
|
+
from pathlib import Path
|
|
25
|
+
from typing import (
|
|
26
|
+
Any,
|
|
27
|
+
Callable,
|
|
28
|
+
Dict,
|
|
29
|
+
List,
|
|
30
|
+
Optional,
|
|
31
|
+
TypedDict,
|
|
32
|
+
TypeVar,
|
|
33
|
+
Union,
|
|
34
|
+
cast,
|
|
35
|
+
)
|
|
36
|
+
|
|
37
|
+
import jwt
|
|
38
|
+
from cryptography.fernet import Fernet, InvalidToken
|
|
39
|
+
from cryptography.hazmat.backends import default_backend
|
|
40
|
+
from cryptography.hazmat.primitives import hashes, serialization
|
|
41
|
+
from cryptography.hazmat.primitives.asymmetric import padding, rsa
|
|
42
|
+
|
|
43
|
+
from jaxl.api.client import Client
|
|
44
|
+
from jaxl.api.client.api.v1 import v1_devices_attest_create
|
|
45
|
+
from jaxl.api.client.client import AuthenticatedClient
|
|
46
|
+
from jaxl.api.client.models.device_attestation_response import (
|
|
47
|
+
DeviceAttestationResponse,
|
|
48
|
+
)
|
|
49
|
+
from jaxl.api.client.types import Response
|
|
50
|
+
|
|
51
|
+
|
|
52
|
+
logger = logging.getLogger(__name__)
|
|
53
|
+
|
|
54
|
+
DEFAULT_ISSUER = "jaxl"
|
|
55
|
+
DEFAULT_AUDIENCE = "dialer"
|
|
56
|
+
JAXL_CONTAINER_USER = "jaxl-python"
|
|
57
|
+
|
|
58
|
+
|
|
59
|
+
class ApiCredentialsWatermark(TypedDict):
|
|
60
|
+
"""ApiCredentialsWatermark"""
|
|
61
|
+
|
|
62
|
+
version: int
|
|
63
|
+
env: str
|
|
64
|
+
by: int
|
|
65
|
+
on: str
|
|
66
|
+
via: str
|
|
67
|
+
through: str
|
|
68
|
+
|
|
69
|
+
|
|
70
|
+
class ApiCredentialsAppPlatforms(TypedDict):
|
|
71
|
+
"""ApiCredentialsAppPlatforms"""
|
|
72
|
+
|
|
73
|
+
ios: Optional[str]
|
|
74
|
+
android: Optional[str]
|
|
75
|
+
domain: Optional[str]
|
|
76
|
+
|
|
77
|
+
|
|
78
|
+
class ApiCredentialsApp(TypedDict):
|
|
79
|
+
"""ApiCredentialsApp"""
|
|
80
|
+
|
|
81
|
+
id: int
|
|
82
|
+
type: int
|
|
83
|
+
platforms: ApiCredentialsAppPlatforms
|
|
84
|
+
|
|
85
|
+
|
|
86
|
+
class ApiCredentialsClient(TypedDict):
|
|
87
|
+
"""ApiCredentialsClient"""
|
|
88
|
+
|
|
89
|
+
key: str
|
|
90
|
+
secret: str
|
|
91
|
+
genesis_key: str
|
|
92
|
+
platform: int
|
|
93
|
+
|
|
94
|
+
|
|
95
|
+
class ApiCredentials(TypedDict):
|
|
96
|
+
"""ApiCredentials"""
|
|
97
|
+
|
|
98
|
+
watermark: ApiCredentialsWatermark
|
|
99
|
+
app: ApiCredentialsApp
|
|
100
|
+
client: ApiCredentialsClient
|
|
101
|
+
servers: List[str]
|
|
102
|
+
|
|
103
|
+
|
|
104
|
+
class JwtMessage(TypedDict):
|
|
105
|
+
"""JwtMessage"""
|
|
106
|
+
|
|
107
|
+
version: str
|
|
108
|
+
env: str
|
|
109
|
+
signature: str
|
|
110
|
+
me: str
|
|
111
|
+
now: str
|
|
112
|
+
servers: List[str]
|
|
113
|
+
device_id: Optional[int]
|
|
114
|
+
app_version: Optional[str]
|
|
115
|
+
|
|
116
|
+
|
|
117
|
+
class TokenSignatureMessage(TypedDict):
|
|
118
|
+
"""TokenSignatureMessage"""
|
|
119
|
+
|
|
120
|
+
version: int
|
|
121
|
+
env: str
|
|
122
|
+
app_id: int
|
|
123
|
+
me: str
|
|
124
|
+
now: str
|
|
125
|
+
device_id: Optional[int]
|
|
126
|
+
app_version: Optional[str]
|
|
127
|
+
|
|
128
|
+
|
|
129
|
+
@functools.cache
|
|
130
|
+
def default_api_credentials() -> ApiCredentials:
|
|
131
|
+
"""Reads JAXL_API_CREDENTIALS file and return json credentials."""
|
|
132
|
+
path = os.environ.get("JAXL_API_CREDENTIALS")
|
|
133
|
+
if path is None:
|
|
134
|
+
raise ValueError("JAXL_API_CREDENTIALS environment variable is required.")
|
|
135
|
+
return cast( # pragma: no cover
|
|
136
|
+
ApiCredentials,
|
|
137
|
+
json.loads(Path(path).read_text("utf-8")),
|
|
138
|
+
)
|
|
139
|
+
|
|
140
|
+
|
|
141
|
+
@functools.cache
|
|
142
|
+
def get_system_identity() -> str:
|
|
143
|
+
"""Returns username@hostname identity of the system."""
|
|
144
|
+
#
|
|
145
|
+
# 2023-09-30T02:43:36.033347Z identity = f"{getpass.getuser()}@{socket.gethostname()}"
|
|
146
|
+
# 2023-09-30T02:43:36.033353Z ^^^^^^^^^^^^^^^^^
|
|
147
|
+
# 2023-09-30T02:43:36.033357Z File "/usr/local/lib/python3.11/getpass.py", line 169, in getuser
|
|
148
|
+
# 2023-09-30T02:43:36.033362Z return pwd.getpwuid(os.getuid())[0]
|
|
149
|
+
# 2023-09-30T02:43:36.033366Z ^^^^^^^^^^^^^^^^^^^^^^^^^
|
|
150
|
+
# 2023-09-30T02:43:36.033371Z KeyError: 'getpwuid(): uid not found: 0'
|
|
151
|
+
#
|
|
152
|
+
# ^^^^ BECAUSE WE HAVE SEEN ERRORS LIVE ABOVE
|
|
153
|
+
# USE A DEFAULT USERNAME, HOSTNAME FOR SCENARIOS
|
|
154
|
+
# WHEN WE ARE UNABLE TO GET THESE DETAILS FROM
|
|
155
|
+
# THE UNDERLYING OPERATING SYSTEM.
|
|
156
|
+
#
|
|
157
|
+
username = "jaxl"
|
|
158
|
+
try:
|
|
159
|
+
username = os.environ.get(
|
|
160
|
+
"USER",
|
|
161
|
+
(
|
|
162
|
+
os.environ.get("JAXL_CONTAINER_USER", JAXL_CONTAINER_USER)
|
|
163
|
+
if Path("/.dockerenv").is_file()
|
|
164
|
+
else getpass.getuser()
|
|
165
|
+
),
|
|
166
|
+
)
|
|
167
|
+
|
|
168
|
+
except Exception: # pylint: disable=broad-exception-caught
|
|
169
|
+
pass
|
|
170
|
+
hostname = "api.frontend"
|
|
171
|
+
try:
|
|
172
|
+
hostname = socket.gethostname()
|
|
173
|
+
except Exception: # pylint: disable=broad-exception-caught
|
|
174
|
+
pass
|
|
175
|
+
return f"{username}@{hostname}"
|
|
176
|
+
|
|
177
|
+
|
|
178
|
+
def generate_signature(privkey: bytes, message: bytes) -> bytes:
|
|
179
|
+
"""sign messaging using our priv key"""
|
|
180
|
+
return cast(
|
|
181
|
+
rsa.RSAPrivateKey,
|
|
182
|
+
serialization.load_pem_private_key(
|
|
183
|
+
privkey,
|
|
184
|
+
backend=default_backend(),
|
|
185
|
+
password=None,
|
|
186
|
+
),
|
|
187
|
+
).sign(
|
|
188
|
+
message,
|
|
189
|
+
padding.PSS(
|
|
190
|
+
mgf=padding.MGF1(algorithm=hashes.SHA256()),
|
|
191
|
+
salt_length=padding.PSS.MAX_LENGTH,
|
|
192
|
+
),
|
|
193
|
+
hashes.SHA256(),
|
|
194
|
+
)
|
|
195
|
+
|
|
196
|
+
|
|
197
|
+
def encode(
|
|
198
|
+
payload: Dict[str, Any],
|
|
199
|
+
private_key: str,
|
|
200
|
+
expires_at: Optional[datetime] = None,
|
|
201
|
+
valid_since: Optional[datetime] = None,
|
|
202
|
+
audience: str = DEFAULT_AUDIENCE,
|
|
203
|
+
) -> str:
|
|
204
|
+
"""Encode JWT parameters"""
|
|
205
|
+
copy = payload.copy()
|
|
206
|
+
copy["iss"] = DEFAULT_ISSUER
|
|
207
|
+
copy["aud"] = audience
|
|
208
|
+
copy["iat"] = datetime.now(tz=timezone.utc)
|
|
209
|
+
if expires_at is not None:
|
|
210
|
+
copy["exp"] = expires_at
|
|
211
|
+
if valid_since is not None:
|
|
212
|
+
copy["nbf"] = valid_since
|
|
213
|
+
return jwt.encode(copy, key=private_key, algorithm="RS256")
|
|
214
|
+
|
|
215
|
+
|
|
216
|
+
def generate_api_token(
|
|
217
|
+
credentials: ApiCredentials,
|
|
218
|
+
ttl: int,
|
|
219
|
+
device_id: Optional[int] = None,
|
|
220
|
+
app_version: Optional[str] = None,
|
|
221
|
+
) -> str:
|
|
222
|
+
"""Generates an api token"""
|
|
223
|
+
now = datetime.now(tz=timezone.utc)
|
|
224
|
+
identity = get_system_identity()
|
|
225
|
+
signature = base64.b64encode(
|
|
226
|
+
generate_signature(
|
|
227
|
+
privkey=credentials["client"]["secret"].encode(),
|
|
228
|
+
message=json.dumps(
|
|
229
|
+
TokenSignatureMessage(
|
|
230
|
+
version=credentials["watermark"]["version"],
|
|
231
|
+
env=credentials["watermark"]["env"],
|
|
232
|
+
app_id=credentials["app"]["id"],
|
|
233
|
+
me=identity,
|
|
234
|
+
now=str(now),
|
|
235
|
+
device_id=device_id,
|
|
236
|
+
app_version=app_version,
|
|
237
|
+
)
|
|
238
|
+
).encode(),
|
|
239
|
+
)
|
|
240
|
+
).decode()
|
|
241
|
+
return encode(
|
|
242
|
+
payload=cast(
|
|
243
|
+
Dict[str, Any],
|
|
244
|
+
JwtMessage(
|
|
245
|
+
version=str(credentials["watermark"]["version"]),
|
|
246
|
+
env=credentials["watermark"]["env"],
|
|
247
|
+
signature=signature,
|
|
248
|
+
me=identity,
|
|
249
|
+
now=str(now),
|
|
250
|
+
servers=credentials["servers"],
|
|
251
|
+
device_id=device_id,
|
|
252
|
+
app_version=app_version,
|
|
253
|
+
),
|
|
254
|
+
),
|
|
255
|
+
private_key=credentials["client"]["secret"],
|
|
256
|
+
valid_since=now,
|
|
257
|
+
expires_at=now + timedelta(seconds=ttl),
|
|
258
|
+
)
|
|
259
|
+
|
|
260
|
+
|
|
261
|
+
def attest() -> Optional[Dict[str, Any]]:
|
|
262
|
+
"""Ensures valid attestation with Jaxl backend.
|
|
263
|
+
|
|
264
|
+
- If attestation already exists, reuses it.
|
|
265
|
+
- Stores attestation in ~/.jaxl/api/attestation.json encrypted using api client genesis key.
|
|
266
|
+
"""
|
|
267
|
+
data_dir = os.path.join(str(pathlib.Path.home()), ".jaxl", "api")
|
|
268
|
+
os.makedirs(data_dir, exist_ok=True)
|
|
269
|
+
attestation_path = Path(data_dir) / "attestation.json"
|
|
270
|
+
if attestation_path.exists():
|
|
271
|
+
return cast(Dict[str, Any], json.loads(attestation_path.read_text()))
|
|
272
|
+
attestation = _attest()
|
|
273
|
+
if attestation is not None:
|
|
274
|
+
attestation_path.write_text(json.dumps(attestation))
|
|
275
|
+
return attestation
|
|
276
|
+
|
|
277
|
+
|
|
278
|
+
def _attest() -> Optional[Dict[str, Any]]:
|
|
279
|
+
"""Ensures valid attestation with Jaxl backend."""
|
|
280
|
+
sk = default_api_credentials()["client"]["genesis_key"]
|
|
281
|
+
idd = None
|
|
282
|
+
did = f"jaxl:grout:{uuid.uuid4().hex}"
|
|
283
|
+
origin = f"{pyplatform.system().lower()}://"
|
|
284
|
+
ip_address = "127.0.0.1"
|
|
285
|
+
|
|
286
|
+
response = JaxlApiClient.attest(
|
|
287
|
+
_api_root(JaxlApiModule.ACCOUNT),
|
|
288
|
+
key=sk,
|
|
289
|
+
device_id=did,
|
|
290
|
+
device_pk=idd,
|
|
291
|
+
origin=origin,
|
|
292
|
+
ip_address=ip_address,
|
|
293
|
+
platform=3,
|
|
294
|
+
)
|
|
295
|
+
if isinstance(response, int):
|
|
296
|
+
return None
|
|
297
|
+
return response
|
|
298
|
+
|
|
299
|
+
|
|
300
|
+
class JaxlApiModule(Enum):
|
|
301
|
+
"""Available API Modules"""
|
|
302
|
+
|
|
303
|
+
ACCOUNT = 1
|
|
304
|
+
CALL = 2
|
|
305
|
+
MESSAGE = 3
|
|
306
|
+
NOTIFICATION = 4
|
|
307
|
+
PAYMENT = 5
|
|
308
|
+
|
|
309
|
+
|
|
310
|
+
def jaxl_api_client(module: JaxlApiModule) -> "AuthenticatedClient":
|
|
311
|
+
"""Returns JaxlApiClient with auth token and device id preset."""
|
|
312
|
+
attestation = attest()
|
|
313
|
+
auth_token = os.environ.get("JAXL_API_AUTH_TOKEN", None)
|
|
314
|
+
client = JaxlApiClient(_api_root(module))
|
|
315
|
+
assert attestation is not None, "Missing attestation"
|
|
316
|
+
assert auth_token is not None, "Missing JAXL_API_AUTH_TOKEN"
|
|
317
|
+
client.set_device_id(attestation["id"])
|
|
318
|
+
client.set_auth_token(auth_token)
|
|
319
|
+
return cast(AuthenticatedClient, client)
|
|
320
|
+
|
|
321
|
+
|
|
322
|
+
# pylint: disable=too-many-return-statements,too-many-branches
|
|
323
|
+
def _api_root(module: JaxlApiModule) -> str:
|
|
324
|
+
"""Returns API root for given API Module."""
|
|
325
|
+
env = default_api_credentials()["watermark"]["env"]
|
|
326
|
+
if module == JaxlApiModule.ACCOUNT:
|
|
327
|
+
if env == "production":
|
|
328
|
+
return "https://fin.jaxl.com"
|
|
329
|
+
if env == "staging":
|
|
330
|
+
return "https://payments.jaxl.app"
|
|
331
|
+
if env == "run":
|
|
332
|
+
return "https://pay.jaxl.run"
|
|
333
|
+
if env == "dev":
|
|
334
|
+
return os.environ["JAXL_ACCOUNT_API_ROOT"]
|
|
335
|
+
if module == JaxlApiModule.PAYMENT:
|
|
336
|
+
if env == "production":
|
|
337
|
+
return "https://fin.jaxl.com"
|
|
338
|
+
if env == "staging":
|
|
339
|
+
return "https://payments.jaxl.app"
|
|
340
|
+
if env == "run":
|
|
341
|
+
return "https://pay.jaxl.run"
|
|
342
|
+
if env == "dev":
|
|
343
|
+
return os.environ["JAXL_PAYMENT_API_ROOT"]
|
|
344
|
+
if module == JaxlApiModule.CALL:
|
|
345
|
+
if env == "production":
|
|
346
|
+
return "https://live.jaxl.com"
|
|
347
|
+
if env == "staging":
|
|
348
|
+
return "https://transport.jaxl.app"
|
|
349
|
+
if env == "run":
|
|
350
|
+
return "https://ws.jaxl.run"
|
|
351
|
+
if env == "dev":
|
|
352
|
+
return os.environ["JAXL_CALL_API_ROOT"]
|
|
353
|
+
if module == JaxlApiModule.MESSAGE:
|
|
354
|
+
if env == "production":
|
|
355
|
+
return "https://fin.jaxl.com"
|
|
356
|
+
if env == "staging":
|
|
357
|
+
return "https://payments.jaxl.app"
|
|
358
|
+
if env == "run":
|
|
359
|
+
return "https://pay.jaxl.run"
|
|
360
|
+
if env == "dev":
|
|
361
|
+
return os.environ["JAXL_MESSAGE_API_ROOT"]
|
|
362
|
+
raise NotImplementedError()
|
|
363
|
+
|
|
364
|
+
|
|
365
|
+
# pylint: disable=too-many-instance-attributes
|
|
366
|
+
class JaxlApiClient(Client):
|
|
367
|
+
"""Api client which automatically attaches outgoing api keys
|
|
368
|
+
using JAXL_API_CREDENTIALS environment variable."""
|
|
369
|
+
|
|
370
|
+
def __init__(
|
|
371
|
+
self,
|
|
372
|
+
*args: Any,
|
|
373
|
+
audience: str = DEFAULT_AUDIENCE,
|
|
374
|
+
platform: int = 3, # 3 = CLI
|
|
375
|
+
credentials: Optional[ApiCredentials] = None,
|
|
376
|
+
**kwargs: Any,
|
|
377
|
+
) -> None:
|
|
378
|
+
self.audience = audience
|
|
379
|
+
self.credentials: ApiCredentials = credentials or default_api_credentials()
|
|
380
|
+
self.device_id: Optional[int] = None
|
|
381
|
+
self.org_id: Optional[int] = None
|
|
382
|
+
self.auth_token: Optional[str] = None
|
|
383
|
+
self.platform: int = platform
|
|
384
|
+
super().__init__(*args, **kwargs)
|
|
385
|
+
|
|
386
|
+
# pylint: disable=too-many-arguments,too-many-positional-arguments
|
|
387
|
+
@staticmethod
|
|
388
|
+
def attest(
|
|
389
|
+
api_root: str,
|
|
390
|
+
key: str,
|
|
391
|
+
device_id: str,
|
|
392
|
+
device_pk: Optional[int],
|
|
393
|
+
origin: str,
|
|
394
|
+
ip_address: str,
|
|
395
|
+
signed_user_cookie: Optional[str] = None,
|
|
396
|
+
platform: Optional[int] = 3,
|
|
397
|
+
) -> Union[int, Dict[str, Any]]:
|
|
398
|
+
"""Performs attestation and return decrypted payload.
|
|
399
|
+
|
|
400
|
+
Either returns decrypted payload (a dictionary) or
|
|
401
|
+
will return HTTP status code in case of API errors.
|
|
402
|
+
|
|
403
|
+
1000 is a reserved status code for cases when API
|
|
404
|
+
status is success but we are unable to parse response.
|
|
405
|
+
|
|
406
|
+
1001 is a reserved status code for cases when API
|
|
407
|
+
status is success but we are unable to decrypt the
|
|
408
|
+
parsed response.
|
|
409
|
+
"""
|
|
410
|
+
response = JaxlApiClient.hit_attest(
|
|
411
|
+
api_root=api_root,
|
|
412
|
+
key=key,
|
|
413
|
+
device_id=device_id,
|
|
414
|
+
device_pk=device_pk,
|
|
415
|
+
origin=origin,
|
|
416
|
+
ip_address=ip_address,
|
|
417
|
+
signed_user_cookie=signed_user_cookie,
|
|
418
|
+
platform=platform,
|
|
419
|
+
)
|
|
420
|
+
if response.status_code == HTTPStatus.OK:
|
|
421
|
+
if response.parsed is None:
|
|
422
|
+
return 1000
|
|
423
|
+
fernet = Fernet(key)
|
|
424
|
+
try:
|
|
425
|
+
return cast(
|
|
426
|
+
Dict[str, Any],
|
|
427
|
+
json.loads(fernet.decrypt(response.parsed.encrypted.encode())),
|
|
428
|
+
)
|
|
429
|
+
except InvalidToken:
|
|
430
|
+
return 1001
|
|
431
|
+
return response.status_code
|
|
432
|
+
|
|
433
|
+
# pylint: disable=too-many-arguments
|
|
434
|
+
@staticmethod
|
|
435
|
+
def hit_attest(
|
|
436
|
+
api_root: str,
|
|
437
|
+
key: str,
|
|
438
|
+
device_id: str,
|
|
439
|
+
device_pk: Optional[int],
|
|
440
|
+
origin: str,
|
|
441
|
+
ip_address: str,
|
|
442
|
+
signed_user_cookie: Optional[str] = None,
|
|
443
|
+
platform: Optional[int] = 3,
|
|
444
|
+
) -> Response[Union[Any, DeviceAttestationResponse]]:
|
|
445
|
+
"""Performs attestation process and returns secret key to use
|
|
446
|
+
for establishing transport connection.
|
|
447
|
+
|
|
448
|
+
For first time devices, genesis attestation key is used.
|
|
449
|
+
For revisiting devices, previously exchanged attestation key is used.
|
|
450
|
+
|
|
451
|
+
Attestation keys are stored in user session data.
|
|
452
|
+
On frontend, session cookie helps to identify
|
|
453
|
+
first time vs revisiting users.
|
|
454
|
+
"""
|
|
455
|
+
assert platform
|
|
456
|
+
fernet = Fernet(key)
|
|
457
|
+
return ensure(
|
|
458
|
+
api_root,
|
|
459
|
+
headers={
|
|
460
|
+
"origin": origin,
|
|
461
|
+
"x-forwarded-for": ip_address,
|
|
462
|
+
"x-device-attest": fernet.encrypt(
|
|
463
|
+
json.dumps(
|
|
464
|
+
{
|
|
465
|
+
"pd": device_id,
|
|
466
|
+
# TODO: Send a signature from frontend as device token
|
|
467
|
+
# which can be verified by our backend, by calling frontend's
|
|
468
|
+
# backend service.
|
|
469
|
+
"dt": "",
|
|
470
|
+
"cookie": signed_user_cookie,
|
|
471
|
+
}
|
|
472
|
+
).encode("utf-8")
|
|
473
|
+
).decode("utf-8"),
|
|
474
|
+
"x-device-id": device_id,
|
|
475
|
+
},
|
|
476
|
+
client_kwargs={"platform": platform},
|
|
477
|
+
session={"idd": device_pk},
|
|
478
|
+
func=v1_devices_attest_create.sync_detailed,
|
|
479
|
+
)
|
|
480
|
+
|
|
481
|
+
def set_device_id(self, device_id: Optional[int]) -> None:
|
|
482
|
+
"""Set a device ID identity for outgoing requests."""
|
|
483
|
+
self.device_id = device_id
|
|
484
|
+
|
|
485
|
+
def set_org_id(self, org_id: Optional[int]) -> None:
|
|
486
|
+
"""Set org ID when making requests for a B2B application."""
|
|
487
|
+
if self.credentials["app"]["type"] != 2:
|
|
488
|
+
raise ValueError("Org ID can only be set for B2B apps")
|
|
489
|
+
self.org_id = org_id
|
|
490
|
+
|
|
491
|
+
def set_auth_token(self, auth_token: str) -> None:
|
|
492
|
+
"""Set authentication token"""
|
|
493
|
+
assert self.platform == 3
|
|
494
|
+
self.auth_token = auth_token
|
|
495
|
+
|
|
496
|
+
def get_headers(self) -> Dict[str, str]:
|
|
497
|
+
"""Prepare headers"""
|
|
498
|
+
jaxl_headers = {
|
|
499
|
+
"X-JAXL-PLATFORM": str(self.platform),
|
|
500
|
+
"X-JAXL-API-KEY": f"{self.credentials['client']['key']}",
|
|
501
|
+
"X-JAXL-API-TOKEN": generate_api_token(
|
|
502
|
+
self.credentials,
|
|
503
|
+
ttl=int(os.environ.get("JAXL_API_TOKEN_EXPIRY_IN_SEC", 30)),
|
|
504
|
+
device_id=self.device_id,
|
|
505
|
+
),
|
|
506
|
+
"X-JAXL-CLIENT-EP": str(int(time.time() * 1000)),
|
|
507
|
+
}
|
|
508
|
+
if self.org_id is not None:
|
|
509
|
+
jaxl_headers["X-JAXL-ORGID"] = str(self.org_id)
|
|
510
|
+
if self.auth_token is not None:
|
|
511
|
+
jaxl_headers["X-JAXL-AUTH-TOKEN"] = self.auth_token
|
|
512
|
+
return {
|
|
513
|
+
**super().get_headers(),
|
|
514
|
+
**jaxl_headers,
|
|
515
|
+
}
|
|
516
|
+
|
|
517
|
+
def get_timeout(self) -> float:
|
|
518
|
+
"""Server can take upto 5-7sec to startup on Cloud Run,
|
|
519
|
+
use a timeout of 10-seconds."""
|
|
520
|
+
return 10.0
|
|
521
|
+
|
|
522
|
+
|
|
523
|
+
T = TypeVar("T")
|
|
524
|
+
|
|
525
|
+
|
|
526
|
+
# pylint: disable=too-many-arguments
|
|
527
|
+
def _ensure(
|
|
528
|
+
api_root: str,
|
|
529
|
+
headers: Dict[str, str],
|
|
530
|
+
session: Dict[str, Any],
|
|
531
|
+
func: Callable[..., Response[T]],
|
|
532
|
+
client_kwargs: Any = None,
|
|
533
|
+
**kwargs: Any,
|
|
534
|
+
) -> Response[T]:
|
|
535
|
+
client = JaxlApiClient(
|
|
536
|
+
api_root,
|
|
537
|
+
headers=headers,
|
|
538
|
+
**(client_kwargs or {}),
|
|
539
|
+
)
|
|
540
|
+
if session.get("idd", None) is not None:
|
|
541
|
+
client.set_device_id(session["idd"])
|
|
542
|
+
if session.get("org_id", None) is not None and client.credentials["app"][
|
|
543
|
+
"type"
|
|
544
|
+
] in (2, 3):
|
|
545
|
+
client.set_org_id(session["org_id"])
|
|
546
|
+
return func(client=cast(AuthenticatedClient, client), **kwargs)
|
|
547
|
+
|
|
548
|
+
|
|
549
|
+
# pylint: disable=too-many-arguments,too-many-positional-arguments
|
|
550
|
+
def ensure(
|
|
551
|
+
api_root: str,
|
|
552
|
+
headers: Dict[str, str],
|
|
553
|
+
session: Dict[str, Any],
|
|
554
|
+
func: Callable[..., Response[T]],
|
|
555
|
+
client_kwargs: Any = None,
|
|
556
|
+
**kwargs: Any,
|
|
557
|
+
) -> Response[T]:
|
|
558
|
+
"""Automatically retry Jaxl API Requests."""
|
|
559
|
+
max_tries: int = 5
|
|
560
|
+
min_retry_after: int = 1
|
|
561
|
+
max_retry_after: int = 10
|
|
562
|
+
total_tries = 0
|
|
563
|
+
while total_tries < max_tries:
|
|
564
|
+
response = _ensure(
|
|
565
|
+
api_root,
|
|
566
|
+
headers=headers,
|
|
567
|
+
session=session,
|
|
568
|
+
func=func,
|
|
569
|
+
client_kwargs=client_kwargs,
|
|
570
|
+
# client_request=client_request,
|
|
571
|
+
**kwargs,
|
|
572
|
+
)
|
|
573
|
+
if response.status_code not in (502, 503, 504):
|
|
574
|
+
break
|
|
575
|
+
# Retry when status code is 502, 503, 504
|
|
576
|
+
retry_in = min(
|
|
577
|
+
min_retry_after + pow(2, total_tries % (max_tries + 1)),
|
|
578
|
+
max_retry_after,
|
|
579
|
+
)
|
|
580
|
+
# pylint: disable=logging-not-lazy
|
|
581
|
+
logger.info(
|
|
582
|
+
f"[ensure] {func.__module__}.{func.__name__} failed "
|
|
583
|
+
+ f"with status code {response.status_code}, "
|
|
584
|
+
+ f"retrying in {retry_in} seconds"
|
|
585
|
+
)
|
|
586
|
+
time.sleep(retry_in)
|
|
587
|
+
total_tries += 1
|
|
588
|
+
return response
|