Sanity Library Reference Docs
    Preparing search index...

    Interface MediaLibraryAssetAspectDocument

    A document representing a Media Library asset aspect.

    Each aspect provides a schema describing custom data that can be assigned to assets.

    interface MediaLibraryAssetAspectDocument {
        _createdAt?: string;
        _id: string;
        _rev?: string;
        _system?: Partial<DocumentSystem>;
        _type: "sanity.asset.aspect";
        _updatedAt?: string;
        assetType?: MediaLibraryAssetType[];
        definition: FieldDefinition;
        public?: boolean;
        [key: string]: unknown;
    }

    Hierarchy (View Summary)

    Indexable

    • [key: string]: unknown
    Index

    Properties

    _createdAt?: string
    _id: string
    _rev?: string
    _system?: Partial<DocumentSystem>

    System-managed attributes. Which fields are present depends on the document (e.g. variant/scopeId only exist on version documents, and documents predating the _system migration may carry only some of them), hence the partial shape.

    _type: "sanity.asset.aspect"
    _updatedAt?: string
    assetType?: MediaLibraryAssetType[]

    Asset types the aspect can be assigned to.

    If no assetType is defined, the aspect may be assigned to any asset type.

    definition: FieldDefinition
    public?: boolean