@acanthis-dec/core 1.2.0 → 1.3.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 +72 -2
  2. package/package.json +1 -1
package/dist/index.d.mts CHANGED
@@ -57,7 +57,7 @@ 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;
@@ -87,5 +87,75 @@ interface ReadingProgress {
87
87
  deviceLabel: string;
88
88
  updatedAt: number;
89
89
  }
90
+ interface ExploreFilterOption {
91
+ value: string;
92
+ label: string;
93
+ }
94
+ interface ExploreFilterGroup {
95
+ key: string;
96
+ label: string;
97
+ defaultValue: string;
98
+ options: ExploreFilterOption[];
99
+ }
100
+ interface ExploreChannelOption {
101
+ id: string;
102
+ label: string;
103
+ requiresChallenge?: boolean;
104
+ }
105
+ interface ExploreRankingOption {
106
+ id: string;
107
+ label: string;
108
+ supportsAll: boolean;
109
+ supportsFull: boolean;
110
+ }
111
+ interface ExploreSchema {
112
+ platform: string;
113
+ supportsHome: boolean;
114
+ channels: ExploreChannelOption[];
115
+ rankings: ExploreRankingOption[];
116
+ catalogRequiresChallenge?: boolean;
117
+ catalogFilters: ExploreFilterGroup[];
118
+ }
119
+ interface ExploreNovelItem {
120
+ id: string;
121
+ platform: string;
122
+ title: string;
123
+ coverUrl?: string;
124
+ author?: string;
125
+ summary?: string;
126
+ status?: NovelStatus;
127
+ category?: string;
128
+ genres?: string[];
129
+ latestChapter?: string;
130
+ latestChapterId?: string;
131
+ wordCount?: string;
132
+ updatedAt?: string;
133
+ rank?: number;
134
+ }
135
+ type ExploreSectionLayout = "featured" | "grid" | "rank" | "updates";
136
+ interface ExploreSectionMoreTarget {
137
+ type: "ranking" | "catalog" | "channel";
138
+ params: Record<string, string>;
139
+ }
140
+ interface ExploreSection {
141
+ id: string;
142
+ title: string;
143
+ layout: ExploreSectionLayout;
144
+ items: ExploreNovelItem[];
145
+ more?: ExploreSectionMoreTarget;
146
+ }
147
+ interface ExploreHomeData {
148
+ platform: string;
149
+ channel: string;
150
+ title: string;
151
+ sections: ExploreSection[];
152
+ }
153
+ interface ExplorePage {
154
+ platform: string;
155
+ items: ExploreNovelItem[];
156
+ page: number;
157
+ totalPages?: number;
158
+ hasNextPage: boolean;
159
+ }
90
160
  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 };
161
+ export type { BookshelfItem, 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.3.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",