11from collections .abc import Callable
22from typing import Any , Literal , Protocol , TypeVar , cast
33
4- from nutrient_dws .inputs import FileInput
4+ from nutrient_dws .inputs import FileInputWithUrl
55from nutrient_dws .types .build_actions import (
66 ApplyInstantJsonAction ,
77 ApplyRedactionsAction ,
@@ -53,7 +53,7 @@ class ActionWithFileInput(Protocol):
5353 """Internal action type that holds FileInput for deferred registration."""
5454
5555 __needsFileRegistration : bool
56- fileInput : FileInput
56+ fileInput : FileInputWithUrl
5757 createAction : Callable [[FileHandle ], BuildAction ]
5858
5959
@@ -133,7 +133,7 @@ def watermark_text(
133133
134134 @staticmethod
135135 def watermark_image (
136- image : FileInput , options : ImageWatermarkActionOptions | None = None
136+ image : FileInputWithUrl , options : ImageWatermarkActionOptions | None = None
137137 ) -> ActionWithFileInput :
138138 """Create an image watermark action.
139139
@@ -163,7 +163,7 @@ class ImageWatermarkActionWithFileInput(ActionWithFileInput):
163163 __needsFileRegistration = True
164164
165165 def __init__ (
166- self , file_input : FileInput , opts : ImageWatermarkActionOptions
166+ self , file_input : FileInputWithUrl , opts : ImageWatermarkActionOptions
167167 ):
168168 self .fileInput = file_input
169169 self .options = opts
@@ -196,7 +196,7 @@ def flatten(annotation_ids: list[str | int] | None = None) -> FlattenAction:
196196 return result
197197
198198 @staticmethod
199- def apply_instant_json (file : FileInput ) -> ActionWithFileInput :
199+ def apply_instant_json (file : FileInputWithUrl ) -> ActionWithFileInput :
200200 """Create an apply Instant JSON action.
201201
202202 Args:
@@ -209,7 +209,7 @@ def apply_instant_json(file: FileInput) -> ActionWithFileInput:
209209 class ApplyInstantJsonActionWithFileInput (ActionWithFileInput ):
210210 __needsFileRegistration = True
211211
212- def __init__ (self , file_input : FileInput ):
212+ def __init__ (self , file_input : FileInputWithUrl ):
213213 self .fileInput = file_input
214214
215215 def createAction (self , fileHandle : FileHandle ) -> ApplyInstantJsonAction :
@@ -222,7 +222,7 @@ def createAction(self, fileHandle: FileHandle) -> ApplyInstantJsonAction:
222222
223223 @staticmethod
224224 def apply_xfdf (
225- file : FileInput , options : ApplyXfdfActionOptions | None = None
225+ file : FileInputWithUrl , options : ApplyXfdfActionOptions | None = None
226226 ) -> ActionWithFileInput :
227227 """Create an apply XFDF action.
228228
@@ -240,7 +240,7 @@ class ApplyXfdfActionWithFileInput(ActionWithFileInput):
240240 __needsFileRegistration = True
241241
242242 def __init__ (
243- self , file_input : FileInput , opts : ApplyXfdfActionOptions | None
243+ self , file_input : FileInputWithUrl , opts : ApplyXfdfActionOptions | None
244244 ):
245245 self .fileInput = file_input
246246 self .options = opts or {}
0 commit comments