types.ts1.2 KBView on GitHub /**
* Omni-channel inbox types, taken STRAIGHT from the server's own declaration
* (`@zero/server/inbox/types`) so the frontend never hand-maintains the row shape.
*
* They used to be inferred from `inbox.listItems`'s router output. That route is gone — the
* feed is composed here from `mail.listThreads` plus one `inbox.listChannelItems` per chat
* channel — and inferring from any single one of those would type the merged list by whichever
* source happened to be picked. The service module is the shape all of them normalize to, and
* it is the same module `@zero/server/inbox/merge` types its slices with, so the merge input
* and the merge output cannot disagree. See apps/mail/docs/wiki/unified-feed-composition.md.
*/
export type {
InboxChannel,
InboxChannelFilter,
InboxItem,
ListInboxItemsResult,
} from '@zero/server/inbox/types';
import type { InboxChannelFilter } from '@zero/server/inbox/types';
export const CHANNEL_FILTERS: { value: InboxChannelFilter; label: string }[] = [
{ value: 'all', label: 'All' },
{ value: 'email', label: 'Email' },
{ value: 'linkedin', label: 'LinkedIn' },
{ value: 'whatsapp', label: 'WhatsApp' },
{ value: 'slack', label: 'Slack' },
];