Suppose that we have a "diagram of categories", i.e. a map from some small category $J$, viewed as a 2-category (with trivial two-morphisms) to the category of categories, $j\mapsto \mathcal{C}_j.$ Then we can define categorical limits and colimits of this diagram, but I want to think about a related but different operation - something like a "join-union" $*_J\mathcal{C}_j$ of the categories, whose objects are the union $$Ob (*_J\mathcal{C}): = \cup_j Ob(\mathcal{C}_j)$$ and whose morphisms $Hom(X, Y)$ with $X\in \mathcal{C}_i, Y\in \mathcal{C}_j$ are pairs $(\alpha, f)$ where $\alpha: i\to j$ is an arrow in $J$ and $f: \alpha(X)\to Y$ is an arrow in $\mathcal{C}_j.$

We have a forgetful functor $*_J\mathcal{C}_j\to J$, and we can define another operation $\star_J,$ a sort of adjoint operation to $*_J$ by taking objects of $\star_J(\mathcal{C}_j)$ to be sections of the functor $*_J\mathcal{C}_j\to J$ (mod categorical technicalities), which gives a category whose objects are compatible collections of objects $\{X_j\mid j\in J\}$ with (compatible) morphisms $\alpha(X_i)\to X_j$ for any $\alpha:i\to j$ in $J$. These operations are sort of adjoint because we have an equivalence of categories $$\operatorname{Fun}(*_J\mathcal{C}_j, \mathcal{D}) \cong \star_J(\operatorname{Fun}(\mathcal{C}_j,\mathcal{D}))$$ for any other category $\mathcal{D}$.

These seem like very natural constructions and I'm sure they've been studied by category theorists, but I haven't been able to find a reference. My questions about them are:

- what are the right names and symbols to use for these operations?
- Do they fit in a larger context, like fibered categories or something like that?
- There should be $\infty$-categorical analogues to these constructions and the adjunction-like result above, but I haven't been able to find them in HTT. Have these been carefully written down?