mwg API
    Preparing search index...

    Type Alias SaveSyncOptions

    SaveSyncOptions: HttpTransportOptions

    Uploads/downloads SaveSystem.exportSlot payloads to a game's own HTTPS endpoint - the server half of item 124's save export/import, following FeedbackClient's own shape (an injectable transport a game points at its own endpoint) rather than a second pattern: mwg ships no backend and assumes none here either.

    Every call names a slot, the same name SaveSystem.exportSlot/importSlot already use locally, so a player with several named profiles (SaveSystem supports as many as a game creates) can sync each independently against one endpoint rather than the endpoint holding only ever one save. list() is the seam a profile picker reads before choosing which slot to download.

    import { SaveSyncClient, SaveSystem } from '@datamoc/mw_games/core';

    const sync = new SaveSyncClient({ endpoint: 'https://example.com/api/saves' });
    const saves = new SaveSystem<{ depth: number }>({ namespace: 'my-game', version: 1 });

    const payload = saves.exportSlot('slot1');
    if (payload) await sync.upload('slot1', payload);

    const slots = await sync.list();
    const restored = await sync.download('slot1');