archastro.platform.types.image

 1# Copyright (c) 2026 ArchAstro Inc. All Rights Reserved.
 2# This file is auto-generated by @archastro/sdk-generator. Do not edit.
 3# Content hash: 51f03e7d6c7c
 4
 5
 6from pydantic import BaseModel, Field
 7
 8
 9class ImageSource(BaseModel):
10    """
11    Resolved metadata for an image, including its delivery URL, dimensions, and optional references to the underlying storage file or media record.
12    """
13
14    file: str | None = Field(
15        default=None,
16        description="ID of the underlying storage file (`fil_...`). `null` when the image is not backed by a platform storage file.",
17    )
18    height: int | None = Field(
19        default=None, description="Height of the image in pixels. `null` if not known."
20    )
21    media: str | None = Field(
22        default=None,
23        description="ID of the associated media record (`med_...`). `null` when the image is not linked to a media entity.",
24    )
25    mime_type: str | None = Field(
26        default=None,
27        description='MIME type of the image, e.g. `"image/png"` or `"image/jpeg"`. `null` if not known.',
28    )
29    refresh_url: str | None = Field(
30        default=None,
31        description="Endpoint URL you can call to obtain a fresh signed `url` when the current one has expired. `null` if the URL does not require refreshing.",
32    )
33    url: str | None = Field(
34        default=None,
35        description="Signed or public URL for downloading the image. May be time-limited; use `refresh_url` to obtain a new URL when this one expires.",
36    )
37    width: int | None = Field(
38        default=None, description="Width of the image in pixels. `null` if not known."
39    )
class ImageSource(pydantic.main.BaseModel):
10class ImageSource(BaseModel):
11    """
12    Resolved metadata for an image, including its delivery URL, dimensions, and optional references to the underlying storage file or media record.
13    """
14
15    file: str | None = Field(
16        default=None,
17        description="ID of the underlying storage file (`fil_...`). `null` when the image is not backed by a platform storage file.",
18    )
19    height: int | None = Field(
20        default=None, description="Height of the image in pixels. `null` if not known."
21    )
22    media: str | None = Field(
23        default=None,
24        description="ID of the associated media record (`med_...`). `null` when the image is not linked to a media entity.",
25    )
26    mime_type: str | None = Field(
27        default=None,
28        description='MIME type of the image, e.g. `"image/png"` or `"image/jpeg"`. `null` if not known.',
29    )
30    refresh_url: str | None = Field(
31        default=None,
32        description="Endpoint URL you can call to obtain a fresh signed `url` when the current one has expired. `null` if the URL does not require refreshing.",
33    )
34    url: str | None = Field(
35        default=None,
36        description="Signed or public URL for downloading the image. May be time-limited; use `refresh_url` to obtain a new URL when this one expires.",
37    )
38    width: int | None = Field(
39        default=None, description="Width of the image in pixels. `null` if not known."
40    )

Resolved metadata for an image, including its delivery URL, dimensions, and optional references to the underlying storage file or media record.

file: str | None = None

ID of the underlying storage file (fil_...). null when the image is not backed by a platform storage file.

height: int | None = None

Height of the image in pixels. null if not known.

media: str | None = None

ID of the associated media record (med_...). null when the image is not linked to a media entity.

mime_type: str | None = None

MIME type of the image, e.g. "image/png" or "image/jpeg". null if not known.

refresh_url: str | None = None

Endpoint URL you can call to obtain a fresh signed url when the current one has expired. null if the URL does not require refreshing.

url: str | None = None

Signed or public URL for downloading the image. May be time-limited; use refresh_url to obtain a new URL when this one expires.

width: int | None = None

Width of the image in pixels. null if not known.