Skip to main content
Version: 2.0.0-alpha

Interface: EntityOnSaveProps<M, UserType>

Parameters passed to hooks when an entity is saved

Type parameters

NameType
Mextends Object = any
UserTypeextends User = User

Properties

collection

collection: ResolvedEntityCollection<M>

Resolved collection of the entity

Defined in

lib/src/models/entity_callbacks.ts:63


context

context: FireCMSContext<UserType>

Context of the app status

Defined in

lib/src/models/entity_callbacks.ts:93


entityId

Optional entityId: string

Id of the entity or undefined if new

Defined in

lib/src/models/entity_callbacks.ts:73


path

path: string

Full path where this entity is being saved

Defined in

lib/src/models/entity_callbacks.ts:68


previousValues

Optional previousValues: Partial<M>

Previous values

Defined in

lib/src/models/entity_callbacks.ts:83


status

status: EntityStatus

New or existing entity

Defined in

lib/src/models/entity_callbacks.ts:88


values

values: Partial<M>

Values being saved

Defined in

lib/src/models/entity_callbacks.ts:78