diff --git a/web/src/lib/pb.ts b/web/src/lib/pb.ts index be9aa425..311f70b8 100644 --- a/web/src/lib/pb.ts +++ b/web/src/lib/pb.ts @@ -15,7 +15,7 @@ export interface Submission { name: string assets: string[] created_by: string - status: 'approved' | 'rejected' | 'pending' + status: 'approved' | 'rejected' | 'pending' | 'added_to_collection' approved_by: string expand: { created_by: User @@ -38,10 +38,34 @@ export interface Submission { updated: string } +export interface CommunityGallery { + id: string + name: string + created_by: string + status: 'approved' | 'rejected' | 'pending' | 'added_to_collection' + assets: string[] + created: string + updated: string + extras: { + aliases: string[] + categories: string[] + base?: string + colors?: { + dark?: string + light?: string + } + wordmark?: { + dark?: string + light?: string + } + } +} + interface TypedPocketBase extends PocketBase { collection(idOrName: string): RecordService // default fallback for any other collection collection(idOrName: 'users'): RecordService collection(idOrName: 'submissions'): RecordService + collection(idOrName: 'community_gallery'): RecordService } export const pb = new PocketBase('http://127.0.0.1:8090') as TypedPocketBase;