import { AutoEncoder } from '@simonbackx/simple-encoding'; import { BalanceItem } from '../../BalanceItem.js'; import { type Group } from '../../Group.js'; import { Organization } from '../../Organization.js'; import { PaymentCustomer } from '../../PaymentCustomer.js'; import { PaymentMethod } from '../../PaymentMethod.js'; import { PriceBreakdown } from '../../PriceBreakdown.js'; import { type PlatformMember } from '../PlatformMember.js'; import { BalanceItemCartItem } from './BalanceItemCartItem.js'; import { IDRegisterCart, RegisterCart } from './RegisterCart.js'; import { RegisterItem } from './RegisterItem.js'; import { type RegistrationWithPlatformMember } from './RegistrationWithPlatformMember.js'; export type RegisterContext = { members: PlatformMember[]; groups: Group[]; organizations: Organization[]; }; export declare class IDRegisterCheckout extends AutoEncoder { cart: IDRegisterCart; administrationFee: number; freeContribution: number; cancellationFeePercentage: number; paymentMethod: PaymentMethod | null; /** * The link we'll redirect the user back too after the payment page (either succeeded or failed!) * The id query param will be appended with the payment id */ redirectUrl: URL | null; /** * The link we'll redirect the user back too after the user canceled a payment (not supported for all payment methods) * The id query param will be appended with the payment id */ cancelUrl: URL | null; /** * Register these members as the organization */ asOrganizationId: string | null; customer: PaymentCustomer | null; /** * Cached price so we can detect inconsistencies between frontend and backend */ totalPrice: number | null; sendConfirmationEmail: boolean; get organizationId(): string | null; hydrate(context: RegisterContext): RegisterCheckout; get memberIds(): string[]; get groupIds(): string[]; } export declare class RegisterCheckout { cart: RegisterCart; administrationFee: number; freeContribution: number; paymentMethod: PaymentMethod | null; customer: PaymentCustomer | null; asOrganizationId: string | null; /** * Only allowed to be changed when isAdminFromSameOrganization */ sendConfirmationEmail: boolean; defaultOrganization: Organization | null; cancellationFeePercentage: number; /** * Note: only use this for temporary clones, * because the register items will still have a reference to the old checkout. */ clone(): RegisterCheckout; convert(): IDRegisterCheckout; get singleOrganization(): Organization | null; get singleOrganizationId(): string; setDefaultOrganization(organization: Organization | null): void; get isAdminFromSameOrganization(): boolean; add(item: RegisterItem, options?: { calculate?: boolean; }): void; remove(item: RegisterItem, options?: { calculate?: boolean; }): void; removeMemberAndGroup(memberId: string, groupId: string, options?: { calculate?: boolean; }): void; removeRegistration(registration: RegistrationWithPlatformMember, options?: { calculate?: boolean; }): void; unremoveRegistration(registration: RegistrationWithPlatformMember, options?: { calculate?: boolean; }): void; addBalanceItem(item: BalanceItemCartItem, options?: { calculate?: boolean; }): void; removeBalanceItem(item: BalanceItemCartItem, options?: { calculate?: boolean; }): void; removeBalanceItemByBalance(item: BalanceItem, options?: { calculate?: boolean; }): void; updatePrices(): void; validate(data: { memberBalanceItems?: BalanceItem[]; }): void; clear(): void; /** * Only includes 'due now' items - so excludes trials (doesn't work 100% yet with deleted registrations but this is not a problem at the moment) */ get totalPrice(): number; /** * Discounts that will be applied to items that are due now * (net, so minus the already applied discounts) */ get bundleDiscount(): number; /** * Discounts that will be applied to items that are due later * (net, so minus the already applied discounts) */ get bundleDiscountDueLater(): number; get priceBreakown(): PriceBreakdown; } //# sourceMappingURL=RegisterCheckout.d.ts.map