Sanity Library Reference Docs
    Preparing search index...

    Interface BlueprintMediaLibraryAssetFunctionResource

    A function resource triggered by media library asset events

    interface BlueprintMediaLibraryAssetFunctionResource {
        displayName?: string;
        env?: Record<string, string>;
        event: BlueprintMediaLibraryFunctionResourceEvent;
        memory?: number;
        name: string;
        project?: string;
        robotToken?: string;
        runtime?: "node" | "nodejs22.x" | "nodejs24.x";
        src: string;
        timeout?: number;
        type: "sanity.function.media-library.asset";
    }

    Hierarchy (View Summary)

    Index

    Properties

    displayName?: string

    Human-readable display name for the function

    env?: Record<string, string>

    Environment variables provided to the function

    Event configuration specifying when and how the function is triggered

    memory?: number

    Memory allocation in gigabytes

    name: string
    project?: string

    The project ID of the project that contains your function.

    The project attribute must be defined if your blueprint is scoped to an organization.

    robotToken?: string

    Token provided during function invocation

    runtime?: "node" | "nodejs22.x" | "nodejs24.x"

    The runtime environment for the function (currently only Node.js is supported)

    'nodejs24.x'
    
    src: string

    Path to the function source code

    timeout?: number

    Execution timeout in seconds

    type: "sanity.function.media-library.asset"