mirror of
https://github.com/outline/outline.git
synced 2026-11-26 07:33:19 +03:00
* 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
30 lines
715 B
TypeScript
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";
|
|
};
|