wiil-python 0.0.5__tar.gz → 0.0.7__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.
Files changed (126) hide show
  1. {wiil_python-0.0.5 → wiil_python-0.0.7}/PKG-INFO +1 -1
  2. {wiil_python-0.0.5 → wiil_python-0.0.7}/pyproject.toml +1 -1
  3. {wiil_python-0.0.5 → wiil_python-0.0.7}/wiil/client/http_client.py +8 -0
  4. {wiil_python-0.0.5 → wiil_python-0.0.7}/wiil/models/request/paginated_result.py +1 -1
  5. {wiil_python-0.0.5 → wiil_python-0.0.7}/wiil/models/service_mgt/dynamic_setup/phone_agent_setup.py +6 -0
  6. {wiil_python-0.0.5 → wiil_python-0.0.7}/wiil/models/service_mgt/dynamic_setup/web_agent_setup.py +6 -0
  7. {wiil_python-0.0.5 → wiil_python-0.0.7}/wiil/resources/business_mgt/menu_orders.py +1 -1
  8. {wiil_python-0.0.5 → wiil_python-0.0.7}/wiil/resources/business_mgt/product_orders.py +1 -1
  9. {wiil_python-0.0.5 → wiil_python-0.0.7}/wiil/resources/business_mgt/reservations.py +1 -1
  10. {wiil_python-0.0.5 → wiil_python-0.0.7}/wiil/resources/business_mgt/service_appointments.py +1 -1
  11. {wiil_python-0.0.5 → wiil_python-0.0.7}/wiil/resources/service_mgt/conversation_configs.py +1 -1
  12. {wiil_python-0.0.5 → wiil_python-0.0.7}/wiil/resources/service_mgt/deployment_channels.py +16 -5
  13. {wiil_python-0.0.5 → wiil_python-0.0.7}/wiil/resources/service_mgt/deployment_configs.py +20 -0
  14. {wiil_python-0.0.5 → wiil_python-0.0.7}/wiil/resources/service_mgt/phone_configs.py +2 -2
  15. {wiil_python-0.0.5 → wiil_python-0.0.7}/wiil/resources/service_mgt/telephony_provider.py +19 -52
  16. {wiil_python-0.0.5 → wiil_python-0.0.7}/wiil/types/paginated_result.py +1 -1
  17. {wiil_python-0.0.5 → wiil_python-0.0.7}/wiil_python.egg-info/PKG-INFO +1 -1
  18. {wiil_python-0.0.5 → wiil_python-0.0.7}/README.md +0 -0
  19. {wiil_python-0.0.5 → wiil_python-0.0.7}/setup.cfg +0 -0
  20. {wiil_python-0.0.5 → wiil_python-0.0.7}/setup.py +0 -0
  21. {wiil_python-0.0.5 → wiil_python-0.0.7}/wiil/__init__.py +0 -0
  22. {wiil_python-0.0.5 → wiil_python-0.0.7}/wiil/client/__init__.py +0 -0
  23. {wiil_python-0.0.5 → wiil_python-0.0.7}/wiil/client/async_wiil_client.py +0 -0
  24. {wiil_python-0.0.5 → wiil_python-0.0.7}/wiil/client/types.py +0 -0
  25. {wiil_python-0.0.5 → wiil_python-0.0.7}/wiil/client/wiil_client.py +0 -0
  26. {wiil_python-0.0.5 → wiil_python-0.0.7}/wiil/client/will_service.py +0 -0
  27. {wiil_python-0.0.5 → wiil_python-0.0.7}/wiil/errors/__init__.py +0 -0
  28. {wiil_python-0.0.5 → wiil_python-0.0.7}/wiil/errors/exceptions.py +0 -0
  29. {wiil_python-0.0.5 → wiil_python-0.0.7}/wiil/models/__init__.py +0 -0
  30. {wiil_python-0.0.5 → wiil_python-0.0.7}/wiil/models/account/__init__.py +0 -0
  31. {wiil_python-0.0.5 → wiil_python-0.0.7}/wiil/models/account/organization.py +0 -0
  32. {wiil_python-0.0.5 → wiil_python-0.0.7}/wiil/models/account/project.py +0 -0
  33. {wiil_python-0.0.5 → wiil_python-0.0.7}/wiil/models/account/supported_business_verticals.py +0 -0
  34. {wiil_python-0.0.5 → wiil_python-0.0.7}/wiil/models/assistant_setups/__init__.py +0 -0
  35. {wiil_python-0.0.5 → wiil_python-0.0.7}/wiil/models/assistant_setups/assistant_setup_result.py +0 -0
  36. {wiil_python-0.0.5 → wiil_python-0.0.7}/wiil/models/assistant_setups/base_assistant_setup.py +0 -0
  37. {wiil_python-0.0.5 → wiil_python-0.0.7}/wiil/models/assistant_setups/phone_assistant_setup.py +0 -0
  38. {wiil_python-0.0.5 → wiil_python-0.0.7}/wiil/models/assistant_setups/web_assistant_setup.py +0 -0
  39. {wiil_python-0.0.5 → wiil_python-0.0.7}/wiil/models/base.py +0 -0
  40. {wiil_python-0.0.5 → wiil_python-0.0.7}/wiil/models/business_mgt/__init__.py +0 -0
  41. {wiil_python-0.0.5 → wiil_python-0.0.7}/wiil/models/business_mgt/appointment_additional_info.py +0 -0
  42. {wiil_python-0.0.5 → wiil_python-0.0.7}/wiil/models/business_mgt/appointment_field_config.py +0 -0
  43. {wiil_python-0.0.5 → wiil_python-0.0.7}/wiil/models/business_mgt/customer.py +0 -0
  44. {wiil_python-0.0.5 → wiil_python-0.0.7}/wiil/models/business_mgt/menu_config.py +0 -0
  45. {wiil_python-0.0.5 → wiil_python-0.0.7}/wiil/models/business_mgt/menu_order.py +0 -0
  46. {wiil_python-0.0.5 → wiil_python-0.0.7}/wiil/models/business_mgt/order.py +0 -0
  47. {wiil_python-0.0.5 → wiil_python-0.0.7}/wiil/models/business_mgt/product_config.py +0 -0
  48. {wiil_python-0.0.5 → wiil_python-0.0.7}/wiil/models/business_mgt/product_order.py +0 -0
  49. {wiil_python-0.0.5 → wiil_python-0.0.7}/wiil/models/business_mgt/property_config.py +0 -0
  50. {wiil_python-0.0.5 → wiil_python-0.0.7}/wiil/models/business_mgt/property_inquiry.py +0 -0
  51. {wiil_python-0.0.5 → wiil_python-0.0.7}/wiil/models/business_mgt/reservation.py +0 -0
  52. {wiil_python-0.0.5 → wiil_python-0.0.7}/wiil/models/business_mgt/reservation_resource.py +0 -0
  53. {wiil_python-0.0.5 → wiil_python-0.0.7}/wiil/models/business_mgt/service_appointment.py +0 -0
  54. {wiil_python-0.0.5 → wiil_python-0.0.7}/wiil/models/business_mgt/service_config.py +0 -0
  55. {wiil_python-0.0.5 → wiil_python-0.0.7}/wiil/models/business_mgt/service_person.py +0 -0
  56. {wiil_python-0.0.5 → wiil_python-0.0.7}/wiil/models/conversation/__init__.py +0 -0
  57. {wiil_python-0.0.5 → wiil_python-0.0.7}/wiil/models/conversation/conversation_config.py +0 -0
  58. {wiil_python-0.0.5 → wiil_python-0.0.7}/wiil/models/conversation/conversation_message.py +0 -0
  59. {wiil_python-0.0.5 → wiil_python-0.0.7}/wiil/models/conversation/translation_config.py +0 -0
  60. {wiil_python-0.0.5 → wiil_python-0.0.7}/wiil/models/conversation/translation_conversation.py +0 -0
  61. {wiil_python-0.0.5 → wiil_python-0.0.7}/wiil/models/request/__init__.py +0 -0
  62. {wiil_python-0.0.5 → wiil_python-0.0.7}/wiil/models/request/paginated_query.py +0 -0
  63. {wiil_python-0.0.5 → wiil_python-0.0.7}/wiil/models/service_mgt/__init__.py +0 -0
  64. {wiil_python-0.0.5 → wiil_python-0.0.7}/wiil/models/service_mgt/agent_config.py +0 -0
  65. {wiil_python-0.0.5 → wiil_python-0.0.7}/wiil/models/service_mgt/call_transfer_config.py +0 -0
  66. {wiil_python-0.0.5 → wiil_python-0.0.7}/wiil/models/service_mgt/deployment_config.py +0 -0
  67. {wiil_python-0.0.5 → wiil_python-0.0.7}/wiil/models/service_mgt/dynamic_setup/__init__.py +0 -0
  68. {wiil_python-0.0.5 → wiil_python-0.0.7}/wiil/models/service_mgt/dynamic_setup/base_agent_setup.py +0 -0
  69. {wiil_python-0.0.5 → wiil_python-0.0.7}/wiil/models/service_mgt/instruction_config.py +0 -0
  70. {wiil_python-0.0.5 → wiil_python-0.0.7}/wiil/models/service_mgt/interaction_channels.py +0 -0
  71. {wiil_python-0.0.5 → wiil_python-0.0.7}/wiil/models/service_mgt/knowledge.py +0 -0
  72. {wiil_python-0.0.5 → wiil_python-0.0.7}/wiil/models/service_mgt/phone_config.py +0 -0
  73. {wiil_python-0.0.5 → wiil_python-0.0.7}/wiil/models/service_mgt/phone_number.py +0 -0
  74. {wiil_python-0.0.5 → wiil_python-0.0.7}/wiil/models/service_mgt/provisioning_config.py +0 -0
  75. {wiil_python-0.0.5 → wiil_python-0.0.7}/wiil/models/service_mgt/support_llm.py +0 -0
  76. {wiil_python-0.0.5 → wiil_python-0.0.7}/wiil/models/service_mgt/voice_language.py +0 -0
  77. {wiil_python-0.0.5 → wiil_python-0.0.7}/wiil/models/type_definitions/__init__.py +0 -0
  78. {wiil_python-0.0.5 → wiil_python-0.0.7}/wiil/models/type_definitions/account_definitions.py +0 -0
  79. {wiil_python-0.0.5 → wiil_python-0.0.7}/wiil/models/type_definitions/business_definitions.py +0 -0
  80. {wiil_python-0.0.5 → wiil_python-0.0.7}/wiil/models/type_definitions/conversation_definitions.py +0 -0
  81. {wiil_python-0.0.5 → wiil_python-0.0.7}/wiil/models/type_definitions/dynamic_fields/__init__.py +0 -0
  82. {wiil_python-0.0.5 → wiil_python-0.0.7}/wiil/models/type_definitions/dynamic_fields/field_definition.py +0 -0
  83. {wiil_python-0.0.5 → wiil_python-0.0.7}/wiil/models/type_definitions/dynamic_fields/field_types.py +0 -0
  84. {wiil_python-0.0.5 → wiil_python-0.0.7}/wiil/models/type_definitions/knowledge_definitions.py +0 -0
  85. {wiil_python-0.0.5 → wiil_python-0.0.7}/wiil/models/type_definitions/service_config_definitions.py +0 -0
  86. {wiil_python-0.0.5 → wiil_python-0.0.7}/wiil/py.typed +0 -0
  87. {wiil_python-0.0.5 → wiil_python-0.0.7}/wiil/resources/__init__.py +0 -0
  88. {wiil_python-0.0.5 → wiil_python-0.0.7}/wiil/resources/account/__init__.py +0 -0
  89. {wiil_python-0.0.5 → wiil_python-0.0.7}/wiil/resources/account/organizations.py +0 -0
  90. {wiil_python-0.0.5 → wiil_python-0.0.7}/wiil/resources/account/projects.py +0 -0
  91. {wiil_python-0.0.5 → wiil_python-0.0.7}/wiil/resources/business_mgt/__init__.py +0 -0
  92. {wiil_python-0.0.5 → wiil_python-0.0.7}/wiil/resources/business_mgt/business_services.py +0 -0
  93. {wiil_python-0.0.5 → wiil_python-0.0.7}/wiil/resources/business_mgt/customers.py +0 -0
  94. {wiil_python-0.0.5 → wiil_python-0.0.7}/wiil/resources/business_mgt/menus.py +0 -0
  95. {wiil_python-0.0.5 → wiil_python-0.0.7}/wiil/resources/business_mgt/products.py +0 -0
  96. {wiil_python-0.0.5 → wiil_python-0.0.7}/wiil/resources/business_mgt/property_config.py +0 -0
  97. {wiil_python-0.0.5 → wiil_python-0.0.7}/wiil/resources/business_mgt/property_inquiry.py +0 -0
  98. {wiil_python-0.0.5 → wiil_python-0.0.7}/wiil/resources/business_mgt/reservation_resources.py +0 -0
  99. {wiil_python-0.0.5 → wiil_python-0.0.7}/wiil/resources/service_mgt/__init__.py +0 -0
  100. {wiil_python-0.0.5 → wiil_python-0.0.7}/wiil/resources/service_mgt/agent_configs.py +0 -0
  101. {wiil_python-0.0.5 → wiil_python-0.0.7}/wiil/resources/service_mgt/dynamic_agent_status.py +0 -0
  102. {wiil_python-0.0.5 → wiil_python-0.0.7}/wiil/resources/service_mgt/dynamic_phone_agent.py +0 -0
  103. {wiil_python-0.0.5 → wiil_python-0.0.7}/wiil/resources/service_mgt/dynamic_web_agent.py +0 -0
  104. {wiil_python-0.0.5 → wiil_python-0.0.7}/wiil/resources/service_mgt/instruction_configs.py +0 -0
  105. {wiil_python-0.0.5 → wiil_python-0.0.7}/wiil/resources/service_mgt/knowledge_sources.py +0 -0
  106. {wiil_python-0.0.5 → wiil_python-0.0.7}/wiil/resources/service_mgt/provisioning_configs.py +0 -0
  107. {wiil_python-0.0.5 → wiil_python-0.0.7}/wiil/resources/service_mgt/support_models.py +0 -0
  108. {wiil_python-0.0.5 → wiil_python-0.0.7}/wiil/resources/service_mgt/translation_sessions.py +0 -0
  109. {wiil_python-0.0.5 → wiil_python-0.0.7}/wiil/services/__init__.py +0 -0
  110. {wiil_python-0.0.5 → wiil_python-0.0.7}/wiil/services/ott/__init__.py +0 -0
  111. {wiil_python-0.0.5 → wiil_python-0.0.7}/wiil/services/ott/models.py +0 -0
  112. {wiil_python-0.0.5 → wiil_python-0.0.7}/wiil/services/ott/service.py +0 -0
  113. {wiil_python-0.0.5 → wiil_python-0.0.7}/wiil/services/translation/__init__.py +0 -0
  114. {wiil_python-0.0.5 → wiil_python-0.0.7}/wiil/services/translation/models.py +0 -0
  115. {wiil_python-0.0.5 → wiil_python-0.0.7}/wiil/services/translation/service.py +0 -0
  116. {wiil_python-0.0.5 → wiil_python-0.0.7}/wiil/types/__init__.py +0 -0
  117. {wiil_python-0.0.5 → wiil_python-0.0.7}/wiil/types/account_types.py +0 -0
  118. {wiil_python-0.0.5 → wiil_python-0.0.7}/wiil/types/business_types.py +0 -0
  119. {wiil_python-0.0.5 → wiil_python-0.0.7}/wiil/types/conversation_types.py +0 -0
  120. {wiil_python-0.0.5 → wiil_python-0.0.7}/wiil/types/knowledge_types.py +0 -0
  121. {wiil_python-0.0.5 → wiil_python-0.0.7}/wiil/types/paginated_quest.py +0 -0
  122. {wiil_python-0.0.5 → wiil_python-0.0.7}/wiil/types/service_types.py +0 -0
  123. {wiil_python-0.0.5 → wiil_python-0.0.7}/wiil_python.egg-info/SOURCES.txt +0 -0
  124. {wiil_python-0.0.5 → wiil_python-0.0.7}/wiil_python.egg-info/dependency_links.txt +0 -0
  125. {wiil_python-0.0.5 → wiil_python-0.0.7}/wiil_python.egg-info/requires.txt +0 -0
  126. {wiil_python-0.0.5 → wiil_python-0.0.7}/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.5
