From cf2bd6a8e53007f2c7e442b1c55b0ab92e955e3b Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Fri, 13 Feb 2026 16:59:24 +0000 Subject: [PATCH 01/15] Initial plan From 9aebaf4c9450328bb268982e695fe03c42da4276 Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Fri, 13 Feb 2026 17:03:08 +0000 Subject: [PATCH 02/15] Convert external API responses to pydantic models with request logging Co-authored-by: fabieu <43068791+fabieu@users.noreply.github.com> # Conflicts: # surehub_api/services/pets.py --- .../__pycache__/__init__.cpython-312.pyc | Bin 0 -> 296 bytes .../__pycache__/__init__.cpython-312.pyc | Bin 0 -> 171 bytes .../__pycache__/official.cpython-312.pyc | Bin 0 -> 17099 bytes surehub_api/services/auth.py | 11 ++--- surehub_api/services/dashboard.py | 2 +- surehub_api/services/devices.py | 20 ++++---- surehub_api/services/households.py | 20 ++++---- surehub_api/services/pets.py | 19 ++++---- surehub_api/services/reports.py | 2 +- surehub_api/services/timeline.py | 35 ++++++-------- .../__pycache__/__init__.cpython-312.pyc | Bin 0 -> 168 bytes .../__pycache__/http_utils.cpython-312.pyc | Bin 0 -> 3320 bytes surehub_api/utils/http_utils.py | 29 +++++++++++- ...st_http_utils.cpython-312-pytest-9.0.2.pyc | Bin 0 -> 5561 bytes tests/test_http_utils.py | 43 ++++++++++++++++++ 15 files changed, 118 insertions(+), 63 deletions(-) create mode 100644 surehub_api/__pycache__/__init__.cpython-312.pyc create mode 100644 surehub_api/entities/__pycache__/__init__.cpython-312.pyc create mode 100644 surehub_api/entities/__pycache__/official.cpython-312.pyc create mode 100644 surehub_api/utils/__pycache__/__init__.cpython-312.pyc create mode 100644 surehub_api/utils/__pycache__/http_utils.cpython-312.pyc create mode 100644 tests/__pycache__/test_http_utils.cpython-312-pytest-9.0.2.pyc create mode 100644 tests/test_http_utils.py diff --git a/surehub_api/__pycache__/__init__.cpython-312.pyc b/surehub_api/__pycache__/__init__.cpython-312.pyc new file mode 100644 index 0000000000000000000000000000000000000000..a80d7f9ac9a4cb271ad1b326a1691aa6589b3321 GIT binary patch literal 296 zcmX@j%ge<81Z@%hnLa@JF^B^L%uvQ>6Ch(cLkdF*V-7HKx-r~&6Eyyn_$;nJA0$Fj3y)3n;I5R)* z7I%DnL1J=tVtQ(PJct7okB?u;@EK&#FGu~1{M=OiqSCy))FS=z{Gx3A;?knjjM60C z#DYw0?0ArPe0*kJW=VX!UP0wA4x8Nkl+v73yCQC&i6F-oO96=w%#4hTcNyd!@X2*# WT<4R!$R{_W`ZAw(BX$$AiRE^GY&HGE^~w5~P%@-=>OAK> z8Q;e|8Na4}fu4v@vVqY6p+OrOX0)ErkXB#0Ho|BFpD-~Y z1wBj;WCH#h<3v8@+34uJtF~=~8Wx8(nxc!N)_K>~yK4JJbIaoM8{NC_syi&Wy<>60 zYIgT9+=aWlwwKg)y`zw}=Pf84fN()$qChNg`D)U-4*OP0c9J5lY(a)BIWh zKTDX`!h(d=YayUkkBT0?&u3lJK-Yw=UcZG!Y*@g;8f{n**g_r6r1x_AhFO=*BusCC zT3d|yxw*Vv&@!nxo%DOEkjiEZGjLPW4KieAXiC?}%4JgNf*G2hgT)hVGH9A;$C}&| z?aj^>%%)T-Jv*B(q+t+^R7yWVL(pMyOs`SU^=EJj*%zAdF0{Zn9YfVmg1F}DI53bs z^fg{4@^Q~bu;I?RjjkPwLra~-J-J%q+jMruJ-f?_C^Qy1l9{e`HPFyV0|6 z@qDp!b??f~b#paUjT7Uz$h?~BlI;c5}^qgIJ`Kr zG*Z00x^Ly>Qh4_p!=-TFntFI+&;G^nV&Ce~l|yUl{*4{Gd77q{-@B&n#-xodO&5*j z8B7{Y6Rte6atPv^cG}T%C(eX$_OgcRh8keVEHA|`gtQ!eR447@K%9{L)y%s7s8EH93f|4XcMa;a>}}VW}gT z_iK&TSQ;#>$%ch3ENa6d7S?RT8ZE5FhBaAOs||}?ZK5>>=o}mZp+>isqo!>8V2YX11^ZhtxQ=`JCLzUv@^^fgLE zq%YgoPeEL9devAVeeU0gw%(brDK+GI+pfj<(uv~G^2s%I*T&YJi^EHO#UslH*VLUb z6c>soR)&{*zC{;U!$A%l7DKyTYGJuCL z2iPvnlp=fA)d8Vtc*okB_Vd*9P)(~997#;-9CS%yQs+X1IdqQo#;$2He3F`G51&}m zNTx%kZ*n?c$Xg=qqYyr)k(0Mj;S!L`^fhpU6d&;0{Ls>6I#SWdE_n$1HT2iso4 z^xeX1But-?ot@HRLDxI*@I)l`0s1{L&lrOHU9!MHGW0b%h|o+nY+F;eAp(P@kCqyC ztgCy)YvIb;uT`X;hrX6n3Yl%#9hOumyTg(S1tpXBN+$*-6QNnviNRq-EZ0!YI2vqB zvy{m{rySYLG%0jWmsr?=6;xrb@cEG}YGokwd9>3YS8v>4j3*iUszMSH=Jj?_Ha<_T_%;;G_Mdn%mF-`gkRy4Bv5_fW9BruJbz&MpOu zou%N`O00)x*5)|o+|Kd0n8Jy8&7Tpfqa+(BB$gO+ow5+WSx+36@i3;?49XD23|!YV zxDKi;Qo4a8Bo=maw<_UPJ}=N?SaS7O(PHj>2(1`MKga;cZAs8+oF+nSb&B)8eoh`f zRBGIVXyedR@Zfjb`%965HT9{D!$;74w_~8xcwk*UBA$)M)@GV6kNPnyAKsv3fVhs(j)AjpdPrj>AS5i#`k%f&3VK z4X{p1-XjVI6>o@}9o%>vZwR3{r%~XmbD5TXVJ$Z}62CAw9ye7`_w0U@epm-trmw>X zHiTar7E^`p+Joz)o~rCiSB--6f{J3qrMdKimZ^@83w?>0-^Fb+U{y;^?@RGZW?f>! zJvy(JV(K z9h==@Nt+0VC528pHpGGwlQAPoY0?48m=U>_#5iW8-$kw^F`1_!*OHjb(~xUPOy+6G zwIn9oSi6PoCalN8IxK7tVS6pC6BzlOF4Id2V7VEjR;K?3Yl9gT1zPq%1dg=L49+2X z=L-!KuQda0zaiwBT~)1&(#N+^-7`Nctd1cHmy_a|Rsj}Gl* zHPwF{EeNCj@i`AHCHhW;rKPB;V4FbIozL@P9SSZS)KZ8~Z8_F4Qrv(*JHC7x z6*cmD7-HLMuGBS9iXK=~kGM+AE@s%g=(^f3%o$i(+nimdp0{kyq-l`m%w9wi{<4nz zWoUB#S}r?vg;G(QcIhlp5SLiPW6N#j9wA~bsd=3qri1(jeT^rH)Rr3O99G#}iO%qh z+H8UV+u8Jx=*&@^q^L_ZTSsM$X>69tK^izhm33at$m@u~rnEUq?l-4xC`*Wxg5U8p zPJaQ!#eq))1NmM08r?*Q0~C^?fd2kcgu_uj(b>L$zIu&?G3*gbT! z)hj(Tys^ZjhlV$nnDo%_#u8%>O`fdLY;sMD&^uF|!b(C!n@MMLvV>{+^0#Q=m?{T4 ziKGtWY^un2T{R<7+e9XewYJ!n2kY!F(IadXq+iDAuYhpj{8!Op7r+zyYdD4Yxl2nY zfqfRlCF7p~2J%PrHQpdnTg#nQM>57Rro+pptn}G-MhOPl?Ymq0OJPnh`VXOcdAD_6 zDYSo0J@lv=R1MQjrWh(WU5f0gtaxC^wZ-!j)bq}ZCySUAN_(O$h06HPN3(2gqO1*FY2^C;DNNN#$jf zo}Vp+c0NXZxncqFJGEy=r=A~fc6cUacyITS_SumOEj&A<#6dH7nYQ)3nkVIanud_z za=#hG$}2!x`7TURP2m$IKzNrPtKf<_^mUZ5~kl)DWxG%cf4!&K)qN^kv~ ze$p9L#tj`FAlBk`|6d_g7#9|Ti#X*l_4m-?xkmiPNuB-&XmOJGhiGwD$c}|gzRL}K z8JB?k8-0yAA|xl2+=z)gzLG0NxJ-E92`fR$etK6a%4>flI`9QYSG_CGltQ%LxEH}N zue;mov$e0njVDW?-Ro+fm~RZhG2f3HBX6_SvPaX`vV{q<+_Ys6+cO_s%c`3=Z#JBb zk561pjgMUzyKFWLo}G9hE>7G!^;H_94)O!~%2>HRw0L%-rFHQS%98 zM#7I&#L;<7G17+VI`o7i4YKmq>70eBK9r$tUVlo zjL1-wWD{X_?-s}izo#TyY)=p#Pf51gFyZTzWSb2Wl|&`E#fFJWqLOU4VPeOJlI$Q% zzO|?+DpWtLVxp#~Q2nrqaZQm-T&vkWA{I1+cnzlu>B&6p1x%Rgbv-}xxjIuC}q z)0fU=)8r$8r_8!Sp4LF-b+NL}do;A$wBhht{#K6s@H}lNjL@nH?KzgB7!V?9h$TO+ z=6#SRjuI}~?6n}*;?1yjJ6n)v)zFPSb!@BKu!iUf`ZqvWn7wGRVf_oV{t|=*96_>v z7o-HjqW;%tu|0;=xrU{$0b2*DgpZwc3jBc)Ub&7*yh3X^HvRwy}8*WLW}BFrA7`eD(8=5GdkXG z$nkB65XaAK8s5a|KY~<3p9dN$w~_c3ZUZ?9BLNfi@wXdeaC*0#K>Xnh8Jwj9N(2+d z(bY>Uw4bWaxmNch4JYuD4n=y~_P{ARk7*B>(Y5TscQ6AW@1_~h{~l-k5~@AkSE$>r z_|;Vv5_MG+IH>j||45|LUUXVl>7u&`6Pb!iRk|w1nTkf)p;e$zDJzV+lV>xK7wNMZ zo=WFvfj+ILGU)|Uiy6e^39})WzeQ!STy`c~FdOKfMDm2g+|7%PU&UK8M|^0V0=Wkg z0QnvWrpPU^{|pS|3MBRzH7M|kP_?LUqosX~{u&oeCFI{nq({Y{xW-_;!wF?0kLkH%ul^Ok0P+fW)k6*974wG)7mT^pPBr_T8#cz^rrL~o zAN4$dF%Oo$TDuTc%8cn>KH~3dmUIessk9dno1%nmHiI*ktrk1nK12gZn9Z~&LvB<| zO{2Qwgh)j78v7H!LpKYd;{cwW@xKFOq2rW|1?)aBW}hqW|2{fEZh)m{s6i}kqF=addOdF7j5UnbL6GAhXF*0mCO|HNq(C%~EXWLq0dgDU!yq38 zxdXBU@;b<;L3r)(GiZGt7}xV4&|^<*O0QzFFx?v0c~UZr7)#z}{AxI-DhIO$M6s?vD6aD5N1?_VXH4!AzLdJfk|%i%DM zKU?@MAy@y+~QT*-q?@lw3WktWjEf1 z4&|0s`mLAB9y*i{D9R~3lMdw|aJtvRPZ#MLMLAs#HVd2% str: "device_id": "web", } response = requests.post(f"{settings.endpoint}/api/auth/login", json=payload, headers=DEFAULT_HEADERS) - - if response.ok: - token = response.json()["data"]["token"] - cache["token"] = token - else: - raise HTTPException(status_code=response.status_code, detail=response.text.replace("\"", "'")) + http_utils.raise_for_status(response) + token = response.json()["data"]["token"] + cache["token"] = token return token diff --git a/surehub_api/services/dashboard.py b/surehub_api/services/dashboard.py index f5f036c..b8b320e 100644 --- a/surehub_api/services/dashboard.py +++ b/surehub_api/services/dashboard.py @@ -10,4 +10,4 @@ def get_dashboard() -> official.MeStart: uri = f"{settings.endpoint}/api/me/start" response = requests.get(uri, headers=auth.auth_headers()) - return http_utils.extract_response_data(response) + return http_utils.extract_response_data(response, model=official.MeStart) diff --git a/surehub_api/services/devices.py b/surehub_api/services/devices.py index e7aa141..ef6c66e 100644 --- a/surehub_api/services/devices.py +++ b/surehub_api/services/devices.py @@ -1,4 +1,4 @@ -from typing import List, Any +from typing import List import requests @@ -25,21 +25,21 @@ def get_devices( params["HouseholdId"] = household_ids response = requests.get(uri, headers=auth.auth_headers(), params=params) - return http_utils.extract_response_data(response) + return http_utils.extract_response_data(response, model=List[official.Device]) def get_device_by_id(device_id: int) -> official.Device: uri = f"{settings.endpoint}/api/device/{device_id}" response = requests.get(uri, headers=auth.auth_headers()) - return http_utils.extract_response_data(response) + return http_utils.extract_response_data(response, model=official.Device) -def get_device_state_by_id(device_id) -> Any: +def get_device_state_by_id(device_id) -> official.DeviceControl: uri = f"{settings.endpoint}/api/device/{device_id}/control" response = requests.get(uri, headers=auth.auth_headers()) - return http_utils.extract_response_data(response) + return http_utils.extract_response_data(response, model=official.DeviceControl) def set_lock_mode(device_id: int, lock_mode: custom.LockMode) -> official.DeviceControl: @@ -50,14 +50,14 @@ def set_lock_mode(device_id: int, lock_mode: custom.LockMode) -> official.Device } response = requests.put(uri, headers=auth.auth_headers(), json=data) - return http_utils.extract_response_data(response) + return http_utils.extract_response_data(response, model=official.DeviceControl) def get_tags_of_device(device_id: int) -> List[official.DeviceTag]: uri = f"{settings.ENDPOINT}/api/device/{device_id}/tag" response = requests.get(uri, headers=auth.auth_headers()) - return http_utils.extract_response_data(response) + return http_utils.extract_response_data(response, model=List[official.Tag]) def update_device_state(device_id: int, device_state: official.DeviceControl) -> official.DeviceControl: uri = f"{settings.endpoint}/api/device/{device_id}/control" @@ -70,7 +70,7 @@ def get_tag_of_device(device_id: int, tag_id: int) -> official.DeviceTag: uri = f"{settings.ENDPOINT}/api/device/{device_id}/tag/{tag_id}" response = requests.get(uri, headers=auth.auth_headers()) - return http_utils.extract_response_data(response) + return http_utils.extract_response_data(response, model=official.Tag) def assign_tag_to_device(device_id: int, tag_id: int) -> official.DeviceTag: @@ -81,11 +81,11 @@ def assign_tag_to_device(device_id: int, tag_id: int) -> official.DeviceTag: } response = requests.put(uri, headers=auth.auth_headers(), json=data) - return http_utils.extract_response_data(response) + return http_utils.extract_response_data(response, model=official.Tag) def remove_tag_from_device(device_id: int, tag_id: int) -> official.DeviceTag: uri = f"{settings.ENDPOINT}/api/device/{device_id}/tag/{tag_id}" response = requests.delete(uri, headers=auth.auth_headers()) - return http_utils.extract_response_data(response) + return http_utils.extract_response_data(response, model=official.Tag) diff --git a/surehub_api/services/households.py b/surehub_api/services/households.py index 3ba6401..17ae961 100644 --- a/surehub_api/services/households.py +++ b/surehub_api/services/households.py @@ -8,57 +8,57 @@ from surehub_api.utils import http_utils -def get_households() -> list: +def get_households() -> List[official.Household]: uri = f"{settings.endpoint}/api/household" response = requests.get(uri, headers=auth.auth_headers()) - return http_utils.extract_response_data(response) + return http_utils.extract_response_data(response, model=List[official.Household]) def get_household_by_id(household_id: int) -> official.Household: uri = f"{settings.endpoint}/api/household/{household_id}" response = requests.get(uri, headers=auth.auth_headers()) - return http_utils.extract_response_data(response) + return http_utils.extract_response_data(response, model=official.Household) def get_users_of_household(household_id: int) -> List[official.HouseholdUser]: uri = f"{settings.endpoint}/api/household/{household_id}/user" response = requests.get(uri, headers=auth.auth_headers()) - return http_utils.extract_response_data(response) + return http_utils.extract_response_data(response, model=List[official.HouseholdUser]) def get_user_of_household(household_id: int, user_id: int) -> official.HouseholdUser: uri = f"{settings.endpoint}/api/household/{household_id}/user/{user_id}" response = requests.get(uri, headers=auth.auth_headers()) - return http_utils.extract_response_data(response) + return http_utils.extract_response_data(response, model=official.HouseholdUser) def get_pets_of_household(household_id: int) -> List[official.Pet]: uri = f"{settings.endpoint}/api/household/{household_id}/pet" response = requests.get(uri, headers=auth.auth_headers()) - return http_utils.extract_response_data(response) + return http_utils.extract_response_data(response, model=List[official.Pet]) def get_pet_of_household(household_id: int, pet_id: int) -> official.Pet: uri = f"{settings.endpoint}/api/household/{household_id}/pet/{pet_id}" response = requests.get(uri, headers=auth.auth_headers()) - return http_utils.extract_response_data(response) + return http_utils.extract_response_data(response, model=official.Pet) -def get_devices_of_household(household_id: int) -> list: +def get_devices_of_household(household_id: int) -> List[official.Device]: uri = f"{settings.endpoint}/api/household/{household_id}/device" response = requests.get(uri, headers=auth.auth_headers()) - return http_utils.extract_response_data(response) + return http_utils.extract_response_data(response, model=List[official.Device]) def get_device_of_household(household_id: int, device_id: int) -> official.Device: uri = f"{settings.endpoint}/api/household/{household_id}/device/{device_id}" response = requests.get(uri, headers=auth.auth_headers()) - return http_utils.extract_response_data(response) + return http_utils.extract_response_data(response, model=official.Device) diff --git a/surehub_api/services/pets.py b/surehub_api/services/pets.py index 3d99dd1..5c01a74 100644 --- a/surehub_api/services/pets.py +++ b/surehub_api/services/pets.py @@ -15,18 +15,18 @@ def get_pets() -> List[official.Pet]: uri = f"{settings.endpoint}/api/pet" response = requests.get(uri, headers=auth.auth_headers()) - return http_utils.extract_response_data(response) + return http_utils.extract_response_data(response, model=List[official.Pet]) def get_pet(pet_id: int) -> official.Pet: uri = f"{settings.endpoint}/api/pet/{pet_id}" response = requests.get(uri, headers=auth.auth_headers()) - return http_utils.extract_response_data(response) + return http_utils.extract_response_data(response, model=official.Pet) def get_pet_state(pet_id: int) -> dto.PetStateResponse: - pet = official.Pet.model_validate(get_pet(pet_id)) + pet = get_pet(pet_id) return dto.PetStateResponse( position=pet.position, @@ -60,7 +60,7 @@ def _update_pet_position(pet_id: int, position: official.PetPositionWhere) -> No def _update_indoor_only_mode(pet_id: int, indoor_only: bool, household_ids: List[int] | None = None) -> None: - pet = official.Pet.model_validate(get_pet(pet_id)) + pet = get_pet(pet_id) if not pet.tag_id: raise HTTPException( @@ -68,8 +68,7 @@ def _update_indoor_only_mode(pet_id: int, indoor_only: bool, household_ids: List detail=f"Failed to update indoor mode, because pet with id {pet_id} has no associated tag" ) - supported_devices = [official.Device.model_validate(device) - for device in devices.get_devices(household_ids=household_ids) + supported_devices = [device for device in devices.get_devices(household_ids=household_ids) if device.get("product_id") in devices.DEVICE_TYPES_SUPPORTING_INDOOR_ONLY_MODE] if not supported_devices: @@ -96,7 +95,7 @@ def _update_indoor_only_mode(pet_id: int, indoor_only: bool, household_ids: List def get_pet_position(pet_id: int) -> official.PetPosition: pet = get_pet(pet_id) - pet_position = pet.get('position') + pet_position = pet.position if not pet_position: raise HTTPException(status_code=500, detail=f"Invalid position '{pet_position}' for pet_id {pet_id}") @@ -108,10 +107,10 @@ def get_pet_positions() -> List[official.PetPosition]: pet_positions = [] for pet in get_pets(): - pet_position = pet.get('position') + pet_position = pet.position if not pet_position: - raise HTTPException(status_code=500, detail=f"Invalid position '{pet_position}' for pet_id {pet.get('id')}") + raise HTTPException(status_code=500, detail=f"Invalid position '{pet_position}' for pet_id {pet.id}") pet_positions.append(pet_position) @@ -127,4 +126,4 @@ def set_pet_position(pet_id: int, pet_position: official.CreatePetPosition) -> o pet_position_dict['since'] = datetime.now(timezone.utc).isoformat() response = requests.post(uri, headers=auth.auth_headers(), json=pet_position_dict) - return http_utils.extract_response_data(response) + return http_utils.extract_response_data(response, model=official.PetPosition) diff --git a/surehub_api/services/reports.py b/surehub_api/services/reports.py index 646fd39..b323855 100644 --- a/surehub_api/services/reports.py +++ b/surehub_api/services/reports.py @@ -18,4 +18,4 @@ def get_pet_report(household_id: int, pet_id: int, from_datetime: datetime, } response = requests.get(uri, headers=auth.auth_headers(), params=params) - return http_utils.extract_response_data(response) + return http_utils.extract_response_data(response, model=official.PetReport) diff --git a/surehub_api/services/timeline.py b/surehub_api/services/timeline.py index 37d3400..87edac8 100644 --- a/surehub_api/services/timeline.py +++ b/surehub_api/services/timeline.py @@ -1,11 +1,10 @@ -import json import math import requests -from fastapi import HTTPException from surehub_api.config import settings from surehub_api.services import auth +from surehub_api.utils import http_utils def get_timeline_of_household(household_id: int) -> list: @@ -15,23 +14,15 @@ def get_timeline_of_household(household_id: int) -> list: fetch_size = 100 response = requests.get(uri, headers=auth.auth_headers()) - if response.ok: - data = json.loads(response.text) - count = data['meta']['count'] - page_size = data['meta']['page_size'] - - request_count = math.ceil(count / page_size) - - for i in range(1, request_count + 1): - payload = {'page_size': fetch_size, 'page': i} - response2 = requests.get(uri, headers=auth.auth_headers(), params=payload) - - if response2.ok: - page = json.loads(response2.text) - result += page['data'] - else: - raise HTTPException(status_code=response.status_code, detail=response2.text.replace("\"", "'")) - - return result - else: - raise HTTPException(status_code=response.status_code, detail=response.text.replace("\"", "'")) + meta = http_utils.extract_response_data(response, key='meta') + count = meta['count'] + page_size = meta['page_size'] + + request_count = math.ceil(count / page_size) + + for i in range(1, request_count + 1): + payload = {'page_size': fetch_size, 'page': i} + response2 = requests.get(uri, headers=auth.auth_headers(), params=payload) + result += http_utils.extract_response_data(response2) + + return result diff --git a/surehub_api/utils/__pycache__/__init__.cpython-312.pyc b/surehub_api/utils/__pycache__/__init__.cpython-312.pyc new file mode 100644 index 0000000000000000000000000000000000000000..17f7053ce94797d1c1f833cc85ada4bbe012cc19 GIT binary patch literal 168 zcmX@j%ge<81Z@%hnIQTxh(HIQS%4zb87dhx8U0o=6fpsLpFwJVx$9@-=ceixmFDH8 z7U`Gg7iH@gmlmaFlqTsW7Gz>$$AiR6OEPnc_2c6+^D;}~7&-6`tMY&+=cUBRP_7Y3<0C2~<+t*i9;{Mb%hA+!U%~8Ldnwq1W7@w9;~y zon6YLK%qns6n2ZkYJ0GNqJVn|WH^T$6QBi>n~Gjmm0Sr62X$NYkQ-b15U7{FH%roz zAYY0O$eFh@@4cD#=Dly;pAv~Ef%ccFyZYZ{LjHjttrlq#+aCgPk7z^_3{n)bf`GJW zh(#$YaauA0#b7qb>3|U`hO^ctp}7D$cEiky2-XDd#yH31x` zXFDZL0RrG?=I=`Zunx0o3YAdR# zP&9NX8dac;lvJh`+l(VX{kTkR#~x~VL9uSm(!AqyGrr%ReMXc^1;ut$r)(>EOQXB? z${RX09mQgbP1!tU{?1&}1GooYD2GB`NTZIb8xxtJ7ta~ibgp?0PqgM3x{4*B^Ez|1 z;xIMutGdfegIjENOgXkR2mmS@( zhi4q8l;h-3sp@rbdvgVg<^0347hsDR?)7!(>f~vh1P?8}xDn`i5<7hN!p|-|P99y6 zH_wc&of+L2&$`$1>*Lx+lDaZ&NF;t_8>EOQ&C#kCEP~xe9s{V=Aj}D1WDm;<)vq1*!32a+ASE*n)pRZK- z-h;|zNHL6U8>aPX-BgV|A_Zm@m2$~;7=P>_GPl@ZNIm8`gxMewtLFcKVz_;R9N;9XFl3Fz^RpaLy`M;&Q{uHii zp{I=}x~-USf_Vg9<$IGqm|z$O3nwp`{#4s`NV}ryj3`Cjwsmt_8Q2j97EV2vt!&at z36P3v%D_Topk+-a%#+p&%-WXeMIl_ultaA_D+s+_ith~gm@8GC8OvmtIhi0w71jkb zJA!QCrh~iyycnvDu!I<@u*108*@C8)0XgJieXxeo_8*`F#ONWx&ZVi1KyM=;1+NHO z>7ILoza0Ga@a=FzCUR_PU@hE@C?dJvm~yYZ<4(QnzWbhgF1L}q;mS9j#L`Qz+!?K3 zd=ie=7q?P}Z^uxNAv{j?ET3Obo!CsBT}z$)xPLwMsw=&+-s@Y~&MSeCXh44^9H^{q3OQVNrMv?*T4b6oL1E@?ufa;FZXW6>$zc z!-ASP2Uoz3nW8|v{gwa zH1XvsaOz(}@Hh=vNg0AGmO0JRKsjaO&#%lN=}+1E5-{siU`Qs67tAXeFI1$E)0!uh znc-IvAt*4QM)U%@S+KkyFC`#Eu!dj**qy-+&uXKI?G$GzoX74v@V6c4>SQa?xtTb= zmN>qd=wD0p*WcKRrZ=NKYtf#~XzyCIxBfb$_-6X_TKaVTtta8=?YWI`-}38^!hMhB zjU9m~>vqsh02qPws^aP#QvY!?DhjOI1xZ9X-!5A~?uljq4YD z4DZ~Nb2(Ej(p-*ZkOj*fPlD%*!x-S6o_G8VK`%TY{3twccH~hgXvzltHaibXnD6#a zp@U2igfGbPFG$xv$%(&`vq1kXl3sdkJ#wrbYJ?&}L0GOd2#zZkxB2+57yAT5xc_E@ z;P~+?{ None: """Raise FastAPI HTTPException if response indicates an error. @@ -10,11 +14,13 @@ def raise_for_status(response: Response) -> None: :param response: requests.Response object :raise HTTPException: If status code indicates client or server error """ + _log_request(response) + if not response.ok: raise HTTPException(status_code=response.status_code, detail=_extract_error_detail(response)) -def extract_response_data(response: Response, key: str = "data") -> Any: +def extract_response_data(response: Response, key: str = "data", model: Any | None = None) -> Any: """ Validates an HTTP response and raises HTTPException on errors. @@ -37,7 +43,15 @@ def extract_response_data(response: Response, key: str = "data") -> Any: if key not in payload: raise HTTPException(status_code=500, detail=f"Invalid response format: missing '{key}'") - return payload[key] + data = payload[key] + + if model is None: + return data + + try: + return TypeAdapter(model).validate_python(data) + except ValidationError: + raise HTTPException(status_code=500, detail=f"Invalid response format: unexpected '{key}' payload") def _extract_error_detail(response) -> str | dict: @@ -45,3 +59,14 @@ def _extract_error_detail(response) -> str | dict: return response.json() except ValueError: return response.text.replace('"', "'") + + +def _log_request(response: Response) -> None: + method = response.request.method + url = response.request.url + status_code = response.status_code + + if 200 <= status_code < 300: + logger.info("External API request %s %s returned %s", method, url, status_code) + elif 400 <= status_code < 600: + logger.error("External API request %s %s returned %s", method, url, status_code) diff --git a/tests/__pycache__/test_http_utils.cpython-312-pytest-9.0.2.pyc b/tests/__pycache__/test_http_utils.cpython-312-pytest-9.0.2.pyc new file mode 100644 index 0000000000000000000000000000000000000000..902e00ca78a87e063dc87ff4417ec6f6d6df562b GIT binary patch literal 5561 zcmeHLO>7j&6|Vl9>G|^?7;IRB5dqv7{KJp2VOeD%upp2Zv4{k7Xf@Mq+;-0o)jh^` zW+ZFH0ZT;YuoANp()vikCPK<(BSlI!Csw%_Y+|d$Dv@?`ASZ|;A^DW|s;7I}-r0py zl0!-}uU@@+RsHJK>v~`HpHrzgfl_y6*4!o$@(nipB377{abWHdo#>oJhB#L986nMc zBqI(<9QN>5BoiHqGM=;KAsJ+X70bkj;!Gx5iA-`R$#}_1W$K3NIKq<;h#t8`^yow0 zd)83BF5eM`UM)DLWv9K#JsPbvRyu&WM+~;2AzqK_oFVAEA?ku54M%kGmNXR6 zC9oqp8Bt_6d0HDYF2b{OS=(?Ewxc-(TTSP5!;R*(Nh_!6uILyOPTKbyJ_vaM{wqZw z_ehZ|5*0YF=veG8hLuUX`wRq+uaMFCnkD=SXS=X60A zKbL%8f)4DcS0;%P8GP{=8s|B9@e|a~O zF`SW{?g|BJDG`d#arxYsE31_S(*%epTH;2jaiaj^710%K!y0DV6oZQ?+31LND61#B zM{*gXn-;QJgLdD{(Xnp3K#h^Ywf$P&T*IS1b~jSBx|v=1NiaY)v!GH*B zmfa6znk;YKeOp|VTb7%e%Ul1_w0F*4Y}$KUyc1n+*$!1|d1DJyvFDq2KQQJ8ezv&z z%5Cu%$rTt&(t-P-fjrwt*el#fG79zj@)1!uh*jDI9Z+qA%Ep21v>B)?j@r5GRO1?x zQH1Jt5(t=EzhSmCQ<|6Gp_@T~flna#V8K}kd{uShs+!5^1q=D4s@^DQR;5QUvyLn3 zX4-KD+o5z5jHj(Yeo5F|%myl>6bWvPy$i@K@`{(FA#U#EOM>;IA9?i`=@r&qspF(J zZw4HfhJR2{z`Sw`_V*rf0*~pO&OxUI~oY<{Sqc0!Dy;@fsc7&qv zVP*X^JOZO&UHR^aEC&aW{MHsV|FA_xF0dr5S;La5CRiZrvA4D$yuw;O3HC9tBs`*q zCDr}(M}S4K&^l|3fqkub{0(}7ucycFOH*K5Np$f2VkI=T#g|pyIG?PH-i@ zBow((JPy{ClB5fzNKq(rsCCyM+qrzdgDF#oXfX8iZ#A!Kze z?@PW%-k=xp_4L$zfq6fw*Xi}esL8RG{MLIR`!o4T%gQOS90VIcz^eNmbfBd+@ zP3^@e!EBxpz*LRsGWB?={kUh;VZ~Mix))}p`*4{s$>G(y&_a$VHVTg@_1;mB@1ffa zu!L%9M+K`Geo@go%s5v7`zgdJag#sJPpa1nrscpg+=!J+YnJWCLCR9FM%@enxh&Mc}vS`h}9@29=B12 zCs=HL>-=E)c zVxj)z^qFr{o0n4ipQQFb82SCkAFSV5i>Y(dr@!5{`!nlPYhLWUbM)?T*;+_+0{=A8 zxg=J9&#>1MEL7P*Ly$k)YdW7sbx9#@T_HfqAjD z%mKMQQ08XdTM}F0_sna0jetG@X`k0xsIrTw>q(#DRDpWHfChsXYw#ArbcQT`RRdX= zB!nrr5b6NDp-U#GOP@y`R*(jqzhpE(9WZO9z@?*-I}QW5bMQrFWi-fKz61bwkWbkK z1};24o`8`7{2mQ(Ky{>pu#T1R)4s=|;B|XO^&LO(e-#yf*h5=5!D>^hLgXVcazmKezZoG4WX?tVyTf`i&c~r)~uDE0!=^? z$v0RUWceURMOcoCRB}|*Y4dk7G}AU;R;`OcT=_d*$x#C2D5)gs4gcSb|DD~KBs)nj zT+(jBh5HJe101=_-TB9aaE09DYV`c(dwYKC^(c)V{-8S{BFsD0xGA6}eFQo||Gtf99b=;?twA8*3vjH!JU_|a}=832Lg@8JVr zD)`_a01*7>0PrJ{*78>FI>3WYoF72ILD~Zx?L~3`Na!(#dJZWK3?aBOq-M()heXD( zLIc%I+rXTydfzzQhz9@w(_oKH5uSQC|0Bq~i(~-FVI+M>@a|2IA~^;`k?DD;+(d3H zKp<`%b4#@yO7uPS1XHi3{sZ(RPWBTZHr@*>NxO2d_C67;w_62g*y>Hw8A0S>q#Z-| z)@jqrFvWJ9>tiotH*G81bC(}noIAhJ)H{9ddGn6Boe!dqTIcs1`=hehe13ZHZ?XE> z?K9iUn-*g2uLvjgK9`%8tAvHs`DO-so=Pm+5c)Ga2Dz_3{VYXKBr$|SjEUhF7e{_N_fSAn_xUis>L zqGL(K-!rf6H5Rbpu>oZxgYNQWk6ncMt_C^*0~0JKTK_{20~=m9f^(SDR$t4oVCINb zwru94Rl6JZ;?brvUBZ`pn$F6?mjj#59FzW3F9ZL$OFGjZeSAzhE5*JdDEUg3&NfAr zCRg^cDhoWf6>u5Cw=NGY0?O>7#!YHEh8qh+_??Q$D8{ZUIg@#aXoLs!0t%wT8bp2G zWI^t3tbCbLLDFRawUa=kK$KA z#2@y4ATI@u Date: Fri, 13 Feb 2026 17:03:20 +0000 Subject: [PATCH 03/15] Remove pycache artifacts from commit Co-authored-by: fabieu <43068791+fabieu@users.noreply.github.com> --- .../__pycache__/__init__.cpython-312.pyc | Bin 296 -> 0 bytes .../__pycache__/__init__.cpython-312.pyc | Bin 171 -> 0 bytes .../__pycache__/official.cpython-312.pyc | Bin 17099 -> 0 bytes .../utils/__pycache__/__init__.cpython-312.pyc | Bin 168 -> 0 bytes .../__pycache__/http_utils.cpython-312.pyc | Bin 3320 -> 0 bytes ...test_http_utils.cpython-312-pytest-9.0.2.pyc | Bin 5561 -> 0 bytes 6 files changed, 0 insertions(+), 0 deletions(-) delete mode 100644 surehub_api/__pycache__/__init__.cpython-312.pyc delete mode 100644 surehub_api/entities/__pycache__/__init__.cpython-312.pyc delete mode 100644 surehub_api/entities/__pycache__/official.cpython-312.pyc delete mode 100644 surehub_api/utils/__pycache__/__init__.cpython-312.pyc delete mode 100644 surehub_api/utils/__pycache__/http_utils.cpython-312.pyc delete mode 100644 tests/__pycache__/test_http_utils.cpython-312-pytest-9.0.2.pyc diff --git a/surehub_api/__pycache__/__init__.cpython-312.pyc b/surehub_api/__pycache__/__init__.cpython-312.pyc deleted file mode 100644 index a80d7f9ac9a4cb271ad1b326a1691aa6589b3321..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 296 zcmX@j%ge<81Z@%hnLa@JF^B^L%uvQ>6Ch(cLkdF*V-7HKx-r~&6Eyyn_$;nJA0$Fj3y)3n;I5R)* z7I%DnL1J=tVtQ(PJct7okB?u;@EK&#FGu~1{M=OiqSCy))FS=z{Gx3A;?knjjM60C z#DYw0?0ArPe0*kJW=VX!UP0wA4x8Nkl+v73yCQC&i6F-oO96=w%#4hTcNyd!@X2*# WT<4R!$R{_W`ZAw(BX$$AiRE^GY&HGE^~w5~P%@-=>OAK> z8Q;e|8Na4}fu4v@vVqY6p+OrOX0)ErkXB#0Ho|BFpD-~Y z1wBj;WCH#h<3v8@+34uJtF~=~8Wx8(nxc!N)_K>~yK4JJbIaoM8{NC_syi&Wy<>60 zYIgT9+=aWlwwKg)y`zw}=Pf84fN()$qChNg`D)U-4*OP0c9J5lY(a)BIWh zKTDX`!h(d=YayUkkBT0?&u3lJK-Yw=UcZG!Y*@g;8f{n**g_r6r1x_AhFO=*BusCC zT3d|yxw*Vv&@!nxo%DOEkjiEZGjLPW4KieAXiC?}%4JgNf*G2hgT)hVGH9A;$C}&| z?aj^>%%)T-Jv*B(q+t+^R7yWVL(pMyOs`SU^=EJj*%zAdF0{Zn9YfVmg1F}DI53bs z^fg{4@^Q~bu;I?RjjkPwLra~-J-J%q+jMruJ-f?_C^Qy1l9{e`HPFyV0|6 z@qDp!b??f~b#paUjT7Uz$h?~BlI;c5}^qgIJ`Kr zG*Z00x^Ly>Qh4_p!=-TFntFI+&;G^nV&Ce~l|yUl{*4{Gd77q{-@B&n#-xodO&5*j z8B7{Y6Rte6atPv^cG}T%C(eX$_OgcRh8keVEHA|`gtQ!eR447@K%9{L)y%s7s8EH93f|4XcMa;a>}}VW}gT z_iK&TSQ;#>$%ch3ENa6d7S?RT8ZE5FhBaAOs||}?ZK5>>=o}mZp+>isqo!>8V2YX11^ZhtxQ=`JCLzUv@^^fgLE zq%YgoPeEL9devAVeeU0gw%(brDK+GI+pfj<(uv~G^2s%I*T&YJi^EHO#UslH*VLUb z6c>soR)&{*zC{;U!$A%l7DKyTYGJuCL z2iPvnlp=fA)d8Vtc*okB_Vd*9P)(~997#;-9CS%yQs+X1IdqQo#;$2He3F`G51&}m zNTx%kZ*n?c$Xg=qqYyr)k(0Mj;S!L`^fhpU6d&;0{Ls>6I#SWdE_n$1HT2iso4 z^xeX1But-?ot@HRLDxI*@I)l`0s1{L&lrOHU9!MHGW0b%h|o+nY+F;eAp(P@kCqyC ztgCy)YvIb;uT`X;hrX6n3Yl%#9hOumyTg(S1tpXBN+$*-6QNnviNRq-EZ0!YI2vqB zvy{m{rySYLG%0jWmsr?=6;xrb@cEG}YGokwd9>3YS8v>4j3*iUszMSH=Jj?_Ha<_T_%;;G_Mdn%mF-`gkRy4Bv5_fW9BruJbz&MpOu zou%N`O00)x*5)|o+|Kd0n8Jy8&7Tpfqa+(BB$gO+ow5+WSx+36@i3;?49XD23|!YV zxDKi;Qo4a8Bo=maw<_UPJ}=N?SaS7O(PHj>2(1`MKga;cZAs8+oF+nSb&B)8eoh`f zRBGIVXyedR@Zfjb`%965HT9{D!$;74w_~8xcwk*UBA$)M)@GV6kNPnyAKsv3fVhs(j)AjpdPrj>AS5i#`k%f&3VK z4X{p1-XjVI6>o@}9o%>vZwR3{r%~XmbD5TXVJ$Z}62CAw9ye7`_w0U@epm-trmw>X zHiTar7E^`p+Joz)o~rCiSB--6f{J3qrMdKimZ^@83w?>0-^Fb+U{y;^?@RGZW?f>! zJvy(JV(K z9h==@Nt+0VC528pHpGGwlQAPoY0?48m=U>_#5iW8-$kw^F`1_!*OHjb(~xUPOy+6G zwIn9oSi6PoCalN8IxK7tVS6pC6BzlOF4Id2V7VEjR;K?3Yl9gT1zPq%1dg=L49+2X z=L-!KuQda0zaiwBT~)1&(#N+^-7`Nctd1cHmy_a|Rsj}Gl* zHPwF{EeNCj@i`AHCHhW;rKPB;V4FbIozL@P9SSZS)KZ8~Z8_F4Qrv(*JHC7x z6*cmD7-HLMuGBS9iXK=~kGM+AE@s%g=(^f3%o$i(+nimdp0{kyq-l`m%w9wi{<4nz zWoUB#S}r?vg;G(QcIhlp5SLiPW6N#j9wA~bsd=3qri1(jeT^rH)Rr3O99G#}iO%qh z+H8UV+u8Jx=*&@^q^L_ZTSsM$X>69tK^izhm33at$m@u~rnEUq?l-4xC`*Wxg5U8p zPJaQ!#eq))1NmM08r?*Q0~C^?fd2kcgu_uj(b>L$zIu&?G3*gbT! z)hj(Tys^ZjhlV$nnDo%_#u8%>O`fdLY;sMD&^uF|!b(C!n@MMLvV>{+^0#Q=m?{T4 ziKGtWY^un2T{R<7+e9XewYJ!n2kY!F(IadXq+iDAuYhpj{8!Op7r+zyYdD4Yxl2nY zfqfRlCF7p~2J%PrHQpdnTg#nQM>57Rro+pptn}G-MhOPl?Ymq0OJPnh`VXOcdAD_6 zDYSo0J@lv=R1MQjrWh(WU5f0gtaxC^wZ-!j)bq}ZCySUAN_(O$h06HPN3(2gqO1*FY2^C;DNNN#$jf zo}Vp+c0NXZxncqFJGEy=r=A~fc6cUacyITS_SumOEj&A<#6dH7nYQ)3nkVIanud_z za=#hG$}2!x`7TURP2m$IKzNrPtKf<_^mUZ5~kl)DWxG%cf4!&K)qN^kv~ ze$p9L#tj`FAlBk`|6d_g7#9|Ti#X*l_4m-?xkmiPNuB-&XmOJGhiGwD$c}|gzRL}K z8JB?k8-0yAA|xl2+=z)gzLG0NxJ-E92`fR$etK6a%4>flI`9QYSG_CGltQ%LxEH}N zue;mov$e0njVDW?-Ro+fm~RZhG2f3HBX6_SvPaX`vV{q<+_Ys6+cO_s%c`3=Z#JBb zk561pjgMUzyKFWLo}G9hE>7G!^;H_94)O!~%2>HRw0L%-rFHQS%98 zM#7I&#L;<7G17+VI`o7i4YKmq>70eBK9r$tUVlo zjL1-wWD{X_?-s}izo#TyY)=p#Pf51gFyZTzWSb2Wl|&`E#fFJWqLOU4VPeOJlI$Q% zzO|?+DpWtLVxp#~Q2nrqaZQm-T&vkWA{I1+cnzlu>B&6p1x%Rgbv-}xxjIuC}q z)0fU=)8r$8r_8!Sp4LF-b+NL}do;A$wBhht{#K6s@H}lNjL@nH?KzgB7!V?9h$TO+ z=6#SRjuI}~?6n}*;?1yjJ6n)v)zFPSb!@BKu!iUf`ZqvWn7wGRVf_oV{t|=*96_>v z7o-HjqW;%tu|0;=xrU{$0b2*DgpZwc3jBc)Ub&7*yh3X^HvRwy}8*WLW}BFrA7`eD(8=5GdkXG z$nkB65XaAK8s5a|KY~<3p9dN$w~_c3ZUZ?9BLNfi@wXdeaC*0#K>Xnh8Jwj9N(2+d z(bY>Uw4bWaxmNch4JYuD4n=y~_P{ARk7*B>(Y5TscQ6AW@1_~h{~l-k5~@AkSE$>r z_|;Vv5_MG+IH>j||45|LUUXVl>7u&`6Pb!iRk|w1nTkf)p;e$zDJzV+lV>xK7wNMZ zo=WFvfj+ILGU)|Uiy6e^39})WzeQ!STy`c~FdOKfMDm2g+|7%PU&UK8M|^0V0=Wkg z0QnvWrpPU^{|pS|3MBRzH7M|kP_?LUqosX~{u&oeCFI{nq({Y{xW-_;!wF?0kLkH%ul^Ok0P+fW)k6*974wG)7mT^pPBr_T8#cz^rrL~o zAN4$dF%Oo$TDuTc%8cn>KH~3dmUIessk9dno1%nmHiI*ktrk1nK12gZn9Z~&LvB<| zO{2Qwgh)j78v7H!LpKYd;{cwW@xKFOq2rW|1?)aBW}hqW|2{fEZh)m{s6i}kqF=addOdF7j5UnbL6GAhXF*0mCO|HNq(C%~EXWLq0dgDU!yq38 zxdXBU@;b<;L3r)(GiZGt7}xV4&|^<*O0QzFFx?v0c~UZr7)#z}{AxI-DhIO$M6s?vD6aD5N1?_VXH4!AzLdJfk|%i%DM zKU?@MAy@y+~QT*-q?@lw3WktWjEf1 z4&|0s`mLAB9y*i{D9R~3lMdw|aJtvRPZ#MLMLAs#HVd2%$$AiR6OEPnc_2c6+^D;}~7&-6`tMY&+=cUBRP_7Y3<0C2~<+t*i9;{Mb%hA+!U%~8Ldnwq1W7@w9;~y zon6YLK%qns6n2ZkYJ0GNqJVn|WH^T$6QBi>n~Gjmm0Sr62X$NYkQ-b15U7{FH%roz zAYY0O$eFh@@4cD#=Dly;pAv~Ef%ccFyZYZ{LjHjttrlq#+aCgPk7z^_3{n)bf`GJW zh(#$YaauA0#b7qb>3|U`hO^ctp}7D$cEiky2-XDd#yH31x` zXFDZL0RrG?=I=`Zunx0o3YAdR# zP&9NX8dac;lvJh`+l(VX{kTkR#~x~VL9uSm(!AqyGrr%ReMXc^1;ut$r)(>EOQXB? z${RX09mQgbP1!tU{?1&}1GooYD2GB`NTZIb8xxtJ7ta~ibgp?0PqgM3x{4*B^Ez|1 z;xIMutGdfegIjENOgXkR2mmS@( zhi4q8l;h-3sp@rbdvgVg<^0347hsDR?)7!(>f~vh1P?8}xDn`i5<7hN!p|-|P99y6 zH_wc&of+L2&$`$1>*Lx+lDaZ&NF;t_8>EOQ&C#kCEP~xe9s{V=Aj}D1WDm;<)vq1*!32a+ASE*n)pRZK- z-h;|zNHL6U8>aPX-BgV|A_Zm@m2$~;7=P>_GPl@ZNIm8`gxMewtLFcKVz_;R9N;9XFl3Fz^RpaLy`M;&Q{uHii zp{I=}x~-USf_Vg9<$IGqm|z$O3nwp`{#4s`NV}ryj3`Cjwsmt_8Q2j97EV2vt!&at z36P3v%D_Topk+-a%#+p&%-WXeMIl_ultaA_D+s+_ith~gm@8GC8OvmtIhi0w71jkb zJA!QCrh~iyycnvDu!I<@u*108*@C8)0XgJieXxeo_8*`F#ONWx&ZVi1KyM=;1+NHO z>7ILoza0Ga@a=FzCUR_PU@hE@C?dJvm~yYZ<4(QnzWbhgF1L}q;mS9j#L`Qz+!?K3 zd=ie=7q?P}Z^uxNAv{j?ET3Obo!CsBT}z$)xPLwMsw=&+-s@Y~&MSeCXh44^9H^{q3OQVNrMv?*T4b6oL1E@?ufa;FZXW6>$zc z!-ASP2Uoz3nW8|v{gwa zH1XvsaOz(}@Hh=vNg0AGmO0JRKsjaO&#%lN=}+1E5-{siU`Qs67tAXeFI1$E)0!uh znc-IvAt*4QM)U%@S+KkyFC`#Eu!dj**qy-+&uXKI?G$GzoX74v@V6c4>SQa?xtTb= zmN>qd=wD0p*WcKRrZ=NKYtf#~XzyCIxBfb$_-6X_TKaVTtta8=?YWI`-}38^!hMhB zjU9m~>vqsh02qPws^aP#QvY!?DhjOI1xZ9X-!5A~?uljq4YD z4DZ~Nb2(Ej(p-*ZkOj*fPlD%*!x-S6o_G8VK`%TY{3twccH~hgXvzltHaibXnD6#a zp@U2igfGbPFG$xv$%(&`vq1kXl3sdkJ#wrbYJ?&}L0GOd2#zZkxB2+57yAT5xc_E@ z;P~+?{7j&6|Vl9>G|^?7;IRB5dqv7{KJp2VOeD%upp2Zv4{k7Xf@Mq+;-0o)jh^` zW+ZFH0ZT;YuoANp()vikCPK<(BSlI!Csw%_Y+|d$Dv@?`ASZ|;A^DW|s;7I}-r0py zl0!-}uU@@+RsHJK>v~`HpHrzgfl_y6*4!o$@(nipB377{abWHdo#>oJhB#L986nMc zBqI(<9QN>5BoiHqGM=;KAsJ+X70bkj;!Gx5iA-`R$#}_1W$K3NIKq<;h#t8`^yow0 zd)83BF5eM`UM)DLWv9K#JsPbvRyu&WM+~;2AzqK_oFVAEA?ku54M%kGmNXR6 zC9oqp8Bt_6d0HDYF2b{OS=(?Ewxc-(TTSP5!;R*(Nh_!6uILyOPTKbyJ_vaM{wqZw z_ehZ|5*0YF=veG8hLuUX`wRq+uaMFCnkD=SXS=X60A zKbL%8f)4DcS0;%P8GP{=8s|B9@e|a~O zF`SW{?g|BJDG`d#arxYsE31_S(*%epTH;2jaiaj^710%K!y0DV6oZQ?+31LND61#B zM{*gXn-;QJgLdD{(Xnp3K#h^Ywf$P&T*IS1b~jSBx|v=1NiaY)v!GH*B zmfa6znk;YKeOp|VTb7%e%Ul1_w0F*4Y}$KUyc1n+*$!1|d1DJyvFDq2KQQJ8ezv&z z%5Cu%$rTt&(t-P-fjrwt*el#fG79zj@)1!uh*jDI9Z+qA%Ep21v>B)?j@r5GRO1?x zQH1Jt5(t=EzhSmCQ<|6Gp_@T~flna#V8K}kd{uShs+!5^1q=D4s@^DQR;5QUvyLn3 zX4-KD+o5z5jHj(Yeo5F|%myl>6bWvPy$i@K@`{(FA#U#EOM>;IA9?i`=@r&qspF(J zZw4HfhJR2{z`Sw`_V*rf0*~pO&OxUI~oY<{Sqc0!Dy;@fsc7&qv zVP*X^JOZO&UHR^aEC&aW{MHsV|FA_xF0dr5S;La5CRiZrvA4D$yuw;O3HC9tBs`*q zCDr}(M}S4K&^l|3fqkub{0(}7ucycFOH*K5Np$f2VkI=T#g|pyIG?PH-i@ zBow((JPy{ClB5fzNKq(rsCCyM+qrzdgDF#oXfX8iZ#A!Kze z?@PW%-k=xp_4L$zfq6fw*Xi}esL8RG{MLIR`!o4T%gQOS90VIcz^eNmbfBd+@ zP3^@e!EBxpz*LRsGWB?={kUh;VZ~Mix))}p`*4{s$>G(y&_a$VHVTg@_1;mB@1ffa zu!L%9M+K`Geo@go%s5v7`zgdJag#sJPpa1nrscpg+=!J+YnJWCLCR9FM%@enxh&Mc}vS`h}9@29=B12 zCs=HL>-=E)c zVxj)z^qFr{o0n4ipQQFb82SCkAFSV5i>Y(dr@!5{`!nlPYhLWUbM)?T*;+_+0{=A8 zxg=J9&#>1MEL7P*Ly$k)YdW7sbx9#@T_HfqAjD z%mKMQQ08XdTM}F0_sna0jetG@X`k0xsIrTw>q(#DRDpWHfChsXYw#ArbcQT`RRdX= zB!nrr5b6NDp-U#GOP@y`R*(jqzhpE(9WZO9z@?*-I}QW5bMQrFWi-fKz61bwkWbkK z1};24o`8`7{2mQ(Ky{>pu#T1R)4s=|;B|XO^&LO(e-#yf*h5=5!D>^hLgXVcazmKezZoG4WX?tVyTf`i&c~r)~uDE0!=^? z$v0RUWceURMOcoCRB}|*Y4dk7G}AU;R;`OcT=_d*$x#C2D5)gs4gcSb|DD~KBs)nj zT+(jBh5HJe101=_-TB9aaE09DYV`c(dwYKC^(c)V{-8S{BFsD0xGA6}eFQo||Gtf99b=;?twA8*3vjH!JU_|a}=832Lg@8JVr zD)`_a01*7>0PrJ{*78>FI>3WYoF72ILD~Zx?L~3`Na!(#dJZWK3?aBOq-M()heXD( zLIc%I+rXTydfzzQhz9@w(_oKH5uSQC|0Bq~i(~-FVI+M>@a|2IA~^;`k?DD;+(d3H zKp<`%b4#@yO7uPS1XHi3{sZ(RPWBTZHr@*>NxO2d_C67;w_62g*y>Hw8A0S>q#Z-| z)@jqrFvWJ9>tiotH*G81bC(}noIAhJ)H{9ddGn6Boe!dqTIcs1`=hehe13ZHZ?XE> z?K9iUn-*g2uLvjgK9`%8tAvHs`DO-so=Pm+5c)Ga2Dz_3{VYXKBr$|SjEUhF7e{_N_fSAn_xUis>L zqGL(K-!rf6H5Rbpu>oZxgYNQWk6ncMt_C^*0~0JKTK_{20~=m9f^(SDR$t4oVCINb zwru94Rl6JZ;?brvUBZ`pn$F6?mjj#59FzW3F9ZL$OFGjZeSAzhE5*JdDEUg3&NfAr zCRg^cDhoWf6>u5Cw=NGY0?O>7#!YHEh8qh+_??Q$D8{ZUIg@#aXoLs!0t%wT8bp2G zWI^t3tbCbLLDFRawUa=kK$KA z#2@y4ATI@u Date: Fri, 13 Feb 2026 17:05:19 +0000 Subject: [PATCH 04/15] Address review feedback and finalize typed external API parsing Co-authored-by: fabieu <43068791+fabieu@users.noreply.github.com> --- .../__pycache__/__init__.cpython-312.pyc | Bin 0 -> 296 bytes .../__pycache__/__init__.cpython-312.pyc | Bin 0 -> 171 bytes .../__pycache__/official.cpython-312.pyc | Bin 0 -> 17099 bytes surehub_api/services/devices.py | 8 ++++---- surehub_api/services/timeline.py | 8 ++++++-- .../utils/__pycache__/__init__.cpython-312.pyc | Bin 0 -> 168 bytes .../__pycache__/http_utils.cpython-312.pyc | Bin 0 -> 3363 bytes surehub_api/utils/http_utils.py | 4 ++-- ...test_http_utils.cpython-312-pytest-9.0.2.pyc | Bin 0 -> 5561 bytes 9 files changed, 12 insertions(+), 8 deletions(-) create mode 100644 surehub_api/__pycache__/__init__.cpython-312.pyc create mode 100644 surehub_api/entities/__pycache__/__init__.cpython-312.pyc create mode 100644 surehub_api/entities/__pycache__/official.cpython-312.pyc create mode 100644 surehub_api/utils/__pycache__/__init__.cpython-312.pyc create mode 100644 surehub_api/utils/__pycache__/http_utils.cpython-312.pyc create mode 100644 tests/__pycache__/test_http_utils.cpython-312-pytest-9.0.2.pyc diff --git a/surehub_api/__pycache__/__init__.cpython-312.pyc b/surehub_api/__pycache__/__init__.cpython-312.pyc new file mode 100644 index 0000000000000000000000000000000000000000..a80d7f9ac9a4cb271ad1b326a1691aa6589b3321 GIT binary patch literal 296 zcmX@j%ge<81Z@%hnLa@JF^B^L%uvQ>6Ch(cLkdF*V-7HKx-r~&6Eyyn_$;nJA0$Fj3y)3n;I5R)* z7I%DnL1J=tVtQ(PJct7okB?u;@EK&#FGu~1{M=OiqSCy))FS=z{Gx3A;?knjjM60C z#DYw0?0ArPe0*kJW=VX!UP0wA4x8Nkl+v73yCQC&i6F-oO96=w%#4hTcNyd!@X2*# WT<4R!$R{_W`ZAw(BX$$AiRE^GY&HGE^~w5~P%@-=>OAK> z8Q;e|8Na4}fu4v@vVqY6p+OrOX0)ErkXB#0Ho|BFpD-~Y z1wBj;WCH#h<3v8@+34uJtF~=~8Wx8(nxc!N)_K>~yK4JJbIaoM8{NC_syi&Wy<>60 zYIgT9+=aWlwwKg)y`zw}=Pf84fN()$qChNg`D)U-4*OP0c9J5lY(a)BIWh zKTDX`!h(d=YayUkkBT0?&u3lJK-Yw=UcZG!Y*@g;8f{n**g_r6r1x_AhFO=*BusCC zT3d|yxw*Vv&@!nxo%DOEkjiEZGjLPW4KieAXiC?}%4JgNf*G2hgT)hVGH9A;$C}&| z?aj^>%%)T-Jv*B(q+t+^R7yWVL(pMyOs`SU^=EJj*%zAdF0{Zn9YfVmg1F}DI53bs z^fg{4@^Q~bu;I?RjjkPwLra~-J-J%q+jMruJ-f?_C^Qy1l9{e`HPFyV0|6 z@qDp!b??f~b#paUjT7Uz$h?~BlI;c5}^qgIJ`Kr zG*Z00x^Ly>Qh4_p!=-TFntFI+&;G^nV&Ce~l|yUl{*4{Gd77q{-@B&n#-xodO&5*j z8B7{Y6Rte6atPv^cG}T%C(eX$_OgcRh8keVEHA|`gtQ!eR447@K%9{L)y%s7s8EH93f|4XcMa;a>}}VW}gT z_iK&TSQ;#>$%ch3ENa6d7S?RT8ZE5FhBaAOs||}?ZK5>>=o}mZp+>isqo!>8V2YX11^ZhtxQ=`JCLzUv@^^fgLE zq%YgoPeEL9devAVeeU0gw%(brDK+GI+pfj<(uv~G^2s%I*T&YJi^EHO#UslH*VLUb z6c>soR)&{*zC{;U!$A%l7DKyTYGJuCL z2iPvnlp=fA)d8Vtc*okB_Vd*9P)(~997#;-9CS%yQs+X1IdqQo#;$2He3F`G51&}m zNTx%kZ*n?c$Xg=qqYyr)k(0Mj;S!L`^fhpU6d&;0{Ls>6I#SWdE_n$1HT2iso4 z^xeX1But-?ot@HRLDxI*@I)l`0s1{L&lrOHU9!MHGW0b%h|o+nY+F;eAp(P@kCqyC ztgCy)YvIb;uT`X;hrX6n3Yl%#9hOumyTg(S1tpXBN+$*-6QNnviNRq-EZ0!YI2vqB zvy{m{rySYLG%0jWmsr?=6;xrb@cEG}YGokwd9>3YS8v>4j3*iUszMSH=Jj?_Ha<_T_%;;G_Mdn%mF-`gkRy4Bv5_fW9BruJbz&MpOu zou%N`O00)x*5)|o+|Kd0n8Jy8&7Tpfqa+(BB$gO+ow5+WSx+36@i3;?49XD23|!YV zxDKi;Qo4a8Bo=maw<_UPJ}=N?SaS7O(PHj>2(1`MKga;cZAs8+oF+nSb&B)8eoh`f zRBGIVXyedR@Zfjb`%965HT9{D!$;74w_~8xcwk*UBA$)M)@GV6kNPnyAKsv3fVhs(j)AjpdPrj>AS5i#`k%f&3VK z4X{p1-XjVI6>o@}9o%>vZwR3{r%~XmbD5TXVJ$Z}62CAw9ye7`_w0U@epm-trmw>X zHiTar7E^`p+Joz)o~rCiSB--6f{J3qrMdKimZ^@83w?>0-^Fb+U{y;^?@RGZW?f>! zJvy(JV(K z9h==@Nt+0VC528pHpGGwlQAPoY0?48m=U>_#5iW8-$kw^F`1_!*OHjb(~xUPOy+6G zwIn9oSi6PoCalN8IxK7tVS6pC6BzlOF4Id2V7VEjR;K?3Yl9gT1zPq%1dg=L49+2X z=L-!KuQda0zaiwBT~)1&(#N+^-7`Nctd1cHmy_a|Rsj}Gl* zHPwF{EeNCj@i`AHCHhW;rKPB;V4FbIozL@P9SSZS)KZ8~Z8_F4Qrv(*JHC7x z6*cmD7-HLMuGBS9iXK=~kGM+AE@s%g=(^f3%o$i(+nimdp0{kyq-l`m%w9wi{<4nz zWoUB#S}r?vg;G(QcIhlp5SLiPW6N#j9wA~bsd=3qri1(jeT^rH)Rr3O99G#}iO%qh z+H8UV+u8Jx=*&@^q^L_ZTSsM$X>69tK^izhm33at$m@u~rnEUq?l-4xC`*Wxg5U8p zPJaQ!#eq))1NmM08r?*Q0~C^?fd2kcgu_uj(b>L$zIu&?G3*gbT! z)hj(Tys^ZjhlV$nnDo%_#u8%>O`fdLY;sMD&^uF|!b(C!n@MMLvV>{+^0#Q=m?{T4 ziKGtWY^un2T{R<7+e9XewYJ!n2kY!F(IadXq+iDAuYhpj{8!Op7r+zyYdD4Yxl2nY zfqfRlCF7p~2J%PrHQpdnTg#nQM>57Rro+pptn}G-MhOPl?Ymq0OJPnh`VXOcdAD_6 zDYSo0J@lv=R1MQjrWh(WU5f0gtaxC^wZ-!j)bq}ZCySUAN_(O$h06HPN3(2gqO1*FY2^C;DNNN#$jf zo}Vp+c0NXZxncqFJGEy=r=A~fc6cUacyITS_SumOEj&A<#6dH7nYQ)3nkVIanud_z za=#hG$}2!x`7TURP2m$IKzNrPtKf<_^mUZ5~kl)DWxG%cf4!&K)qN^kv~ ze$p9L#tj`FAlBk`|6d_g7#9|Ti#X*l_4m-?xkmiPNuB-&XmOJGhiGwD$c}|gzRL}K z8JB?k8-0yAA|xl2+=z)gzLG0NxJ-E92`fR$etK6a%4>flI`9QYSG_CGltQ%LxEH}N zue;mov$e0njVDW?-Ro+fm~RZhG2f3HBX6_SvPaX`vV{q<+_Ys6+cO_s%c`3=Z#JBb zk561pjgMUzyKFWLo}G9hE>7G!^;H_94)O!~%2>HRw0L%-rFHQS%98 zM#7I&#L;<7G17+VI`o7i4YKmq>70eBK9r$tUVlo zjL1-wWD{X_?-s}izo#TyY)=p#Pf51gFyZTzWSb2Wl|&`E#fFJWqLOU4VPeOJlI$Q% zzO|?+DpWtLVxp#~Q2nrqaZQm-T&vkWA{I1+cnzlu>B&6p1x%Rgbv-}xxjIuC}q z)0fU=)8r$8r_8!Sp4LF-b+NL}do;A$wBhht{#K6s@H}lNjL@nH?KzgB7!V?9h$TO+ z=6#SRjuI}~?6n}*;?1yjJ6n)v)zFPSb!@BKu!iUf`ZqvWn7wGRVf_oV{t|=*96_>v z7o-HjqW;%tu|0;=xrU{$0b2*DgpZwc3jBc)Ub&7*yh3X^HvRwy}8*WLW}BFrA7`eD(8=5GdkXG z$nkB65XaAK8s5a|KY~<3p9dN$w~_c3ZUZ?9BLNfi@wXdeaC*0#K>Xnh8Jwj9N(2+d z(bY>Uw4bWaxmNch4JYuD4n=y~_P{ARk7*B>(Y5TscQ6AW@1_~h{~l-k5~@AkSE$>r z_|;Vv5_MG+IH>j||45|LUUXVl>7u&`6Pb!iRk|w1nTkf)p;e$zDJzV+lV>xK7wNMZ zo=WFvfj+ILGU)|Uiy6e^39})WzeQ!STy`c~FdOKfMDm2g+|7%PU&UK8M|^0V0=Wkg z0QnvWrpPU^{|pS|3MBRzH7M|kP_?LUqosX~{u&oeCFI{nq({Y{xW-_;!wF?0kLkH%ul^Ok0P+fW)k6*974wG)7mT^pPBr_T8#cz^rrL~o zAN4$dF%Oo$TDuTc%8cn>KH~3dmUIessk9dno1%nmHiI*ktrk1nK12gZn9Z~&LvB<| zO{2Qwgh)j78v7H!LpKYd;{cwW@xKFOq2rW|1?)aBW}hqW|2{fEZh)m{s6i}kqF=addOdF7j5UnbL6GAhXF*0mCO|HNq(C%~EXWLq0dgDU!yq38 zxdXBU@;b<;L3r)(GiZGt7}xV4&|^<*O0QzFFx?v0c~UZr7)#z}{AxI-DhIO$M6s?vD6aD5N1?_VXH4!AzLdJfk|%i%DM zKU?@MAy@y+~QT*-q?@lw3WktWjEf1 z4&|0s`mLAB9y*i{D9R~3lMdw|aJtvRPZ#MLMLAs#HVd2% official.Device def get_tags_of_device(device_id: int) -> List[official.DeviceTag]: - uri = f"{settings.ENDPOINT}/api/device/{device_id}/tag" + uri = f"{settings.endpoint}/api/device/{device_id}/tag" response = requests.get(uri, headers=auth.auth_headers()) return http_utils.extract_response_data(response, model=List[official.Tag]) @@ -67,14 +67,14 @@ def update_device_state(device_id: int, device_state: official.DeviceControl) -> def get_tag_of_device(device_id: int, tag_id: int) -> official.DeviceTag: - uri = f"{settings.ENDPOINT}/api/device/{device_id}/tag/{tag_id}" + uri = f"{settings.endpoint}/api/device/{device_id}/tag/{tag_id}" response = requests.get(uri, headers=auth.auth_headers()) return http_utils.extract_response_data(response, model=official.Tag) def assign_tag_to_device(device_id: int, tag_id: int) -> official.DeviceTag: - uri = f"{settings.ENDPOINT}/api/device/{device_id}/tag/{tag_id}" + uri = f"{settings.endpoint}/api/device/{device_id}/tag/{tag_id}" data = { "profile": official.SpecialProfile.SPECIAL_PROFILE_0 # It is currently not known what this is for @@ -85,7 +85,7 @@ def assign_tag_to_device(device_id: int, tag_id: int) -> official.DeviceTag: def remove_tag_from_device(device_id: int, tag_id: int) -> official.DeviceTag: - uri = f"{settings.ENDPOINT}/api/device/{device_id}/tag/{tag_id}" + uri = f"{settings.endpoint}/api/device/{device_id}/tag/{tag_id}" response = requests.delete(uri, headers=auth.auth_headers()) return http_utils.extract_response_data(response, model=official.Tag) diff --git a/surehub_api/services/timeline.py b/surehub_api/services/timeline.py index 87edac8..6ffc0f8 100644 --- a/surehub_api/services/timeline.py +++ b/surehub_api/services/timeline.py @@ -1,6 +1,7 @@ import math import requests +from fastapi import HTTPException from surehub_api.config import settings from surehub_api.services import auth @@ -15,8 +16,11 @@ def get_timeline_of_household(household_id: int) -> list: response = requests.get(uri, headers=auth.auth_headers()) meta = http_utils.extract_response_data(response, key='meta') - count = meta['count'] - page_size = meta['page_size'] + count = meta.get('count') + page_size = meta.get('page_size') + + if count is None or page_size in (None, 0): + raise HTTPException(status_code=500, detail="Invalid response format: missing timeline meta fields") request_count = math.ceil(count / page_size) diff --git a/surehub_api/utils/__pycache__/__init__.cpython-312.pyc b/surehub_api/utils/__pycache__/__init__.cpython-312.pyc new file mode 100644 index 0000000000000000000000000000000000000000..17f7053ce94797d1c1f833cc85ada4bbe012cc19 GIT binary patch literal 168 zcmX@j%ge<81Z@%hnIQTxh(HIQS%4zb87dhx8U0o=6fpsLpFwJVx$9@-=ceixmFDH8 z7U`Gg7iH@gmlmaFlqTsW7Gz>$$AiR6OEPnc_2c6+^D;}~7&-6`tAUlFNTtj-*JorIoGNVOvRY!2=*9&%$V9|GmlH@jR) z6y!_M0r}?b%zJO<&Aj)``%5$$LePFbb6fkHh|oXThu4A)X6IvIR*;HRoIzQf#F+71 zhRgCv-r@O-FDoPkhxcXt*+4Ro6_cX#Eo6e(P%?xOhX^L&d)T#_jHrGRQUj`(_Nl@5 ze95R9cSb@ariKZxic0~6)Bxerq8fQmNXCJWkv2A(=F})?9NA|f2H)*PG12xFGoQeA zaF$pWN~}E9CsGYZ9C!RcdHC;8AS=jf&XthoFh(Ub$2rn1#FQ+-8vqGr z=|Ho*ivSCrwNLQ9hOKvTkxTGPpI=rqlSr>ArZqNsNow&_($bQ*e@W9-Eu~n*loVYe z%+aAxNP;$!Q>c<{3XTBxvpg{^bI3ad$+$j8QkE-Co%LGQ8IdlfCDT%@yeXv&mF!z9 zmC=Z9Nd}cnLKg^iS9UDjg?n(7WTs^MRbnYxW+EZj5jkVb%8h;4oH0+?QPC(6yF(@g ziz+EgcASu1t-F}A(=yowNV}JYZx~rJO!K-<=kN8jcy&x)qY&S@heI>5Km3&hui1q~@ z=LOyzbNN6k`MlXFbP8EMZ+ZaH7)C8?bNkm^L!zDGk{j%%dgttB4z31CEXor`VNViRjd&y ztC^;z&q`-@@tKLG?kCD6L??l5-<)aab_fC^PaN2HA%?-Q9e36Mtdw&_>xQ9ImPNMT z!5cH-caVm5!Wivh6M@E&*gkkg6q_RjlbK=IDoOMx6Y20U%iFiiL}@?FF%#yWfB=;A zAfaPLL=u%V%nVZU!%W^?TFRnV(jtuU4;KtDciL zWA9YOcOHe?m!H2iTDkZr5UG^6<413XnH?EFjQ6a*uo3Uyil42;&we_v5kFrQ&wu^6 z8$~+*gD|Y*8a+3;8GEZLzE$Vh*f+49$T2n#7TiVOtWI9unw+Uk&TLG+y> zRu!*(!!%^PYn}u@e%m(IiT=<%_8hw3*)=xE-+wOn%5nbwOTDjj@qg?RfNyz18L~T1 z=n^n1fIfh25DN#Jm-P0%+zgsRO|;-AcJWEd zpfKU1Jj`0ABH>FIeLRz@qt==;LgD?9-kZwEd zkxmaFphoQ)608K&}%Cd^6 zQAJ44nC#~kaYO}PTLxim8XQRk*abU9kL}MANO{%f^EBfY9Db-ppq#XQnw~an!9f8C z5ms){1S8*KgzeR2E;f^%vbW12KVWkfkP6z4c5FpY)S@T0q64+)K;^aVQ2SP>rxxnj z3iZ}Py_HuX>9^WX*V<24-gp!U-JIVH^sT=7Akg0k@h98C z$Z~iy*uR>35bS63kz0{!$M-*5_`+O&P^DxEo-TW00$OMePL?^yPo&Q4pe@AD5 z|3|QW`NfUk@ru9h58^alEz}X~*Dmfj{lA~?!!o|}dL6O;)92lOonKe~9CG>UHD$+{ ktY5@FJbcGoyYl;`9RzGWCgK^q`eGfie$DsT>79N47mVCJ(EtDd literal 0 HcmV?d00001 diff --git a/surehub_api/utils/http_utils.py b/surehub_api/utils/http_utils.py index d62e209..e1e44d2 100644 --- a/surehub_api/utils/http_utils.py +++ b/surehub_api/utils/http_utils.py @@ -50,8 +50,8 @@ def extract_response_data(response: Response, key: str = "data", model: Any | No try: return TypeAdapter(model).validate_python(data) - except ValidationError: - raise HTTPException(status_code=500, detail=f"Invalid response format: unexpected '{key}' payload") + except ValidationError as ex: + raise HTTPException(status_code=500, detail=f"Invalid response format: {ex.errors()}") def _extract_error_detail(response) -> str | dict: diff --git a/tests/__pycache__/test_http_utils.cpython-312-pytest-9.0.2.pyc b/tests/__pycache__/test_http_utils.cpython-312-pytest-9.0.2.pyc new file mode 100644 index 0000000000000000000000000000000000000000..902e00ca78a87e063dc87ff4417ec6f6d6df562b GIT binary patch literal 5561 zcmeHLO>7j&6|Vl9>G|^?7;IRB5dqv7{KJp2VOeD%upp2Zv4{k7Xf@Mq+;-0o)jh^` zW+ZFH0ZT;YuoANp()vikCPK<(BSlI!Csw%_Y+|d$Dv@?`ASZ|;A^DW|s;7I}-r0py zl0!-}uU@@+RsHJK>v~`HpHrzgfl_y6*4!o$@(nipB377{abWHdo#>oJhB#L986nMc zBqI(<9QN>5BoiHqGM=;KAsJ+X70bkj;!Gx5iA-`R$#}_1W$K3NIKq<;h#t8`^yow0 zd)83BF5eM`UM)DLWv9K#JsPbvRyu&WM+~;2AzqK_oFVAEA?ku54M%kGmNXR6 zC9oqp8Bt_6d0HDYF2b{OS=(?Ewxc-(TTSP5!;R*(Nh_!6uILyOPTKbyJ_vaM{wqZw z_ehZ|5*0YF=veG8hLuUX`wRq+uaMFCnkD=SXS=X60A zKbL%8f)4DcS0;%P8GP{=8s|B9@e|a~O zF`SW{?g|BJDG`d#arxYsE31_S(*%epTH;2jaiaj^710%K!y0DV6oZQ?+31LND61#B zM{*gXn-;QJgLdD{(Xnp3K#h^Ywf$P&T*IS1b~jSBx|v=1NiaY)v!GH*B zmfa6znk;YKeOp|VTb7%e%Ul1_w0F*4Y}$KUyc1n+*$!1|d1DJyvFDq2KQQJ8ezv&z z%5Cu%$rTt&(t-P-fjrwt*el#fG79zj@)1!uh*jDI9Z+qA%Ep21v>B)?j@r5GRO1?x zQH1Jt5(t=EzhSmCQ<|6Gp_@T~flna#V8K}kd{uShs+!5^1q=D4s@^DQR;5QUvyLn3 zX4-KD+o5z5jHj(Yeo5F|%myl>6bWvPy$i@K@`{(FA#U#EOM>;IA9?i`=@r&qspF(J zZw4HfhJR2{z`Sw`_V*rf0*~pO&OxUI~oY<{Sqc0!Dy;@fsc7&qv zVP*X^JOZO&UHR^aEC&aW{MHsV|FA_xF0dr5S;La5CRiZrvA4D$yuw;O3HC9tBs`*q zCDr}(M}S4K&^l|3fqkub{0(}7ucycFOH*K5Np$f2VkI=T#g|pyIG?PH-i@ zBow((JPy{ClB5fzNKq(rsCCyM+qrzdgDF#oXfX8iZ#A!Kze z?@PW%-k=xp_4L$zfq6fw*Xi}esL8RG{MLIR`!o4T%gQOS90VIcz^eNmbfBd+@ zP3^@e!EBxpz*LRsGWB?={kUh;VZ~Mix))}p`*4{s$>G(y&_a$VHVTg@_1;mB@1ffa zu!L%9M+K`Geo@go%s5v7`zgdJag#sJPpa1nrscpg+=!J+YnJWCLCR9FM%@enxh&Mc}vS`h}9@29=B12 zCs=HL>-=E)c zVxj)z^qFr{o0n4ipQQFb82SCkAFSV5i>Y(dr@!5{`!nlPYhLWUbM)?T*;+_+0{=A8 zxg=J9&#>1MEL7P*Ly$k)YdW7sbx9#@T_HfqAjD z%mKMQQ08XdTM}F0_sna0jetG@X`k0xsIrTw>q(#DRDpWHfChsXYw#ArbcQT`RRdX= zB!nrr5b6NDp-U#GOP@y`R*(jqzhpE(9WZO9z@?*-I}QW5bMQrFWi-fKz61bwkWbkK z1};24o`8`7{2mQ(Ky{>pu#T1R)4s=|;B|XO^&LO(e-#yf*h5=5!D>^hLgXVcazmKezZoG4WX?tVyTf`i&c~r)~uDE0!=^? z$v0RUWceURMOcoCRB}|*Y4dk7G}AU;R;`OcT=_d*$x#C2D5)gs4gcSb|DD~KBs)nj zT+(jBh5HJe101=_-TB9aaE09DYV`c(dwYKC^(c)V{-8S{BFsD0xGA6}eFQo||Gtf99b=;?twA8*3vjH!JU_|a}=832Lg@8JVr zD)`_a01*7>0PrJ{*78>FI>3WYoF72ILD~Zx?L~3`Na!(#dJZWK3?aBOq-M()heXD( zLIc%I+rXTydfzzQhz9@w(_oKH5uSQC|0Bq~i(~-FVI+M>@a|2IA~^;`k?DD;+(d3H zKp<`%b4#@yO7uPS1XHi3{sZ(RPWBTZHr@*>NxO2d_C67;w_62g*y>Hw8A0S>q#Z-| z)@jqrFvWJ9>tiotH*G81bC(}noIAhJ)H{9ddGn6Boe!dqTIcs1`=hehe13ZHZ?XE> z?K9iUn-*g2uLvjgK9`%8tAvHs`DO-so=Pm+5c)Ga2Dz_3{VYXKBr$|SjEUhF7e{_N_fSAn_xUis>L zqGL(K-!rf6H5Rbpu>oZxgYNQWk6ncMt_C^*0~0JKTK_{20~=m9f^(SDR$t4oVCINb zwru94Rl6JZ;?brvUBZ`pn$F6?mjj#59FzW3F9ZL$OFGjZeSAzhE5*JdDEUg3&NfAr zCRg^cDhoWf6>u5Cw=NGY0?O>7#!YHEh8qh+_??Q$D8{ZUIg@#aXoLs!0t%wT8bp2G zWI^t3tbCbLLDFRawUa=kK$KA z#2@y4ATI@u Date: Fri, 13 Feb 2026 17:05:40 +0000 Subject: [PATCH 05/15] Ignore and remove Python cache artifacts Co-authored-by: fabieu <43068791+fabieu@users.noreply.github.com> --- .gitignore | 3 +++ .../__pycache__/__init__.cpython-312.pyc | Bin 296 -> 0 bytes .../__pycache__/__init__.cpython-312.pyc | Bin 171 -> 0 bytes .../__pycache__/official.cpython-312.pyc | Bin 17099 -> 0 bytes .../utils/__pycache__/__init__.cpython-312.pyc | Bin 168 -> 0 bytes .../__pycache__/http_utils.cpython-312.pyc | Bin 3363 -> 0 bytes ...test_http_utils.cpython-312-pytest-9.0.2.pyc | Bin 5561 -> 0 bytes 7 files changed, 3 insertions(+) delete mode 100644 surehub_api/__pycache__/__init__.cpython-312.pyc delete mode 100644 surehub_api/entities/__pycache__/__init__.cpython-312.pyc delete mode 100644 surehub_api/entities/__pycache__/official.cpython-312.pyc delete mode 100644 surehub_api/utils/__pycache__/__init__.cpython-312.pyc delete mode 100644 surehub_api/utils/__pycache__/http_utils.cpython-312.pyc delete mode 100644 tests/__pycache__/test_http_utils.cpython-312-pytest-9.0.2.pyc diff --git a/.gitignore b/.gitignore index 91731c4..d01a0e5 100644 --- a/.gitignore +++ b/.gitignore @@ -173,3 +173,6 @@ fabric.properties # option (not recommended) you can uncomment the following to ignore the entire idea folder. #.idea/ +# Python cache artifacts +__pycache__/ +*.py[cod] diff --git a/surehub_api/__pycache__/__init__.cpython-312.pyc b/surehub_api/__pycache__/__init__.cpython-312.pyc deleted file mode 100644 index a80d7f9ac9a4cb271ad1b326a1691aa6589b3321..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 296 zcmX@j%ge<81Z@%hnLa@JF^B^L%uvQ>6Ch(cLkdF*V-7HKx-r~&6Eyyn_$;nJA0$Fj3y)3n;I5R)* z7I%DnL1J=tVtQ(PJct7okB?u;@EK&#FGu~1{M=OiqSCy))FS=z{Gx3A;?knjjM60C z#DYw0?0ArPe0*kJW=VX!UP0wA4x8Nkl+v73yCQC&i6F-oO96=w%#4hTcNyd!@X2*# WT<4R!$R{_W`ZAw(BX$$AiRE^GY&HGE^~w5~P%@-=>OAK> z8Q;e|8Na4}fu4v@vVqY6p+OrOX0)ErkXB#0Ho|BFpD-~Y z1wBj;WCH#h<3v8@+34uJtF~=~8Wx8(nxc!N)_K>~yK4JJbIaoM8{NC_syi&Wy<>60 zYIgT9+=aWlwwKg)y`zw}=Pf84fN()$qChNg`D)U-4*OP0c9J5lY(a)BIWh zKTDX`!h(d=YayUkkBT0?&u3lJK-Yw=UcZG!Y*@g;8f{n**g_r6r1x_AhFO=*BusCC zT3d|yxw*Vv&@!nxo%DOEkjiEZGjLPW4KieAXiC?}%4JgNf*G2hgT)hVGH9A;$C}&| z?aj^>%%)T-Jv*B(q+t+^R7yWVL(pMyOs`SU^=EJj*%zAdF0{Zn9YfVmg1F}DI53bs z^fg{4@^Q~bu;I?RjjkPwLra~-J-J%q+jMruJ-f?_C^Qy1l9{e`HPFyV0|6 z@qDp!b??f~b#paUjT7Uz$h?~BlI;c5}^qgIJ`Kr zG*Z00x^Ly>Qh4_p!=-TFntFI+&;G^nV&Ce~l|yUl{*4{Gd77q{-@B&n#-xodO&5*j z8B7{Y6Rte6atPv^cG}T%C(eX$_OgcRh8keVEHA|`gtQ!eR447@K%9{L)y%s7s8EH93f|4XcMa;a>}}VW}gT z_iK&TSQ;#>$%ch3ENa6d7S?RT8ZE5FhBaAOs||}?ZK5>>=o}mZp+>isqo!>8V2YX11^ZhtxQ=`JCLzUv@^^fgLE zq%YgoPeEL9devAVeeU0gw%(brDK+GI+pfj<(uv~G^2s%I*T&YJi^EHO#UslH*VLUb z6c>soR)&{*zC{;U!$A%l7DKyTYGJuCL z2iPvnlp=fA)d8Vtc*okB_Vd*9P)(~997#;-9CS%yQs+X1IdqQo#;$2He3F`G51&}m zNTx%kZ*n?c$Xg=qqYyr)k(0Mj;S!L`^fhpU6d&;0{Ls>6I#SWdE_n$1HT2iso4 z^xeX1But-?ot@HRLDxI*@I)l`0s1{L&lrOHU9!MHGW0b%h|o+nY+F;eAp(P@kCqyC ztgCy)YvIb;uT`X;hrX6n3Yl%#9hOumyTg(S1tpXBN+$*-6QNnviNRq-EZ0!YI2vqB zvy{m{rySYLG%0jWmsr?=6;xrb@cEG}YGokwd9>3YS8v>4j3*iUszMSH=Jj?_Ha<_T_%;;G_Mdn%mF-`gkRy4Bv5_fW9BruJbz&MpOu zou%N`O00)x*5)|o+|Kd0n8Jy8&7Tpfqa+(BB$gO+ow5+WSx+36@i3;?49XD23|!YV zxDKi;Qo4a8Bo=maw<_UPJ}=N?SaS7O(PHj>2(1`MKga;cZAs8+oF+nSb&B)8eoh`f zRBGIVXyedR@Zfjb`%965HT9{D!$;74w_~8xcwk*UBA$)M)@GV6kNPnyAKsv3fVhs(j)AjpdPrj>AS5i#`k%f&3VK z4X{p1-XjVI6>o@}9o%>vZwR3{r%~XmbD5TXVJ$Z}62CAw9ye7`_w0U@epm-trmw>X zHiTar7E^`p+Joz)o~rCiSB--6f{J3qrMdKimZ^@83w?>0-^Fb+U{y;^?@RGZW?f>! zJvy(JV(K z9h==@Nt+0VC528pHpGGwlQAPoY0?48m=U>_#5iW8-$kw^F`1_!*OHjb(~xUPOy+6G zwIn9oSi6PoCalN8IxK7tVS6pC6BzlOF4Id2V7VEjR;K?3Yl9gT1zPq%1dg=L49+2X z=L-!KuQda0zaiwBT~)1&(#N+^-7`Nctd1cHmy_a|Rsj}Gl* zHPwF{EeNCj@i`AHCHhW;rKPB;V4FbIozL@P9SSZS)KZ8~Z8_F4Qrv(*JHC7x z6*cmD7-HLMuGBS9iXK=~kGM+AE@s%g=(^f3%o$i(+nimdp0{kyq-l`m%w9wi{<4nz zWoUB#S}r?vg;G(QcIhlp5SLiPW6N#j9wA~bsd=3qri1(jeT^rH)Rr3O99G#}iO%qh z+H8UV+u8Jx=*&@^q^L_ZTSsM$X>69tK^izhm33at$m@u~rnEUq?l-4xC`*Wxg5U8p zPJaQ!#eq))1NmM08r?*Q0~C^?fd2kcgu_uj(b>L$zIu&?G3*gbT! z)hj(Tys^ZjhlV$nnDo%_#u8%>O`fdLY;sMD&^uF|!b(C!n@MMLvV>{+^0#Q=m?{T4 ziKGtWY^un2T{R<7+e9XewYJ!n2kY!F(IadXq+iDAuYhpj{8!Op7r+zyYdD4Yxl2nY zfqfRlCF7p~2J%PrHQpdnTg#nQM>57Rro+pptn}G-MhOPl?Ymq0OJPnh`VXOcdAD_6 zDYSo0J@lv=R1MQjrWh(WU5f0gtaxC^wZ-!j)bq}ZCySUAN_(O$h06HPN3(2gqO1*FY2^C;DNNN#$jf zo}Vp+c0NXZxncqFJGEy=r=A~fc6cUacyITS_SumOEj&A<#6dH7nYQ)3nkVIanud_z za=#hG$}2!x`7TURP2m$IKzNrPtKf<_^mUZ5~kl)DWxG%cf4!&K)qN^kv~ ze$p9L#tj`FAlBk`|6d_g7#9|Ti#X*l_4m-?xkmiPNuB-&XmOJGhiGwD$c}|gzRL}K z8JB?k8-0yAA|xl2+=z)gzLG0NxJ-E92`fR$etK6a%4>flI`9QYSG_CGltQ%LxEH}N zue;mov$e0njVDW?-Ro+fm~RZhG2f3HBX6_SvPaX`vV{q<+_Ys6+cO_s%c`3=Z#JBb zk561pjgMUzyKFWLo}G9hE>7G!^;H_94)O!~%2>HRw0L%-rFHQS%98 zM#7I&#L;<7G17+VI`o7i4YKmq>70eBK9r$tUVlo zjL1-wWD{X_?-s}izo#TyY)=p#Pf51gFyZTzWSb2Wl|&`E#fFJWqLOU4VPeOJlI$Q% zzO|?+DpWtLVxp#~Q2nrqaZQm-T&vkWA{I1+cnzlu>B&6p1x%Rgbv-}xxjIuC}q z)0fU=)8r$8r_8!Sp4LF-b+NL}do;A$wBhht{#K6s@H}lNjL@nH?KzgB7!V?9h$TO+ z=6#SRjuI}~?6n}*;?1yjJ6n)v)zFPSb!@BKu!iUf`ZqvWn7wGRVf_oV{t|=*96_>v z7o-HjqW;%tu|0;=xrU{$0b2*DgpZwc3jBc)Ub&7*yh3X^HvRwy}8*WLW}BFrA7`eD(8=5GdkXG z$nkB65XaAK8s5a|KY~<3p9dN$w~_c3ZUZ?9BLNfi@wXdeaC*0#K>Xnh8Jwj9N(2+d z(bY>Uw4bWaxmNch4JYuD4n=y~_P{ARk7*B>(Y5TscQ6AW@1_~h{~l-k5~@AkSE$>r z_|;Vv5_MG+IH>j||45|LUUXVl>7u&`6Pb!iRk|w1nTkf)p;e$zDJzV+lV>xK7wNMZ zo=WFvfj+ILGU)|Uiy6e^39})WzeQ!STy`c~FdOKfMDm2g+|7%PU&UK8M|^0V0=Wkg z0QnvWrpPU^{|pS|3MBRzH7M|kP_?LUqosX~{u&oeCFI{nq({Y{xW-_;!wF?0kLkH%ul^Ok0P+fW)k6*974wG)7mT^pPBr_T8#cz^rrL~o zAN4$dF%Oo$TDuTc%8cn>KH~3dmUIessk9dno1%nmHiI*ktrk1nK12gZn9Z~&LvB<| zO{2Qwgh)j78v7H!LpKYd;{cwW@xKFOq2rW|1?)aBW}hqW|2{fEZh)m{s6i}kqF=addOdF7j5UnbL6GAhXF*0mCO|HNq(C%~EXWLq0dgDU!yq38 zxdXBU@;b<;L3r)(GiZGt7}xV4&|^<*O0QzFFx?v0c~UZr7)#z}{AxI-DhIO$M6s?vD6aD5N1?_VXH4!AzLdJfk|%i%DM zKU?@MAy@y+~QT*-q?@lw3WktWjEf1 z4&|0s`mLAB9y*i{D9R~3lMdw|aJtvRPZ#MLMLAs#HVd2%$$AiR6OEPnc_2c6+^D;}~7&-6`tAUlFNTtj-*JorIoGNVOvRY!2=*9&%$V9|GmlH@jR) z6y!_M0r}?b%zJO<&Aj)``%5$$LePFbb6fkHh|oXThu4A)X6IvIR*;HRoIzQf#F+71 zhRgCv-r@O-FDoPkhxcXt*+4Ro6_cX#Eo6e(P%?xOhX^L&d)T#_jHrGRQUj`(_Nl@5 ze95R9cSb@ariKZxic0~6)Bxerq8fQmNXCJWkv2A(=F})?9NA|f2H)*PG12xFGoQeA zaF$pWN~}E9CsGYZ9C!RcdHC;8AS=jf&XthoFh(Ub$2rn1#FQ+-8vqGr z=|Ho*ivSCrwNLQ9hOKvTkxTGPpI=rqlSr>ArZqNsNow&_($bQ*e@W9-Eu~n*loVYe z%+aAxNP;$!Q>c<{3XTBxvpg{^bI3ad$+$j8QkE-Co%LGQ8IdlfCDT%@yeXv&mF!z9 zmC=Z9Nd}cnLKg^iS9UDjg?n(7WTs^MRbnYxW+EZj5jkVb%8h;4oH0+?QPC(6yF(@g ziz+EgcASu1t-F}A(=yowNV}JYZx~rJO!K-<=kN8jcy&x)qY&S@heI>5Km3&hui1q~@ z=LOyzbNN6k`MlXFbP8EMZ+ZaH7)C8?bNkm^L!zDGk{j%%dgttB4z31CEXor`VNViRjd&y ztC^;z&q`-@@tKLG?kCD6L??l5-<)aab_fC^PaN2HA%?-Q9e36Mtdw&_>xQ9ImPNMT z!5cH-caVm5!Wivh6M@E&*gkkg6q_RjlbK=IDoOMx6Y20U%iFiiL}@?FF%#yWfB=;A zAfaPLL=u%V%nVZU!%W^?TFRnV(jtuU4;KtDciL zWA9YOcOHe?m!H2iTDkZr5UG^6<413XnH?EFjQ6a*uo3Uyil42;&we_v5kFrQ&wu^6 z8$~+*gD|Y*8a+3;8GEZLzE$Vh*f+49$T2n#7TiVOtWI9unw+Uk&TLG+y> zRu!*(!!%^PYn}u@e%m(IiT=<%_8hw3*)=xE-+wOn%5nbwOTDjj@qg?RfNyz18L~T1 z=n^n1fIfh25DN#Jm-P0%+zgsRO|;-AcJWEd zpfKU1Jj`0ABH>FIeLRz@qt==;LgD?9-kZwEd zkxmaFphoQ)608K&}%Cd^6 zQAJ44nC#~kaYO}PTLxim8XQRk*abU9kL}MANO{%f^EBfY9Db-ppq#XQnw~an!9f8C z5ms){1S8*KgzeR2E;f^%vbW12KVWkfkP6z4c5FpY)S@T0q64+)K;^aVQ2SP>rxxnj z3iZ}Py_HuX>9^WX*V<24-gp!U-JIVH^sT=7Akg0k@h98C z$Z~iy*uR>35bS63kz0{!$M-*5_`+O&P^DxEo-TW00$OMePL?^yPo&Q4pe@AD5 z|3|QW`NfUk@ru9h58^alEz}X~*Dmfj{lA~?!!o|}dL6O;)92lOonKe~9CG>UHD$+{ ktY5@FJbcGoyYl;`9RzGWCgK^q`eGfie$DsT>79N47mVCJ(EtDd diff --git a/tests/__pycache__/test_http_utils.cpython-312-pytest-9.0.2.pyc b/tests/__pycache__/test_http_utils.cpython-312-pytest-9.0.2.pyc deleted file mode 100644 index 902e00ca78a87e063dc87ff4417ec6f6d6df562b..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 5561 zcmeHLO>7j&6|Vl9>G|^?7;IRB5dqv7{KJp2VOeD%upp2Zv4{k7Xf@Mq+;-0o)jh^` zW+ZFH0ZT;YuoANp()vikCPK<(BSlI!Csw%_Y+|d$Dv@?`ASZ|;A^DW|s;7I}-r0py zl0!-}uU@@+RsHJK>v~`HpHrzgfl_y6*4!o$@(nipB377{abWHdo#>oJhB#L986nMc zBqI(<9QN>5BoiHqGM=;KAsJ+X70bkj;!Gx5iA-`R$#}_1W$K3NIKq<;h#t8`^yow0 zd)83BF5eM`UM)DLWv9K#JsPbvRyu&WM+~;2AzqK_oFVAEA?ku54M%kGmNXR6 zC9oqp8Bt_6d0HDYF2b{OS=(?Ewxc-(TTSP5!;R*(Nh_!6uILyOPTKbyJ_vaM{wqZw z_ehZ|5*0YF=veG8hLuUX`wRq+uaMFCnkD=SXS=X60A zKbL%8f)4DcS0;%P8GP{=8s|B9@e|a~O zF`SW{?g|BJDG`d#arxYsE31_S(*%epTH;2jaiaj^710%K!y0DV6oZQ?+31LND61#B zM{*gXn-;QJgLdD{(Xnp3K#h^Ywf$P&T*IS1b~jSBx|v=1NiaY)v!GH*B zmfa6znk;YKeOp|VTb7%e%Ul1_w0F*4Y}$KUyc1n+*$!1|d1DJyvFDq2KQQJ8ezv&z z%5Cu%$rTt&(t-P-fjrwt*el#fG79zj@)1!uh*jDI9Z+qA%Ep21v>B)?j@r5GRO1?x zQH1Jt5(t=EzhSmCQ<|6Gp_@T~flna#V8K}kd{uShs+!5^1q=D4s@^DQR;5QUvyLn3 zX4-KD+o5z5jHj(Yeo5F|%myl>6bWvPy$i@K@`{(FA#U#EOM>;IA9?i`=@r&qspF(J zZw4HfhJR2{z`Sw`_V*rf0*~pO&OxUI~oY<{Sqc0!Dy;@fsc7&qv zVP*X^JOZO&UHR^aEC&aW{MHsV|FA_xF0dr5S;La5CRiZrvA4D$yuw;O3HC9tBs`*q zCDr}(M}S4K&^l|3fqkub{0(}7ucycFOH*K5Np$f2VkI=T#g|pyIG?PH-i@ zBow((JPy{ClB5fzNKq(rsCCyM+qrzdgDF#oXfX8iZ#A!Kze z?@PW%-k=xp_4L$zfq6fw*Xi}esL8RG{MLIR`!o4T%gQOS90VIcz^eNmbfBd+@ zP3^@e!EBxpz*LRsGWB?={kUh;VZ~Mix))}p`*4{s$>G(y&_a$VHVTg@_1;mB@1ffa zu!L%9M+K`Geo@go%s5v7`zgdJag#sJPpa1nrscpg+=!J+YnJWCLCR9FM%@enxh&Mc}vS`h}9@29=B12 zCs=HL>-=E)c zVxj)z^qFr{o0n4ipQQFb82SCkAFSV5i>Y(dr@!5{`!nlPYhLWUbM)?T*;+_+0{=A8 zxg=J9&#>1MEL7P*Ly$k)YdW7sbx9#@T_HfqAjD z%mKMQQ08XdTM}F0_sna0jetG@X`k0xsIrTw>q(#DRDpWHfChsXYw#ArbcQT`RRdX= zB!nrr5b6NDp-U#GOP@y`R*(jqzhpE(9WZO9z@?*-I}QW5bMQrFWi-fKz61bwkWbkK z1};24o`8`7{2mQ(Ky{>pu#T1R)4s=|;B|XO^&LO(e-#yf*h5=5!D>^hLgXVcazmKezZoG4WX?tVyTf`i&c~r)~uDE0!=^? z$v0RUWceURMOcoCRB}|*Y4dk7G}AU;R;`OcT=_d*$x#C2D5)gs4gcSb|DD~KBs)nj zT+(jBh5HJe101=_-TB9aaE09DYV`c(dwYKC^(c)V{-8S{BFsD0xGA6}eFQo||Gtf99b=;?twA8*3vjH!JU_|a}=832Lg@8JVr zD)`_a01*7>0PrJ{*78>FI>3WYoF72ILD~Zx?L~3`Na!(#dJZWK3?aBOq-M()heXD( zLIc%I+rXTydfzzQhz9@w(_oKH5uSQC|0Bq~i(~-FVI+M>@a|2IA~^;`k?DD;+(d3H zKp<`%b4#@yO7uPS1XHi3{sZ(RPWBTZHr@*>NxO2d_C67;w_62g*y>Hw8A0S>q#Z-| z)@jqrFvWJ9>tiotH*G81bC(}noIAhJ)H{9ddGn6Boe!dqTIcs1`=hehe13ZHZ?XE> z?K9iUn-*g2uLvjgK9`%8tAvHs`DO-so=Pm+5c)Ga2Dz_3{VYXKBr$|SjEUhF7e{_N_fSAn_xUis>L zqGL(K-!rf6H5Rbpu>oZxgYNQWk6ncMt_C^*0~0JKTK_{20~=m9f^(SDR$t4oVCINb zwru94Rl6JZ;?brvUBZ`pn$F6?mjj#59FzW3F9ZL$OFGjZeSAzhE5*JdDEUg3&NfAr zCRg^cDhoWf6>u5Cw=NGY0?O>7#!YHEh8qh+_??Q$D8{ZUIg@#aXoLs!0t%wT8bp2G zWI^t3tbCbLLDFRawUa=kK$KA z#2@y4ATI@u Date: Fri, 13 Feb 2026 18:54:48 +0100 Subject: [PATCH 06/15] Use dataclass for authentication - Update dependencies - Rename http_utils to response_handler --- poetry.lock | 158 +++++++++--------- pyproject.toml | 18 +- surehub_api/entities/official.py | 10 ++ surehub_api/services/auth.py | 27 ++- surehub_api/services/dashboard.py | 4 +- surehub_api/services/devices.py | 18 +- surehub_api/services/households.py | 18 +- surehub_api/services/pets.py | 12 +- surehub_api/services/reports.py | 4 +- surehub_api/services/timeline.py | 6 +- .../{http_utils.py => response_handler.py} | 5 +- tests/test_http_utils.py | 8 +- 12 files changed, 157 insertions(+), 131 deletions(-) rename surehub_api/utils/{http_utils.py => response_handler.py} (89%) diff --git a/poetry.lock b/poetry.lock index 47592a5..6f48d2a 100644 --- a/poetry.lock +++ b/poetry.lock @@ -26,14 +26,14 @@ files = [ [[package]] name = "anyio" -version = "4.12.0" +version = "4.12.1" description = "High-level concurrency and networking framework on top of asyncio or Trio" optional = false python-versions = ">=3.9" groups = ["main", "dev"] files = [ - {file = "anyio-4.12.0-py3-none-any.whl", hash = "sha256:dad2376a628f98eeca4881fc56cd06affd18f659b17a747d3ff0307ced94b1bb"}, - {file = "anyio-4.12.0.tar.gz", hash = "sha256:73c693b567b0c55130c104d0b43a9baf3aa6a31fc6110116509f27bf75e21ec0"}, + {file = "anyio-4.12.1-py3-none-any.whl", hash = "sha256:d405828884fc140aa80a3c667b8beed277f1dfedec42ba031bd6ac3db606ab6c"}, + {file = "anyio-4.12.1.tar.gz", hash = "sha256:41cfcc3a4c85d3f05c932da7c26d0201ac36f72abd4435ba90d0464a3ffed703"}, ] [package.dependencies] @@ -62,26 +62,26 @@ tomli = {version = "*", markers = "python_version < \"3.11\""} [[package]] name = "cachetools" -version = "6.2.2" +version = "7.0.1" description = "Extensible memoizing collections and decorators" optional = false -python-versions = ">=3.9" +python-versions = ">=3.10" groups = ["main"] files = [ - {file = "cachetools-6.2.2-py3-none-any.whl", hash = "sha256:6c09c98183bf58560c97b2abfcedcbaf6a896a490f534b031b661d3723b45ace"}, - {file = "cachetools-6.2.2.tar.gz", hash = "sha256:8e6d266b25e539df852251cfd6f990b4bc3a141db73b939058d809ebd2590fc6"}, + {file = "cachetools-7.0.1-py3-none-any.whl", hash = "sha256:8f086515c254d5664ae2146d14fc7f65c9a4bce75152eb247e5a9c5e6d7b2ecf"}, + {file = "cachetools-7.0.1.tar.gz", hash = "sha256:e31e579d2c5b6e2944177a0397150d312888ddf4e16e12f1016068f0c03b8341"}, ] [[package]] name = "certifi" -version = "2025.11.12" +version = "2026.1.4" description = "Python package for providing Mozilla's CA Bundle." optional = false python-versions = ">=3.7" groups = ["main", "dev"] files = [ - {file = "certifi-2025.11.12-py3-none-any.whl", hash = "sha256:97de8790030bbd5c2d96b7ec782fc2f7820ef8dba6db909ccf95449f2d062d4b"}, - {file = "certifi-2025.11.12.tar.gz", hash = "sha256:d8ab5478f2ecd78af242878415affce761ca6bc54a22a27e026d7c25357c3316"}, + {file = "certifi-2026.1.4-py3-none-any.whl", hash = "sha256:9943707519e4add1115f44c2bc244f782c0249876bf51b6599fee1ffbedd685c"}, + {file = "certifi-2026.1.4.tar.gz", hash = "sha256:ac726dd470482006e014ad384921ed6438c457018f4b3d204aea4281258b2120"}, ] [[package]] @@ -278,26 +278,27 @@ test = ["pytest (>=6)"] [[package]] name = "fastapi" -version = "0.124.0" +version = "0.129.0" description = "FastAPI framework, high performance, easy to learn, fast to code, ready for production" optional = false -python-versions = ">=3.8" +python-versions = ">=3.10" groups = ["main"] files = [ - {file = "fastapi-0.124.0-py3-none-any.whl", hash = "sha256:91596bdc6dde303c318f06e8d2bc75eafb341fc793a0c9c92c0bc1db1ac52480"}, - {file = "fastapi-0.124.0.tar.gz", hash = "sha256:260cd178ad75e6d259991f2fd9b0fee924b224850079df576a3ba604ce58f4e6"}, + {file = "fastapi-0.129.0-py3-none-any.whl", hash = "sha256:b4946880e48f462692b31c083be0432275cbfb6e2274566b1be91479cc1a84ec"}, + {file = "fastapi-0.129.0.tar.gz", hash = "sha256:61315cebd2e65df5f97ec298c888f9de30430dd0612d59d6480beafbc10655af"}, ] [package.dependencies] annotated-doc = ">=0.0.2" -pydantic = ">=1.7.4,<1.8 || >1.8,<1.8.1 || >1.8.1,<2.0.0 || >2.0.0,<2.0.1 || >2.0.1,<2.1.0 || >2.1.0,<3.0.0" -starlette = ">=0.40.0,<0.51.0" +pydantic = ">=2.7.0" +starlette = ">=0.40.0,<1.0.0" typing-extensions = ">=4.8.0" +typing-inspection = ">=0.4.2" [package.extras] -all = ["email-validator (>=2.0.0)", "fastapi-cli[standard] (>=0.0.8)", "httpx (>=0.23.0,<1.0.0)", "itsdangerous (>=1.1.0)", "jinja2 (>=3.1.5)", "orjson (>=3.2.1)", "pydantic-extra-types (>=2.0.0)", "pydantic-settings (>=2.0.0)", "python-multipart (>=0.0.18)", "pyyaml (>=5.3.1)", "ujson (>=4.0.1,!=4.0.2,!=4.1.0,!=4.2.0,!=4.3.0,!=5.0.0,!=5.1.0)", "uvicorn[standard] (>=0.12.0)"] -standard = ["email-validator (>=2.0.0)", "fastapi-cli[standard] (>=0.0.8)", "httpx (>=0.23.0,<1.0.0)", "jinja2 (>=3.1.5)", "python-multipart (>=0.0.18)", "uvicorn[standard] (>=0.12.0)"] -standard-no-fastapi-cloud-cli = ["email-validator (>=2.0.0)", "fastapi-cli[standard-no-fastapi-cloud-cli] (>=0.0.8)", "httpx (>=0.23.0,<1.0.0)", "jinja2 (>=3.1.5)", "python-multipart (>=0.0.18)", "uvicorn[standard] (>=0.12.0)"] +all = ["email-validator (>=2.0.0)", "fastapi-cli[standard] (>=0.0.8)", "httpx (>=0.23.0,<1.0.0)", "itsdangerous (>=1.1.0)", "jinja2 (>=3.1.5)", "orjson (>=3.9.3)", "pydantic-extra-types (>=2.0.0)", "pydantic-settings (>=2.0.0)", "python-multipart (>=0.0.18)", "pyyaml (>=5.3.1)", "ujson (>=5.8.0)", "uvicorn[standard] (>=0.12.0)"] +standard = ["email-validator (>=2.0.0)", "fastapi-cli[standard] (>=0.0.8)", "httpx (>=0.23.0,<1.0.0)", "jinja2 (>=3.1.5)", "pydantic-extra-types (>=2.0.0)", "pydantic-settings (>=2.0.0)", "python-multipart (>=0.0.18)", "uvicorn[standard] (>=0.12.0)"] +standard-no-fastapi-cloud-cli = ["email-validator (>=2.0.0)", "fastapi-cli[standard-no-fastapi-cloud-cli] (>=0.0.8)", "httpx (>=0.23.0,<1.0.0)", "jinja2 (>=3.1.5)", "pydantic-extra-types (>=2.0.0)", "pydantic-settings (>=2.0.0)", "python-multipart (>=0.0.18)", "uvicorn[standard] (>=0.12.0)"] [[package]] name = "h11" @@ -387,14 +388,14 @@ files = [ [[package]] name = "packaging" -version = "25.0" +version = "26.0" description = "Core utilities for Python packages" optional = false python-versions = ">=3.8" groups = ["dev"] files = [ - {file = "packaging-25.0-py3-none-any.whl", hash = "sha256:29572ef2b1f17581046b3a2227d5c611fb25ec70ca1ba8554b24b0e69331a484"}, - {file = "packaging-25.0.tar.gz", hash = "sha256:d443872c98d677bf60f6a1f2f8c1cb748e8fe762d2bf9d3148b5599295b0fc4f"}, + {file = "packaging-26.0-py3-none-any.whl", hash = "sha256:b36f1fef9334a5588b4166f8bcd26a14e521f2b55e6b9de3aaa80d3ff7a37529"}, + {file = "packaging-26.0.tar.gz", hash = "sha256:00243ae351a257117b6a241061796684b084ed1c516a08c48a3f7e147a9d80b4"}, ] [[package]] @@ -644,14 +645,14 @@ use-chardet-on-py3 = ["chardet (>=3.0.2,<6)"] [[package]] name = "starlette" -version = "0.50.0" +version = "0.52.1" description = "The little ASGI library that shines." optional = false python-versions = ">=3.10" groups = ["main"] files = [ - {file = "starlette-0.50.0-py3-none-any.whl", hash = "sha256:9e5391843ec9b6e472eed1365a78c8098cfceb7a74bfd4d6b1c0c0095efb3bca"}, - {file = "starlette-0.50.0.tar.gz", hash = "sha256:a2a17b22203254bcbc2e1f926d2d55f3f9497f769416b3190768befe598fa3ca"}, + {file = "starlette-0.52.1-py3-none-any.whl", hash = "sha256:0029d43eb3d273bc4f83a08720b4912ea4b071087a3b48db01b7c839f7954d74"}, + {file = "starlette-0.52.1.tar.gz", hash = "sha256:834edd1b0a23167694292e94f597773bc3f89f362be6effee198165a35d62933"}, ] [package.dependencies] @@ -663,55 +664,60 @@ full = ["httpx (>=0.27.0,<0.29.0)", "itsdangerous", "jinja2", "python-multipart [[package]] name = "tomli" -version = "2.3.0" +version = "2.4.0" description = "A lil' TOML parser" optional = false python-versions = ">=3.8" groups = ["dev"] markers = "python_version == \"3.10\"" files = [ - {file = "tomli-2.3.0-cp311-cp311-macosx_10_9_x86_64.whl", hash = "sha256:88bd15eb972f3664f5ed4b57c1634a97153b4bac4479dcb6a495f41921eb7f45"}, - {file = "tomli-2.3.0-cp311-cp311-macosx_11_0_arm64.whl", hash = "sha256:883b1c0d6398a6a9d29b508c331fa56adbcdff647f6ace4dfca0f50e90dfd0ba"}, - {file = "tomli-2.3.0-cp311-cp311-manylinux2014_aarch64.manylinux_2_17_aarch64.manylinux_2_28_aarch64.whl", hash = "sha256:d1381caf13ab9f300e30dd8feadb3de072aeb86f1d34a8569453ff32a7dea4bf"}, - {file = "tomli-2.3.0-cp311-cp311-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl", hash = "sha256:a0e285d2649b78c0d9027570d4da3425bdb49830a6156121360b3f8511ea3441"}, - {file = "tomli-2.3.0-cp311-cp311-musllinux_1_2_aarch64.whl", hash = "sha256:0a154a9ae14bfcf5d8917a59b51ffd5a3ac1fd149b71b47a3a104ca4edcfa845"}, - {file = "tomli-2.3.0-cp311-cp311-musllinux_1_2_x86_64.whl", hash = "sha256:74bf8464ff93e413514fefd2be591c3b0b23231a77f901db1eb30d6f712fc42c"}, - {file = "tomli-2.3.0-cp311-cp311-win32.whl", hash = "sha256:00b5f5d95bbfc7d12f91ad8c593a1659b6387b43f054104cda404be6bda62456"}, - {file = "tomli-2.3.0-cp311-cp311-win_amd64.whl", hash = "sha256:4dc4ce8483a5d429ab602f111a93a6ab1ed425eae3122032db7e9acf449451be"}, - {file = "tomli-2.3.0-cp312-cp312-macosx_10_13_x86_64.whl", hash = "sha256:d7d86942e56ded512a594786a5ba0a5e521d02529b3826e7761a05138341a2ac"}, - {file = "tomli-2.3.0-cp312-cp312-macosx_11_0_arm64.whl", hash = "sha256:73ee0b47d4dad1c5e996e3cd33b8a76a50167ae5f96a2607cbe8cc773506ab22"}, - {file = "tomli-2.3.0-cp312-cp312-manylinux2014_aarch64.manylinux_2_17_aarch64.manylinux_2_28_aarch64.whl", hash = "sha256:792262b94d5d0a466afb5bc63c7daa9d75520110971ee269152083270998316f"}, - {file = "tomli-2.3.0-cp312-cp312-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl", hash = "sha256:4f195fe57ecceac95a66a75ac24d9d5fbc98ef0962e09b2eddec5d39375aae52"}, - {file = "tomli-2.3.0-cp312-cp312-musllinux_1_2_aarch64.whl", hash = "sha256:e31d432427dcbf4d86958c184b9bfd1e96b5b71f8eb17e6d02531f434fd335b8"}, - {file = "tomli-2.3.0-cp312-cp312-musllinux_1_2_x86_64.whl", hash = "sha256:7b0882799624980785240ab732537fcfc372601015c00f7fc367c55308c186f6"}, - {file = "tomli-2.3.0-cp312-cp312-win32.whl", hash = "sha256:ff72b71b5d10d22ecb084d345fc26f42b5143c5533db5e2eaba7d2d335358876"}, - {file = "tomli-2.3.0-cp312-cp312-win_amd64.whl", hash = "sha256:1cb4ed918939151a03f33d4242ccd0aa5f11b3547d0cf30f7c74a408a5b99878"}, - {file = "tomli-2.3.0-cp313-cp313-macosx_10_13_x86_64.whl", hash = "sha256:5192f562738228945d7b13d4930baffda67b69425a7f0da96d360b0a3888136b"}, - {file = "tomli-2.3.0-cp313-cp313-macosx_11_0_arm64.whl", hash = "sha256:be71c93a63d738597996be9528f4abe628d1adf5e6eb11607bc8fe1a510b5dae"}, - {file = "tomli-2.3.0-cp313-cp313-manylinux2014_aarch64.manylinux_2_17_aarch64.manylinux_2_28_aarch64.whl", hash = "sha256:c4665508bcbac83a31ff8ab08f424b665200c0e1e645d2bd9ab3d3e557b6185b"}, - {file = "tomli-2.3.0-cp313-cp313-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl", hash = "sha256:4021923f97266babc6ccab9f5068642a0095faa0a51a246a6a02fccbb3514eaf"}, - {file = "tomli-2.3.0-cp313-cp313-musllinux_1_2_aarch64.whl", hash = "sha256:a4ea38c40145a357d513bffad0ed869f13c1773716cf71ccaa83b0fa0cc4e42f"}, - {file = "tomli-2.3.0-cp313-cp313-musllinux_1_2_x86_64.whl", hash = "sha256:ad805ea85eda330dbad64c7ea7a4556259665bdf9d2672f5dccc740eb9d3ca05"}, - {file = "tomli-2.3.0-cp313-cp313-win32.whl", hash = "sha256:97d5eec30149fd3294270e889b4234023f2c69747e555a27bd708828353ab606"}, - {file = "tomli-2.3.0-cp313-cp313-win_amd64.whl", hash = "sha256:0c95ca56fbe89e065c6ead5b593ee64b84a26fca063b5d71a1122bf26e533999"}, - {file = "tomli-2.3.0-cp314-cp314-macosx_10_13_x86_64.whl", hash = "sha256:cebc6fe843e0733ee827a282aca4999b596241195f43b4cc371d64fc6639da9e"}, - {file = "tomli-2.3.0-cp314-cp314-macosx_11_0_arm64.whl", hash = "sha256:4c2ef0244c75aba9355561272009d934953817c49f47d768070c3c94355c2aa3"}, - {file = "tomli-2.3.0-cp314-cp314-manylinux2014_aarch64.manylinux_2_17_aarch64.manylinux_2_28_aarch64.whl", hash = "sha256:c22a8bf253bacc0cf11f35ad9808b6cb75ada2631c2d97c971122583b129afbc"}, - {file = "tomli-2.3.0-cp314-cp314-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl", hash = "sha256:0eea8cc5c5e9f89c9b90c4896a8deefc74f518db5927d0e0e8d4a80953d774d0"}, - {file = "tomli-2.3.0-cp314-cp314-musllinux_1_2_aarch64.whl", hash = "sha256:b74a0e59ec5d15127acdabd75ea17726ac4c5178ae51b85bfe39c4f8a278e879"}, - {file = "tomli-2.3.0-cp314-cp314-musllinux_1_2_x86_64.whl", hash = "sha256:b5870b50c9db823c595983571d1296a6ff3e1b88f734a4c8f6fc6188397de005"}, - {file = "tomli-2.3.0-cp314-cp314-win32.whl", hash = "sha256:feb0dacc61170ed7ab602d3d972a58f14ee3ee60494292d384649a3dc38ef463"}, - {file = "tomli-2.3.0-cp314-cp314-win_amd64.whl", hash = "sha256:b273fcbd7fc64dc3600c098e39136522650c49bca95df2d11cf3b626422392c8"}, - {file = "tomli-2.3.0-cp314-cp314t-macosx_10_13_x86_64.whl", hash = "sha256:940d56ee0410fa17ee1f12b817b37a4d4e4dc4d27340863cc67236c74f582e77"}, - {file = "tomli-2.3.0-cp314-cp314t-macosx_11_0_arm64.whl", hash = "sha256:f85209946d1fe94416debbb88d00eb92ce9cd5266775424ff81bc959e001acaf"}, - {file = "tomli-2.3.0-cp314-cp314t-manylinux2014_aarch64.manylinux_2_17_aarch64.manylinux_2_28_aarch64.whl", hash = "sha256:a56212bdcce682e56b0aaf79e869ba5d15a6163f88d5451cbde388d48b13f530"}, - {file = "tomli-2.3.0-cp314-cp314t-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl", hash = "sha256:c5f3ffd1e098dfc032d4d3af5c0ac64f6d286d98bc148698356847b80fa4de1b"}, - {file = "tomli-2.3.0-cp314-cp314t-musllinux_1_2_aarch64.whl", hash = "sha256:5e01decd096b1530d97d5d85cb4dff4af2d8347bd35686654a004f8dea20fc67"}, - {file = "tomli-2.3.0-cp314-cp314t-musllinux_1_2_x86_64.whl", hash = "sha256:8a35dd0e643bb2610f156cca8db95d213a90015c11fee76c946aa62b7ae7e02f"}, - {file = "tomli-2.3.0-cp314-cp314t-win32.whl", hash = "sha256:a1f7f282fe248311650081faafa5f4732bdbfef5d45fe3f2e702fbc6f2d496e0"}, - {file = "tomli-2.3.0-cp314-cp314t-win_amd64.whl", hash = "sha256:70a251f8d4ba2d9ac2542eecf008b3c8a9fc5c3f9f02c56a9d7952612be2fdba"}, - {file = "tomli-2.3.0-py3-none-any.whl", hash = "sha256:e95b1af3c5b07d9e643909b5abbec77cd9f1217e6d0bca72b0234736b9fb1f1b"}, - {file = "tomli-2.3.0.tar.gz", hash = "sha256:64be704a875d2a59753d80ee8a533c3fe183e3f06807ff7dc2232938ccb01549"}, + {file = "tomli-2.4.0-cp311-cp311-macosx_10_9_x86_64.whl", hash = "sha256:b5ef256a3fd497d4973c11bf142e9ed78b150d36f5773f1ca6088c230ffc5867"}, + {file = "tomli-2.4.0-cp311-cp311-macosx_11_0_arm64.whl", hash = "sha256:5572e41282d5268eb09a697c89a7bee84fae66511f87533a6f88bd2f7b652da9"}, + {file = "tomli-2.4.0-cp311-cp311-manylinux2014_aarch64.manylinux_2_17_aarch64.manylinux_2_28_aarch64.whl", hash = "sha256:551e321c6ba03b55676970b47cb1b73f14a0a4dce6a3e1a9458fd6d921d72e95"}, + {file = "tomli-2.4.0-cp311-cp311-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl", hash = "sha256:5e3f639a7a8f10069d0e15408c0b96a2a828cfdec6fca05296ebcdcc28ca7c76"}, + {file = "tomli-2.4.0-cp311-cp311-musllinux_1_2_aarch64.whl", hash = "sha256:1b168f2731796b045128c45982d3a4874057626da0e2ef1fdd722848b741361d"}, + {file = "tomli-2.4.0-cp311-cp311-musllinux_1_2_x86_64.whl", hash = "sha256:133e93646ec4300d651839d382d63edff11d8978be23da4cc106f5a18b7d0576"}, + {file = "tomli-2.4.0-cp311-cp311-win32.whl", hash = "sha256:b6c78bdf37764092d369722d9946cb65b8767bfa4110f902a1b2542d8d173c8a"}, + {file = "tomli-2.4.0-cp311-cp311-win_amd64.whl", hash = "sha256:d3d1654e11d724760cdb37a3d7691f0be9db5fbdaef59c9f532aabf87006dbaa"}, + {file = "tomli-2.4.0-cp311-cp311-win_arm64.whl", hash = "sha256:cae9c19ed12d4e8f3ebf46d1a75090e4c0dc16271c5bce1c833ac168f08fb614"}, + {file = "tomli-2.4.0-cp312-cp312-macosx_10_13_x86_64.whl", hash = "sha256:920b1de295e72887bafa3ad9f7a792f811847d57ea6b1215154030cf131f16b1"}, + {file = "tomli-2.4.0-cp312-cp312-macosx_11_0_arm64.whl", hash = "sha256:7d6d9a4aee98fac3eab4952ad1d73aee87359452d1c086b5ceb43ed02ddb16b8"}, + {file = "tomli-2.4.0-cp312-cp312-manylinux2014_aarch64.manylinux_2_17_aarch64.manylinux_2_28_aarch64.whl", hash = "sha256:36b9d05b51e65b254ea6c2585b59d2c4cb91c8a3d91d0ed0f17591a29aaea54a"}, + {file = "tomli-2.4.0-cp312-cp312-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl", hash = "sha256:1c8a885b370751837c029ef9bc014f27d80840e48bac415f3412e6593bbc18c1"}, + {file = "tomli-2.4.0-cp312-cp312-musllinux_1_2_aarch64.whl", hash = "sha256:8768715ffc41f0008abe25d808c20c3d990f42b6e2e58305d5da280ae7d1fa3b"}, + {file = "tomli-2.4.0-cp312-cp312-musllinux_1_2_x86_64.whl", hash = "sha256:7b438885858efd5be02a9a133caf5812b8776ee0c969fea02c45e8e3f296ba51"}, + {file = "tomli-2.4.0-cp312-cp312-win32.whl", hash = "sha256:0408e3de5ec77cc7f81960c362543cbbd91ef883e3138e81b729fc3eea5b9729"}, + {file = "tomli-2.4.0-cp312-cp312-win_amd64.whl", hash = "sha256:685306e2cc7da35be4ee914fd34ab801a6acacb061b6a7abca922aaf9ad368da"}, + {file = "tomli-2.4.0-cp312-cp312-win_arm64.whl", hash = "sha256:5aa48d7c2356055feef06a43611fc401a07337d5b006be13a30f6c58f869e3c3"}, + {file = "tomli-2.4.0-cp313-cp313-macosx_10_13_x86_64.whl", hash = "sha256:84d081fbc252d1b6a982e1870660e7330fb8f90f676f6e78b052ad4e64714bf0"}, + {file = "tomli-2.4.0-cp313-cp313-macosx_11_0_arm64.whl", hash = "sha256:9a08144fa4cba33db5255f9b74f0b89888622109bd2776148f2597447f92a94e"}, + {file = "tomli-2.4.0-cp313-cp313-manylinux2014_aarch64.manylinux_2_17_aarch64.manylinux_2_28_aarch64.whl", hash = "sha256:c73add4bb52a206fd0c0723432db123c0c75c280cbd67174dd9d2db228ebb1b4"}, + {file = "tomli-2.4.0-cp313-cp313-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl", hash = "sha256:1fb2945cbe303b1419e2706e711b7113da57b7db31ee378d08712d678a34e51e"}, + {file = "tomli-2.4.0-cp313-cp313-musllinux_1_2_aarch64.whl", hash = "sha256:bbb1b10aa643d973366dc2cb1ad94f99c1726a02343d43cbc011edbfac579e7c"}, + {file = "tomli-2.4.0-cp313-cp313-musllinux_1_2_x86_64.whl", hash = "sha256:4cbcb367d44a1f0c2be408758b43e1ffb5308abe0ea222897d6bfc8e8281ef2f"}, + {file = "tomli-2.4.0-cp313-cp313-win32.whl", hash = "sha256:7d49c66a7d5e56ac959cb6fc583aff0651094ec071ba9ad43df785abc2320d86"}, + {file = "tomli-2.4.0-cp313-cp313-win_amd64.whl", hash = "sha256:3cf226acb51d8f1c394c1b310e0e0e61fecdd7adcb78d01e294ac297dd2e7f87"}, + {file = "tomli-2.4.0-cp313-cp313-win_arm64.whl", hash = "sha256:d20b797a5c1ad80c516e41bc1fb0443ddb5006e9aaa7bda2d71978346aeb9132"}, + {file = "tomli-2.4.0-cp314-cp314-macosx_10_15_x86_64.whl", hash = "sha256:26ab906a1eb794cd4e103691daa23d95c6919cc2fa9160000ac02370cc9dd3f6"}, + {file = "tomli-2.4.0-cp314-cp314-macosx_11_0_arm64.whl", hash = "sha256:20cedb4ee43278bc4f2fee6cb50daec836959aadaf948db5172e776dd3d993fc"}, + {file = "tomli-2.4.0-cp314-cp314-manylinux2014_aarch64.manylinux_2_17_aarch64.manylinux_2_28_aarch64.whl", hash = "sha256:39b0b5d1b6dd03684b3fb276407ebed7090bbec989fa55838c98560c01113b66"}, + {file = "tomli-2.4.0-cp314-cp314-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl", hash = "sha256:a26d7ff68dfdb9f87a016ecfd1e1c2bacbe3108f4e0f8bcd2228ef9a766c787d"}, + {file = "tomli-2.4.0-cp314-cp314-musllinux_1_2_aarch64.whl", hash = "sha256:20ffd184fb1df76a66e34bd1b36b4a4641bd2b82954befa32fe8163e79f1a702"}, + {file = "tomli-2.4.0-cp314-cp314-musllinux_1_2_x86_64.whl", hash = "sha256:75c2f8bbddf170e8effc98f5e9084a8751f8174ea6ccf4fca5398436e0320bc8"}, + {file = "tomli-2.4.0-cp314-cp314-win32.whl", hash = "sha256:31d556d079d72db7c584c0627ff3a24c5d3fb4f730221d3444f3efb1b2514776"}, + {file = "tomli-2.4.0-cp314-cp314-win_amd64.whl", hash = "sha256:43e685b9b2341681907759cf3a04e14d7104b3580f808cfde1dfdb60ada85475"}, + {file = "tomli-2.4.0-cp314-cp314-win_arm64.whl", hash = "sha256:3d895d56bd3f82ddd6faaff993c275efc2ff38e52322ea264122d72729dca2b2"}, + {file = "tomli-2.4.0-cp314-cp314t-macosx_10_15_x86_64.whl", hash = "sha256:5b5807f3999fb66776dbce568cc9a828544244a8eb84b84b9bafc080c99597b9"}, + {file = "tomli-2.4.0-cp314-cp314t-macosx_11_0_arm64.whl", hash = "sha256:c084ad935abe686bd9c898e62a02a19abfc9760b5a79bc29644463eaf2840cb0"}, + {file = "tomli-2.4.0-cp314-cp314t-manylinux2014_aarch64.manylinux_2_17_aarch64.manylinux_2_28_aarch64.whl", hash = "sha256:0f2e3955efea4d1cfbcb87bc321e00dc08d2bcb737fd1d5e398af111d86db5df"}, + {file = "tomli-2.4.0-cp314-cp314t-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl", hash = "sha256:0e0fe8a0b8312acf3a88077a0802565cb09ee34107813bba1c7cd591fa6cfc8d"}, + {file = "tomli-2.4.0-cp314-cp314t-musllinux_1_2_aarch64.whl", hash = "sha256:413540dce94673591859c4c6f794dfeaa845e98bf35d72ed59636f869ef9f86f"}, + {file = "tomli-2.4.0-cp314-cp314t-musllinux_1_2_x86_64.whl", hash = "sha256:0dc56fef0e2c1c470aeac5b6ca8cc7b640bb93e92d9803ddaf9ea03e198f5b0b"}, + {file = "tomli-2.4.0-cp314-cp314t-win32.whl", hash = "sha256:d878f2a6707cc9d53a1be1414bbb419e629c3d6e67f69230217bb663e76b5087"}, + {file = "tomli-2.4.0-cp314-cp314t-win_amd64.whl", hash = "sha256:2add28aacc7425117ff6364fe9e06a183bb0251b03f986df0e78e974047571fd"}, + {file = "tomli-2.4.0-cp314-cp314t-win_arm64.whl", hash = "sha256:2b1e3b80e1d5e52e40e9b924ec43d81570f0e7d09d11081b797bc4692765a3d4"}, + {file = "tomli-2.4.0-py3-none-any.whl", hash = "sha256:1f776e7d669ebceb01dee46484485f43a4048746235e683bcdffacdf1fb4785a"}, + {file = "tomli-2.4.0.tar.gz", hash = "sha256:aa89c3f6c277dd275d8e243ad24f3b5e701491a860d5121f2cdd399fbb31fc9c"}, ] [[package]] @@ -744,14 +750,14 @@ typing-extensions = ">=4.12.0" [[package]] name = "urllib3" -version = "2.6.1" +version = "2.6.3" description = "HTTP library with thread-safe connection pooling, file post, and more." optional = false python-versions = ">=3.9" groups = ["main"] files = [ - {file = "urllib3-2.6.1-py3-none-any.whl", hash = "sha256:e67d06fe947c36a7ca39f4994b08d73922d40e6cca949907be05efa6fd75110b"}, - {file = "urllib3-2.6.1.tar.gz", hash = "sha256:5379eb6e1aba4088bae84f8242960017ec8d8e3decf30480b3a1abdaa9671a3f"}, + {file = "urllib3-2.6.3-py3-none-any.whl", hash = "sha256:bf272323e553dfb2e87d9bfd225ca7b0f467b919d7bbd355436d3fd37cb0acd4"}, + {file = "urllib3-2.6.3.tar.gz", hash = "sha256:1b62b6884944a57dbe321509ab94fd4d3b307075e0c2eae991ac71ee15ad38ed"}, ] [package.extras] @@ -762,14 +768,14 @@ zstd = ["backports-zstd (>=1.0.0) ; python_version < \"3.14\""] [[package]] name = "uvicorn" -version = "0.38.0" +version = "0.40.0" description = "The lightning-fast ASGI server." optional = false -python-versions = ">=3.9" +python-versions = ">=3.10" groups = ["main"] files = [ - {file = "uvicorn-0.38.0-py3-none-any.whl", hash = "sha256:48c0afd214ceb59340075b4a052ea1ee91c16fbc2a9b1469cca0e54566977b02"}, - {file = "uvicorn-0.38.0.tar.gz", hash = "sha256:fd97093bdd120a2609fc0d3afe931d4d4ad688b6e75f0f929fde1bc36fe0e91d"}, + {file = "uvicorn-0.40.0-py3-none-any.whl", hash = "sha256:c6c8f55bc8bf13eb6fa9ff87ad62308bbbc33d0b67f84293151efe87e0d5f2ee"}, + {file = "uvicorn-0.40.0.tar.gz", hash = "sha256:839676675e87e73694518b5574fd0f24c9d97b46bea16df7b8c05ea1a51071ea"}, ] [package.dependencies] @@ -795,4 +801,4 @@ files = [ [metadata] lock-version = "2.1" python-versions = ">=3.10" -content-hash = "59021f7b1eb090bf5577598b027168b21b51fd99db085606b9800b069ace5a4e" +content-hash = "aaabe25075be7ede936902be718690f90e88fd4b93ad21c5a0168d0d17f1aa4a" diff --git a/pyproject.toml b/pyproject.toml index 0e04ae8..cfcf91a 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -9,11 +9,11 @@ authors = [ keywords = ["SureHub", "Sure Petcare", "REST", "API"] requires-python = ">=3.10" dependencies = [ - "uvicorn~=0.38", - "dynaconf~=3.2", - "fastapi~=0.124", - "requests~=2.32", - "cachetools~=6.2", + "uvicorn>=0.38,<1.0", + "dynaconf>=3.2,<4.0", + "fastapi>=0.124,<1.0", + "requests>=2.32,<3.0", + "cachetools>=7.0,<8.0", ] [project.urls] @@ -22,10 +22,10 @@ documentation = "https://fabieu.github.io/surehub-api/" [dependency-groups] dev = [ - "pytest~=9.0", - "vermin~=1.8", - "autopep8~=2.3", - "httpx~=0.28", + "pytest>=9.0,<10.0", + "vermin>=1.8,<2.0", + "autopep8>=2.3,<3.0", + "httpx>=0.28,<1.0", ] [build-system] diff --git a/surehub_api/entities/official.py b/surehub_api/entities/official.py index eaa0d61..e338b27 100644 --- a/surehub_api/entities/official.py +++ b/surehub_api/entities/official.py @@ -33,6 +33,16 @@ class SpecialProfile(IntEnum): SPECIAL_PROFILE_6 = 6 +class AuthLogin(BaseModel): + client_uid: str + email_address: str + password: str + + +class AuthToken(BaseModel): + token: str + + class DeviceTag(BaseModel): id: int device_id: int diff --git a/surehub_api/services/auth.py b/surehub_api/services/auth.py index af239ce..ae3303e 100644 --- a/surehub_api/services/auth.py +++ b/surehub_api/services/auth.py @@ -1,8 +1,11 @@ +import uuid + import requests from cachetools import TTLCache from surehub_api.config import settings -from surehub_api.utils import http_utils +from surehub_api.entities import official +from surehub_api.utils import response_handler DEFAULT_HEADERS = { "Host": "app-api.production.surehub.io", @@ -27,14 +30,20 @@ def _get_token() -> str: token = cache.get("token") if not token: - payload = { - "email_address": settings.email, - "password": settings.password, - "device_id": "web", - } - response = requests.post(f"{settings.endpoint}/api/auth/login", json=payload, headers=DEFAULT_HEADERS) - http_utils.raise_for_status(response) - token = response.json()["data"]["token"] + auth_login = official.AuthLogin( + client_uid=str(uuid.uuid4()), + email_address=settings.email, + password=settings.password, + ) + + response = requests.post( + f"{settings.endpoint}/api/auth/login", + json=auth_login.model_dump(mode='json'), + headers=DEFAULT_HEADERS + ) + auth_token = response_handler.parse(response, model=official.AuthToken) + + token = auth_token.token cache["token"] = token return token diff --git a/surehub_api/services/dashboard.py b/surehub_api/services/dashboard.py index b8b320e..d046ad1 100644 --- a/surehub_api/services/dashboard.py +++ b/surehub_api/services/dashboard.py @@ -3,11 +3,11 @@ from surehub_api.config import settings from surehub_api.entities import official from surehub_api.services import auth -from surehub_api.utils import http_utils +from surehub_api.utils import response_handler def get_dashboard() -> official.MeStart: uri = f"{settings.endpoint}/api/me/start" response = requests.get(uri, headers=auth.auth_headers()) - return http_utils.extract_response_data(response, model=official.MeStart) + return response_handler.parse(response, model=official.MeStart) diff --git a/surehub_api/services/devices.py b/surehub_api/services/devices.py index 47a4bd8..be31d34 100644 --- a/surehub_api/services/devices.py +++ b/surehub_api/services/devices.py @@ -5,7 +5,7 @@ from surehub_api.config import settings from surehub_api.entities import official, custom from surehub_api.services import auth -from surehub_api.utils import http_utils +from surehub_api.utils import response_handler DEVICE_TYPES_SUPPORTING_INDOOR_ONLY_MODE = [ official.DeviceType.DUALSCAN_PET_DOOR_CONNECT, @@ -25,21 +25,21 @@ def get_devices( params["HouseholdId"] = household_ids response = requests.get(uri, headers=auth.auth_headers(), params=params) - return http_utils.extract_response_data(response, model=List[official.Device]) + return response_handler.parse(response, model=List[official.Device]) def get_device_by_id(device_id: int) -> official.Device: uri = f"{settings.endpoint}/api/device/{device_id}" response = requests.get(uri, headers=auth.auth_headers()) - return http_utils.extract_response_data(response, model=official.Device) + return response_handler.parse(response, model=official.Device) def get_device_state_by_id(device_id) -> official.DeviceControl: uri = f"{settings.endpoint}/api/device/{device_id}/control" response = requests.get(uri, headers=auth.auth_headers()) - return http_utils.extract_response_data(response, model=official.DeviceControl) + return response_handler.parse(response, model=official.DeviceControl) def set_lock_mode(device_id: int, lock_mode: custom.LockMode) -> official.DeviceControl: @@ -50,14 +50,14 @@ def set_lock_mode(device_id: int, lock_mode: custom.LockMode) -> official.Device } response = requests.put(uri, headers=auth.auth_headers(), json=data) - return http_utils.extract_response_data(response, model=official.DeviceControl) + return response_handler.parse(response, model=official.DeviceControl) def get_tags_of_device(device_id: int) -> List[official.DeviceTag]: uri = f"{settings.endpoint}/api/device/{device_id}/tag" response = requests.get(uri, headers=auth.auth_headers()) - return http_utils.extract_response_data(response, model=List[official.Tag]) + return response_handler.parse(response, model=List[official.Tag]) def update_device_state(device_id: int, device_state: official.DeviceControl) -> official.DeviceControl: uri = f"{settings.endpoint}/api/device/{device_id}/control" @@ -70,7 +70,7 @@ def get_tag_of_device(device_id: int, tag_id: int) -> official.DeviceTag: uri = f"{settings.endpoint}/api/device/{device_id}/tag/{tag_id}" response = requests.get(uri, headers=auth.auth_headers()) - return http_utils.extract_response_data(response, model=official.Tag) + return response_handler.parse(response, model=official.Tag) def assign_tag_to_device(device_id: int, tag_id: int) -> official.DeviceTag: @@ -81,11 +81,11 @@ def assign_tag_to_device(device_id: int, tag_id: int) -> official.DeviceTag: } response = requests.put(uri, headers=auth.auth_headers(), json=data) - return http_utils.extract_response_data(response, model=official.Tag) + return response_handler.parse(response, model=official.Tag) def remove_tag_from_device(device_id: int, tag_id: int) -> official.DeviceTag: uri = f"{settings.endpoint}/api/device/{device_id}/tag/{tag_id}" response = requests.delete(uri, headers=auth.auth_headers()) - return http_utils.extract_response_data(response, model=official.Tag) + return response_handler.parse(response, model=official.Tag) diff --git a/surehub_api/services/households.py b/surehub_api/services/households.py index 17ae961..274b723 100644 --- a/surehub_api/services/households.py +++ b/surehub_api/services/households.py @@ -5,60 +5,60 @@ from surehub_api.config import settings from surehub_api.entities import official from surehub_api.services import auth -from surehub_api.utils import http_utils +from surehub_api.utils import response_handler def get_households() -> List[official.Household]: uri = f"{settings.endpoint}/api/household" response = requests.get(uri, headers=auth.auth_headers()) - return http_utils.extract_response_data(response, model=List[official.Household]) + return response_handler.parse(response, model=List[official.Household]) def get_household_by_id(household_id: int) -> official.Household: uri = f"{settings.endpoint}/api/household/{household_id}" response = requests.get(uri, headers=auth.auth_headers()) - return http_utils.extract_response_data(response, model=official.Household) + return response_handler.parse(response, model=official.Household) def get_users_of_household(household_id: int) -> List[official.HouseholdUser]: uri = f"{settings.endpoint}/api/household/{household_id}/user" response = requests.get(uri, headers=auth.auth_headers()) - return http_utils.extract_response_data(response, model=List[official.HouseholdUser]) + return response_handler.parse(response, model=List[official.HouseholdUser]) def get_user_of_household(household_id: int, user_id: int) -> official.HouseholdUser: uri = f"{settings.endpoint}/api/household/{household_id}/user/{user_id}" response = requests.get(uri, headers=auth.auth_headers()) - return http_utils.extract_response_data(response, model=official.HouseholdUser) + return response_handler.parse(response, model=official.HouseholdUser) def get_pets_of_household(household_id: int) -> List[official.Pet]: uri = f"{settings.endpoint}/api/household/{household_id}/pet" response = requests.get(uri, headers=auth.auth_headers()) - return http_utils.extract_response_data(response, model=List[official.Pet]) + return response_handler.parse(response, model=List[official.Pet]) def get_pet_of_household(household_id: int, pet_id: int) -> official.Pet: uri = f"{settings.endpoint}/api/household/{household_id}/pet/{pet_id}" response = requests.get(uri, headers=auth.auth_headers()) - return http_utils.extract_response_data(response, model=official.Pet) + return response_handler.parse(response, model=official.Pet) def get_devices_of_household(household_id: int) -> List[official.Device]: uri = f"{settings.endpoint}/api/household/{household_id}/device" response = requests.get(uri, headers=auth.auth_headers()) - return http_utils.extract_response_data(response, model=List[official.Device]) + return response_handler.parse(response, model=List[official.Device]) def get_device_of_household(household_id: int, device_id: int) -> official.Device: uri = f"{settings.endpoint}/api/household/{household_id}/device/{device_id}" response = requests.get(uri, headers=auth.auth_headers()) - return http_utils.extract_response_data(response, model=official.Device) + return response_handler.parse(response, model=official.Device) diff --git a/surehub_api/services/pets.py b/surehub_api/services/pets.py index 5c01a74..683cfb4 100644 --- a/surehub_api/services/pets.py +++ b/surehub_api/services/pets.py @@ -8,21 +8,21 @@ from surehub_api.config import settings from surehub_api.entities import official, dto, official_v2 from surehub_api.services import auth, devices -from surehub_api.utils import http_utils +from surehub_api.utils import response_handler def get_pets() -> List[official.Pet]: uri = f"{settings.endpoint}/api/pet" response = requests.get(uri, headers=auth.auth_headers()) - return http_utils.extract_response_data(response, model=List[official.Pet]) + return response_handler.parse(response, model=List[official.Pet]) def get_pet(pet_id: int) -> official.Pet: uri = f"{settings.endpoint}/api/pet/{pet_id}" response = requests.get(uri, headers=auth.auth_headers()) - return http_utils.extract_response_data(response, model=official.Pet) + return response_handler.parse(response, model=official.Pet) def get_pet_state(pet_id: int) -> dto.PetStateResponse: @@ -56,7 +56,7 @@ def _update_pet_position(pet_id: int, position: official.PetPositionWhere) -> No ) response = requests.post(uri, headers=auth.auth_headers(), json=payload.model_dump(mode='json')) - http_utils.raise_for_status(response) + response_handler.raise_for_status(response) def _update_indoor_only_mode(pet_id: int, indoor_only: bool, household_ids: List[int] | None = None) -> None: @@ -90,7 +90,7 @@ def _update_indoor_only_mode(pet_id: int, indoor_only: bool, household_ids: List ) response = requests.put(uri, headers=auth.auth_headers(), json=[payload.model_dump(mode='json')]) - http_utils.raise_for_status(response) + response_handler.raise_for_status(response) def get_pet_position(pet_id: int) -> official.PetPosition: @@ -126,4 +126,4 @@ def set_pet_position(pet_id: int, pet_position: official.CreatePetPosition) -> o pet_position_dict['since'] = datetime.now(timezone.utc).isoformat() response = requests.post(uri, headers=auth.auth_headers(), json=pet_position_dict) - return http_utils.extract_response_data(response, model=official.PetPosition) + return response_handler.parse(response, model=official.PetPosition) diff --git a/surehub_api/services/reports.py b/surehub_api/services/reports.py index b323855..53fc9c3 100644 --- a/surehub_api/services/reports.py +++ b/surehub_api/services/reports.py @@ -5,7 +5,7 @@ from surehub_api.config import settings from surehub_api.entities import official from surehub_api.services import auth -from surehub_api.utils import http_utils +from surehub_api.utils import response_handler def get_pet_report(household_id: int, pet_id: int, from_datetime: datetime, @@ -18,4 +18,4 @@ def get_pet_report(household_id: int, pet_id: int, from_datetime: datetime, } response = requests.get(uri, headers=auth.auth_headers(), params=params) - return http_utils.extract_response_data(response, model=official.PetReport) + return response_handler.parse(response, model=official.PetReport) diff --git a/surehub_api/services/timeline.py b/surehub_api/services/timeline.py index 6ffc0f8..2096e90 100644 --- a/surehub_api/services/timeline.py +++ b/surehub_api/services/timeline.py @@ -5,7 +5,7 @@ from surehub_api.config import settings from surehub_api.services import auth -from surehub_api.utils import http_utils +from surehub_api.utils import response_handler def get_timeline_of_household(household_id: int) -> list: @@ -15,7 +15,7 @@ def get_timeline_of_household(household_id: int) -> list: fetch_size = 100 response = requests.get(uri, headers=auth.auth_headers()) - meta = http_utils.extract_response_data(response, key='meta') + meta = response_handler.parse(response, key='meta') count = meta.get('count') page_size = meta.get('page_size') @@ -27,6 +27,6 @@ def get_timeline_of_household(household_id: int) -> list: for i in range(1, request_count + 1): payload = {'page_size': fetch_size, 'page': i} response2 = requests.get(uri, headers=auth.auth_headers(), params=payload) - result += http_utils.extract_response_data(response2) + result += response_handler.parse(response2) return result diff --git a/surehub_api/utils/http_utils.py b/surehub_api/utils/response_handler.py similarity index 89% rename from surehub_api/utils/http_utils.py rename to surehub_api/utils/response_handler.py index e1e44d2..17cf3aa 100644 --- a/surehub_api/utils/http_utils.py +++ b/surehub_api/utils/response_handler.py @@ -20,7 +20,7 @@ def raise_for_status(response: Response) -> None: raise HTTPException(status_code=response.status_code, detail=_extract_error_detail(response)) -def extract_response_data(response: Response, key: str = "data", model: Any | None = None) -> Any: +def parse(response: Response, key: str = "data", model: Any | None = None) -> Any: """ Validates an HTTP response and raises HTTPException on errors. @@ -29,7 +29,8 @@ def extract_response_data(response: Response, key: str = "data", model: Any | No - Extracts error details from response body when available :param response: requests.Response object - :param key: root level key to extract payload + :param key: root level key to extract payload (default: "data") + :param model: Pydantic model class to validate the extracted payload against (optional) :raise HTTPException: If status code indicates client or server error """ diff --git a/tests/test_http_utils.py b/tests/test_http_utils.py index bd41d24..7a5bee1 100644 --- a/tests/test_http_utils.py +++ b/tests/test_http_utils.py @@ -4,7 +4,7 @@ from fastapi import HTTPException from surehub_api.entities import official -from surehub_api.utils import http_utils +from surehub_api.utils import response_handler class FakeResponse: @@ -22,7 +22,7 @@ def json(self): def test_extract_response_data_validates_pydantic_model(): response = FakeResponse(200, {"data": {"id": 1, "version": 1}}) - result = http_utils.extract_response_data(response, model=official.Pet) + result = response_handler.parse(response, model=official.Pet) assert isinstance(result, official.Pet) assert result.id == 1 @@ -33,11 +33,11 @@ def test_raise_for_status_logs_with_expected_levels(caplog): error_response = FakeResponse(404, {"error": "missing"}, text="missing") with caplog.at_level("INFO"): - http_utils.raise_for_status(ok_response) + response_handler.raise_for_status(ok_response) with pytest.raises(HTTPException): with caplog.at_level("ERROR"): - http_utils.raise_for_status(error_response) + response_handler.raise_for_status(error_response) assert "returned 200" in caplog.text assert "returned 404" in caplog.text From 62fb53558e5620bbb37ceaabb84f62b728eb38f2 Mon Sep 17 00:00:00 2001 From: Fabian Eulitz Date: Wed, 18 Feb 2026 22:11:55 +0100 Subject: [PATCH 07/15] Add swagger.json --- resources/swagger.json | 15250 +++++++++++++++++++++++++++++++++++++++ 1 file changed, 15250 insertions(+) create mode 100644 resources/swagger.json diff --git a/resources/swagger.json b/resources/swagger.json new file mode 100644 index 0000000..ed37efd --- /dev/null +++ b/resources/swagger.json @@ -0,0 +1,15250 @@ +{ + "openapi": "3.0.1", + "info": { + "title": "App API" + }, + "paths": { + "/api/animo/pet": { + "get": { + "tags": [ + "AnimoPet" + ], + "parameters": [ + { + "name": "HouseholdId", + "in": "query", + "schema": { + "type": "array", + "items": { + "type": "integer", + "format": "int32" + } + } + }, + { + "name": "Page", + "in": "query", + "schema": { + "type": "integer", + "format": "int32" + } + }, + { + "name": "ItemsPerPage", + "in": "query", + "schema": { + "type": "integer", + "format": "int32" + } + }, + { + "name": "PageSize", + "in": "query", + "schema": { + "type": "integer", + "format": "int32" + } + }, + { + "name": "api-version", + "in": "query", + "schema": { + "type": "string" + } + } + ], + "responses": { + "400": { + "description": "Bad Request", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResource" + } + } + } + }, + "403": { + "description": "Forbidden", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ProblemDetails" + } + } + } + }, + "404": { + "description": "Not Found", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResource" + } + } + } + }, + "422": { + "description": "Unprocessable Content", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResource" + } + } + } + }, + "500": { + "description": "Internal Server Error" + }, + "200": { + "description": "OK", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/AnimoPetResourcePaginatedDataResult" + } + } + } + } + } + } + }, + "/api/auth/login": { + "post": { + "tags": [ + "Authentication" + ], + "parameters": [ + { + "name": "api-version", + "in": "query", + "schema": { + "type": "string" + } + } + ], + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/AuthLoginResource" + } + }, + "text/json": { + "schema": { + "$ref": "#/components/schemas/AuthLoginResource" + } + }, + "application/*+json": { + "schema": { + "$ref": "#/components/schemas/AuthLoginResource" + } + } + } + }, + "responses": { + "400": { + "description": "Bad Request", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResource" + } + } + } + }, + "403": { + "description": "Forbidden", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ProblemDetails" + } + } + } + }, + "404": { + "description": "Not Found", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResource" + } + } + } + }, + "422": { + "description": "Unprocessable Content", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResource" + } + } + } + }, + "500": { + "description": "Internal Server Error" + } + } + } + }, + "/api/auth/register": { + "post": { + "tags": [ + "Authentication" + ], + "parameters": [ + { + "name": "api-version", + "in": "query", + "schema": { + "type": "string" + } + } + ], + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/AuthRegisterResource" + } + }, + "text/json": { + "schema": { + "$ref": "#/components/schemas/AuthRegisterResource" + } + }, + "application/*+json": { + "schema": { + "$ref": "#/components/schemas/AuthRegisterResource" + } + } + } + }, + "responses": { + "400": { + "description": "Bad Request", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResource" + } + } + } + }, + "403": { + "description": "Forbidden", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ProblemDetails" + } + } + } + }, + "404": { + "description": "Not Found", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResource" + } + } + } + }, + "422": { + "description": "Unprocessable Content", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResource" + } + } + } + }, + "500": { + "description": "Internal Server Error" + } + } + } + }, + "/api/auth/change-password": { + "post": { + "tags": [ + "Authentication" + ], + "parameters": [ + { + "name": "api-version", + "in": "query", + "schema": { + "type": "string" + } + } + ], + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/AuthChangePasswordResource" + } + }, + "text/json": { + "schema": { + "$ref": "#/components/schemas/AuthChangePasswordResource" + } + }, + "application/*+json": { + "schema": { + "$ref": "#/components/schemas/AuthChangePasswordResource" + } + } + } + }, + "responses": { + "400": { + "description": "Bad Request", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResource" + } + } + } + }, + "403": { + "description": "Forbidden", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ProblemDetails" + } + } + } + }, + "404": { + "description": "Not Found", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResource" + } + } + } + }, + "422": { + "description": "Unprocessable Content", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResource" + } + } + } + }, + "500": { + "description": "Internal Server Error" + } + } + } + }, + "/api/auth/logout": { + "post": { + "tags": [ + "Authentication" + ], + "parameters": [ + { + "name": "X-Device-Id", + "in": "header", + "schema": { + "type": "string" + } + }, + { + "name": "api-version", + "in": "query", + "schema": { + "type": "string" + } + } + ], + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/AuthLogoutResource" + } + }, + "text/json": { + "schema": { + "$ref": "#/components/schemas/AuthLogoutResource" + } + }, + "application/*+json": { + "schema": { + "$ref": "#/components/schemas/AuthLogoutResource" + } + } + } + }, + "responses": { + "400": { + "description": "Bad Request", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResource" + } + } + } + }, + "403": { + "description": "Forbidden", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ProblemDetails" + } + } + } + }, + "404": { + "description": "Not Found", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResource" + } + } + } + }, + "422": { + "description": "Unprocessable Content", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResource" + } + } + } + }, + "500": { + "description": "Internal Server Error" + } + } + } + }, + "/api/auth/reset-password/request": { + "post": { + "tags": [ + "Authentication" + ], + "parameters": [ + { + "name": "api-version", + "in": "query", + "schema": { + "type": "string" + } + } + ], + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/AuthResetPasswordRequestResource" + } + }, + "text/json": { + "schema": { + "$ref": "#/components/schemas/AuthResetPasswordRequestResource" + } + }, + "application/*+json": { + "schema": { + "$ref": "#/components/schemas/AuthResetPasswordRequestResource" + } + } + } + }, + "responses": { + "400": { + "description": "Bad Request", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResource" + } + } + } + }, + "403": { + "description": "Forbidden", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ProblemDetails" + } + } + } + }, + "404": { + "description": "Not Found", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResource" + } + } + } + }, + "422": { + "description": "Unprocessable Content", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResource" + } + } + } + }, + "500": { + "description": "Internal Server Error" + }, + "204": { + "description": "No Content" + } + } + } + }, + "/api/auth/reset-password": { + "post": { + "tags": [ + "Authentication" + ], + "parameters": [ + { + "name": "api-version", + "in": "query", + "schema": { + "type": "string" + } + } + ], + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/AuthResetPasswordResource" + } + }, + "text/json": { + "schema": { + "$ref": "#/components/schemas/AuthResetPasswordResource" + } + }, + "application/*+json": { + "schema": { + "$ref": "#/components/schemas/AuthResetPasswordResource" + } + } + } + }, + "responses": { + "400": { + "description": "Bad Request", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResource" + } + } + } + }, + "403": { + "description": "Forbidden", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ProblemDetails" + } + } + } + }, + "404": { + "description": "Not Found", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResource" + } + } + } + }, + "422": { + "description": "Unprocessable Content", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResource" + } + } + } + }, + "500": { + "description": "Internal Server Error" + }, + "204": { + "description": "No Content" + } + } + } + }, + "/api/breed/{breedId}": { + "get": { + "tags": [ + "Breed" + ], + "parameters": [ + { + "name": "breedId", + "in": "path", + "required": true, + "schema": { + "type": "integer", + "format": "int32" + } + }, + { + "name": "api-version", + "in": "query", + "schema": { + "type": "string" + } + } + ], + "responses": { + "400": { + "description": "Bad Request", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResource" + } + } + } + }, + "403": { + "description": "Forbidden", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ProblemDetails" + } + } + } + }, + "404": { + "description": "Not Found", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResource" + } + } + } + }, + "422": { + "description": "Unprocessable Content", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResource" + } + } + } + }, + "500": { + "description": "Internal Server Error" + }, + "200": { + "description": "OK", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/BreedResourceDataResponse" + } + } + } + } + } + } + }, + "/api/breed": { + "get": { + "tags": [ + "Breed" + ], + "parameters": [ + { + "name": "SpeciesId", + "in": "query", + "schema": { + "type": "integer", + "format": "int32", + "nullable": true + } + }, + { + "name": "Lang", + "in": "query", + "schema": { + "type": "string", + "nullable": true + } + }, + { + "name": "Page", + "in": "query", + "schema": { + "type": "integer", + "format": "int32" + } + }, + { + "name": "ItemsPerPage", + "in": "query", + "schema": { + "type": "integer", + "format": "int32" + } + }, + { + "name": "PageSize", + "in": "query", + "schema": { + "type": "integer", + "format": "int32" + } + }, + { + "name": "api-version", + "in": "query", + "schema": { + "type": "string" + } + } + ], + "responses": { + "400": { + "description": "Bad Request", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResource" + } + } + } + }, + "403": { + "description": "Forbidden", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ProblemDetails" + } + } + } + }, + "404": { + "description": "Not Found", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResource" + } + } + } + }, + "422": { + "description": "Unprocessable Content", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResource" + } + } + } + }, + "500": { + "description": "Internal Server Error" + }, + "200": { + "description": "OK", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/BreedResourcePaginatedDataResult" + } + } + } + } + } + } + }, + "/api/condition/{conditionId}": { + "get": { + "tags": [ + "Condition" + ], + "parameters": [ + { + "name": "conditionId", + "in": "path", + "required": true, + "schema": { + "type": "integer", + "format": "int32" + } + }, + { + "name": "api-version", + "in": "query", + "schema": { + "type": "string" + } + } + ], + "responses": { + "400": { + "description": "Bad Request", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResource" + } + } + } + }, + "403": { + "description": "Forbidden", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ProblemDetails" + } + } + } + }, + "404": { + "description": "Not Found", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResource" + } + } + } + }, + "422": { + "description": "Unprocessable Content", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResource" + } + } + } + }, + "500": { + "description": "Internal Server Error" + }, + "200": { + "description": "OK", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ConditionResourceDataResponse" + } + } + } + } + } + } + }, + "/api/condition": { + "get": { + "tags": [ + "Condition" + ], + "parameters": [ + { + "name": "Lang", + "in": "query", + "schema": { + "type": "string", + "nullable": true + } + }, + { + "name": "Page", + "in": "query", + "schema": { + "type": "integer", + "format": "int32" + } + }, + { + "name": "ItemsPerPage", + "in": "query", + "schema": { + "type": "integer", + "format": "int32" + } + }, + { + "name": "PageSize", + "in": "query", + "schema": { + "type": "integer", + "format": "int32" + } + }, + { + "name": "api-version", + "in": "query", + "schema": { + "type": "string" + } + } + ], + "responses": { + "400": { + "description": "Bad Request", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResource" + } + } + } + }, + "403": { + "description": "Forbidden", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ProblemDetails" + } + } + } + }, + "404": { + "description": "Not Found", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResource" + } + } + } + }, + "422": { + "description": "Unprocessable Content", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResource" + } + } + } + }, + "500": { + "description": "Internal Server Error" + }, + "200": { + "description": "OK", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ConditionResourcePaginatedDataResult" + } + } + } + } + } + } + }, + "/api/country/{countryId}": { + "get": { + "tags": [ + "Country" + ], + "parameters": [ + { + "name": "countryId", + "in": "path", + "required": true, + "schema": { + "type": "integer", + "format": "int32" + } + }, + { + "name": "api-version", + "in": "query", + "schema": { + "type": "string" + } + } + ], + "responses": { + "400": { + "description": "Bad Request", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResource" + } + } + } + }, + "403": { + "description": "Forbidden", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ProblemDetails" + } + } + } + }, + "404": { + "description": "Not Found", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResource" + } + } + } + }, + "422": { + "description": "Unprocessable Content", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResource" + } + } + } + }, + "500": { + "description": "Internal Server Error" + }, + "200": { + "description": "OK", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/CountryResourceDataResponse" + } + } + } + } + } + } + }, + "/api/country": { + "get": { + "tags": [ + "Country" + ], + "parameters": [ + { + "name": "IsoCode2", + "in": "query", + "schema": { + "type": "string", + "nullable": true + } + }, + { + "name": "Lang", + "in": "query", + "schema": { + "type": "string", + "nullable": true + } + }, + { + "name": "Page", + "in": "query", + "schema": { + "type": "integer", + "format": "int32" + } + }, + { + "name": "ItemsPerPage", + "in": "query", + "schema": { + "type": "integer", + "format": "int32" + } + }, + { + "name": "PageSize", + "in": "query", + "schema": { + "type": "integer", + "format": "int32" + } + }, + { + "name": "api-version", + "in": "query", + "schema": { + "type": "string" + } + } + ], + "responses": { + "400": { + "description": "Bad Request", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResource" + } + } + } + }, + "403": { + "description": "Forbidden", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ProblemDetails" + } + } + } + }, + "404": { + "description": "Not Found", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResource" + } + } + } + }, + "422": { + "description": "Unprocessable Content", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResource" + } + } + } + }, + "500": { + "description": "Internal Server Error" + }, + "200": { + "description": "OK", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/CountryResourcePaginatedDataResult" + } + } + } + } + } + } + }, + "/api/device": { + "get": { + "tags": [ + "Device" + ], + "parameters": [ + { + "name": "XivelyDeviceId", + "in": "query", + "schema": { + "type": "string" + } + }, + { + "name": "MacAddress", + "in": "query", + "schema": { + "type": "string" + } + }, + { + "name": "SerialNumber", + "in": "query", + "schema": { + "type": "string" + } + }, + { + "name": "PublicSerialNumber", + "in": "query", + "schema": { + "type": "string" + } + }, + { + "name": "ProductId", + "in": "query", + "schema": { + "$ref": "#/components/schemas/DeviceType" + } + }, + { + "name": "ParentDeviceId", + "in": "query", + "schema": { + "type": "integer", + "format": "int32" + } + }, + { + "name": "Index", + "in": "query", + "schema": { + "type": "integer", + "format": "int32" + } + }, + { + "name": "HouseholdId", + "in": "query", + "schema": { + "type": "array", + "items": { + "type": "integer", + "format": "int32" + } + } + }, + { + "name": "Page", + "in": "query", + "schema": { + "type": "integer", + "format": "int32" + } + }, + { + "name": "ItemsPerPage", + "in": "query", + "schema": { + "type": "integer", + "format": "int32" + } + }, + { + "name": "PageSize", + "in": "query", + "schema": { + "type": "integer", + "format": "int32" + } + }, + { + "name": "api-version", + "in": "query", + "schema": { + "type": "string" + } + } + ], + "responses": { + "400": { + "description": "Bad Request", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResource" + } + } + } + }, + "403": { + "description": "Forbidden", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ProblemDetails" + } + } + } + }, + "404": { + "description": "Not Found", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResource" + } + } + } + }, + "422": { + "description": "Unprocessable Content", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResource" + } + } + } + }, + "500": { + "description": "Internal Server Error" + }, + "200": { + "description": "OK", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/DeviceResourcePaginatedDataResult" + } + } + } + } + } + } + }, + "/api/device/{deviceId}": { + "get": { + "tags": [ + "Device" + ], + "parameters": [ + { + "name": "deviceId", + "in": "path", + "required": true, + "schema": { + "type": "integer", + "format": "int32" + } + }, + { + "name": "api-version", + "in": "query", + "schema": { + "type": "string" + } + } + ], + "responses": { + "400": { + "description": "Bad Request", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResource" + } + } + } + }, + "403": { + "description": "Forbidden", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ProblemDetails" + } + } + } + }, + "404": { + "description": "Not Found", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResource" + } + } + } + }, + "422": { + "description": "Unprocessable Content", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResource" + } + } + } + }, + "500": { + "description": "Internal Server Error" + }, + "200": { + "description": "OK", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/DeviceResourceDataResponse" + } + } + } + } + } + }, + "put": { + "tags": [ + "Device" + ], + "parameters": [ + { + "name": "deviceId", + "in": "path", + "required": true, + "schema": { + "type": "integer", + "format": "int32" + } + }, + { + "name": "api-version", + "in": "query", + "schema": { + "type": "string" + } + } + ], + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/UpdateDeviceResource" + } + }, + "text/json": { + "schema": { + "$ref": "#/components/schemas/UpdateDeviceResource" + } + }, + "application/*+json": { + "schema": { + "$ref": "#/components/schemas/UpdateDeviceResource" + } + } + } + }, + "responses": { + "400": { + "description": "Bad Request", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResource" + } + } + } + }, + "403": { + "description": "Forbidden", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ProblemDetails" + } + } + } + }, + "404": { + "description": "Not Found", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResource" + } + } + } + }, + "422": { + "description": "Unprocessable Content", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResource" + } + } + } + }, + "500": { + "description": "Internal Server Error" + }, + "200": { + "description": "OK", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/DeviceResourceDataResponse" + } + } + } + } + } + }, + "delete": { + "tags": [ + "Device" + ], + "parameters": [ + { + "name": "deviceId", + "in": "path", + "required": true, + "schema": { + "type": "integer", + "format": "int32" + } + }, + { + "name": "api-version", + "in": "query", + "schema": { + "type": "string" + } + } + ], + "responses": { + "400": { + "description": "Bad Request", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResource" + } + } + } + }, + "403": { + "description": "Forbidden", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ProblemDetails" + } + } + } + }, + "404": { + "description": "Not Found", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResource" + } + } + } + }, + "422": { + "description": "Unprocessable Content", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResource" + } + } + } + }, + "500": { + "description": "Internal Server Error" + }, + "204": { + "description": "No Content" + } + } + } + }, + "/api/device/{deviceId}/control": { + "get": { + "tags": [ + "DeviceControl" + ], + "summary": "Will return the current state for a device and any inflight state changes", + "parameters": [ + { + "name": "deviceId", + "in": "path", + "description": "", + "required": true, + "schema": { + "type": "integer", + "format": "int32" + } + }, + { + "name": "api-version", + "in": "query", + "schema": { + "type": "string" + } + } + ], + "responses": { + "400": { + "description": "Bad Request", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResource" + } + } + } + }, + "403": { + "description": "Forbidden", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ProblemDetails" + } + } + } + }, + "404": { + "description": "Not Found", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResource" + } + } + } + }, + "422": { + "description": "Unprocessable Content", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResource" + } + } + } + }, + "500": { + "description": "Internal Server Error" + }, + "200": { + "description": "OK", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/DeviceControlResource" + } + } + } + } + } + }, + "put": { + "tags": [ + "DeviceControl" + ], + "summary": "Request a state change, connection will remain open until the device has acknowledged the state change. There is a one min timeout", + "parameters": [ + { + "name": "deviceId", + "in": "path", + "description": "", + "required": true, + "schema": { + "type": "integer", + "format": "int32" + } + }, + { + "name": "api-version", + "in": "query", + "schema": { + "type": "string" + } + } + ], + "responses": { + "400": { + "description": "Bad Request", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResource" + } + } + } + }, + "403": { + "description": "Forbidden", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ProblemDetails" + } + } + } + }, + "404": { + "description": "Not Found", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResource" + } + } + } + }, + "422": { + "description": "Unprocessable Content", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResource" + } + } + } + }, + "500": { + "description": "Internal Server Error" + }, + "200": { + "description": "OK", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/DeviceControlResource" + } + } + } + } + } + } + }, + "/api/device/{deviceId}/control/async": { + "put": { + "tags": [ + "DeviceControl" + ], + "summary": "Queue a state change, the returned request_id can then be tracked in api/device/{deviceId}/control/status", + "parameters": [ + { + "name": "deviceId", + "in": "path", + "description": "", + "required": true, + "schema": { + "type": "integer", + "format": "int32" + } + }, + { + "name": "api-version", + "in": "query", + "schema": { + "type": "string" + } + } + ], + "responses": { + "400": { + "description": "Bad Request", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResource" + } + } + } + }, + "403": { + "description": "Forbidden", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ProblemDetails" + } + } + } + }, + "404": { + "description": "Not Found", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResource" + } + } + } + }, + "422": { + "description": "Unprocessable Content", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResource" + } + } + } + }, + "500": { + "description": "Internal Server Error" + }, + "200": { + "description": "OK", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/DeviceControlResource" + } + } + } + } + } + } + }, + "/api/device/{deviceId}/control/status": { + "get": { + "tags": [ + "DeviceControlStatus" + ], + "parameters": [ + { + "name": "deviceId", + "in": "path", + "required": true, + "schema": { + "type": "integer", + "format": "int32" + } + }, + { + "name": "Status", + "in": "query", + "schema": { + "type": "array", + "items": { + "$ref": "#/components/schemas/RequestChangeStateResponseStatus" + } + } + }, + { + "name": "api-version", + "in": "query", + "schema": { + "type": "string" + } + } + ], + "responses": { + "400": { + "description": "Bad Request", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResource" + } + } + } + }, + "403": { + "description": "Forbidden", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ProblemDetails" + } + } + } + }, + "404": { + "description": "Not Found", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResource" + } + } + } + }, + "422": { + "description": "Unprocessable Content", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResource" + } + } + } + }, + "500": { + "description": "Internal Server Error" + }, + "200": { + "description": "OK", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/DeviceControlStateChangeResourceListDataResponse" + } + } + } + } + } + } + }, + "/api/household/{householdId}/device/control/status": { + "get": { + "tags": [ + "DeviceControlStatus" + ], + "parameters": [ + { + "name": "householdId", + "in": "path", + "required": true, + "schema": { + "type": "integer", + "format": "int32" + } + }, + { + "name": "Status", + "in": "query", + "schema": { + "type": "array", + "items": { + "$ref": "#/components/schemas/RequestChangeStateResponseStatus" + } + } + }, + { + "name": "api-version", + "in": "query", + "schema": { + "type": "string" + } + } + ], + "responses": { + "400": { + "description": "Bad Request", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResource" + } + } + } + }, + "403": { + "description": "Forbidden", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ProblemDetails" + } + } + } + }, + "404": { + "description": "Not Found", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResource" + } + } + } + }, + "422": { + "description": "Unprocessable Content", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResource" + } + } + } + }, + "500": { + "description": "Internal Server Error" + }, + "200": { + "description": "OK", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/DeviceControlStateChangeResourceListDataResponse" + } + } + } + } + } + } + }, + "/api/device/{deviceId}/control/status/{requestId}": { + "get": { + "tags": [ + "DeviceControlStatus" + ], + "parameters": [ + { + "name": "deviceId", + "in": "path", + "required": true, + "schema": { + "type": "integer", + "format": "int32" + } + }, + { + "name": "requestId", + "in": "path", + "required": true, + "schema": { + "type": "string", + "format": "uuid" + } + }, + { + "name": "api-version", + "in": "query", + "schema": { + "type": "string" + } + } + ], + "responses": { + "400": { + "description": "Bad Request", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResource" + } + } + } + }, + "403": { + "description": "Forbidden", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ProblemDetails" + } + } + } + }, + "404": { + "description": "Not Found", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResource" + } + } + } + }, + "422": { + "description": "Unprocessable Content", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResource" + } + } + } + }, + "500": { + "description": "Internal Server Error" + }, + "200": { + "description": "OK", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/DeviceControlStateChangeResourceDataResponse" + } + } + } + } + } + } + }, + "/api/device/needs-update": { + "get": { + "tags": [ + "DeviceNeedsUpdate" + ], + "parameters": [ + { + "name": "api-version", + "in": "query", + "schema": { + "type": "string" + } + } + ], + "responses": { + "400": { + "description": "Bad Request", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResource" + } + } + } + }, + "403": { + "description": "Forbidden", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ProblemDetails" + } + } + } + }, + "404": { + "description": "Not Found", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResource" + } + } + } + }, + "422": { + "description": "Unprocessable Content", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResource" + } + } + } + }, + "500": { + "description": "Internal Server Error" + }, + "200": { + "description": "OK", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/DeviceNeedsUpdateResourceDataResponse" + } + } + } + } + } + } + }, + "/api/device/pairing": { + "get": { + "tags": [ + "DevicePair" + ], + "parameters": [ + { + "name": "api-version", + "in": "query", + "schema": { + "type": "string" + } + } + ], + "responses": { + "400": { + "description": "Bad Request", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResource" + } + } + } + }, + "403": { + "description": "Forbidden", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ProblemDetails" + } + } + } + }, + "404": { + "description": "Not Found", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResource" + } + } + } + }, + "422": { + "description": "Unprocessable Content", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResource" + } + } + } + }, + "500": { + "description": "Internal Server Error" + }, + "200": { + "description": "OK", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/DeviceResourceIEnumerableDataResponse" + } + } + } + } + } + } + }, + "/api/device/{deviceId}/pair/{householdId}": { + "post": { + "tags": [ + "DevicePair" + ], + "parameters": [ + { + "name": "deviceId", + "in": "path", + "required": true, + "schema": { + "type": "integer", + "format": "int32" + } + }, + { + "name": "householdId", + "in": "path", + "required": true, + "schema": { + "type": "integer", + "format": "int32" + } + }, + { + "name": "api-version", + "in": "query", + "schema": { + "type": "string" + } + } + ], + "responses": { + "400": { + "description": "Bad Request", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResource" + } + } + } + }, + "403": { + "description": "Forbidden", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ProblemDetails" + } + } + } + }, + "404": { + "description": "Not Found", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResource" + } + } + } + }, + "422": { + "description": "Unprocessable Content", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResource" + } + } + } + }, + "500": { + "description": "Internal Server Error" + }, + "200": { + "description": "OK" + } + } + } + }, + "/api/device/pair/{householdId}": { + "post": { + "tags": [ + "DevicePair" + ], + "parameters": [ + { + "name": "householdId", + "in": "path", + "required": true, + "schema": { + "type": "integer", + "format": "int32" + } + }, + { + "name": "api-version", + "in": "query", + "schema": { + "type": "string" + } + } + ], + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/DevicePairByCodeResource" + } + }, + "text/json": { + "schema": { + "$ref": "#/components/schemas/DevicePairByCodeResource" + } + }, + "application/*+json": { + "schema": { + "$ref": "#/components/schemas/DevicePairByCodeResource" + } + } + } + }, + "responses": { + "400": { + "description": "Bad Request", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResource" + } + } + } + }, + "403": { + "description": "Forbidden", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ProblemDetails" + } + } + } + }, + "404": { + "description": "Not Found", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResource" + } + } + } + }, + "422": { + "description": "Unprocessable Content", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResource" + } + } + } + }, + "500": { + "description": "Internal Server Error" + }, + "200": { + "description": "OK", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/DeviceResourceDataResponse" + } + } + } + } + } + } + }, + "/api/device/{deviceId}/readiness": { + "get": { + "tags": [ + "DeviceReadiness" + ], + "parameters": [ + { + "name": "deviceId", + "in": "path", + "required": true, + "schema": { + "type": "integer", + "format": "int32" + } + }, + { + "name": "api-version", + "in": "query", + "schema": { + "type": "string" + } + } + ], + "responses": { + "400": { + "description": "Bad Request", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResource" + } + } + } + }, + "403": { + "description": "Forbidden", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ProblemDetails" + } + } + } + }, + "404": { + "description": "Not Found", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResource" + } + } + } + }, + "422": { + "description": "Unprocessable Content", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResource" + } + } + } + }, + "500": { + "description": "Internal Server Error" + }, + "200": { + "description": "OK", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/DeviceReadinessResourceDataResponse" + } + } + } + } + } + } + }, + "/api/device/{deviceId}/status": { + "get": { + "tags": [ + "DeviceStatus" + ], + "parameters": [ + { + "name": "deviceId", + "in": "path", + "required": true, + "schema": { + "type": "integer", + "format": "int32" + } + }, + { + "name": "api-version", + "in": "query", + "schema": { + "type": "string" + } + } + ], + "responses": { + "400": { + "description": "Bad Request", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResource" + } + } + } + }, + "403": { + "description": "Forbidden", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ProblemDetails" + } + } + } + }, + "404": { + "description": "Not Found", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResource" + } + } + } + }, + "422": { + "description": "Unprocessable Content", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResource" + } + } + } + }, + "500": { + "description": "Internal Server Error" + }, + "200": { + "description": "OK", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ObjectDataResponse" + } + } + } + } + } + } + }, + "/api/device/{deviceId}/tag": { + "get": { + "tags": [ + "DeviceTag" + ], + "parameters": [ + { + "name": "deviceId", + "in": "path", + "required": true, + "schema": { + "type": "integer", + "format": "int32" + } + }, + { + "name": "Index", + "in": "query", + "schema": { + "type": "integer", + "format": "int32" + } + }, + { + "name": "Page", + "in": "query", + "schema": { + "type": "integer", + "format": "int32" + } + }, + { + "name": "ItemsPerPage", + "in": "query", + "schema": { + "type": "integer", + "format": "int32" + } + }, + { + "name": "PageSize", + "in": "query", + "schema": { + "type": "integer", + "format": "int32" + } + }, + { + "name": "api-version", + "in": "query", + "schema": { + "type": "string" + } + } + ], + "responses": { + "400": { + "description": "Bad Request", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResource" + } + } + } + }, + "403": { + "description": "Forbidden", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ProblemDetails" + } + } + } + }, + "404": { + "description": "Not Found", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResource" + } + } + } + }, + "422": { + "description": "Unprocessable Content", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResource" + } + } + } + }, + "500": { + "description": "Internal Server Error" + }, + "200": { + "description": "OK", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/DeviceTagResourcePaginatedDataResult" + } + } + } + } + } + } + }, + "/api/device/{deviceId}/tag/{tagId}": { + "get": { + "tags": [ + "DeviceTag" + ], + "parameters": [ + { + "name": "deviceId", + "in": "path", + "required": true, + "schema": { + "type": "integer", + "format": "int32" + } + }, + { + "name": "tagId", + "in": "path", + "required": true, + "schema": { + "type": "integer", + "format": "int32" + } + }, + { + "name": "api-version", + "in": "query", + "schema": { + "type": "string" + } + } + ], + "responses": { + "400": { + "description": "Bad Request", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResource" + } + } + } + }, + "403": { + "description": "Forbidden", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ProblemDetails" + } + } + } + }, + "404": { + "description": "Not Found", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResource" + } + } + } + }, + "422": { + "description": "Unprocessable Content", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResource" + } + } + } + }, + "500": { + "description": "Internal Server Error" + }, + "200": { + "description": "OK", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/DeviceTagResourceDataResponse" + } + } + } + } + } + }, + "put": { + "tags": [ + "DeviceTag" + ], + "summary": "Request device tage update, connection will remain open until the device has acknowledged the state change. There is a one min timeout", + "parameters": [ + { + "name": "deviceId", + "in": "path", + "description": "", + "required": true, + "schema": { + "type": "integer", + "format": "int32" + } + }, + { + "name": "tagId", + "in": "path", + "description": "", + "required": true, + "schema": { + "type": "integer", + "format": "int32" + } + }, + { + "name": "api-version", + "in": "query", + "schema": { + "type": "string" + } + } + ], + "requestBody": { + "description": "", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/UpdateDeviceTagResource" + } + }, + "text/json": { + "schema": { + "$ref": "#/components/schemas/UpdateDeviceTagResource" + } + }, + "application/*+json": { + "schema": { + "$ref": "#/components/schemas/UpdateDeviceTagResource" + } + } + } + }, + "responses": { + "400": { + "description": "Bad Request", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResource" + } + } + } + }, + "403": { + "description": "Forbidden", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ProblemDetails" + } + } + } + }, + "404": { + "description": "Not Found", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResource" + } + } + } + }, + "422": { + "description": "Unprocessable Content", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResource" + } + } + } + }, + "500": { + "description": "Internal Server Error" + }, + "200": { + "description": "OK", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/DeviceTagDataResource" + } + } + } + } + } + }, + "delete": { + "tags": [ + "DeviceTag" + ], + "summary": "Request device tage deletion, connection will remain open until the device has acknowledged the state change. There is a one min timeout", + "parameters": [ + { + "name": "deviceId", + "in": "path", + "description": "", + "required": true, + "schema": { + "type": "integer", + "format": "int32" + } + }, + { + "name": "tagId", + "in": "path", + "description": "", + "required": true, + "schema": { + "type": "integer", + "format": "int32" + } + }, + { + "name": "api-version", + "in": "query", + "schema": { + "type": "string" + } + } + ], + "responses": { + "400": { + "description": "Bad Request", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResource" + } + } + } + }, + "403": { + "description": "Forbidden", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ProblemDetails" + } + } + } + }, + "404": { + "description": "Not Found", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResource" + } + } + } + }, + "422": { + "description": "Unprocessable Content", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResource" + } + } + } + }, + "500": { + "description": "Internal Server Error" + }, + "200": { + "description": "OK", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/DeviceTagDataResource" + } + } + } + } + } + } + }, + "/api/device/{deviceId}/tag/{tagId}/async": { + "put": { + "tags": [ + "DeviceTag" + ], + "summary": "Queue a device tage change, the returned request_id can then be tracked in api/device/{deviceId}/control/status", + "parameters": [ + { + "name": "deviceId", + "in": "path", + "description": "", + "required": true, + "schema": { + "type": "integer", + "format": "int32" + } + }, + { + "name": "tagId", + "in": "path", + "description": "", + "required": true, + "schema": { + "type": "integer", + "format": "int32" + } + }, + { + "name": "api-version", + "in": "query", + "schema": { + "type": "string" + } + } + ], + "requestBody": { + "description": "", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/UpdateDeviceTagResource" + } + }, + "text/json": { + "schema": { + "$ref": "#/components/schemas/UpdateDeviceTagResource" + } + }, + "application/*+json": { + "schema": { + "$ref": "#/components/schemas/UpdateDeviceTagResource" + } + } + } + }, + "responses": { + "400": { + "description": "Bad Request", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResource" + } + } + } + }, + "403": { + "description": "Forbidden", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ProblemDetails" + } + } + } + }, + "404": { + "description": "Not Found", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResource" + } + } + } + }, + "422": { + "description": "Unprocessable Content", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResource" + } + } + } + }, + "500": { + "description": "Internal Server Error" + }, + "200": { + "description": "OK", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/DeviceTagDataResource" + } + } + } + } + } + }, + "delete": { + "tags": [ + "DeviceTag" + ], + "summary": "Queue a device tage deletion, the returned request_id can then be tracked in api/device/{deviceId}/control/status", + "parameters": [ + { + "name": "deviceId", + "in": "path", + "description": "", + "required": true, + "schema": { + "type": "integer", + "format": "int32" + } + }, + { + "name": "tagId", + "in": "path", + "description": "", + "required": true, + "schema": { + "type": "integer", + "format": "int32" + } + }, + { + "name": "api-version", + "in": "query", + "schema": { + "type": "string" + } + } + ], + "responses": { + "400": { + "description": "Bad Request", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResource" + } + } + } + }, + "403": { + "description": "Forbidden", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ProblemDetails" + } + } + } + }, + "404": { + "description": "Not Found", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResource" + } + } + } + }, + "422": { + "description": "Unprocessable Content", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResource" + } + } + } + }, + "500": { + "description": "Internal Server Error" + }, + "200": { + "description": "OK", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/DeviceTagDataResource" + } + } + } + } + } + } + }, + "/api/food-type": { + "get": { + "tags": [ + "FoodType" + ], + "parameters": [ + { + "name": "Lang", + "in": "query", + "schema": { + "type": "string", + "nullable": true + } + }, + { + "name": "Page", + "in": "query", + "schema": { + "type": "integer", + "format": "int32" + } + }, + { + "name": "ItemsPerPage", + "in": "query", + "schema": { + "type": "integer", + "format": "int32" + } + }, + { + "name": "PageSize", + "in": "query", + "schema": { + "type": "integer", + "format": "int32" + } + }, + { + "name": "api-version", + "in": "query", + "schema": { + "type": "string" + } + } + ], + "responses": { + "400": { + "description": "Bad Request", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResource" + } + } + } + }, + "403": { + "description": "Forbidden", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ProblemDetails" + } + } + } + }, + "404": { + "description": "Not Found", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResource" + } + } + } + }, + "422": { + "description": "Unprocessable Content", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResource" + } + } + } + }, + "500": { + "description": "Internal Server Error" + }, + "200": { + "description": "OK", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/FoodTypeResourcePaginatedDataResult" + } + } + } + } + } + } + }, + "/api/food-type/{foodTypeId}": { + "get": { + "tags": [ + "FoodType" + ], + "parameters": [ + { + "name": "foodTypeId", + "in": "path", + "required": true, + "schema": { + "type": "integer", + "format": "int32" + } + }, + { + "name": "api-version", + "in": "query", + "schema": { + "type": "string" + } + } + ], + "responses": { + "400": { + "description": "Bad Request", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResource" + } + } + } + }, + "403": { + "description": "Forbidden", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ProblemDetails" + } + } + } + }, + "404": { + "description": "Not Found", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResource" + } + } + } + }, + "422": { + "description": "Unprocessable Content", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResource" + } + } + } + }, + "500": { + "description": "Internal Server Error" + }, + "200": { + "description": "OK", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/FoodTypeResourceDataResponse" + } + } + } + } + } + } + }, + "/api/household": { + "get": { + "tags": [ + "Household" + ], + "parameters": [ + { + "name": "Page", + "in": "query", + "schema": { + "type": "integer", + "format": "int32" + } + }, + { + "name": "ItemsPerPage", + "in": "query", + "schema": { + "type": "integer", + "format": "int32" + } + }, + { + "name": "PageSize", + "in": "query", + "schema": { + "type": "integer", + "format": "int32" + } + }, + { + "name": "api-version", + "in": "query", + "schema": { + "type": "string" + } + } + ], + "responses": { + "400": { + "description": "Bad Request", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResource" + } + } + } + }, + "403": { + "description": "Forbidden", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ProblemDetails" + } + } + } + }, + "404": { + "description": "Not Found", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResource" + } + } + } + }, + "422": { + "description": "Unprocessable Content", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResource" + } + } + } + }, + "500": { + "description": "Internal Server Error" + }, + "200": { + "description": "OK", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/HouseholdResourcePaginatedDataResult" + } + } + } + } + } + }, + "post": { + "tags": [ + "Household" + ], + "parameters": [ + { + "name": "api-version", + "in": "query", + "schema": { + "type": "string" + } + } + ], + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/CreateHouseholdResource" + } + }, + "text/json": { + "schema": { + "$ref": "#/components/schemas/CreateHouseholdResource" + } + }, + "application/*+json": { + "schema": { + "$ref": "#/components/schemas/CreateHouseholdResource" + } + } + } + }, + "responses": { + "400": { + "description": "Bad Request", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResource" + } + } + } + }, + "403": { + "description": "Forbidden", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ProblemDetails" + } + } + } + }, + "404": { + "description": "Not Found", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResource" + } + } + } + }, + "422": { + "description": "Unprocessable Content", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResource" + } + } + } + }, + "500": { + "description": "Internal Server Error" + }, + "201": { + "description": "Created", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/HouseholdResourceDataResponse" + } + } + } + } + } + } + }, + "/api/household/{householdId}": { + "get": { + "tags": [ + "Household" + ], + "parameters": [ + { + "name": "householdId", + "in": "path", + "required": true, + "schema": { + "type": "integer", + "format": "int32" + } + }, + { + "name": "api-version", + "in": "query", + "schema": { + "type": "string" + } + } + ], + "responses": { + "400": { + "description": "Bad Request", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResource" + } + } + } + }, + "403": { + "description": "Forbidden", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ProblemDetails" + } + } + } + }, + "404": { + "description": "Not Found", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResource" + } + } + } + }, + "422": { + "description": "Unprocessable Content", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResource" + } + } + } + }, + "500": { + "description": "Internal Server Error" + }, + "200": { + "description": "OK", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/HouseholdResourceDataResponse" + } + } + } + } + } + }, + "put": { + "tags": [ + "Household" + ], + "parameters": [ + { + "name": "householdId", + "in": "path", + "required": true, + "schema": { + "type": "integer", + "format": "int32" + } + }, + { + "name": "api-version", + "in": "query", + "schema": { + "type": "string" + } + } + ], + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/UpdateHouseholdResource" + } + }, + "text/json": { + "schema": { + "$ref": "#/components/schemas/UpdateHouseholdResource" + } + }, + "application/*+json": { + "schema": { + "$ref": "#/components/schemas/UpdateHouseholdResource" + } + } + } + }, + "responses": { + "400": { + "description": "Bad Request", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResource" + } + } + } + }, + "403": { + "description": "Forbidden", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ProblemDetails" + } + } + } + }, + "404": { + "description": "Not Found", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResource" + } + } + } + }, + "422": { + "description": "Unprocessable Content", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResource" + } + } + } + }, + "500": { + "description": "Internal Server Error" + }, + "200": { + "description": "OK", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/HouseholdResourceDataResponse" + } + } + } + } + } + }, + "delete": { + "tags": [ + "Household" + ], + "parameters": [ + { + "name": "householdId", + "in": "path", + "required": true, + "schema": { + "type": "integer", + "format": "int32" + } + }, + { + "name": "api-version", + "in": "query", + "schema": { + "type": "string" + } + } + ], + "responses": { + "400": { + "description": "Bad Request", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResource" + } + } + } + }, + "403": { + "description": "Forbidden", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ProblemDetails" + } + } + } + }, + "404": { + "description": "Not Found", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResource" + } + } + } + }, + "422": { + "description": "Unprocessable Content", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResource" + } + } + } + }, + "500": { + "description": "Internal Server Error" + }, + "204": { + "description": "No Content" + } + } + } + }, + "/api/household/{householdId}/device": { + "get": { + "tags": [ + "HouseholdDevice" + ], + "parameters": [ + { + "name": "householdId", + "in": "path", + "required": true, + "schema": { + "type": "integer", + "format": "int32" + } + }, + { + "name": "Page", + "in": "query", + "schema": { + "type": "integer", + "format": "int32" + } + }, + { + "name": "ItemsPerPage", + "in": "query", + "schema": { + "type": "integer", + "format": "int32" + } + }, + { + "name": "PageSize", + "in": "query", + "schema": { + "type": "integer", + "format": "int32" + } + }, + { + "name": "api-version", + "in": "query", + "schema": { + "type": "string" + } + } + ], + "responses": { + "400": { + "description": "Bad Request", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResource" + } + } + } + }, + "403": { + "description": "Forbidden", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ProblemDetails" + } + } + } + }, + "404": { + "description": "Not Found", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResource" + } + } + } + }, + "422": { + "description": "Unprocessable Content", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResource" + } + } + } + }, + "500": { + "description": "Internal Server Error" + }, + "200": { + "description": "OK", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/DeviceResourcePaginatedDataResult" + } + } + } + } + } + } + }, + "/api/household/{householdId}/device/{deviceId}": { + "get": { + "tags": [ + "HouseholdDevice" + ], + "parameters": [ + { + "name": "householdId", + "in": "path", + "required": true, + "schema": { + "type": "integer", + "format": "int32" + } + }, + { + "name": "deviceId", + "in": "path", + "required": true, + "schema": { + "type": "integer", + "format": "int32" + } + }, + { + "name": "api-version", + "in": "query", + "schema": { + "type": "string" + } + } + ], + "responses": { + "400": { + "description": "Bad Request", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResource" + } + } + } + }, + "403": { + "description": "Forbidden", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ProblemDetails" + } + } + } + }, + "404": { + "description": "Not Found", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResource" + } + } + } + }, + "422": { + "description": "Unprocessable Content", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResource" + } + } + } + }, + "500": { + "description": "Internal Server Error" + }, + "200": { + "description": "OK", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/DeviceResourceDataResponse" + } + } + } + } + } + } + }, + "/api/household/{householdId}/invite": { + "get": { + "tags": [ + "HouseholdInvite" + ], + "parameters": [ + { + "name": "householdId", + "in": "path", + "required": true, + "schema": { + "type": "integer", + "format": "int32" + } + }, + { + "name": "Page", + "in": "query", + "schema": { + "type": "integer", + "format": "int32" + } + }, + { + "name": "ItemsPerPage", + "in": "query", + "schema": { + "type": "integer", + "format": "int32" + } + }, + { + "name": "PageSize", + "in": "query", + "schema": { + "type": "integer", + "format": "int32" + } + }, + { + "name": "api-version", + "in": "query", + "schema": { + "type": "string" + } + } + ], + "responses": { + "400": { + "description": "Bad Request", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResource" + } + } + } + }, + "403": { + "description": "Forbidden", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ProblemDetails" + } + } + } + }, + "404": { + "description": "Not Found", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResource" + } + } + } + }, + "422": { + "description": "Unprocessable Content", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResource" + } + } + } + }, + "500": { + "description": "Internal Server Error" + }, + "200": { + "description": "OK", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/HouseholdInviteResourcePaginatedDataResult" + } + } + } + } + } + }, + "post": { + "tags": [ + "HouseholdInvite" + ], + "parameters": [ + { + "name": "householdId", + "in": "path", + "required": true, + "schema": { + "type": "integer", + "format": "int32" + } + }, + { + "name": "api-version", + "in": "query", + "schema": { + "type": "string" + } + } + ], + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/CreateHouseholdInviteResource" + } + }, + "text/json": { + "schema": { + "$ref": "#/components/schemas/CreateHouseholdInviteResource" + } + }, + "application/*+json": { + "schema": { + "$ref": "#/components/schemas/CreateHouseholdInviteResource" + } + } + } + }, + "responses": { + "400": { + "description": "Bad Request", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResource" + } + } + } + }, + "403": { + "description": "Forbidden", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ProblemDetails" + } + } + } + }, + "404": { + "description": "Not Found", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResource" + } + } + } + }, + "422": { + "description": "Unprocessable Content", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResource" + } + } + } + }, + "500": { + "description": "Internal Server Error" + }, + "201": { + "description": "Created", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/HouseholdResourceDataResponse" + } + } + } + } + } + } + }, + "/api/household/{householdId}/invite/{inviteId}": { + "get": { + "tags": [ + "HouseholdInvite" + ], + "parameters": [ + { + "name": "householdId", + "in": "path", + "required": true, + "schema": { + "type": "integer", + "format": "int32" + } + }, + { + "name": "inviteId", + "in": "path", + "required": true, + "schema": { + "type": "integer", + "format": "int32" + } + }, + { + "name": "api-version", + "in": "query", + "schema": { + "type": "string" + } + } + ], + "responses": { + "400": { + "description": "Bad Request", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResource" + } + } + } + }, + "403": { + "description": "Forbidden", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ProblemDetails" + } + } + } + }, + "404": { + "description": "Not Found", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResource" + } + } + } + }, + "422": { + "description": "Unprocessable Content", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResource" + } + } + } + }, + "500": { + "description": "Internal Server Error" + }, + "200": { + "description": "OK", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/HouseholdInviteResourceDataResponse" + } + } + } + } + } + }, + "put": { + "tags": [ + "HouseholdInvite" + ], + "parameters": [ + { + "name": "householdId", + "in": "path", + "required": true, + "schema": { + "type": "integer", + "format": "int32" + } + }, + { + "name": "inviteId", + "in": "path", + "required": true, + "schema": { + "type": "integer", + "format": "int32" + } + }, + { + "name": "api-version", + "in": "query", + "schema": { + "type": "string" + } + } + ], + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/UpdateHouseholdInviteResource" + } + }, + "text/json": { + "schema": { + "$ref": "#/components/schemas/UpdateHouseholdInviteResource" + } + }, + "application/*+json": { + "schema": { + "$ref": "#/components/schemas/UpdateHouseholdInviteResource" + } + } + } + }, + "responses": { + "400": { + "description": "Bad Request", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResource" + } + } + } + }, + "403": { + "description": "Forbidden", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ProblemDetails" + } + } + } + }, + "404": { + "description": "Not Found", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResource" + } + } + } + }, + "422": { + "description": "Unprocessable Content", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResource" + } + } + } + }, + "500": { + "description": "Internal Server Error" + }, + "200": { + "description": "OK", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/HouseholdInviteResourceDataResponse" + } + } + } + } + } + }, + "delete": { + "tags": [ + "HouseholdInvite" + ], + "parameters": [ + { + "name": "householdId", + "in": "path", + "required": true, + "schema": { + "type": "integer", + "format": "int32" + } + }, + { + "name": "inviteId", + "in": "path", + "required": true, + "schema": { + "type": "integer", + "format": "int32" + } + }, + { + "name": "api-version", + "in": "query", + "schema": { + "type": "string" + } + } + ], + "responses": { + "400": { + "description": "Bad Request", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResource" + } + } + } + }, + "403": { + "description": "Forbidden", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ProblemDetails" + } + } + } + }, + "404": { + "description": "Not Found", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResource" + } + } + } + }, + "422": { + "description": "Unprocessable Content", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResource" + } + } + } + }, + "500": { + "description": "Internal Server Error" + }, + "204": { + "description": "No Content" + } + } + } + }, + "/api/household/{householdId}/invite/{inviteId}/resend": { + "post": { + "tags": [ + "HouseholdInvite" + ], + "parameters": [ + { + "name": "householdId", + "in": "path", + "required": true, + "schema": { + "type": "integer", + "format": "int32" + } + }, + { + "name": "inviteId", + "in": "path", + "required": true, + "schema": { + "type": "integer", + "format": "int32" + } + }, + { + "name": "api-version", + "in": "query", + "schema": { + "type": "string" + } + } + ], + "responses": { + "400": { + "description": "Bad Request", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResource" + } + } + } + }, + "403": { + "description": "Forbidden", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ProblemDetails" + } + } + } + }, + "404": { + "description": "Not Found", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResource" + } + } + } + }, + "422": { + "description": "Unprocessable Content", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResource" + } + } + } + }, + "500": { + "description": "Internal Server Error" + }, + "200": { + "description": "OK", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/HouseholdInviteResourceDataResponse" + } + } + } + } + } + } + }, + "/api/household/{householdId}/pet": { + "get": { + "tags": [ + "HouseholdPet" + ], + "parameters": [ + { + "name": "householdId", + "in": "path", + "required": true, + "schema": { + "type": "integer", + "format": "int32" + } + }, + { + "name": "Page", + "in": "query", + "schema": { + "type": "integer", + "format": "int32" + } + }, + { + "name": "ItemsPerPage", + "in": "query", + "schema": { + "type": "integer", + "format": "int32" + } + }, + { + "name": "PageSize", + "in": "query", + "schema": { + "type": "integer", + "format": "int32" + } + }, + { + "name": "api-version", + "in": "query", + "schema": { + "type": "string" + } + } + ], + "responses": { + "400": { + "description": "Bad Request", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResource" + } + } + } + }, + "403": { + "description": "Forbidden", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ProblemDetails" + } + } + } + }, + "404": { + "description": "Not Found", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResource" + } + } + } + }, + "422": { + "description": "Unprocessable Content", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResource" + } + } + } + }, + "500": { + "description": "Internal Server Error" + }, + "200": { + "description": "OK", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/PetResourcePaginatedDataResult" + } + } + } + } + } + } + }, + "/api/household/{householdId}/pet/{petId}": { + "get": { + "tags": [ + "HouseholdPet" + ], + "parameters": [ + { + "name": "householdId", + "in": "path", + "required": true, + "schema": { + "type": "integer", + "format": "int32" + } + }, + { + "name": "petId", + "in": "path", + "required": true, + "schema": { + "type": "integer", + "format": "int32" + } + }, + { + "name": "api-version", + "in": "query", + "schema": { + "type": "string" + } + } + ], + "responses": { + "400": { + "description": "Bad Request", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResource" + } + } + } + }, + "403": { + "description": "Forbidden", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ProblemDetails" + } + } + } + }, + "404": { + "description": "Not Found", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResource" + } + } + } + }, + "422": { + "description": "Unprocessable Content", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResource" + } + } + } + }, + "500": { + "description": "Internal Server Error" + }, + "200": { + "description": "OK", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/PetResourceDataResponse" + } + } + } + } + } + } + }, + "/api/household/{householdId}/user": { + "get": { + "tags": [ + "HouseholdUser" + ], + "parameters": [ + { + "name": "householdId", + "in": "path", + "required": true, + "schema": { + "type": "integer", + "format": "int32" + } + }, + { + "name": "Page", + "in": "query", + "schema": { + "type": "integer", + "format": "int32" + } + }, + { + "name": "ItemsPerPage", + "in": "query", + "schema": { + "type": "integer", + "format": "int32" + } + }, + { + "name": "PageSize", + "in": "query", + "schema": { + "type": "integer", + "format": "int32" + } + }, + { + "name": "api-version", + "in": "query", + "schema": { + "type": "string" + } + } + ], + "responses": { + "400": { + "description": "Bad Request", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResource" + } + } + } + }, + "403": { + "description": "Forbidden", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ProblemDetails" + } + } + } + }, + "404": { + "description": "Not Found", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResource" + } + } + } + }, + "422": { + "description": "Unprocessable Content", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResource" + } + } + } + }, + "500": { + "description": "Internal Server Error" + }, + "200": { + "description": "OK", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/HouseholdUserResourcePaginatedDataResult" + } + } + } + } + } + } + }, + "/api/household/{householdId}/user/{userId}": { + "get": { + "tags": [ + "HouseholdUser" + ], + "parameters": [ + { + "name": "householdId", + "in": "path", + "required": true, + "schema": { + "type": "integer", + "format": "int32" + } + }, + { + "name": "userId", + "in": "path", + "required": true, + "schema": { + "type": "integer", + "format": "int32" + } + }, + { + "name": "api-version", + "in": "query", + "schema": { + "type": "string" + } + } + ], + "responses": { + "400": { + "description": "Bad Request", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResource" + } + } + } + }, + "403": { + "description": "Forbidden", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ProblemDetails" + } + } + } + }, + "404": { + "description": "Not Found", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResource" + } + } + } + }, + "422": { + "description": "Unprocessable Content", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResource" + } + } + } + }, + "500": { + "description": "Internal Server Error" + }, + "200": { + "description": "OK", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/HouseholdUserResourceDataResponse" + } + } + } + } + } + }, + "put": { + "tags": [ + "HouseholdUser" + ], + "parameters": [ + { + "name": "householdId", + "in": "path", + "required": true, + "schema": { + "type": "integer", + "format": "int32" + } + }, + { + "name": "userId", + "in": "path", + "required": true, + "schema": { + "type": "integer", + "format": "int32" + } + }, + { + "name": "api-version", + "in": "query", + "schema": { + "type": "string" + } + } + ], + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/UpdateHouseholdUserResource" + } + }, + "text/json": { + "schema": { + "$ref": "#/components/schemas/UpdateHouseholdUserResource" + } + }, + "application/*+json": { + "schema": { + "$ref": "#/components/schemas/UpdateHouseholdUserResource" + } + } + } + }, + "responses": { + "400": { + "description": "Bad Request", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResource" + } + } + } + }, + "403": { + "description": "Forbidden", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ProblemDetails" + } + } + } + }, + "404": { + "description": "Not Found", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResource" + } + } + } + }, + "422": { + "description": "Unprocessable Content", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResource" + } + } + } + }, + "500": { + "description": "Internal Server Error" + }, + "200": { + "description": "OK", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/HouseholdUserResourceDataResponse" + } + } + } + } + } + }, + "delete": { + "tags": [ + "HouseholdUser" + ], + "parameters": [ + { + "name": "householdId", + "in": "path", + "required": true, + "schema": { + "type": "integer", + "format": "int32" + } + }, + { + "name": "userId", + "in": "path", + "required": true, + "schema": { + "type": "integer", + "format": "int32" + } + }, + { + "name": "api-version", + "in": "query", + "schema": { + "type": "string" + } + } + ], + "responses": { + "400": { + "description": "Bad Request", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResource" + } + } + } + }, + "403": { + "description": "Forbidden", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ProblemDetails" + } + } + } + }, + "404": { + "description": "Not Found", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResource" + } + } + } + }, + "422": { + "description": "Unprocessable Content", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResource" + } + } + } + }, + "500": { + "description": "Internal Server Error" + }, + "204": { + "description": "No Content" + } + } + } + }, + "/api/photo/{photoId}/image/{imageHash}": { + "get": { + "tags": [ + "Image" + ], + "parameters": [ + { + "name": "photoId", + "in": "path", + "required": true, + "schema": { + "type": "integer", + "format": "int32" + } + }, + { + "name": "imageHash", + "in": "path", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "api-version", + "in": "query", + "schema": { + "type": "string" + } + } + ], + "responses": { + "400": { + "description": "Bad Request", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResource" + } + } + } + }, + "403": { + "description": "Forbidden", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ProblemDetails" + } + } + } + }, + "404": { + "description": "Not Found", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResource" + } + } + } + }, + "422": { + "description": "Unprocessable Content", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResource" + } + } + } + }, + "500": { + "description": "Internal Server Error" + }, + "200": { + "description": "OK" + } + } + } + }, + "/api/info": { + "get": { + "tags": [ + "Info" + ], + "parameters": [ + { + "name": "api-version", + "in": "query", + "schema": { + "type": "string" + } + } + ], + "responses": { + "400": { + "description": "Bad Request", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResource" + } + } + } + }, + "403": { + "description": "Forbidden", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ProblemDetails" + } + } + } + }, + "404": { + "description": "Not Found", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResource" + } + } + } + }, + "422": { + "description": "Unprocessable Content", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResource" + } + } + } + }, + "500": { + "description": "Internal Server Error" + }, + "200": { + "description": "OK", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/InfoResourceDataResponse" + } + } + } + } + } + } + }, + "/api/invite": { + "get": { + "tags": [ + "Invite" + ], + "parameters": [ + { + "name": "Page", + "in": "query", + "schema": { + "type": "integer", + "format": "int32" + } + }, + { + "name": "ItemsPerPage", + "in": "query", + "schema": { + "type": "integer", + "format": "int32" + } + }, + { + "name": "PageSize", + "in": "query", + "schema": { + "type": "integer", + "format": "int32" + } + }, + { + "name": "api-version", + "in": "query", + "schema": { + "type": "string" + } + } + ], + "responses": { + "400": { + "description": "Bad Request", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResource" + } + } + } + }, + "403": { + "description": "Forbidden", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ProblemDetails" + } + } + } + }, + "404": { + "description": "Not Found", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResource" + } + } + } + }, + "422": { + "description": "Unprocessable Content", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResource" + } + } + } + }, + "500": { + "description": "Internal Server Error" + }, + "200": { + "description": "OK", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/InviteResourcePaginatedDataResult" + } + } + } + } + } + } + }, + "/api/invite/{inviteId}": { + "get": { + "tags": [ + "Invite" + ], + "parameters": [ + { + "name": "inviteId", + "in": "path", + "required": true, + "schema": { + "type": "integer", + "format": "int32" + } + }, + { + "name": "api-version", + "in": "query", + "schema": { + "type": "string" + } + } + ], + "responses": { + "400": { + "description": "Bad Request", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResource" + } + } + } + }, + "403": { + "description": "Forbidden", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ProblemDetails" + } + } + } + }, + "404": { + "description": "Not Found", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResource" + } + } + } + }, + "422": { + "description": "Unprocessable Content", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResource" + } + } + } + }, + "500": { + "description": "Internal Server Error" + }, + "200": { + "description": "OK", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/InviteResourceDataResponse" + } + } + } + } + } + } + }, + "/api/invite/{inviteCode}/accept": { + "post": { + "tags": [ + "Invite" + ], + "parameters": [ + { + "name": "inviteCode", + "in": "path", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "api-version", + "in": "query", + "schema": { + "type": "string" + } + } + ], + "responses": { + "400": { + "description": "Bad Request", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResource" + } + } + } + }, + "403": { + "description": "Forbidden", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ProblemDetails" + } + } + } + }, + "404": { + "description": "Not Found", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResource" + } + } + } + }, + "422": { + "description": "Unprocessable Content", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResource" + } + } + } + }, + "500": { + "description": "Internal Server Error" + }, + "200": { + "description": "OK", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/InviteResourceDataResponse" + } + } + } + } + } + } + }, + "/api/invite/{inviteCode}/reject": { + "post": { + "tags": [ + "Invite" + ], + "parameters": [ + { + "name": "inviteCode", + "in": "path", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "api-version", + "in": "query", + "schema": { + "type": "string" + } + } + ], + "responses": { + "400": { + "description": "Bad Request", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResource" + } + } + } + }, + "403": { + "description": "Forbidden", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ProblemDetails" + } + } + } + }, + "404": { + "description": "Not Found", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResource" + } + } + } + }, + "422": { + "description": "Unprocessable Content", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResource" + } + } + } + }, + "500": { + "description": "Internal Server Error" + }, + "200": { + "description": "OK", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/InviteResourceDataResponse" + } + } + } + } + } + } + }, + "/api/language": { + "get": { + "tags": [ + "Language" + ], + "parameters": [ + { + "name": "IsoCode1", + "in": "query", + "schema": { + "type": "string" + } + }, + { + "name": "Enabled", + "in": "query", + "schema": { + "type": "boolean" + } + }, + { + "name": "Page", + "in": "query", + "schema": { + "type": "integer", + "format": "int32" + } + }, + { + "name": "ItemsPerPage", + "in": "query", + "schema": { + "type": "integer", + "format": "int32" + } + }, + { + "name": "PageSize", + "in": "query", + "schema": { + "type": "integer", + "format": "int32" + } + }, + { + "name": "api-version", + "in": "query", + "schema": { + "type": "string" + } + } + ], + "responses": { + "400": { + "description": "Bad Request", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResource" + } + } + } + }, + "403": { + "description": "Forbidden", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ProblemDetails" + } + } + } + }, + "404": { + "description": "Not Found", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResource" + } + } + } + }, + "422": { + "description": "Unprocessable Content", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResource" + } + } + } + }, + "500": { + "description": "Internal Server Error" + }, + "200": { + "description": "OK", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/LanguageResourcePaginatedDataResult" + } + } + } + } + } + } + }, + "/api/language/{languageId}": { + "get": { + "tags": [ + "Language" + ], + "parameters": [ + { + "name": "languageId", + "in": "path", + "required": true, + "schema": { + "type": "integer", + "format": "int32" + } + }, + { + "name": "api-version", + "in": "query", + "schema": { + "type": "string" + } + } + ], + "responses": { + "400": { + "description": "Bad Request", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResource" + } + } + } + }, + "403": { + "description": "Forbidden", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ProblemDetails" + } + } + } + }, + "404": { + "description": "Not Found", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResource" + } + } + } + }, + "422": { + "description": "Unprocessable Content", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResource" + } + } + } + }, + "500": { + "description": "Internal Server Error" + }, + "200": { + "description": "OK", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/LanguageResourceDataResponse" + } + } + } + } + } + } + }, + "/api/me": { + "get": { + "tags": [ + "Me" + ], + "parameters": [ + { + "name": "api-version", + "in": "query", + "schema": { + "type": "string" + } + } + ], + "responses": { + "400": { + "description": "Bad Request", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResource" + } + } + } + }, + "403": { + "description": "Forbidden", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ProblemDetails" + } + } + } + }, + "404": { + "description": "Not Found", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResource" + } + } + } + }, + "422": { + "description": "Unprocessable Content", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResource" + } + } + } + }, + "500": { + "description": "Internal Server Error" + }, + "200": { + "description": "OK", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/UserResourceDataResponse" + } + } + } + } + } + }, + "put": { + "tags": [ + "Me" + ], + "parameters": [ + { + "name": "api-version", + "in": "query", + "schema": { + "type": "string" + } + } + ], + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/UpdateMeResource" + } + }, + "text/json": { + "schema": { + "$ref": "#/components/schemas/UpdateMeResource" + } + }, + "application/*+json": { + "schema": { + "$ref": "#/components/schemas/UpdateMeResource" + } + } + } + }, + "responses": { + "400": { + "description": "Bad Request", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResource" + } + } + } + }, + "403": { + "description": "Forbidden", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ProblemDetails" + } + } + } + }, + "404": { + "description": "Not Found", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResource" + } + } + } + }, + "422": { + "description": "Unprocessable Content", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResource" + } + } + } + }, + "500": { + "description": "Internal Server Error" + }, + "200": { + "description": "OK", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/UserResourceDataResponse" + } + } + } + } + } + }, + "delete": { + "tags": [ + "Me" + ], + "parameters": [ + { + "name": "api-version", + "in": "query", + "schema": { + "type": "string" + } + } + ], + "responses": { + "400": { + "description": "Bad Request", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResource" + } + } + } + }, + "403": { + "description": "Forbidden", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ProblemDetails" + } + } + } + }, + "404": { + "description": "Not Found", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResource" + } + } + } + }, + "422": { + "description": "Unprocessable Content", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResource" + } + } + } + }, + "500": { + "description": "Internal Server Error" + }, + "204": { + "description": "No Content" + } + } + } + }, + "/api/me/accept-terms": { + "put": { + "tags": [ + "Me" + ], + "parameters": [ + { + "name": "api-version", + "in": "query", + "schema": { + "type": "string" + } + } + ], + "responses": { + "400": { + "description": "Bad Request", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResource" + } + } + } + }, + "403": { + "description": "Forbidden", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ProblemDetails" + } + } + } + }, + "404": { + "description": "Not Found", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResource" + } + } + } + }, + "422": { + "description": "Unprocessable Content", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResource" + } + } + } + }, + "500": { + "description": "Internal Server Error" + }, + "200": { + "description": "OK", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/UserResourceDataResponse" + } + } + } + } + } + } + }, + "/api/me/delete": { + "post": { + "tags": [ + "Me" + ], + "parameters": [ + { + "name": "api-version", + "in": "query", + "schema": { + "type": "string" + } + } + ], + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/DeleteAccountResource" + } + }, + "text/json": { + "schema": { + "$ref": "#/components/schemas/DeleteAccountResource" + } + }, + "application/*+json": { + "schema": { + "$ref": "#/components/schemas/DeleteAccountResource" + } + } + } + }, + "responses": { + "400": { + "description": "Bad Request", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResource" + } + } + } + }, + "403": { + "description": "Forbidden", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ProblemDetails" + } + } + } + }, + "404": { + "description": "Not Found", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResource" + } + } + } + }, + "422": { + "description": "Unprocessable Content", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResource" + } + } + } + }, + "500": { + "description": "Internal Server Error" + }, + "204": { + "description": "No Content" + } + } + } + }, + "/api/me/client": { + "get": { + "tags": [ + "MeClient" + ], + "parameters": [ + { + "name": "api-version", + "in": "query", + "schema": { + "type": "string" + } + } + ], + "responses": { + "400": { + "description": "Bad Request", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResource" + } + } + } + }, + "403": { + "description": "Forbidden", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ProblemDetails" + } + } + } + }, + "404": { + "description": "Not Found", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResource" + } + } + } + }, + "422": { + "description": "Unprocessable Content", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResource" + } + } + } + }, + "500": { + "description": "Internal Server Error" + }, + "200": { + "description": "OK", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/UserClientResourcePaginatedDataResult" + } + } + } + } + } + }, + "post": { + "tags": [ + "MeClient" + ], + "parameters": [ + { + "name": "api-version", + "in": "query", + "schema": { + "type": "string" + } + } + ], + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/UserClientResource" + } + }, + "text/json": { + "schema": { + "$ref": "#/components/schemas/UserClientResource" + } + }, + "application/*+json": { + "schema": { + "$ref": "#/components/schemas/UserClientResource" + } + } + } + }, + "responses": { + "400": { + "description": "Bad Request", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResource" + } + } + } + }, + "403": { + "description": "Forbidden", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ProblemDetails" + } + } + } + }, + "404": { + "description": "Not Found", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResource" + } + } + } + }, + "422": { + "description": "Unprocessable Content", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResource" + } + } + } + }, + "500": { + "description": "Internal Server Error" + }, + "201": { + "description": "Created", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/UserClientResourceDataResponse" + } + } + } + } + } + } + }, + "/api/me/start": { + "get": { + "tags": [ + "MeStart" + ], + "parameters": [ + { + "name": "api-version", + "in": "query", + "schema": { + "type": "string" + } + } + ], + "responses": { + "400": { + "description": "Bad Request", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResource" + } + } + } + }, + "403": { + "description": "Forbidden", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ProblemDetails" + } + } + } + }, + "404": { + "description": "Not Found", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResource" + } + } + } + }, + "422": { + "description": "Unprocessable Content", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResource" + } + } + } + }, + "500": { + "description": "Internal Server Error" + }, + "200": { + "description": "OK", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/MeStartResourceDataResponse" + } + } + } + } + } + } + }, + "/api/notification": { + "get": { + "tags": [ + "Notification" + ], + "parameters": [ + { + "name": "PageSize", + "in": "query", + "schema": { + "type": "integer", + "format": "int32" + } + }, + { + "name": "Page", + "in": "query", + "schema": { + "type": "integer", + "format": "int32" + } + }, + { + "name": "ItemsPerPage", + "in": "query", + "schema": { + "type": "integer", + "format": "int32" + } + }, + { + "name": "api-version", + "in": "query", + "schema": { + "type": "string" + } + } + ], + "responses": { + "400": { + "description": "Bad Request", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResource" + } + } + } + }, + "403": { + "description": "Forbidden", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ProblemDetails" + } + } + } + }, + "404": { + "description": "Not Found", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResource" + } + } + } + }, + "422": { + "description": "Unprocessable Content", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResource" + } + } + } + }, + "500": { + "description": "Internal Server Error" + }, + "200": { + "description": "OK", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/NotificationResourcePaginatedDataResult" + } + } + } + } + } + } + }, + "/api/pet": { + "get": { + "tags": [ + "Pet" + ], + "parameters": [ + { + "name": "HouseholdId", + "in": "query", + "schema": { + "type": "array", + "items": { + "type": "integer", + "format": "int32" + } + } + }, + { + "name": "Page", + "in": "query", + "schema": { + "type": "integer", + "format": "int32" + } + }, + { + "name": "ItemsPerPage", + "in": "query", + "schema": { + "type": "integer", + "format": "int32" + } + }, + { + "name": "PageSize", + "in": "query", + "schema": { + "type": "integer", + "format": "int32" + } + }, + { + "name": "api-version", + "in": "query", + "schema": { + "type": "string" + } + } + ], + "responses": { + "400": { + "description": "Bad Request", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResource" + } + } + } + }, + "403": { + "description": "Forbidden", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ProblemDetails" + } + } + } + }, + "404": { + "description": "Not Found", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResource" + } + } + } + }, + "422": { + "description": "Unprocessable Content", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResource" + } + } + } + }, + "500": { + "description": "Internal Server Error" + }, + "200": { + "description": "OK", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/PetResourcePaginatedDataResult" + } + } + } + } + } + }, + "post": { + "tags": [ + "Pet" + ], + "parameters": [ + { + "name": "api-version", + "in": "query", + "schema": { + "type": "string" + } + } + ], + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/CreatePetResource" + } + }, + "text/json": { + "schema": { + "$ref": "#/components/schemas/CreatePetResource" + } + }, + "application/*+json": { + "schema": { + "$ref": "#/components/schemas/CreatePetResource" + } + } + } + }, + "responses": { + "400": { + "description": "Bad Request", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResource" + } + } + } + }, + "403": { + "description": "Forbidden", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ProblemDetails" + } + } + } + }, + "404": { + "description": "Not Found", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResource" + } + } + } + }, + "422": { + "description": "Unprocessable Content", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResource" + } + } + } + }, + "500": { + "description": "Internal Server Error" + }, + "201": { + "description": "Created", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/PetResourceDataResponse" + } + } + } + } + } + } + }, + "/api/pet/{petId}": { + "get": { + "tags": [ + "Pet" + ], + "parameters": [ + { + "name": "petId", + "in": "path", + "required": true, + "schema": { + "type": "integer", + "format": "int32" + } + }, + { + "name": "api-version", + "in": "query", + "schema": { + "type": "string" + } + } + ], + "responses": { + "400": { + "description": "Bad Request", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResource" + } + } + } + }, + "403": { + "description": "Forbidden", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ProblemDetails" + } + } + } + }, + "404": { + "description": "Not Found", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResource" + } + } + } + }, + "422": { + "description": "Unprocessable Content", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResource" + } + } + } + }, + "500": { + "description": "Internal Server Error" + }, + "200": { + "description": "OK", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/PetResourceDataResponse" + } + } + } + } + } + }, + "put": { + "tags": [ + "Pet" + ], + "parameters": [ + { + "name": "petId", + "in": "path", + "required": true, + "schema": { + "type": "integer", + "format": "int32" + } + }, + { + "name": "api-version", + "in": "query", + "schema": { + "type": "string" + } + } + ], + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/UpdatePetResource" + } + }, + "text/json": { + "schema": { + "$ref": "#/components/schemas/UpdatePetResource" + } + }, + "application/*+json": { + "schema": { + "$ref": "#/components/schemas/UpdatePetResource" + } + } + } + }, + "responses": { + "400": { + "description": "Bad Request", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResource" + } + } + } + }, + "403": { + "description": "Forbidden", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ProblemDetails" + } + } + } + }, + "404": { + "description": "Not Found", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResource" + } + } + } + }, + "422": { + "description": "Unprocessable Content", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResource" + } + } + } + }, + "500": { + "description": "Internal Server Error" + }, + "200": { + "description": "OK", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/PetResourceDataResponse" + } + } + } + } + } + }, + "delete": { + "tags": [ + "Pet" + ], + "parameters": [ + { + "name": "petId", + "in": "path", + "required": true, + "schema": { + "type": "integer", + "format": "int32" + } + }, + { + "name": "api-version", + "in": "query", + "schema": { + "type": "string" + } + } + ], + "responses": { + "400": { + "description": "Bad Request", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResource" + } + } + } + }, + "403": { + "description": "Forbidden", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ProblemDetails" + } + } + } + }, + "404": { + "description": "Not Found", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResource" + } + } + } + }, + "422": { + "description": "Unprocessable Content", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResource" + } + } + } + }, + "500": { + "description": "Internal Server Error" + }, + "204": { + "description": "No Content" + } + } + } + }, + "/api/pet/{petId}/condition": { + "get": { + "tags": [ + "PetCondition" + ], + "parameters": [ + { + "name": "petId", + "in": "path", + "required": true, + "schema": { + "type": "integer", + "format": "int32" + } + }, + { + "name": "Page", + "in": "query", + "schema": { + "type": "integer", + "format": "int32" + } + }, + { + "name": "ItemsPerPage", + "in": "query", + "schema": { + "type": "integer", + "format": "int32" + } + }, + { + "name": "PageSize", + "in": "query", + "schema": { + "type": "integer", + "format": "int32" + } + }, + { + "name": "api-version", + "in": "query", + "schema": { + "type": "string" + } + } + ], + "responses": { + "400": { + "description": "Bad Request", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResource" + } + } + } + }, + "403": { + "description": "Forbidden", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ProblemDetails" + } + } + } + }, + "404": { + "description": "Not Found", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResource" + } + } + } + }, + "422": { + "description": "Unprocessable Content", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResource" + } + } + } + }, + "500": { + "description": "Internal Server Error" + }, + "200": { + "description": "OK", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/PetConditionResourcePaginatedDataResult" + } + } + } + } + } + } + }, + "/api/pet/{petId}/condition/{conditionId}": { + "get": { + "tags": [ + "PetCondition" + ], + "parameters": [ + { + "name": "petId", + "in": "path", + "required": true, + "schema": { + "type": "integer", + "format": "int32" + } + }, + { + "name": "conditionId", + "in": "path", + "required": true, + "schema": { + "type": "integer", + "format": "int32" + } + }, + { + "name": "api-version", + "in": "query", + "schema": { + "type": "string" + } + } + ], + "responses": { + "400": { + "description": "Bad Request", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResource" + } + } + } + }, + "403": { + "description": "Forbidden", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ProblemDetails" + } + } + } + }, + "404": { + "description": "Not Found", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResource" + } + } + } + }, + "422": { + "description": "Unprocessable Content", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResource" + } + } + } + }, + "500": { + "description": "Internal Server Error" + }, + "200": { + "description": "OK", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/PetConditionResourceDataResponse" + } + } + } + } + } + }, + "put": { + "tags": [ + "PetCondition" + ], + "parameters": [ + { + "name": "petId", + "in": "path", + "required": true, + "schema": { + "type": "integer", + "format": "int32" + } + }, + { + "name": "conditionId", + "in": "path", + "required": true, + "schema": { + "type": "integer", + "format": "int32" + } + }, + { + "name": "api-version", + "in": "query", + "schema": { + "type": "string" + } + } + ], + "responses": { + "400": { + "description": "Bad Request", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResource" + } + } + } + }, + "403": { + "description": "Forbidden", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ProblemDetails" + } + } + } + }, + "404": { + "description": "Not Found", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResource" + } + } + } + }, + "422": { + "description": "Unprocessable Content", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResource" + } + } + } + }, + "500": { + "description": "Internal Server Error" + }, + "200": { + "description": "OK", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/PetConditionResourceDataResponse" + } + } + } + } + } + }, + "delete": { + "tags": [ + "PetCondition" + ], + "parameters": [ + { + "name": "petId", + "in": "path", + "required": true, + "schema": { + "type": "integer", + "format": "int32" + } + }, + { + "name": "conditionId", + "in": "path", + "required": true, + "schema": { + "type": "integer", + "format": "int32" + } + }, + { + "name": "api-version", + "in": "query", + "schema": { + "type": "string" + } + } + ], + "responses": { + "400": { + "description": "Bad Request", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResource" + } + } + } + }, + "403": { + "description": "Forbidden", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ProblemDetails" + } + } + } + }, + "404": { + "description": "Not Found", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResource" + } + } + } + }, + "422": { + "description": "Unprocessable Content", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResource" + } + } + } + }, + "500": { + "description": "Internal Server Error" + }, + "204": { + "description": "No Content" + } + } + } + }, + "/api/dashboard/pet": { + "get": { + "tags": [ + "PetDashboard" + ], + "parameters": [ + { + "name": "PetId", + "in": "query", + "required": true, + "schema": { + "type": "array", + "items": { + "type": "integer", + "format": "int32" + } + } + }, + { + "name": "From", + "in": "query", + "required": true, + "schema": { + "minLength": 1, + "type": "string", + "format": "date-time" + } + }, + { + "name": "DaysHistory", + "in": "query", + "schema": { + "type": "integer", + "format": "int32" + } + }, + { + "name": "Page", + "in": "query", + "schema": { + "type": "integer", + "format": "int32" + } + }, + { + "name": "ItemsPerPage", + "in": "query", + "schema": { + "type": "integer", + "format": "int32" + } + }, + { + "name": "PageSize", + "in": "query", + "schema": { + "type": "integer", + "format": "int32" + } + }, + { + "name": "api-version", + "in": "query", + "schema": { + "type": "string" + } + } + ], + "responses": { + "400": { + "description": "Bad Request", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResource" + } + } + } + }, + "403": { + "description": "Forbidden", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ProblemDetails" + } + } + } + }, + "404": { + "description": "Not Found", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResource" + } + } + } + }, + "422": { + "description": "Unprocessable Content", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResource" + } + } + } + }, + "500": { + "description": "Internal Server Error" + }, + "200": { + "description": "OK", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/PetDashboardResourceListDataResponse" + } + } + } + } + } + } + }, + "/api/pet/{petId}/insight": { + "get": { + "tags": [ + "PetInsight" + ], + "parameters": [ + { + "name": "petId", + "in": "path", + "required": true, + "schema": { + "type": "integer", + "format": "int32" + } + }, + { + "name": "From", + "in": "query", + "schema": { + "type": "string", + "format": "date-time" + } + }, + { + "name": "To", + "in": "query", + "schema": { + "type": "string", + "format": "date-time" + } + }, + { + "name": "Page", + "in": "query", + "schema": { + "type": "integer", + "format": "int32" + } + }, + { + "name": "ItemsPerPage", + "in": "query", + "schema": { + "type": "integer", + "format": "int32" + } + }, + { + "name": "PageSize", + "in": "query", + "schema": { + "type": "integer", + "format": "int32" + } + }, + { + "name": "api-version", + "in": "query", + "schema": { + "type": "string" + } + } + ], + "responses": { + "400": { + "description": "Bad Request", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResource" + } + } + } + }, + "403": { + "description": "Forbidden", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ProblemDetails" + } + } + } + }, + "404": { + "description": "Not Found", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResource" + } + } + } + }, + "422": { + "description": "Unprocessable Content", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResource" + } + } + } + }, + "500": { + "description": "Internal Server Error" + }, + "200": { + "description": "OK", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/PetInsightResourceDataResponse" + } + } + } + } + } + } + }, + "/api/pet/position/{deviceId}": { + "get": { + "tags": [ + "PetPosition" + ], + "parameters": [ + { + "name": "deviceId", + "in": "path", + "required": true, + "schema": { + "type": "integer", + "format": "int32" + } + }, + { + "name": "Page", + "in": "query", + "schema": { + "type": "integer", + "format": "int32" + } + }, + { + "name": "ItemsPerPage", + "in": "query", + "schema": { + "type": "integer", + "format": "int32" + } + }, + { + "name": "PageSize", + "in": "query", + "schema": { + "type": "integer", + "format": "int32" + } + }, + { + "name": "api-version", + "in": "query", + "schema": { + "type": "string" + } + } + ], + "responses": { + "400": { + "description": "Bad Request", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResource" + } + } + } + }, + "403": { + "description": "Forbidden", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ProblemDetails" + } + } + } + }, + "404": { + "description": "Not Found", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResource" + } + } + } + }, + "422": { + "description": "Unprocessable Content", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResource" + } + } + } + }, + "500": { + "description": "Internal Server Error" + }, + "200": { + "description": "OK", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/PetPositionResourcePaginatedDataResult" + } + } + } + } + } + } + }, + "/api/pet/{petId}/position/{deviceId}": { + "get": { + "tags": [ + "PetPosition" + ], + "parameters": [ + { + "name": "petId", + "in": "path", + "required": true, + "schema": { + "type": "integer", + "format": "int32" + } + }, + { + "name": "deviceId", + "in": "path", + "required": true, + "schema": { + "type": "integer", + "format": "int32" + } + }, + { + "name": "api-version", + "in": "query", + "schema": { + "type": "string" + } + } + ], + "responses": { + "400": { + "description": "Bad Request", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResource" + } + } + } + }, + "403": { + "description": "Forbidden", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ProblemDetails" + } + } + } + }, + "404": { + "description": "Not Found", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResource" + } + } + } + }, + "422": { + "description": "Unprocessable Content", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResource" + } + } + } + }, + "500": { + "description": "Internal Server Error" + }, + "200": { + "description": "OK", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/PetPositionResourceDataResponse" + } + } + } + } + } + } + }, + "/api/pet/{petId}/position": { + "post": { + "tags": [ + "PetPosition" + ], + "parameters": [ + { + "name": "petId", + "in": "path", + "required": true, + "schema": { + "type": "integer", + "format": "int32" + } + }, + { + "name": "api-version", + "in": "query", + "schema": { + "type": "string" + } + } + ], + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/CreatePetPositionResource" + } + }, + "text/json": { + "schema": { + "$ref": "#/components/schemas/CreatePetPositionResource" + } + }, + "application/*+json": { + "schema": { + "$ref": "#/components/schemas/CreatePetPositionResource" + } + } + } + }, + "responses": { + "400": { + "description": "Bad Request", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResource" + } + } + } + }, + "403": { + "description": "Forbidden", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ProblemDetails" + } + } + } + }, + "404": { + "description": "Not Found", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResource" + } + } + } + }, + "422": { + "description": "Unprocessable Content", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResource" + } + } + } + }, + "500": { + "description": "Internal Server Error" + }, + "201": { + "description": "Created", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/PetPositionResourceDataResponse" + } + } + } + } + } + } + }, + "/api/pet/status/{deviceId}": { + "get": { + "tags": [ + "PetStatus" + ], + "parameters": [ + { + "name": "deviceId", + "in": "path", + "required": true, + "schema": { + "type": "integer", + "format": "int32" + } + }, + { + "name": "api-version", + "in": "query", + "schema": { + "type": "string" + } + } + ], + "responses": { + "400": { + "description": "Bad Request", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResource" + } + } + } + }, + "403": { + "description": "Forbidden", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ProblemDetails" + } + } + } + }, + "404": { + "description": "Not Found", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResource" + } + } + } + }, + "422": { + "description": "Unprocessable Content", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResource" + } + } + } + }, + "500": { + "description": "Internal Server Error" + }, + "200": { + "description": "OK", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/PetStatusResourcePaginatedDataResult" + } + } + } + } + } + } + }, + "/api/pet/{petId}/status/{deviceId}": { + "get": { + "tags": [ + "PetStatus" + ], + "parameters": [ + { + "name": "petId", + "in": "path", + "required": true, + "schema": { + "type": "integer", + "format": "int32" + } + }, + { + "name": "deviceId", + "in": "path", + "required": true, + "schema": { + "type": "integer", + "format": "int32" + } + }, + { + "name": "api-version", + "in": "query", + "schema": { + "type": "string" + } + } + ], + "responses": { + "400": { + "description": "Bad Request", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResource" + } + } + } + }, + "403": { + "description": "Forbidden", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ProblemDetails" + } + } + } + }, + "404": { + "description": "Not Found", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResource" + } + } + } + }, + "422": { + "description": "Unprocessable Content", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResource" + } + } + } + }, + "500": { + "description": "Internal Server Error" + }, + "200": { + "description": "OK", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/PetStatusResourceDataResponse" + } + } + } + } + } + } + }, + "/api/photo": { + "get": { + "tags": [ + "Photo" + ], + "parameters": [ + { + "name": "Page", + "in": "query", + "schema": { + "type": "integer", + "format": "int32" + } + }, + { + "name": "ItemsPerPage", + "in": "query", + "schema": { + "type": "integer", + "format": "int32" + } + }, + { + "name": "PageSize", + "in": "query", + "schema": { + "type": "integer", + "format": "int32" + } + }, + { + "name": "api-version", + "in": "query", + "schema": { + "type": "string" + } + } + ], + "responses": { + "400": { + "description": "Bad Request", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResource" + } + } + } + }, + "403": { + "description": "Forbidden", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ProblemDetails" + } + } + } + }, + "404": { + "description": "Not Found", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResource" + } + } + } + }, + "422": { + "description": "Unprocessable Content", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResource" + } + } + } + }, + "500": { + "description": "Internal Server Error" + }, + "200": { + "description": "OK", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/PhotoResourcePaginatedDataResult" + } + } + } + } + } + }, + "post": { + "tags": [ + "Photo" + ], + "parameters": [ + { + "name": "api-version", + "in": "query", + "schema": { + "type": "string" + } + } + ], + "requestBody": { + "content": { + "multipart/form-data": { + "schema": { + "type": "object", + "properties": { + "File": { + "type": "string", + "format": "binary" + }, + "Title": { + "type": "string" + } + } + }, + "encoding": { + "File": { + "style": "form" + }, + "Title": { + "style": "form" + } + } + } + } + }, + "responses": { + "400": { + "description": "Bad Request", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResource" + } + } + } + }, + "403": { + "description": "Forbidden", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ProblemDetails" + } + } + } + }, + "404": { + "description": "Not Found", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResource" + } + } + } + }, + "422": { + "description": "Unprocessable Content", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResource" + } + } + } + }, + "500": { + "description": "Internal Server Error" + }, + "201": { + "description": "Created", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/PhotoResourceDataResponse" + } + } + } + } + } + } + }, + "/api/photo/{photoId}": { + "get": { + "tags": [ + "Photo" + ], + "parameters": [ + { + "name": "photoId", + "in": "path", + "required": true, + "schema": { + "type": "integer", + "format": "int32" + } + }, + { + "name": "api-version", + "in": "query", + "schema": { + "type": "string" + } + } + ], + "responses": { + "400": { + "description": "Bad Request", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResource" + } + } + } + }, + "403": { + "description": "Forbidden", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ProblemDetails" + } + } + } + }, + "404": { + "description": "Not Found", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResource" + } + } + } + }, + "422": { + "description": "Unprocessable Content", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResource" + } + } + } + }, + "500": { + "description": "Internal Server Error" + }, + "200": { + "description": "OK", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/PhotoResourceDataResponse" + } + } + } + } + } + }, + "put": { + "tags": [ + "Photo" + ], + "parameters": [ + { + "name": "photoId", + "in": "path", + "required": true, + "schema": { + "type": "integer", + "format": "int32" + } + }, + { + "name": "api-version", + "in": "query", + "schema": { + "type": "string" + } + } + ], + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/UpdatePhotoResource" + } + }, + "text/json": { + "schema": { + "$ref": "#/components/schemas/UpdatePhotoResource" + } + }, + "application/*+json": { + "schema": { + "$ref": "#/components/schemas/UpdatePhotoResource" + } + } + } + }, + "responses": { + "400": { + "description": "Bad Request", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResource" + } + } + } + }, + "403": { + "description": "Forbidden", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ProblemDetails" + } + } + } + }, + "404": { + "description": "Not Found", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResource" + } + } + } + }, + "422": { + "description": "Unprocessable Content", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResource" + } + } + } + }, + "500": { + "description": "Internal Server Error" + }, + "200": { + "description": "OK", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/PhotoResourceDataResponse" + } + } + } + } + } + }, + "delete": { + "tags": [ + "Photo" + ], + "parameters": [ + { + "name": "photoId", + "in": "path", + "required": true, + "schema": { + "type": "integer", + "format": "int32" + } + }, + { + "name": "api-version", + "in": "query", + "schema": { + "type": "string" + } + } + ], + "responses": { + "400": { + "description": "Bad Request", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResource" + } + } + } + }, + "403": { + "description": "Forbidden", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ProblemDetails" + } + } + } + }, + "404": { + "description": "Not Found", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResource" + } + } + } + }, + "422": { + "description": "Unprocessable Content", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResource" + } + } + } + }, + "500": { + "description": "Internal Server Error" + }, + "204": { + "description": "No Content" + } + } + } + }, + "/api/product": { + "get": { + "tags": [ + "Product" + ], + "parameters": [ + { + "name": "Lang", + "in": "query", + "schema": { + "type": "string", + "nullable": true + } + }, + { + "name": "Page", + "in": "query", + "schema": { + "type": "integer", + "format": "int32" + } + }, + { + "name": "ItemsPerPage", + "in": "query", + "schema": { + "type": "integer", + "format": "int32" + } + }, + { + "name": "PageSize", + "in": "query", + "schema": { + "type": "integer", + "format": "int32" + } + }, + { + "name": "api-version", + "in": "query", + "schema": { + "type": "string" + } + } + ], + "responses": { + "400": { + "description": "Bad Request", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResource" + } + } + } + }, + "403": { + "description": "Forbidden", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ProblemDetails" + } + } + } + }, + "404": { + "description": "Not Found", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResource" + } + } + } + }, + "422": { + "description": "Unprocessable Content", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResource" + } + } + } + }, + "500": { + "description": "Internal Server Error" + }, + "200": { + "description": "OK", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ProductResourcePaginatedDataResult" + } + } + } + } + } + } + }, + "/api/product/{productId}": { + "get": { + "tags": [ + "Product" + ], + "parameters": [ + { + "name": "productId", + "in": "path", + "required": true, + "schema": { + "type": "integer", + "format": "int32" + } + }, + { + "name": "api-version", + "in": "query", + "schema": { + "type": "string" + } + } + ], + "responses": { + "400": { + "description": "Bad Request", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResource" + } + } + } + }, + "403": { + "description": "Forbidden", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ProblemDetails" + } + } + } + }, + "404": { + "description": "Not Found", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResource" + } + } + } + }, + "422": { + "description": "Unprocessable Content", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResource" + } + } + } + }, + "500": { + "description": "Internal Server Error" + }, + "200": { + "description": "OK", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ProductResourceDataResponse" + } + } + } + } + } + } + }, + "/api/report/household/{householdId}/pet/{petId}/aggregate": { + "get": { + "tags": [ + "ReportHouseholdPet" + ], + "parameters": [ + { + "name": "householdId", + "in": "path", + "required": true, + "schema": { + "type": "integer", + "format": "int32" + } + }, + { + "name": "petId", + "in": "path", + "required": true, + "schema": { + "type": "integer", + "format": "int32" + } + }, + { + "name": "From", + "in": "query", + "schema": { + "type": "string", + "format": "date-time", + "nullable": true + } + }, + { + "name": "To", + "in": "query", + "schema": { + "type": "string", + "format": "date-time", + "nullable": true + } + }, + { + "name": "api-version", + "in": "query", + "schema": { + "type": "string" + } + } + ], + "responses": { + "400": { + "description": "Bad Request", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResource" + } + } + } + }, + "403": { + "description": "Forbidden", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ProblemDetails" + } + } + } + }, + "404": { + "description": "Not Found", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResource" + } + } + } + }, + "422": { + "description": "Unprocessable Content", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResource" + } + } + } + }, + "500": { + "description": "Internal Server Error" + }, + "200": { + "description": "OK", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ReportHouseholdResourceDataResponse" + } + } + } + } + } + } + }, + "/api/report/household/{householdId}/pet/{petId}": { + "get": { + "tags": [ + "ReportHouseholdPet" + ], + "parameters": [ + { + "name": "householdId", + "in": "path", + "required": true, + "schema": { + "type": "integer", + "format": "int32" + } + }, + { + "name": "petId", + "in": "path", + "required": true, + "schema": { + "type": "integer", + "format": "int32" + } + }, + { + "name": "From", + "in": "query", + "schema": { + "type": "string", + "format": "date-time", + "nullable": true + } + }, + { + "name": "To", + "in": "query", + "schema": { + "type": "string", + "format": "date-time", + "nullable": true + } + }, + { + "name": "api-version", + "in": "query", + "schema": { + "type": "string" + } + } + ], + "responses": { + "400": { + "description": "Bad Request", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResource" + } + } + } + }, + "403": { + "description": "Forbidden", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ProblemDetails" + } + } + } + }, + "404": { + "description": "Not Found", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResource" + } + } + } + }, + "422": { + "description": "Unprocessable Content", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResource" + } + } + } + }, + "500": { + "description": "Internal Server Error" + }, + "200": { + "description": "OK", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ReportHouseholdResourceListDataResponse" + } + } + } + } + } + } + }, + "/api/report/household/{householdId}/pet/{petId}/device/{deviceId}": { + "get": { + "tags": [ + "ReportHouseholdPet" + ], + "parameters": [ + { + "name": "householdId", + "in": "path", + "required": true, + "schema": { + "type": "integer", + "format": "int32" + } + }, + { + "name": "petId", + "in": "path", + "required": true, + "schema": { + "type": "integer", + "format": "int32" + } + }, + { + "name": "deviceId", + "in": "path", + "required": true, + "schema": { + "type": "integer", + "format": "int32" + } + }, + { + "name": "From", + "in": "query", + "schema": { + "type": "string", + "format": "date-time", + "nullable": true + } + }, + { + "name": "To", + "in": "query", + "schema": { + "type": "string", + "format": "date-time", + "nullable": true + } + }, + { + "name": "api-version", + "in": "query", + "schema": { + "type": "string" + } + } + ], + "responses": { + "400": { + "description": "Bad Request", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResource" + } + } + } + }, + "403": { + "description": "Forbidden", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ProblemDetails" + } + } + } + }, + "404": { + "description": "Not Found", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResource" + } + } + } + }, + "422": { + "description": "Unprocessable Content", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResource" + } + } + } + }, + "500": { + "description": "Internal Server Error" + }, + "200": { + "description": "OK", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ReportHouseholdResourceListDataResponse" + } + } + } + } + } + } + }, + "/api/species": { + "get": { + "tags": [ + "Species" + ], + "parameters": [ + { + "name": "Lang", + "in": "query", + "schema": { + "type": "string", + "nullable": true + } + }, + { + "name": "Page", + "in": "query", + "schema": { + "type": "integer", + "format": "int32" + } + }, + { + "name": "ItemsPerPage", + "in": "query", + "schema": { + "type": "integer", + "format": "int32" + } + }, + { + "name": "PageSize", + "in": "query", + "schema": { + "type": "integer", + "format": "int32" + } + }, + { + "name": "api-version", + "in": "query", + "schema": { + "type": "string" + } + } + ], + "responses": { + "400": { + "description": "Bad Request", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResource" + } + } + } + }, + "403": { + "description": "Forbidden", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ProblemDetails" + } + } + } + }, + "404": { + "description": "Not Found", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResource" + } + } + } + }, + "422": { + "description": "Unprocessable Content", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResource" + } + } + } + }, + "500": { + "description": "Internal Server Error" + }, + "200": { + "description": "OK", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/SpeciesResourcePaginatedDataResult" + } + } + } + } + } + } + }, + "/api/species/{speciesId}": { + "get": { + "tags": [ + "Species" + ], + "parameters": [ + { + "name": "speciesId", + "in": "path", + "required": true, + "schema": { + "type": "integer", + "format": "int32" + } + }, + { + "name": "api-version", + "in": "query", + "schema": { + "type": "string" + } + } + ], + "responses": { + "400": { + "description": "Bad Request", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResource" + } + } + } + }, + "403": { + "description": "Forbidden", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ProblemDetails" + } + } + } + }, + "404": { + "description": "Not Found", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResource" + } + } + } + }, + "422": { + "description": "Unprocessable Content", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResource" + } + } + } + }, + "500": { + "description": "Internal Server Error" + }, + "200": { + "description": "OK", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/SpeciesResourceDataResponse" + } + } + } + } + } + } + }, + "/api/start": { + "get": { + "tags": [ + "Start" + ], + "parameters": [ + { + "name": "Lang", + "in": "query", + "schema": { + "type": "string", + "nullable": true + } + }, + { + "name": "api-version", + "in": "query", + "schema": { + "type": "string" + } + } + ], + "responses": { + "400": { + "description": "Bad Request", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResource" + } + } + } + }, + "403": { + "description": "Forbidden", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ProblemDetails" + } + } + } + }, + "404": { + "description": "Not Found", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResource" + } + } + } + }, + "422": { + "description": "Unprocessable Content", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResource" + } + } + } + }, + "500": { + "description": "Internal Server Error" + }, + "200": { + "description": "OK", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/StartResourceDataResponse" + } + } + } + } + } + } + }, + "/api/tag": { + "get": { + "tags": [ + "Tag" + ], + "parameters": [ + { + "name": "Page", + "in": "query", + "schema": { + "type": "integer", + "format": "int32" + } + }, + { + "name": "ItemsPerPage", + "in": "query", + "schema": { + "type": "integer", + "format": "int32" + } + }, + { + "name": "PageSize", + "in": "query", + "schema": { + "type": "integer", + "format": "int32" + } + }, + { + "name": "api-version", + "in": "query", + "schema": { + "type": "string" + } + } + ], + "responses": { + "400": { + "description": "Bad Request", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResource" + } + } + } + }, + "403": { + "description": "Forbidden", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ProblemDetails" + } + } + } + }, + "404": { + "description": "Not Found", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResource" + } + } + } + }, + "422": { + "description": "Unprocessable Content", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResource" + } + } + } + }, + "500": { + "description": "Internal Server Error" + }, + "200": { + "description": "OK", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/TagResourcePaginatedDataResult" + } + } + } + } + } + } + }, + "/api/tag/{tagId}": { + "get": { + "tags": [ + "Tag" + ], + "parameters": [ + { + "name": "tagId", + "in": "path", + "required": true, + "schema": { + "type": "integer", + "format": "int32" + } + }, + { + "name": "api-version", + "in": "query", + "schema": { + "type": "string" + } + } + ], + "responses": { + "400": { + "description": "Bad Request", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResource" + } + } + } + }, + "403": { + "description": "Forbidden", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ProblemDetails" + } + } + } + }, + "404": { + "description": "Not Found", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResource" + } + } + } + }, + "422": { + "description": "Unprocessable Content", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResource" + } + } + } + }, + "500": { + "description": "Internal Server Error" + }, + "200": { + "description": "OK", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/TagResourceDataResponse" + } + } + } + } + } + } + }, + "/api/tag/{tagId}/device": { + "get": { + "tags": [ + "TagDevice" + ], + "parameters": [ + { + "name": "tagId", + "in": "path", + "required": true, + "schema": { + "type": "integer", + "format": "int32" + } + }, + { + "name": "Page", + "in": "query", + "schema": { + "type": "integer", + "format": "int32" + } + }, + { + "name": "ItemsPerPage", + "in": "query", + "schema": { + "type": "integer", + "format": "int32" + } + }, + { + "name": "PageSize", + "in": "query", + "schema": { + "type": "integer", + "format": "int32" + } + }, + { + "name": "api-version", + "in": "query", + "schema": { + "type": "string" + } + } + ], + "responses": { + "400": { + "description": "Bad Request", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResource" + } + } + } + }, + "403": { + "description": "Forbidden", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ProblemDetails" + } + } + } + }, + "404": { + "description": "Not Found", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResource" + } + } + } + }, + "422": { + "description": "Unprocessable Content", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResource" + } + } + } + }, + "500": { + "description": "Internal Server Error" + }, + "200": { + "description": "OK", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/TagDeviceResourcePaginatedDataResult" + } + } + } + } + } + } + }, + "/api/tag/{tagId}/device/{deviceId}": { + "get": { + "tags": [ + "TagDevice" + ], + "parameters": [ + { + "name": "tagId", + "in": "path", + "required": true, + "schema": { + "type": "integer", + "format": "int32" + } + }, + { + "name": "deviceId", + "in": "path", + "required": true, + "schema": { + "type": "integer", + "format": "int32" + } + }, + { + "name": "api-version", + "in": "query", + "schema": { + "type": "string" + } + } + ], + "responses": { + "400": { + "description": "Bad Request", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResource" + } + } + } + }, + "403": { + "description": "Forbidden", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ProblemDetails" + } + } + } + }, + "404": { + "description": "Not Found", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResource" + } + } + } + }, + "422": { + "description": "Unprocessable Content", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResource" + } + } + } + }, + "500": { + "description": "Internal Server Error" + }, + "200": { + "description": "OK", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/TagDeviceResourceDataResponse" + } + } + } + } + } + } + }, + "/api/timeline": { + "get": { + "tags": [ + "Timeline" + ], + "parameters": [ + { + "name": "PageSize", + "in": "query", + "schema": { + "type": "integer", + "format": "int32" + } + }, + { + "name": "SinceId", + "in": "query", + "schema": { + "type": "integer", + "format": "int64" + } + }, + { + "name": "BeforeId", + "in": "query", + "schema": { + "type": "integer", + "format": "int64" + } + }, + { + "name": "Page", + "in": "query", + "schema": { + "type": "integer", + "format": "int32" + } + }, + { + "name": "ItemsPerPage", + "in": "query", + "schema": { + "type": "integer", + "format": "int32" + } + }, + { + "name": "api-version", + "in": "query", + "schema": { + "type": "string" + } + } + ], + "responses": { + "400": { + "description": "Bad Request", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResource" + } + } + } + }, + "403": { + "description": "Forbidden", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ProblemDetails" + } + } + } + }, + "404": { + "description": "Not Found", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResource" + } + } + } + }, + "422": { + "description": "Unprocessable Content", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResource" + } + } + } + }, + "500": { + "description": "Internal Server Error" + }, + "200": { + "description": "OK", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/TimelineResourcePaginatedDataResult" + } + } + } + } + } + } + }, + "/api/timeline/household/{householdId}": { + "get": { + "tags": [ + "Timeline" + ], + "parameters": [ + { + "name": "householdId", + "in": "path", + "required": true, + "schema": { + "type": "integer", + "format": "int32" + } + }, + { + "name": "PageSize", + "in": "query", + "schema": { + "type": "integer", + "format": "int32" + } + }, + { + "name": "SinceId", + "in": "query", + "schema": { + "type": "integer", + "format": "int64" + } + }, + { + "name": "BeforeId", + "in": "query", + "schema": { + "type": "integer", + "format": "int64" + } + }, + { + "name": "Page", + "in": "query", + "schema": { + "type": "integer", + "format": "int32" + } + }, + { + "name": "ItemsPerPage", + "in": "query", + "schema": { + "type": "integer", + "format": "int32" + } + }, + { + "name": "api-version", + "in": "query", + "schema": { + "type": "string" + } + } + ], + "responses": { + "400": { + "description": "Bad Request", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResource" + } + } + } + }, + "403": { + "description": "Forbidden", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ProblemDetails" + } + } + } + }, + "404": { + "description": "Not Found", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResource" + } + } + } + }, + "422": { + "description": "Unprocessable Content", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResource" + } + } + } + }, + "500": { + "description": "Internal Server Error" + }, + "200": { + "description": "OK", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/TimelineResourcePaginatedDataResult" + } + } + } + } + } + } + }, + "/api/timeline/household/{householdId}/device": { + "get": { + "tags": [ + "Timeline" + ], + "parameters": [ + { + "name": "householdId", + "in": "path", + "required": true, + "schema": { + "type": "integer", + "format": "int32" + } + }, + { + "name": "PageSize", + "in": "query", + "schema": { + "type": "integer", + "format": "int32" + } + }, + { + "name": "SinceId", + "in": "query", + "schema": { + "type": "integer", + "format": "int64" + } + }, + { + "name": "BeforeId", + "in": "query", + "schema": { + "type": "integer", + "format": "int64" + } + }, + { + "name": "Page", + "in": "query", + "schema": { + "type": "integer", + "format": "int32" + } + }, + { + "name": "ItemsPerPage", + "in": "query", + "schema": { + "type": "integer", + "format": "int32" + } + }, + { + "name": "api-version", + "in": "query", + "schema": { + "type": "string" + } + } + ], + "responses": { + "400": { + "description": "Bad Request", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResource" + } + } + } + }, + "403": { + "description": "Forbidden", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ProblemDetails" + } + } + } + }, + "404": { + "description": "Not Found", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResource" + } + } + } + }, + "422": { + "description": "Unprocessable Content", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResource" + } + } + } + }, + "500": { + "description": "Internal Server Error" + }, + "200": { + "description": "OK", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/TimelineResourcePaginatedDataResult" + } + } + } + } + } + } + }, + "/api/timeline/household/{householdId}/pet": { + "get": { + "tags": [ + "Timeline" + ], + "parameters": [ + { + "name": "householdId", + "in": "path", + "required": true, + "schema": { + "type": "integer", + "format": "int32" + } + }, + { + "name": "PageSize", + "in": "query", + "schema": { + "type": "integer", + "format": "int32" + } + }, + { + "name": "SinceId", + "in": "query", + "schema": { + "type": "integer", + "format": "int64" + } + }, + { + "name": "BeforeId", + "in": "query", + "schema": { + "type": "integer", + "format": "int64" + } + }, + { + "name": "Page", + "in": "query", + "schema": { + "type": "integer", + "format": "int32" + } + }, + { + "name": "ItemsPerPage", + "in": "query", + "schema": { + "type": "integer", + "format": "int32" + } + }, + { + "name": "api-version", + "in": "query", + "schema": { + "type": "string" + } + } + ], + "responses": { + "400": { + "description": "Bad Request", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResource" + } + } + } + }, + "403": { + "description": "Forbidden", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ProblemDetails" + } + } + } + }, + "404": { + "description": "Not Found", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResource" + } + } + } + }, + "422": { + "description": "Unprocessable Content", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResource" + } + } + } + }, + "500": { + "description": "Internal Server Error" + }, + "200": { + "description": "OK", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/TimelineResourcePaginatedDataResult" + } + } + } + } + } + } + }, + "/api/timeline/household/{householdId}/user": { + "get": { + "tags": [ + "Timeline" + ], + "parameters": [ + { + "name": "householdId", + "in": "path", + "required": true, + "schema": { + "type": "integer", + "format": "int32" + } + }, + { + "name": "PageSize", + "in": "query", + "schema": { + "type": "integer", + "format": "int32" + } + }, + { + "name": "SinceId", + "in": "query", + "schema": { + "type": "integer", + "format": "int64" + } + }, + { + "name": "BeforeId", + "in": "query", + "schema": { + "type": "integer", + "format": "int64" + } + }, + { + "name": "Page", + "in": "query", + "schema": { + "type": "integer", + "format": "int32" + } + }, + { + "name": "ItemsPerPage", + "in": "query", + "schema": { + "type": "integer", + "format": "int32" + } + }, + { + "name": "api-version", + "in": "query", + "schema": { + "type": "string" + } + } + ], + "responses": { + "400": { + "description": "Bad Request", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResource" + } + } + } + }, + "403": { + "description": "Forbidden", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ProblemDetails" + } + } + } + }, + "404": { + "description": "Not Found", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResource" + } + } + } + }, + "422": { + "description": "Unprocessable Content", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResource" + } + } + } + }, + "500": { + "description": "Internal Server Error" + }, + "200": { + "description": "OK", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/TimelineResourcePaginatedDataResult" + } + } + } + } + } + } + }, + "/api/timezone": { + "get": { + "tags": [ + "Timezone" + ], + "parameters": [ + { + "name": "Page", + "in": "query", + "schema": { + "type": "integer", + "format": "int32" + } + }, + { + "name": "ItemsPerPage", + "in": "query", + "schema": { + "type": "integer", + "format": "int32" + } + }, + { + "name": "PageSize", + "in": "query", + "schema": { + "type": "integer", + "format": "int32" + } + }, + { + "name": "api-version", + "in": "query", + "schema": { + "type": "string" + } + } + ], + "responses": { + "400": { + "description": "Bad Request", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResource" + } + } + } + }, + "403": { + "description": "Forbidden", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ProblemDetails" + } + } + } + }, + "404": { + "description": "Not Found", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResource" + } + } + } + }, + "422": { + "description": "Unprocessable Content", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResource" + } + } + } + }, + "500": { + "description": "Internal Server Error" + }, + "200": { + "description": "OK", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/TimezoneResourcePaginatedDataResult" + } + } + } + } + } + } + }, + "/api/timezone/{timezoneId}": { + "get": { + "tags": [ + "Timezone" + ], + "parameters": [ + { + "name": "timezoneId", + "in": "path", + "required": true, + "schema": { + "type": "integer", + "format": "int32" + } + }, + { + "name": "api-version", + "in": "query", + "schema": { + "type": "string" + } + } + ], + "responses": { + "400": { + "description": "Bad Request", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResource" + } + } + } + }, + "403": { + "description": "Forbidden", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ProblemDetails" + } + } + } + }, + "404": { + "description": "Not Found", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResource" + } + } + } + }, + "422": { + "description": "Unprocessable Content", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResource" + } + } + } + }, + "500": { + "description": "Internal Server Error" + }, + "200": { + "description": "OK", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/TimezoneResourceDataResponse" + } + } + } + } + } + } + }, + "/api/translation": { + "get": { + "tags": [ + "Translation" + ], + "parameters": [ + { + "name": "api-version", + "in": "query", + "schema": { + "type": "string" + } + } + ], + "responses": { + "400": { + "description": "Bad Request", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResource" + } + } + } + }, + "403": { + "description": "Forbidden", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ProblemDetails" + } + } + } + }, + "404": { + "description": "Not Found", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResource" + } + } + } + }, + "422": { + "description": "Unprocessable Content", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResource" + } + } + } + }, + "500": { + "description": "Internal Server Error" + }, + "200": { + "description": "OK", + "content": { + "application/json": { + "schema": { + "type": "object", + "additionalProperties": { + "type": "object", + "additionalProperties": { + "type": "string" + } + } + } + } + } + } + } + } + }, + "/api/translation/{language}": { + "get": { + "tags": [ + "Translation" + ], + "parameters": [ + { + "name": "language", + "in": "path", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "api-version", + "in": "query", + "schema": { + "type": "string" + } + } + ], + "responses": { + "400": { + "description": "Bad Request", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResource" + } + } + } + }, + "403": { + "description": "Forbidden", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ProblemDetails" + } + } + } + }, + "404": { + "description": "Not Found", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResource" + } + } + } + }, + "422": { + "description": "Unprocessable Content", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResource" + } + } + } + }, + "500": { + "description": "Internal Server Error" + }, + "200": { + "description": "OK", + "content": { + "application/json": { + "schema": { + "type": "object", + "additionalProperties": { + "type": "string" + } + } + } + } + } + } + } + }, + "/api/user/{userId}": { + "get": { + "tags": [ + "User" + ], + "parameters": [ + { + "name": "userId", + "in": "path", + "required": true, + "schema": { + "type": "integer", + "format": "int32" + } + }, + { + "name": "api-version", + "in": "query", + "schema": { + "type": "string" + } + } + ], + "responses": { + "400": { + "description": "Bad Request", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResource" + } + } + } + }, + "403": { + "description": "Forbidden", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ProblemDetails" + } + } + } + }, + "404": { + "description": "Not Found", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResource" + } + } + } + }, + "422": { + "description": "Unprocessable Content", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResource" + } + } + } + }, + "500": { + "description": "Internal Server Error" + }, + "200": { + "description": "OK", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/PublicUserResourceDataResponse" + } + } + } + } + } + } + }, + "/api/me/settings": { + "get": { + "tags": [ + "UserSetting" + ], + "parameters": [ + { + "name": "Page", + "in": "query", + "schema": { + "type": "integer", + "format": "int32" + } + }, + { + "name": "ItemsPerPage", + "in": "query", + "schema": { + "type": "integer", + "format": "int32" + } + }, + { + "name": "PageSize", + "in": "query", + "schema": { + "type": "integer", + "format": "int32" + } + }, + { + "name": "api-version", + "in": "query", + "schema": { + "type": "string" + } + } + ], + "responses": { + "400": { + "description": "Bad Request", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResource" + } + } + } + }, + "403": { + "description": "Forbidden", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ProblemDetails" + } + } + } + }, + "404": { + "description": "Not Found", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResource" + } + } + } + }, + "422": { + "description": "Unprocessable Content", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResource" + } + } + } + }, + "500": { + "description": "Internal Server Error" + }, + "200": { + "description": "OK", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/UserSettingResourcePaginatedDataResult" + } + } + } + } + } + }, + "post": { + "tags": [ + "UserSetting" + ], + "parameters": [ + { + "name": "api-version", + "in": "query", + "schema": { + "type": "string" + } + } + ], + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/CreateUserSettingsResource" + } + }, + "text/json": { + "schema": { + "$ref": "#/components/schemas/CreateUserSettingsResource" + } + }, + "application/*+json": { + "schema": { + "$ref": "#/components/schemas/CreateUserSettingsResource" + } + } + } + }, + "responses": { + "400": { + "description": "Bad Request", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResource" + } + } + } + }, + "403": { + "description": "Forbidden", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ProblemDetails" + } + } + } + }, + "404": { + "description": "Not Found", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResource" + } + } + } + }, + "422": { + "description": "Unprocessable Content", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResource" + } + } + } + }, + "500": { + "description": "Internal Server Error" + }, + "200": { + "description": "OK", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/UserSettingResourceDataResponse" + } + } + } + } + } + } + }, + "/api/me/settings/{key}": { + "get": { + "tags": [ + "UserSetting" + ], + "parameters": [ + { + "name": "key", + "in": "path", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "api-version", + "in": "query", + "schema": { + "type": "string" + } + } + ], + "responses": { + "400": { + "description": "Bad Request", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResource" + } + } + } + }, + "403": { + "description": "Forbidden", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ProblemDetails" + } + } + } + }, + "404": { + "description": "Not Found", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResource" + } + } + } + }, + "422": { + "description": "Unprocessable Content", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResource" + } + } + } + }, + "500": { + "description": "Internal Server Error" + }, + "200": { + "description": "OK", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/UserSettingResourceDataResponse" + } + } + } + } + } + }, + "put": { + "tags": [ + "UserSetting" + ], + "parameters": [ + { + "name": "key", + "in": "path", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "api-version", + "in": "query", + "schema": { + "type": "string" + } + } + ], + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/UpdateUserSettingsResource" + } + }, + "text/json": { + "schema": { + "$ref": "#/components/schemas/UpdateUserSettingsResource" + } + }, + "application/*+json": { + "schema": { + "$ref": "#/components/schemas/UpdateUserSettingsResource" + } + } + } + }, + "responses": { + "400": { + "description": "Bad Request", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResource" + } + } + } + }, + "403": { + "description": "Forbidden", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ProblemDetails" + } + } + } + }, + "404": { + "description": "Not Found", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResource" + } + } + } + }, + "422": { + "description": "Unprocessable Content", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResource" + } + } + } + }, + "500": { + "description": "Internal Server Error" + }, + "200": { + "description": "OK", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/UserSettingResourceDataResponse" + } + } + } + } + } + } + } + }, + "components": { + "schemas": { + "AnimoPetResource": { + "type": "object", + "properties": { + "id": { + "type": "integer", + "format": "int64" + }, + "name": { + "type": "string", + "nullable": true + }, + "gender": { + "$ref": "#/components/schemas/PetGenderEnum" + }, + "date_of_birth": { + "type": "string", + "format": "date-time", + "nullable": true + }, + "weight": { + "type": "string", + "nullable": true + }, + "breed_id": { + "type": "integer", + "format": "int32", + "nullable": true + }, + "household_id": { + "type": "integer", + "format": "int32", + "nullable": true + }, + "created_at": { + "type": "string", + "format": "date-time", + "nullable": true + }, + "updated_at": { + "type": "string", + "format": "date-time", + "nullable": true + } + }, + "additionalProperties": false + }, + "AnimoPetResourcePaginatedDataResult": { + "type": "object", + "properties": { + "data": { + "type": "array", + "items": { + "$ref": "#/components/schemas/AnimoPetResource" + }, + "nullable": true + }, + "meta": { + "$ref": "#/components/schemas/PaginatedMetaDataResult" + } + }, + "additionalProperties": false + }, + "AuthChangePasswordResource": { + "required": [ + "password" + ], + "type": "object", + "properties": { + "user_id": { + "type": "integer", + "format": "int32" + }, + "password": { + "minLength": 1, + "type": "string" + }, + "new_password": { + "type": "string", + "nullable": true + } + }, + "additionalProperties": false + }, + "AuthLoginResource": { + "required": [ + "client_uid", + "email_address", + "password" + ], + "type": "object", + "properties": { + "client_uid": { + "minLength": 1, + "type": "string" + }, + "device_id": { + "type": "string", + "nullable": true, + "deprecated": true + }, + "email_address": { + "minLength": 1, + "type": "string", + "format": "email" + }, + "password": { + "minLength": 1, + "type": "string" + } + }, + "additionalProperties": false + }, + "AuthLogoutResource": { + "type": "object", + "properties": { + "client_uid": { + "type": "string", + "nullable": true + }, + "device_id": { + "type": "string", + "nullable": true, + "deprecated": true + } + }, + "additionalProperties": false + }, + "AuthRegisterResource": { + "required": [ + "country_id", + "device_id", + "email_address", + "first_name", + "language_id", + "last_name", + "marketing_opt_in", + "password" + ], + "type": "object", + "properties": { + "email_address": { + "minLength": 1, + "type": "string", + "format": "email" + }, + "first_name": { + "maxLength": 50, + "minLength": 1, + "type": "string" + }, + "last_name": { + "maxLength": 50, + "minLength": 1, + "type": "string" + }, + "password": { + "minLength": 1, + "type": "string" + }, + "language_id": { + "type": "integer", + "format": "int32" + }, + "country_id": { + "type": "integer", + "format": "int32" + }, + "photo_id": { + "type": "integer", + "format": "int32", + "nullable": true + }, + "marketing_opt_in": { + "type": "boolean" + }, + "weight_units": { + "$ref": "#/components/schemas/UserWeightUnitEnum" + }, + "time_format": { + "$ref": "#/components/schemas/UserTimeFormatEnum" + }, + "device_id": { + "minLength": 1, + "type": "string" + } + }, + "additionalProperties": false + }, + "AuthResetPasswordRequestResource": { + "required": [ + "email_address" + ], + "type": "object", + "properties": { + "email_address": { + "minLength": 1, + "type": "string" + } + }, + "additionalProperties": false + }, + "AuthResetPasswordResource": { + "required": [ + "email_address", + "password", + "token" + ], + "type": "object", + "properties": { + "email_address": { + "minLength": 1, + "type": "string", + "format": "email" + }, + "password": { + "minLength": 6, + "type": "string" + }, + "token": { + "minLength": 1, + "type": "string" + }, + "client_uid": { + "type": "string", + "nullable": true + }, + "device_id": { + "type": "string", + "nullable": true, + "deprecated": true + } + }, + "additionalProperties": false + }, + "BreedQueryResource": { + "type": "object", + "properties": { + "page": { + "type": "integer", + "format": "int32" + }, + "items_per_page": { + "type": "integer", + "format": "int32" + }, + "page_size": { + "type": "integer", + "format": "int32" + }, + "species_id": { + "type": "integer", + "format": "int32", + "nullable": true + }, + "lang": { + "type": "string", + "nullable": true + } + }, + "additionalProperties": false + }, + "BreedResource": { + "type": "object", + "properties": { + "id": { + "type": "integer", + "format": "int32" + }, + "species_id": { + "type": "integer", + "format": "int32" + }, + "name": { + "type": "string", + "nullable": true + }, + "version": { + "type": "integer", + "format": "int32" + }, + "created_at": { + "type": "string", + "format": "date-time", + "nullable": true + }, + "updated_at": { + "type": "string", + "format": "date-time", + "nullable": true + } + }, + "additionalProperties": false + }, + "BreedResourceDataResponse": { + "type": "object", + "properties": { + "data": { + "$ref": "#/components/schemas/BreedResource" + } + }, + "additionalProperties": false + }, + "BreedResourcePaginatedDataResult": { + "type": "object", + "properties": { + "data": { + "type": "array", + "items": { + "$ref": "#/components/schemas/BreedResource" + }, + "nullable": true + }, + "meta": { + "$ref": "#/components/schemas/PaginatedMetaDataResult" + } + }, + "additionalProperties": false + }, + "ConditionQueryResource": { + "type": "object", + "properties": { + "page": { + "type": "integer", + "format": "int32" + }, + "items_per_page": { + "type": "integer", + "format": "int32" + }, + "page_size": { + "type": "integer", + "format": "int32" + }, + "lang": { + "type": "string", + "nullable": true + } + }, + "additionalProperties": false + }, + "ConditionResource": { + "type": "object", + "properties": { + "id": { + "type": "integer", + "format": "int32" + }, + "name": { + "type": "string", + "nullable": true + }, + "version": { + "type": "integer", + "format": "int32" + }, + "created_at": { + "type": "string", + "format": "date-time", + "nullable": true + }, + "updated_at": { + "type": "string", + "format": "date-time", + "nullable": true + } + }, + "additionalProperties": false + }, + "ConditionResourceDataResponse": { + "type": "object", + "properties": { + "data": { + "$ref": "#/components/schemas/ConditionResource" + } + }, + "additionalProperties": false + }, + "ConditionResourcePaginatedDataResult": { + "type": "object", + "properties": { + "data": { + "type": "array", + "items": { + "$ref": "#/components/schemas/ConditionResource" + }, + "nullable": true + }, + "meta": { + "$ref": "#/components/schemas/PaginatedMetaDataResult" + } + }, + "additionalProperties": false + }, + "ConsumptionAlertResource": { + "type": "object", + "properties": { + "pet_id": { + "type": "integer", + "format": "int32" + }, + "tag_id": { + "type": "integer", + "format": "int32" + }, + "pet_weight": { + "type": "integer", + "format": "int32" + }, + "amount": { + "type": "integer", + "format": "int32" + }, + "time_noticed_utc": { + "type": "string", + "format": "date-time" + }, + "created_at": { + "type": "string", + "format": "date-time" + } + }, + "additionalProperties": false + }, + "ConsumptionHabitModelStateEnum": { + "enum": [ + 0, + 1, + 2, + 3 + ], + "type": "integer", + "format": "int32" + }, + "ConsumptionHabitModelStateResource": { + "type": "object", + "properties": { + "pet_id": { + "type": "integer", + "format": "int32" + }, + "tag_id": { + "type": "integer", + "format": "int32", + "nullable": true + }, + "state": { + "$ref": "#/components/schemas/ConsumptionHabitModelStateEnum" + } + }, + "additionalProperties": false + }, + "ConsumptionHabitOutcomeEnum": { + "enum": [ + 0, + 1, + 2 + ], + "type": "integer", + "format": "int32" + }, + "ConsumptionHabitResource": { + "type": "object", + "properties": { + "outcome": { + "$ref": "#/components/schemas/ConsumptionHabitOutcomeEnum" + }, + "calendar_day": { + "type": "string", + "format": "date" + }, + "amount": { + "type": "integer", + "format": "int32" + }, + "lower_limit": { + "type": "integer", + "format": "int32", + "nullable": true + }, + "upper_limit": { + "type": "integer", + "format": "int32", + "nullable": true + }, + "created_at": { + "type": "string", + "format": "date-time" + } + }, + "additionalProperties": false + }, + "CountryQueryResource": { + "type": "object", + "properties": { + "page": { + "type": "integer", + "format": "int32" + }, + "items_per_page": { + "type": "integer", + "format": "int32" + }, + "page_size": { + "type": "integer", + "format": "int32" + }, + "iso_code2": { + "type": "string", + "nullable": true + }, + "lang": { + "type": "string", + "nullable": true + } + }, + "additionalProperties": false + }, + "CountryResource": { + "type": "object", + "properties": { + "id": { + "type": "integer", + "format": "int32" + }, + "name": { + "type": "string", + "nullable": true + }, + "native_name": { + "type": "string", + "nullable": true + }, + "code": { + "type": "string", + "nullable": true + }, + "default_language_id": { + "type": "integer", + "format": "int32", + "nullable": true + }, + "default_timezone_id": { + "type": "integer", + "format": "int32", + "nullable": true + }, + "created_at": { + "type": "string", + "format": "date-time", + "nullable": true + }, + "updated_at": { + "type": "string", + "format": "date-time", + "nullable": true + } + }, + "additionalProperties": false + }, + "CountryResourceDataResponse": { + "type": "object", + "properties": { + "data": { + "$ref": "#/components/schemas/CountryResource" + } + }, + "additionalProperties": false + }, + "CountryResourcePaginatedDataResult": { + "type": "object", + "properties": { + "data": { + "type": "array", + "items": { + "$ref": "#/components/schemas/CountryResource" + }, + "nullable": true + }, + "meta": { + "$ref": "#/components/schemas/PaginatedMetaDataResult" + } + }, + "additionalProperties": false + }, + "CreateHouseholdInviteResource": { + "required": [ + "email_address", + "owner", + "write" + ], + "type": "object", + "properties": { + "code": { + "type": "string", + "nullable": true + }, + "email_address": { + "maxLength": 255, + "minLength": 1, + "type": "string", + "format": "email" + }, + "owner": { + "type": "boolean" + }, + "write": { + "type": "boolean" + } + }, + "additionalProperties": false + }, + "CreateHouseholdResource": { + "required": [ + "name", + "timezone_id" + ], + "type": "object", + "properties": { + "name": { + "maxLength": 50, + "minLength": 1, + "type": "string" + }, + "timezone_id": { + "type": "integer", + "format": "int32" + } + }, + "additionalProperties": false + }, + "CreatePetPositionResource": { + "required": [ + "since" + ], + "type": "object", + "properties": { + "where": { + "type": "integer", + "format": "int32", + "nullable": true + }, + "since": { + "type": "string", + "format": "date-time" + } + }, + "additionalProperties": false + }, + "CreatePetResource": { + "required": [ + "household_id", + "name" + ], + "type": "object", + "properties": { + "name": { + "maxLength": 50, + "minLength": 1, + "type": "string" + }, + "gender": { + "$ref": "#/components/schemas/PetGenderEnum" + }, + "date_of_birth": { + "type": "string", + "format": "date-time", + "nullable": true + }, + "weight": { + "maximum": 2147483647, + "minimum": 0, + "exclusiveMinimum": true, + "type": "number", + "format": "double", + "nullable": true + }, + "comments": { + "maxLength": 200, + "type": "string", + "nullable": true + }, + "breed_id": { + "type": "integer", + "format": "int32", + "nullable": true + }, + "breed_id2": { + "type": "integer", + "format": "int32", + "nullable": true + }, + "spayed": { + "$ref": "#/components/schemas/SpayedEnum" + }, + "food_type_id": { + "type": "integer", + "format": "int32", + "nullable": true + }, + "photo_id": { + "type": "integer", + "format": "int32", + "nullable": true + }, + "species_id": { + "type": "integer", + "format": "int32", + "nullable": true + }, + "conditions": { + "type": "array", + "items": { + "$ref": "#/components/schemas/ConditionResource" + }, + "nullable": true + }, + "household_id": { + "type": "integer", + "format": "int32" + } + }, + "additionalProperties": false + }, + "CreateUserSettingsResource": { + "required": [ + "key", + "value" + ], + "type": "object", + "properties": { + "key": { + "maxLength": 255, + "minLength": 1, + "type": "string" + }, + "value": { + "minLength": 1, + "type": "string" + } + }, + "additionalProperties": false + }, + "DeleteAccountResource": { + "required": [ + "password" + ], + "type": "object", + "properties": { + "password": { + "minLength": 1, + "type": "string" + }, + "households": { + "type": "array", + "items": { + "type": "integer", + "format": "int32" + }, + "nullable": true + } + }, + "additionalProperties": false + }, + "DeviceControlPendingResource": { + "type": "object", + "properties": { + "state": { + "nullable": true + }, + "request_id": { + "type": "string", + "nullable": true + }, + "requested_at": { + "type": "string", + "format": "date-time", + "nullable": true + }, + "requested_by": { + "type": "string", + "nullable": true + } + }, + "additionalProperties": false + }, + "DeviceControlResource": { + "type": "object", + "properties": { + "data": { + "nullable": true + }, + "pending": { + "type": "array", + "items": { + "$ref": "#/components/schemas/DeviceControlPendingResource" + }, + "nullable": true + }, + "results": { + "type": "array", + "items": { + "$ref": "#/components/schemas/DeviceControlResultResource" + }, + "nullable": true + } + }, + "additionalProperties": false + }, + "DeviceControlResultResource": { + "type": "object", + "properties": { + "request_id": { + "type": "string", + "nullable": true + }, + "response_id": { + "type": "string", + "nullable": true + }, + "status": { + "$ref": "#/components/schemas/RequestChangeStateResponseStatus" + }, + "status_id": { + "$ref": "#/components/schemas/RequestChangeStateResponseStatus" + }, + "requested_at": { + "type": "string", + "format": "date-time", + "nullable": true + }, + "committed_at": { + "type": "string", + "format": "date-time", + "nullable": true + } + }, + "additionalProperties": false + }, + "DeviceControlStateChangeResource": { + "type": "object", + "properties": { + "request_id": { + "type": "string", + "nullable": true + }, + "response_id": { + "type": "string", + "nullable": true + }, + "status": { + "$ref": "#/components/schemas/RequestChangeStateResponseStatus" + }, + "status_id": { + "$ref": "#/components/schemas/RequestChangeStateResponseStatus" + }, + "requested_at": { + "type": "string", + "format": "date-time", + "nullable": true + }, + "committed_at": { + "type": "string", + "format": "date-time", + "nullable": true + }, + "device_id": { + "type": "integer", + "format": "int32", + "nullable": true + }, + "state": { + "nullable": true + }, + "requested_by": { + "type": "integer", + "format": "int32", + "nullable": true + }, + "child_state_changes": { + "type": "array", + "items": { + "$ref": "#/components/schemas/DeviceControlStateChangeResource" + }, + "nullable": true + }, + "parent_request_id": { + "type": "string", + "nullable": true + } + }, + "additionalProperties": false + }, + "DeviceControlStateChangeResourceDataResponse": { + "type": "object", + "properties": { + "data": { + "$ref": "#/components/schemas/DeviceControlStateChangeResource" + } + }, + "additionalProperties": false + }, + "DeviceControlStateChangeResourceListDataResponse": { + "type": "object", + "properties": { + "data": { + "type": "array", + "items": { + "$ref": "#/components/schemas/DeviceControlStateChangeResource" + }, + "nullable": true + } + }, + "additionalProperties": false + }, + "DeviceNeedsUpdateResource": { + "type": "object", + "properties": { + "needs_manual_update": { + "type": "boolean" + } + }, + "additionalProperties": false + }, + "DeviceNeedsUpdateResourceDataResponse": { + "type": "object", + "properties": { + "data": { + "$ref": "#/components/schemas/DeviceNeedsUpdateResource" + } + }, + "additionalProperties": false + }, + "DevicePairByCodeResource": { + "required": [ + "pairing_code" + ], + "type": "object", + "properties": { + "pairing_code": { + "maxLength": 32, + "minLength": 32, + "type": "string" + } + }, + "additionalProperties": false + }, + "DeviceReadinessResource": { + "type": "object", + "properties": { + "device_ready": { + "type": "boolean", + "description": "Given all the criteria, is the device ready to be used" + }, + "profiles_available": { + "type": "integer", + "description": "How many profiles/tags do we have for this device in state", + "format": "int32" + }, + "profiles_updated_at": { + "type": "string", + "description": "When was the last profile update in the state of the device", + "format": "date-time", + "nullable": true + } + }, + "additionalProperties": false + }, + "DeviceReadinessResourceDataResponse": { + "type": "object", + "properties": { + "data": { + "$ref": "#/components/schemas/DeviceReadinessResource" + } + }, + "additionalProperties": false + }, + "DeviceResource": { + "type": "object", + "properties": { + "id": { + "type": "integer", + "format": "int32" + }, + "parent_device_id": { + "type": "integer", + "format": "int32", + "nullable": true + }, + "product_id": { + "type": "integer", + "format": "int32" + }, + "household_id": { + "type": "integer", + "format": "int32", + "nullable": true + }, + "index": { + "type": "integer", + "format": "int32", + "nullable": true + }, + "name": { + "type": "string", + "nullable": true + }, + "serial_number": { + "type": "string", + "nullable": true + }, + "mac_address": { + "type": "string", + "nullable": true + }, + "version": { + "type": "integer", + "format": "int32" + }, + "created_at": { + "type": "string", + "format": "date-time", + "nullable": true + }, + "updated_at": { + "type": "string", + "format": "date-time", + "nullable": true + }, + "deleted_at": { + "type": "string", + "format": "date-time", + "nullable": true + }, + "pairing_at": { + "type": "string", + "format": "date-time", + "nullable": true + }, + "last_activity_at": { + "type": "string", + "format": "date-time", + "nullable": true + }, + "last_new_event_at": { + "type": "string", + "format": "date-time", + "nullable": true + }, + "control": { + "nullable": true + }, + "status": { + "nullable": true + }, + "tags": { + "type": "array", + "items": { + "$ref": "#/components/schemas/DeviceTagResource" + }, + "nullable": true + } + }, + "additionalProperties": false + }, + "DeviceResourceDataResponse": { + "type": "object", + "properties": { + "data": { + "$ref": "#/components/schemas/DeviceResource" + } + }, + "additionalProperties": false + }, + "DeviceResourceIEnumerableDataResponse": { + "type": "object", + "properties": { + "data": { + "type": "array", + "items": { + "$ref": "#/components/schemas/DeviceResource" + }, + "nullable": true + } + }, + "additionalProperties": false + }, + "DeviceResourcePaginatedDataResult": { + "type": "object", + "properties": { + "data": { + "type": "array", + "items": { + "$ref": "#/components/schemas/DeviceResource" + }, + "nullable": true + }, + "meta": { + "$ref": "#/components/schemas/PaginatedMetaDataResult" + } + }, + "additionalProperties": false + }, + "DeviceTagDataResource": { + "type": "object", + "properties": { + "data": { + "$ref": "#/components/schemas/DeviceTagResource" + }, + "pending": { + "type": "array", + "items": { + "$ref": "#/components/schemas/DeviceControlPendingResource" + }, + "description": "Any pending state changes for the device tag", + "nullable": true + }, + "results": { + "type": "array", + "items": { + "$ref": "#/components/schemas/DeviceControlResultResource" + }, + "description": "State change result", + "nullable": true + } + }, + "additionalProperties": false + }, + "DeviceTagResource": { + "type": "object", + "properties": { + "id": { + "type": "integer", + "description": "Tag id", + "format": "int32" + }, + "device_id": { + "type": "integer", + "format": "int32" + }, + "index": { + "type": "integer", + "format": "int32" + }, + "profile": { + "type": "integer", + "format": "int32", + "nullable": true + }, + "version": { + "type": "integer", + "format": "int32" + }, + "created_at": { + "type": "string", + "format": "date-time", + "nullable": true + }, + "updated_at": { + "type": "string", + "format": "date-time", + "nullable": true + } + }, + "additionalProperties": false + }, + "DeviceTagResourceDataResponse": { + "type": "object", + "properties": { + "data": { + "$ref": "#/components/schemas/DeviceTagResource" + } + }, + "additionalProperties": false + }, + "DeviceTagResourcePaginatedDataResult": { + "type": "object", + "properties": { + "data": { + "type": "array", + "items": { + "$ref": "#/components/schemas/DeviceTagResource" + }, + "nullable": true + }, + "meta": { + "$ref": "#/components/schemas/PaginatedMetaDataResult" + } + }, + "additionalProperties": false + }, + "DeviceType": { + "enum": [ + 0, + 1, + 2, + 3, + 4, + 5, + 6, + 7, + 8, + 9, + 10, + 32, + 255 + ], + "type": "integer", + "format": "int32" + }, + "DoorDirectionEnum": { + "enum": [ + 0, + 1, + 2, + 3 + ], + "type": "integer", + "format": "int32" + }, + "DoorSide": { + "enum": [ + 0, + 1, + 2 + ], + "type": "integer", + "format": "int32" + }, + "DoorStatusEnum": { + "enum": [ + 4, + 6, + 8, + 10, + 11, + 12, + 13 + ], + "type": "integer", + "format": "int32" + }, + "ErrorResource": { + "type": "object", + "properties": { + "success": { + "type": "boolean", + "readOnly": true + }, + "error": { + "type": "object", + "additionalProperties": { + "type": "array", + "items": { + "type": "string" + }, + "nullable": true + }, + "nullable": true, + "readOnly": true + } + }, + "additionalProperties": false + }, + "FoodTypeQueryResource": { + "type": "object", + "properties": { + "page": { + "type": "integer", + "format": "int32" + }, + "items_per_page": { + "type": "integer", + "format": "int32" + }, + "page_size": { + "type": "integer", + "format": "int32" + }, + "lang": { + "type": "string", + "nullable": true + } + }, + "additionalProperties": false + }, + "FoodTypeResource": { + "type": "object", + "properties": { + "id": { + "type": "integer", + "format": "int32" + }, + "name": { + "type": "string", + "nullable": true + }, + "version": { + "type": "integer", + "format": "int32" + }, + "created_at": { + "type": "string", + "format": "date-time", + "nullable": true + }, + "updated_at": { + "type": "string", + "format": "date-time", + "nullable": true + } + }, + "additionalProperties": false + }, + "FoodTypeResourceDataResponse": { + "type": "object", + "properties": { + "data": { + "$ref": "#/components/schemas/FoodTypeResource" + } + }, + "additionalProperties": false + }, + "FoodTypeResourcePaginatedDataResult": { + "type": "object", + "properties": { + "data": { + "type": "array", + "items": { + "$ref": "#/components/schemas/FoodTypeResource" + }, + "nullable": true + }, + "meta": { + "$ref": "#/components/schemas/PaginatedMetaDataResult" + } + }, + "additionalProperties": false + }, + "HouseholdInviteResource": { + "type": "object", + "properties": { + "id": { + "type": "integer", + "format": "int32" + }, + "code": { + "type": "string", + "nullable": true + }, + "email_address": { + "type": "string", + "nullable": true + }, + "owner": { + "type": "boolean", + "nullable": true + }, + "write": { + "type": "boolean", + "nullable": true + }, + "status": { + "$ref": "#/components/schemas/HouseholdInviteStatus" + }, + "user": { + "$ref": "#/components/schemas/HouseholdInviteUserResource" + }, + "version": { + "type": "integer", + "format": "int32" + }, + "created_at": { + "type": "string", + "format": "date-time", + "nullable": true + }, + "updated_at": { + "type": "string", + "format": "date-time", + "nullable": true + }, + "deleted_at": { + "type": "string", + "format": "date-time", + "nullable": true + }, + "used_at": { + "type": "string", + "format": "date-time", + "nullable": true + } + }, + "additionalProperties": false + }, + "HouseholdInviteResourceDataResponse": { + "type": "object", + "properties": { + "data": { + "$ref": "#/components/schemas/HouseholdInviteResource" + } + }, + "additionalProperties": false + }, + "HouseholdInviteResourcePaginatedDataResult": { + "type": "object", + "properties": { + "data": { + "type": "array", + "items": { + "$ref": "#/components/schemas/HouseholdInviteResource" + }, + "nullable": true + }, + "meta": { + "$ref": "#/components/schemas/PaginatedMetaDataResult" + } + }, + "additionalProperties": false + }, + "HouseholdInviteStatus": { + "enum": [ + 0, + 1, + 2 + ], + "type": "integer", + "format": "int32" + }, + "HouseholdInviteUserResource": { + "type": "object", + "properties": { + "creator": { + "$ref": "#/components/schemas/PublicUserResource" + }, + "acceptor": { + "$ref": "#/components/schemas/PublicUserResource" + } + }, + "additionalProperties": false + }, + "HouseholdResource": { + "type": "object", + "properties": { + "id": { + "type": "integer", + "format": "int32" + }, + "name": { + "type": "string", + "nullable": true + }, + "share_code": { + "type": "string", + "nullable": true + }, + "created_user_id": { + "type": "integer", + "format": "int32", + "nullable": true + }, + "timezone_id": { + "type": "integer", + "format": "int32", + "nullable": true + }, + "version": { + "type": "integer", + "format": "int32" + }, + "created_at": { + "type": "string", + "format": "date-time", + "nullable": true + }, + "updated_at": { + "type": "string", + "format": "date-time", + "nullable": true + }, + "deleted_at": { + "type": "string", + "format": "date-time", + "nullable": true + }, + "invites": { + "type": "array", + "items": { + "$ref": "#/components/schemas/HouseholdInviteResource" + }, + "nullable": true + }, + "users": { + "type": "array", + "items": { + "$ref": "#/components/schemas/HouseholdUserResource" + }, + "nullable": true + }, + "timezone": { + "$ref": "#/components/schemas/TimezoneResource" + } + }, + "additionalProperties": false + }, + "HouseholdResourceDataResponse": { + "type": "object", + "properties": { + "data": { + "$ref": "#/components/schemas/HouseholdResource" + } + }, + "additionalProperties": false + }, + "HouseholdResourcePaginatedDataResult": { + "type": "object", + "properties": { + "data": { + "type": "array", + "items": { + "$ref": "#/components/schemas/HouseholdResource" + }, + "nullable": true + }, + "meta": { + "$ref": "#/components/schemas/PaginatedMetaDataResult" + } + }, + "additionalProperties": false + }, + "HouseholdUserResource": { + "type": "object", + "properties": { + "id": { + "type": "integer", + "format": "int32" + }, + "owner": { + "type": "boolean", + "nullable": true + }, + "write": { + "type": "boolean", + "nullable": true + }, + "user": { + "$ref": "#/components/schemas/PublicUserResource" + }, + "version": { + "type": "integer", + "format": "int32" + }, + "created_at": { + "type": "string", + "format": "date-time", + "nullable": true + }, + "updated_at": { + "type": "string", + "format": "date-time", + "nullable": true + } + }, + "additionalProperties": false + }, + "HouseholdUserResourceDataResponse": { + "type": "object", + "properties": { + "data": { + "$ref": "#/components/schemas/HouseholdUserResource" + } + }, + "additionalProperties": false + }, + "HouseholdUserResourcePaginatedDataResult": { + "type": "object", + "properties": { + "data": { + "type": "array", + "items": { + "$ref": "#/components/schemas/HouseholdUserResource" + }, + "nullable": true + }, + "meta": { + "$ref": "#/components/schemas/PaginatedMetaDataResult" + } + }, + "additionalProperties": false + }, + "InfoResource": { + "type": "object", + "properties": { + "language": { + "type": "string", + "nullable": true + }, + "country": { + "type": "string", + "nullable": true + } + }, + "additionalProperties": false + }, + "InfoResourceDataResponse": { + "type": "object", + "properties": { + "data": { + "$ref": "#/components/schemas/InfoResource" + } + }, + "additionalProperties": false + }, + "InviteResource": { + "type": "object", + "properties": { + "id": { + "type": "integer", + "format": "int32" + }, + "code": { + "type": "string", + "nullable": true + }, + "email_address": { + "type": "string", + "nullable": true + }, + "owner": { + "type": "boolean", + "nullable": true + }, + "write": { + "type": "boolean", + "nullable": true + }, + "status": { + "$ref": "#/components/schemas/HouseholdInviteStatus" + }, + "user": { + "$ref": "#/components/schemas/HouseholdInviteUserResource" + }, + "version": { + "type": "integer", + "format": "int32" + }, + "created_at": { + "type": "string", + "format": "date-time", + "nullable": true + }, + "updated_at": { + "type": "string", + "format": "date-time", + "nullable": true + }, + "deleted_at": { + "type": "string", + "format": "date-time", + "nullable": true + }, + "used_at": { + "type": "string", + "format": "date-time", + "nullable": true + } + }, + "additionalProperties": false + }, + "InviteResourceDataResponse": { + "type": "object", + "properties": { + "data": { + "$ref": "#/components/schemas/InviteResource" + } + }, + "additionalProperties": false + }, + "InviteResourcePaginatedDataResult": { + "type": "object", + "properties": { + "data": { + "type": "array", + "items": { + "$ref": "#/components/schemas/InviteResource" + }, + "nullable": true + }, + "meta": { + "$ref": "#/components/schemas/PaginatedMetaDataResult" + } + }, + "additionalProperties": false + }, + "LanguageResource": { + "type": "object", + "properties": { + "id": { + "type": "integer", + "format": "int32" + }, + "name": { + "type": "string", + "nullable": true + }, + "native_name": { + "type": "string", + "nullable": true + }, + "code": { + "type": "string", + "nullable": true + }, + "enabled": { + "type": "boolean" + }, + "created_at": { + "type": "string", + "format": "date-time", + "nullable": true + }, + "updated_at": { + "type": "string", + "format": "date-time", + "nullable": true + } + }, + "additionalProperties": false + }, + "LanguageResourceDataResponse": { + "type": "object", + "properties": { + "data": { + "$ref": "#/components/schemas/LanguageResource" + } + }, + "additionalProperties": false + }, + "LanguageResourcePaginatedDataResult": { + "type": "object", + "properties": { + "data": { + "type": "array", + "items": { + "$ref": "#/components/schemas/LanguageResource" + }, + "nullable": true + }, + "meta": { + "$ref": "#/components/schemas/PaginatedMetaDataResult" + } + }, + "additionalProperties": false + }, + "MeStartResource": { + "type": "object", + "properties": { + "devices": { + "type": "array", + "items": { + "$ref": "#/components/schemas/DeviceResource" + }, + "nullable": true + }, + "households": { + "type": "array", + "items": { + "$ref": "#/components/schemas/HouseholdResource" + }, + "nullable": true + }, + "pets": { + "type": "array", + "items": { + "$ref": "#/components/schemas/PetResource" + }, + "nullable": true + }, + "photos": { + "type": "array", + "items": { + "$ref": "#/components/schemas/PhotoResource" + }, + "nullable": true + }, + "tags": { + "type": "array", + "items": { + "$ref": "#/components/schemas/TagResource" + }, + "nullable": true + }, + "user": { + "$ref": "#/components/schemas/UserResource" + }, + "segments": { + "type": "array", + "items": { + "type": "string" + }, + "nullable": true + } + }, + "additionalProperties": false + }, + "MeStartResourceDataResponse": { + "type": "object", + "properties": { + "data": { + "$ref": "#/components/schemas/MeStartResource" + } + }, + "additionalProperties": false + }, + "MovementResource": { + "type": "object", + "properties": { + "id": { + "type": "integer", + "format": "int64" + }, + "device_id": { + "type": "integer", + "format": "int32", + "nullable": true + }, + "tag_id": { + "type": "integer", + "format": "int32" + }, + "user_id": { + "type": "integer", + "format": "int32", + "nullable": true + }, + "direction": { + "$ref": "#/components/schemas/DoorDirectionEnum" + }, + "side": { + "$ref": "#/components/schemas/DoorSide" + }, + "type": { + "$ref": "#/components/schemas/DoorStatusEnum" + }, + "created_at": { + "type": "string", + "format": "date-time", + "nullable": true + }, + "updated_at": { + "type": "string", + "format": "date-time", + "nullable": true + } + }, + "additionalProperties": false + }, + "NotificationResource": { + "type": "object", + "properties": { + "id": { + "type": "integer", + "format": "int64" + }, + "type": { + "$ref": "#/components/schemas/TimelineEventType" + }, + "text": { + "type": "string", + "nullable": true + }, + "created_at": { + "type": "string", + "format": "date-time", + "nullable": true + } + }, + "additionalProperties": false + }, + "NotificationResourcePaginatedDataResult": { + "type": "object", + "properties": { + "data": { + "type": "array", + "items": { + "$ref": "#/components/schemas/NotificationResource" + }, + "nullable": true + }, + "meta": { + "$ref": "#/components/schemas/PaginatedMetaDataResult" + } + }, + "additionalProperties": false + }, + "ObjectDataResponse": { + "type": "object", + "properties": { + "data": { + "nullable": true + } + }, + "additionalProperties": false + }, + "PaginatedMetaDataResult": { + "type": "object", + "properties": { + "page": { + "type": "integer", + "format": "int32", + "nullable": true + }, + "page_size": { + "type": "integer", + "format": "int32", + "nullable": true + }, + "count": { + "type": "integer", + "format": "int64" + }, + "total_pages": { + "type": "integer", + "format": "int64", + "nullable": true + } + }, + "additionalProperties": false + }, + "PetConditionResource": { + "type": "object", + "properties": { + "id": { + "type": "integer", + "format": "int32" + }, + "version": { + "type": "integer", + "format": "int32" + }, + "created_at": { + "type": "string", + "format": "date-time", + "nullable": true + }, + "updated_at": { + "type": "string", + "format": "date-time", + "nullable": true + } + }, + "additionalProperties": false + }, + "PetConditionResourceDataResponse": { + "type": "object", + "properties": { + "data": { + "$ref": "#/components/schemas/PetConditionResource" + } + }, + "additionalProperties": false + }, + "PetConditionResourcePaginatedDataResult": { + "type": "object", + "properties": { + "data": { + "type": "array", + "items": { + "$ref": "#/components/schemas/PetConditionResource" + }, + "nullable": true + }, + "meta": { + "$ref": "#/components/schemas/PaginatedMetaDataResult" + } + }, + "additionalProperties": false + }, + "PetConsumption": { + "type": "object", + "properties": { + "total_consumption": { + "type": "number", + "format": "double", + "nullable": true + }, + "date": { + "type": "string", + "format": "date-time", + "nullable": true + } + }, + "additionalProperties": false + }, + "PetConsumptionResource": { + "type": "object", + "properties": { + "date": { + "type": "string", + "format": "date-time", + "nullable": true + }, + "last_consumption": { + "type": "string", + "format": "date-time", + "nullable": true + }, + "substance_type": { + "$ref": "#/components/schemas/SubstanceTypesEnum" + }, + "total_consumption": { + "type": "number", + "format": "double", + "nullable": true + }, + "number_of_visits": { + "type": "integer", + "format": "int32" + }, + "consumption_time": { + "type": "integer", + "format": "int32" + }, + "activity": { + "type": "array", + "items": { + "$ref": "#/components/schemas/PetConsumption" + }, + "nullable": true + }, + "device_ids": { + "type": "array", + "items": { + "type": "integer", + "format": "int32" + }, + "nullable": true + } + }, + "additionalProperties": false + }, + "PetConsumptionStatusResource": { + "type": "object", + "properties": { + "id": { + "type": "integer", + "format": "int64" + }, + "tag_id": { + "type": "integer", + "format": "int32", + "nullable": true + }, + "device_id": { + "type": "integer", + "format": "int32", + "nullable": true + }, + "change": { + "type": "array", + "items": { + "type": "number", + "format": "double" + }, + "nullable": true + }, + "at": { + "type": "string", + "format": "date-time", + "nullable": true + } + }, + "additionalProperties": false + }, + "PetDashboardQueryResource": { + "required": [ + "from", + "pet_id" + ], + "type": "object", + "properties": { + "page": { + "type": "integer", + "format": "int32" + }, + "items_per_page": { + "type": "integer", + "format": "int32" + }, + "page_size": { + "type": "integer", + "format": "int32" + }, + "pet_id": { + "minItems": 1, + "type": "array", + "items": { + "type": "integer", + "format": "int32" + } + }, + "from": { + "minLength": 1, + "type": "string", + "format": "date-time" + }, + "days_history": { + "type": "integer", + "format": "int32" + } + }, + "additionalProperties": false + }, + "PetDashboardResource": { + "type": "object", + "properties": { + "pet_id": { + "type": "integer", + "format": "int32", + "nullable": true + }, + "movement": { + "$ref": "#/components/schemas/PetMovementResource" + }, + "drinking": { + "$ref": "#/components/schemas/PetConsumptionResource" + }, + "feeding": { + "$ref": "#/components/schemas/PetConsumptionResource" + }, + "drinking_habit": { + "$ref": "#/components/schemas/ConsumptionHabitResource" + }, + "drinking_alert": { + "$ref": "#/components/schemas/ConsumptionAlertResource" + }, + "habit_model_state": { + "$ref": "#/components/schemas/ConsumptionHabitModelStateResource" + } + }, + "additionalProperties": false + }, + "PetDashboardResourceListDataResponse": { + "type": "object", + "properties": { + "data": { + "type": "array", + "items": { + "$ref": "#/components/schemas/PetDashboardResource" + }, + "nullable": true + } + }, + "additionalProperties": false + }, + "PetGenderEnum": { + "enum": [ + 0, + 1 + ], + "type": "integer", + "format": "int32" + }, + "PetInsightQueryResource": { + "type": "object", + "properties": { + "page": { + "type": "integer", + "format": "int32" + }, + "items_per_page": { + "type": "integer", + "format": "int32" + }, + "page_size": { + "type": "integer", + "format": "int32" + }, + "from": { + "type": "string", + "format": "date-time" + }, + "to": { + "type": "string", + "format": "date-time" + } + }, + "additionalProperties": false + }, + "PetInsightResource": { + "type": "object", + "properties": { + "pet_id": { + "type": "integer", + "format": "int32" + }, + "drinking_habit": { + "$ref": "#/components/schemas/ConsumptionHabitResource" + }, + "drinking_alert": { + "$ref": "#/components/schemas/ConsumptionAlertResource" + }, + "habit_model_state": { + "$ref": "#/components/schemas/ConsumptionHabitModelStateResource" + } + }, + "additionalProperties": false + }, + "PetInsightResourceDataResponse": { + "type": "object", + "properties": { + "data": { + "$ref": "#/components/schemas/PetInsightResource" + } + }, + "additionalProperties": false + }, + "PetMovement": { + "type": "object", + "properties": { + "date": { + "type": "string", + "format": "date-time", + "nullable": true + }, + "time_outside": { + "type": "string", + "format": "date-span" + } + }, + "additionalProperties": false + }, + "PetMovementResource": { + "type": "object", + "properties": { + "date": { + "type": "string", + "format": "date-time", + "nullable": true + }, + "where": { + "$ref": "#/components/schemas/DoorDirectionEnum" + }, + "time_outside": { + "type": "string", + "format": "date-span", + "nullable": true + }, + "since": { + "type": "string", + "format": "date-time", + "nullable": true + }, + "last_entry": { + "type": "string", + "format": "date-time", + "nullable": true + }, + "trips_outside": { + "type": "integer", + "format": "int32", + "nullable": true + }, + "entries": { + "type": "integer", + "format": "int32", + "nullable": true + }, + "time_outside_in_seconds": { + "type": "integer", + "format": "int64" + }, + "activity": { + "type": "array", + "items": { + "$ref": "#/components/schemas/PetMovement" + }, + "nullable": true + }, + "device_ids": { + "type": "array", + "items": { + "type": "integer", + "format": "int32" + }, + "nullable": true + } + }, + "additionalProperties": false + }, + "PetPositionResource": { + "type": "object", + "properties": { + "id": { + "type": "integer", + "format": "int64" + }, + "pet_id": { + "type": "integer", + "format": "int32", + "nullable": true + }, + "tag_id": { + "type": "integer", + "format": "int32", + "nullable": true + }, + "device_id": { + "type": "integer", + "format": "int32", + "nullable": true + }, + "user_id": { + "type": "integer", + "format": "int32", + "nullable": true + }, + "where": { + "type": "integer", + "format": "int32", + "nullable": true + }, + "since": { + "type": "string", + "format": "date-time", + "nullable": true + } + }, + "additionalProperties": false + }, + "PetPositionResourceDataResponse": { + "type": "object", + "properties": { + "data": { + "$ref": "#/components/schemas/PetPositionResource" + } + }, + "additionalProperties": false + }, + "PetPositionResourcePaginatedDataResult": { + "type": "object", + "properties": { + "data": { + "type": "array", + "items": { + "$ref": "#/components/schemas/PetPositionResource" + }, + "nullable": true + }, + "meta": { + "$ref": "#/components/schemas/PaginatedMetaDataResult" + } + }, + "additionalProperties": false + }, + "PetResource": { + "type": "object", + "properties": { + "id": { + "type": "integer", + "format": "int32" + }, + "name": { + "type": "string", + "nullable": true + }, + "gender": { + "$ref": "#/components/schemas/PetGenderEnum" + }, + "date_of_birth": { + "type": "string", + "format": "date-time", + "nullable": true + }, + "weight": { + "type": "string", + "nullable": true + }, + "comments": { + "type": "string", + "nullable": true + }, + "breed_id": { + "type": "integer", + "format": "int32", + "nullable": true + }, + "breed_id2": { + "type": "integer", + "format": "int32", + "nullable": true + }, + "food_type_id": { + "type": "integer", + "format": "int32", + "nullable": true + }, + "household_id": { + "type": "integer", + "format": "int32", + "nullable": true + }, + "photo_id": { + "type": "integer", + "format": "int32", + "nullable": true + }, + "species_id": { + "type": "integer", + "format": "int32", + "nullable": true + }, + "spayed": { + "$ref": "#/components/schemas/SpayedEnum" + }, + "tag_id": { + "type": "integer", + "format": "int32", + "nullable": true + }, + "version": { + "type": "integer", + "format": "int32" + }, + "created_at": { + "type": "string", + "format": "date-time", + "nullable": true + }, + "updated_at": { + "type": "string", + "format": "date-time", + "nullable": true + }, + "deleted_at": { + "type": "string", + "format": "date-time", + "nullable": true + }, + "photo": { + "$ref": "#/components/schemas/PhotoResource" + }, + "conditions": { + "type": "array", + "items": { + "$ref": "#/components/schemas/PetConditionResource" + }, + "nullable": true + }, + "tag": { + "$ref": "#/components/schemas/TagResource" + }, + "status": { + "$ref": "#/components/schemas/PetStatusResource" + }, + "position": { + "$ref": "#/components/schemas/PetPositionResource" + } + }, + "additionalProperties": false + }, + "PetResourceDataResponse": { + "type": "object", + "properties": { + "data": { + "$ref": "#/components/schemas/PetResource" + } + }, + "additionalProperties": false + }, + "PetResourcePaginatedDataResult": { + "type": "object", + "properties": { + "data": { + "type": "array", + "items": { + "$ref": "#/components/schemas/PetResource" + }, + "nullable": true + }, + "meta": { + "$ref": "#/components/schemas/PaginatedMetaDataResult" + } + }, + "additionalProperties": false + }, + "PetStatusResource": { + "type": "object", + "properties": { + "pet_id": { + "type": "integer", + "format": "int32", + "nullable": true + }, + "activity": { + "$ref": "#/components/schemas/PetPositionResource" + }, + "feeding": { + "$ref": "#/components/schemas/PetConsumptionStatusResource" + }, + "drinking": { + "$ref": "#/components/schemas/PetConsumptionStatusResource" + } + }, + "additionalProperties": false + }, + "PetStatusResourceDataResponse": { + "type": "object", + "properties": { + "data": { + "$ref": "#/components/schemas/PetStatusResource" + } + }, + "additionalProperties": false + }, + "PetStatusResourcePaginatedDataResult": { + "type": "object", + "properties": { + "data": { + "type": "array", + "items": { + "$ref": "#/components/schemas/PetStatusResource" + }, + "nullable": true + }, + "meta": { + "$ref": "#/components/schemas/PaginatedMetaDataResult" + } + }, + "additionalProperties": false + }, + "PhotoResource": { + "type": "object", + "properties": { + "id": { + "type": "integer", + "format": "int32" + }, + "title": { + "type": "string", + "nullable": true + }, + "location": { + "type": "string", + "nullable": true + }, + "hash": { + "type": "string", + "nullable": true + }, + "uploading_user_id": { + "type": "integer", + "format": "int32" + }, + "version": { + "type": "integer", + "format": "int32" + }, + "created_at": { + "type": "string", + "format": "date-time", + "nullable": true + }, + "updated_at": { + "type": "string", + "format": "date-time", + "nullable": true + } + }, + "additionalProperties": false + }, + "PhotoResourceDataResponse": { + "type": "object", + "properties": { + "data": { + "$ref": "#/components/schemas/PhotoResource" + } + }, + "additionalProperties": false + }, + "PhotoResourcePaginatedDataResult": { + "type": "object", + "properties": { + "data": { + "type": "array", + "items": { + "$ref": "#/components/schemas/PhotoResource" + }, + "nullable": true + }, + "meta": { + "$ref": "#/components/schemas/PaginatedMetaDataResult" + } + }, + "additionalProperties": false + }, + "ProblemDetails": { + "type": "object", + "properties": { + "type": { + "type": "string", + "nullable": true + }, + "title": { + "type": "string", + "nullable": true + }, + "status": { + "type": "integer", + "format": "int32", + "nullable": true + }, + "detail": { + "type": "string", + "nullable": true + }, + "instance": { + "type": "string", + "nullable": true + } + }, + "additionalProperties": { } + }, + "ProductQueryResource": { + "type": "object", + "properties": { + "page": { + "type": "integer", + "format": "int32" + }, + "items_per_page": { + "type": "integer", + "format": "int32" + }, + "page_size": { + "type": "integer", + "format": "int32" + }, + "lang": { + "type": "string", + "nullable": true + } + }, + "additionalProperties": false + }, + "ProductResource": { + "type": "object", + "properties": { + "id": { + "type": "integer", + "format": "int32" + }, + "name": { + "type": "string", + "nullable": true + }, + "version": { + "type": "integer", + "format": "int32" + }, + "created_at": { + "type": "string", + "format": "date-time", + "nullable": true + }, + "updated_at": { + "type": "string", + "format": "date-time", + "nullable": true + } + }, + "additionalProperties": false + }, + "ProductResourceDataResponse": { + "type": "object", + "properties": { + "data": { + "$ref": "#/components/schemas/ProductResource" + } + }, + "additionalProperties": false + }, + "ProductResourcePaginatedDataResult": { + "type": "object", + "properties": { + "data": { + "type": "array", + "items": { + "$ref": "#/components/schemas/ProductResource" + }, + "nullable": true + }, + "meta": { + "$ref": "#/components/schemas/PaginatedMetaDataResult" + } + }, + "additionalProperties": false + }, + "PublicUserResource": { + "type": "object", + "properties": { + "id": { + "type": "integer", + "format": "int32" + }, + "name": { + "type": "string", + "nullable": true + }, + "photo_id": { + "type": "integer", + "format": "int32", + "nullable": true + }, + "photo": { + "$ref": "#/components/schemas/PhotoResource" + } + }, + "additionalProperties": false + }, + "PublicUserResourceDataResponse": { + "type": "object", + "properties": { + "data": { + "$ref": "#/components/schemas/PublicUserResource" + } + }, + "additionalProperties": false + }, + "ReportHouseholdDrinkingDataPoint": { + "type": "object", + "properties": { + "datapoints": { + "type": "array", + "items": { + "$ref": "#/components/schemas/ReportHouseholdDrinkingResource" + }, + "nullable": true + } + }, + "additionalProperties": false + }, + "ReportHouseholdDrinkingResource": { + "type": "object", + "properties": { + "from": { + "type": "string", + "format": "date-time", + "nullable": true + }, + "to": { + "type": "string", + "format": "date-time", + "nullable": true + }, + "duration": { + "type": "integer", + "format": "int32", + "nullable": true + }, + "context": { + "type": "integer", + "format": "int32", + "nullable": true + }, + "bowl_count": { + "type": "integer", + "format": "int32", + "nullable": true + }, + "device_id": { + "type": "integer", + "format": "int32", + "nullable": true + }, + "weights": { + "type": "array", + "items": { + "$ref": "#/components/schemas/ReportWeightFrame" + }, + "nullable": true + }, + "actual_weight": { + "type": "number", + "format": "double", + "nullable": true + }, + "entry_user_id": { + "type": "integer", + "format": "int32", + "nullable": true + }, + "exit_user_id": { + "type": "integer", + "format": "int32", + "nullable": true + }, + "created_at": { + "type": "string", + "format": "date-time", + "nullable": true + }, + "updated_at": { + "type": "string", + "format": "date-time", + "nullable": true + }, + "deleted_at": { + "type": "string", + "format": "date-time", + "nullable": true + }, + "tag_id": { + "type": "integer", + "format": "int32", + "nullable": true + }, + "user_id": { + "type": "integer", + "format": "int32", + "nullable": true + } + }, + "additionalProperties": false + }, + "ReportHouseholdFeedingDataPoint": { + "type": "object", + "properties": { + "datapoints": { + "type": "array", + "items": { + "$ref": "#/components/schemas/ReportHouseholdFeedingResource" + }, + "nullable": true + } + }, + "additionalProperties": false + }, + "ReportHouseholdFeedingResource": { + "type": "object", + "properties": { + "from": { + "type": "string", + "format": "date-time", + "nullable": true + }, + "to": { + "type": "string", + "format": "date-time", + "nullable": true + }, + "duration": { + "type": "integer", + "format": "int32", + "nullable": true + }, + "context": { + "type": "integer", + "format": "int32", + "nullable": true + }, + "bowl_count": { + "type": "integer", + "format": "int32", + "nullable": true + }, + "device_id": { + "type": "integer", + "format": "int32", + "nullable": true + }, + "weights": { + "type": "array", + "items": { + "$ref": "#/components/schemas/ReportWeightFrame" + }, + "nullable": true + }, + "actual_weight": { + "type": "number", + "format": "double", + "nullable": true + }, + "entry_user_id": { + "type": "integer", + "format": "int32", + "nullable": true + }, + "exit_user_id": { + "type": "integer", + "format": "int32", + "nullable": true + }, + "created_at": { + "type": "string", + "format": "date-time", + "nullable": true + }, + "updated_at": { + "type": "string", + "format": "date-time", + "nullable": true + }, + "deleted_at": { + "type": "string", + "format": "date-time", + "nullable": true + }, + "tag_id": { + "type": "integer", + "format": "int32", + "nullable": true + }, + "user_id": { + "type": "integer", + "format": "int32", + "nullable": true + } + }, + "additionalProperties": false + }, + "ReportHouseholdMovementDataPoint": { + "type": "object", + "properties": { + "datapoints": { + "type": "array", + "items": { + "$ref": "#/components/schemas/ReportHouseholdMovementResource" + }, + "nullable": true + } + }, + "additionalProperties": false + }, + "ReportHouseholdMovementResource": { + "type": "object", + "properties": { + "created_at": { + "type": "string", + "format": "date-time", + "nullable": true + }, + "updated_at": { + "type": "string", + "format": "date-time", + "nullable": true + }, + "deleted_at": { + "type": "string", + "format": "date-time", + "nullable": true + }, + "device_id": { + "type": "integer", + "format": "int32", + "nullable": true + }, + "tag_id": { + "type": "integer", + "format": "int32", + "nullable": true + }, + "user_id": { + "type": "integer", + "format": "int32", + "nullable": true + }, + "from": { + "type": "string", + "format": "date-time", + "nullable": true + }, + "to": { + "type": "string", + "format": "date-time", + "nullable": true + }, + "duration": { + "type": "integer", + "format": "int32", + "nullable": true + }, + "entry_device_id": { + "type": "integer", + "format": "int32", + "nullable": true + }, + "entry_user_id": { + "type": "integer", + "format": "int32", + "nullable": true + }, + "exit_device_id": { + "type": "integer", + "format": "int32", + "nullable": true + }, + "exit_user_id": { + "type": "integer", + "format": "int32", + "nullable": true + }, + "active": { + "type": "boolean", + "nullable": true + }, + "exit_movement_id": { + "type": "integer", + "format": "int64" + }, + "entry_movement_id": { + "type": "integer", + "format": "int64" + } + }, + "additionalProperties": false + }, + "ReportHouseholdQueryResource": { + "type": "object", + "properties": { + "from": { + "type": "string", + "format": "date-time", + "nullable": true + }, + "to": { + "type": "string", + "format": "date-time", + "nullable": true + } + }, + "additionalProperties": false + }, + "ReportHouseholdResource": { + "type": "object", + "properties": { + "pet_id": { + "type": "integer", + "format": "int32", + "nullable": true + }, + "device_id": { + "type": "integer", + "format": "int32", + "nullable": true + }, + "movement": { + "$ref": "#/components/schemas/ReportHouseholdMovementDataPoint" + }, + "feeding": { + "$ref": "#/components/schemas/ReportHouseholdFeedingDataPoint" + }, + "drinking": { + "$ref": "#/components/schemas/ReportHouseholdDrinkingDataPoint" + }, + "consumption_habit": { + "type": "array", + "items": { + "$ref": "#/components/schemas/ConsumptionHabitResource" + }, + "nullable": true + }, + "consumption_alert": { + "type": "array", + "items": { + "$ref": "#/components/schemas/ConsumptionAlertResource" + }, + "nullable": true + } + }, + "additionalProperties": false + }, + "ReportHouseholdResourceDataResponse": { + "type": "object", + "properties": { + "data": { + "$ref": "#/components/schemas/ReportHouseholdResource" + } + }, + "additionalProperties": false + }, + "ReportHouseholdResourceListDataResponse": { + "type": "object", + "properties": { + "data": { + "type": "array", + "items": { + "$ref": "#/components/schemas/ReportHouseholdResource" + }, + "nullable": true + } + }, + "additionalProperties": false + }, + "ReportWeightFrame": { + "type": "object", + "properties": { + "index": { + "type": "integer", + "format": "int32", + "nullable": true + }, + "weight": { + "type": "number", + "format": "double" + }, + "change": { + "type": "number", + "format": "double" + }, + "food_type_id": { + "type": "integer", + "format": "int32", + "nullable": true + }, + "target_weight": { + "type": "integer", + "format": "int32", + "nullable": true + }, + "multi": { + "type": "boolean", + "nullable": true + } + }, + "additionalProperties": false + }, + "RequestChangeStateResponseStatus": { + "enum": [ + 0, + 1, + 2, + 3, + 4, + 5 + ], + "type": "integer", + "format": "int32" + }, + "SpayedEnum": { + "enum": [ + 0, + 1, + 2 + ], + "type": "integer", + "format": "int32" + }, + "SpecialProfiles": { + "enum": [ + 0, + 1, + 2, + 3, + 4, + 5, + 6 + ], + "type": "integer", + "format": "int32" + }, + "SpeciesQueryResource": { + "type": "object", + "properties": { + "page": { + "type": "integer", + "format": "int32" + }, + "items_per_page": { + "type": "integer", + "format": "int32" + }, + "page_size": { + "type": "integer", + "format": "int32" + }, + "lang": { + "type": "string", + "nullable": true + } + }, + "additionalProperties": false + }, + "SpeciesResource": { + "type": "object", + "properties": { + "id": { + "type": "integer", + "format": "int32" + }, + "name": { + "type": "string", + "nullable": true + }, + "version": { + "type": "integer", + "format": "int32" + }, + "created_at": { + "type": "string", + "format": "date-time", + "nullable": true + }, + "updated_at": { + "type": "string", + "format": "date-time", + "nullable": true + } + }, + "additionalProperties": false + }, + "SpeciesResourceDataResponse": { + "type": "object", + "properties": { + "data": { + "$ref": "#/components/schemas/SpeciesResource" + } + }, + "additionalProperties": false + }, + "SpeciesResourcePaginatedDataResult": { + "type": "object", + "properties": { + "data": { + "type": "array", + "items": { + "$ref": "#/components/schemas/SpeciesResource" + }, + "nullable": true + }, + "meta": { + "$ref": "#/components/schemas/PaginatedMetaDataResult" + } + }, + "additionalProperties": false + }, + "StartQueryResource": { + "type": "object", + "properties": { + "lang": { + "type": "string", + "nullable": true + } + }, + "additionalProperties": false + }, + "StartResource": { + "type": "object", + "properties": { + "breed": { + "type": "array", + "items": { + "$ref": "#/components/schemas/BreedResource" + }, + "nullable": true + }, + "condition": { + "type": "array", + "items": { + "$ref": "#/components/schemas/ConditionResource" + }, + "nullable": true + }, + "country": { + "type": "array", + "items": { + "$ref": "#/components/schemas/CountryResource" + }, + "nullable": true + }, + "language": { + "type": "array", + "items": { + "$ref": "#/components/schemas/LanguageResource" + }, + "nullable": true + }, + "product": { + "type": "array", + "items": { + "$ref": "#/components/schemas/ProductResource" + }, + "nullable": true + }, + "timezone": { + "type": "array", + "items": { + "$ref": "#/components/schemas/TimezoneResource" + }, + "nullable": true + } + }, + "additionalProperties": false + }, + "StartResourceDataResponse": { + "type": "object", + "properties": { + "data": { + "$ref": "#/components/schemas/StartResource" + } + }, + "additionalProperties": false + }, + "SubstanceTypesEnum": { + "enum": [ + 0, + 1, + 2 + ], + "type": "integer", + "format": "int32" + }, + "TagDeviceResource": { + "type": "object", + "properties": { + "id": { + "type": "integer", + "format": "int32" + }, + "index": { + "type": "integer", + "format": "int32" + }, + "profile": { + "type": "integer", + "format": "int32", + "nullable": true + }, + "version": { + "type": "integer", + "format": "int32" + }, + "created_at": { + "type": "string", + "format": "date-time", + "nullable": true + }, + "updated_at": { + "type": "string", + "format": "date-time", + "nullable": true + } + }, + "additionalProperties": false + }, + "TagDeviceResourceDataResponse": { + "type": "object", + "properties": { + "data": { + "$ref": "#/components/schemas/TagDeviceResource" + } + }, + "additionalProperties": false + }, + "TagDeviceResourcePaginatedDataResult": { + "type": "object", + "properties": { + "data": { + "type": "array", + "items": { + "$ref": "#/components/schemas/TagDeviceResource" + }, + "nullable": true + }, + "meta": { + "$ref": "#/components/schemas/PaginatedMetaDataResult" + } + }, + "additionalProperties": false + }, + "TagResource": { + "type": "object", + "properties": { + "id": { + "type": "integer", + "format": "int32" + }, + "tag": { + "type": "string", + "nullable": true + }, + "supported_product_ids": { + "type": "array", + "items": { + "$ref": "#/components/schemas/DeviceType" + }, + "description": "List of device types that can potentially use this tag.\r\nIncludes devices that support the tag natively or through manual learning/training.\r\nDoes not include devices with hardware restrictions that make them incompatible.", + "nullable": true + }, + "incompatible_product_ids": { + "type": "array", + "items": { + "$ref": "#/components/schemas/DeviceType" + }, + "description": "List of device types that cannot use this tag due to hardware limitations.\r\nFor example, DualScanPetDoor only supports FDX-B tags due to hardware constraints,\r\nso all non-FDX-B tags will include DualScanPetDoor in this list.\r\nThese restrictions cannot be overcome through manual learning or configuration.", + "nullable": true + }, + "version": { + "type": "integer", + "format": "int32" + }, + "created_at": { + "type": "string", + "format": "date-time", + "nullable": true + }, + "updated_at": { + "type": "string", + "format": "date-time", + "nullable": true + }, + "deleted_at": { + "type": "string", + "format": "date-time", + "nullable": true + } + }, + "additionalProperties": false + }, + "TagResourceDataResponse": { + "type": "object", + "properties": { + "data": { + "$ref": "#/components/schemas/TagResource" + } + }, + "additionalProperties": false + }, + "TagResourcePaginatedDataResult": { + "type": "object", + "properties": { + "data": { + "type": "array", + "items": { + "$ref": "#/components/schemas/TagResource" + }, + "nullable": true + }, + "meta": { + "$ref": "#/components/schemas/PaginatedMetaDataResult" + } + }, + "additionalProperties": false + }, + "TimelineEventType": { + "enum": [ + 0, + 1, + 2, + 3, + 6, + 7, + 9, + 10, + 11, + 12, + 13, + 14, + 17, + 18, + 19, + 20, + 21, + 22, + 23, + 24, + 25, + 28, + 29, + 30, + 31, + 32, + 33, + 34, + 35, + 36, + 40, + 50, + 51, + 52, + 53, + 54, + 55, + 9999, + 19999, + 20000, + 20001, + 20002, + 20003, + 20004, + 20005, + 20006, + 20007, + 20008, + 20009, + 20010, + 20011, + 20012, + 20399, + 20400, + 20401, + 20402, + 20403, + 20404, + 20405, + 20406, + 20407, + 20408, + 20409, + 20410, + 20411, + 20999, + 21000, + 21001, + 21002, + 21003, + 21004, + 21005, + 21006, + 21007, + 21008, + 21009, + 21010, + 21011, + 21012, + 21013, + 21014, + 21015, + 21016, + 21017, + 21018, + 21019, + 21020, + 21999, + 23000, + 23001, + 23002, + 23003, + 23004, + 23005, + 23006, + 23999, + 24999, + 26999, + 28999, + 30000, + 30001, + 30002 + ], + "type": "integer", + "format": "int32" + }, + "TimelineResource": { + "type": "object", + "properties": { + "id": { + "type": "integer", + "format": "int64" + }, + "type": { + "type": "integer", + "format": "int32" + }, + "data": { + "type": "string", + "nullable": true + }, + "created_at": { + "type": "string", + "format": "date-time", + "nullable": true + }, + "updated_at": { + "type": "string", + "format": "date-time", + "nullable": true + }, + "households": { + "type": "array", + "items": { + "$ref": "#/components/schemas/HouseholdResource" + }, + "nullable": true + }, + "devices": { + "type": "array", + "items": { + "$ref": "#/components/schemas/DeviceResource" + }, + "nullable": true + }, + "movements": { + "type": "array", + "items": { + "$ref": "#/components/schemas/MovementResource" + }, + "nullable": true + }, + "pets": { + "type": "array", + "items": { + "$ref": "#/components/schemas/PetResource" + }, + "nullable": true + }, + "tags": { + "type": "array", + "items": { + "$ref": "#/components/schemas/TagResource" + }, + "nullable": true + }, + "users": { + "type": "array", + "items": { + "$ref": "#/components/schemas/PublicUserResource" + }, + "nullable": true + }, + "weights": { + "type": "array", + "items": { + "$ref": "#/components/schemas/WeightResource" + }, + "nullable": true + } + }, + "additionalProperties": false + }, + "TimelineResourcePaginatedDataResult": { + "type": "object", + "properties": { + "data": { + "type": "array", + "items": { + "$ref": "#/components/schemas/TimelineResource" + }, + "nullable": true + }, + "meta": { + "$ref": "#/components/schemas/PaginatedMetaDataResult" + } + }, + "additionalProperties": false + }, + "TimezoneResource": { + "type": "object", + "properties": { + "id": { + "type": "integer", + "format": "int32" + }, + "name": { + "type": "string", + "nullable": true + }, + "timezone": { + "type": "string", + "nullable": true + }, + "utc_offset": { + "type": "integer", + "format": "int32" + }, + "created_at": { + "type": "string", + "format": "date-time", + "nullable": true + }, + "updated_at": { + "type": "string", + "format": "date-time", + "nullable": true + } + }, + "additionalProperties": false + }, + "TimezoneResourceDataResponse": { + "type": "object", + "properties": { + "data": { + "$ref": "#/components/schemas/TimezoneResource" + } + }, + "additionalProperties": false + }, + "TimezoneResourcePaginatedDataResult": { + "type": "object", + "properties": { + "data": { + "type": "array", + "items": { + "$ref": "#/components/schemas/TimezoneResource" + }, + "nullable": true + }, + "meta": { + "$ref": "#/components/schemas/PaginatedMetaDataResult" + } + }, + "additionalProperties": false + }, + "UpdateDeviceResource": { + "required": [ + "name" + ], + "type": "object", + "properties": { + "name": { + "maxLength": 50, + "minLength": 1, + "type": "string" + } + }, + "additionalProperties": false + }, + "UpdateDeviceTagResource": { + "type": "object", + "properties": { + "profile": { + "$ref": "#/components/schemas/SpecialProfiles" + } + }, + "additionalProperties": false + }, + "UpdateHouseholdInviteResource": { + "type": "object", + "properties": { + "owner": { + "type": "boolean", + "nullable": true + }, + "write": { + "type": "boolean", + "nullable": true + } + }, + "additionalProperties": false + }, + "UpdateHouseholdResource": { + "type": "object", + "properties": { + "name": { + "type": "string", + "nullable": true + }, + "timezone_id": { + "type": "integer", + "format": "int32", + "nullable": true + } + }, + "additionalProperties": false + }, + "UpdateHouseholdUserResource": { + "type": "object", + "properties": { + "owner": { + "type": "boolean", + "nullable": true + }, + "write": { + "type": "boolean", + "nullable": true + } + }, + "additionalProperties": false + }, + "UpdateMeResource": { + "type": "object", + "properties": { + "email_address": { + "type": "string", + "format": "email", + "nullable": true + }, + "first_name": { + "type": "string", + "nullable": true + }, + "last_name": { + "type": "string", + "nullable": true + }, + "language_id": { + "type": "integer", + "format": "int32", + "nullable": true + }, + "country_id": { + "type": "integer", + "format": "int32", + "nullable": true + }, + "photo_id": { + "type": "integer", + "format": "int32", + "nullable": true + }, + "marketing_opt_in": { + "type": "boolean", + "nullable": true + }, + "weight_units": { + "$ref": "#/components/schemas/UserWeightUnitEnum" + }, + "time_format": { + "$ref": "#/components/schemas/UserTimeFormatEnum" + }, + "notifications": { + "type": "object", + "additionalProperties": { + "type": "boolean" + }, + "nullable": true + }, + "password": { + "type": "string", + "nullable": true + } + }, + "additionalProperties": false + }, + "UpdatePetResource": { + "required": [ + "name" + ], + "type": "object", + "properties": { + "name": { + "maxLength": 50, + "minLength": 1, + "type": "string" + }, + "gender": { + "$ref": "#/components/schemas/PetGenderEnum" + }, + "date_of_birth": { + "type": "string", + "format": "date-time", + "nullable": true + }, + "weight": { + "maximum": 2147483647, + "minimum": 0, + "exclusiveMinimum": true, + "type": "number", + "format": "double", + "nullable": true + }, + "comments": { + "maxLength": 200, + "type": "string", + "nullable": true + }, + "breed_id": { + "type": "integer", + "format": "int32", + "nullable": true + }, + "breed_id2": { + "type": "integer", + "format": "int32", + "nullable": true + }, + "spayed": { + "$ref": "#/components/schemas/SpayedEnum" + }, + "food_type_id": { + "type": "integer", + "format": "int32", + "nullable": true + }, + "photo_id": { + "type": "integer", + "format": "int32", + "nullable": true + }, + "species_id": { + "type": "integer", + "format": "int32", + "nullable": true + }, + "conditions": { + "type": "array", + "items": { + "$ref": "#/components/schemas/ConditionResource" + }, + "nullable": true + } + }, + "additionalProperties": false + }, + "UpdatePhotoResource": { + "type": "object", + "properties": { + "title": { + "type": "string", + "nullable": true + } + }, + "additionalProperties": false + }, + "UpdateUserSettingsResource": { + "required": [ + "value" + ], + "type": "object", + "properties": { + "value": { + "minLength": 1, + "type": "string" + } + }, + "additionalProperties": false + }, + "UserClientPlatformAppResource": { + "type": "object", + "properties": { + "bundle_identifier": { + "type": "string", + "nullable": true + }, + "version": { + "type": "string", + "nullable": true + } + }, + "additionalProperties": false + }, + "UserClientPlatformDeviceModelResource": { + "type": "object", + "properties": { + "name": { + "type": "string", + "nullable": true + }, + "manufacturer": { + "type": "string", + "nullable": true + }, + "version": { + "type": "string", + "nullable": true + } + }, + "additionalProperties": false + }, + "UserClientPlatformDeviceOsResource": { + "type": "object", + "properties": { + "platform": { + "type": "string", + "nullable": true + }, + "version": { + "type": "string", + "nullable": true + } + }, + "additionalProperties": false + }, + "UserClientPlatformDeviceResource": { + "type": "object", + "properties": { + "name": { + "type": "string", + "nullable": true + }, + "model": { + "$ref": "#/components/schemas/UserClientPlatformDeviceModelResource" + }, + "uuid": { + "type": "string", + "nullable": true + }, + "os": { + "$ref": "#/components/schemas/UserClientPlatformDeviceOsResource" + } + }, + "additionalProperties": false + }, + "UserClientPlatformLocaleResource": { + "type": "object", + "properties": { + "language": { + "type": "string", + "nullable": true + }, + "country": { + "type": "string", + "nullable": true + } + }, + "additionalProperties": false + }, + "UserClientPlatformResource": { + "type": "object", + "properties": { + "app": { + "$ref": "#/components/schemas/UserClientPlatformAppResource" + }, + "device": { + "$ref": "#/components/schemas/UserClientPlatformDeviceResource" + }, + "locale": { + "$ref": "#/components/schemas/UserClientPlatformLocaleResource" + } + }, + "additionalProperties": false + }, + "UserClientResource": { + "type": "object", + "properties": { + "platform": { + "$ref": "#/components/schemas/UserClientPlatformResource" + }, + "token": { + "type": "string", + "nullable": true + } + }, + "additionalProperties": false + }, + "UserClientResourceDataResponse": { + "type": "object", + "properties": { + "data": { + "$ref": "#/components/schemas/UserClientResource" + } + }, + "additionalProperties": false + }, + "UserClientResourcePaginatedDataResult": { + "type": "object", + "properties": { + "data": { + "type": "array", + "items": { + "$ref": "#/components/schemas/UserClientResource" + }, + "nullable": true + }, + "meta": { + "$ref": "#/components/schemas/PaginatedMetaDataResult" + } + }, + "additionalProperties": false + }, + "UserResource": { + "type": "object", + "properties": { + "id": { + "type": "integer", + "format": "int32" + }, + "email_address": { + "type": "string", + "nullable": true + }, + "first_name": { + "type": "string", + "nullable": true + }, + "last_name": { + "type": "string", + "nullable": true + }, + "country_id": { + "type": "integer", + "format": "int32", + "nullable": true + }, + "language_id": { + "type": "integer", + "format": "int32", + "nullable": true + }, + "photo_id": { + "type": "integer", + "format": "int32", + "nullable": true + }, + "marketing_opt_in": { + "type": "boolean", + "nullable": true + }, + "terms_accepted": { + "type": "string", + "format": "date-time", + "nullable": true + }, + "weight_units": { + "type": "integer", + "format": "int32", + "nullable": true + }, + "time_format": { + "type": "integer", + "format": "int32", + "nullable": true + }, + "notifications": { + "type": "object", + "additionalProperties": { + "type": "boolean" + }, + "nullable": true + }, + "photo": { + "$ref": "#/components/schemas/PhotoResource" + }, + "version": { + "type": "integer", + "format": "int32" + }, + "created_at": { + "type": "string", + "format": "date-time", + "nullable": true + }, + "updated_at": { + "type": "string", + "format": "date-time", + "nullable": true + }, + "use_colour": { + "type": "string", + "nullable": true + } + }, + "additionalProperties": false + }, + "UserResourceDataResponse": { + "type": "object", + "properties": { + "data": { + "$ref": "#/components/schemas/UserResource" + } + }, + "additionalProperties": false + }, + "UserSettingResource": { + "type": "object", + "properties": { + "id": { + "type": "integer", + "format": "int32" + }, + "user_id": { + "type": "integer", + "format": "int32", + "nullable": true + }, + "key": { + "type": "string", + "nullable": true + }, + "value": { + "type": "string", + "nullable": true + }, + "version": { + "type": "integer", + "format": "int32" + }, + "created_at": { + "type": "string", + "format": "date-time", + "nullable": true + }, + "updated_at": { + "type": "string", + "format": "date-time", + "nullable": true + } + }, + "additionalProperties": false + }, + "UserSettingResourceDataResponse": { + "type": "object", + "properties": { + "data": { + "$ref": "#/components/schemas/UserSettingResource" + } + }, + "additionalProperties": false + }, + "UserSettingResourcePaginatedDataResult": { + "type": "object", + "properties": { + "data": { + "type": "array", + "items": { + "$ref": "#/components/schemas/UserSettingResource" + }, + "nullable": true + }, + "meta": { + "$ref": "#/components/schemas/PaginatedMetaDataResult" + } + }, + "additionalProperties": false + }, + "UserTimeFormatEnum": { + "enum": [ + 0, + 1 + ], + "type": "integer", + "format": "int32" + }, + "UserWeightUnitEnum": { + "enum": [ + 0, + 1 + ], + "type": "integer", + "format": "int32" + }, + "WeightFrameResource": { + "type": "object", + "properties": { + "id": { + "type": "integer", + "format": "int32" + }, + "index": { + "type": "integer", + "format": "int32", + "nullable": true + }, + "current_weight": { + "type": "number", + "format": "float" + }, + "change": { + "type": "number", + "format": "float" + }, + "created_at": { + "type": "string", + "format": "date-time", + "nullable": true + }, + "updated_at": { + "type": "string", + "format": "date-time", + "nullable": true + } + }, + "additionalProperties": false + }, + "WeightResource": { + "type": "object", + "properties": { + "id": { + "type": "integer", + "format": "int64" + }, + "device_id": { + "type": "integer", + "format": "int32", + "nullable": true + }, + "tag_id": { + "type": "integer", + "format": "int32", + "nullable": true + }, + "context": { + "type": "integer", + "format": "int32", + "nullable": true + }, + "duration": { + "type": "integer", + "format": "int32", + "nullable": true + }, + "created_at": { + "type": "string", + "format": "date-time", + "nullable": true + }, + "updated_at": { + "type": "string", + "format": "date-time", + "nullable": true + }, + "frames": { + "type": "array", + "items": { + "$ref": "#/components/schemas/WeightFrameResource" + }, + "nullable": true + } + }, + "additionalProperties": false + } + } + } +} \ No newline at end of file From 68c7eb6e03580f99482d8ca5ed561f5fe02b48d8 Mon Sep 17 00:00:00 2001 From: Fabian Eulitz Date: Wed, 18 Feb 2026 22:12:52 +0100 Subject: [PATCH 08/15] Add swagger files --- resources/{swagger.json => swagger_v1.json} | 0 resources/swagger_v2.json | 3427 +++++++++++++++++++ 2 files changed, 3427 insertions(+) rename resources/{swagger.json => swagger_v1.json} (100%) create mode 100644 resources/swagger_v2.json diff --git a/resources/swagger.json b/resources/swagger_v1.json similarity index 100% rename from resources/swagger.json rename to resources/swagger_v1.json diff --git a/resources/swagger_v2.json b/resources/swagger_v2.json new file mode 100644 index 0000000..622cd18 --- /dev/null +++ b/resources/swagger_v2.json @@ -0,0 +1,3427 @@ +{ + "openapi": "3.0.1", + "info": { + "title": "App API" + }, + "paths": { + "/api/v2/product/6/device/{deviceId}/control": { + "get": { + "tags": [ + "DeviceControlDualScanConnect" + ], + "summary": "Will return the current state for a device and any inflight state changes", + "parameters": [ + { + "name": "deviceId", + "in": "path", + "required": true, + "schema": { + "type": "integer", + "format": "int32" + } + } + ], + "responses": { + "200": { + "description": "OK", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/DeviceControlDualScanResourceV2DeviceControlResource" + } + } + } + }, + "400": { + "description": "Bad Request", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResource" + } + } + } + }, + "403": { + "description": "Forbidden", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ProblemDetails" + } + } + } + }, + "404": { + "description": "Not Found", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResource" + } + } + } + }, + "422": { + "description": "Unprocessable Content", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResource" + } + } + } + }, + "500": { + "description": "Internal Server Error" + } + } + } + }, + "/api/v2/product/6/device/{deviceId}/control/async": { + "put": { + "tags": [ + "DeviceControlDualScanConnect" + ], + "summary": "Queue a state change, the returned request_id can then be tracked in api/device/{deviceId}/control/status", + "parameters": [ + { + "name": "deviceId", + "in": "path", + "required": true, + "schema": { + "type": "integer", + "format": "int32" + } + } + ], + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/DeviceControlDualScanResourceV2" + } + }, + "text/json": { + "schema": { + "$ref": "#/components/schemas/DeviceControlDualScanResourceV2" + } + }, + "application/*+json": { + "schema": { + "$ref": "#/components/schemas/DeviceControlDualScanResourceV2" + } + } + } + }, + "responses": { + "200": { + "description": "OK", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/DeviceControlDualScanResourceV2DeviceControlResource" + } + } + } + }, + "400": { + "description": "Bad Request", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResource" + } + } + } + }, + "403": { + "description": "Forbidden", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ProblemDetails" + } + } + } + }, + "404": { + "description": "Not Found", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResource" + } + } + } + }, + "422": { + "description": "Unprocessable Content", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResource" + } + } + } + }, + "500": { + "description": "Internal Server Error" + } + } + } + }, + "/api/v2/product/10/device/{deviceId}/control": { + "get": { + "tags": [ + "DeviceControlDualScanPetDoor" + ], + "summary": "Will return the current state for a device and any inflight state changes", + "parameters": [ + { + "name": "deviceId", + "in": "path", + "required": true, + "schema": { + "type": "integer", + "format": "int32" + } + } + ], + "responses": { + "200": { + "description": "OK", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/DeviceControlDualScanPetDoorResourceV2DeviceControlResource" + } + } + } + }, + "400": { + "description": "Bad Request", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResource" + } + } + } + }, + "403": { + "description": "Forbidden", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ProblemDetails" + } + } + } + }, + "404": { + "description": "Not Found", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResource" + } + } + } + }, + "422": { + "description": "Unprocessable Content", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResource" + } + } + } + }, + "500": { + "description": "Internal Server Error" + } + } + } + }, + "/api/v2/product/10/device/{deviceId}/control/async": { + "put": { + "tags": [ + "DeviceControlDualScanPetDoor" + ], + "summary": "Queue a state change, the returned request_id can then be tracked in api/device/{deviceId}/control/status", + "parameters": [ + { + "name": "deviceId", + "in": "path", + "required": true, + "schema": { + "type": "integer", + "format": "int32" + } + } + ], + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/DeviceControlDualScanPetDoorResourceV2" + } + }, + "text/json": { + "schema": { + "$ref": "#/components/schemas/DeviceControlDualScanPetDoorResourceV2" + } + }, + "application/*+json": { + "schema": { + "$ref": "#/components/schemas/DeviceControlDualScanPetDoorResourceV2" + } + } + } + }, + "responses": { + "200": { + "description": "OK", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/DeviceControlDualScanPetDoorResourceV2DeviceControlResource" + } + } + } + }, + "400": { + "description": "Bad Request", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResource" + } + } + } + }, + "403": { + "description": "Forbidden", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ProblemDetails" + } + } + } + }, + "404": { + "description": "Not Found", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResource" + } + } + } + }, + "422": { + "description": "Unprocessable Content", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResource" + } + } + } + }, + "500": { + "description": "Internal Server Error" + } + } + } + }, + "/api/v2/product/4/device/{deviceId}/control": { + "get": { + "tags": [ + "DeviceControlFeederConnect" + ], + "summary": "Will return the current state for a device and any inflight state changes", + "parameters": [ + { + "name": "deviceId", + "in": "path", + "required": true, + "schema": { + "type": "integer", + "format": "int32" + } + } + ], + "responses": { + "200": { + "description": "OK", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/DeviceControlFeederResourceV2DeviceControlResource" + } + } + } + }, + "400": { + "description": "Bad Request", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResource" + } + } + } + }, + "403": { + "description": "Forbidden", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ProblemDetails" + } + } + } + }, + "404": { + "description": "Not Found", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResource" + } + } + } + }, + "422": { + "description": "Unprocessable Content", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResource" + } + } + } + }, + "500": { + "description": "Internal Server Error" + } + } + } + }, + "/api/v2/product/4/device/{deviceId}/control/async": { + "put": { + "tags": [ + "DeviceControlFeederConnect" + ], + "summary": "Queue a state change, the returned request_id can then be tracked in api/device/{deviceId}/control/status", + "parameters": [ + { + "name": "deviceId", + "in": "path", + "required": true, + "schema": { + "type": "integer", + "format": "int32" + } + } + ], + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/DeviceControlFeederResourceV2" + } + }, + "text/json": { + "schema": { + "$ref": "#/components/schemas/DeviceControlFeederResourceV2" + } + }, + "application/*+json": { + "schema": { + "$ref": "#/components/schemas/DeviceControlFeederResourceV2" + } + } + } + }, + "responses": { + "200": { + "description": "OK", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/DeviceControlFeederResourceV2DeviceControlResource" + } + } + } + }, + "400": { + "description": "Bad Request", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResource" + } + } + } + }, + "403": { + "description": "Forbidden", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ProblemDetails" + } + } + } + }, + "404": { + "description": "Not Found", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResource" + } + } + } + }, + "422": { + "description": "Unprocessable Content", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResource" + } + } + } + }, + "500": { + "description": "Internal Server Error" + } + } + } + }, + "/api/v2/product/1/device/{deviceId}/control": { + "get": { + "tags": [ + "DeviceControlHub" + ], + "summary": "Will return the current state for a device and any inflight state changes", + "parameters": [ + { + "name": "deviceId", + "in": "path", + "required": true, + "schema": { + "type": "integer", + "format": "int32" + } + } + ], + "responses": { + "200": { + "description": "OK", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/DeviceControlHubResourceDeviceControlResource" + } + } + } + }, + "400": { + "description": "Bad Request", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResource" + } + } + } + }, + "403": { + "description": "Forbidden", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ProblemDetails" + } + } + } + }, + "404": { + "description": "Not Found", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResource" + } + } + } + }, + "422": { + "description": "Unprocessable Content", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResource" + } + } + } + }, + "500": { + "description": "Internal Server Error" + } + } + } + }, + "/api/v2/product/1/device/{deviceId}/control/async": { + "put": { + "tags": [ + "DeviceControlHub" + ], + "summary": "Queue a state change, the returned request_id can then be tracked in api/device/{deviceId}/control/status", + "parameters": [ + { + "name": "deviceId", + "in": "path", + "required": true, + "schema": { + "type": "integer", + "format": "int32" + } + } + ], + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/DeviceControlHubResource" + } + }, + "text/json": { + "schema": { + "$ref": "#/components/schemas/DeviceControlHubResource" + } + }, + "application/*+json": { + "schema": { + "$ref": "#/components/schemas/DeviceControlHubResource" + } + } + } + }, + "responses": { + "200": { + "description": "OK", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/DeviceControlHubResourceDeviceControlResource" + } + } + } + }, + "400": { + "description": "Bad Request", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResource" + } + } + } + }, + "403": { + "description": "Forbidden", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ProblemDetails" + } + } + } + }, + "404": { + "description": "Not Found", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResource" + } + } + } + }, + "422": { + "description": "Unprocessable Content", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResource" + } + } + } + }, + "500": { + "description": "Internal Server Error" + } + } + } + }, + "/api/v2/product/32/device/{deviceId}/control": { + "get": { + "tags": [ + "DeviceControlNoIdDogBowlConnect" + ], + "summary": "Will return the current state for a device and any inflight state changes", + "parameters": [ + { + "name": "deviceId", + "in": "path", + "required": true, + "schema": { + "type": "integer", + "format": "int32" + } + } + ], + "responses": { + "200": { + "description": "OK", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/DeviceControlNoIdDogBowlResourceDeviceControlResource" + } + } + } + }, + "400": { + "description": "Bad Request", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResource" + } + } + } + }, + "403": { + "description": "Forbidden", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ProblemDetails" + } + } + } + }, + "404": { + "description": "Not Found", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResource" + } + } + } + }, + "422": { + "description": "Unprocessable Content", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResource" + } + } + } + }, + "500": { + "description": "Internal Server Error" + } + } + } + }, + "/api/v2/product/32/device/{deviceId}/control/async": { + "put": { + "tags": [ + "DeviceControlNoIdDogBowlConnect" + ], + "summary": "Queue a state change, the returned request_id can then be tracked in api/device/{deviceId}/control/status", + "parameters": [ + { + "name": "deviceId", + "in": "path", + "required": true, + "schema": { + "type": "integer", + "format": "int32" + } + } + ], + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/DeviceControlNoIdDogBowlResource" + } + }, + "text/json": { + "schema": { + "$ref": "#/components/schemas/DeviceControlNoIdDogBowlResource" + } + }, + "application/*+json": { + "schema": { + "$ref": "#/components/schemas/DeviceControlNoIdDogBowlResource" + } + } + } + }, + "responses": { + "200": { + "description": "OK", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/DeviceControlNoIdDogBowlResourceDeviceControlResource" + } + } + } + }, + "400": { + "description": "Bad Request", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResource" + } + } + } + }, + "403": { + "description": "Forbidden", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ProblemDetails" + } + } + } + }, + "404": { + "description": "Not Found", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResource" + } + } + } + }, + "422": { + "description": "Unprocessable Content", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResource" + } + } + } + }, + "500": { + "description": "Internal Server Error" + } + } + } + }, + "/api/v2/product/3/device/{deviceId}/control": { + "get": { + "tags": [ + "DeviceControlPetDoor" + ], + "summary": "Will return the current state for a device and any inflight state changes", + "parameters": [ + { + "name": "deviceId", + "in": "path", + "required": true, + "schema": { + "type": "integer", + "format": "int32" + } + } + ], + "responses": { + "200": { + "description": "OK", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/DeviceControlPetDoorResourceDeviceControlResource" + } + } + } + }, + "400": { + "description": "Bad Request", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResource" + } + } + } + }, + "403": { + "description": "Forbidden", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ProblemDetails" + } + } + } + }, + "404": { + "description": "Not Found", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResource" + } + } + } + }, + "422": { + "description": "Unprocessable Content", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResource" + } + } + } + }, + "500": { + "description": "Internal Server Error" + } + } + } + }, + "/api/v2/product/3/device/{deviceId}/control/async": { + "put": { + "tags": [ + "DeviceControlPetDoor" + ], + "summary": "Queue a state change, the returned request_id can then be tracked in api/device/{deviceId}/control/status", + "parameters": [ + { + "name": "deviceId", + "in": "path", + "required": true, + "schema": { + "type": "integer", + "format": "int32" + } + } + ], + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/DeviceControlPetDoorResource" + } + }, + "text/json": { + "schema": { + "$ref": "#/components/schemas/DeviceControlPetDoorResource" + } + }, + "application/*+json": { + "schema": { + "$ref": "#/components/schemas/DeviceControlPetDoorResource" + } + } + } + }, + "responses": { + "200": { + "description": "OK", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/DeviceControlPetDoorResourceDeviceControlResource" + } + } + } + }, + "400": { + "description": "Bad Request", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResource" + } + } + } + }, + "403": { + "description": "Forbidden", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ProblemDetails" + } + } + } + }, + "404": { + "description": "Not Found", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResource" + } + } + } + }, + "422": { + "description": "Unprocessable Content", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResource" + } + } + } + }, + "500": { + "description": "Internal Server Error" + } + } + } + }, + "/api/v2/product/8/device/{deviceId}/control": { + "get": { + "tags": [ + "DeviceControlPoseidonConnect" + ], + "summary": "Will return the current state for a device and any inflight state changes", + "parameters": [ + { + "name": "deviceId", + "in": "path", + "required": true, + "schema": { + "type": "integer", + "format": "int32" + } + } + ], + "responses": { + "200": { + "description": "OK", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/DeviceControlPoseidonResourceDeviceControlResource" + } + } + } + }, + "400": { + "description": "Bad Request", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResource" + } + } + } + }, + "403": { + "description": "Forbidden", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ProblemDetails" + } + } + } + }, + "404": { + "description": "Not Found", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResource" + } + } + } + }, + "422": { + "description": "Unprocessable Content", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResource" + } + } + } + }, + "500": { + "description": "Internal Server Error" + } + } + } + }, + "/api/v2/product/8/device/{deviceId}/control/async": { + "put": { + "tags": [ + "DeviceControlPoseidonConnect" + ], + "summary": "Queue a state change, the returned request_id can then be tracked in api/device/{deviceId}/control/status", + "parameters": [ + { + "name": "deviceId", + "in": "path", + "required": true, + "schema": { + "type": "integer", + "format": "int32" + } + } + ], + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/DeviceControlPoseidonResource" + } + }, + "text/json": { + "schema": { + "$ref": "#/components/schemas/DeviceControlPoseidonResource" + } + }, + "application/*+json": { + "schema": { + "$ref": "#/components/schemas/DeviceControlPoseidonResource" + } + } + } + }, + "responses": { + "200": { + "description": "OK", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/DeviceControlPoseidonResourceDeviceControlResource" + } + } + } + }, + "400": { + "description": "Bad Request", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResource" + } + } + } + }, + "403": { + "description": "Forbidden", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ProblemDetails" + } + } + } + }, + "404": { + "description": "Not Found", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResource" + } + } + } + }, + "422": { + "description": "Unprocessable Content", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResource" + } + } + } + }, + "500": { + "description": "Internal Server Error" + } + } + } + }, + "/api/v2/device/{deviceId}/tag/async": { + "put": { + "tags": [ + "DeviceTag" + ], + "parameters": [ + { + "name": "deviceId", + "in": "path", + "required": true, + "schema": { + "type": "integer", + "format": "int32" + } + } + ], + "requestBody": { + "content": { + "application/json": { + "schema": { + "type": "array", + "items": { + "$ref": "#/components/schemas/UpdateDeviceTagV2Resource" + } + } + }, + "text/json": { + "schema": { + "type": "array", + "items": { + "$ref": "#/components/schemas/UpdateDeviceTagV2Resource" + } + } + }, + "application/*+json": { + "schema": { + "type": "array", + "items": { + "$ref": "#/components/schemas/UpdateDeviceTagV2Resource" + } + } + } + } + }, + "responses": { + "400": { + "description": "Bad Request", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResource" + } + } + } + }, + "403": { + "description": "Forbidden", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ProblemDetails" + } + } + } + }, + "404": { + "description": "Not Found", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResource" + } + } + } + }, + "422": { + "description": "Unprocessable Content", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResource" + } + } + } + }, + "500": { + "description": "Internal Server Error" + }, + "200": { + "description": "OK", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/DeviceTagDataResource" + } + } + } + } + } + } + }, + "/api/v2/report/household/{householdId}/pet/{petId}/aggregate": { + "get": { + "tags": [ + "ReportHouseholdPet" + ], + "parameters": [ + { + "name": "householdId", + "in": "path", + "required": true, + "schema": { + "type": "integer", + "format": "int32" + } + }, + { + "name": "petId", + "in": "path", + "required": true, + "schema": { + "type": "integer", + "format": "int32" + } + }, + { + "name": "From", + "in": "query", + "required": true, + "schema": { + "type": "string", + "format": "date-time" + } + }, + { + "name": "To", + "in": "query", + "required": true, + "schema": { + "type": "string", + "format": "date-time" + } + }, + { + "name": "EventType", + "in": "query", + "schema": { + "$ref": "#/components/schemas/ReportHouseholdEvent" + } + } + ], + "responses": { + "400": { + "description": "Bad Request", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResource" + } + } + } + }, + "403": { + "description": "Forbidden", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ProblemDetails" + } + } + } + }, + "404": { + "description": "Not Found", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResource" + } + } + } + }, + "422": { + "description": "Unprocessable Content", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResource" + } + } + } + }, + "500": { + "description": "Internal Server Error" + }, + "200": { + "description": "OK", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ReportHouseholdResourceDataResponse" + } + } + } + } + } + } + }, + "/api/v2/timeline/household/{householdId}": { + "get": { + "tags": [ + "Timeline" + ], + "parameters": [ + { + "name": "householdId", + "in": "path", + "required": true, + "schema": { + "type": "integer", + "format": "int32" + } + }, + { + "name": "PageSize", + "in": "query", + "schema": { + "type": "integer", + "format": "int32" + } + }, + { + "name": "SinceId", + "in": "query", + "schema": { + "type": "integer", + "format": "int64" + } + }, + { + "name": "BeforeId", + "in": "query", + "schema": { + "type": "integer", + "format": "int64" + } + }, + { + "name": "Page", + "in": "query", + "schema": { + "type": "integer", + "format": "int32" + } + }, + { + "name": "ItemsPerPage", + "in": "query", + "schema": { + "type": "integer", + "format": "int32" + } + } + ], + "responses": { + "400": { + "description": "Bad Request", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResource" + } + } + } + }, + "403": { + "description": "Forbidden", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ProblemDetails" + } + } + } + }, + "404": { + "description": "Not Found", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResource" + } + } + } + }, + "422": { + "description": "Unprocessable Content", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResource" + } + } + } + }, + "500": { + "description": "Internal Server Error" + }, + "200": { + "description": "OK", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/TimelineResourceV2PaginatedDataResult" + } + } + } + } + } + } + } + }, + "components": { + "schemas": { + "ChangeProfileActionEnum": { + "enum": [ + 0, + 1, + 2 + ], + "type": "integer", + "format": "int32" + }, + "ConsumptionAlertResource": { + "type": "object", + "properties": { + "pet_id": { + "type": "integer", + "format": "int32" + }, + "tag_id": { + "type": "integer", + "format": "int32" + }, + "pet_weight": { + "type": "integer", + "format": "int32" + }, + "amount": { + "type": "integer", + "format": "int32" + }, + "time_noticed_utc": { + "type": "string", + "format": "date-time" + }, + "created_at": { + "type": "string", + "format": "date-time" + } + }, + "additionalProperties": false + }, + "ConsumptionHabitOutcomeEnum": { + "enum": [ + 0, + 1, + 2 + ], + "type": "integer", + "format": "int32" + }, + "ConsumptionHabitResource": { + "type": "object", + "properties": { + "outcome": { + "$ref": "#/components/schemas/ConsumptionHabitOutcomeEnum" + }, + "calendar_day": { + "type": "string", + "format": "date" + }, + "amount": { + "type": "integer", + "format": "int32" + }, + "lower_limit": { + "type": "integer", + "format": "int32", + "nullable": true + }, + "upper_limit": { + "type": "integer", + "format": "int32", + "nullable": true + }, + "created_at": { + "type": "string", + "format": "date-time" + } + }, + "additionalProperties": false + }, + "DeviceControlCurfewResource": { + "type": "object", + "properties": { + "enabled": { + "type": "boolean", + "nullable": true + }, + "lock_time": { + "type": "string", + "nullable": true + }, + "unlock_time": { + "type": "string", + "nullable": true + } + }, + "additionalProperties": false + }, + "DeviceControlDualScanPetDoorResourceV2": { + "type": "object", + "properties": { + "fast_polling": { + "type": "boolean", + "nullable": true + }, + "tag_profiles": { + "type": "array", + "items": { + "$ref": "#/components/schemas/DeviceControlThalamusTagProfileResource" + }, + "nullable": true + }, + "timed_access": { + "type": "array", + "items": { + "$ref": "#/components/schemas/DeviceControlThalamusMovementTagTimedAccessResource" + }, + "nullable": true + }, + "locking": { + "$ref": "#/components/schemas/DualScanLockingModeEnum" + }, + "lockdown": { + "type": "boolean", + "description": "Stop all entry and exit, overrides all other locking settings", + "nullable": true + }, + "timed_access_override": { + "type": "boolean", + "nullable": true + } + }, + "additionalProperties": false + }, + "DeviceControlDualScanPetDoorResourceV2DeviceControlPendingResource": { + "type": "object", + "properties": { + "state": { + "$ref": "#/components/schemas/DeviceControlDualScanPetDoorResourceV2" + }, + "request_id": { + "type": "string", + "nullable": true + }, + "requested_at": { + "type": "string", + "format": "date-time", + "nullable": true + }, + "requested_by": { + "type": "string", + "nullable": true + } + }, + "additionalProperties": false + }, + "DeviceControlDualScanPetDoorResourceV2DeviceControlResource": { + "type": "object", + "properties": { + "data": { + "$ref": "#/components/schemas/DeviceControlDualScanPetDoorResourceV2" + }, + "pending": { + "type": "array", + "items": { + "$ref": "#/components/schemas/DeviceControlDualScanPetDoorResourceV2DeviceControlPendingResource" + }, + "nullable": true + }, + "results": { + "type": "array", + "items": { + "$ref": "#/components/schemas/DeviceControlResultResource" + }, + "nullable": true + } + }, + "additionalProperties": false + }, + "DeviceControlDualScanResourceV2": { + "type": "object", + "properties": { + "fast_polling": { + "type": "boolean", + "nullable": true + }, + "tag_profiles": { + "type": "array", + "items": { + "$ref": "#/components/schemas/DeviceControlThalamusTagProfileResource" + }, + "nullable": true + }, + "timed_access": { + "type": "array", + "items": { + "$ref": "#/components/schemas/DeviceControlThalamusMovementTagTimedAccessResource" + }, + "nullable": true + }, + "locking": { + "$ref": "#/components/schemas/DualScanLockingModeEnum" + }, + "lockdown": { + "type": "boolean", + "description": "Stop all entry and exit, overrides all other locking settings", + "nullable": true + } + }, + "additionalProperties": false + }, + "DeviceControlDualScanResourceV2DeviceControlPendingResource": { + "type": "object", + "properties": { + "state": { + "$ref": "#/components/schemas/DeviceControlDualScanResourceV2" + }, + "request_id": { + "type": "string", + "nullable": true + }, + "requested_at": { + "type": "string", + "format": "date-time", + "nullable": true + }, + "requested_by": { + "type": "string", + "nullable": true + } + }, + "additionalProperties": false + }, + "DeviceControlDualScanResourceV2DeviceControlResource": { + "type": "object", + "properties": { + "data": { + "$ref": "#/components/schemas/DeviceControlDualScanResourceV2" + }, + "pending": { + "type": "array", + "items": { + "$ref": "#/components/schemas/DeviceControlDualScanResourceV2DeviceControlPendingResource" + }, + "nullable": true + }, + "results": { + "type": "array", + "items": { + "$ref": "#/components/schemas/DeviceControlResultResource" + }, + "nullable": true + } + }, + "additionalProperties": false + }, + "DeviceControlFeederBowlResource": { + "type": "object", + "properties": { + "settings": { + "type": "array", + "items": { + "$ref": "#/components/schemas/DeviceControlFeederBowlSettingsResource" + }, + "nullable": true + }, + "type": { + "$ref": "#/components/schemas/FeederBowlTypeEnum" + } + }, + "additionalProperties": false + }, + "DeviceControlFeederBowlSettingsResource": { + "type": "object", + "properties": { + "food_type": { + "$ref": "#/components/schemas/FoodTypesEnum" + }, + "target": { + "type": "number", + "format": "float", + "nullable": true + } + }, + "additionalProperties": false + }, + "DeviceControlFeederLidResource": { + "type": "object", + "properties": { + "close_delay": { + "type": "integer", + "format": "int32", + "nullable": true + } + }, + "additionalProperties": false + }, + "DeviceControlFeederResourceV2": { + "type": "object", + "properties": { + "fast_polling": { + "type": "boolean", + "nullable": true + }, + "tag_profiles": { + "type": "array", + "items": { + "$ref": "#/components/schemas/DeviceControlThalamusTagProfileResource" + }, + "nullable": true + }, + "bowls": { + "$ref": "#/components/schemas/DeviceControlFeederBowlResource" + }, + "lid": { + "$ref": "#/components/schemas/DeviceControlFeederLidResource" + }, + "tare": { + "$ref": "#/components/schemas/ZeroAction" + }, + "training_mode": { + "$ref": "#/components/schemas/TrainingMode" + }, + "timed_feeding": { + "type": "array", + "items": { + "$ref": "#/components/schemas/DeviceControlFeederTagTimedFeedingResource" + }, + "nullable": true + } + }, + "additionalProperties": false + }, + "DeviceControlFeederResourceV2DeviceControlPendingResource": { + "type": "object", + "properties": { + "state": { + "$ref": "#/components/schemas/DeviceControlFeederResourceV2" + }, + "request_id": { + "type": "string", + "nullable": true + }, + "requested_at": { + "type": "string", + "format": "date-time", + "nullable": true + }, + "requested_by": { + "type": "string", + "nullable": true + } + }, + "additionalProperties": false + }, + "DeviceControlFeederResourceV2DeviceControlResource": { + "type": "object", + "properties": { + "data": { + "$ref": "#/components/schemas/DeviceControlFeederResourceV2" + }, + "pending": { + "type": "array", + "items": { + "$ref": "#/components/schemas/DeviceControlFeederResourceV2DeviceControlPendingResource" + }, + "nullable": true + }, + "results": { + "type": "array", + "items": { + "$ref": "#/components/schemas/DeviceControlResultResource" + }, + "nullable": true + } + }, + "additionalProperties": false + }, + "DeviceControlFeederTagTimedFeedingResource": { + "type": "object", + "properties": { + "tag_id": { + "type": "integer", + "description": "The tag to apply the fasting to, leaving null will apply a dive wide fasting", + "format": "int32", + "nullable": true + }, + "fasting": { + "type": "array", + "items": { + "$ref": "#/components/schemas/DeviceControlFeederTimedFeedingResource" + }, + "nullable": true + } + }, + "additionalProperties": false + }, + "DeviceControlFeederTimedFeedingResource": { + "type": "object", + "properties": { + "enabled": { + "type": "boolean", + "nullable": true + }, + "start_time": { + "type": "string", + "nullable": true + }, + "end_time": { + "type": "string", + "nullable": true + } + }, + "additionalProperties": false + }, + "DeviceControlHubResource": { + "type": "object", + "properties": { + "led_mode": { + "$ref": "#/components/schemas/LedModeEnum" + }, + "pairing_mode": { + "$ref": "#/components/schemas/PairingModeEnum" + }, + "flash_leds": { + "type": "boolean", + "nullable": true + } + }, + "additionalProperties": false + }, + "DeviceControlHubResourceDeviceControlPendingResource": { + "type": "object", + "properties": { + "state": { + "$ref": "#/components/schemas/DeviceControlHubResource" + }, + "request_id": { + "type": "string", + "nullable": true + }, + "requested_at": { + "type": "string", + "format": "date-time", + "nullable": true + }, + "requested_by": { + "type": "string", + "nullable": true + } + }, + "additionalProperties": false + }, + "DeviceControlHubResourceDeviceControlResource": { + "type": "object", + "properties": { + "data": { + "$ref": "#/components/schemas/DeviceControlHubResource" + }, + "pending": { + "type": "array", + "items": { + "$ref": "#/components/schemas/DeviceControlHubResourceDeviceControlPendingResource" + }, + "nullable": true + }, + "results": { + "type": "array", + "items": { + "$ref": "#/components/schemas/DeviceControlResultResource" + }, + "nullable": true + } + }, + "additionalProperties": false + }, + "DeviceControlNoIdDogBowlResource": { + "type": "object", + "properties": { + "fast_polling": { + "type": "boolean", + "nullable": true + }, + "tag_profiles": { + "type": "array", + "items": { + "$ref": "#/components/schemas/DeviceControlThalamusTagProfileResource" + }, + "nullable": true + }, + "food_type": { + "$ref": "#/components/schemas/FoodTypesEnum" + }, + "substance_type": { + "$ref": "#/components/schemas/SubstanceTypesEnum" + } + }, + "additionalProperties": false + }, + "DeviceControlNoIdDogBowlResourceDeviceControlPendingResource": { + "type": "object", + "properties": { + "state": { + "$ref": "#/components/schemas/DeviceControlNoIdDogBowlResource" + }, + "request_id": { + "type": "string", + "nullable": true + }, + "requested_at": { + "type": "string", + "format": "date-time", + "nullable": true + }, + "requested_by": { + "type": "string", + "nullable": true + } + }, + "additionalProperties": false + }, + "DeviceControlNoIdDogBowlResourceDeviceControlResource": { + "type": "object", + "properties": { + "data": { + "$ref": "#/components/schemas/DeviceControlNoIdDogBowlResource" + }, + "pending": { + "type": "array", + "items": { + "$ref": "#/components/schemas/DeviceControlNoIdDogBowlResourceDeviceControlPendingResource" + }, + "nullable": true + }, + "results": { + "type": "array", + "items": { + "$ref": "#/components/schemas/DeviceControlResultResource" + }, + "nullable": true + } + }, + "additionalProperties": false + }, + "DeviceControlPendingResource": { + "type": "object", + "properties": { + "state": { + "nullable": true + }, + "request_id": { + "type": "string", + "nullable": true + }, + "requested_at": { + "type": "string", + "format": "date-time", + "nullable": true + }, + "requested_by": { + "type": "string", + "nullable": true + } + }, + "additionalProperties": false + }, + "DeviceControlPetDoorMicrochipResource": { + "type": "object", + "properties": { + "microchip_number": { + "type": "string", + "nullable": true + }, + "type": { + "$ref": "#/components/schemas/PetDoorTagType" + } + }, + "additionalProperties": false + }, + "DeviceControlPetDoorResource": { + "type": "object", + "properties": { + "fast_polling": { + "type": "boolean", + "nullable": true + }, + "curfew": { + "$ref": "#/components/schemas/DeviceControlCurfewResource" + }, + "locking": { + "$ref": "#/components/schemas/PetDoorLockingModeEnum" + }, + "tag_profiles": { + "type": "array", + "items": { + "$ref": "#/components/schemas/DeviceControlPetDoorTagProfileResource" + }, + "nullable": true + } + }, + "additionalProperties": false + }, + "DeviceControlPetDoorResourceDeviceControlPendingResource": { + "type": "object", + "properties": { + "state": { + "$ref": "#/components/schemas/DeviceControlPetDoorResource" + }, + "request_id": { + "type": "string", + "nullable": true + }, + "requested_at": { + "type": "string", + "format": "date-time", + "nullable": true + }, + "requested_by": { + "type": "string", + "nullable": true + } + }, + "additionalProperties": false + }, + "DeviceControlPetDoorResourceDeviceControlResource": { + "type": "object", + "properties": { + "data": { + "$ref": "#/components/schemas/DeviceControlPetDoorResource" + }, + "pending": { + "type": "array", + "items": { + "$ref": "#/components/schemas/DeviceControlPetDoorResourceDeviceControlPendingResource" + }, + "nullable": true + }, + "results": { + "type": "array", + "items": { + "$ref": "#/components/schemas/DeviceControlResultResource" + }, + "nullable": true + } + }, + "additionalProperties": false + }, + "DeviceControlPetDoorTagProfileResource": { + "type": "object", + "properties": { + "tag_id": { + "type": "integer", + "format": "int32", + "nullable": true + }, + "index": { + "type": "integer", + "format": "int32", + "nullable": true + }, + "microchip": { + "$ref": "#/components/schemas/DeviceControlPetDoorMicrochipResource" + } + }, + "additionalProperties": false + }, + "DeviceControlPoseidonResource": { + "type": "object", + "properties": { + "fast_polling": { + "type": "boolean", + "nullable": true + }, + "tag_profiles": { + "type": "array", + "items": { + "$ref": "#/components/schemas/DeviceControlThalamusTagProfileResource" + }, + "nullable": true + }, + "learn_mode": { + "type": "boolean", + "nullable": true + } + }, + "additionalProperties": false + }, + "DeviceControlPoseidonResourceDeviceControlPendingResource": { + "type": "object", + "properties": { + "state": { + "$ref": "#/components/schemas/DeviceControlPoseidonResource" + }, + "request_id": { + "type": "string", + "nullable": true + }, + "requested_at": { + "type": "string", + "format": "date-time", + "nullable": true + }, + "requested_by": { + "type": "string", + "nullable": true + } + }, + "additionalProperties": false + }, + "DeviceControlPoseidonResourceDeviceControlResource": { + "type": "object", + "properties": { + "data": { + "$ref": "#/components/schemas/DeviceControlPoseidonResource" + }, + "pending": { + "type": "array", + "items": { + "$ref": "#/components/schemas/DeviceControlPoseidonResourceDeviceControlPendingResource" + }, + "nullable": true + }, + "results": { + "type": "array", + "items": { + "$ref": "#/components/schemas/DeviceControlResultResource" + }, + "nullable": true + } + }, + "additionalProperties": false + }, + "DeviceControlResultResource": { + "type": "object", + "properties": { + "request_id": { + "type": "string", + "nullable": true + }, + "response_id": { + "type": "string", + "nullable": true + }, + "status": { + "$ref": "#/components/schemas/RequestChangeStateResponseStatus" + }, + "status_id": { + "$ref": "#/components/schemas/RequestChangeStateResponseStatus" + }, + "requested_at": { + "type": "string", + "format": "date-time", + "nullable": true + }, + "committed_at": { + "type": "string", + "format": "date-time", + "nullable": true + } + }, + "additionalProperties": false + }, + "DeviceControlThalamusMicrochipResource": { + "type": "object", + "properties": { + "microchip_number": { + "type": "string", + "nullable": true + }, + "type": { + "$ref": "#/components/schemas/ThalamusTagType" + } + }, + "additionalProperties": false + }, + "DeviceControlThalamusMovementTagTimedAccessResource": { + "type": "object", + "properties": { + "tag_id": { + "type": "integer", + "description": "The tag to apply the curfew to, leaving null will apply a dive wide curfew", + "format": "int32", + "nullable": true + }, + "timed_access": { + "type": "array", + "items": { + "$ref": "#/components/schemas/DeviceControlThalamusMovementTimedAccessResource" + }, + "nullable": true + } + }, + "additionalProperties": false + }, + "DeviceControlThalamusMovementTimedAccessResource": { + "type": "object", + "properties": { + "profile": { + "$ref": "#/components/schemas/ThalamusMovementTimedAccessAllowedSpecialProfiles" + }, + "lock_time": { + "type": "string", + "nullable": true + }, + "unlock_time": { + "type": "string", + "nullable": true + } + }, + "additionalProperties": false + }, + "DeviceControlThalamusTagProfileResource": { + "type": "object", + "properties": { + "tag_id": { + "type": "integer", + "description": "Tag id", + "format": "int32", + "nullable": true + }, + "index": { + "type": "integer", + "description": "Index in the devices profile table", + "format": "int32", + "nullable": true + }, + "profile": { + "$ref": "#/components/schemas/SpecialProfiles" + }, + "action": { + "$ref": "#/components/schemas/ChangeProfileActionEnum" + }, + "request_action": { + "$ref": "#/components/schemas/UpdateDeviceTagActions" + }, + "microchip": { + "$ref": "#/components/schemas/DeviceControlThalamusMicrochipResource" + } + }, + "additionalProperties": false + }, + "DeviceResourceV2": { + "type": "object", + "properties": { + "id": { + "type": "integer", + "format": "int32" + } + }, + "additionalProperties": false + }, + "DeviceTagDataResource": { + "type": "object", + "properties": { + "data": { + "$ref": "#/components/schemas/DeviceTagResource" + }, + "pending": { + "type": "array", + "items": { + "$ref": "#/components/schemas/DeviceControlPendingResource" + }, + "description": "Any pending state changes for the device tag", + "nullable": true + }, + "results": { + "type": "array", + "items": { + "$ref": "#/components/schemas/DeviceControlResultResource" + }, + "description": "State change result", + "nullable": true + } + }, + "additionalProperties": false + }, + "DeviceTagProfiles": { + "enum": [ + 2, + 3 + ], + "type": "integer", + "format": "int32" + }, + "DeviceTagResource": { + "type": "object", + "properties": { + "id": { + "type": "integer", + "description": "Tag id", + "format": "int32" + }, + "device_id": { + "type": "integer", + "format": "int32" + }, + "index": { + "type": "integer", + "format": "int32" + }, + "profile": { + "type": "integer", + "format": "int32", + "nullable": true + }, + "version": { + "type": "integer", + "format": "int32" + }, + "created_at": { + "type": "string", + "format": "date-time", + "nullable": true + }, + "updated_at": { + "type": "string", + "format": "date-time", + "nullable": true + } + }, + "additionalProperties": false + }, + "DoorDirectionEnum": { + "enum": [ + 0, + 1, + 2, + 3 + ], + "type": "integer", + "format": "int32" + }, + "DoorSide": { + "enum": [ + 0, + 1, + 2 + ], + "type": "integer", + "format": "int32" + }, + "DoorStatusEnum": { + "enum": [ + 4, + 6, + 8, + 10, + 11, + 12, + 13 + ], + "type": "integer", + "format": "int32" + }, + "DualScanLockingModeEnum": { + "enum": [ + 0, + 1, + 2, + 3 + ], + "type": "integer", + "format": "int32" + }, + "ErrorResource": { + "type": "object", + "properties": { + "success": { + "type": "boolean", + "readOnly": true + }, + "error": { + "type": "object", + "additionalProperties": { + "type": "array", + "items": { + "type": "string" + }, + "nullable": true + }, + "nullable": true, + "readOnly": true + } + }, + "additionalProperties": false + }, + "FeederBowlTypeEnum": { + "enum": [ + 1, + 4, + 5 + ], + "type": "integer", + "format": "int32" + }, + "FoodTypesEnum": { + "enum": [ + 0, + 1, + 2, + 3 + ], + "type": "integer", + "format": "int32" + }, + "HouseholdResourceV2": { + "type": "object", + "properties": { + "id": { + "type": "integer", + "format": "int32" + } + }, + "additionalProperties": false + }, + "LedModeEnum": { + "enum": [ + 0, + 1, + 2, + 3, + 4, + 128 + ], + "type": "integer", + "format": "int32" + }, + "MovementResource": { + "type": "object", + "properties": { + "id": { + "type": "integer", + "format": "int64" + }, + "device_id": { + "type": "integer", + "format": "int32", + "nullable": true + }, + "tag_id": { + "type": "integer", + "format": "int32" + }, + "user_id": { + "type": "integer", + "format": "int32", + "nullable": true + }, + "direction": { + "$ref": "#/components/schemas/DoorDirectionEnum" + }, + "side": { + "$ref": "#/components/schemas/DoorSide" + }, + "type": { + "$ref": "#/components/schemas/DoorStatusEnum" + }, + "created_at": { + "type": "string", + "format": "date-time", + "nullable": true + }, + "updated_at": { + "type": "string", + "format": "date-time", + "nullable": true + } + }, + "additionalProperties": false + }, + "PaginatedMetaDataResult": { + "type": "object", + "properties": { + "page": { + "type": "integer", + "format": "int32", + "nullable": true + }, + "page_size": { + "type": "integer", + "format": "int32", + "nullable": true + }, + "count": { + "type": "integer", + "format": "int64" + }, + "total_pages": { + "type": "integer", + "format": "int64", + "nullable": true + } + }, + "additionalProperties": false + }, + "PairingModeEnum": { + "enum": [ + 0, + 1, + 2, + 3, + 128 + ], + "type": "integer", + "format": "int32" + }, + "PetDoorLockingModeEnum": { + "enum": [ + 0, + 1, + 2, + 3, + 4, + 5 + ], + "type": "integer", + "format": "int32" + }, + "PetDoorTagType": { + "enum": [ + 0, + 1, + 2, + 4, + 8, + 16, + 32, + 64, + 128 + ], + "type": "integer", + "format": "int32" + }, + "PetResourceV2": { + "type": "object", + "properties": { + "id": { + "type": "integer", + "format": "int32" + } + }, + "additionalProperties": false + }, + "PhotoResource": { + "type": "object", + "properties": { + "id": { + "type": "integer", + "format": "int32" + }, + "title": { + "type": "string", + "nullable": true + }, + "location": { + "type": "string", + "nullable": true + }, + "hash": { + "type": "string", + "nullable": true + }, + "uploading_user_id": { + "type": "integer", + "format": "int32" + }, + "version": { + "type": "integer", + "format": "int32" + }, + "created_at": { + "type": "string", + "format": "date-time", + "nullable": true + }, + "updated_at": { + "type": "string", + "format": "date-time", + "nullable": true + } + }, + "additionalProperties": false + }, + "ProblemDetails": { + "type": "object", + "properties": { + "type": { + "type": "string", + "nullable": true + }, + "title": { + "type": "string", + "nullable": true + }, + "status": { + "type": "integer", + "format": "int32", + "nullable": true + }, + "detail": { + "type": "string", + "nullable": true + }, + "instance": { + "type": "string", + "nullable": true + } + }, + "additionalProperties": { } + }, + "PublicUserResource": { + "type": "object", + "properties": { + "id": { + "type": "integer", + "format": "int32" + }, + "name": { + "type": "string", + "nullable": true + }, + "photo_id": { + "type": "integer", + "format": "int32", + "nullable": true + }, + "photo": { + "$ref": "#/components/schemas/PhotoResource" + } + }, + "additionalProperties": false + }, + "ReportHouseholdDrinkingDataPoint": { + "type": "object", + "properties": { + "datapoints": { + "type": "array", + "items": { + "$ref": "#/components/schemas/ReportHouseholdDrinkingResource" + }, + "nullable": true + } + }, + "additionalProperties": false + }, + "ReportHouseholdDrinkingResource": { + "type": "object", + "properties": { + "from": { + "type": "string", + "format": "date-time", + "nullable": true + }, + "to": { + "type": "string", + "format": "date-time", + "nullable": true + }, + "duration": { + "type": "integer", + "format": "int32", + "nullable": true + }, + "context": { + "type": "integer", + "format": "int32", + "nullable": true + }, + "bowl_count": { + "type": "integer", + "format": "int32", + "nullable": true + }, + "device_id": { + "type": "integer", + "format": "int32", + "nullable": true + }, + "weights": { + "type": "array", + "items": { + "$ref": "#/components/schemas/ReportWeightFrame" + }, + "nullable": true + }, + "actual_weight": { + "type": "number", + "format": "double", + "nullable": true + }, + "entry_user_id": { + "type": "integer", + "format": "int32", + "nullable": true + }, + "exit_user_id": { + "type": "integer", + "format": "int32", + "nullable": true + }, + "created_at": { + "type": "string", + "format": "date-time", + "nullable": true + }, + "updated_at": { + "type": "string", + "format": "date-time", + "nullable": true + }, + "deleted_at": { + "type": "string", + "format": "date-time", + "nullable": true + }, + "tag_id": { + "type": "integer", + "format": "int32", + "nullable": true + }, + "user_id": { + "type": "integer", + "format": "int32", + "nullable": true + } + }, + "additionalProperties": false + }, + "ReportHouseholdEvent": { + "enum": [ + 0, + 1, + 2 + ], + "type": "integer", + "format": "int32" + }, + "ReportHouseholdFeedingDataPoint": { + "type": "object", + "properties": { + "datapoints": { + "type": "array", + "items": { + "$ref": "#/components/schemas/ReportHouseholdFeedingResource" + }, + "nullable": true + } + }, + "additionalProperties": false + }, + "ReportHouseholdFeedingResource": { + "type": "object", + "properties": { + "from": { + "type": "string", + "format": "date-time", + "nullable": true + }, + "to": { + "type": "string", + "format": "date-time", + "nullable": true + }, + "duration": { + "type": "integer", + "format": "int32", + "nullable": true + }, + "context": { + "type": "integer", + "format": "int32", + "nullable": true + }, + "bowl_count": { + "type": "integer", + "format": "int32", + "nullable": true + }, + "device_id": { + "type": "integer", + "format": "int32", + "nullable": true + }, + "weights": { + "type": "array", + "items": { + "$ref": "#/components/schemas/ReportWeightFrame" + }, + "nullable": true + }, + "actual_weight": { + "type": "number", + "format": "double", + "nullable": true + }, + "entry_user_id": { + "type": "integer", + "format": "int32", + "nullable": true + }, + "exit_user_id": { + "type": "integer", + "format": "int32", + "nullable": true + }, + "created_at": { + "type": "string", + "format": "date-time", + "nullable": true + }, + "updated_at": { + "type": "string", + "format": "date-time", + "nullable": true + }, + "deleted_at": { + "type": "string", + "format": "date-time", + "nullable": true + }, + "tag_id": { + "type": "integer", + "format": "int32", + "nullable": true + }, + "user_id": { + "type": "integer", + "format": "int32", + "nullable": true + } + }, + "additionalProperties": false + }, + "ReportHouseholdMovementDataPoint": { + "type": "object", + "properties": { + "datapoints": { + "type": "array", + "items": { + "$ref": "#/components/schemas/ReportHouseholdMovementResource" + }, + "nullable": true + } + }, + "additionalProperties": false + }, + "ReportHouseholdMovementResource": { + "type": "object", + "properties": { + "created_at": { + "type": "string", + "format": "date-time", + "nullable": true + }, + "updated_at": { + "type": "string", + "format": "date-time", + "nullable": true + }, + "deleted_at": { + "type": "string", + "format": "date-time", + "nullable": true + }, + "device_id": { + "type": "integer", + "format": "int32", + "nullable": true + }, + "tag_id": { + "type": "integer", + "format": "int32", + "nullable": true + }, + "user_id": { + "type": "integer", + "format": "int32", + "nullable": true + }, + "from": { + "type": "string", + "format": "date-time", + "nullable": true + }, + "to": { + "type": "string", + "format": "date-time", + "nullable": true + }, + "duration": { + "type": "integer", + "format": "int32", + "nullable": true + }, + "entry_device_id": { + "type": "integer", + "format": "int32", + "nullable": true + }, + "entry_user_id": { + "type": "integer", + "format": "int32", + "nullable": true + }, + "exit_device_id": { + "type": "integer", + "format": "int32", + "nullable": true + }, + "exit_user_id": { + "type": "integer", + "format": "int32", + "nullable": true + }, + "active": { + "type": "boolean", + "nullable": true + }, + "exit_movement_id": { + "type": "integer", + "format": "int64" + }, + "entry_movement_id": { + "type": "integer", + "format": "int64" + } + }, + "additionalProperties": false + }, + "ReportHouseholdResource": { + "type": "object", + "properties": { + "pet_id": { + "type": "integer", + "format": "int32", + "nullable": true + }, + "device_id": { + "type": "integer", + "format": "int32", + "nullable": true + }, + "movement": { + "$ref": "#/components/schemas/ReportHouseholdMovementDataPoint" + }, + "feeding": { + "$ref": "#/components/schemas/ReportHouseholdFeedingDataPoint" + }, + "drinking": { + "$ref": "#/components/schemas/ReportHouseholdDrinkingDataPoint" + }, + "consumption_habit": { + "type": "array", + "items": { + "$ref": "#/components/schemas/ConsumptionHabitResource" + }, + "nullable": true + }, + "consumption_alert": { + "type": "array", + "items": { + "$ref": "#/components/schemas/ConsumptionAlertResource" + }, + "nullable": true + } + }, + "additionalProperties": false + }, + "ReportHouseholdResourceDataResponse": { + "type": "object", + "properties": { + "data": { + "$ref": "#/components/schemas/ReportHouseholdResource" + } + }, + "additionalProperties": false + }, + "ReportHouseholdV2QueryResource": { + "required": [ + "from", + "to" + ], + "type": "object", + "properties": { + "from": { + "type": "string", + "format": "date-time" + }, + "to": { + "type": "string", + "format": "date-time" + }, + "event_type": { + "$ref": "#/components/schemas/ReportHouseholdEvent" + } + }, + "additionalProperties": false + }, + "ReportWeightFrame": { + "type": "object", + "properties": { + "index": { + "type": "integer", + "format": "int32", + "nullable": true + }, + "weight": { + "type": "number", + "format": "double" + }, + "change": { + "type": "number", + "format": "double" + }, + "food_type_id": { + "type": "integer", + "format": "int32", + "nullable": true + }, + "target_weight": { + "type": "integer", + "format": "int32", + "nullable": true + }, + "multi": { + "type": "boolean", + "nullable": true + } + }, + "additionalProperties": false + }, + "RequestChangeStateResponseStatus": { + "enum": [ + 0, + 1, + 2, + 3, + 4, + 5 + ], + "type": "integer", + "format": "int32" + }, + "SpecialProfiles": { + "enum": [ + 0, + 1, + 2, + 3, + 4, + 5, + 6 + ], + "type": "integer", + "format": "int32" + }, + "SubstanceTypesEnum": { + "enum": [ + 0, + 1, + 2 + ], + "type": "integer", + "format": "int32" + }, + "TagResourceV2": { + "type": "object", + "properties": { + "id": { + "type": "integer", + "format": "int32" + } + }, + "additionalProperties": false + }, + "ThalamusMovementTimedAccessAllowedSpecialProfiles": { + "enum": [ + 3, + 5, + 6 + ], + "type": "integer", + "format": "int32" + }, + "ThalamusTagType": { + "enum": [ + 0, + 1, + 2, + 3, + 4, + 5, + 6, + 7, + 8 + ], + "type": "integer", + "format": "int32" + }, + "TimelineResourceV2": { + "type": "object", + "properties": { + "id": { + "type": "integer", + "format": "int64" + }, + "type": { + "type": "integer", + "format": "int32" + }, + "data": { + "type": "string", + "nullable": true + }, + "created_at": { + "type": "string", + "format": "date-time", + "nullable": true + }, + "updated_at": { + "type": "string", + "format": "date-time", + "nullable": true + }, + "household": { + "type": "array", + "items": { + "$ref": "#/components/schemas/HouseholdResourceV2" + }, + "nullable": true + }, + "devices": { + "type": "array", + "items": { + "$ref": "#/components/schemas/DeviceResourceV2" + }, + "nullable": true + }, + "movements": { + "type": "array", + "items": { + "$ref": "#/components/schemas/MovementResource" + }, + "nullable": true + }, + "pets": { + "type": "array", + "items": { + "$ref": "#/components/schemas/PetResourceV2" + }, + "nullable": true + }, + "tags": { + "type": "array", + "items": { + "$ref": "#/components/schemas/TagResourceV2" + }, + "nullable": true + }, + "users": { + "type": "array", + "items": { + "$ref": "#/components/schemas/PublicUserResource" + }, + "nullable": true + }, + "weights": { + "type": "array", + "items": { + "$ref": "#/components/schemas/WeightResource" + }, + "nullable": true + } + }, + "additionalProperties": false + }, + "TimelineResourceV2PaginatedDataResult": { + "type": "object", + "properties": { + "data": { + "type": "array", + "items": { + "$ref": "#/components/schemas/TimelineResourceV2" + }, + "nullable": true + }, + "meta": { + "$ref": "#/components/schemas/PaginatedMetaDataResult" + } + }, + "additionalProperties": false + }, + "TrainingMode": { + "enum": [ + 0, + 1, + 2, + 3, + 4 + ], + "type": "integer", + "format": "int32" + }, + "UpdateDeviceTagActions": { + "enum": [ + 0, + 1, + 2 + ], + "type": "integer", + "format": "int32" + }, + "UpdateDeviceTagV2Resource": { + "type": "object", + "properties": { + "tag_id": { + "type": "integer", + "format": "int32", + "nullable": true + }, + "request_action": { + "$ref": "#/components/schemas/UpdateDeviceTagActions" + }, + "profile": { + "$ref": "#/components/schemas/DeviceTagProfiles" + }, + "timed_access": { + "type": "array", + "items": { + "$ref": "#/components/schemas/DeviceControlThalamusMovementTimedAccessResource" + }, + "nullable": true + } + }, + "additionalProperties": false + }, + "WeightFrameResource": { + "type": "object", + "properties": { + "id": { + "type": "integer", + "format": "int32" + }, + "index": { + "type": "integer", + "format": "int32", + "nullable": true + }, + "current_weight": { + "type": "number", + "format": "float" + }, + "change": { + "type": "number", + "format": "float" + }, + "created_at": { + "type": "string", + "format": "date-time", + "nullable": true + }, + "updated_at": { + "type": "string", + "format": "date-time", + "nullable": true + } + }, + "additionalProperties": false + }, + "WeightResource": { + "type": "object", + "properties": { + "id": { + "type": "integer", + "format": "int64" + }, + "device_id": { + "type": "integer", + "format": "int32", + "nullable": true + }, + "tag_id": { + "type": "integer", + "format": "int32", + "nullable": true + }, + "context": { + "type": "integer", + "format": "int32", + "nullable": true + }, + "duration": { + "type": "integer", + "format": "int32", + "nullable": true + }, + "created_at": { + "type": "string", + "format": "date-time", + "nullable": true + }, + "updated_at": { + "type": "string", + "format": "date-time", + "nullable": true + }, + "frames": { + "type": "array", + "items": { + "$ref": "#/components/schemas/WeightFrameResource" + }, + "nullable": true + } + }, + "additionalProperties": false + }, + "ZeroAction": { + "enum": [ + 0, + 1, + 2, + 3 + ], + "type": "integer", + "format": "int32" + } + } + } +} \ No newline at end of file From b90fafff9c95e41d5b06fba5b3ad58124bb3297a Mon Sep 17 00:00:00 2001 From: Copilot <198982749+Copilot@users.noreply.github.com> Date: Mon, 23 Feb 2026 00:36:51 +0100 Subject: [PATCH 09/15] Alphabetize class definitions in `official.py` and `official_v2.py` (#131) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit This updates the OpenAPI entity modules so class definitions are consistently ordered alphabetically by class name, as requested. Reordering introduced forward-reference ordering changes, so annotation evaluation was adjusted to keep imports and type references stable. - **Class layout normalization** - Reordered all class blocks alphabetically in: - `surehub_api/entities/official.py` - `surehub_api/entities/official_v2.py` - Preserved class contents/signatures; only declaration order changed. - **Forward-reference safety after reorder** - Added postponed annotation evaluation in both files: - `from __future__ import annotations` - Prevents import-time `NameError` when a class annotation references a type declared later in the file after alphabetical sorting. - **Ordering guardrail** - Extended `tests/test_official_openapi_models.py` with a file-level check that class declarations in both entity files remain alphabetically sorted. ```python # added at top of both files from __future__ import annotations ``` --- 💡 You can make Copilot smarter by setting up custom instructions, customizing its development environment and configuring Model Context Protocol (MCP) servers. Learn more [Copilot coding agent tips](https://gh.io/copilot-coding-agent-tips) in the docs. --------- Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com> Co-authored-by: fabieu <43068791+fabieu@users.noreply.github.com> Co-authored-by: Fabian Eulitz --- surehub_api/entities/official.py | 1545 +++++++++++++++++++++---- surehub_api/entities/official_v2.py | 647 ++++++++++- tests/test_official_openapi_models.py | 51 + 3 files changed, 2018 insertions(+), 225 deletions(-) create mode 100644 tests/test_official_openapi_models.py diff --git a/surehub_api/entities/official.py b/surehub_api/entities/official.py index e338b27..ac27cd0 100644 --- a/surehub_api/entities/official.py +++ b/surehub_api/entities/official.py @@ -1,3 +1,5 @@ +from __future__ import annotations + from datetime import datetime, time, date from enum import IntEnum from typing import Optional, List, Any @@ -6,37 +8,65 @@ from pydantic_core import CoreSchema -class DeviceType(IntEnum): - UNKNOWN_DEVICE_0 = 0 - HUB = 1 - REPEATER = 2 - PET_DOOR_CONNECT = 3 - PET_FEEDER_CONNECT = 4 - PROGRAMMER = 5 - DUALSCAN_CAT_FLAP_CONNECT = 6 - MICROCHIP_FEEDER = 7 - FELAQUA_CONNECT = 8 # Poseidon - CAT_FLAP_CONNECT = 9 - DUALSCAN_PET_DOOR_CONNECT = 10 - DOG_BOWL_CONNECT = 32 # Cerberus - UNKNOWN_DEVICE_255 = 255 +class AnimoPet(BaseModel): + id: Optional[int] = None + name: Optional[str] = None + gender: Optional[Any] = None + date_of_birth: Optional[datetime] = None + weight: Optional[str] = None + breed_id: Optional[int] = None + household_id: Optional[int] = None + created_at: Optional[datetime] = None + updated_at: Optional[datetime] = None -# TODO: Add descriptive names to numeric special profiles -class SpecialProfile(IntEnum): - SPECIAL_PROFILE_0 = 0 - SPECIAL_PROFILE_1 = 1 - SPECIAL_PROFILE_2 = 2 - SPECIAL_PROFILE_3 = 3 - SPECIAL_PROFILE_4 = 4 - SPECIAL_PROFILE_5 = 5 - SPECIAL_PROFILE_6 = 6 +class AnimoPetPaginatedDataResult(BaseModel): + data: Optional[List[Any]] = None + meta: Optional[Any] = None + + +class AuthChangePassword(BaseModel): + user_id: Optional[int] = None + password: str + new_password: Optional[str] = None class AuthLogin(BaseModel): client_uid: str + device_id: Optional[str] = None + email_address: str + password: str + + +class AuthLogout(BaseModel): + client_uid: Optional[str] = None + device_id: Optional[str] = None + + +class AuthRegister(BaseModel): + email_address: str + first_name: str + last_name: str + password: str + language_id: int + country_id: int + photo_id: Optional[int] = None + marketing_opt_in: bool + weight_units: Optional[Any] = None + time_format: Optional[Any] = None + device_id: str + + +class AuthResetPassword(BaseModel): email_address: str password: str + token: str + client_uid: Optional[str] = None + device_id: Optional[str] = None + + +class AuthResetPasswordRequest(BaseModel): + email_address: str class AuthToken(BaseModel): @@ -53,15 +83,158 @@ class DeviceTag(BaseModel): updated_at: Optional[datetime] = None -class Tag(BaseModel): - id: int - tag: Optional[str] = None - supported_product_ids: Optional[List[DeviceType]] = None - incompatible_product_ids: Optional[List[DeviceType]] = None - version: int +class Breed(BaseModel): + id: Optional[int] = None + species_id: Optional[int] = None + name: Optional[str] = None + version: Optional[int] = None created_at: Optional[datetime] = None updated_at: Optional[datetime] = None - deleted_at: Optional[datetime] = None + + +class BreedDataResponse(BaseModel): + data: Optional[Any] = None + + +class BreedPaginatedDataResult(BaseModel): + data: Optional[List[DeviceType]] = None + incompatible_product_ids: Optional[List[Any]] = None + meta: Optional[Any] = None + + +class BreedQuery(BaseModel): + page: Optional[int] = None + items_per_page: Optional[int] = None + page_size: Optional[int] = None + species_id: Optional[int] = None + lang: Optional[str] = None + + +class Condition(BaseModel): + id: Optional[int] = None + name: Optional[str] = None + version: Optional[int] = None + created_at: Optional[datetime] = None + updated_at: Optional[datetime] = None + + +class ConditionDataResponse(BaseModel): + data: Optional[Any] = None + + +class ConditionPaginatedDataResult(BaseModel): + data: Optional[List[Any]] = None + meta: Optional[Any] = None + + +class ConditionQuery(BaseModel): + page: Optional[int] = None + items_per_page: Optional[int] = None + page_size: Optional[int] = None + lang: Optional[str] = None + + +class ConsumptionAlert(BaseModel): + pet_id: int + tag_id: int + pet_weight: int + amount: int + time_noticed_utc: datetime + created_at: datetime + + +class ConsumptionHabit(BaseModel): + outcome: ConsumptionHabitOutcomeEnum + calendar_day: date + amount: int + lower_limit: Optional[int] = None + upper_limit: Optional[int] = None + created_at: datetime + + +class ConsumptionHabitModelState(BaseModel): + pet_id: Optional[int] = None + tag_id: Optional[int] = None + state: Optional[Any] = None + + +class ConsumptionHabitModelStateEnum(IntEnum): + VALUE_0 = 0 + VALUE_1 = 1 + VALUE_2 = 2 + VALUE_3 = 3 + + +class ConsumptionHabitOutcomeEnum(IntEnum): + OK = 0 + BELOW_LIMIT = 1 + ABOVE_LIMIT = 2 + + +class Country(BaseModel): + id: Optional[int] = None + name: Optional[str] = None + native_name: Optional[str] = None + code: Optional[str] = None + default_language_id: Optional[int] = None + default_timezone_id: Optional[int] = None + created_at: Optional[datetime] = None + updated_at: Optional[datetime] = None + + +class CountryDataResponse(BaseModel): + data: Optional[Any] = None + + +class CountryPaginatedDataResult(BaseModel): + data: Optional[List[Any]] = None + meta: Optional[Any] = None + + +class CountryQuery(BaseModel): + page: Optional[int] = None + items_per_page: Optional[int] = None + page_size: Optional[int] = None + iso_code2: Optional[str] = None + lang: Optional[str] = None + + +class CreateHousehold(BaseModel): + name: str + timezone_id: int + + +class CreateHouseholdInvite(BaseModel): + code: Optional[str] = None + email_address: str + owner: bool + write: bool + + +class CreatePet(BaseModel): + name: str + gender: Optional[Any] = None + date_of_birth: Optional[datetime] = None + weight: Optional[float] = None + comments: Optional[str] = None + breed_id: Optional[int] = None + breed_id2: Optional[int] = None + spayed: Optional[Any] = None + food_type_id: Optional[int] = None + photo_id: Optional[int] = None + species_id: Optional[int] = None + conditions: Optional[List[Any]] = None + household_id: int + + +class CreatePetPosition(BaseModel): + where: Optional[PetPositionWhere] = None + since: Optional[datetime] = None + + +class CreateUserSettings(BaseModel): + key: str + value: str class Curfew(BaseModel): @@ -70,6 +243,32 @@ class Curfew(BaseModel): unlock_time: Optional[time] = None +class DeleteAccount(BaseModel): + password: str + households: Optional[List[int]] = None + + +class Device(BaseModel): + id: int + parent_device_id: Optional[int] = None + product_id: int + household_id: Optional[int] = None + index: Optional[int] = None + name: Optional[str] = None + serial_number: Optional[str] = None + mac_address: Optional[str] = None + version: int + created_at: Optional[datetime] = None + updated_at: Optional[datetime] = None + deleted_at: Optional[datetime] = None + pairing_at: Optional[datetime] = None + last_activity_at: Optional[datetime] = None + last_new_event_at: Optional[datetime] = None + control: Optional[DeviceControl] = None + status: Optional[DeviceStatus] = None + tags: Optional[List[DeviceTag]] = None + + class LockMode(IntEnum): NONE = 0 IN = 1 @@ -98,222 +297,171 @@ class DeviceControl(BaseModel): pairing_mode: Optional[int] = None -class DeviceStatus(BaseModel): - led_mode: Optional[int] = None - pairing_mode: Optional[int] = None - status: Optional[bool] = None +class DeviceControlSchema(BaseModel): + data: Optional[Any] = None + pending: Optional[List[Any]] = None + results: Optional[List[Any]] = None -class Device(BaseModel): - id: int - parent_device_id: Optional[int] = None - product_id: int - household_id: Optional[int] = None - index: Optional[int] = None - name: Optional[str] = None - serial_number: Optional[str] = None - mac_address: Optional[str] = None - version: int - created_at: Optional[datetime] = None - updated_at: Optional[datetime] = None - deleted_at: Optional[datetime] = None - pairing_at: Optional[datetime] = None - last_activity_at: Optional[datetime] = None - last_new_event_at: Optional[datetime] = None - control: Optional[DeviceControl] = None - tags: Optional[List[DeviceTag]] = None +class DeviceControlPending(BaseModel): + state: Optional[Any] = None + request_id: Optional[str] = None + requested_at: Optional[datetime] = None + requested_by: Optional[str] = None -class Photo(BaseModel): - id: int - title: Optional[str] = None - location: Optional[str] = None - hash: Optional[str] = None - uploading_user_id: Optional[int] = None - version: int - created_at: Optional[datetime] = None - updated_at: Optional[datetime] = None +class DeviceControlResult(BaseModel): + request_id: Optional[str] = None + response_id: Optional[str] = None + status: Optional[Any] = None + status_id: Optional[Any] = None + requested_at: Optional[datetime] = None + committed_at: Optional[datetime] = None -class PetPositionWhere(IntEnum): - INSIDE = 1 - OUTSIDE = 2 +class DeviceControlStateChange(BaseModel): + request_id: Optional[str] = None + response_id: Optional[str] = None + status: Optional[Any] = None + status_id: Optional[Any] = None + requested_at: Optional[datetime] = None + committed_at: Optional[datetime] = None + device_id: Optional[int] = None + state: Optional[Any] = None + requested_by: Optional[int] = None + child_state_changes: Optional[List[Any]] = None + parent_request_id: Optional[str] = None -class CreatePetPosition(BaseModel): - where: PetPositionWhere - since: Optional[datetime] = None +class DeviceControlStateChangeDataResponse(BaseModel): + data: Optional[Any] = None -class PetPosition(BaseModel): - id: int - pet_id: Optional[int] = None - tag_id: Optional[int] = None - device_id: Optional[int] = None - user_id: Optional[int] = None - where: Optional[PetPositionWhere] = None - since: Optional[datetime] = None +class DeviceControlStateChangeListDataResponse(BaseModel): + data: Optional[List[Any]] = None -class PetConsumptionStatus(BaseModel): - id: int - tag_id: Optional[int] = None - device_id: Optional[int] = None - change: Optional[List[float]] = None - at: Optional[datetime] = None +class DeviceDataResponse(BaseModel): + data: Optional[Any] = None -class PetStatus(BaseModel): - pet_id: Optional[int] = None - activity: Optional[PetPosition] = None - feeding: Optional[PetConsumptionStatus] = None - drinking: Optional[PetConsumptionStatus] = None +class DeviceIEnumerableDataResponse(BaseModel): + data: Optional[List[Any]] = None -class PetCondition(BaseModel): - id: int - version: int - created_at: Optional[datetime] = None - updated_at: Optional[datetime] = None +class DeviceNeedsUpdate(BaseModel): + needs_manual_update: Optional[bool] = None -class PetGender(IntEnum): - FEMALE = 0 - MALE = 1 +class DeviceNeedsUpdateDataResponse(BaseModel): + data: Optional[Any] = None -class Spayed(IntEnum): - UNKNOWN = 0 - YES = 1 - NO = 2 +class DevicePaginatedDataResult(BaseModel): + data: Optional[List[Any]] = None + meta: Optional[Any] = None -class Pet(BaseModel): - id: int - name: Optional[str] = None - gender: Optional[PetGender] = None - date_of_birth: Optional[datetime] = None - weight: Optional[str] = None - comments: Optional[str] = None - breed_id: Optional[int] = None - breed_id_2: Optional[int] = None - food_type_id: Optional[int] = None - household_id: Optional[int] = None - photo_id: Optional[int] = None - species_id: Optional[int] = None - spayed: Optional[Spayed] = None - tag_id: Optional[int] = None - version: int - created_at: Optional[datetime] = None - updated_at: Optional[datetime] = None - deleted_at: Optional[datetime] = None - photo: Optional[Photo] = None - conditions: Optional[List[PetCondition]] = None - tag: Optional[Tag] = None - status: Optional[PetStatus] = None - position: Optional[PetPosition] = None +class DevicePairByCode(BaseModel): + pairing_code: str -class PublicUser(BaseModel): - id: int - name: Optional[str] = None - photo_id: Optional[int] = None - photo: Optional[Photo] = None +class DeviceReadiness(BaseModel): + device_ready: Optional[bool] = None + profiles_available: Optional[int] = None + profiles_updated_at: Optional[datetime] = None -class HouseholdInviteUser(BaseModel): - creator: Optional[PublicUser] = None - acceptor: Optional[PublicUser] = None +class DeviceReadinessDataResponse(BaseModel): + data: Optional[Any] = None -class HouseholdInviteStatus(IntEnum): - PENDING = 0 - ACCEPTED = 1 - EXPIRED = 2 +class DeviceStatus(BaseModel): + led_mode: Optional[int] = None + pairing_mode: Optional[int] = None + status: Optional[bool] = None -class HouseholdInvite(BaseModel): - id: int - code: Optional[str] = None - email_address: Optional[str] = None - owner: Optional[bool] = None - write: Optional[bool] = None - status: Optional[HouseholdInviteStatus] = None - user: Optional[HouseholdInviteUser] = None - version: int +class DeviceTag(BaseModel): + id: Optional[int] = None + device_id: Optional[int] = None + index: Optional[int] = None + profile: Optional[int] = None + version: Optional[int] = None created_at: Optional[datetime] = None updated_at: Optional[datetime] = None - deleted_at: Optional[datetime] = None - used_at: Optional[datetime] = None -class HouseholdUser(BaseModel): - id: int - owner: Optional[bool] = None - write: Optional[bool] = None - user: Optional[PublicUser] = None - version: int - created_at: Optional[datetime] = None - updated_at: Optional[datetime] = None +class DeviceTagData(BaseModel): + data: Optional[Any] = None + pending: Optional[List[Any]] = None + results: Optional[List[Any]] = None -class Timezone(BaseModel): - id: int - name: Optional[str] = None - timezone: Optional[str] = None - utc_offset: int - created_at: Optional[datetime] = None - updated_at: Optional[datetime] = None +class DeviceTagDataResponse(BaseModel): + data: Optional[Any] = None -class Household(BaseModel): - id: int - name: Optional[str] = None - share_code: Optional[str] = None - created_user_id: Optional[int] = None - timezone_id: Optional[int] = None - version: int - created_at: Optional[datetime] = None - updated_at: Optional[datetime] = None - deleted_at: Optional[datetime] = None - invites: Optional[List[HouseholdInvite]] = None - users: Optional[List[HouseholdUser]] = None - timezone: Optional[Timezone] = None +class DeviceTagPaginatedDataResult(BaseModel): + data: Optional[List[Any]] = None + meta: Optional[Any] = None -class MeStart(BaseModel): - devices: Optional[List[Device]] = None - households: Optional[List[Household]] = None - pets: Optional[List[Pet]] = None - photos: Optional[List[Photo]] = None - tags: Optional[List[Tag]] = None - user: Optional[HouseholdUser] = None +class DeviceType(IntEnum): + UNKNOWN_DEVICE_0 = 0 + HUB = 1 + REPEATER = 2 + PET_DOOR_CONNECT = 3 + PET_FEEDER_CONNECT = 4 + PROGRAMMER = 5 + DUALSCAN_CAT_FLAP_CONNECT = 6 + MICROCHIP_FEEDER = 7 + FELAQUA_CONNECT = 8 # Poseidon + CAT_FLAP_CONNECT = 9 + DUALSCAN_PET_DOOR_CONNECT = 10 + DOG_BOWL_CONNECT = 32 # Cerberus + UNKNOWN_DEVICE_255 = 255 -class ConsumptionHabitOutcomeEnum(IntEnum): - OK = 0 - BELOW_LIMIT = 1 - ABOVE_LIMIT = 2 +# TODO: Add descriptive names to numeric special profiles -class ReportWeightFrame(BaseModel): - index: Optional[int] = None - weight: float - change: float - food_type_id: Optional[int] = None - target_weight: Optional[int] = None - multi: Optional[bool] = None +class DoorDirectionEnum(IntEnum): + VALUE_0 = 0 + VALUE_1 = 1 + VALUE_2 = 2 + VALUE_3 = 3 -class FeedingReportDataPoint(BaseModel): +class DoorSide(IntEnum): + VALUE_0 = 0 + VALUE_1 = 1 + VALUE_2 = 2 + + +class DoorStatusEnum(IntEnum): + VALUE_4 = 4 + VALUE_6 = 6 + VALUE_8 = 8 + VALUE_10 = 10 + VALUE_11 = 11 + VALUE_12 = 12 + VALUE_13 = 13 + + +class DrinkingReport(BaseModel): + datapoints: Optional[List[DrinkingReportDataPoint]] = None + + +class DrinkingReportDataPoint(BaseModel): from_: Optional[datetime] = Field(default=None, alias="from") to: Optional[datetime] = None duration: Optional[int] = None context: Optional[int] = None bowl_count: Optional[int] = None - actual_weight: Optional[float] = None weights: Optional[List[ReportWeightFrame]] = None + actual_weight: Optional[float] = None device_id: Optional[int] = None tag_id: Optional[int] = None @@ -327,19 +475,24 @@ class FeedingReportDataPoint(BaseModel): deleted_at: Optional[datetime] = None +class Error(BaseModel): + success: Optional[bool] = None + error: Optional[dict] = None + + class FeedingReport(BaseModel): datapoints: Optional[List[FeedingReportDataPoint]] = None -class DrinkingReportDataPoint(BaseModel): +class FeedingReportDataPoint(BaseModel): from_: Optional[datetime] = Field(default=None, alias="from") to: Optional[datetime] = None duration: Optional[int] = None context: Optional[int] = None bowl_count: Optional[int] = None - weights: Optional[List[ReportWeightFrame]] = None actual_weight: Optional[float] = None + weights: Optional[List[ReportWeightFrame]] = None device_id: Optional[int] = None tag_id: Optional[int] = None @@ -353,8 +506,188 @@ class DrinkingReportDataPoint(BaseModel): deleted_at: Optional[datetime] = None -class DrinkingReport(BaseModel): - datapoints: Optional[List[DrinkingReportDataPoint]] = None +class FoodType(BaseModel): + id: Optional[int] = None + name: Optional[str] = None + version: Optional[int] = None + created_at: Optional[datetime] = None + updated_at: Optional[datetime] = None + + +class FoodTypeDataResponse(BaseModel): + data: Optional[Any] = None + + +class FoodTypePaginatedDataResult(BaseModel): + data: Optional[List[Any]] = None + meta: Optional[Any] = None + + +class FoodTypeQuery(BaseModel): + page: Optional[int] = None + items_per_page: Optional[int] = None + page_size: Optional[int] = None + lang: Optional[str] = None + + +class Household(BaseModel): + id: int + name: Optional[str] = None + share_code: Optional[str] = None + created_user_id: Optional[int] = None + timezone_id: Optional[int] = None + version: int + created_at: Optional[datetime] = None + updated_at: Optional[datetime] = None + deleted_at: Optional[datetime] = None + invites: Optional[List[HouseholdInvite]] = None + users: Optional[List[HouseholdUser]] = None + timezone: Optional[Timezone] = None + + +class HouseholdDataResponse(BaseModel): + data: Optional[Any] = None + + +class HouseholdInvite(BaseModel): + id: int + code: Optional[str] = None + email_address: Optional[str] = None + owner: Optional[bool] = None + write: Optional[bool] = None + status: Optional[HouseholdInviteStatus] = None + user: Optional[HouseholdInviteUser] = None + version: int + created_at: Optional[datetime] = None + updated_at: Optional[datetime] = None + deleted_at: Optional[datetime] = None + used_at: Optional[datetime] = None + + +class HouseholdInviteDataResponse(BaseModel): + data: Optional[Any] = None + + +class HouseholdInvitePaginatedDataResult(BaseModel): + data: Optional[List[Any]] = None + meta: Optional[Any] = None + + +class HouseholdInviteStatus(IntEnum): + PENDING = 0 + ACCEPTED = 1 + EXPIRED = 2 + + +class HouseholdInviteUser(BaseModel): + creator: Optional[PublicUser] = None + acceptor: Optional[PublicUser] = None + + +class HouseholdPaginatedDataResult(BaseModel): + data: Optional[List[Any]] = None + meta: Optional[Any] = None + + +class HouseholdUser(BaseModel): + id: int + owner: Optional[bool] = None + write: Optional[bool] = None + user: Optional[PublicUser] = None + version: int + created_at: Optional[datetime] = None + updated_at: Optional[datetime] = None + + +class HouseholdUserDataResponse(BaseModel): + data: Optional[Any] = None + + +class HouseholdUserPaginatedDataResult(BaseModel): + data: Optional[List[Any]] = None + meta: Optional[Any] = None + + +class Info(BaseModel): + language: Optional[str] = None + country: Optional[str] = None + + +class InfoDataResponse(BaseModel): + data: Optional[Any] = None + + +class Invite(BaseModel): + id: Optional[int] = None + code: Optional[str] = None + email_address: Optional[str] = None + owner: Optional[bool] = None + write: Optional[bool] = None + status: Optional[Any] = None + user: Optional[Any] = None + version: Optional[int] = None + created_at: Optional[datetime] = None + updated_at: Optional[datetime] = None + deleted_at: Optional[datetime] = None + used_at: Optional[datetime] = None + + +class InviteDataResponse(BaseModel): + data: Optional[Any] = None + + +class InvitePaginatedDataResult(BaseModel): + data: Optional[List[Any]] = None + meta: Optional[Any] = None + + +class Language(BaseModel): + id: Optional[int] = None + name: Optional[str] = None + native_name: Optional[str] = None + code: Optional[str] = None + enabled: Optional[bool] = None + created_at: Optional[datetime] = None + updated_at: Optional[datetime] = None + + +class LanguageDataResponse(BaseModel): + data: Optional[Any] = None + + +class LanguagePaginatedDataResult(BaseModel): + data: Optional[List[Any]] = None + meta: Optional[Any] = None + + +class MeStart(BaseModel): + devices: Optional[List[Device]] = None + households: Optional[List[Household]] = None + pets: Optional[List[Pet]] = None + photos: Optional[List[Photo]] = None + tags: Optional[List[Tag]] = None + user: Optional[HouseholdUser] = None + segments: Optional[List[str]] = None + + +class MeStartDataResponse(BaseModel): + data: Optional[Any] = None + + +class Movement(BaseModel): + id: Optional[int] = None + device_id: Optional[int] = None + tag_id: Optional[int] = None + user_id: Optional[int] = None + direction: Optional[Any] = None + side: Optional[Any] = None + type: Optional[Any] = None + created_at: Optional[datetime] = None + updated_at: Optional[datetime] = None + + +class MovementReport(BaseModel): + datapoints: Optional[List[MovementReportDataPoint]] = None class MovementReportDataPoint(BaseModel): @@ -377,32 +710,806 @@ class MovementReportDataPoint(BaseModel): deleted_at: Optional[datetime] = None -class MovementReport(BaseModel): - datapoints: Optional[List[MovementReportDataPoint]] = None +class Notification(BaseModel): + id: Optional[int] = None + type: Optional[Any] = None + text: Optional[str] = None + created_at: Optional[datetime] = None -class ConsumptionHabit(BaseModel): - outcome: ConsumptionHabitOutcomeEnum - calendar_day: date - amount: int - lower_limit: Optional[int] = None - upper_limit: Optional[int] = None - created_at: datetime +class NotificationPaginatedDataResult(BaseModel): + data: Optional[List[Any]] = None + meta: Optional[Any] = None -class ConsumptionAlert(BaseModel): - pet_id: int - tag_id: int - pet_weight: int - amount: int - time_noticed_utc: datetime - created_at: datetime +class ObjectDataResponse(BaseModel): + data: Optional[Any] = None -class PetReport(BaseModel): - movement: MovementReport - feeding: FeedingReport - drinking: DrinkingReport +class PaginatedMetaDataResult(BaseModel): + page: Optional[int] = None + page_size: Optional[int] = None + count: Optional[int] = None + total_pages: Optional[int] = None - consumption_habit: Optional[List[ConsumptionHabit]] = None - consumption_alert: Optional[List[ConsumptionAlert]] = None + +class Pet(BaseModel): + id: int + name: Optional[str] = None + gender: Optional[PetGender] = None + date_of_birth: Optional[datetime] = None + weight: Optional[str] = None + comments: Optional[str] = None + breed_id: Optional[int] = None + breed_id_2: Optional[int] = None + food_type_id: Optional[int] = None + household_id: Optional[int] = None + photo_id: Optional[int] = None + species_id: Optional[int] = None + spayed: Optional[Spayed] = None + tag_id: Optional[int] = None + version: int + created_at: Optional[datetime] = None + updated_at: Optional[datetime] = None + deleted_at: Optional[datetime] = None + photo: Optional[Photo] = None + conditions: Optional[List[PetCondition]] = None + tag: Optional[Tag] = None + status: Optional[PetStatus] = None + position: Optional[PetPosition] = None + + +class PetCondition(BaseModel): + id: int + version: int + created_at: Optional[datetime] = None + updated_at: Optional[datetime] = None + + +class PetConditionDataResponse(BaseModel): + data: Optional[Any] = None + + +class PetConditionPaginatedDataResult(BaseModel): + data: Optional[List[Any]] = None + meta: Optional[Any] = None + + +class PetConsumption(BaseModel): + total_consumption: Optional[float] = None + date: Optional[datetime] = None + + +class PetConsumptionStatus(BaseModel): + id: int + tag_id: Optional[int] = None + device_id: Optional[int] = None + change: Optional[List[float]] = None + at: Optional[datetime] = None + + +class PetDashboard(BaseModel): + pet_id: Optional[int] = None + movement: Optional[Any] = None + drinking: Optional[Any] = None + feeding: Optional[Any] = None + drinking_habit: Optional[Any] = None + drinking_alert: Optional[Any] = None + habit_model_state: Optional[Any] = None + + +class PetDashboardListDataResponse(BaseModel): + data: Optional[List[Any]] = None + + +class PetDashboardQuery(BaseModel): + page: Optional[int] = None + items_per_page: Optional[int] = None + page_size: Optional[int] = None + pet_id: List[int] + from_: datetime = Field(alias='from') + days_history: Optional[int] = None + + +class PetDataResponse(BaseModel): + data: Optional[Any] = None + + +class PetGender(IntEnum): + FEMALE = 0 + MALE = 1 + + +class PetGenderEnum(IntEnum): + VALUE_0 = 0 + VALUE_1 = 1 + + +class PetInsight(BaseModel): + pet_id: Optional[int] = None + drinking_habit: Optional[Any] = None + drinking_alert: Optional[Any] = None + habit_model_state: Optional[Any] = None + + +class PetInsightDataResponse(BaseModel): + data: Optional[Any] = None + + +class PetInsightQuery(BaseModel): + page: Optional[int] = None + items_per_page: Optional[int] = None + page_size: Optional[int] = None + from_: Optional[datetime] = Field(default=None, alias='from') + to: Optional[datetime] = None + + +class PetMovement(BaseModel): + date: Optional[datetime] = None + time_outside: Optional[str] = None + + +class PetPaginatedDataResult(BaseModel): + data: Optional[List[Any]] = None + meta: Optional[Any] = None + + +class PetPosition(BaseModel): + id: int + pet_id: Optional[int] = None + tag_id: Optional[int] = None + device_id: Optional[int] = None + user_id: Optional[int] = None + where: Optional[PetPositionWhere] = None + since: Optional[datetime] = None + + +class PetPositionDataResponse(BaseModel): + data: Optional[Any] = None + + +class PetPositionPaginatedDataResult(BaseModel): + data: Optional[List[Any]] = None + meta: Optional[Any] = None + + +class PetPositionWhere(IntEnum): + INSIDE = 1 + OUTSIDE = 2 + + +class PetReport(BaseModel): + movement: MovementReport + feeding: FeedingReport + drinking: DrinkingReport + + consumption_habit: Optional[List[ConsumptionHabit]] = None + consumption_alert: Optional[List[ConsumptionAlert]] = None + + +class PetStatus(BaseModel): + pet_id: Optional[int] = None + activity: Optional[PetPosition] = None + feeding: Optional[PetConsumptionStatus] = None + drinking: Optional[PetConsumptionStatus] = None + + +class PetStatusDataResponse(BaseModel): + data: Optional[Any] = None + + +class PetStatusPaginatedDataResult(BaseModel): + data: Optional[List[Any]] = None + meta: Optional[Any] = None + + +class Photo(BaseModel): + id: int + title: Optional[str] = None + location: Optional[str] = None + hash: Optional[str] = None + uploading_user_id: Optional[int] = None + version: int + created_at: Optional[datetime] = None + updated_at: Optional[datetime] = None + + +class PhotoDataResponse(BaseModel): + data: Optional[Any] = None + + +class PhotoPaginatedDataResult(BaseModel): + data: Optional[List[Any]] = None + meta: Optional[Any] = None + + +class ProblemDetails(BaseModel): + type: Optional[str] = None + title: Optional[str] = None + status: Optional[int] = None + detail: Optional[str] = None + instance: Optional[str] = None + + +class Product(BaseModel): + id: Optional[int] = None + name: Optional[str] = None + version: Optional[int] = None + created_at: Optional[datetime] = None + updated_at: Optional[datetime] = None + + +class ProductDataResponse(BaseModel): + data: Optional[Any] = None + + +class ProductPaginatedDataResult(BaseModel): + data: Optional[List[Any]] = None + meta: Optional[Any] = None + + +class ProductQuery(BaseModel): + page: Optional[int] = None + items_per_page: Optional[int] = None + page_size: Optional[int] = None + lang: Optional[str] = None + + +class PublicUser(BaseModel): + id: int + name: Optional[str] = None + photo_id: Optional[int] = None + photo: Optional[Photo] = None + + +class PublicUserDataResponse(BaseModel): + data: Optional[Any] = None + + +class ReportHousehold(BaseModel): + pet_id: Optional[int] = None + device_id: Optional[int] = None + movement: Optional[Any] = None + feeding: Optional[Any] = None + drinking: Optional[Any] = None + consumption_habit: Optional[List[Any]] = None + consumption_alert: Optional[List[Any]] = None + + +class ReportHouseholdDataResponse(BaseModel): + data: Optional[Any] = None + + +class ReportHouseholdDrinking(BaseModel): + from_: Optional[datetime] = Field(default=None, alias='from') + to: Optional[datetime] = None + duration: Optional[int] = None + context: Optional[int] = None + bowl_count: Optional[int] = None + device_id: Optional[int] = None + weights: Optional[List[Any]] = None + actual_weight: Optional[float] = None + entry_user_id: Optional[int] = None + exit_user_id: Optional[int] = None + created_at: Optional[datetime] = None + updated_at: Optional[datetime] = None + deleted_at: Optional[datetime] = None + tag_id: Optional[int] = None + user_id: Optional[int] = None + + +class ReportHouseholdDrinkingDataPoint(BaseModel): + datapoints: Optional[List[Any]] = None + + +class ReportHouseholdFeeding(BaseModel): + from_: Optional[datetime] = Field(default=None, alias='from') + to: Optional[datetime] = None + duration: Optional[int] = None + context: Optional[int] = None + bowl_count: Optional[int] = None + device_id: Optional[int] = None + weights: Optional[List[Any]] = None + actual_weight: Optional[float] = None + entry_user_id: Optional[int] = None + exit_user_id: Optional[int] = None + created_at: Optional[datetime] = None + updated_at: Optional[datetime] = None + deleted_at: Optional[datetime] = None + tag_id: Optional[int] = None + user_id: Optional[int] = None + + +class ReportHouseholdFeedingDataPoint(BaseModel): + datapoints: Optional[List[Any]] = None + + +class ReportHouseholdListDataResponse(BaseModel): + data: Optional[List[Any]] = None + + +class ReportHouseholdMovement(BaseModel): + created_at: Optional[datetime] = None + updated_at: Optional[datetime] = None + deleted_at: Optional[datetime] = None + device_id: Optional[int] = None + tag_id: Optional[int] = None + user_id: Optional[int] = None + from_: Optional[datetime] = Field(default=None, alias='from') + to: Optional[datetime] = None + duration: Optional[int] = None + entry_device_id: Optional[int] = None + entry_user_id: Optional[int] = None + exit_device_id: Optional[int] = None + exit_user_id: Optional[int] = None + active: Optional[bool] = None + exit_movement_id: Optional[int] = None + entry_movement_id: Optional[int] = None + + +class ReportHouseholdMovementDataPoint(BaseModel): + datapoints: Optional[List[Any]] = None + + +class ReportHouseholdQuery(BaseModel): + from_: Optional[datetime] = Field(default=None, alias='from') + to: Optional[datetime] = None + + +class ReportWeightFrame(BaseModel): + index: Optional[int] = None + weight: float + change: float + food_type_id: Optional[int] = None + target_weight: Optional[int] = None + multi: Optional[bool] = None + + +class RequestChangeStateResponseStatus(IntEnum): + VALUE_0 = 0 + VALUE_1 = 1 + VALUE_2 = 2 + VALUE_3 = 3 + VALUE_4 = 4 + VALUE_5 = 5 + + +class Spayed(IntEnum): + UNKNOWN = 0 + YES = 1 + NO = 2 + + +class SpayedEnum(IntEnum): + VALUE_0 = 0 + VALUE_1 = 1 + VALUE_2 = 2 + + +# TODO: Add descriptive names to numeric special profiles +class SpecialProfile(IntEnum): + SPECIAL_PROFILE_0 = 0 + SPECIAL_PROFILE_1 = 1 + SPECIAL_PROFILE_2 = 2 + SPECIAL_PROFILE_3 = 3 + SPECIAL_PROFILE_4 = 4 + SPECIAL_PROFILE_5 = 5 + SPECIAL_PROFILE_6 = 6 + + +class SpecialProfiles(IntEnum): + VALUE_0 = 0 + VALUE_1 = 1 + VALUE_2 = 2 + VALUE_3 = 3 + VALUE_4 = 4 + VALUE_5 = 5 + VALUE_6 = 6 + + +class Species(BaseModel): + id: Optional[int] = None + name: Optional[str] = None + version: Optional[int] = None + created_at: Optional[datetime] = None + updated_at: Optional[datetime] = None + + +class SpeciesDataResponse(BaseModel): + data: Optional[Any] = None + + +class SpeciesPaginatedDataResult(BaseModel): + data: Optional[List[Any]] = None + meta: Optional[Any] = None + + +class SpeciesQuery(BaseModel): + page: Optional[int] = None + items_per_page: Optional[int] = None + page_size: Optional[int] = None + lang: Optional[str] = None + + +class Start(BaseModel): + breed: Optional[List[Any]] = None + condition: Optional[List[Any]] = None + country: Optional[List[Any]] = None + language: Optional[List[Any]] = None + product: Optional[List[Any]] = None + timezone: Optional[List[Any]] = None + + +class StartDataResponse(BaseModel): + data: Optional[Any] = None + + +class StartQuery(BaseModel): + lang: Optional[str] = None + + +class SubstanceTypesEnum(IntEnum): + VALUE_0 = 0 + VALUE_1 = 1 + VALUE_2 = 2 + + +class Tag(BaseModel): + id: int + tag: Optional[str] = None + supported_product_ids: Optional[List[DeviceType]] = None + version: int + created_at: Optional[datetime] = None + updated_at: Optional[datetime] = None + deleted_at: Optional[datetime] = None + + +class TagDataResponse(BaseModel): + data: Optional[Any] = None + + +class TagDevice(BaseModel): + id: Optional[int] = None + index: Optional[int] = None + profile: Optional[int] = None + version: Optional[int] = None + created_at: Optional[datetime] = None + updated_at: Optional[datetime] = None + + +class TagDeviceDataResponse(BaseModel): + data: Optional[Any] = None + + +class TagDevicePaginatedDataResult(BaseModel): + data: Optional[List[Any]] = None + meta: Optional[Any] = None + + +class TagPaginatedDataResult(BaseModel): + data: Optional[List[Any]] = None + meta: Optional[Any] = None + + +class Timeline(BaseModel): + id: Optional[int] = None + type: Optional[int] = None + data: Optional[str] = None + created_at: Optional[datetime] = None + updated_at: Optional[datetime] = None + households: Optional[List[Any]] = None + devices: Optional[List[Any]] = None + movements: Optional[List[Any]] = None + pets: Optional[List[Any]] = None + tags: Optional[List[Any]] = None + users: Optional[List[Any]] = None + weights: Optional[List[Any]] = None + + +class TimelineEventType(IntEnum): + VALUE_0 = 0 + VALUE_1 = 1 + VALUE_2 = 2 + VALUE_3 = 3 + VALUE_6 = 6 + VALUE_7 = 7 + VALUE_9 = 9 + VALUE_10 = 10 + VALUE_11 = 11 + VALUE_12 = 12 + VALUE_13 = 13 + VALUE_14 = 14 + VALUE_17 = 17 + VALUE_18 = 18 + VALUE_19 = 19 + VALUE_20 = 20 + VALUE_21 = 21 + VALUE_22 = 22 + VALUE_23 = 23 + VALUE_24 = 24 + VALUE_25 = 25 + VALUE_28 = 28 + VALUE_29 = 29 + VALUE_30 = 30 + VALUE_31 = 31 + VALUE_32 = 32 + VALUE_33 = 33 + VALUE_34 = 34 + VALUE_35 = 35 + VALUE_36 = 36 + VALUE_40 = 40 + VALUE_50 = 50 + VALUE_51 = 51 + VALUE_52 = 52 + VALUE_53 = 53 + VALUE_54 = 54 + VALUE_55 = 55 + VALUE_9999 = 9999 + VALUE_19999 = 19999 + VALUE_20000 = 20000 + VALUE_20001 = 20001 + VALUE_20002 = 20002 + VALUE_20003 = 20003 + VALUE_20004 = 20004 + VALUE_20005 = 20005 + VALUE_20006 = 20006 + VALUE_20007 = 20007 + VALUE_20008 = 20008 + VALUE_20009 = 20009 + VALUE_20010 = 20010 + VALUE_20011 = 20011 + VALUE_20012 = 20012 + VALUE_20399 = 20399 + VALUE_20400 = 20400 + VALUE_20401 = 20401 + VALUE_20402 = 20402 + VALUE_20403 = 20403 + VALUE_20404 = 20404 + VALUE_20405 = 20405 + VALUE_20406 = 20406 + VALUE_20407 = 20407 + VALUE_20408 = 20408 + VALUE_20409 = 20409 + VALUE_20410 = 20410 + VALUE_20411 = 20411 + VALUE_20999 = 20999 + VALUE_21000 = 21000 + VALUE_21001 = 21001 + VALUE_21002 = 21002 + VALUE_21003 = 21003 + VALUE_21004 = 21004 + VALUE_21005 = 21005 + VALUE_21006 = 21006 + VALUE_21007 = 21007 + VALUE_21008 = 21008 + VALUE_21009 = 21009 + VALUE_21010 = 21010 + VALUE_21011 = 21011 + VALUE_21012 = 21012 + VALUE_21013 = 21013 + VALUE_21014 = 21014 + VALUE_21015 = 21015 + VALUE_21016 = 21016 + VALUE_21017 = 21017 + VALUE_21018 = 21018 + VALUE_21019 = 21019 + VALUE_21020 = 21020 + VALUE_21999 = 21999 + VALUE_23000 = 23000 + VALUE_23001 = 23001 + VALUE_23002 = 23002 + VALUE_23003 = 23003 + VALUE_23004 = 23004 + VALUE_23005 = 23005 + VALUE_23006 = 23006 + VALUE_23999 = 23999 + VALUE_24999 = 24999 + VALUE_26999 = 26999 + VALUE_28999 = 28999 + VALUE_30000 = 30000 + VALUE_30001 = 30001 + VALUE_30002 = 30002 + + +class TimelinePaginatedDataResult(BaseModel): + data: Optional[List[Any]] = None + meta: Optional[Any] = None + + +class Timezone(BaseModel): + id: int + name: Optional[str] = None + timezone: Optional[str] = None + utc_offset: int + created_at: Optional[datetime] = None + updated_at: Optional[datetime] = None + + +class TimezoneDataResponse(BaseModel): + data: Optional[Any] = None + + +class TimezonePaginatedDataResult(BaseModel): + data: Optional[List[Any]] = None + meta: Optional[Any] = None + + +class UpdateDevice(BaseModel): + name: str + + +class UpdateDeviceTag(BaseModel): + profile: Optional[Any] = None + + +class UpdateHousehold(BaseModel): + name: Optional[str] = None + timezone_id: Optional[int] = None + + +class UpdateHouseholdInvite(BaseModel): + owner: Optional[bool] = None + write: Optional[bool] = None + + +class UpdateHouseholdUser(BaseModel): + owner: Optional[bool] = None + write: Optional[bool] = None + + +class UpdateMe(BaseModel): + email_address: Optional[str] = None + first_name: Optional[str] = None + last_name: Optional[str] = None + language_id: Optional[int] = None + country_id: Optional[int] = None + photo_id: Optional[int] = None + marketing_opt_in: Optional[bool] = None + weight_units: Optional[Any] = None + time_format: Optional[Any] = None + notifications: Optional[dict] = None + password: Optional[str] = None + + +class UpdatePet(BaseModel): + name: str + gender: Optional[Any] = None + date_of_birth: Optional[datetime] = None + weight: Optional[float] = None + comments: Optional[str] = None + breed_id: Optional[int] = None + breed_id2: Optional[int] = None + spayed: Optional[Any] = None + food_type_id: Optional[int] = None + photo_id: Optional[int] = None + species_id: Optional[int] = None + conditions: Optional[List[Any]] = None + + +class UpdatePhoto(BaseModel): + title: Optional[str] = None + + +class UpdateUserSettings(BaseModel): + value: str + + +class User(BaseModel): + id: Optional[int] = None + email_address: Optional[str] = None + first_name: Optional[str] = None + last_name: Optional[str] = None + country_id: Optional[int] = None + language_id: Optional[int] = None + photo_id: Optional[int] = None + marketing_opt_in: Optional[bool] = None + terms_accepted: Optional[datetime] = None + weight_units: Optional[int] = None + time_format: Optional[int] = None + notifications: Optional[dict] = None + photo: Optional[Any] = None + version: Optional[int] = None + created_at: Optional[datetime] = None + updated_at: Optional[datetime] = None + use_colour: Optional[str] = None + + +class UserClient(BaseModel): + platform: Optional[Any] = None + token: Optional[str] = None + + +class UserClientDataResponse(BaseModel): + data: Optional[Any] = None + + +class UserClientPaginatedDataResult(BaseModel): + data: Optional[List[Any]] = None + meta: Optional[Any] = None + + +class UserClientPlatform(BaseModel): + app: Optional[Any] = None + device: Optional[Any] = None + locale: Optional[Any] = None + + +class UserClientPlatformApp(BaseModel): + bundle_identifier: Optional[str] = None + version: Optional[str] = None + + +class UserClientPlatformDevice(BaseModel): + name: Optional[str] = None + model: Optional[Any] = None + uuid: Optional[str] = None + os: Optional[Any] = None + + +class UserClientPlatformDeviceModel(BaseModel): + name: Optional[str] = None + manufacturer: Optional[str] = None + version: Optional[str] = None + + +class UserClientPlatformDeviceOs(BaseModel): + platform: Optional[str] = None + version: Optional[str] = None + + +class UserClientPlatformLocale(BaseModel): + language: Optional[str] = None + country: Optional[str] = None + + +class UserDataResponse(BaseModel): + data: Optional[Any] = None + + +class UserSetting(BaseModel): + id: Optional[int] = None + user_id: Optional[int] = None + key: Optional[str] = None + value: Optional[str] = None + version: Optional[int] = None + created_at: Optional[datetime] = None + updated_at: Optional[datetime] = None + + +class UserSettingDataResponse(BaseModel): + data: Optional[Any] = None + + +class UserSettingPaginatedDataResult(BaseModel): + data: Optional[List[Any]] = None + meta: Optional[Any] = None + + +class UserTimeFormatEnum(IntEnum): + VALUE_0 = 0 + VALUE_1 = 1 + + +class UserWeightUnitEnum(IntEnum): + VALUE_0 = 0 + VALUE_1 = 1 + + +class Weight(BaseModel): + id: Optional[int] = None + device_id: Optional[int] = None + tag_id: Optional[int] = None + context: Optional[int] = None + duration: Optional[int] = None + created_at: Optional[datetime] = None + updated_at: Optional[datetime] = None + frames: Optional[List[Any]] = None + + +class WeightFrame(BaseModel): + id: Optional[int] = None + index: Optional[int] = None + current_weight: Optional[float] = None + change: Optional[float] = None + created_at: Optional[datetime] = None + updated_at: Optional[datetime] = None diff --git a/surehub_api/entities/official_v2.py b/surehub_api/entities/official_v2.py index a6612c2..6df46cf 100644 --- a/surehub_api/entities/official_v2.py +++ b/surehub_api/entities/official_v2.py @@ -1,7 +1,277 @@ +from __future__ import annotations + +from datetime import datetime, date from enum import IntEnum -from typing import Optional +from typing import Any, Optional, List + +from pydantic import BaseModel, Field + + +class ChangeProfileActionEnum(IntEnum): + VALUE_0 = 0 + VALUE_1 = 1 + VALUE_2 = 2 + + +class ConsumptionAlert(BaseModel): + pet_id: Optional[int] = None + tag_id: Optional[int] = None + pet_weight: Optional[int] = None + amount: Optional[int] = None + time_noticed_utc: Optional[datetime] = None + created_at: Optional[datetime] = None + + +class ConsumptionHabit(BaseModel): + outcome: Optional[Any] = None + calendar_day: Optional[date] = None + amount: Optional[int] = None + lower_limit: Optional[int] = None + upper_limit: Optional[int] = None + created_at: Optional[datetime] = None + + +class ConsumptionHabitOutcomeEnum(IntEnum): + VALUE_0 = 0 + VALUE_1 = 1 + VALUE_2 = 2 + + +class DeviceControlCurfew(BaseModel): + enabled: Optional[bool] = None + lock_time: Optional[str] = None + unlock_time: Optional[str] = None + + +class DeviceControlDualScanPetDoorV2(BaseModel): + fast_polling: Optional[bool] = None + tag_profiles: Optional[List[Any]] = None + timed_access: Optional[List[Any]] = None + locking: Optional[Any] = None + lockdown: Optional[bool] = None + timed_access_override: Optional[bool] = None + + +class DeviceControlDualScanPetDoorV2DeviceControl(BaseModel): + data: Optional[Any] = None + pending: Optional[List[Any]] = None + results: Optional[List[Any]] = None + + +class DeviceControlDualScanPetDoorV2DeviceControlPending(BaseModel): + state: Optional[Any] = None + request_id: Optional[str] = None + requested_at: Optional[datetime] = None + requested_by: Optional[str] = None + + +class DeviceControlDualScanV2(BaseModel): + fast_polling: Optional[bool] = None + tag_profiles: Optional[List[Any]] = None + timed_access: Optional[List[Any]] = None + locking: Optional[Any] = None + lockdown: Optional[bool] = None + + +class DeviceControlDualScanV2DeviceControl(BaseModel): + data: Optional[Any] = None + pending: Optional[List[Any]] = None + results: Optional[List[Any]] = None + + +class DeviceControlDualScanV2DeviceControlPending(BaseModel): + state: Optional[Any] = None + request_id: Optional[str] = None + requested_at: Optional[datetime] = None + requested_by: Optional[str] = None + + +class DeviceControlFeederBowl(BaseModel): + settings: Optional[List[Any]] = None + type: Optional[Any] = None + + +class DeviceControlFeederBowlSettings(BaseModel): + food_type: Optional[Any] = None + target: Optional[float] = None + + +class DeviceControlFeederLid(BaseModel): + close_delay: Optional[int] = None + + +class DeviceControlFeederTagTimedFeeding(BaseModel): + tag_id: Optional[int] = None + fasting: Optional[List[Any]] = None + + +class DeviceControlFeederTimedFeeding(BaseModel): + enabled: Optional[bool] = None + start_time: Optional[str] = None + end_time: Optional[str] = None + + +class DeviceControlFeederV2(BaseModel): + fast_polling: Optional[bool] = None + tag_profiles: Optional[List[Any]] = None + bowls: Optional[Any] = None + lid: Optional[Any] = None + tare: Optional[Any] = None + training_mode: Optional[Any] = None + timed_feeding: Optional[List[Any]] = None + + +class DeviceControlFeederV2DeviceControl(BaseModel): + data: Optional[Any] = None + pending: Optional[List[Any]] = None + results: Optional[List[Any]] = None + + +class DeviceControlFeederV2DeviceControlPending(BaseModel): + state: Optional[Any] = None + request_id: Optional[str] = None + requested_at: Optional[datetime] = None + requested_by: Optional[str] = None + + +class DeviceControlHub(BaseModel): + led_mode: Optional[Any] = None + pairing_mode: Optional[Any] = None + flash_leds: Optional[bool] = None + + +class DeviceControlHubDeviceControl(BaseModel): + data: Optional[Any] = None + pending: Optional[List[Any]] = None + results: Optional[List[Any]] = None -from pydantic import BaseModel + +class DeviceControlHubDeviceControlPending(BaseModel): + state: Optional[Any] = None + request_id: Optional[str] = None + requested_at: Optional[datetime] = None + requested_by: Optional[str] = None + + +class DeviceControlNoIdDogBowl(BaseModel): + fast_polling: Optional[bool] = None + tag_profiles: Optional[List[Any]] = None + food_type: Optional[Any] = None + substance_type: Optional[Any] = None + + +class DeviceControlNoIdDogBowlDeviceControl(BaseModel): + data: Optional[Any] = None + pending: Optional[List[Any]] = None + results: Optional[List[Any]] = None + + +class DeviceControlNoIdDogBowlDeviceControlPending(BaseModel): + state: Optional[Any] = None + request_id: Optional[str] = None + requested_at: Optional[datetime] = None + requested_by: Optional[str] = None + + +class DeviceControlPending(BaseModel): + state: Optional[Any] = None + request_id: Optional[str] = None + requested_at: Optional[datetime] = None + requested_by: Optional[str] = None + + +class DeviceControlPetDoor(BaseModel): + fast_polling: Optional[bool] = None + curfew: Optional[Any] = None + locking: Optional[Any] = None + tag_profiles: Optional[List[Any]] = None + + +class DeviceControlPetDoorDeviceControl(BaseModel): + data: Optional[Any] = None + pending: Optional[List[Any]] = None + results: Optional[List[Any]] = None + + +class DeviceControlPetDoorDeviceControlPending(BaseModel): + state: Optional[Any] = None + request_id: Optional[str] = None + requested_at: Optional[datetime] = None + requested_by: Optional[str] = None + + +class DeviceControlPetDoorMicrochip(BaseModel): + microchip_number: Optional[str] = None + type: Optional[Any] = None + + +class DeviceControlPetDoorTagProfile(BaseModel): + tag_id: Optional[int] = None + index: Optional[int] = None + microchip: Optional[Any] = None + + +class DeviceControlPoseidon(BaseModel): + fast_polling: Optional[bool] = None + tag_profiles: Optional[List[Any]] = None + learn_mode: Optional[bool] = None + + +class DeviceControlPoseidonDeviceControl(BaseModel): + data: Optional[Any] = None + pending: Optional[List[Any]] = None + results: Optional[List[Any]] = None + + +class DeviceControlPoseidonDeviceControlPending(BaseModel): + state: Optional[Any] = None + request_id: Optional[str] = None + requested_at: Optional[datetime] = None + requested_by: Optional[str] = None + + +class DeviceControlResult(BaseModel): + request_id: Optional[str] = None + response_id: Optional[str] = None + status: Optional[Any] = None + status_id: Optional[Any] = None + requested_at: Optional[datetime] = None + committed_at: Optional[datetime] = None + + +class DeviceControlThalamusMicrochip(BaseModel): + microchip_number: Optional[str] = None + type: Optional[Any] = None + + +class DeviceControlThalamusMovementTagTimedAccess(BaseModel): + tag_id: Optional[int] = None + timed_access: Optional[List[Any]] = None + + +class DeviceControlThalamusMovementTimedAccess(BaseModel): + profile: ThalamusMovementTimedAccessAllowedSpecialProfile + lock_time: Optional[str] = None + unlock_time: Optional[str] = None + + +class DeviceControlThalamusTagProfile(BaseModel): + tag_id: Optional[int] = None + index: Optional[int] = None + profile: Optional[Any] = None + action: Optional[Any] = None + request_action: Optional[Any] = None + microchip: Optional[Any] = None + + +class DeviceTag(BaseModel): + id: Optional[int] = None + device_id: Optional[int] = None + index: Optional[int] = None + profile: Optional[int] = None + version: Optional[int] = None + created_at: Optional[datetime] = None + updated_at: Optional[datetime] = None # TODO: Add descriptive names to device tag actions @@ -11,21 +281,346 @@ class DeviceTagAction(IntEnum): ACTION_2 = 2 +class DeviceTagData(BaseModel): + data: Optional[Any] = None + pending: Optional[List[Any]] = None + results: Optional[List[Any]] = None + + class DeviceTagProfile(IntEnum): DISABLED = 2 ENABLED = 3 +class DeviceTagProfiles(IntEnum): + VALUE_2 = 2 + VALUE_3 = 3 + + +class DeviceV2(BaseModel): + id: Optional[int] = None + + +class DoorDirectionEnum(IntEnum): + VALUE_0 = 0 + VALUE_1 = 1 + VALUE_2 = 2 + VALUE_3 = 3 + + +class DoorSide(IntEnum): + VALUE_0 = 0 + VALUE_1 = 1 + VALUE_2 = 2 + + +class DoorStatusEnum(IntEnum): + VALUE_4 = 4 + VALUE_6 = 6 + VALUE_8 = 8 + VALUE_10 = 10 + VALUE_11 = 11 + VALUE_12 = 12 + VALUE_13 = 13 + + +class DualScanLockingModeEnum(IntEnum): + VALUE_0 = 0 + VALUE_1 = 1 + VALUE_2 = 2 + VALUE_3 = 3 + + +class Error(BaseModel): + success: Optional[bool] = None + error: Optional[dict] = None + + +class FeederBowlTypeEnum(IntEnum): + VALUE_1 = 1 + VALUE_4 = 4 + VALUE_5 = 5 + + +class FoodTypesEnum(IntEnum): + VALUE_0 = 0 + VALUE_1 = 1 + VALUE_2 = 2 + VALUE_3 = 3 + + +class HouseholdV2(BaseModel): + id: Optional[int] = None + + +class LedModeEnum(IntEnum): + VALUE_0 = 0 + VALUE_1 = 1 + VALUE_2 = 2 + VALUE_3 = 3 + VALUE_4 = 4 + VALUE_128 = 128 + + +class Movement(BaseModel): + id: Optional[int] = None + device_id: Optional[int] = None + tag_id: Optional[int] = None + user_id: Optional[int] = None + direction: Optional[Any] = None + side: Optional[Any] = None + type: Optional[Any] = None + created_at: Optional[datetime] = None + updated_at: Optional[datetime] = None + + +class PaginatedMetaDataResult(BaseModel): + page: Optional[int] = None + page_size: Optional[int] = None + count: Optional[int] = None + total_pages: Optional[int] = None + + +class PairingModeEnum(IntEnum): + VALUE_0 = 0 + VALUE_1 = 1 + VALUE_2 = 2 + VALUE_3 = 3 + VALUE_128 = 128 + + +class PetDoorLockingModeEnum(IntEnum): + VALUE_0 = 0 + VALUE_1 = 1 + VALUE_2 = 2 + VALUE_3 = 3 + VALUE_4 = 4 + VALUE_5 = 5 + + +class PetDoorTagType(IntEnum): + VALUE_0 = 0 + VALUE_1 = 1 + VALUE_2 = 2 + VALUE_4 = 4 + VALUE_8 = 8 + VALUE_16 = 16 + VALUE_32 = 32 + VALUE_64 = 64 + VALUE_128 = 128 + + +class PetV2(BaseModel): + id: Optional[int] = None + + +class Photo(BaseModel): + id: Optional[int] = None + title: Optional[str] = None + location: Optional[str] = None + hash: Optional[str] = None + uploading_user_id: Optional[int] = None + version: Optional[int] = None + created_at: Optional[datetime] = None + updated_at: Optional[datetime] = None + + +class ProblemDetails(BaseModel): + type: Optional[str] = None + title: Optional[str] = None + status: Optional[int] = None + detail: Optional[str] = None + instance: Optional[str] = None + + +class PublicUser(BaseModel): + id: Optional[int] = None + name: Optional[str] = None + photo_id: Optional[int] = None + photo: Optional[Any] = None + + +class ReportHousehold(BaseModel): + pet_id: Optional[int] = None + device_id: Optional[int] = None + movement: Optional[Any] = None + feeding: Optional[Any] = None + drinking: Optional[Any] = None + consumption_habit: Optional[List[Any]] = None + consumption_alert: Optional[List[Any]] = None + + +class ReportHouseholdDataResponse(BaseModel): + data: Optional[Any] = None + + +class ReportHouseholdDrinking(BaseModel): + from_: Optional[datetime] = Field(default=None, alias='from') + to: Optional[datetime] = None + duration: Optional[int] = None + context: Optional[int] = None + bowl_count: Optional[int] = None + device_id: Optional[int] = None + weights: Optional[List[Any]] = None + actual_weight: Optional[float] = None + entry_user_id: Optional[int] = None + exit_user_id: Optional[int] = None + created_at: Optional[datetime] = None + updated_at: Optional[datetime] = None + deleted_at: Optional[datetime] = None + tag_id: Optional[int] = None + user_id: Optional[int] = None + + +class ReportHouseholdDrinkingDataPoint(BaseModel): + datapoints: Optional[List[Any]] = None + + +class ReportHouseholdEvent(IntEnum): + VALUE_0 = 0 + VALUE_1 = 1 + VALUE_2 = 2 + + +class ReportHouseholdFeeding(BaseModel): + from_: Optional[datetime] = Field(default=None, alias='from') + to: Optional[datetime] = None + duration: Optional[int] = None + context: Optional[int] = None + bowl_count: Optional[int] = None + device_id: Optional[int] = None + weights: Optional[List[Any]] = None + actual_weight: Optional[float] = None + entry_user_id: Optional[int] = None + exit_user_id: Optional[int] = None + created_at: Optional[datetime] = None + updated_at: Optional[datetime] = None + deleted_at: Optional[datetime] = None + tag_id: Optional[int] = None + user_id: Optional[int] = None + + +class ReportHouseholdFeedingDataPoint(BaseModel): + datapoints: Optional[List[Any]] = None + + +class ReportHouseholdMovement(BaseModel): + created_at: Optional[datetime] = None + updated_at: Optional[datetime] = None + deleted_at: Optional[datetime] = None + device_id: Optional[int] = None + tag_id: Optional[int] = None + user_id: Optional[int] = None + from_: Optional[datetime] = Field(default=None, alias='from') + to: Optional[datetime] = None + duration: Optional[int] = None + entry_device_id: Optional[int] = None + entry_user_id: Optional[int] = None + exit_device_id: Optional[int] = None + exit_user_id: Optional[int] = None + active: Optional[bool] = None + exit_movement_id: Optional[int] = None + entry_movement_id: Optional[int] = None + + +class ReportHouseholdMovementDataPoint(BaseModel): + datapoints: Optional[List[Any]] = None + + +class ReportHouseholdV2Query(BaseModel): + from_: datetime = Field(alias='from') + to: datetime + event_type: Optional[Any] = None + + +class ReportWeightFrame(BaseModel): + index: Optional[int] = None + weight: Optional[float] = None + change: Optional[float] = None + food_type_id: Optional[int] = None + target_weight: Optional[int] = None + multi: Optional[bool] = None + + +class RequestChangeStateResponseStatus(IntEnum): + VALUE_0 = 0 + VALUE_1 = 1 + VALUE_2 = 2 + VALUE_3 = 3 + VALUE_4 = 4 + VALUE_5 = 5 + + +class SpecialProfiles(IntEnum): + VALUE_0 = 0 + VALUE_1 = 1 + VALUE_2 = 2 + VALUE_3 = 3 + VALUE_4 = 4 + VALUE_5 = 5 + VALUE_6 = 6 + + +class SubstanceTypesEnum(IntEnum): + VALUE_0 = 0 + VALUE_1 = 1 + VALUE_2 = 2 + + +class TagV2(BaseModel): + id: Optional[int] = None + + class ThalamusMovementTimedAccessAllowedSpecialProfile(IntEnum): SPECIAL_PROFILE_3 = 3 SPECIAL_PROFILE_5 = 5 SPECIAL_PROFILE_6 = 6 -class DeviceControlThalamusMovementTimedAccess(BaseModel): - profile: ThalamusMovementTimedAccessAllowedSpecialProfile - lock_time: Optional[str] = None - unlock_time: Optional[str] = None +class ThalamusMovementTimedAccessAllowedSpecialProfiles(IntEnum): + VALUE_3 = 3 + VALUE_5 = 5 + VALUE_6 = 6 + + +class ThalamusTagType(IntEnum): + VALUE_0 = 0 + VALUE_1 = 1 + VALUE_2 = 2 + VALUE_3 = 3 + VALUE_4 = 4 + VALUE_5 = 5 + VALUE_6 = 6 + VALUE_7 = 7 + VALUE_8 = 8 + + +class TimelineV2(BaseModel): + id: Optional[int] = None + type: Optional[int] = None + data: Optional[str] = None + created_at: Optional[datetime] = None + updated_at: Optional[datetime] = None + household: Optional[List[Any]] = None + devices: Optional[List[Any]] = None + movements: Optional[List[Any]] = None + pets: Optional[List[Any]] = None + tags: Optional[List[Any]] = None + users: Optional[List[Any]] = None + weights: Optional[List[Any]] = None + + +class TimelineV2PaginatedDataResult(BaseModel): + data: Optional[List[Any]] = None + meta: Optional[Any] = None + + +class TrainingMode(IntEnum): + VALUE_0 = 0 + VALUE_1 = 1 + VALUE_2 = 2 + VALUE_3 = 3 + VALUE_4 = 4 class UpdateDeviceTag(BaseModel): @@ -33,3 +628,43 @@ class UpdateDeviceTag(BaseModel): request_action: DeviceTagAction profile: DeviceTagProfile timed_access: Optional[DeviceControlThalamusMovementTimedAccess] = None + + +class UpdateDeviceTagActions(IntEnum): + VALUE_0 = 0 + VALUE_1 = 1 + VALUE_2 = 2 + + +class UpdateDeviceTagV2(BaseModel): + tag_id: Optional[int] = None + request_action: Optional[Any] = None + profile: Optional[Any] = None + timed_access: Optional[List[Any]] = None + + +class Weight(BaseModel): + id: Optional[int] = None + device_id: Optional[int] = None + tag_id: Optional[int] = None + context: Optional[int] = None + duration: Optional[int] = None + created_at: Optional[datetime] = None + updated_at: Optional[datetime] = None + frames: Optional[List[Any]] = None + + +class WeightFrame(BaseModel): + id: Optional[int] = None + index: Optional[int] = None + current_weight: Optional[float] = None + change: Optional[float] = None + created_at: Optional[datetime] = None + updated_at: Optional[datetime] = None + + +class ZeroAction(IntEnum): + VALUE_0 = 0 + VALUE_1 = 1 + VALUE_2 = 2 + VALUE_3 = 3 diff --git a/tests/test_official_openapi_models.py b/tests/test_official_openapi_models.py new file mode 100644 index 0000000..6918e81 --- /dev/null +++ b/tests/test_official_openapi_models.py @@ -0,0 +1,51 @@ +import json +import re +from pathlib import Path + +import pytest + +from surehub_api.entities import official, official_v2 + + +@pytest.mark.parametrize( + ("module", "spec_path"), + [ + (official, Path(__file__).resolve().parents[1] / "resources" / "swagger_v1.json"), + (official_v2, Path(__file__).resolve().parents[1] / "resources" / "swagger_v2.json"), + ], +) +def test_official_modules_include_all_openapi_schema_definitions(module, spec_path): + spec = json.loads(spec_path.read_text()) + schema_names = ( + schema_name.replace("Resource", "") + for schema_name in spec["components"]["schemas"].keys() + ) + + missing_schema_models = [schema_name for schema_name in schema_names if not hasattr(module, schema_name)] + + assert missing_schema_models == [] + + +@pytest.mark.parametrize("module", [official, official_v2]) +def test_official_modules_do_not_expose_resource_named_models(module): + class_names = [ + name + for name, value in vars(module).items() + if isinstance(value, type) and value.__module__ == module.__name__ + ] + resource_named_class_names = [name for name in class_names if "Resource" in name] + + assert resource_named_class_names == [] + + +@pytest.mark.parametrize( + "entity_file_path", + [ + Path(__file__).resolve().parents[1] / "surehub_api" / "entities" / "official.py", + Path(__file__).resolve().parents[1] / "surehub_api" / "entities" / "official_v2.py", + ], +) +def test_official_entity_classes_are_alphabetically_ordered(entity_file_path): + class_names = re.findall(r"^class\s+(\w+)\s*\(", entity_file_path.read_text(), flags=re.M) + + assert class_names == sorted(class_names) From 09777ba348745612d1c9d87416fa34ef02c47b00 Mon Sep 17 00:00:00 2001 From: Fabian Eulitz Date: Mon, 23 Feb 2026 00:37:50 +0100 Subject: [PATCH 10/15] Remove swagger files --- resources/swagger_v1.json | 15250 ------------------------------------ resources/swagger_v2.json | 3427 -------- 2 files changed, 18677 deletions(-) delete mode 100644 resources/swagger_v1.json delete mode 100644 resources/swagger_v2.json diff --git a/resources/swagger_v1.json b/resources/swagger_v1.json deleted file mode 100644 index ed37efd..0000000 --- a/resources/swagger_v1.json +++ /dev/null @@ -1,15250 +0,0 @@ -{ - "openapi": "3.0.1", - "info": { - "title": "App API" - }, - "paths": { - "/api/animo/pet": { - "get": { - "tags": [ - "AnimoPet" - ], - "parameters": [ - { - "name": "HouseholdId", - "in": "query", - "schema": { - "type": "array", - "items": { - "type": "integer", - "format": "int32" - } - } - }, - { - "name": "Page", - "in": "query", - "schema": { - "type": "integer", - "format": "int32" - } - }, - { - "name": "ItemsPerPage", - "in": "query", - "schema": { - "type": "integer", - "format": "int32" - } - }, - { - "name": "PageSize", - "in": "query", - "schema": { - "type": "integer", - "format": "int32" - } - }, - { - "name": "api-version", - "in": "query", - "schema": { - "type": "string" - } - } - ], - "responses": { - "400": { - "description": "Bad Request", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ErrorResource" - } - } - } - }, - "403": { - "description": "Forbidden", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ProblemDetails" - } - } - } - }, - "404": { - "description": "Not Found", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ErrorResource" - } - } - } - }, - "422": { - "description": "Unprocessable Content", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ErrorResource" - } - } - } - }, - "500": { - "description": "Internal Server Error" - }, - "200": { - "description": "OK", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/AnimoPetResourcePaginatedDataResult" - } - } - } - } - } - } - }, - "/api/auth/login": { - "post": { - "tags": [ - "Authentication" - ], - "parameters": [ - { - "name": "api-version", - "in": "query", - "schema": { - "type": "string" - } - } - ], - "requestBody": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/AuthLoginResource" - } - }, - "text/json": { - "schema": { - "$ref": "#/components/schemas/AuthLoginResource" - } - }, - "application/*+json": { - "schema": { - "$ref": "#/components/schemas/AuthLoginResource" - } - } - } - }, - "responses": { - "400": { - "description": "Bad Request", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ErrorResource" - } - } - } - }, - "403": { - "description": "Forbidden", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ProblemDetails" - } - } - } - }, - "404": { - "description": "Not Found", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ErrorResource" - } - } - } - }, - "422": { - "description": "Unprocessable Content", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ErrorResource" - } - } - } - }, - "500": { - "description": "Internal Server Error" - } - } - } - }, - "/api/auth/register": { - "post": { - "tags": [ - "Authentication" - ], - "parameters": [ - { - "name": "api-version", - "in": "query", - "schema": { - "type": "string" - } - } - ], - "requestBody": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/AuthRegisterResource" - } - }, - "text/json": { - "schema": { - "$ref": "#/components/schemas/AuthRegisterResource" - } - }, - "application/*+json": { - "schema": { - "$ref": "#/components/schemas/AuthRegisterResource" - } - } - } - }, - "responses": { - "400": { - "description": "Bad Request", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ErrorResource" - } - } - } - }, - "403": { - "description": "Forbidden", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ProblemDetails" - } - } - } - }, - "404": { - "description": "Not Found", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ErrorResource" - } - } - } - }, - "422": { - "description": "Unprocessable Content", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ErrorResource" - } - } - } - }, - "500": { - "description": "Internal Server Error" - } - } - } - }, - "/api/auth/change-password": { - "post": { - "tags": [ - "Authentication" - ], - "parameters": [ - { - "name": "api-version", - "in": "query", - "schema": { - "type": "string" - } - } - ], - "requestBody": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/AuthChangePasswordResource" - } - }, - "text/json": { - "schema": { - "$ref": "#/components/schemas/AuthChangePasswordResource" - } - }, - "application/*+json": { - "schema": { - "$ref": "#/components/schemas/AuthChangePasswordResource" - } - } - } - }, - "responses": { - "400": { - "description": "Bad Request", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ErrorResource" - } - } - } - }, - "403": { - "description": "Forbidden", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ProblemDetails" - } - } - } - }, - "404": { - "description": "Not Found", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ErrorResource" - } - } - } - }, - "422": { - "description": "Unprocessable Content", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ErrorResource" - } - } - } - }, - "500": { - "description": "Internal Server Error" - } - } - } - }, - "/api/auth/logout": { - "post": { - "tags": [ - "Authentication" - ], - "parameters": [ - { - "name": "X-Device-Id", - "in": "header", - "schema": { - "type": "string" - } - }, - { - "name": "api-version", - "in": "query", - "schema": { - "type": "string" - } - } - ], - "requestBody": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/AuthLogoutResource" - } - }, - "text/json": { - "schema": { - "$ref": "#/components/schemas/AuthLogoutResource" - } - }, - "application/*+json": { - "schema": { - "$ref": "#/components/schemas/AuthLogoutResource" - } - } - } - }, - "responses": { - "400": { - "description": "Bad Request", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ErrorResource" - } - } - } - }, - "403": { - "description": "Forbidden", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ProblemDetails" - } - } - } - }, - "404": { - "description": "Not Found", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ErrorResource" - } - } - } - }, - "422": { - "description": "Unprocessable Content", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ErrorResource" - } - } - } - }, - "500": { - "description": "Internal Server Error" - } - } - } - }, - "/api/auth/reset-password/request": { - "post": { - "tags": [ - "Authentication" - ], - "parameters": [ - { - "name": "api-version", - "in": "query", - "schema": { - "type": "string" - } - } - ], - "requestBody": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/AuthResetPasswordRequestResource" - } - }, - "text/json": { - "schema": { - "$ref": "#/components/schemas/AuthResetPasswordRequestResource" - } - }, - "application/*+json": { - "schema": { - "$ref": "#/components/schemas/AuthResetPasswordRequestResource" - } - } - } - }, - "responses": { - "400": { - "description": "Bad Request", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ErrorResource" - } - } - } - }, - "403": { - "description": "Forbidden", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ProblemDetails" - } - } - } - }, - "404": { - "description": "Not Found", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ErrorResource" - } - } - } - }, - "422": { - "description": "Unprocessable Content", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ErrorResource" - } - } - } - }, - "500": { - "description": "Internal Server Error" - }, - "204": { - "description": "No Content" - } - } - } - }, - "/api/auth/reset-password": { - "post": { - "tags": [ - "Authentication" - ], - "parameters": [ - { - "name": "api-version", - "in": "query", - "schema": { - "type": "string" - } - } - ], - "requestBody": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/AuthResetPasswordResource" - } - }, - "text/json": { - "schema": { - "$ref": "#/components/schemas/AuthResetPasswordResource" - } - }, - "application/*+json": { - "schema": { - "$ref": "#/components/schemas/AuthResetPasswordResource" - } - } - } - }, - "responses": { - "400": { - "description": "Bad Request", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ErrorResource" - } - } - } - }, - "403": { - "description": "Forbidden", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ProblemDetails" - } - } - } - }, - "404": { - "description": "Not Found", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ErrorResource" - } - } - } - }, - "422": { - "description": "Unprocessable Content", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ErrorResource" - } - } - } - }, - "500": { - "description": "Internal Server Error" - }, - "204": { - "description": "No Content" - } - } - } - }, - "/api/breed/{breedId}": { - "get": { - "tags": [ - "Breed" - ], - "parameters": [ - { - "name": "breedId", - "in": "path", - "required": true, - "schema": { - "type": "integer", - "format": "int32" - } - }, - { - "name": "api-version", - "in": "query", - "schema": { - "type": "string" - } - } - ], - "responses": { - "400": { - "description": "Bad Request", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ErrorResource" - } - } - } - }, - "403": { - "description": "Forbidden", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ProblemDetails" - } - } - } - }, - "404": { - "description": "Not Found", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ErrorResource" - } - } - } - }, - "422": { - "description": "Unprocessable Content", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ErrorResource" - } - } - } - }, - "500": { - "description": "Internal Server Error" - }, - "200": { - "description": "OK", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/BreedResourceDataResponse" - } - } - } - } - } - } - }, - "/api/breed": { - "get": { - "tags": [ - "Breed" - ], - "parameters": [ - { - "name": "SpeciesId", - "in": "query", - "schema": { - "type": "integer", - "format": "int32", - "nullable": true - } - }, - { - "name": "Lang", - "in": "query", - "schema": { - "type": "string", - "nullable": true - } - }, - { - "name": "Page", - "in": "query", - "schema": { - "type": "integer", - "format": "int32" - } - }, - { - "name": "ItemsPerPage", - "in": "query", - "schema": { - "type": "integer", - "format": "int32" - } - }, - { - "name": "PageSize", - "in": "query", - "schema": { - "type": "integer", - "format": "int32" - } - }, - { - "name": "api-version", - "in": "query", - "schema": { - "type": "string" - } - } - ], - "responses": { - "400": { - "description": "Bad Request", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ErrorResource" - } - } - } - }, - "403": { - "description": "Forbidden", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ProblemDetails" - } - } - } - }, - "404": { - "description": "Not Found", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ErrorResource" - } - } - } - }, - "422": { - "description": "Unprocessable Content", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ErrorResource" - } - } - } - }, - "500": { - "description": "Internal Server Error" - }, - "200": { - "description": "OK", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/BreedResourcePaginatedDataResult" - } - } - } - } - } - } - }, - "/api/condition/{conditionId}": { - "get": { - "tags": [ - "Condition" - ], - "parameters": [ - { - "name": "conditionId", - "in": "path", - "required": true, - "schema": { - "type": "integer", - "format": "int32" - } - }, - { - "name": "api-version", - "in": "query", - "schema": { - "type": "string" - } - } - ], - "responses": { - "400": { - "description": "Bad Request", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ErrorResource" - } - } - } - }, - "403": { - "description": "Forbidden", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ProblemDetails" - } - } - } - }, - "404": { - "description": "Not Found", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ErrorResource" - } - } - } - }, - "422": { - "description": "Unprocessable Content", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ErrorResource" - } - } - } - }, - "500": { - "description": "Internal Server Error" - }, - "200": { - "description": "OK", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ConditionResourceDataResponse" - } - } - } - } - } - } - }, - "/api/condition": { - "get": { - "tags": [ - "Condition" - ], - "parameters": [ - { - "name": "Lang", - "in": "query", - "schema": { - "type": "string", - "nullable": true - } - }, - { - "name": "Page", - "in": "query", - "schema": { - "type": "integer", - "format": "int32" - } - }, - { - "name": "ItemsPerPage", - "in": "query", - "schema": { - "type": "integer", - "format": "int32" - } - }, - { - "name": "PageSize", - "in": "query", - "schema": { - "type": "integer", - "format": "int32" - } - }, - { - "name": "api-version", - "in": "query", - "schema": { - "type": "string" - } - } - ], - "responses": { - "400": { - "description": "Bad Request", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ErrorResource" - } - } - } - }, - "403": { - "description": "Forbidden", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ProblemDetails" - } - } - } - }, - "404": { - "description": "Not Found", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ErrorResource" - } - } - } - }, - "422": { - "description": "Unprocessable Content", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ErrorResource" - } - } - } - }, - "500": { - "description": "Internal Server Error" - }, - "200": { - "description": "OK", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ConditionResourcePaginatedDataResult" - } - } - } - } - } - } - }, - "/api/country/{countryId}": { - "get": { - "tags": [ - "Country" - ], - "parameters": [ - { - "name": "countryId", - "in": "path", - "required": true, - "schema": { - "type": "integer", - "format": "int32" - } - }, - { - "name": "api-version", - "in": "query", - "schema": { - "type": "string" - } - } - ], - "responses": { - "400": { - "description": "Bad Request", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ErrorResource" - } - } - } - }, - "403": { - "description": "Forbidden", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ProblemDetails" - } - } - } - }, - "404": { - "description": "Not Found", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ErrorResource" - } - } - } - }, - "422": { - "description": "Unprocessable Content", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ErrorResource" - } - } - } - }, - "500": { - "description": "Internal Server Error" - }, - "200": { - "description": "OK", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/CountryResourceDataResponse" - } - } - } - } - } - } - }, - "/api/country": { - "get": { - "tags": [ - "Country" - ], - "parameters": [ - { - "name": "IsoCode2", - "in": "query", - "schema": { - "type": "string", - "nullable": true - } - }, - { - "name": "Lang", - "in": "query", - "schema": { - "type": "string", - "nullable": true - } - }, - { - "name": "Page", - "in": "query", - "schema": { - "type": "integer", - "format": "int32" - } - }, - { - "name": "ItemsPerPage", - "in": "query", - "schema": { - "type": "integer", - "format": "int32" - } - }, - { - "name": "PageSize", - "in": "query", - "schema": { - "type": "integer", - "format": "int32" - } - }, - { - "name": "api-version", - "in": "query", - "schema": { - "type": "string" - } - } - ], - "responses": { - "400": { - "description": "Bad Request", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ErrorResource" - } - } - } - }, - "403": { - "description": "Forbidden", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ProblemDetails" - } - } - } - }, - "404": { - "description": "Not Found", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ErrorResource" - } - } - } - }, - "422": { - "description": "Unprocessable Content", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ErrorResource" - } - } - } - }, - "500": { - "description": "Internal Server Error" - }, - "200": { - "description": "OK", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/CountryResourcePaginatedDataResult" - } - } - } - } - } - } - }, - "/api/device": { - "get": { - "tags": [ - "Device" - ], - "parameters": [ - { - "name": "XivelyDeviceId", - "in": "query", - "schema": { - "type": "string" - } - }, - { - "name": "MacAddress", - "in": "query", - "schema": { - "type": "string" - } - }, - { - "name": "SerialNumber", - "in": "query", - "schema": { - "type": "string" - } - }, - { - "name": "PublicSerialNumber", - "in": "query", - "schema": { - "type": "string" - } - }, - { - "name": "ProductId", - "in": "query", - "schema": { - "$ref": "#/components/schemas/DeviceType" - } - }, - { - "name": "ParentDeviceId", - "in": "query", - "schema": { - "type": "integer", - "format": "int32" - } - }, - { - "name": "Index", - "in": "query", - "schema": { - "type": "integer", - "format": "int32" - } - }, - { - "name": "HouseholdId", - "in": "query", - "schema": { - "type": "array", - "items": { - "type": "integer", - "format": "int32" - } - } - }, - { - "name": "Page", - "in": "query", - "schema": { - "type": "integer", - "format": "int32" - } - }, - { - "name": "ItemsPerPage", - "in": "query", - "schema": { - "type": "integer", - "format": "int32" - } - }, - { - "name": "PageSize", - "in": "query", - "schema": { - "type": "integer", - "format": "int32" - } - }, - { - "name": "api-version", - "in": "query", - "schema": { - "type": "string" - } - } - ], - "responses": { - "400": { - "description": "Bad Request", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ErrorResource" - } - } - } - }, - "403": { - "description": "Forbidden", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ProblemDetails" - } - } - } - }, - "404": { - "description": "Not Found", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ErrorResource" - } - } - } - }, - "422": { - "description": "Unprocessable Content", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ErrorResource" - } - } - } - }, - "500": { - "description": "Internal Server Error" - }, - "200": { - "description": "OK", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/DeviceResourcePaginatedDataResult" - } - } - } - } - } - } - }, - "/api/device/{deviceId}": { - "get": { - "tags": [ - "Device" - ], - "parameters": [ - { - "name": "deviceId", - "in": "path", - "required": true, - "schema": { - "type": "integer", - "format": "int32" - } - }, - { - "name": "api-version", - "in": "query", - "schema": { - "type": "string" - } - } - ], - "responses": { - "400": { - "description": "Bad Request", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ErrorResource" - } - } - } - }, - "403": { - "description": "Forbidden", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ProblemDetails" - } - } - } - }, - "404": { - "description": "Not Found", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ErrorResource" - } - } - } - }, - "422": { - "description": "Unprocessable Content", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ErrorResource" - } - } - } - }, - "500": { - "description": "Internal Server Error" - }, - "200": { - "description": "OK", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/DeviceResourceDataResponse" - } - } - } - } - } - }, - "put": { - "tags": [ - "Device" - ], - "parameters": [ - { - "name": "deviceId", - "in": "path", - "required": true, - "schema": { - "type": "integer", - "format": "int32" - } - }, - { - "name": "api-version", - "in": "query", - "schema": { - "type": "string" - } - } - ], - "requestBody": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/UpdateDeviceResource" - } - }, - "text/json": { - "schema": { - "$ref": "#/components/schemas/UpdateDeviceResource" - } - }, - "application/*+json": { - "schema": { - "$ref": "#/components/schemas/UpdateDeviceResource" - } - } - } - }, - "responses": { - "400": { - "description": "Bad Request", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ErrorResource" - } - } - } - }, - "403": { - "description": "Forbidden", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ProblemDetails" - } - } - } - }, - "404": { - "description": "Not Found", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ErrorResource" - } - } - } - }, - "422": { - "description": "Unprocessable Content", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ErrorResource" - } - } - } - }, - "500": { - "description": "Internal Server Error" - }, - "200": { - "description": "OK", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/DeviceResourceDataResponse" - } - } - } - } - } - }, - "delete": { - "tags": [ - "Device" - ], - "parameters": [ - { - "name": "deviceId", - "in": "path", - "required": true, - "schema": { - "type": "integer", - "format": "int32" - } - }, - { - "name": "api-version", - "in": "query", - "schema": { - "type": "string" - } - } - ], - "responses": { - "400": { - "description": "Bad Request", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ErrorResource" - } - } - } - }, - "403": { - "description": "Forbidden", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ProblemDetails" - } - } - } - }, - "404": { - "description": "Not Found", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ErrorResource" - } - } - } - }, - "422": { - "description": "Unprocessable Content", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ErrorResource" - } - } - } - }, - "500": { - "description": "Internal Server Error" - }, - "204": { - "description": "No Content" - } - } - } - }, - "/api/device/{deviceId}/control": { - "get": { - "tags": [ - "DeviceControl" - ], - "summary": "Will return the current state for a device and any inflight state changes", - "parameters": [ - { - "name": "deviceId", - "in": "path", - "description": "", - "required": true, - "schema": { - "type": "integer", - "format": "int32" - } - }, - { - "name": "api-version", - "in": "query", - "schema": { - "type": "string" - } - } - ], - "responses": { - "400": { - "description": "Bad Request", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ErrorResource" - } - } - } - }, - "403": { - "description": "Forbidden", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ProblemDetails" - } - } - } - }, - "404": { - "description": "Not Found", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ErrorResource" - } - } - } - }, - "422": { - "description": "Unprocessable Content", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ErrorResource" - } - } - } - }, - "500": { - "description": "Internal Server Error" - }, - "200": { - "description": "OK", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/DeviceControlResource" - } - } - } - } - } - }, - "put": { - "tags": [ - "DeviceControl" - ], - "summary": "Request a state change, connection will remain open until the device has acknowledged the state change. There is a one min timeout", - "parameters": [ - { - "name": "deviceId", - "in": "path", - "description": "", - "required": true, - "schema": { - "type": "integer", - "format": "int32" - } - }, - { - "name": "api-version", - "in": "query", - "schema": { - "type": "string" - } - } - ], - "responses": { - "400": { - "description": "Bad Request", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ErrorResource" - } - } - } - }, - "403": { - "description": "Forbidden", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ProblemDetails" - } - } - } - }, - "404": { - "description": "Not Found", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ErrorResource" - } - } - } - }, - "422": { - "description": "Unprocessable Content", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ErrorResource" - } - } - } - }, - "500": { - "description": "Internal Server Error" - }, - "200": { - "description": "OK", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/DeviceControlResource" - } - } - } - } - } - } - }, - "/api/device/{deviceId}/control/async": { - "put": { - "tags": [ - "DeviceControl" - ], - "summary": "Queue a state change, the returned request_id can then be tracked in api/device/{deviceId}/control/status", - "parameters": [ - { - "name": "deviceId", - "in": "path", - "description": "", - "required": true, - "schema": { - "type": "integer", - "format": "int32" - } - }, - { - "name": "api-version", - "in": "query", - "schema": { - "type": "string" - } - } - ], - "responses": { - "400": { - "description": "Bad Request", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ErrorResource" - } - } - } - }, - "403": { - "description": "Forbidden", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ProblemDetails" - } - } - } - }, - "404": { - "description": "Not Found", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ErrorResource" - } - } - } - }, - "422": { - "description": "Unprocessable Content", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ErrorResource" - } - } - } - }, - "500": { - "description": "Internal Server Error" - }, - "200": { - "description": "OK", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/DeviceControlResource" - } - } - } - } - } - } - }, - "/api/device/{deviceId}/control/status": { - "get": { - "tags": [ - "DeviceControlStatus" - ], - "parameters": [ - { - "name": "deviceId", - "in": "path", - "required": true, - "schema": { - "type": "integer", - "format": "int32" - } - }, - { - "name": "Status", - "in": "query", - "schema": { - "type": "array", - "items": { - "$ref": "#/components/schemas/RequestChangeStateResponseStatus" - } - } - }, - { - "name": "api-version", - "in": "query", - "schema": { - "type": "string" - } - } - ], - "responses": { - "400": { - "description": "Bad Request", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ErrorResource" - } - } - } - }, - "403": { - "description": "Forbidden", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ProblemDetails" - } - } - } - }, - "404": { - "description": "Not Found", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ErrorResource" - } - } - } - }, - "422": { - "description": "Unprocessable Content", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ErrorResource" - } - } - } - }, - "500": { - "description": "Internal Server Error" - }, - "200": { - "description": "OK", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/DeviceControlStateChangeResourceListDataResponse" - } - } - } - } - } - } - }, - "/api/household/{householdId}/device/control/status": { - "get": { - "tags": [ - "DeviceControlStatus" - ], - "parameters": [ - { - "name": "householdId", - "in": "path", - "required": true, - "schema": { - "type": "integer", - "format": "int32" - } - }, - { - "name": "Status", - "in": "query", - "schema": { - "type": "array", - "items": { - "$ref": "#/components/schemas/RequestChangeStateResponseStatus" - } - } - }, - { - "name": "api-version", - "in": "query", - "schema": { - "type": "string" - } - } - ], - "responses": { - "400": { - "description": "Bad Request", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ErrorResource" - } - } - } - }, - "403": { - "description": "Forbidden", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ProblemDetails" - } - } - } - }, - "404": { - "description": "Not Found", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ErrorResource" - } - } - } - }, - "422": { - "description": "Unprocessable Content", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ErrorResource" - } - } - } - }, - "500": { - "description": "Internal Server Error" - }, - "200": { - "description": "OK", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/DeviceControlStateChangeResourceListDataResponse" - } - } - } - } - } - } - }, - "/api/device/{deviceId}/control/status/{requestId}": { - "get": { - "tags": [ - "DeviceControlStatus" - ], - "parameters": [ - { - "name": "deviceId", - "in": "path", - "required": true, - "schema": { - "type": "integer", - "format": "int32" - } - }, - { - "name": "requestId", - "in": "path", - "required": true, - "schema": { - "type": "string", - "format": "uuid" - } - }, - { - "name": "api-version", - "in": "query", - "schema": { - "type": "string" - } - } - ], - "responses": { - "400": { - "description": "Bad Request", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ErrorResource" - } - } - } - }, - "403": { - "description": "Forbidden", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ProblemDetails" - } - } - } - }, - "404": { - "description": "Not Found", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ErrorResource" - } - } - } - }, - "422": { - "description": "Unprocessable Content", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ErrorResource" - } - } - } - }, - "500": { - "description": "Internal Server Error" - }, - "200": { - "description": "OK", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/DeviceControlStateChangeResourceDataResponse" - } - } - } - } - } - } - }, - "/api/device/needs-update": { - "get": { - "tags": [ - "DeviceNeedsUpdate" - ], - "parameters": [ - { - "name": "api-version", - "in": "query", - "schema": { - "type": "string" - } - } - ], - "responses": { - "400": { - "description": "Bad Request", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ErrorResource" - } - } - } - }, - "403": { - "description": "Forbidden", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ProblemDetails" - } - } - } - }, - "404": { - "description": "Not Found", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ErrorResource" - } - } - } - }, - "422": { - "description": "Unprocessable Content", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ErrorResource" - } - } - } - }, - "500": { - "description": "Internal Server Error" - }, - "200": { - "description": "OK", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/DeviceNeedsUpdateResourceDataResponse" - } - } - } - } - } - } - }, - "/api/device/pairing": { - "get": { - "tags": [ - "DevicePair" - ], - "parameters": [ - { - "name": "api-version", - "in": "query", - "schema": { - "type": "string" - } - } - ], - "responses": { - "400": { - "description": "Bad Request", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ErrorResource" - } - } - } - }, - "403": { - "description": "Forbidden", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ProblemDetails" - } - } - } - }, - "404": { - "description": "Not Found", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ErrorResource" - } - } - } - }, - "422": { - "description": "Unprocessable Content", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ErrorResource" - } - } - } - }, - "500": { - "description": "Internal Server Error" - }, - "200": { - "description": "OK", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/DeviceResourceIEnumerableDataResponse" - } - } - } - } - } - } - }, - "/api/device/{deviceId}/pair/{householdId}": { - "post": { - "tags": [ - "DevicePair" - ], - "parameters": [ - { - "name": "deviceId", - "in": "path", - "required": true, - "schema": { - "type": "integer", - "format": "int32" - } - }, - { - "name": "householdId", - "in": "path", - "required": true, - "schema": { - "type": "integer", - "format": "int32" - } - }, - { - "name": "api-version", - "in": "query", - "schema": { - "type": "string" - } - } - ], - "responses": { - "400": { - "description": "Bad Request", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ErrorResource" - } - } - } - }, - "403": { - "description": "Forbidden", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ProblemDetails" - } - } - } - }, - "404": { - "description": "Not Found", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ErrorResource" - } - } - } - }, - "422": { - "description": "Unprocessable Content", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ErrorResource" - } - } - } - }, - "500": { - "description": "Internal Server Error" - }, - "200": { - "description": "OK" - } - } - } - }, - "/api/device/pair/{householdId}": { - "post": { - "tags": [ - "DevicePair" - ], - "parameters": [ - { - "name": "householdId", - "in": "path", - "required": true, - "schema": { - "type": "integer", - "format": "int32" - } - }, - { - "name": "api-version", - "in": "query", - "schema": { - "type": "string" - } - } - ], - "requestBody": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/DevicePairByCodeResource" - } - }, - "text/json": { - "schema": { - "$ref": "#/components/schemas/DevicePairByCodeResource" - } - }, - "application/*+json": { - "schema": { - "$ref": "#/components/schemas/DevicePairByCodeResource" - } - } - } - }, - "responses": { - "400": { - "description": "Bad Request", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ErrorResource" - } - } - } - }, - "403": { - "description": "Forbidden", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ProblemDetails" - } - } - } - }, - "404": { - "description": "Not Found", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ErrorResource" - } - } - } - }, - "422": { - "description": "Unprocessable Content", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ErrorResource" - } - } - } - }, - "500": { - "description": "Internal Server Error" - }, - "200": { - "description": "OK", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/DeviceResourceDataResponse" - } - } - } - } - } - } - }, - "/api/device/{deviceId}/readiness": { - "get": { - "tags": [ - "DeviceReadiness" - ], - "parameters": [ - { - "name": "deviceId", - "in": "path", - "required": true, - "schema": { - "type": "integer", - "format": "int32" - } - }, - { - "name": "api-version", - "in": "query", - "schema": { - "type": "string" - } - } - ], - "responses": { - "400": { - "description": "Bad Request", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ErrorResource" - } - } - } - }, - "403": { - "description": "Forbidden", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ProblemDetails" - } - } - } - }, - "404": { - "description": "Not Found", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ErrorResource" - } - } - } - }, - "422": { - "description": "Unprocessable Content", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ErrorResource" - } - } - } - }, - "500": { - "description": "Internal Server Error" - }, - "200": { - "description": "OK", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/DeviceReadinessResourceDataResponse" - } - } - } - } - } - } - }, - "/api/device/{deviceId}/status": { - "get": { - "tags": [ - "DeviceStatus" - ], - "parameters": [ - { - "name": "deviceId", - "in": "path", - "required": true, - "schema": { - "type": "integer", - "format": "int32" - } - }, - { - "name": "api-version", - "in": "query", - "schema": { - "type": "string" - } - } - ], - "responses": { - "400": { - "description": "Bad Request", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ErrorResource" - } - } - } - }, - "403": { - "description": "Forbidden", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ProblemDetails" - } - } - } - }, - "404": { - "description": "Not Found", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ErrorResource" - } - } - } - }, - "422": { - "description": "Unprocessable Content", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ErrorResource" - } - } - } - }, - "500": { - "description": "Internal Server Error" - }, - "200": { - "description": "OK", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ObjectDataResponse" - } - } - } - } - } - } - }, - "/api/device/{deviceId}/tag": { - "get": { - "tags": [ - "DeviceTag" - ], - "parameters": [ - { - "name": "deviceId", - "in": "path", - "required": true, - "schema": { - "type": "integer", - "format": "int32" - } - }, - { - "name": "Index", - "in": "query", - "schema": { - "type": "integer", - "format": "int32" - } - }, - { - "name": "Page", - "in": "query", - "schema": { - "type": "integer", - "format": "int32" - } - }, - { - "name": "ItemsPerPage", - "in": "query", - "schema": { - "type": "integer", - "format": "int32" - } - }, - { - "name": "PageSize", - "in": "query", - "schema": { - "type": "integer", - "format": "int32" - } - }, - { - "name": "api-version", - "in": "query", - "schema": { - "type": "string" - } - } - ], - "responses": { - "400": { - "description": "Bad Request", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ErrorResource" - } - } - } - }, - "403": { - "description": "Forbidden", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ProblemDetails" - } - } - } - }, - "404": { - "description": "Not Found", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ErrorResource" - } - } - } - }, - "422": { - "description": "Unprocessable Content", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ErrorResource" - } - } - } - }, - "500": { - "description": "Internal Server Error" - }, - "200": { - "description": "OK", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/DeviceTagResourcePaginatedDataResult" - } - } - } - } - } - } - }, - "/api/device/{deviceId}/tag/{tagId}": { - "get": { - "tags": [ - "DeviceTag" - ], - "parameters": [ - { - "name": "deviceId", - "in": "path", - "required": true, - "schema": { - "type": "integer", - "format": "int32" - } - }, - { - "name": "tagId", - "in": "path", - "required": true, - "schema": { - "type": "integer", - "format": "int32" - } - }, - { - "name": "api-version", - "in": "query", - "schema": { - "type": "string" - } - } - ], - "responses": { - "400": { - "description": "Bad Request", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ErrorResource" - } - } - } - }, - "403": { - "description": "Forbidden", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ProblemDetails" - } - } - } - }, - "404": { - "description": "Not Found", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ErrorResource" - } - } - } - }, - "422": { - "description": "Unprocessable Content", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ErrorResource" - } - } - } - }, - "500": { - "description": "Internal Server Error" - }, - "200": { - "description": "OK", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/DeviceTagResourceDataResponse" - } - } - } - } - } - }, - "put": { - "tags": [ - "DeviceTag" - ], - "summary": "Request device tage update, connection will remain open until the device has acknowledged the state change. There is a one min timeout", - "parameters": [ - { - "name": "deviceId", - "in": "path", - "description": "", - "required": true, - "schema": { - "type": "integer", - "format": "int32" - } - }, - { - "name": "tagId", - "in": "path", - "description": "", - "required": true, - "schema": { - "type": "integer", - "format": "int32" - } - }, - { - "name": "api-version", - "in": "query", - "schema": { - "type": "string" - } - } - ], - "requestBody": { - "description": "", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/UpdateDeviceTagResource" - } - }, - "text/json": { - "schema": { - "$ref": "#/components/schemas/UpdateDeviceTagResource" - } - }, - "application/*+json": { - "schema": { - "$ref": "#/components/schemas/UpdateDeviceTagResource" - } - } - } - }, - "responses": { - "400": { - "description": "Bad Request", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ErrorResource" - } - } - } - }, - "403": { - "description": "Forbidden", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ProblemDetails" - } - } - } - }, - "404": { - "description": "Not Found", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ErrorResource" - } - } - } - }, - "422": { - "description": "Unprocessable Content", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ErrorResource" - } - } - } - }, - "500": { - "description": "Internal Server Error" - }, - "200": { - "description": "OK", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/DeviceTagDataResource" - } - } - } - } - } - }, - "delete": { - "tags": [ - "DeviceTag" - ], - "summary": "Request device tage deletion, connection will remain open until the device has acknowledged the state change. There is a one min timeout", - "parameters": [ - { - "name": "deviceId", - "in": "path", - "description": "", - "required": true, - "schema": { - "type": "integer", - "format": "int32" - } - }, - { - "name": "tagId", - "in": "path", - "description": "", - "required": true, - "schema": { - "type": "integer", - "format": "int32" - } - }, - { - "name": "api-version", - "in": "query", - "schema": { - "type": "string" - } - } - ], - "responses": { - "400": { - "description": "Bad Request", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ErrorResource" - } - } - } - }, - "403": { - "description": "Forbidden", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ProblemDetails" - } - } - } - }, - "404": { - "description": "Not Found", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ErrorResource" - } - } - } - }, - "422": { - "description": "Unprocessable Content", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ErrorResource" - } - } - } - }, - "500": { - "description": "Internal Server Error" - }, - "200": { - "description": "OK", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/DeviceTagDataResource" - } - } - } - } - } - } - }, - "/api/device/{deviceId}/tag/{tagId}/async": { - "put": { - "tags": [ - "DeviceTag" - ], - "summary": "Queue a device tage change, the returned request_id can then be tracked in api/device/{deviceId}/control/status", - "parameters": [ - { - "name": "deviceId", - "in": "path", - "description": "", - "required": true, - "schema": { - "type": "integer", - "format": "int32" - } - }, - { - "name": "tagId", - "in": "path", - "description": "", - "required": true, - "schema": { - "type": "integer", - "format": "int32" - } - }, - { - "name": "api-version", - "in": "query", - "schema": { - "type": "string" - } - } - ], - "requestBody": { - "description": "", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/UpdateDeviceTagResource" - } - }, - "text/json": { - "schema": { - "$ref": "#/components/schemas/UpdateDeviceTagResource" - } - }, - "application/*+json": { - "schema": { - "$ref": "#/components/schemas/UpdateDeviceTagResource" - } - } - } - }, - "responses": { - "400": { - "description": "Bad Request", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ErrorResource" - } - } - } - }, - "403": { - "description": "Forbidden", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ProblemDetails" - } - } - } - }, - "404": { - "description": "Not Found", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ErrorResource" - } - } - } - }, - "422": { - "description": "Unprocessable Content", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ErrorResource" - } - } - } - }, - "500": { - "description": "Internal Server Error" - }, - "200": { - "description": "OK", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/DeviceTagDataResource" - } - } - } - } - } - }, - "delete": { - "tags": [ - "DeviceTag" - ], - "summary": "Queue a device tage deletion, the returned request_id can then be tracked in api/device/{deviceId}/control/status", - "parameters": [ - { - "name": "deviceId", - "in": "path", - "description": "", - "required": true, - "schema": { - "type": "integer", - "format": "int32" - } - }, - { - "name": "tagId", - "in": "path", - "description": "", - "required": true, - "schema": { - "type": "integer", - "format": "int32" - } - }, - { - "name": "api-version", - "in": "query", - "schema": { - "type": "string" - } - } - ], - "responses": { - "400": { - "description": "Bad Request", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ErrorResource" - } - } - } - }, - "403": { - "description": "Forbidden", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ProblemDetails" - } - } - } - }, - "404": { - "description": "Not Found", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ErrorResource" - } - } - } - }, - "422": { - "description": "Unprocessable Content", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ErrorResource" - } - } - } - }, - "500": { - "description": "Internal Server Error" - }, - "200": { - "description": "OK", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/DeviceTagDataResource" - } - } - } - } - } - } - }, - "/api/food-type": { - "get": { - "tags": [ - "FoodType" - ], - "parameters": [ - { - "name": "Lang", - "in": "query", - "schema": { - "type": "string", - "nullable": true - } - }, - { - "name": "Page", - "in": "query", - "schema": { - "type": "integer", - "format": "int32" - } - }, - { - "name": "ItemsPerPage", - "in": "query", - "schema": { - "type": "integer", - "format": "int32" - } - }, - { - "name": "PageSize", - "in": "query", - "schema": { - "type": "integer", - "format": "int32" - } - }, - { - "name": "api-version", - "in": "query", - "schema": { - "type": "string" - } - } - ], - "responses": { - "400": { - "description": "Bad Request", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ErrorResource" - } - } - } - }, - "403": { - "description": "Forbidden", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ProblemDetails" - } - } - } - }, - "404": { - "description": "Not Found", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ErrorResource" - } - } - } - }, - "422": { - "description": "Unprocessable Content", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ErrorResource" - } - } - } - }, - "500": { - "description": "Internal Server Error" - }, - "200": { - "description": "OK", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/FoodTypeResourcePaginatedDataResult" - } - } - } - } - } - } - }, - "/api/food-type/{foodTypeId}": { - "get": { - "tags": [ - "FoodType" - ], - "parameters": [ - { - "name": "foodTypeId", - "in": "path", - "required": true, - "schema": { - "type": "integer", - "format": "int32" - } - }, - { - "name": "api-version", - "in": "query", - "schema": { - "type": "string" - } - } - ], - "responses": { - "400": { - "description": "Bad Request", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ErrorResource" - } - } - } - }, - "403": { - "description": "Forbidden", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ProblemDetails" - } - } - } - }, - "404": { - "description": "Not Found", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ErrorResource" - } - } - } - }, - "422": { - "description": "Unprocessable Content", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ErrorResource" - } - } - } - }, - "500": { - "description": "Internal Server Error" - }, - "200": { - "description": "OK", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/FoodTypeResourceDataResponse" - } - } - } - } - } - } - }, - "/api/household": { - "get": { - "tags": [ - "Household" - ], - "parameters": [ - { - "name": "Page", - "in": "query", - "schema": { - "type": "integer", - "format": "int32" - } - }, - { - "name": "ItemsPerPage", - "in": "query", - "schema": { - "type": "integer", - "format": "int32" - } - }, - { - "name": "PageSize", - "in": "query", - "schema": { - "type": "integer", - "format": "int32" - } - }, - { - "name": "api-version", - "in": "query", - "schema": { - "type": "string" - } - } - ], - "responses": { - "400": { - "description": "Bad Request", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ErrorResource" - } - } - } - }, - "403": { - "description": "Forbidden", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ProblemDetails" - } - } - } - }, - "404": { - "description": "Not Found", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ErrorResource" - } - } - } - }, - "422": { - "description": "Unprocessable Content", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ErrorResource" - } - } - } - }, - "500": { - "description": "Internal Server Error" - }, - "200": { - "description": "OK", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/HouseholdResourcePaginatedDataResult" - } - } - } - } - } - }, - "post": { - "tags": [ - "Household" - ], - "parameters": [ - { - "name": "api-version", - "in": "query", - "schema": { - "type": "string" - } - } - ], - "requestBody": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/CreateHouseholdResource" - } - }, - "text/json": { - "schema": { - "$ref": "#/components/schemas/CreateHouseholdResource" - } - }, - "application/*+json": { - "schema": { - "$ref": "#/components/schemas/CreateHouseholdResource" - } - } - } - }, - "responses": { - "400": { - "description": "Bad Request", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ErrorResource" - } - } - } - }, - "403": { - "description": "Forbidden", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ProblemDetails" - } - } - } - }, - "404": { - "description": "Not Found", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ErrorResource" - } - } - } - }, - "422": { - "description": "Unprocessable Content", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ErrorResource" - } - } - } - }, - "500": { - "description": "Internal Server Error" - }, - "201": { - "description": "Created", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/HouseholdResourceDataResponse" - } - } - } - } - } - } - }, - "/api/household/{householdId}": { - "get": { - "tags": [ - "Household" - ], - "parameters": [ - { - "name": "householdId", - "in": "path", - "required": true, - "schema": { - "type": "integer", - "format": "int32" - } - }, - { - "name": "api-version", - "in": "query", - "schema": { - "type": "string" - } - } - ], - "responses": { - "400": { - "description": "Bad Request", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ErrorResource" - } - } - } - }, - "403": { - "description": "Forbidden", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ProblemDetails" - } - } - } - }, - "404": { - "description": "Not Found", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ErrorResource" - } - } - } - }, - "422": { - "description": "Unprocessable Content", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ErrorResource" - } - } - } - }, - "500": { - "description": "Internal Server Error" - }, - "200": { - "description": "OK", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/HouseholdResourceDataResponse" - } - } - } - } - } - }, - "put": { - "tags": [ - "Household" - ], - "parameters": [ - { - "name": "householdId", - "in": "path", - "required": true, - "schema": { - "type": "integer", - "format": "int32" - } - }, - { - "name": "api-version", - "in": "query", - "schema": { - "type": "string" - } - } - ], - "requestBody": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/UpdateHouseholdResource" - } - }, - "text/json": { - "schema": { - "$ref": "#/components/schemas/UpdateHouseholdResource" - } - }, - "application/*+json": { - "schema": { - "$ref": "#/components/schemas/UpdateHouseholdResource" - } - } - } - }, - "responses": { - "400": { - "description": "Bad Request", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ErrorResource" - } - } - } - }, - "403": { - "description": "Forbidden", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ProblemDetails" - } - } - } - }, - "404": { - "description": "Not Found", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ErrorResource" - } - } - } - }, - "422": { - "description": "Unprocessable Content", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ErrorResource" - } - } - } - }, - "500": { - "description": "Internal Server Error" - }, - "200": { - "description": "OK", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/HouseholdResourceDataResponse" - } - } - } - } - } - }, - "delete": { - "tags": [ - "Household" - ], - "parameters": [ - { - "name": "householdId", - "in": "path", - "required": true, - "schema": { - "type": "integer", - "format": "int32" - } - }, - { - "name": "api-version", - "in": "query", - "schema": { - "type": "string" - } - } - ], - "responses": { - "400": { - "description": "Bad Request", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ErrorResource" - } - } - } - }, - "403": { - "description": "Forbidden", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ProblemDetails" - } - } - } - }, - "404": { - "description": "Not Found", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ErrorResource" - } - } - } - }, - "422": { - "description": "Unprocessable Content", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ErrorResource" - } - } - } - }, - "500": { - "description": "Internal Server Error" - }, - "204": { - "description": "No Content" - } - } - } - }, - "/api/household/{householdId}/device": { - "get": { - "tags": [ - "HouseholdDevice" - ], - "parameters": [ - { - "name": "householdId", - "in": "path", - "required": true, - "schema": { - "type": "integer", - "format": "int32" - } - }, - { - "name": "Page", - "in": "query", - "schema": { - "type": "integer", - "format": "int32" - } - }, - { - "name": "ItemsPerPage", - "in": "query", - "schema": { - "type": "integer", - "format": "int32" - } - }, - { - "name": "PageSize", - "in": "query", - "schema": { - "type": "integer", - "format": "int32" - } - }, - { - "name": "api-version", - "in": "query", - "schema": { - "type": "string" - } - } - ], - "responses": { - "400": { - "description": "Bad Request", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ErrorResource" - } - } - } - }, - "403": { - "description": "Forbidden", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ProblemDetails" - } - } - } - }, - "404": { - "description": "Not Found", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ErrorResource" - } - } - } - }, - "422": { - "description": "Unprocessable Content", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ErrorResource" - } - } - } - }, - "500": { - "description": "Internal Server Error" - }, - "200": { - "description": "OK", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/DeviceResourcePaginatedDataResult" - } - } - } - } - } - } - }, - "/api/household/{householdId}/device/{deviceId}": { - "get": { - "tags": [ - "HouseholdDevice" - ], - "parameters": [ - { - "name": "householdId", - "in": "path", - "required": true, - "schema": { - "type": "integer", - "format": "int32" - } - }, - { - "name": "deviceId", - "in": "path", - "required": true, - "schema": { - "type": "integer", - "format": "int32" - } - }, - { - "name": "api-version", - "in": "query", - "schema": { - "type": "string" - } - } - ], - "responses": { - "400": { - "description": "Bad Request", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ErrorResource" - } - } - } - }, - "403": { - "description": "Forbidden", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ProblemDetails" - } - } - } - }, - "404": { - "description": "Not Found", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ErrorResource" - } - } - } - }, - "422": { - "description": "Unprocessable Content", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ErrorResource" - } - } - } - }, - "500": { - "description": "Internal Server Error" - }, - "200": { - "description": "OK", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/DeviceResourceDataResponse" - } - } - } - } - } - } - }, - "/api/household/{householdId}/invite": { - "get": { - "tags": [ - "HouseholdInvite" - ], - "parameters": [ - { - "name": "householdId", - "in": "path", - "required": true, - "schema": { - "type": "integer", - "format": "int32" - } - }, - { - "name": "Page", - "in": "query", - "schema": { - "type": "integer", - "format": "int32" - } - }, - { - "name": "ItemsPerPage", - "in": "query", - "schema": { - "type": "integer", - "format": "int32" - } - }, - { - "name": "PageSize", - "in": "query", - "schema": { - "type": "integer", - "format": "int32" - } - }, - { - "name": "api-version", - "in": "query", - "schema": { - "type": "string" - } - } - ], - "responses": { - "400": { - "description": "Bad Request", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ErrorResource" - } - } - } - }, - "403": { - "description": "Forbidden", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ProblemDetails" - } - } - } - }, - "404": { - "description": "Not Found", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ErrorResource" - } - } - } - }, - "422": { - "description": "Unprocessable Content", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ErrorResource" - } - } - } - }, - "500": { - "description": "Internal Server Error" - }, - "200": { - "description": "OK", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/HouseholdInviteResourcePaginatedDataResult" - } - } - } - } - } - }, - "post": { - "tags": [ - "HouseholdInvite" - ], - "parameters": [ - { - "name": "householdId", - "in": "path", - "required": true, - "schema": { - "type": "integer", - "format": "int32" - } - }, - { - "name": "api-version", - "in": "query", - "schema": { - "type": "string" - } - } - ], - "requestBody": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/CreateHouseholdInviteResource" - } - }, - "text/json": { - "schema": { - "$ref": "#/components/schemas/CreateHouseholdInviteResource" - } - }, - "application/*+json": { - "schema": { - "$ref": "#/components/schemas/CreateHouseholdInviteResource" - } - } - } - }, - "responses": { - "400": { - "description": "Bad Request", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ErrorResource" - } - } - } - }, - "403": { - "description": "Forbidden", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ProblemDetails" - } - } - } - }, - "404": { - "description": "Not Found", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ErrorResource" - } - } - } - }, - "422": { - "description": "Unprocessable Content", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ErrorResource" - } - } - } - }, - "500": { - "description": "Internal Server Error" - }, - "201": { - "description": "Created", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/HouseholdResourceDataResponse" - } - } - } - } - } - } - }, - "/api/household/{householdId}/invite/{inviteId}": { - "get": { - "tags": [ - "HouseholdInvite" - ], - "parameters": [ - { - "name": "householdId", - "in": "path", - "required": true, - "schema": { - "type": "integer", - "format": "int32" - } - }, - { - "name": "inviteId", - "in": "path", - "required": true, - "schema": { - "type": "integer", - "format": "int32" - } - }, - { - "name": "api-version", - "in": "query", - "schema": { - "type": "string" - } - } - ], - "responses": { - "400": { - "description": "Bad Request", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ErrorResource" - } - } - } - }, - "403": { - "description": "Forbidden", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ProblemDetails" - } - } - } - }, - "404": { - "description": "Not Found", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ErrorResource" - } - } - } - }, - "422": { - "description": "Unprocessable Content", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ErrorResource" - } - } - } - }, - "500": { - "description": "Internal Server Error" - }, - "200": { - "description": "OK", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/HouseholdInviteResourceDataResponse" - } - } - } - } - } - }, - "put": { - "tags": [ - "HouseholdInvite" - ], - "parameters": [ - { - "name": "householdId", - "in": "path", - "required": true, - "schema": { - "type": "integer", - "format": "int32" - } - }, - { - "name": "inviteId", - "in": "path", - "required": true, - "schema": { - "type": "integer", - "format": "int32" - } - }, - { - "name": "api-version", - "in": "query", - "schema": { - "type": "string" - } - } - ], - "requestBody": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/UpdateHouseholdInviteResource" - } - }, - "text/json": { - "schema": { - "$ref": "#/components/schemas/UpdateHouseholdInviteResource" - } - }, - "application/*+json": { - "schema": { - "$ref": "#/components/schemas/UpdateHouseholdInviteResource" - } - } - } - }, - "responses": { - "400": { - "description": "Bad Request", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ErrorResource" - } - } - } - }, - "403": { - "description": "Forbidden", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ProblemDetails" - } - } - } - }, - "404": { - "description": "Not Found", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ErrorResource" - } - } - } - }, - "422": { - "description": "Unprocessable Content", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ErrorResource" - } - } - } - }, - "500": { - "description": "Internal Server Error" - }, - "200": { - "description": "OK", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/HouseholdInviteResourceDataResponse" - } - } - } - } - } - }, - "delete": { - "tags": [ - "HouseholdInvite" - ], - "parameters": [ - { - "name": "householdId", - "in": "path", - "required": true, - "schema": { - "type": "integer", - "format": "int32" - } - }, - { - "name": "inviteId", - "in": "path", - "required": true, - "schema": { - "type": "integer", - "format": "int32" - } - }, - { - "name": "api-version", - "in": "query", - "schema": { - "type": "string" - } - } - ], - "responses": { - "400": { - "description": "Bad Request", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ErrorResource" - } - } - } - }, - "403": { - "description": "Forbidden", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ProblemDetails" - } - } - } - }, - "404": { - "description": "Not Found", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ErrorResource" - } - } - } - }, - "422": { - "description": "Unprocessable Content", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ErrorResource" - } - } - } - }, - "500": { - "description": "Internal Server Error" - }, - "204": { - "description": "No Content" - } - } - } - }, - "/api/household/{householdId}/invite/{inviteId}/resend": { - "post": { - "tags": [ - "HouseholdInvite" - ], - "parameters": [ - { - "name": "householdId", - "in": "path", - "required": true, - "schema": { - "type": "integer", - "format": "int32" - } - }, - { - "name": "inviteId", - "in": "path", - "required": true, - "schema": { - "type": "integer", - "format": "int32" - } - }, - { - "name": "api-version", - "in": "query", - "schema": { - "type": "string" - } - } - ], - "responses": { - "400": { - "description": "Bad Request", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ErrorResource" - } - } - } - }, - "403": { - "description": "Forbidden", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ProblemDetails" - } - } - } - }, - "404": { - "description": "Not Found", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ErrorResource" - } - } - } - }, - "422": { - "description": "Unprocessable Content", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ErrorResource" - } - } - } - }, - "500": { - "description": "Internal Server Error" - }, - "200": { - "description": "OK", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/HouseholdInviteResourceDataResponse" - } - } - } - } - } - } - }, - "/api/household/{householdId}/pet": { - "get": { - "tags": [ - "HouseholdPet" - ], - "parameters": [ - { - "name": "householdId", - "in": "path", - "required": true, - "schema": { - "type": "integer", - "format": "int32" - } - }, - { - "name": "Page", - "in": "query", - "schema": { - "type": "integer", - "format": "int32" - } - }, - { - "name": "ItemsPerPage", - "in": "query", - "schema": { - "type": "integer", - "format": "int32" - } - }, - { - "name": "PageSize", - "in": "query", - "schema": { - "type": "integer", - "format": "int32" - } - }, - { - "name": "api-version", - "in": "query", - "schema": { - "type": "string" - } - } - ], - "responses": { - "400": { - "description": "Bad Request", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ErrorResource" - } - } - } - }, - "403": { - "description": "Forbidden", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ProblemDetails" - } - } - } - }, - "404": { - "description": "Not Found", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ErrorResource" - } - } - } - }, - "422": { - "description": "Unprocessable Content", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ErrorResource" - } - } - } - }, - "500": { - "description": "Internal Server Error" - }, - "200": { - "description": "OK", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/PetResourcePaginatedDataResult" - } - } - } - } - } - } - }, - "/api/household/{householdId}/pet/{petId}": { - "get": { - "tags": [ - "HouseholdPet" - ], - "parameters": [ - { - "name": "householdId", - "in": "path", - "required": true, - "schema": { - "type": "integer", - "format": "int32" - } - }, - { - "name": "petId", - "in": "path", - "required": true, - "schema": { - "type": "integer", - "format": "int32" - } - }, - { - "name": "api-version", - "in": "query", - "schema": { - "type": "string" - } - } - ], - "responses": { - "400": { - "description": "Bad Request", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ErrorResource" - } - } - } - }, - "403": { - "description": "Forbidden", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ProblemDetails" - } - } - } - }, - "404": { - "description": "Not Found", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ErrorResource" - } - } - } - }, - "422": { - "description": "Unprocessable Content", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ErrorResource" - } - } - } - }, - "500": { - "description": "Internal Server Error" - }, - "200": { - "description": "OK", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/PetResourceDataResponse" - } - } - } - } - } - } - }, - "/api/household/{householdId}/user": { - "get": { - "tags": [ - "HouseholdUser" - ], - "parameters": [ - { - "name": "householdId", - "in": "path", - "required": true, - "schema": { - "type": "integer", - "format": "int32" - } - }, - { - "name": "Page", - "in": "query", - "schema": { - "type": "integer", - "format": "int32" - } - }, - { - "name": "ItemsPerPage", - "in": "query", - "schema": { - "type": "integer", - "format": "int32" - } - }, - { - "name": "PageSize", - "in": "query", - "schema": { - "type": "integer", - "format": "int32" - } - }, - { - "name": "api-version", - "in": "query", - "schema": { - "type": "string" - } - } - ], - "responses": { - "400": { - "description": "Bad Request", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ErrorResource" - } - } - } - }, - "403": { - "description": "Forbidden", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ProblemDetails" - } - } - } - }, - "404": { - "description": "Not Found", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ErrorResource" - } - } - } - }, - "422": { - "description": "Unprocessable Content", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ErrorResource" - } - } - } - }, - "500": { - "description": "Internal Server Error" - }, - "200": { - "description": "OK", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/HouseholdUserResourcePaginatedDataResult" - } - } - } - } - } - } - }, - "/api/household/{householdId}/user/{userId}": { - "get": { - "tags": [ - "HouseholdUser" - ], - "parameters": [ - { - "name": "householdId", - "in": "path", - "required": true, - "schema": { - "type": "integer", - "format": "int32" - } - }, - { - "name": "userId", - "in": "path", - "required": true, - "schema": { - "type": "integer", - "format": "int32" - } - }, - { - "name": "api-version", - "in": "query", - "schema": { - "type": "string" - } - } - ], - "responses": { - "400": { - "description": "Bad Request", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ErrorResource" - } - } - } - }, - "403": { - "description": "Forbidden", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ProblemDetails" - } - } - } - }, - "404": { - "description": "Not Found", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ErrorResource" - } - } - } - }, - "422": { - "description": "Unprocessable Content", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ErrorResource" - } - } - } - }, - "500": { - "description": "Internal Server Error" - }, - "200": { - "description": "OK", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/HouseholdUserResourceDataResponse" - } - } - } - } - } - }, - "put": { - "tags": [ - "HouseholdUser" - ], - "parameters": [ - { - "name": "householdId", - "in": "path", - "required": true, - "schema": { - "type": "integer", - "format": "int32" - } - }, - { - "name": "userId", - "in": "path", - "required": true, - "schema": { - "type": "integer", - "format": "int32" - } - }, - { - "name": "api-version", - "in": "query", - "schema": { - "type": "string" - } - } - ], - "requestBody": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/UpdateHouseholdUserResource" - } - }, - "text/json": { - "schema": { - "$ref": "#/components/schemas/UpdateHouseholdUserResource" - } - }, - "application/*+json": { - "schema": { - "$ref": "#/components/schemas/UpdateHouseholdUserResource" - } - } - } - }, - "responses": { - "400": { - "description": "Bad Request", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ErrorResource" - } - } - } - }, - "403": { - "description": "Forbidden", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ProblemDetails" - } - } - } - }, - "404": { - "description": "Not Found", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ErrorResource" - } - } - } - }, - "422": { - "description": "Unprocessable Content", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ErrorResource" - } - } - } - }, - "500": { - "description": "Internal Server Error" - }, - "200": { - "description": "OK", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/HouseholdUserResourceDataResponse" - } - } - } - } - } - }, - "delete": { - "tags": [ - "HouseholdUser" - ], - "parameters": [ - { - "name": "householdId", - "in": "path", - "required": true, - "schema": { - "type": "integer", - "format": "int32" - } - }, - { - "name": "userId", - "in": "path", - "required": true, - "schema": { - "type": "integer", - "format": "int32" - } - }, - { - "name": "api-version", - "in": "query", - "schema": { - "type": "string" - } - } - ], - "responses": { - "400": { - "description": "Bad Request", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ErrorResource" - } - } - } - }, - "403": { - "description": "Forbidden", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ProblemDetails" - } - } - } - }, - "404": { - "description": "Not Found", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ErrorResource" - } - } - } - }, - "422": { - "description": "Unprocessable Content", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ErrorResource" - } - } - } - }, - "500": { - "description": "Internal Server Error" - }, - "204": { - "description": "No Content" - } - } - } - }, - "/api/photo/{photoId}/image/{imageHash}": { - "get": { - "tags": [ - "Image" - ], - "parameters": [ - { - "name": "photoId", - "in": "path", - "required": true, - "schema": { - "type": "integer", - "format": "int32" - } - }, - { - "name": "imageHash", - "in": "path", - "required": true, - "schema": { - "type": "string" - } - }, - { - "name": "api-version", - "in": "query", - "schema": { - "type": "string" - } - } - ], - "responses": { - "400": { - "description": "Bad Request", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ErrorResource" - } - } - } - }, - "403": { - "description": "Forbidden", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ProblemDetails" - } - } - } - }, - "404": { - "description": "Not Found", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ErrorResource" - } - } - } - }, - "422": { - "description": "Unprocessable Content", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ErrorResource" - } - } - } - }, - "500": { - "description": "Internal Server Error" - }, - "200": { - "description": "OK" - } - } - } - }, - "/api/info": { - "get": { - "tags": [ - "Info" - ], - "parameters": [ - { - "name": "api-version", - "in": "query", - "schema": { - "type": "string" - } - } - ], - "responses": { - "400": { - "description": "Bad Request", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ErrorResource" - } - } - } - }, - "403": { - "description": "Forbidden", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ProblemDetails" - } - } - } - }, - "404": { - "description": "Not Found", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ErrorResource" - } - } - } - }, - "422": { - "description": "Unprocessable Content", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ErrorResource" - } - } - } - }, - "500": { - "description": "Internal Server Error" - }, - "200": { - "description": "OK", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/InfoResourceDataResponse" - } - } - } - } - } - } - }, - "/api/invite": { - "get": { - "tags": [ - "Invite" - ], - "parameters": [ - { - "name": "Page", - "in": "query", - "schema": { - "type": "integer", - "format": "int32" - } - }, - { - "name": "ItemsPerPage", - "in": "query", - "schema": { - "type": "integer", - "format": "int32" - } - }, - { - "name": "PageSize", - "in": "query", - "schema": { - "type": "integer", - "format": "int32" - } - }, - { - "name": "api-version", - "in": "query", - "schema": { - "type": "string" - } - } - ], - "responses": { - "400": { - "description": "Bad Request", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ErrorResource" - } - } - } - }, - "403": { - "description": "Forbidden", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ProblemDetails" - } - } - } - }, - "404": { - "description": "Not Found", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ErrorResource" - } - } - } - }, - "422": { - "description": "Unprocessable Content", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ErrorResource" - } - } - } - }, - "500": { - "description": "Internal Server Error" - }, - "200": { - "description": "OK", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/InviteResourcePaginatedDataResult" - } - } - } - } - } - } - }, - "/api/invite/{inviteId}": { - "get": { - "tags": [ - "Invite" - ], - "parameters": [ - { - "name": "inviteId", - "in": "path", - "required": true, - "schema": { - "type": "integer", - "format": "int32" - } - }, - { - "name": "api-version", - "in": "query", - "schema": { - "type": "string" - } - } - ], - "responses": { - "400": { - "description": "Bad Request", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ErrorResource" - } - } - } - }, - "403": { - "description": "Forbidden", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ProblemDetails" - } - } - } - }, - "404": { - "description": "Not Found", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ErrorResource" - } - } - } - }, - "422": { - "description": "Unprocessable Content", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ErrorResource" - } - } - } - }, - "500": { - "description": "Internal Server Error" - }, - "200": { - "description": "OK", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/InviteResourceDataResponse" - } - } - } - } - } - } - }, - "/api/invite/{inviteCode}/accept": { - "post": { - "tags": [ - "Invite" - ], - "parameters": [ - { - "name": "inviteCode", - "in": "path", - "required": true, - "schema": { - "type": "string" - } - }, - { - "name": "api-version", - "in": "query", - "schema": { - "type": "string" - } - } - ], - "responses": { - "400": { - "description": "Bad Request", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ErrorResource" - } - } - } - }, - "403": { - "description": "Forbidden", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ProblemDetails" - } - } - } - }, - "404": { - "description": "Not Found", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ErrorResource" - } - } - } - }, - "422": { - "description": "Unprocessable Content", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ErrorResource" - } - } - } - }, - "500": { - "description": "Internal Server Error" - }, - "200": { - "description": "OK", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/InviteResourceDataResponse" - } - } - } - } - } - } - }, - "/api/invite/{inviteCode}/reject": { - "post": { - "tags": [ - "Invite" - ], - "parameters": [ - { - "name": "inviteCode", - "in": "path", - "required": true, - "schema": { - "type": "string" - } - }, - { - "name": "api-version", - "in": "query", - "schema": { - "type": "string" - } - } - ], - "responses": { - "400": { - "description": "Bad Request", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ErrorResource" - } - } - } - }, - "403": { - "description": "Forbidden", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ProblemDetails" - } - } - } - }, - "404": { - "description": "Not Found", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ErrorResource" - } - } - } - }, - "422": { - "description": "Unprocessable Content", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ErrorResource" - } - } - } - }, - "500": { - "description": "Internal Server Error" - }, - "200": { - "description": "OK", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/InviteResourceDataResponse" - } - } - } - } - } - } - }, - "/api/language": { - "get": { - "tags": [ - "Language" - ], - "parameters": [ - { - "name": "IsoCode1", - "in": "query", - "schema": { - "type": "string" - } - }, - { - "name": "Enabled", - "in": "query", - "schema": { - "type": "boolean" - } - }, - { - "name": "Page", - "in": "query", - "schema": { - "type": "integer", - "format": "int32" - } - }, - { - "name": "ItemsPerPage", - "in": "query", - "schema": { - "type": "integer", - "format": "int32" - } - }, - { - "name": "PageSize", - "in": "query", - "schema": { - "type": "integer", - "format": "int32" - } - }, - { - "name": "api-version", - "in": "query", - "schema": { - "type": "string" - } - } - ], - "responses": { - "400": { - "description": "Bad Request", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ErrorResource" - } - } - } - }, - "403": { - "description": "Forbidden", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ProblemDetails" - } - } - } - }, - "404": { - "description": "Not Found", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ErrorResource" - } - } - } - }, - "422": { - "description": "Unprocessable Content", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ErrorResource" - } - } - } - }, - "500": { - "description": "Internal Server Error" - }, - "200": { - "description": "OK", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/LanguageResourcePaginatedDataResult" - } - } - } - } - } - } - }, - "/api/language/{languageId}": { - "get": { - "tags": [ - "Language" - ], - "parameters": [ - { - "name": "languageId", - "in": "path", - "required": true, - "schema": { - "type": "integer", - "format": "int32" - } - }, - { - "name": "api-version", - "in": "query", - "schema": { - "type": "string" - } - } - ], - "responses": { - "400": { - "description": "Bad Request", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ErrorResource" - } - } - } - }, - "403": { - "description": "Forbidden", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ProblemDetails" - } - } - } - }, - "404": { - "description": "Not Found", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ErrorResource" - } - } - } - }, - "422": { - "description": "Unprocessable Content", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ErrorResource" - } - } - } - }, - "500": { - "description": "Internal Server Error" - }, - "200": { - "description": "OK", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/LanguageResourceDataResponse" - } - } - } - } - } - } - }, - "/api/me": { - "get": { - "tags": [ - "Me" - ], - "parameters": [ - { - "name": "api-version", - "in": "query", - "schema": { - "type": "string" - } - } - ], - "responses": { - "400": { - "description": "Bad Request", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ErrorResource" - } - } - } - }, - "403": { - "description": "Forbidden", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ProblemDetails" - } - } - } - }, - "404": { - "description": "Not Found", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ErrorResource" - } - } - } - }, - "422": { - "description": "Unprocessable Content", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ErrorResource" - } - } - } - }, - "500": { - "description": "Internal Server Error" - }, - "200": { - "description": "OK", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/UserResourceDataResponse" - } - } - } - } - } - }, - "put": { - "tags": [ - "Me" - ], - "parameters": [ - { - "name": "api-version", - "in": "query", - "schema": { - "type": "string" - } - } - ], - "requestBody": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/UpdateMeResource" - } - }, - "text/json": { - "schema": { - "$ref": "#/components/schemas/UpdateMeResource" - } - }, - "application/*+json": { - "schema": { - "$ref": "#/components/schemas/UpdateMeResource" - } - } - } - }, - "responses": { - "400": { - "description": "Bad Request", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ErrorResource" - } - } - } - }, - "403": { - "description": "Forbidden", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ProblemDetails" - } - } - } - }, - "404": { - "description": "Not Found", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ErrorResource" - } - } - } - }, - "422": { - "description": "Unprocessable Content", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ErrorResource" - } - } - } - }, - "500": { - "description": "Internal Server Error" - }, - "200": { - "description": "OK", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/UserResourceDataResponse" - } - } - } - } - } - }, - "delete": { - "tags": [ - "Me" - ], - "parameters": [ - { - "name": "api-version", - "in": "query", - "schema": { - "type": "string" - } - } - ], - "responses": { - "400": { - "description": "Bad Request", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ErrorResource" - } - } - } - }, - "403": { - "description": "Forbidden", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ProblemDetails" - } - } - } - }, - "404": { - "description": "Not Found", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ErrorResource" - } - } - } - }, - "422": { - "description": "Unprocessable Content", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ErrorResource" - } - } - } - }, - "500": { - "description": "Internal Server Error" - }, - "204": { - "description": "No Content" - } - } - } - }, - "/api/me/accept-terms": { - "put": { - "tags": [ - "Me" - ], - "parameters": [ - { - "name": "api-version", - "in": "query", - "schema": { - "type": "string" - } - } - ], - "responses": { - "400": { - "description": "Bad Request", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ErrorResource" - } - } - } - }, - "403": { - "description": "Forbidden", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ProblemDetails" - } - } - } - }, - "404": { - "description": "Not Found", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ErrorResource" - } - } - } - }, - "422": { - "description": "Unprocessable Content", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ErrorResource" - } - } - } - }, - "500": { - "description": "Internal Server Error" - }, - "200": { - "description": "OK", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/UserResourceDataResponse" - } - } - } - } - } - } - }, - "/api/me/delete": { - "post": { - "tags": [ - "Me" - ], - "parameters": [ - { - "name": "api-version", - "in": "query", - "schema": { - "type": "string" - } - } - ], - "requestBody": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/DeleteAccountResource" - } - }, - "text/json": { - "schema": { - "$ref": "#/components/schemas/DeleteAccountResource" - } - }, - "application/*+json": { - "schema": { - "$ref": "#/components/schemas/DeleteAccountResource" - } - } - } - }, - "responses": { - "400": { - "description": "Bad Request", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ErrorResource" - } - } - } - }, - "403": { - "description": "Forbidden", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ProblemDetails" - } - } - } - }, - "404": { - "description": "Not Found", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ErrorResource" - } - } - } - }, - "422": { - "description": "Unprocessable Content", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ErrorResource" - } - } - } - }, - "500": { - "description": "Internal Server Error" - }, - "204": { - "description": "No Content" - } - } - } - }, - "/api/me/client": { - "get": { - "tags": [ - "MeClient" - ], - "parameters": [ - { - "name": "api-version", - "in": "query", - "schema": { - "type": "string" - } - } - ], - "responses": { - "400": { - "description": "Bad Request", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ErrorResource" - } - } - } - }, - "403": { - "description": "Forbidden", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ProblemDetails" - } - } - } - }, - "404": { - "description": "Not Found", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ErrorResource" - } - } - } - }, - "422": { - "description": "Unprocessable Content", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ErrorResource" - } - } - } - }, - "500": { - "description": "Internal Server Error" - }, - "200": { - "description": "OK", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/UserClientResourcePaginatedDataResult" - } - } - } - } - } - }, - "post": { - "tags": [ - "MeClient" - ], - "parameters": [ - { - "name": "api-version", - "in": "query", - "schema": { - "type": "string" - } - } - ], - "requestBody": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/UserClientResource" - } - }, - "text/json": { - "schema": { - "$ref": "#/components/schemas/UserClientResource" - } - }, - "application/*+json": { - "schema": { - "$ref": "#/components/schemas/UserClientResource" - } - } - } - }, - "responses": { - "400": { - "description": "Bad Request", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ErrorResource" - } - } - } - }, - "403": { - "description": "Forbidden", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ProblemDetails" - } - } - } - }, - "404": { - "description": "Not Found", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ErrorResource" - } - } - } - }, - "422": { - "description": "Unprocessable Content", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ErrorResource" - } - } - } - }, - "500": { - "description": "Internal Server Error" - }, - "201": { - "description": "Created", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/UserClientResourceDataResponse" - } - } - } - } - } - } - }, - "/api/me/start": { - "get": { - "tags": [ - "MeStart" - ], - "parameters": [ - { - "name": "api-version", - "in": "query", - "schema": { - "type": "string" - } - } - ], - "responses": { - "400": { - "description": "Bad Request", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ErrorResource" - } - } - } - }, - "403": { - "description": "Forbidden", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ProblemDetails" - } - } - } - }, - "404": { - "description": "Not Found", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ErrorResource" - } - } - } - }, - "422": { - "description": "Unprocessable Content", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ErrorResource" - } - } - } - }, - "500": { - "description": "Internal Server Error" - }, - "200": { - "description": "OK", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/MeStartResourceDataResponse" - } - } - } - } - } - } - }, - "/api/notification": { - "get": { - "tags": [ - "Notification" - ], - "parameters": [ - { - "name": "PageSize", - "in": "query", - "schema": { - "type": "integer", - "format": "int32" - } - }, - { - "name": "Page", - "in": "query", - "schema": { - "type": "integer", - "format": "int32" - } - }, - { - "name": "ItemsPerPage", - "in": "query", - "schema": { - "type": "integer", - "format": "int32" - } - }, - { - "name": "api-version", - "in": "query", - "schema": { - "type": "string" - } - } - ], - "responses": { - "400": { - "description": "Bad Request", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ErrorResource" - } - } - } - }, - "403": { - "description": "Forbidden", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ProblemDetails" - } - } - } - }, - "404": { - "description": "Not Found", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ErrorResource" - } - } - } - }, - "422": { - "description": "Unprocessable Content", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ErrorResource" - } - } - } - }, - "500": { - "description": "Internal Server Error" - }, - "200": { - "description": "OK", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/NotificationResourcePaginatedDataResult" - } - } - } - } - } - } - }, - "/api/pet": { - "get": { - "tags": [ - "Pet" - ], - "parameters": [ - { - "name": "HouseholdId", - "in": "query", - "schema": { - "type": "array", - "items": { - "type": "integer", - "format": "int32" - } - } - }, - { - "name": "Page", - "in": "query", - "schema": { - "type": "integer", - "format": "int32" - } - }, - { - "name": "ItemsPerPage", - "in": "query", - "schema": { - "type": "integer", - "format": "int32" - } - }, - { - "name": "PageSize", - "in": "query", - "schema": { - "type": "integer", - "format": "int32" - } - }, - { - "name": "api-version", - "in": "query", - "schema": { - "type": "string" - } - } - ], - "responses": { - "400": { - "description": "Bad Request", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ErrorResource" - } - } - } - }, - "403": { - "description": "Forbidden", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ProblemDetails" - } - } - } - }, - "404": { - "description": "Not Found", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ErrorResource" - } - } - } - }, - "422": { - "description": "Unprocessable Content", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ErrorResource" - } - } - } - }, - "500": { - "description": "Internal Server Error" - }, - "200": { - "description": "OK", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/PetResourcePaginatedDataResult" - } - } - } - } - } - }, - "post": { - "tags": [ - "Pet" - ], - "parameters": [ - { - "name": "api-version", - "in": "query", - "schema": { - "type": "string" - } - } - ], - "requestBody": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/CreatePetResource" - } - }, - "text/json": { - "schema": { - "$ref": "#/components/schemas/CreatePetResource" - } - }, - "application/*+json": { - "schema": { - "$ref": "#/components/schemas/CreatePetResource" - } - } - } - }, - "responses": { - "400": { - "description": "Bad Request", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ErrorResource" - } - } - } - }, - "403": { - "description": "Forbidden", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ProblemDetails" - } - } - } - }, - "404": { - "description": "Not Found", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ErrorResource" - } - } - } - }, - "422": { - "description": "Unprocessable Content", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ErrorResource" - } - } - } - }, - "500": { - "description": "Internal Server Error" - }, - "201": { - "description": "Created", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/PetResourceDataResponse" - } - } - } - } - } - } - }, - "/api/pet/{petId}": { - "get": { - "tags": [ - "Pet" - ], - "parameters": [ - { - "name": "petId", - "in": "path", - "required": true, - "schema": { - "type": "integer", - "format": "int32" - } - }, - { - "name": "api-version", - "in": "query", - "schema": { - "type": "string" - } - } - ], - "responses": { - "400": { - "description": "Bad Request", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ErrorResource" - } - } - } - }, - "403": { - "description": "Forbidden", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ProblemDetails" - } - } - } - }, - "404": { - "description": "Not Found", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ErrorResource" - } - } - } - }, - "422": { - "description": "Unprocessable Content", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ErrorResource" - } - } - } - }, - "500": { - "description": "Internal Server Error" - }, - "200": { - "description": "OK", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/PetResourceDataResponse" - } - } - } - } - } - }, - "put": { - "tags": [ - "Pet" - ], - "parameters": [ - { - "name": "petId", - "in": "path", - "required": true, - "schema": { - "type": "integer", - "format": "int32" - } - }, - { - "name": "api-version", - "in": "query", - "schema": { - "type": "string" - } - } - ], - "requestBody": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/UpdatePetResource" - } - }, - "text/json": { - "schema": { - "$ref": "#/components/schemas/UpdatePetResource" - } - }, - "application/*+json": { - "schema": { - "$ref": "#/components/schemas/UpdatePetResource" - } - } - } - }, - "responses": { - "400": { - "description": "Bad Request", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ErrorResource" - } - } - } - }, - "403": { - "description": "Forbidden", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ProblemDetails" - } - } - } - }, - "404": { - "description": "Not Found", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ErrorResource" - } - } - } - }, - "422": { - "description": "Unprocessable Content", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ErrorResource" - } - } - } - }, - "500": { - "description": "Internal Server Error" - }, - "200": { - "description": "OK", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/PetResourceDataResponse" - } - } - } - } - } - }, - "delete": { - "tags": [ - "Pet" - ], - "parameters": [ - { - "name": "petId", - "in": "path", - "required": true, - "schema": { - "type": "integer", - "format": "int32" - } - }, - { - "name": "api-version", - "in": "query", - "schema": { - "type": "string" - } - } - ], - "responses": { - "400": { - "description": "Bad Request", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ErrorResource" - } - } - } - }, - "403": { - "description": "Forbidden", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ProblemDetails" - } - } - } - }, - "404": { - "description": "Not Found", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ErrorResource" - } - } - } - }, - "422": { - "description": "Unprocessable Content", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ErrorResource" - } - } - } - }, - "500": { - "description": "Internal Server Error" - }, - "204": { - "description": "No Content" - } - } - } - }, - "/api/pet/{petId}/condition": { - "get": { - "tags": [ - "PetCondition" - ], - "parameters": [ - { - "name": "petId", - "in": "path", - "required": true, - "schema": { - "type": "integer", - "format": "int32" - } - }, - { - "name": "Page", - "in": "query", - "schema": { - "type": "integer", - "format": "int32" - } - }, - { - "name": "ItemsPerPage", - "in": "query", - "schema": { - "type": "integer", - "format": "int32" - } - }, - { - "name": "PageSize", - "in": "query", - "schema": { - "type": "integer", - "format": "int32" - } - }, - { - "name": "api-version", - "in": "query", - "schema": { - "type": "string" - } - } - ], - "responses": { - "400": { - "description": "Bad Request", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ErrorResource" - } - } - } - }, - "403": { - "description": "Forbidden", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ProblemDetails" - } - } - } - }, - "404": { - "description": "Not Found", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ErrorResource" - } - } - } - }, - "422": { - "description": "Unprocessable Content", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ErrorResource" - } - } - } - }, - "500": { - "description": "Internal Server Error" - }, - "200": { - "description": "OK", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/PetConditionResourcePaginatedDataResult" - } - } - } - } - } - } - }, - "/api/pet/{petId}/condition/{conditionId}": { - "get": { - "tags": [ - "PetCondition" - ], - "parameters": [ - { - "name": "petId", - "in": "path", - "required": true, - "schema": { - "type": "integer", - "format": "int32" - } - }, - { - "name": "conditionId", - "in": "path", - "required": true, - "schema": { - "type": "integer", - "format": "int32" - } - }, - { - "name": "api-version", - "in": "query", - "schema": { - "type": "string" - } - } - ], - "responses": { - "400": { - "description": "Bad Request", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ErrorResource" - } - } - } - }, - "403": { - "description": "Forbidden", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ProblemDetails" - } - } - } - }, - "404": { - "description": "Not Found", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ErrorResource" - } - } - } - }, - "422": { - "description": "Unprocessable Content", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ErrorResource" - } - } - } - }, - "500": { - "description": "Internal Server Error" - }, - "200": { - "description": "OK", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/PetConditionResourceDataResponse" - } - } - } - } - } - }, - "put": { - "tags": [ - "PetCondition" - ], - "parameters": [ - { - "name": "petId", - "in": "path", - "required": true, - "schema": { - "type": "integer", - "format": "int32" - } - }, - { - "name": "conditionId", - "in": "path", - "required": true, - "schema": { - "type": "integer", - "format": "int32" - } - }, - { - "name": "api-version", - "in": "query", - "schema": { - "type": "string" - } - } - ], - "responses": { - "400": { - "description": "Bad Request", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ErrorResource" - } - } - } - }, - "403": { - "description": "Forbidden", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ProblemDetails" - } - } - } - }, - "404": { - "description": "Not Found", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ErrorResource" - } - } - } - }, - "422": { - "description": "Unprocessable Content", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ErrorResource" - } - } - } - }, - "500": { - "description": "Internal Server Error" - }, - "200": { - "description": "OK", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/PetConditionResourceDataResponse" - } - } - } - } - } - }, - "delete": { - "tags": [ - "PetCondition" - ], - "parameters": [ - { - "name": "petId", - "in": "path", - "required": true, - "schema": { - "type": "integer", - "format": "int32" - } - }, - { - "name": "conditionId", - "in": "path", - "required": true, - "schema": { - "type": "integer", - "format": "int32" - } - }, - { - "name": "api-version", - "in": "query", - "schema": { - "type": "string" - } - } - ], - "responses": { - "400": { - "description": "Bad Request", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ErrorResource" - } - } - } - }, - "403": { - "description": "Forbidden", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ProblemDetails" - } - } - } - }, - "404": { - "description": "Not Found", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ErrorResource" - } - } - } - }, - "422": { - "description": "Unprocessable Content", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ErrorResource" - } - } - } - }, - "500": { - "description": "Internal Server Error" - }, - "204": { - "description": "No Content" - } - } - } - }, - "/api/dashboard/pet": { - "get": { - "tags": [ - "PetDashboard" - ], - "parameters": [ - { - "name": "PetId", - "in": "query", - "required": true, - "schema": { - "type": "array", - "items": { - "type": "integer", - "format": "int32" - } - } - }, - { - "name": "From", - "in": "query", - "required": true, - "schema": { - "minLength": 1, - "type": "string", - "format": "date-time" - } - }, - { - "name": "DaysHistory", - "in": "query", - "schema": { - "type": "integer", - "format": "int32" - } - }, - { - "name": "Page", - "in": "query", - "schema": { - "type": "integer", - "format": "int32" - } - }, - { - "name": "ItemsPerPage", - "in": "query", - "schema": { - "type": "integer", - "format": "int32" - } - }, - { - "name": "PageSize", - "in": "query", - "schema": { - "type": "integer", - "format": "int32" - } - }, - { - "name": "api-version", - "in": "query", - "schema": { - "type": "string" - } - } - ], - "responses": { - "400": { - "description": "Bad Request", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ErrorResource" - } - } - } - }, - "403": { - "description": "Forbidden", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ProblemDetails" - } - } - } - }, - "404": { - "description": "Not Found", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ErrorResource" - } - } - } - }, - "422": { - "description": "Unprocessable Content", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ErrorResource" - } - } - } - }, - "500": { - "description": "Internal Server Error" - }, - "200": { - "description": "OK", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/PetDashboardResourceListDataResponse" - } - } - } - } - } - } - }, - "/api/pet/{petId}/insight": { - "get": { - "tags": [ - "PetInsight" - ], - "parameters": [ - { - "name": "petId", - "in": "path", - "required": true, - "schema": { - "type": "integer", - "format": "int32" - } - }, - { - "name": "From", - "in": "query", - "schema": { - "type": "string", - "format": "date-time" - } - }, - { - "name": "To", - "in": "query", - "schema": { - "type": "string", - "format": "date-time" - } - }, - { - "name": "Page", - "in": "query", - "schema": { - "type": "integer", - "format": "int32" - } - }, - { - "name": "ItemsPerPage", - "in": "query", - "schema": { - "type": "integer", - "format": "int32" - } - }, - { - "name": "PageSize", - "in": "query", - "schema": { - "type": "integer", - "format": "int32" - } - }, - { - "name": "api-version", - "in": "query", - "schema": { - "type": "string" - } - } - ], - "responses": { - "400": { - "description": "Bad Request", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ErrorResource" - } - } - } - }, - "403": { - "description": "Forbidden", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ProblemDetails" - } - } - } - }, - "404": { - "description": "Not Found", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ErrorResource" - } - } - } - }, - "422": { - "description": "Unprocessable Content", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ErrorResource" - } - } - } - }, - "500": { - "description": "Internal Server Error" - }, - "200": { - "description": "OK", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/PetInsightResourceDataResponse" - } - } - } - } - } - } - }, - "/api/pet/position/{deviceId}": { - "get": { - "tags": [ - "PetPosition" - ], - "parameters": [ - { - "name": "deviceId", - "in": "path", - "required": true, - "schema": { - "type": "integer", - "format": "int32" - } - }, - { - "name": "Page", - "in": "query", - "schema": { - "type": "integer", - "format": "int32" - } - }, - { - "name": "ItemsPerPage", - "in": "query", - "schema": { - "type": "integer", - "format": "int32" - } - }, - { - "name": "PageSize", - "in": "query", - "schema": { - "type": "integer", - "format": "int32" - } - }, - { - "name": "api-version", - "in": "query", - "schema": { - "type": "string" - } - } - ], - "responses": { - "400": { - "description": "Bad Request", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ErrorResource" - } - } - } - }, - "403": { - "description": "Forbidden", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ProblemDetails" - } - } - } - }, - "404": { - "description": "Not Found", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ErrorResource" - } - } - } - }, - "422": { - "description": "Unprocessable Content", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ErrorResource" - } - } - } - }, - "500": { - "description": "Internal Server Error" - }, - "200": { - "description": "OK", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/PetPositionResourcePaginatedDataResult" - } - } - } - } - } - } - }, - "/api/pet/{petId}/position/{deviceId}": { - "get": { - "tags": [ - "PetPosition" - ], - "parameters": [ - { - "name": "petId", - "in": "path", - "required": true, - "schema": { - "type": "integer", - "format": "int32" - } - }, - { - "name": "deviceId", - "in": "path", - "required": true, - "schema": { - "type": "integer", - "format": "int32" - } - }, - { - "name": "api-version", - "in": "query", - "schema": { - "type": "string" - } - } - ], - "responses": { - "400": { - "description": "Bad Request", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ErrorResource" - } - } - } - }, - "403": { - "description": "Forbidden", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ProblemDetails" - } - } - } - }, - "404": { - "description": "Not Found", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ErrorResource" - } - } - } - }, - "422": { - "description": "Unprocessable Content", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ErrorResource" - } - } - } - }, - "500": { - "description": "Internal Server Error" - }, - "200": { - "description": "OK", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/PetPositionResourceDataResponse" - } - } - } - } - } - } - }, - "/api/pet/{petId}/position": { - "post": { - "tags": [ - "PetPosition" - ], - "parameters": [ - { - "name": "petId", - "in": "path", - "required": true, - "schema": { - "type": "integer", - "format": "int32" - } - }, - { - "name": "api-version", - "in": "query", - "schema": { - "type": "string" - } - } - ], - "requestBody": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/CreatePetPositionResource" - } - }, - "text/json": { - "schema": { - "$ref": "#/components/schemas/CreatePetPositionResource" - } - }, - "application/*+json": { - "schema": { - "$ref": "#/components/schemas/CreatePetPositionResource" - } - } - } - }, - "responses": { - "400": { - "description": "Bad Request", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ErrorResource" - } - } - } - }, - "403": { - "description": "Forbidden", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ProblemDetails" - } - } - } - }, - "404": { - "description": "Not Found", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ErrorResource" - } - } - } - }, - "422": { - "description": "Unprocessable Content", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ErrorResource" - } - } - } - }, - "500": { - "description": "Internal Server Error" - }, - "201": { - "description": "Created", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/PetPositionResourceDataResponse" - } - } - } - } - } - } - }, - "/api/pet/status/{deviceId}": { - "get": { - "tags": [ - "PetStatus" - ], - "parameters": [ - { - "name": "deviceId", - "in": "path", - "required": true, - "schema": { - "type": "integer", - "format": "int32" - } - }, - { - "name": "api-version", - "in": "query", - "schema": { - "type": "string" - } - } - ], - "responses": { - "400": { - "description": "Bad Request", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ErrorResource" - } - } - } - }, - "403": { - "description": "Forbidden", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ProblemDetails" - } - } - } - }, - "404": { - "description": "Not Found", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ErrorResource" - } - } - } - }, - "422": { - "description": "Unprocessable Content", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ErrorResource" - } - } - } - }, - "500": { - "description": "Internal Server Error" - }, - "200": { - "description": "OK", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/PetStatusResourcePaginatedDataResult" - } - } - } - } - } - } - }, - "/api/pet/{petId}/status/{deviceId}": { - "get": { - "tags": [ - "PetStatus" - ], - "parameters": [ - { - "name": "petId", - "in": "path", - "required": true, - "schema": { - "type": "integer", - "format": "int32" - } - }, - { - "name": "deviceId", - "in": "path", - "required": true, - "schema": { - "type": "integer", - "format": "int32" - } - }, - { - "name": "api-version", - "in": "query", - "schema": { - "type": "string" - } - } - ], - "responses": { - "400": { - "description": "Bad Request", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ErrorResource" - } - } - } - }, - "403": { - "description": "Forbidden", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ProblemDetails" - } - } - } - }, - "404": { - "description": "Not Found", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ErrorResource" - } - } - } - }, - "422": { - "description": "Unprocessable Content", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ErrorResource" - } - } - } - }, - "500": { - "description": "Internal Server Error" - }, - "200": { - "description": "OK", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/PetStatusResourceDataResponse" - } - } - } - } - } - } - }, - "/api/photo": { - "get": { - "tags": [ - "Photo" - ], - "parameters": [ - { - "name": "Page", - "in": "query", - "schema": { - "type": "integer", - "format": "int32" - } - }, - { - "name": "ItemsPerPage", - "in": "query", - "schema": { - "type": "integer", - "format": "int32" - } - }, - { - "name": "PageSize", - "in": "query", - "schema": { - "type": "integer", - "format": "int32" - } - }, - { - "name": "api-version", - "in": "query", - "schema": { - "type": "string" - } - } - ], - "responses": { - "400": { - "description": "Bad Request", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ErrorResource" - } - } - } - }, - "403": { - "description": "Forbidden", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ProblemDetails" - } - } - } - }, - "404": { - "description": "Not Found", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ErrorResource" - } - } - } - }, - "422": { - "description": "Unprocessable Content", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ErrorResource" - } - } - } - }, - "500": { - "description": "Internal Server Error" - }, - "200": { - "description": "OK", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/PhotoResourcePaginatedDataResult" - } - } - } - } - } - }, - "post": { - "tags": [ - "Photo" - ], - "parameters": [ - { - "name": "api-version", - "in": "query", - "schema": { - "type": "string" - } - } - ], - "requestBody": { - "content": { - "multipart/form-data": { - "schema": { - "type": "object", - "properties": { - "File": { - "type": "string", - "format": "binary" - }, - "Title": { - "type": "string" - } - } - }, - "encoding": { - "File": { - "style": "form" - }, - "Title": { - "style": "form" - } - } - } - } - }, - "responses": { - "400": { - "description": "Bad Request", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ErrorResource" - } - } - } - }, - "403": { - "description": "Forbidden", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ProblemDetails" - } - } - } - }, - "404": { - "description": "Not Found", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ErrorResource" - } - } - } - }, - "422": { - "description": "Unprocessable Content", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ErrorResource" - } - } - } - }, - "500": { - "description": "Internal Server Error" - }, - "201": { - "description": "Created", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/PhotoResourceDataResponse" - } - } - } - } - } - } - }, - "/api/photo/{photoId}": { - "get": { - "tags": [ - "Photo" - ], - "parameters": [ - { - "name": "photoId", - "in": "path", - "required": true, - "schema": { - "type": "integer", - "format": "int32" - } - }, - { - "name": "api-version", - "in": "query", - "schema": { - "type": "string" - } - } - ], - "responses": { - "400": { - "description": "Bad Request", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ErrorResource" - } - } - } - }, - "403": { - "description": "Forbidden", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ProblemDetails" - } - } - } - }, - "404": { - "description": "Not Found", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ErrorResource" - } - } - } - }, - "422": { - "description": "Unprocessable Content", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ErrorResource" - } - } - } - }, - "500": { - "description": "Internal Server Error" - }, - "200": { - "description": "OK", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/PhotoResourceDataResponse" - } - } - } - } - } - }, - "put": { - "tags": [ - "Photo" - ], - "parameters": [ - { - "name": "photoId", - "in": "path", - "required": true, - "schema": { - "type": "integer", - "format": "int32" - } - }, - { - "name": "api-version", - "in": "query", - "schema": { - "type": "string" - } - } - ], - "requestBody": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/UpdatePhotoResource" - } - }, - "text/json": { - "schema": { - "$ref": "#/components/schemas/UpdatePhotoResource" - } - }, - "application/*+json": { - "schema": { - "$ref": "#/components/schemas/UpdatePhotoResource" - } - } - } - }, - "responses": { - "400": { - "description": "Bad Request", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ErrorResource" - } - } - } - }, - "403": { - "description": "Forbidden", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ProblemDetails" - } - } - } - }, - "404": { - "description": "Not Found", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ErrorResource" - } - } - } - }, - "422": { - "description": "Unprocessable Content", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ErrorResource" - } - } - } - }, - "500": { - "description": "Internal Server Error" - }, - "200": { - "description": "OK", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/PhotoResourceDataResponse" - } - } - } - } - } - }, - "delete": { - "tags": [ - "Photo" - ], - "parameters": [ - { - "name": "photoId", - "in": "path", - "required": true, - "schema": { - "type": "integer", - "format": "int32" - } - }, - { - "name": "api-version", - "in": "query", - "schema": { - "type": "string" - } - } - ], - "responses": { - "400": { - "description": "Bad Request", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ErrorResource" - } - } - } - }, - "403": { - "description": "Forbidden", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ProblemDetails" - } - } - } - }, - "404": { - "description": "Not Found", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ErrorResource" - } - } - } - }, - "422": { - "description": "Unprocessable Content", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ErrorResource" - } - } - } - }, - "500": { - "description": "Internal Server Error" - }, - "204": { - "description": "No Content" - } - } - } - }, - "/api/product": { - "get": { - "tags": [ - "Product" - ], - "parameters": [ - { - "name": "Lang", - "in": "query", - "schema": { - "type": "string", - "nullable": true - } - }, - { - "name": "Page", - "in": "query", - "schema": { - "type": "integer", - "format": "int32" - } - }, - { - "name": "ItemsPerPage", - "in": "query", - "schema": { - "type": "integer", - "format": "int32" - } - }, - { - "name": "PageSize", - "in": "query", - "schema": { - "type": "integer", - "format": "int32" - } - }, - { - "name": "api-version", - "in": "query", - "schema": { - "type": "string" - } - } - ], - "responses": { - "400": { - "description": "Bad Request", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ErrorResource" - } - } - } - }, - "403": { - "description": "Forbidden", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ProblemDetails" - } - } - } - }, - "404": { - "description": "Not Found", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ErrorResource" - } - } - } - }, - "422": { - "description": "Unprocessable Content", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ErrorResource" - } - } - } - }, - "500": { - "description": "Internal Server Error" - }, - "200": { - "description": "OK", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ProductResourcePaginatedDataResult" - } - } - } - } - } - } - }, - "/api/product/{productId}": { - "get": { - "tags": [ - "Product" - ], - "parameters": [ - { - "name": "productId", - "in": "path", - "required": true, - "schema": { - "type": "integer", - "format": "int32" - } - }, - { - "name": "api-version", - "in": "query", - "schema": { - "type": "string" - } - } - ], - "responses": { - "400": { - "description": "Bad Request", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ErrorResource" - } - } - } - }, - "403": { - "description": "Forbidden", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ProblemDetails" - } - } - } - }, - "404": { - "description": "Not Found", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ErrorResource" - } - } - } - }, - "422": { - "description": "Unprocessable Content", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ErrorResource" - } - } - } - }, - "500": { - "description": "Internal Server Error" - }, - "200": { - "description": "OK", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ProductResourceDataResponse" - } - } - } - } - } - } - }, - "/api/report/household/{householdId}/pet/{petId}/aggregate": { - "get": { - "tags": [ - "ReportHouseholdPet" - ], - "parameters": [ - { - "name": "householdId", - "in": "path", - "required": true, - "schema": { - "type": "integer", - "format": "int32" - } - }, - { - "name": "petId", - "in": "path", - "required": true, - "schema": { - "type": "integer", - "format": "int32" - } - }, - { - "name": "From", - "in": "query", - "schema": { - "type": "string", - "format": "date-time", - "nullable": true - } - }, - { - "name": "To", - "in": "query", - "schema": { - "type": "string", - "format": "date-time", - "nullable": true - } - }, - { - "name": "api-version", - "in": "query", - "schema": { - "type": "string" - } - } - ], - "responses": { - "400": { - "description": "Bad Request", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ErrorResource" - } - } - } - }, - "403": { - "description": "Forbidden", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ProblemDetails" - } - } - } - }, - "404": { - "description": "Not Found", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ErrorResource" - } - } - } - }, - "422": { - "description": "Unprocessable Content", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ErrorResource" - } - } - } - }, - "500": { - "description": "Internal Server Error" - }, - "200": { - "description": "OK", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ReportHouseholdResourceDataResponse" - } - } - } - } - } - } - }, - "/api/report/household/{householdId}/pet/{petId}": { - "get": { - "tags": [ - "ReportHouseholdPet" - ], - "parameters": [ - { - "name": "householdId", - "in": "path", - "required": true, - "schema": { - "type": "integer", - "format": "int32" - } - }, - { - "name": "petId", - "in": "path", - "required": true, - "schema": { - "type": "integer", - "format": "int32" - } - }, - { - "name": "From", - "in": "query", - "schema": { - "type": "string", - "format": "date-time", - "nullable": true - } - }, - { - "name": "To", - "in": "query", - "schema": { - "type": "string", - "format": "date-time", - "nullable": true - } - }, - { - "name": "api-version", - "in": "query", - "schema": { - "type": "string" - } - } - ], - "responses": { - "400": { - "description": "Bad Request", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ErrorResource" - } - } - } - }, - "403": { - "description": "Forbidden", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ProblemDetails" - } - } - } - }, - "404": { - "description": "Not Found", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ErrorResource" - } - } - } - }, - "422": { - "description": "Unprocessable Content", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ErrorResource" - } - } - } - }, - "500": { - "description": "Internal Server Error" - }, - "200": { - "description": "OK", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ReportHouseholdResourceListDataResponse" - } - } - } - } - } - } - }, - "/api/report/household/{householdId}/pet/{petId}/device/{deviceId}": { - "get": { - "tags": [ - "ReportHouseholdPet" - ], - "parameters": [ - { - "name": "householdId", - "in": "path", - "required": true, - "schema": { - "type": "integer", - "format": "int32" - } - }, - { - "name": "petId", - "in": "path", - "required": true, - "schema": { - "type": "integer", - "format": "int32" - } - }, - { - "name": "deviceId", - "in": "path", - "required": true, - "schema": { - "type": "integer", - "format": "int32" - } - }, - { - "name": "From", - "in": "query", - "schema": { - "type": "string", - "format": "date-time", - "nullable": true - } - }, - { - "name": "To", - "in": "query", - "schema": { - "type": "string", - "format": "date-time", - "nullable": true - } - }, - { - "name": "api-version", - "in": "query", - "schema": { - "type": "string" - } - } - ], - "responses": { - "400": { - "description": "Bad Request", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ErrorResource" - } - } - } - }, - "403": { - "description": "Forbidden", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ProblemDetails" - } - } - } - }, - "404": { - "description": "Not Found", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ErrorResource" - } - } - } - }, - "422": { - "description": "Unprocessable Content", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ErrorResource" - } - } - } - }, - "500": { - "description": "Internal Server Error" - }, - "200": { - "description": "OK", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ReportHouseholdResourceListDataResponse" - } - } - } - } - } - } - }, - "/api/species": { - "get": { - "tags": [ - "Species" - ], - "parameters": [ - { - "name": "Lang", - "in": "query", - "schema": { - "type": "string", - "nullable": true - } - }, - { - "name": "Page", - "in": "query", - "schema": { - "type": "integer", - "format": "int32" - } - }, - { - "name": "ItemsPerPage", - "in": "query", - "schema": { - "type": "integer", - "format": "int32" - } - }, - { - "name": "PageSize", - "in": "query", - "schema": { - "type": "integer", - "format": "int32" - } - }, - { - "name": "api-version", - "in": "query", - "schema": { - "type": "string" - } - } - ], - "responses": { - "400": { - "description": "Bad Request", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ErrorResource" - } - } - } - }, - "403": { - "description": "Forbidden", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ProblemDetails" - } - } - } - }, - "404": { - "description": "Not Found", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ErrorResource" - } - } - } - }, - "422": { - "description": "Unprocessable Content", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ErrorResource" - } - } - } - }, - "500": { - "description": "Internal Server Error" - }, - "200": { - "description": "OK", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/SpeciesResourcePaginatedDataResult" - } - } - } - } - } - } - }, - "/api/species/{speciesId}": { - "get": { - "tags": [ - "Species" - ], - "parameters": [ - { - "name": "speciesId", - "in": "path", - "required": true, - "schema": { - "type": "integer", - "format": "int32" - } - }, - { - "name": "api-version", - "in": "query", - "schema": { - "type": "string" - } - } - ], - "responses": { - "400": { - "description": "Bad Request", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ErrorResource" - } - } - } - }, - "403": { - "description": "Forbidden", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ProblemDetails" - } - } - } - }, - "404": { - "description": "Not Found", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ErrorResource" - } - } - } - }, - "422": { - "description": "Unprocessable Content", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ErrorResource" - } - } - } - }, - "500": { - "description": "Internal Server Error" - }, - "200": { - "description": "OK", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/SpeciesResourceDataResponse" - } - } - } - } - } - } - }, - "/api/start": { - "get": { - "tags": [ - "Start" - ], - "parameters": [ - { - "name": "Lang", - "in": "query", - "schema": { - "type": "string", - "nullable": true - } - }, - { - "name": "api-version", - "in": "query", - "schema": { - "type": "string" - } - } - ], - "responses": { - "400": { - "description": "Bad Request", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ErrorResource" - } - } - } - }, - "403": { - "description": "Forbidden", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ProblemDetails" - } - } - } - }, - "404": { - "description": "Not Found", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ErrorResource" - } - } - } - }, - "422": { - "description": "Unprocessable Content", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ErrorResource" - } - } - } - }, - "500": { - "description": "Internal Server Error" - }, - "200": { - "description": "OK", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/StartResourceDataResponse" - } - } - } - } - } - } - }, - "/api/tag": { - "get": { - "tags": [ - "Tag" - ], - "parameters": [ - { - "name": "Page", - "in": "query", - "schema": { - "type": "integer", - "format": "int32" - } - }, - { - "name": "ItemsPerPage", - "in": "query", - "schema": { - "type": "integer", - "format": "int32" - } - }, - { - "name": "PageSize", - "in": "query", - "schema": { - "type": "integer", - "format": "int32" - } - }, - { - "name": "api-version", - "in": "query", - "schema": { - "type": "string" - } - } - ], - "responses": { - "400": { - "description": "Bad Request", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ErrorResource" - } - } - } - }, - "403": { - "description": "Forbidden", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ProblemDetails" - } - } - } - }, - "404": { - "description": "Not Found", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ErrorResource" - } - } - } - }, - "422": { - "description": "Unprocessable Content", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ErrorResource" - } - } - } - }, - "500": { - "description": "Internal Server Error" - }, - "200": { - "description": "OK", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/TagResourcePaginatedDataResult" - } - } - } - } - } - } - }, - "/api/tag/{tagId}": { - "get": { - "tags": [ - "Tag" - ], - "parameters": [ - { - "name": "tagId", - "in": "path", - "required": true, - "schema": { - "type": "integer", - "format": "int32" - } - }, - { - "name": "api-version", - "in": "query", - "schema": { - "type": "string" - } - } - ], - "responses": { - "400": { - "description": "Bad Request", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ErrorResource" - } - } - } - }, - "403": { - "description": "Forbidden", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ProblemDetails" - } - } - } - }, - "404": { - "description": "Not Found", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ErrorResource" - } - } - } - }, - "422": { - "description": "Unprocessable Content", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ErrorResource" - } - } - } - }, - "500": { - "description": "Internal Server Error" - }, - "200": { - "description": "OK", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/TagResourceDataResponse" - } - } - } - } - } - } - }, - "/api/tag/{tagId}/device": { - "get": { - "tags": [ - "TagDevice" - ], - "parameters": [ - { - "name": "tagId", - "in": "path", - "required": true, - "schema": { - "type": "integer", - "format": "int32" - } - }, - { - "name": "Page", - "in": "query", - "schema": { - "type": "integer", - "format": "int32" - } - }, - { - "name": "ItemsPerPage", - "in": "query", - "schema": { - "type": "integer", - "format": "int32" - } - }, - { - "name": "PageSize", - "in": "query", - "schema": { - "type": "integer", - "format": "int32" - } - }, - { - "name": "api-version", - "in": "query", - "schema": { - "type": "string" - } - } - ], - "responses": { - "400": { - "description": "Bad Request", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ErrorResource" - } - } - } - }, - "403": { - "description": "Forbidden", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ProblemDetails" - } - } - } - }, - "404": { - "description": "Not Found", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ErrorResource" - } - } - } - }, - "422": { - "description": "Unprocessable Content", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ErrorResource" - } - } - } - }, - "500": { - "description": "Internal Server Error" - }, - "200": { - "description": "OK", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/TagDeviceResourcePaginatedDataResult" - } - } - } - } - } - } - }, - "/api/tag/{tagId}/device/{deviceId}": { - "get": { - "tags": [ - "TagDevice" - ], - "parameters": [ - { - "name": "tagId", - "in": "path", - "required": true, - "schema": { - "type": "integer", - "format": "int32" - } - }, - { - "name": "deviceId", - "in": "path", - "required": true, - "schema": { - "type": "integer", - "format": "int32" - } - }, - { - "name": "api-version", - "in": "query", - "schema": { - "type": "string" - } - } - ], - "responses": { - "400": { - "description": "Bad Request", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ErrorResource" - } - } - } - }, - "403": { - "description": "Forbidden", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ProblemDetails" - } - } - } - }, - "404": { - "description": "Not Found", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ErrorResource" - } - } - } - }, - "422": { - "description": "Unprocessable Content", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ErrorResource" - } - } - } - }, - "500": { - "description": "Internal Server Error" - }, - "200": { - "description": "OK", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/TagDeviceResourceDataResponse" - } - } - } - } - } - } - }, - "/api/timeline": { - "get": { - "tags": [ - "Timeline" - ], - "parameters": [ - { - "name": "PageSize", - "in": "query", - "schema": { - "type": "integer", - "format": "int32" - } - }, - { - "name": "SinceId", - "in": "query", - "schema": { - "type": "integer", - "format": "int64" - } - }, - { - "name": "BeforeId", - "in": "query", - "schema": { - "type": "integer", - "format": "int64" - } - }, - { - "name": "Page", - "in": "query", - "schema": { - "type": "integer", - "format": "int32" - } - }, - { - "name": "ItemsPerPage", - "in": "query", - "schema": { - "type": "integer", - "format": "int32" - } - }, - { - "name": "api-version", - "in": "query", - "schema": { - "type": "string" - } - } - ], - "responses": { - "400": { - "description": "Bad Request", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ErrorResource" - } - } - } - }, - "403": { - "description": "Forbidden", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ProblemDetails" - } - } - } - }, - "404": { - "description": "Not Found", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ErrorResource" - } - } - } - }, - "422": { - "description": "Unprocessable Content", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ErrorResource" - } - } - } - }, - "500": { - "description": "Internal Server Error" - }, - "200": { - "description": "OK", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/TimelineResourcePaginatedDataResult" - } - } - } - } - } - } - }, - "/api/timeline/household/{householdId}": { - "get": { - "tags": [ - "Timeline" - ], - "parameters": [ - { - "name": "householdId", - "in": "path", - "required": true, - "schema": { - "type": "integer", - "format": "int32" - } - }, - { - "name": "PageSize", - "in": "query", - "schema": { - "type": "integer", - "format": "int32" - } - }, - { - "name": "SinceId", - "in": "query", - "schema": { - "type": "integer", - "format": "int64" - } - }, - { - "name": "BeforeId", - "in": "query", - "schema": { - "type": "integer", - "format": "int64" - } - }, - { - "name": "Page", - "in": "query", - "schema": { - "type": "integer", - "format": "int32" - } - }, - { - "name": "ItemsPerPage", - "in": "query", - "schema": { - "type": "integer", - "format": "int32" - } - }, - { - "name": "api-version", - "in": "query", - "schema": { - "type": "string" - } - } - ], - "responses": { - "400": { - "description": "Bad Request", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ErrorResource" - } - } - } - }, - "403": { - "description": "Forbidden", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ProblemDetails" - } - } - } - }, - "404": { - "description": "Not Found", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ErrorResource" - } - } - } - }, - "422": { - "description": "Unprocessable Content", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ErrorResource" - } - } - } - }, - "500": { - "description": "Internal Server Error" - }, - "200": { - "description": "OK", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/TimelineResourcePaginatedDataResult" - } - } - } - } - } - } - }, - "/api/timeline/household/{householdId}/device": { - "get": { - "tags": [ - "Timeline" - ], - "parameters": [ - { - "name": "householdId", - "in": "path", - "required": true, - "schema": { - "type": "integer", - "format": "int32" - } - }, - { - "name": "PageSize", - "in": "query", - "schema": { - "type": "integer", - "format": "int32" - } - }, - { - "name": "SinceId", - "in": "query", - "schema": { - "type": "integer", - "format": "int64" - } - }, - { - "name": "BeforeId", - "in": "query", - "schema": { - "type": "integer", - "format": "int64" - } - }, - { - "name": "Page", - "in": "query", - "schema": { - "type": "integer", - "format": "int32" - } - }, - { - "name": "ItemsPerPage", - "in": "query", - "schema": { - "type": "integer", - "format": "int32" - } - }, - { - "name": "api-version", - "in": "query", - "schema": { - "type": "string" - } - } - ], - "responses": { - "400": { - "description": "Bad Request", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ErrorResource" - } - } - } - }, - "403": { - "description": "Forbidden", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ProblemDetails" - } - } - } - }, - "404": { - "description": "Not Found", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ErrorResource" - } - } - } - }, - "422": { - "description": "Unprocessable Content", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ErrorResource" - } - } - } - }, - "500": { - "description": "Internal Server Error" - }, - "200": { - "description": "OK", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/TimelineResourcePaginatedDataResult" - } - } - } - } - } - } - }, - "/api/timeline/household/{householdId}/pet": { - "get": { - "tags": [ - "Timeline" - ], - "parameters": [ - { - "name": "householdId", - "in": "path", - "required": true, - "schema": { - "type": "integer", - "format": "int32" - } - }, - { - "name": "PageSize", - "in": "query", - "schema": { - "type": "integer", - "format": "int32" - } - }, - { - "name": "SinceId", - "in": "query", - "schema": { - "type": "integer", - "format": "int64" - } - }, - { - "name": "BeforeId", - "in": "query", - "schema": { - "type": "integer", - "format": "int64" - } - }, - { - "name": "Page", - "in": "query", - "schema": { - "type": "integer", - "format": "int32" - } - }, - { - "name": "ItemsPerPage", - "in": "query", - "schema": { - "type": "integer", - "format": "int32" - } - }, - { - "name": "api-version", - "in": "query", - "schema": { - "type": "string" - } - } - ], - "responses": { - "400": { - "description": "Bad Request", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ErrorResource" - } - } - } - }, - "403": { - "description": "Forbidden", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ProblemDetails" - } - } - } - }, - "404": { - "description": "Not Found", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ErrorResource" - } - } - } - }, - "422": { - "description": "Unprocessable Content", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ErrorResource" - } - } - } - }, - "500": { - "description": "Internal Server Error" - }, - "200": { - "description": "OK", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/TimelineResourcePaginatedDataResult" - } - } - } - } - } - } - }, - "/api/timeline/household/{householdId}/user": { - "get": { - "tags": [ - "Timeline" - ], - "parameters": [ - { - "name": "householdId", - "in": "path", - "required": true, - "schema": { - "type": "integer", - "format": "int32" - } - }, - { - "name": "PageSize", - "in": "query", - "schema": { - "type": "integer", - "format": "int32" - } - }, - { - "name": "SinceId", - "in": "query", - "schema": { - "type": "integer", - "format": "int64" - } - }, - { - "name": "BeforeId", - "in": "query", - "schema": { - "type": "integer", - "format": "int64" - } - }, - { - "name": "Page", - "in": "query", - "schema": { - "type": "integer", - "format": "int32" - } - }, - { - "name": "ItemsPerPage", - "in": "query", - "schema": { - "type": "integer", - "format": "int32" - } - }, - { - "name": "api-version", - "in": "query", - "schema": { - "type": "string" - } - } - ], - "responses": { - "400": { - "description": "Bad Request", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ErrorResource" - } - } - } - }, - "403": { - "description": "Forbidden", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ProblemDetails" - } - } - } - }, - "404": { - "description": "Not Found", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ErrorResource" - } - } - } - }, - "422": { - "description": "Unprocessable Content", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ErrorResource" - } - } - } - }, - "500": { - "description": "Internal Server Error" - }, - "200": { - "description": "OK", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/TimelineResourcePaginatedDataResult" - } - } - } - } - } - } - }, - "/api/timezone": { - "get": { - "tags": [ - "Timezone" - ], - "parameters": [ - { - "name": "Page", - "in": "query", - "schema": { - "type": "integer", - "format": "int32" - } - }, - { - "name": "ItemsPerPage", - "in": "query", - "schema": { - "type": "integer", - "format": "int32" - } - }, - { - "name": "PageSize", - "in": "query", - "schema": { - "type": "integer", - "format": "int32" - } - }, - { - "name": "api-version", - "in": "query", - "schema": { - "type": "string" - } - } - ], - "responses": { - "400": { - "description": "Bad Request", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ErrorResource" - } - } - } - }, - "403": { - "description": "Forbidden", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ProblemDetails" - } - } - } - }, - "404": { - "description": "Not Found", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ErrorResource" - } - } - } - }, - "422": { - "description": "Unprocessable Content", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ErrorResource" - } - } - } - }, - "500": { - "description": "Internal Server Error" - }, - "200": { - "description": "OK", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/TimezoneResourcePaginatedDataResult" - } - } - } - } - } - } - }, - "/api/timezone/{timezoneId}": { - "get": { - "tags": [ - "Timezone" - ], - "parameters": [ - { - "name": "timezoneId", - "in": "path", - "required": true, - "schema": { - "type": "integer", - "format": "int32" - } - }, - { - "name": "api-version", - "in": "query", - "schema": { - "type": "string" - } - } - ], - "responses": { - "400": { - "description": "Bad Request", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ErrorResource" - } - } - } - }, - "403": { - "description": "Forbidden", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ProblemDetails" - } - } - } - }, - "404": { - "description": "Not Found", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ErrorResource" - } - } - } - }, - "422": { - "description": "Unprocessable Content", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ErrorResource" - } - } - } - }, - "500": { - "description": "Internal Server Error" - }, - "200": { - "description": "OK", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/TimezoneResourceDataResponse" - } - } - } - } - } - } - }, - "/api/translation": { - "get": { - "tags": [ - "Translation" - ], - "parameters": [ - { - "name": "api-version", - "in": "query", - "schema": { - "type": "string" - } - } - ], - "responses": { - "400": { - "description": "Bad Request", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ErrorResource" - } - } - } - }, - "403": { - "description": "Forbidden", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ProblemDetails" - } - } - } - }, - "404": { - "description": "Not Found", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ErrorResource" - } - } - } - }, - "422": { - "description": "Unprocessable Content", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ErrorResource" - } - } - } - }, - "500": { - "description": "Internal Server Error" - }, - "200": { - "description": "OK", - "content": { - "application/json": { - "schema": { - "type": "object", - "additionalProperties": { - "type": "object", - "additionalProperties": { - "type": "string" - } - } - } - } - } - } - } - } - }, - "/api/translation/{language}": { - "get": { - "tags": [ - "Translation" - ], - "parameters": [ - { - "name": "language", - "in": "path", - "required": true, - "schema": { - "type": "string" - } - }, - { - "name": "api-version", - "in": "query", - "schema": { - "type": "string" - } - } - ], - "responses": { - "400": { - "description": "Bad Request", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ErrorResource" - } - } - } - }, - "403": { - "description": "Forbidden", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ProblemDetails" - } - } - } - }, - "404": { - "description": "Not Found", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ErrorResource" - } - } - } - }, - "422": { - "description": "Unprocessable Content", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ErrorResource" - } - } - } - }, - "500": { - "description": "Internal Server Error" - }, - "200": { - "description": "OK", - "content": { - "application/json": { - "schema": { - "type": "object", - "additionalProperties": { - "type": "string" - } - } - } - } - } - } - } - }, - "/api/user/{userId}": { - "get": { - "tags": [ - "User" - ], - "parameters": [ - { - "name": "userId", - "in": "path", - "required": true, - "schema": { - "type": "integer", - "format": "int32" - } - }, - { - "name": "api-version", - "in": "query", - "schema": { - "type": "string" - } - } - ], - "responses": { - "400": { - "description": "Bad Request", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ErrorResource" - } - } - } - }, - "403": { - "description": "Forbidden", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ProblemDetails" - } - } - } - }, - "404": { - "description": "Not Found", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ErrorResource" - } - } - } - }, - "422": { - "description": "Unprocessable Content", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ErrorResource" - } - } - } - }, - "500": { - "description": "Internal Server Error" - }, - "200": { - "description": "OK", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/PublicUserResourceDataResponse" - } - } - } - } - } - } - }, - "/api/me/settings": { - "get": { - "tags": [ - "UserSetting" - ], - "parameters": [ - { - "name": "Page", - "in": "query", - "schema": { - "type": "integer", - "format": "int32" - } - }, - { - "name": "ItemsPerPage", - "in": "query", - "schema": { - "type": "integer", - "format": "int32" - } - }, - { - "name": "PageSize", - "in": "query", - "schema": { - "type": "integer", - "format": "int32" - } - }, - { - "name": "api-version", - "in": "query", - "schema": { - "type": "string" - } - } - ], - "responses": { - "400": { - "description": "Bad Request", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ErrorResource" - } - } - } - }, - "403": { - "description": "Forbidden", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ProblemDetails" - } - } - } - }, - "404": { - "description": "Not Found", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ErrorResource" - } - } - } - }, - "422": { - "description": "Unprocessable Content", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ErrorResource" - } - } - } - }, - "500": { - "description": "Internal Server Error" - }, - "200": { - "description": "OK", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/UserSettingResourcePaginatedDataResult" - } - } - } - } - } - }, - "post": { - "tags": [ - "UserSetting" - ], - "parameters": [ - { - "name": "api-version", - "in": "query", - "schema": { - "type": "string" - } - } - ], - "requestBody": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/CreateUserSettingsResource" - } - }, - "text/json": { - "schema": { - "$ref": "#/components/schemas/CreateUserSettingsResource" - } - }, - "application/*+json": { - "schema": { - "$ref": "#/components/schemas/CreateUserSettingsResource" - } - } - } - }, - "responses": { - "400": { - "description": "Bad Request", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ErrorResource" - } - } - } - }, - "403": { - "description": "Forbidden", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ProblemDetails" - } - } - } - }, - "404": { - "description": "Not Found", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ErrorResource" - } - } - } - }, - "422": { - "description": "Unprocessable Content", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ErrorResource" - } - } - } - }, - "500": { - "description": "Internal Server Error" - }, - "200": { - "description": "OK", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/UserSettingResourceDataResponse" - } - } - } - } - } - } - }, - "/api/me/settings/{key}": { - "get": { - "tags": [ - "UserSetting" - ], - "parameters": [ - { - "name": "key", - "in": "path", - "required": true, - "schema": { - "type": "string" - } - }, - { - "name": "api-version", - "in": "query", - "schema": { - "type": "string" - } - } - ], - "responses": { - "400": { - "description": "Bad Request", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ErrorResource" - } - } - } - }, - "403": { - "description": "Forbidden", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ProblemDetails" - } - } - } - }, - "404": { - "description": "Not Found", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ErrorResource" - } - } - } - }, - "422": { - "description": "Unprocessable Content", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ErrorResource" - } - } - } - }, - "500": { - "description": "Internal Server Error" - }, - "200": { - "description": "OK", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/UserSettingResourceDataResponse" - } - } - } - } - } - }, - "put": { - "tags": [ - "UserSetting" - ], - "parameters": [ - { - "name": "key", - "in": "path", - "required": true, - "schema": { - "type": "string" - } - }, - { - "name": "api-version", - "in": "query", - "schema": { - "type": "string" - } - } - ], - "requestBody": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/UpdateUserSettingsResource" - } - }, - "text/json": { - "schema": { - "$ref": "#/components/schemas/UpdateUserSettingsResource" - } - }, - "application/*+json": { - "schema": { - "$ref": "#/components/schemas/UpdateUserSettingsResource" - } - } - } - }, - "responses": { - "400": { - "description": "Bad Request", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ErrorResource" - } - } - } - }, - "403": { - "description": "Forbidden", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ProblemDetails" - } - } - } - }, - "404": { - "description": "Not Found", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ErrorResource" - } - } - } - }, - "422": { - "description": "Unprocessable Content", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ErrorResource" - } - } - } - }, - "500": { - "description": "Internal Server Error" - }, - "200": { - "description": "OK", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/UserSettingResourceDataResponse" - } - } - } - } - } - } - } - }, - "components": { - "schemas": { - "AnimoPetResource": { - "type": "object", - "properties": { - "id": { - "type": "integer", - "format": "int64" - }, - "name": { - "type": "string", - "nullable": true - }, - "gender": { - "$ref": "#/components/schemas/PetGenderEnum" - }, - "date_of_birth": { - "type": "string", - "format": "date-time", - "nullable": true - }, - "weight": { - "type": "string", - "nullable": true - }, - "breed_id": { - "type": "integer", - "format": "int32", - "nullable": true - }, - "household_id": { - "type": "integer", - "format": "int32", - "nullable": true - }, - "created_at": { - "type": "string", - "format": "date-time", - "nullable": true - }, - "updated_at": { - "type": "string", - "format": "date-time", - "nullable": true - } - }, - "additionalProperties": false - }, - "AnimoPetResourcePaginatedDataResult": { - "type": "object", - "properties": { - "data": { - "type": "array", - "items": { - "$ref": "#/components/schemas/AnimoPetResource" - }, - "nullable": true - }, - "meta": { - "$ref": "#/components/schemas/PaginatedMetaDataResult" - } - }, - "additionalProperties": false - }, - "AuthChangePasswordResource": { - "required": [ - "password" - ], - "type": "object", - "properties": { - "user_id": { - "type": "integer", - "format": "int32" - }, - "password": { - "minLength": 1, - "type": "string" - }, - "new_password": { - "type": "string", - "nullable": true - } - }, - "additionalProperties": false - }, - "AuthLoginResource": { - "required": [ - "client_uid", - "email_address", - "password" - ], - "type": "object", - "properties": { - "client_uid": { - "minLength": 1, - "type": "string" - }, - "device_id": { - "type": "string", - "nullable": true, - "deprecated": true - }, - "email_address": { - "minLength": 1, - "type": "string", - "format": "email" - }, - "password": { - "minLength": 1, - "type": "string" - } - }, - "additionalProperties": false - }, - "AuthLogoutResource": { - "type": "object", - "properties": { - "client_uid": { - "type": "string", - "nullable": true - }, - "device_id": { - "type": "string", - "nullable": true, - "deprecated": true - } - }, - "additionalProperties": false - }, - "AuthRegisterResource": { - "required": [ - "country_id", - "device_id", - "email_address", - "first_name", - "language_id", - "last_name", - "marketing_opt_in", - "password" - ], - "type": "object", - "properties": { - "email_address": { - "minLength": 1, - "type": "string", - "format": "email" - }, - "first_name": { - "maxLength": 50, - "minLength": 1, - "type": "string" - }, - "last_name": { - "maxLength": 50, - "minLength": 1, - "type": "string" - }, - "password": { - "minLength": 1, - "type": "string" - }, - "language_id": { - "type": "integer", - "format": "int32" - }, - "country_id": { - "type": "integer", - "format": "int32" - }, - "photo_id": { - "type": "integer", - "format": "int32", - "nullable": true - }, - "marketing_opt_in": { - "type": "boolean" - }, - "weight_units": { - "$ref": "#/components/schemas/UserWeightUnitEnum" - }, - "time_format": { - "$ref": "#/components/schemas/UserTimeFormatEnum" - }, - "device_id": { - "minLength": 1, - "type": "string" - } - }, - "additionalProperties": false - }, - "AuthResetPasswordRequestResource": { - "required": [ - "email_address" - ], - "type": "object", - "properties": { - "email_address": { - "minLength": 1, - "type": "string" - } - }, - "additionalProperties": false - }, - "AuthResetPasswordResource": { - "required": [ - "email_address", - "password", - "token" - ], - "type": "object", - "properties": { - "email_address": { - "minLength": 1, - "type": "string", - "format": "email" - }, - "password": { - "minLength": 6, - "type": "string" - }, - "token": { - "minLength": 1, - "type": "string" - }, - "client_uid": { - "type": "string", - "nullable": true - }, - "device_id": { - "type": "string", - "nullable": true, - "deprecated": true - } - }, - "additionalProperties": false - }, - "BreedQueryResource": { - "type": "object", - "properties": { - "page": { - "type": "integer", - "format": "int32" - }, - "items_per_page": { - "type": "integer", - "format": "int32" - }, - "page_size": { - "type": "integer", - "format": "int32" - }, - "species_id": { - "type": "integer", - "format": "int32", - "nullable": true - }, - "lang": { - "type": "string", - "nullable": true - } - }, - "additionalProperties": false - }, - "BreedResource": { - "type": "object", - "properties": { - "id": { - "type": "integer", - "format": "int32" - }, - "species_id": { - "type": "integer", - "format": "int32" - }, - "name": { - "type": "string", - "nullable": true - }, - "version": { - "type": "integer", - "format": "int32" - }, - "created_at": { - "type": "string", - "format": "date-time", - "nullable": true - }, - "updated_at": { - "type": "string", - "format": "date-time", - "nullable": true - } - }, - "additionalProperties": false - }, - "BreedResourceDataResponse": { - "type": "object", - "properties": { - "data": { - "$ref": "#/components/schemas/BreedResource" - } - }, - "additionalProperties": false - }, - "BreedResourcePaginatedDataResult": { - "type": "object", - "properties": { - "data": { - "type": "array", - "items": { - "$ref": "#/components/schemas/BreedResource" - }, - "nullable": true - }, - "meta": { - "$ref": "#/components/schemas/PaginatedMetaDataResult" - } - }, - "additionalProperties": false - }, - "ConditionQueryResource": { - "type": "object", - "properties": { - "page": { - "type": "integer", - "format": "int32" - }, - "items_per_page": { - "type": "integer", - "format": "int32" - }, - "page_size": { - "type": "integer", - "format": "int32" - }, - "lang": { - "type": "string", - "nullable": true - } - }, - "additionalProperties": false - }, - "ConditionResource": { - "type": "object", - "properties": { - "id": { - "type": "integer", - "format": "int32" - }, - "name": { - "type": "string", - "nullable": true - }, - "version": { - "type": "integer", - "format": "int32" - }, - "created_at": { - "type": "string", - "format": "date-time", - "nullable": true - }, - "updated_at": { - "type": "string", - "format": "date-time", - "nullable": true - } - }, - "additionalProperties": false - }, - "ConditionResourceDataResponse": { - "type": "object", - "properties": { - "data": { - "$ref": "#/components/schemas/ConditionResource" - } - }, - "additionalProperties": false - }, - "ConditionResourcePaginatedDataResult": { - "type": "object", - "properties": { - "data": { - "type": "array", - "items": { - "$ref": "#/components/schemas/ConditionResource" - }, - "nullable": true - }, - "meta": { - "$ref": "#/components/schemas/PaginatedMetaDataResult" - } - }, - "additionalProperties": false - }, - "ConsumptionAlertResource": { - "type": "object", - "properties": { - "pet_id": { - "type": "integer", - "format": "int32" - }, - "tag_id": { - "type": "integer", - "format": "int32" - }, - "pet_weight": { - "type": "integer", - "format": "int32" - }, - "amount": { - "type": "integer", - "format": "int32" - }, - "time_noticed_utc": { - "type": "string", - "format": "date-time" - }, - "created_at": { - "type": "string", - "format": "date-time" - } - }, - "additionalProperties": false - }, - "ConsumptionHabitModelStateEnum": { - "enum": [ - 0, - 1, - 2, - 3 - ], - "type": "integer", - "format": "int32" - }, - "ConsumptionHabitModelStateResource": { - "type": "object", - "properties": { - "pet_id": { - "type": "integer", - "format": "int32" - }, - "tag_id": { - "type": "integer", - "format": "int32", - "nullable": true - }, - "state": { - "$ref": "#/components/schemas/ConsumptionHabitModelStateEnum" - } - }, - "additionalProperties": false - }, - "ConsumptionHabitOutcomeEnum": { - "enum": [ - 0, - 1, - 2 - ], - "type": "integer", - "format": "int32" - }, - "ConsumptionHabitResource": { - "type": "object", - "properties": { - "outcome": { - "$ref": "#/components/schemas/ConsumptionHabitOutcomeEnum" - }, - "calendar_day": { - "type": "string", - "format": "date" - }, - "amount": { - "type": "integer", - "format": "int32" - }, - "lower_limit": { - "type": "integer", - "format": "int32", - "nullable": true - }, - "upper_limit": { - "type": "integer", - "format": "int32", - "nullable": true - }, - "created_at": { - "type": "string", - "format": "date-time" - } - }, - "additionalProperties": false - }, - "CountryQueryResource": { - "type": "object", - "properties": { - "page": { - "type": "integer", - "format": "int32" - }, - "items_per_page": { - "type": "integer", - "format": "int32" - }, - "page_size": { - "type": "integer", - "format": "int32" - }, - "iso_code2": { - "type": "string", - "nullable": true - }, - "lang": { - "type": "string", - "nullable": true - } - }, - "additionalProperties": false - }, - "CountryResource": { - "type": "object", - "properties": { - "id": { - "type": "integer", - "format": "int32" - }, - "name": { - "type": "string", - "nullable": true - }, - "native_name": { - "type": "string", - "nullable": true - }, - "code": { - "type": "string", - "nullable": true - }, - "default_language_id": { - "type": "integer", - "format": "int32", - "nullable": true - }, - "default_timezone_id": { - "type": "integer", - "format": "int32", - "nullable": true - }, - "created_at": { - "type": "string", - "format": "date-time", - "nullable": true - }, - "updated_at": { - "type": "string", - "format": "date-time", - "nullable": true - } - }, - "additionalProperties": false - }, - "CountryResourceDataResponse": { - "type": "object", - "properties": { - "data": { - "$ref": "#/components/schemas/CountryResource" - } - }, - "additionalProperties": false - }, - "CountryResourcePaginatedDataResult": { - "type": "object", - "properties": { - "data": { - "type": "array", - "items": { - "$ref": "#/components/schemas/CountryResource" - }, - "nullable": true - }, - "meta": { - "$ref": "#/components/schemas/PaginatedMetaDataResult" - } - }, - "additionalProperties": false - }, - "CreateHouseholdInviteResource": { - "required": [ - "email_address", - "owner", - "write" - ], - "type": "object", - "properties": { - "code": { - "type": "string", - "nullable": true - }, - "email_address": { - "maxLength": 255, - "minLength": 1, - "type": "string", - "format": "email" - }, - "owner": { - "type": "boolean" - }, - "write": { - "type": "boolean" - } - }, - "additionalProperties": false - }, - "CreateHouseholdResource": { - "required": [ - "name", - "timezone_id" - ], - "type": "object", - "properties": { - "name": { - "maxLength": 50, - "minLength": 1, - "type": "string" - }, - "timezone_id": { - "type": "integer", - "format": "int32" - } - }, - "additionalProperties": false - }, - "CreatePetPositionResource": { - "required": [ - "since" - ], - "type": "object", - "properties": { - "where": { - "type": "integer", - "format": "int32", - "nullable": true - }, - "since": { - "type": "string", - "format": "date-time" - } - }, - "additionalProperties": false - }, - "CreatePetResource": { - "required": [ - "household_id", - "name" - ], - "type": "object", - "properties": { - "name": { - "maxLength": 50, - "minLength": 1, - "type": "string" - }, - "gender": { - "$ref": "#/components/schemas/PetGenderEnum" - }, - "date_of_birth": { - "type": "string", - "format": "date-time", - "nullable": true - }, - "weight": { - "maximum": 2147483647, - "minimum": 0, - "exclusiveMinimum": true, - "type": "number", - "format": "double", - "nullable": true - }, - "comments": { - "maxLength": 200, - "type": "string", - "nullable": true - }, - "breed_id": { - "type": "integer", - "format": "int32", - "nullable": true - }, - "breed_id2": { - "type": "integer", - "format": "int32", - "nullable": true - }, - "spayed": { - "$ref": "#/components/schemas/SpayedEnum" - }, - "food_type_id": { - "type": "integer", - "format": "int32", - "nullable": true - }, - "photo_id": { - "type": "integer", - "format": "int32", - "nullable": true - }, - "species_id": { - "type": "integer", - "format": "int32", - "nullable": true - }, - "conditions": { - "type": "array", - "items": { - "$ref": "#/components/schemas/ConditionResource" - }, - "nullable": true - }, - "household_id": { - "type": "integer", - "format": "int32" - } - }, - "additionalProperties": false - }, - "CreateUserSettingsResource": { - "required": [ - "key", - "value" - ], - "type": "object", - "properties": { - "key": { - "maxLength": 255, - "minLength": 1, - "type": "string" - }, - "value": { - "minLength": 1, - "type": "string" - } - }, - "additionalProperties": false - }, - "DeleteAccountResource": { - "required": [ - "password" - ], - "type": "object", - "properties": { - "password": { - "minLength": 1, - "type": "string" - }, - "households": { - "type": "array", - "items": { - "type": "integer", - "format": "int32" - }, - "nullable": true - } - }, - "additionalProperties": false - }, - "DeviceControlPendingResource": { - "type": "object", - "properties": { - "state": { - "nullable": true - }, - "request_id": { - "type": "string", - "nullable": true - }, - "requested_at": { - "type": "string", - "format": "date-time", - "nullable": true - }, - "requested_by": { - "type": "string", - "nullable": true - } - }, - "additionalProperties": false - }, - "DeviceControlResource": { - "type": "object", - "properties": { - "data": { - "nullable": true - }, - "pending": { - "type": "array", - "items": { - "$ref": "#/components/schemas/DeviceControlPendingResource" - }, - "nullable": true - }, - "results": { - "type": "array", - "items": { - "$ref": "#/components/schemas/DeviceControlResultResource" - }, - "nullable": true - } - }, - "additionalProperties": false - }, - "DeviceControlResultResource": { - "type": "object", - "properties": { - "request_id": { - "type": "string", - "nullable": true - }, - "response_id": { - "type": "string", - "nullable": true - }, - "status": { - "$ref": "#/components/schemas/RequestChangeStateResponseStatus" - }, - "status_id": { - "$ref": "#/components/schemas/RequestChangeStateResponseStatus" - }, - "requested_at": { - "type": "string", - "format": "date-time", - "nullable": true - }, - "committed_at": { - "type": "string", - "format": "date-time", - "nullable": true - } - }, - "additionalProperties": false - }, - "DeviceControlStateChangeResource": { - "type": "object", - "properties": { - "request_id": { - "type": "string", - "nullable": true - }, - "response_id": { - "type": "string", - "nullable": true - }, - "status": { - "$ref": "#/components/schemas/RequestChangeStateResponseStatus" - }, - "status_id": { - "$ref": "#/components/schemas/RequestChangeStateResponseStatus" - }, - "requested_at": { - "type": "string", - "format": "date-time", - "nullable": true - }, - "committed_at": { - "type": "string", - "format": "date-time", - "nullable": true - }, - "device_id": { - "type": "integer", - "format": "int32", - "nullable": true - }, - "state": { - "nullable": true - }, - "requested_by": { - "type": "integer", - "format": "int32", - "nullable": true - }, - "child_state_changes": { - "type": "array", - "items": { - "$ref": "#/components/schemas/DeviceControlStateChangeResource" - }, - "nullable": true - }, - "parent_request_id": { - "type": "string", - "nullable": true - } - }, - "additionalProperties": false - }, - "DeviceControlStateChangeResourceDataResponse": { - "type": "object", - "properties": { - "data": { - "$ref": "#/components/schemas/DeviceControlStateChangeResource" - } - }, - "additionalProperties": false - }, - "DeviceControlStateChangeResourceListDataResponse": { - "type": "object", - "properties": { - "data": { - "type": "array", - "items": { - "$ref": "#/components/schemas/DeviceControlStateChangeResource" - }, - "nullable": true - } - }, - "additionalProperties": false - }, - "DeviceNeedsUpdateResource": { - "type": "object", - "properties": { - "needs_manual_update": { - "type": "boolean" - } - }, - "additionalProperties": false - }, - "DeviceNeedsUpdateResourceDataResponse": { - "type": "object", - "properties": { - "data": { - "$ref": "#/components/schemas/DeviceNeedsUpdateResource" - } - }, - "additionalProperties": false - }, - "DevicePairByCodeResource": { - "required": [ - "pairing_code" - ], - "type": "object", - "properties": { - "pairing_code": { - "maxLength": 32, - "minLength": 32, - "type": "string" - } - }, - "additionalProperties": false - }, - "DeviceReadinessResource": { - "type": "object", - "properties": { - "device_ready": { - "type": "boolean", - "description": "Given all the criteria, is the device ready to be used" - }, - "profiles_available": { - "type": "integer", - "description": "How many profiles/tags do we have for this device in state", - "format": "int32" - }, - "profiles_updated_at": { - "type": "string", - "description": "When was the last profile update in the state of the device", - "format": "date-time", - "nullable": true - } - }, - "additionalProperties": false - }, - "DeviceReadinessResourceDataResponse": { - "type": "object", - "properties": { - "data": { - "$ref": "#/components/schemas/DeviceReadinessResource" - } - }, - "additionalProperties": false - }, - "DeviceResource": { - "type": "object", - "properties": { - "id": { - "type": "integer", - "format": "int32" - }, - "parent_device_id": { - "type": "integer", - "format": "int32", - "nullable": true - }, - "product_id": { - "type": "integer", - "format": "int32" - }, - "household_id": { - "type": "integer", - "format": "int32", - "nullable": true - }, - "index": { - "type": "integer", - "format": "int32", - "nullable": true - }, - "name": { - "type": "string", - "nullable": true - }, - "serial_number": { - "type": "string", - "nullable": true - }, - "mac_address": { - "type": "string", - "nullable": true - }, - "version": { - "type": "integer", - "format": "int32" - }, - "created_at": { - "type": "string", - "format": "date-time", - "nullable": true - }, - "updated_at": { - "type": "string", - "format": "date-time", - "nullable": true - }, - "deleted_at": { - "type": "string", - "format": "date-time", - "nullable": true - }, - "pairing_at": { - "type": "string", - "format": "date-time", - "nullable": true - }, - "last_activity_at": { - "type": "string", - "format": "date-time", - "nullable": true - }, - "last_new_event_at": { - "type": "string", - "format": "date-time", - "nullable": true - }, - "control": { - "nullable": true - }, - "status": { - "nullable": true - }, - "tags": { - "type": "array", - "items": { - "$ref": "#/components/schemas/DeviceTagResource" - }, - "nullable": true - } - }, - "additionalProperties": false - }, - "DeviceResourceDataResponse": { - "type": "object", - "properties": { - "data": { - "$ref": "#/components/schemas/DeviceResource" - } - }, - "additionalProperties": false - }, - "DeviceResourceIEnumerableDataResponse": { - "type": "object", - "properties": { - "data": { - "type": "array", - "items": { - "$ref": "#/components/schemas/DeviceResource" - }, - "nullable": true - } - }, - "additionalProperties": false - }, - "DeviceResourcePaginatedDataResult": { - "type": "object", - "properties": { - "data": { - "type": "array", - "items": { - "$ref": "#/components/schemas/DeviceResource" - }, - "nullable": true - }, - "meta": { - "$ref": "#/components/schemas/PaginatedMetaDataResult" - } - }, - "additionalProperties": false - }, - "DeviceTagDataResource": { - "type": "object", - "properties": { - "data": { - "$ref": "#/components/schemas/DeviceTagResource" - }, - "pending": { - "type": "array", - "items": { - "$ref": "#/components/schemas/DeviceControlPendingResource" - }, - "description": "Any pending state changes for the device tag", - "nullable": true - }, - "results": { - "type": "array", - "items": { - "$ref": "#/components/schemas/DeviceControlResultResource" - }, - "description": "State change result", - "nullable": true - } - }, - "additionalProperties": false - }, - "DeviceTagResource": { - "type": "object", - "properties": { - "id": { - "type": "integer", - "description": "Tag id", - "format": "int32" - }, - "device_id": { - "type": "integer", - "format": "int32" - }, - "index": { - "type": "integer", - "format": "int32" - }, - "profile": { - "type": "integer", - "format": "int32", - "nullable": true - }, - "version": { - "type": "integer", - "format": "int32" - }, - "created_at": { - "type": "string", - "format": "date-time", - "nullable": true - }, - "updated_at": { - "type": "string", - "format": "date-time", - "nullable": true - } - }, - "additionalProperties": false - }, - "DeviceTagResourceDataResponse": { - "type": "object", - "properties": { - "data": { - "$ref": "#/components/schemas/DeviceTagResource" - } - }, - "additionalProperties": false - }, - "DeviceTagResourcePaginatedDataResult": { - "type": "object", - "properties": { - "data": { - "type": "array", - "items": { - "$ref": "#/components/schemas/DeviceTagResource" - }, - "nullable": true - }, - "meta": { - "$ref": "#/components/schemas/PaginatedMetaDataResult" - } - }, - "additionalProperties": false - }, - "DeviceType": { - "enum": [ - 0, - 1, - 2, - 3, - 4, - 5, - 6, - 7, - 8, - 9, - 10, - 32, - 255 - ], - "type": "integer", - "format": "int32" - }, - "DoorDirectionEnum": { - "enum": [ - 0, - 1, - 2, - 3 - ], - "type": "integer", - "format": "int32" - }, - "DoorSide": { - "enum": [ - 0, - 1, - 2 - ], - "type": "integer", - "format": "int32" - }, - "DoorStatusEnum": { - "enum": [ - 4, - 6, - 8, - 10, - 11, - 12, - 13 - ], - "type": "integer", - "format": "int32" - }, - "ErrorResource": { - "type": "object", - "properties": { - "success": { - "type": "boolean", - "readOnly": true - }, - "error": { - "type": "object", - "additionalProperties": { - "type": "array", - "items": { - "type": "string" - }, - "nullable": true - }, - "nullable": true, - "readOnly": true - } - }, - "additionalProperties": false - }, - "FoodTypeQueryResource": { - "type": "object", - "properties": { - "page": { - "type": "integer", - "format": "int32" - }, - "items_per_page": { - "type": "integer", - "format": "int32" - }, - "page_size": { - "type": "integer", - "format": "int32" - }, - "lang": { - "type": "string", - "nullable": true - } - }, - "additionalProperties": false - }, - "FoodTypeResource": { - "type": "object", - "properties": { - "id": { - "type": "integer", - "format": "int32" - }, - "name": { - "type": "string", - "nullable": true - }, - "version": { - "type": "integer", - "format": "int32" - }, - "created_at": { - "type": "string", - "format": "date-time", - "nullable": true - }, - "updated_at": { - "type": "string", - "format": "date-time", - "nullable": true - } - }, - "additionalProperties": false - }, - "FoodTypeResourceDataResponse": { - "type": "object", - "properties": { - "data": { - "$ref": "#/components/schemas/FoodTypeResource" - } - }, - "additionalProperties": false - }, - "FoodTypeResourcePaginatedDataResult": { - "type": "object", - "properties": { - "data": { - "type": "array", - "items": { - "$ref": "#/components/schemas/FoodTypeResource" - }, - "nullable": true - }, - "meta": { - "$ref": "#/components/schemas/PaginatedMetaDataResult" - } - }, - "additionalProperties": false - }, - "HouseholdInviteResource": { - "type": "object", - "properties": { - "id": { - "type": "integer", - "format": "int32" - }, - "code": { - "type": "string", - "nullable": true - }, - "email_address": { - "type": "string", - "nullable": true - }, - "owner": { - "type": "boolean", - "nullable": true - }, - "write": { - "type": "boolean", - "nullable": true - }, - "status": { - "$ref": "#/components/schemas/HouseholdInviteStatus" - }, - "user": { - "$ref": "#/components/schemas/HouseholdInviteUserResource" - }, - "version": { - "type": "integer", - "format": "int32" - }, - "created_at": { - "type": "string", - "format": "date-time", - "nullable": true - }, - "updated_at": { - "type": "string", - "format": "date-time", - "nullable": true - }, - "deleted_at": { - "type": "string", - "format": "date-time", - "nullable": true - }, - "used_at": { - "type": "string", - "format": "date-time", - "nullable": true - } - }, - "additionalProperties": false - }, - "HouseholdInviteResourceDataResponse": { - "type": "object", - "properties": { - "data": { - "$ref": "#/components/schemas/HouseholdInviteResource" - } - }, - "additionalProperties": false - }, - "HouseholdInviteResourcePaginatedDataResult": { - "type": "object", - "properties": { - "data": { - "type": "array", - "items": { - "$ref": "#/components/schemas/HouseholdInviteResource" - }, - "nullable": true - }, - "meta": { - "$ref": "#/components/schemas/PaginatedMetaDataResult" - } - }, - "additionalProperties": false - }, - "HouseholdInviteStatus": { - "enum": [ - 0, - 1, - 2 - ], - "type": "integer", - "format": "int32" - }, - "HouseholdInviteUserResource": { - "type": "object", - "properties": { - "creator": { - "$ref": "#/components/schemas/PublicUserResource" - }, - "acceptor": { - "$ref": "#/components/schemas/PublicUserResource" - } - }, - "additionalProperties": false - }, - "HouseholdResource": { - "type": "object", - "properties": { - "id": { - "type": "integer", - "format": "int32" - }, - "name": { - "type": "string", - "nullable": true - }, - "share_code": { - "type": "string", - "nullable": true - }, - "created_user_id": { - "type": "integer", - "format": "int32", - "nullable": true - }, - "timezone_id": { - "type": "integer", - "format": "int32", - "nullable": true - }, - "version": { - "type": "integer", - "format": "int32" - }, - "created_at": { - "type": "string", - "format": "date-time", - "nullable": true - }, - "updated_at": { - "type": "string", - "format": "date-time", - "nullable": true - }, - "deleted_at": { - "type": "string", - "format": "date-time", - "nullable": true - }, - "invites": { - "type": "array", - "items": { - "$ref": "#/components/schemas/HouseholdInviteResource" - }, - "nullable": true - }, - "users": { - "type": "array", - "items": { - "$ref": "#/components/schemas/HouseholdUserResource" - }, - "nullable": true - }, - "timezone": { - "$ref": "#/components/schemas/TimezoneResource" - } - }, - "additionalProperties": false - }, - "HouseholdResourceDataResponse": { - "type": "object", - "properties": { - "data": { - "$ref": "#/components/schemas/HouseholdResource" - } - }, - "additionalProperties": false - }, - "HouseholdResourcePaginatedDataResult": { - "type": "object", - "properties": { - "data": { - "type": "array", - "items": { - "$ref": "#/components/schemas/HouseholdResource" - }, - "nullable": true - }, - "meta": { - "$ref": "#/components/schemas/PaginatedMetaDataResult" - } - }, - "additionalProperties": false - }, - "HouseholdUserResource": { - "type": "object", - "properties": { - "id": { - "type": "integer", - "format": "int32" - }, - "owner": { - "type": "boolean", - "nullable": true - }, - "write": { - "type": "boolean", - "nullable": true - }, - "user": { - "$ref": "#/components/schemas/PublicUserResource" - }, - "version": { - "type": "integer", - "format": "int32" - }, - "created_at": { - "type": "string", - "format": "date-time", - "nullable": true - }, - "updated_at": { - "type": "string", - "format": "date-time", - "nullable": true - } - }, - "additionalProperties": false - }, - "HouseholdUserResourceDataResponse": { - "type": "object", - "properties": { - "data": { - "$ref": "#/components/schemas/HouseholdUserResource" - } - }, - "additionalProperties": false - }, - "HouseholdUserResourcePaginatedDataResult": { - "type": "object", - "properties": { - "data": { - "type": "array", - "items": { - "$ref": "#/components/schemas/HouseholdUserResource" - }, - "nullable": true - }, - "meta": { - "$ref": "#/components/schemas/PaginatedMetaDataResult" - } - }, - "additionalProperties": false - }, - "InfoResource": { - "type": "object", - "properties": { - "language": { - "type": "string", - "nullable": true - }, - "country": { - "type": "string", - "nullable": true - } - }, - "additionalProperties": false - }, - "InfoResourceDataResponse": { - "type": "object", - "properties": { - "data": { - "$ref": "#/components/schemas/InfoResource" - } - }, - "additionalProperties": false - }, - "InviteResource": { - "type": "object", - "properties": { - "id": { - "type": "integer", - "format": "int32" - }, - "code": { - "type": "string", - "nullable": true - }, - "email_address": { - "type": "string", - "nullable": true - }, - "owner": { - "type": "boolean", - "nullable": true - }, - "write": { - "type": "boolean", - "nullable": true - }, - "status": { - "$ref": "#/components/schemas/HouseholdInviteStatus" - }, - "user": { - "$ref": "#/components/schemas/HouseholdInviteUserResource" - }, - "version": { - "type": "integer", - "format": "int32" - }, - "created_at": { - "type": "string", - "format": "date-time", - "nullable": true - }, - "updated_at": { - "type": "string", - "format": "date-time", - "nullable": true - }, - "deleted_at": { - "type": "string", - "format": "date-time", - "nullable": true - }, - "used_at": { - "type": "string", - "format": "date-time", - "nullable": true - } - }, - "additionalProperties": false - }, - "InviteResourceDataResponse": { - "type": "object", - "properties": { - "data": { - "$ref": "#/components/schemas/InviteResource" - } - }, - "additionalProperties": false - }, - "InviteResourcePaginatedDataResult": { - "type": "object", - "properties": { - "data": { - "type": "array", - "items": { - "$ref": "#/components/schemas/InviteResource" - }, - "nullable": true - }, - "meta": { - "$ref": "#/components/schemas/PaginatedMetaDataResult" - } - }, - "additionalProperties": false - }, - "LanguageResource": { - "type": "object", - "properties": { - "id": { - "type": "integer", - "format": "int32" - }, - "name": { - "type": "string", - "nullable": true - }, - "native_name": { - "type": "string", - "nullable": true - }, - "code": { - "type": "string", - "nullable": true - }, - "enabled": { - "type": "boolean" - }, - "created_at": { - "type": "string", - "format": "date-time", - "nullable": true - }, - "updated_at": { - "type": "string", - "format": "date-time", - "nullable": true - } - }, - "additionalProperties": false - }, - "LanguageResourceDataResponse": { - "type": "object", - "properties": { - "data": { - "$ref": "#/components/schemas/LanguageResource" - } - }, - "additionalProperties": false - }, - "LanguageResourcePaginatedDataResult": { - "type": "object", - "properties": { - "data": { - "type": "array", - "items": { - "$ref": "#/components/schemas/LanguageResource" - }, - "nullable": true - }, - "meta": { - "$ref": "#/components/schemas/PaginatedMetaDataResult" - } - }, - "additionalProperties": false - }, - "MeStartResource": { - "type": "object", - "properties": { - "devices": { - "type": "array", - "items": { - "$ref": "#/components/schemas/DeviceResource" - }, - "nullable": true - }, - "households": { - "type": "array", - "items": { - "$ref": "#/components/schemas/HouseholdResource" - }, - "nullable": true - }, - "pets": { - "type": "array", - "items": { - "$ref": "#/components/schemas/PetResource" - }, - "nullable": true - }, - "photos": { - "type": "array", - "items": { - "$ref": "#/components/schemas/PhotoResource" - }, - "nullable": true - }, - "tags": { - "type": "array", - "items": { - "$ref": "#/components/schemas/TagResource" - }, - "nullable": true - }, - "user": { - "$ref": "#/components/schemas/UserResource" - }, - "segments": { - "type": "array", - "items": { - "type": "string" - }, - "nullable": true - } - }, - "additionalProperties": false - }, - "MeStartResourceDataResponse": { - "type": "object", - "properties": { - "data": { - "$ref": "#/components/schemas/MeStartResource" - } - }, - "additionalProperties": false - }, - "MovementResource": { - "type": "object", - "properties": { - "id": { - "type": "integer", - "format": "int64" - }, - "device_id": { - "type": "integer", - "format": "int32", - "nullable": true - }, - "tag_id": { - "type": "integer", - "format": "int32" - }, - "user_id": { - "type": "integer", - "format": "int32", - "nullable": true - }, - "direction": { - "$ref": "#/components/schemas/DoorDirectionEnum" - }, - "side": { - "$ref": "#/components/schemas/DoorSide" - }, - "type": { - "$ref": "#/components/schemas/DoorStatusEnum" - }, - "created_at": { - "type": "string", - "format": "date-time", - "nullable": true - }, - "updated_at": { - "type": "string", - "format": "date-time", - "nullable": true - } - }, - "additionalProperties": false - }, - "NotificationResource": { - "type": "object", - "properties": { - "id": { - "type": "integer", - "format": "int64" - }, - "type": { - "$ref": "#/components/schemas/TimelineEventType" - }, - "text": { - "type": "string", - "nullable": true - }, - "created_at": { - "type": "string", - "format": "date-time", - "nullable": true - } - }, - "additionalProperties": false - }, - "NotificationResourcePaginatedDataResult": { - "type": "object", - "properties": { - "data": { - "type": "array", - "items": { - "$ref": "#/components/schemas/NotificationResource" - }, - "nullable": true - }, - "meta": { - "$ref": "#/components/schemas/PaginatedMetaDataResult" - } - }, - "additionalProperties": false - }, - "ObjectDataResponse": { - "type": "object", - "properties": { - "data": { - "nullable": true - } - }, - "additionalProperties": false - }, - "PaginatedMetaDataResult": { - "type": "object", - "properties": { - "page": { - "type": "integer", - "format": "int32", - "nullable": true - }, - "page_size": { - "type": "integer", - "format": "int32", - "nullable": true - }, - "count": { - "type": "integer", - "format": "int64" - }, - "total_pages": { - "type": "integer", - "format": "int64", - "nullable": true - } - }, - "additionalProperties": false - }, - "PetConditionResource": { - "type": "object", - "properties": { - "id": { - "type": "integer", - "format": "int32" - }, - "version": { - "type": "integer", - "format": "int32" - }, - "created_at": { - "type": "string", - "format": "date-time", - "nullable": true - }, - "updated_at": { - "type": "string", - "format": "date-time", - "nullable": true - } - }, - "additionalProperties": false - }, - "PetConditionResourceDataResponse": { - "type": "object", - "properties": { - "data": { - "$ref": "#/components/schemas/PetConditionResource" - } - }, - "additionalProperties": false - }, - "PetConditionResourcePaginatedDataResult": { - "type": "object", - "properties": { - "data": { - "type": "array", - "items": { - "$ref": "#/components/schemas/PetConditionResource" - }, - "nullable": true - }, - "meta": { - "$ref": "#/components/schemas/PaginatedMetaDataResult" - } - }, - "additionalProperties": false - }, - "PetConsumption": { - "type": "object", - "properties": { - "total_consumption": { - "type": "number", - "format": "double", - "nullable": true - }, - "date": { - "type": "string", - "format": "date-time", - "nullable": true - } - }, - "additionalProperties": false - }, - "PetConsumptionResource": { - "type": "object", - "properties": { - "date": { - "type": "string", - "format": "date-time", - "nullable": true - }, - "last_consumption": { - "type": "string", - "format": "date-time", - "nullable": true - }, - "substance_type": { - "$ref": "#/components/schemas/SubstanceTypesEnum" - }, - "total_consumption": { - "type": "number", - "format": "double", - "nullable": true - }, - "number_of_visits": { - "type": "integer", - "format": "int32" - }, - "consumption_time": { - "type": "integer", - "format": "int32" - }, - "activity": { - "type": "array", - "items": { - "$ref": "#/components/schemas/PetConsumption" - }, - "nullable": true - }, - "device_ids": { - "type": "array", - "items": { - "type": "integer", - "format": "int32" - }, - "nullable": true - } - }, - "additionalProperties": false - }, - "PetConsumptionStatusResource": { - "type": "object", - "properties": { - "id": { - "type": "integer", - "format": "int64" - }, - "tag_id": { - "type": "integer", - "format": "int32", - "nullable": true - }, - "device_id": { - "type": "integer", - "format": "int32", - "nullable": true - }, - "change": { - "type": "array", - "items": { - "type": "number", - "format": "double" - }, - "nullable": true - }, - "at": { - "type": "string", - "format": "date-time", - "nullable": true - } - }, - "additionalProperties": false - }, - "PetDashboardQueryResource": { - "required": [ - "from", - "pet_id" - ], - "type": "object", - "properties": { - "page": { - "type": "integer", - "format": "int32" - }, - "items_per_page": { - "type": "integer", - "format": "int32" - }, - "page_size": { - "type": "integer", - "format": "int32" - }, - "pet_id": { - "minItems": 1, - "type": "array", - "items": { - "type": "integer", - "format": "int32" - } - }, - "from": { - "minLength": 1, - "type": "string", - "format": "date-time" - }, - "days_history": { - "type": "integer", - "format": "int32" - } - }, - "additionalProperties": false - }, - "PetDashboardResource": { - "type": "object", - "properties": { - "pet_id": { - "type": "integer", - "format": "int32", - "nullable": true - }, - "movement": { - "$ref": "#/components/schemas/PetMovementResource" - }, - "drinking": { - "$ref": "#/components/schemas/PetConsumptionResource" - }, - "feeding": { - "$ref": "#/components/schemas/PetConsumptionResource" - }, - "drinking_habit": { - "$ref": "#/components/schemas/ConsumptionHabitResource" - }, - "drinking_alert": { - "$ref": "#/components/schemas/ConsumptionAlertResource" - }, - "habit_model_state": { - "$ref": "#/components/schemas/ConsumptionHabitModelStateResource" - } - }, - "additionalProperties": false - }, - "PetDashboardResourceListDataResponse": { - "type": "object", - "properties": { - "data": { - "type": "array", - "items": { - "$ref": "#/components/schemas/PetDashboardResource" - }, - "nullable": true - } - }, - "additionalProperties": false - }, - "PetGenderEnum": { - "enum": [ - 0, - 1 - ], - "type": "integer", - "format": "int32" - }, - "PetInsightQueryResource": { - "type": "object", - "properties": { - "page": { - "type": "integer", - "format": "int32" - }, - "items_per_page": { - "type": "integer", - "format": "int32" - }, - "page_size": { - "type": "integer", - "format": "int32" - }, - "from": { - "type": "string", - "format": "date-time" - }, - "to": { - "type": "string", - "format": "date-time" - } - }, - "additionalProperties": false - }, - "PetInsightResource": { - "type": "object", - "properties": { - "pet_id": { - "type": "integer", - "format": "int32" - }, - "drinking_habit": { - "$ref": "#/components/schemas/ConsumptionHabitResource" - }, - "drinking_alert": { - "$ref": "#/components/schemas/ConsumptionAlertResource" - }, - "habit_model_state": { - "$ref": "#/components/schemas/ConsumptionHabitModelStateResource" - } - }, - "additionalProperties": false - }, - "PetInsightResourceDataResponse": { - "type": "object", - "properties": { - "data": { - "$ref": "#/components/schemas/PetInsightResource" - } - }, - "additionalProperties": false - }, - "PetMovement": { - "type": "object", - "properties": { - "date": { - "type": "string", - "format": "date-time", - "nullable": true - }, - "time_outside": { - "type": "string", - "format": "date-span" - } - }, - "additionalProperties": false - }, - "PetMovementResource": { - "type": "object", - "properties": { - "date": { - "type": "string", - "format": "date-time", - "nullable": true - }, - "where": { - "$ref": "#/components/schemas/DoorDirectionEnum" - }, - "time_outside": { - "type": "string", - "format": "date-span", - "nullable": true - }, - "since": { - "type": "string", - "format": "date-time", - "nullable": true - }, - "last_entry": { - "type": "string", - "format": "date-time", - "nullable": true - }, - "trips_outside": { - "type": "integer", - "format": "int32", - "nullable": true - }, - "entries": { - "type": "integer", - "format": "int32", - "nullable": true - }, - "time_outside_in_seconds": { - "type": "integer", - "format": "int64" - }, - "activity": { - "type": "array", - "items": { - "$ref": "#/components/schemas/PetMovement" - }, - "nullable": true - }, - "device_ids": { - "type": "array", - "items": { - "type": "integer", - "format": "int32" - }, - "nullable": true - } - }, - "additionalProperties": false - }, - "PetPositionResource": { - "type": "object", - "properties": { - "id": { - "type": "integer", - "format": "int64" - }, - "pet_id": { - "type": "integer", - "format": "int32", - "nullable": true - }, - "tag_id": { - "type": "integer", - "format": "int32", - "nullable": true - }, - "device_id": { - "type": "integer", - "format": "int32", - "nullable": true - }, - "user_id": { - "type": "integer", - "format": "int32", - "nullable": true - }, - "where": { - "type": "integer", - "format": "int32", - "nullable": true - }, - "since": { - "type": "string", - "format": "date-time", - "nullable": true - } - }, - "additionalProperties": false - }, - "PetPositionResourceDataResponse": { - "type": "object", - "properties": { - "data": { - "$ref": "#/components/schemas/PetPositionResource" - } - }, - "additionalProperties": false - }, - "PetPositionResourcePaginatedDataResult": { - "type": "object", - "properties": { - "data": { - "type": "array", - "items": { - "$ref": "#/components/schemas/PetPositionResource" - }, - "nullable": true - }, - "meta": { - "$ref": "#/components/schemas/PaginatedMetaDataResult" - } - }, - "additionalProperties": false - }, - "PetResource": { - "type": "object", - "properties": { - "id": { - "type": "integer", - "format": "int32" - }, - "name": { - "type": "string", - "nullable": true - }, - "gender": { - "$ref": "#/components/schemas/PetGenderEnum" - }, - "date_of_birth": { - "type": "string", - "format": "date-time", - "nullable": true - }, - "weight": { - "type": "string", - "nullable": true - }, - "comments": { - "type": "string", - "nullable": true - }, - "breed_id": { - "type": "integer", - "format": "int32", - "nullable": true - }, - "breed_id2": { - "type": "integer", - "format": "int32", - "nullable": true - }, - "food_type_id": { - "type": "integer", - "format": "int32", - "nullable": true - }, - "household_id": { - "type": "integer", - "format": "int32", - "nullable": true - }, - "photo_id": { - "type": "integer", - "format": "int32", - "nullable": true - }, - "species_id": { - "type": "integer", - "format": "int32", - "nullable": true - }, - "spayed": { - "$ref": "#/components/schemas/SpayedEnum" - }, - "tag_id": { - "type": "integer", - "format": "int32", - "nullable": true - }, - "version": { - "type": "integer", - "format": "int32" - }, - "created_at": { - "type": "string", - "format": "date-time", - "nullable": true - }, - "updated_at": { - "type": "string", - "format": "date-time", - "nullable": true - }, - "deleted_at": { - "type": "string", - "format": "date-time", - "nullable": true - }, - "photo": { - "$ref": "#/components/schemas/PhotoResource" - }, - "conditions": { - "type": "array", - "items": { - "$ref": "#/components/schemas/PetConditionResource" - }, - "nullable": true - }, - "tag": { - "$ref": "#/components/schemas/TagResource" - }, - "status": { - "$ref": "#/components/schemas/PetStatusResource" - }, - "position": { - "$ref": "#/components/schemas/PetPositionResource" - } - }, - "additionalProperties": false - }, - "PetResourceDataResponse": { - "type": "object", - "properties": { - "data": { - "$ref": "#/components/schemas/PetResource" - } - }, - "additionalProperties": false - }, - "PetResourcePaginatedDataResult": { - "type": "object", - "properties": { - "data": { - "type": "array", - "items": { - "$ref": "#/components/schemas/PetResource" - }, - "nullable": true - }, - "meta": { - "$ref": "#/components/schemas/PaginatedMetaDataResult" - } - }, - "additionalProperties": false - }, - "PetStatusResource": { - "type": "object", - "properties": { - "pet_id": { - "type": "integer", - "format": "int32", - "nullable": true - }, - "activity": { - "$ref": "#/components/schemas/PetPositionResource" - }, - "feeding": { - "$ref": "#/components/schemas/PetConsumptionStatusResource" - }, - "drinking": { - "$ref": "#/components/schemas/PetConsumptionStatusResource" - } - }, - "additionalProperties": false - }, - "PetStatusResourceDataResponse": { - "type": "object", - "properties": { - "data": { - "$ref": "#/components/schemas/PetStatusResource" - } - }, - "additionalProperties": false - }, - "PetStatusResourcePaginatedDataResult": { - "type": "object", - "properties": { - "data": { - "type": "array", - "items": { - "$ref": "#/components/schemas/PetStatusResource" - }, - "nullable": true - }, - "meta": { - "$ref": "#/components/schemas/PaginatedMetaDataResult" - } - }, - "additionalProperties": false - }, - "PhotoResource": { - "type": "object", - "properties": { - "id": { - "type": "integer", - "format": "int32" - }, - "title": { - "type": "string", - "nullable": true - }, - "location": { - "type": "string", - "nullable": true - }, - "hash": { - "type": "string", - "nullable": true - }, - "uploading_user_id": { - "type": "integer", - "format": "int32" - }, - "version": { - "type": "integer", - "format": "int32" - }, - "created_at": { - "type": "string", - "format": "date-time", - "nullable": true - }, - "updated_at": { - "type": "string", - "format": "date-time", - "nullable": true - } - }, - "additionalProperties": false - }, - "PhotoResourceDataResponse": { - "type": "object", - "properties": { - "data": { - "$ref": "#/components/schemas/PhotoResource" - } - }, - "additionalProperties": false - }, - "PhotoResourcePaginatedDataResult": { - "type": "object", - "properties": { - "data": { - "type": "array", - "items": { - "$ref": "#/components/schemas/PhotoResource" - }, - "nullable": true - }, - "meta": { - "$ref": "#/components/schemas/PaginatedMetaDataResult" - } - }, - "additionalProperties": false - }, - "ProblemDetails": { - "type": "object", - "properties": { - "type": { - "type": "string", - "nullable": true - }, - "title": { - "type": "string", - "nullable": true - }, - "status": { - "type": "integer", - "format": "int32", - "nullable": true - }, - "detail": { - "type": "string", - "nullable": true - }, - "instance": { - "type": "string", - "nullable": true - } - }, - "additionalProperties": { } - }, - "ProductQueryResource": { - "type": "object", - "properties": { - "page": { - "type": "integer", - "format": "int32" - }, - "items_per_page": { - "type": "integer", - "format": "int32" - }, - "page_size": { - "type": "integer", - "format": "int32" - }, - "lang": { - "type": "string", - "nullable": true - } - }, - "additionalProperties": false - }, - "ProductResource": { - "type": "object", - "properties": { - "id": { - "type": "integer", - "format": "int32" - }, - "name": { - "type": "string", - "nullable": true - }, - "version": { - "type": "integer", - "format": "int32" - }, - "created_at": { - "type": "string", - "format": "date-time", - "nullable": true - }, - "updated_at": { - "type": "string", - "format": "date-time", - "nullable": true - } - }, - "additionalProperties": false - }, - "ProductResourceDataResponse": { - "type": "object", - "properties": { - "data": { - "$ref": "#/components/schemas/ProductResource" - } - }, - "additionalProperties": false - }, - "ProductResourcePaginatedDataResult": { - "type": "object", - "properties": { - "data": { - "type": "array", - "items": { - "$ref": "#/components/schemas/ProductResource" - }, - "nullable": true - }, - "meta": { - "$ref": "#/components/schemas/PaginatedMetaDataResult" - } - }, - "additionalProperties": false - }, - "PublicUserResource": { - "type": "object", - "properties": { - "id": { - "type": "integer", - "format": "int32" - }, - "name": { - "type": "string", - "nullable": true - }, - "photo_id": { - "type": "integer", - "format": "int32", - "nullable": true - }, - "photo": { - "$ref": "#/components/schemas/PhotoResource" - } - }, - "additionalProperties": false - }, - "PublicUserResourceDataResponse": { - "type": "object", - "properties": { - "data": { - "$ref": "#/components/schemas/PublicUserResource" - } - }, - "additionalProperties": false - }, - "ReportHouseholdDrinkingDataPoint": { - "type": "object", - "properties": { - "datapoints": { - "type": "array", - "items": { - "$ref": "#/components/schemas/ReportHouseholdDrinkingResource" - }, - "nullable": true - } - }, - "additionalProperties": false - }, - "ReportHouseholdDrinkingResource": { - "type": "object", - "properties": { - "from": { - "type": "string", - "format": "date-time", - "nullable": true - }, - "to": { - "type": "string", - "format": "date-time", - "nullable": true - }, - "duration": { - "type": "integer", - "format": "int32", - "nullable": true - }, - "context": { - "type": "integer", - "format": "int32", - "nullable": true - }, - "bowl_count": { - "type": "integer", - "format": "int32", - "nullable": true - }, - "device_id": { - "type": "integer", - "format": "int32", - "nullable": true - }, - "weights": { - "type": "array", - "items": { - "$ref": "#/components/schemas/ReportWeightFrame" - }, - "nullable": true - }, - "actual_weight": { - "type": "number", - "format": "double", - "nullable": true - }, - "entry_user_id": { - "type": "integer", - "format": "int32", - "nullable": true - }, - "exit_user_id": { - "type": "integer", - "format": "int32", - "nullable": true - }, - "created_at": { - "type": "string", - "format": "date-time", - "nullable": true - }, - "updated_at": { - "type": "string", - "format": "date-time", - "nullable": true - }, - "deleted_at": { - "type": "string", - "format": "date-time", - "nullable": true - }, - "tag_id": { - "type": "integer", - "format": "int32", - "nullable": true - }, - "user_id": { - "type": "integer", - "format": "int32", - "nullable": true - } - }, - "additionalProperties": false - }, - "ReportHouseholdFeedingDataPoint": { - "type": "object", - "properties": { - "datapoints": { - "type": "array", - "items": { - "$ref": "#/components/schemas/ReportHouseholdFeedingResource" - }, - "nullable": true - } - }, - "additionalProperties": false - }, - "ReportHouseholdFeedingResource": { - "type": "object", - "properties": { - "from": { - "type": "string", - "format": "date-time", - "nullable": true - }, - "to": { - "type": "string", - "format": "date-time", - "nullable": true - }, - "duration": { - "type": "integer", - "format": "int32", - "nullable": true - }, - "context": { - "type": "integer", - "format": "int32", - "nullable": true - }, - "bowl_count": { - "type": "integer", - "format": "int32", - "nullable": true - }, - "device_id": { - "type": "integer", - "format": "int32", - "nullable": true - }, - "weights": { - "type": "array", - "items": { - "$ref": "#/components/schemas/ReportWeightFrame" - }, - "nullable": true - }, - "actual_weight": { - "type": "number", - "format": "double", - "nullable": true - }, - "entry_user_id": { - "type": "integer", - "format": "int32", - "nullable": true - }, - "exit_user_id": { - "type": "integer", - "format": "int32", - "nullable": true - }, - "created_at": { - "type": "string", - "format": "date-time", - "nullable": true - }, - "updated_at": { - "type": "string", - "format": "date-time", - "nullable": true - }, - "deleted_at": { - "type": "string", - "format": "date-time", - "nullable": true - }, - "tag_id": { - "type": "integer", - "format": "int32", - "nullable": true - }, - "user_id": { - "type": "integer", - "format": "int32", - "nullable": true - } - }, - "additionalProperties": false - }, - "ReportHouseholdMovementDataPoint": { - "type": "object", - "properties": { - "datapoints": { - "type": "array", - "items": { - "$ref": "#/components/schemas/ReportHouseholdMovementResource" - }, - "nullable": true - } - }, - "additionalProperties": false - }, - "ReportHouseholdMovementResource": { - "type": "object", - "properties": { - "created_at": { - "type": "string", - "format": "date-time", - "nullable": true - }, - "updated_at": { - "type": "string", - "format": "date-time", - "nullable": true - }, - "deleted_at": { - "type": "string", - "format": "date-time", - "nullable": true - }, - "device_id": { - "type": "integer", - "format": "int32", - "nullable": true - }, - "tag_id": { - "type": "integer", - "format": "int32", - "nullable": true - }, - "user_id": { - "type": "integer", - "format": "int32", - "nullable": true - }, - "from": { - "type": "string", - "format": "date-time", - "nullable": true - }, - "to": { - "type": "string", - "format": "date-time", - "nullable": true - }, - "duration": { - "type": "integer", - "format": "int32", - "nullable": true - }, - "entry_device_id": { - "type": "integer", - "format": "int32", - "nullable": true - }, - "entry_user_id": { - "type": "integer", - "format": "int32", - "nullable": true - }, - "exit_device_id": { - "type": "integer", - "format": "int32", - "nullable": true - }, - "exit_user_id": { - "type": "integer", - "format": "int32", - "nullable": true - }, - "active": { - "type": "boolean", - "nullable": true - }, - "exit_movement_id": { - "type": "integer", - "format": "int64" - }, - "entry_movement_id": { - "type": "integer", - "format": "int64" - } - }, - "additionalProperties": false - }, - "ReportHouseholdQueryResource": { - "type": "object", - "properties": { - "from": { - "type": "string", - "format": "date-time", - "nullable": true - }, - "to": { - "type": "string", - "format": "date-time", - "nullable": true - } - }, - "additionalProperties": false - }, - "ReportHouseholdResource": { - "type": "object", - "properties": { - "pet_id": { - "type": "integer", - "format": "int32", - "nullable": true - }, - "device_id": { - "type": "integer", - "format": "int32", - "nullable": true - }, - "movement": { - "$ref": "#/components/schemas/ReportHouseholdMovementDataPoint" - }, - "feeding": { - "$ref": "#/components/schemas/ReportHouseholdFeedingDataPoint" - }, - "drinking": { - "$ref": "#/components/schemas/ReportHouseholdDrinkingDataPoint" - }, - "consumption_habit": { - "type": "array", - "items": { - "$ref": "#/components/schemas/ConsumptionHabitResource" - }, - "nullable": true - }, - "consumption_alert": { - "type": "array", - "items": { - "$ref": "#/components/schemas/ConsumptionAlertResource" - }, - "nullable": true - } - }, - "additionalProperties": false - }, - "ReportHouseholdResourceDataResponse": { - "type": "object", - "properties": { - "data": { - "$ref": "#/components/schemas/ReportHouseholdResource" - } - }, - "additionalProperties": false - }, - "ReportHouseholdResourceListDataResponse": { - "type": "object", - "properties": { - "data": { - "type": "array", - "items": { - "$ref": "#/components/schemas/ReportHouseholdResource" - }, - "nullable": true - } - }, - "additionalProperties": false - }, - "ReportWeightFrame": { - "type": "object", - "properties": { - "index": { - "type": "integer", - "format": "int32", - "nullable": true - }, - "weight": { - "type": "number", - "format": "double" - }, - "change": { - "type": "number", - "format": "double" - }, - "food_type_id": { - "type": "integer", - "format": "int32", - "nullable": true - }, - "target_weight": { - "type": "integer", - "format": "int32", - "nullable": true - }, - "multi": { - "type": "boolean", - "nullable": true - } - }, - "additionalProperties": false - }, - "RequestChangeStateResponseStatus": { - "enum": [ - 0, - 1, - 2, - 3, - 4, - 5 - ], - "type": "integer", - "format": "int32" - }, - "SpayedEnum": { - "enum": [ - 0, - 1, - 2 - ], - "type": "integer", - "format": "int32" - }, - "SpecialProfiles": { - "enum": [ - 0, - 1, - 2, - 3, - 4, - 5, - 6 - ], - "type": "integer", - "format": "int32" - }, - "SpeciesQueryResource": { - "type": "object", - "properties": { - "page": { - "type": "integer", - "format": "int32" - }, - "items_per_page": { - "type": "integer", - "format": "int32" - }, - "page_size": { - "type": "integer", - "format": "int32" - }, - "lang": { - "type": "string", - "nullable": true - } - }, - "additionalProperties": false - }, - "SpeciesResource": { - "type": "object", - "properties": { - "id": { - "type": "integer", - "format": "int32" - }, - "name": { - "type": "string", - "nullable": true - }, - "version": { - "type": "integer", - "format": "int32" - }, - "created_at": { - "type": "string", - "format": "date-time", - "nullable": true - }, - "updated_at": { - "type": "string", - "format": "date-time", - "nullable": true - } - }, - "additionalProperties": false - }, - "SpeciesResourceDataResponse": { - "type": "object", - "properties": { - "data": { - "$ref": "#/components/schemas/SpeciesResource" - } - }, - "additionalProperties": false - }, - "SpeciesResourcePaginatedDataResult": { - "type": "object", - "properties": { - "data": { - "type": "array", - "items": { - "$ref": "#/components/schemas/SpeciesResource" - }, - "nullable": true - }, - "meta": { - "$ref": "#/components/schemas/PaginatedMetaDataResult" - } - }, - "additionalProperties": false - }, - "StartQueryResource": { - "type": "object", - "properties": { - "lang": { - "type": "string", - "nullable": true - } - }, - "additionalProperties": false - }, - "StartResource": { - "type": "object", - "properties": { - "breed": { - "type": "array", - "items": { - "$ref": "#/components/schemas/BreedResource" - }, - "nullable": true - }, - "condition": { - "type": "array", - "items": { - "$ref": "#/components/schemas/ConditionResource" - }, - "nullable": true - }, - "country": { - "type": "array", - "items": { - "$ref": "#/components/schemas/CountryResource" - }, - "nullable": true - }, - "language": { - "type": "array", - "items": { - "$ref": "#/components/schemas/LanguageResource" - }, - "nullable": true - }, - "product": { - "type": "array", - "items": { - "$ref": "#/components/schemas/ProductResource" - }, - "nullable": true - }, - "timezone": { - "type": "array", - "items": { - "$ref": "#/components/schemas/TimezoneResource" - }, - "nullable": true - } - }, - "additionalProperties": false - }, - "StartResourceDataResponse": { - "type": "object", - "properties": { - "data": { - "$ref": "#/components/schemas/StartResource" - } - }, - "additionalProperties": false - }, - "SubstanceTypesEnum": { - "enum": [ - 0, - 1, - 2 - ], - "type": "integer", - "format": "int32" - }, - "TagDeviceResource": { - "type": "object", - "properties": { - "id": { - "type": "integer", - "format": "int32" - }, - "index": { - "type": "integer", - "format": "int32" - }, - "profile": { - "type": "integer", - "format": "int32", - "nullable": true - }, - "version": { - "type": "integer", - "format": "int32" - }, - "created_at": { - "type": "string", - "format": "date-time", - "nullable": true - }, - "updated_at": { - "type": "string", - "format": "date-time", - "nullable": true - } - }, - "additionalProperties": false - }, - "TagDeviceResourceDataResponse": { - "type": "object", - "properties": { - "data": { - "$ref": "#/components/schemas/TagDeviceResource" - } - }, - "additionalProperties": false - }, - "TagDeviceResourcePaginatedDataResult": { - "type": "object", - "properties": { - "data": { - "type": "array", - "items": { - "$ref": "#/components/schemas/TagDeviceResource" - }, - "nullable": true - }, - "meta": { - "$ref": "#/components/schemas/PaginatedMetaDataResult" - } - }, - "additionalProperties": false - }, - "TagResource": { - "type": "object", - "properties": { - "id": { - "type": "integer", - "format": "int32" - }, - "tag": { - "type": "string", - "nullable": true - }, - "supported_product_ids": { - "type": "array", - "items": { - "$ref": "#/components/schemas/DeviceType" - }, - "description": "List of device types that can potentially use this tag.\r\nIncludes devices that support the tag natively or through manual learning/training.\r\nDoes not include devices with hardware restrictions that make them incompatible.", - "nullable": true - }, - "incompatible_product_ids": { - "type": "array", - "items": { - "$ref": "#/components/schemas/DeviceType" - }, - "description": "List of device types that cannot use this tag due to hardware limitations.\r\nFor example, DualScanPetDoor only supports FDX-B tags due to hardware constraints,\r\nso all non-FDX-B tags will include DualScanPetDoor in this list.\r\nThese restrictions cannot be overcome through manual learning or configuration.", - "nullable": true - }, - "version": { - "type": "integer", - "format": "int32" - }, - "created_at": { - "type": "string", - "format": "date-time", - "nullable": true - }, - "updated_at": { - "type": "string", - "format": "date-time", - "nullable": true - }, - "deleted_at": { - "type": "string", - "format": "date-time", - "nullable": true - } - }, - "additionalProperties": false - }, - "TagResourceDataResponse": { - "type": "object", - "properties": { - "data": { - "$ref": "#/components/schemas/TagResource" - } - }, - "additionalProperties": false - }, - "TagResourcePaginatedDataResult": { - "type": "object", - "properties": { - "data": { - "type": "array", - "items": { - "$ref": "#/components/schemas/TagResource" - }, - "nullable": true - }, - "meta": { - "$ref": "#/components/schemas/PaginatedMetaDataResult" - } - }, - "additionalProperties": false - }, - "TimelineEventType": { - "enum": [ - 0, - 1, - 2, - 3, - 6, - 7, - 9, - 10, - 11, - 12, - 13, - 14, - 17, - 18, - 19, - 20, - 21, - 22, - 23, - 24, - 25, - 28, - 29, - 30, - 31, - 32, - 33, - 34, - 35, - 36, - 40, - 50, - 51, - 52, - 53, - 54, - 55, - 9999, - 19999, - 20000, - 20001, - 20002, - 20003, - 20004, - 20005, - 20006, - 20007, - 20008, - 20009, - 20010, - 20011, - 20012, - 20399, - 20400, - 20401, - 20402, - 20403, - 20404, - 20405, - 20406, - 20407, - 20408, - 20409, - 20410, - 20411, - 20999, - 21000, - 21001, - 21002, - 21003, - 21004, - 21005, - 21006, - 21007, - 21008, - 21009, - 21010, - 21011, - 21012, - 21013, - 21014, - 21015, - 21016, - 21017, - 21018, - 21019, - 21020, - 21999, - 23000, - 23001, - 23002, - 23003, - 23004, - 23005, - 23006, - 23999, - 24999, - 26999, - 28999, - 30000, - 30001, - 30002 - ], - "type": "integer", - "format": "int32" - }, - "TimelineResource": { - "type": "object", - "properties": { - "id": { - "type": "integer", - "format": "int64" - }, - "type": { - "type": "integer", - "format": "int32" - }, - "data": { - "type": "string", - "nullable": true - }, - "created_at": { - "type": "string", - "format": "date-time", - "nullable": true - }, - "updated_at": { - "type": "string", - "format": "date-time", - "nullable": true - }, - "households": { - "type": "array", - "items": { - "$ref": "#/components/schemas/HouseholdResource" - }, - "nullable": true - }, - "devices": { - "type": "array", - "items": { - "$ref": "#/components/schemas/DeviceResource" - }, - "nullable": true - }, - "movements": { - "type": "array", - "items": { - "$ref": "#/components/schemas/MovementResource" - }, - "nullable": true - }, - "pets": { - "type": "array", - "items": { - "$ref": "#/components/schemas/PetResource" - }, - "nullable": true - }, - "tags": { - "type": "array", - "items": { - "$ref": "#/components/schemas/TagResource" - }, - "nullable": true - }, - "users": { - "type": "array", - "items": { - "$ref": "#/components/schemas/PublicUserResource" - }, - "nullable": true - }, - "weights": { - "type": "array", - "items": { - "$ref": "#/components/schemas/WeightResource" - }, - "nullable": true - } - }, - "additionalProperties": false - }, - "TimelineResourcePaginatedDataResult": { - "type": "object", - "properties": { - "data": { - "type": "array", - "items": { - "$ref": "#/components/schemas/TimelineResource" - }, - "nullable": true - }, - "meta": { - "$ref": "#/components/schemas/PaginatedMetaDataResult" - } - }, - "additionalProperties": false - }, - "TimezoneResource": { - "type": "object", - "properties": { - "id": { - "type": "integer", - "format": "int32" - }, - "name": { - "type": "string", - "nullable": true - }, - "timezone": { - "type": "string", - "nullable": true - }, - "utc_offset": { - "type": "integer", - "format": "int32" - }, - "created_at": { - "type": "string", - "format": "date-time", - "nullable": true - }, - "updated_at": { - "type": "string", - "format": "date-time", - "nullable": true - } - }, - "additionalProperties": false - }, - "TimezoneResourceDataResponse": { - "type": "object", - "properties": { - "data": { - "$ref": "#/components/schemas/TimezoneResource" - } - }, - "additionalProperties": false - }, - "TimezoneResourcePaginatedDataResult": { - "type": "object", - "properties": { - "data": { - "type": "array", - "items": { - "$ref": "#/components/schemas/TimezoneResource" - }, - "nullable": true - }, - "meta": { - "$ref": "#/components/schemas/PaginatedMetaDataResult" - } - }, - "additionalProperties": false - }, - "UpdateDeviceResource": { - "required": [ - "name" - ], - "type": "object", - "properties": { - "name": { - "maxLength": 50, - "minLength": 1, - "type": "string" - } - }, - "additionalProperties": false - }, - "UpdateDeviceTagResource": { - "type": "object", - "properties": { - "profile": { - "$ref": "#/components/schemas/SpecialProfiles" - } - }, - "additionalProperties": false - }, - "UpdateHouseholdInviteResource": { - "type": "object", - "properties": { - "owner": { - "type": "boolean", - "nullable": true - }, - "write": { - "type": "boolean", - "nullable": true - } - }, - "additionalProperties": false - }, - "UpdateHouseholdResource": { - "type": "object", - "properties": { - "name": { - "type": "string", - "nullable": true - }, - "timezone_id": { - "type": "integer", - "format": "int32", - "nullable": true - } - }, - "additionalProperties": false - }, - "UpdateHouseholdUserResource": { - "type": "object", - "properties": { - "owner": { - "type": "boolean", - "nullable": true - }, - "write": { - "type": "boolean", - "nullable": true - } - }, - "additionalProperties": false - }, - "UpdateMeResource": { - "type": "object", - "properties": { - "email_address": { - "type": "string", - "format": "email", - "nullable": true - }, - "first_name": { - "type": "string", - "nullable": true - }, - "last_name": { - "type": "string", - "nullable": true - }, - "language_id": { - "type": "integer", - "format": "int32", - "nullable": true - }, - "country_id": { - "type": "integer", - "format": "int32", - "nullable": true - }, - "photo_id": { - "type": "integer", - "format": "int32", - "nullable": true - }, - "marketing_opt_in": { - "type": "boolean", - "nullable": true - }, - "weight_units": { - "$ref": "#/components/schemas/UserWeightUnitEnum" - }, - "time_format": { - "$ref": "#/components/schemas/UserTimeFormatEnum" - }, - "notifications": { - "type": "object", - "additionalProperties": { - "type": "boolean" - }, - "nullable": true - }, - "password": { - "type": "string", - "nullable": true - } - }, - "additionalProperties": false - }, - "UpdatePetResource": { - "required": [ - "name" - ], - "type": "object", - "properties": { - "name": { - "maxLength": 50, - "minLength": 1, - "type": "string" - }, - "gender": { - "$ref": "#/components/schemas/PetGenderEnum" - }, - "date_of_birth": { - "type": "string", - "format": "date-time", - "nullable": true - }, - "weight": { - "maximum": 2147483647, - "minimum": 0, - "exclusiveMinimum": true, - "type": "number", - "format": "double", - "nullable": true - }, - "comments": { - "maxLength": 200, - "type": "string", - "nullable": true - }, - "breed_id": { - "type": "integer", - "format": "int32", - "nullable": true - }, - "breed_id2": { - "type": "integer", - "format": "int32", - "nullable": true - }, - "spayed": { - "$ref": "#/components/schemas/SpayedEnum" - }, - "food_type_id": { - "type": "integer", - "format": "int32", - "nullable": true - }, - "photo_id": { - "type": "integer", - "format": "int32", - "nullable": true - }, - "species_id": { - "type": "integer", - "format": "int32", - "nullable": true - }, - "conditions": { - "type": "array", - "items": { - "$ref": "#/components/schemas/ConditionResource" - }, - "nullable": true - } - }, - "additionalProperties": false - }, - "UpdatePhotoResource": { - "type": "object", - "properties": { - "title": { - "type": "string", - "nullable": true - } - }, - "additionalProperties": false - }, - "UpdateUserSettingsResource": { - "required": [ - "value" - ], - "type": "object", - "properties": { - "value": { - "minLength": 1, - "type": "string" - } - }, - "additionalProperties": false - }, - "UserClientPlatformAppResource": { - "type": "object", - "properties": { - "bundle_identifier": { - "type": "string", - "nullable": true - }, - "version": { - "type": "string", - "nullable": true - } - }, - "additionalProperties": false - }, - "UserClientPlatformDeviceModelResource": { - "type": "object", - "properties": { - "name": { - "type": "string", - "nullable": true - }, - "manufacturer": { - "type": "string", - "nullable": true - }, - "version": { - "type": "string", - "nullable": true - } - }, - "additionalProperties": false - }, - "UserClientPlatformDeviceOsResource": { - "type": "object", - "properties": { - "platform": { - "type": "string", - "nullable": true - }, - "version": { - "type": "string", - "nullable": true - } - }, - "additionalProperties": false - }, - "UserClientPlatformDeviceResource": { - "type": "object", - "properties": { - "name": { - "type": "string", - "nullable": true - }, - "model": { - "$ref": "#/components/schemas/UserClientPlatformDeviceModelResource" - }, - "uuid": { - "type": "string", - "nullable": true - }, - "os": { - "$ref": "#/components/schemas/UserClientPlatformDeviceOsResource" - } - }, - "additionalProperties": false - }, - "UserClientPlatformLocaleResource": { - "type": "object", - "properties": { - "language": { - "type": "string", - "nullable": true - }, - "country": { - "type": "string", - "nullable": true - } - }, - "additionalProperties": false - }, - "UserClientPlatformResource": { - "type": "object", - "properties": { - "app": { - "$ref": "#/components/schemas/UserClientPlatformAppResource" - }, - "device": { - "$ref": "#/components/schemas/UserClientPlatformDeviceResource" - }, - "locale": { - "$ref": "#/components/schemas/UserClientPlatformLocaleResource" - } - }, - "additionalProperties": false - }, - "UserClientResource": { - "type": "object", - "properties": { - "platform": { - "$ref": "#/components/schemas/UserClientPlatformResource" - }, - "token": { - "type": "string", - "nullable": true - } - }, - "additionalProperties": false - }, - "UserClientResourceDataResponse": { - "type": "object", - "properties": { - "data": { - "$ref": "#/components/schemas/UserClientResource" - } - }, - "additionalProperties": false - }, - "UserClientResourcePaginatedDataResult": { - "type": "object", - "properties": { - "data": { - "type": "array", - "items": { - "$ref": "#/components/schemas/UserClientResource" - }, - "nullable": true - }, - "meta": { - "$ref": "#/components/schemas/PaginatedMetaDataResult" - } - }, - "additionalProperties": false - }, - "UserResource": { - "type": "object", - "properties": { - "id": { - "type": "integer", - "format": "int32" - }, - "email_address": { - "type": "string", - "nullable": true - }, - "first_name": { - "type": "string", - "nullable": true - }, - "last_name": { - "type": "string", - "nullable": true - }, - "country_id": { - "type": "integer", - "format": "int32", - "nullable": true - }, - "language_id": { - "type": "integer", - "format": "int32", - "nullable": true - }, - "photo_id": { - "type": "integer", - "format": "int32", - "nullable": true - }, - "marketing_opt_in": { - "type": "boolean", - "nullable": true - }, - "terms_accepted": { - "type": "string", - "format": "date-time", - "nullable": true - }, - "weight_units": { - "type": "integer", - "format": "int32", - "nullable": true - }, - "time_format": { - "type": "integer", - "format": "int32", - "nullable": true - }, - "notifications": { - "type": "object", - "additionalProperties": { - "type": "boolean" - }, - "nullable": true - }, - "photo": { - "$ref": "#/components/schemas/PhotoResource" - }, - "version": { - "type": "integer", - "format": "int32" - }, - "created_at": { - "type": "string", - "format": "date-time", - "nullable": true - }, - "updated_at": { - "type": "string", - "format": "date-time", - "nullable": true - }, - "use_colour": { - "type": "string", - "nullable": true - } - }, - "additionalProperties": false - }, - "UserResourceDataResponse": { - "type": "object", - "properties": { - "data": { - "$ref": "#/components/schemas/UserResource" - } - }, - "additionalProperties": false - }, - "UserSettingResource": { - "type": "object", - "properties": { - "id": { - "type": "integer", - "format": "int32" - }, - "user_id": { - "type": "integer", - "format": "int32", - "nullable": true - }, - "key": { - "type": "string", - "nullable": true - }, - "value": { - "type": "string", - "nullable": true - }, - "version": { - "type": "integer", - "format": "int32" - }, - "created_at": { - "type": "string", - "format": "date-time", - "nullable": true - }, - "updated_at": { - "type": "string", - "format": "date-time", - "nullable": true - } - }, - "additionalProperties": false - }, - "UserSettingResourceDataResponse": { - "type": "object", - "properties": { - "data": { - "$ref": "#/components/schemas/UserSettingResource" - } - }, - "additionalProperties": false - }, - "UserSettingResourcePaginatedDataResult": { - "type": "object", - "properties": { - "data": { - "type": "array", - "items": { - "$ref": "#/components/schemas/UserSettingResource" - }, - "nullable": true - }, - "meta": { - "$ref": "#/components/schemas/PaginatedMetaDataResult" - } - }, - "additionalProperties": false - }, - "UserTimeFormatEnum": { - "enum": [ - 0, - 1 - ], - "type": "integer", - "format": "int32" - }, - "UserWeightUnitEnum": { - "enum": [ - 0, - 1 - ], - "type": "integer", - "format": "int32" - }, - "WeightFrameResource": { - "type": "object", - "properties": { - "id": { - "type": "integer", - "format": "int32" - }, - "index": { - "type": "integer", - "format": "int32", - "nullable": true - }, - "current_weight": { - "type": "number", - "format": "float" - }, - "change": { - "type": "number", - "format": "float" - }, - "created_at": { - "type": "string", - "format": "date-time", - "nullable": true - }, - "updated_at": { - "type": "string", - "format": "date-time", - "nullable": true - } - }, - "additionalProperties": false - }, - "WeightResource": { - "type": "object", - "properties": { - "id": { - "type": "integer", - "format": "int64" - }, - "device_id": { - "type": "integer", - "format": "int32", - "nullable": true - }, - "tag_id": { - "type": "integer", - "format": "int32", - "nullable": true - }, - "context": { - "type": "integer", - "format": "int32", - "nullable": true - }, - "duration": { - "type": "integer", - "format": "int32", - "nullable": true - }, - "created_at": { - "type": "string", - "format": "date-time", - "nullable": true - }, - "updated_at": { - "type": "string", - "format": "date-time", - "nullable": true - }, - "frames": { - "type": "array", - "items": { - "$ref": "#/components/schemas/WeightFrameResource" - }, - "nullable": true - } - }, - "additionalProperties": false - } - } - } -} \ No newline at end of file diff --git a/resources/swagger_v2.json b/resources/swagger_v2.json deleted file mode 100644 index 622cd18..0000000 --- a/resources/swagger_v2.json +++ /dev/null @@ -1,3427 +0,0 @@ -{ - "openapi": "3.0.1", - "info": { - "title": "App API" - }, - "paths": { - "/api/v2/product/6/device/{deviceId}/control": { - "get": { - "tags": [ - "DeviceControlDualScanConnect" - ], - "summary": "Will return the current state for a device and any inflight state changes", - "parameters": [ - { - "name": "deviceId", - "in": "path", - "required": true, - "schema": { - "type": "integer", - "format": "int32" - } - } - ], - "responses": { - "200": { - "description": "OK", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/DeviceControlDualScanResourceV2DeviceControlResource" - } - } - } - }, - "400": { - "description": "Bad Request", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ErrorResource" - } - } - } - }, - "403": { - "description": "Forbidden", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ProblemDetails" - } - } - } - }, - "404": { - "description": "Not Found", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ErrorResource" - } - } - } - }, - "422": { - "description": "Unprocessable Content", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ErrorResource" - } - } - } - }, - "500": { - "description": "Internal Server Error" - } - } - } - }, - "/api/v2/product/6/device/{deviceId}/control/async": { - "put": { - "tags": [ - "DeviceControlDualScanConnect" - ], - "summary": "Queue a state change, the returned request_id can then be tracked in api/device/{deviceId}/control/status", - "parameters": [ - { - "name": "deviceId", - "in": "path", - "required": true, - "schema": { - "type": "integer", - "format": "int32" - } - } - ], - "requestBody": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/DeviceControlDualScanResourceV2" - } - }, - "text/json": { - "schema": { - "$ref": "#/components/schemas/DeviceControlDualScanResourceV2" - } - }, - "application/*+json": { - "schema": { - "$ref": "#/components/schemas/DeviceControlDualScanResourceV2" - } - } - } - }, - "responses": { - "200": { - "description": "OK", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/DeviceControlDualScanResourceV2DeviceControlResource" - } - } - } - }, - "400": { - "description": "Bad Request", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ErrorResource" - } - } - } - }, - "403": { - "description": "Forbidden", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ProblemDetails" - } - } - } - }, - "404": { - "description": "Not Found", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ErrorResource" - } - } - } - }, - "422": { - "description": "Unprocessable Content", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ErrorResource" - } - } - } - }, - "500": { - "description": "Internal Server Error" - } - } - } - }, - "/api/v2/product/10/device/{deviceId}/control": { - "get": { - "tags": [ - "DeviceControlDualScanPetDoor" - ], - "summary": "Will return the current state for a device and any inflight state changes", - "parameters": [ - { - "name": "deviceId", - "in": "path", - "required": true, - "schema": { - "type": "integer", - "format": "int32" - } - } - ], - "responses": { - "200": { - "description": "OK", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/DeviceControlDualScanPetDoorResourceV2DeviceControlResource" - } - } - } - }, - "400": { - "description": "Bad Request", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ErrorResource" - } - } - } - }, - "403": { - "description": "Forbidden", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ProblemDetails" - } - } - } - }, - "404": { - "description": "Not Found", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ErrorResource" - } - } - } - }, - "422": { - "description": "Unprocessable Content", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ErrorResource" - } - } - } - }, - "500": { - "description": "Internal Server Error" - } - } - } - }, - "/api/v2/product/10/device/{deviceId}/control/async": { - "put": { - "tags": [ - "DeviceControlDualScanPetDoor" - ], - "summary": "Queue a state change, the returned request_id can then be tracked in api/device/{deviceId}/control/status", - "parameters": [ - { - "name": "deviceId", - "in": "path", - "required": true, - "schema": { - "type": "integer", - "format": "int32" - } - } - ], - "requestBody": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/DeviceControlDualScanPetDoorResourceV2" - } - }, - "text/json": { - "schema": { - "$ref": "#/components/schemas/DeviceControlDualScanPetDoorResourceV2" - } - }, - "application/*+json": { - "schema": { - "$ref": "#/components/schemas/DeviceControlDualScanPetDoorResourceV2" - } - } - } - }, - "responses": { - "200": { - "description": "OK", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/DeviceControlDualScanPetDoorResourceV2DeviceControlResource" - } - } - } - }, - "400": { - "description": "Bad Request", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ErrorResource" - } - } - } - }, - "403": { - "description": "Forbidden", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ProblemDetails" - } - } - } - }, - "404": { - "description": "Not Found", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ErrorResource" - } - } - } - }, - "422": { - "description": "Unprocessable Content", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ErrorResource" - } - } - } - }, - "500": { - "description": "Internal Server Error" - } - } - } - }, - "/api/v2/product/4/device/{deviceId}/control": { - "get": { - "tags": [ - "DeviceControlFeederConnect" - ], - "summary": "Will return the current state for a device and any inflight state changes", - "parameters": [ - { - "name": "deviceId", - "in": "path", - "required": true, - "schema": { - "type": "integer", - "format": "int32" - } - } - ], - "responses": { - "200": { - "description": "OK", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/DeviceControlFeederResourceV2DeviceControlResource" - } - } - } - }, - "400": { - "description": "Bad Request", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ErrorResource" - } - } - } - }, - "403": { - "description": "Forbidden", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ProblemDetails" - } - } - } - }, - "404": { - "description": "Not Found", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ErrorResource" - } - } - } - }, - "422": { - "description": "Unprocessable Content", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ErrorResource" - } - } - } - }, - "500": { - "description": "Internal Server Error" - } - } - } - }, - "/api/v2/product/4/device/{deviceId}/control/async": { - "put": { - "tags": [ - "DeviceControlFeederConnect" - ], - "summary": "Queue a state change, the returned request_id can then be tracked in api/device/{deviceId}/control/status", - "parameters": [ - { - "name": "deviceId", - "in": "path", - "required": true, - "schema": { - "type": "integer", - "format": "int32" - } - } - ], - "requestBody": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/DeviceControlFeederResourceV2" - } - }, - "text/json": { - "schema": { - "$ref": "#/components/schemas/DeviceControlFeederResourceV2" - } - }, - "application/*+json": { - "schema": { - "$ref": "#/components/schemas/DeviceControlFeederResourceV2" - } - } - } - }, - "responses": { - "200": { - "description": "OK", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/DeviceControlFeederResourceV2DeviceControlResource" - } - } - } - }, - "400": { - "description": "Bad Request", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ErrorResource" - } - } - } - }, - "403": { - "description": "Forbidden", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ProblemDetails" - } - } - } - }, - "404": { - "description": "Not Found", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ErrorResource" - } - } - } - }, - "422": { - "description": "Unprocessable Content", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ErrorResource" - } - } - } - }, - "500": { - "description": "Internal Server Error" - } - } - } - }, - "/api/v2/product/1/device/{deviceId}/control": { - "get": { - "tags": [ - "DeviceControlHub" - ], - "summary": "Will return the current state for a device and any inflight state changes", - "parameters": [ - { - "name": "deviceId", - "in": "path", - "required": true, - "schema": { - "type": "integer", - "format": "int32" - } - } - ], - "responses": { - "200": { - "description": "OK", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/DeviceControlHubResourceDeviceControlResource" - } - } - } - }, - "400": { - "description": "Bad Request", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ErrorResource" - } - } - } - }, - "403": { - "description": "Forbidden", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ProblemDetails" - } - } - } - }, - "404": { - "description": "Not Found", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ErrorResource" - } - } - } - }, - "422": { - "description": "Unprocessable Content", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ErrorResource" - } - } - } - }, - "500": { - "description": "Internal Server Error" - } - } - } - }, - "/api/v2/product/1/device/{deviceId}/control/async": { - "put": { - "tags": [ - "DeviceControlHub" - ], - "summary": "Queue a state change, the returned request_id can then be tracked in api/device/{deviceId}/control/status", - "parameters": [ - { - "name": "deviceId", - "in": "path", - "required": true, - "schema": { - "type": "integer", - "format": "int32" - } - } - ], - "requestBody": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/DeviceControlHubResource" - } - }, - "text/json": { - "schema": { - "$ref": "#/components/schemas/DeviceControlHubResource" - } - }, - "application/*+json": { - "schema": { - "$ref": "#/components/schemas/DeviceControlHubResource" - } - } - } - }, - "responses": { - "200": { - "description": "OK", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/DeviceControlHubResourceDeviceControlResource" - } - } - } - }, - "400": { - "description": "Bad Request", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ErrorResource" - } - } - } - }, - "403": { - "description": "Forbidden", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ProblemDetails" - } - } - } - }, - "404": { - "description": "Not Found", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ErrorResource" - } - } - } - }, - "422": { - "description": "Unprocessable Content", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ErrorResource" - } - } - } - }, - "500": { - "description": "Internal Server Error" - } - } - } - }, - "/api/v2/product/32/device/{deviceId}/control": { - "get": { - "tags": [ - "DeviceControlNoIdDogBowlConnect" - ], - "summary": "Will return the current state for a device and any inflight state changes", - "parameters": [ - { - "name": "deviceId", - "in": "path", - "required": true, - "schema": { - "type": "integer", - "format": "int32" - } - } - ], - "responses": { - "200": { - "description": "OK", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/DeviceControlNoIdDogBowlResourceDeviceControlResource" - } - } - } - }, - "400": { - "description": "Bad Request", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ErrorResource" - } - } - } - }, - "403": { - "description": "Forbidden", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ProblemDetails" - } - } - } - }, - "404": { - "description": "Not Found", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ErrorResource" - } - } - } - }, - "422": { - "description": "Unprocessable Content", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ErrorResource" - } - } - } - }, - "500": { - "description": "Internal Server Error" - } - } - } - }, - "/api/v2/product/32/device/{deviceId}/control/async": { - "put": { - "tags": [ - "DeviceControlNoIdDogBowlConnect" - ], - "summary": "Queue a state change, the returned request_id can then be tracked in api/device/{deviceId}/control/status", - "parameters": [ - { - "name": "deviceId", - "in": "path", - "required": true, - "schema": { - "type": "integer", - "format": "int32" - } - } - ], - "requestBody": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/DeviceControlNoIdDogBowlResource" - } - }, - "text/json": { - "schema": { - "$ref": "#/components/schemas/DeviceControlNoIdDogBowlResource" - } - }, - "application/*+json": { - "schema": { - "$ref": "#/components/schemas/DeviceControlNoIdDogBowlResource" - } - } - } - }, - "responses": { - "200": { - "description": "OK", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/DeviceControlNoIdDogBowlResourceDeviceControlResource" - } - } - } - }, - "400": { - "description": "Bad Request", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ErrorResource" - } - } - } - }, - "403": { - "description": "Forbidden", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ProblemDetails" - } - } - } - }, - "404": { - "description": "Not Found", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ErrorResource" - } - } - } - }, - "422": { - "description": "Unprocessable Content", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ErrorResource" - } - } - } - }, - "500": { - "description": "Internal Server Error" - } - } - } - }, - "/api/v2/product/3/device/{deviceId}/control": { - "get": { - "tags": [ - "DeviceControlPetDoor" - ], - "summary": "Will return the current state for a device and any inflight state changes", - "parameters": [ - { - "name": "deviceId", - "in": "path", - "required": true, - "schema": { - "type": "integer", - "format": "int32" - } - } - ], - "responses": { - "200": { - "description": "OK", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/DeviceControlPetDoorResourceDeviceControlResource" - } - } - } - }, - "400": { - "description": "Bad Request", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ErrorResource" - } - } - } - }, - "403": { - "description": "Forbidden", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ProblemDetails" - } - } - } - }, - "404": { - "description": "Not Found", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ErrorResource" - } - } - } - }, - "422": { - "description": "Unprocessable Content", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ErrorResource" - } - } - } - }, - "500": { - "description": "Internal Server Error" - } - } - } - }, - "/api/v2/product/3/device/{deviceId}/control/async": { - "put": { - "tags": [ - "DeviceControlPetDoor" - ], - "summary": "Queue a state change, the returned request_id can then be tracked in api/device/{deviceId}/control/status", - "parameters": [ - { - "name": "deviceId", - "in": "path", - "required": true, - "schema": { - "type": "integer", - "format": "int32" - } - } - ], - "requestBody": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/DeviceControlPetDoorResource" - } - }, - "text/json": { - "schema": { - "$ref": "#/components/schemas/DeviceControlPetDoorResource" - } - }, - "application/*+json": { - "schema": { - "$ref": "#/components/schemas/DeviceControlPetDoorResource" - } - } - } - }, - "responses": { - "200": { - "description": "OK", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/DeviceControlPetDoorResourceDeviceControlResource" - } - } - } - }, - "400": { - "description": "Bad Request", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ErrorResource" - } - } - } - }, - "403": { - "description": "Forbidden", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ProblemDetails" - } - } - } - }, - "404": { - "description": "Not Found", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ErrorResource" - } - } - } - }, - "422": { - "description": "Unprocessable Content", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ErrorResource" - } - } - } - }, - "500": { - "description": "Internal Server Error" - } - } - } - }, - "/api/v2/product/8/device/{deviceId}/control": { - "get": { - "tags": [ - "DeviceControlPoseidonConnect" - ], - "summary": "Will return the current state for a device and any inflight state changes", - "parameters": [ - { - "name": "deviceId", - "in": "path", - "required": true, - "schema": { - "type": "integer", - "format": "int32" - } - } - ], - "responses": { - "200": { - "description": "OK", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/DeviceControlPoseidonResourceDeviceControlResource" - } - } - } - }, - "400": { - "description": "Bad Request", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ErrorResource" - } - } - } - }, - "403": { - "description": "Forbidden", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ProblemDetails" - } - } - } - }, - "404": { - "description": "Not Found", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ErrorResource" - } - } - } - }, - "422": { - "description": "Unprocessable Content", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ErrorResource" - } - } - } - }, - "500": { - "description": "Internal Server Error" - } - } - } - }, - "/api/v2/product/8/device/{deviceId}/control/async": { - "put": { - "tags": [ - "DeviceControlPoseidonConnect" - ], - "summary": "Queue a state change, the returned request_id can then be tracked in api/device/{deviceId}/control/status", - "parameters": [ - { - "name": "deviceId", - "in": "path", - "required": true, - "schema": { - "type": "integer", - "format": "int32" - } - } - ], - "requestBody": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/DeviceControlPoseidonResource" - } - }, - "text/json": { - "schema": { - "$ref": "#/components/schemas/DeviceControlPoseidonResource" - } - }, - "application/*+json": { - "schema": { - "$ref": "#/components/schemas/DeviceControlPoseidonResource" - } - } - } - }, - "responses": { - "200": { - "description": "OK", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/DeviceControlPoseidonResourceDeviceControlResource" - } - } - } - }, - "400": { - "description": "Bad Request", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ErrorResource" - } - } - } - }, - "403": { - "description": "Forbidden", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ProblemDetails" - } - } - } - }, - "404": { - "description": "Not Found", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ErrorResource" - } - } - } - }, - "422": { - "description": "Unprocessable Content", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ErrorResource" - } - } - } - }, - "500": { - "description": "Internal Server Error" - } - } - } - }, - "/api/v2/device/{deviceId}/tag/async": { - "put": { - "tags": [ - "DeviceTag" - ], - "parameters": [ - { - "name": "deviceId", - "in": "path", - "required": true, - "schema": { - "type": "integer", - "format": "int32" - } - } - ], - "requestBody": { - "content": { - "application/json": { - "schema": { - "type": "array", - "items": { - "$ref": "#/components/schemas/UpdateDeviceTagV2Resource" - } - } - }, - "text/json": { - "schema": { - "type": "array", - "items": { - "$ref": "#/components/schemas/UpdateDeviceTagV2Resource" - } - } - }, - "application/*+json": { - "schema": { - "type": "array", - "items": { - "$ref": "#/components/schemas/UpdateDeviceTagV2Resource" - } - } - } - } - }, - "responses": { - "400": { - "description": "Bad Request", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ErrorResource" - } - } - } - }, - "403": { - "description": "Forbidden", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ProblemDetails" - } - } - } - }, - "404": { - "description": "Not Found", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ErrorResource" - } - } - } - }, - "422": { - "description": "Unprocessable Content", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ErrorResource" - } - } - } - }, - "500": { - "description": "Internal Server Error" - }, - "200": { - "description": "OK", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/DeviceTagDataResource" - } - } - } - } - } - } - }, - "/api/v2/report/household/{householdId}/pet/{petId}/aggregate": { - "get": { - "tags": [ - "ReportHouseholdPet" - ], - "parameters": [ - { - "name": "householdId", - "in": "path", - "required": true, - "schema": { - "type": "integer", - "format": "int32" - } - }, - { - "name": "petId", - "in": "path", - "required": true, - "schema": { - "type": "integer", - "format": "int32" - } - }, - { - "name": "From", - "in": "query", - "required": true, - "schema": { - "type": "string", - "format": "date-time" - } - }, - { - "name": "To", - "in": "query", - "required": true, - "schema": { - "type": "string", - "format": "date-time" - } - }, - { - "name": "EventType", - "in": "query", - "schema": { - "$ref": "#/components/schemas/ReportHouseholdEvent" - } - } - ], - "responses": { - "400": { - "description": "Bad Request", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ErrorResource" - } - } - } - }, - "403": { - "description": "Forbidden", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ProblemDetails" - } - } - } - }, - "404": { - "description": "Not Found", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ErrorResource" - } - } - } - }, - "422": { - "description": "Unprocessable Content", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ErrorResource" - } - } - } - }, - "500": { - "description": "Internal Server Error" - }, - "200": { - "description": "OK", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ReportHouseholdResourceDataResponse" - } - } - } - } - } - } - }, - "/api/v2/timeline/household/{householdId}": { - "get": { - "tags": [ - "Timeline" - ], - "parameters": [ - { - "name": "householdId", - "in": "path", - "required": true, - "schema": { - "type": "integer", - "format": "int32" - } - }, - { - "name": "PageSize", - "in": "query", - "schema": { - "type": "integer", - "format": "int32" - } - }, - { - "name": "SinceId", - "in": "query", - "schema": { - "type": "integer", - "format": "int64" - } - }, - { - "name": "BeforeId", - "in": "query", - "schema": { - "type": "integer", - "format": "int64" - } - }, - { - "name": "Page", - "in": "query", - "schema": { - "type": "integer", - "format": "int32" - } - }, - { - "name": "ItemsPerPage", - "in": "query", - "schema": { - "type": "integer", - "format": "int32" - } - } - ], - "responses": { - "400": { - "description": "Bad Request", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ErrorResource" - } - } - } - }, - "403": { - "description": "Forbidden", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ProblemDetails" - } - } - } - }, - "404": { - "description": "Not Found", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ErrorResource" - } - } - } - }, - "422": { - "description": "Unprocessable Content", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ErrorResource" - } - } - } - }, - "500": { - "description": "Internal Server Error" - }, - "200": { - "description": "OK", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/TimelineResourceV2PaginatedDataResult" - } - } - } - } - } - } - } - }, - "components": { - "schemas": { - "ChangeProfileActionEnum": { - "enum": [ - 0, - 1, - 2 - ], - "type": "integer", - "format": "int32" - }, - "ConsumptionAlertResource": { - "type": "object", - "properties": { - "pet_id": { - "type": "integer", - "format": "int32" - }, - "tag_id": { - "type": "integer", - "format": "int32" - }, - "pet_weight": { - "type": "integer", - "format": "int32" - }, - "amount": { - "type": "integer", - "format": "int32" - }, - "time_noticed_utc": { - "type": "string", - "format": "date-time" - }, - "created_at": { - "type": "string", - "format": "date-time" - } - }, - "additionalProperties": false - }, - "ConsumptionHabitOutcomeEnum": { - "enum": [ - 0, - 1, - 2 - ], - "type": "integer", - "format": "int32" - }, - "ConsumptionHabitResource": { - "type": "object", - "properties": { - "outcome": { - "$ref": "#/components/schemas/ConsumptionHabitOutcomeEnum" - }, - "calendar_day": { - "type": "string", - "format": "date" - }, - "amount": { - "type": "integer", - "format": "int32" - }, - "lower_limit": { - "type": "integer", - "format": "int32", - "nullable": true - }, - "upper_limit": { - "type": "integer", - "format": "int32", - "nullable": true - }, - "created_at": { - "type": "string", - "format": "date-time" - } - }, - "additionalProperties": false - }, - "DeviceControlCurfewResource": { - "type": "object", - "properties": { - "enabled": { - "type": "boolean", - "nullable": true - }, - "lock_time": { - "type": "string", - "nullable": true - }, - "unlock_time": { - "type": "string", - "nullable": true - } - }, - "additionalProperties": false - }, - "DeviceControlDualScanPetDoorResourceV2": { - "type": "object", - "properties": { - "fast_polling": { - "type": "boolean", - "nullable": true - }, - "tag_profiles": { - "type": "array", - "items": { - "$ref": "#/components/schemas/DeviceControlThalamusTagProfileResource" - }, - "nullable": true - }, - "timed_access": { - "type": "array", - "items": { - "$ref": "#/components/schemas/DeviceControlThalamusMovementTagTimedAccessResource" - }, - "nullable": true - }, - "locking": { - "$ref": "#/components/schemas/DualScanLockingModeEnum" - }, - "lockdown": { - "type": "boolean", - "description": "Stop all entry and exit, overrides all other locking settings", - "nullable": true - }, - "timed_access_override": { - "type": "boolean", - "nullable": true - } - }, - "additionalProperties": false - }, - "DeviceControlDualScanPetDoorResourceV2DeviceControlPendingResource": { - "type": "object", - "properties": { - "state": { - "$ref": "#/components/schemas/DeviceControlDualScanPetDoorResourceV2" - }, - "request_id": { - "type": "string", - "nullable": true - }, - "requested_at": { - "type": "string", - "format": "date-time", - "nullable": true - }, - "requested_by": { - "type": "string", - "nullable": true - } - }, - "additionalProperties": false - }, - "DeviceControlDualScanPetDoorResourceV2DeviceControlResource": { - "type": "object", - "properties": { - "data": { - "$ref": "#/components/schemas/DeviceControlDualScanPetDoorResourceV2" - }, - "pending": { - "type": "array", - "items": { - "$ref": "#/components/schemas/DeviceControlDualScanPetDoorResourceV2DeviceControlPendingResource" - }, - "nullable": true - }, - "results": { - "type": "array", - "items": { - "$ref": "#/components/schemas/DeviceControlResultResource" - }, - "nullable": true - } - }, - "additionalProperties": false - }, - "DeviceControlDualScanResourceV2": { - "type": "object", - "properties": { - "fast_polling": { - "type": "boolean", - "nullable": true - }, - "tag_profiles": { - "type": "array", - "items": { - "$ref": "#/components/schemas/DeviceControlThalamusTagProfileResource" - }, - "nullable": true - }, - "timed_access": { - "type": "array", - "items": { - "$ref": "#/components/schemas/DeviceControlThalamusMovementTagTimedAccessResource" - }, - "nullable": true - }, - "locking": { - "$ref": "#/components/schemas/DualScanLockingModeEnum" - }, - "lockdown": { - "type": "boolean", - "description": "Stop all entry and exit, overrides all other locking settings", - "nullable": true - } - }, - "additionalProperties": false - }, - "DeviceControlDualScanResourceV2DeviceControlPendingResource": { - "type": "object", - "properties": { - "state": { - "$ref": "#/components/schemas/DeviceControlDualScanResourceV2" - }, - "request_id": { - "type": "string", - "nullable": true - }, - "requested_at": { - "type": "string", - "format": "date-time", - "nullable": true - }, - "requested_by": { - "type": "string", - "nullable": true - } - }, - "additionalProperties": false - }, - "DeviceControlDualScanResourceV2DeviceControlResource": { - "type": "object", - "properties": { - "data": { - "$ref": "#/components/schemas/DeviceControlDualScanResourceV2" - }, - "pending": { - "type": "array", - "items": { - "$ref": "#/components/schemas/DeviceControlDualScanResourceV2DeviceControlPendingResource" - }, - "nullable": true - }, - "results": { - "type": "array", - "items": { - "$ref": "#/components/schemas/DeviceControlResultResource" - }, - "nullable": true - } - }, - "additionalProperties": false - }, - "DeviceControlFeederBowlResource": { - "type": "object", - "properties": { - "settings": { - "type": "array", - "items": { - "$ref": "#/components/schemas/DeviceControlFeederBowlSettingsResource" - }, - "nullable": true - }, - "type": { - "$ref": "#/components/schemas/FeederBowlTypeEnum" - } - }, - "additionalProperties": false - }, - "DeviceControlFeederBowlSettingsResource": { - "type": "object", - "properties": { - "food_type": { - "$ref": "#/components/schemas/FoodTypesEnum" - }, - "target": { - "type": "number", - "format": "float", - "nullable": true - } - }, - "additionalProperties": false - }, - "DeviceControlFeederLidResource": { - "type": "object", - "properties": { - "close_delay": { - "type": "integer", - "format": "int32", - "nullable": true - } - }, - "additionalProperties": false - }, - "DeviceControlFeederResourceV2": { - "type": "object", - "properties": { - "fast_polling": { - "type": "boolean", - "nullable": true - }, - "tag_profiles": { - "type": "array", - "items": { - "$ref": "#/components/schemas/DeviceControlThalamusTagProfileResource" - }, - "nullable": true - }, - "bowls": { - "$ref": "#/components/schemas/DeviceControlFeederBowlResource" - }, - "lid": { - "$ref": "#/components/schemas/DeviceControlFeederLidResource" - }, - "tare": { - "$ref": "#/components/schemas/ZeroAction" - }, - "training_mode": { - "$ref": "#/components/schemas/TrainingMode" - }, - "timed_feeding": { - "type": "array", - "items": { - "$ref": "#/components/schemas/DeviceControlFeederTagTimedFeedingResource" - }, - "nullable": true - } - }, - "additionalProperties": false - }, - "DeviceControlFeederResourceV2DeviceControlPendingResource": { - "type": "object", - "properties": { - "state": { - "$ref": "#/components/schemas/DeviceControlFeederResourceV2" - }, - "request_id": { - "type": "string", - "nullable": true - }, - "requested_at": { - "type": "string", - "format": "date-time", - "nullable": true - }, - "requested_by": { - "type": "string", - "nullable": true - } - }, - "additionalProperties": false - }, - "DeviceControlFeederResourceV2DeviceControlResource": { - "type": "object", - "properties": { - "data": { - "$ref": "#/components/schemas/DeviceControlFeederResourceV2" - }, - "pending": { - "type": "array", - "items": { - "$ref": "#/components/schemas/DeviceControlFeederResourceV2DeviceControlPendingResource" - }, - "nullable": true - }, - "results": { - "type": "array", - "items": { - "$ref": "#/components/schemas/DeviceControlResultResource" - }, - "nullable": true - } - }, - "additionalProperties": false - }, - "DeviceControlFeederTagTimedFeedingResource": { - "type": "object", - "properties": { - "tag_id": { - "type": "integer", - "description": "The tag to apply the fasting to, leaving null will apply a dive wide fasting", - "format": "int32", - "nullable": true - }, - "fasting": { - "type": "array", - "items": { - "$ref": "#/components/schemas/DeviceControlFeederTimedFeedingResource" - }, - "nullable": true - } - }, - "additionalProperties": false - }, - "DeviceControlFeederTimedFeedingResource": { - "type": "object", - "properties": { - "enabled": { - "type": "boolean", - "nullable": true - }, - "start_time": { - "type": "string", - "nullable": true - }, - "end_time": { - "type": "string", - "nullable": true - } - }, - "additionalProperties": false - }, - "DeviceControlHubResource": { - "type": "object", - "properties": { - "led_mode": { - "$ref": "#/components/schemas/LedModeEnum" - }, - "pairing_mode": { - "$ref": "#/components/schemas/PairingModeEnum" - }, - "flash_leds": { - "type": "boolean", - "nullable": true - } - }, - "additionalProperties": false - }, - "DeviceControlHubResourceDeviceControlPendingResource": { - "type": "object", - "properties": { - "state": { - "$ref": "#/components/schemas/DeviceControlHubResource" - }, - "request_id": { - "type": "string", - "nullable": true - }, - "requested_at": { - "type": "string", - "format": "date-time", - "nullable": true - }, - "requested_by": { - "type": "string", - "nullable": true - } - }, - "additionalProperties": false - }, - "DeviceControlHubResourceDeviceControlResource": { - "type": "object", - "properties": { - "data": { - "$ref": "#/components/schemas/DeviceControlHubResource" - }, - "pending": { - "type": "array", - "items": { - "$ref": "#/components/schemas/DeviceControlHubResourceDeviceControlPendingResource" - }, - "nullable": true - }, - "results": { - "type": "array", - "items": { - "$ref": "#/components/schemas/DeviceControlResultResource" - }, - "nullable": true - } - }, - "additionalProperties": false - }, - "DeviceControlNoIdDogBowlResource": { - "type": "object", - "properties": { - "fast_polling": { - "type": "boolean", - "nullable": true - }, - "tag_profiles": { - "type": "array", - "items": { - "$ref": "#/components/schemas/DeviceControlThalamusTagProfileResource" - }, - "nullable": true - }, - "food_type": { - "$ref": "#/components/schemas/FoodTypesEnum" - }, - "substance_type": { - "$ref": "#/components/schemas/SubstanceTypesEnum" - } - }, - "additionalProperties": false - }, - "DeviceControlNoIdDogBowlResourceDeviceControlPendingResource": { - "type": "object", - "properties": { - "state": { - "$ref": "#/components/schemas/DeviceControlNoIdDogBowlResource" - }, - "request_id": { - "type": "string", - "nullable": true - }, - "requested_at": { - "type": "string", - "format": "date-time", - "nullable": true - }, - "requested_by": { - "type": "string", - "nullable": true - } - }, - "additionalProperties": false - }, - "DeviceControlNoIdDogBowlResourceDeviceControlResource": { - "type": "object", - "properties": { - "data": { - "$ref": "#/components/schemas/DeviceControlNoIdDogBowlResource" - }, - "pending": { - "type": "array", - "items": { - "$ref": "#/components/schemas/DeviceControlNoIdDogBowlResourceDeviceControlPendingResource" - }, - "nullable": true - }, - "results": { - "type": "array", - "items": { - "$ref": "#/components/schemas/DeviceControlResultResource" - }, - "nullable": true - } - }, - "additionalProperties": false - }, - "DeviceControlPendingResource": { - "type": "object", - "properties": { - "state": { - "nullable": true - }, - "request_id": { - "type": "string", - "nullable": true - }, - "requested_at": { - "type": "string", - "format": "date-time", - "nullable": true - }, - "requested_by": { - "type": "string", - "nullable": true - } - }, - "additionalProperties": false - }, - "DeviceControlPetDoorMicrochipResource": { - "type": "object", - "properties": { - "microchip_number": { - "type": "string", - "nullable": true - }, - "type": { - "$ref": "#/components/schemas/PetDoorTagType" - } - }, - "additionalProperties": false - }, - "DeviceControlPetDoorResource": { - "type": "object", - "properties": { - "fast_polling": { - "type": "boolean", - "nullable": true - }, - "curfew": { - "$ref": "#/components/schemas/DeviceControlCurfewResource" - }, - "locking": { - "$ref": "#/components/schemas/PetDoorLockingModeEnum" - }, - "tag_profiles": { - "type": "array", - "items": { - "$ref": "#/components/schemas/DeviceControlPetDoorTagProfileResource" - }, - "nullable": true - } - }, - "additionalProperties": false - }, - "DeviceControlPetDoorResourceDeviceControlPendingResource": { - "type": "object", - "properties": { - "state": { - "$ref": "#/components/schemas/DeviceControlPetDoorResource" - }, - "request_id": { - "type": "string", - "nullable": true - }, - "requested_at": { - "type": "string", - "format": "date-time", - "nullable": true - }, - "requested_by": { - "type": "string", - "nullable": true - } - }, - "additionalProperties": false - }, - "DeviceControlPetDoorResourceDeviceControlResource": { - "type": "object", - "properties": { - "data": { - "$ref": "#/components/schemas/DeviceControlPetDoorResource" - }, - "pending": { - "type": "array", - "items": { - "$ref": "#/components/schemas/DeviceControlPetDoorResourceDeviceControlPendingResource" - }, - "nullable": true - }, - "results": { - "type": "array", - "items": { - "$ref": "#/components/schemas/DeviceControlResultResource" - }, - "nullable": true - } - }, - "additionalProperties": false - }, - "DeviceControlPetDoorTagProfileResource": { - "type": "object", - "properties": { - "tag_id": { - "type": "integer", - "format": "int32", - "nullable": true - }, - "index": { - "type": "integer", - "format": "int32", - "nullable": true - }, - "microchip": { - "$ref": "#/components/schemas/DeviceControlPetDoorMicrochipResource" - } - }, - "additionalProperties": false - }, - "DeviceControlPoseidonResource": { - "type": "object", - "properties": { - "fast_polling": { - "type": "boolean", - "nullable": true - }, - "tag_profiles": { - "type": "array", - "items": { - "$ref": "#/components/schemas/DeviceControlThalamusTagProfileResource" - }, - "nullable": true - }, - "learn_mode": { - "type": "boolean", - "nullable": true - } - }, - "additionalProperties": false - }, - "DeviceControlPoseidonResourceDeviceControlPendingResource": { - "type": "object", - "properties": { - "state": { - "$ref": "#/components/schemas/DeviceControlPoseidonResource" - }, - "request_id": { - "type": "string", - "nullable": true - }, - "requested_at": { - "type": "string", - "format": "date-time", - "nullable": true - }, - "requested_by": { - "type": "string", - "nullable": true - } - }, - "additionalProperties": false - }, - "DeviceControlPoseidonResourceDeviceControlResource": { - "type": "object", - "properties": { - "data": { - "$ref": "#/components/schemas/DeviceControlPoseidonResource" - }, - "pending": { - "type": "array", - "items": { - "$ref": "#/components/schemas/DeviceControlPoseidonResourceDeviceControlPendingResource" - }, - "nullable": true - }, - "results": { - "type": "array", - "items": { - "$ref": "#/components/schemas/DeviceControlResultResource" - }, - "nullable": true - } - }, - "additionalProperties": false - }, - "DeviceControlResultResource": { - "type": "object", - "properties": { - "request_id": { - "type": "string", - "nullable": true - }, - "response_id": { - "type": "string", - "nullable": true - }, - "status": { - "$ref": "#/components/schemas/RequestChangeStateResponseStatus" - }, - "status_id": { - "$ref": "#/components/schemas/RequestChangeStateResponseStatus" - }, - "requested_at": { - "type": "string", - "format": "date-time", - "nullable": true - }, - "committed_at": { - "type": "string", - "format": "date-time", - "nullable": true - } - }, - "additionalProperties": false - }, - "DeviceControlThalamusMicrochipResource": { - "type": "object", - "properties": { - "microchip_number": { - "type": "string", - "nullable": true - }, - "type": { - "$ref": "#/components/schemas/ThalamusTagType" - } - }, - "additionalProperties": false - }, - "DeviceControlThalamusMovementTagTimedAccessResource": { - "type": "object", - "properties": { - "tag_id": { - "type": "integer", - "description": "The tag to apply the curfew to, leaving null will apply a dive wide curfew", - "format": "int32", - "nullable": true - }, - "timed_access": { - "type": "array", - "items": { - "$ref": "#/components/schemas/DeviceControlThalamusMovementTimedAccessResource" - }, - "nullable": true - } - }, - "additionalProperties": false - }, - "DeviceControlThalamusMovementTimedAccessResource": { - "type": "object", - "properties": { - "profile": { - "$ref": "#/components/schemas/ThalamusMovementTimedAccessAllowedSpecialProfiles" - }, - "lock_time": { - "type": "string", - "nullable": true - }, - "unlock_time": { - "type": "string", - "nullable": true - } - }, - "additionalProperties": false - }, - "DeviceControlThalamusTagProfileResource": { - "type": "object", - "properties": { - "tag_id": { - "type": "integer", - "description": "Tag id", - "format": "int32", - "nullable": true - }, - "index": { - "type": "integer", - "description": "Index in the devices profile table", - "format": "int32", - "nullable": true - }, - "profile": { - "$ref": "#/components/schemas/SpecialProfiles" - }, - "action": { - "$ref": "#/components/schemas/ChangeProfileActionEnum" - }, - "request_action": { - "$ref": "#/components/schemas/UpdateDeviceTagActions" - }, - "microchip": { - "$ref": "#/components/schemas/DeviceControlThalamusMicrochipResource" - } - }, - "additionalProperties": false - }, - "DeviceResourceV2": { - "type": "object", - "properties": { - "id": { - "type": "integer", - "format": "int32" - } - }, - "additionalProperties": false - }, - "DeviceTagDataResource": { - "type": "object", - "properties": { - "data": { - "$ref": "#/components/schemas/DeviceTagResource" - }, - "pending": { - "type": "array", - "items": { - "$ref": "#/components/schemas/DeviceControlPendingResource" - }, - "description": "Any pending state changes for the device tag", - "nullable": true - }, - "results": { - "type": "array", - "items": { - "$ref": "#/components/schemas/DeviceControlResultResource" - }, - "description": "State change result", - "nullable": true - } - }, - "additionalProperties": false - }, - "DeviceTagProfiles": { - "enum": [ - 2, - 3 - ], - "type": "integer", - "format": "int32" - }, - "DeviceTagResource": { - "type": "object", - "properties": { - "id": { - "type": "integer", - "description": "Tag id", - "format": "int32" - }, - "device_id": { - "type": "integer", - "format": "int32" - }, - "index": { - "type": "integer", - "format": "int32" - }, - "profile": { - "type": "integer", - "format": "int32", - "nullable": true - }, - "version": { - "type": "integer", - "format": "int32" - }, - "created_at": { - "type": "string", - "format": "date-time", - "nullable": true - }, - "updated_at": { - "type": "string", - "format": "date-time", - "nullable": true - } - }, - "additionalProperties": false - }, - "DoorDirectionEnum": { - "enum": [ - 0, - 1, - 2, - 3 - ], - "type": "integer", - "format": "int32" - }, - "DoorSide": { - "enum": [ - 0, - 1, - 2 - ], - "type": "integer", - "format": "int32" - }, - "DoorStatusEnum": { - "enum": [ - 4, - 6, - 8, - 10, - 11, - 12, - 13 - ], - "type": "integer", - "format": "int32" - }, - "DualScanLockingModeEnum": { - "enum": [ - 0, - 1, - 2, - 3 - ], - "type": "integer", - "format": "int32" - }, - "ErrorResource": { - "type": "object", - "properties": { - "success": { - "type": "boolean", - "readOnly": true - }, - "error": { - "type": "object", - "additionalProperties": { - "type": "array", - "items": { - "type": "string" - }, - "nullable": true - }, - "nullable": true, - "readOnly": true - } - }, - "additionalProperties": false - }, - "FeederBowlTypeEnum": { - "enum": [ - 1, - 4, - 5 - ], - "type": "integer", - "format": "int32" - }, - "FoodTypesEnum": { - "enum": [ - 0, - 1, - 2, - 3 - ], - "type": "integer", - "format": "int32" - }, - "HouseholdResourceV2": { - "type": "object", - "properties": { - "id": { - "type": "integer", - "format": "int32" - } - }, - "additionalProperties": false - }, - "LedModeEnum": { - "enum": [ - 0, - 1, - 2, - 3, - 4, - 128 - ], - "type": "integer", - "format": "int32" - }, - "MovementResource": { - "type": "object", - "properties": { - "id": { - "type": "integer", - "format": "int64" - }, - "device_id": { - "type": "integer", - "format": "int32", - "nullable": true - }, - "tag_id": { - "type": "integer", - "format": "int32" - }, - "user_id": { - "type": "integer", - "format": "int32", - "nullable": true - }, - "direction": { - "$ref": "#/components/schemas/DoorDirectionEnum" - }, - "side": { - "$ref": "#/components/schemas/DoorSide" - }, - "type": { - "$ref": "#/components/schemas/DoorStatusEnum" - }, - "created_at": { - "type": "string", - "format": "date-time", - "nullable": true - }, - "updated_at": { - "type": "string", - "format": "date-time", - "nullable": true - } - }, - "additionalProperties": false - }, - "PaginatedMetaDataResult": { - "type": "object", - "properties": { - "page": { - "type": "integer", - "format": "int32", - "nullable": true - }, - "page_size": { - "type": "integer", - "format": "int32", - "nullable": true - }, - "count": { - "type": "integer", - "format": "int64" - }, - "total_pages": { - "type": "integer", - "format": "int64", - "nullable": true - } - }, - "additionalProperties": false - }, - "PairingModeEnum": { - "enum": [ - 0, - 1, - 2, - 3, - 128 - ], - "type": "integer", - "format": "int32" - }, - "PetDoorLockingModeEnum": { - "enum": [ - 0, - 1, - 2, - 3, - 4, - 5 - ], - "type": "integer", - "format": "int32" - }, - "PetDoorTagType": { - "enum": [ - 0, - 1, - 2, - 4, - 8, - 16, - 32, - 64, - 128 - ], - "type": "integer", - "format": "int32" - }, - "PetResourceV2": { - "type": "object", - "properties": { - "id": { - "type": "integer", - "format": "int32" - } - }, - "additionalProperties": false - }, - "PhotoResource": { - "type": "object", - "properties": { - "id": { - "type": "integer", - "format": "int32" - }, - "title": { - "type": "string", - "nullable": true - }, - "location": { - "type": "string", - "nullable": true - }, - "hash": { - "type": "string", - "nullable": true - }, - "uploading_user_id": { - "type": "integer", - "format": "int32" - }, - "version": { - "type": "integer", - "format": "int32" - }, - "created_at": { - "type": "string", - "format": "date-time", - "nullable": true - }, - "updated_at": { - "type": "string", - "format": "date-time", - "nullable": true - } - }, - "additionalProperties": false - }, - "ProblemDetails": { - "type": "object", - "properties": { - "type": { - "type": "string", - "nullable": true - }, - "title": { - "type": "string", - "nullable": true - }, - "status": { - "type": "integer", - "format": "int32", - "nullable": true - }, - "detail": { - "type": "string", - "nullable": true - }, - "instance": { - "type": "string", - "nullable": true - } - }, - "additionalProperties": { } - }, - "PublicUserResource": { - "type": "object", - "properties": { - "id": { - "type": "integer", - "format": "int32" - }, - "name": { - "type": "string", - "nullable": true - }, - "photo_id": { - "type": "integer", - "format": "int32", - "nullable": true - }, - "photo": { - "$ref": "#/components/schemas/PhotoResource" - } - }, - "additionalProperties": false - }, - "ReportHouseholdDrinkingDataPoint": { - "type": "object", - "properties": { - "datapoints": { - "type": "array", - "items": { - "$ref": "#/components/schemas/ReportHouseholdDrinkingResource" - }, - "nullable": true - } - }, - "additionalProperties": false - }, - "ReportHouseholdDrinkingResource": { - "type": "object", - "properties": { - "from": { - "type": "string", - "format": "date-time", - "nullable": true - }, - "to": { - "type": "string", - "format": "date-time", - "nullable": true - }, - "duration": { - "type": "integer", - "format": "int32", - "nullable": true - }, - "context": { - "type": "integer", - "format": "int32", - "nullable": true - }, - "bowl_count": { - "type": "integer", - "format": "int32", - "nullable": true - }, - "device_id": { - "type": "integer", - "format": "int32", - "nullable": true - }, - "weights": { - "type": "array", - "items": { - "$ref": "#/components/schemas/ReportWeightFrame" - }, - "nullable": true - }, - "actual_weight": { - "type": "number", - "format": "double", - "nullable": true - }, - "entry_user_id": { - "type": "integer", - "format": "int32", - "nullable": true - }, - "exit_user_id": { - "type": "integer", - "format": "int32", - "nullable": true - }, - "created_at": { - "type": "string", - "format": "date-time", - "nullable": true - }, - "updated_at": { - "type": "string", - "format": "date-time", - "nullable": true - }, - "deleted_at": { - "type": "string", - "format": "date-time", - "nullable": true - }, - "tag_id": { - "type": "integer", - "format": "int32", - "nullable": true - }, - "user_id": { - "type": "integer", - "format": "int32", - "nullable": true - } - }, - "additionalProperties": false - }, - "ReportHouseholdEvent": { - "enum": [ - 0, - 1, - 2 - ], - "type": "integer", - "format": "int32" - }, - "ReportHouseholdFeedingDataPoint": { - "type": "object", - "properties": { - "datapoints": { - "type": "array", - "items": { - "$ref": "#/components/schemas/ReportHouseholdFeedingResource" - }, - "nullable": true - } - }, - "additionalProperties": false - }, - "ReportHouseholdFeedingResource": { - "type": "object", - "properties": { - "from": { - "type": "string", - "format": "date-time", - "nullable": true - }, - "to": { - "type": "string", - "format": "date-time", - "nullable": true - }, - "duration": { - "type": "integer", - "format": "int32", - "nullable": true - }, - "context": { - "type": "integer", - "format": "int32", - "nullable": true - }, - "bowl_count": { - "type": "integer", - "format": "int32", - "nullable": true - }, - "device_id": { - "type": "integer", - "format": "int32", - "nullable": true - }, - "weights": { - "type": "array", - "items": { - "$ref": "#/components/schemas/ReportWeightFrame" - }, - "nullable": true - }, - "actual_weight": { - "type": "number", - "format": "double", - "nullable": true - }, - "entry_user_id": { - "type": "integer", - "format": "int32", - "nullable": true - }, - "exit_user_id": { - "type": "integer", - "format": "int32", - "nullable": true - }, - "created_at": { - "type": "string", - "format": "date-time", - "nullable": true - }, - "updated_at": { - "type": "string", - "format": "date-time", - "nullable": true - }, - "deleted_at": { - "type": "string", - "format": "date-time", - "nullable": true - }, - "tag_id": { - "type": "integer", - "format": "int32", - "nullable": true - }, - "user_id": { - "type": "integer", - "format": "int32", - "nullable": true - } - }, - "additionalProperties": false - }, - "ReportHouseholdMovementDataPoint": { - "type": "object", - "properties": { - "datapoints": { - "type": "array", - "items": { - "$ref": "#/components/schemas/ReportHouseholdMovementResource" - }, - "nullable": true - } - }, - "additionalProperties": false - }, - "ReportHouseholdMovementResource": { - "type": "object", - "properties": { - "created_at": { - "type": "string", - "format": "date-time", - "nullable": true - }, - "updated_at": { - "type": "string", - "format": "date-time", - "nullable": true - }, - "deleted_at": { - "type": "string", - "format": "date-time", - "nullable": true - }, - "device_id": { - "type": "integer", - "format": "int32", - "nullable": true - }, - "tag_id": { - "type": "integer", - "format": "int32", - "nullable": true - }, - "user_id": { - "type": "integer", - "format": "int32", - "nullable": true - }, - "from": { - "type": "string", - "format": "date-time", - "nullable": true - }, - "to": { - "type": "string", - "format": "date-time", - "nullable": true - }, - "duration": { - "type": "integer", - "format": "int32", - "nullable": true - }, - "entry_device_id": { - "type": "integer", - "format": "int32", - "nullable": true - }, - "entry_user_id": { - "type": "integer", - "format": "int32", - "nullable": true - }, - "exit_device_id": { - "type": "integer", - "format": "int32", - "nullable": true - }, - "exit_user_id": { - "type": "integer", - "format": "int32", - "nullable": true - }, - "active": { - "type": "boolean", - "nullable": true - }, - "exit_movement_id": { - "type": "integer", - "format": "int64" - }, - "entry_movement_id": { - "type": "integer", - "format": "int64" - } - }, - "additionalProperties": false - }, - "ReportHouseholdResource": { - "type": "object", - "properties": { - "pet_id": { - "type": "integer", - "format": "int32", - "nullable": true - }, - "device_id": { - "type": "integer", - "format": "int32", - "nullable": true - }, - "movement": { - "$ref": "#/components/schemas/ReportHouseholdMovementDataPoint" - }, - "feeding": { - "$ref": "#/components/schemas/ReportHouseholdFeedingDataPoint" - }, - "drinking": { - "$ref": "#/components/schemas/ReportHouseholdDrinkingDataPoint" - }, - "consumption_habit": { - "type": "array", - "items": { - "$ref": "#/components/schemas/ConsumptionHabitResource" - }, - "nullable": true - }, - "consumption_alert": { - "type": "array", - "items": { - "$ref": "#/components/schemas/ConsumptionAlertResource" - }, - "nullable": true - } - }, - "additionalProperties": false - }, - "ReportHouseholdResourceDataResponse": { - "type": "object", - "properties": { - "data": { - "$ref": "#/components/schemas/ReportHouseholdResource" - } - }, - "additionalProperties": false - }, - "ReportHouseholdV2QueryResource": { - "required": [ - "from", - "to" - ], - "type": "object", - "properties": { - "from": { - "type": "string", - "format": "date-time" - }, - "to": { - "type": "string", - "format": "date-time" - }, - "event_type": { - "$ref": "#/components/schemas/ReportHouseholdEvent" - } - }, - "additionalProperties": false - }, - "ReportWeightFrame": { - "type": "object", - "properties": { - "index": { - "type": "integer", - "format": "int32", - "nullable": true - }, - "weight": { - "type": "number", - "format": "double" - }, - "change": { - "type": "number", - "format": "double" - }, - "food_type_id": { - "type": "integer", - "format": "int32", - "nullable": true - }, - "target_weight": { - "type": "integer", - "format": "int32", - "nullable": true - }, - "multi": { - "type": "boolean", - "nullable": true - } - }, - "additionalProperties": false - }, - "RequestChangeStateResponseStatus": { - "enum": [ - 0, - 1, - 2, - 3, - 4, - 5 - ], - "type": "integer", - "format": "int32" - }, - "SpecialProfiles": { - "enum": [ - 0, - 1, - 2, - 3, - 4, - 5, - 6 - ], - "type": "integer", - "format": "int32" - }, - "SubstanceTypesEnum": { - "enum": [ - 0, - 1, - 2 - ], - "type": "integer", - "format": "int32" - }, - "TagResourceV2": { - "type": "object", - "properties": { - "id": { - "type": "integer", - "format": "int32" - } - }, - "additionalProperties": false - }, - "ThalamusMovementTimedAccessAllowedSpecialProfiles": { - "enum": [ - 3, - 5, - 6 - ], - "type": "integer", - "format": "int32" - }, - "ThalamusTagType": { - "enum": [ - 0, - 1, - 2, - 3, - 4, - 5, - 6, - 7, - 8 - ], - "type": "integer", - "format": "int32" - }, - "TimelineResourceV2": { - "type": "object", - "properties": { - "id": { - "type": "integer", - "format": "int64" - }, - "type": { - "type": "integer", - "format": "int32" - }, - "data": { - "type": "string", - "nullable": true - }, - "created_at": { - "type": "string", - "format": "date-time", - "nullable": true - }, - "updated_at": { - "type": "string", - "format": "date-time", - "nullable": true - }, - "household": { - "type": "array", - "items": { - "$ref": "#/components/schemas/HouseholdResourceV2" - }, - "nullable": true - }, - "devices": { - "type": "array", - "items": { - "$ref": "#/components/schemas/DeviceResourceV2" - }, - "nullable": true - }, - "movements": { - "type": "array", - "items": { - "$ref": "#/components/schemas/MovementResource" - }, - "nullable": true - }, - "pets": { - "type": "array", - "items": { - "$ref": "#/components/schemas/PetResourceV2" - }, - "nullable": true - }, - "tags": { - "type": "array", - "items": { - "$ref": "#/components/schemas/TagResourceV2" - }, - "nullable": true - }, - "users": { - "type": "array", - "items": { - "$ref": "#/components/schemas/PublicUserResource" - }, - "nullable": true - }, - "weights": { - "type": "array", - "items": { - "$ref": "#/components/schemas/WeightResource" - }, - "nullable": true - } - }, - "additionalProperties": false - }, - "TimelineResourceV2PaginatedDataResult": { - "type": "object", - "properties": { - "data": { - "type": "array", - "items": { - "$ref": "#/components/schemas/TimelineResourceV2" - }, - "nullable": true - }, - "meta": { - "$ref": "#/components/schemas/PaginatedMetaDataResult" - } - }, - "additionalProperties": false - }, - "TrainingMode": { - "enum": [ - 0, - 1, - 2, - 3, - 4 - ], - "type": "integer", - "format": "int32" - }, - "UpdateDeviceTagActions": { - "enum": [ - 0, - 1, - 2 - ], - "type": "integer", - "format": "int32" - }, - "UpdateDeviceTagV2Resource": { - "type": "object", - "properties": { - "tag_id": { - "type": "integer", - "format": "int32", - "nullable": true - }, - "request_action": { - "$ref": "#/components/schemas/UpdateDeviceTagActions" - }, - "profile": { - "$ref": "#/components/schemas/DeviceTagProfiles" - }, - "timed_access": { - "type": "array", - "items": { - "$ref": "#/components/schemas/DeviceControlThalamusMovementTimedAccessResource" - }, - "nullable": true - } - }, - "additionalProperties": false - }, - "WeightFrameResource": { - "type": "object", - "properties": { - "id": { - "type": "integer", - "format": "int32" - }, - "index": { - "type": "integer", - "format": "int32", - "nullable": true - }, - "current_weight": { - "type": "number", - "format": "float" - }, - "change": { - "type": "number", - "format": "float" - }, - "created_at": { - "type": "string", - "format": "date-time", - "nullable": true - }, - "updated_at": { - "type": "string", - "format": "date-time", - "nullable": true - } - }, - "additionalProperties": false - }, - "WeightResource": { - "type": "object", - "properties": { - "id": { - "type": "integer", - "format": "int64" - }, - "device_id": { - "type": "integer", - "format": "int32", - "nullable": true - }, - "tag_id": { - "type": "integer", - "format": "int32", - "nullable": true - }, - "context": { - "type": "integer", - "format": "int32", - "nullable": true - }, - "duration": { - "type": "integer", - "format": "int32", - "nullable": true - }, - "created_at": { - "type": "string", - "format": "date-time", - "nullable": true - }, - "updated_at": { - "type": "string", - "format": "date-time", - "nullable": true - }, - "frames": { - "type": "array", - "items": { - "$ref": "#/components/schemas/WeightFrameResource" - }, - "nullable": true - } - }, - "additionalProperties": false - }, - "ZeroAction": { - "enum": [ - 0, - 1, - 2, - 3 - ], - "type": "integer", - "format": "int32" - } - } - } -} \ No newline at end of file From c98f6ddbfc35b1023e779108393202791abc2d8f Mon Sep 17 00:00:00 2001 From: Fabian Eulitz Date: Thu, 26 Feb 2026 23:23:35 +0100 Subject: [PATCH 11/15] Mimic web based authentication --- surehub_api/entities/official.py | 2 +- surehub_api/services/auth.py | 5 +---- 2 files changed, 2 insertions(+), 5 deletions(-) diff --git a/surehub_api/entities/official.py b/surehub_api/entities/official.py index ac27cd0..3aa3746 100644 --- a/surehub_api/entities/official.py +++ b/surehub_api/entities/official.py @@ -32,7 +32,7 @@ class AuthChangePassword(BaseModel): class AuthLogin(BaseModel): - client_uid: str + client_uid: Optional[str] = None device_id: Optional[str] = None email_address: str password: str diff --git a/surehub_api/services/auth.py b/surehub_api/services/auth.py index ae3303e..982b1cd 100644 --- a/surehub_api/services/auth.py +++ b/surehub_api/services/auth.py @@ -1,5 +1,3 @@ -import uuid - import requests from cachetools import TTLCache @@ -8,7 +6,6 @@ from surehub_api.utils import response_handler DEFAULT_HEADERS = { - "Host": "app-api.production.surehub.io", "Accept": "application/json, */*", "Accept-Encoding": "gzip, deflate, br, zstd", "Accept-Language": "en-US,en-GB;q=0.9", @@ -31,7 +28,7 @@ def _get_token() -> str: if not token: auth_login = official.AuthLogin( - client_uid=str(uuid.uuid4()), + device_id="web", email_address=settings.email, password=settings.password, ) From 0663e65efe7a1f52f8f51b52ad71fbe22e7d2edc Mon Sep 17 00:00:00 2001 From: Fabian Eulitz Date: Thu, 26 Feb 2026 23:27:08 +0100 Subject: [PATCH 12/15] Remove tests cases since they are not useful at all --- tests/test_http_utils.py | 43 ---------------------- tests/test_official_openapi_models.py | 51 --------------------------- 2 files changed, 94 deletions(-) delete mode 100644 tests/test_http_utils.py delete mode 100644 tests/test_official_openapi_models.py diff --git a/tests/test_http_utils.py b/tests/test_http_utils.py deleted file mode 100644 index 7a5bee1..0000000 --- a/tests/test_http_utils.py +++ /dev/null @@ -1,43 +0,0 @@ -from types import SimpleNamespace - -import pytest -from fastapi import HTTPException - -from surehub_api.entities import official -from surehub_api.utils import response_handler - - -class FakeResponse: - def __init__(self, status_code: int, payload: dict, text: str = ""): - self.status_code = status_code - self.ok = 200 <= status_code < 300 - self._payload = payload - self.text = text - self.request = SimpleNamespace(method="GET", url="https://example.test/resource") - - def json(self): - return self._payload - - -def test_extract_response_data_validates_pydantic_model(): - response = FakeResponse(200, {"data": {"id": 1, "version": 1}}) - - result = response_handler.parse(response, model=official.Pet) - - assert isinstance(result, official.Pet) - assert result.id == 1 - - -def test_raise_for_status_logs_with_expected_levels(caplog): - ok_response = FakeResponse(200, {"data": {}}) - error_response = FakeResponse(404, {"error": "missing"}, text="missing") - - with caplog.at_level("INFO"): - response_handler.raise_for_status(ok_response) - - with pytest.raises(HTTPException): - with caplog.at_level("ERROR"): - response_handler.raise_for_status(error_response) - - assert "returned 200" in caplog.text - assert "returned 404" in caplog.text diff --git a/tests/test_official_openapi_models.py b/tests/test_official_openapi_models.py deleted file mode 100644 index 6918e81..0000000 --- a/tests/test_official_openapi_models.py +++ /dev/null @@ -1,51 +0,0 @@ -import json -import re -from pathlib import Path - -import pytest - -from surehub_api.entities import official, official_v2 - - -@pytest.mark.parametrize( - ("module", "spec_path"), - [ - (official, Path(__file__).resolve().parents[1] / "resources" / "swagger_v1.json"), - (official_v2, Path(__file__).resolve().parents[1] / "resources" / "swagger_v2.json"), - ], -) -def test_official_modules_include_all_openapi_schema_definitions(module, spec_path): - spec = json.loads(spec_path.read_text()) - schema_names = ( - schema_name.replace("Resource", "") - for schema_name in spec["components"]["schemas"].keys() - ) - - missing_schema_models = [schema_name for schema_name in schema_names if not hasattr(module, schema_name)] - - assert missing_schema_models == [] - - -@pytest.mark.parametrize("module", [official, official_v2]) -def test_official_modules_do_not_expose_resource_named_models(module): - class_names = [ - name - for name, value in vars(module).items() - if isinstance(value, type) and value.__module__ == module.__name__ - ] - resource_named_class_names = [name for name in class_names if "Resource" in name] - - assert resource_named_class_names == [] - - -@pytest.mark.parametrize( - "entity_file_path", - [ - Path(__file__).resolve().parents[1] / "surehub_api" / "entities" / "official.py", - Path(__file__).resolve().parents[1] / "surehub_api" / "entities" / "official_v2.py", - ], -) -def test_official_entity_classes_are_alphabetically_ordered(entity_file_path): - class_names = re.findall(r"^class\s+(\w+)\s*\(", entity_file_path.read_text(), flags=re.M) - - assert class_names == sorted(class_names) From 066ca477865f78737026a8d02bc9a9690f062115 Mon Sep 17 00:00:00 2001 From: Fabian Eulitz Date: Sat, 28 Feb 2026 01:40:44 +0100 Subject: [PATCH 13/15] Update API response models to use specific types instead of Any --- surehub_api/entities/official.py | 366 ++++++++++++++----------------- surehub_api/services/devices.py | 2 +- 2 files changed, 169 insertions(+), 199 deletions(-) diff --git a/surehub_api/entities/official.py b/surehub_api/entities/official.py index 3aa3746..a881b8e 100644 --- a/surehub_api/entities/official.py +++ b/surehub_api/entities/official.py @@ -11,7 +11,7 @@ class AnimoPet(BaseModel): id: Optional[int] = None name: Optional[str] = None - gender: Optional[Any] = None + gender: Optional[PetGenderEnum] = None date_of_birth: Optional[datetime] = None weight: Optional[str] = None breed_id: Optional[int] = None @@ -21,8 +21,8 @@ class AnimoPet(BaseModel): class AnimoPetPaginatedDataResult(BaseModel): - data: Optional[List[Any]] = None - meta: Optional[Any] = None + data: Optional[List[AnimoPet]] = None + meta: Optional[PaginatedMetaDataResult] = None class AuthChangePassword(BaseModel): @@ -52,8 +52,8 @@ class AuthRegister(BaseModel): country_id: int photo_id: Optional[int] = None marketing_opt_in: bool - weight_units: Optional[Any] = None - time_format: Optional[Any] = None + weight_units: Optional[UserWeightUnitEnum] = None + time_format: Optional[UserTimeFormatEnum] = None device_id: str @@ -93,13 +93,12 @@ class Breed(BaseModel): class BreedDataResponse(BaseModel): - data: Optional[Any] = None + data: Optional[Breed] = None class BreedPaginatedDataResult(BaseModel): - data: Optional[List[DeviceType]] = None - incompatible_product_ids: Optional[List[Any]] = None - meta: Optional[Any] = None + data: Optional[List[Breed]] = None + meta: Optional[PaginatedMetaDataResult] = None class BreedQuery(BaseModel): @@ -119,12 +118,12 @@ class Condition(BaseModel): class ConditionDataResponse(BaseModel): - data: Optional[Any] = None + data: Optional[Condition] = None class ConditionPaginatedDataResult(BaseModel): - data: Optional[List[Any]] = None - meta: Optional[Any] = None + data: Optional[List[Condition]] = None + meta: Optional[PaginatedMetaDataResult] = None class ConditionQuery(BaseModel): @@ -155,7 +154,7 @@ class ConsumptionHabit(BaseModel): class ConsumptionHabitModelState(BaseModel): pet_id: Optional[int] = None tag_id: Optional[int] = None - state: Optional[Any] = None + state: Optional[ConsumptionHabitModelStateEnum] = None class ConsumptionHabitModelStateEnum(IntEnum): @@ -183,12 +182,12 @@ class Country(BaseModel): class CountryDataResponse(BaseModel): - data: Optional[Any] = None + data: Optional[Country] = None class CountryPaginatedDataResult(BaseModel): - data: Optional[List[Any]] = None - meta: Optional[Any] = None + data: Optional[List[Country]] = None + meta: Optional[PaginatedMetaDataResult] = None class CountryQuery(BaseModel): @@ -213,17 +212,17 @@ class CreateHouseholdInvite(BaseModel): class CreatePet(BaseModel): name: str - gender: Optional[Any] = None + gender: Optional[PetGenderEnum] = None date_of_birth: Optional[datetime] = None weight: Optional[float] = None comments: Optional[str] = None breed_id: Optional[int] = None breed_id2: Optional[int] = None - spayed: Optional[Any] = None + spayed: Optional[SpayedEnum] = None food_type_id: Optional[int] = None photo_id: Optional[int] = None species_id: Optional[int] = None - conditions: Optional[List[Any]] = None + conditions: Optional[List[Condition]] = None household_id: int @@ -299,8 +298,8 @@ class DeviceControl(BaseModel): class DeviceControlSchema(BaseModel): data: Optional[Any] = None - pending: Optional[List[Any]] = None - results: Optional[List[Any]] = None + pending: Optional[List[DeviceControlPending]] = None + results: Optional[List[DeviceControlResult]] = None class DeviceControlPending(BaseModel): @@ -313,8 +312,8 @@ class DeviceControlPending(BaseModel): class DeviceControlResult(BaseModel): request_id: Optional[str] = None response_id: Optional[str] = None - status: Optional[Any] = None - status_id: Optional[Any] = None + status: Optional[RequestChangeStateResponseStatus] = None + status_id: Optional[RequestChangeStateResponseStatus] = None requested_at: Optional[datetime] = None committed_at: Optional[datetime] = None @@ -322,31 +321,31 @@ class DeviceControlResult(BaseModel): class DeviceControlStateChange(BaseModel): request_id: Optional[str] = None response_id: Optional[str] = None - status: Optional[Any] = None - status_id: Optional[Any] = None + status: Optional[RequestChangeStateResponseStatus] = None + status_id: Optional[RequestChangeStateResponseStatus] = None requested_at: Optional[datetime] = None committed_at: Optional[datetime] = None device_id: Optional[int] = None state: Optional[Any] = None requested_by: Optional[int] = None - child_state_changes: Optional[List[Any]] = None + child_state_changes: Optional[List[DeviceControlStateChange]] = None parent_request_id: Optional[str] = None class DeviceControlStateChangeDataResponse(BaseModel): - data: Optional[Any] = None + data: Optional[DeviceControlStateChange] = None class DeviceControlStateChangeListDataResponse(BaseModel): - data: Optional[List[Any]] = None + data: Optional[List[DeviceControlStateChange]] = None class DeviceDataResponse(BaseModel): - data: Optional[Any] = None + data: Optional[Device] = None class DeviceIEnumerableDataResponse(BaseModel): - data: Optional[List[Any]] = None + data: Optional[List[Device]] = None class DeviceNeedsUpdate(BaseModel): @@ -354,12 +353,12 @@ class DeviceNeedsUpdate(BaseModel): class DeviceNeedsUpdateDataResponse(BaseModel): - data: Optional[Any] = None + data: Optional[DeviceNeedsUpdate] = None class DevicePaginatedDataResult(BaseModel): - data: Optional[List[Any]] = None - meta: Optional[Any] = None + data: Optional[List[Device]] = None + meta: Optional[PaginatedMetaDataResult] = None class DevicePairByCode(BaseModel): @@ -373,7 +372,7 @@ class DeviceReadiness(BaseModel): class DeviceReadinessDataResponse(BaseModel): - data: Optional[Any] = None + data: Optional[DeviceReadiness] = None class DeviceStatus(BaseModel): @@ -382,29 +381,19 @@ class DeviceStatus(BaseModel): status: Optional[bool] = None -class DeviceTag(BaseModel): - id: Optional[int] = None - device_id: Optional[int] = None - index: Optional[int] = None - profile: Optional[int] = None - version: Optional[int] = None - created_at: Optional[datetime] = None - updated_at: Optional[datetime] = None - - class DeviceTagData(BaseModel): - data: Optional[Any] = None - pending: Optional[List[Any]] = None - results: Optional[List[Any]] = None + data: Optional[DeviceTag] = None + pending: Optional[List[DeviceControlPending]] = None + results: Optional[List[DeviceControlResult]] = None class DeviceTagDataResponse(BaseModel): - data: Optional[Any] = None + data: Optional[DeviceTag] = None class DeviceTagPaginatedDataResult(BaseModel): - data: Optional[List[Any]] = None - meta: Optional[Any] = None + data: Optional[List[DeviceTag]] = None + meta: Optional[PaginatedMetaDataResult] = None class DeviceType(IntEnum): @@ -515,12 +504,12 @@ class FoodType(BaseModel): class FoodTypeDataResponse(BaseModel): - data: Optional[Any] = None + data: Optional[FoodType] = None class FoodTypePaginatedDataResult(BaseModel): - data: Optional[List[Any]] = None - meta: Optional[Any] = None + data: Optional[List[FoodType]] = None + meta: Optional[PaginatedMetaDataResult] = None class FoodTypeQuery(BaseModel): @@ -546,7 +535,7 @@ class Household(BaseModel): class HouseholdDataResponse(BaseModel): - data: Optional[Any] = None + data: Optional[Household] = None class HouseholdInvite(BaseModel): @@ -565,12 +554,12 @@ class HouseholdInvite(BaseModel): class HouseholdInviteDataResponse(BaseModel): - data: Optional[Any] = None + data: Optional[HouseholdInvite] = None class HouseholdInvitePaginatedDataResult(BaseModel): - data: Optional[List[Any]] = None - meta: Optional[Any] = None + data: Optional[List[HouseholdInvite]] = None + meta: Optional[PaginatedMetaDataResult] = None class HouseholdInviteStatus(IntEnum): @@ -585,8 +574,8 @@ class HouseholdInviteUser(BaseModel): class HouseholdPaginatedDataResult(BaseModel): - data: Optional[List[Any]] = None - meta: Optional[Any] = None + data: Optional[List[Household]] = None + meta: Optional[PaginatedMetaDataResult] = None class HouseholdUser(BaseModel): @@ -600,12 +589,12 @@ class HouseholdUser(BaseModel): class HouseholdUserDataResponse(BaseModel): - data: Optional[Any] = None + data: Optional[HouseholdUser] = None class HouseholdUserPaginatedDataResult(BaseModel): - data: Optional[List[Any]] = None - meta: Optional[Any] = None + data: Optional[List[HouseholdUser]] = None + meta: Optional[PaginatedMetaDataResult] = None class Info(BaseModel): @@ -614,7 +603,7 @@ class Info(BaseModel): class InfoDataResponse(BaseModel): - data: Optional[Any] = None + data: Optional[Info] = None class Invite(BaseModel): @@ -623,8 +612,8 @@ class Invite(BaseModel): email_address: Optional[str] = None owner: Optional[bool] = None write: Optional[bool] = None - status: Optional[Any] = None - user: Optional[Any] = None + status: Optional[HouseholdInviteStatus] = None + user: Optional[HouseholdInviteUser] = None version: Optional[int] = None created_at: Optional[datetime] = None updated_at: Optional[datetime] = None @@ -633,12 +622,12 @@ class Invite(BaseModel): class InviteDataResponse(BaseModel): - data: Optional[Any] = None + data: Optional[Invite] = None class InvitePaginatedDataResult(BaseModel): - data: Optional[List[Any]] = None - meta: Optional[Any] = None + data: Optional[List[Invite]] = None + meta: Optional[PaginatedMetaDataResult] = None class Language(BaseModel): @@ -652,12 +641,12 @@ class Language(BaseModel): class LanguageDataResponse(BaseModel): - data: Optional[Any] = None + data: Optional[Language] = None class LanguagePaginatedDataResult(BaseModel): - data: Optional[List[Any]] = None - meta: Optional[Any] = None + data: Optional[List[Language]] = None + meta: Optional[PaginatedMetaDataResult] = None class MeStart(BaseModel): @@ -666,12 +655,12 @@ class MeStart(BaseModel): pets: Optional[List[Pet]] = None photos: Optional[List[Photo]] = None tags: Optional[List[Tag]] = None - user: Optional[HouseholdUser] = None + user: Optional[User] = None segments: Optional[List[str]] = None class MeStartDataResponse(BaseModel): - data: Optional[Any] = None + data: Optional[MeStart] = None class Movement(BaseModel): @@ -679,9 +668,9 @@ class Movement(BaseModel): device_id: Optional[int] = None tag_id: Optional[int] = None user_id: Optional[int] = None - direction: Optional[Any] = None - side: Optional[Any] = None - type: Optional[Any] = None + direction: Optional[DoorDirectionEnum] = None + side: Optional[DoorSide] = None + type: Optional[DoorStatusEnum] = None created_at: Optional[datetime] = None updated_at: Optional[datetime] = None @@ -712,14 +701,14 @@ class MovementReportDataPoint(BaseModel): class Notification(BaseModel): id: Optional[int] = None - type: Optional[Any] = None + type: Optional[TimelineEventType] = None text: Optional[str] = None created_at: Optional[datetime] = None class NotificationPaginatedDataResult(BaseModel): - data: Optional[List[Any]] = None - meta: Optional[Any] = None + data: Optional[List[Notification]] = None + meta: Optional[PaginatedMetaDataResult] = None class ObjectDataResponse(BaseModel): @@ -736,17 +725,17 @@ class PaginatedMetaDataResult(BaseModel): class Pet(BaseModel): id: int name: Optional[str] = None - gender: Optional[PetGender] = None + gender: Optional[PetGenderEnum] = None date_of_birth: Optional[datetime] = None weight: Optional[str] = None comments: Optional[str] = None breed_id: Optional[int] = None - breed_id_2: Optional[int] = None + breed_id2: Optional[int] = None food_type_id: Optional[int] = None household_id: Optional[int] = None photo_id: Optional[int] = None species_id: Optional[int] = None - spayed: Optional[Spayed] = None + spayed: Optional[SpayedEnum] = None tag_id: Optional[int] = None version: int created_at: Optional[datetime] = None @@ -767,12 +756,12 @@ class PetCondition(BaseModel): class PetConditionDataResponse(BaseModel): - data: Optional[Any] = None + data: Optional[PetCondition] = None class PetConditionPaginatedDataResult(BaseModel): - data: Optional[List[Any]] = None - meta: Optional[Any] = None + data: Optional[List[PetCondition]] = None + meta: Optional[PaginatedMetaDataResult] = None class PetConsumption(BaseModel): @@ -790,16 +779,16 @@ class PetConsumptionStatus(BaseModel): class PetDashboard(BaseModel): pet_id: Optional[int] = None - movement: Optional[Any] = None - drinking: Optional[Any] = None - feeding: Optional[Any] = None - drinking_habit: Optional[Any] = None - drinking_alert: Optional[Any] = None - habit_model_state: Optional[Any] = None + movement: Optional[PetMovement] = None + drinking: Optional[PetConsumption] = None + feeding: Optional[PetConsumption] = None + drinking_habit: Optional[ConsumptionHabit] = None + drinking_alert: Optional[ConsumptionAlert] = None + habit_model_state: Optional[ConsumptionHabitModelState] = None class PetDashboardListDataResponse(BaseModel): - data: Optional[List[Any]] = None + data: Optional[List[PetDashboard]] = None class PetDashboardQuery(BaseModel): @@ -812,28 +801,23 @@ class PetDashboardQuery(BaseModel): class PetDataResponse(BaseModel): - data: Optional[Any] = None + data: Optional[Pet] = None -class PetGender(IntEnum): +class PetGenderEnum(IntEnum): FEMALE = 0 MALE = 1 -class PetGenderEnum(IntEnum): - VALUE_0 = 0 - VALUE_1 = 1 - - class PetInsight(BaseModel): pet_id: Optional[int] = None - drinking_habit: Optional[Any] = None - drinking_alert: Optional[Any] = None - habit_model_state: Optional[Any] = None + drinking_habit: Optional[ConsumptionHabit] = None + drinking_alert: Optional[ConsumptionAlert] = None + habit_model_state: Optional[ConsumptionHabitModelState] = None class PetInsightDataResponse(BaseModel): - data: Optional[Any] = None + data: Optional[PetInsight] = None class PetInsightQuery(BaseModel): @@ -850,8 +834,8 @@ class PetMovement(BaseModel): class PetPaginatedDataResult(BaseModel): - data: Optional[List[Any]] = None - meta: Optional[Any] = None + data: Optional[List[Pet]] = None + meta: Optional[PaginatedMetaDataResult] = None class PetPosition(BaseModel): @@ -865,15 +849,16 @@ class PetPosition(BaseModel): class PetPositionDataResponse(BaseModel): - data: Optional[Any] = None + data: Optional[PetPosition] = None class PetPositionPaginatedDataResult(BaseModel): - data: Optional[List[Any]] = None - meta: Optional[Any] = None + data: Optional[List[PetPosition]] = None + meta: Optional[PaginatedMetaDataResult] = None class PetPositionWhere(IntEnum): + UNKNOWN = 0 INSIDE = 1 OUTSIDE = 2 @@ -895,12 +880,12 @@ class PetStatus(BaseModel): class PetStatusDataResponse(BaseModel): - data: Optional[Any] = None + data: Optional[PetStatus] = None class PetStatusPaginatedDataResult(BaseModel): - data: Optional[List[Any]] = None - meta: Optional[Any] = None + data: Optional[List[PetStatus]] = None + meta: Optional[PaginatedMetaDataResult] = None class Photo(BaseModel): @@ -915,12 +900,12 @@ class Photo(BaseModel): class PhotoDataResponse(BaseModel): - data: Optional[Any] = None + data: Optional[Photo] = None class PhotoPaginatedDataResult(BaseModel): - data: Optional[List[Any]] = None - meta: Optional[Any] = None + data: Optional[List[Photo]] = None + meta: Optional[PaginatedMetaDataResult] = None class ProblemDetails(BaseModel): @@ -940,12 +925,12 @@ class Product(BaseModel): class ProductDataResponse(BaseModel): - data: Optional[Any] = None + data: Optional[Product] = None class ProductPaginatedDataResult(BaseModel): - data: Optional[List[Any]] = None - meta: Optional[Any] = None + data: Optional[List[Product]] = None + meta: Optional[PaginatedMetaDataResult] = None class ProductQuery(BaseModel): @@ -963,21 +948,21 @@ class PublicUser(BaseModel): class PublicUserDataResponse(BaseModel): - data: Optional[Any] = None + data: Optional[PublicUser] = None class ReportHousehold(BaseModel): pet_id: Optional[int] = None device_id: Optional[int] = None - movement: Optional[Any] = None - feeding: Optional[Any] = None - drinking: Optional[Any] = None - consumption_habit: Optional[List[Any]] = None - consumption_alert: Optional[List[Any]] = None + movement: Optional[ReportHouseholdMovementDataPoint] = None + feeding: Optional[ReportHouseholdFeedingDataPoint] = None + drinking: Optional[ReportHouseholdDrinkingDataPoint] = None + consumption_habit: Optional[List[ConsumptionHabit]] = None + consumption_alert: Optional[List[ConsumptionAlert]] = None class ReportHouseholdDataResponse(BaseModel): - data: Optional[Any] = None + data: Optional[ReportHousehold] = None class ReportHouseholdDrinking(BaseModel): @@ -987,7 +972,7 @@ class ReportHouseholdDrinking(BaseModel): context: Optional[int] = None bowl_count: Optional[int] = None device_id: Optional[int] = None - weights: Optional[List[Any]] = None + weights: Optional[List[ReportWeightFrame]] = None actual_weight: Optional[float] = None entry_user_id: Optional[int] = None exit_user_id: Optional[int] = None @@ -999,7 +984,7 @@ class ReportHouseholdDrinking(BaseModel): class ReportHouseholdDrinkingDataPoint(BaseModel): - datapoints: Optional[List[Any]] = None + datapoints: Optional[List[ReportHouseholdDrinking]] = None class ReportHouseholdFeeding(BaseModel): @@ -1009,7 +994,7 @@ class ReportHouseholdFeeding(BaseModel): context: Optional[int] = None bowl_count: Optional[int] = None device_id: Optional[int] = None - weights: Optional[List[Any]] = None + weights: Optional[List[ReportWeightFrame]] = None actual_weight: Optional[float] = None entry_user_id: Optional[int] = None exit_user_id: Optional[int] = None @@ -1021,11 +1006,11 @@ class ReportHouseholdFeeding(BaseModel): class ReportHouseholdFeedingDataPoint(BaseModel): - datapoints: Optional[List[Any]] = None + datapoints: Optional[List[ReportHouseholdFeeding]] = None class ReportHouseholdListDataResponse(BaseModel): - data: Optional[List[Any]] = None + data: Optional[List[ReportHousehold]] = None class ReportHouseholdMovement(BaseModel): @@ -1048,7 +1033,7 @@ class ReportHouseholdMovement(BaseModel): class ReportHouseholdMovementDataPoint(BaseModel): - datapoints: Optional[List[Any]] = None + datapoints: Optional[List[ReportHouseholdMovement]] = None class ReportHouseholdQuery(BaseModel): @@ -1074,20 +1059,13 @@ class RequestChangeStateResponseStatus(IntEnum): VALUE_5 = 5 -class Spayed(IntEnum): +class SpayedEnum(IntEnum): UNKNOWN = 0 YES = 1 NO = 2 -class SpayedEnum(IntEnum): - VALUE_0 = 0 - VALUE_1 = 1 - VALUE_2 = 2 - - -# TODO: Add descriptive names to numeric special profiles -class SpecialProfile(IntEnum): +class SpecialProfiles(IntEnum): SPECIAL_PROFILE_0 = 0 SPECIAL_PROFILE_1 = 1 SPECIAL_PROFILE_2 = 2 @@ -1097,16 +1075,6 @@ class SpecialProfile(IntEnum): SPECIAL_PROFILE_6 = 6 -class SpecialProfiles(IntEnum): - VALUE_0 = 0 - VALUE_1 = 1 - VALUE_2 = 2 - VALUE_3 = 3 - VALUE_4 = 4 - VALUE_5 = 5 - VALUE_6 = 6 - - class Species(BaseModel): id: Optional[int] = None name: Optional[str] = None @@ -1116,12 +1084,12 @@ class Species(BaseModel): class SpeciesDataResponse(BaseModel): - data: Optional[Any] = None + data: Optional[Species] = None class SpeciesPaginatedDataResult(BaseModel): - data: Optional[List[Any]] = None - meta: Optional[Any] = None + data: Optional[List[Species]] = None + meta: Optional[PaginatedMetaDataResult] = None class SpeciesQuery(BaseModel): @@ -1132,16 +1100,16 @@ class SpeciesQuery(BaseModel): class Start(BaseModel): - breed: Optional[List[Any]] = None - condition: Optional[List[Any]] = None - country: Optional[List[Any]] = None - language: Optional[List[Any]] = None - product: Optional[List[Any]] = None - timezone: Optional[List[Any]] = None + breed: Optional[List[Breed]] = None + condition: Optional[List[Condition]] = None + country: Optional[List[Country]] = None + language: Optional[List[Language]] = None + product: Optional[List[Product]] = None + timezone: Optional[List[Timezone]] = None class StartDataResponse(BaseModel): - data: Optional[Any] = None + data: Optional[Start] = None class StartQuery(BaseModel): @@ -1158,6 +1126,7 @@ class Tag(BaseModel): id: int tag: Optional[str] = None supported_product_ids: Optional[List[DeviceType]] = None + incompatible_product_ids: Optional[List[DeviceType]] = None version: int created_at: Optional[datetime] = None updated_at: Optional[datetime] = None @@ -1165,7 +1134,7 @@ class Tag(BaseModel): class TagDataResponse(BaseModel): - data: Optional[Any] = None + data: Optional[Tag] = None class TagDevice(BaseModel): @@ -1178,17 +1147,17 @@ class TagDevice(BaseModel): class TagDeviceDataResponse(BaseModel): - data: Optional[Any] = None + data: Optional[TagDevice] = None class TagDevicePaginatedDataResult(BaseModel): - data: Optional[List[Any]] = None - meta: Optional[Any] = None + data: Optional[List[TagDevice]] = None + meta: Optional[PaginatedMetaDataResult] = None class TagPaginatedDataResult(BaseModel): - data: Optional[List[Any]] = None - meta: Optional[Any] = None + data: Optional[List[Tag]] = None + meta: Optional[PaginatedMetaDataResult] = None class Timeline(BaseModel): @@ -1197,13 +1166,13 @@ class Timeline(BaseModel): data: Optional[str] = None created_at: Optional[datetime] = None updated_at: Optional[datetime] = None - households: Optional[List[Any]] = None - devices: Optional[List[Any]] = None - movements: Optional[List[Any]] = None - pets: Optional[List[Any]] = None - tags: Optional[List[Any]] = None - users: Optional[List[Any]] = None - weights: Optional[List[Any]] = None + households: Optional[List[Household]] = None + devices: Optional[List[Device]] = None + movements: Optional[List[Movement]] = None + pets: Optional[List[Pet]] = None + tags: Optional[List[Tag]] = None + users: Optional[List[PublicUser]] = None + weights: Optional[List[Weight]] = None class TimelineEventType(IntEnum): @@ -1312,8 +1281,8 @@ class TimelineEventType(IntEnum): class TimelinePaginatedDataResult(BaseModel): - data: Optional[List[Any]] = None - meta: Optional[Any] = None + data: Optional[List[Timeline]] = None + meta: Optional[PaginatedMetaDataResult] = None class Timezone(BaseModel): @@ -1326,12 +1295,12 @@ class Timezone(BaseModel): class TimezoneDataResponse(BaseModel): - data: Optional[Any] = None + data: Optional[Timezone] = None class TimezonePaginatedDataResult(BaseModel): - data: Optional[List[Any]] = None - meta: Optional[Any] = None + data: Optional[List[Timezone]] = None + meta: Optional[PaginatedMetaDataResult] = None class UpdateDevice(BaseModel): @@ -1339,7 +1308,7 @@ class UpdateDevice(BaseModel): class UpdateDeviceTag(BaseModel): - profile: Optional[Any] = None + profile: Optional[SpecialProfiles] = None class UpdateHousehold(BaseModel): @@ -1365,25 +1334,25 @@ class UpdateMe(BaseModel): country_id: Optional[int] = None photo_id: Optional[int] = None marketing_opt_in: Optional[bool] = None - weight_units: Optional[Any] = None - time_format: Optional[Any] = None + weight_units: Optional[UserWeightUnitEnum] = None + time_format: Optional[UserTimeFormatEnum] = None notifications: Optional[dict] = None password: Optional[str] = None class UpdatePet(BaseModel): name: str - gender: Optional[Any] = None + gender: Optional[PetGenderEnum] = None date_of_birth: Optional[datetime] = None weight: Optional[float] = None comments: Optional[str] = None breed_id: Optional[int] = None breed_id2: Optional[int] = None - spayed: Optional[Any] = None + spayed: Optional[SpayedEnum] = None food_type_id: Optional[int] = None photo_id: Optional[int] = None species_id: Optional[int] = None - conditions: Optional[List[Any]] = None + conditions: Optional[List[Condition]] = None class UpdatePhoto(BaseModel): @@ -1407,31 +1376,32 @@ class User(BaseModel): weight_units: Optional[int] = None time_format: Optional[int] = None notifications: Optional[dict] = None - photo: Optional[Any] = None + photo: Optional[Photo] = None version: Optional[int] = None created_at: Optional[datetime] = None updated_at: Optional[datetime] = None use_colour: Optional[str] = None + segments: Optional[List[str]] = None class UserClient(BaseModel): - platform: Optional[Any] = None + platform: Optional[UserClientPlatform] = None token: Optional[str] = None class UserClientDataResponse(BaseModel): - data: Optional[Any] = None + data: Optional[UserClient] = None class UserClientPaginatedDataResult(BaseModel): - data: Optional[List[Any]] = None - meta: Optional[Any] = None + data: Optional[List[UserClient]] = None + meta: Optional[PaginatedMetaDataResult] = None class UserClientPlatform(BaseModel): - app: Optional[Any] = None - device: Optional[Any] = None - locale: Optional[Any] = None + app: Optional[UserClientPlatformApp] = None + device: Optional[UserClientPlatformDevice] = None + locale: Optional[UserClientPlatformLocale] = None class UserClientPlatformApp(BaseModel): @@ -1441,9 +1411,9 @@ class UserClientPlatformApp(BaseModel): class UserClientPlatformDevice(BaseModel): name: Optional[str] = None - model: Optional[Any] = None + model: Optional[UserClientPlatformDeviceModel] = None uuid: Optional[str] = None - os: Optional[Any] = None + os: Optional[UserClientPlatformDeviceOs] = None class UserClientPlatformDeviceModel(BaseModel): @@ -1463,7 +1433,7 @@ class UserClientPlatformLocale(BaseModel): class UserDataResponse(BaseModel): - data: Optional[Any] = None + data: Optional[User] = None class UserSetting(BaseModel): @@ -1477,12 +1447,12 @@ class UserSetting(BaseModel): class UserSettingDataResponse(BaseModel): - data: Optional[Any] = None + data: Optional[UserSetting] = None class UserSettingPaginatedDataResult(BaseModel): - data: Optional[List[Any]] = None - meta: Optional[Any] = None + data: Optional[List[UserSetting]] = None + meta: Optional[PaginatedMetaDataResult] = None class UserTimeFormatEnum(IntEnum): @@ -1503,7 +1473,7 @@ class Weight(BaseModel): duration: Optional[int] = None created_at: Optional[datetime] = None updated_at: Optional[datetime] = None - frames: Optional[List[Any]] = None + frames: Optional[List[WeightFrame]] = None class WeightFrame(BaseModel): diff --git a/surehub_api/services/devices.py b/surehub_api/services/devices.py index be31d34..bc24d59 100644 --- a/surehub_api/services/devices.py +++ b/surehub_api/services/devices.py @@ -77,7 +77,7 @@ def assign_tag_to_device(device_id: int, tag_id: int) -> official.DeviceTag: uri = f"{settings.endpoint}/api/device/{device_id}/tag/{tag_id}" data = { - "profile": official.SpecialProfile.SPECIAL_PROFILE_0 # It is currently not known what this is for + "profile": official.SpecialProfiles.SPECIAL_PROFILE_0 # It is currently not known what this is for } response = requests.put(uri, headers=auth.auth_headers(), json=data) From c394ae3f28e4fcd9de400e74daf84c07e6102268 Mon Sep 17 00:00:00 2001 From: Fabian Eulitz Date: Sat, 28 Feb 2026 01:50:04 +0100 Subject: [PATCH 14/15] Update API response models to use specific types instead of Any --- surehub_api/entities/official_v2.py | 227 +++++++++++++--------------- surehub_api/services/pets.py | 4 +- 2 files changed, 110 insertions(+), 121 deletions(-) diff --git a/surehub_api/entities/official_v2.py b/surehub_api/entities/official_v2.py index 6df46cf..9b2c96f 100644 --- a/surehub_api/entities/official_v2.py +++ b/surehub_api/entities/official_v2.py @@ -23,7 +23,7 @@ class ConsumptionAlert(BaseModel): class ConsumptionHabit(BaseModel): - outcome: Optional[Any] = None + outcome: Optional[ConsumptionHabitOutcomeEnum] = None calendar_day: Optional[date] = None amount: Optional[int] = None lower_limit: Optional[int] = None @@ -45,21 +45,22 @@ class DeviceControlCurfew(BaseModel): class DeviceControlDualScanPetDoorV2(BaseModel): fast_polling: Optional[bool] = None - tag_profiles: Optional[List[Any]] = None - timed_access: Optional[List[Any]] = None - locking: Optional[Any] = None + tag_profiles: Optional[List[DeviceControlThalamusTagProfile]] = None + timed_access: Optional[List[DeviceControlThalamusMovementTagTimedAccess]] = None + locking: Optional[DualScanLockingModeEnum] = None lockdown: Optional[bool] = None timed_access_override: Optional[bool] = None + fail_safe: Optional[FailSafeOptions] = None class DeviceControlDualScanPetDoorV2DeviceControl(BaseModel): - data: Optional[Any] = None - pending: Optional[List[Any]] = None - results: Optional[List[Any]] = None + data: Optional[DeviceControlDualScanPetDoorV2] = None + pending: Optional[List[DeviceControlDualScanPetDoorV2DeviceControlPending]] = None + results: Optional[List[DeviceControlResult]] = None class DeviceControlDualScanPetDoorV2DeviceControlPending(BaseModel): - state: Optional[Any] = None + state: Optional[DeviceControlDualScanPetDoorV2] = None request_id: Optional[str] = None requested_at: Optional[datetime] = None requested_by: Optional[str] = None @@ -67,32 +68,33 @@ class DeviceControlDualScanPetDoorV2DeviceControlPending(BaseModel): class DeviceControlDualScanV2(BaseModel): fast_polling: Optional[bool] = None - tag_profiles: Optional[List[Any]] = None - timed_access: Optional[List[Any]] = None - locking: Optional[Any] = None + tag_profiles: Optional[List[DeviceControlThalamusTagProfile]] = None + timed_access: Optional[List[DeviceControlThalamusMovementTagTimedAccess]] = None + locking: Optional[DualScanLockingModeEnum] = None lockdown: Optional[bool] = None + fail_safe: Optional[FailSafeOptions] = None class DeviceControlDualScanV2DeviceControl(BaseModel): - data: Optional[Any] = None - pending: Optional[List[Any]] = None - results: Optional[List[Any]] = None + data: Optional[DeviceControlDualScanV2] = None + pending: Optional[List[DeviceControlDualScanV2DeviceControlPending]] = None + results: Optional[List[DeviceControlResult]] = None class DeviceControlDualScanV2DeviceControlPending(BaseModel): - state: Optional[Any] = None + state: Optional[DeviceControlDualScanV2] = None request_id: Optional[str] = None requested_at: Optional[datetime] = None requested_by: Optional[str] = None class DeviceControlFeederBowl(BaseModel): - settings: Optional[List[Any]] = None - type: Optional[Any] = None + settings: Optional[List[DeviceControlFeederBowlSettings]] = None + type: Optional[FeederBowlTypeEnum] = None class DeviceControlFeederBowlSettings(BaseModel): - food_type: Optional[Any] = None + food_type: Optional[FoodTypesEnum] = None target: Optional[float] = None @@ -102,7 +104,7 @@ class DeviceControlFeederLid(BaseModel): class DeviceControlFeederTagTimedFeeding(BaseModel): tag_id: Optional[int] = None - fasting: Optional[List[Any]] = None + fasting: Optional[List[DeviceControlFeederTimedFeeding]] = None class DeviceControlFeederTimedFeeding(BaseModel): @@ -113,41 +115,41 @@ class DeviceControlFeederTimedFeeding(BaseModel): class DeviceControlFeederV2(BaseModel): fast_polling: Optional[bool] = None - tag_profiles: Optional[List[Any]] = None - bowls: Optional[Any] = None - lid: Optional[Any] = None - tare: Optional[Any] = None - training_mode: Optional[Any] = None - timed_feeding: Optional[List[Any]] = None + tag_profiles: Optional[List[DeviceControlThalamusTagProfile]] = None + bowls: Optional[DeviceControlFeederBowl] = None + lid: Optional[DeviceControlFeederLid] = None + tare: Optional[ZeroAction] = None + training_mode: Optional[TrainingMode] = None + timed_feeding: Optional[List[DeviceControlFeederTagTimedFeeding]] = None class DeviceControlFeederV2DeviceControl(BaseModel): - data: Optional[Any] = None - pending: Optional[List[Any]] = None - results: Optional[List[Any]] = None + data: Optional[DeviceControlFeederV2] = None + pending: Optional[List[DeviceControlFeederV2DeviceControlPending]] = None + results: Optional[List[DeviceControlResult]] = None class DeviceControlFeederV2DeviceControlPending(BaseModel): - state: Optional[Any] = None + state: Optional[DeviceControlFeederV2] = None request_id: Optional[str] = None requested_at: Optional[datetime] = None requested_by: Optional[str] = None class DeviceControlHub(BaseModel): - led_mode: Optional[Any] = None - pairing_mode: Optional[Any] = None + led_mode: Optional[LedModeEnum] = None + pairing_mode: Optional[PairingModeEnum] = None flash_leds: Optional[bool] = None class DeviceControlHubDeviceControl(BaseModel): - data: Optional[Any] = None - pending: Optional[List[Any]] = None - results: Optional[List[Any]] = None + data: Optional[DeviceControlHub] = None + pending: Optional[List[DeviceControlHubDeviceControlPending]] = None + results: Optional[List[DeviceControlResult]] = None class DeviceControlHubDeviceControlPending(BaseModel): - state: Optional[Any] = None + state: Optional[DeviceControlHub] = None request_id: Optional[str] = None requested_at: Optional[datetime] = None requested_by: Optional[str] = None @@ -155,19 +157,19 @@ class DeviceControlHubDeviceControlPending(BaseModel): class DeviceControlNoIdDogBowl(BaseModel): fast_polling: Optional[bool] = None - tag_profiles: Optional[List[Any]] = None - food_type: Optional[Any] = None - substance_type: Optional[Any] = None + tag_profiles: Optional[List[DeviceControlThalamusTagProfile]] = None + food_type: Optional[FoodTypesEnum] = None + substance_type: Optional[SubstanceTypesEnum] = None class DeviceControlNoIdDogBowlDeviceControl(BaseModel): - data: Optional[Any] = None - pending: Optional[List[Any]] = None - results: Optional[List[Any]] = None + data: Optional[DeviceControlNoIdDogBowl] = None + pending: Optional[List[DeviceControlNoIdDogBowlDeviceControlPending]] = None + results: Optional[List[DeviceControlResult]] = None class DeviceControlNoIdDogBowlDeviceControlPending(BaseModel): - state: Optional[Any] = None + state: Optional[DeviceControlNoIdDogBowl] = None request_id: Optional[str] = None requested_at: Optional[datetime] = None requested_by: Optional[str] = None @@ -182,19 +184,19 @@ class DeviceControlPending(BaseModel): class DeviceControlPetDoor(BaseModel): fast_polling: Optional[bool] = None - curfew: Optional[Any] = None - locking: Optional[Any] = None - tag_profiles: Optional[List[Any]] = None + curfew: Optional[DeviceControlCurfew] = None + locking: Optional[PetDoorLockingModeEnum] = None + tag_profiles: Optional[List[DeviceControlPetDoorTagProfile]] = None class DeviceControlPetDoorDeviceControl(BaseModel): - data: Optional[Any] = None - pending: Optional[List[Any]] = None - results: Optional[List[Any]] = None + data: Optional[DeviceControlPetDoor] = None + pending: Optional[List[DeviceControlPetDoorDeviceControlPending]] = None + results: Optional[List[DeviceControlResult]] = None class DeviceControlPetDoorDeviceControlPending(BaseModel): - state: Optional[Any] = None + state: Optional[DeviceControlPetDoor] = None request_id: Optional[str] = None requested_at: Optional[datetime] = None requested_by: Optional[str] = None @@ -202,29 +204,29 @@ class DeviceControlPetDoorDeviceControlPending(BaseModel): class DeviceControlPetDoorMicrochip(BaseModel): microchip_number: Optional[str] = None - type: Optional[Any] = None + type: Optional[PetDoorTagType] = None class DeviceControlPetDoorTagProfile(BaseModel): tag_id: Optional[int] = None index: Optional[int] = None - microchip: Optional[Any] = None + microchip: Optional[DeviceControlPetDoorMicrochip] = None class DeviceControlPoseidon(BaseModel): fast_polling: Optional[bool] = None - tag_profiles: Optional[List[Any]] = None + tag_profiles: Optional[List[DeviceControlThalamusTagProfile]] = None learn_mode: Optional[bool] = None class DeviceControlPoseidonDeviceControl(BaseModel): - data: Optional[Any] = None - pending: Optional[List[Any]] = None - results: Optional[List[Any]] = None + data: Optional[DeviceControlPoseidon] = None + pending: Optional[List[DeviceControlPoseidonDeviceControlPending]] = None + results: Optional[List[DeviceControlResult]] = None class DeviceControlPoseidonDeviceControlPending(BaseModel): - state: Optional[Any] = None + state: Optional[DeviceControlPoseidon] = None request_id: Optional[str] = None requested_at: Optional[datetime] = None requested_by: Optional[str] = None @@ -233,24 +235,24 @@ class DeviceControlPoseidonDeviceControlPending(BaseModel): class DeviceControlResult(BaseModel): request_id: Optional[str] = None response_id: Optional[str] = None - status: Optional[Any] = None - status_id: Optional[Any] = None + status: Optional[RequestChangeStateResponseStatus] = None + status_id: Optional[RequestChangeStateResponseStatus] = None requested_at: Optional[datetime] = None committed_at: Optional[datetime] = None class DeviceControlThalamusMicrochip(BaseModel): microchip_number: Optional[str] = None - type: Optional[Any] = None + type: Optional[ThalamusTagType] = None class DeviceControlThalamusMovementTagTimedAccess(BaseModel): tag_id: Optional[int] = None - timed_access: Optional[List[Any]] = None + timed_access: Optional[List[DeviceControlThalamusMovementTimedAccess]] = None class DeviceControlThalamusMovementTimedAccess(BaseModel): - profile: ThalamusMovementTimedAccessAllowedSpecialProfile + profile: Optional[ThalamusMovementTimedAccessAllowedSpecialProfiles] lock_time: Optional[str] = None unlock_time: Optional[str] = None @@ -258,10 +260,10 @@ class DeviceControlThalamusMovementTimedAccess(BaseModel): class DeviceControlThalamusTagProfile(BaseModel): tag_id: Optional[int] = None index: Optional[int] = None - profile: Optional[Any] = None - action: Optional[Any] = None - request_action: Optional[Any] = None - microchip: Optional[Any] = None + profile: Optional[SpecialProfiles] = None + action: Optional[ChangeProfileActionEnum] = None + request_action: Optional[UpdateDeviceTagActions] = None + microchip: Optional[DeviceControlThalamusMicrochip] = None class DeviceTag(BaseModel): @@ -274,29 +276,17 @@ class DeviceTag(BaseModel): updated_at: Optional[datetime] = None -# TODO: Add descriptive names to device tag actions -class DeviceTagAction(IntEnum): - ACTION_0 = 0 - ACTION_1 = 1 - ACTION_2 = 2 - - class DeviceTagData(BaseModel): - data: Optional[Any] = None - pending: Optional[List[Any]] = None - results: Optional[List[Any]] = None + data: Optional[DeviceTag] = None + pending: Optional[List[DeviceControlPending]] = None + results: Optional[List[DeviceControlResult]] = None -class DeviceTagProfile(IntEnum): +class DeviceTagProfiles(IntEnum): DISABLED = 2 ENABLED = 3 -class DeviceTagProfiles(IntEnum): - VALUE_2 = 2 - VALUE_3 = 3 - - class DeviceV2(BaseModel): id: Optional[int] = None @@ -336,6 +326,11 @@ class Error(BaseModel): error: Optional[dict] = None +class FailSafeOptions(IntEnum): + VALUE_0 = 0 + VALUE_1 = 1 + + class FeederBowlTypeEnum(IntEnum): VALUE_1 = 1 VALUE_4 = 4 @@ -367,9 +362,9 @@ class Movement(BaseModel): device_id: Optional[int] = None tag_id: Optional[int] = None user_id: Optional[int] = None - direction: Optional[Any] = None - side: Optional[Any] = None - type: Optional[Any] = None + direction: Optional[DoorDirectionEnum] = None + side: Optional[DoorSide] = None + type: Optional[DoorStatusEnum] = None created_at: Optional[datetime] = None updated_at: Optional[datetime] = None @@ -437,21 +432,21 @@ class PublicUser(BaseModel): id: Optional[int] = None name: Optional[str] = None photo_id: Optional[int] = None - photo: Optional[Any] = None + photo: Optional[Photo] = None class ReportHousehold(BaseModel): pet_id: Optional[int] = None device_id: Optional[int] = None - movement: Optional[Any] = None - feeding: Optional[Any] = None - drinking: Optional[Any] = None - consumption_habit: Optional[List[Any]] = None - consumption_alert: Optional[List[Any]] = None + movement: Optional[ReportHouseholdMovementDataPoint] = None + feeding: Optional[ReportHouseholdFeedingDataPoint] = None + drinking: Optional[ReportHouseholdDrinkingDataPoint] = None + consumption_habit: Optional[List[ConsumptionHabit]] = None + consumption_alert: Optional[List[ConsumptionAlert]] = None class ReportHouseholdDataResponse(BaseModel): - data: Optional[Any] = None + data: Optional[ReportHousehold] = None class ReportHouseholdDrinking(BaseModel): @@ -461,7 +456,7 @@ class ReportHouseholdDrinking(BaseModel): context: Optional[int] = None bowl_count: Optional[int] = None device_id: Optional[int] = None - weights: Optional[List[Any]] = None + weights: Optional[List[ReportWeightFrame]] = None actual_weight: Optional[float] = None entry_user_id: Optional[int] = None exit_user_id: Optional[int] = None @@ -473,7 +468,7 @@ class ReportHouseholdDrinking(BaseModel): class ReportHouseholdDrinkingDataPoint(BaseModel): - datapoints: Optional[List[Any]] = None + datapoints: Optional[List[ReportHouseholdDrinking]] = None class ReportHouseholdEvent(IntEnum): @@ -489,7 +484,7 @@ class ReportHouseholdFeeding(BaseModel): context: Optional[int] = None bowl_count: Optional[int] = None device_id: Optional[int] = None - weights: Optional[List[Any]] = None + weights: Optional[List[ReportWeightFrame]] = None actual_weight: Optional[float] = None entry_user_id: Optional[int] = None exit_user_id: Optional[int] = None @@ -501,7 +496,7 @@ class ReportHouseholdFeeding(BaseModel): class ReportHouseholdFeedingDataPoint(BaseModel): - datapoints: Optional[List[Any]] = None + datapoints: Optional[List[ReportHouseholdFeeding]] = None class ReportHouseholdMovement(BaseModel): @@ -524,13 +519,13 @@ class ReportHouseholdMovement(BaseModel): class ReportHouseholdMovementDataPoint(BaseModel): - datapoints: Optional[List[Any]] = None + datapoints: Optional[List[ReportHouseholdMovement]] = None class ReportHouseholdV2Query(BaseModel): from_: datetime = Field(alias='from') to: datetime - event_type: Optional[Any] = None + event_type: Optional[ReportHouseholdEvent] = None class ReportWeightFrame(BaseModel): @@ -571,18 +566,12 @@ class TagV2(BaseModel): id: Optional[int] = None -class ThalamusMovementTimedAccessAllowedSpecialProfile(IntEnum): +class ThalamusMovementTimedAccessAllowedSpecialProfiles(IntEnum): SPECIAL_PROFILE_3 = 3 SPECIAL_PROFILE_5 = 5 SPECIAL_PROFILE_6 = 6 -class ThalamusMovementTimedAccessAllowedSpecialProfiles(IntEnum): - VALUE_3 = 3 - VALUE_5 = 5 - VALUE_6 = 6 - - class ThalamusTagType(IntEnum): VALUE_0 = 0 VALUE_1 = 1 @@ -601,18 +590,18 @@ class TimelineV2(BaseModel): data: Optional[str] = None created_at: Optional[datetime] = None updated_at: Optional[datetime] = None - household: Optional[List[Any]] = None - devices: Optional[List[Any]] = None - movements: Optional[List[Any]] = None - pets: Optional[List[Any]] = None - tags: Optional[List[Any]] = None - users: Optional[List[Any]] = None - weights: Optional[List[Any]] = None + household: Optional[List[HouseholdV2]] = None + devices: Optional[List[DeviceV2]] = None + movements: Optional[List[Movement]] = None + pets: Optional[List[PetV2]] = None + tags: Optional[List[TagV2]] = None + users: Optional[List[PublicUser]] = None + weights: Optional[List[Weight]] = None class TimelineV2PaginatedDataResult(BaseModel): - data: Optional[List[Any]] = None - meta: Optional[Any] = None + data: Optional[List[TimelineV2]] = None + meta: Optional[PaginatedMetaDataResult] = None class TrainingMode(IntEnum): @@ -625,8 +614,8 @@ class TrainingMode(IntEnum): class UpdateDeviceTag(BaseModel): tag_id: Optional[int] = None - request_action: DeviceTagAction - profile: DeviceTagProfile + request_action: UpdateDeviceTagActions + profile: DeviceTagProfiles timed_access: Optional[DeviceControlThalamusMovementTimedAccess] = None @@ -638,9 +627,9 @@ class UpdateDeviceTagActions(IntEnum): class UpdateDeviceTagV2(BaseModel): tag_id: Optional[int] = None - request_action: Optional[Any] = None - profile: Optional[Any] = None - timed_access: Optional[List[Any]] = None + request_action: Optional[UpdateDeviceTagActions] = None + profile: Optional[DeviceTagProfiles] = None + timed_access: Optional[List[DeviceControlThalamusMovementTimedAccess]] = None class Weight(BaseModel): @@ -651,7 +640,7 @@ class Weight(BaseModel): duration: Optional[int] = None created_at: Optional[datetime] = None updated_at: Optional[datetime] = None - frames: Optional[List[Any]] = None + frames: Optional[List[WeightFrame]] = None class WeightFrame(BaseModel): diff --git a/surehub_api/services/pets.py b/surehub_api/services/pets.py index 683cfb4..e783d91 100644 --- a/surehub_api/services/pets.py +++ b/surehub_api/services/pets.py @@ -77,8 +77,8 @@ def _update_indoor_only_mode(pet_id: int, indoor_only: bool, household_ids: List detail=f"Failed to update indoor mode for pet id {pet_id}, because no devices supporting indoor-only mode were found", ) - request_action = official_v2.DeviceTagAction.ACTION_0 - profile = official_v2.DeviceTagProfile.ENABLED if indoor_only else official_v2.DeviceTagProfile.DISABLED + request_action = official_v2.UpdateDeviceTagActions.VALUE_0 + profile = official_v2.DeviceTagProfiles.ENABLED if indoor_only else official_v2.DeviceTagProfiles.DISABLED for device in supported_devices: uri = f"{settings.endpoint}/api/v2/device/{device.id}/tag/async" From cfbd39c5aa2dea6e71fc46d77f0550fe94c74819 Mon Sep 17 00:00:00 2001 From: Fabian Eulitz Date: Sat, 28 Feb 2026 02:08:52 +0100 Subject: [PATCH 15/15] Unify enums and add documentation --- surehub_api/entities/enums.py | 453 ++++++++++++++++++++++++++++ surehub_api/entities/official.py | 288 +++--------------- surehub_api/entities/official_v2.py | 224 +++----------- 3 files changed, 526 insertions(+), 439 deletions(-) create mode 100644 surehub_api/entities/enums.py diff --git a/surehub_api/entities/enums.py b/surehub_api/entities/enums.py new file mode 100644 index 0000000..f574c70 --- /dev/null +++ b/surehub_api/entities/enums.py @@ -0,0 +1,453 @@ +from __future__ import annotations + +from enum import IntEnum +from typing import Any + +from pydantic import GetJsonSchemaHandler +from pydantic_core import CoreSchema + + +class ConsumptionHabitModelState(IntEnum): + VALUE_0 = 0 + VALUE_1 = 1 + VALUE_2 = 2 + VALUE_3 = 3 + + +class ConsumptionHabitOutcome(IntEnum): + OK = 0 + BELOW_LIMIT = 1 + ABOVE_LIMIT = 2 + + @classmethod + def __get_pydantic_json_schema__(cls, core_schema: CoreSchema, handler: GetJsonSchemaHandler) -> dict[str, Any]: + schema = handler(core_schema) + schema["title"] = "Consumption Habit Outcome" + schema["description"] = ( + "Outcome of a consumption habit evaluation:\n" + "- `0` (OK): Within normal range\n" + "- `1` (BELOW_LIMIT): Below the expected limit\n" + "- `2` (ABOVE_LIMIT): Above the expected limit" + ) + return schema + + +class DeviceType(IntEnum): + UNKNOWN_DEVICE_0 = 0 + HUB = 1 + REPEATER = 2 + PET_DOOR_CONNECT = 3 + PET_FEEDER_CONNECT = 4 + PROGRAMMER = 5 + DUALSCAN_CAT_FLAP_CONNECT = 6 + MICROCHIP_FEEDER = 7 + FELAQUA_CONNECT = 8 # Poseidon + CAT_FLAP_CONNECT = 9 + DUALSCAN_PET_DOOR_CONNECT = 10 + DOG_BOWL_CONNECT = 32 # Cerberus + UNKNOWN_DEVICE_255 = 255 + + @classmethod + def __get_pydantic_json_schema__(cls, core_schema: CoreSchema, handler: GetJsonSchemaHandler) -> dict[str, Any]: + schema = handler(core_schema) + schema["title"] = "Device Type" + schema["description"] = ( + "Type of Sure Petcare device:\n" + "- `0` (UNKNOWN_DEVICE_0): Unknown device\n" + "- `1` (HUB): Hub\n" + "- `2` (REPEATER): Repeater\n" + "- `3` (PET_DOOR_CONNECT): Pet Door Connect\n" + "- `4` (PET_FEEDER_CONNECT): Pet Feeder Connect\n" + "- `5` (PROGRAMMER): Programmer\n" + "- `6` (DUALSCAN_CAT_FLAP_CONNECT): DualScan Cat Flap Connect\n" + "- `7` (MICROCHIP_FEEDER): Microchip Feeder\n" + "- `8` (FELAQUA_CONNECT): Felaqua Connect (Poseidon)\n" + "- `9` (CAT_FLAP_CONNECT): Cat Flap Connect\n" + "- `10` (DUALSCAN_PET_DOOR_CONNECT): DualScan Pet Door Connect\n" + "- `32` (DOG_BOWL_CONNECT): Dog Bowl Connect (Cerberus)\n" + "- `255` (UNKNOWN_DEVICE_255): Unknown device" + ) + return schema + + +class DoorDirection(IntEnum): + VALUE_0 = 0 + VALUE_1 = 1 + VALUE_2 = 2 + VALUE_3 = 3 + + +class DoorSide(IntEnum): + VALUE_0 = 0 + VALUE_1 = 1 + VALUE_2 = 2 + + +class DoorStatus(IntEnum): + VALUE_4 = 4 + VALUE_6 = 6 + VALUE_8 = 8 + VALUE_10 = 10 + VALUE_11 = 11 + VALUE_12 = 12 + VALUE_13 = 13 + + +class HouseholdInviteStatus(IntEnum): + PENDING = 0 + ACCEPTED = 1 + EXPIRED = 2 + + @classmethod + def __get_pydantic_json_schema__(cls, core_schema: CoreSchema, handler: GetJsonSchemaHandler) -> dict[str, Any]: + schema = handler(core_schema) + schema["title"] = "Household Invite Status" + schema["description"] = ( + "Status of a household invitation:\n" + "- `0` (PENDING): Invitation is pending\n" + "- `1` (ACCEPTED): Invitation has been accepted\n" + "- `2` (EXPIRED): Invitation has expired" + ) + return schema + + +class LockMode(IntEnum): + NONE = 0 + IN = 1 + OUT = 2 + BOTH = 3 + + @classmethod + def __get_pydantic_json_schema__(cls, core_schema: CoreSchema, handler: GetJsonSchemaHandler) -> dict[str, Any]: + schema = handler(core_schema) + schema["title"] = "Lock Mode" + schema["description"] = ( + "Controls the direction of locking:\n" + "- `0` (NONE): No locking\n" + "- `1` (IN): Lock inbound only\n" + "- `2` (OUT): Lock outbound only\n" + "- `3` (BOTH): Lock both directions" + ) + return schema + + +class PetGender(IntEnum): + FEMALE = 0 + MALE = 1 + + @classmethod + def __get_pydantic_json_schema__(cls, core_schema: CoreSchema, handler: GetJsonSchemaHandler) -> dict[str, Any]: + schema = handler(core_schema) + schema["title"] = "Pet Gender" + schema["description"] = ( + "Gender of the pet:\n" + "- `0` (FEMALE): Female\n" + "- `1` (MALE): Male" + ) + return schema + + +class PetPositionWhere(IntEnum): + UNKNOWN = 0 + INSIDE = 1 + OUTSIDE = 2 + + @classmethod + def __get_pydantic_json_schema__(cls, core_schema: CoreSchema, handler: GetJsonSchemaHandler) -> dict[str, Any]: + schema = handler(core_schema) + schema["title"] = "Pet Position" + schema["description"] = ( + "Where the pet is located:\n" + "- `0` (UNKNOWN): Unknown position\n" + "- `1` (INSIDE): Inside the house\n" + "- `2` (OUTSIDE): Outside the house" + ) + return schema + + +class RequestChangeStateResponseStatus(IntEnum): + VALUE_0 = 0 + VALUE_1 = 1 + VALUE_2 = 2 + VALUE_3 = 3 + VALUE_4 = 4 + VALUE_5 = 5 + + +class Spayed(IntEnum): + UNKNOWN = 0 + YES = 1 + NO = 2 + + @classmethod + def __get_pydantic_json_schema__(cls, core_schema: CoreSchema, handler: GetJsonSchemaHandler) -> dict[str, Any]: + schema = handler(core_schema) + schema["title"] = "Spayed/Neutered Status" + schema["description"] = ( + "Whether the pet has been spayed or neutered:\n" + "- `0` (UNKNOWN): Unknown\n" + "- `1` (YES): Spayed/neutered\n" + "- `2` (NO): Not spayed/neutered" + ) + return schema + + +class SpecialProfiles(IntEnum): + SPECIAL_PROFILE_0 = 0 + SPECIAL_PROFILE_1 = 1 + SPECIAL_PROFILE_2 = 2 + SPECIAL_PROFILE_3 = 3 + SPECIAL_PROFILE_4 = 4 + SPECIAL_PROFILE_5 = 5 + SPECIAL_PROFILE_6 = 6 + + +class SubstanceTypes(IntEnum): + VALUE_0 = 0 + VALUE_1 = 1 + VALUE_2 = 2 + + +class TimelineEventType(IntEnum): + VALUE_0 = 0 + VALUE_1 = 1 + VALUE_2 = 2 + VALUE_3 = 3 + VALUE_6 = 6 + VALUE_7 = 7 + VALUE_9 = 9 + VALUE_10 = 10 + VALUE_11 = 11 + VALUE_12 = 12 + VALUE_13 = 13 + VALUE_14 = 14 + VALUE_17 = 17 + VALUE_18 = 18 + VALUE_19 = 19 + VALUE_20 = 20 + VALUE_21 = 21 + VALUE_22 = 22 + VALUE_23 = 23 + VALUE_24 = 24 + VALUE_25 = 25 + VALUE_28 = 28 + VALUE_29 = 29 + VALUE_30 = 30 + VALUE_31 = 31 + VALUE_32 = 32 + VALUE_33 = 33 + VALUE_34 = 34 + VALUE_35 = 35 + VALUE_36 = 36 + VALUE_40 = 40 + VALUE_50 = 50 + VALUE_51 = 51 + VALUE_52 = 52 + VALUE_53 = 53 + VALUE_54 = 54 + VALUE_55 = 55 + VALUE_9999 = 9999 + VALUE_19999 = 19999 + VALUE_20000 = 20000 + VALUE_20001 = 20001 + VALUE_20002 = 20002 + VALUE_20003 = 20003 + VALUE_20004 = 20004 + VALUE_20005 = 20005 + VALUE_20006 = 20006 + VALUE_20007 = 20007 + VALUE_20008 = 20008 + VALUE_20009 = 20009 + VALUE_20010 = 20010 + VALUE_20011 = 20011 + VALUE_20012 = 20012 + VALUE_20399 = 20399 + VALUE_20400 = 20400 + VALUE_20401 = 20401 + VALUE_20402 = 20402 + VALUE_20403 = 20403 + VALUE_20404 = 20404 + VALUE_20405 = 20405 + VALUE_20406 = 20406 + VALUE_20407 = 20407 + VALUE_20408 = 20408 + VALUE_20409 = 20409 + VALUE_20410 = 20410 + VALUE_20411 = 20411 + VALUE_20999 = 20999 + VALUE_21000 = 21000 + VALUE_21001 = 21001 + VALUE_21002 = 21002 + VALUE_21003 = 21003 + VALUE_21004 = 21004 + VALUE_21005 = 21005 + VALUE_21006 = 21006 + VALUE_21007 = 21007 + VALUE_21008 = 21008 + VALUE_21009 = 21009 + VALUE_21010 = 21010 + VALUE_21011 = 21011 + VALUE_21012 = 21012 + VALUE_21013 = 21013 + VALUE_21014 = 21014 + VALUE_21015 = 21015 + VALUE_21016 = 21016 + VALUE_21017 = 21017 + VALUE_21018 = 21018 + VALUE_21019 = 21019 + VALUE_21020 = 21020 + VALUE_21999 = 21999 + VALUE_23000 = 23000 + VALUE_23001 = 23001 + VALUE_23002 = 23002 + VALUE_23003 = 23003 + VALUE_23004 = 23004 + VALUE_23005 = 23005 + VALUE_23006 = 23006 + VALUE_23999 = 23999 + VALUE_24999 = 24999 + VALUE_26999 = 26999 + VALUE_28999 = 28999 + VALUE_30000 = 30000 + VALUE_30001 = 30001 + VALUE_30002 = 30002 + + +class UserTimeFormat(IntEnum): + VALUE_0 = 0 + VALUE_1 = 1 + + +class UserWeightUnit(IntEnum): + VALUE_0 = 0 + VALUE_1 = 1 + + +class ChangeProfileAction(IntEnum): + VALUE_0 = 0 + VALUE_1 = 1 + VALUE_2 = 2 + + +class DeviceTagProfiles(IntEnum): + DISABLED = 2 + ENABLED = 3 + + @classmethod + def __get_pydantic_json_schema__(cls, core_schema: CoreSchema, handler: GetJsonSchemaHandler) -> dict[str, Any]: + schema = handler(core_schema) + schema["title"] = "Device Tag Profile" + schema["description"] = ( + "Profile setting for a device tag:\n" + "- `2` (DISABLED): Tag profile disabled\n" + "- `3` (ENABLED): Tag profile enabled" + ) + return schema + + +class DualScanLockingMode(IntEnum): + VALUE_0 = 0 + VALUE_1 = 1 + VALUE_2 = 2 + VALUE_3 = 3 + + +class FailSafeOptions(IntEnum): + VALUE_0 = 0 + VALUE_1 = 1 + + +class FeederBowlType(IntEnum): + VALUE_1 = 1 + VALUE_4 = 4 + VALUE_5 = 5 + + +class FoodTypes(IntEnum): + VALUE_0 = 0 + VALUE_1 = 1 + VALUE_2 = 2 + VALUE_3 = 3 + + +class LedMode(IntEnum): + VALUE_0 = 0 + VALUE_1 = 1 + VALUE_2 = 2 + VALUE_3 = 3 + VALUE_4 = 4 + VALUE_128 = 128 + + +class PairingMode(IntEnum): + VALUE_0 = 0 + VALUE_1 = 1 + VALUE_2 = 2 + VALUE_3 = 3 + VALUE_128 = 128 + + +class PetDoorLockingMode(IntEnum): + VALUE_0 = 0 + VALUE_1 = 1 + VALUE_2 = 2 + VALUE_3 = 3 + VALUE_4 = 4 + VALUE_5 = 5 + + +class PetDoorTagType(IntEnum): + VALUE_0 = 0 + VALUE_1 = 1 + VALUE_2 = 2 + VALUE_4 = 4 + VALUE_8 = 8 + VALUE_16 = 16 + VALUE_32 = 32 + VALUE_64 = 64 + VALUE_128 = 128 + + +class ReportHouseholdEvent(IntEnum): + VALUE_0 = 0 + VALUE_1 = 1 + VALUE_2 = 2 + + +class ThalamusMovementTimedAccessAllowedSpecialProfiles(IntEnum): + VALUE_3 = 3 + VALUE_5 = 5 + VALUE_6 = 6 + + +class ThalamusTagType(IntEnum): + VALUE_0 = 0 + VALUE_1 = 1 + VALUE_2 = 2 + VALUE_3 = 3 + VALUE_4 = 4 + VALUE_5 = 5 + VALUE_6 = 6 + VALUE_7 = 7 + VALUE_8 = 8 + + +class TrainingMode(IntEnum): + VALUE_0 = 0 + VALUE_1 = 1 + VALUE_2 = 2 + VALUE_3 = 3 + VALUE_4 = 4 + + +class UpdateDeviceTagActions(IntEnum): + VALUE_0 = 0 + VALUE_1 = 1 + VALUE_2 = 2 + + +class ZeroAction(IntEnum): + VALUE_0 = 0 + VALUE_1 = 1 + VALUE_2 = 2 + VALUE_3 = 3 diff --git a/surehub_api/entities/official.py b/surehub_api/entities/official.py index a881b8e..fc43e94 100644 --- a/surehub_api/entities/official.py +++ b/surehub_api/entities/official.py @@ -1,17 +1,34 @@ from __future__ import annotations from datetime import datetime, time, date -from enum import IntEnum from typing import Optional, List, Any -from pydantic import BaseModel, Field, GetJsonSchemaHandler -from pydantic_core import CoreSchema +from pydantic import BaseModel, Field + +from surehub_api.entities.enums import ( + ConsumptionHabitModelState, + ConsumptionHabitOutcome, + DeviceType, + DoorDirection, + DoorSide, + DoorStatus, + HouseholdInviteStatus, + LockMode, + PetGender, + PetPositionWhere, + RequestChangeStateResponseStatus, + Spayed, + SpecialProfiles, + TimelineEventType, + UserTimeFormat, + UserWeightUnit, +) class AnimoPet(BaseModel): id: Optional[int] = None name: Optional[str] = None - gender: Optional[PetGenderEnum] = None + gender: Optional[PetGender] = None date_of_birth: Optional[datetime] = None weight: Optional[str] = None breed_id: Optional[int] = None @@ -52,8 +69,8 @@ class AuthRegister(BaseModel): country_id: int photo_id: Optional[int] = None marketing_opt_in: bool - weight_units: Optional[UserWeightUnitEnum] = None - time_format: Optional[UserTimeFormatEnum] = None + weight_units: Optional[UserWeightUnit] = None + time_format: Optional[UserTimeFormat] = None device_id: str @@ -143,7 +160,7 @@ class ConsumptionAlert(BaseModel): class ConsumptionHabit(BaseModel): - outcome: ConsumptionHabitOutcomeEnum + outcome: ConsumptionHabitOutcome calendar_day: date amount: int lower_limit: Optional[int] = None @@ -154,20 +171,7 @@ class ConsumptionHabit(BaseModel): class ConsumptionHabitModelState(BaseModel): pet_id: Optional[int] = None tag_id: Optional[int] = None - state: Optional[ConsumptionHabitModelStateEnum] = None - - -class ConsumptionHabitModelStateEnum(IntEnum): - VALUE_0 = 0 - VALUE_1 = 1 - VALUE_2 = 2 - VALUE_3 = 3 - - -class ConsumptionHabitOutcomeEnum(IntEnum): - OK = 0 - BELOW_LIMIT = 1 - ABOVE_LIMIT = 2 + state: Optional[ConsumptionHabitModelState] = None class Country(BaseModel): @@ -212,13 +216,13 @@ class CreateHouseholdInvite(BaseModel): class CreatePet(BaseModel): name: str - gender: Optional[PetGenderEnum] = None + gender: Optional[PetGender] = None date_of_birth: Optional[datetime] = None weight: Optional[float] = None comments: Optional[str] = None breed_id: Optional[int] = None breed_id2: Optional[int] = None - spayed: Optional[SpayedEnum] = None + spayed: Optional[Spayed] = None food_type_id: Optional[int] = None photo_id: Optional[int] = None species_id: Optional[int] = None @@ -268,26 +272,6 @@ class Device(BaseModel): tags: Optional[List[DeviceTag]] = None -class LockMode(IntEnum): - NONE = 0 - IN = 1 - OUT = 2 - BOTH = 3 - - @classmethod - def __get_pydantic_json_schema__(cls, core_schema: CoreSchema, handler: GetJsonSchemaHandler) -> dict[str, Any]: - schema = handler(core_schema) - schema["title"] = "Lock Mode" - schema["description"] = ( - "Controls the direction of locking:\n" - "- `0` (NONE): No locking\n" - "- `1` (IN): Lock inbound only\n" - "- `2` (OUT): Lock outbound only\n" - "- `3` (BOTH): Lock both directions" - ) - return schema - - class DeviceControl(BaseModel): curfew: Curfew | List[Curfew] | None = None fast_polling: Optional[bool] = None @@ -396,48 +380,9 @@ class DeviceTagPaginatedDataResult(BaseModel): meta: Optional[PaginatedMetaDataResult] = None -class DeviceType(IntEnum): - UNKNOWN_DEVICE_0 = 0 - HUB = 1 - REPEATER = 2 - PET_DOOR_CONNECT = 3 - PET_FEEDER_CONNECT = 4 - PROGRAMMER = 5 - DUALSCAN_CAT_FLAP_CONNECT = 6 - MICROCHIP_FEEDER = 7 - FELAQUA_CONNECT = 8 # Poseidon - CAT_FLAP_CONNECT = 9 - DUALSCAN_PET_DOOR_CONNECT = 10 - DOG_BOWL_CONNECT = 32 # Cerberus - UNKNOWN_DEVICE_255 = 255 - - # TODO: Add descriptive names to numeric special profiles -class DoorDirectionEnum(IntEnum): - VALUE_0 = 0 - VALUE_1 = 1 - VALUE_2 = 2 - VALUE_3 = 3 - - -class DoorSide(IntEnum): - VALUE_0 = 0 - VALUE_1 = 1 - VALUE_2 = 2 - - -class DoorStatusEnum(IntEnum): - VALUE_4 = 4 - VALUE_6 = 6 - VALUE_8 = 8 - VALUE_10 = 10 - VALUE_11 = 11 - VALUE_12 = 12 - VALUE_13 = 13 - - class DrinkingReport(BaseModel): datapoints: Optional[List[DrinkingReportDataPoint]] = None @@ -562,12 +507,6 @@ class HouseholdInvitePaginatedDataResult(BaseModel): meta: Optional[PaginatedMetaDataResult] = None -class HouseholdInviteStatus(IntEnum): - PENDING = 0 - ACCEPTED = 1 - EXPIRED = 2 - - class HouseholdInviteUser(BaseModel): creator: Optional[PublicUser] = None acceptor: Optional[PublicUser] = None @@ -668,9 +607,9 @@ class Movement(BaseModel): device_id: Optional[int] = None tag_id: Optional[int] = None user_id: Optional[int] = None - direction: Optional[DoorDirectionEnum] = None + direction: Optional[DoorDirection] = None side: Optional[DoorSide] = None - type: Optional[DoorStatusEnum] = None + type: Optional[DoorStatus] = None created_at: Optional[datetime] = None updated_at: Optional[datetime] = None @@ -725,7 +664,7 @@ class PaginatedMetaDataResult(BaseModel): class Pet(BaseModel): id: int name: Optional[str] = None - gender: Optional[PetGenderEnum] = None + gender: Optional[PetGender] = None date_of_birth: Optional[datetime] = None weight: Optional[str] = None comments: Optional[str] = None @@ -735,7 +674,7 @@ class Pet(BaseModel): household_id: Optional[int] = None photo_id: Optional[int] = None species_id: Optional[int] = None - spayed: Optional[SpayedEnum] = None + spayed: Optional[Spayed] = None tag_id: Optional[int] = None version: int created_at: Optional[datetime] = None @@ -804,11 +743,6 @@ class PetDataResponse(BaseModel): data: Optional[Pet] = None -class PetGenderEnum(IntEnum): - FEMALE = 0 - MALE = 1 - - class PetInsight(BaseModel): pet_id: Optional[int] = None drinking_habit: Optional[ConsumptionHabit] = None @@ -857,12 +791,6 @@ class PetPositionPaginatedDataResult(BaseModel): meta: Optional[PaginatedMetaDataResult] = None -class PetPositionWhere(IntEnum): - UNKNOWN = 0 - INSIDE = 1 - OUTSIDE = 2 - - class PetReport(BaseModel): movement: MovementReport feeding: FeedingReport @@ -1050,31 +978,6 @@ class ReportWeightFrame(BaseModel): multi: Optional[bool] = None -class RequestChangeStateResponseStatus(IntEnum): - VALUE_0 = 0 - VALUE_1 = 1 - VALUE_2 = 2 - VALUE_3 = 3 - VALUE_4 = 4 - VALUE_5 = 5 - - -class SpayedEnum(IntEnum): - UNKNOWN = 0 - YES = 1 - NO = 2 - - -class SpecialProfiles(IntEnum): - SPECIAL_PROFILE_0 = 0 - SPECIAL_PROFILE_1 = 1 - SPECIAL_PROFILE_2 = 2 - SPECIAL_PROFILE_3 = 3 - SPECIAL_PROFILE_4 = 4 - SPECIAL_PROFILE_5 = 5 - SPECIAL_PROFILE_6 = 6 - - class Species(BaseModel): id: Optional[int] = None name: Optional[str] = None @@ -1116,12 +1019,6 @@ class StartQuery(BaseModel): lang: Optional[str] = None -class SubstanceTypesEnum(IntEnum): - VALUE_0 = 0 - VALUE_1 = 1 - VALUE_2 = 2 - - class Tag(BaseModel): id: int tag: Optional[str] = None @@ -1175,111 +1072,6 @@ class Timeline(BaseModel): weights: Optional[List[Weight]] = None -class TimelineEventType(IntEnum): - VALUE_0 = 0 - VALUE_1 = 1 - VALUE_2 = 2 - VALUE_3 = 3 - VALUE_6 = 6 - VALUE_7 = 7 - VALUE_9 = 9 - VALUE_10 = 10 - VALUE_11 = 11 - VALUE_12 = 12 - VALUE_13 = 13 - VALUE_14 = 14 - VALUE_17 = 17 - VALUE_18 = 18 - VALUE_19 = 19 - VALUE_20 = 20 - VALUE_21 = 21 - VALUE_22 = 22 - VALUE_23 = 23 - VALUE_24 = 24 - VALUE_25 = 25 - VALUE_28 = 28 - VALUE_29 = 29 - VALUE_30 = 30 - VALUE_31 = 31 - VALUE_32 = 32 - VALUE_33 = 33 - VALUE_34 = 34 - VALUE_35 = 35 - VALUE_36 = 36 - VALUE_40 = 40 - VALUE_50 = 50 - VALUE_51 = 51 - VALUE_52 = 52 - VALUE_53 = 53 - VALUE_54 = 54 - VALUE_55 = 55 - VALUE_9999 = 9999 - VALUE_19999 = 19999 - VALUE_20000 = 20000 - VALUE_20001 = 20001 - VALUE_20002 = 20002 - VALUE_20003 = 20003 - VALUE_20004 = 20004 - VALUE_20005 = 20005 - VALUE_20006 = 20006 - VALUE_20007 = 20007 - VALUE_20008 = 20008 - VALUE_20009 = 20009 - VALUE_20010 = 20010 - VALUE_20011 = 20011 - VALUE_20012 = 20012 - VALUE_20399 = 20399 - VALUE_20400 = 20400 - VALUE_20401 = 20401 - VALUE_20402 = 20402 - VALUE_20403 = 20403 - VALUE_20404 = 20404 - VALUE_20405 = 20405 - VALUE_20406 = 20406 - VALUE_20407 = 20407 - VALUE_20408 = 20408 - VALUE_20409 = 20409 - VALUE_20410 = 20410 - VALUE_20411 = 20411 - VALUE_20999 = 20999 - VALUE_21000 = 21000 - VALUE_21001 = 21001 - VALUE_21002 = 21002 - VALUE_21003 = 21003 - VALUE_21004 = 21004 - VALUE_21005 = 21005 - VALUE_21006 = 21006 - VALUE_21007 = 21007 - VALUE_21008 = 21008 - VALUE_21009 = 21009 - VALUE_21010 = 21010 - VALUE_21011 = 21011 - VALUE_21012 = 21012 - VALUE_21013 = 21013 - VALUE_21014 = 21014 - VALUE_21015 = 21015 - VALUE_21016 = 21016 - VALUE_21017 = 21017 - VALUE_21018 = 21018 - VALUE_21019 = 21019 - VALUE_21020 = 21020 - VALUE_21999 = 21999 - VALUE_23000 = 23000 - VALUE_23001 = 23001 - VALUE_23002 = 23002 - VALUE_23003 = 23003 - VALUE_23004 = 23004 - VALUE_23005 = 23005 - VALUE_23006 = 23006 - VALUE_23999 = 23999 - VALUE_24999 = 24999 - VALUE_26999 = 26999 - VALUE_28999 = 28999 - VALUE_30000 = 30000 - VALUE_30001 = 30001 - VALUE_30002 = 30002 - - class TimelinePaginatedDataResult(BaseModel): data: Optional[List[Timeline]] = None meta: Optional[PaginatedMetaDataResult] = None @@ -1334,21 +1126,21 @@ class UpdateMe(BaseModel): country_id: Optional[int] = None photo_id: Optional[int] = None marketing_opt_in: Optional[bool] = None - weight_units: Optional[UserWeightUnitEnum] = None - time_format: Optional[UserTimeFormatEnum] = None + weight_units: Optional[UserWeightUnit] = None + time_format: Optional[UserTimeFormat] = None notifications: Optional[dict] = None password: Optional[str] = None class UpdatePet(BaseModel): name: str - gender: Optional[PetGenderEnum] = None + gender: Optional[PetGender] = None date_of_birth: Optional[datetime] = None weight: Optional[float] = None comments: Optional[str] = None breed_id: Optional[int] = None breed_id2: Optional[int] = None - spayed: Optional[SpayedEnum] = None + spayed: Optional[Spayed] = None food_type_id: Optional[int] = None photo_id: Optional[int] = None species_id: Optional[int] = None @@ -1455,16 +1247,6 @@ class UserSettingPaginatedDataResult(BaseModel): meta: Optional[PaginatedMetaDataResult] = None -class UserTimeFormatEnum(IntEnum): - VALUE_0 = 0 - VALUE_1 = 1 - - -class UserWeightUnitEnum(IntEnum): - VALUE_0 = 0 - VALUE_1 = 1 - - class Weight(BaseModel): id: Optional[int] = None device_id: Optional[int] = None diff --git a/surehub_api/entities/official_v2.py b/surehub_api/entities/official_v2.py index 9b2c96f..d6468e1 100644 --- a/surehub_api/entities/official_v2.py +++ b/surehub_api/entities/official_v2.py @@ -1,16 +1,35 @@ from __future__ import annotations from datetime import datetime, date -from enum import IntEnum from typing import Any, Optional, List from pydantic import BaseModel, Field - -class ChangeProfileActionEnum(IntEnum): - VALUE_0 = 0 - VALUE_1 = 1 - VALUE_2 = 2 +from surehub_api.entities.enums import ( + ChangeProfileAction, + ConsumptionHabitOutcome, + DeviceTagProfiles, + DoorDirection, + DoorSide, + DoorStatus, + DualScanLockingMode, + FailSafeOptions, + FeederBowlType, + FoodTypes, + LedMode, + PairingMode, + PetDoorLockingMode, + PetDoorTagType, + ReportHouseholdEvent, + RequestChangeStateResponseStatus, + SpecialProfiles, + SubstanceTypes, + ThalamusMovementTimedAccessAllowedSpecialProfiles, + ThalamusTagType, + TrainingMode, + UpdateDeviceTagActions, + ZeroAction, +) class ConsumptionAlert(BaseModel): @@ -23,7 +42,7 @@ class ConsumptionAlert(BaseModel): class ConsumptionHabit(BaseModel): - outcome: Optional[ConsumptionHabitOutcomeEnum] = None + outcome: Optional[ConsumptionHabitOutcome] = None calendar_day: Optional[date] = None amount: Optional[int] = None lower_limit: Optional[int] = None @@ -31,12 +50,6 @@ class ConsumptionHabit(BaseModel): created_at: Optional[datetime] = None -class ConsumptionHabitOutcomeEnum(IntEnum): - VALUE_0 = 0 - VALUE_1 = 1 - VALUE_2 = 2 - - class DeviceControlCurfew(BaseModel): enabled: Optional[bool] = None lock_time: Optional[str] = None @@ -47,7 +60,7 @@ class DeviceControlDualScanPetDoorV2(BaseModel): fast_polling: Optional[bool] = None tag_profiles: Optional[List[DeviceControlThalamusTagProfile]] = None timed_access: Optional[List[DeviceControlThalamusMovementTagTimedAccess]] = None - locking: Optional[DualScanLockingModeEnum] = None + locking: Optional[DualScanLockingMode] = None lockdown: Optional[bool] = None timed_access_override: Optional[bool] = None fail_safe: Optional[FailSafeOptions] = None @@ -70,7 +83,7 @@ class DeviceControlDualScanV2(BaseModel): fast_polling: Optional[bool] = None tag_profiles: Optional[List[DeviceControlThalamusTagProfile]] = None timed_access: Optional[List[DeviceControlThalamusMovementTagTimedAccess]] = None - locking: Optional[DualScanLockingModeEnum] = None + locking: Optional[DualScanLockingMode] = None lockdown: Optional[bool] = None fail_safe: Optional[FailSafeOptions] = None @@ -90,11 +103,11 @@ class DeviceControlDualScanV2DeviceControlPending(BaseModel): class DeviceControlFeederBowl(BaseModel): settings: Optional[List[DeviceControlFeederBowlSettings]] = None - type: Optional[FeederBowlTypeEnum] = None + type: Optional[FeederBowlType] = None class DeviceControlFeederBowlSettings(BaseModel): - food_type: Optional[FoodTypesEnum] = None + food_type: Optional[FoodTypes] = None target: Optional[float] = None @@ -137,8 +150,8 @@ class DeviceControlFeederV2DeviceControlPending(BaseModel): class DeviceControlHub(BaseModel): - led_mode: Optional[LedModeEnum] = None - pairing_mode: Optional[PairingModeEnum] = None + led_mode: Optional[LedMode] = None + pairing_mode: Optional[PairingMode] = None flash_leds: Optional[bool] = None @@ -158,8 +171,8 @@ class DeviceControlHubDeviceControlPending(BaseModel): class DeviceControlNoIdDogBowl(BaseModel): fast_polling: Optional[bool] = None tag_profiles: Optional[List[DeviceControlThalamusTagProfile]] = None - food_type: Optional[FoodTypesEnum] = None - substance_type: Optional[SubstanceTypesEnum] = None + food_type: Optional[FoodTypes] = None + substance_type: Optional[SubstanceTypes] = None class DeviceControlNoIdDogBowlDeviceControl(BaseModel): @@ -185,7 +198,7 @@ class DeviceControlPending(BaseModel): class DeviceControlPetDoor(BaseModel): fast_polling: Optional[bool] = None curfew: Optional[DeviceControlCurfew] = None - locking: Optional[PetDoorLockingModeEnum] = None + locking: Optional[PetDoorLockingMode] = None tag_profiles: Optional[List[DeviceControlPetDoorTagProfile]] = None @@ -261,7 +274,7 @@ class DeviceControlThalamusTagProfile(BaseModel): tag_id: Optional[int] = None index: Optional[int] = None profile: Optional[SpecialProfiles] = None - action: Optional[ChangeProfileActionEnum] = None + action: Optional[ChangeProfileAction] = None request_action: Optional[UpdateDeviceTagActions] = None microchip: Optional[DeviceControlThalamusMicrochip] = None @@ -282,89 +295,27 @@ class DeviceTagData(BaseModel): results: Optional[List[DeviceControlResult]] = None -class DeviceTagProfiles(IntEnum): - DISABLED = 2 - ENABLED = 3 - - class DeviceV2(BaseModel): id: Optional[int] = None -class DoorDirectionEnum(IntEnum): - VALUE_0 = 0 - VALUE_1 = 1 - VALUE_2 = 2 - VALUE_3 = 3 - - -class DoorSide(IntEnum): - VALUE_0 = 0 - VALUE_1 = 1 - VALUE_2 = 2 - - -class DoorStatusEnum(IntEnum): - VALUE_4 = 4 - VALUE_6 = 6 - VALUE_8 = 8 - VALUE_10 = 10 - VALUE_11 = 11 - VALUE_12 = 12 - VALUE_13 = 13 - - -class DualScanLockingModeEnum(IntEnum): - VALUE_0 = 0 - VALUE_1 = 1 - VALUE_2 = 2 - VALUE_3 = 3 - - class Error(BaseModel): success: Optional[bool] = None error: Optional[dict] = None -class FailSafeOptions(IntEnum): - VALUE_0 = 0 - VALUE_1 = 1 - - -class FeederBowlTypeEnum(IntEnum): - VALUE_1 = 1 - VALUE_4 = 4 - VALUE_5 = 5 - - -class FoodTypesEnum(IntEnum): - VALUE_0 = 0 - VALUE_1 = 1 - VALUE_2 = 2 - VALUE_3 = 3 - - class HouseholdV2(BaseModel): id: Optional[int] = None -class LedModeEnum(IntEnum): - VALUE_0 = 0 - VALUE_1 = 1 - VALUE_2 = 2 - VALUE_3 = 3 - VALUE_4 = 4 - VALUE_128 = 128 - - class Movement(BaseModel): id: Optional[int] = None device_id: Optional[int] = None tag_id: Optional[int] = None user_id: Optional[int] = None - direction: Optional[DoorDirectionEnum] = None + direction: Optional[DoorDirection] = None side: Optional[DoorSide] = None - type: Optional[DoorStatusEnum] = None + type: Optional[DoorStatus] = None created_at: Optional[datetime] = None updated_at: Optional[datetime] = None @@ -376,35 +327,6 @@ class PaginatedMetaDataResult(BaseModel): total_pages: Optional[int] = None -class PairingModeEnum(IntEnum): - VALUE_0 = 0 - VALUE_1 = 1 - VALUE_2 = 2 - VALUE_3 = 3 - VALUE_128 = 128 - - -class PetDoorLockingModeEnum(IntEnum): - VALUE_0 = 0 - VALUE_1 = 1 - VALUE_2 = 2 - VALUE_3 = 3 - VALUE_4 = 4 - VALUE_5 = 5 - - -class PetDoorTagType(IntEnum): - VALUE_0 = 0 - VALUE_1 = 1 - VALUE_2 = 2 - VALUE_4 = 4 - VALUE_8 = 8 - VALUE_16 = 16 - VALUE_32 = 32 - VALUE_64 = 64 - VALUE_128 = 128 - - class PetV2(BaseModel): id: Optional[int] = None @@ -471,12 +393,6 @@ class ReportHouseholdDrinkingDataPoint(BaseModel): datapoints: Optional[List[ReportHouseholdDrinking]] = None -class ReportHouseholdEvent(IntEnum): - VALUE_0 = 0 - VALUE_1 = 1 - VALUE_2 = 2 - - class ReportHouseholdFeeding(BaseModel): from_: Optional[datetime] = Field(default=None, alias='from') to: Optional[datetime] = None @@ -537,53 +453,10 @@ class ReportWeightFrame(BaseModel): multi: Optional[bool] = None -class RequestChangeStateResponseStatus(IntEnum): - VALUE_0 = 0 - VALUE_1 = 1 - VALUE_2 = 2 - VALUE_3 = 3 - VALUE_4 = 4 - VALUE_5 = 5 - - -class SpecialProfiles(IntEnum): - VALUE_0 = 0 - VALUE_1 = 1 - VALUE_2 = 2 - VALUE_3 = 3 - VALUE_4 = 4 - VALUE_5 = 5 - VALUE_6 = 6 - - -class SubstanceTypesEnum(IntEnum): - VALUE_0 = 0 - VALUE_1 = 1 - VALUE_2 = 2 - - class TagV2(BaseModel): id: Optional[int] = None -class ThalamusMovementTimedAccessAllowedSpecialProfiles(IntEnum): - SPECIAL_PROFILE_3 = 3 - SPECIAL_PROFILE_5 = 5 - SPECIAL_PROFILE_6 = 6 - - -class ThalamusTagType(IntEnum): - VALUE_0 = 0 - VALUE_1 = 1 - VALUE_2 = 2 - VALUE_3 = 3 - VALUE_4 = 4 - VALUE_5 = 5 - VALUE_6 = 6 - VALUE_7 = 7 - VALUE_8 = 8 - - class TimelineV2(BaseModel): id: Optional[int] = None type: Optional[int] = None @@ -604,14 +477,6 @@ class TimelineV2PaginatedDataResult(BaseModel): meta: Optional[PaginatedMetaDataResult] = None -class TrainingMode(IntEnum): - VALUE_0 = 0 - VALUE_1 = 1 - VALUE_2 = 2 - VALUE_3 = 3 - VALUE_4 = 4 - - class UpdateDeviceTag(BaseModel): tag_id: Optional[int] = None request_action: UpdateDeviceTagActions @@ -619,12 +484,6 @@ class UpdateDeviceTag(BaseModel): timed_access: Optional[DeviceControlThalamusMovementTimedAccess] = None -class UpdateDeviceTagActions(IntEnum): - VALUE_0 = 0 - VALUE_1 = 1 - VALUE_2 = 2 - - class UpdateDeviceTagV2(BaseModel): tag_id: Optional[int] = None request_action: Optional[UpdateDeviceTagActions] = None @@ -650,10 +509,3 @@ class WeightFrame(BaseModel): change: Optional[float] = None created_at: Optional[datetime] = None updated_at: Optional[datetime] = None - - -class ZeroAction(IntEnum): - VALUE_0 = 0 - VALUE_1 = 1 - VALUE_2 = 2 - VALUE_3 = 3