Specs hooks
Hand-written shim. Generated CRUD hooks via ./specs.gen. The refresh custom-op hook stays hand-written until the React gen learns to emit kind: "custom" ops. Spec members are their own generated top-level entity (`useListSpecMembers` from spec-members.gen).
Hooks
useCreateSpec mutation
Create a spec. Fetches the OpenAPI spec from sourceUrl and generates functions + schemas for every operation.
useCreateSpec(options?: MutationOpts<Spec, CreateSpecParams>)Types: Spec · CreateSpecParams
useDeleteSpec mutation
Soft-delete a spec. Generated entities cascade-remove via spec_member; the wrapping solution is preserved (unwraps).
useDeleteSpec(options?: MutationOpts<SuccessResponse, string>)Types: SuccessResponse
useListSpecs query
List specs.
useListSpecs(params?: Omit<ListSpecsParams, | > & { filter?: SpecFilter; orderBy?: SpecOrderBy[]; } & SpecShorthands, options?: QueryOpts<Page<Spec>>)Types: ListSpecsParams · SpecFilter · SpecOrderBy · SpecShorthands · Page · Spec
usePurgeSpec composite
Permanently delete a soft-deleted spec.
usePurgeSpec(options?: MutationOpts<SuccessResponse, PurgeSpecParams>)Types: SuccessResponse · PurgeSpecParams
useRefreshSpec composite
useRefreshSpec(options?: MutationOpts<RefreshSpecResponse, RefreshSpecParams>)Types: RefreshSpecResponse · RefreshSpecParams
useRestoreSpec composite
Restore a soft-deleted spec.
useRestoreSpec(options?: MutationOpts<Spec, string>)Types: Spec
useRetrieveSpec query
Get a spec by ID.
useRetrieveSpec(id: string, options?: QueryOpts<Spec>)Types: Spec
useUpdateSpec mutation
Update a spec's metadata or auth config. Does NOT refetch the spec — call refresh explicitly.
useUpdateSpec(options?: MutationOpts<Spec, UpdateSpecParams>)Types: Spec · UpdateSpecParams