import 'server-only'; import Model, { ModelError } from './model'; import Pagination from './helpers/pagination'; import type { HestiaBranchData, DBAPIBranchData, BranchHestiaSearchParams, HestiaPhoto, HestiaNews, HestiaOpeningTime, HestiaOpeningTimeJoined, WantedAd, HestiaService, HestiaFeatureProperty, USP, DBAPIFee, BranchDepartment } from './branch.types'; import AgencyEmployee from './agency-employee'; import Testimonial from './testimonial'; import Article from './article'; import Property from './property'; import CalendarEvent from './calendar-event'; export type BranchSearchParams = { pageSize?: number; }; export type BranchOpeningHours = { openTime: string; closeTime: string; dayNo: number; }; export type BranchFeaturedProperty = { metadata: HestiaFeatureProperty; property: Property; }; export * from './branch.types'; export type BranchHestiaFields = ('branch_id' | 'branch_name' | 'photo' | 'branch_url_label')[]; export default class Branch extends Model { static pagination: Pagination | null; static recentPropertiesSearchParams: { sort: string[]; status: string; }; static findOne({ slug, }: { slug: string; }): Promise<{ result: Branch | null; errors: ModelError[] | null; }>; static findById(id: string | number): Promise<{ result: Branch | null; errors: ModelError[] | null; }>; static findAll(params?: { page?: number | string; pageSize?: number; search?: BranchHestiaSearchParams; sort?: string; fields?: BranchHestiaFields; }): Promise<{ results: Branch[]; pagination: Pagination | null; errors: ModelError[] | null; }>; static search({ search, location, county, postcode, sort, page, pageSize, }: { search?: BranchHestiaSearchParams; location?: string; county?: string; postcode?: string; sort?: string; page?: number; pageSize?: number; }): Promise<{ results: Branch[]; pagination: Pagination | null; errors: ModelError[] | null; }>; get id(): number | null; get name(): string | null; get agencyName(): string | null; get agencyId(): number | null; get urlLabel(): string | null; get mainPhoto(): string | null; get photos(): HestiaPhoto[] | null; get heroImage(): string | null; get email(): string | null; get salesEmail(): string | null; get lettingsEmail(): string | null; get contactTelephone(): string | null; get town(): string | null; get postcode(): string | null; get streetAddress(): string | null; get county(): string | null; get description(): string | null; get shortDescription(): string | null; get lat(): number | null; get lng(): number | null; get slug(): string | null; get displayAddress(): string | null; get salesTelephone(): string | null; get lettingsTelephone(): string | null; get hasSocialLinks(): boolean; get facebookUri(): string | null; get linkedinUri(): string | null; get instagramUri(): string | null; get position(): number | null; get twitterUri(): string | null; get franchiseeName(): string | null; get uniqueSellingPoints(): USP[] | null; get openingTimes(): HestiaOpeningTime[] | null; get openingTimesJoined(): HestiaOpeningTimeJoined[] | null; get isLettingsEnabled(): boolean; get isSalesEnabled(): boolean; get news(): HestiaNews[] | null; get wantedAds(): WantedAd[] | null; get hasFeatureProperties(): boolean; get tenantFees(): DBAPIFee[] | null; get commissionFeesAndCharges(): DBAPIFee[] | null; get isVirtualOffice(): boolean; get initialFees(): DBAPIFee[] | null; get depositFees(): DBAPIFee[] | null; get renewalFees(): DBAPIFee[] | null; get generalFees(): DBAPIFee[] | null; get staffProfiles(): AgencyEmployee[] | null; get branchManager(): AgencyEmployee | null; get sharedSalesBranch(): HestiaService | null; get sharedLettingsBranch(): HestiaService | null; get branchOpeningTimes(): BranchOpeningHours[] | null; get services(): HestiaService[] | null; get departments(): BranchDepartment[]; get accessibilityUrl(): string | null; /** * Returns an array of objects containing the `feature_property` metadata, attached * to the branch hestia response, as well as a Property model instance. * * The `id` for each `feature_property` is used to asynchronously fetch a * Property instance for each entry. */ getFeatureProperties(): Promise<{ metadata: HestiaFeatureProperty; property: Property; }[] | null>; getTestimonials(): Promise; getArticles(): Promise; getRecentSalesProperties(pageSize?: number): Promise<{ properties: Property[] | null; pagination: Pagination; } | null>; getRecentLettingsProperties(pageSize?: number): Promise<{ properties: Property[] | null; pagination: Pagination; } | null>; /** * Fetches dbapi data to make available for additional getters without harming * performance of themes that only require hestia data. */ getExtendedData(): Promise; getCalendarEvents(): Promise; getCalendarEventProperties(): Promise; } //# sourceMappingURL=branch.d.ts.map