Skip to main content
Version: 0.0.8

Object API Reference

kittl.design.object — generic object utilities.

Scope: design:state:read (read methods) · design:state:write (mutations)

getObject(params)​

Retrieves a design object by ID.

PropertyTypeRequiredDescription
idstringYesID of the object to retrieve

Returns: SdkResultAsync<NormalizedObject>

setLockedState(params)​

Locks or unlocks an object.

PropertyTypeRequiredDescription
idstringYesObject ID
lockedbooleanYestrue to lock, false to unlock

setHiddenState(params)​

Shows or hides an object.

PropertyTypeRequiredDescription
idstringYesObject ID
hiddenbooleanYestrue to hide, false to show

rotateObject(params)​

Rotates an object by a relative angle.

PropertyTypeRequiredDescription
idstringYesObject ID
anglenumberYesDegrees to rotate (positive = clockwise)
origin{ x: OriginX, y: OriginY }NoRotation origin (default: { x: 'center', y: 'center' })

removeObject(params)​

Removes an object from the design.

PropertyTypeRequiredDescription
idstringYesID of the object to remove

getAllByFilter(predicate)​

Returns all objects matching a predicate function.

ParameterTypeDescription
predicate(object: NormalizedObject) => booleanFilter function

Returns: SdkResultAsync<NormalizedObject[]>

rename(params)​

Renames an object.

PropertyTypeRequiredDescription
objectIdstringYesObject ID
newNamestringYesNew name

_dangerouslyUpdate(updateParams)​

Applies a low-level patch to a serialized object. Pass the required id and any fields from Partial<Omit<SerializedObject, 'id'>>. The SDK result contains { id: string }. Prefer the specific shape, text, image, or other object APIs when they cover the change.

See the published ObjectAPI declaration for this method's exact patch type.