opral / lix-sdk

1 stars 0 forks source link

maybe remove `change.type` #43

Closed samuelstroschein closed 3 weeks ago

samuelstroschein commented 3 weeks ago

Context

Lix likely does not need change.type information given that a plugin is responsible for applying changes, diffing, etc. The insight is derived from https://github.com/opral/lix-sdk/issues/42

Proposal

Try removing change.type after https://github.com/opral/lix-sdk/issues/42 has been accepted and see if things work. We can always re-add change.type if necessary.

samuelstroschein commented 3 weeks ago

Nvm. Latest for validation rules or automations lix needs awareness of types for triggers.

// pseudo validation rule
if (change.type === "message"){
  verifyLocale(change.snapshot)
}