Hamilton's characteristic function $W(q,\alpha)$ is usually only defined for systems without explicit time dependence, cf. Refs. 1 and 2. This means that the Hamiltonian $H(q,p)$ is a constant of motion. The constant of motion is usually the energy of the system, and it is often denoted with the letter $E$. Ref. 1 uses instead the symbol $\alpha_1$, while Ref. 2 uses the letter $h$.
For systems without explicit time dependence, the Hamilton–Jacobi (HJ) equation reads
$$\begin{align} -\frac{\partial S(q,\alpha,t)}{\partial t}
~\stackrel{\text{HJ-eq.}}{=}&~
H\left(q,\frac{\partial S(q,\alpha,t)}{\partial q}\right)\cr~=~& \alpha_1.\end{align}\tag{1} $$
One may therefore view Hamilton's characteristic function $W(q,\alpha)$ as an $\alpha_1 \leftrightarrow t$ Legendre transform of Hamilton's principal function $S(q,\alpha,t)$
$$\begin{align} W(q,\alpha)~=~&S(q,\alpha,t)+\alpha_1 t\cr
~\stackrel{(1)}{=}~&
S(q,\alpha,t) - t\frac{\partial S(q,\alpha,t)}{\partial t}.\end{align} \tag{2} $$
The above is an on-shell formulation. There is a similar story off-shell. (The words on-shell and off-shell refer to whether the EOMs are satisfied or not.) Let us for definiteness assume Dirichlet boundary conditions
$$ q(t_i)~=~q_i \quad\text{and}\quad q(t_f)~=~q_f \quad\text{fixed}.\tag{3} $$
Although OP seems fully aware of this, let us stress that Hamilton's principal function $S(q,\alpha,t)$ should not be confused with the (off-shell) action functional
$$ I[q; t_f,t_i]~:=~ \int_{t_i}^{t_f} L(q,\dot{q},t) ~\mathrm{d}t,\tag{4} $$
nor the (Dirichlet) on-shell action function $S(q_f, t_f; q_i, t_i)$. For more information about the relationship and differences between $S(q,\alpha,t)$, $S(q_f, t_f; q_i, t_i)$, and $I[q; t_i,t_f]$, see e.g. my Phys.SE answers here and here.
Let us emphasize for later comparison that in the stationary action principle we restrict to virtual paths with constant and same fixed initial time $t_i$. Similarly for the final time $t_f$.
Similarly, Hamilton's characteristic function $W(q,\alpha)$ should not be confused with the (off-shell) abbreviated action functional $A[q, E]$, nor the (Dirichlet) on-shell abbreviated action function $W(q_f, q_i, E)$. The abbreviated action functional $A[q, E]$ is usually only defined in the case of no explicit time dependence, cf. Refs. 1 and 2. In this case the (Dirichlet) on-shell action function
$$ S(q_f, q_i, T)
~=~S(q_f, t_f; q_i, t_i)\tag{5} $$
only depends on the time-difference $T:=t_f-t_i$. One may show that the
$$ \frac{\partial S(q_f, q_i, T)}{\partial T}~=~-E.\tag{6} $$
For a proof of eq. (6), see e.g. my Phys.SE answer here.
The (off-shell) abbreviated action functional $A[q, E]$ can be defined as a energy $\leftrightarrow$ time Legendre-type transformation
$$ A[q; E, t_f, t_i] ~=~ I[q; t_f,t_i] + E (t_f-t_i) \tag{7} $$
of the (off-shell) action functional $I[q; t_f,t_i]$.
In Maupertuis' principle we restrict to virtual paths with constant and same fixed energy $E$ but with free endpoint times $t_i$ and $t_f$. Formula (7) then becomes equal to
$$\begin{align} A[q; E, t_f, t_i]~=~& \int_{t_i}^{t_f} p\dot{q} ~\mathrm{d}t, \cr p~:=~&\frac{\partial L}{\partial \dot{q}}.\end{align}\tag{8} $$
As a consequence, the (Dirichlet) on-shell abbreviated action
$$\begin{align} W(q_f, q_i, E)
~=~& S(q_f, q_i, T) + E T\cr ~\stackrel{(6)}{=}~&
S(q_f, q_i, T) - T\frac{\partial S(q_f, q_i, T)}{\partial T}\end{align} \tag{9} $$
becomes the $E\leftrightarrow T$ Legendre transform of the (Dirichlet) on-shell action function $S(q_f, q_i, T)$.