diff --git a/pybotx/client/users_api/user_from_csv.py b/pybotx/client/users_api/user_from_csv.py index 5ef01b2f..ba18e976 100644 --- a/pybotx/client/users_api/user_from_csv.py +++ b/pybotx/client/users_api/user_from_csv.py @@ -33,8 +33,8 @@ class BotXAPIUserFromCSVResult(VerifiedPayloadBaseModel): description: Optional[str] = Field(alias="Description") phone: Optional[str] = Field(alias="Phone") other_phone: Optional[str] = Field(alias="Other phone") - ip_phone: Optional[int] = Field(alias="IP phone") - other_ip_phone: Optional[int] = Field(alias="Other IP phone") + ip_phone: Optional[str] = Field(alias="IP phone") + other_ip_phone: Optional[str] = Field(alias="Other IP phone") personnel_number: Optional[str] = Field(alias="Personnel number") @validator( diff --git a/pybotx/client/users_api/user_from_search.py b/pybotx/client/users_api/user_from_search.py index 439e1a32..6c0ce435 100644 --- a/pybotx/client/users_api/user_from_search.py +++ b/pybotx/client/users_api/user_from_search.py @@ -22,10 +22,10 @@ class BotXAPISearchUserResult(VerifiedPayloadBaseModel): user_kind: APIUserKinds active: Optional[bool] = None description: Optional[str] = None - ip_phone: Optional[int] = None + ip_phone: Optional[str] = None manager: Optional[str] = None office: Optional[str] = None - other_ip_phone: Optional[int] = None + other_ip_phone: Optional[str] = None other_phone: Optional[str] = None public_name: Optional[str] = None cts_id: Optional[UUID] = None diff --git a/pybotx/models/users.py b/pybotx/models/users.py index 958f1727..567a31c2 100644 --- a/pybotx/models/users.py +++ b/pybotx/models/users.py @@ -47,10 +47,10 @@ class UserFromSearch: user_kind: UserKinds active: Optional[bool] = None description: Optional[str] = None - ip_phone: Optional[int] = None + ip_phone: Optional[str] = None manager: Optional[str] = None office: Optional[str] = None - other_ip_phone: Optional[int] = None + other_ip_phone: Optional[str] = None other_phone: Optional[str] = None public_name: Optional[str] = None cts_id: Optional[UUID] = None @@ -106,6 +106,6 @@ class UserFromCSV: description: Optional[str] = None phone: Optional[str] = None other_phone: Optional[str] = None - ip_phone: Optional[int] = None - other_ip_phone: Optional[int] = None + ip_phone: Optional[str] = None + other_ip_phone: Optional[str] = None personnel_number: Optional[str] = None diff --git a/pyproject.toml b/pyproject.toml index 0edf8c30..c09bece4 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,6 +1,6 @@ [tool.poetry] name = "pybotx" -version = "0.73.2" +version = "0.73.3" description = "A python library for interacting with eXpress BotX API" authors = [ "Sidnev Nikolay ", diff --git a/tests/client/users_api/conftest.py b/tests/client/users_api/conftest.py index 2e5dfd47..78279acc 100644 --- a/tests/client/users_api/conftest.py +++ b/tests/client/users_api/conftest.py @@ -23,11 +23,11 @@ def user_from_search_with_data_json() -> Dict[str, Any]: "created_at": "2023-03-26T14:36:08.740618Z", "cts_id": "e0140f4c-4af2-5a2e-9ad1-5f37fceafbaf", "description": "Director in Owners dep", - "ip_phone": 1271020, + "ip_phone": "1271020", "manager": "Alice", "office": "SUN", - "other_ip_phone": 32593, - "other_phone": 1254218, + "other_ip_phone": "32593", + "other_phone": "1254218", "public_name": "Bobby", "rts_id": "f46440a4-d930-58d4-b3f5-8110ab846ee3", "updated_at": "2023-03-26T14:36:08.740618Z", @@ -51,10 +51,10 @@ def user_from_search_with_data() -> UserFromSearch: created_at=convert_to_datetime("2023-03-26T14:36:08.740618Z"), cts_id=UUID("e0140f4c-4af2-5a2e-9ad1-5f37fceafbaf"), description="Director in Owners dep", - ip_phone=1271020, + ip_phone="1271020", manager="Alice", office="SUN", - other_ip_phone=32593, + other_ip_phone="32593", other_phone="1254218", public_name="Bobby", rts_id=UUID("f46440a4-d930-58d4-b3f5-8110ab846ee3"), diff --git a/tests/client/users_api/test_users_as_csv.py b/tests/client/users_api/test_users_as_csv.py index 649349c8..57d776cd 100644 --- a/tests/client/users_api/test_users_as_csv.py +++ b/tests/client/users_api/test_users_as_csv.py @@ -73,7 +73,7 @@ async def test__users_as_csv__succeed( status_code=HTTPStatus.OK, content=( b"HUID,AD Login,Domain,AD E-mail,Name,Sync source,Active,Kind,Company,Department,Position,Manager,Manager HUID,Personnel number,Description,IP phone,Other IP phone,Phone,Other phone,Avatar,Office,Avatar preview\n" - b"dbc8934f-d0d7-4a9e-89df-d45c137a851c,test_user_17,cts.example.com,,test_user_17,ad,false,cts_user,Company,Department,Position,Manager John,13a6909c-bce1-4dbf-8359-efb7ef8e5b34,Some number,Description,123,321,Phone,Other_phone,Avatar,Office,Avatar_preview\n" + b"dbc8934f-d0d7-4a9e-89df-d45c137a851c,test_user_17,cts.example.com,,test_user_17,ad,false,cts_user,Company,Department,Position,Manager John,13a6909c-bce1-4dbf-8359-efb7ef8e5b34,Some number,Description,IP phone,Other IP phone,Phone,Other_phone,Avatar,Office,Avatar_preview\n" b"13a6909c-bce1-4dbf-8359-efb7ef8e5b34,test_user_18,cts.example.com,,test_user_18,unsupported,true,cts_user,,,,,,,,,,,,,," ), ), @@ -107,8 +107,8 @@ async def test__users_as_csv__succeed( manager="Manager John", manager_huid=UUID("13a6909c-bce1-4dbf-8359-efb7ef8e5b34"), description="Description", - ip_phone=123, - other_ip_phone=321, + ip_phone="IP phone", + other_ip_phone="Other IP phone", phone="Phone", other_phone="Other_phone", avatar="Avatar",