import type { Mutable, RequireAll } from '@qualisero/openapi-endpoint'
import type { components } from './openapi-types'
// Pinia store state — fully mutable, all fields present:
type PetState = Mutable<RequireAll<components['schemas']['Pet']>>
readOnly keys for request types
Deep-strip all TypeScript
readonlymodifiers fromT, recursing into nested objects and arrays (includingreadonlyarrays).Direction semantics — response shape → mutable store shape. openapi-typescript emits
readonlyon every property derived from a specreadOnly: truemarker.Mutable<T>removes those modifiers so response types can be stored in reactive state (Vueref/reactive, Pinia stores) without TypeScript complaining about mutation.Unlike Writable,
Mutablekeeps all properties — it only removes thereadonlymodifier, not the keys themselves.