@archastro/sdk
    Preparing search index...

    Interface Attachment

    A rich attachment associated with a message, such as a file, scraped link, artifact, task, media item, or inline action.

    interface Attachment {
        content_type?: string;
        description?: string;
        filename?: string;
        height?: number;
        id: string;
        image_height?: number;
        image_source?: ImageSource;
        image_url?: string;
        image_width?: number;
        media_type?: string;
        name?: string;
        object?: Record<string, unknown>;
        title?: string;
        type: string;
        url?: string;
        variants?: MediaVariant[];
        version?: number;
        width?: number;
    }
    Index

    Properties

    content_type?: string

    MIME type of the attached file, e.g. "image/png" or "application/pdf". Present on file, artifact, and media types. null otherwise.

    description?: string

    Short description. The page meta-description for scraped_link, the artifact description for artifact, and the task description for task types. null on other types.

    filename?: string

    Original filename of the attached file, e.g. "report.pdf". Present on file, artifact, and media types. null otherwise.

    height?: number

    Height in pixels of the media item. Present on media type only. null otherwise.

    id: string

    Unique identifier for this attachment within the message.

    image_height?: number

    Height in pixels of the scraped preview image. Present on scraped_link type only. null otherwise.

    image_source?: ImageSource

    Image source metadata for inline rendering. Present on file, scraped_link, artifact, and media types when the content is an image. null otherwise.

    image_url?: string

    URL of the preview image extracted from the scraped page. Present on scraped_link type only. null otherwise.

    image_width?: number

    Width in pixels of the scraped preview image. Present on scraped_link type only. null otherwise.

    media_type?: string

    The media category, e.g. "video" or "audio". Present on media type only. null otherwise.

    name?: string

    Display name of the media item. Present on media type only. null otherwise.

    object?: Record<string, unknown>

    The full embedded object payload. For task type, contains the task record. For action type, contains the action definition. null on other types.

    title?: string

    Display title. The page title for scraped_link, the artifact name for artifact, and the task title for task types. null on other types.

    type: string

    The attachment type. One of "file", "scraped_link", "artifact", "task", "media", or "action". Determines which additional fields are present.

    url?: string

    URL to access the resource. A signed download URL for file and artifact types; the original URL for scraped_link; a media playback URL for media. null on task and action types.

    variants?: MediaVariant[]

    Array of available encoding variants for the media item (e.g. different resolutions). Present on media type only. null otherwise.

    version?: number

    Version number of the attached artifact at the time of attachment. Present on artifact type only. null otherwise.

    width?: number

    Width in pixels of the media item. Present on media type only. null otherwise.