VidStudio SDK reference
    Preparing search index...

    Interface KeyframeRepository

    interface KeyframeRepository {
        create(data: Omit<Keyframe, "id">): Promise<Keyframe>;
        delete(id: string): Promise<void>;
        deleteByClipTransformId(clipTransformId: string): Promise<void>;
        getAll(): Promise<Keyframe[]>;
        getByClipTransformId(clipTransformId: string): Promise<Keyframe[]>;
        getByClipTransformIdAndParam(
            clipTransformId: string,
            paramName: string,
        ): Promise<Keyframe[]>;
        getById(id: string): Promise<Keyframe | undefined>;
        restore(kf: Keyframe): Promise<void>;
        setKeyframe(
            clipTransformId: string,
            paramName: string,
            time: number,
            value: number,
            easing?: string,
        ): Promise<Keyframe>;
        update(
            id: string,
            changes: Partial<Pick<Keyframe, "time" | "value" | "easing">>,
        ): Promise<Keyframe>;
    }
    Index
    • Parameters

      Returns Promise<Keyframe>

    • Parameters

      • id: string

      Returns Promise<void>

    • Delete ALL keyframes belonging to a ClipTransform (cascade helper).

      Parameters

      • clipTransformId: string

      Returns Promise<void>

    • Every keyframe row in the database, across all clip-transforms.

      Returns Promise<Keyframe[]>

    • Parameters

      • clipTransformId: string

      Returns Promise<Keyframe[]>

    • Keyframes for a specific (ClipTransform, param) pair, sorted by time. Loads all keyframes for the ClipTransform, then filters in JS.

      Parameters

      • clipTransformId: string
      • paramName: string

      Returns Promise<Keyframe[]>

    • Parameters

      • id: string

      Returns Promise<Keyframe | undefined>

    • Restore a keyframe with its original ID (for undo). Creates or replaces.

      Parameters

      Returns Promise<void>

    • Upsert: set a keyframe at a specific (clipTransform, param, time).

      If a keyframe already exists at the same (clipTransformId, paramName, time) within EPSILON (0.001s), update it. Otherwise create a new one. This prevents duplicate keyframes at the same time from rapid slider drags.

      Parameters

      • clipTransformId: string
      • paramName: string
      • time: number
      • value: number
      • Optionaleasing: string

      Returns Promise<Keyframe>

    • Update mutable fields on a keyframe (time, value, easing). Does NOT allow changing clip_transform_id or param_name — those are structural.

      Parameters

      • id: string
      • changes: Partial<Pick<Keyframe, "time" | "value" | "easing">>

      Returns Promise<Keyframe>