import type { BoundMutation } from "../../src/contracts/server-state.ts"; import { type LegacyMutationOptions, useApplicationMutation, } from "../../src/presentation/adapters/query/application-query.ts"; /** * 1101/08-03. Test-only door to the raw (LEGACY) mutation path. * * The product hook takes a bound definition only. Its runtime still has the * raw branch, so the tests that pin that branch run it through this cast. A * raw write sends no Idempotency-Key and its resend resolves to `null`; no * product code may reach it ("rejects a raw executor on the product hook at * compile time" in `tests/component/application-mutation-admission.test.tsx`). */ export function useLegacyApplicationMutation( options: LegacyMutationOptions, ) { return useApplicationMutation( options as unknown as BoundMutation, ); }