Files
outline/shared/types/navigation.ts
T
Tom Moor 14c9f94e31 chore: Split shared/types into domain files (#14014)
* chore: Move shared/types.ts to shared/types/index.ts

* chore: Split shared/types into domain files

shared/types/index.ts re-exports every file, so imports from
@shared/types do not change. No definitions are changed.

* docs: Add JSDoc to all exports in shared/types
2026-10-10 13:24:09 -04:00

30 lines
715 B
TypeScript

/** The kinds of node in a navigation tree. */
export enum NavigationNodeType {
Collection = "collection",
Document = "document",
UserMembership = "userMembership",
GroupMembership = "groupMembership",
}
/** A node in a navigation tree, such as a collection's document structure. */
export type NavigationNode = {
id: string;
title: string;
url: string;
emoji?: string;
icon?: string;
color?: string;
children: NavigationNode[];
isDraft?: boolean;
collectionId?: string;
type?: NavigationNodeType;
parent?: NavigationNode | null;
depth?: number;
};
/** The sort order of documents in a collection. */
export type CollectionSort = {
field: string;
direction: "asc" | "desc";
};