Skip to main content
Version: Current

EventMigration

@rotorsoft/act-root


@rotorsoft/act-root / act/src / EventMigration

Type Alias: EventMigration<TOld, TNew>

EventMigration<TOld, TNew> = object

Defined in: libs/act/src/types/action.ts:997

Per-event migration definition for ScanOptions.event_migrations. Carries both the rename target and the schema-guarded transform that rewrites the event's data payload (ACT-1126).

Type Parametersโ€‹

TOldโ€‹

TOld

TNewโ€‹

TNew

Propertiesโ€‹

from_schemaโ€‹

readonly from_schema: object

Defined in: libs/act/src/types/action.ts:1001

Schema of the source event's data. Throws on mismatch.

parseโ€‹

parse: (data) => TOld

Parametersโ€‹
dataโ€‹

unknown

Returnsโ€‹

TOld


migrateโ€‹

readonly migrate: (data) => TNew

Defined in: libs/act/src/types/action.ts:1005

Pure data transformer.

Parametersโ€‹

dataโ€‹

TOld

Returnsโ€‹

TNew


toโ€‹

readonly to: string

Defined in: libs/act/src/types/action.ts:999

Target event name (the current version).


to_schemaโ€‹

readonly to_schema: object

Defined in: libs/act/src/types/action.ts:1003

Schema of the migrated event's data. Throws on mismatch.

parseโ€‹

parse: (data) => TNew

Parametersโ€‹
dataโ€‹

unknown

Returnsโ€‹

TNew