import type { PageData, PageExtras } from '@dosgato/templating'; import { DateTime } from 'luxon'; /** * This function represents the entire process of migrating a page from one schema version * to another. * * Schema versions are represented as Dates so that components built by different authors * can be mixed and matched and have their migrations placed on a single timeline. It * could still get complicated if a third party component is not upgraded for some time and * the page has been migrated and saved in the time between the third party component's * migration date and bringing the update into the project. It may be necessary to manipulate * the third party component's migrations to alter the desired date to the date of the update. * Otherwise the third party component's migration would be skipped because it's too old. * * A schema version equal to a migration's createdAt means "after that migration". So the set of * migrations applied at version V is every migration with createdAt <= V, and moving from version * A to version B runs exactly the migrations between them: (A, B] going forward, (B, A] going * backward. This matters because the API's current schema version is the createdAt of its newest * migration, so stored data is routinely tagged exactly at a migration date. */ export declare function migratePage(page: PageData, extras: PageExtras, toSchemaVersion?: DateTime): Promise;