• Eagerly pre-fetches the available patron template fields by calling the validation endpoint on mount (and whenever serviceId changes). Results are cached by React Query for 5 minutes.

    Parameters

    • serviceId: number

      The ID of the saved patron auth service. When undefined the query is disabled and fieldsError reports that the service must be saved first.

    • csrfToken: string

      CSRF token forwarded to the validation endpoint.

    Returns UseAvailableFieldsResult