22
33from __future__ import annotations
44
5- from typing import Dict , Union , Iterable , Optional
5+ from typing import Dict , Union , Optional
66from typing_extensions import Literal , Required , Annotated , TypeAlias , TypedDict
77
88from .._types import SequenceNotStr
99from .._utils import PropertyInfo
10+ from .shared_params .extensions import Extensions
1011
1112__all__ = [
1213 "FileUpdateParams" ,
1314 "Update" ,
1415 "UpdateUpdateFileDetails" ,
15- "UpdateUpdateFileDetailsExtension" ,
16- "UpdateUpdateFileDetailsExtensionRemoveBg" ,
17- "UpdateUpdateFileDetailsExtensionRemoveBgOptions" ,
18- "UpdateUpdateFileDetailsExtensionAutoTaggingExtension" ,
19- "UpdateUpdateFileDetailsExtensionAIAutoDescription" ,
2016 "UpdateChangePublicationStatus" ,
2117 "UpdateChangePublicationStatusPublish" ,
2218]
@@ -26,65 +22,6 @@ class FileUpdateParams(TypedDict, total=False):
2622 update : Update
2723
2824
29- class UpdateUpdateFileDetailsExtensionRemoveBgOptions (TypedDict , total = False ):
30- add_shadow : bool
31- """Whether to add an artificial shadow to the result.
32-
33- Default is false. Note: Adding shadows is currently only supported for car
34- photos.
35- """
36-
37- bg_color : str
38- """
39- Specifies a solid color background using hex code (e.g., "81d4fa", "fff") or
40- color name (e.g., "green"). If this parameter is set, `bg_image_url` must be
41- empty.
42- """
43-
44- bg_image_url : str
45- """Sets a background image from a URL.
46-
47- If this parameter is set, `bg_color` must be empty.
48- """
49-
50- semitransparency : bool
51- """Allows semi-transparent regions in the result.
52-
53- Default is true. Note: Semitransparency is currently only supported for car
54- windows.
55- """
56-
57-
58- class UpdateUpdateFileDetailsExtensionRemoveBg (TypedDict , total = False ):
59- name : Required [Literal ["remove-bg" ]]
60- """Specifies the background removal extension."""
61-
62- options : UpdateUpdateFileDetailsExtensionRemoveBgOptions
63-
64-
65- class UpdateUpdateFileDetailsExtensionAutoTaggingExtension (TypedDict , total = False ):
66- max_tags : Required [Annotated [int , PropertyInfo (alias = "maxTags" )]]
67- """Maximum number of tags to attach to the asset."""
68-
69- min_confidence : Required [Annotated [int , PropertyInfo (alias = "minConfidence" )]]
70- """Minimum confidence level for tags to be considered valid."""
71-
72- name : Required [Literal ["google-auto-tagging" , "aws-auto-tagging" ]]
73- """Specifies the auto-tagging extension used."""
74-
75-
76- class UpdateUpdateFileDetailsExtensionAIAutoDescription (TypedDict , total = False ):
77- name : Required [Literal ["ai-auto-description" ]]
78- """Specifies the auto description extension."""
79-
80-
81- UpdateUpdateFileDetailsExtension : TypeAlias = Union [
82- UpdateUpdateFileDetailsExtensionRemoveBg ,
83- UpdateUpdateFileDetailsExtensionAutoTaggingExtension ,
84- UpdateUpdateFileDetailsExtensionAIAutoDescription ,
85- ]
86-
87-
8825class UpdateUpdateFileDetails (TypedDict , total = False ):
8926 custom_coordinates : Annotated [Optional [str ], PropertyInfo (alias = "customCoordinates" )]
9027 """Define an important area in the image in the format `x,y,width,height` e.g.
@@ -103,7 +40,7 @@ class UpdateUpdateFileDetails(TypedDict, total=False):
10340 description : str
10441 """Optional text to describe the contents of the file."""
10542
106- extensions : Iterable [ UpdateUpdateFileDetailsExtension ]
43+ extensions : Extensions
10744 """Array of extensions to be applied to the asset.
10845
10946 Each extension can be configured with specific parameters based on the extension
0 commit comments