wiil-python 0.0.11__tar.gz → 0.0.13__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.
- {wiil_python-0.0.11 → wiil_python-0.0.13}/PKG-INFO +5 -5
- {wiil_python-0.0.11 → wiil_python-0.0.13}/README.md +4 -4
- {wiil_python-0.0.11 → wiil_python-0.0.13}/pyproject.toml +3 -3
- {wiil_python-0.0.11 → wiil_python-0.0.13}/wiil/__init__.py +2 -2
- {wiil_python-0.0.11 → wiil_python-0.0.13}/wiil/client/__init__.py +2 -2
- {wiil_python-0.0.11 → wiil_python-0.0.13}/wiil/client/http_client.py +70 -28
- {wiil_python-0.0.11 → wiil_python-0.0.13}/wiil/client/wiil_client.py +81 -3
- {wiil_python-0.0.11 → wiil_python-0.0.13}/wiil/client/will_service.py +127 -89
- {wiil_python-0.0.11 → wiil_python-0.0.13}/wiil/models/__init__.py +818 -607
- {wiil_python-0.0.11 → wiil_python-0.0.13}/wiil/models/account/organization.py +31 -14
- {wiil_python-0.0.11 → wiil_python-0.0.13}/wiil/models/account/project.py +5 -21
- {wiil_python-0.0.11 → wiil_python-0.0.13}/wiil/models/assistant_setups/assistant_setup_result.py +4 -9
- {wiil_python-0.0.11 → wiil_python-0.0.13}/wiil/models/assistant_setups/base_assistant_setup.py +2 -7
- {wiil_python-0.0.11 → wiil_python-0.0.13}/wiil/models/base.py +38 -20
- wiil_python-0.0.13/wiil/models/business_mgt/__init__.py +804 -0
- wiil_python-0.0.13/wiil/models/business_mgt/bookings_shared.py +35 -0
- wiil_python-0.0.13/wiil/models/business_mgt/business_location.py +145 -0
- wiil_python-0.0.13/wiil/models/business_mgt/customer_management/__init__.py +47 -0
- wiil_python-0.0.13/wiil/models/business_mgt/customer_management/customer.py +136 -0
- wiil_python-0.0.13/wiil/models/business_mgt/customer_management/customer_group.py +59 -0
- wiil_python-0.0.13/wiil/models/business_mgt/customer_management/shipping_address.py +115 -0
- wiil_python-0.0.13/wiil/models/business_mgt/discount_rule.py +201 -0
- wiil_python-0.0.13/wiil/models/business_mgt/menu_management/__init__.py +193 -0
- wiil_python-0.0.13/wiil/models/business_mgt/menu_management/menu_catalog.py +44 -0
- wiil_python-0.0.13/wiil/models/business_mgt/menu_management/menu_config.py +199 -0
- wiil_python-0.0.13/wiil/models/business_mgt/menu_management/menu_item_variant.py +134 -0
- wiil_python-0.0.13/wiil/models/business_mgt/menu_management/menu_order.py +268 -0
- wiil_python-0.0.13/wiil/models/business_mgt/menu_management/menu_pricing_rule.py +165 -0
- wiil_python-0.0.13/wiil/models/business_mgt/menu_management/menu_set.py +305 -0
- wiil_python-0.0.13/wiil/models/business_mgt/menu_management/modifier.py +543 -0
- wiil_python-0.0.13/wiil/models/business_mgt/order.py +183 -0
- wiil_python-0.0.13/wiil/models/business_mgt/pricing_rule_shared.py +70 -0
- wiil_python-0.0.13/wiil/models/business_mgt/product_management/__init__.py +187 -0
- wiil_python-0.0.13/wiil/models/business_mgt/product_management/product_axis_binding.py +38 -0
- wiil_python-0.0.13/wiil/models/business_mgt/product_management/product_config.py +530 -0
- wiil_python-0.0.13/wiil/models/business_mgt/product_management/product_display.py +46 -0
- wiil_python-0.0.13/wiil/models/business_mgt/product_management/product_order.py +240 -0
- wiil_python-0.0.13/wiil/models/business_mgt/product_management/product_pricing_rule.py +122 -0
- wiil_python-0.0.13/wiil/models/business_mgt/product_management/product_set.py +268 -0
- wiil_python-0.0.13/wiil/models/business_mgt/product_management/product_variant.py +236 -0
- wiil_python-0.0.13/wiil/models/business_mgt/product_management/product_variant_axis.py +81 -0
- wiil_python-0.0.13/wiil/models/business_mgt/property_management/__init__.py +55 -0
- wiil_python-0.0.13/wiil/models/business_mgt/property_management/property_config.py +378 -0
- wiil_python-0.0.13/wiil/models/business_mgt/property_management/property_inquiry.py +241 -0
- wiil_python-0.0.13/wiil/models/business_mgt/reservation_management/__init__.py +317 -0
- wiil_python-0.0.13/wiil/models/business_mgt/reservation_management/assignment/__init__.py +49 -0
- wiil_python-0.0.13/wiil/models/business_mgt/reservation_management/assignment/rental_assignment.py +89 -0
- wiil_python-0.0.13/wiil/models/business_mgt/reservation_management/assignment/room_assignment.py +74 -0
- wiil_python-0.0.13/wiil/models/business_mgt/reservation_management/assignment/table_assignment.py +74 -0
- wiil_python-0.0.13/wiil/models/business_mgt/reservation_management/reservation.py +68 -0
- wiil_python-0.0.13/wiil/models/business_mgt/reservation_management/reservation_floor_plan_definition.py +83 -0
- wiil_python-0.0.13/wiil/models/business_mgt/reservation_management/reservation_maintenance_block.py +80 -0
- wiil_python-0.0.13/wiil/models/business_mgt/reservation_management/reservation_rental.py +179 -0
- wiil_python-0.0.13/wiil/models/business_mgt/reservation_management/reservation_resource.py +36 -0
- wiil_python-0.0.13/wiil/models/business_mgt/reservation_management/reservation_room.py +144 -0
- wiil_python-0.0.13/wiil/models/business_mgt/reservation_management/reservation_section.py +163 -0
- wiil_python-0.0.13/wiil/models/business_mgt/reservation_management/reservation_settings.py +150 -0
- wiil_python-0.0.13/wiil/models/business_mgt/reservation_management/reservation_slot_query.py +279 -0
- wiil_python-0.0.13/wiil/models/business_mgt/reservation_management/reservation_table.py +117 -0
- wiil_python-0.0.13/wiil/models/business_mgt/reservation_management/reservation_table_layout.py +82 -0
- wiil_python-0.0.13/wiil/models/business_mgt/reservation_management/resource/__init__.py +111 -0
- wiil_python-0.0.13/wiil/models/business_mgt/reservation_management/resource/resource.py +454 -0
- wiil_python-0.0.13/wiil/models/business_mgt/reservation_management/resource/resource_category.py +106 -0
- wiil_python-0.0.13/wiil/models/business_mgt/reservation_management/resource/resource_instance.py +111 -0
- wiil_python-0.0.13/wiil/models/business_mgt/reservation_management/resource/resource_versioning.py +113 -0
- wiil_python-0.0.13/wiil/models/business_mgt/service_config.py +463 -0
- wiil_python-0.0.13/wiil/models/business_mgt/service_management/__init__.py +115 -0
- wiil_python-0.0.13/wiil/models/business_mgt/service_management/appointment_additional_info.py +61 -0
- wiil_python-0.0.13/wiil/models/business_mgt/service_management/appointment_field_config.py +91 -0
- wiil_python-0.0.13/wiil/models/business_mgt/service_management/service_appointment.py +158 -0
- wiil_python-0.0.13/wiil/models/business_mgt/service_management/service_person.py +94 -0
- wiil_python-0.0.13/wiil/models/business_mgt/service_management/service_pricing_rule.py +133 -0
- wiil_python-0.0.13/wiil/models/business_mgt/service_management/service_provider.py +85 -0
- wiil_python-0.0.13/wiil/models/business_mgt/service_management/service_slot_query.py +67 -0
- wiil_python-0.0.13/wiil/models/business_mgt/service_management/service_time_off.py +80 -0
- wiil_python-0.0.13/wiil/models/business_mgt/tax_rule.py +167 -0
- wiil_python-0.0.13/wiil/models/conversation/__init__.py +195 -0
- {wiil_python-0.0.11 → wiil_python-0.0.13}/wiil/models/conversation/conversation_config.py +422 -539
- {wiil_python-0.0.11 → wiil_python-0.0.13}/wiil/models/conversation/conversation_message.py +72 -44
- wiil_python-0.0.13/wiil/models/conversation/outbound_call.py +311 -0
- wiil_python-0.0.13/wiil/models/conversation/outbound_email.py +382 -0
- wiil_python-0.0.13/wiil/models/conversation/outbound_sms.py +253 -0
- wiil_python-0.0.13/wiil/models/conversation/outbound_template.py +186 -0
- {wiil_python-0.0.11 → wiil_python-0.0.13}/wiil/models/conversation/translation_config.py +137 -156
- {wiil_python-0.0.11 → wiil_python-0.0.13}/wiil/models/conversation/translation_conversation.py +9 -52
- {wiil_python-0.0.11 → wiil_python-0.0.13}/wiil/models/request/paginated_query.py +3 -6
- {wiil_python-0.0.11 → wiil_python-0.0.13}/wiil/models/request/paginated_result.py +3 -26
- {wiil_python-0.0.11 → wiil_python-0.0.13}/wiil/models/service_mgt/agent_config.py +29 -34
- {wiil_python-0.0.11 → wiil_python-0.0.13}/wiil/models/service_mgt/call_transfer_config.py +4 -9
- {wiil_python-0.0.11 → wiil_python-0.0.13}/wiil/models/service_mgt/deployment_config.py +9 -56
- {wiil_python-0.0.11 → wiil_python-0.0.13}/wiil/models/service_mgt/dynamic_setup/base_agent_setup.py +204 -229
- {wiil_python-0.0.11 → wiil_python-0.0.13}/wiil/models/service_mgt/dynamic_setup/phone_agent_setup.py +3 -15
- {wiil_python-0.0.11 → wiil_python-0.0.13}/wiil/models/service_mgt/dynamic_setup/web_agent_setup.py +9 -17
- {wiil_python-0.0.11 → wiil_python-0.0.13}/wiil/models/service_mgt/instruction_config.py +5 -24
- {wiil_python-0.0.11 → wiil_python-0.0.13}/wiil/models/service_mgt/interaction_channels.py +24 -119
- {wiil_python-0.0.11 → wiil_python-0.0.13}/wiil/models/service_mgt/knowledge.py +3 -9
- {wiil_python-0.0.11 → wiil_python-0.0.13}/wiil/models/service_mgt/phone_config.py +6 -19
- {wiil_python-0.0.11 → wiil_python-0.0.13}/wiil/models/service_mgt/phone_number.py +10 -59
- {wiil_python-0.0.11 → wiil_python-0.0.13}/wiil/models/service_mgt/provisioning_config.py +10 -59
- {wiil_python-0.0.11 → wiil_python-0.0.13}/wiil/models/service_mgt/support_llm.py +3 -9
- {wiil_python-0.0.11 → wiil_python-0.0.13}/wiil/models/service_mgt/voice_language.py +5 -16
- {wiil_python-0.0.11 → wiil_python-0.0.13}/wiil/models/type_definitions/__init__.py +81 -0
- {wiil_python-0.0.11 → wiil_python-0.0.13}/wiil/models/type_definitions/account_definitions.py +1 -4
- {wiil_python-0.0.11 → wiil_python-0.0.13}/wiil/models/type_definitions/business_definitions.py +214 -3
- {wiil_python-0.0.11 → wiil_python-0.0.13}/wiil/models/type_definitions/conversation_definitions.py +40 -0
- wiil_python-0.0.13/wiil/models/type_definitions/display_order.py +360 -0
- {wiil_python-0.0.11 → wiil_python-0.0.13}/wiil/models/type_definitions/dynamic_fields/field_definition.py +2 -36
- {wiil_python-0.0.11 → wiil_python-0.0.13}/wiil/models/type_definitions/service_config_definitions.py +19 -1
- {wiil_python-0.0.11 → wiil_python-0.0.13}/wiil/resources/account/organizations.py +15 -0
- wiil_python-0.0.13/wiil/resources/business_mgt/__init__.py +102 -0
- wiil_python-0.0.13/wiil/resources/business_mgt/customer_management/__init__.py +11 -0
- wiil_python-0.0.13/wiil/resources/business_mgt/customer_management/customer_groups.py +144 -0
- wiil_python-0.0.13/wiil/resources/business_mgt/customer_management/shipping_addresses.py +162 -0
- wiil_python-0.0.13/wiil/resources/business_mgt/location_management/__init__.py +7 -0
- wiil_python-0.0.13/wiil/resources/business_mgt/location_management/business_locations.py +170 -0
- wiil_python-0.0.13/wiil/resources/business_mgt/menu_management/__init__.py +17 -0
- wiil_python-0.0.13/wiil/resources/business_mgt/menu_management/menu_item_variants.py +120 -0
- {wiil_python-0.0.11/wiil/resources/business_mgt → wiil_python-0.0.13/wiil/resources/business_mgt/menu_management}/menu_orders.py +17 -0
- wiil_python-0.0.13/wiil/resources/business_mgt/menu_management/menu_pricing_rules.py +183 -0
- wiil_python-0.0.13/wiil/resources/business_mgt/menu_management/menu_sets.py +145 -0
- {wiil_python-0.0.11/wiil/resources/business_mgt → wiil_python-0.0.13/wiil/resources/business_mgt/menu_management}/menus.py +139 -72
- wiil_python-0.0.13/wiil/resources/business_mgt/menu_management/modifiers.py +399 -0
- wiil_python-0.0.13/wiil/resources/business_mgt/pricing_rules/__init__.py +6 -0
- wiil_python-0.0.13/wiil/resources/business_mgt/pricing_rules/discount_rules.py +216 -0
- wiil_python-0.0.13/wiil/resources/business_mgt/pricing_rules/tax_rules.py +190 -0
- wiil_python-0.0.13/wiil/resources/business_mgt/product_management/__init__.py +19 -0
- wiil_python-0.0.13/wiil/resources/business_mgt/product_management/product_axis_bindings.py +164 -0
- {wiil_python-0.0.11/wiil/resources/business_mgt → wiil_python-0.0.13/wiil/resources/business_mgt/product_management}/product_orders.py +17 -0
- wiil_python-0.0.13/wiil/resources/business_mgt/product_management/product_pricing_rules.py +126 -0
- wiil_python-0.0.13/wiil/resources/business_mgt/product_management/product_sets.py +153 -0
- wiil_python-0.0.13/wiil/resources/business_mgt/product_management/product_variant_axes.py +133 -0
- wiil_python-0.0.13/wiil/resources/business_mgt/product_management/product_variants.py +128 -0
- {wiil_python-0.0.11/wiil/resources/business_mgt → wiil_python-0.0.13/wiil/resources/business_mgt/product_management}/products.py +27 -2
- wiil_python-0.0.13/wiil/resources/business_mgt/property_management/__init__.py +9 -0
- wiil_python-0.0.13/wiil/resources/business_mgt/reservation_management/__init__.py +37 -0
- wiil_python-0.0.13/wiil/resources/business_mgt/reservation_management/floor_plan_sections.py +161 -0
- wiil_python-0.0.13/wiil/resources/business_mgt/reservation_management/floor_plans.py +143 -0
- wiil_python-0.0.13/wiil/resources/business_mgt/reservation_management/maintenance_blocks.py +195 -0
- wiil_python-0.0.13/wiil/resources/business_mgt/reservation_management/rental_assignments.py +132 -0
- wiil_python-0.0.13/wiil/resources/business_mgt/reservation_management/rental_reservations.py +244 -0
- wiil_python-0.0.13/wiil/resources/business_mgt/reservation_management/reservation_settings.py +80 -0
- wiil_python-0.0.13/wiil/resources/business_mgt/reservation_management/resource_categories.py +178 -0
- wiil_python-0.0.13/wiil/resources/business_mgt/reservation_management/resource_instances.py +208 -0
- wiil_python-0.0.13/wiil/resources/business_mgt/reservation_management/room_assignments.py +117 -0
- wiil_python-0.0.13/wiil/resources/business_mgt/reservation_management/room_reservations.py +215 -0
- wiil_python-0.0.13/wiil/resources/business_mgt/reservation_management/table_assignments.py +117 -0
- wiil_python-0.0.13/wiil/resources/business_mgt/reservation_management/table_reservations.py +215 -0
- wiil_python-0.0.13/wiil/resources/business_mgt/service_management/__init__.py +23 -0
- wiil_python-0.0.13/wiil/resources/business_mgt/service_management/appointment_additional_info.py +116 -0
- wiil_python-0.0.13/wiil/resources/business_mgt/service_management/appointment_field_configs.py +123 -0
- {wiil_python-0.0.11/wiil/resources/business_mgt → wiil_python-0.0.13/wiil/resources/business_mgt/service_management}/business_services.py +35 -27
- wiil_python-0.0.13/wiil/resources/business_mgt/service_management/service_appointments.py +272 -0
- wiil_python-0.0.13/wiil/resources/business_mgt/service_management/service_categories.py +134 -0
- wiil_python-0.0.13/wiil/resources/business_mgt/service_management/service_persons.py +143 -0
- wiil_python-0.0.13/wiil/resources/business_mgt/service_management/service_pricing_rules.py +143 -0
- wiil_python-0.0.13/wiil/resources/business_mgt/service_management/service_providers.py +160 -0
- wiil_python-0.0.13/wiil/resources/business_mgt/service_management/service_time_offs.py +189 -0
- wiil_python-0.0.13/wiil/resources/conversation/__init__.py +15 -0
- wiil_python-0.0.13/wiil/resources/conversation/outbound_calls.py +231 -0
- wiil_python-0.0.13/wiil/resources/conversation/outbound_emails.py +237 -0
- wiil_python-0.0.13/wiil/resources/conversation/outbound_sms.py +234 -0
- wiil_python-0.0.13/wiil/resources/conversation/outbound_templates.py +208 -0
- wiil_python-0.0.13/wiil/resources/conversation/translation_services.py +241 -0
- {wiil_python-0.0.11 → wiil_python-0.0.13}/wiil/resources/service_mgt/deployment_channels.py +15 -0
- {wiil_python-0.0.11 → wiil_python-0.0.13}/wiil/resources/service_mgt/deployment_configs.py +38 -19
- {wiil_python-0.0.11 → wiil_python-0.0.13}/wiil/resources/service_mgt/dynamic_web_agent.py +17 -0
- {wiil_python-0.0.11 → wiil_python-0.0.13}/wiil/resources/service_mgt/instruction_configs.py +40 -0
- {wiil_python-0.0.11 → wiil_python-0.0.13}/wiil/resources/service_mgt/provisioning_configs.py +26 -5
- {wiil_python-0.0.11 → wiil_python-0.0.13}/wiil/resources/service_mgt/support_models.py +10 -9
- {wiil_python-0.0.11 → wiil_python-0.0.13}/wiil/resources/service_mgt/telephony_provider.py +8 -7
- {wiil_python-0.0.11 → wiil_python-0.0.13}/wiil/services/__init__.py +17 -15
- wiil_python-0.0.13/wiil/services/messaging/__init__.py +5 -0
- wiil_python-0.0.13/wiil/services/messaging/service.py +384 -0
- {wiil_python-0.0.11 → wiil_python-0.0.13}/wiil/services/translation/service.py +2 -9
- {wiil_python-0.0.11 → wiil_python-0.0.13}/wiil/types/__init__.py +18 -0
- {wiil_python-0.0.11 → wiil_python-0.0.13}/wiil/types/business_types.py +48 -1
- {wiil_python-0.0.11 → wiil_python-0.0.13}/wiil/types/conversation_types.py +81 -0
- {wiil_python-0.0.11 → wiil_python-0.0.13}/wiil/types/paginated_result.py +2 -2
- {wiil_python-0.0.11 → wiil_python-0.0.13}/wiil/types/service_types.py +9 -0
- {wiil_python-0.0.11 → wiil_python-0.0.13}/wiil_python.egg-info/PKG-INFO +5 -5
- wiil_python-0.0.13/wiil_python.egg-info/SOURCES.txt +223 -0
- wiil_python-0.0.11/wiil/models/business_mgt/__init__.py +0 -247
- wiil_python-0.0.11/wiil/models/business_mgt/appointment_additional_info.py +0 -149
- wiil_python-0.0.11/wiil/models/business_mgt/appointment_field_config.py +0 -157
- wiil_python-0.0.11/wiil/models/business_mgt/customer.py +0 -225
- wiil_python-0.0.11/wiil/models/business_mgt/menu_config.py +0 -345
- wiil_python-0.0.11/wiil/models/business_mgt/menu_order.py +0 -501
- wiil_python-0.0.11/wiil/models/business_mgt/order.py +0 -181
- wiil_python-0.0.11/wiil/models/business_mgt/product_config.py +0 -344
- wiil_python-0.0.11/wiil/models/business_mgt/product_order.py +0 -519
- wiil_python-0.0.11/wiil/models/business_mgt/property_config.py +0 -576
- wiil_python-0.0.11/wiil/models/business_mgt/property_inquiry.py +0 -362
- wiil_python-0.0.11/wiil/models/business_mgt/reservation.py +0 -323
- wiil_python-0.0.11/wiil/models/business_mgt/reservation_resource.py +0 -328
- wiil_python-0.0.11/wiil/models/business_mgt/service_appointment.py +0 -215
- wiil_python-0.0.11/wiil/models/business_mgt/service_config.py +0 -204
- wiil_python-0.0.11/wiil/models/business_mgt/service_person.py +0 -107
- wiil_python-0.0.11/wiil/models/conversation/__init__.py +0 -89
- wiil_python-0.0.11/wiil/resources/business_mgt/__init__.py +0 -27
- wiil_python-0.0.11/wiil/resources/business_mgt/reservations.py +0 -164
- wiil_python-0.0.11/wiil/resources/business_mgt/service_appointments.py +0 -130
- wiil_python-0.0.11/wiil_python.egg-info/SOURCES.txt +0 -124
- {wiil_python-0.0.11 → wiil_python-0.0.13}/setup.cfg +0 -0
- {wiil_python-0.0.11 → wiil_python-0.0.13}/setup.py +0 -0
- {wiil_python-0.0.11 → wiil_python-0.0.13}/wiil/client/async_wiil_client.py +0 -0
- {wiil_python-0.0.11 → wiil_python-0.0.13}/wiil/client/types.py +0 -0
- {wiil_python-0.0.11 → wiil_python-0.0.13}/wiil/errors/__init__.py +0 -0
- {wiil_python-0.0.11 → wiil_python-0.0.13}/wiil/errors/exceptions.py +0 -0
- {wiil_python-0.0.11 → wiil_python-0.0.13}/wiil/models/account/__init__.py +0 -0
- {wiil_python-0.0.11 → wiil_python-0.0.13}/wiil/models/account/supported_business_verticals.py +0 -0
- {wiil_python-0.0.11 → wiil_python-0.0.13}/wiil/models/assistant_setups/__init__.py +0 -0
- {wiil_python-0.0.11 → wiil_python-0.0.13}/wiil/models/assistant_setups/phone_assistant_setup.py +0 -0
- {wiil_python-0.0.11 → wiil_python-0.0.13}/wiil/models/assistant_setups/web_assistant_setup.py +0 -0
- {wiil_python-0.0.11 → wiil_python-0.0.13}/wiil/models/request/__init__.py +0 -0
- {wiil_python-0.0.11 → wiil_python-0.0.13}/wiil/models/service_mgt/__init__.py +0 -0
- {wiil_python-0.0.11 → wiil_python-0.0.13}/wiil/models/service_mgt/dynamic_setup/__init__.py +0 -0
- {wiil_python-0.0.11 → wiil_python-0.0.13}/wiil/models/type_definitions/dynamic_fields/__init__.py +0 -0
- {wiil_python-0.0.11 → wiil_python-0.0.13}/wiil/models/type_definitions/dynamic_fields/field_types.py +0 -0
- {wiil_python-0.0.11 → wiil_python-0.0.13}/wiil/models/type_definitions/knowledge_definitions.py +0 -0
- {wiil_python-0.0.11 → wiil_python-0.0.13}/wiil/py.typed +0 -0
- {wiil_python-0.0.11 → wiil_python-0.0.13}/wiil/resources/__init__.py +0 -0
- {wiil_python-0.0.11 → wiil_python-0.0.13}/wiil/resources/account/__init__.py +0 -0
- {wiil_python-0.0.11 → wiil_python-0.0.13}/wiil/resources/account/projects.py +0 -0
- {wiil_python-0.0.11/wiil/resources/business_mgt → wiil_python-0.0.13/wiil/resources/business_mgt/customer_management}/customers.py +0 -0
- {wiil_python-0.0.11/wiil/resources/business_mgt → wiil_python-0.0.13/wiil/resources/business_mgt/property_management}/property_config.py +0 -0
- {wiil_python-0.0.11/wiil/resources/business_mgt → wiil_python-0.0.13/wiil/resources/business_mgt/property_management}/property_inquiry.py +0 -0
- {wiil_python-0.0.11/wiil/resources/business_mgt → wiil_python-0.0.13/wiil/resources/business_mgt/reservation_management}/reservation_resources.py +0 -0
- {wiil_python-0.0.11 → wiil_python-0.0.13}/wiil/resources/service_mgt/__init__.py +0 -0
- {wiil_python-0.0.11 → wiil_python-0.0.13}/wiil/resources/service_mgt/agent_configs.py +0 -0
- {wiil_python-0.0.11 → wiil_python-0.0.13}/wiil/resources/service_mgt/conversation_configs.py +0 -0
- {wiil_python-0.0.11 → wiil_python-0.0.13}/wiil/resources/service_mgt/dynamic_agent_status.py +0 -0
- {wiil_python-0.0.11 → wiil_python-0.0.13}/wiil/resources/service_mgt/dynamic_phone_agent.py +0 -0
- {wiil_python-0.0.11 → wiil_python-0.0.13}/wiil/resources/service_mgt/knowledge_sources.py +0 -0
- {wiil_python-0.0.11 → wiil_python-0.0.13}/wiil/resources/service_mgt/phone_configs.py +0 -0
- {wiil_python-0.0.11 → wiil_python-0.0.13}/wiil/resources/service_mgt/translation_sessions.py +0 -0
- {wiil_python-0.0.11 → wiil_python-0.0.13}/wiil/services/ott/__init__.py +0 -0
- {wiil_python-0.0.11 → wiil_python-0.0.13}/wiil/services/ott/models.py +0 -0
- {wiil_python-0.0.11 → wiil_python-0.0.13}/wiil/services/ott/service.py +0 -0
- {wiil_python-0.0.11 → wiil_python-0.0.13}/wiil/services/translation/__init__.py +0 -0
- {wiil_python-0.0.11 → wiil_python-0.0.13}/wiil/services/translation/models.py +0 -0
- {wiil_python-0.0.11 → wiil_python-0.0.13}/wiil/types/account_types.py +0 -0
- {wiil_python-0.0.11 → wiil_python-0.0.13}/wiil/types/knowledge_types.py +0 -0
- {wiil_python-0.0.11 → wiil_python-0.0.13}/wiil/types/paginated_quest.py +0 -0
- {wiil_python-0.0.11 → wiil_python-0.0.13}/wiil_python.egg-info/dependency_links.txt +0 -0
- {wiil_python-0.0.11 → wiil_python-0.0.13}/wiil_python.egg-info/requires.txt +0 -0
- {wiil_python-0.0.11 → wiil_python-0.0.13}/wiil_python.egg-info/top_level.txt +0 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: wiil-python
|
|
3
|
-
Version: 0.0.
|
|
3
|
+
Version: 0.0.13
|
|
4
4
|
Summary: Official Python SDK for WIIL Platform - AI-powered conversational services for intelligent customer interactions, voice processing, real-time translation, and business management
|
|
5
5
|
Author-email: WIIL <dev-support@wiil.io>
|
|
6
6
|
License: MIT
|
|
@@ -509,14 +509,14 @@ import asyncio
|
|
|
509
509
|
asyncio.run(main())
|
|
510
510
|
```
|
|
511
511
|
|
|
512
|
-
##
|
|
512
|
+
## WiilService (OTT + Translation)
|
|
513
513
|
|
|
514
|
-
`
|
|
514
|
+
`WiilService` is a service-focused client exposes high-level workflows for OTT and translation services.
|
|
515
515
|
|
|
516
516
|
```python
|
|
517
|
-
from wiil import
|
|
517
|
+
from wiil import WiilService
|
|
518
518
|
|
|
519
|
-
service =
|
|
519
|
+
service = WiilService(api_key="your-api-key")
|
|
520
520
|
|
|
521
521
|
# Create translation connection config
|
|
522
522
|
translation = service.translation.create_connection_config(
|
|
@@ -470,14 +470,14 @@ import asyncio
|
|
|
470
470
|
asyncio.run(main())
|
|
471
471
|
```
|
|
472
472
|
|
|
473
|
-
##
|
|
473
|
+
## WiilService (OTT + Translation)
|
|
474
474
|
|
|
475
|
-
`
|
|
475
|
+
`WiilService` is a service-focused client exposes high-level workflows for OTT and translation services.
|
|
476
476
|
|
|
477
477
|
```python
|
|
478
|
-
from wiil import
|
|
478
|
+
from wiil import WiilService
|
|
479
479
|
|
|
480
|
-
service =
|
|
480
|
+
service = WiilService(api_key="your-api-key")
|
|
481
481
|
|
|
482
482
|
# Create translation connection config
|
|
483
483
|
translation = service.translation.create_connection_config(
|
|
@@ -4,7 +4,7 @@ build-backend = "setuptools.build_meta"
|
|
|
4
4
|
|
|
5
5
|
[project]
|
|
6
6
|
name = "wiil-python"
|
|
7
|
-
version = "0.0.
|
|
7
|
+
version = "0.0.13"
|
|
8
8
|
description = "Official Python SDK for WIIL Platform - AI-powered conversational services for intelligent customer interactions, voice processing, real-time translation, and business management"
|
|
9
9
|
readme = "README.md"
|
|
10
10
|
requires-python = ">=3.8"
|
|
@@ -90,7 +90,7 @@ target-version = ["py38", "py39", "py310", "py311", "py312"]
|
|
|
90
90
|
|
|
91
91
|
[tool.ruff]
|
|
92
92
|
line-length = 100
|
|
93
|
-
target-version = "0.0.
|
|
93
|
+
target-version = "0.0.13"
|
|
94
94
|
select = [
|
|
95
95
|
"E", # pycodestyle errors
|
|
96
96
|
"W", # pycodestyle warnings
|
|
@@ -109,7 +109,7 @@ ignore = [
|
|
|
109
109
|
"__init__.py" = ["F401"]
|
|
110
110
|
|
|
111
111
|
[tool.mypy]
|
|
112
|
-
python_version = "0.0.
|
|
112
|
+
python_version = "0.0.13"
|
|
113
113
|
strict = true
|
|
114
114
|
warn_return_any = true
|
|
115
115
|
warn_unused_configs = true
|
|
@@ -5,7 +5,7 @@ for intelligent customer interactions, voice processing, real-time translation,
|
|
|
5
5
|
and business management.
|
|
6
6
|
"""
|
|
7
7
|
|
|
8
|
-
from wiil.client import AsyncWiilClient, WiilClient,
|
|
8
|
+
from wiil.client import AsyncWiilClient, WiilClient, WiilService
|
|
9
9
|
from wiil.errors import (
|
|
10
10
|
WiilAPIError,
|
|
11
11
|
WiilConfigurationError,
|
|
@@ -18,7 +18,7 @@ __version__ = "0.0.0"
|
|
|
18
18
|
__all__ = [
|
|
19
19
|
"WiilClient",
|
|
20
20
|
"AsyncWiilClient",
|
|
21
|
-
"
|
|
21
|
+
"WiilService",
|
|
22
22
|
"WiilError",
|
|
23
23
|
"WiilAPIError",
|
|
24
24
|
"WiilValidationError",
|
|
@@ -3,13 +3,13 @@
|
|
|
3
3
|
from wiil.client.types import WiilClientConfig, APIResponse, APIErrorResponse
|
|
4
4
|
from wiil.client.http_client import HttpClient
|
|
5
5
|
from wiil.client.async_wiil_client import AsyncWiilClient
|
|
6
|
-
from wiil.client.will_service import
|
|
6
|
+
from wiil.client.will_service import WiilService
|
|
7
7
|
from wiil.client.wiil_client import WiilClient
|
|
8
8
|
|
|
9
9
|
__all__ = [
|
|
10
10
|
'WiilClient',
|
|
11
11
|
'AsyncWiilClient',
|
|
12
|
-
'
|
|
12
|
+
'WiilService',
|
|
13
13
|
'WiilClientConfig',
|
|
14
14
|
'HttpClient',
|
|
15
15
|
'APIResponse',
|
|
@@ -180,7 +180,12 @@ class HttpClient:
|
|
|
180
180
|
if schema:
|
|
181
181
|
try:
|
|
182
182
|
if isinstance(data, dict):
|
|
183
|
-
|
|
183
|
+
# Validate in JSON mode so wire-format values (e.g. string
|
|
184
|
+
# enum members produced by model_dump under
|
|
185
|
+
# use_enum_values=True) are accepted while strict type and
|
|
186
|
+
# extra-key checks remain enforced — mirrors the response
|
|
187
|
+
# validation path.
|
|
188
|
+
validated_data = schema.model_validate_json(json.dumps(data))
|
|
184
189
|
data = validated_data.model_dump(by_alias=True, exclude_none=True)
|
|
185
190
|
elif isinstance(data, BaseModel):
|
|
186
191
|
data = data.model_dump(by_alias=True, exclude_none=True)
|
|
@@ -274,7 +279,12 @@ class HttpClient:
|
|
|
274
279
|
if schema:
|
|
275
280
|
try:
|
|
276
281
|
if isinstance(data, dict):
|
|
277
|
-
|
|
282
|
+
# Validate in JSON mode so wire-format values (e.g. string
|
|
283
|
+
# enum members produced by model_dump under
|
|
284
|
+
# use_enum_values=True) are accepted while strict type and
|
|
285
|
+
# extra-key checks remain enforced — mirrors the response
|
|
286
|
+
# validation path.
|
|
287
|
+
validated_data = schema.model_validate_json(json.dumps(data))
|
|
278
288
|
data = validated_data.model_dump(by_alias=True, exclude_none=True)
|
|
279
289
|
elif isinstance(data, BaseModel):
|
|
280
290
|
data = data.model_dump(by_alias=True, exclude_none=True)
|
|
@@ -368,7 +378,12 @@ class HttpClient:
|
|
|
368
378
|
if schema:
|
|
369
379
|
try:
|
|
370
380
|
if isinstance(data, dict):
|
|
371
|
-
|
|
381
|
+
# Validate in JSON mode so wire-format values (e.g. string
|
|
382
|
+
# enum members produced by model_dump under
|
|
383
|
+
# use_enum_values=True) are accepted while strict type and
|
|
384
|
+
# extra-key checks remain enforced — mirrors the response
|
|
385
|
+
# validation path.
|
|
386
|
+
validated_data = schema.model_validate_json(json.dumps(data))
|
|
372
387
|
data = validated_data.model_dump(by_alias=True, exclude_none=True)
|
|
373
388
|
elif isinstance(data, BaseModel):
|
|
374
389
|
data = data.model_dump(by_alias=True, exclude_none=True)
|
|
@@ -562,17 +577,33 @@ class HttpClient:
|
|
|
562
577
|
details=response_data.get('meta')
|
|
563
578
|
)
|
|
564
579
|
|
|
565
|
-
def _to_attr_obj(self, value: Any) -> Any:
|
|
566
|
-
"""Recursively convert dict payloads into attribute-accessible mappings."""
|
|
567
|
-
if isinstance(value, dict):
|
|
568
|
-
return AttrDict({k: self._to_attr_obj(v) for k, v in value.items()})
|
|
569
|
-
if isinstance(value, list):
|
|
570
|
-
return [self._to_attr_obj(item) for item in value]
|
|
571
|
-
return value
|
|
572
|
-
|
|
573
|
-
def
|
|
574
|
-
|
|
575
|
-
|
|
580
|
+
def _to_attr_obj(self, value: Any) -> Any:
|
|
581
|
+
"""Recursively convert dict payloads into attribute-accessible mappings."""
|
|
582
|
+
if isinstance(value, dict):
|
|
583
|
+
return AttrDict({k: self._to_attr_obj(v) for k, v in value.items()})
|
|
584
|
+
if isinstance(value, list):
|
|
585
|
+
return [self._to_attr_obj(item) for item in value]
|
|
586
|
+
return value
|
|
587
|
+
|
|
588
|
+
def _validate_response_json(self, model: Type[T], data: Any) -> T:
|
|
589
|
+
"""Validate response JSON while tolerating additive API fields.
|
|
590
|
+
|
|
591
|
+
The reference TypeScript schemas use Zod objects, which strip unknown
|
|
592
|
+
keys by default. Request validation remains strict in the HTTP verb
|
|
593
|
+
methods; this response-only path mirrors the reference behavior for
|
|
594
|
+
forward-compatible reads.
|
|
595
|
+
"""
|
|
596
|
+
payload = json.dumps(data)
|
|
597
|
+
try:
|
|
598
|
+
return model.model_validate_json(payload, extra="ignore")
|
|
599
|
+
except TypeError as exc:
|
|
600
|
+
if "extra" not in str(exc):
|
|
601
|
+
raise
|
|
602
|
+
return model.model_validate_json(payload)
|
|
603
|
+
|
|
604
|
+
def _parse_response(
|
|
605
|
+
self,
|
|
606
|
+
data: Any,
|
|
576
607
|
response_model: Optional[Type[T]] = None
|
|
577
608
|
) -> Union[T, Any]:
|
|
578
609
|
"""Parse response data into a Pydantic model if specified.
|
|
@@ -598,20 +629,31 @@ class HttpClient:
|
|
|
598
629
|
if response_model in (bool, int, str, float):
|
|
599
630
|
return data
|
|
600
631
|
|
|
601
|
-
try:
|
|
602
|
-
#
|
|
603
|
-
|
|
604
|
-
|
|
605
|
-
|
|
606
|
-
|
|
607
|
-
|
|
608
|
-
|
|
609
|
-
|
|
610
|
-
|
|
611
|
-
|
|
612
|
-
|
|
613
|
-
|
|
614
|
-
|
|
632
|
+
try:
|
|
633
|
+
# Validate in JSON mode so wire-format values (e.g. string enum
|
|
634
|
+
# members) are accepted. Unknown response keys are ignored to match
|
|
635
|
+
# ref-core Zod object parsing, which strips additive fields by
|
|
636
|
+
# default. The data originates from response.json(), so re-encoding
|
|
637
|
+
# is lossless for JSON-native types.
|
|
638
|
+
# Handle List[Model] types
|
|
639
|
+
origin = get_origin(response_model)
|
|
640
|
+
if origin is list:
|
|
641
|
+
args = get_args(response_model)
|
|
642
|
+
if args and isinstance(data, list):
|
|
643
|
+
item_model = args[0]
|
|
644
|
+
return [
|
|
645
|
+
self._validate_response_json(item_model, item)
|
|
646
|
+
for item in data
|
|
647
|
+
]
|
|
648
|
+
|
|
649
|
+
# Handle single model
|
|
650
|
+
if isinstance(data, list):
|
|
651
|
+
return [
|
|
652
|
+
self._validate_response_json(response_model, item)
|
|
653
|
+
for item in data
|
|
654
|
+
]
|
|
655
|
+
|
|
656
|
+
return self._validate_response_json(response_model, data)
|
|
615
657
|
|
|
616
658
|
except ValidationError as e:
|
|
617
659
|
raise WiilValidationError(
|
|
@@ -18,17 +18,56 @@ from wiil.errors import WiilConfigurationError
|
|
|
18
18
|
# Import all resource classes
|
|
19
19
|
from wiil.resources.account import OrganizationsResource, ProjectsResource
|
|
20
20
|
from wiil.resources.business_mgt import (
|
|
21
|
+
AppointmentAdditionalInfoResource,
|
|
22
|
+
AppointmentFieldConfigsResource,
|
|
23
|
+
BusinessLocationsResource,
|
|
24
|
+
CustomerGroupsResource,
|
|
21
25
|
CustomersResource,
|
|
26
|
+
DiscountRulesResource,
|
|
27
|
+
FloorPlansResource,
|
|
28
|
+
FloorPlanSectionsResource,
|
|
29
|
+
MaintenanceBlocksResource,
|
|
30
|
+
MenuItemVariantsResource,
|
|
22
31
|
MenusResource,
|
|
23
32
|
MenuOrdersResource,
|
|
33
|
+
MenuPricingRulesResource,
|
|
34
|
+
MenuSetsResource,
|
|
35
|
+
ModifiersResource,
|
|
36
|
+
ProductAxisBindingsResource,
|
|
24
37
|
ProductsResource,
|
|
25
38
|
ProductOrdersResource,
|
|
39
|
+
ProductPricingRulesResource,
|
|
40
|
+
ProductSetsResource,
|
|
41
|
+
ProductVariantAxesResource,
|
|
42
|
+
ProductVariantsResource,
|
|
26
43
|
PropertyConfigResource,
|
|
27
44
|
PropertyInquiryResource,
|
|
28
|
-
|
|
45
|
+
RentalAssignmentsResource,
|
|
46
|
+
RentalReservationsResource,
|
|
29
47
|
ReservationResourcesResource,
|
|
30
|
-
|
|
48
|
+
ReservationSettingsResource,
|
|
49
|
+
ResourceCategoriesResource,
|
|
50
|
+
ResourceInstancesResource,
|
|
51
|
+
RoomAssignmentsResource,
|
|
52
|
+
RoomReservationsResource,
|
|
31
53
|
BusinessServicesResource,
|
|
54
|
+
ServiceAppointmentsResource,
|
|
55
|
+
ServiceCategoriesResource,
|
|
56
|
+
ServicePersonsResource,
|
|
57
|
+
ServicePricingRulesResource,
|
|
58
|
+
ServiceProvidersResource,
|
|
59
|
+
ServiceTimeOffsResource,
|
|
60
|
+
ShippingAddressesResource,
|
|
61
|
+
TableAssignmentsResource,
|
|
62
|
+
TableReservationsResource,
|
|
63
|
+
TaxRulesResource,
|
|
64
|
+
)
|
|
65
|
+
from wiil.resources.conversation import (
|
|
66
|
+
OutboundCallsResource,
|
|
67
|
+
OutboundEmailsResource,
|
|
68
|
+
OutboundSmsResource,
|
|
69
|
+
OutboundTemplatesResource,
|
|
70
|
+
TranslationServicesResource,
|
|
32
71
|
)
|
|
33
72
|
from wiil.resources.service_mgt import (
|
|
34
73
|
AgentConfigurationsResource,
|
|
@@ -137,16 +176,48 @@ class WiilClient:
|
|
|
137
176
|
|
|
138
177
|
# Business Management resources
|
|
139
178
|
self.customers = CustomersResource(self._http)
|
|
179
|
+
self.customer_groups = CustomerGroupsResource(self._http)
|
|
180
|
+
self.shipping_addresses = ShippingAddressesResource(self._http)
|
|
140
181
|
self.menus = MenusResource(self._http)
|
|
141
182
|
self.menu_orders = MenuOrdersResource(self._http)
|
|
183
|
+
self.menu_item_variants = MenuItemVariantsResource(self._http)
|
|
184
|
+
self.menu_pricing_rules = MenuPricingRulesResource(self._http)
|
|
185
|
+
self.menu_sets = MenuSetsResource(self._http)
|
|
186
|
+
self.modifiers = ModifiersResource(self._http)
|
|
142
187
|
self.products = ProductsResource(self._http)
|
|
143
188
|
self.product_orders = ProductOrdersResource(self._http)
|
|
189
|
+
self.product_variants = ProductVariantsResource(self._http)
|
|
190
|
+
self.product_variant_axes = ProductVariantAxesResource(self._http)
|
|
191
|
+
self.product_axis_bindings = ProductAxisBindingsResource(self._http)
|
|
192
|
+
self.product_sets = ProductSetsResource(self._http)
|
|
193
|
+
self.product_pricing_rules = ProductPricingRulesResource(self._http)
|
|
194
|
+
self.discount_rules = DiscountRulesResource(self._http)
|
|
195
|
+
self.tax_rules = TaxRulesResource(self._http)
|
|
144
196
|
self.property_config = PropertyConfigResource(self._http)
|
|
145
197
|
self.property_inquiry = PropertyInquiryResource(self._http)
|
|
146
|
-
self.
|
|
198
|
+
self.business_locations = BusinessLocationsResource(self._http)
|
|
147
199
|
self.reservation_resources = ReservationResourcesResource(self._http)
|
|
200
|
+
self.reservation_settings = ReservationSettingsResource(self._http)
|
|
201
|
+
self.resource_categories = ResourceCategoriesResource(self._http)
|
|
202
|
+
self.resource_instances = ResourceInstancesResource(self._http)
|
|
203
|
+
self.floor_plans = FloorPlansResource(self._http)
|
|
204
|
+
self.floor_plan_sections = FloorPlanSectionsResource(self._http)
|
|
205
|
+
self.maintenance_blocks = MaintenanceBlocksResource(self._http)
|
|
206
|
+
self.table_assignments = TableAssignmentsResource(self._http)
|
|
207
|
+
self.room_assignments = RoomAssignmentsResource(self._http)
|
|
208
|
+
self.rental_assignments = RentalAssignmentsResource(self._http)
|
|
209
|
+
self.table_reservations = TableReservationsResource(self._http)
|
|
210
|
+
self.room_reservations = RoomReservationsResource(self._http)
|
|
211
|
+
self.rental_reservations = RentalReservationsResource(self._http)
|
|
148
212
|
self.service_appointments = ServiceAppointmentsResource(self._http)
|
|
213
|
+
self.appointment_additional_info = AppointmentAdditionalInfoResource(self._http)
|
|
214
|
+
self.appointment_field_configs = AppointmentFieldConfigsResource(self._http)
|
|
149
215
|
self.business_services = BusinessServicesResource(self._http)
|
|
216
|
+
self.service_categories = ServiceCategoriesResource(self._http)
|
|
217
|
+
self.service_persons = ServicePersonsResource(self._http)
|
|
218
|
+
self.service_pricing_rules = ServicePricingRulesResource(self._http)
|
|
219
|
+
self.service_providers = ServiceProvidersResource(self._http)
|
|
220
|
+
self.service_time_offs = ServiceTimeOffsResource(self._http)
|
|
150
221
|
|
|
151
222
|
# Service Management resources
|
|
152
223
|
self.agent_configs = AgentConfigurationsResource(self._http)
|
|
@@ -164,6 +235,13 @@ class WiilClient:
|
|
|
164
235
|
self.dynamic_web_agent = DynamicWebAgentResource(self._http)
|
|
165
236
|
self.dynamic_agent_status = DynamicAgentStatusResource(self._http)
|
|
166
237
|
|
|
238
|
+
# Conversation resources
|
|
239
|
+
self.outbound_calls = OutboundCallsResource(self._http)
|
|
240
|
+
self.outbound_emails = OutboundEmailsResource(self._http)
|
|
241
|
+
self.outbound_sms = OutboundSmsResource(self._http)
|
|
242
|
+
self.outbound_templates = OutboundTemplatesResource(self._http)
|
|
243
|
+
self.translation_services = TranslationServicesResource(self._http)
|
|
244
|
+
|
|
167
245
|
# Service layer helpers
|
|
168
246
|
self.ott = OttService(self._http)
|
|
169
247
|
self.translation = TranslationService(self._http)
|
|
@@ -1,89 +1,127 @@
|
|
|
1
|
-
"""
|
|
2
|
-
|
|
3
|
-
from urllib.parse import urlparse
|
|
4
|
-
|
|
5
|
-
from wiil.client.http_client import HttpClient
|
|
6
|
-
from wiil.client.types import WiilClientConfig
|
|
7
|
-
from wiil.errors import WiilConfigurationError
|
|
8
|
-
from wiil.services import OttService, TranslationService
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
DEFAULT_OTT_BASE_URL = "https://ott.wiil.io"
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
)
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
self
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
1
|
+
"""WIIL SDK client for outbound communication and real-time services."""
|
|
2
|
+
|
|
3
|
+
from urllib.parse import urlparse
|
|
4
|
+
|
|
5
|
+
from wiil.client.http_client import HttpClient
|
|
6
|
+
from wiil.client.types import WiilClientConfig
|
|
7
|
+
from wiil.errors import WiilConfigurationError
|
|
8
|
+
from wiil.services import MessagingService, OttService, TranslationService
|
|
9
|
+
|
|
10
|
+
|
|
11
|
+
DEFAULT_OTT_BASE_URL = "https://ott.wiil.io"
|
|
12
|
+
DEFAULT_API_BASE_URL = "https://api.wiil.io/v1"
|
|
13
|
+
DEFAULT_TIMEOUT = 30
|
|
14
|
+
|
|
15
|
+
|
|
16
|
+
class WiilService:
|
|
17
|
+
"""WIIL SDK client for outbound communication and real-time services.
|
|
18
|
+
|
|
19
|
+
Provides access to messaging (calls, SMS, email), translation sessions,
|
|
20
|
+
and OTT connection services for AI-powered customer interactions.
|
|
21
|
+
|
|
22
|
+
Example:
|
|
23
|
+
>>> from wiil import WiilService
|
|
24
|
+
>>>
|
|
25
|
+
>>> service = WiilService(api_key="your-api-key")
|
|
26
|
+
>>>
|
|
27
|
+
>>> # Request an outbound call
|
|
28
|
+
>>> service.messaging.request_call({...})
|
|
29
|
+
>>>
|
|
30
|
+
>>> # Send an SMS
|
|
31
|
+
>>> service.messaging.send_sms({...})
|
|
32
|
+
>>>
|
|
33
|
+
>>> # Send an email
|
|
34
|
+
>>> service.messaging.send_email({...})
|
|
35
|
+
"""
|
|
36
|
+
|
|
37
|
+
def __init__(
|
|
38
|
+
self,
|
|
39
|
+
api_key: str,
|
|
40
|
+
base_url: str = DEFAULT_OTT_BASE_URL,
|
|
41
|
+
api_base_url: str = DEFAULT_API_BASE_URL,
|
|
42
|
+
timeout: int = DEFAULT_TIMEOUT,
|
|
43
|
+
):
|
|
44
|
+
self._validate_config(api_key, base_url, api_base_url, timeout)
|
|
45
|
+
|
|
46
|
+
self.config = WiilClientConfig(
|
|
47
|
+
api_key=api_key,
|
|
48
|
+
base_url=base_url,
|
|
49
|
+
timeout=timeout,
|
|
50
|
+
)
|
|
51
|
+
|
|
52
|
+
self._http = HttpClient(self.config)
|
|
53
|
+
self._api_http = HttpClient(
|
|
54
|
+
WiilClientConfig(
|
|
55
|
+
api_key=api_key,
|
|
56
|
+
base_url=api_base_url,
|
|
57
|
+
timeout=timeout,
|
|
58
|
+
)
|
|
59
|
+
)
|
|
60
|
+
self.translation = TranslationService(self._http)
|
|
61
|
+
self.ott = OttService(self._http)
|
|
62
|
+
self.messaging = MessagingService(self._api_http)
|
|
63
|
+
|
|
64
|
+
def get(self, path: str, **kwargs):
|
|
65
|
+
"""Make a GET request for service endpoints."""
|
|
66
|
+
return self._http.get(path, **kwargs)
|
|
67
|
+
|
|
68
|
+
def post(self, path: str, data, schema=None, **kwargs):
|
|
69
|
+
"""Make a POST request for service endpoints."""
|
|
70
|
+
return self._http.post(path, data, schema=schema, **kwargs)
|
|
71
|
+
|
|
72
|
+
def put(self, path: str, data, schema=None, **kwargs):
|
|
73
|
+
"""Make a PUT request for service endpoints."""
|
|
74
|
+
return self._http.put(path, data, schema=schema, **kwargs)
|
|
75
|
+
|
|
76
|
+
def patch(self, path: str, data, schema=None, **kwargs):
|
|
77
|
+
"""Make a PATCH request for service endpoints."""
|
|
78
|
+
return self._http.patch(path, data, schema=schema, **kwargs)
|
|
79
|
+
|
|
80
|
+
def delete(self, path: str, **kwargs):
|
|
81
|
+
"""Make a DELETE request for service endpoints."""
|
|
82
|
+
return self._http.delete(path, **kwargs)
|
|
83
|
+
|
|
84
|
+
@staticmethod
|
|
85
|
+
def _validate_config(
|
|
86
|
+
api_key: str,
|
|
87
|
+
base_url: str,
|
|
88
|
+
api_base_url: str,
|
|
89
|
+
timeout: int,
|
|
90
|
+
) -> None:
|
|
91
|
+
"""Validate service configuration."""
|
|
92
|
+
if not api_key:
|
|
93
|
+
raise WiilConfigurationError(
|
|
94
|
+
"API key is required. Please provide a valid API key "
|
|
95
|
+
"in the configuration."
|
|
96
|
+
)
|
|
97
|
+
|
|
98
|
+
if not api_key.strip():
|
|
99
|
+
raise WiilConfigurationError(
|
|
100
|
+
"API key cannot be empty. Please provide a valid API key."
|
|
101
|
+
)
|
|
102
|
+
|
|
103
|
+
try:
|
|
104
|
+
result = urlparse(base_url)
|
|
105
|
+
if not all([result.scheme, result.netloc]):
|
|
106
|
+
raise ValueError("Invalid URL structure")
|
|
107
|
+
except Exception:
|
|
108
|
+
raise WiilConfigurationError(
|
|
109
|
+
f"Invalid base URL: {base_url}. Please provide a valid URL."
|
|
110
|
+
)
|
|
111
|
+
|
|
112
|
+
try:
|
|
113
|
+
result = urlparse(api_base_url)
|
|
114
|
+
if not all([result.scheme, result.netloc]):
|
|
115
|
+
raise ValueError("Invalid URL structure")
|
|
116
|
+
except Exception:
|
|
117
|
+
raise WiilConfigurationError(
|
|
118
|
+
f"Invalid API base URL: {api_base_url}. Please provide a valid URL."
|
|
119
|
+
)
|
|
120
|
+
|
|
121
|
+
if timeout <= 0:
|
|
122
|
+
raise WiilConfigurationError(
|
|
123
|
+
"Timeout must be a positive number in seconds."
|
|
124
|
+
)
|
|
125
|
+
|
|
126
|
+
|
|
127
|
+
__all__ = ["WiilService"]
|