@acanthis-dec/core 1.2.0 → 1.4.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (2) hide show
  1. package/dist/index.d.mts +88 -2
  2. package/package.json +1 -1
package/dist/index.d.mts CHANGED
@@ -57,12 +57,20 @@ type ChapterContent = {
57
57
  html: string;
58
58
  };
59
59
  type NovelStatus = "ongoing" | "completed" | "unknown";
60
- type SourceCapability = "search" | "novels" | "illustrations";
60
+ type SourceCapability = "search" | "novels" | "illustrations" | "explore";
61
61
  interface NovelSourceDescriptor {
62
62
  id: string;
63
63
  name: string;
64
64
  capabilities: SourceCapability[];
65
65
  }
66
+ interface BookshelfCategory {
67
+ id: string;
68
+ name: string;
69
+ sortOrder: number;
70
+ createdAt: number;
71
+ updatedAt: number;
72
+ deletedAt: number | null;
73
+ }
66
74
  interface BookshelfItem {
67
75
  platform: string;
68
76
  novelId: string;
@@ -72,6 +80,9 @@ interface BookshelfItem {
72
80
  addedAt: number;
73
81
  updatedAt: number;
74
82
  deletedAt: number | null;
83
+ categoryIds?: string[] | undefined;
84
+ genres?: string[] | undefined;
85
+ status?: NovelStatus | undefined;
75
86
  }
76
87
  interface ReadingProgress {
77
88
  platform: string;
@@ -86,6 +97,81 @@ interface ReadingProgress {
86
97
  totalParagraphs: number;
87
98
  deviceLabel: string;
88
99
  updatedAt: number;
100
+ historyHiddenAt?: number | null | undefined;
101
+ }
102
+ interface CachedGenreItem {
103
+ name: string;
104
+ count: number;
105
+ }
106
+ interface ExploreFilterOption {
107
+ value: string;
108
+ label: string;
109
+ }
110
+ interface ExploreFilterGroup {
111
+ key: string;
112
+ label: string;
113
+ defaultValue: string;
114
+ options: ExploreFilterOption[];
115
+ }
116
+ interface ExploreChannelOption {
117
+ id: string;
118
+ label: string;
119
+ requiresChallenge?: boolean;
120
+ }
121
+ interface ExploreRankingOption {
122
+ id: string;
123
+ label: string;
124
+ supportsAll: boolean;
125
+ supportsFull: boolean;
126
+ }
127
+ interface ExploreSchema {
128
+ platform: string;
129
+ supportsHome: boolean;
130
+ channels: ExploreChannelOption[];
131
+ rankings: ExploreRankingOption[];
132
+ catalogRequiresChallenge?: boolean;
133
+ catalogFilters: ExploreFilterGroup[];
134
+ }
135
+ interface ExploreNovelItem {
136
+ id: string;
137
+ platform: string;
138
+ title: string;
139
+ coverUrl?: string;
140
+ author?: string;
141
+ summary?: string;
142
+ status?: NovelStatus;
143
+ category?: string;
144
+ genres?: string[];
145
+ latestChapter?: string;
146
+ latestChapterId?: string;
147
+ wordCount?: string;
148
+ updatedAt?: string;
149
+ rank?: number;
150
+ }
151
+ type ExploreSectionLayout = "featured" | "grid" | "rank" | "updates";
152
+ interface ExploreSectionMoreTarget {
153
+ type: "ranking" | "catalog" | "channel";
154
+ params: Record<string, string>;
155
+ }
156
+ interface ExploreSection {
157
+ id: string;
158
+ title: string;
159
+ layout: ExploreSectionLayout;
160
+ items: ExploreNovelItem[];
161
+ more?: ExploreSectionMoreTarget;
162
+ }
163
+ interface ExploreHomeData {
164
+ platform: string;
165
+ channel: string;
166
+ title: string;
167
+ sections: ExploreSection[];
168
+ }
169
+ interface ExplorePage {
170
+ platform: string;
171
+ items: ExploreNovelItem[];
172
+ page: number;
173
+ totalPages?: number;
174
+ hasNextPage: boolean;
89
175
  }
90
176
  export declare function runTimeout<T>(callback: () => T | Promise<T>, delayTime: number): Promise<T>;
91
- export type { BookshelfItem, Chapter, ChapterContent, ContentNode, DescrambleCoefficients, LcgConfig, Novel, NovelInfo, NovelSearchResult, NovelSourceDescriptor, NovelStatus, ReadingProgress, SourceCapability, Volume };
177
+ export type { BookshelfCategory, BookshelfItem, CachedGenreItem, Chapter, ChapterContent, ContentNode, DescrambleCoefficients, ExploreChannelOption, ExploreFilterGroup, ExploreFilterOption, ExploreHomeData, ExploreNovelItem, ExplorePage, ExploreRankingOption, ExploreSchema, ExploreSection, ExploreSectionLayout, ExploreSectionMoreTarget, LcgConfig, Novel, NovelInfo, NovelSearchResult, NovelSourceDescriptor, NovelStatus, ReadingProgress, SourceCapability, Volume };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@acanthis-dec/core",
3
- "version": "1.2.0",
3
+ "version": "1.4.0",
4
4
  "description": "The core package of Acanthis project, including some platform-independent utils and type definitions.",
5
5
  "author": "ConstasJ <constasj@qq.com>",
6
6
  "license": "MIT",