Skip to main content
Version: 2.0.0

Interface: EntityOnSaveProps<M, UserType>

Parameters passed to hooks when an entity is saved

Type parameters

NameType
Mextends Record<string, any> = any
UserTypeextends User = User

Properties

collection

collection: ResolvedEntityCollection<M>

Resolved collection of the entity

Defined in

lib/src/types/entity_callbacks.ts:108


context

context: FireCMSContext<UserType>

Context of the app status

Defined in

lib/src/types/entity_callbacks.ts:144


entityId

Optional entityId: string

ID of the entity

Defined in

lib/src/types/entity_callbacks.ts:124


path

path: string

Full path of the CMS where this entity is being saved. Might contain unresolved aliases.

Defined in

lib/src/types/entity_callbacks.ts:114


previousValues

Optional previousValues: Partial<M>

Previous values

Defined in

lib/src/types/entity_callbacks.ts:134


resolvedPath

resolvedPath: string

Full path where this entity is being saved, with alias resolved

Defined in

lib/src/types/entity_callbacks.ts:119


status

status: EntityStatus

New or existing entity

Defined in

lib/src/types/entity_callbacks.ts:139


values

values: Partial<M>

Values being saved

Defined in

lib/src/types/entity_callbacks.ts:129

Enterprise or start-up?

Learn how to get the most out of your project with the help of our consulting team.
Learn more
Sign up to our newsletter to get the latest news and updates. No spam!