  We will introduce two new classes of Dirichlet series which are monoids under
multiplication. The first class $\mathfrak{A}^{\#}$ contains both the extended
Selberg class $\mathscr{S}^{\#}$ of Kaczorowski and Perelli as well as many
$L$-functions attached to automorphic representations of ${\rm GL}_n({\mathbb
A}_K)$, where ${\mathbb A}_K$ denotes the ad\`eles over the number field $K$
(these representations need not be unitary or generic). This is in contrast to
the class $\mathscr{S}^{\#}$ which is smaller and is known to contain, very few
of these $L$-functions. The larger class is obtained by weakening the
requirement for absolute convergence, allowing a finite number of poles,
allowing more general gamma factors and by allowing the series to have trivial
zeros to the right of $\mathrm{Re}(s)=1/2$, while retaining the other axioms of
the extended Selberg class. We will classify series in $\mathfrak{A}^{\#}$ of
degree $d$ when $d\le 1$ (when $d=1$, we will assume absolute convergence in
$\mathrm{Re}(s)>1$). We will further prove a primitivity result for the
$L$-functions of cuspidal eigenforms on ${\rm GL}_2({\mathbb A}_{\mathbb Q})$
and a theorem allowing us to compare the zeros of tensor product $L$-functions
of ${\rm GL}_n({\mathbb A}_K)$ which cannot be deduced from previous
classification results. The second class
$\mathfrak{G}^{\#}\subset\mathfrak{A}^{\#}$, which also contains
$\mathscr{S}^{\#}$, more closely models the behaviour of $L$-functions of
unitary globally generic representations of ${\rm GL}_n({\mathbb A}_K)$.
