import { Timestamp, MultiLanguageString, Address } from './common'; import { StudentId, Student } from './student'; import { ClientId } from './client'; import { FamilyId } from './family'; import { UserId, Role, UserType, UserProfileV2 } from './user'; import { QrCode } from './invite'; export declare type SchoolId = string; /** * dbRef: schoolData/{sid} */ export interface SchoolData { academicYears: AcademicYears; badges: Badges; invites: Invites; metadata: Metadata; profile: Profile; rooms: Rooms; settings: Settings; stats: Stats; users: Users; students: Students; } /** * dbRef: schoolData/{sid}/academicYears */ export declare type AcademicYearId = string; export declare type AcademicYears = { [yid: AcademicYearId]: AcademicYear; }; export interface AcademicYear { dEnd: number; dStart: number; name: MultiLanguageString | string; } /** * dbRef: schoolData/{sid}/badges/{id} */ export declare type Badges = { [id: string]: number; }; /** * dbRef: schoolData/{sid}/invites/{inviteId} */ export declare type Invites = { [id: string]: Invite; }; export interface Invite { active: boolean; expiresAt: number; fid?: FamilyId; role: Role; studentId?: StudentId; type: UserType; qrCode: QrCode; } /** * dbRef: schoolData/{sid}/metadata */ export interface Metadata { cid: string; sid: string; createdAt: number; createdBy: string; } /** * DB: /schoolData/{sid}/profile */ export interface Profile { address: Address; bName: MultiLanguageString | string; sName: MultiLanguageString | string; color: string; email: string; initials: string; logoUrl: string; map?: { latitude: string; latitudeDelta: string; longitude: string; longitudeDelta: string; }; phoneOffice: string; phoneFax: string; sns: { [id: string]: string; }; webUrl: string; } /** * dbRef: schoolData/{sid}/rooms/{roomId} */ export declare type RoomId = string; export declare type Rooms = { [id: RoomId]: Room; }; export interface Room { color?: string; name: MultiLanguageString | string; photoUrl?: string; } /** * dbRef: schoolData/{sid}/settings */ export interface Settings { general: { default: { currency: string; locale: string; timezone: string; }; locales: { [id: string]: string; }; }; modules: { [id: string]: boolean; }; } /** * DB: /schoolData/{sid}/stats */ export interface Stats { current: { classes: number; families: number; guardians: number; staff: number; students: number; }; monthly: { [id: string]: { classes: number; families: number; students: number; users: number; announcements: number; events: number; }; }; } /** * DB: /schoolData/{sid}/students/{studentId} */ export declare type Students = { [uid: StudentId]: Student; }; /** * DB: /schoolData/{sid}/users/{uid} */ export declare type Users = { [uid: UserId]: User; }; export interface User { disabled: boolean; fid?: FamilyId; name: MultiLanguageString | string; photoUrl?: string; role: Role; type: UserType; } /** * dbRef: school/{sid} * @deprecated */ export interface SchoolV2 { cid: ClientId; sid: SchoolId; nameJa: string; nameEn: string; branchNameJa: string; branchNameEn: string; companyNameJa: string; companyNameEn: string; createdAt: Timestamp; createdBy: UserId; stats: SchoolStatsV2; } /** * dbRef: schoolMetadata/{sid} * @deprecated */ export interface SchoolMetadataV2 { badges: { [id: string]: number; }; stats: { activeClasses: number; activeFamilies: number; activeGuardians: number; activeManagers: number; activeStaff: number; activeStudents: number; activeStudentUsers: number; }; } /** * dbRef: schoolProfile/{sid} * @deprecated */ export interface SchoolProfileV2 { address: { [lang: string]: { addressCity: string; addressLine1: string; addressLine2: string; addressPostCode: string; addressPrefecture: string; city?: string; country?: string; line1?: string; line2?: string; postCode?: string; prefecture?: string; }; }; blog: string; id: string; initials: string; branchNameEn: string; branchNameJa: string; email: string; logoUrl: string; map: { latitude: number; latitudeDelta: number; longitude: number; longitudeDelta: number; }; nameEn: string; nameJa: string; openDays: { [day: string]: { closeTime: string; open: boolean; openTime: string; }; }; phoneFax: string; phoneOffice: string; schoolColor: string; socialMedia: { [id: string]: string; }; website: string; blogURL?: string; branch?: MultiLanguageString; color?: string; logoURL?: string; name?: MultiLanguageString; sid?: string; sns?: { [id: string]: string; }; websiteURL?: string; } /** * dbRef: schoolSettings/{sid} * @deprecated */ export interface SchoolSettingsV2 { adminUsers?: { [userId: UserId]: boolean; }; id: SchoolId; cid: ClientId; officeUsers?: { [userId: UserId]: boolean; }; currency: string; language: string; timezone: string; } /** * dbRef: school/{sid}/stats * @deprecated */ export interface SchoolStatsV2 { total: { activeClasses: number; activeFamilies: number; activeGuardians: number; activeManagers: number; activeStaff: number; activeStudents: number; activeStudentUsers: number; activeTeachers: number; activeUsers: number; }; } /** * dbRef: schoolUsers/{sid} * @deprecated */ export interface SchoolUserV2 { active: boolean; archived: boolean; children?: { [studentId: StudentId]: boolean; } | null; cid: ClientId; family?: FamilyId | null; id: UserId; profile: UserProfileV2; school: SchoolId | null; userType: Role; }