index.ts raw
1 /**
2 * Content Bounded Context
3 *
4 * Handles notes, reactions, reposts, bookmarks, pins, and other content types.
5 */
6
7 // Entities
8 export { Note } from './Note'
9 export type { NoteType, NoteMention, NoteReference } from './Note'
10
11 export { Reaction } from './Reaction'
12 export type { ReactionType, CustomEmoji } from './Reaction'
13
14 export { Repost } from './Repost'
15
16 // Aggregates
17 export { BookmarkList } from './BookmarkList'
18 export type { BookmarkType, BookmarkEntry, BookmarkListChange } from './BookmarkList'
19
20 export { PinList, MAX_PINNED_NOTES, CannotPinOthersContentError, CanOnlyPinNotesError } from './PinList'
21 export type { PinEntry, PinListChange } from './PinList'
22
23 // Errors
24 export {
25 InvalidContentError,
26 NoteOperationError,
27 CannotReactToOwnContentError,
28 NoteNotFoundError,
29 ContentTooLargeError
30 } from './errors'
31
32 // Domain Events
33 export {
34 EventBookmarked,
35 EventUnbookmarked,
36 BookmarkListPublished,
37 NotePinned,
38 NoteUnpinned,
39 PinsLimitExceeded,
40 PinListPublished,
41 ReactionAdded,
42 ContentReposted
43 } from './events'
44 export type { ContentDomainEvent } from './events'
45
46 // Repositories
47 export type { BookmarkListRepository, PinListRepository } from './repositories'
48
49 // Adapters for migration
50 export {
51 // Note adapters
52 toNote,
53 tryToNote,
54 isNoteEvent,
55 toNotes,
56 // Reaction adapters
57 toReaction,
58 tryToReaction,
59 isReactionEvent,
60 toReactions,
61 groupReactionsByEmoji,
62 countLikes,
63 // Repost adapters
64 toRepost,
65 tryToRepost,
66 isRepostEvent,
67 toReposts,
68 // BookmarkList adapters
69 toBookmarkList,
70 tryToBookmarkList,
71 isBookmarkListEvent,
72 // PinList adapters
73 toPinList,
74 tryToPinList,
75 isPinListEvent,
76 // Content type detection
77 getContentType,
78 parseContentEvent
79 } from './adapters'
80