1010 IncarnationDoesNotExistError ,
1111)
1212from foxops_client .retries import default_retry
13- from foxops_client .types import Incarnation , IncarnationWithDetails
13+ from foxops_client .types import Incarnation , IncarnationWithDetails , TemplateData
1414
1515
1616class AsyncFoxopsClient :
@@ -103,7 +103,7 @@ async def patch_incarnation(
103103 incarnation_id : int ,
104104 automerge : bool ,
105105 requested_version : str | None = None ,
106- requested_data : dict [ str , Any ] | None = None ,
106+ requested_data : TemplateData | None = None ,
107107 ):
108108 data : dict [str , Any ] = {
109109 "automerge" : automerge ,
@@ -132,15 +132,15 @@ async def put_incarnation(
132132 incarnation_id : int ,
133133 automerge : bool ,
134134 template_repository_version : str ,
135- template_data : dict [ str , Any ] ,
135+ template_data : TemplateData ,
136136 ) -> IncarnationWithDetails :
137- data : dict [str , Any ] = {
137+ request : dict [str , Any ] = {
138138 "automerge" : automerge ,
139139 "template_repository_version" : template_repository_version ,
140140 "template_data" : template_data ,
141141 }
142142
143- resp = await self .retry_function (self .client .put )(f"/api/incarnations/{ incarnation_id } " , json = data )
143+ resp = await self .retry_function (self .client .put )(f"/api/incarnations/{ incarnation_id } " , json = request )
144144
145145 match resp .status_code :
146146 case httpx .codes .OK :
@@ -159,7 +159,7 @@ async def create_incarnation(
159159 incarnation_repository : str ,
160160 template_repository : str ,
161161 template_repository_version : str ,
162- template_data : dict [ str , Any ] ,
162+ template_data : TemplateData ,
163163 target_directory : str | None = None ,
164164 automerge : bool | None = None ,
165165 ) -> IncarnationWithDetails :
0 commit comments