Fix StartOS 0.4 TypeScript packaging to match SDK API

This commit is contained in:
MacPro
2026-04-09 15:10:44 -05:00
parent d5046a0daf
commit 0b70cbb2bf
3436 changed files with 867051 additions and 92 deletions
@@ -0,0 +1,26 @@
import { Backups } from './Backups';
import * as T from '../../../base/lib/types';
import { InitScript } from '../../../base/lib/inits';
/**
* Parameters for `setupBackups`. Either:
* - An array of volume IDs to back up entirely, or
* - An async factory function that returns a fully configured {@link Backups} instance
*/
export type SetupBackupsParams<M extends T.SDKManifest> = M['volumes'][number][] | ((_: {
effects: T.Effects;
}) => Promise<Backups<M>>);
type SetupBackupsRes = {
createBackup: T.ExpectedExports.createBackup;
restoreInit: InitScript;
};
/**
* Set up backup and restore exports for the service.
*
* Returns `{ createBackup, restoreInit }` which should be exported and wired into
* the service's init and backup entry points.
*
* @param options - Either an array of volume IDs or an async factory returning a Backups instance
* @returns An object with `createBackup` (the backup export) and `restoreInit` (an InitScript for restore)
*/
export declare function setupBackups<M extends T.SDKManifest>(options: SetupBackupsParams<M>): SetupBackupsRes;
export {};