1212
1313
1414if TYPE_CHECKING :
15- from airbyte_api .models import ConnectionResponse , JobResponse
15+ from airbyte_api .models import ConnectionResponse , JobResponse , JobTypeEnum
1616
1717 from airbyte .cloud .workspaces import CloudWorkspace
1818
@@ -291,6 +291,7 @@ def get_previous_sync_logs(
291291 limit : int = 20 ,
292292 offset : int | None = None ,
293293 from_tail : bool = True ,
294+ job_type : JobTypeEnum | None = None ,
294295 ) -> list [SyncResult ]:
295296 """Get previous sync jobs for a connection with pagination support.
296297
@@ -304,6 +305,8 @@ def get_previous_sync_logs(
304305 from_tail: If True, returns jobs ordered newest-first (createdAt DESC).
305306 If False, returns jobs ordered oldest-first (createdAt ASC).
306307 Defaults to True.
308+ job_type: Filter by job type (e.g., JobTypeEnum.SYNC, JobTypeEnum.REFRESH).
309+ If not specified, defaults to sync and reset jobs only (API default behavior).
307310
308311 Returns:
309312 A list of SyncResult objects representing the sync jobs.
@@ -320,6 +323,7 @@ def get_previous_sync_logs(
320323 limit = limit ,
321324 offset = offset ,
322325 order_by = order_by ,
326+ job_type = job_type ,
323327 client_id = self .workspace .client_id ,
324328 client_secret = self .workspace .client_secret ,
325329 bearer_token = self .workspace .bearer_token ,
0 commit comments