Let $f:X\to Y$ be a representable morphism of algebraic stacks over an algebraically closed field $k$. I wonder is there is a "formal criterion" for checking the properties formally smooth, unramified, étale. If $X,Y$ were schemes, we would phrase the criterion by means of the maps $$X(A)\to Y(A)\times_{Y(B)}X(B)$$ induced by small extensions $A\to B$ (of local Artin $k$-algebras with residue field $k$). Those are maps of sets when $X,Y$ are schemes. What if $X,Y$ are stacks, so that $X(A)$, say, is a groupoid?
Here is an attempt for formal étaleness:
We say $f:X\to Y$ is formally étale if the following holds. Let $j:\textrm{Spec }B\to \textrm{Spec }A$ be a small extension. Then, for all maps $g:\textrm{Spec }B\to X$ and $h:\textrm{Spec }A\to Y$ such that $fg\cong hj$ as objects of $Y(B)$, there exists a morphism $\textrm{Spec }A\to X$, unique up to isomorphism in $X(A)$, such that $h\cong f\alpha\in Y(B)$ and $g\cong \alpha j\in X(B)$.
Questions. Is this phrasing correct? Is it possible to translate it in terms of a functor $X(A)\to Y(A)\times_{Y(B)}X(B)$?
Thanks!