Files
romm/frontend/src/__generated__/models/ClientSaveState.ts
Georges-Antoine Assi faf61b22d2 docs(sync): clarify slot pairing behavior in negotiate OpenAPI spec
The /api/sync/negotiate endpoint pairs saves on (rom_id, slot) and
excludes null-slot server saves from pairing, so a client save sent with
slot=null always negotiates as an upload even when an identical file
exists on the server. This is intentional but was undocumented, which
led to confusion (issue #3697).

Add Field descriptions to the request and response schemas and expand
the endpoint docstring to explain the pairing rule and recommend a
stable slot name (e.g. "autosave"). Regenerate frontend types.

Generated-By: PostHog Code
Task-Id: 9f1c9eee-6365-4223-8cd1-b50e7d7b9cf0
2026-07-06 18:18:42 -04:00

36 lines
1.2 KiB
TypeScript

/* generated using openapi-typescript-codegen -- do not edit */
/* istanbul ignore file */
/* tslint:disable */
/* eslint-disable */
export type ClientSaveState = {
/**
* ID of the ROM this save belongs to.
*/
rom_id: number;
/**
* Name of the save file on the client.
*/
file_name: string;
/**
* Save slot name. Saves are paired between client and server on (rom_id, slot), so provide a stable slot name (e.g. 'autosave') to keep a save in sync across negotiations. A null slot is treated as an archival, manual-upload save: it is never paired with slotted server saves, so a null-slot client save always negotiates as an 'upload' even when an identical file already exists on the server under a slot.
*/
slot?: (string | null);
/**
* Emulator that produced the save, if known.
*/
emulator?: (string | null);
/**
* Hash of the save contents, used to detect identical saves.
*/
content_hash?: (string | null);
/**
* Last-modified timestamp of the save on the client.
*/
updated_at: string;
/**
* Size of the save file in bytes.
*/
file_size_bytes: number;
};