/** * This file was @generated using pocketbase-typegen */ import type PocketBase from "pocketbase"; import type { RecordService } from "pocketbase"; export declare enum Collections { Authorigins = "_authOrigins", Collection = "collection", Country = "country", Externalauths = "_externalAuths", Genre = "genre", Language = "language", Mfas = "_mfas", Movie = "movie", MovieStaff = "movieStaff", MusicAlbum = "musicAlbum", Otps = "_otps", Person = "person", Role = "role", Studio = "studio", Superusers = "_superusers", Tag = "tag", TvEpisode = "tvEpisode", TvEpisodeStaff = "tvEpisodeStaff", TvSeason = "tvSeason", TvSeasonStaff = "tvSeasonStaff", TvSeries = "tvSeries", TvSeriesStaff = "tvSeriesStaff", User = "user" } export type IsoDateString = string; export type IsoAutoDateString = { readonly autodate: unique symbol; } & string; export type RecordIdString = string; export type FileNameString = { readonly filename: unique symbol; } & string; export type HTMLString = string; type ExpandType = unknown extends T ? T extends unknown ? { expand?: unknown; } : { expand: T; } : { expand: T; }; export type BaseSystemFields = { collectionId: string; collectionName: Collections; id: RecordIdString; } & ExpandType; export type AuthSystemFields = { email: string; emailVisibility: boolean; username: string; verified: boolean; } & BaseSystemFields; export type AuthoriginsRecord = { collectionRef: string; created: IsoAutoDateString; fingerprint: string; id: string; recordRef: string; updated: IsoAutoDateString; }; export type ExternalauthsRecord = { collectionRef: string; created: IsoAutoDateString; id: string; provider: string; providerId: string; recordRef: string; updated: IsoAutoDateString; }; export type MfasRecord = { collectionRef: string; created: IsoAutoDateString; id: string; method: string; recordRef: string; updated: IsoAutoDateString; }; export type OtpsRecord = { collectionRef: string; created: IsoAutoDateString; id: string; password: string; recordRef: string; sentTo?: string; updated: IsoAutoDateString; }; export type SuperusersRecord = { created: IsoAutoDateString; email: string; emailVisibility?: boolean; id: string; password: string; tokenKey: string; updated: IsoAutoDateString; verified?: boolean; }; export type CollectionRecord = { backdrop?: FileNameString[]; banners?: FileNameString[]; contentRatings?: string; created: IsoAutoDateString; description?: string; genres?: RecordIdString[]; id: string; logos?: FileNameString[]; name: string; posters?: FileNameString[]; rating?: number; releaseDate: IsoDateString; sortName: string; tags?: RecordIdString[]; thumbnails?: FileNameString[]; updated: IsoAutoDateString; }; export type CountryRecord = { alpha2: string; alpha3: string; created: IsoAutoDateString; id: string; name: string; updated: IsoAutoDateString; }; export type GenreRecord = { created: IsoAutoDateString; id: string; name: string; sortName: string; updated: IsoAutoDateString; }; export type LanguageRecord = { created: IsoAutoDateString; id: string; iso639_1: string; iso639_2: string; name: string; updated: IsoAutoDateString; }; export type MovieRecord = { backdrop?: FileNameString[]; banners?: FileNameString[]; collections?: RecordIdString[]; contentRatings?: string; country: RecordIdString; created: IsoAutoDateString; description?: string; genres?: RecordIdString[]; homepage?: string; id: string; language: RecordIdString; logos?: FileNameString[]; matchName?: string; name: string; posters?: FileNameString[]; rating?: number; releaseDate: IsoDateString; sortName: string; studios?: RecordIdString[]; tagline?: string; tags?: RecordIdString[]; thumbnails?: FileNameString[]; updated: IsoAutoDateString; }; export type MovieStaffRecord = { created: IsoAutoDateString; id: string; movie: RecordIdString; person: RecordIdString; priority?: number; role: RecordIdString; updated: IsoAutoDateString; }; export type MusicAlbumRecord = { backdrop?: FileNameString[]; banners?: FileNameString[]; collections?: RecordIdString[]; contentRatings?: string; country: RecordIdString; created: IsoAutoDateString; description?: string; genres?: RecordIdString[]; id: string; language: RecordIdString; logos?: FileNameString[]; matchName?: string; name: string; posters?: FileNameString[]; rating?: number; releaseDate: IsoDateString; sortName: string; tags?: RecordIdString[]; thumbnails?: FileNameString[]; updated: IsoAutoDateString; }; export type PersonRecord = { avatars?: FileNameString[]; backdrop?: FileNameString[]; country: RecordIdString; created: IsoAutoDateString; description?: string; dob?: IsoDateString; dod?: IsoDateString; id: string; matchName?: string; name: string; sortName: string; tags?: RecordIdString[]; thumbnails?: FileNameString[]; updated: IsoAutoDateString; }; export declare enum RoleJellyfinOptions { Actor = "Actor", Arranger = "Arranger", Composer = "Composer", Conductor = "Conductor", Director = "Director", Engineer = "Engineer", GuestStar = "GuestStar", Lyricist = "Lyricist", Mixer = "Mixer", Producer = "Producer", Remixer = "Remixer", Writer = "Writer" } export type RoleRecord = { created: IsoAutoDateString; id: string; jellyfin?: RoleJellyfinOptions; name: string; updated: IsoAutoDateString; }; export type StudioRecord = { backdrop?: FileNameString[]; country: RecordIdString; created: IsoAutoDateString; description?: string; foundedAt?: IsoDateString; id: string; language: RecordIdString; logos?: FileNameString[]; name: string; posters?: FileNameString[]; sortName: string; thumbnails?: FileNameString[]; updated: IsoAutoDateString; }; export type TagRecord = { created: IsoAutoDateString; id: string; name: string; sortName: string; updated: IsoAutoDateString; }; export type TvEpisodeRecord = { airDate: IsoDateString; backdrop?: FileNameString[]; banners?: FileNameString[]; country: RecordIdString; created: IsoAutoDateString; description?: string; id: string; language: RecordIdString; logos?: FileNameString[]; name: string; order?: number; posters?: FileNameString[]; rating?: number; sortName: string; thumbnails?: FileNameString[]; tvSeason: RecordIdString; updated: IsoAutoDateString; }; export type TvEpisodeStaffRecord = { created: IsoAutoDateString; id: string; person: RecordIdString; priority?: number; role: RecordIdString; tvEpisode: RecordIdString; updated: IsoAutoDateString; }; export type TvSeasonRecord = { airDate: IsoDateString; backdrop?: FileNameString[]; banners?: FileNameString[]; contentRatings?: string; country: RecordIdString; created: IsoAutoDateString; description?: string; homepage?: string; id: string; language: RecordIdString; logos?: FileNameString[]; name: string; order?: number; posters?: FileNameString[]; rating?: number; sortName: string; studios?: RecordIdString[]; tagline?: string; thumbnails?: FileNameString[]; tvSeries: RecordIdString; updated: IsoAutoDateString; }; export type TvSeasonStaffRecord = { created: IsoAutoDateString; id: string; person: RecordIdString; priority?: number; role: RecordIdString; tvSeason: RecordIdString; updated: IsoAutoDateString; }; export type TvSeriesRecord = { backdrop?: FileNameString[]; banners?: FileNameString[]; collections?: RecordIdString[]; contentRatings?: string; country: RecordIdString; created: IsoAutoDateString; description?: string; firstAirDate: IsoDateString; genres?: RecordIdString[]; homepage?: string; id: string; language: RecordIdString; lastAirDate?: IsoDateString; logos?: FileNameString[]; matchName?: string; name: string; posters?: FileNameString[]; rating?: number; sortName: string; studios?: RecordIdString[]; tagline?: string; tags?: RecordIdString[]; thumbnails?: FileNameString[]; updated: IsoAutoDateString; }; export type TvSeriesStaffRecord = { created: IsoAutoDateString; id: string; person: RecordIdString; priority?: number; role: RecordIdString; tvSeries: RecordIdString; updated: IsoAutoDateString; }; export type UserRecord = { avatar?: FileNameString; created: IsoAutoDateString; email?: string; emailVisibility?: boolean; id: string; name?: string; password: string; tokenKey: string; updated: IsoAutoDateString; username: string; verified?: boolean; }; export type AuthoriginsResponse = BaseSystemFields & Required; export type ExternalauthsResponse = BaseSystemFields & Required; export type MfasResponse = BaseSystemFields & Required; export type OtpsResponse = BaseSystemFields & Required; export type SuperusersResponse = AuthSystemFields & Required; export type CollectionResponse = BaseSystemFields & Required; export type CountryResponse = BaseSystemFields & Required; export type GenreResponse = BaseSystemFields & Required; export type LanguageResponse = BaseSystemFields & Required; export type MovieResponse = BaseSystemFields & Required; export type MovieStaffResponse = BaseSystemFields & Required; export type MusicAlbumResponse = BaseSystemFields & Required; export type PersonResponse = BaseSystemFields & Required; export type RoleResponse = BaseSystemFields & Required; export type StudioResponse = BaseSystemFields & Required; export type TagResponse = BaseSystemFields & Required; export type TvEpisodeResponse = BaseSystemFields & Required; export type TvEpisodeStaffResponse = BaseSystemFields & Required; export type TvSeasonResponse = BaseSystemFields & Required; export type TvSeasonStaffResponse = BaseSystemFields & Required; export type TvSeriesResponse = BaseSystemFields & Required; export type TvSeriesStaffResponse = BaseSystemFields & Required; export type UserResponse = AuthSystemFields & Required; export type CollectionRecords = { _authOrigins: AuthoriginsRecord; _externalAuths: ExternalauthsRecord; _mfas: MfasRecord; _otps: OtpsRecord; _superusers: SuperusersRecord; collection: CollectionRecord; country: CountryRecord; genre: GenreRecord; language: LanguageRecord; movie: MovieRecord; movieStaff: MovieStaffRecord; musicAlbum: MusicAlbumRecord; person: PersonRecord; role: RoleRecord; studio: StudioRecord; tag: TagRecord; tvEpisode: TvEpisodeRecord; tvEpisodeStaff: TvEpisodeStaffRecord; tvSeason: TvSeasonRecord; tvSeasonStaff: TvSeasonStaffRecord; tvSeries: TvSeriesRecord; tvSeriesStaff: TvSeriesStaffRecord; user: UserRecord; }; export type CollectionResponses = { _authOrigins: AuthoriginsResponse; _externalAuths: ExternalauthsResponse; _mfas: MfasResponse; _otps: OtpsResponse; _superusers: SuperusersResponse; collection: CollectionResponse; country: CountryResponse; genre: GenreResponse; language: LanguageResponse; movie: MovieResponse; movieStaff: MovieStaffResponse; musicAlbum: MusicAlbumResponse; person: PersonResponse; role: RoleResponse; studio: StudioResponse; tag: TagResponse; tvEpisode: TvEpisodeResponse; tvEpisodeStaff: TvEpisodeStaffResponse; tvSeason: TvSeasonResponse; tvSeasonStaff: TvSeasonStaffResponse; tvSeries: TvSeriesResponse; tvSeriesStaff: TvSeriesStaffResponse; user: UserResponse; }; type ProcessCreateAndUpdateFields = Omit<{ [K in keyof T as Extract extends never ? K : never]: T[K] extends infer U ? U extends (FileNameString | FileNameString[]) ? U extends any[] ? File[] : File : U : never; }, "id">; export type CreateAuth = { email: string; emailVisibility?: boolean; id?: RecordIdString; password: string; passwordConfirm: string; verified?: boolean; } & ProcessCreateAndUpdateFields; export type CreateBase = { id?: RecordIdString; } & ProcessCreateAndUpdateFields; export type UpdateAuth = { email?: string; emailVisibility?: boolean; oldPassword?: string; password?: string; passwordConfirm?: string; verified?: boolean; } & Partial, keyof AuthSystemFields>>; export type UpdateBase = Partial, keyof BaseSystemFields>>; export type Create = CollectionResponses[T] extends AuthSystemFields ? CreateAuth : CreateBase; export type Update = CollectionResponses[T] extends AuthSystemFields ? UpdateAuth : UpdateBase; export type TypedPocketBase = { collection(idOrName: T): RecordService; } & PocketBase; export {};