|
| 1 | +# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. |
| 2 | + |
| 3 | +from __future__ import annotations |
| 4 | + |
| 5 | +from typing import Dict, Union, Optional |
| 6 | +from typing_extensions import Literal, Required, Annotated, TypeAlias, TypedDict |
| 7 | + |
| 8 | +from .._types import SequenceNotStr |
| 9 | +from .._utils import PropertyInfo |
| 10 | +from .shared_params.extensions import Extensions |
| 11 | + |
| 12 | +__all__ = [ |
| 13 | + "UpdateFileDetailsRequestParam", |
| 14 | + "UpdateFileDetails", |
| 15 | + "ChangePublicationStatus", |
| 16 | + "ChangePublicationStatusPublish", |
| 17 | +] |
| 18 | + |
| 19 | + |
| 20 | +class UpdateFileDetails(TypedDict, total=False): |
| 21 | + custom_coordinates: Annotated[Optional[str], PropertyInfo(alias="customCoordinates")] |
| 22 | + """Define an important area in the image in the format `x,y,width,height` e.g. |
| 23 | +
|
| 24 | + `10,10,100,100`. Send `null` to unset this value. |
| 25 | + """ |
| 26 | + |
| 27 | + custom_metadata: Annotated[Dict[str, object], PropertyInfo(alias="customMetadata")] |
| 28 | + """A key-value data to be associated with the asset. |
| 29 | +
|
| 30 | + To unset a key, send `null` value for that key. Before setting any custom |
| 31 | + metadata on an asset you have to create the field using custom metadata fields |
| 32 | + API. |
| 33 | + """ |
| 34 | + |
| 35 | + description: str |
| 36 | + """Optional text to describe the contents of the file.""" |
| 37 | + |
| 38 | + extensions: Extensions |
| 39 | + """Array of extensions to be applied to the asset. |
| 40 | +
|
| 41 | + Each extension can be configured with specific parameters based on the extension |
| 42 | + type. |
| 43 | + """ |
| 44 | + |
| 45 | + remove_ai_tags: Annotated[Union[SequenceNotStr[str], Literal["all"]], PropertyInfo(alias="removeAITags")] |
| 46 | + """An array of AITags associated with the file that you want to remove, e.g. |
| 47 | +
|
| 48 | + `["car", "vehicle", "motorsports"]`. |
| 49 | +
|
| 50 | + If you want to remove all AITags associated with the file, send a string - |
| 51 | + "all". |
| 52 | +
|
| 53 | + Note: The remove operation for `AITags` executes before any of the `extensions` |
| 54 | + are processed. |
| 55 | + """ |
| 56 | + |
| 57 | + tags: Optional[SequenceNotStr[str]] |
| 58 | + """An array of tags associated with the file, such as `["tag1", "tag2"]`. |
| 59 | +
|
| 60 | + Send `null` to unset all tags associated with the file. |
| 61 | + """ |
| 62 | + |
| 63 | + webhook_url: Annotated[str, PropertyInfo(alias="webhookUrl")] |
| 64 | + """ |
| 65 | + The final status of extensions after they have completed execution will be |
| 66 | + delivered to this endpoint as a POST request. |
| 67 | + [Learn more](/docs/api-reference/digital-asset-management-dam/managing-assets/update-file-details#webhook-payload-structure) |
| 68 | + about the webhook payload structure. |
| 69 | + """ |
| 70 | + |
| 71 | + |
| 72 | +class ChangePublicationStatusPublish(TypedDict, total=False): |
| 73 | + is_published: Required[Annotated[bool, PropertyInfo(alias="isPublished")]] |
| 74 | + """Set to `true` to publish the file. Set to `false` to unpublish the file.""" |
| 75 | + |
| 76 | + include_file_versions: Annotated[bool, PropertyInfo(alias="includeFileVersions")] |
| 77 | + """Set to `true` to publish/unpublish all versions of the file. |
| 78 | +
|
| 79 | + Set to `false` to publish/unpublish only the current version of the file. |
| 80 | + """ |
| 81 | + |
| 82 | + |
| 83 | +class ChangePublicationStatus(TypedDict, total=False): |
| 84 | + publish: ChangePublicationStatusPublish |
| 85 | + """Configure the publication status of a file and its versions.""" |
| 86 | + |
| 87 | + |
| 88 | +UpdateFileDetailsRequestParam: TypeAlias = Union[UpdateFileDetails, ChangePublicationStatus] |
0 commit comments