mirror of
https://github.com/rommapp/romm.git
synced 2026-12-04 12:52:19 +01:00
* fix(states): send each state's content hash in the state list
RomM stores a content hash for every state, and the save list already
sends each save's. StateSchema never had the field, so GET /api/states,
GET /api/states/{id} and a ROM's user_states left it out. A client that
keeps its own copies of states can now tell it already has one without
downloading it.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
* chore(pr-ready): code-review fixes
Document what a state's content_hash covers in the schema and cover the
ROM detail user_states/all_user_states in the endpoint test.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
* chore(pr-ready): simplify
Declare content_hash once on ManagedAsset, the schema side of the
ChannelContent model that owns the column, so saves and states share one
documented field. Build the hash test on the state fixture with a single
hash value.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
---------
Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
Co-authored-by: Georges-Antoine Assi <contact@me.gantoine.com>
60 lines
1.6 KiB
TypeScript
60 lines
1.6 KiB
TypeScript
/* generated using openapi-typescript-codegen -- do not edit */
|
|
/* istanbul ignore file */
|
|
/* tslint:disable */
|
|
/* eslint-disable */
|
|
import type { ScreenshotSchema } from './ScreenshotSchema';
|
|
/**
|
|
* A state enriched with its owner's username, for the community (My /
|
|
* Community) view. Mirrors UserScreenshotSchema.
|
|
*/
|
|
export type UserStateSchema = {
|
|
/**
|
|
* The ID of the sync channel this was pushed to. Null for a backup that the user manages themselves.
|
|
*/
|
|
channel_id?: (string | null);
|
|
/**
|
|
* MD5 of the file's bytes, or for a zip, of its sorted `name:md5` entry lines. Null for a file never hashed.
|
|
*/
|
|
content_hash?: (string | null);
|
|
is_favorite?: boolean;
|
|
/**
|
|
* The owner's free-text labels.
|
|
*/
|
|
labels?: Array<string>;
|
|
id: number;
|
|
rom_id: number;
|
|
user_id: number;
|
|
/**
|
|
* The file name, extension included.
|
|
*/
|
|
file_name: string;
|
|
/**
|
|
* The file name without its extension or any tags in parentheses or brackets.
|
|
*/
|
|
file_name_no_tags: string;
|
|
file_name_no_ext: string;
|
|
file_extension: string;
|
|
/**
|
|
* The folder holding the file.
|
|
*/
|
|
file_path: string;
|
|
file_size_bytes: number;
|
|
full_path: string;
|
|
download_path: string;
|
|
missing_from_fs: boolean;
|
|
created_at: string;
|
|
updated_at: string;
|
|
emulator: (string | null);
|
|
/**
|
|
* The libretro core that wrote the state.
|
|
*/
|
|
core?: (string | null);
|
|
is_public?: boolean;
|
|
screenshot: (ScreenshotSchema | null);
|
|
origin_device_id?: (string | null);
|
|
username: string;
|
|
user_avatar_path?: string;
|
|
user_updated_at?: (string | null);
|
|
};
|
|
|