From 5f6667dfe31d9f4e76542e1ae2a45bde3462b5cb Mon Sep 17 00:00:00 2001 From: maxkahan Date: Mon, 29 Apr 2024 03:00:52 +0100 Subject: [PATCH] update dependency versions, prep for NI release --- http_client/CHANGES.md | 3 ++ http_client/pyproject.toml | 6 +-- messages/CHANGES.md | 3 ++ messages/pyproject.toml | 8 +-- number_insight/README.md | 52 +++++++++++++++++++ number_insight/pyproject.toml | 6 +-- .../src/vonage_number_insight/enums.py | 0 .../src/vonage_number_insight/responses.py | 5 -- number_insight/tests/test_number_insight.py | 5 +- number_insight_v2/CHANGES.md | 3 ++ number_insight_v2/pyproject.toml | 8 +-- requirements.txt | 16 +++++- sms/CHANGES.md | 3 ++ sms/pyproject.toml | 8 +-- users/CHANGES.md | 3 ++ users/pyproject.toml | 8 +-- verify/CHANGES.md | 3 ++ verify/pyproject.toml | 8 +-- verify_v2/CHANGES.md | 3 ++ verify_v2/pyproject.toml | 8 +-- voice/CHANGES.md | 3 ++ voice/pyproject.toml | 8 +-- vonage/CHANGES.md | 1 + vonage/pyproject.toml | 18 +++---- vonage_utils/CHANGES.md | 3 ++ vonage_utils/pyproject.toml | 4 +- 26 files changed, 142 insertions(+), 54 deletions(-) delete mode 100644 number_insight/src/vonage_number_insight/enums.py diff --git a/http_client/CHANGES.md b/http_client/CHANGES.md index bf6dde61..c4870964 100644 --- a/http_client/CHANGES.md +++ b/http_client/CHANGES.md @@ -1,3 +1,6 @@ +# 1.3.1 +- Update minimum dependency version + # 1.3.0 - Add new PUT method diff --git a/http_client/pyproject.toml b/http_client/pyproject.toml index 25e3fbe9..9b63b0dd 100644 --- a/http_client/pyproject.toml +++ b/http_client/pyproject.toml @@ -1,16 +1,16 @@ [project] name = "vonage-http-client" -version = "1.3.0" +version = "1.3.1" description = "An HTTP client for making requests to Vonage APIs." readme = "README.md" authors = [{ name = "Vonage", email = "devrel@vonage.com" }] requires-python = ">=3.8" dependencies = [ - "vonage-utils>=1.1.0", + "vonage-utils>=1.1.1", "vonage-jwt>=1.1.0", "requests>=2.27.0", "typing-extensions>=4.9.0", - "pydantic>=2.6.1", + "pydantic>=2.7.1", ] classifiers = [ "Programming Language :: Python", diff --git a/messages/CHANGES.md b/messages/CHANGES.md index 2d2c13ed..71b83f45 100644 --- a/messages/CHANGES.md +++ b/messages/CHANGES.md @@ -1,3 +1,6 @@ +# 1.1.1 +- Update minimum dependency version + # 1.1.0 - Add `http_client` property diff --git a/messages/pyproject.toml b/messages/pyproject.toml index 8d74d007..ca8ba739 100644 --- a/messages/pyproject.toml +++ b/messages/pyproject.toml @@ -1,14 +1,14 @@ [project] name = 'vonage-messages' -version = '1.1.0' +version = '1.1.1' description = 'Vonage messages package' readme = "README.md" authors = [{ name = "Vonage", email = "devrel@vonage.com" }] requires-python = ">=3.8" dependencies = [ - "vonage-http-client>=1.3.0", - "vonage-utils>=1.1.0", - "pydantic>=2.6.1", + "vonage-http-client>=1.3.1", + "vonage-utils>=1.1.1", + "pydantic>=2.7.1", ] classifiers = [ "Programming Language :: Python", diff --git a/number_insight/README.md b/number_insight/README.md index 91479b01..3c4aa76d 100644 --- a/number_insight/README.md +++ b/number_insight/README.md @@ -9,3 +9,55 @@ The advanced insight can be obtained synchronously or asynchronously. An async a It is recommended to use this as part of the main `vonage` package. The examples below assume you've created an instance of the `vonage.Vonage` class called `vonage_client`. ### Make a Basic Number Insight Request + +```python +from vonage_number_insight import BasicInsightRequest + +response = vonage_client.number_insight.basic_number_insight( + BasicInsightRequest(number='12345678900') +) + +print(response.model_dump(exclude_none=True)) +``` + +### Make a Standard Number Insight Request + +```python +from vonage_number_insight import StandardInsightRequest + +vonage_client.number_insight.standard_number_insight( + StandardInsightRequest(number='12345678900') +) + +# Optionally, you can get caller name information (additional charge) by setting the `cnam` parameter = True +vonage_client.number_insight.standard_number_insight( + StandardInsightRequest(number='12345678900', cnam=True) +) +``` + +### Make an Asynchronous Advanced Number Insight Request + +When making an asynchronous advanced number insight request, the API will return basic information about the request to you immediately and send the full data to the webhook callback URL you specify. + +```python +from vonage_number_insight import AdvancedAsyncInsightRequest + +vonage_client.number_insight.advanced_async_number_insight( + AdvancedAsyncInsightRequest(callback='https://example.com', number='12345678900') +) +``` + +### Make a Synchronous Advanced Number Insight Request + +```python +from vonage_number_insight import AdvancedSyncInsightRequest + +vonage_client.number_insight.advanced_sync_number_insight( + AdvancedSyncInsightRequest(number='12345678900') +) + +# Optionally, you can get real time information by setting the `real_time_data` parameter = True +vonage_client.number_insight.advanced_async_number_insight( + AdvancedSyncInsightRequest(number='12345678900', real_time_data=True, cnam=True) +) +``` \ No newline at end of file diff --git a/number_insight/pyproject.toml b/number_insight/pyproject.toml index 4d0a7c83..36b0c0f5 100644 --- a/number_insight/pyproject.toml +++ b/number_insight/pyproject.toml @@ -6,9 +6,9 @@ readme = "README.md" authors = [{ name = "Vonage", email = "devrel@vonage.com" }] requires-python = ">=3.8" dependencies = [ - "vonage-http-client>=1.3.0", - "vonage-utils>=1.1.0", - "pydantic>=2.6.1", + "vonage-http-client>=1.3.1", + "vonage-utils>=1.1.1", + "pydantic>=2.7.1", ] classifiers = [ "Programming Language :: Python", diff --git a/number_insight/src/vonage_number_insight/enums.py b/number_insight/src/vonage_number_insight/enums.py deleted file mode 100644 index e69de29b..00000000 diff --git a/number_insight/src/vonage_number_insight/responses.py b/number_insight/src/vonage_number_insight/responses.py index 6fdea775..5217ce94 100644 --- a/number_insight/src/vonage_number_insight/responses.py +++ b/number_insight/src/vonage_number_insight/responses.py @@ -38,10 +38,6 @@ class StandardInsightResponse(BasicInsightResponse): original_carrier: Optional[Carrier] = None ported: Optional[str] = None caller_identity: Optional[CallerIdentity] = None - caller_type: Optional[str] = None - caller_name: Optional[str] = None - first_name: Optional[str] = None - last_name: Optional[str] = None class RoamingStatus(BaseModel): @@ -63,7 +59,6 @@ class AdvancedSyncInsightResponse(StandardInsightResponse): valid_number: Optional[str] = None reachable: Optional[str] = None real_time_data: Optional[RealTimeData] = None - ip_warnings: Optional[str] = None class AdvancedAsyncInsightResponse(BaseModel): diff --git a/number_insight/tests/test_number_insight.py b/number_insight/tests/test_number_insight.py index b376430e..97280695 100644 --- a/number_insight/tests/test_number_insight.py +++ b/number_insight/tests/test_number_insight.py @@ -149,8 +149,9 @@ def test_advanced_sync_insight(caplog): assert response.status == 44 assert response.request_id == '97e973e7-2e27-4fd3-9e1a-972ea14dd992' assert response.current_carrier.network_code == '310090' - assert response.first_name == 'John' - assert response.last_name == 'Smith' + assert response.caller_identity.first_name == 'John' + assert response.caller_identity.last_name == 'Smith' + assert response.caller_identity.subscription_type == 'postpaid' assert response.lookup_outcome == 1 assert response.lookup_outcome_message == 'Partial success - some fields populated' assert response.roaming == 'unknown' diff --git a/number_insight_v2/CHANGES.md b/number_insight_v2/CHANGES.md index 6e846e2d..36feaaeb 100644 --- a/number_insight_v2/CHANGES.md +++ b/number_insight_v2/CHANGES.md @@ -1,2 +1,5 @@ +# 0.1.1b0 +- Update minimum dependency version + # 0.1.0b0 - Beta release \ No newline at end of file diff --git a/number_insight_v2/pyproject.toml b/number_insight_v2/pyproject.toml index e200b817..442aeb98 100644 --- a/number_insight_v2/pyproject.toml +++ b/number_insight_v2/pyproject.toml @@ -1,14 +1,14 @@ [project] name = 'vonage-number-insight-v2' -version = '0.1.0b0' +version = '0.1.1b0' description = 'Vonage Number Insight v2 package' readme = "README.md" authors = [{ name = "Vonage", email = "devrel@vonage.com" }] requires-python = ">=3.8" dependencies = [ - "vonage-http-client>=1.3.0", - "vonage-utils>=1.1.0", - "pydantic>=2.6.1", + "vonage-http-client>=1.3.1", + "vonage-utils>=1.1.1", + "pydantic>=2.7.1", ] classifiers = [ "Programming Language :: Python", diff --git a/requirements.txt b/requirements.txt index d0f9aefb..a0d28c40 100644 --- a/requirements.txt +++ b/requirements.txt @@ -1,6 +1,18 @@ pytest>=8.0.0 requests>=2.31.0 responses>=0.24.1 -pydantic>=2.6.1 +pydantic>=2.7.1 typing-extensions>=4.9.0 -vonage-jwt>=1.1.0 \ No newline at end of file +vonage-jwt>=1.1.0 + +-e http_client +-e messages +-e number_insight +-e number_insight_v2 +-e sms +-e users +-e verify +-e verify_v2 +-e voice +-e vonage +-e vonage_utils diff --git a/sms/CHANGES.md b/sms/CHANGES.md index d1ba477e..62d1cf17 100644 --- a/sms/CHANGES.md +++ b/sms/CHANGES.md @@ -1,3 +1,6 @@ +# 1.1.1 +- Update minimum dependency version + # 1.1.0 - Add `http_client` property diff --git a/sms/pyproject.toml b/sms/pyproject.toml index b2c52642..29c2215c 100644 --- a/sms/pyproject.toml +++ b/sms/pyproject.toml @@ -1,14 +1,14 @@ [project] name = 'vonage-sms' -version = '1.1.0' +version = '1.1.1' description = 'Vonage SMS package' readme = "README.md" authors = [{ name = "Vonage", email = "devrel@vonage.com" }] requires-python = ">=3.8" dependencies = [ - "vonage-http-client>=1.3.0", - "vonage-utils>=1.1.0", - "pydantic>=2.6.1", + "vonage-http-client>=1.3.1", + "vonage-utils>=1.1.1", + "pydantic>=2.7.1", ] classifiers = [ "Programming Language :: Python", diff --git a/users/CHANGES.md b/users/CHANGES.md index 368fd9f2..9dc9c61c 100644 --- a/users/CHANGES.md +++ b/users/CHANGES.md @@ -1,3 +1,6 @@ +# 1.1.1 +- Update minimum dependency version + # 1.1.0 - Add `http_client` property - Rename `ListUsersRequest` -> `ListUsersFilter` diff --git a/users/pyproject.toml b/users/pyproject.toml index 3a261fe0..9b8d2699 100644 --- a/users/pyproject.toml +++ b/users/pyproject.toml @@ -1,14 +1,14 @@ [project] name = 'vonage-users' -version = '1.1.0' +version = '1.1.1' description = 'Vonage Users package' readme = "README.md" authors = [{ name = "Vonage", email = "devrel@vonage.com" }] requires-python = ">=3.8" dependencies = [ - "vonage-http-client>=1.3.0", - "vonage-utils>=1.1.0", - "pydantic>=2.6.1", + "vonage-http-client>=1.3.1", + "vonage-utils>=1.1.1", + "pydantic>=2.7.1", ] classifiers = [ "Programming Language :: Python", diff --git a/verify/CHANGES.md b/verify/CHANGES.md index 09439bfb..727f57dc 100644 --- a/verify/CHANGES.md +++ b/verify/CHANGES.md @@ -1,3 +1,6 @@ +# 1.1.1 +- Update minimum dependency version + # 1.1.0 - Add `http_client` property diff --git a/verify/pyproject.toml b/verify/pyproject.toml index ba5df186..d5abe7d2 100644 --- a/verify/pyproject.toml +++ b/verify/pyproject.toml @@ -1,14 +1,14 @@ [project] name = 'vonage-verify' -version = '1.1.0' +version = '1.1.1' description = 'Vonage verify package' readme = "README.md" authors = [{ name = "Vonage", email = "devrel@vonage.com" }] requires-python = ">=3.8" dependencies = [ - "vonage-http-client>=1.3.0", - "vonage-utils>=1.1.0", - "pydantic>=2.6.1", + "vonage-http-client>=1.3.1", + "vonage-utils>=1.1.1", + "pydantic>=2.7.1", ] classifiers = [ "Programming Language :: Python", diff --git a/verify_v2/CHANGES.md b/verify_v2/CHANGES.md index 2d2c13ed..71b83f45 100644 --- a/verify_v2/CHANGES.md +++ b/verify_v2/CHANGES.md @@ -1,3 +1,6 @@ +# 1.1.1 +- Update minimum dependency version + # 1.1.0 - Add `http_client` property diff --git a/verify_v2/pyproject.toml b/verify_v2/pyproject.toml index b4c774ea..4bca7315 100644 --- a/verify_v2/pyproject.toml +++ b/verify_v2/pyproject.toml @@ -1,14 +1,14 @@ [project] name = 'vonage-verify-v2' -version = '1.1.0' +version = '1.1.1' description = 'Vonage verify v2 package' readme = "README.md" authors = [{ name = "Vonage", email = "devrel@vonage.com" }] requires-python = ">=3.8" dependencies = [ - "vonage-http-client>=1.3.0", - "vonage-utils>=1.1.0", - "pydantic>=2.6.1", + "vonage-http-client>=1.3.1", + "vonage-utils>=1.1.1", + "pydantic>=2.7.1", ] classifiers = [ "Programming Language :: Python", diff --git a/voice/CHANGES.md b/voice/CHANGES.md index 5d3cfbb8..ca5e1f85 100644 --- a/voice/CHANGES.md +++ b/voice/CHANGES.md @@ -1,3 +1,6 @@ +# 1.0.2 +- Update minimum dependency version + # 1.0.1 - Initial upload diff --git a/voice/pyproject.toml b/voice/pyproject.toml index 3f422d70..949dfdbe 100644 --- a/voice/pyproject.toml +++ b/voice/pyproject.toml @@ -1,14 +1,14 @@ [project] name = 'vonage-voice' -version = '1.0.1' +version = '1.0.2' description = 'Vonage voice package' readme = "README.md" authors = [{ name = "Vonage", email = "devrel@vonage.com" }] requires-python = ">=3.8" dependencies = [ - "vonage-http-client>=1.3.0", - "vonage-utils>=1.1.0", - "pydantic>=2.6.1", + "vonage-http-client>=1.3.1", + "vonage-utils>=1.1.1", + "pydantic>=2.7.1", ] classifiers = [ "Programming Language :: Python", diff --git a/vonage/CHANGES.md b/vonage/CHANGES.md index 12cf5b55..26dd77d7 100644 --- a/vonage/CHANGES.md +++ b/vonage/CHANGES.md @@ -1,5 +1,6 @@ # 3.99.0a8 - Add support for the [Vonage Number Insight API](https://developer.vonage.com/en/number-insight/overview). +- Update minimum dependency version # 3.99.0a7 - Add support for the [Vonage Voice API](https://developer.vonage.com/en/voice/voice-api/overview). diff --git a/vonage/pyproject.toml b/vonage/pyproject.toml index 581992b6..5efd58c4 100644 --- a/vonage/pyproject.toml +++ b/vonage/pyproject.toml @@ -6,16 +6,16 @@ readme = "README.md" authors = [{ name = "Vonage", email = "devrel@vonage.com" }] requires-python = ">=3.8" dependencies = [ - "vonage-utils>=1.1.0", - "vonage-http-client>=1.3.0", - "vonage-messages>=1.1.0", + "vonage-utils>=1.1.1", + "vonage-http-client>=1.3.1", + "vonage-messages>=1.1.1", "vonage-number-insight>=1.0.0", - "vonage-number-insight-v2>=0.1.0b0", - "vonage-sms>=1.1.0", - "vonage-users>=1.1.0", - "vonage-verify>=1.1.0", - "vonage-verify-v2>=1.1.0", - "vonage-voice>=1.0.1", + "vonage-number-insight-v2>=0.1.1b0", + "vonage-sms>=1.1.1", + "vonage-users>=1.1.1", + "vonage-verify>=1.1.1", + "vonage-verify-v2>=1.1.1", + "vonage-voice>=1.0.2", ] classifiers = [ "Programming Language :: Python", diff --git a/vonage_utils/CHANGES.md b/vonage_utils/CHANGES.md index 4fcf86af..bf3099a4 100644 --- a/vonage_utils/CHANGES.md +++ b/vonage_utils/CHANGES.md @@ -1,3 +1,6 @@ +# 1.1.0 +- Update minimum dependency version + # 1.1.0 - Add `Dtmf` and `SipUri` types - Add `Link` model diff --git a/vonage_utils/pyproject.toml b/vonage_utils/pyproject.toml index 26a14932..927e3680 100644 --- a/vonage_utils/pyproject.toml +++ b/vonage_utils/pyproject.toml @@ -1,10 +1,10 @@ [project] name = 'vonage-utils' -version = '1.1.0' +version = '1.1.1' description = 'Utils package containing objects for use with Vonage APIs' readme = "README.md" authors = [{ name = "Vonage", email = "devrel@vonage.com" }] -dependencies = ["typing_extensions>=4.9.0", "pydantic>=2.6.1"] +dependencies = ["typing_extensions>=4.9.0", "pydantic>=2.7.1"] requires-python = ">=3.8" classifiers = [ "Programming Language :: Python",