-
Notifications
You must be signed in to change notification settings - Fork 74
Expand file tree
/
Copy pathtypes.ts
More file actions
203 lines (181 loc) · 4.94 KB
/
Copy pathtypes.ts
File metadata and controls
203 lines (181 loc) · 4.94 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
export enum AppCategory {
UTILITY = 'Utility',
PRIVACY = 'Privacy',
MEDIA = 'Media',
DEVELOPMENT = 'Development',
SOCIAL = 'Social',
EDUCATIONAL = 'Educational'
}
export enum Platform {
ANDROID = 'Android',
PC = 'PC',
TV = 'TV'
}
export enum SortOption {
HOME = 'Home Page',
NEWEST = 'Recently Added',
OLDEST = 'Oldest Added',
NAME_ASC = 'Name (A-Z)',
NAME_DESC = 'Name (Z-A)',
SIZE_ASC = 'Size (Smallest)',
SIZE_DESC = 'Size (Largest)'
}
export type UpdateStream = 'Stable' | 'Beta' | 'Alpha' | 'Nightly';
export type AppFontKey = 'spaceGrotesk' | 'inter' | 'poppins' | 'manrope' | 'outfit' | 'dmSans' | 'plusJakartaSans' | 'rubik' | 'nunitoSans' | 'publicSans' | 'systemDefault';
export interface AppVariant {
arch: string;
url: string;
size?: number;
}
export interface VersionOption {
type: UpdateStream;
version: string;
date: string;
variants: AppVariant[];
}
export interface AppItem {
id: string;
name: string;
description: string;
icon: string;
version: string;
latestVersion: string;
downloadUrl: string;
variants?: AppVariant[];
availableVersions?: VersionOption[]; // New field for version selection
repoUrl?: string;
githubRepo?: string;
gitlabRepo?: string;
codebergRepo?: string;
gitlabDomain?: string;
releaseKeyword?: string;
packageName?: string;
category: string; // Changed from AppCategory to string to support dynamic categories
tags?: string[]; // V1.3.0: Support for tag-driven curation
platform: Platform;
size: string;
author: string;
screenshots: string[];
isInstalled?: boolean;
officialSite?: string;
patches?: string[];
}
export interface SocialLinks {
github: string;
x: string;
discord: string;
coffee: string;
}
export interface DevProfile {
name: string;
image?: string;
bio: string;
}
export interface FAQItem {
question: string;
answer: string;
icon: string;
}
export interface Notice {
id: string; // Change this ID to show the notice again (e.g. "alert-v1", "alert-v2")
title: string;
message: string;
show: boolean;
}
export type StorefrontAnimation = 'snowfall' | 'confetti' | 'spark' | 'none';
export type StorefrontModuleType = 'curved_apps' | 'category_cards' | 'update_pills' | 'recommendation_bundles';
export type StorefrontModulePlatform = 'android' | 'pc' | 'tv' | 'all';
export interface StorefrontPillConfig {
id?: string;
label?: string;
appId?: string;
tone?: 'primary' | 'success' | 'warning' | 'info';
}
export interface StorefrontModuleBundleConfig {
id: string;
title: string;
description?: string;
appIds: string[];
color?: string;
badge?: string;
icon?: string;
monogram?: string;
}
export interface StorefrontModuleConfig {
id: string;
type: StorefrontModuleType;
title: string;
subtitle?: string;
platform?: StorefrontModulePlatform;
insertAfterCategory?: number; // Insert after N category rows (0 places it before category rows)
animation?: StorefrontAnimation;
appIds?: string[];
pills?: StorefrontPillConfig[];
bundles?: StorefrontModuleBundleConfig[];
}
export interface StoreConfig {
appsJsonUrl: string;
mirrorJsonUrl?: string;
maintenanceMode: boolean;
maintenanceMessage?: string;
announcement?: string;
notice?: Notice;
minStoreVersion?: string;
latestStoreVersion?: string;
storeDownloadUrl?: string;
socials?: SocialLinks;
devProfile?: DevProfile;
faqs?: FAQItem[];
supportEmail?: string;
easterEggUrl?: string;
leaderboardUrl?: string; // New field for custom leaderboard endpoint (worker)
storefrontModules?: StorefrontModuleConfig[]; // Optional homepage modules from config.json
}
export type Tab = 'android' | 'pc' | 'tv' | 'about' | 'updates';
export interface LeaderboardEntry {
username: string;
xp: number;
level: number;
title: string;
class: 'Warrior' | 'Scribe' | 'Hybrid';
avatar_url: string;
rank?: number; // Injected by client
}
export interface BundleItem {
id: string;
title: string;
description: string;
appIds: string[];
apps?: AppItem[];
color?: string;
badge?: string;
icon?: string;
monogram?: string;
}
export interface StorePillItem {
id: string;
label: string;
tone: 'primary' | 'success' | 'warning' | 'info';
}
export interface StoreCategoryCard {
id: string;
label: string;
icon: string;
count: number;
accent: string;
gradient: string;
}
export interface StoreCollection {
id: string;
title: string;
subtitle?: string;
type: 'hero' | 'swimlane' | 'auto_category' | 'bundle' | 'update_pills' | 'recommendation_bundles' | 'category_cards' | 'sorted_grid';
filter?: string; // e.g. "Games" or tag name
animation?: StorefrontAnimation;
appIds?: string[]; // Explicit app IDs for curated collections
apps?: AppItem[]; // Populated by the worker
bundles?: BundleItem[]; // Populated by the worker
pillItems?: StorePillItem[]; // Populated by the worker
categoryCards?: StoreCategoryCard[]; // Populated by the worker
totalAppCount?: number;
}