Mirror of https://github.com/roostorg/coop
github.com/roostorg/coop
1import { inject } from '../../iocContainer/index.js';
2import { type ItemTypeSelector } from './types/itemTypes.js';
3
4export const makeGetItemTypeEventuallyConsistent = inject(
5 ['ModerationConfigService'],
6 (moderationConfigService) =>
7 async (opts: { orgId: string; typeSelector: ItemTypeSelector }) =>
8 moderationConfigService.getItemType({
9 orgId: opts.orgId,
10 itemTypeSelector: opts.typeSelector,
11 }),
12);
13
14export type GetItemTypeEventuallyConsistent = ReturnType<
15 typeof makeGetItemTypeEventuallyConsistent
16>;