3
+ Version: 0.0.7
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
@@ -4,7 +4,7 @@ build-backend = "setuptools.build_meta"
4
4
 
5
5
  [project]
6
6
  name = "wiil-python"
7
- version = "0.0.5"
7
+ version = "0.0.7"
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"
@@ -590,6 +590,14 @@ class HttpClient:
590
590
  if response_model is None:
591
591
  return self._to_attr_obj(data)
592
592
 
593
+ # Handle None data - return None for Optional types
594
+ if data is None:
595
+ return None
596
+
597
+ # Handle primitive types (bool, int, str, etc.) that don't have model_validate
598
+ if response_model in (bool, int, str, float):
599
+ return data
600
+
593
601
  try:
594
602
  # Handle List[Model] types
595
603
  origin = get_origin(response_model)
@@ -32,7 +32,7 @@ class PaginationMeta(BaseModel):
32
32
  page: int = Field(..., gt=0, description="Current page number (1-based indexing)")
33
33
  page_size: int = Field(
34
34
  ...,
35
- gt=0,
35
+ ge=0,
36
36
  le=1000,
37
37
  description="Number of items per page - limited to 1000 for performance",
38
38
  alias="pageSize"
@@ -72,6 +72,12 @@ class DynamicPhoneAgentSetupResult(DynamicAgentSetupResult):
72
72
  phone_number: Phone number associated with the configuration
73
73
  """
74
74
 
75
+ model_config = ConfigDict(
76
+ validate_by_name=True,
77
+ validate_by_alias=True,
78
+ use_enum_values=True,
79
+ )
80
+
75
81
  phone_number: Optional[str] = Field(
76
82
  None,
77
83
  description="Phone number associated with the phone configuration used for this assistant",
@@ -80,6 +80,12 @@ class DynamicWebAgentSetupResult(DynamicAgentSetupResult):
80
80
  integration_snippets: Code snippets for deploying the web assistant
81
81
  """
82
82
 
83
+ model_config = ConfigDict(
84
+ validate_by_name=True,
85
+ validate_by_alias=True,
86
+ use_enum_values=True,
87
+ )
88
+
83
89
  integration_snippets: Optional[List[str]] = Field(
84
90
  None,
85
91
  description="List of code snippets or integration details for deploying the web assistant",
@@ -70,7 +70,7 @@ class MenuOrdersResource:
70
70
  """Cancel a menu order."""
71
71
  data: Dict[str, Any] = {}
72
72
  if reason is not None:
73
- data['reason'] = reason
73
+ data['cancelReason'] = reason
74
74
  return self._http.post(
75
75
  f'{self._base_path}/{order_id}/cancel',
76
76
  data,
@@ -70,7 +70,7 @@ class ProductOrdersResource:
70
70
  """Cancel a product order."""
71
71
  data: Dict[str, Any] = {}
72
72
  if reason is not None:
73
- data['reason'] = reason
73
+ data['cancelReason'] = reason
74
74
  return self._http.post(
75
75
  f'{self._base_path}/{order_id}/cancel',
76
76
  data,
@@ -94,7 +94,7 @@ class ReservationsResource:
94
94
  """Cancel a reservation."""
95
95
  data: Dict[str, Any] = {}
96
96
  if reason is not None:
97
- data['reason'] = reason
97
+ data['cancelReason'] = reason
98
98
  return self._http.post(
99
99
  f'{self._base_path}/{reservation_id}/cancel',
100
100
  data,
@@ -82,7 +82,7 @@ class ServiceAppointmentsResource:
82
82
  """Cancel a service appointment."""
83
83
  data: Dict[str, Any] = {}
84
84
  if reason is not None:
85
- data['reason'] = reason
85
+ data['cancelReason'] = reason
86
86
  return self._http.post(
87
87
  f'{self._base_path}/{appointment_id}/cancel',
88
88
  data,
@@ -18,7 +18,7 @@ class ConversationConfigurationsResource:
18
18
 
19
19
  def __init__(self, http: HttpClient):
20
20
  self._http = http
21
- self._base_path = '/conversation-configs'
21
+ self._base_path = '/conversation-configurations'
22
22
 
23
23
  def get(self, config_id: str) -> ServiceConversationConfig:
24
24
  """Retrieve a conversation configuration by ID."""
@@ -1,7 +1,7 @@
1
1
  """Deployment Channels resource for managing deployment channel entities."""
2
2
 
3
3
  from typing import Any, Dict, Optional
4
- from urllib.parse import urlencode
4
+ from urllib.parse import quote, urlencode
5
5
 
6
6
  from wiil.client.http_client import HttpClient
7
7
  from wiil.models.service_mgt import (
@@ -54,8 +54,9 @@ class DeploymentChannelsResource:
54
54
  Returns:
55
55
  The deployment channel matching the identifier and type
56
56
  """
57
+ encoded_identifier = quote(identifier, safe='')
57
58
  return self._http.get(
58
- f'{self._base_path}/by-identifier/{identifier}?type={channel_type}',
59
+ f'{self._base_path}/by-identifier/{encoded_identifier}?type={channel_type}',
59
60
  response_model=DeploymentChannel
60
61
  )
61
62
 
@@ -75,9 +76,19 @@ class DeploymentChannelsResource:
75
76
  response_model=DeploymentChannel
76
77
  )
77
78
 
78
- def delete(self, channel_id: str) -> bool:
79
- """Delete a deployment channel."""
80
- return self._http.delete(f'{self._base_path}/{channel_id}')
79
+ def delete(self, channel_id: str, delete_phone_config: bool = False) -> bool:
80
+ """Delete a deployment channel.
81
+
82
+ Args:
83
+ channel_id: Deployment channel ID
84
+ delete_phone_config: Whether to also delete the associated phone
85
+ configuration (default: False)
86
+
87
+ Returns:
88
+ True if deletion was successful
89
+ """
90
+ query_string = '?deletePhoneConfig=true' if delete_phone_config else ''
91
+ return self._http.delete(f'{self._base_path}/{channel_id}{query_string}')
81
92
 
82
93
  def list(
83
94
  self,
@@ -7,6 +7,7 @@ from wiil.client.http_client import HttpClient
7
7
  from wiil.models.service_mgt import (
8
8
  DeploymentConfiguration,
9
9
  CreateDeploymentConfiguration,
10
+ CreateChainDeploymentConfiguration,
10
11
  UpdateDeploymentConfiguration,
11
12
  )
12
13
  from wiil.types import PaginatedResult, PaginationRequest
@@ -40,6 +41,25 @@ class DeploymentConfigurationsResource:
40
41
  response_model=DeploymentConfiguration
41
42
  )
42
43
 
44
+ def create_chain(
45
+ self,
46
+ data: CreateChainDeploymentConfiguration
47
+ ) -> DeploymentConfiguration:
48
+ """Create a chained deployment configuration.
49
+
50
+ Args:
51
+ data: Chain deployment configuration data
52
+
53
+ Returns:
54
+ The created deployment configuration
55
+ """
56
+ return self._http.post(
57
+ self._base_path,
58
+ data.model_dump(by_alias=True, exclude_none=True),
59
+ schema=CreateChainDeploymentConfiguration,
60
+ response_model=DeploymentConfiguration
61
+ )
62
+
43
63
  def get(self, config_id: str) -> DeploymentConfiguration:
44
64
  """Retrieve a deployment configuration by ID."""
45
65
  return self._http.get(f'{self._base_path}/{config_id}', response_model=DeploymentConfiguration)
@@ -1,7 +1,7 @@
1
1
  """Phone Configurations resource for managing phone configuration entities."""
2
2
 
3
3
  from typing import Any, Dict, Optional
4
- from urllib.parse import urlencode
4
+ from urllib.parse import quote, urlencode
5
5
 
6
6
  from wiil.client.http_client import HttpClient
7
7
  from wiil.models.service_mgt import (
@@ -30,7 +30,7 @@ class PhoneConfigurationsResource:
30
30
  def get_by_phone_number(self, phone_number: str) -> PhoneConfiguration:
31
31
  """Retrieve a phone configuration by phone number."""
32
32
  return self._http.get(
33
- f'{self._base_path}/by-phone-number/{phone_number}',
33
+ f'{self._base_path}/by-phone-number/{quote(phone_number, safe="")}',
34
34
  response_model=PhoneConfiguration
35
35
  )
36
36
 
@@ -2,25 +2,24 @@
2
2
 
3
3
  This module provides methods for searching available phone numbers,
4
4
  getting pricing information, purchasing phone numbers, and checking
5
- purchase status from various telephony providers (SignalWire, Twilio,
6
- etc.). All methods require proper authentication via API key.
5
+ purchase status. All methods require proper authentication via API key.
7
6
 
8
7
  Example:
9
8
  ```python
10
9
  from wiil import WiilClient
11
- from wiil.types.service_types import ProviderType
12
10
 
13
11
  client = WiilClient(api_key='your-api-key')
14
12
 
15
- # Search for phone numbers in a specific region
16
- numbers = client.telephony_provider.get_phone_numbers(
17
- ProviderType.SIGNALWIRE,
18
- 'US',
13
+ # Search for phone numbers
14
+ numbers = client.telephony_provider.get_phone_numbers()
15
+
16
+ # Search with area code filter
17
+ seattle_numbers = client.telephony_provider.get_phone_numbers(
19
18
  area_code='206'
20
19
  )
21
20
 
22
- # Get pricing for a region
23
- pricing = client.telephony_provider.get_pricing(ProviderType.SIGNALWIRE, 'US')
21
+ # Get pricing
22
+ pricing = client.telephony_provider.get_pricing()
24
23
  ```
25
24
  """
26
25
 
@@ -35,7 +34,6 @@ from wiil.models.service_mgt.phone_number import (
35
34
  PhoneNumberPricing,
36
35
  PhoneNumberPurchase,
37
36
  )
38
- from wiil.types.service_types import ProviderType
39
37
 
40
38
 
41
39
  class TelephonyProviderResource:
@@ -61,17 +59,13 @@ class TelephonyProviderResource:
61
59
 
62
60
  def get_phone_numbers(
63
61
  self,
64
- provider: ProviderType,
65
- country_code: str,
66
62
  area_code: Optional[str] = None,
67
63
  contains: Optional[str] = None,
68
64
  postal_code: Optional[str] = None
69
65
  ) -> List[BasePhoneNumberInfo]:
70
- """Retrieve available phone numbers for a specific provider and region.
66
+ """Retrieve available phone numbers.
71
67
 
72
68
  Args:
73
- provider: Telephony provider (e.g., ProviderType.SIGNALWIRE, ProviderType.TWILIO)
74
- country_code: Country code (e.g., 'US', 'CA')
75
69
  area_code: Optional area code filter (e.g., '206', '415')
76
70
  contains: Optional number pattern to search for
77
71
  postal_code: Optional postal code filter
@@ -85,32 +79,19 @@ class TelephonyProviderResource:
85
79
 
86
80
  Example:
87
81
  ```python
88
- # Search for phone numbers in US
89
- numbers = client.telephony_provider.get_phone_numbers(
90
- ProviderType.SIGNALWIRE,
91
- 'US'
92
- )
82
+ # Search for phone numbers
83
+ numbers = client.telephony_provider.get_phone_numbers()
93
84
 
94
85
  # Search with area code filter
95
86
  seattle_numbers = client.telephony_provider.get_phone_numbers(
96
- ProviderType.SIGNALWIRE,
97
- 'US',
98
87
  area_code='206'
99
88
  )
100
89
 
101
- # Search for specific number pattern
102
- custom_numbers = client.telephony_provider.get_phone_numbers(
103
- ProviderType.SIGNALWIRE,
104
- 'US',
105
- contains='555',
106
- postal_code='98101'
107
- )
108
-
109
90
  for number in numbers:
110
91
  print(f"{number.phone_number} - {number.region}")
111
92
  ```
112
93
  """
113
- params: Dict[str, Any] = {"countryCode": country_code}
94
+ params: Dict[str, Any] = {}
114
95
 
115
96
  if area_code:
116
97
  params["areaCode"] = area_code
@@ -119,25 +100,17 @@ class TelephonyProviderResource:
119
100
  if postal_code:
120
101
  params["postalCode"] = postal_code
121
102
 
122
- query_string = f'?{urlencode(params)}'
103
+ query_string = f'?{urlencode(params)}' if params else ''
123
104
  return self._http.get(
124
- f"{self._resource_path}/{provider}/numbers{query_string}",
105
+ f"{self._resource_path}/numbers{query_string}",
125
106
  response_model=List[BasePhoneNumberInfo]
126
107
  )
127
108
 
128
- def get_pricing(
129
- self,
130
- provider: ProviderType,
131
- country_code: str
132
- ) -> List[PhoneNumberPricing]:
133
- """Retrieve pricing information for phone numbers by provider and region.
134
-
135
- Args:
136
- provider: Telephony provider (e.g., ProviderType.SIGNALWIRE, ProviderType.TWILIO)
137
- country_code: Country code (e.g., 'US', 'CA')
109
+ def get_pricing(self) -> List[PhoneNumberPricing]:
110
+ """Retrieve pricing information for phone numbers.
138
111
 
139
112
  Returns:
140
- List of pricing information for phone numbers in the specified region
113
+ List of pricing information for phone numbers
141
114
 
142
115
  Raises:
143
116
  WiilAPIError: When the API returns an error
@@ -145,20 +118,14 @@ class TelephonyProviderResource:
145
118
 
146
119
  Example:
147
120
  ```python
148
- pricing = client.telephony_provider.get_pricing(
149
- ProviderType.SIGNALWIRE,
150
- 'US'
151
- )
121
+ pricing = client.telephony_provider.get_pricing()
152
122
  for price in pricing:
153
123
  print(f"Number Type: {price.number_type}")
154
124
  print(f"Price: ${price.price}")
155
125
  ```
156
126
  """
157
- params: Dict[str, Any] = {"countryCode": country_code}
158
-
159
- query_string = f'?{urlencode(params)}'
160
127
  return self._http.get(
161
- f"{self._resource_path}/{provider}/pricing{query_string}",
128
+ f"{self._resource_path}/pricing",
162
129
  response_model=List[PhoneNumberPricing]
163
130
  )
164
131
 
@@ -37,7 +37,7 @@ class PaginationMeta(BaseModel):
37
37
  )
38
38
  page_size: int = Field(
39
39
  ...,
40
- gt=0,
40
+ ge=0,
41
41
  le=1000,
42
42
  description="Number of items per page - limited to 1000 for performance",
43
43
  alias="pageSize"
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: wiil-python
3
- Version: 0.0.5
3
+ Version: 0.0.7
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
File without changes
File without changes
File without changes
File without changes