import { AutoEncoder, AutoEncoderPatchType } from '@simonbackx/simple-encoding'; import { Address } from '../addresses/Address.js'; import { Replacement } from '../endpoints/EmailRequest.js'; import { AuditLogReplacement } from '../AuditLogReplacement.js'; import { Group } from '../Group.js'; import { EmergencyContact } from './EmergencyContact.js'; import { Gender } from './Gender.js'; import { NationalRegisterNumberOptOut } from './NationalRegisterNumberOptOut.js'; import { Parent } from './Parent.js'; import { RecordAnswer } from './records/RecordAnswer.js'; import { ReviewTimes } from './ReviewTime.js'; import { UitpasNumberDetails } from './UitpasNumberDetails.js'; /** * Keep track of date nad time of an edited boolean value */ export declare class BooleanStatus extends AutoEncoder { value: boolean; date: Date; isOutdated(timeoutMs: number): boolean; getDiffValue(): AuditLogReplacement; } export type MemberProperty = 'birthDay' | 'gender' | 'address' | 'parents' | 'emailAddress' | 'phone' | 'emergencyContacts' | 'dataPermission' | 'financialSupport' | 'uitpasNumber' | 'nationalRegisterNumber' | 'parents.nationalRegisterNumber' | 'email'; export type MemberPropertyWithFilter = Exclude; /** * This full model is always encrypted before sending it to the server. It is never processed on the server - only in encrypted form. * The public key of the member is stored in the member model, the private key is stored in the keychain for the 'owner' users. The organization has a copy that is encrypted with the organization's public key. * Validation needs to happen mostly client side - but malicious users can just send invalid data in the encrypted form. So validation happens a second time on the client side when an organitiona's admin decrypts the member data. */ export declare class MemberDetails extends AutoEncoder { firstName: string; lastName: string; memberNumber: string | null; /** * In case the member has been merged with other members, this array contains a list * of the old ids of the members that were merged into this member. */ oldIds: string[]; /** * Note: when this is set to 'NationalRegisterNumberOptOut' it means the user manually opted out - and doesn't have a national register number */ nationalRegisterNumber: string | typeof NationalRegisterNumberOptOut | null; /** * Code needed to get access to this member when detecting duplicates. It is only visible for admins, otherwise it will be null. * * Set this value if you want to gain access to a member but receive the known_member_missing_rights error code */ securityCode: string | null; lastExternalSync?: Date | null; gender: Gender; phone: string | null; email: string | null; alternativeEmails: string[]; unverifiedEmails: string[]; unverifiedPhones: string[]; unverifiedAddresses: Address[]; notes: string | null; uitpasNumberDetails: UitpasNumberDetails | null; birthDay: Date | null; trackingYear: number | null; address: Address | null; parents: Parent[]; emergencyContacts: EmergencyContact[]; recordAnswers: Map; requiresFinancialSupport: BooleanStatus | null; /** * Indicates whether parents can have access to the members data and receive notification emails. * When set to false, the account of parents won't be linked to the member. * Also when not set, parents will have acess until the member reaches the age of 18. */ parentsHaveAccess: BooleanStatus | null; /** * Gave permission to collect sensitive information */ dataPermissions: BooleanStatus | null; /** * Last time the records were reviewed */ reviewTimes: ReviewTimes; /** * Call this to clean up capitals in all the available data */ cleanData(): void; get name(): string; trackedAgeForYear(year: number): number | null; ageOnDate(date: Date): number | null; get age(): number | null; get calculatedParentsHaveAccess(): boolean; /** * Age, set to 99 if missing */ get defaultAge(): number; get birthDayFormatted(): string | null; get hasUnverifiedData(): boolean; get didSetManualFinancialSupport(): boolean; get hasFinancialSupportOrActiveUitpas(): boolean; get shouldApplyReducedPrice(): boolean; get missingData(): (MemberProperty | 'secondParent')[]; /** * Check if this member could fit a group, ignoring dates and waiting lists */ doesMatchGroup(group: Group): boolean; getMatchingError(group: Group): { message: string; description: string; } | null; getMatchingGroups(groups: Group[]): Group[]; updateAddress(oldValue: Address, newValue: Address): void; updateAddressPatch(oldValue: Address, newValue: Address): AutoEncoderPatchType | null; /** * This will add or update the parent (possibily partially if not all data is present) */ addParent(parent: Parent): void; getShortCode(maxLength: number): string; /** * Apply newer details without deleting data or replacing filled in data with empty data */ merge(other: MemberDetails): void; getEmailReplacements(): Replacement[]; getMemberEmails(): string[]; getParentEmails(): string[]; getNotificationEmails(): string[]; hasEmail(email: string): boolean; getAllAddresses(): Address[]; static mergeParents(members: MemberDetails[], allowOverrides?: boolean): Map; static mergeEmergencyContacts(members: MemberDetails[], allowOverrides?: boolean): Map; private static mergeRelations; } //# sourceMappingURL=MemberDetails.d.ts.map